reactive-md 0.9.0 → 0.9.2
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 +333 -306
- package/CHANGELOG.md +334 -307
- package/CONTRIBUTING-ch.md +22 -22
- package/CONTRIBUTING.md +22 -22
- package/README-ch.md +431 -431
- package/README-en.md +431 -431
- package/README.md +429 -429
- package/SECURITY-ch.md +83 -83
- package/SECURITY.md +83 -83
- package/THIRD_PARTY_NOTICES.md +111 -1
- package/bin/reactive-md.mjs +39 -39
- package/cli/args.mjs +263 -263
- package/cli/assets.mjs +395 -395
- package/cli/build.mjs +445 -444
- package/cli/check.mjs +444 -444
- package/cli/document.mjs +130 -130
- package/cli/errors.mjs +61 -61
- package/cli/fs-utils.mjs +133 -133
- package/cli/glob.mjs +203 -203
- package/cli/help.mjs +323 -323
- package/cli/init.mjs +1577 -1577
- package/cli/lint.mjs +177 -177
- package/cli/main.mjs +65 -65
- package/cli/migrate.mjs +368 -368
- package/cli/package-loader.mjs +41 -41
- package/cli/package.mjs +211 -211
- package/dist-library/{LocalDocumentView-K7Y-2bRJ.js → LocalDocumentView-BuqgJZEY.js} +11 -11
- package/dist-library/LocalDocumentViewCore-DXE0I0Qc.js +9830 -0
- package/dist-library/LocalReactiveDocumentCore-CWBe4Mm5.js +275 -0
- package/dist-library/{authoring-Co_TiE-P.js → authoring-Ci_KzJ0q.js} +87 -67
- package/dist-library/{compile-LhpTKqCR.js → compile-Dx6Uw3D9.js} +11 -11
- package/dist-library/{compiler-core-DTxY-qYz.js → compiler-core-DDDdvuLy.js} +2618 -1846
- package/dist-library/compiler-dxLPB9Ym.js +86 -0
- package/dist-library/{component-state-BBJ08vML.js → component-state-BRwvTV0d.js} +15 -14
- package/dist-library/component-state-CwKX_SN5.js +763 -0
- package/dist-library/{config-BUo-8O5C.js → config-DXLvctiZ.js} +68 -66
- package/dist-library/config-validation-D3D7Dy2J.js +586 -0
- package/dist-library/{controls-BWiLLtBO.js → controls-DoZyLCrV.js} +2434 -2410
- package/dist-library/{coordinate-BSl6enWV.js → coordinate-B1VFK9fd.js} +108 -107
- package/dist-library/{data-table-DfvytZKQ.js → data-table-8-3F15Jf.js} +69 -66
- package/dist-library/{default-components-BwQf0oP-.js → default-components-s21NevON.js} +29 -28
- package/dist-library/{display-lw3BT1TA.js → display-B_uutKkN.js} +1 -1
- package/dist-library/{config-validation-C5kJYk-J.js → document-theme-C8J6UyNO.js} +241 -731
- package/dist-library/export-CIAIPBov.js +370 -0
- package/dist-library/{gallery-B8kSt1oI.js → gallery-Dv1rOvL0.js} +151 -147
- package/dist-library/html-Cr4CBwAH.js +758 -0
- package/dist-library/identity-BUx0Q_-d.js +40 -0
- package/dist-library/{incremental-D_6vwAAE.js → incremental-9nx92u9c.js} +407 -143
- package/dist-library/layout-BBB2VF0S.js +562 -0
- package/dist-library/{mount-preset-C5s9ebEH.js → mount-preset-DMZ5wd3t.js} +3 -3
- package/dist-library/observability-4KqXhIEU.js +421 -0
- package/dist-library/observability-core-Bcu7vpnl.js +24 -0
- package/dist-library/options-BBp9IcHm.js +121 -0
- package/dist-library/{package-core-D0POW4Gd.js → package-core-K5xesGqy.js} +30 -29
- package/dist-library/{parser-standard-OToYcOBL.js → parser-standard-CBA1-hdG.js} +3332 -3840
- package/dist-library/{plugin-packs-B1XPWcFs.js → plugin-packs-Bh1HhLym.js} +3 -2
- package/dist-library/preset-core-DeZPA8IE.js +1298 -0
- package/dist-library/react-0DCh-Mar.js +7 -0
- package/dist-library/reactive-md-authoring.js +28 -30
- package/dist-library/reactive-md-build.js +99 -61
- package/dist-library/reactive-md-compiler-standard.js +10 -9
- package/dist-library/reactive-md-compiler.js +3 -3
- package/dist-library/reactive-md-default-packs.js +3 -2
- package/dist-library/reactive-md-default-preset.js +3 -2
- package/dist-library/reactive-md-export.js +4 -4
- package/dist-library/reactive-md-minimal-preset.js +2 -2
- package/dist-library/reactive-md-minimal-react-preset.js +3 -3
- package/dist-library/reactive-md-observability.js +4 -0
- package/dist-library/reactive-md-pdf.js +127 -3
- package/dist-library/reactive-md-plugin-chart.js +3 -3
- package/dist-library/reactive-md-plugin-data.js +5 -5
- package/dist-library/reactive-md-plugin-diagram.js +4 -4
- package/dist-library/reactive-md-plugin-forms.js +4 -4
- package/dist-library/reactive-md-plugin-gallery.js +3 -3
- package/dist-library/reactive-md-plugin-navigation.js +3 -3
- package/dist-library/reactive-md-plugin-network.js +119 -116
- package/dist-library/reactive-md-plugin-plot.js +4 -4
- package/dist-library/reactive-md-print.css +304 -304
- package/dist-library/reactive-md-react-minimal.js +4 -4
- package/dist-library/reactive-md-react-server.js +6 -6
- package/dist-library/reactive-md-react-unstyled.js +11 -12
- package/dist-library/reactive-md-react.js +11 -12
- package/dist-library/reactive-md-runtime-browser.js +2 -1
- package/dist-library/reactive-md-runtime.js +4 -3
- package/dist-library/reactive-md-sdk.js +8 -7
- package/dist-library/reactive-md-standalone-configured.js +2 -2
- package/dist-library/reactive-md-standalone-host.js +2 -2
- package/dist-library/reactive-md-testing-browser.js +2 -2
- package/dist-library/reactive-md-testing-react.js +6 -6
- package/dist-library/reactive-md-testing.js +5 -5
- package/dist-library/reactive-md.js +649 -373
- package/dist-library/{registry-05JiqmEp.js → registry-D6OGkOcX.js} +3 -3
- package/dist-library/{registry-core-Bbad9Bm2.js → registry-core-C9xOunaw.js} +1 -1
- package/dist-library/{resources-IeJomeUT.js → resources-B0x_w3s9.js} +71 -46
- package/dist-library/{runtime-B2fxeveq.js → runtime-BDnnimPA.js} +17 -16
- package/dist-library/{runtime-CuOyRe9f.js → runtime-BpQdZmFI.js} +269 -263
- package/dist-library/{schema-C-AeByPp.js → schema-BryM_VRW.js} +14 -14
- package/dist-library/{sdk-core-BJLJaVR5.js → sdk-core-ChslheKs.js} +499 -158
- package/dist-library/{session-core-BGka5D1J.js → session-core-dxQCJBNa.js} +171 -156
- package/dist-library/{shareable-jkGi2g6y.js → shareable-B8xMoGEa.js} +265 -297
- package/dist-library/types/authoring/catalog.d.ts +1 -2
- package/dist-library/types/build/diagnostics.d.ts +1 -1
- package/dist-library/types/components/shared/visual-frame.d.ts +6 -2
- 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-services.d.ts +8 -4
- package/dist-library/types/local/compilation/compiler.d.ts +3 -3
- package/dist-library/types/local/compilation/session/incremental.d.ts +20 -5
- 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/configuration/diagnostic-messages.d.ts +48 -0
- package/dist-library/types/local/configuration/options-core.d.ts +1 -2
- package/dist-library/types/local/configuration/options.d.ts +1 -0
- package/dist-library/types/local/css/author-css.d.ts +66 -0
- package/dist-library/types/local/html/extended-fragment.d.ts +41 -0
- package/dist-library/types/local/html/html.d.ts +39 -3
- package/dist-library/types/local/index.d.ts +7 -1
- package/dist-library/types/local/observability-codes.d.ts +2 -0
- package/dist-library/types/local/observability-core.d.ts +25 -0
- package/dist-library/types/local/observability-messages.d.ts +6 -0
- package/dist-library/types/local/observability.d.ts +43 -0
- package/dist-library/types/local/parsing/author-markdown.d.ts +11 -0
- package/dist-library/types/local/parsing/parse-session.d.ts +2 -2
- package/dist-library/types/local/parsing/parser-convert.d.ts +2 -1
- package/dist-library/types/local/parsing/parser-core.d.ts +8 -1
- package/dist-library/types/local/parsing/parser-internals.d.ts +2 -1
- package/dist-library/types/local/parsing/parser.d.ts +2 -2
- package/dist-library/types/local/rendering/document/ExtendedHtmlFragment.d.ts +14 -0
- package/dist-library/types/local/rendering/document/LocalDocumentViewCore.d.ts +25 -1
- package/dist-library/types/local/rendering/document/LocalReactiveDocumentCore.d.ts +1 -1
- package/dist-library/types/local/rendering/document/use-author-script.d.ts +3 -0
- package/dist-library/types/local/rendering/document/view-render-context.d.ts +11 -1
- package/dist-library/types/local/runtime/author-script-protocol.d.ts +59 -0
- package/dist-library/types/local/transport/worker.d.ts +79 -5
- package/dist-library/types/local/types.d.ts +60 -16
- package/dist-library/types/observability.d.ts +7 -0
- package/dist-library/types/react/component-api.d.ts +10 -1
- package/dist-library/types/react/component-utils.d.ts +9 -1
- package/dist-library/types/react/sdk-core.d.ts +4 -1
- package/dist-library/types/shareable.d.ts +5 -4
- package/dist-library/types/standalone/prepare.d.ts +1 -1
- package/dist-library/types/standalone/session-core.d.ts +3 -2
- package/dist-library/{types-BFC5rzC4.js → types-Ib5kSScP.js} +1 -1
- package/dist-library/types-daDo2c_w.js +3 -0
- package/dist-library/{validation-BlDL2uD9.js → validation-B3RI0xOk.js} +218 -200
- package/dist-library/version-DAxuGOG2.js +147 -0
- package/dist-library/{visual-frame-G8PHoj1e.js → visual-frame-_rcd5HUv.js} +6 -5
- package/dist-library/{visuals-BkYRmYGO.js → visuals-DkDhNdEZ.js} +24191 -24190
- package/dist-standalone/reactive-md-standalone.js +124 -117
- package/docs/README-ch.md +101 -94
- package/docs/README.md +101 -94
- package/docs/compatibility/api-stability-ch.md +25 -0
- package/docs/compatibility/api-stability-en.md +25 -0
- package/docs/compatibility/compatibility-ch.md +146 -129
- package/docs/compatibility/compatibility-en.md +146 -129
- package/docs/compatibility/compatibility-manifest.schema.json +161 -0
- package/docs/compatibility/deprecation-ch.md +21 -0
- package/docs/compatibility/deprecation-en.md +21 -0
- package/docs/compatibility/source-versioning-ch.md +162 -162
- package/docs/compatibility/source-versioning-en.md +162 -162
- package/docs/compatibility/support-matrix-ch.md +108 -0
- package/docs/compatibility/support-matrix-en.md +108 -0
- package/docs/development/component-development-ch.md +66 -66
- package/docs/development/component-development-en.md +66 -66
- package/docs/development/component-development-reference-ch.md +253 -253
- package/docs/development/component-development-reference-en.md +238 -238
- package/docs/development/component-protocol-ch.md +748 -748
- package/docs/development/component-protocol-en.md +750 -750
- package/docs/development/extension-tutorial-ch.md +308 -308
- package/docs/development/extension-tutorial-en.md +308 -308
- package/docs/development/performance-overview-ch.md +422 -422
- package/docs/development/performance-overview-en.md +422 -422
- package/docs/guides/local-guide-ch.md +532 -532
- package/docs/guides/local-guide-en.md +532 -532
- package/docs/integration/author-tools-ch.md +64 -64
- package/docs/integration/author-tools-en.md +64 -64
- package/docs/integration/compiler-ch.md +49 -47
- package/docs/integration/compiler-en.md +36 -34
- package/docs/integration/directory-discovery-en.md +1 -1
- package/docs/integration/editor-ch.md +295 -295
- package/docs/integration/editor-en.md +303 -303
- package/docs/integration/extension-sdk-ch.md +394 -394
- package/docs/integration/extension-sdk-en.md +379 -379
- package/docs/integration/local-integration-ch.md +646 -524
- package/docs/integration/local-integration-en.md +662 -540
- package/docs/integration/shareable-export-ch.md +307 -305
- package/docs/integration/shareable-export-en.md +309 -307
- package/docs/reference/diagnostics-counting-ch.md +104 -104
- package/docs/reference/diagnostics-counting-en.md +104 -104
- package/docs/reference/html-compatibility-ch.md +93 -140
- package/docs/reference/html-compatibility-en.md +95 -140
- package/docs/reference/local-interaction-syntax-ch.md +724 -724
- package/docs/reference/local-interaction-syntax-en.md +722 -722
- package/docs/reference/public-api-ch.md +39 -7
- package/docs/reference/public-api-en.md +39 -7
- package/docs/reference/theme-protocol-ch.md +198 -198
- package/docs/reference/theme-protocol-en.md +217 -217
- package/docs/releases/release-0.4.0-ch.md +91 -91
- package/docs/releases/release-0.4.0-en.md +91 -91
- package/docs/releases/release-0.4.1-ch.md +25 -25
- package/docs/releases/release-0.4.1-en.md +25 -25
- package/docs/releases/release-0.5.0-ch.md +43 -43
- package/docs/releases/release-0.5.0-en.md +43 -43
- package/docs/releases/release-0.5.1-ch.md +41 -41
- package/docs/releases/release-0.5.1-en.md +41 -41
- package/docs/releases/release-0.5.2-ch.md +37 -37
- package/docs/releases/release-0.5.2-en.md +37 -37
- package/docs/releases/release-0.5.3-ch.md +26 -26
- package/docs/releases/release-0.5.3-en.md +26 -26
- package/docs/releases/release-0.6.0-ch.md +59 -59
- package/docs/releases/release-0.6.0-en.md +59 -59
- package/docs/releases/release-0.6.1-ch.md +29 -29
- package/docs/releases/release-0.6.1-en.md +29 -29
- package/docs/releases/release-0.7.0-ch.md +86 -86
- package/docs/releases/release-0.7.0-en.md +86 -86
- package/docs/releases/release-0.9.1-ch.md +29 -0
- package/docs/releases/release-0.9.1-en.md +29 -0
- package/docs/releases/release-0.9.2-ch.md +33 -0
- package/docs/releases/release-0.9.2-en.md +33 -0
- package/examples/component-package/README-ch.md +101 -101
- package/examples/component-package/README.md +133 -133
- package/examples/conformance/README-ch.md +55 -55
- package/examples/conformance/README.md +55 -55
- package/examples/conformance/component-protocol-1.json +482 -482
- package/examples/conformance/component-protocol-1.schema.json +76 -76
- package/examples/conformance/local-draft-1.json +50 -50
- package/examples/conformance/local-draft-2.json +212 -212
- package/examples/game-2048-package/LICENSE +21 -21
- package/examples/game-2048-package/NOTICES.md +11 -11
- package/examples/game-2048-package/README-ch.md +91 -91
- package/examples/game-2048-package/README.md +98 -98
- package/examples/game-2048-package/package.json +35 -35
- package/examples/game-2048-package/sample/document.reactive.md +17 -17
- package/examples/game-2048-package/scripts/build-export.mjs +44 -44
- package/examples/game-2048-package/scripts/build.mjs +130 -130
- package/examples/game-2048-package/scripts/verify.mjs +180 -180
- package/examples/game-2048-package/src/component.css +161 -161
- package/examples/game-2048-package/src/components.tsx +326 -326
- package/examples/game-2048-package/src/game-engine.ts +228 -228
- package/examples/game-2048-package/src/harness.tsx +34 -34
- package/examples/game-2048-package/src/manifest.ts +85 -85
- package/examples/game-2048-package/src/node-entry.ts +30 -30
- package/examples/game-2048-package/src/sample.ts +4 -4
- package/examples/game-2048-package/tsconfig.json +15 -15
- package/examples/integration/README-ch.md +82 -63
- package/examples/integration/README.md +82 -63
- package/examples/integration/core/index.mjs +32 -32
- package/examples/integration/extension-sdk/README-ch.md +24 -24
- package/examples/integration/extension-sdk/README.md +24 -24
- 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/integration/worker/index.html +19 -19
- package/examples/integration/worker/main.js +61 -61
- package/examples/integration/worker/package.json +13 -13
- package/examples/integration/worker/worker.js +3 -3
- package/examples/local/README-ch.md +76 -76
- package/examples/local/README.md +76 -76
- package/examples/local/charts.reactive.md +73 -73
- package/examples/local/recipes/invoice-zh.reactive.md +36 -36
- package/examples/local/recipes/invoice.reactive.md +36 -36
- package/examples/local/recipes/workshop-zh.reactive.md +33 -33
- package/examples/local/recipes/workshop.reactive.md +33 -33
- package/examples/local/showcase/README-ch.md +22 -22
- package/examples/local/showcase/README.md +31 -31
- package/examples/local/showcase/explore.reactive.md +102 -102
- package/examples/local/showcase/flow.reactive.md +86 -86
- package/examples/local/showcase/forms.reactive.md +126 -126
- package/examples/local/showcase/functions.reactive.md +119 -119
- package/examples/local/showcase/layout.reactive.md +100 -100
- package/examples/local/showcase/statistics.reactive.md +108 -108
- package/examples/local/showcase/tasks.reactive.md +89 -89
- package/examples/local/showcase/zh/explore.reactive.md +102 -102
- package/examples/local/showcase/zh/flow.reactive.md +86 -86
- package/examples/local/showcase/zh/forms.reactive.md +126 -126
- package/examples/local/showcase/zh/functions.reactive.md +119 -119
- package/examples/local/showcase/zh/layout.reactive.md +100 -100
- package/examples/local/showcase/zh/statistics.reactive.md +108 -108
- package/examples/local/showcase/zh/tasks.reactive.md +89 -89
- package/examples/minimal-extension/README-ch.md +78 -78
- package/examples/minimal-extension/README.md +78 -78
- package/examples/minimal-extension/index.html +15 -15
- package/examples/minimal-extension/package.json +26 -26
- package/examples/minimal-extension/sample/document.reactive.md +10 -10
- package/examples/minimal-extension/scripts/build.mjs +32 -32
- package/examples/minimal-extension/scripts/export.mjs +72 -72
- package/examples/minimal-extension/scripts/test-node.mjs +75 -75
- package/examples/minimal-extension/src/extension.tsx +90 -90
- package/examples/minimal-extension/src/preview.tsx +12 -12
- package/examples/minimal-extension/src/source.ts +4 -4
- package/examples/minimal-extension/tsconfig.json +14 -14
- package/examples/sci-fi-theme/README-ch.md +133 -133
- package/examples/sci-fi-theme/README.md +148 -148
- package/examples/sci-fi-theme/demo/acceptance.reactive.md +454 -454
- package/examples/sci-fi-theme/demo/demo.css +638 -638
- package/examples/sci-fi-theme/demo/document.reactive.md +206 -206
- package/examples/sci-fi-theme/demo/index.html +13 -13
- package/examples/sci-fi-theme/demo/main.tsx +215 -215
- package/examples/sci-fi-theme/docs/design-system-ch.md +245 -245
- package/examples/sci-fi-theme/docs/design-system.md +474 -474
- package/examples/sci-fi-theme/package.json +28 -28
- package/examples/sci-fi-theme/scripts/screenshot.mjs +98 -98
- package/examples/sci-fi-theme/src/components.css +2370 -2370
- package/examples/sci-fi-theme/src/index.ts +6 -6
- package/examples/sci-fi-theme/src/notch.css +142 -142
- package/examples/sci-fi-theme/src/sci-fi.css +7 -7
- package/examples/sci-fi-theme/src/theme.ts +39 -39
- package/examples/sci-fi-theme/tsconfig.json +20 -20
- package/examples/sci-fi-theme/vite.config.ts +24 -24
- package/examples/tetris-package/LICENSE +21 -21
- package/examples/tetris-package/NOTICES.md +11 -11
- package/examples/tetris-package/README-ch.md +91 -91
- package/examples/tetris-package/README.md +95 -95
- package/examples/tetris-package/package.json +35 -35
- package/examples/tetris-package/sample/document.reactive.md +16 -16
- package/examples/tetris-package/scripts/build-export.mjs +44 -44
- package/examples/tetris-package/scripts/build.mjs +130 -130
- package/examples/tetris-package/scripts/verify.mjs +173 -173
- package/examples/tetris-package/src/component.css +145 -145
- package/examples/tetris-package/src/components.tsx +334 -334
- package/examples/tetris-package/src/harness.tsx +34 -34
- package/examples/tetris-package/src/manifests.ts +93 -93
- package/examples/tetris-package/src/node-entry.ts +16 -16
- package/examples/tetris-package/src/sample.ts +4 -4
- package/examples/tetris-package/src/tetris-engine.ts +325 -325
- package/examples/tetris-package/tsconfig.json +15 -15
- package/package.json +12 -1
- package/dist-library/LocalDocumentViewCore-BLG4hMuO.js +0 -9535
- package/dist-library/LocalReactiveDocumentCore-DVQ6WA9G.js +0 -259
- package/dist-library/compiler-DfGbQhyD.js +0 -62
- package/dist-library/component-state-BoLCGee4.js +0 -801
- package/dist-library/component-utils-BvHL8VGt.js +0 -298
- package/dist-library/export-C7IDW9ul.js +0 -311
- package/dist-library/layout-C22VjZh0.js +0 -542
- package/dist-library/options-CdSKOi7p.js +0 -116
- package/dist-library/preset-core-CKc5YXSM.js +0 -1443
- package/dist-library/react-LY5qsVeP.js +0 -7
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
import { c as e, n as t } from "./version-DAxuGOG2.js";
|
|
2
|
+
import { c as n, m as r, n as i, u as a } from "./document-theme-C8J6UyNO.js";
|
|
3
|
+
import { t as o } from "./types-daDo2c_w.js";
|
|
4
|
+
import { i as s } from "./identity-BUx0Q_-d.js";
|
|
5
|
+
var c = {
|
|
6
|
+
name: "reactive-md",
|
|
7
|
+
version: "0.9.2",
|
|
8
|
+
description: "Author interactive local documents in Markdown, with expression-bound inputs, charts and diagrams.",
|
|
9
|
+
keywords: [
|
|
10
|
+
"markdown",
|
|
11
|
+
"interactive",
|
|
12
|
+
"local-first",
|
|
13
|
+
"reactive",
|
|
14
|
+
"charts",
|
|
15
|
+
"diagrams",
|
|
16
|
+
"react",
|
|
17
|
+
"typescript"
|
|
18
|
+
],
|
|
19
|
+
license: "MIT",
|
|
20
|
+
repository: {
|
|
21
|
+
type: "git",
|
|
22
|
+
url: "git+https://github.com/yao1145/ReactiveMD.git"
|
|
23
|
+
},
|
|
24
|
+
homepage: "https://github.com/yao1145/ReactiveMD#readme",
|
|
25
|
+
bugs: { url: "https://github.com/yao1145/ReactiveMD/issues" },
|
|
26
|
+
engines: { node: ">=22.12.0" },
|
|
27
|
+
type: "module",
|
|
28
|
+
files: [
|
|
29
|
+
"dist-library",
|
|
30
|
+
"dist-standalone",
|
|
31
|
+
"bin",
|
|
32
|
+
"cli",
|
|
33
|
+
"README.md",
|
|
34
|
+
"README-en.md",
|
|
35
|
+
"README-ch.md",
|
|
36
|
+
"CONTRIBUTING.md",
|
|
37
|
+
"CONTRIBUTING-ch.md",
|
|
38
|
+
"CHANGELOG.md",
|
|
39
|
+
"CHANGELOG-ch.md",
|
|
40
|
+
"SECURITY.md",
|
|
41
|
+
"SECURITY-ch.md",
|
|
42
|
+
"THIRD_PARTY_NOTICES.md",
|
|
43
|
+
"docs",
|
|
44
|
+
"examples"
|
|
45
|
+
],
|
|
46
|
+
bin: { "reactive-md": "./bin/reactive-md.mjs" },
|
|
47
|
+
sideEffects: ["**/*.css"],
|
|
48
|
+
scripts: {
|
|
49
|
+
"dev:lib": "vite build --config vite.lib.config.ts --watch",
|
|
50
|
+
build: "npm run typecheck && npm run build:lib",
|
|
51
|
+
"build:lib": "vite build --config vite.lib.config.ts && vite build --config vite.minimal.config.ts && vite build --config vite.build.config.ts && npm run build:standalone && tsc -p tsconfig.lib.json && node scripts/finalize-declarations.mjs",
|
|
52
|
+
"build:standalone": "vite build --config vite.standalone.config.ts",
|
|
53
|
+
typecheck: "tsc --noEmit",
|
|
54
|
+
test: "vitest run --config vitest.config.ts --maxWorkers=4",
|
|
55
|
+
check: "npm run check:styles && npm run build && npm test && npm run test:boundary && npm run test:compiler-entry && npm run check:versions",
|
|
56
|
+
"check:styles": "node scripts/verify-style-boundaries.mjs",
|
|
57
|
+
"test:theme:browser": "node scripts/verify-shared-theme-browser.mjs",
|
|
58
|
+
"test:capabilities:browser": "node scripts/verify-document-capabilities.mjs",
|
|
59
|
+
"test:streaming:browser": "node scripts/verify-streaming-browser.mjs",
|
|
60
|
+
"test:boundary": "node scripts/verify-public-package.mjs",
|
|
61
|
+
"test:compiler-entry": "node scripts/verify-compiler-entry.mjs",
|
|
62
|
+
"test:pdf": "node scripts/verify-pdf.mjs",
|
|
63
|
+
"test:preset-scaffold": "node scripts/verify-preset-scaffold.mjs",
|
|
64
|
+
"check:versions": "node scripts/check-versions.mjs",
|
|
65
|
+
"check:loc": "node scripts/check-loc.mjs",
|
|
66
|
+
"compatibility:verify": "node scripts/verify-compatibility-manifest.mjs --require-workspace",
|
|
67
|
+
"support:verify": "node scripts/verify-support-matrix.mjs",
|
|
68
|
+
"bench:streaming": "node benchmarks/streaming-source.mjs",
|
|
69
|
+
"sci-fi:dev": "vite --config examples/sci-fi-theme/vite.config.ts",
|
|
70
|
+
"sci-fi:build": "vite build --config examples/sci-fi-theme/vite.config.ts",
|
|
71
|
+
"sci-fi:typecheck": "tsc -p examples/sci-fi-theme/tsconfig.json --noEmit",
|
|
72
|
+
"sci-fi:test": "vitest run tests/sci-fi-theme.test.ts --maxWorkers=1",
|
|
73
|
+
"sci-fi:screenshot": "node examples/sci-fi-theme/scripts/screenshot.mjs",
|
|
74
|
+
notices: "node scripts/generate-notices.mjs",
|
|
75
|
+
prepack: "npm run build && npm run notices"
|
|
76
|
+
},
|
|
77
|
+
exports: {
|
|
78
|
+
"./vite": {
|
|
79
|
+
types: "./dist-library/types/vite/index.d.ts",
|
|
80
|
+
import: "./dist-library/reactive-md-vite.js"
|
|
81
|
+
},
|
|
82
|
+
"./vite/client": { types: "./dist-library/types/vite/client.d.ts" },
|
|
83
|
+
"./build": {
|
|
84
|
+
types: "./dist-library/types/build/index.d.ts",
|
|
85
|
+
import: "./dist-library/reactive-md-build.js"
|
|
86
|
+
},
|
|
87
|
+
"./compiler": {
|
|
88
|
+
types: "./dist-library/types/compiler/index.d.ts",
|
|
89
|
+
import: "./dist-library/reactive-md-compiler.js"
|
|
90
|
+
},
|
|
91
|
+
"./compiler/standard": {
|
|
92
|
+
types: "./dist-library/types/compiler/standard.d.ts",
|
|
93
|
+
import: "./dist-library/reactive-md-compiler-standard.js"
|
|
94
|
+
},
|
|
95
|
+
"./testing": {
|
|
96
|
+
types: "./dist-library/types/testing/index.d.ts",
|
|
97
|
+
import: "./dist-library/reactive-md-testing.js"
|
|
98
|
+
},
|
|
99
|
+
"./testing/react": {
|
|
100
|
+
types: "./dist-library/types/testing/react.d.ts",
|
|
101
|
+
import: "./dist-library/reactive-md-testing-react.js"
|
|
102
|
+
},
|
|
103
|
+
"./testing/browser": {
|
|
104
|
+
types: "./dist-library/types/testing/browser.d.ts",
|
|
105
|
+
import: "./dist-library/reactive-md-testing-browser.js"
|
|
106
|
+
},
|
|
107
|
+
"./sdk": {
|
|
108
|
+
types: "./dist-library/types/sdk/index.d.ts",
|
|
109
|
+
import: "./dist-library/reactive-md-sdk.js"
|
|
110
|
+
},
|
|
111
|
+
"./presets/default": {
|
|
112
|
+
types: "./dist-library/types/presets/default.d.ts",
|
|
113
|
+
import: "./dist-library/reactive-md-default-preset.js"
|
|
114
|
+
},
|
|
115
|
+
"./presets/default/packs": {
|
|
116
|
+
types: "./dist-library/types/presets/packs.d.ts",
|
|
117
|
+
import: "./dist-library/reactive-md-default-packs.js"
|
|
118
|
+
},
|
|
119
|
+
"./presets/minimal": {
|
|
120
|
+
types: "./dist-library/types/presets/minimal.d.ts",
|
|
121
|
+
import: "./dist-library/reactive-md-minimal-preset.js"
|
|
122
|
+
},
|
|
123
|
+
"./presets/minimal/react": {
|
|
124
|
+
types: "./dist-library/types/components/minimal-preset.d.ts",
|
|
125
|
+
import: "./dist-library/reactive-md-minimal-react-preset.js"
|
|
126
|
+
},
|
|
127
|
+
"./plugins/forms": {
|
|
128
|
+
types: "./dist-library/types/components/plugins/forms.d.ts",
|
|
129
|
+
import: "./dist-library/reactive-md-plugin-forms.js"
|
|
130
|
+
},
|
|
131
|
+
"./plugins/network": {
|
|
132
|
+
types: "./dist-library/types/components/plugins/network.d.ts",
|
|
133
|
+
import: "./dist-library/reactive-md-plugin-network.js"
|
|
134
|
+
},
|
|
135
|
+
"./plugins/navigation": {
|
|
136
|
+
types: "./dist-library/types/components/plugins/navigation.d.ts",
|
|
137
|
+
import: "./dist-library/reactive-md-plugin-navigation.js"
|
|
138
|
+
},
|
|
139
|
+
"./plugins/data": {
|
|
140
|
+
types: "./dist-library/types/components/plugins/data.d.ts",
|
|
141
|
+
import: "./dist-library/reactive-md-plugin-data.js"
|
|
142
|
+
},
|
|
143
|
+
"./plugins/chart": {
|
|
144
|
+
types: "./dist-library/types/components/plugins/chart.d.ts",
|
|
145
|
+
import: "./dist-library/reactive-md-plugin-chart.js"
|
|
146
|
+
},
|
|
147
|
+
"./plugins/plot": {
|
|
148
|
+
types: "./dist-library/types/components/plugins/plot.d.ts",
|
|
149
|
+
import: "./dist-library/reactive-md-plugin-plot.js"
|
|
150
|
+
},
|
|
151
|
+
"./plugins/diagram": {
|
|
152
|
+
types: "./dist-library/types/components/plugins/diagram.d.ts",
|
|
153
|
+
import: "./dist-library/reactive-md-plugin-diagram.js"
|
|
154
|
+
},
|
|
155
|
+
"./plugins/gallery": {
|
|
156
|
+
types: "./dist-library/types/components/plugins/gallery.d.ts",
|
|
157
|
+
import: "./dist-library/reactive-md-plugin-gallery.js"
|
|
158
|
+
},
|
|
159
|
+
"./pdf": {
|
|
160
|
+
types: "./dist-library/types/pdf.d.ts",
|
|
161
|
+
import: "./dist-library/reactive-md-pdf.js"
|
|
162
|
+
},
|
|
163
|
+
"./export": {
|
|
164
|
+
types: "./dist-library/types/export/index.d.ts",
|
|
165
|
+
import: "./dist-library/reactive-md-export.js"
|
|
166
|
+
},
|
|
167
|
+
"./export-assets": {
|
|
168
|
+
types: "./dist-library/types/export-assets/index.d.ts",
|
|
169
|
+
import: "./dist-library/reactive-md-export-assets.js"
|
|
170
|
+
},
|
|
171
|
+
"./standalone": {
|
|
172
|
+
types: "./dist-library/types/standalone/library.d.ts",
|
|
173
|
+
import: "./dist-library/reactive-md-standalone-host.js"
|
|
174
|
+
},
|
|
175
|
+
"./standalone/host": {
|
|
176
|
+
types: "./dist-library/types/standalone/host.d.ts",
|
|
177
|
+
import: "./dist-library/reactive-md-standalone-configured.js"
|
|
178
|
+
},
|
|
179
|
+
"./react/server": {
|
|
180
|
+
types: "./dist-library/types/react/server.d.ts",
|
|
181
|
+
import: "./dist-library/reactive-md-react-server.js"
|
|
182
|
+
},
|
|
183
|
+
".": {
|
|
184
|
+
types: "./dist-library/types/index.d.ts",
|
|
185
|
+
import: "./dist-library/reactive-md.js"
|
|
186
|
+
},
|
|
187
|
+
"./react": {
|
|
188
|
+
types: "./dist-library/types/react/index.d.ts",
|
|
189
|
+
import: "./dist-library/reactive-md-react.js"
|
|
190
|
+
},
|
|
191
|
+
"./react/runtime": {
|
|
192
|
+
types: "./dist-library/types/react/runtime/index.d.ts",
|
|
193
|
+
import: "./dist-library/reactive-md-react-runtime.js"
|
|
194
|
+
},
|
|
195
|
+
"./react/minimal": {
|
|
196
|
+
types: "./dist-library/types/react/minimal.d.ts",
|
|
197
|
+
import: "./dist-library/reactive-md-react-minimal.js"
|
|
198
|
+
},
|
|
199
|
+
"./runtime": {
|
|
200
|
+
types: "./dist-library/types/runtime-services/index.d.ts",
|
|
201
|
+
import: "./dist-library/reactive-md-runtime.js"
|
|
202
|
+
},
|
|
203
|
+
"./runtime/browser": {
|
|
204
|
+
types: "./dist-library/types/runtime-services/browser/index.d.ts",
|
|
205
|
+
import: "./dist-library/reactive-md-runtime-browser.js"
|
|
206
|
+
},
|
|
207
|
+
"./observability": {
|
|
208
|
+
types: "./dist-library/types/observability.d.ts",
|
|
209
|
+
import: "./dist-library/reactive-md-observability.js"
|
|
210
|
+
},
|
|
211
|
+
"./styles.css": "./dist-library/reactive-md.css",
|
|
212
|
+
"./styles/minimal.css": "./dist-library/reactive-md-minimal.css",
|
|
213
|
+
"./react/unstyled": {
|
|
214
|
+
types: "./dist-library/types/react/index.d.ts",
|
|
215
|
+
import: "./dist-library/reactive-md-react-unstyled.js"
|
|
216
|
+
},
|
|
217
|
+
"./screen.css": "./dist-library/reactive-md.css",
|
|
218
|
+
"./print.css": "./dist-library/reactive-md-print.css",
|
|
219
|
+
"./authoring": {
|
|
220
|
+
types: "./dist-library/types/authoring/index.d.ts",
|
|
221
|
+
import: "./dist-library/reactive-md-authoring.js"
|
|
222
|
+
},
|
|
223
|
+
"./package.json": "./package.json",
|
|
224
|
+
"./notices": "./THIRD_PARTY_NOTICES.md",
|
|
225
|
+
"./assets/standalone.js": "./dist-standalone/reactive-md-standalone.js"
|
|
226
|
+
},
|
|
227
|
+
peerDependencies: {
|
|
228
|
+
react: "^19.0.0",
|
|
229
|
+
"react-dom": "^19.0.0",
|
|
230
|
+
vite: "^8.0.0"
|
|
231
|
+
},
|
|
232
|
+
peerDependenciesMeta: {
|
|
233
|
+
vite: { optional: !0 },
|
|
234
|
+
react: { optional: !0 },
|
|
235
|
+
"react-dom": { optional: !0 }
|
|
236
|
+
},
|
|
237
|
+
devDependencies: {
|
|
238
|
+
"@jitl/quickjs-singlefile-browser-release-sync": "0.32.0",
|
|
239
|
+
"@lezer/common": "1.5.4",
|
|
240
|
+
"@lezer/highlight": "1.2.5",
|
|
241
|
+
"@lezer/markdown": "1.8.1",
|
|
242
|
+
"@playwright/test": "1.64.1",
|
|
243
|
+
"@radix-ui/react-select": "2.4.1",
|
|
244
|
+
"@types/node": "26.6.5",
|
|
245
|
+
"@types/react": "19.3.0",
|
|
246
|
+
"@types/react-dom": "19.3.0",
|
|
247
|
+
"@vitejs/plugin-react": "6.1.2",
|
|
248
|
+
elkjs: "0.12.0",
|
|
249
|
+
"highlight.js": "11.11.2",
|
|
250
|
+
katex: "0.19.1",
|
|
251
|
+
lowlight: "3.3.0",
|
|
252
|
+
"lucide-react": "1.72.0",
|
|
253
|
+
mafs: "0.21.0",
|
|
254
|
+
motion: "14.12.0",
|
|
255
|
+
parse5: "8.0.1",
|
|
256
|
+
postcss: "8.5.31",
|
|
257
|
+
"quickjs-emscripten-core": "0.32.0",
|
|
258
|
+
react: "19.3.1",
|
|
259
|
+
"react-dom": "19.3.1",
|
|
260
|
+
"remark-gfm": "4.0.1",
|
|
261
|
+
"remark-parse": "11.0.0",
|
|
262
|
+
typescript: "7.0.2",
|
|
263
|
+
unified: "11.0.5",
|
|
264
|
+
vite: "8.3.5",
|
|
265
|
+
vitest: "5.0.5"
|
|
266
|
+
}
|
|
267
|
+
}, l = /* @__PURE__ */ new Set(/* @__PURE__ */ "local.build.budget,local.build.config,local.build.config-key,local.build.host,local.build.host-import,local.build.notice-budget,local.build.notice-conflict,local.build.notice-invalid,local.build.resource-budget,local.build.resource-conflict,local.build.resource-cycle,local.build.resource-invalid,local.build.resource-missing,local.build.resource-remote,local.build.resource-traversal,local.build.resource-unsupported,local.build.resource-unresolved,local.build.script,local.build.theme,local.build.vite,local.extension.binding,local.extension.bundle-assembly,local.extension.bundle-integrity,local.extension.bundle-mismatch,local.extension.bundle-missing,local.extension.bundle-theme,local.extension.config,local.extension.config-mismatch,local.extension.contract,local.extension.contract-metadata,local.extension.event,local.extension.export-capability,local.extension.render,local.extension.renderer-missing,local.extension.requirements,local.extension.resource-budget,local.extension.resource-conflict,local.extension.resource-invalid,local.extension.resource-missing,local.extension.restore-assembly,local.extension.restore-capability,local.extension.restore-component-missing,local.extension.restore-config,local.extension.restore-contract,local.extension.restore-metadata,local.extension.restore-resource-digest,local.extension.restore-resource-missing,local.extension.restore-sdk,local.extension.restore-source,local.extension.restore-theme,local.extension.restore-version,local.extension.ssr-render,local.extension.theme-missing,local.extension.write".split(","));
|
|
268
|
+
function u(e) {
|
|
269
|
+
return l.has(e);
|
|
270
|
+
}
|
|
271
|
+
// src/local/observability.ts
|
|
272
|
+
function d(e, t = {}) {
|
|
273
|
+
return {
|
|
274
|
+
code: e,
|
|
275
|
+
phase: e.startsWith("local.worker.") ? "worker" : e.startsWith("local.export.") ? "export" : "resource",
|
|
276
|
+
severity: e === "local.worker.stale-response" ? "warning" : "error",
|
|
277
|
+
recoverable: !0,
|
|
278
|
+
messageKey: e,
|
|
279
|
+
message: r(e, "en", t),
|
|
280
|
+
details: t,
|
|
281
|
+
range: {
|
|
282
|
+
start: 0,
|
|
283
|
+
end: 0
|
|
284
|
+
},
|
|
285
|
+
line: 1,
|
|
286
|
+
column: 1
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
var f = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/, p = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/, m = /^[A-Za-z0-9][A-Za-z0-9._+/@-]{0,63}$/, h = /* @__PURE__ */ new Set([
|
|
290
|
+
"budget",
|
|
291
|
+
"limit",
|
|
292
|
+
"actual",
|
|
293
|
+
"unit",
|
|
294
|
+
"timeoutMs",
|
|
295
|
+
"requestId",
|
|
296
|
+
"sourceRevision",
|
|
297
|
+
"currentRevision",
|
|
298
|
+
"stage",
|
|
299
|
+
"format",
|
|
300
|
+
"mode"
|
|
301
|
+
]), g = /* @__PURE__ */ new Set([
|
|
302
|
+
"bytes",
|
|
303
|
+
"nodes",
|
|
304
|
+
"files",
|
|
305
|
+
"depth",
|
|
306
|
+
"steps",
|
|
307
|
+
"work",
|
|
308
|
+
"codeUnits"
|
|
309
|
+
]), _ = /* @__PURE__ */ new Set([
|
|
310
|
+
"compile",
|
|
311
|
+
"assets",
|
|
312
|
+
"bundle",
|
|
313
|
+
"render",
|
|
314
|
+
"download",
|
|
315
|
+
"pdf"
|
|
316
|
+
]), v = /* @__PURE__ */ new Set([
|
|
317
|
+
"compile-start",
|
|
318
|
+
"compile-end",
|
|
319
|
+
"worker-request",
|
|
320
|
+
"worker-response",
|
|
321
|
+
"worker-timeout",
|
|
322
|
+
"worker-stale-response",
|
|
323
|
+
"worker-cancel",
|
|
324
|
+
"worker-error",
|
|
325
|
+
"export-start",
|
|
326
|
+
"export-end",
|
|
327
|
+
"export-cancel",
|
|
328
|
+
"export-error"
|
|
329
|
+
]);
|
|
330
|
+
function y(e) {
|
|
331
|
+
if (!e) return;
|
|
332
|
+
let t = {};
|
|
333
|
+
for (let [n, r] of Object.entries(e)) if (h.has(n) && ((typeof r == "number" && Number.isSafeInteger(r) && r >= 0 || n === "unit" && typeof r == "string" && g.has(r) || n === "stage" && typeof r == "string" && _.has(r) || n === "budget" && typeof r == "string" && f.test(r) || n === "format" && (r === "html" || r === "pdf") || n === "mode" && (r === "interactive" || r === "static")) && (t[n] = r), Object.keys(t).length >= 12)) break;
|
|
334
|
+
return Object.keys(t).length ? t : void 0;
|
|
335
|
+
}
|
|
336
|
+
function b(e) {
|
|
337
|
+
if (!e || !p.test(e.traceId) || !v.has(e.type) || !Number.isSafeInteger(e.timestamp) || e.timestamp < 0) return;
|
|
338
|
+
let t = typeof e.code == "string" && f.test(e.code) ? e.code : void 0, n = typeof e.stage == "string" && _.has(e.stage) ? e.stage : void 0, r = typeof e.status == "string" && /^(?:ok|failed|stale|timeout|disposed|fallback|retry|cancelled|printed)$/.test(e.status) ? e.status : void 0;
|
|
339
|
+
return {
|
|
340
|
+
type: e.type,
|
|
341
|
+
traceId: e.traceId.slice(0, 96),
|
|
342
|
+
...Number.isSafeInteger(e.requestId) && (e.requestId ?? -1) >= 0 ? { requestId: e.requestId } : {},
|
|
343
|
+
...Number.isSafeInteger(e.sourceRevision) && (e.sourceRevision ?? -1) >= 0 ? { sourceRevision: e.sourceRevision } : {},
|
|
344
|
+
timestamp: e.timestamp,
|
|
345
|
+
...Number.isSafeInteger(e.durationMs) && (e.durationMs ?? -1) >= 0 ? { durationMs: e.durationMs } : {},
|
|
346
|
+
...t ? { code: t } : {},
|
|
347
|
+
...r ? { status: r } : {},
|
|
348
|
+
...n ? { stage: n } : {}
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
function x(r, l = {}) {
|
|
352
|
+
if (typeof r != "string") throw TypeError("Diagnostic reports require a source string.");
|
|
353
|
+
let d = typeof self < "u" && typeof self.importScripts == "function" ? "worker" : typeof window < "u" ? "browser" : "node", f = globalThis.process, h = { runtime: d };
|
|
354
|
+
d === "node" ? (f?.versions?.node && (h.node = f.versions.node.slice(0, 64)), f?.platform && (h.platform = f.platform.slice(0, 64))) : typeof navigator < "u" && (h.userAgent = navigator.userAgent.slice(0, 512), h.platform = navigator.platform.slice(0, 64));
|
|
355
|
+
let g = Object.fromEntries(Object.entries(l.package ?? {}).filter(([e, t]) => [
|
|
356
|
+
"editor",
|
|
357
|
+
"react",
|
|
358
|
+
"vite"
|
|
359
|
+
].includes(e) && typeof t == "string" && m.test(t))), _ = (Array.isArray(l.diagnostics) ? l.diagnostics : []).slice(0, 100).flatMap((e) => {
|
|
360
|
+
if (!e || !(n(e.code) || u(e.code)) || e.severity !== "error" && e.severity !== "warning" || !e.range || !Number.isSafeInteger(e.range.start) || !Number.isSafeInteger(e.range.end)) return [];
|
|
361
|
+
let t = Math.max(0, Math.min(r.length, e.range.start)), i = Math.max(t, Math.min(r.length, e.range.end)), o = Number.isSafeInteger(e.line) && e.line > 0 ? e.line : void 0, s = Number.isSafeInteger(e.column) && e.column > 0 ? e.column : void 0, c = y(e.details), l = e.phase && [
|
|
362
|
+
"source",
|
|
363
|
+
"parse",
|
|
364
|
+
"semantic",
|
|
365
|
+
"runtime",
|
|
366
|
+
"worker",
|
|
367
|
+
"resource",
|
|
368
|
+
"export",
|
|
369
|
+
"host"
|
|
370
|
+
].includes(e.phase) ? e.phase : void 0;
|
|
371
|
+
return [{
|
|
372
|
+
code: e.code,
|
|
373
|
+
severity: e.severity,
|
|
374
|
+
...l ? { phase: l } : {},
|
|
375
|
+
...typeof e.recoverable == "boolean" ? { recoverable: e.recoverable } : {},
|
|
376
|
+
range: {
|
|
377
|
+
start: t,
|
|
378
|
+
end: i
|
|
379
|
+
},
|
|
380
|
+
...o === void 0 ? {} : { line: o },
|
|
381
|
+
...s === void 0 ? {} : { column: s },
|
|
382
|
+
...typeof e.messageKey == "string" && a(e.messageKey) !== void 0 ? { messageKey: e.messageKey } : {},
|
|
383
|
+
...c ? { details: c } : {}
|
|
384
|
+
}];
|
|
385
|
+
}), v = l.traceId && p.test(l.traceId) ? l.traceId : void 0, x = typeof l.sourceRevision == "string" && p.test(l.sourceRevision) ? l.sourceRevision : void 0, S = (Array.isArray(l.events) ? l.events : []).slice(-50).flatMap((e) => {
|
|
386
|
+
let t = b({
|
|
387
|
+
...e,
|
|
388
|
+
type: e?.type?.slice(0, 64),
|
|
389
|
+
traceId: e?.traceId?.slice(0, 96),
|
|
390
|
+
status: e?.status?.slice(0, 32),
|
|
391
|
+
stage: e?.stage?.slice(0, 32),
|
|
392
|
+
code: e?.code?.slice(0, 128)
|
|
393
|
+
});
|
|
394
|
+
return t ? [t] : [];
|
|
395
|
+
}), C = {
|
|
396
|
+
schema: "reactive-md-diagnostic/v1",
|
|
397
|
+
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
398
|
+
...v ? { traceId: v } : {},
|
|
399
|
+
package: {
|
|
400
|
+
engine: c.version,
|
|
401
|
+
sdk: e,
|
|
402
|
+
syntax: o,
|
|
403
|
+
component: t,
|
|
404
|
+
theme: i,
|
|
405
|
+
...g
|
|
406
|
+
},
|
|
407
|
+
environment: h,
|
|
408
|
+
document: {
|
|
409
|
+
sourceBytes: new TextEncoder().encode(r).byteLength,
|
|
410
|
+
sourceDigest: s(r),
|
|
411
|
+
...x ? { sourceRevision: x } : {}
|
|
412
|
+
},
|
|
413
|
+
diagnostics: _,
|
|
414
|
+
...S.length ? { events: S } : {}
|
|
415
|
+
};
|
|
416
|
+
for (; new TextEncoder().encode(JSON.stringify(C)).byteLength > 65536;) if (C.events?.length) C.events = C.events.slice(1);
|
|
417
|
+
else if (C.diagnostics.length) C.diagnostics = C.diagnostics.slice(0, -1);
|
|
418
|
+
else throw RangeError("The diagnostic report exceeded its size limit.");
|
|
419
|
+
return C;
|
|
420
|
+
}
|
|
421
|
+
export { d as n, x as t };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// src/local/observability-core.ts
|
|
2
|
+
function e() {
|
|
3
|
+
return globalThis.crypto?.randomUUID?.() ?? `rmd-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
4
|
+
}
|
|
5
|
+
function t(e, t) {
|
|
6
|
+
try {
|
|
7
|
+
e?.onTrace?.({ ...t });
|
|
8
|
+
} catch {}
|
|
9
|
+
}
|
|
10
|
+
function n(e, t) {
|
|
11
|
+
if (!e?.onDiagnostic) return;
|
|
12
|
+
let n = t.phase ?? (t.code.startsWith("local.budget") ? "resource" : t.code.startsWith("local.parse") || t.code.startsWith("local.tag") || t.code.startsWith("local.html") ? "parse" : t.code.startsWith("local.runtime") ? "runtime" : t.code.startsWith("local.worker") ? "worker" : t.code.startsWith("local.export") ? "export" : t.code.startsWith("host.") ? "host" : "semantic"), r = {
|
|
13
|
+
...t,
|
|
14
|
+
phase: n,
|
|
15
|
+
recoverable: t.recoverable ?? t.severity === "warning",
|
|
16
|
+
...t.range ? { range: { ...t.range } } : {},
|
|
17
|
+
...t.params ? { params: { ...t.params } } : {},
|
|
18
|
+
...t.details ? { details: { ...t.details } } : {}
|
|
19
|
+
};
|
|
20
|
+
try {
|
|
21
|
+
e.onDiagnostic(r);
|
|
22
|
+
} catch {}
|
|
23
|
+
}
|
|
24
|
+
export { n, t as r, e as t };
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { b as e, g as t, y as n } from "./validation-B3RI0xOk.js";
|
|
2
|
+
import { t as r } from "./parser-standard-CBA1-hdG.js";
|
|
3
|
+
import i from "./reactive-md-default-preset.js";
|
|
4
|
+
import { a, o, s } from "./config-DXLvctiZ.js";
|
|
5
|
+
import { n as c } from "./registry-D6OGkOcX.js";
|
|
6
|
+
// src/local/configuration/options.ts
|
|
7
|
+
function l(e) {
|
|
8
|
+
return n(e, {
|
|
9
|
+
defaults: c(),
|
|
10
|
+
preset: {
|
|
11
|
+
id: i.id,
|
|
12
|
+
version: i.version
|
|
13
|
+
},
|
|
14
|
+
defaultConfigKey: a(),
|
|
15
|
+
readConfig: (e) => s(e),
|
|
16
|
+
configKey: (e) => a(e),
|
|
17
|
+
capabilities: r
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function u(e) {
|
|
21
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
22
|
+
}
|
|
23
|
+
var d = 256, f = 4096, p = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new WeakMap(), g = 0;
|
|
24
|
+
function _() {
|
|
25
|
+
return g += 1, g;
|
|
26
|
+
}
|
|
27
|
+
function v(e) {
|
|
28
|
+
if (typeof e == "object" && e || typeof e == "function") {
|
|
29
|
+
let t = e, n = h.get(t);
|
|
30
|
+
return n === void 0 && (n = _(), h.set(t, n)), `unreadable#${n}`;
|
|
31
|
+
}
|
|
32
|
+
return `unreadable:${typeof e}:${String(e)}`;
|
|
33
|
+
}
|
|
34
|
+
function y(e) {
|
|
35
|
+
let t = [], n = 0, r = (e) => {
|
|
36
|
+
if (n += 1, n > f) throw RangeError("signature budget");
|
|
37
|
+
switch (typeof e) {
|
|
38
|
+
case "string": return `s${JSON.stringify(e)}`;
|
|
39
|
+
case "number": return `n${Object.is(e, -0) ? "-0" : String(e)}`;
|
|
40
|
+
case "boolean": return e ? "b1" : "b0";
|
|
41
|
+
case "undefined": return "u";
|
|
42
|
+
case "bigint": return `g${e.toString()}`;
|
|
43
|
+
case "symbol": {
|
|
44
|
+
let t = m.get(e);
|
|
45
|
+
return t === void 0 && (t = _(), m.set(e, t)), `y${t}`;
|
|
46
|
+
}
|
|
47
|
+
case "function": {
|
|
48
|
+
let t = p.get(e);
|
|
49
|
+
return t === void 0 && (t = _(), p.set(e, t)), `f${t}`;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (e === null) return "null";
|
|
53
|
+
let i = e, a = t.indexOf(i);
|
|
54
|
+
if (a >= 0) return `r${a}`;
|
|
55
|
+
t.push(i);
|
|
56
|
+
try {
|
|
57
|
+
if (Array.isArray(i)) {
|
|
58
|
+
let e = Math.min(i.length, 8);
|
|
59
|
+
if (i.length > d) {
|
|
60
|
+
let t = `a#${i.length}[`;
|
|
61
|
+
for (let n = 0; n < e; n += 1) t += `${r(i[n])},`;
|
|
62
|
+
return `${t}]`;
|
|
63
|
+
}
|
|
64
|
+
let t = `a${i.length}[`;
|
|
65
|
+
for (let e = 0; e < i.length; e += 1) t += `${r(i[e])},`;
|
|
66
|
+
return `${t}]`;
|
|
67
|
+
}
|
|
68
|
+
let e = Object.keys(i);
|
|
69
|
+
if (e.length > d) {
|
|
70
|
+
let t = `o#${e.length}{`;
|
|
71
|
+
for (let n of e.slice(0, 8)) t += `${r(n)},`;
|
|
72
|
+
return `${t}}`;
|
|
73
|
+
}
|
|
74
|
+
e.sort();
|
|
75
|
+
let t = "o{";
|
|
76
|
+
for (let n of e) t += `${r(n)}:${r(i[n])},`;
|
|
77
|
+
return `${t}}`;
|
|
78
|
+
} finally {
|
|
79
|
+
t.pop();
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
try {
|
|
83
|
+
return r(e);
|
|
84
|
+
} catch {
|
|
85
|
+
return v(e);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function b(e) {
|
|
89
|
+
return S(e, !0);
|
|
90
|
+
}
|
|
91
|
+
function x(e) {
|
|
92
|
+
return S(e, !1);
|
|
93
|
+
}
|
|
94
|
+
function S(n, r) {
|
|
95
|
+
if (n === void 0 && (n = {}), !u(n)) return "invalid";
|
|
96
|
+
let i = r ? t.map((t) => {
|
|
97
|
+
let r = Object.hasOwn(n, t) ? n[t] : void 0;
|
|
98
|
+
return r === void 0 ? e[t] ? "1" : "0" : r === !0 ? "1" : r === !1 ? "0" : "!";
|
|
99
|
+
}).join("") : "", a = "";
|
|
100
|
+
if (Object.hasOwn(n, "limits")) {
|
|
101
|
+
let e = n.limits;
|
|
102
|
+
if (e === void 0) a = "default";
|
|
103
|
+
else if (!u(e)) a = "invalid";
|
|
104
|
+
else {
|
|
105
|
+
let t = (t) => !Object.hasOwn(e, t) || e[t] === void 0 ? "default" : String(e[t]);
|
|
106
|
+
a = `${t("maxSyntaxNodes")}:${t("maxParseWork")}:${t("maxMarkdownDepth")}`;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
let s = "";
|
|
110
|
+
if (Object.hasOwn(n, "hostComponents") && n.hostComponents !== void 0) {
|
|
111
|
+
let e = n.hostComponents;
|
|
112
|
+
try {
|
|
113
|
+
Array.isArray(e) ? e.length > 0 && (s = e.length > 32 ? `:hosts=oversize:${e.length}` : `:hosts=${y(e)}`) : s = `:hosts=${y(e)}`;
|
|
114
|
+
} catch {
|
|
115
|
+
s = `:hosts=${v(e)}`;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
let c = !Object.hasOwn(n, "markdownBreaks") || n.markdownBreaks === void 0 ? "-" : n.markdownBreaks === !0 ? "1" : n.markdownBreaks === !1 ? "0" : "!", l = !Object.hasOwn(n, "strict") || n.strict === void 0 || n.strict === !0 ? "strict=1" : n.strict === !1 ? "strict=0:recovery=2" : "strict=!", d = "";
|
|
119
|
+
return Object.hasOwn(n, "config") && n.config !== void 0 && (d = `:config=${o(n.config)}`), `${i}:${a}:${c}:${l}${s}${d}`;
|
|
120
|
+
}
|
|
121
|
+
export { x as n, l as r, b as t };
|
|
@@ -1,45 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { n as e, s as t } from "./version-DAxuGOG2.js";
|
|
2
|
+
import { O as n, T as r } from "./preset-core-DeZPA8IE.js";
|
|
3
|
+
import { f as i, i as a, y as o } from "./config-DXLvctiZ.js";
|
|
4
|
+
import { t as s } from "./resources-B0x_w3s9.js";
|
|
5
|
+
import { G as c, n as l } from "./sdk-core-ChslheKs.js";
|
|
5
6
|
// src/react/package-core.ts
|
|
6
7
|
function u(e) {
|
|
7
8
|
let t = s(e);
|
|
8
9
|
if (t.diagnostics.length) throw TypeError(t.diagnostics.map((e) => `[${e.code}] ${e.message}`).join("\n"));
|
|
9
10
|
return t.resources;
|
|
10
11
|
}
|
|
11
|
-
function d(
|
|
12
|
-
if (!
|
|
13
|
-
if (
|
|
14
|
-
let
|
|
15
|
-
if (!Array.isArray(
|
|
16
|
-
let a = new Map(
|
|
17
|
-
for (let
|
|
18
|
-
let
|
|
19
|
-
if (!
|
|
20
|
-
let i = a.get(
|
|
21
|
-
if (!i) throw TypeError(`React preset "${
|
|
22
|
-
if (
|
|
23
|
-
if (o.has(
|
|
24
|
-
o.add(
|
|
12
|
+
function d(e) {
|
|
13
|
+
if (!e || typeof e != "object" || Array.isArray(e)) throw TypeError("defineReactPreset requires a preset package object.");
|
|
14
|
+
if (e.protocol !== "reactive-md-react-preset/v1") throw TypeError(`React preset protocol must be "${t}".`);
|
|
15
|
+
let r = i(e.preset);
|
|
16
|
+
if (!Array.isArray(e.components)) throw TypeError("React preset components must be an array.");
|
|
17
|
+
let a = new Map(r.components.map((e) => [e.id, e])), o = /* @__PURE__ */ new Set(), s = [];
|
|
18
|
+
for (let t of e.components) {
|
|
19
|
+
let e = t?.definition;
|
|
20
|
+
if (!e || typeof e.id != "string") throw TypeError("React preset contains a component without a manifest definition.");
|
|
21
|
+
let i = a.get(e.id);
|
|
22
|
+
if (!i) throw TypeError(`React preset "${r.id}" has no semantic component "${e.id}".`);
|
|
23
|
+
if (n(i) !== n(e) || t.digest !== n(e)) throw TypeError(`React preset component "${e.id}" does not match its semantic manifest.`);
|
|
24
|
+
if (o.has(e.id)) throw TypeError(`React preset "${r.id}" declares "${e.id}" more than once.`);
|
|
25
|
+
o.add(e.id), s.push(t);
|
|
25
26
|
}
|
|
26
|
-
let c =
|
|
27
|
-
if (c.length > 0) throw TypeError(`React preset "${
|
|
28
|
-
let l =
|
|
27
|
+
let c = r.components.filter((e) => !o.has(e.id)).map((e) => e.id);
|
|
28
|
+
if (c.length > 0) throw TypeError(`React preset "${r.id}" is missing implementations for: ${c.join(", ")}.`);
|
|
29
|
+
let l = e.resources === void 0 ? Object.freeze([]) : u(e.resources);
|
|
29
30
|
return Object.freeze({
|
|
30
|
-
protocol:
|
|
31
|
-
preset:
|
|
31
|
+
protocol: t,
|
|
32
|
+
preset: r,
|
|
32
33
|
components: Object.freeze(s),
|
|
33
34
|
resources: l,
|
|
34
|
-
...
|
|
35
|
+
...e.notices === void 0 ? {} : { notices: Object.freeze([...e.notices]) }
|
|
35
36
|
});
|
|
36
37
|
}
|
|
37
|
-
function f(
|
|
38
|
-
let { render:
|
|
38
|
+
function f(t) {
|
|
39
|
+
let { render: n, renderStatic: i, css: a, resources: o = [], ...s } = t, l = s.styles ?? [...new Set(a === void 0 ? o.map((e) => e.id) : [`${s.id}.css`, ...o.map((e) => e.id)])];
|
|
39
40
|
if (a !== void 0 && l.length === 0) throw TypeError("Inline css requires a style resource identity.");
|
|
40
|
-
let d =
|
|
41
|
+
let d = r({
|
|
41
42
|
...s,
|
|
42
|
-
protocol: s.protocol === void 0 ?
|
|
43
|
+
protocol: s.protocol === void 0 ? e : s.protocol,
|
|
43
44
|
form: s.form === void 0 ? "leaf" : s.form,
|
|
44
45
|
props: s.props === void 0 ? {} : s.props,
|
|
45
46
|
...l.length ? { styles: l } : {}
|
|
@@ -51,7 +52,7 @@ function f(e) {
|
|
|
51
52
|
}], ...o]);
|
|
52
53
|
for (let e of d.styles ?? []) if (!f.some((t) => t.id === e)) throw TypeError(`Component ${d.id} is missing style resource ${e}.`);
|
|
53
54
|
let p = c(d, {
|
|
54
|
-
render:
|
|
55
|
+
render: n,
|
|
55
56
|
...i === void 0 ? {} : { renderStatic: i }
|
|
56
57
|
});
|
|
57
58
|
return Object.freeze({
|