@blockquote-web-components/blockquote-controller-xstate 2.2.0 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockquote-web-components/blockquote-controller-xstate",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "This controller allows you to subscribe to an XState actor, updating a specified reactive property whenever the state machine transitions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lit",
|
|
@@ -67,12 +67,12 @@
|
|
|
67
67
|
]
|
|
68
68
|
},
|
|
69
69
|
"prettier": {
|
|
70
|
-
"arrowParens": "avoid",
|
|
71
70
|
"bracketSameLine": true,
|
|
71
|
+
"bracketSpacing": false,
|
|
72
72
|
"htmlWhitespaceSensitivity": "ignore",
|
|
73
73
|
"printWidth": 100,
|
|
74
74
|
"singleQuote": true,
|
|
75
|
-
"trailingComma": "
|
|
75
|
+
"trailingComma": "es5",
|
|
76
76
|
"overrides": [
|
|
77
77
|
{
|
|
78
78
|
"files": "*.{scss,css}",
|
|
@@ -98,11 +98,11 @@
|
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
100
|
"@blockquote-web-components/blockquote-base-common-dev-dependencies": "^1.9.1",
|
|
101
|
-
"@blockquote-web-components/blockquote-base-embedded-webview": "^1.11.
|
|
101
|
+
"@blockquote-web-components/blockquote-base-embedded-webview": "^1.11.2"
|
|
102
102
|
},
|
|
103
103
|
"publishConfig": {
|
|
104
104
|
"access": "public"
|
|
105
105
|
},
|
|
106
106
|
"customElements": "custom-elements.json",
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "0d8e9582b65cca369553640cc72d2ca93f2c0a61"
|
|
108
108
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {createActor} from 'xstate';
|
|
2
2
|
/**
|
|
3
3
|
* # BlockquoteControllerXstate
|
|
4
4
|
*
|
|
@@ -193,7 +193,7 @@ class UseMachine {
|
|
|
193
193
|
* callback?: Function
|
|
194
194
|
* }} arg - The arguments for the constructor.
|
|
195
195
|
*/
|
|
196
|
-
constructor(host, {
|
|
196
|
+
constructor(host, {machine, options, callback}) {
|
|
197
197
|
this.machine = machine;
|
|
198
198
|
this.options = options;
|
|
199
199
|
this.callback = callback;
|
|
@@ -224,7 +224,7 @@ class UseMachine {
|
|
|
224
224
|
/**
|
|
225
225
|
* @param {import('xstate').SnapshotFrom<typeof this.machine>} snapshot
|
|
226
226
|
*/
|
|
227
|
-
onNext = snapshot => {
|
|
227
|
+
onNext = (snapshot) => {
|
|
228
228
|
if (this.currentSnapshot !== snapshot) {
|
|
229
229
|
this.currentSnapshot = snapshot;
|
|
230
230
|
this.callback?.(snapshot);
|
|
@@ -253,4 +253,4 @@ class UseMachine {
|
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
export {
|
|
256
|
+
export {UseMachine as BlockquoteControllerXstate};
|
package/src/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {BlockquoteControllerXstate} from './BlockquoteControllerXstate.js';
|