{"_id":"@buschtoens/sparkles-component","_rev":"1-b1b7792d00662d8e2e99b26107f92638","name":"@buschtoens/sparkles-component","dist-tags":{"beta":"1.3.0-beta.1","latest":"1.3.0-beta.1"},"versions":{"1.3.0-beta.1":{"name":"@buschtoens/sparkles-component","version":"1.3.0-beta.1","description":"Experiment with `@glimmer/component` style APIs in Ember apps via existing public APIs","keywords":["ember-addon"],"license":"MIT","author":{"name":"Robert Jackson","email":"me@rwjblue.com"},"directories":{"doc":"doc","test":"tests"},"repository":{"type":"git","url":"git+https://github.com/rwjblue/sparkles-component.git"},"scripts":{"build":"ember build","lint:js":"eslint .","start":"ember serve","test":"ember test","test:all":"ember try:each","prepublishOnly":"ember ts:precompile","postpublish":"ember ts:clean","postinstall":"node ./postinstall","nodetest":"mocha node-tests --recursive"},"dependencies":{"@ember-decorators/utils":"^4.0.0","@glimmer/env":"^0.1.7","ember-cli-babel":"^7.2.0","ember-cli-get-component-path-option":"^1.0.0","ember-cli-is-package-missing":"^1.0.0","ember-cli-normalize-entity-name":"^1.0.0","ember-cli-path-utils":"^1.0.0","ember-cli-string-utils":"^1.1.0","ember-cli-typescript":"^2.0.0-rc.1","ember-compatibility-helpers":"^1.1.2"},"devDependencies":{"@ember-decorators/babel-transforms":"^4.0.0","@ember/optional-features":"^0.6.1","@types/ember":"~3.0.26","@types/ember-qunit":"~3.4.3","@types/ember-test-helpers":"~1.0.4","@types/ember-testing-helpers":"^0.0.3","@types/ember__test-helpers":"~0.7.6","@types/mocha":"^5.2.5","@types/qunit":"^2.5.3","@types/rsvp":"^4.0.2","babel-eslint":"^8.2.6","broccoli-asset-rev":"^2.7.0","ember-ajax":"^3.0.0","ember-cli":"~3.4.0-beta.1","ember-cli-blueprint-test-helpers":"^0.19.1","ember-cli-dependency-checker":"^2.0.0","ember-cli-eslint":"^4.2.1","ember-cli-htmlbars":"^2.0.3","ember-cli-htmlbars-inline-precompile":"^1.0.3","ember-cli-inject-live-reload":"^1.4.1","ember-cli-qunit":"^4.3.2","ember-cli-sri":"^2.1.0","ember-cli-uglify":"^2.1.0","ember-disable-prototype-extensions":"^1.1.2","ember-export-application-global":"^2.0.0","ember-load-initializers":"^1.1.0","ember-maybe-import-regenerator":"^0.1.6","ember-resolver":"^5.0.0","ember-source":"~3.4.0","ember-source-channel-url":"^1.0.1","ember-try":"^1.0.0-beta.3","eslint-plugin-ember":"^5.0.0","eslint-plugin-node":"^6.0.1","loader.js":"^4.2.3","lodash.flatmap":"^4.5.0","lodash.merge":"^4.6.1","mocha":"^5.0.0","qunit-dom":"^0.7.1","typescript":"^2.9.2"},"engines":{"node":"6.* || 8.* || >= 10.*"},"ember-addon":{"configPath":"tests/dummy/config","defaultBlueprint":"install-sparkles"},"gitHead":"bffb927184718c98e659be2de405efa291c5dcae","bugs":{"url":"https://github.com/rwjblue/sparkles-component/issues"},"homepage":"https://github.com/rwjblue/sparkles-component#readme","_id":"@buschtoens/sparkles-component@1.3.0-beta.1","_npmVersion":"6.5.0","_nodeVersion":"11.6.0","_npmUser":{"name":"buschtoens","email":"buschtoens@gmail.com"},"dist":{"integrity":"sha512-Hd5Dp4SqTkZjDzlfSidg8F/ROnACdRaU243FnkgsuNAyAN73zLjvbdKeuF4Sy52Mh/v9G6Gu9XUaRESxMOCs7Q==","shasum":"4b0d350fd594aa2a713b72103fa938fdf7974c73","tarball":"https://registry.npmjs.org/@buschtoens/sparkles-component/-/sparkles-component-1.3.0-beta.1.tgz","fileCount":33,"unpackedSize":418843,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNxsoCRA9TVsSAnZWagAAkoQP/1OXBnXsT7mgjbVD5iin\nWB9KbqL5uKL9POepLBKIQoKwtGvNwMJvmnvTuI7gbFcELZGhM6Tw5jcQ+5QU\njfnN5a2k7WSkm73+Vx8xvT0YeveJF7oZ4xd+yLzE6SA8n57cTuRWLRenaaWO\n2GVvYbJUlDU8FNDnqdke/GudeijGVMUY13uH7t3KASedjBtPxF7WgaMETwEQ\nId+z+W30M4nESgHcG987cNeSdGbgozkNcvugWovpm11KJ+ZMerg9sL02gukp\nJDZdN143QEc8rZ6azKsgCD0WjvIx8c1Xvdl2paVQf5zpNmDiD4oT3QSQMl5a\ncSBTRXsbRJA+tQu7SJk5ZsA4Up6SfS7bPSt+Ia1+0UIGtzLeaeLE3gVDzjOc\nF/Q7yz/JKUoALGoi/G4ayVp39ZQKbeMpTJ1CAb5U2Mh++Ti0b6zcZqCwCSFe\ng5/I9r/eKjFy2Imqr/PXs6aDHflPZDuf5bZVXY55SB2btPIjYab0X+lk37bX\ne0JNTsBVfjhyHkLJk/DiolpiVNpA/dUtkNeUKYSS/KeozTKaic+flfWTE3Mo\nQUntmKaAuc86hmqPjbmLYEHP9++vONetm9n2tF9MSntEwBNlVoX7IpqHdY/G\nQvKcQhVKbpg/V0E4Tr+0/gPjQ5MOPNlK5hg7sCJvtKgTwHGRJUMMSXC66OGG\nq2HC\r\n=/Y6o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHB8TzCCykJP2SS0s0eea6+sUky4YfyJ+rmkGmC66EhQIgGQewhGnQRK7y0J/pnI7+m1v7+hbmNBAfte4rSbfqR/I="}]},"maintainers":[{"name":"buschtoens","email":"buschtoens@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sparkles-component_1.3.0-beta.1_1547115303369_0.4904847020526175"},"_hasShrinkwrap":false}},"time":{"created":"2019-01-10T10:15:03.189Z","1.3.0-beta.1":"2019-01-10T10:15:03.530Z","modified":"2022-04-04T21:08:42.732Z"},"maintainers":[{"name":"buschtoens","email":"buschtoens@gmail.com"}],"description":"Experiment with `@glimmer/component` style APIs in Ember apps via existing public APIs","homepage":"https://github.com/rwjblue/sparkles-component#readme","keywords":["ember-addon"],"repository":{"type":"git","url":"git+https://github.com/rwjblue/sparkles-component.git"},"author":{"name":"Robert Jackson","email":"me@rwjblue.com"},"bugs":{"url":"https://github.com/rwjblue/sparkles-component/issues"},"license":"MIT","readme":"sparkles-component\n==============================================================================\n\n![R. Sparkles](https://media.giphy.com/media/NwkYPLmQSLmhy/giphy.gif)\n\nAddon used to experiment with `@glimmer/component` style APIs in Ember apps via\nexisting public APIs.\n\nInstallation\n------------------------------------------------------------------------------\n\n```\nember install sparkles-component\n```\n\n\nUsage\n------------------------------------------------------------------------------\n\nThe `sparkles-component` API supports most of the `@glimmer/component` API, including:\n\n* Lifecycle hooks\n  * `constructor` - will be called when the component is needed, passed the evaluated named arguments for the component\n  * `didInsertElement` - will be called after the component has been rendered the first time, after the whole top-down rendering process is completed\n  * `didUpdate` - will be called after the component has been updated, after the whole top-down rendering process is completed\n  * `destroy` - will be called when the component is no longer needed\n* Tracked properties\n  * Support for setting local properties (triggering a rerender of that property)\n  * Support for setting up dependent keys to cause a properties getter to be invoked again\n  * Support for tracking class fields\n* Decorator Support\n  * Support for consuming with Babel 6 (run `ember install -S @ember-decorators/babel-transforms@^2.0.0`)\n  * Support consuming via TypeScript (enable via `experimentalDecorators` compiler option in `tsconfig.json`)\n\nMissing features from `@glimmer/component`:\n\n* Access to `this.bounds` within the component. At the moment there is no access available at all to the rendered DOM. The easiest work around for now would be to use an attribute in your template along with `document.querySelector`.\n* Access to `this.debugName` within the component. This was largely only present for debugging purposes, but is not possible to access in the Ember APIs at the moment.\n\n### Example\n\nComprehensive example (nearly **exactly** the same as the [the glimmer.js guides](https://glimmerjs.com/guides/components-and-actions)):\n\n```js\n// app/components/conference-speakers.js (.ts would also work)\nimport Component, { tracked } from \"sparkles-component\";\n\nexport default class ConferenceSpeakers extends Component {\n  @tracked current = 0;\n  speakers = ['Tom', 'Yehuda', 'Ed'];\n\n  @tracked('current')\n  get currentlySpeaking() {\n    return this.speakers[this.current];\n  }\n\n  @tracked('current')\n  get moreSpeakers() {\n    return (this.speakers.length - 1) > this.current;\n  }\n\n  next() {\n    this.current = this.current + 1;\n  }\n}\n```\n\n```hbs\n{{!-- app/templates/components/conference-speakers.hbs --}}\n\n<div>\n  <p>Speaking: {{this.currentlySpeaking}}</p>\n  <ul>\n    {{#each this.speakers key=\"@index\" as |speaker|}}\n      <li>{{speaker}}</li>\n    {{/each}}\n  </ul>\n\n  {{#if this.moreSpeakers}}\n    <button onclick={{action this.next}}>Next</button>\n  {{else}}\n    <p>All finished!</p>\n  {{/if}}\n</div>\n```\n\n\nContributing\n------------------------------------------------------------------------------\n\n### Installation\n\n* `git clone <repository-url>`\n* `cd sparkles-component`\n* `yarn install`\n\n### Linting\n\n* `yarn lint:js`\n* `yarn lint:js --fix`\n\n### Running tests\n\n* `ember test` – Runs the test suite on the current Ember version\n* `ember test --server` – Runs the test suite in \"watch mode\"\n* `ember try:each` – Runs the test suite against multiple Ember versions\n\n### Running the dummy application\n\n* `ember serve`\n* Visit the dummy application at [http://localhost:4200](http://localhost:4200).\n\nFor more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).\n\nLicense\n------------------------------------------------------------------------------\n\nThis project is licensed under the [MIT License](LICENSE.md).\n","readmeFilename":"README.md"}