@coaction/xstate 1.5.0 → 2.0.0
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/README.md +2 -2
- package/dist/index.d.mts +20 -14
- package/dist/index.d.ts +20 -14
- package/dist/index.js +88 -88
- package/dist/index.mjs +79 -86
- package/package.json +31 -39
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @coaction/xstate
|
|
2
2
|
|
|
3
|
-

|
|
4
4
|
[](https://www.npmjs.com/package/@coaction/xstate)
|
|
5
5
|

|
|
6
6
|
|
|
@@ -54,4 +54,4 @@ store.getState().send({ type: 'increment' });
|
|
|
54
54
|
|
|
55
55
|
## Documentation
|
|
56
56
|
|
|
57
|
-
You can find the documentation [here](https://github.com/
|
|
57
|
+
You can find the documentation [here](https://github.com/coactionjs/coaction).
|
package/dist/index.d.mts
CHANGED
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "xstate";
|
|
2
2
|
|
|
3
|
+
//#region \0rolldown/runtime.js
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region packages/coaction-xstate/src/index.d.ts
|
|
3
6
|
type XStateActor<TContext extends object = object, TEvent = any> = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
getSnapshot: () => {
|
|
8
|
+
context: TContext;
|
|
9
|
+
};
|
|
10
|
+
subscribe: (observer: (snapshot: {
|
|
11
|
+
context: TContext;
|
|
12
|
+
}) => void) => {
|
|
13
|
+
unsubscribe: () => void;
|
|
14
|
+
};
|
|
15
|
+
send: (event: TEvent) => void;
|
|
13
16
|
};
|
|
14
17
|
/**
|
|
15
18
|
* Bind an XState actor to Coaction.
|
|
16
19
|
*/
|
|
17
|
-
declare const bindXState: <TContext extends object, TEvent>(actor: XStateActor<TContext, TEvent>) => { [K in keyof TContext]: TContext[K]
|
|
18
|
-
|
|
20
|
+
declare const bindXState: <TContext extends object, TEvent>(actor: XStateActor<TContext, TEvent>) => { [K in keyof TContext]: TContext[K] } & {
|
|
21
|
+
send: (event: TEvent) => void;
|
|
19
22
|
};
|
|
20
23
|
/**
|
|
21
24
|
* Adapt a state type for Coaction create function.
|
|
22
25
|
*/
|
|
23
26
|
declare const adapt: <T extends object>(store: T) => T;
|
|
24
|
-
|
|
25
|
-
export { adapt, bindXState };
|
|
27
|
+
declare namespace index_d_exports {
|
|
28
|
+
export { adapt, bindXState };
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { adapt, bindXState };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "xstate";
|
|
2
2
|
|
|
3
|
+
//#region \0rolldown/runtime.js
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region packages/coaction-xstate/src/index.d.ts
|
|
3
6
|
type XStateActor<TContext extends object = object, TEvent = any> = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
getSnapshot: () => {
|
|
8
|
+
context: TContext;
|
|
9
|
+
};
|
|
10
|
+
subscribe: (observer: (snapshot: {
|
|
11
|
+
context: TContext;
|
|
12
|
+
}) => void) => {
|
|
13
|
+
unsubscribe: () => void;
|
|
14
|
+
};
|
|
15
|
+
send: (event: TEvent) => void;
|
|
13
16
|
};
|
|
14
17
|
/**
|
|
15
18
|
* Bind an XState actor to Coaction.
|
|
16
19
|
*/
|
|
17
|
-
declare const bindXState: <TContext extends object, TEvent>(actor: XStateActor<TContext, TEvent>) => { [K in keyof TContext]: TContext[K]
|
|
18
|
-
|
|
20
|
+
declare const bindXState: <TContext extends object, TEvent>(actor: XStateActor<TContext, TEvent>) => { [K in keyof TContext]: TContext[K] } & {
|
|
21
|
+
send: (event: TEvent) => void;
|
|
19
22
|
};
|
|
20
23
|
/**
|
|
21
24
|
* Adapt a state type for Coaction create function.
|
|
22
25
|
*/
|
|
23
26
|
declare const adapt: <T extends object>(store: T) => T;
|
|
24
|
-
|
|
25
|
-
export { adapt, bindXState };
|
|
27
|
+
declare namespace index_d_exports {
|
|
28
|
+
export { adapt, bindXState };
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { adapt, bindXState };
|
package/dist/index.js
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#endregion
|
|
3
|
+
let coaction = require("coaction");
|
|
4
|
+
//#region packages/coaction-xstate/src/index.ts
|
|
5
|
+
const actorMap = /* @__PURE__ */ new WeakMap();
|
|
6
|
+
const isUnsafeKey = (key) => typeof key === "string" && (key === "__proto__" || key === "prototype" || key === "constructor");
|
|
7
|
+
const getOwnEnumerableKeys = (value) => Reflect.ownKeys(value).filter((key) => Object.prototype.propertyIsEnumerable.call(value, key));
|
|
8
|
+
const assignContext = (target, source) => {
|
|
9
|
+
for (const key of getOwnEnumerableKeys(source)) {
|
|
10
|
+
if (isUnsafeKey(key)) continue;
|
|
11
|
+
target[key] = source[key];
|
|
12
|
+
}
|
|
9
13
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
send: actor.send.bind(actor)
|
|
72
|
-
});
|
|
73
|
-
const descriptors = Object.getOwnPropertyDescriptors(state);
|
|
74
|
-
const copyState = Object.defineProperties({}, descriptors);
|
|
75
|
-
const rawState = Object.defineProperties({}, descriptors);
|
|
76
|
-
actorMap.set(rawState, actor);
|
|
77
|
-
return {
|
|
78
|
-
copyState,
|
|
79
|
-
bind: () => rawState
|
|
80
|
-
};
|
|
81
|
-
})
|
|
14
|
+
const unsupportedMutationMessage = "XState binding state cannot be mutated directly. Please use actor events.";
|
|
15
|
+
/**
|
|
16
|
+
* Bind an XState actor to Coaction.
|
|
17
|
+
*/
|
|
18
|
+
const bindXState = (0, coaction.createBinder)({
|
|
19
|
+
handleStore: (store, rawState, _state, internal) => {
|
|
20
|
+
const actor = actorMap.get(rawState);
|
|
21
|
+
if (!actor) throw new Error("xstate actor is not found");
|
|
22
|
+
store.setState = () => {
|
|
23
|
+
throw new Error(unsupportedMutationMessage);
|
|
24
|
+
};
|
|
25
|
+
if (store.share === "client") return;
|
|
26
|
+
let isApplyingActorSnapshot = false;
|
|
27
|
+
internal.assertMutationAllowed = (operation) => {
|
|
28
|
+
if (operation === "apply" && isApplyingActorSnapshot) return;
|
|
29
|
+
throw new Error(unsupportedMutationMessage);
|
|
30
|
+
};
|
|
31
|
+
const baseApply = store.apply.bind(store);
|
|
32
|
+
store.apply = (state, patches) => {
|
|
33
|
+
if (!isApplyingActorSnapshot) throw new Error(unsupportedMutationMessage);
|
|
34
|
+
return baseApply(state, patches);
|
|
35
|
+
};
|
|
36
|
+
const applyActorSnapshot = (context) => {
|
|
37
|
+
isApplyingActorSnapshot = true;
|
|
38
|
+
try {
|
|
39
|
+
(0, coaction.replaceExternalStoreState)(store, internal, context);
|
|
40
|
+
} finally {
|
|
41
|
+
isApplyingActorSnapshot = false;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
let subscription;
|
|
45
|
+
const cancelReadySubscription = (0, coaction.onStoreReady)(store, () => {
|
|
46
|
+
subscription = actor.subscribe((snapshot) => {
|
|
47
|
+
applyActorSnapshot(snapshot.context);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
const baseDestroy = store.destroy;
|
|
51
|
+
let destroyed = false;
|
|
52
|
+
store.destroy = () => {
|
|
53
|
+
if (destroyed) return;
|
|
54
|
+
destroyed = true;
|
|
55
|
+
cancelReadySubscription();
|
|
56
|
+
subscription?.unsubscribe();
|
|
57
|
+
subscription = void 0;
|
|
58
|
+
baseDestroy();
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
handleState: ((actor) => {
|
|
62
|
+
const snapshot = actor.getSnapshot();
|
|
63
|
+
const state = {};
|
|
64
|
+
assignContext(state, snapshot.context);
|
|
65
|
+
state.send = actor.send.bind(actor);
|
|
66
|
+
const descriptors = Object.getOwnPropertyDescriptors(state);
|
|
67
|
+
const copyState = Object.defineProperties({}, descriptors);
|
|
68
|
+
const rawState = Object.defineProperties({}, descriptors);
|
|
69
|
+
actorMap.set(rawState, actor);
|
|
70
|
+
return {
|
|
71
|
+
copyState,
|
|
72
|
+
bind: () => rawState
|
|
73
|
+
};
|
|
74
|
+
})
|
|
82
75
|
});
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Adapt a state type for Coaction create function.
|
|
78
|
+
*/
|
|
79
|
+
const adapt = (store) => store;
|
|
80
|
+
//#endregion
|
|
81
|
+
exports.adapt = adapt;
|
|
82
|
+
exports.bindXState = bindXState;
|
|
83
|
+
var xstate = require("xstate");
|
|
84
|
+
Object.keys(xstate).forEach(function(k) {
|
|
85
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
86
|
+
enumerable: true,
|
|
87
|
+
get: function() {
|
|
88
|
+
return xstate[k];
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
91
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,88 +1,81 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { createBinder, onStoreReady, replaceExternalStoreState } from "coaction";
|
|
2
|
+
export * from "xstate";
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region packages/coaction-xstate/src/index.ts
|
|
5
|
+
const actorMap = /* @__PURE__ */ new WeakMap();
|
|
6
|
+
const isUnsafeKey = (key) => typeof key === "string" && (key === "__proto__" || key === "prototype" || key === "constructor");
|
|
7
|
+
const getOwnEnumerableKeys = (value) => Reflect.ownKeys(value).filter((key) => Object.prototype.propertyIsEnumerable.call(value, key));
|
|
8
|
+
const assignContext = (target, source) => {
|
|
9
|
+
for (const key of getOwnEnumerableKeys(source)) {
|
|
10
|
+
if (isUnsafeKey(key)) continue;
|
|
11
|
+
target[key] = source[key];
|
|
12
|
+
}
|
|
8
13
|
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
14
|
+
const unsupportedMutationMessage = "XState binding state cannot be mutated directly. Please use actor events.";
|
|
15
|
+
/**
|
|
16
|
+
* Bind an XState actor to Coaction.
|
|
17
|
+
*/
|
|
18
|
+
const bindXState = createBinder({
|
|
19
|
+
handleStore: (store, rawState, _state, internal) => {
|
|
20
|
+
const actor = actorMap.get(rawState);
|
|
21
|
+
if (!actor) throw new Error("xstate actor is not found");
|
|
22
|
+
store.setState = () => {
|
|
23
|
+
throw new Error(unsupportedMutationMessage);
|
|
24
|
+
};
|
|
25
|
+
if (store.share === "client") return;
|
|
26
|
+
let isApplyingActorSnapshot = false;
|
|
27
|
+
internal.assertMutationAllowed = (operation) => {
|
|
28
|
+
if (operation === "apply" && isApplyingActorSnapshot) return;
|
|
29
|
+
throw new Error(unsupportedMutationMessage);
|
|
30
|
+
};
|
|
31
|
+
const baseApply = store.apply.bind(store);
|
|
32
|
+
store.apply = (state, patches) => {
|
|
33
|
+
if (!isApplyingActorSnapshot) throw new Error(unsupportedMutationMessage);
|
|
34
|
+
return baseApply(state, patches);
|
|
35
|
+
};
|
|
36
|
+
const applyActorSnapshot = (context) => {
|
|
37
|
+
isApplyingActorSnapshot = true;
|
|
38
|
+
try {
|
|
39
|
+
replaceExternalStoreState(store, internal, context);
|
|
40
|
+
} finally {
|
|
41
|
+
isApplyingActorSnapshot = false;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
let subscription;
|
|
45
|
+
const cancelReadySubscription = onStoreReady(store, () => {
|
|
46
|
+
subscription = actor.subscribe((snapshot) => {
|
|
47
|
+
applyActorSnapshot(snapshot.context);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
const baseDestroy = store.destroy;
|
|
51
|
+
let destroyed = false;
|
|
52
|
+
store.destroy = () => {
|
|
53
|
+
if (destroyed) return;
|
|
54
|
+
destroyed = true;
|
|
55
|
+
cancelReadySubscription();
|
|
56
|
+
subscription?.unsubscribe();
|
|
57
|
+
subscription = void 0;
|
|
58
|
+
baseDestroy();
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
handleState: ((actor) => {
|
|
62
|
+
const snapshot = actor.getSnapshot();
|
|
63
|
+
const state = {};
|
|
64
|
+
assignContext(state, snapshot.context);
|
|
65
|
+
state.send = actor.send.bind(actor);
|
|
66
|
+
const descriptors = Object.getOwnPropertyDescriptors(state);
|
|
67
|
+
const copyState = Object.defineProperties({}, descriptors);
|
|
68
|
+
const rawState = Object.defineProperties({}, descriptors);
|
|
69
|
+
actorMap.set(rawState, actor);
|
|
70
|
+
return {
|
|
71
|
+
copyState,
|
|
72
|
+
bind: () => rawState
|
|
73
|
+
};
|
|
74
|
+
})
|
|
31
75
|
});
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const actor = actorMap.get(rawState);
|
|
39
|
-
if (!actor) {
|
|
40
|
-
throw new Error("xstate actor is not found");
|
|
41
|
-
}
|
|
42
|
-
let isFromActor = false;
|
|
43
|
-
const baseSetState = store.setState;
|
|
44
|
-
store.setState = (next, updater) => {
|
|
45
|
-
if (!isFromActor) {
|
|
46
|
-
throw new Error(
|
|
47
|
-
"setState is not supported with xstate binding. Please use actor events."
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
return baseSetState(next, updater);
|
|
51
|
-
};
|
|
52
|
-
const subscription = actor.subscribe((snapshot) => {
|
|
53
|
-
isFromActor = true;
|
|
54
|
-
try {
|
|
55
|
-
baseSetState(snapshot.context);
|
|
56
|
-
} finally {
|
|
57
|
-
isFromActor = false;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
const baseDestroy = store.destroy;
|
|
61
|
-
store.destroy = () => {
|
|
62
|
-
subscription.unsubscribe();
|
|
63
|
-
baseDestroy();
|
|
64
|
-
};
|
|
65
|
-
},
|
|
66
|
-
handleState: ((actor) => {
|
|
67
|
-
const snapshot = actor.getSnapshot();
|
|
68
|
-
const state = Object.assign({}, snapshot.context, {
|
|
69
|
-
send: actor.send.bind(actor)
|
|
70
|
-
});
|
|
71
|
-
const descriptors = Object.getOwnPropertyDescriptors(state);
|
|
72
|
-
const copyState = Object.defineProperties({}, descriptors);
|
|
73
|
-
const rawState = Object.defineProperties({}, descriptors);
|
|
74
|
-
actorMap.set(rawState, actor);
|
|
75
|
-
return {
|
|
76
|
-
copyState,
|
|
77
|
-
bind: () => rawState
|
|
78
|
-
};
|
|
79
|
-
})
|
|
80
|
-
});
|
|
81
|
-
var adapt = (store) => store;
|
|
82
|
-
|
|
83
|
-
// index.ts
|
|
84
|
-
__reExport(index_exports, src_exports);
|
|
85
|
-
export {
|
|
86
|
-
adapt,
|
|
87
|
-
bindXState
|
|
88
|
-
};
|
|
76
|
+
/**
|
|
77
|
+
* Adapt a state type for Coaction create function.
|
|
78
|
+
*/
|
|
79
|
+
const adapt = (store) => store;
|
|
80
|
+
//#endregion
|
|
81
|
+
export { adapt, bindXState };
|
package/package.json
CHANGED
|
@@ -1,20 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coaction/xstate",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A Coaction integration tool for XState",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"
|
|
6
|
+
"actor",
|
|
7
7
|
"coaction",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
],
|
|
11
|
-
"authors": [
|
|
12
|
-
"Michael Lin <unadlib@gmail.com> (https://github.com/unadlib)"
|
|
8
|
+
"state",
|
|
9
|
+
"xstate"
|
|
13
10
|
],
|
|
14
|
-
"homepage": "https://github.com/
|
|
11
|
+
"homepage": "https://github.com/coactionjs/coaction/tree/main/packages/coaction-xstate#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/coactionjs/coaction/issues"
|
|
14
|
+
},
|
|
15
15
|
"license": "MIT",
|
|
16
|
+
"author": "unadlib",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/coactionjs/coaction.git",
|
|
20
|
+
"directory": "packages/coaction-xstate"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"sideEffects": false,
|
|
16
26
|
"main": "dist/index.js",
|
|
17
27
|
"module": "dist/index.mjs",
|
|
28
|
+
"types": "dist/index.d.ts",
|
|
18
29
|
"exports": {
|
|
19
30
|
".": {
|
|
20
31
|
"types": "./dist/index.d.ts",
|
|
@@ -24,44 +35,25 @@
|
|
|
24
35
|
},
|
|
25
36
|
"./package.json": "./package.json"
|
|
26
37
|
},
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"dist"
|
|
31
|
-
],
|
|
32
|
-
"repository": {
|
|
33
|
-
"type": "git",
|
|
34
|
-
"url": "https://github.com/unadlib/coaction.git",
|
|
35
|
-
"directory": "packages/coaction-xstate"
|
|
36
|
-
},
|
|
37
|
-
"bugs": {
|
|
38
|
-
"url": "https://github.com/unadlib/coaction/issues"
|
|
39
|
-
},
|
|
40
|
-
"peerDependencies": {
|
|
41
|
-
"coaction": "^1.5.0",
|
|
42
|
-
"xstate": "^5.0.0"
|
|
43
|
-
},
|
|
44
|
-
"peerDependenciesMeta": {
|
|
45
|
-
"coaction": {
|
|
46
|
-
"optional": true
|
|
47
|
-
},
|
|
48
|
-
"xstate": {
|
|
49
|
-
"optional": true
|
|
50
|
-
}
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public",
|
|
40
|
+
"provenance": true
|
|
51
41
|
},
|
|
52
42
|
"devDependencies": {
|
|
53
43
|
"xstate": "^5.23.0",
|
|
54
|
-
"coaction": "
|
|
44
|
+
"coaction": "2.0.0"
|
|
55
45
|
},
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"coaction": "^2.0.0",
|
|
48
|
+
"xstate": "^5.0.0"
|
|
59
49
|
},
|
|
60
|
-
"
|
|
50
|
+
"authors": [
|
|
51
|
+
"Michael Lin <unadlib@gmail.com> (https://github.com/unadlib)"
|
|
52
|
+
],
|
|
61
53
|
"scripts": {
|
|
62
54
|
"clean": "rm -rf dist",
|
|
63
55
|
"test": "vitest run test",
|
|
64
|
-
"build": "
|
|
65
|
-
"dev": "
|
|
56
|
+
"build": "node ../../scripts/build-package.mjs",
|
|
57
|
+
"dev": "node ../../scripts/build-package.mjs --watch"
|
|
66
58
|
}
|
|
67
59
|
}
|