@takazudo/zfb-md-wasm 5.2.2 → 6.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 CHANGED
@@ -31,12 +31,12 @@ migration. `./highlight` is also backward-compatible. New `./render` and
31
31
  `zfb-render` but intentionally retain `zfb-content` and `syntect-fancy`.
32
32
  `./parse` is not syntect-free.
33
33
 
34
- | Entry | gzip-9 wasm (5.2.2) | Exact runtime values | Exact exported types |
34
+ | Entry | gzip-9 wasm (6.0.0) | Exact runtime values | Exact exported types |
35
35
  | ------------- | -------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
36
- | `.` | 1,536,139 B | `init`, `compile`, `renderHtml`, `parseToAst`, `highlightCode`, `version`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests`, `toMdastRoot`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError`, `MdastAdapterError` | Full current compile/render/parse/raw-mdast/highlight surface |
36
+ | `.` | 1,536,134 B | `init`, `compile`, `renderHtml`, `parseToAst`, `highlightCode`, `version`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests`, `toMdastRoot`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError`, `MdastAdapterError` | Full current compile/render/parse/raw-mdast/highlight surface |
37
37
  | `./highlight` | 821,783 B | `init`, `highlightCode`, `version`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError` | `HighlightRole`, `HighlightCodeOptions`, `HighlightCodeResult`, `HighlightDiagnostic`, `HighlightDiagnosticSource` |
38
- | `./render` | 1,114,879 B | `init`, `renderHtml`, `version`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests` | `RenderHtmlResult`, `Diagnostic`, `DiagnosticSource`, `ZfbMdWasmOptions`, `ParseDialect`, `PipelineOptions`, `GfmOptions`, `CodeHighlightMode`, `CodeHighlightOptions`, `MarkdownFeaturesConfig`, `HighlightRole` |
39
- | `./parse` | 300,525 B | `init`, `parseToAst`, `toMdastRoot`, `MdastAdapterError`, `version`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests` | `ParseToAstResult`, `ParseToAstOptions`, `ParseDialect`, `FrontmatterPolicy`, `ParsePipelineOptions`, `Diagnostic`, `DiagnosticSource`, `AstPoint`, `AstPosition`, `RawMdastData`, `MarkdownRsStop`, `MdastNode`, `MdastRoot`, `UnknownMdastNode`, `Root`, `Paragraph`, `Heading`, `ThematicBreak`, `Blockquote`, `List`, `ListItem`, `Html`, `Code`, `Definition`, `Text`, `DirectiveNodeBase`, `ContainerDirective`, `LeafDirective`, `TextDirective`, `Emphasis`, `Strong`, `InlineCode`, `Break`, `Link`, `Image`, `ReferenceKind`, `LinkReference`, `ImageReference`, `FootnoteDefinition`, `FootnoteReference`, `TableAlign`, `Table`, `TableRow`, `TableCell`, `Delete`, `Yaml`, `MdxFlowExpression`, `MdxTextExpression`, `MdxJsxFlowElement`, `MdxJsxTextElement`, `MdxJsxAttributeContent`, `MdxJsxAttribute`, `MdxJsxAttributeValueExpression`, `MdxJsxExpressionAttribute` |
38
+ | `./render` | 1,114,882 B | `init`, `renderHtml`, `version`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests` | `RenderHtmlResult`, `Diagnostic`, `DiagnosticSource`, `ZfbMdWasmOptions`, `ParseDialect`, `PipelineOptions`, `GfmOptions`, `CodeHighlightMode`, `CodeHighlightOptions`, `MarkdownFeaturesConfig`, `HighlightRole` |
39
+ | `./parse` | 300,524 B | `init`, `parseToAst`, `toMdastRoot`, `MdastAdapterError`, `version`, `ZfbMdWasmTrapError`, `ZfbMdWasmTrapRecoveryLimitError`, `__forceTrapForTests`, `__getTrapRecoveryStateForTests` | `ParseToAstResult`, `ParseToAstOptions`, `ParseDialect`, `FrontmatterPolicy`, `ParsePipelineOptions`, `Diagnostic`, `DiagnosticSource`, `AstPoint`, `AstPosition`, `RawMdastData`, `MarkdownRsStop`, `MdastNode`, `MdastRoot`, `UnknownMdastNode`, `Root`, `Paragraph`, `Heading`, `ThematicBreak`, `Blockquote`, `List`, `ListItem`, `Html`, `Code`, `Definition`, `Text`, `DirectiveNodeBase`, `ContainerDirective`, `LeafDirective`, `TextDirective`, `Emphasis`, `Strong`, `InlineCode`, `Break`, `Link`, `Image`, `ReferenceKind`, `LinkReference`, `ImageReference`, `FootnoteDefinition`, `FootnoteReference`, `TableAlign`, `Table`, `TableRow`, `TableCell`, `Delete`, `Yaml`, `MdxFlowExpression`, `MdxTextExpression`, `MdxJsxFlowElement`, `MdxJsxTextElement`, `MdxJsxAttributeContent`, `MdxJsxAttribute`, `MdxJsxAttributeValueExpression`, `MdxJsxExpressionAttribute` |
40
40
 
41
41
  The focused entries own private resource pairs:
42
42
 
@@ -471,7 +471,7 @@ for your own environment.
471
471
 
472
472
  Every entry has a `browser` export condition. Its browser entry imports the
473
473
  generated glue and Wasm binary through an explicit bundler `?url` asset
474
- contract. Vite and zfb's pinned esbuild setup therefore keep separate resource
474
+ contract. Vite and zfb's bundler therefore keep separate resource
475
475
  edges for exactly its own pair. The focused pairs are:
476
476
 
477
477
  ```text
@@ -706,7 +706,7 @@ suite gates exact-match). Deliberate limitations of the browser build:
706
706
  compatibility entry and carries the complete compiler graph. `./highlight`
707
707
  keeps its public API and resources while the post-#2449/#2450 graph is
708
708
  proven SWC-free — and its payload shows it: 821,783 B gzip-9 versus
709
- 1,536,139 B for root. `./render` and `./parse` are also SWC-free and omit
709
+ 1,536,134 B for root. `./render` and `./parse` are also SWC-free and omit
710
710
  `zfb-render`; parse intentionally retains `zfb-content`/`syntect-fancy`, so
711
711
  it is not syntect-free. Use `./render` or `./parse` when a consumer does
712
712
  not need `compile`; root and highlight callers otherwise require no
@@ -743,23 +743,23 @@ three-step repair sequence:
743
743
  they are compressor output (CI prints a warning inside the band), while
744
744
  final wasm and glue remain byte-exact.
745
745
 
746
- These are the shipped **5.2.2** artifact rows — optimized final wasm after
746
+ These are the shipped **6.0.0** artifact rows — optimized final wasm after
747
747
  wasm-bindgen and wasm-opt, Node `gzipSync(..., { level: 9 })`, and glue
748
748
  bytes/gzip:
749
749
 
750
750
  | Entry/graph | final wasm | gzip-9 | glue | glue gzip-9 |
751
751
  | ----------- | ----------: | ----------: | -------: | ----------: |
752
- | root (full) | 3,423,580 B | 1,536,139 B | 14,998 B | 4,199 B |
752
+ | root (full) | 3,423,580 B | 1,536,134 B | 14,998 B | 4,199 B |
753
753
  | highlight | 1,544,127 B | 821,783 B | 8,758 B | 2,637 B |
754
- | render | 2,241,653 B | 1,114,879 B | 8,772 B | 2,661 B |
755
- | parse | 735,259 B | 300,525 B | 11,159 B | 3,797 B |
754
+ | render | 2,241,653 B | 1,114,882 B | 8,772 B | 2,661 B |
755
+ | parse | 735,259 B | 300,524 B | 11,159 B | 3,797 B |
756
756
 
757
757
  The #2447 decision snapshot measured the split package at 3,638,607 B versus
758
758
  2,314,818 B for the root-plus-highlight package. Locked gzip-9 ceilings are
759
759
  root 1,600,000 B, highlight 880,000 B, render 1,125,000 B, and parse
760
760
  325,000 B; the complete packed tarball ceiling is 3,900,000 B. All four ship
761
- inside their ceilings, with 63,861 B (root), 58,217 B (highlight), 10,121 B
762
- (render), and 24,475 B (parse) of headroom. These are 5.2.2 measurements, not
761
+ inside their ceilings, with 63,866 B (root), 58,217 B (highlight), 10,118 B
762
+ (render), and 24,476 B (parse) of headroom. These are 6.0.0 measurements, not
763
763
  permanent promises — re-measure against the version you actually install.
764
764
  The clean four-step production ceiling is 210 seconds; the selected #2447
765
765
  median was 155.015 s [153.496, 165.977].
@@ -787,7 +787,7 @@ raw and 8,765 B smaller gzip-9 (758,244 B) — wasm-opt was already
787
787
  dead-stripping the unreachable `swc_core`, and #2450's exact-parity and
788
788
  no-`swc_core` assertions turned that emergent property into a guaranteed one.
789
789
  The delta that matters to a highlight-only consumer is root versus
790
- highlight: the highlight artifact is 1,879,453 B smaller raw and 714,356 B
790
+ highlight: the highlight artifact is 1,879,453 B smaller raw and 714,351 B
791
791
  smaller gzip-9, landing at about 45% of root's raw bytes and 53% of its
792
792
  gzipped bytes.
793
793
 
package/dist/browser.js CHANGED
@@ -2,8 +2,8 @@ import glueHref from "./wasm/zfb_md_wasm_glue.zfb-resource.mjs?url";
2
2
  import wasmHref from "./wasm/zfb_md_wasm_bg.wasm?url";
3
3
  import { createWasmApi } from "./runtime.js";
4
4
  // `?url` is the explicit cross-bundler asset contract: both Vite and zfb's
5
- // pinned esbuild file loaders replace these imports with URL strings. Resolving
6
- // them from the final entry keeps relative esbuild output correct while also
5
+ // bundler file loaders replace these imports with URL strings. Resolving
6
+ // them from the final entry keeps relative bundler output correct while also
7
7
  // accepting Vite's base-prefixed URLs.
8
8
  const GLUE_URL = new URL(glueHref, import.meta.url);
9
9
  const WASM_URL = new URL(wasmHref, import.meta.url);
@@ -1 +1 @@
1
- {"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,8CAA8C,CAAC;AACpE,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,2EAA2E;AAC3E,gFAAgF;AAChF,6EAA6E;AAC7E,uCAAuC;AACvC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,QAAQ,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AACpD,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,QAAQ,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AAEpD,KAAK,UAAU,oBAAoB;IACjC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,CAAC;IACvC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CACb,6CAA6C,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,EAAE,CACtF,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;AAChC,CAAC;AAED,MAAM,GAAG,GAAG,aAAa,CAAC;IACxB,OAAO,EAAE,QAAQ;IACjB,aAAa,EAAE,oBAAoB;CACpC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,EACX,IAAI,EACJ,OAAO,EACP,UAAU;AACV,+DAA+D;AAC/D,qEAAqE;AACrE,UAAU,EACV,aAAa,EACb,OAAO,EACP,mBAAmB,EACnB,8BAA8B,GAC/B,GAAG,GAAG,CAAC;AAER,OAAO,EAAE,kBAAkB,EAAE,+BAA+B,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC","sourcesContent":["import glueHref from \"./wasm/zfb_md_wasm_glue.zfb-resource.mjs?url\";\nimport wasmHref from \"./wasm/zfb_md_wasm_bg.wasm?url\";\nimport { createWasmApi } from \"./runtime.js\";\n\n// `?url` is the explicit cross-bundler asset contract: both Vite and zfb's\n// pinned esbuild file loaders replace these imports with URL strings. Resolving\n// them from the final entry keeps relative esbuild output correct while also\n// accepting Vite's base-prefixed URLs.\nconst GLUE_URL = new URL(glueHref, import.meta.url);\nconst WASM_URL = new URL(wasmHref, import.meta.url);\n\nasync function loadBrowserWasmBytes(): Promise<ArrayBuffer> {\n const response = await fetch(WASM_URL);\n if (!response.ok) {\n throw new Error(\n `zfb-md-wasm: failed to fetch wasm binary: ${response.status} ${response.statusText}`,\n );\n }\n return response.arrayBuffer();\n}\n\nconst api = createWasmApi({\n glueUrl: GLUE_URL,\n loadWasmBytes: loadBrowserWasmBytes,\n});\n\nexport const {\n init,\n compile,\n renderHtml,\n // Raw-mdast export (zfb#1857, epic zfb#1854) -- see types.ts's\n // ParseToAstResult/MdastNode docs for the result shape and contract.\n parseToAst,\n highlightCode,\n version,\n __forceTrapForTests,\n __getTrapRecoveryStateForTests,\n} = api;\n\nexport { ZfbMdWasmTrapError, ZfbMdWasmTrapRecoveryLimitError } from \"./runtime.js\";\nexport { MdastAdapterError, toMdastRoot } from \"./mdast.js\";\n\nexport type {\n CompileResult,\n RenderHtmlResult,\n ParseToAstResult,\n ParseToAstOptions,\n ParseDialect,\n FrontmatterPolicy,\n ParsePipelineOptions,\n Diagnostic,\n DiagnosticSource,\n ZfbMdWasmOptions,\n PipelineOptions,\n GfmOptions,\n CodeHighlightMode,\n CodeHighlightOptions,\n MarkdownFeaturesConfig,\n HighlightRole,\n HighlightCodeOptions,\n HighlightCodeResult,\n HighlightDiagnostic,\n HighlightDiagnosticSource,\n AstPoint,\n AstPosition,\n RawMdastData,\n MarkdownRsStop,\n MdastNode,\n MdastRoot,\n UnknownMdastNode,\n Root,\n Paragraph,\n Heading,\n ThematicBreak,\n Blockquote,\n List,\n ListItem,\n Html,\n Code,\n Definition,\n Text,\n DirectiveNodeBase,\n ContainerDirective,\n LeafDirective,\n TextDirective,\n Emphasis,\n Strong,\n InlineCode,\n Break,\n Link,\n Image,\n ReferenceKind,\n LinkReference,\n ImageReference,\n FootnoteDefinition,\n FootnoteReference,\n TableAlign,\n Table,\n TableRow,\n TableCell,\n Delete,\n Yaml,\n MdxFlowExpression,\n MdxTextExpression,\n MdxJsxFlowElement,\n MdxJsxTextElement,\n MdxJsxAttributeContent,\n MdxJsxAttribute,\n MdxJsxAttributeValueExpression,\n MdxJsxExpressionAttribute,\n} from \"./types.js\";\n"]}
1
+ {"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,8CAA8C,CAAC;AACpE,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,2EAA2E;AAC3E,yEAAyE;AACzE,6EAA6E;AAC7E,uCAAuC;AACvC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,QAAQ,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AACpD,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,QAAQ,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AAEpD,KAAK,UAAU,oBAAoB;IACjC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,CAAC;IACvC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CACb,6CAA6C,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,EAAE,CACtF,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;AAChC,CAAC;AAED,MAAM,GAAG,GAAG,aAAa,CAAC;IACxB,OAAO,EAAE,QAAQ;IACjB,aAAa,EAAE,oBAAoB;CACpC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,EACX,IAAI,EACJ,OAAO,EACP,UAAU;AACV,+DAA+D;AAC/D,qEAAqE;AACrE,UAAU,EACV,aAAa,EACb,OAAO,EACP,mBAAmB,EACnB,8BAA8B,GAC/B,GAAG,GAAG,CAAC;AAER,OAAO,EAAE,kBAAkB,EAAE,+BAA+B,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC","sourcesContent":["import glueHref from \"./wasm/zfb_md_wasm_glue.zfb-resource.mjs?url\";\nimport wasmHref from \"./wasm/zfb_md_wasm_bg.wasm?url\";\nimport { createWasmApi } from \"./runtime.js\";\n\n// `?url` is the explicit cross-bundler asset contract: both Vite and zfb's\n// bundler file loaders replace these imports with URL strings. Resolving\n// them from the final entry keeps relative bundler output correct while also\n// accepting Vite's base-prefixed URLs.\nconst GLUE_URL = new URL(glueHref, import.meta.url);\nconst WASM_URL = new URL(wasmHref, import.meta.url);\n\nasync function loadBrowserWasmBytes(): Promise<ArrayBuffer> {\n const response = await fetch(WASM_URL);\n if (!response.ok) {\n throw new Error(\n `zfb-md-wasm: failed to fetch wasm binary: ${response.status} ${response.statusText}`,\n );\n }\n return response.arrayBuffer();\n}\n\nconst api = createWasmApi({\n glueUrl: GLUE_URL,\n loadWasmBytes: loadBrowserWasmBytes,\n});\n\nexport const {\n init,\n compile,\n renderHtml,\n // Raw-mdast export (zfb#1857, epic zfb#1854) -- see types.ts's\n // ParseToAstResult/MdastNode docs for the result shape and contract.\n parseToAst,\n highlightCode,\n version,\n __forceTrapForTests,\n __getTrapRecoveryStateForTests,\n} = api;\n\nexport { ZfbMdWasmTrapError, ZfbMdWasmTrapRecoveryLimitError } from \"./runtime.js\";\nexport { MdastAdapterError, toMdastRoot } from \"./mdast.js\";\n\nexport type {\n CompileResult,\n RenderHtmlResult,\n ParseToAstResult,\n ParseToAstOptions,\n ParseDialect,\n FrontmatterPolicy,\n ParsePipelineOptions,\n Diagnostic,\n DiagnosticSource,\n ZfbMdWasmOptions,\n PipelineOptions,\n GfmOptions,\n CodeHighlightMode,\n CodeHighlightOptions,\n MarkdownFeaturesConfig,\n HighlightRole,\n HighlightCodeOptions,\n HighlightCodeResult,\n HighlightDiagnostic,\n HighlightDiagnosticSource,\n AstPoint,\n AstPosition,\n RawMdastData,\n MarkdownRsStop,\n MdastNode,\n MdastRoot,\n UnknownMdastNode,\n Root,\n Paragraph,\n Heading,\n ThematicBreak,\n Blockquote,\n List,\n ListItem,\n Html,\n Code,\n Definition,\n Text,\n DirectiveNodeBase,\n ContainerDirective,\n LeafDirective,\n TextDirective,\n Emphasis,\n Strong,\n InlineCode,\n Break,\n Link,\n Image,\n ReferenceKind,\n LinkReference,\n ImageReference,\n FootnoteDefinition,\n FootnoteReference,\n TableAlign,\n Table,\n TableRow,\n TableCell,\n Delete,\n Yaml,\n MdxFlowExpression,\n MdxTextExpression,\n MdxJsxFlowElement,\n MdxJsxTextElement,\n MdxJsxAttributeContent,\n MdxJsxAttribute,\n MdxJsxAttributeValueExpression,\n MdxJsxExpressionAttribute,\n} from \"./types.js\";\n"]}
@@ -7,8 +7,8 @@ import { createWasmApi } from "./runtime.js";
7
7
  // and why `compile`/`renderHtml` are absent here.
8
8
  //
9
9
  // `?url` is the explicit cross-bundler asset contract: both Vite and zfb's
10
- // pinned esbuild file loaders replace these imports with URL strings. Resolving
11
- // them from the final entry keeps relative esbuild output correct while also
10
+ // bundler file loaders replace these imports with URL strings. Resolving
11
+ // them from the final entry keeps relative bundler output correct while also
12
12
  // accepting Vite's base-prefixed URLs.
13
13
  const GLUE_URL = new URL(glueHref, import.meta.url);
14
14
  const WASM_URL = new URL(wasmHref, import.meta.url);
@@ -1 +1 @@
1
- {"version":3,"file":"highlight-browser.js","sourceRoot":"","sources":["../src/highlight-browser.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,kEAAkE,CAAC;AACxF,OAAO,QAAQ,MAAM,oDAAoD,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,0EAA0E;AAC1E,wEAAwE;AACxE,yEAAyE;AACzE,kDAAkD;AAClD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;AAChF,6EAA6E;AAC7E,uCAAuC;AACvC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,QAAQ,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AACpD,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,QAAQ,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AAEpD,KAAK,UAAU,oBAAoB;IACjC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,CAAC;IACvC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CACb,6CAA6C,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,EAAE,CACtF,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;AAChC,CAAC;AAED,MAAM,GAAG,GAAG,aAAa,CAAC;IACxB,OAAO,EAAE,QAAQ;IACjB,aAAa,EAAE,oBAAoB;CACpC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,mBAAmB,EAAE,8BAA8B,EAAE,GAChG,GAAG,CAAC;AAEN,OAAO,EAAE,kBAAkB,EAAE,+BAA+B,EAAE,MAAM,cAAc,CAAC","sourcesContent":["import glueHref from \"./wasm-highlight/zfb_md_wasm_highlight_glue.zfb-resource.mjs?url\";\nimport wasmHref from \"./wasm-highlight/zfb_md_wasm_highlight_bg.wasm?url\";\nimport { createWasmApi } from \"./runtime.js\";\n\n// Mirrors src/browser.ts, but points at the highlight-only artifact under\n// src/wasm-highlight/ (zfb#1849, epic zfb#1845) and re-exports only the\n// highlight-surface API -- see src/highlight.ts for the direct/Node twin\n// and why `compile`/`renderHtml` are absent here.\n//\n// `?url` is the explicit cross-bundler asset contract: both Vite and zfb's\n// pinned esbuild file loaders replace these imports with URL strings. Resolving\n// them from the final entry keeps relative esbuild output correct while also\n// accepting Vite's base-prefixed URLs.\nconst GLUE_URL = new URL(glueHref, import.meta.url);\nconst WASM_URL = new URL(wasmHref, import.meta.url);\n\nasync function loadBrowserWasmBytes(): Promise<ArrayBuffer> {\n const response = await fetch(WASM_URL);\n if (!response.ok) {\n throw new Error(\n `zfb-md-wasm: failed to fetch wasm binary: ${response.status} ${response.statusText}`,\n );\n }\n return response.arrayBuffer();\n}\n\nconst api = createWasmApi({\n glueUrl: GLUE_URL,\n loadWasmBytes: loadBrowserWasmBytes,\n});\n\nexport const { init, highlightCode, version, __forceTrapForTests, __getTrapRecoveryStateForTests } =\n api;\n\nexport { ZfbMdWasmTrapError, ZfbMdWasmTrapRecoveryLimitError } from \"./runtime.js\";\n\nexport type {\n HighlightRole,\n HighlightCodeOptions,\n HighlightCodeResult,\n HighlightDiagnostic,\n HighlightDiagnosticSource,\n} from \"./types.js\";\n"]}
1
+ {"version":3,"file":"highlight-browser.js","sourceRoot":"","sources":["../src/highlight-browser.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,kEAAkE,CAAC;AACxF,OAAO,QAAQ,MAAM,oDAAoD,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,0EAA0E;AAC1E,wEAAwE;AACxE,yEAAyE;AACzE,kDAAkD;AAClD,EAAE;AACF,2EAA2E;AAC3E,yEAAyE;AACzE,6EAA6E;AAC7E,uCAAuC;AACvC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,QAAQ,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AACpD,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,QAAQ,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AAEpD,KAAK,UAAU,oBAAoB;IACjC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,CAAC;IACvC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CACb,6CAA6C,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,EAAE,CACtF,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;AAChC,CAAC;AAED,MAAM,GAAG,GAAG,aAAa,CAAC;IACxB,OAAO,EAAE,QAAQ;IACjB,aAAa,EAAE,oBAAoB;CACpC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,mBAAmB,EAAE,8BAA8B,EAAE,GAChG,GAAG,CAAC;AAEN,OAAO,EAAE,kBAAkB,EAAE,+BAA+B,EAAE,MAAM,cAAc,CAAC","sourcesContent":["import glueHref from \"./wasm-highlight/zfb_md_wasm_highlight_glue.zfb-resource.mjs?url\";\nimport wasmHref from \"./wasm-highlight/zfb_md_wasm_highlight_bg.wasm?url\";\nimport { createWasmApi } from \"./runtime.js\";\n\n// Mirrors src/browser.ts, but points at the highlight-only artifact under\n// src/wasm-highlight/ (zfb#1849, epic zfb#1845) and re-exports only the\n// highlight-surface API -- see src/highlight.ts for the direct/Node twin\n// and why `compile`/`renderHtml` are absent here.\n//\n// `?url` is the explicit cross-bundler asset contract: both Vite and zfb's\n// bundler file loaders replace these imports with URL strings. Resolving\n// them from the final entry keeps relative bundler output correct while also\n// accepting Vite's base-prefixed URLs.\nconst GLUE_URL = new URL(glueHref, import.meta.url);\nconst WASM_URL = new URL(wasmHref, import.meta.url);\n\nasync function loadBrowserWasmBytes(): Promise<ArrayBuffer> {\n const response = await fetch(WASM_URL);\n if (!response.ok) {\n throw new Error(\n `zfb-md-wasm: failed to fetch wasm binary: ${response.status} ${response.statusText}`,\n );\n }\n return response.arrayBuffer();\n}\n\nconst api = createWasmApi({\n glueUrl: GLUE_URL,\n loadWasmBytes: loadBrowserWasmBytes,\n});\n\nexport const { init, highlightCode, version, __forceTrapForTests, __getTrapRecoveryStateForTests } =\n api;\n\nexport { ZfbMdWasmTrapError, ZfbMdWasmTrapRecoveryLimitError } from \"./runtime.js\";\n\nexport type {\n HighlightRole,\n HighlightCodeOptions,\n HighlightCodeResult,\n HighlightDiagnostic,\n HighlightDiagnosticSource,\n} from \"./types.js\";\n"]}
@@ -1,31 +1,31 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "name": "@takazudo/zfb-md-wasm",
4
- "version": "5.2.2",
4
+ "version": "6.0.0",
5
5
  "artifacts": [
6
6
  {
7
7
  "entry": ".",
8
8
  "path": "dist/wasm/zfb_md_wasm_bg.wasm",
9
9
  "bytes": 3423580,
10
- "sha256": "aa979777eca335d2afcddc967b5dac5e40a49d7e62ce8056c78e121e3a81550b"
10
+ "sha256": "18d0a83f9f2bd2e9b14415c03da4ad6792436f6c9084c9e1f0ecc834d2cc255c"
11
11
  },
12
12
  {
13
13
  "entry": "./highlight",
14
14
  "path": "dist/wasm-highlight/zfb_md_wasm_highlight_bg.wasm",
15
15
  "bytes": 1544127,
16
- "sha256": "23e9acd24b25cfda35efe219be70398cb5bd9e56e13e244451ef733734ed7728"
16
+ "sha256": "e10ad33c278f30c04710c15b30ffdffa03084aca8226aaa8cb7991b44339cf50"
17
17
  },
18
18
  {
19
19
  "entry": "./render",
20
20
  "path": "dist/wasm-render/zfb_md_wasm_render_bg.wasm",
21
21
  "bytes": 2241653,
22
- "sha256": "a1184f018e7a4c82a592e6231421cb3af6ec36563739e1b29ba76201b1f6881b"
22
+ "sha256": "86207790d853f4df19251a168758854c5ad205749da58785c82fdbe6878c514b"
23
23
  },
24
24
  {
25
25
  "entry": "./parse",
26
26
  "path": "dist/wasm-parse/zfb_md_wasm_parse_bg.wasm",
27
27
  "bytes": 735259,
28
- "sha256": "eda54db7c2facc5468d3c46351c2bb215db8d19bbebd7d663b9693db7b500b4e"
28
+ "sha256": "2d615d76394137092d819ad1a3681de92840ad45590baaa313541f13105ebcea"
29
29
  }
30
30
  ]
31
31
  }
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takazudo/zfb-md-wasm",
3
- "version": "5.2.2",
3
+ "version": "6.0.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "zfb's md/mdx -> JS/HTML conversion pipeline compiled to WebAssembly, for browser-side dynamic conversion (CMS live preview with parity to zfb's production output).",
@@ -72,13 +72,13 @@
72
72
  "devDependencies": {
73
73
  "@types/node": "^22.0.0",
74
74
  "binaryen": "130.0.0",
75
- "esbuild": "0.27.7",
76
75
  "mdast-util-to-hast": "^13.2.1",
77
76
  "miniflare": "4.20260424.0",
78
77
  "remark-directive": "^4.0.0",
79
78
  "remark-gfm": "^4.0.1",
80
79
  "remark-mdx": "^3.1.1",
81
80
  "remark-parse": "^11.0.0",
81
+ "rolldown": "1.2.13",
82
82
  "typescript": "7.0.2",
83
83
  "typescript-5.9": "npm:typescript@5.9.3",
84
84
  "typescript-6.0": "npm:typescript@6.0.3",