Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Jan 5, 2024
1 parent de70294 commit 59bc717
Show file tree
Hide file tree
Showing 4 changed files with 430 additions and 192 deletions.
11 changes: 5 additions & 6 deletions ember-statechart-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@
"prepack": "pnpm build"
},
"dependencies": {
"@embroider/addon-shim": "^1.0.0",
"ember-tracked-storage-polyfill": "^1.0.0"
"@embroider/addon-shim": "^1.0.0"
},
"peerDependencies": {
"@glint/template": ">= 0.8.3",
Expand All @@ -73,6 +72,9 @@
"@glimmer/compiler": "^0.87.1",
"@glimmer/component": "^1.0.4",
"@glimmer/env": "^0.1.7",
"@glint/core": "^1.2.1",
"@glint/environment-ember-loose": "^1.2.1",
"@glint/environment-ember-template-imports": "^1.2.1",
"@glint/template": "^1.2.1",
"@nullvoxpopuli/eslint-configs": "^3.2.2",
"@rollup/plugin-babel": "^6.0.4",
Expand All @@ -96,10 +98,7 @@
"prettier": "^3.1.1",
"rollup": "4.9.2",
"typescript": "^5.3.3",
"xstate": "^5.4.1",
"@glint/environment-ember-template-imports": "^1.2.1",
"@glint/environment-ember-loose": "^1.2.1",
"@glint/core": "^1.2.1"
"xstate": "^5.4.1"
},
"engines": {
"node": ">=12.2.0 < 13 || >= 14"
Expand Down
10 changes: 8 additions & 2 deletions ember-statechart-component/src/registration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { setComponentManager, setComponentTemplate } from '@ember/component';
import { hbs } from 'ember-cli-htmlbars';
import { precompileTemplate } from '@ember/template-compilation';

import { StateNode } from 'xstate';

Expand All @@ -23,8 +23,14 @@ export function setupComponentMachines(override?: typeof StateNode) {
(owner) => ComponentManager.create(owner),
override?.prototype || StateNode.prototype
);

setComponentTemplate(
hbs`{{yield this.state this.send this.onTransition}}`,
precompileTemplate(
`{{yield this.state this.send this.onTransition}}`,
{
strictMode: true,
}
),
override?.prototype || StateNode.prototype
);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"ember-template-lint": "^5.13.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-ember": "^11.12.0",
"eslint-plugin-ember": "github:ember-cli/eslint-plugin-ember#master",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^5.1.2",
"npm-run-all": "^4.1.5",
Expand Down
Loading

0 comments on commit 59bc717

Please sign in to comment.