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.
- package/README.md +7 -7
- 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 +7 -7
- package/dist/deno/fsl_markdown_fence.d.ts +56 -0
- package/dist/deno/jssm.d.ts +2 -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 +59 -1
- package/jssm.es6.d.ts +59 -1
- package/package.json +1 -1
package/jssm.es5.d.cts
CHANGED
|
@@ -1936,6 +1936,63 @@ declare const version: string;
|
|
|
1936
1936
|
*/
|
|
1937
1937
|
declare const build_time: number;
|
|
1938
1938
|
|
|
1939
|
+
/**
|
|
1940
|
+
* The FSL Markdown fence convention parser — pure, host-agnostic logic that
|
|
1941
|
+
* turns a fenced-code-block info string into a {@link FenceDescriptor}. Hosts
|
|
1942
|
+
* (a VS Code preview plugin, a static-site generator, …) each interpret the
|
|
1943
|
+
* descriptor according to their capabilities.
|
|
1944
|
+
*
|
|
1945
|
+
* @see notes/superpowers/specs/2026-06-23-fsl-markdown-fence-convention-design.md
|
|
1946
|
+
*/
|
|
1947
|
+
/** A single renderable part of a fence block (stacks in listed order, first on top). */
|
|
1948
|
+
declare type FencePart = 'image' | 'code' | 'dot' | 'editor' | 'actions' | 'info-panel' | 'toolbar' | 'title' | 'footer';
|
|
1949
|
+
/** An image output format for the `image` part. */
|
|
1950
|
+
declare type FenceImageFormat = 'svg' | 'png' | 'jpeg' | 'gif';
|
|
1951
|
+
/** The unit of a {@link FenceDimension} (`%` is represented as `'percent'`). */
|
|
1952
|
+
declare type FenceDimensionUnit = 'px' | 'percent';
|
|
1953
|
+
/** A parsed `width=`/`height=` value with its unit. */
|
|
1954
|
+
interface FenceDimension {
|
|
1955
|
+
value: number;
|
|
1956
|
+
unit: FenceDimensionUnit;
|
|
1957
|
+
}
|
|
1958
|
+
/** The fully-parsed, validated description of one FSL Markdown fence block. */
|
|
1959
|
+
interface FenceDescriptor {
|
|
1960
|
+
parts: FencePart[];
|
|
1961
|
+
ide: boolean;
|
|
1962
|
+
format: FenceImageFormat;
|
|
1963
|
+
width: FenceDimension | null;
|
|
1964
|
+
height: FenceDimension | null;
|
|
1965
|
+
interactive: boolean;
|
|
1966
|
+
notes: string[];
|
|
1967
|
+
}
|
|
1968
|
+
/**
|
|
1969
|
+
* Canonical fence language for an info string, or `null` if the block is not
|
|
1970
|
+
* an FSL fence. Reads only the first whitespace-delimited token,
|
|
1971
|
+
* case-insensitively.
|
|
1972
|
+
*
|
|
1973
|
+
* @param info The full fence info string (everything after the opening fence).
|
|
1974
|
+
* @returns `'fsl'` or `'jssm'` for our fences; `null` otherwise.
|
|
1975
|
+
*
|
|
1976
|
+
* @example fsl_fence_lang('fsl image code') // => 'fsl'
|
|
1977
|
+
* @example fsl_fence_lang('JSSM') // => 'jssm'
|
|
1978
|
+
* @example fsl_fence_lang('mermaid') // => null
|
|
1979
|
+
*/
|
|
1980
|
+
declare function fsl_fence_lang(info: string): 'fsl' | 'jssm' | null;
|
|
1981
|
+
/**
|
|
1982
|
+
* Parse a fence info string into a {@link FenceDescriptor}. The first token is
|
|
1983
|
+
* the (already-validated) language and is ignored; remaining tokens are
|
|
1984
|
+
* classified as parts, image formats, the `ide` macro, or `width`/`height`
|
|
1985
|
+
* options. Unrecognized or conflicting tokens are dropped and recorded in
|
|
1986
|
+
* `notes` rather than throwing, so a host can render forward-compatibly.
|
|
1987
|
+
*
|
|
1988
|
+
* @param info The full fence info string, e.g. `'fsl image code width=300'`.
|
|
1989
|
+
* @returns The validated descriptor; `notes` lists anything ignored or overridden.
|
|
1990
|
+
*
|
|
1991
|
+
* @example parse_fence_info('fsl').parts // => ['image', 'code']
|
|
1992
|
+
* @example parse_fence_info('fsl code image').parts // => ['code', 'image']
|
|
1993
|
+
*/
|
|
1994
|
+
declare function parse_fence_info(info: string): FenceDescriptor;
|
|
1995
|
+
|
|
1939
1996
|
declare type StateType = string;
|
|
1940
1997
|
|
|
1941
1998
|
declare const shapes: string[];
|
|
@@ -4782,4 +4839,5 @@ declare function compareVersions(v1: string, v2: string): number;
|
|
|
4782
4839
|
*/
|
|
4783
4840
|
declare function deserialize<mDT>(machine_string: string, ser: JssmSerialization<mDT>): Machine<mDT>;
|
|
4784
4841
|
|
|
4785
|
-
export { FslDirections, Machine, STOCHASTIC_DEFAULT_MAX_STEPS, STOCHASTIC_DEFAULT_RUNS, abstract_everything_hook_step, abstract_hook_step, action_label_chars, arrow_direction, arrow_left_kind, arrow_right_kind, build_time, compareVersions, compile, jssm_constants_d as constants, deserialize, find_repeated, from, fslCompletions, fslDiagnostics, fslSemanticSpans, gen_splitmix32, gviz_shapes, histograph, is_hook_complex_result, is_hook_rejection, make, named_colors, wrap_parse as parse, seq, shapes, sleep, sm, state_name_chars, state_name_first_chars, state_style_condense, transfer_state_properties, unique, version, weighted_histo_key, weighted_rand_select, weighted_sample_select };
|
|
4842
|
+
export { FslDirections, Machine, STOCHASTIC_DEFAULT_MAX_STEPS, STOCHASTIC_DEFAULT_RUNS, abstract_everything_hook_step, abstract_hook_step, action_label_chars, arrow_direction, arrow_left_kind, arrow_right_kind, build_time, compareVersions, compile, jssm_constants_d as constants, deserialize, find_repeated, from, fslCompletions, fslDiagnostics, fslSemanticSpans, fsl_fence_lang, gen_splitmix32, gviz_shapes, histograph, is_hook_complex_result, is_hook_rejection, make, named_colors, wrap_parse as parse, parse_fence_info, seq, shapes, sleep, sm, state_name_chars, state_name_first_chars, state_style_condense, transfer_state_properties, unique, version, weighted_histo_key, weighted_rand_select, weighted_sample_select };
|
|
4843
|
+
export type { FenceDescriptor, FenceDimension, FenceDimensionUnit, FenceImageFormat, FencePart };
|
package/jssm.es6.d.ts
CHANGED
|
@@ -1936,6 +1936,63 @@ declare const version: string;
|
|
|
1936
1936
|
*/
|
|
1937
1937
|
declare const build_time: number;
|
|
1938
1938
|
|
|
1939
|
+
/**
|
|
1940
|
+
* The FSL Markdown fence convention parser — pure, host-agnostic logic that
|
|
1941
|
+
* turns a fenced-code-block info string into a {@link FenceDescriptor}. Hosts
|
|
1942
|
+
* (a VS Code preview plugin, a static-site generator, …) each interpret the
|
|
1943
|
+
* descriptor according to their capabilities.
|
|
1944
|
+
*
|
|
1945
|
+
* @see notes/superpowers/specs/2026-06-23-fsl-markdown-fence-convention-design.md
|
|
1946
|
+
*/
|
|
1947
|
+
/** A single renderable part of a fence block (stacks in listed order, first on top). */
|
|
1948
|
+
declare type FencePart = 'image' | 'code' | 'dot' | 'editor' | 'actions' | 'info-panel' | 'toolbar' | 'title' | 'footer';
|
|
1949
|
+
/** An image output format for the `image` part. */
|
|
1950
|
+
declare type FenceImageFormat = 'svg' | 'png' | 'jpeg' | 'gif';
|
|
1951
|
+
/** The unit of a {@link FenceDimension} (`%` is represented as `'percent'`). */
|
|
1952
|
+
declare type FenceDimensionUnit = 'px' | 'percent';
|
|
1953
|
+
/** A parsed `width=`/`height=` value with its unit. */
|
|
1954
|
+
interface FenceDimension {
|
|
1955
|
+
value: number;
|
|
1956
|
+
unit: FenceDimensionUnit;
|
|
1957
|
+
}
|
|
1958
|
+
/** The fully-parsed, validated description of one FSL Markdown fence block. */
|
|
1959
|
+
interface FenceDescriptor {
|
|
1960
|
+
parts: FencePart[];
|
|
1961
|
+
ide: boolean;
|
|
1962
|
+
format: FenceImageFormat;
|
|
1963
|
+
width: FenceDimension | null;
|
|
1964
|
+
height: FenceDimension | null;
|
|
1965
|
+
interactive: boolean;
|
|
1966
|
+
notes: string[];
|
|
1967
|
+
}
|
|
1968
|
+
/**
|
|
1969
|
+
* Canonical fence language for an info string, or `null` if the block is not
|
|
1970
|
+
* an FSL fence. Reads only the first whitespace-delimited token,
|
|
1971
|
+
* case-insensitively.
|
|
1972
|
+
*
|
|
1973
|
+
* @param info The full fence info string (everything after the opening fence).
|
|
1974
|
+
* @returns `'fsl'` or `'jssm'` for our fences; `null` otherwise.
|
|
1975
|
+
*
|
|
1976
|
+
* @example fsl_fence_lang('fsl image code') // => 'fsl'
|
|
1977
|
+
* @example fsl_fence_lang('JSSM') // => 'jssm'
|
|
1978
|
+
* @example fsl_fence_lang('mermaid') // => null
|
|
1979
|
+
*/
|
|
1980
|
+
declare function fsl_fence_lang(info: string): 'fsl' | 'jssm' | null;
|
|
1981
|
+
/**
|
|
1982
|
+
* Parse a fence info string into a {@link FenceDescriptor}. The first token is
|
|
1983
|
+
* the (already-validated) language and is ignored; remaining tokens are
|
|
1984
|
+
* classified as parts, image formats, the `ide` macro, or `width`/`height`
|
|
1985
|
+
* options. Unrecognized or conflicting tokens are dropped and recorded in
|
|
1986
|
+
* `notes` rather than throwing, so a host can render forward-compatibly.
|
|
1987
|
+
*
|
|
1988
|
+
* @param info The full fence info string, e.g. `'fsl image code width=300'`.
|
|
1989
|
+
* @returns The validated descriptor; `notes` lists anything ignored or overridden.
|
|
1990
|
+
*
|
|
1991
|
+
* @example parse_fence_info('fsl').parts // => ['image', 'code']
|
|
1992
|
+
* @example parse_fence_info('fsl code image').parts // => ['code', 'image']
|
|
1993
|
+
*/
|
|
1994
|
+
declare function parse_fence_info(info: string): FenceDescriptor;
|
|
1995
|
+
|
|
1939
1996
|
declare type StateType = string;
|
|
1940
1997
|
|
|
1941
1998
|
declare const shapes: string[];
|
|
@@ -4782,4 +4839,5 @@ declare function compareVersions(v1: string, v2: string): number;
|
|
|
4782
4839
|
*/
|
|
4783
4840
|
declare function deserialize<mDT>(machine_string: string, ser: JssmSerialization<mDT>): Machine<mDT>;
|
|
4784
4841
|
|
|
4785
|
-
export { FslDirections, Machine, STOCHASTIC_DEFAULT_MAX_STEPS, STOCHASTIC_DEFAULT_RUNS, abstract_everything_hook_step, abstract_hook_step, action_label_chars, arrow_direction, arrow_left_kind, arrow_right_kind, build_time, compareVersions, compile, jssm_constants_d as constants, deserialize, find_repeated, from, fslCompletions, fslDiagnostics, fslSemanticSpans, gen_splitmix32, gviz_shapes, histograph, is_hook_complex_result, is_hook_rejection, make, named_colors, wrap_parse as parse, seq, shapes, sleep, sm, state_name_chars, state_name_first_chars, state_style_condense, transfer_state_properties, unique, version, weighted_histo_key, weighted_rand_select, weighted_sample_select };
|
|
4842
|
+
export { FslDirections, Machine, STOCHASTIC_DEFAULT_MAX_STEPS, STOCHASTIC_DEFAULT_RUNS, abstract_everything_hook_step, abstract_hook_step, action_label_chars, arrow_direction, arrow_left_kind, arrow_right_kind, build_time, compareVersions, compile, jssm_constants_d as constants, deserialize, find_repeated, from, fslCompletions, fslDiagnostics, fslSemanticSpans, fsl_fence_lang, gen_splitmix32, gviz_shapes, histograph, is_hook_complex_result, is_hook_rejection, make, named_colors, wrap_parse as parse, parse_fence_info, seq, shapes, sleep, sm, state_name_chars, state_name_first_chars, state_style_condense, transfer_state_properties, unique, version, weighted_histo_key, weighted_rand_select, weighted_sample_select };
|
|
4843
|
+
export type { FenceDescriptor, FenceDimension, FenceDimensionUnit, FenceImageFormat, FencePart };
|