jssm 5.144.7 → 5.145.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 +7 -7
- package/dist/cdn/instance.js +125 -24
- package/dist/cdn/viz.js +166 -47
- package/dist/cli/fsl-export-system-prompt.cjs +2 -2
- 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/jssm.d.ts +18 -0
- package/dist/deno/jssm.js +1 -1
- 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 +18 -0
- package/jssm.es6.d.ts +18 -0
- package/jssm_viz.es5.d.cts +18 -0
- package/jssm_viz.es6.d.ts +18 -0
- package/package.json +1 -1
package/dist/deno/jssm.d.ts
CHANGED
|
@@ -1355,6 +1355,24 @@ declare class Machine<mDT> {
|
|
|
1355
1355
|
* calling this directly.
|
|
1356
1356
|
* @param HookDesc - A hook descriptor specifying kind, states, and handler.
|
|
1357
1357
|
*/
|
|
1358
|
+
/**
|
|
1359
|
+
* Validate a {@link HookDescription} before registration. Every hook needs
|
|
1360
|
+
* a `handler` function, and each kind's identifying spatial fields
|
|
1361
|
+
* (`from`/`to`/`action`) must be exactly those `set_hook` reads for that
|
|
1362
|
+
* kind — present when required, absent otherwise. This turns a mis-shaped
|
|
1363
|
+
* descriptor into a thrown error instead of a silently dead hook keyed on
|
|
1364
|
+
* `undefined` (e.g. an `exit` hook handed `to` instead of `from`, #734).
|
|
1365
|
+
*
|
|
1366
|
+
* @param HookDesc - The descriptor about to be registered.
|
|
1367
|
+
* @throws JssmError if the kind is unknown, the handler is not a function, a
|
|
1368
|
+
* required field is missing, or an inapplicable field is present.
|
|
1369
|
+
*
|
|
1370
|
+
* @example
|
|
1371
|
+
* const m = sm`a -> b;`;
|
|
1372
|
+
* // an exit hook is keyed by `from`, so supplying `to` is rejected:
|
|
1373
|
+
* expect(() => m.set_hook({ kind: 'exit', to: 'a', handler: () => true })).toThrow();
|
|
1374
|
+
*/
|
|
1375
|
+
_validate_hook_description(HookDesc: HookDescription<mDT>): void;
|
|
1358
1376
|
set_hook(HookDesc: HookDescription<mDT>): void;
|
|
1359
1377
|
/**
|
|
1360
1378
|
* Remove a previously-registered hook described by a
|