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
|
@@ -1,121 +1,123 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a as
|
|
4
|
-
import { n as
|
|
5
|
-
import {
|
|
1
|
+
import { D as e, _ as t, g as n, i as r, o as i, r as a, t as o, v as s, w as c, y as l } from "./version-DAxuGOG2.js";
|
|
2
|
+
import { v as u } from "./document-theme-C8J6UyNO.js";
|
|
3
|
+
import { a as d, n as f, s as p, t as m } from "./compile-Dx6Uw3D9.js";
|
|
4
|
+
import { C as h, S as g, _, a as v, c as y, d as b, h as x, i as S, m as C, n as w, o as T, p as ee, r as E, s as te, t as ne, v as re, w as D, x as O, y as ie } from "./config-validation-D3D7Dy2J.js";
|
|
5
|
+
import { A as ae, N as oe, a as se, i as ce, t as le } from "./preset-core-DeZPA8IE.js";
|
|
6
|
+
import { n as ue } from "./props-sJ8vk0cr.js";
|
|
7
|
+
import { p as de, r as fe, x as pe } from "./registry-core-C9xOunaw.js";
|
|
6
8
|
// node_modules/devlop/lib/default.js
|
|
7
|
-
function
|
|
9
|
+
function me() {}
|
|
8
10
|
// node_modules/mdast-util-to-string/lib/index.js
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
let n = t ||
|
|
12
|
-
return
|
|
11
|
+
var he = {};
|
|
12
|
+
function ge(e, t) {
|
|
13
|
+
let n = t || he;
|
|
14
|
+
return _e(e, typeof n.includeImageAlt != "boolean" || n.includeImageAlt, typeof n.includeHtml != "boolean" || n.includeHtml);
|
|
13
15
|
}
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
+
function _e(e, t, n) {
|
|
17
|
+
if (ye(e)) {
|
|
16
18
|
if ("value" in e) return e.type === "html" && !n ? "" : e.value;
|
|
17
19
|
if (t && "alt" in e && e.alt) return e.alt;
|
|
18
|
-
if ("children" in e) return
|
|
20
|
+
if ("children" in e) return ve(e.children, t, n);
|
|
19
21
|
}
|
|
20
|
-
return Array.isArray(e) ?
|
|
22
|
+
return Array.isArray(e) ? ve(e, t, n) : "";
|
|
21
23
|
}
|
|
22
|
-
function
|
|
24
|
+
function ve(e, t, n) {
|
|
23
25
|
let r = [], i = -1;
|
|
24
|
-
for (; ++i < e.length;) r[i] =
|
|
26
|
+
for (; ++i < e.length;) r[i] = _e(e[i], t, n);
|
|
25
27
|
return r.join("");
|
|
26
28
|
}
|
|
27
|
-
function
|
|
29
|
+
function ye(e) {
|
|
28
30
|
return !!(e && typeof e == "object");
|
|
29
31
|
}
|
|
30
32
|
// node_modules/micromark-util-chunked/index.js
|
|
31
|
-
function
|
|
33
|
+
function k(e, t, n, r) {
|
|
32
34
|
let i = e.length, a = 0, o;
|
|
33
35
|
if (t = t < 0 ? -t > i ? 0 : i + t : t > i ? i : t, n = n > 0 ? n : 0, r.length < 1e4) o = Array.from(r), o.unshift(t, n), e.splice(...o);
|
|
34
36
|
else for (n && e.splice(t, n); a < r.length;) o = r.slice(a, a + 1e4), o.unshift(t, 0), e.splice(...o), a += 1e4, t += 1e4;
|
|
35
37
|
}
|
|
36
|
-
function
|
|
37
|
-
return e.length > 0 ? (
|
|
38
|
+
function be(e, t) {
|
|
39
|
+
return e.length > 0 ? (k(e, e.length, 0, t), e) : t;
|
|
38
40
|
}
|
|
39
41
|
// node_modules/micromark-util-combine-extensions/index.js
|
|
40
|
-
var
|
|
41
|
-
function
|
|
42
|
+
var A = {}.hasOwnProperty;
|
|
43
|
+
function xe(e) {
|
|
42
44
|
let t = {}, n = -1;
|
|
43
|
-
for (; ++n < e.length;)
|
|
45
|
+
for (; ++n < e.length;) Se(t, e[n]);
|
|
44
46
|
return t;
|
|
45
47
|
}
|
|
46
|
-
function
|
|
48
|
+
function Se(e, t) {
|
|
47
49
|
let n;
|
|
48
50
|
for (n in t) {
|
|
49
|
-
let r = (
|
|
51
|
+
let r = (A.call(e, n) ? e[n] : void 0) || (e[n] = {}), i = t[n], a;
|
|
50
52
|
if (i) for (a in i) {
|
|
51
|
-
|
|
53
|
+
A.call(r, a) || (r[a] = []);
|
|
52
54
|
let e = i[a];
|
|
53
|
-
|
|
55
|
+
Ce(r[a], Array.isArray(e) ? e : e ? [e] : []);
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
58
|
}
|
|
57
|
-
function
|
|
59
|
+
function Ce(e, t) {
|
|
58
60
|
let n = -1, r = [];
|
|
59
61
|
for (; ++n < t.length;) (t[n].add === "after" ? e : r).push(t[n]);
|
|
60
|
-
|
|
62
|
+
k(e, 0, 0, r);
|
|
61
63
|
}
|
|
62
64
|
// node_modules/micromark-util-normalize-identifier/index.js
|
|
63
|
-
function
|
|
65
|
+
function we(e) {
|
|
64
66
|
return e.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
|
|
65
67
|
}
|
|
66
68
|
// node_modules/micromark-util-character/index.js
|
|
67
|
-
var
|
|
68
|
-
function
|
|
69
|
+
var Te = I(/[A-Za-z]/), Ee = I(/[\dA-Za-z]/), De = I(/[#-'*+\--9=?A-Z^-~]/);
|
|
70
|
+
function Oe(e) {
|
|
69
71
|
return e !== null && (e < 32 || e === 127);
|
|
70
72
|
}
|
|
71
|
-
var
|
|
72
|
-
function
|
|
73
|
+
var ke = I(/\d/), Ae = I(/[\dA-Fa-f]/), je = I(/[!-/:-@[-`{-~]/);
|
|
74
|
+
function j(e) {
|
|
73
75
|
return e !== null && e < -2;
|
|
74
76
|
}
|
|
75
|
-
function
|
|
77
|
+
function M(e) {
|
|
76
78
|
return e !== null && (e < 0 || e === 32);
|
|
77
79
|
}
|
|
78
|
-
function
|
|
80
|
+
function N(e) {
|
|
79
81
|
return e === -2 || e === -1 || e === 32;
|
|
80
82
|
}
|
|
81
|
-
var
|
|
82
|
-
function
|
|
83
|
+
var P = I(/\p{P}|\p{S}/u), F = I(/\s/);
|
|
84
|
+
function I(e) {
|
|
83
85
|
return t;
|
|
84
86
|
function t(t) {
|
|
85
87
|
return t !== null && t > -1 && e.test(String.fromCharCode(t));
|
|
86
88
|
}
|
|
87
89
|
}
|
|
88
90
|
// node_modules/micromark-factory-space/index.js
|
|
89
|
-
function
|
|
91
|
+
function L(e, t, n, r) {
|
|
90
92
|
let i = r ? r - 1 : Infinity, a = 0;
|
|
91
93
|
return o;
|
|
92
94
|
function o(r) {
|
|
93
|
-
return
|
|
95
|
+
return N(r) ? (e.enter(n), s(r)) : t(r);
|
|
94
96
|
}
|
|
95
97
|
function s(r) {
|
|
96
|
-
return
|
|
98
|
+
return N(r) && a++ < i ? (e.consume(r), s) : (e.exit(n), t(r));
|
|
97
99
|
}
|
|
98
100
|
}
|
|
99
|
-
function
|
|
101
|
+
function Me(e, t, n, r, i, a) {
|
|
100
102
|
let o = 0;
|
|
101
103
|
return s;
|
|
102
104
|
function s(t) {
|
|
103
|
-
return a > 0 &&
|
|
105
|
+
return a > 0 && N(t) ? (e.enter(r), c(t)) : l(t);
|
|
104
106
|
}
|
|
105
107
|
function c(t) {
|
|
106
|
-
return
|
|
108
|
+
return N(t) && o < a ? (e.consume(t), o++, c) : (e.exit(r), l(t));
|
|
107
109
|
}
|
|
108
110
|
function l(e) {
|
|
109
111
|
return o >= i ? t(e) : n(e);
|
|
110
112
|
}
|
|
111
113
|
}
|
|
112
114
|
// node_modules/micromark-util-classify-character/index.js
|
|
113
|
-
function
|
|
114
|
-
if (e === null ||
|
|
115
|
-
if (
|
|
115
|
+
function Ne(e) {
|
|
116
|
+
if (e === null || M(e) || F(e)) return 1;
|
|
117
|
+
if (P(e)) return 2;
|
|
116
118
|
}
|
|
117
119
|
// node_modules/micromark-util-resolve-all/index.js
|
|
118
|
-
function
|
|
120
|
+
function Pe(e, t, n) {
|
|
119
121
|
let r = [], i = -1;
|
|
120
122
|
for (; ++i < e.length;) {
|
|
121
123
|
let a = e[i].resolveAll;
|
|
@@ -124,21 +126,21 @@ function Ne(e, t, n) {
|
|
|
124
126
|
return t;
|
|
125
127
|
}
|
|
126
128
|
// node_modules/micromark-core-commonmark/lib/blank-line.js
|
|
127
|
-
var
|
|
129
|
+
var Fe = {
|
|
128
130
|
partial: !0,
|
|
129
|
-
tokenize:
|
|
131
|
+
tokenize: Ie
|
|
130
132
|
};
|
|
131
|
-
function
|
|
133
|
+
function Ie(e, t, n) {
|
|
132
134
|
return r;
|
|
133
135
|
function r(t) {
|
|
134
|
-
return
|
|
136
|
+
return N(t) ? L(e, i, "linePrefix")(t) : i(t);
|
|
135
137
|
}
|
|
136
138
|
function i(e) {
|
|
137
|
-
return e === null ||
|
|
139
|
+
return e === null || j(e) ? t(e) : n(e);
|
|
138
140
|
}
|
|
139
141
|
}
|
|
140
142
|
// src/local/html/html-table-names.ts
|
|
141
|
-
var
|
|
143
|
+
var Le = /* @__PURE__ */ new Set([
|
|
142
144
|
"table",
|
|
143
145
|
"caption",
|
|
144
146
|
"colgroup",
|
|
@@ -149,7 +151,7 @@ var Ie = /* @__PURE__ */ new Set([
|
|
|
149
151
|
"tr",
|
|
150
152
|
"th",
|
|
151
153
|
"td"
|
|
152
|
-
]),
|
|
154
|
+
]), R = {
|
|
153
155
|
colgroup: /* @__PURE__ */ new Set(["span"]),
|
|
154
156
|
col: /* @__PURE__ */ new Set(["span"]),
|
|
155
157
|
td: /* @__PURE__ */ new Set([
|
|
@@ -167,13 +169,13 @@ var Ie = /* @__PURE__ */ new Set([
|
|
|
167
169
|
"align"
|
|
168
170
|
])
|
|
169
171
|
};
|
|
170
|
-
function
|
|
172
|
+
function z(e, t) {
|
|
171
173
|
let n = t.trim();
|
|
172
174
|
return [
|
|
173
175
|
"colspan",
|
|
174
176
|
"rowspan",
|
|
175
177
|
"span"
|
|
176
|
-
].includes(e) ? /^\d{1,5}$/.test(n) && Number(n) <= (e === "rowspan" ? 65534 : 1e3) && Number(n) >= (e === "rowspan" ? 0 : 1) : e === "align" ?
|
|
178
|
+
].includes(e) ? /^\d{1,5}$/.test(n) && Number(n) <= (e === "rowspan" ? 65534 : 1e3) && Number(n) >= (e === "rowspan" ? 0 : 1) : e === "align" ? D(t) !== null : e !== "scope" || [
|
|
177
179
|
"row",
|
|
178
180
|
"col",
|
|
179
181
|
"rowgroup",
|
|
@@ -181,7 +183,7 @@ function B(e, t) {
|
|
|
181
183
|
].includes(n.toLowerCase());
|
|
182
184
|
}
|
|
183
185
|
// src/local/html/html-policy.ts
|
|
184
|
-
var
|
|
186
|
+
var Re = {
|
|
185
187
|
b: "strong",
|
|
186
188
|
strong: "strong",
|
|
187
189
|
i: "emphasis",
|
|
@@ -192,12 +194,12 @@ var Le = {
|
|
|
192
194
|
mark: "mark",
|
|
193
195
|
sup: "sup",
|
|
194
196
|
sub: "sub"
|
|
195
|
-
},
|
|
197
|
+
}, ze = /* @__PURE__ */ new Set([
|
|
196
198
|
"br",
|
|
197
199
|
"hr",
|
|
198
200
|
"img",
|
|
199
201
|
"col"
|
|
200
|
-
]),
|
|
202
|
+
]), Be = /* @__PURE__ */ new Set([
|
|
201
203
|
"pre",
|
|
202
204
|
"code",
|
|
203
205
|
"script",
|
|
@@ -209,12 +211,12 @@ var Le = {
|
|
|
209
211
|
"noembed",
|
|
210
212
|
"noframes",
|
|
211
213
|
"plaintext"
|
|
212
|
-
]),
|
|
214
|
+
]), Ve = /* @__PURE__ */ new Set([
|
|
213
215
|
"id",
|
|
214
216
|
"title",
|
|
215
217
|
"lang",
|
|
216
218
|
"dir"
|
|
217
|
-
]),
|
|
219
|
+
]), He = {
|
|
218
220
|
a: g,
|
|
219
221
|
img: /* @__PURE__ */ new Set([
|
|
220
222
|
"src",
|
|
@@ -224,9 +226,9 @@ var Le = {
|
|
|
224
226
|
]),
|
|
225
227
|
ol: /* @__PURE__ */ new Set(["start"]),
|
|
226
228
|
details: /* @__PURE__ */ new Set(["open"]),
|
|
227
|
-
...
|
|
229
|
+
...R
|
|
228
230
|
};
|
|
229
|
-
function
|
|
231
|
+
function Ue(e, t, n) {
|
|
230
232
|
let r = "";
|
|
231
233
|
for (let i = t; i < n; i += 1) {
|
|
232
234
|
let t = e[i];
|
|
@@ -236,36 +238,36 @@ function He(e, t, n) {
|
|
|
236
238
|
}
|
|
237
239
|
return -1;
|
|
238
240
|
}
|
|
239
|
-
function
|
|
241
|
+
function We(e, t, n) {
|
|
240
242
|
if (e.startsWith("<!-->", t)) return Math.min(n, t + 5);
|
|
241
243
|
if (e.startsWith("<!--->", t)) return Math.min(n, t + 6);
|
|
242
244
|
let r = e.indexOf("-->", t + 4);
|
|
243
245
|
return r < 0 || r + 3 > n ? n : r + 3;
|
|
244
246
|
}
|
|
245
|
-
function
|
|
247
|
+
function Ge(e) {
|
|
246
248
|
return e.trim().replace(/[\u0000- ]+/g, "");
|
|
247
249
|
}
|
|
248
|
-
function
|
|
249
|
-
let n = /^([a-z][a-z0-9+.-]*):/i.exec(
|
|
250
|
+
function B(e, t) {
|
|
251
|
+
let n = /^([a-z][a-z0-9+.-]*):/i.exec(Ge(e));
|
|
250
252
|
if (!n) return !1;
|
|
251
253
|
let r = n[1].toLowerCase();
|
|
252
254
|
return t === "image" ? r !== "http" && r !== "https" : r !== "http" && r !== "https" && r !== "mailto" && r !== "tel";
|
|
253
255
|
}
|
|
254
|
-
function Ge(e, t) {
|
|
255
|
-
return t === "class" || t === "style" || /^on[a-z]/i.test(t) ? !1 : t === "align" && v.has(e) || Be.has(t) || /^aria-[a-z0-9_.-]+$/.test(t) || /^data-[a-z0-9_.-]+$/.test(t) ? !0 : Ve[e]?.has(t) ?? !1;
|
|
256
|
-
}
|
|
257
256
|
function Ke(e, t) {
|
|
257
|
+
return t === "class" || t === "style" || /^on[a-z]/i.test(t) ? !1 : t === "align" && O.has(e) || Ve.has(t) || /^aria-[a-z0-9_.-]+$/.test(t) || /^data-[a-z0-9_.-]+$/.test(t) ? !0 : He[e]?.has(t) ?? !1;
|
|
258
|
+
}
|
|
259
|
+
function qe(e, t) {
|
|
258
260
|
return !(e === "dir" && ![
|
|
259
261
|
"ltr",
|
|
260
262
|
"rtl",
|
|
261
263
|
"auto"
|
|
262
|
-
].includes(t.trim().toLowerCase()) || e === "id" && t.trim() === "" || (e === "width" || e === "height") && !/^\d{1,6}$/.test(t.trim()) || e === "start" && !/^-?\d{1,9}$/.test(t.trim()) || !
|
|
264
|
+
].includes(t.trim().toLowerCase()) || e === "id" && t.trim() === "" || (e === "width" || e === "height") && !/^\d{1,6}$/.test(t.trim()) || e === "start" && !/^-?\d{1,9}$/.test(t.trim()) || !z(e, t) || e === "href" && B(t, "link") || e === "src" && B(t, "image"));
|
|
263
265
|
}
|
|
264
|
-
function
|
|
265
|
-
return
|
|
266
|
+
function Je(e, t) {
|
|
267
|
+
return O.has(e) ? D(t) : null;
|
|
266
268
|
}
|
|
267
|
-
// src/local/
|
|
268
|
-
var
|
|
269
|
+
// src/local/parsing/parser-capabilities.ts
|
|
270
|
+
var Ye = Object.freeze({}), Xe = Object.freeze([
|
|
269
271
|
"anchor",
|
|
270
272
|
"checkbox",
|
|
271
273
|
"column",
|
|
@@ -283,87 +285,100 @@ var Je = (e) => e.attrs?.bind ?? `@${e.id}`, Ye = "local-draft-3", Xe = Object.f
|
|
|
283
285
|
"toggle",
|
|
284
286
|
"validation"
|
|
285
287
|
]);
|
|
286
|
-
function
|
|
288
|
+
function Ze(e) {
|
|
287
289
|
let t = /* @__PURE__ */ new Set();
|
|
288
|
-
for (let n of
|
|
290
|
+
for (let n of Xe) e(n) || t.add(n);
|
|
289
291
|
return t;
|
|
290
292
|
}
|
|
291
293
|
// src/sdk/compiler-config.ts
|
|
292
|
-
var
|
|
293
|
-
id:
|
|
294
|
-
version:
|
|
295
|
-
}),
|
|
296
|
-
function
|
|
294
|
+
var V = Object.freeze({
|
|
295
|
+
id: ce,
|
|
296
|
+
version: se
|
|
297
|
+
}), H = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap();
|
|
298
|
+
function W(e, t = V) {
|
|
297
299
|
if (e.length === 0) return;
|
|
298
|
-
let n = t.id ===
|
|
300
|
+
let n = t.id === V.id && t.version === V.version;
|
|
299
301
|
if (n) {
|
|
300
|
-
let t =
|
|
302
|
+
let t = H.get(e);
|
|
301
303
|
if (t) return t;
|
|
302
304
|
}
|
|
303
|
-
let r =
|
|
304
|
-
protocol:
|
|
305
|
+
let r = le({
|
|
306
|
+
protocol: i,
|
|
305
307
|
id: t.id,
|
|
306
308
|
version: t.version,
|
|
307
309
|
components: e
|
|
308
310
|
});
|
|
309
|
-
return n &&
|
|
311
|
+
return n && H.set(e, r), r;
|
|
310
312
|
}
|
|
311
|
-
function
|
|
312
|
-
let a =
|
|
313
|
+
function G(e, t, n, r, i = "reactive-md-config/v1") {
|
|
314
|
+
let a = x(e, { legacyProfiles: t.length > 0 ? n : [] }), o = [...a.legacyKeys, ...r !== void 0 && !a.legacyKeys.some((e) => e.key === r) ? [Object.freeze({
|
|
313
315
|
profile: i,
|
|
314
316
|
key: r
|
|
315
317
|
})] : []];
|
|
316
|
-
return
|
|
318
|
+
return b(e, a, o);
|
|
317
319
|
}
|
|
318
|
-
function
|
|
319
|
-
return
|
|
320
|
+
function Qe(e) {
|
|
321
|
+
return v(e) || S("assembly", "must be an object."), E(e, /* @__PURE__ */ new Set([
|
|
320
322
|
"protocol",
|
|
321
323
|
"presets",
|
|
322
324
|
"components",
|
|
323
325
|
"replacementPolicy",
|
|
324
326
|
"themes"
|
|
325
|
-
]), "assembly"), e.protocol !== "reactive-md-assembly/v1" &&
|
|
327
|
+
]), "assembly"), e.protocol !== "reactive-md-assembly/v1" && S("assembly.protocol", `must be "${o}".`), C(e);
|
|
326
328
|
}
|
|
327
|
-
function
|
|
328
|
-
let
|
|
329
|
-
if (
|
|
330
|
-
let n =
|
|
331
|
-
return
|
|
329
|
+
function $e(e, t = [], n = []) {
|
|
330
|
+
let i = re(n);
|
|
331
|
+
if (v(e) || S("config", "must be an object."), E(e, ne, "config"), e.protocol === "reactive-md-config/v2") {
|
|
332
|
+
let n = Qe(e.assembly), r = G(n, t, i);
|
|
333
|
+
return ae(n) > 16777216 && S("config", `serialized size exceeds the ${w}-byte budget.`), r;
|
|
332
334
|
}
|
|
333
|
-
e.protocol !== "reactive-md-config/v1" &&
|
|
334
|
-
let
|
|
335
|
-
|
|
336
|
-
let
|
|
337
|
-
|
|
338
|
-
let
|
|
339
|
-
|
|
340
|
-
let
|
|
341
|
-
protocol:
|
|
342
|
-
presets: Object.freeze(
|
|
343
|
-
components:
|
|
335
|
+
e.protocol !== "reactive-md-config/v1" && S("config.protocol", `must be "${r}" (or legacy "${a}").`);
|
|
336
|
+
let s = te(e.presets, V, i)[0] ?? V, c = _(s, i);
|
|
337
|
+
c === void 0 && S("presets", `local.config.migration-unsupported: no compatibility profile matches preset "${s.id}" ${s.version}.`);
|
|
338
|
+
let l = c.legacyKeys[0];
|
|
339
|
+
l === void 0 && S("presets", `local.config.migration-unsupported: profile "${c.name}" has no legacy key mapping.`), y(c, t);
|
|
340
|
+
let u = T(e.components, t);
|
|
341
|
+
u.some((e) => e.replaces !== void 0) && S("config", "replaces is not supported by reactive-md-config/v1.");
|
|
342
|
+
let d = W(t, c.preset), f = Object.freeze({
|
|
343
|
+
protocol: o,
|
|
344
|
+
presets: Object.freeze(d ? [d] : []),
|
|
345
|
+
components: u,
|
|
344
346
|
replacementPolicy: "forbid",
|
|
345
347
|
themes: Object.freeze([])
|
|
346
|
-
}),
|
|
347
|
-
return
|
|
348
|
+
}), p = G(f, t, i, t.length > 0 ? ee(c.preset, u) : void 0, l.profile);
|
|
349
|
+
return ae(f) > 16777216 && S("config", `serialized size exceeds the ${w}-byte budget.`), p;
|
|
348
350
|
}
|
|
349
|
-
function
|
|
350
|
-
let t =
|
|
351
|
+
function et(e) {
|
|
352
|
+
let t = U.get(e);
|
|
351
353
|
if (t !== void 0) return t;
|
|
352
|
-
let n =
|
|
353
|
-
protocol:
|
|
354
|
+
let n = W(e), r = Object.freeze({
|
|
355
|
+
protocol: o,
|
|
354
356
|
presets: Object.freeze(n ? [n] : []),
|
|
355
357
|
components: Object.freeze([]),
|
|
356
358
|
replacementPolicy: "forbid",
|
|
357
359
|
themes: Object.freeze([])
|
|
358
|
-
}),
|
|
359
|
-
return
|
|
360
|
+
}), i = x(r).key;
|
|
361
|
+
return U.set(e, i), i;
|
|
362
|
+
}
|
|
363
|
+
// src/local/configuration/capability-policy.ts
|
|
364
|
+
var K = Object.freeze({
|
|
365
|
+
enableCss: !0,
|
|
366
|
+
enableJavaScript: !1,
|
|
367
|
+
enableExtendedHtml: !1
|
|
368
|
+
});
|
|
369
|
+
function tt(e, t) {
|
|
370
|
+
return {
|
|
371
|
+
enableCss: e?.enableCss === !0 && (t?.enableCss ?? K.enableCss) === !0,
|
|
372
|
+
enableJavaScript: e?.enableJavaScript === !0 && t?.enableJavaScript === !0,
|
|
373
|
+
enableExtendedHtml: e?.enableExtendedHtml === !0 && t?.enableExtendedHtml === !0
|
|
374
|
+
};
|
|
360
375
|
}
|
|
361
376
|
// src/local/configuration/options-core.ts
|
|
362
377
|
var nt = [
|
|
363
378
|
"enableCss",
|
|
364
379
|
"enableJavaScript",
|
|
365
380
|
"enableExtendedHtml"
|
|
366
|
-
], rt =
|
|
381
|
+
], rt = V;
|
|
367
382
|
function q(e) {
|
|
368
383
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
369
384
|
}
|
|
@@ -510,7 +525,7 @@ function ft(e, t) {
|
|
|
510
525
|
if (e.length > 32) return Y("accepts at most 32 components.");
|
|
511
526
|
let i = /* @__PURE__ */ new Set();
|
|
512
527
|
for (let e of t) i.add(e.name.toLowerCase());
|
|
513
|
-
for (let e of
|
|
528
|
+
for (let e of ie) i.add(e.name.toLowerCase());
|
|
514
529
|
for (let e of h) i.add(e.toLowerCase());
|
|
515
530
|
i.add("theme");
|
|
516
531
|
for (let t = 0; t < e.length; t += 1) {
|
|
@@ -527,7 +542,7 @@ function ft(e, t) {
|
|
|
527
542
|
if (!l.ok) return l;
|
|
528
543
|
let u = l.binding, d = a.props;
|
|
529
544
|
if (!q(d)) return Y(`${o} "props" must be an object.`);
|
|
530
|
-
let
|
|
545
|
+
let f = {};
|
|
531
546
|
for (let e of Object.keys(d)) {
|
|
532
547
|
if (!at.test(e)) return Y(`${o} property "${e}" must use lowercase kebab-case.`);
|
|
533
548
|
if (u && lt.has(e)) return Y(`${o} property "${e}" is reserved by the host binding.`);
|
|
@@ -568,18 +583,18 @@ function ft(e, t) {
|
|
|
568
583
|
} catch {
|
|
569
584
|
return Y(`${o} property "${e}" "pattern" is not a valid regular expression.`);
|
|
570
585
|
}
|
|
571
|
-
if (!
|
|
586
|
+
if (!oe(n)) return Y(`${o} property "${e}" "pattern" uses unsupported regex syntax; nested quantifiers, quantified alternation, backreferences and lookarounds are rejected.`);
|
|
572
587
|
r.pattern = n;
|
|
573
588
|
}
|
|
574
|
-
|
|
589
|
+
f[e] = r;
|
|
575
590
|
}
|
|
576
|
-
let
|
|
591
|
+
let p = {
|
|
577
592
|
name: s,
|
|
578
593
|
form: c,
|
|
579
|
-
props:
|
|
594
|
+
props: f,
|
|
580
595
|
...u ? { binding: u } : {}
|
|
581
596
|
};
|
|
582
|
-
n.push(
|
|
597
|
+
n.push(p), r.set(s, p);
|
|
583
598
|
}
|
|
584
599
|
return {
|
|
585
600
|
ok: !0,
|
|
@@ -609,7 +624,7 @@ function ht(e) {
|
|
|
609
624
|
for (let i of e.components) {
|
|
610
625
|
let e = {};
|
|
611
626
|
for (let t of Object.keys(i.props)) e[t] = mt(i.props[t]);
|
|
612
|
-
let a =
|
|
627
|
+
let a = ue(i), o = {
|
|
613
628
|
name: i.name,
|
|
614
629
|
form: i.form,
|
|
615
630
|
props: e,
|
|
@@ -628,7 +643,7 @@ function X(e, t) {
|
|
|
628
643
|
for (let t of e) n.set(t.name, t);
|
|
629
644
|
let r = /* @__PURE__ */ new Map();
|
|
630
645
|
for (let e of t.values()) r.set(e.name, e);
|
|
631
|
-
for (let e of
|
|
646
|
+
for (let e of ie) r.has(e.name) || r.set(e.name, pe(e));
|
|
632
647
|
return {
|
|
633
648
|
componentByName: n,
|
|
634
649
|
schemaByName: r
|
|
@@ -636,36 +651,32 @@ function X(e, t) {
|
|
|
636
651
|
}
|
|
637
652
|
function Z(e) {
|
|
638
653
|
let t = /* @__PURE__ */ new Map();
|
|
639
|
-
for (let n of e) t.set(n.name,
|
|
654
|
+
for (let n of e) t.set(n.name, fe(n));
|
|
640
655
|
return t;
|
|
641
656
|
}
|
|
642
|
-
function gt(e,
|
|
643
|
-
let
|
|
657
|
+
function gt(e, r) {
|
|
658
|
+
let i = r.defaults, a = new Set(i.map((e) => e.name));
|
|
644
659
|
if (e !== void 0 && !q(e)) return {
|
|
645
660
|
ok: !1,
|
|
646
661
|
message: "Compile options must be an object.",
|
|
647
662
|
key: "local.options.invalid.object"
|
|
648
663
|
};
|
|
649
|
-
let
|
|
650
|
-
enableCss: !1,
|
|
651
|
-
enableJavaScript: !1,
|
|
652
|
-
enableExtendedHtml: !1
|
|
653
|
-
};
|
|
664
|
+
let o = e ?? {}, c = { ...K };
|
|
654
665
|
for (let e of nt) {
|
|
655
|
-
if (!Object.hasOwn(
|
|
656
|
-
let t =
|
|
666
|
+
if (!Object.hasOwn(o, e)) continue;
|
|
667
|
+
let t = o[e];
|
|
657
668
|
if (t !== void 0) {
|
|
658
669
|
if (typeof t != "boolean") return {
|
|
659
670
|
ok: !1,
|
|
660
671
|
message: `Compile option ${e} must be a boolean.`,
|
|
661
672
|
key: "local.options.invalid.html-flag"
|
|
662
673
|
};
|
|
663
|
-
|
|
674
|
+
c[e] = t;
|
|
664
675
|
}
|
|
665
676
|
}
|
|
666
677
|
let l = !1;
|
|
667
|
-
if (Object.hasOwn(
|
|
668
|
-
let e =
|
|
678
|
+
if (Object.hasOwn(o, "markdownBreaks")) {
|
|
679
|
+
let e = o.markdownBreaks;
|
|
669
680
|
if (e !== void 0) {
|
|
670
681
|
if (typeof e != "boolean") return {
|
|
671
682
|
ok: !1,
|
|
@@ -676,8 +687,8 @@ function gt(e, t) {
|
|
|
676
687
|
}
|
|
677
688
|
}
|
|
678
689
|
let u = !0;
|
|
679
|
-
if (Object.hasOwn(
|
|
680
|
-
let e =
|
|
690
|
+
if (Object.hasOwn(o, "strict")) {
|
|
691
|
+
let e = o.strict;
|
|
681
692
|
if (e !== void 0) {
|
|
682
693
|
if (typeof e != "boolean") return {
|
|
683
694
|
ok: !1,
|
|
@@ -687,7 +698,15 @@ function gt(e, t) {
|
|
|
687
698
|
u = e;
|
|
688
699
|
}
|
|
689
700
|
}
|
|
690
|
-
|
|
701
|
+
if (Object.hasOwn(o, "sourcePhase")) {
|
|
702
|
+
let e = o.sourcePhase;
|
|
703
|
+
if (e !== void 0 && e !== "streaming" && e !== "final") return {
|
|
704
|
+
ok: !1,
|
|
705
|
+
message: "Compile option sourcePhase must be \"streaming\" or \"final\".",
|
|
706
|
+
key: "local.options.invalid.source-phase"
|
|
707
|
+
};
|
|
708
|
+
}
|
|
709
|
+
let d = o.limits, f = s, p = t, m = n;
|
|
691
710
|
if (d !== void 0) {
|
|
692
711
|
if (!q(d)) return {
|
|
693
712
|
ok: !1,
|
|
@@ -710,7 +729,7 @@ function gt(e, t) {
|
|
|
710
729
|
if (!n.ok) return n;
|
|
711
730
|
m = n.value;
|
|
712
731
|
}
|
|
713
|
-
let h = Object.hasOwn(
|
|
732
|
+
let h = Object.hasOwn(o, "config") && o.config !== void 0, g = Object.hasOwn(o, "hostComponents") && o.hostComponents !== void 0;
|
|
714
733
|
if (h && g) return {
|
|
715
734
|
ok: !1,
|
|
716
735
|
message: "Compile option config cannot be combined with hostComponents.",
|
|
@@ -719,7 +738,7 @@ function gt(e, t) {
|
|
|
719
738
|
let _, v, y, b, x, S, C, w, T;
|
|
720
739
|
if (h) {
|
|
721
740
|
try {
|
|
722
|
-
_ =
|
|
741
|
+
_ = r.readConfig(o.config, i);
|
|
723
742
|
} catch (e) {
|
|
724
743
|
let t = e instanceof Error ? e.message : String(e);
|
|
725
744
|
return {
|
|
@@ -731,22 +750,22 @@ function gt(e, t) {
|
|
|
731
750
|
}
|
|
732
751
|
let e = ht(_);
|
|
733
752
|
v = e.hostComponents, y = e.hostByName, b = e.sdkByName, x = _.registry;
|
|
734
|
-
let
|
|
735
|
-
S =
|
|
753
|
+
let t = X(x, Z(x));
|
|
754
|
+
S = t.schemaByName, C = t.componentByName, w = new Set(_.components.map((e) => e.name)), T = /* @__PURE__ */ new Set();
|
|
736
755
|
} else if (g) {
|
|
737
|
-
let e = ft(
|
|
756
|
+
let e = ft(o.hostComponents, i);
|
|
738
757
|
if (!e.ok) return e;
|
|
739
|
-
v = e.hostComponents, y = e.hostByName, b = /* @__PURE__ */ new Map(), x =
|
|
740
|
-
let t = Z(
|
|
741
|
-
for (let [n, r] of e.hostByName) t.set(n,
|
|
758
|
+
v = e.hostComponents, y = e.hostByName, b = /* @__PURE__ */ new Map(), x = i;
|
|
759
|
+
let t = Z(i);
|
|
760
|
+
for (let [n, r] of e.hostByName) t.set(n, pe({
|
|
742
761
|
...r,
|
|
743
762
|
legacyHost: !0
|
|
744
763
|
}));
|
|
745
|
-
let
|
|
746
|
-
S =
|
|
764
|
+
let n = X(i, t);
|
|
765
|
+
S = n.schemaByName, C = n.componentByName, w = new Set(e.hostByName.keys()), T = new Set(e.hostByName.keys());
|
|
747
766
|
} else {
|
|
748
|
-
v = [], y = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), x =
|
|
749
|
-
let e = X(
|
|
767
|
+
v = [], y = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), x = i;
|
|
768
|
+
let e = X(i, Z(i));
|
|
750
769
|
S = e.schemaByName, C = e.componentByName, w = /* @__PURE__ */ new Set(), T = /* @__PURE__ */ new Set();
|
|
751
770
|
}
|
|
752
771
|
return {
|
|
@@ -754,8 +773,7 @@ function gt(e, t) {
|
|
|
754
773
|
maxSyntaxNodes: f,
|
|
755
774
|
maxParseWork: p,
|
|
756
775
|
maxMarkdownDepth: m,
|
|
757
|
-
html:
|
|
758
|
-
htmlActive: o.enableCss || o.enableJavaScript || o.enableExtendedHtml,
|
|
776
|
+
html: c,
|
|
759
777
|
markdownBreaks: l,
|
|
760
778
|
strict: u,
|
|
761
779
|
hostComponents: v,
|
|
@@ -765,13 +783,13 @@ function gt(e, t) {
|
|
|
765
783
|
registry: x,
|
|
766
784
|
componentByName: C,
|
|
767
785
|
schemaByName: S,
|
|
768
|
-
defaultComponentNames:
|
|
769
|
-
unmountedLeafNames: _?.presets.some((e) => e.id === "reactive-md/minimal") ?
|
|
786
|
+
defaultComponentNames: a,
|
|
787
|
+
unmountedLeafNames: _?.presets.some((e) => e.id === "reactive-md/minimal") ? Ze((e) => S.has(e)) : /* @__PURE__ */ new Set(),
|
|
770
788
|
externalComponentNames: w,
|
|
771
789
|
legacyHostNames: T,
|
|
772
|
-
componentConfigKey: _ ?
|
|
773
|
-
capabilities:
|
|
774
|
-
...
|
|
790
|
+
componentConfigKey: _ ? r.configKey(_) : r.defaultConfigKey,
|
|
791
|
+
capabilities: r.capabilities ?? Ye,
|
|
792
|
+
...r.preset ? { preset: r.preset } : {}
|
|
775
793
|
};
|
|
776
794
|
}
|
|
777
795
|
function _t(e, t = [], n) {
|
|
@@ -779,8 +797,8 @@ function _t(e, t = [], n) {
|
|
|
779
797
|
return gt(e, {
|
|
780
798
|
defaults: t,
|
|
781
799
|
...r ? { preset: r } : {},
|
|
782
|
-
defaultConfigKey:
|
|
783
|
-
readConfig:
|
|
800
|
+
defaultConfigKey: et(t),
|
|
801
|
+
readConfig: $e,
|
|
784
802
|
configKey: (e) => e.key,
|
|
785
803
|
...n ? { capabilities: n } : {}
|
|
786
804
|
});
|
|
@@ -796,7 +814,7 @@ function Q(e) {
|
|
|
796
814
|
}
|
|
797
815
|
function yt(e) {
|
|
798
816
|
let t = [];
|
|
799
|
-
for (let n of
|
|
817
|
+
for (let n of de(e)) switch (n.kind) {
|
|
800
818
|
case "value-date":
|
|
801
819
|
t.push(Q({
|
|
802
820
|
kind: "date",
|
|
@@ -865,21 +883,21 @@ function Ct(e, t, n) {
|
|
|
865
883
|
return r;
|
|
866
884
|
}
|
|
867
885
|
Object.freeze({
|
|
868
|
-
arrayLength:
|
|
886
|
+
arrayLength: l,
|
|
869
887
|
dataTableColumns: 20,
|
|
870
888
|
plotCurves: 16,
|
|
871
|
-
plotPoints:
|
|
889
|
+
plotPoints: e
|
|
872
890
|
});
|
|
873
891
|
// src/local/evaluation/computations.ts
|
|
874
892
|
function $(e, t, n) {
|
|
875
|
-
let r = t ?
|
|
893
|
+
let r = t ? f(t, n) : void 0;
|
|
876
894
|
return e.expressionOffset + (r ?? Math.max(0, e.source.indexOf(n)));
|
|
877
895
|
}
|
|
878
896
|
function wt(e, t, n, r = "local.expression") {
|
|
879
|
-
t instanceof
|
|
897
|
+
t instanceof d ? e(`${r}.${t.code || "invalid"}`, `Expression error: ${t.message}`, n + (Number.isFinite(t.offset) ? t.offset : 0)) : e(`${r}.invalid`, `Expression error: ${t instanceof Error ? t.message : String(t)}`, n);
|
|
880
898
|
}
|
|
881
899
|
function Tt(e) {
|
|
882
|
-
return e instanceof
|
|
900
|
+
return e instanceof d ? e : new d("expression-eval", e instanceof Error ? e.message : String(e), 0);
|
|
883
901
|
}
|
|
884
902
|
function Et(e, t) {
|
|
885
903
|
let n = new Set(e), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
@@ -921,7 +939,7 @@ function Ot(e, t, n, r = /* @__PURE__ */ new Set(), i) {
|
|
|
921
939
|
for (let e of c) {
|
|
922
940
|
let t = s.get(e), r;
|
|
923
941
|
try {
|
|
924
|
-
r = i?.expression(t.source) ??
|
|
942
|
+
r = i?.expression(t.source) ?? m(t.source);
|
|
925
943
|
} catch (r) {
|
|
926
944
|
wt(n, r, t.expressionOffset), l.add(e);
|
|
927
945
|
continue;
|
|
@@ -943,27 +961,27 @@ function Ot(e, t, n, r = /* @__PURE__ */ new Set(), i) {
|
|
|
943
961
|
Object.hasOwn(t, c) ? (n("local.computation.const", `Constant "${e}" cannot depend on ${r.has(c) ? "external data" : "control parameter"} "${c}".`, $(i, a.get(e), c)), d.add(e)) : o === "computed" && (n("local.computation.const", `Constant "${e}" cannot depend on computed value "${c}".`, $(i, a.get(e), c)), d.add(e));
|
|
944
962
|
}
|
|
945
963
|
}
|
|
946
|
-
let { order: f, cyclic:
|
|
947
|
-
if (
|
|
948
|
-
let e = new Set(
|
|
964
|
+
let { order: f, cyclic: h } = Et(c, (e) => o.get(e) ?? []);
|
|
965
|
+
if (h.length > 0) {
|
|
966
|
+
let e = new Set(h), t = [], r = /* @__PURE__ */ new Map(), i = h[0];
|
|
949
967
|
for (; !r.has(i);) {
|
|
950
968
|
r.set(i, t.length), t.push(i);
|
|
951
969
|
let n = (o.get(i) ?? []).find((t) => e.has(t));
|
|
952
970
|
if (n === void 0) break;
|
|
953
971
|
i = n;
|
|
954
972
|
}
|
|
955
|
-
let a = r.has(i) ? t.slice(r.get(i)) : [
|
|
973
|
+
let a = r.has(i) ? t.slice(r.get(i)) : [h[0]], c = a.slice(0, 12).join(" → ") + (a.length > 12 ? " → …" : ` → ${a[0]}`);
|
|
956
974
|
for (let e of a.slice(0, 100)) {
|
|
957
975
|
let t = s.get(e);
|
|
958
976
|
n("local.computation.cycle", `Computation "${e}" is part of a dependency cycle: ${c}.`, t.range.start, t.range.end);
|
|
959
977
|
}
|
|
960
|
-
for (let e of
|
|
978
|
+
for (let e of h) l.add(e);
|
|
961
979
|
}
|
|
962
980
|
for (let e of f) if (!l.has(e) && !(s.get(e).kind !== "const" || d.has(e)) && (o.get(e) ?? []).some((e) => u.has(e) ? s.get(e).kind === "const" && d.has(e) : !1)) {
|
|
963
981
|
let t = s.get(e);
|
|
964
982
|
n("local.computation.const", `Constant "${e}" indirectly depends on a value that is not a constant.`, t.expressionOffset), d.add(e);
|
|
965
983
|
}
|
|
966
|
-
let
|
|
984
|
+
let g = {}, _ = { ...t };
|
|
967
985
|
for (let e of f) {
|
|
968
986
|
if (l.has(e)) continue;
|
|
969
987
|
let t = s.get(e);
|
|
@@ -973,18 +991,18 @@ function Ot(e, t, n, r = /* @__PURE__ */ new Set(), i) {
|
|
|
973
991
|
}
|
|
974
992
|
let r = a.get(e);
|
|
975
993
|
try {
|
|
976
|
-
let t = i ? i.infer(r,
|
|
977
|
-
|
|
994
|
+
let t = i ? i.infer(r, _) : r.inferType(_);
|
|
995
|
+
g[e] = t, _[e] = t;
|
|
978
996
|
} catch (r) {
|
|
979
997
|
wt(n, r, t.expressionOffset), l.add(e);
|
|
980
998
|
}
|
|
981
999
|
}
|
|
982
|
-
let
|
|
983
|
-
l.add(e), Object.defineProperty(
|
|
1000
|
+
let v = {}, y = {}, b = /* @__PURE__ */ Error("failed constant read"), x = (e) => {
|
|
1001
|
+
l.add(e), Object.defineProperty(y, e, {
|
|
984
1002
|
enumerable: !0,
|
|
985
1003
|
configurable: !0,
|
|
986
1004
|
get() {
|
|
987
|
-
throw
|
|
1005
|
+
throw b;
|
|
988
1006
|
}
|
|
989
1007
|
});
|
|
990
1008
|
};
|
|
@@ -992,42 +1010,42 @@ function Ot(e, t, n, r = /* @__PURE__ */ new Set(), i) {
|
|
|
992
1010
|
if (l.has(e) || s.get(e).kind !== "const" || d.has(e)) continue;
|
|
993
1011
|
let t = s.get(e), r = a.get(e);
|
|
994
1012
|
try {
|
|
995
|
-
let i = r.evaluate(
|
|
1013
|
+
let i = r.evaluate(y), a = p(i);
|
|
996
1014
|
if (a) {
|
|
997
|
-
n("local.computation.budget", `Constant "${e}": ${a}`, t.expressionOffset),
|
|
1015
|
+
n("local.computation.budget", `Constant "${e}": ${a}`, t.expressionOffset), x(e);
|
|
998
1016
|
continue;
|
|
999
1017
|
}
|
|
1000
|
-
|
|
1018
|
+
v[e] = Array.isArray(i) ? i.slice() : i, y[e] = v[e];
|
|
1001
1019
|
} catch (r) {
|
|
1002
|
-
if (r ===
|
|
1003
|
-
|
|
1020
|
+
if (r === b) {
|
|
1021
|
+
x(e);
|
|
1004
1022
|
continue;
|
|
1005
1023
|
}
|
|
1006
1024
|
let i = Tt(r);
|
|
1007
|
-
n("local.computation.expression", `Constant "${e}" cannot be evaluated: ${i.message}`, t.expressionOffset + (Number.isFinite(i.offset) ? i.offset : 0)),
|
|
1025
|
+
n("local.computation.expression", `Constant "${e}" cannot be evaluated: ${i.message}`, t.expressionOffset + (Number.isFinite(i.offset) ? i.offset : 0)), x(e);
|
|
1008
1026
|
}
|
|
1009
1027
|
}
|
|
1010
|
-
let
|
|
1028
|
+
let S = {};
|
|
1011
1029
|
for (let e of c) {
|
|
1012
1030
|
let t = s.get(e);
|
|
1013
|
-
if (l.has(e) ||
|
|
1031
|
+
if (l.has(e) || g[e] === void 0) continue;
|
|
1014
1032
|
let n = {
|
|
1015
1033
|
name: e,
|
|
1016
1034
|
kind: t.kind,
|
|
1017
1035
|
source: t.source,
|
|
1018
1036
|
dependencies: [...o.get(e) ?? []],
|
|
1019
|
-
type:
|
|
1037
|
+
type: g[e],
|
|
1020
1038
|
nodeId: t.nodeId,
|
|
1021
1039
|
range: { ...t.range }
|
|
1022
1040
|
};
|
|
1023
|
-
t.kind === "const" && Object.hasOwn(
|
|
1041
|
+
t.kind === "const" && Object.hasOwn(v, e) && (n.value = v[e]), S[e] = n;
|
|
1024
1042
|
}
|
|
1025
1043
|
return {
|
|
1026
|
-
computations:
|
|
1027
|
-
kinds:
|
|
1044
|
+
computations: S,
|
|
1045
|
+
kinds: g,
|
|
1028
1046
|
order: f.filter((e) => !l.has(e)),
|
|
1029
1047
|
expressions: a,
|
|
1030
|
-
constValues:
|
|
1048
|
+
constValues: v
|
|
1031
1049
|
};
|
|
1032
1050
|
}
|
|
1033
1051
|
function kt(e, t, n, r, i, a = /* @__PURE__ */ new Map()) {
|
|
@@ -1046,8 +1064,8 @@ function kt(e, t, n, r, i, a = /* @__PURE__ */ new Map()) {
|
|
|
1046
1064
|
if (!t || t.kind === "const") continue;
|
|
1047
1065
|
let i = n.get(r);
|
|
1048
1066
|
if (i) try {
|
|
1049
|
-
let e = i.evaluate(c), t =
|
|
1050
|
-
if (t) throw new
|
|
1067
|
+
let e = i.evaluate(c), t = p(e);
|
|
1068
|
+
if (t) throw new d("expression-budget", t, 0);
|
|
1051
1069
|
o[r] = e, c[r] = e;
|
|
1052
1070
|
} catch (e) {
|
|
1053
1071
|
let t = Tt(e);
|
|
@@ -1068,7 +1086,7 @@ function kt(e, t, n, r, i, a = /* @__PURE__ */ new Map()) {
|
|
|
1068
1086
|
// src/local/evaluation/validation.ts
|
|
1069
1087
|
var At = "local.validation.failed", jt = "local.validation.expression", Mt = "Validation failed.";
|
|
1070
1088
|
function Nt(e) {
|
|
1071
|
-
return e.length > 2e3 ? `${
|
|
1089
|
+
return e.length > 2e3 ? `${u(e, c - 1)}…` : e;
|
|
1072
1090
|
}
|
|
1073
1091
|
function Pt(e) {
|
|
1074
1092
|
let t = e.trim();
|
|
@@ -1102,4 +1120,4 @@ function Lt(e, t, n, r, i) {
|
|
|
1102
1120
|
column: o - t[c] + 1
|
|
1103
1121
|
};
|
|
1104
1122
|
}
|
|
1105
|
-
export {
|
|
1123
|
+
export { k as $, R as A, De as B, Be as C, Ue as D, We as E, Ne as F, j as G, ke as H, L as I, P as J, M as K, Me as L, z as M, Fe as N, Ke as O, Pe as P, be as Q, Te as R, Re as S, Je as T, Ae as U, Oe as V, je as W, we as X, F as Y, xe as Z, vt as _, It as a, K as b, Lt as c, Ot as d, ge as et, St as f, nt as g, yt as h, Nt as i, Le as j, qe as k, kt as l, Ct as m, At as n, Ft as o, bt as p, N as q, Mt as r, Pt as s, jt as t, me as tt, Dt as u, _t as v, ze as w, tt as x, gt as y, Ee as z };
|