jssm 5.156.0 → 5.157.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.
@@ -18,10 +18,10 @@ Please edit the file it's derived from, instead: `./src/md/readme_base.md`
18
18
 
19
19
 
20
20
 
21
- * Generated for version 5.156.0 at 6/28/2026, 9:25:43 PM
21
+ * Generated for version 5.157.0 at 7/2/2026, 1:06:52 AM
22
22
 
23
23
  -->
24
- # jssm 5.156.0
24
+ # jssm 5.157.0
25
25
 
26
26
  [**Try the live editor**](https://stonecypher.github.io/jssm-viz-demo/graph_explorer.html) ·
27
27
  [Documentation](https://stonecypher.github.io/jssm/docs/) ·
@@ -312,7 +312,7 @@ That decision shows up everywhere downstream:
312
312
  or run `npm run benny` against your own machine.
313
313
 
314
314
  - **More thoroughly tested than any other JavaScript state-machine
315
- library.** 7,822 tests at 100.0% line coverage
315
+ library.** 7,862 tests at 100.0% line coverage
316
316
  ([report](https://coveralls.io/github/StoneCypher/jssm)), plus
317
317
  fuzz testing via `fast-check`, with parser test data across ten natural
318
318
  languages and Emoji.
@@ -445,11 +445,11 @@ If your contribution is missing here, please open an issue.
445
445
 
446
446
  <br/>
447
447
 
448
- ***7,822 tests***, run 82,864 times.
448
+ ***7,862 tests***, run 82,904 times.
449
449
 
450
- - 7,064 specs with 100.0% coverage
451
- - 758 fuzz tests with 54.1% coverage
452
- - 9,761 TypeScript lines - 0.8 tests per line, 8.5 generated tests per line
450
+ - 7,104 specs with 100.0% coverage
451
+ - 758 fuzz tests with 53.4% coverage
452
+ - 9,871 TypeScript lines - 0.8 tests per line, 8.4 generated tests per line
453
453
 
454
454
  [![Actions Status](https://github.com/StoneCypher/jssm/workflows/Node%20CI/badge.svg)](https://github.com/StoneCypher/jssm/actions)
455
455
  [![NPM version](https://img.shields.io/npm/v/jssm.svg)](https://www.npmjs.com/package/jssm)
@@ -0,0 +1,56 @@
1
+ /**
2
+ * The FSL Markdown fence convention parser — pure, host-agnostic logic that
3
+ * turns a fenced-code-block info string into a {@link FenceDescriptor}. Hosts
4
+ * (a VS Code preview plugin, a static-site generator, …) each interpret the
5
+ * descriptor according to their capabilities.
6
+ *
7
+ * @see notes/superpowers/specs/2026-06-23-fsl-markdown-fence-convention-design.md
8
+ */
9
+ /** A single renderable part of a fence block (stacks in listed order, first on top). */
10
+ export declare type FencePart = 'image' | 'code' | 'dot' | 'editor' | 'actions' | 'info-panel' | 'toolbar' | 'title' | 'footer';
11
+ /** An image output format for the `image` part. */
12
+ export declare type FenceImageFormat = 'svg' | 'png' | 'jpeg' | 'gif';
13
+ /** The unit of a {@link FenceDimension} (`%` is represented as `'percent'`). */
14
+ export declare type FenceDimensionUnit = 'px' | 'percent';
15
+ /** A parsed `width=`/`height=` value with its unit. */
16
+ export interface FenceDimension {
17
+ value: number;
18
+ unit: FenceDimensionUnit;
19
+ }
20
+ /** The fully-parsed, validated description of one FSL Markdown fence block. */
21
+ export interface FenceDescriptor {
22
+ parts: FencePart[];
23
+ ide: boolean;
24
+ format: FenceImageFormat;
25
+ width: FenceDimension | null;
26
+ height: FenceDimension | null;
27
+ interactive: boolean;
28
+ notes: string[];
29
+ }
30
+ /**
31
+ * Canonical fence language for an info string, or `null` if the block is not
32
+ * an FSL fence. Reads only the first whitespace-delimited token,
33
+ * case-insensitively.
34
+ *
35
+ * @param info The full fence info string (everything after the opening fence).
36
+ * @returns `'fsl'` or `'jssm'` for our fences; `null` otherwise.
37
+ *
38
+ * @example fsl_fence_lang('fsl image code') // => 'fsl'
39
+ * @example fsl_fence_lang('JSSM') // => 'jssm'
40
+ * @example fsl_fence_lang('mermaid') // => null
41
+ */
42
+ export declare function fsl_fence_lang(info: string): 'fsl' | 'jssm' | null;
43
+ /**
44
+ * Parse a fence info string into a {@link FenceDescriptor}. The first token is
45
+ * the (already-validated) language and is ignored; remaining tokens are
46
+ * classified as parts, image formats, the `ide` macro, or `width`/`height`
47
+ * options. Unrecognized or conflicting tokens are dropped and recorded in
48
+ * `notes` rather than throwing, so a host can render forward-compatibly.
49
+ *
50
+ * @param info The full fence info string, e.g. `'fsl image code width=300'`.
51
+ * @returns The validated descriptor; `notes` lists anything ignored or overridden.
52
+ *
53
+ * @example parse_fence_info('fsl').parts // => ['image', 'code']
54
+ * @example parse_fence_info('fsl code image').parts // => ['code', 'image']
55
+ */
56
+ export declare function parse_fence_info(info: string): FenceDescriptor;
@@ -2846,3 +2846,5 @@ declare function compareVersions(v1: string, v2: string): number;
2846
2846
  */
2847
2847
  declare function deserialize<mDT>(machine_string: string, ser: JssmSerialization<mDT>): Machine<mDT>;
2848
2848
  export { version, build_time, transfer_state_properties, Machine, deserialize, compareVersions, make, wrap_parse as parse, compile, sm, from, arrow_direction, arrow_left_kind, arrow_right_kind, seq, unique, find_repeated, weighted_rand_select, histograph, weighted_sample_select, weighted_histo_key, gen_splitmix32, sleep, constants, shapes, gviz_shapes, named_colors, state_name_chars, state_name_first_chars, action_label_chars, is_hook_rejection, is_hook_complex_result, abstract_hook_step, abstract_everything_hook_step, state_style_condense, FslDirections };
2849
+ export { fsl_fence_lang, parse_fence_info } from './fsl_markdown_fence';
2850
+ export type { FencePart, FenceImageFormat, FenceDimensionUnit, FenceDimension, FenceDescriptor } from './fsl_markdown_fence';