reactive-md 0.8.0 → 0.9.1
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/CHANGELOG-ch.md +54 -4
- package/CHANGELOG.md +55 -4
- package/CONTRIBUTING-ch.md +13 -2
- package/CONTRIBUTING.md +13 -2
- package/README-ch.md +132 -23
- package/README-en.md +130 -21
- package/README.md +128 -21
- package/SECURITY-ch.md +3 -3
- package/SECURITY.md +3 -3
- package/THIRD_PARTY_NOTICES.md +111 -1
- package/cli/args.mjs +51 -1
- package/cli/assets.mjs +6 -1
- package/cli/build.mjs +125 -9
- package/cli/fs-utils.mjs +3 -3
- package/cli/help.mjs +12 -5
- package/cli/init.mjs +1 -1
- package/cli/package.mjs +1 -0
- package/dist-library/LocalDocumentView-sthUP0ct.js +109 -0
- package/dist-library/LocalDocumentViewCore-GiWV3bey.js +9829 -0
- package/dist-library/LocalReactiveDocumentCore-ZjQSGyHE.js +275 -0
- package/dist-library/{authoring-BsfSwQRm.js → authoring-Dsune4Hy.js} +240 -218
- package/dist-library/compile-wUv8KEge.js +1249 -0
- package/dist-library/{compiler-core-kPiH-gOV.js → compiler-core-As_m-MNm.js} +5372 -5559
- package/dist-library/compiler-eOfcinZs.js +62 -0
- package/dist-library/component-state-BoLCGee4.js +801 -0
- package/dist-library/{component-state-D_cw_EHe.js → component-state-C52ZFJGl.js} +2 -2
- package/dist-library/{registry-B9Jc3FVe.js → config-BadfhjdP.js} +374 -457
- package/dist-library/{config-validation-DXTynAw7.js → config-validation-F47AcE6o.js} +549 -751
- package/dist-library/controls-CcT6n7k_.js +6740 -0
- package/dist-library/coordinate-CWS9p5q_.js +293 -0
- package/dist-library/data-table-Bgccxd7h.js +296 -0
- package/dist-library/{default-components-Z_YMio5P.js → default-components-BwQf0oP-.js} +344 -334
- package/dist-library/{math-display-BJz4gbFc.js → display-B-VhqVND.js} +1299 -1299
- package/dist-library/export-BqVmTXm8.js +369 -0
- package/dist-library/gallery-CY6mTx8i.js +360 -0
- package/dist-library/html-CNT4KD-2.js +757 -0
- package/dist-library/{math-sample-BGEW49zY.js → incremental-Dv0FSp_U.js} +476 -394
- package/dist-library/latex-1w7aQgD5.js +928 -0
- package/dist-library/layout-C0YlEPGr.js +562 -0
- package/dist-library/mount-preset-KxvtKgJb.js +13 -0
- package/dist-library/options-1aDLK7JY.js +121 -0
- package/dist-library/{react-ByOHunUW.js → package-core-WFK1RhAZ.js} +49 -55
- package/dist-library/{parser-standard-DlCk7sLo.js → parser-standard-Yuf3A_VI.js} +6605 -7097
- package/dist-library/plugin-packs-B1XPWcFs.js +18 -0
- package/dist-library/{identity-MYJXKSkB.js → preset-core-CKc5YXSM.js} +31 -31
- package/dist-library/{props-DGlBk0e5.js → props-sJ8vk0cr.js} +1 -1
- package/dist-library/react-BbyAgeXc.js +6070 -0
- package/dist-library/react-D5iGiUdL.js +7 -0
- package/dist-library/reactive-md-authoring.js +222 -223
- package/dist-library/reactive-md-build.js +126 -72
- package/dist-library/reactive-md-compiler-standard.js +12 -10
- package/dist-library/reactive-md-compiler.js +3 -3
- package/dist-library/reactive-md-default-packs.js +2 -2
- package/dist-library/reactive-md-default-preset.js +4 -4
- package/dist-library/reactive-md-export-assets.js +57 -0
- package/dist-library/reactive-md-export.js +5 -111
- package/dist-library/reactive-md-minimal-preset.js +24 -0
- package/dist-library/reactive-md-minimal-react-preset.js +26 -0
- package/dist-library/reactive-md-minimal-styles.js +80 -0
- package/dist-library/reactive-md-minimal.css +2 -0
- package/dist-library/reactive-md-pdf.js +7582 -0
- package/dist-library/reactive-md-plugin-chart.js +13 -0
- package/dist-library/reactive-md-plugin-data.js +17 -0
- package/dist-library/reactive-md-plugin-diagram.js +18 -0
- package/dist-library/reactive-md-plugin-forms.js +18 -0
- package/dist-library/reactive-md-plugin-gallery.js +12 -0
- package/dist-library/reactive-md-plugin-navigation.js +15 -0
- package/dist-library/reactive-md-plugin-network.js +222 -0
- package/dist-library/reactive-md-plugin-plot.js +24 -0
- package/dist-library/reactive-md-print.css +5 -0
- package/dist-library/reactive-md-react-minimal.js +28 -0
- package/dist-library/reactive-md-react-server.js +34 -32
- package/dist-library/reactive-md-react-unstyled.js +14 -9
- package/dist-library/reactive-md-react.js +14 -9
- package/dist-library/reactive-md-runtime-browser.js +847 -15
- package/dist-library/reactive-md-runtime.js +3 -3
- package/dist-library/reactive-md-sdk.js +8 -6
- package/dist-library/reactive-md-standalone-configured.js +16 -0
- package/dist-library/reactive-md-standalone-host.js +9 -438
- package/dist-library/reactive-md-testing-browser.js +5 -4
- package/dist-library/reactive-md-testing-react.js +46 -44
- package/dist-library/reactive-md-testing.js +45 -44
- package/dist-library/reactive-md-vite.js +135 -37
- package/dist-library/reactive-md.css +1 -1
- package/dist-library/reactive-md.js +590 -498
- package/dist-library/registry-B9NGct4d.js +20 -0
- package/dist-library/registry-core-Bbad9Bm2.js +479 -0
- package/dist-library/{resources-BGt8mpDA.js → resources-D2GDQS0p.js} +45 -45
- package/dist-library/{runtime-Dkq7ldyg.js → runtime-B2fxeveq.js} +1 -1
- package/dist-library/runtime-kcA7bG7G.js +1282 -0
- package/dist-library/sample-bP4zHB3L.js +289 -0
- package/dist-library/{schema-ZFufO8V0.js → schema-BufhKUSM.js} +12 -11
- package/dist-library/sdk-core-BoJT1SIt.js +1166 -0
- package/dist-library/session-core-nmJHuR9c.js +452 -0
- package/dist-library/{shareable-DDVL4Fi9.js → shareable-DpbE-59H.js} +250 -283
- package/dist-library/tooltip-layer-HDLrSWs0.js +28 -0
- package/dist-library/types/authoring/catalog.d.ts +2 -3
- package/dist-library/types/authoring/editor-i18n.d.ts +1 -1
- package/dist-library/types/authoring/index.d.ts +1 -1
- package/dist-library/types/authoring/insert.d.ts +1 -1
- package/dist-library/types/authoring/templates.d.ts +2 -2
- package/dist-library/types/build/diagnostics.d.ts +1 -1
- package/dist-library/types/build/host.d.ts +1 -1
- package/dist-library/types/build/index.d.ts +1 -1
- package/dist-library/types/build/notices.d.ts +1 -1
- package/dist-library/types/build/resources.d.ts +1 -1
- package/dist-library/types/build/vite.d.ts +1 -1
- package/dist-library/types/compiler/index.d.ts +2 -2
- package/dist-library/types/compiler/result.d.ts +1 -1
- package/dist-library/types/compiler/standard.d.ts +2 -2
- package/dist-library/types/compiler/types.d.ts +1 -1
- package/dist-library/types/components/{controls.d.ts → controls/controls.d.ts} +2 -3
- package/dist-library/types/components/{numeric-sliders.d.ts → controls/numeric-sliders.d.ts} +1 -1
- package/dist-library/types/components/{gallery.d.ts → gallery/gallery.d.ts} +1 -1
- package/dist-library/types/components/{layout.d.ts → layout/layout.d.ts} +1 -1
- package/dist-library/types/components/minimal-preset.d.ts +2 -0
- package/dist-library/types/components/mount-preset.d.ts +4 -0
- package/dist-library/types/components/network/submit-button.d.ts +10 -0
- package/dist-library/types/components/plot/coordinate.d.ts +2 -0
- package/dist-library/types/components/plugins/chart.d.ts +2 -0
- package/dist-library/types/components/plugins/data.d.ts +2 -0
- package/dist-library/types/components/plugins/diagram.d.ts +2 -0
- package/dist-library/types/components/plugins/forms.d.ts +2 -0
- package/dist-library/types/components/plugins/gallery.d.ts +2 -0
- package/dist-library/types/components/plugins/navigation.d.ts +2 -0
- package/dist-library/types/components/plugins/network.d.ts +2 -0
- package/dist-library/types/components/plugins/plot.d.ts +2 -0
- package/dist-library/types/components/shared/visual-frame.d.ts +12 -0
- package/dist-library/types/components/{visuals.d.ts → shared/visuals.d.ts} +1 -7
- package/dist-library/types/components/{data-table.d.ts → table/data-table.d.ts} +2 -2
- package/dist-library/types/export/component-state.d.ts +1 -1
- package/dist-library/types/export/index.d.ts +2 -1
- package/dist-library/types/export/print-document.d.ts +18 -0
- package/dist-library/types/export/render-markup.d.ts +23 -0
- package/dist-library/types/export/requirements.d.ts +1 -1
- package/dist-library/types/export/resources.d.ts +1 -1
- package/dist-library/types/export/restoration.d.ts +1 -1
- package/dist-library/types/export-assets/index.d.ts +25 -0
- package/dist-library/types/local/compilation/compiler-attributes.d.ts +8 -0
- package/dist-library/types/local/compilation/compiler-bindings.d.ts +19 -0
- package/dist-library/types/local/compilation/compiler-capabilities.d.ts +3 -0
- package/dist-library/types/local/compilation/compiler-core.d.ts +11 -3
- package/dist-library/types/local/compilation/compiler-declarations.d.ts +32 -0
- package/dist-library/types/local/compilation/compiler-expressions.d.ts +32 -0
- package/dist-library/types/local/compilation/compiler-services.d.ts +62 -16
- package/dist-library/types/local/compilation/compiler-structure.d.ts +38 -3
- package/dist-library/types/local/compilation/compiler-tables.d.ts +30 -0
- package/dist-library/types/local/compilation/compiler-validation.d.ts +15 -0
- package/dist-library/types/local/compilation/compiler-values.d.ts +39 -1
- package/dist-library/types/local/compilation/compiler.d.ts +7 -14
- package/dist-library/types/local/compilation/dependencies.d.ts +1 -1
- package/dist-library/types/local/compilation/session/incremental.d.ts +75 -0
- package/dist-library/types/local/{session → compilation/session}/row-reuse.d.ts +1 -1
- package/dist-library/types/local/{session/compiler-cache.d.ts → compilation/session/semantic-cache.d.ts} +5 -19
- package/dist-library/types/local/compilation/streaming.d.ts +27 -0
- package/dist-library/types/local/configuration/capability-policy.d.ts +3 -0
- package/dist-library/types/local/{compilation → configuration}/component-kernel.d.ts +3 -79
- package/dist-library/types/local/configuration/diagnostic-messages.d.ts +1104 -1056
- package/dist-library/types/local/configuration/diagnostic-runtime-messages.d.ts +731 -0
- package/dist-library/types/local/configuration/diagnostics.d.ts +1 -1
- package/dist-library/types/local/configuration/kernel-value-rules.d.ts +66 -0
- package/dist-library/types/local/configuration/official-leaf-syntax.d.ts +24 -0
- package/dist-library/types/local/configuration/options-core.d.ts +5 -4
- package/dist-library/types/local/configuration/options.d.ts +2 -1
- package/dist-library/types/local/configuration/portable-options.d.ts +1 -1
- package/dist-library/types/local/configuration/schema-core.d.ts +1 -1
- package/dist-library/types/local/configuration/schema.d.ts +1 -1
- package/dist-library/types/local/css/author-css.d.ts +66 -0
- package/dist-library/types/local/evaluation/computations.d.ts +2 -2
- package/dist-library/types/local/evaluation/expression/compile.d.ts +30 -0
- package/dist-library/types/local/evaluation/expression/evaluation.d.ts +3 -0
- package/dist-library/types/local/evaluation/expression/inference.d.ts +4 -0
- package/dist-library/types/local/evaluation/expression/syntax.d.ts +72 -0
- package/dist-library/types/local/evaluation/expression/values.d.ts +56 -0
- package/dist-library/types/local/evaluation/{math-display.d.ts → math/display.d.ts} +2 -2
- package/dist-library/types/local/evaluation/math/evaluation.d.ts +10 -0
- package/dist-library/types/local/evaluation/{math.d.ts → math/latex.d.ts} +58 -17
- package/dist-library/types/local/evaluation/{math-sample.d.ts → math/sample.d.ts} +4 -2
- package/dist-library/types/local/evaluation/math/syntax.d.ts +72 -0
- package/dist-library/types/local/evaluation/validation.d.ts +1 -1
- package/dist-library/types/local/html/extended-fragment.d.ts +41 -0
- package/dist-library/types/local/html/html-details.d.ts +1 -1
- package/dist-library/types/local/html/html-entities.d.ts +11 -2
- package/dist-library/types/local/html/html-recovery.d.ts +1 -1
- package/dist-library/types/local/html/html-table.d.ts +1 -1
- package/dist-library/types/local/html/html.d.ts +40 -4
- package/dist-library/types/local/index.d.ts +14 -13
- package/dist-library/types/local/parsing/author-markdown.d.ts +11 -0
- package/dist-library/types/local/{markdown → parsing}/fast-markdown.d.ts +1 -1
- package/dist-library/types/local/{markdown → parsing}/footnotes.d.ts +1 -1
- package/dist-library/types/local/{markdown → parsing}/heading-anchors.d.ts +1 -1
- package/dist-library/types/local/parsing/html-attributes.d.ts +14 -0
- package/dist-library/types/local/parsing/parse-budget.d.ts +1 -1
- package/dist-library/types/local/{session → parsing}/parse-session.d.ts +5 -5
- package/dist-library/types/local/parsing/parser-capabilities.d.ts +7 -2
- package/dist-library/types/local/parsing/parser-convert.d.ts +26 -0
- package/dist-library/types/local/parsing/parser-core.d.ts +10 -4
- package/dist-library/types/local/parsing/parser-internals.d.ts +54 -0
- package/dist-library/types/local/parsing/parser-region.d.ts +46 -0
- package/dist-library/types/local/parsing/parser-standard.d.ts +3 -0
- package/dist-library/types/local/parsing/parser-tags.d.ts +108 -0
- package/dist-library/types/local/parsing/parser.d.ts +3 -3
- package/dist-library/types/local/{markdown → parsing}/plain-paragraphs.d.ts +1 -1
- package/dist-library/types/local/parsing/rmd-recovery.d.ts +1 -1
- package/dist-library/types/local/parsing/theme-declaration.d.ts +22 -0
- package/dist-library/types/local/rendering/document/ExtendedHtmlFragment.d.ts +14 -0
- package/dist-library/types/local/rendering/document/LocalDocumentView.d.ts +5 -0
- package/dist-library/types/local/rendering/{LocalDocumentView.d.ts → document/LocalDocumentViewCore.d.ts} +48 -9
- package/dist-library/types/local/rendering/document/LocalReactiveDocumentCore.d.ts +6 -0
- package/dist-library/types/local/rendering/document/render-nodes.d.ts +24 -0
- package/dist-library/types/local/rendering/document/use-author-script.d.ts +3 -0
- package/dist-library/types/local/rendering/document/use-color-scheme.d.ts +10 -0
- package/dist-library/types/local/rendering/document/validation-state.d.ts +31 -0
- package/dist-library/types/local/rendering/document/view-render-context.d.ts +146 -0
- package/dist-library/types/local/rendering/{view-revision.d.ts → document/view-revision.d.ts} +31 -4
- package/dist-library/types/local/rendering/render-types.d.ts +1 -1
- package/dist-library/types/local/{widgets/table-surface.d.ts → rendering/table/data-table.d.ts} +3 -0
- package/dist-library/types/local/rendering/table/table-numeric-columns.d.ts +7 -0
- package/dist-library/types/local/runtime/author-script-protocol.d.ts +59 -0
- package/dist-library/types/local/runtime/retention.d.ts +1 -1
- package/dist-library/types/local/runtime/runtime-document.d.ts +71 -0
- package/dist-library/types/local/runtime/runtime-migration.d.ts +19 -0
- package/dist-library/types/local/runtime/runtime-values.d.ts +39 -0
- package/dist-library/types/local/runtime/runtime.d.ts +4 -2
- package/dist-library/types/local/runtime/state.d.ts +1 -1
- package/dist-library/types/local/source/authoring-syntax.d.ts +48 -0
- package/dist-library/types/local/source/authoring.d.ts +1 -1
- package/dist-library/types/local/source/source-context.d.ts +23 -0
- package/dist-library/types/local/source/source-migration.d.ts +2 -2
- package/dist-library/types/local/transport/compile-patch.d.ts +1 -1
- package/dist-library/types/local/transport/flat-compiled-data.d.ts +1 -1
- package/dist-library/types/local/transport/shared-data.d.ts +1 -1
- package/dist-library/types/local/transport/worker-handler.d.ts +30 -0
- package/dist-library/types/local/transport/worker-job.d.ts +28 -0
- package/dist-library/types/local/transport/worker.d.ts +32 -46
- package/dist-library/types/local/{contracts/types.d.ts → types.d.ts} +78 -21
- package/dist-library/types/pdf.d.ts +22 -0
- package/dist-library/types/presets/identity.d.ts +1 -0
- package/dist-library/types/presets/minimal.d.ts +2 -0
- package/dist-library/types/presets/plugin-packs.d.ts +1 -0
- package/dist-library/types/react/component-api.d.ts +20 -4
- package/dist-library/types/react/component-primitives.d.ts +10 -10
- package/dist-library/types/react/component-utils.d.ts +9 -1
- package/dist-library/types/react/index.d.ts +6 -5
- package/dist-library/types/{local/theme/i18n.d.ts → react/localization.d.ts} +2 -2
- package/dist-library/types/react/minimal.d.ts +13 -0
- package/dist-library/types/react/package-core.d.ts +67 -0
- package/dist-library/types/react/package.d.ts +3 -67
- package/dist-library/types/react/runtime/common.d.ts +1 -1
- package/dist-library/types/react/sdk-core.d.ts +115 -0
- package/dist-library/types/react/sdk.d.ts +4 -110
- package/dist-library/types/react/server.d.ts +2 -2
- package/dist-library/types/react/use-draft-field.d.ts +5 -1
- package/dist-library/types/runtime-services/browser/duplex.d.ts +163 -0
- package/dist-library/types/runtime-services/browser/http-sse.d.ts +117 -0
- package/dist-library/types/runtime-services/browser/index.d.ts +2 -1
- package/dist-library/types/runtime-services/component-state.d.ts +1 -1
- package/dist-library/types/runtime-services/index.d.ts +2 -0
- package/dist-library/types/runtime-services/network.d.ts +86 -0
- package/dist-library/types/runtime-services/runtime.d.ts +1 -1
- package/dist-library/types/sdk/config.d.ts +1 -1
- package/dist-library/types/sdk/index.d.ts +1 -0
- package/dist-library/types/sdk/props.d.ts +1 -1
- package/dist-library/types/sdk/registry-core.d.ts +1 -1
- package/dist-library/types/sdk/theme.d.ts +5 -4
- package/dist-library/types/sdk/types.d.ts +2 -2
- package/dist-library/types/shareable.d.ts +6 -5
- package/dist-library/types/standalone/diagnostics.d.ts +1 -1
- package/dist-library/types/standalone/host.d.ts +5 -0
- package/dist-library/types/standalone/payload.d.ts +1 -1
- package/dist-library/types/standalone/prepare.d.ts +2 -2
- package/dist-library/types/standalone/session-core.d.ts +68 -0
- package/dist-library/types/standalone/session.d.ts +6 -68
- package/dist-library/types/themes/contract.d.ts +7 -0
- package/dist-library/types/{local/theme/theme.d.ts → themes/document-theme.d.ts} +4 -3
- package/dist-library/types/vite/client.d.ts +19 -0
- package/dist-library/types/vite/index.d.ts +18 -3
- package/dist-library/types/vite/registration.d.ts +2 -2
- package/dist-library/{types-BFCrMrg0.js → types-BeNtPqdY.js} +1 -1
- package/dist-library/validation-BEBA_HvS.js +1121 -0
- package/dist-library/visual-frame-CyV1FXzs.js +48 -0
- package/dist-library/visuals-B5KSafVk.js +3 -0
- package/dist-library/visuals-BZbZYA7w.js +72572 -0
- package/dist-standalone/reactive-md-standalone.css +1 -1
- package/dist-standalone/reactive-md-standalone.js +146 -137
- package/docs/README-ch.md +16 -11
- package/docs/README.md +16 -11
- package/docs/compatibility/compatibility-ch.md +8 -8
- package/docs/compatibility/compatibility-en.md +8 -8
- package/docs/compatibility/source-versioning-ch.md +1 -1
- package/docs/compatibility/source-versioning-en.md +1 -1
- package/docs/development/component-development-ch.md +2 -2
- package/docs/development/component-development-en.md +2 -2
- package/docs/development/component-development-reference-ch.md +4 -4
- package/docs/development/component-development-reference-en.md +4 -4
- package/docs/development/component-protocol-ch.md +14 -14
- package/docs/development/component-protocol-en.md +14 -14
- package/docs/development/extension-tutorial-ch.md +308 -0
- package/docs/development/extension-tutorial-en.md +308 -0
- package/docs/development/local-module-layout-ch.md +10 -50
- package/docs/development/local-module-layout-en.md +9 -49
- package/docs/development/performance-overview-ch.md +174 -154
- package/docs/development/performance-overview-en.md +174 -154
- package/docs/guides/local-guide-ch.md +2 -2
- package/docs/guides/local-guide-en.md +2 -2
- package/docs/integration/author-tools-ch.md +2 -2
- package/docs/integration/author-tools-en.md +2 -2
- package/docs/integration/compiler-ch.md +4 -2
- package/docs/integration/compiler-en.md +4 -2
- package/docs/integration/directory-discovery-ch.md +5 -1
- package/docs/integration/directory-discovery-en.md +5 -1
- package/docs/integration/editor-ch.md +35 -5
- package/docs/integration/editor-en.md +42 -4
- package/docs/integration/extension-sdk-ch.md +6 -4
- package/docs/integration/extension-sdk-en.md +6 -4
- package/docs/integration/local-integration-ch.md +201 -19
- package/docs/integration/local-integration-en.md +194 -18
- package/docs/integration/network-host-ch.md +75 -0
- package/docs/integration/network-host-en.md +75 -0
- package/docs/integration/shareable-export-ch.md +58 -16
- package/docs/integration/shareable-export-en.md +57 -15
- package/docs/reference/html-compatibility-ch.md +20 -67
- package/docs/reference/html-compatibility-en.md +19 -64
- package/docs/reference/local-interaction-syntax-ch.md +199 -26
- package/docs/reference/local-interaction-syntax-en.md +194 -27
- package/docs/reference/public-api-ch.md +416 -0
- package/docs/reference/public-api-en.md +416 -0
- package/docs/reference/theme-protocol-ch.md +27 -8
- package/docs/reference/theme-protocol-en.md +46 -8
- package/docs/releases/release-0.4.0-ch.md +2 -2
- package/docs/releases/release-0.4.0-en.md +2 -2
- package/docs/releases/release-0.8.0-ch.md +19 -3
- package/docs/releases/release-0.8.0-en.md +19 -3
- package/docs/releases/release-0.9.0-ch.md +44 -0
- package/docs/releases/release-0.9.0-en.md +44 -0
- package/docs/releases/release-0.9.1-ch.md +29 -0
- package/docs/releases/release-0.9.1-en.md +29 -0
- package/examples/component-package/README-ch.md +1 -1
- package/examples/component-package/README.md +1 -1
- package/examples/conformance/README-ch.md +3 -3
- package/examples/conformance/README.md +3 -3
- package/examples/game-2048-package/README-ch.md +3 -9
- package/examples/game-2048-package/README.md +8 -12
- package/examples/integration/README-ch.md +21 -2
- package/examples/integration/README.md +21 -2
- package/examples/integration/extension-sdk/README-ch.md +1 -1
- package/examples/integration/extension-sdk/README.md +1 -1
- package/examples/integration/streaming/index.html +48 -0
- package/examples/integration/streaming/main.js +175 -0
- package/examples/integration/streaming/package.json +13 -0
- package/examples/integration/streaming/worker.js +3 -0
- package/examples/local/README-ch.md +3 -3
- package/examples/local/README.md +2 -2
- package/examples/local/minimal-budget.reactive.md +48 -0
- package/examples/minimal-extension/README-ch.md +78 -0
- package/examples/minimal-extension/README.md +78 -0
- package/examples/minimal-extension/index.html +15 -0
- package/examples/minimal-extension/package.json +26 -0
- package/examples/minimal-extension/sample/document.reactive.md +10 -0
- package/examples/minimal-extension/scripts/build.mjs +32 -0
- package/examples/minimal-extension/scripts/export.mjs +72 -0
- package/examples/minimal-extension/scripts/test-node.mjs +75 -0
- package/examples/minimal-extension/src/extension.tsx +90 -0
- package/examples/minimal-extension/src/preview.tsx +12 -0
- package/examples/minimal-extension/src/source.ts +4 -0
- package/examples/minimal-extension/tsconfig.json +14 -0
- package/examples/network-survey/README.md +200 -0
- package/examples/network-survey/index.html +49 -0
- package/examples/network-survey/package.json +26 -0
- package/examples/network-survey/sample/document.reactive.md +51 -0
- package/examples/network-survey/src/components.tsx +325 -0
- package/examples/network-survey/src/host.ts +316 -0
- package/examples/network-survey/src/main.tsx +91 -0
- package/examples/network-survey/src/source.ts +1 -0
- package/examples/network-survey/tsconfig.json +26 -0
- package/examples/network-survey/vite.config.ts +227 -0
- package/examples/sci-fi-theme/README-ch.md +4 -2
- package/examples/sci-fi-theme/README.md +4 -2
- package/examples/sci-fi-theme/demo/acceptance.reactive.md +454 -0
- package/examples/sci-fi-theme/demo/demo.css +129 -23
- package/examples/sci-fi-theme/demo/document.reactive.md +27 -6
- package/examples/sci-fi-theme/demo/main.tsx +45 -10
- package/examples/sci-fi-theme/docs/design-system-ch.md +6 -6
- package/examples/sci-fi-theme/package.json +2 -1
- package/examples/sci-fi-theme/src/components.css +1064 -154
- package/examples/sci-fi-theme/src/notch.css +142 -0
- package/examples/sci-fi-theme/src/sci-fi.css +3 -1
- package/examples/sci-fi-theme/src/theme.ts +2 -0
- package/examples/sci-fi-theme/src/tokens.css +512 -408
- package/examples/tetris-package/README-ch.md +4 -4
- package/examples/tetris-package/README.md +4 -4
- package/package.json +70 -3
- package/dist-library/LocalDocumentView-6trX7xJc.js +0 -97920
- package/dist-library/compiler--ea2CKQF.js +0 -61
- package/dist-library/component-state-Cq2K5gkS.js +0 -490
- package/dist-library/options-CX5m5n-J.js +0 -115
- package/dist-library/runtime-C-sbfpOX.js +0 -1157
- package/dist-library/types/local/contracts/locale.d.ts +0 -1
- package/dist-library/types/local/contracts/version.d.ts +0 -2
- package/dist-library/types/local/evaluation/dates.d.ts +0 -2
- package/dist-library/types/local/evaluation/expression.d.ts +0 -47
- package/dist-library/types/local/markdown/markdown-structure.d.ts +0 -3
- package/dist-library/types/local/rendering/legacy-component-adapter.d.ts +0 -36
- package/dist-library/types/local/session/incremental.d.ts +0 -48
- package/dist-library/types/local/source/node-walk.d.ts +0 -3
- package/dist-library/types/local/source/text-length.d.ts +0 -13
- package/dist-library/types/local/theme/theme-name.d.ts +0 -3
- package/dist-library/types/local/widgets/visuals.d.ts +0 -25
- package/dist-library/types/react/default-theme.d.ts +0 -6
- package/dist-library/validation-W-bmny-x.js +0 -2253
- package/docs/development/releasing-ch.md +0 -12
- package/docs/development/releasing-en.md +0 -12
- package/docs/integration/codemirror-ch.md +0 -52
- package/docs/integration/codemirror-en.md +0 -29
- package/docs/integration/repository-split-ch.md +0 -40
- package/docs/integration/repository-split-en.md +0 -23
- package/docs/reference/computations-formatting-ch.md +0 -89
- package/docs/reference/computations-formatting-en.md +0 -89
- package/docs/reference/constraints-collections-ch.md +0 -104
- package/docs/reference/constraints-collections-en.md +0 -104
- package/docs/reference/local-components-v2-ch.md +0 -140
- package/docs/reference/local-components-v2-en.md +0 -106
- package/docs/reference/tolerance-ch.md +0 -64
- package/docs/reference/tolerance-en.md +0 -57
- /package/dist-library/types/components/{chart-motion.d.ts → chart/chart-motion.d.ts} +0 -0
- /package/dist-library/types/components/{default-chart-types.d.ts → chart/default-chart-types.d.ts} +0 -0
- /package/dist-library/types/components/{default-chart.d.ts → chart/default-chart.d.ts} +0 -0
- /package/dist-library/types/components/{diagram-inspector.d.ts → diagram/diagram-inspector.d.ts} +0 -0
- /package/dist-library/types/{local/widgets/diagram-layout.d.ts → components/diagram/layout.d.ts} +0 -0
- /package/dist-library/types/components/{mafs-plot-grid.d.ts → plot/mafs-plot-grid.d.ts} +0 -0
- /package/dist-library/types/components/{mafs-visuals.d.ts → plot/mafs-visuals.d.ts} +0 -0
- /package/dist-library/types/components/{use-hydrated.d.ts → shared/use-hydrated.d.ts} +0 -0
- /package/dist-library/types/local/{theme/colors.d.ts → configuration/color-values.d.ts} +0 -0
- /package/dist-library/types/local/evaluation/{collection-functions.d.ts → expression/collection-functions.d.ts} +0 -0
- /package/dist-library/types/local/evaluation/{data-functions.d.ts → expression/data-functions.d.ts} +0 -0
- /package/dist-library/types/local/evaluation/{formatting.d.ts → expression/formatting.d.ts} +0 -0
- /package/dist-library/types/local/{markdown → parsing}/markdown-blocks.d.ts +0 -0
- /package/dist-library/types/local/{widgets → rendering/code}/code-block.d.ts +0 -0
- /package/dist-library/types/local/{widgets → rendering/code}/code-languages.d.ts +0 -0
- /package/dist-library/types/local/{widgets → rendering/image}/image-view.d.ts +0 -0
- /package/dist-library/types/local/{widgets → rendering}/math-view.d.ts +0 -0
|
@@ -10,45 +10,6 @@ var MAX_LOCAL_PLOT_POINTS = 2e4;
|
|
|
10
10
|
var MAX_LOCAL_DATA_TABLE_ROWS = 1e3;
|
|
11
11
|
var MAX_LOCAL_DATA_DOCUMENT_ROWS = 2e3;
|
|
12
12
|
var MAX_LOCAL_DATA_DOCUMENT_CELLS = 1e4;
|
|
13
|
-
// src/local/html/html-names.ts
|
|
14
|
-
/**
|
|
15
|
-
* P0 native HTML tag names. The parser handles these before component tags, and
|
|
16
|
-
* host component schemas may not reuse them because document parsing would
|
|
17
|
-
* never dispatch such a tag to a host component.
|
|
18
|
-
*/
|
|
19
|
-
var LOCAL_HTML_NAMES = /* @__PURE__ */ new Set([
|
|
20
|
-
"b",
|
|
21
|
-
"strong",
|
|
22
|
-
"i",
|
|
23
|
-
"em",
|
|
24
|
-
"s",
|
|
25
|
-
"del",
|
|
26
|
-
"u",
|
|
27
|
-
"mark",
|
|
28
|
-
"sup",
|
|
29
|
-
"sub",
|
|
30
|
-
"br",
|
|
31
|
-
"hr",
|
|
32
|
-
"img",
|
|
33
|
-
"p",
|
|
34
|
-
"h1",
|
|
35
|
-
"h2",
|
|
36
|
-
"h3",
|
|
37
|
-
"h4",
|
|
38
|
-
"h5",
|
|
39
|
-
"h6",
|
|
40
|
-
"div",
|
|
41
|
-
"span",
|
|
42
|
-
"details",
|
|
43
|
-
"summary",
|
|
44
|
-
"blockquote",
|
|
45
|
-
"code",
|
|
46
|
-
"pre",
|
|
47
|
-
"ul",
|
|
48
|
-
"ol",
|
|
49
|
-
"li",
|
|
50
|
-
"a"
|
|
51
|
-
]);
|
|
52
13
|
var LOCAL_KERNEL_DECLARATIONS = Object.freeze([
|
|
53
14
|
Object.freeze({
|
|
54
15
|
name: "computed",
|
|
@@ -130,6 +91,45 @@ var LOCAL_KERNEL_DECLARATIONS = Object.freeze([
|
|
|
130
91
|
}
|
|
131
92
|
})
|
|
132
93
|
]);
|
|
94
|
+
// src/local/html/html-names.ts
|
|
95
|
+
/**
|
|
96
|
+
* P0 native HTML tag names. The parser handles these before component tags, and
|
|
97
|
+
* host component schemas may not reuse them because document parsing would
|
|
98
|
+
* never dispatch such a tag to a host component.
|
|
99
|
+
*/
|
|
100
|
+
var LOCAL_HTML_NAMES = /* @__PURE__ */ new Set([
|
|
101
|
+
"b",
|
|
102
|
+
"strong",
|
|
103
|
+
"i",
|
|
104
|
+
"em",
|
|
105
|
+
"s",
|
|
106
|
+
"del",
|
|
107
|
+
"u",
|
|
108
|
+
"mark",
|
|
109
|
+
"sup",
|
|
110
|
+
"sub",
|
|
111
|
+
"br",
|
|
112
|
+
"hr",
|
|
113
|
+
"img",
|
|
114
|
+
"p",
|
|
115
|
+
"h1",
|
|
116
|
+
"h2",
|
|
117
|
+
"h3",
|
|
118
|
+
"h4",
|
|
119
|
+
"h5",
|
|
120
|
+
"h6",
|
|
121
|
+
"div",
|
|
122
|
+
"span",
|
|
123
|
+
"details",
|
|
124
|
+
"summary",
|
|
125
|
+
"blockquote",
|
|
126
|
+
"code",
|
|
127
|
+
"pre",
|
|
128
|
+
"ul",
|
|
129
|
+
"ol",
|
|
130
|
+
"li",
|
|
131
|
+
"a"
|
|
132
|
+
]);
|
|
133
133
|
// src/sdk/hash.ts
|
|
134
134
|
/**
|
|
135
135
|
* Deterministic, non-cryptographic digest for SDK semantic identity.
|
|
@@ -1113,6 +1113,7 @@ function readRule(value, path) {
|
|
|
1113
1113
|
"min",
|
|
1114
1114
|
"max",
|
|
1115
1115
|
"samples",
|
|
1116
|
+
"samplesAlias",
|
|
1116
1117
|
"curves",
|
|
1117
1118
|
"points"
|
|
1118
1119
|
]);
|
|
@@ -1121,6 +1122,7 @@ function readRule(value, path) {
|
|
|
1121
1122
|
min: readRuleAttribute(value.min, `${path}.min`),
|
|
1122
1123
|
max: readRuleAttribute(value.max, `${path}.max`),
|
|
1123
1124
|
samples: readRuleAttribute(value.samples, `${path}.samples`),
|
|
1125
|
+
...value.samplesAlias !== void 0 ? { samplesAlias: readRuleAttribute(value.samplesAlias, `${path}.samplesAlias`) } : {},
|
|
1124
1126
|
curves: readBoundedCount(value.curves, `${path}.curves`, 16),
|
|
1125
1127
|
points: readBoundedCount(value.points, `${path}.points`, MAX_LOCAL_PLOT_POINTS)
|
|
1126
1128
|
};
|
|
@@ -1837,6 +1839,14 @@ function localComponentRequirement(definition) {
|
|
|
1837
1839
|
function isLocalComponentId(value) {
|
|
1838
1840
|
return typeof value === "string" && value.length > 0 && value.length <= 160 && ID.test(value);
|
|
1839
1841
|
}
|
|
1842
|
+
// src/presets/identity.ts
|
|
1843
|
+
/**
|
|
1844
|
+
* Shared identity of the built-in default preset. Keeping the identity in one
|
|
1845
|
+
* plain-data module lets the minimal compiler validate preset references
|
|
1846
|
+
* without importing the preset implementation or its component table.
|
|
1847
|
+
*/
|
|
1848
|
+
var DEFAULT_PRESET_ID$1 = "reactive-md/default";
|
|
1849
|
+
var DEFAULT_PRESET_VERSION$1 = LOCAL_SDK_VERSION;
|
|
1840
1850
|
// src/sdk/compat-profile.ts
|
|
1841
1851
|
/**
|
|
1842
1852
|
* The only released SDK line that emitted `reactive-md-config/v1` is 0.7.0.
|
|
@@ -2696,14 +2706,6 @@ function readComponents(value, defaults) {
|
|
|
2696
2706
|
validateDependencies(components, defaults);
|
|
2697
2707
|
return Object.freeze(components);
|
|
2698
2708
|
}
|
|
2699
|
-
// src/presets/identity.ts
|
|
2700
|
-
/**
|
|
2701
|
-
* Shared identity of the built-in default preset. Keeping the identity in one
|
|
2702
|
-
* plain-data module lets the minimal compiler validate preset references
|
|
2703
|
-
* without importing the preset implementation or its component table.
|
|
2704
|
-
*/
|
|
2705
|
-
var DEFAULT_PRESET_ID$1 = "reactive-md/default";
|
|
2706
|
-
var DEFAULT_PRESET_VERSION$1 = LOCAL_SDK_VERSION;
|
|
2707
2709
|
// src/presets/default-authoring.ts
|
|
2708
2710
|
var DEFAULT_AUTHORING_GROUPS = Object.freeze([
|
|
2709
2711
|
{
|
|
@@ -3742,8 +3744,8 @@ var DEFAULT_COMPONENT_AUTHORING = Object.freeze({
|
|
|
3742
3744
|
zh: "提示框"
|
|
3743
3745
|
},
|
|
3744
3746
|
description: {
|
|
3745
|
-
en: "Highlight info, success or
|
|
3746
|
-
zh: "
|
|
3747
|
+
en: "Highlight info, success, warning or error messages with different tones.",
|
|
3748
|
+
zh: "用不同语气突出普通、成功、警告或错误信息。"
|
|
3747
3749
|
},
|
|
3748
3750
|
category: "hint",
|
|
3749
3751
|
keywords: {
|
|
@@ -3751,12 +3753,14 @@ var DEFAULT_COMPONENT_AUTHORING = Object.freeze({
|
|
|
3751
3753
|
"alert",
|
|
3752
3754
|
"notice",
|
|
3753
3755
|
"warning",
|
|
3756
|
+
"error",
|
|
3754
3757
|
"info",
|
|
3755
3758
|
"message"
|
|
3756
3759
|
],
|
|
3757
3760
|
zh: [
|
|
3758
3761
|
"提示",
|
|
3759
3762
|
"警告",
|
|
3763
|
+
"错误",
|
|
3760
3764
|
"通知",
|
|
3761
3765
|
"信息",
|
|
3762
3766
|
"消息"
|
|
@@ -4686,7 +4690,8 @@ var alertDef = definition("alert", "container", {
|
|
|
4686
4690
|
tone: props.choice([
|
|
4687
4691
|
"info",
|
|
4688
4692
|
"success",
|
|
4689
|
-
"warning"
|
|
4693
|
+
"warning",
|
|
4694
|
+
"error"
|
|
4690
4695
|
], {
|
|
4691
4696
|
dynamic: true,
|
|
4692
4697
|
default: "info"
|
|
@@ -4918,6 +4923,12 @@ var plotDef = definition("plot", "container", {
|
|
|
4918
4923
|
static: true,
|
|
4919
4924
|
default: 200
|
|
4920
4925
|
}),
|
|
4926
|
+
points: props.number({
|
|
4927
|
+
integer: true,
|
|
4928
|
+
min: 2,
|
|
4929
|
+
max: 2e3,
|
|
4930
|
+
static: true
|
|
4931
|
+
}),
|
|
4921
4932
|
"x-label": props.text({ default: "x" }),
|
|
4922
4933
|
"y-label": props.text({ default: "y" })
|
|
4923
4934
|
},
|
|
@@ -4935,6 +4946,7 @@ var plotDef = definition("plot", "container", {
|
|
|
4935
4946
|
min: "min",
|
|
4936
4947
|
max: "max",
|
|
4937
4948
|
samples: "samples",
|
|
4949
|
+
samplesAlias: "points",
|
|
4938
4950
|
curves: 16,
|
|
4939
4951
|
points: MAX_LOCAL_PLOT_POINTS
|
|
4940
4952
|
}, { kind: "inline-math-reads" })
|
|
@@ -5105,20 +5117,19 @@ var defaultPreset = defineLocalPreset({
|
|
|
5105
5117
|
version: DEFAULT_PRESET_VERSION$1,
|
|
5106
5118
|
components: Object.freeze(DEFAULT_SEMANTIC_COMPONENTS.map(withAuthoring))
|
|
5107
5119
|
});
|
|
5108
|
-
// src/local/
|
|
5120
|
+
// src/local/source/source-context.ts
|
|
5109
5121
|
/**
|
|
5110
|
-
*
|
|
5111
|
-
*
|
|
5112
|
-
*
|
|
5113
|
-
*
|
|
5114
|
-
* code. `theme.ts` re-exports it for the existing public surface.
|
|
5122
|
+
* Prefix of at most `end` UTF-16 code units that never ends in the middle of a
|
|
5123
|
+
* surrogate pair. Budgets for diagnostics and display text are counted in
|
|
5124
|
+
* code units, but the truncated text must remain well-formed Unicode, so a
|
|
5125
|
+
* trailing high surrogate is dropped instead of being left unpaired.
|
|
5115
5126
|
*/
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
return
|
|
5127
|
+
function localCodeUnitPrefix(value, end) {
|
|
5128
|
+
const prefix = value.slice(0, Math.max(0, end));
|
|
5129
|
+
const last = prefix.charCodeAt(prefix.length - 1);
|
|
5130
|
+
return last >= 55296 && last <= 56319 ? prefix.slice(0, -1) : prefix;
|
|
5120
5131
|
}
|
|
5121
|
-
// src/
|
|
5132
|
+
// src/themes/document-theme.ts
|
|
5122
5133
|
/**
|
|
5123
5134
|
* Versioned theme contract. A host registers CSS for a theme name and declares
|
|
5124
5135
|
* that contract here; the document only carries a name, never CSS or a URL.
|
|
@@ -5129,6 +5140,30 @@ Object.freeze({
|
|
|
5129
5140
|
protocol: LOCAL_THEME_PROTOCOL,
|
|
5130
5141
|
colorSchemes: Object.freeze(["light", "dark"])
|
|
5131
5142
|
});
|
|
5143
|
+
/**
|
|
5144
|
+
* Theme name grammar shared by document parsing and host manifests.
|
|
5145
|
+
*
|
|
5146
|
+
* This module is deliberately dependency-free so the compiler kernel can
|
|
5147
|
+
* validate `<theme name="...">` without loading theme definitions, CSS or host
|
|
5148
|
+
* code. `theme.ts` re-exports it for the existing public surface.
|
|
5149
|
+
*/
|
|
5150
|
+
var THEME_NAME = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/;
|
|
5151
|
+
/** Bounded, URL-free theme identifier used by documents and host manifests. */
|
|
5152
|
+
function isLocalThemeName(value) {
|
|
5153
|
+
return typeof value === "string" && value.length > 0 && value.length <= 64 && THEME_NAME.test(value);
|
|
5154
|
+
}
|
|
5155
|
+
// src/themes/contract.ts
|
|
5156
|
+
/** Earlier layers supply the baseline; later layers apply deliberate overrides. */
|
|
5157
|
+
var LOCAL_STYLE_LAYERS = Object.freeze([
|
|
5158
|
+
"rmd.reset",
|
|
5159
|
+
"rmd.defaults",
|
|
5160
|
+
"rmd.components",
|
|
5161
|
+
"rmd.themes",
|
|
5162
|
+
"rmd.overrides"
|
|
5163
|
+
]);
|
|
5164
|
+
var LOCAL_THEME_STYLE_LAYER = "rmd.themes";
|
|
5165
|
+
/** Declare before any resource so module evaluation order cannot reorder layers. */
|
|
5166
|
+
var LOCAL_STYLE_LAYER_ORDER = `@layer ${LOCAL_STYLE_LAYERS.join(", ")};`;
|
|
5132
5167
|
// src/sdk/theme.ts
|
|
5133
5168
|
var MAX_THEME_PACKAGE_ID_LENGTH = 128;
|
|
5134
5169
|
var MAX_THEME_RESOURCE_COUNT = 32;
|
|
@@ -6130,7 +6165,10 @@ function rewriteFontFaceBody(body, families, path) {
|
|
|
6130
6165
|
}]);
|
|
6131
6166
|
}
|
|
6132
6167
|
var EMPTY_FONT_FAMILIES = /* @__PURE__ */ new Map();
|
|
6133
|
-
function
|
|
6168
|
+
function layerPrelude(prelude) {
|
|
6169
|
+
return prelude.replace(/\/\*[\s\S]*?\*\//g, " ").trim().replace(/^@layer\b/i, "@layer").replace(/\s+/g, " ").replace(/\s*,\s*/g, ", ");
|
|
6170
|
+
}
|
|
6171
|
+
function transformCss(css, name, families = EMPTY_FONT_FAMILIES, nestedLayer = false) {
|
|
6134
6172
|
let result = "";
|
|
6135
6173
|
let index = 0;
|
|
6136
6174
|
while (index < css.length) {
|
|
@@ -6178,6 +6216,11 @@ function transformCss(css, name, families = EMPTY_FONT_FAMILIES) {
|
|
|
6178
6216
|
const prelude = css.slice(preludeStart, cursor);
|
|
6179
6217
|
const delimiter = css[cursor];
|
|
6180
6218
|
if (delimiter === ";" || delimiter === "}") {
|
|
6219
|
+
const layer = layerPrelude(prelude);
|
|
6220
|
+
if (!nestedLayer && (layer === "@layer rmd.themes" || `${layer};` === LOCAL_STYLE_LAYER_ORDER)) {
|
|
6221
|
+
index = cursor + 1;
|
|
6222
|
+
continue;
|
|
6223
|
+
}
|
|
6181
6224
|
result += prelude + delimiter;
|
|
6182
6225
|
index = cursor + 1;
|
|
6183
6226
|
continue;
|
|
@@ -6190,8 +6233,9 @@ function transformCss(css, name, families = EMPTY_FONT_FAMILIES) {
|
|
|
6190
6233
|
if (atName === "import") throw themeError$1("theme.css", "must not use @import.");
|
|
6191
6234
|
if (atName === "keyframes" || atName.endsWith("-keyframes")) throw themeError$1("theme.css", `@${atName} declares a global name; phase one only supports document-scoped CSS.`);
|
|
6192
6235
|
if (atName === "font-face") result += `${head} {${rewriteFontFaceBody(body, families, "theme.css")}}`;
|
|
6236
|
+
else if (atName === "layer" && !nestedLayer && layerPrelude(head) === "@layer rmd.themes") result += transformCss(body, name, families, true).trim();
|
|
6193
6237
|
else {
|
|
6194
|
-
const inner = CONDITIONAL_AT_RULES.has(atName) ? transformCss(body, name, families) : body;
|
|
6238
|
+
const inner = CONDITIONAL_AT_RULES.has(atName) ? transformCss(body, name, families, nestedLayer || atName === "layer") : body;
|
|
6195
6239
|
result += `${head} {${inner}}`;
|
|
6196
6240
|
}
|
|
6197
6241
|
} else result += `${scopeSelectorList(head, name)} {${rewriteDeclarationBody(body, families)}}`;
|
|
@@ -6201,7 +6245,7 @@ function transformCss(css, name, families = EMPTY_FONT_FAMILIES) {
|
|
|
6201
6245
|
}
|
|
6202
6246
|
/** Scope every rule in `css` to the document root that selects `name`. */
|
|
6203
6247
|
function scopeCss(css, name, families = EMPTY_FONT_FAMILIES) {
|
|
6204
|
-
return transformCss(css, name, families)
|
|
6248
|
+
return `${LOCAL_STYLE_LAYER_ORDER}\n@layer ${LOCAL_THEME_STYLE_LAYER} {\n${transformCss(css, name, families).trim()}\n}`;
|
|
6205
6249
|
}
|
|
6206
6250
|
function readStyleResources(value, path) {
|
|
6207
6251
|
if (!Array.isArray(value)) throw themeError$1(path, "must be an array of { id, css } resources.");
|
|
@@ -6235,6 +6279,14 @@ function readStyleResources(value, path) {
|
|
|
6235
6279
|
totalLength
|
|
6236
6280
|
};
|
|
6237
6281
|
}
|
|
6282
|
+
function assertScopedStyleBudgets(resources) {
|
|
6283
|
+
let total = 0;
|
|
6284
|
+
for (const [index, resource] of resources.entries()) {
|
|
6285
|
+
if (resource.css.length > MAX_THEME_RESOURCE_CSS_LENGTH) throw themeError$1(`theme.css[${index}].css`, `scoped CSS must not exceed ${MAX_THEME_RESOURCE_CSS_LENGTH} characters.`);
|
|
6286
|
+
total += resource.css.length;
|
|
6287
|
+
}
|
|
6288
|
+
if (total > MAX_THEME_TOTAL_CSS_LENGTH) throw themeError$1("theme.css", `scoped CSS must not exceed ${MAX_THEME_TOTAL_CSS_LENGTH} characters in total.`);
|
|
6289
|
+
}
|
|
6238
6290
|
function freezePackage(input) {
|
|
6239
6291
|
return Object.freeze({
|
|
6240
6292
|
id: input.id,
|
|
@@ -6261,16 +6313,18 @@ function defineLocalTheme(input) {
|
|
|
6261
6313
|
const colorSchemes = readColorSchemes(record.colorSchemes, "theme.colorSchemes");
|
|
6262
6314
|
const { resources } = readStyleResources(record.css, "theme.css");
|
|
6263
6315
|
const families = buildFontFamilyMap(resources, name, "theme.css");
|
|
6316
|
+
const scoped = resources.map((resource) => Object.freeze({
|
|
6317
|
+
id: resource.id,
|
|
6318
|
+
css: scopeCss(resource.css, name, families)
|
|
6319
|
+
}));
|
|
6320
|
+
assertScopedStyleBudgets(scoped);
|
|
6264
6321
|
return freezePackage({
|
|
6265
6322
|
id,
|
|
6266
6323
|
name,
|
|
6267
6324
|
version,
|
|
6268
6325
|
protocol: LOCAL_THEME_PROTOCOL,
|
|
6269
6326
|
colorSchemes,
|
|
6270
|
-
css:
|
|
6271
|
-
id: resource.id,
|
|
6272
|
-
css: scopeCss(resource.css, name, families)
|
|
6273
|
-
}))
|
|
6327
|
+
css: scoped
|
|
6274
6328
|
});
|
|
6275
6329
|
}
|
|
6276
6330
|
// src/sdk/preset.ts
|
|
@@ -6571,7 +6625,7 @@ function buildDiagnostic(code, message) {
|
|
|
6571
6625
|
};
|
|
6572
6626
|
}
|
|
6573
6627
|
function summary(diagnostics) {
|
|
6574
|
-
return diagnostics.slice(0, 12).map((item) => `[${item.code}] ${item.message.length > 400 ? `${item.message
|
|
6628
|
+
return diagnostics.slice(0, 12).map((item) => `[${item.code}] ${item.message.length > 400 ? `${localCodeUnitPrefix(item.message, 400)}…` : item.message}`).join("\n");
|
|
6575
6629
|
}
|
|
6576
6630
|
/** Thrown by the Node build adapter; carries every preflight/build diagnostic. */
|
|
6577
6631
|
var LocalBuildError = class extends Error {
|
|
@@ -7010,7 +7064,7 @@ async function resolveUrl(value, baseDir, ctx, label) {
|
|
|
7010
7064
|
return null;
|
|
7011
7065
|
}
|
|
7012
7066
|
if (REMOTE_SCHEME.test(value)) {
|
|
7013
|
-
ctx.diagnostics.push(buildDiagnostic("local.build.resource-remote", `${label} references the remote resource "${value.length > 160 ? `${value
|
|
7067
|
+
ctx.diagnostics.push(buildDiagnostic("local.build.resource-remote", `${label} references the remote resource "${value.length > 160 ? `${localCodeUnitPrefix(value, 160)}…` : value}".`));
|
|
7014
7068
|
return null;
|
|
7015
7069
|
}
|
|
7016
7070
|
if (value.includes("\\")) {
|
|
@@ -7258,7 +7312,7 @@ async function collectLocalBuildResources(input) {
|
|
|
7258
7312
|
return Object.freeze({
|
|
7259
7313
|
resources: Object.freeze(resources),
|
|
7260
7314
|
assets: Object.freeze(assets),
|
|
7261
|
-
css: resources.map((resource) => resource.css).join("\n")
|
|
7315
|
+
css: `${LOCAL_STYLE_LAYER_ORDER}\n${resources.map((resource) => resource.css).join("\n")}`,
|
|
7262
7316
|
diagnostics: Object.freeze(diagnostics)
|
|
7263
7317
|
});
|
|
7264
7318
|
}
|
|
@@ -7587,7 +7641,7 @@ var CONFIG_KEY = /^rmd-[0-9a-f]{16}$/;
|
|
|
7587
7641
|
*/
|
|
7588
7642
|
function createLocalStandaloneEntrySource(configKey) {
|
|
7589
7643
|
if (!CONFIG_KEY.test(configKey)) throw new TypeError("A standalone build entry requires a valid LocalConfig key.");
|
|
7590
|
-
return `import { mountAll } from "reactive-md/standalone";
|
|
7644
|
+
return `import { mountAll } from "reactive-md/standalone/host";
|
|
7591
7645
|
import {
|
|
7592
7646
|
config as __reactiveMDConfig,
|
|
7593
7647
|
reactConfig as __reactiveMDReactConfig,
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { a as e, i as t, s as n } from "./latex-1w7aQgD5.js";
|
|
2
|
+
import { n as r } from "./compiler-core-As_m-MNm.js";
|
|
3
|
+
import { v as i } from "./validation-BEBA_HvS.js";
|
|
4
|
+
import { n as a } from "./display-B-VhqVND.js";
|
|
5
|
+
import { t as o } from "./parser-standard-Yuf3A_VI.js";
|
|
6
|
+
import { i as s } from "./html-CNT4KD-2.js";
|
|
5
7
|
import c from "./reactive-md-default-preset.js";
|
|
6
|
-
import { i as l, r as u, t as d } from "./types-
|
|
8
|
+
import { i as l, r as u, t as d } from "./types-BeNtPqdY.js";
|
|
7
9
|
// src/compiler/standard.ts
|
|
8
10
|
function f(e) {
|
|
9
|
-
let t = i(e, c.components,
|
|
11
|
+
let t = i(e, c.components, o);
|
|
10
12
|
if (t.ok) return t;
|
|
11
13
|
throw new d(t.message, {
|
|
12
14
|
code: t.key,
|
|
@@ -17,17 +19,17 @@ function p(e) {
|
|
|
17
19
|
return e === void 0 ? void 0 : Object.freeze({ ...e });
|
|
18
20
|
}
|
|
19
21
|
function m(i) {
|
|
20
|
-
let
|
|
22
|
+
let o = f(i), c = p(i), d = {
|
|
21
23
|
display: a,
|
|
22
|
-
|
|
24
|
+
htmlFragment: s,
|
|
23
25
|
plotMath: {
|
|
24
|
-
kind:
|
|
26
|
+
kind: n,
|
|
25
27
|
gridSize: e,
|
|
26
28
|
compile: t
|
|
27
29
|
}
|
|
28
30
|
};
|
|
29
31
|
return { compile(e) {
|
|
30
|
-
return l(
|
|
32
|
+
return l(r(e, c, o, d), u);
|
|
31
33
|
} };
|
|
32
34
|
}
|
|
33
35
|
export { d as CompilerConfigurationError, m as createStandardCompiler };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { i as n, n as r, t as i } from "./types-
|
|
1
|
+
import { n as e } from "./compiler-core-As_m-MNm.js";
|
|
2
|
+
import { v as t } from "./validation-BEBA_HvS.js";
|
|
3
|
+
import { i as n, n as r, t as i } from "./types-BeNtPqdY.js";
|
|
4
4
|
// src/compiler/index.ts
|
|
5
5
|
function a(e) {
|
|
6
6
|
let n = t(e);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as r } from "./default-components-
|
|
1
|
+
import { R as e, a as t, t as n } from "./preset-core-CKc5YXSM.js";
|
|
2
|
+
import { t as r } from "./default-components-BwQf0oP-.js";
|
|
3
3
|
// src/presets/packs.ts
|
|
4
4
|
var i = /* @__PURE__ */ new Set([
|
|
5
5
|
"input",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as i } from "./default-components-
|
|
1
|
+
import { R as e, a as t, i as n, t as r } from "./preset-core-CKc5YXSM.js";
|
|
2
|
+
import { t as i } from "./default-components-BwQf0oP-.js";
|
|
3
3
|
// src/presets/default.ts
|
|
4
|
-
var a =
|
|
4
|
+
var a = r({
|
|
5
5
|
protocol: e,
|
|
6
|
-
id:
|
|
6
|
+
id: n,
|
|
7
7
|
version: t,
|
|
8
8
|
components: i
|
|
9
9
|
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
// src/export-assets/index.ts
|
|
3
|
+
/**
|
|
4
|
+
* Build-time manifest for the files hosts embed in exported HTML.
|
|
5
|
+
* Node-only: this subpath reads the installed package and never enters a
|
|
6
|
+
* browser, React or compiler graph.
|
|
7
|
+
*/
|
|
8
|
+
var EXPORT_ASSETS_PROTOCOL = "reactive-md-export-assets/v1";
|
|
9
|
+
var ASSETS = Object.freeze([
|
|
10
|
+
Object.freeze({
|
|
11
|
+
id: "base-css",
|
|
12
|
+
specifier: "reactive-md/styles.css",
|
|
13
|
+
description: "Document stylesheet used by exported HTML and standalone pages."
|
|
14
|
+
}),
|
|
15
|
+
Object.freeze({
|
|
16
|
+
id: "print-css",
|
|
17
|
+
specifier: "reactive-md/print.css",
|
|
18
|
+
description: "Print stylesheet appended after the base stylesheet."
|
|
19
|
+
}),
|
|
20
|
+
Object.freeze({
|
|
21
|
+
id: "notices",
|
|
22
|
+
specifier: "reactive-md/notices",
|
|
23
|
+
description: "Third-party license notices embedded in exported HTML."
|
|
24
|
+
}),
|
|
25
|
+
Object.freeze({
|
|
26
|
+
id: "package-json",
|
|
27
|
+
specifier: "reactive-md/package.json",
|
|
28
|
+
description: "Installed package metadata; exports record its version as the generator version."
|
|
29
|
+
}),
|
|
30
|
+
Object.freeze({
|
|
31
|
+
id: "runtime",
|
|
32
|
+
specifier: "reactive-md/assets/standalone.js",
|
|
33
|
+
description: "Standalone browser runtime embedded in interactive exports."
|
|
34
|
+
})
|
|
35
|
+
]);
|
|
36
|
+
var MANIFEST = Object.freeze({
|
|
37
|
+
protocol: EXPORT_ASSETS_PROTOCOL,
|
|
38
|
+
assets: ASSETS
|
|
39
|
+
});
|
|
40
|
+
/** The frozen manifest. Identical object on every call. */
|
|
41
|
+
function listExportAssets() {
|
|
42
|
+
return MANIFEST;
|
|
43
|
+
}
|
|
44
|
+
function entryFor(id) {
|
|
45
|
+
const entry = ASSETS.find((asset) => asset.id === id);
|
|
46
|
+
if (!entry) throw new TypeError(`Unknown reactive-md export asset: ${String(id)}. Known ids: ${ASSETS.map((asset) => asset.id).join(", ")}.`);
|
|
47
|
+
return entry;
|
|
48
|
+
}
|
|
49
|
+
/** File URL of an asset, resolved through the installed package exports. */
|
|
50
|
+
function resolveExportAsset(id) {
|
|
51
|
+
return new URL(import.meta.resolve(entryFor(id).specifier));
|
|
52
|
+
}
|
|
53
|
+
/** UTF-8 contents of an asset. */
|
|
54
|
+
function readExportAsset(id) {
|
|
55
|
+
return readFileSync(resolveExportAsset(id), "utf8");
|
|
56
|
+
}
|
|
57
|
+
export { EXPORT_ASSETS_PROTOCOL, listExportAssets, readExportAsset, resolveExportAsset };
|
|
@@ -1,111 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import { t as y } from "./component-state-D_cw_EHe.js";
|
|
7
|
-
// src/export/index.ts
|
|
8
|
-
function b(t, n) {
|
|
9
|
-
let r = o(n);
|
|
10
|
-
if (typeof t != "string" || !t.trim() || t.length > 33554432) throw TypeError("A standalone bundle must contain a nonempty script of at most 32 MiB.");
|
|
11
|
-
return Object.freeze({
|
|
12
|
-
script: t,
|
|
13
|
-
seal: d(t, r),
|
|
14
|
-
extensions: Object.freeze({
|
|
15
|
-
protocol: "reactive-md-extensions/v1",
|
|
16
|
-
components: Object.freeze(r.registry.map((t) => Object.freeze({
|
|
17
|
-
id: t.id,
|
|
18
|
-
name: t.name,
|
|
19
|
-
version: t.version,
|
|
20
|
-
digest: e(t)
|
|
21
|
-
})))
|
|
22
|
-
})
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
function x(e) {
|
|
26
|
-
let s = o(e.config), l = e.document.extensions ?? {
|
|
27
|
-
protocol: "reactive-md-extensions/v1",
|
|
28
|
-
components: []
|
|
29
|
-
}, d = h(l, s);
|
|
30
|
-
d.push(...i(e.document, s)), d.push(..._({
|
|
31
|
-
document: e.document,
|
|
32
|
-
installed: a(s),
|
|
33
|
-
externalNames: new Set(s.components.map((e) => e.name))
|
|
34
|
-
}));
|
|
35
|
-
let f = new Set(e.requiredResources ?? []), p = e.target;
|
|
36
|
-
if (![
|
|
37
|
-
"static",
|
|
38
|
-
"ssr",
|
|
39
|
-
"offline"
|
|
40
|
-
].includes(p)) throw TypeError("Unknown export target.");
|
|
41
|
-
for (let e of l.components) {
|
|
42
|
-
let t = s.registry.find((t) => t.id === e.id);
|
|
43
|
-
if (!t) continue;
|
|
44
|
-
for (let e of t.styles ?? []) f.add(e);
|
|
45
|
-
let n = p === "offline" ? [
|
|
46
|
-
"static",
|
|
47
|
-
"interactive",
|
|
48
|
-
"offline"
|
|
49
|
-
] : [p];
|
|
50
|
-
for (let e of n) t.capabilities[e] || d.push(g("local.extension.export-capability", `${t.id}@${t.version} does not support ${e} for ${p} export.`));
|
|
51
|
-
}
|
|
52
|
-
if (p === "offline") {
|
|
53
|
-
if (!e.bundle?.script?.trim()) d.push(g("local.extension.bundle-missing", "Offline output requires an explicitly built standalone bundle."));
|
|
54
|
-
else {
|
|
55
|
-
d.push(...h(e.bundle.extensions, s));
|
|
56
|
-
let i = e.bundle.seal;
|
|
57
|
-
if (i && (i.protocol !== "reactive-md-bundle/v1" || i.sdkVersion !== "0.7.0" || !t(s, i.configKey) || i.scriptDigest !== c(e.bundle.script)) && d.push(g("local.extension.bundle-integrity", "The bundle script or installed configuration differs from its sealed build manifest.")), i?.assembly !== void 0) {
|
|
58
|
-
let e = n(s);
|
|
59
|
-
(JSON.stringify(i.assembly) !== JSON.stringify(e) || i.seal !== void 0 && i.seal !== r(s)) && d.push(g("local.extension.bundle-assembly", "The bundle assembly identity differs from the installed assembly."));
|
|
60
|
-
}
|
|
61
|
-
for (let t of l.components) e.bundle.extensions.components.some((e) => e.id === t.id && e.digest === t.digest) || d.push(g("local.extension.bundle-mismatch", `The standalone bundle does not include ${t.id}@${t.version}.`));
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
let m = e.document.theme ?? "default", y = s.themes.find((e) => e.name === m);
|
|
65
|
-
if (p === "offline" && y && e.bundle?.seal) {
|
|
66
|
-
let t = e.bundle.seal.themes;
|
|
67
|
-
Array.isArray(t) && t.some((e) => e.id === y.id && e.name === y.name && e.version === y.version && e.digest === u(y)) || d.push(g("local.extension.bundle-theme", `Bundle theme ${y.id}@${y.version} differs from the selected export theme. Rebuild the bundle.`));
|
|
68
|
-
}
|
|
69
|
-
m !== "default" && !y && d.push(g("local.extension.theme-missing", `Theme ${m} is not installed for export.`));
|
|
70
|
-
let b = v([...e.resources ?? [], ...y?.css ?? []]);
|
|
71
|
-
d.push(...b.diagnostics);
|
|
72
|
-
let x = new Map(b.resources.map((e) => [e.id, e]));
|
|
73
|
-
for (let e of f) x.has(e) || d.push(g("local.extension.resource-missing", `Required style resource ${e} is missing.`));
|
|
74
|
-
let S = Object.freeze([...x.values()]);
|
|
75
|
-
return Object.freeze({
|
|
76
|
-
target: p,
|
|
77
|
-
extensions: l,
|
|
78
|
-
resources: S,
|
|
79
|
-
css: S.map((e) => e.css).join("\n"),
|
|
80
|
-
diagnostics: Object.freeze(d),
|
|
81
|
-
ok: d.length === 0
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
function S(e) {
|
|
85
|
-
if (e.document.source !== e.source) throw TypeError("The compiled document does not belong to this source.");
|
|
86
|
-
let t = s(e.state);
|
|
87
|
-
if (!t.ok) throw TypeError(t.diagnostics.map((e) => `[${e.code}] ${e.message}`).join("\n"));
|
|
88
|
-
let n = l(e.document, t.file);
|
|
89
|
-
if (!n.ok) throw TypeError(n.diagnostics.map((e) => `[${e.code}] ${e.message}`).join("\n"));
|
|
90
|
-
let r = o(e.config);
|
|
91
|
-
if (e.compileOptions?.hostComponents !== void 0 || e.compileOptions?.config && o(e.compileOptions.config).key !== r.key) throw TypeError("Conflicting export component configuration.");
|
|
92
|
-
let i = x({
|
|
93
|
-
...e,
|
|
94
|
-
target: e.mode === "static" ? "static" : "offline"
|
|
95
|
-
});
|
|
96
|
-
if (!i.ok) throw TypeError(i.diagnostics.map((e) => `[${e.code}] ${e.message}`).join("\n"));
|
|
97
|
-
if (/data-rmd-extension-error\s*=|local-sdk-unavailable/.test(e.staticMarkup)) throw TypeError("Static output contains an unavailable extension component.");
|
|
98
|
-
return f({
|
|
99
|
-
...e,
|
|
100
|
-
compileOptions: {
|
|
101
|
-
...e.compileOptions,
|
|
102
|
-
config: r
|
|
103
|
-
},
|
|
104
|
-
extensions: i.extensions,
|
|
105
|
-
restoration: p(e.document, r, i.target, i.resources),
|
|
106
|
-
resources: i.resources,
|
|
107
|
-
runtimeScript: e.bundle?.script,
|
|
108
|
-
css: `${e.css}\n${i.css}`
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
export { d as createLocalBundleManifest, x as createLocalExportPlan, p as createLocalRestorationRequirements, S as createLocalShareableHtml, b as defineLocalStandaloneBundle, c as localExportContentDigest, u as localThemeContractDigest, v as readLocalExportResources, y as resolveLocalComponentStateExport, _ as validateLocalComponentContracts, h as validateLocalExtensionRequirements, m as validateLocalRestorationRequirements };
|
|
1
|
+
import { c as e, l as t, o as n, s as r, u as i } from "./shareable-DpbE-59H.js";
|
|
2
|
+
import { i as a, r as o, t as s } from "./resources-D2GDQS0p.js";
|
|
3
|
+
import { t as c } from "./component-state-C52ZFJGl.js";
|
|
4
|
+
import { a as l, i as u, n as d, r as f, t as p } from "./export-BqVmTXm8.js";
|
|
5
|
+
export { n as createLocalBundleManifest, p as createLocalExportPlan, r as createLocalRestorationRequirements, d as createLocalShareableHtml, f as defineLocalStandaloneBundle, e as localExportContentDigest, t as localThemeContractDigest, u as prepareLocalPrintHtml, s as readLocalExportResources, c as resolveLocalComponentStateExport, o as validateLocalComponentContracts, a as validateLocalExtensionRequirements, i as validateLocalRestorationRequirements, l as waitForLocalPrintImages };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { o as e } from "./preset-core-CKc5YXSM.js";
|
|
2
|
+
import { t } from "./plugin-packs-B1XPWcFs.js";
|
|
3
|
+
// src/presets/minimal.ts
|
|
4
|
+
var n = t(e, [
|
|
5
|
+
"input",
|
|
6
|
+
"textarea",
|
|
7
|
+
"number",
|
|
8
|
+
"slider",
|
|
9
|
+
"toggle",
|
|
10
|
+
"date",
|
|
11
|
+
"select",
|
|
12
|
+
"option",
|
|
13
|
+
"text",
|
|
14
|
+
"if",
|
|
15
|
+
"alert",
|
|
16
|
+
"badge",
|
|
17
|
+
"panel",
|
|
18
|
+
"card",
|
|
19
|
+
"grid",
|
|
20
|
+
"section",
|
|
21
|
+
"jump",
|
|
22
|
+
"anchor"
|
|
23
|
+
]);
|
|
24
|
+
export { n as default, n as minimalPreset };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { _ as e, a as t, c as n, f as r, h as i, o as a, p as o } from "./controls-CcT6n7k_.js";
|
|
2
|
+
import { a as s, d as c, f as l, i as u, l as d, m as f, n as p, p as m, r as h, u as g, y as _ } from "./layout-C0YlEPGr.js";
|
|
3
|
+
import v from "./reactive-md-minimal-preset.js";
|
|
4
|
+
import { t as y } from "./mount-preset-KxvtKgJb.js";
|
|
5
|
+
// src/components/minimal-preset.ts
|
|
6
|
+
var b = y(v, {
|
|
7
|
+
input: a,
|
|
8
|
+
textarea: o,
|
|
9
|
+
number: n,
|
|
10
|
+
slider: e,
|
|
11
|
+
toggle: i,
|
|
12
|
+
date: t,
|
|
13
|
+
select: r,
|
|
14
|
+
option: l,
|
|
15
|
+
text: _,
|
|
16
|
+
if: g,
|
|
17
|
+
alert: p,
|
|
18
|
+
badge: u,
|
|
19
|
+
panel: m,
|
|
20
|
+
card: s,
|
|
21
|
+
grid: d,
|
|
22
|
+
section: f,
|
|
23
|
+
jump: c,
|
|
24
|
+
anchor: h
|
|
25
|
+
});
|
|
26
|
+
export { b as default, b as minimalReactPresetPackage };
|