jssm 5.162.0 → 5.162.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/README.md +2 -2
- package/dist/cdn/instance.js +1 -1
- package/dist/cdn/viz.js +1 -1
- package/dist/cli/fsl-export-system-prompt.cjs +1 -1
- package/dist/cli/fsl-render.cjs +1 -1
- package/dist/cli/fsl.cjs +1 -1
- package/dist/cli/lib.cjs +1 -1
- package/dist/cli/lib.mjs +1 -1
- package/dist/deno/README.md +2 -2
- package/dist/deno/jssm.d.ts +46 -46
- package/dist/deno/jssm.js +1 -1
- package/dist/deno/jssm_compiler.d.ts +4 -4
- package/dist/deno/jssm_types.d.ts +4 -4
- package/dist/fence/fence.js +48 -48
- package/dist/jssm.es5.cjs +1 -1
- package/dist/jssm.es5.iife.js +1 -1
- package/dist/jssm.es6.mjs +1 -1
- package/dist/jssm_viz.cjs +1 -1
- package/dist/jssm_viz.iife.cjs +1 -1
- package/dist/jssm_viz.mjs +1 -1
- package/jssm.es5.d.cts +52 -52
- package/jssm.es6.d.ts +52 -52
- package/jssm.fence.d.ts +43 -43
- package/jssm_viz.es5.d.cts +43 -43
- package/jssm_viz.es6.d.ts +43 -43
- package/package.json +1 -1
package/jssm.fence.d.ts
CHANGED
|
@@ -1301,15 +1301,15 @@ type JssmEventFilterMap<mDT> = {
|
|
|
1301
1301
|
/**
|
|
1302
1302
|
* Per-event filter object (as passed to {@link Machine.on}). Use
|
|
1303
1303
|
* `JssmEventDetailMap<mDT>[Ev]` to find the matching detail type.
|
|
1304
|
-
* @
|
|
1305
|
-
* @
|
|
1304
|
+
* @typeParam mDT The type of the machine data member.
|
|
1305
|
+
* @typeParam Ev The event name.
|
|
1306
1306
|
*/
|
|
1307
1307
|
type JssmEventFilter<mDT, Ev extends JssmEventName> = JssmEventFilterMap<mDT>[Ev];
|
|
1308
1308
|
/**
|
|
1309
1309
|
* Per-event handler signature. Receives a detail object typed by event
|
|
1310
1310
|
* name, so `e.action` (etc.) only exist where they're meaningful.
|
|
1311
|
-
* @
|
|
1312
|
-
* @
|
|
1311
|
+
* @typeParam mDT The type of the machine data member.
|
|
1312
|
+
* @typeParam Ev The event name.
|
|
1313
1313
|
*/
|
|
1314
1314
|
type JssmEventHandler<mDT, Ev extends JssmEventName> = (detail: JssmEventDetailMap<mDT>[Ev]) => void;
|
|
1315
1315
|
/**
|
|
@@ -1549,7 +1549,7 @@ declare class Machine<mDT> {
|
|
|
1549
1549
|
* console.log( lswitch.state() ); // 'off'
|
|
1550
1550
|
* ```
|
|
1551
1551
|
*
|
|
1552
|
-
* @
|
|
1552
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
1553
1553
|
*
|
|
1554
1554
|
* @returns The current state name.
|
|
1555
1555
|
*
|
|
@@ -1569,7 +1569,7 @@ declare class Machine<mDT> {
|
|
|
1569
1569
|
*
|
|
1570
1570
|
* See also {@link display_text}.
|
|
1571
1571
|
*
|
|
1572
|
-
* @
|
|
1572
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
1573
1573
|
*
|
|
1574
1574
|
* @param state The state to get the label for.
|
|
1575
1575
|
*
|
|
@@ -1596,7 +1596,7 @@ declare class Machine<mDT> {
|
|
|
1596
1596
|
* console.log( lswitch.display_text('b') ); // 'b'
|
|
1597
1597
|
* ```
|
|
1598
1598
|
*
|
|
1599
|
-
* @
|
|
1599
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
1600
1600
|
*
|
|
1601
1601
|
* @param state The state to get display text for.
|
|
1602
1602
|
*
|
|
@@ -1615,7 +1615,7 @@ declare class Machine<mDT> {
|
|
|
1615
1615
|
* console.log( lswitch.data() ); // 1
|
|
1616
1616
|
* ```
|
|
1617
1617
|
*
|
|
1618
|
-
* @
|
|
1618
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
1619
1619
|
*
|
|
1620
1620
|
* @returns A deep clone of the machine's current data value.
|
|
1621
1621
|
*
|
|
@@ -1779,7 +1779,7 @@ declare class Machine<mDT> {
|
|
|
1779
1779
|
* console.log( final_test.is_start_state('b') ); // true
|
|
1780
1780
|
* ```
|
|
1781
1781
|
*
|
|
1782
|
-
* @
|
|
1782
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
1783
1783
|
*
|
|
1784
1784
|
* @param whichState The name of the state to check
|
|
1785
1785
|
*
|
|
@@ -1804,7 +1804,7 @@ declare class Machine<mDT> {
|
|
|
1804
1804
|
* console.log( final_test.is_start_state('b') ); // true
|
|
1805
1805
|
* ```
|
|
1806
1806
|
*
|
|
1807
|
-
* @
|
|
1807
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
1808
1808
|
*
|
|
1809
1809
|
* @param whichState The name of the state to check
|
|
1810
1810
|
*
|
|
@@ -1857,7 +1857,7 @@ declare class Machine<mDT> {
|
|
|
1857
1857
|
* console.log( final_test.state_is_final('second') ); // true
|
|
1858
1858
|
* ```
|
|
1859
1859
|
*
|
|
1860
|
-
* @
|
|
1860
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
1861
1861
|
*
|
|
1862
1862
|
* @param whichState The name of the state to check for finality
|
|
1863
1863
|
*
|
|
@@ -1887,7 +1887,7 @@ declare class Machine<mDT> {
|
|
|
1887
1887
|
* string to recreate (to not waste repeated space;) if you want the machine
|
|
1888
1888
|
* string embedded, call {@link serialize_with_string} instead.
|
|
1889
1889
|
*
|
|
1890
|
-
* @
|
|
1890
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
1891
1891
|
*
|
|
1892
1892
|
* @param comment An optional comment string to embed in the serialized
|
|
1893
1893
|
* output for identification or debugging.
|
|
@@ -2047,7 +2047,7 @@ declare class Machine<mDT> {
|
|
|
2047
2047
|
* console.log( lswitch.states() ); // ['on', 'off']
|
|
2048
2048
|
* ```
|
|
2049
2049
|
*
|
|
2050
|
-
* @
|
|
2050
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2051
2051
|
*
|
|
2052
2052
|
* @returns An array of all state names in the machine.
|
|
2053
2053
|
*
|
|
@@ -2072,7 +2072,7 @@ declare class Machine<mDT> {
|
|
|
2072
2072
|
* console.log( lswitch.has_state('dance') ); // false
|
|
2073
2073
|
* ```
|
|
2074
2074
|
*
|
|
2075
|
-
* @
|
|
2075
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2076
2076
|
*
|
|
2077
2077
|
* @param whichState The state to be checked for existence.
|
|
2078
2078
|
*
|
|
@@ -2110,7 +2110,7 @@ declare class Machine<mDT> {
|
|
|
2110
2110
|
* ]
|
|
2111
2111
|
* ```
|
|
2112
2112
|
*
|
|
2113
|
-
* @
|
|
2113
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2114
2114
|
*
|
|
2115
2115
|
* @returns An array of all {@link JssmTransition} edge objects.
|
|
2116
2116
|
*
|
|
@@ -2261,7 +2261,7 @@ declare class Machine<mDT> {
|
|
|
2261
2261
|
* light.list_transitions(); // { entrances: [ 'yellow', 'off' ], exits: [ 'green', 'off' ] }
|
|
2262
2262
|
* ```
|
|
2263
2263
|
*
|
|
2264
|
-
* @
|
|
2264
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2265
2265
|
*
|
|
2266
2266
|
* @param whichState The state whose transitions to have listed
|
|
2267
2267
|
*
|
|
@@ -2284,7 +2284,7 @@ declare class Machine<mDT> {
|
|
|
2284
2284
|
* light.list_entrances(); // [ 'yellow', 'off' ]
|
|
2285
2285
|
* ```
|
|
2286
2286
|
*
|
|
2287
|
-
* @
|
|
2287
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2288
2288
|
*
|
|
2289
2289
|
* @param whichState The state whose entrances to have listed
|
|
2290
2290
|
*
|
|
@@ -2306,7 +2306,7 @@ declare class Machine<mDT> {
|
|
|
2306
2306
|
* light.list_exits(); // [ 'green', 'off' ]
|
|
2307
2307
|
* ```
|
|
2308
2308
|
*
|
|
2309
|
-
* @
|
|
2309
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2310
2310
|
*
|
|
2311
2311
|
* @param whichState The state whose exits to have listed
|
|
2312
2312
|
*
|
|
@@ -2444,7 +2444,7 @@ declare class Machine<mDT> {
|
|
|
2444
2444
|
* console.log( machine.actions() ); // logs ['next', 'shutdown']
|
|
2445
2445
|
* ```
|
|
2446
2446
|
*
|
|
2447
|
-
* @
|
|
2447
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2448
2448
|
*
|
|
2449
2449
|
* @param whichState The state whose actions to list. Defaults to the
|
|
2450
2450
|
* current state.
|
|
@@ -2470,7 +2470,7 @@ declare class Machine<mDT> {
|
|
|
2470
2470
|
* console.log( machine.list_states_having_action('start') ); // ['off']
|
|
2471
2471
|
* ```
|
|
2472
2472
|
*
|
|
2473
|
-
* @
|
|
2473
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2474
2474
|
*
|
|
2475
2475
|
* @param whichState The action to be checked for associated states
|
|
2476
2476
|
*
|
|
@@ -2543,7 +2543,7 @@ declare class Machine<mDT> {
|
|
|
2543
2543
|
* m.isIn('nonesuch'); // false — undeclared group has no members
|
|
2544
2544
|
* ```
|
|
2545
2545
|
*
|
|
2546
|
-
* @
|
|
2546
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2547
2547
|
*
|
|
2548
2548
|
* @param groupName The group to test the current state against.
|
|
2549
2549
|
*
|
|
@@ -2571,7 +2571,7 @@ declare class Machine<mDT> {
|
|
|
2571
2571
|
* m.groupsOf('z'); // Set {} — not in any group
|
|
2572
2572
|
* ```
|
|
2573
2573
|
*
|
|
2574
|
-
* @
|
|
2574
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2575
2575
|
*
|
|
2576
2576
|
* @param state The state whose containing groups are wanted.
|
|
2577
2577
|
*
|
|
@@ -2597,7 +2597,7 @@ declare class Machine<mDT> {
|
|
|
2597
2597
|
* m.groups(); // [ 'first', 'second' ]
|
|
2598
2598
|
* ```
|
|
2599
2599
|
*
|
|
2600
|
-
* @
|
|
2600
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2601
2601
|
*
|
|
2602
2602
|
* @returns The declared group names, in declaration order.
|
|
2603
2603
|
*
|
|
@@ -2620,7 +2620,7 @@ declare class Machine<mDT> {
|
|
|
2620
2620
|
* m.statesIn('inner'); // [ 'a', 'b' ]
|
|
2621
2621
|
* ```
|
|
2622
2622
|
*
|
|
2623
|
-
* @
|
|
2623
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
2624
2624
|
*
|
|
2625
2625
|
* @param groupName The group whose transitive member states are wanted.
|
|
2626
2626
|
*
|
|
@@ -2668,7 +2668,7 @@ declare class Machine<mDT> {
|
|
|
2668
2668
|
* off(); // unsubscribe
|
|
2669
2669
|
* ```
|
|
2670
2670
|
*
|
|
2671
|
-
* @
|
|
2671
|
+
* @typeParam Ev The event name (drives the detail type).
|
|
2672
2672
|
* @param name The event name to subscribe to.
|
|
2673
2673
|
* @param filterOrFn Either a filter object or, when calling the no-filter
|
|
2674
2674
|
* form, the handler itself.
|
|
@@ -2689,7 +2689,7 @@ declare class Machine<mDT> {
|
|
|
2689
2689
|
* m.once('terminal', e => console.log(`done at ${e.state}`));
|
|
2690
2690
|
* ```
|
|
2691
2691
|
*
|
|
2692
|
-
* @
|
|
2692
|
+
* @typeParam Ev The event name.
|
|
2693
2693
|
* @param name The event name.
|
|
2694
2694
|
* @param filterOrFn A filter object or the handler (no-filter form).
|
|
2695
2695
|
* @param maybeFn The handler, when a filter was supplied.
|
|
@@ -3193,7 +3193,7 @@ declare class Machine<mDT> {
|
|
|
3193
3193
|
* - When multiple edges exist between two states with different `kind`
|
|
3194
3194
|
* values, only the first edge's kind is used to pick the edge-type hook.
|
|
3195
3195
|
*
|
|
3196
|
-
* @
|
|
3196
|
+
* @typeParam mDT The type of the machine data member; usually omitted.
|
|
3197
3197
|
*
|
|
3198
3198
|
* @param newStateOrAction The target state name (for a plain or forced
|
|
3199
3199
|
* transition) or the action name (when `wasAction` is true).
|
|
@@ -3245,7 +3245,7 @@ declare class Machine<mDT> {
|
|
|
3245
3245
|
*
|
|
3246
3246
|
* Notice that the machine's current state, `e`, is not in the returned list.
|
|
3247
3247
|
*
|
|
3248
|
-
* @
|
|
3248
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
3249
3249
|
*
|
|
3250
3250
|
*/
|
|
3251
3251
|
get history(): [string, mDT][];
|
|
@@ -3278,7 +3278,7 @@ declare class Machine<mDT> {
|
|
|
3278
3278
|
*
|
|
3279
3279
|
* Notice that the machine's current state, `e`, is in the returned list.
|
|
3280
3280
|
*
|
|
3281
|
-
* @
|
|
3281
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
3282
3282
|
*
|
|
3283
3283
|
*/
|
|
3284
3284
|
get history_inclusive(): [string, mDT][];
|
|
@@ -3297,7 +3297,7 @@ declare class Machine<mDT> {
|
|
|
3297
3297
|
* foo.history_length; // 5
|
|
3298
3298
|
* ```
|
|
3299
3299
|
*
|
|
3300
|
-
* @
|
|
3300
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
3301
3301
|
*
|
|
3302
3302
|
*/
|
|
3303
3303
|
get history_length(): number;
|
|
@@ -3314,7 +3314,7 @@ declare class Machine<mDT> {
|
|
|
3314
3314
|
* light.state(); // 'green'
|
|
3315
3315
|
* ```
|
|
3316
3316
|
*
|
|
3317
|
-
* @
|
|
3317
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
3318
3318
|
*
|
|
3319
3319
|
* @param actionName The action to engage
|
|
3320
3320
|
*
|
|
@@ -3341,7 +3341,7 @@ declare class Machine<mDT> {
|
|
|
3341
3341
|
* // { shape: 'circle' }
|
|
3342
3342
|
* ```
|
|
3343
3343
|
*
|
|
3344
|
-
* @
|
|
3344
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
3345
3345
|
*
|
|
3346
3346
|
* @returns The {@link JssmStateConfig} for standard states.
|
|
3347
3347
|
*
|
|
@@ -3367,7 +3367,7 @@ declare class Machine<mDT> {
|
|
|
3367
3367
|
* // { shape: 'circle' }
|
|
3368
3368
|
* ```
|
|
3369
3369
|
*
|
|
3370
|
-
* @
|
|
3370
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
3371
3371
|
*
|
|
3372
3372
|
* @returns The {@link JssmStateConfig} for hooked states.
|
|
3373
3373
|
*
|
|
@@ -3392,7 +3392,7 @@ declare class Machine<mDT> {
|
|
|
3392
3392
|
* // { shape: 'circle' }
|
|
3393
3393
|
* ```
|
|
3394
3394
|
*
|
|
3395
|
-
* @
|
|
3395
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
3396
3396
|
*
|
|
3397
3397
|
* @returns The {@link JssmStateConfig} for start states.
|
|
3398
3398
|
*
|
|
@@ -3422,7 +3422,7 @@ declare class Machine<mDT> {
|
|
|
3422
3422
|
* // { shape: 'circle' }
|
|
3423
3423
|
* ```
|
|
3424
3424
|
*
|
|
3425
|
-
* @
|
|
3425
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
3426
3426
|
*
|
|
3427
3427
|
* @returns The {@link JssmStateConfig} for end states.
|
|
3428
3428
|
*
|
|
@@ -3447,7 +3447,7 @@ declare class Machine<mDT> {
|
|
|
3447
3447
|
* // { shape: 'circle' }
|
|
3448
3448
|
* ```
|
|
3449
3449
|
*
|
|
3450
|
-
* @
|
|
3450
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
3451
3451
|
*
|
|
3452
3452
|
* @returns The {@link JssmStateConfig} for terminal states.
|
|
3453
3453
|
*
|
|
@@ -3469,7 +3469,7 @@ declare class Machine<mDT> {
|
|
|
3469
3469
|
* // { shape: 'circle' }
|
|
3470
3470
|
* ```
|
|
3471
3471
|
*
|
|
3472
|
-
* @
|
|
3472
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
3473
3473
|
*
|
|
3474
3474
|
* @returns The {@link JssmStateConfig} for the active state.
|
|
3475
3475
|
*
|
|
@@ -3741,7 +3741,7 @@ declare class Machine<mDT> {
|
|
|
3741
3741
|
* m.resolve_state_config('working').color; // '#ffa500ff' — from group &busy
|
|
3742
3742
|
* ```
|
|
3743
3743
|
*
|
|
3744
|
-
* @
|
|
3744
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
3745
3745
|
*
|
|
3746
3746
|
* @param state The state to compute the composite config for.
|
|
3747
3747
|
*
|
|
@@ -3764,7 +3764,7 @@ declare class Machine<mDT> {
|
|
|
3764
3764
|
* winning over outer), then the per-state config, and finally — for the
|
|
3765
3765
|
* current state only — the active overlay. Last wins at every tier.
|
|
3766
3766
|
*
|
|
3767
|
-
* @
|
|
3767
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
3768
3768
|
*
|
|
3769
3769
|
* @param state The state to compute the composite style for.
|
|
3770
3770
|
*
|
|
@@ -3798,7 +3798,7 @@ declare class Machine<mDT> {
|
|
|
3798
3798
|
* light.state(); // 'yellow'
|
|
3799
3799
|
* ```
|
|
3800
3800
|
*
|
|
3801
|
-
* @
|
|
3801
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
3802
3802
|
*
|
|
3803
3803
|
* @param actionName The action to engage
|
|
3804
3804
|
*
|
|
@@ -3831,7 +3831,7 @@ declare class Machine<mDT> {
|
|
|
3831
3831
|
* light.state(); // 'green'
|
|
3832
3832
|
* ```
|
|
3833
3833
|
*
|
|
3834
|
-
* @
|
|
3834
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
3835
3835
|
*
|
|
3836
3836
|
* @param newState The state to switch to
|
|
3837
3837
|
*
|
|
@@ -3853,7 +3853,7 @@ declare class Machine<mDT> {
|
|
|
3853
3853
|
* light.state(); // 'green'
|
|
3854
3854
|
* ```
|
|
3855
3855
|
*
|
|
3856
|
-
* @
|
|
3856
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
3857
3857
|
*
|
|
3858
3858
|
* @param newState The state to switch to
|
|
3859
3859
|
*
|
|
@@ -3878,7 +3878,7 @@ declare class Machine<mDT> {
|
|
|
3878
3878
|
* light.state(); // 'off'
|
|
3879
3879
|
* ```
|
|
3880
3880
|
*
|
|
3881
|
-
* @
|
|
3881
|
+
* @typeParam mDT The type of the machine data member; usually omitted
|
|
3882
3882
|
*
|
|
3883
3883
|
* @param newState The state to switch to
|
|
3884
3884
|
*
|