reactive-md 0.9.3 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG-ch.md +34 -0
- package/CHANGELOG.md +34 -0
- package/README-ch.md +7 -7
- package/README-en.md +7 -7
- package/README.md +7 -7
- package/THIRD_PARTY_NOTICES.md +0 -57
- package/cli/help.mjs +6 -4
- package/cli/init.mjs +1 -1
- package/cli/migrate.mjs +1 -1
- package/dist-library/{LocalDocumentView-D6zQkTkt.js → LocalDocumentView-CP2QG86k.js} +46 -44
- package/dist-library/{LocalDocumentViewCore-CmJhemcA.js → LocalDocumentViewCore-Cd6yMEkg.js} +284 -265
- package/dist-library/{LocalReactiveDocumentCore-lAKOGAZ7.js → LocalReactiveDocumentCore-VuYpZqdn.js} +7 -7
- package/dist-library/LocalStaticDocumentView-DfX6bemE.js +147 -0
- package/dist-library/authoring-Bwu_zCWs.js +768 -0
- package/dist-library/choice-values-BItGjPD2.js +58 -0
- package/dist-library/compile-B35rfzKr.js +1742 -0
- package/dist-library/{compile-cache-key-6GgpETz_.js → compile-cache-key-D21X2Obx.js} +5 -5
- package/dist-library/{compiler-DLkKUK4t.js → compiler-DBwLawMZ.js} +4 -4
- package/dist-library/{compiler-core-Niqhp9wV.js → compiler-core-kkDiQ1RK.js} +3146 -2055
- package/dist-library/{component-kernel-IG4wOO0i.js → component-kernel-CsJSabHX.js} +42 -26
- package/dist-library/{component-state-Ht-hOK0W.js → component-state-Da0G8Ajc.js} +1 -1
- package/dist-library/{component-utils-eSj5IdG4.js → component-utils-ZM3jUJNy.js} +80 -79
- package/dist-library/conditional-branches-CIhJXasR.js +17 -0
- package/dist-library/{config-validation-Cpol91_M.js → config-validation-DbmsWAEV.js} +165 -152
- package/dist-library/{controls-B-CLSK8Q.js → controls-DRy5rzzN.js} +271 -228
- package/dist-library/{coordinate-PyLPMIQK.js → coordinate-c54pHfgf.js} +29 -29
- package/dist-library/data-table-CSAkm1eU.js +290 -0
- package/dist-library/data-table-model-DruztQFt.js +391 -0
- package/dist-library/{data-visuals-_Z7QqYTk.js → data-visuals-rZQUeQM0.js} +14 -14
- package/dist-library/{default-components-jugH7Ubr.js → default-components-B-39etG9.js} +233 -71
- package/dist-library/{default-config-DIrRpuQz.js → default-config-CCa8rm2k.js} +236 -216
- package/dist-library/default-options-By16CVw1.js +131 -0
- package/dist-library/{default-registry-BlloaZi7.js → default-registry-DXJy66xj.js} +3 -3
- package/dist-library/{default-schema-Ch-Vznpm.js → default-schema-CeYiEW1K.js} +3 -3
- package/dist-library/display-Bb6hAG5T.js +2065 -0
- package/dist-library/{document-theme-DBAfnk7y.js → document-theme-CJvN-nC1.js} +190 -3
- package/dist-library/{export-heVBqgxA.js → export-BSV4E0jv.js} +105 -106
- package/dist-library/font-aliases-CKYjwn4o.js +4 -0
- package/dist-library/{gallery-Q6VPS2ep.js → gallery-DM2yTVZJ.js} +1 -1
- package/dist-library/{html-CCnvzan1.js → html-CY9mC3Sr.js} +5 -5
- package/dist-library/{incremental-Bzvh8_lB.js → incremental-B-wW4H3F.js} +251 -245
- package/dist-library/{display-y4v9v0Qd.js → katex-4ukd4ZxT.js} +1555 -3618
- package/dist-library/layout-CPQggKxk.js +592 -0
- package/dist-library/{layout-BnfDeUNy.js → layout-CaDWsDof.js} +1 -1
- package/dist-library/{math-view-B0jthpRw.js → math-view-CyGTS6kv.js} +1 -1
- package/dist-library/{mount-preset-C_i37FvY.js → mount-preset-DtrCX4G8.js} +4 -4
- package/dist-library/{numeric-sliders-CkWS0-ja.js → numeric-sliders-BmJ1LCLx.js} +190 -190
- package/dist-library/{observability-CYLuvFfL.js → observability-BVQ16ByQ.js} +5 -4
- package/dist-library/{package-core-9UK5ZdqB.js → package-core-Cu_r_qs7.js} +7 -6
- package/dist-library/{parser-9yNJxGip.js → parser-BHl9Lxbw.js} +2 -2
- package/dist-library/{parser-standard-BPIy4HOu.js → parser-standard-DDAKv_DZ.js} +247 -247
- package/dist-library/{plugin-packs-CZb46nuv.js → plugin-packs-CkI0floL.js} +3 -3
- package/dist-library/{preset-core-BW3NWZJ9.js → preset-core-BKPbH_Nv.js} +377 -306
- package/dist-library/{props-pJRrfDc6.js → props-0iDqxlTk.js} +56 -61
- package/dist-library/{react-BSo0o998.js → react-74jdGBmu.js} +2 -2
- package/dist-library/reactive-md-authoring.js +277 -269
- package/dist-library/reactive-md-build.js +327 -33
- package/dist-library/reactive-md-compiler-session.js +3 -3
- package/dist-library/reactive-md-compiler-standard.js +10 -10
- package/dist-library/reactive-md-compiler.js +3 -3
- package/dist-library/reactive-md-contracts.js +4 -4
- package/dist-library/reactive-md-default-packs.js +4 -3
- package/dist-library/reactive-md-default-preset.js +3 -3
- package/dist-library/reactive-md-export.js +6 -6
- package/dist-library/reactive-md-minimal-preset.js +3 -2
- package/dist-library/reactive-md-minimal-react-preset.js +18 -17
- package/dist-library/reactive-md-minimal.css +1 -1
- package/dist-library/reactive-md-observability.js +2 -2
- package/dist-library/reactive-md-pack-style-manifest.js +8 -0
- package/dist-library/reactive-md-plugin-chart.js +13 -9
- package/dist-library/reactive-md-plugin-data.js +4 -4
- package/dist-library/reactive-md-plugin-diagram.js +3 -3
- package/dist-library/reactive-md-plugin-forms.js +5 -5
- package/dist-library/reactive-md-plugin-gallery.js +3 -3
- package/dist-library/reactive-md-plugin-navigation.js +10 -10
- package/dist-library/reactive-md-plugin-network.js +5 -5
- package/dist-library/reactive-md-plugin-plot.js +4 -4
- package/dist-library/reactive-md-react-component-accordion.js +3 -3
- package/dist-library/reactive-md-react-component-alert.js +3 -3
- package/dist-library/reactive-md-react-component-anchor.js +3 -3
- package/dist-library/reactive-md-react-component-badge.js +3 -3
- package/dist-library/reactive-md-react-component-card.js +3 -3
- package/dist-library/reactive-md-react-component-chart.js +2 -2
- package/dist-library/reactive-md-react-component-checkbox.js +2 -2
- package/dist-library/reactive-md-react-component-checklist.js +2 -2
- package/dist-library/reactive-md-react-component-choices.js +2 -2
- package/dist-library/reactive-md-react-component-column.js +1 -1
- package/dist-library/reactive-md-react-component-coordinate.js +2 -2
- package/dist-library/reactive-md-react-component-counter.js +2 -2
- package/dist-library/reactive-md-react-component-data-table.js +2 -2
- package/dist-library/reactive-md-react-component-date.js +2 -2
- package/dist-library/reactive-md-react-component-diagram.js +2 -2
- package/dist-library/reactive-md-react-component-disclosure.js +3 -3
- package/dist-library/reactive-md-react-component-edge.js +1 -1
- package/dist-library/reactive-md-react-component-else.js +10 -0
- package/dist-library/reactive-md-react-component-gallery-item.js +2 -2
- package/dist-library/reactive-md-react-component-gallery.js +2 -2
- package/dist-library/reactive-md-react-component-grid.js +3 -3
- package/dist-library/reactive-md-react-component-if.js +3 -3
- package/dist-library/reactive-md-react-component-input.js +2 -2
- package/dist-library/reactive-md-react-component-jump.js +3 -3
- package/dist-library/reactive-md-react-component-multi-select.js +2 -2
- package/dist-library/reactive-md-react-component-node.js +2 -2
- package/dist-library/reactive-md-react-component-number.js +2 -2
- package/dist-library/reactive-md-react-component-option.js +1 -1
- package/dist-library/reactive-md-react-component-panel.js +3 -3
- package/dist-library/reactive-md-react-component-plot.js +2 -2
- package/dist-library/reactive-md-react-component-progress.js +2 -2
- package/dist-library/reactive-md-react-component-quiz.js +2 -2
- package/dist-library/reactive-md-react-component-radio-group.js +2 -2
- package/dist-library/reactive-md-react-component-range-slider.js +2 -2
- package/dist-library/reactive-md-react-component-section.js +3 -3
- package/dist-library/reactive-md-react-component-select.js +2 -2
- package/dist-library/reactive-md-react-component-slider.js +2 -2
- package/dist-library/reactive-md-react-component-step.js +3 -3
- package/dist-library/reactive-md-react-component-steps.js +3 -3
- package/dist-library/reactive-md-react-component-tab.js +3 -3
- package/dist-library/reactive-md-react-component-table.js +2 -2
- package/dist-library/reactive-md-react-component-tabs.js +3 -3
- package/dist-library/reactive-md-react-component-text.js +3 -3
- package/dist-library/reactive-md-react-component-textarea.js +2 -2
- package/dist-library/reactive-md-react-component-timeline.js +2 -2
- package/dist-library/reactive-md-react-component-timer.js +2 -2
- package/dist-library/reactive-md-react-component-toggle.js +2 -2
- package/dist-library/reactive-md-react-component-tooltip.js +3 -3
- package/dist-library/reactive-md-react-component-validation.js +3 -3
- package/dist-library/reactive-md-react-minimal.js +4 -4
- package/dist-library/reactive-md-react-pack-controls.js +4 -4
- package/dist-library/reactive-md-react-pack-data.js +3 -3
- package/dist-library/reactive-md-react-pack-layout.js +25 -24
- package/dist-library/reactive-md-react-pack-visuals.js +2 -2
- package/dist-library/reactive-md-react-packed.js +6 -6
- package/dist-library/reactive-md-react-server.js +37 -36
- package/dist-library/reactive-md-react-static-server.js +2 -2
- package/dist-library/reactive-md-react-static.js +1 -1
- package/dist-library/reactive-md-react-unstyled.js +12 -12
- package/dist-library/reactive-md-react.js +12 -12
- package/dist-library/reactive-md-scan.js +1 -1
- package/dist-library/reactive-md-sdk.js +23 -9
- 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 +6 -6
- package/dist-library/reactive-md-vite.js +25 -9
- package/dist-library/reactive-md-worker-pool.js +3 -3
- package/dist-library/reactive-md.css +1 -1
- package/dist-library/reactive-md.js +52 -43
- package/dist-library/{registry-core-CziAIP5P.js → registry-core-DxEaxhJ6.js} +3 -2
- package/dist-library/{render-nodes-DKjg_TR1.js → render-nodes-B6j6Ip5I.js} +766 -731
- package/dist-library/{requirements-DhIkxAbl.js → requirements-C56sFIEs.js} +2 -2
- package/dist-library/{resources-B_nbROgj.js → resources-6VaNgk-h.js} +2 -2
- package/dist-library/rmd-pack-layout.css +9 -0
- package/dist-library/rmd-pack-resource-layout.css +9 -0
- package/dist-library/runtime-BHeuLOv_.js +1369 -0
- package/dist-library/{runtime-requirement-C4-vNcf5.js → runtime-requirement-DzPO8raU.js} +166 -163
- package/dist-library/{schema-core-4sd1Vu7V.js → schema-core-CDXfxdID.js} +24 -1
- package/dist-library/{sdk-core-BLsW9cCy.js → sdk-core-CnE-n0Z7.js} +469 -314
- package/dist-library/{session-core-DLBRPV7f.js → session-core-C071yQwV.js} +140 -127
- package/dist-library/{validation-XXlb-spV.js → sha256-utf16-Bmandi_H.js} +392 -315
- package/dist-library/shareable-CHCDnl6j.js +844 -0
- package/dist-library/types/authoring/catalog.d.ts +3 -1
- package/dist-library/types/authoring/index.d.ts +1 -1
- package/dist-library/types/components/chart/default-chart-types.d.ts +3 -0
- package/dist-library/types/components/chart/default-chart.d.ts +7 -0
- package/dist-library/types/components/entries/else.d.ts +3 -0
- package/dist-library/types/components/layout/layout.d.ts +5 -0
- package/dist-library/types/components/shared/visuals.d.ts +1 -1
- package/dist-library/types/components/table/data-table-model.d.ts +95 -2
- package/dist-library/types/components/table/data-table.d.ts +2 -2
- package/dist-library/types/contracts/component-kernel.d.ts +5 -0
- package/dist-library/types/contracts/font-aliases.d.ts +18 -0
- package/dist-library/types/contracts/number-literal.d.ts +2 -0
- package/dist-library/types/contracts/sha256-utf16.d.ts +2 -0
- package/dist-library/types/export/index.d.ts +4 -1
- package/dist-library/types/local/compilation/compiler-choices.d.ts +4 -0
- package/dist-library/types/local/compilation/compiler-declarations.d.ts +2 -1
- package/dist-library/types/local/compilation/compiler-expressions.d.ts +12 -1
- package/dist-library/types/local/compilation/compiler-macros.d.ts +18 -0
- package/dist-library/types/local/compilation/compiler-structure.d.ts +8 -2
- package/dist-library/types/local/compilation/compiler-tables.d.ts +1 -0
- package/dist-library/types/local/compilation/compiler-validation.d.ts +11 -0
- package/dist-library/types/local/compilation/compiler-values.d.ts +1 -2
- package/dist-library/types/local/configuration/diagnostic-messages.d.ts +173 -2
- package/dist-library/types/local/configuration/diagnostic-runtime-messages.d.ts +40 -0
- package/dist-library/types/local/evaluation/choice-values.d.ts +22 -0
- package/dist-library/types/local/evaluation/computations.d.ts +13 -5
- package/dist-library/types/local/evaluation/dataset.d.ts +4 -0
- package/dist-library/types/local/evaluation/expression/collection-functions.d.ts +13 -0
- package/dist-library/types/local/evaluation/expression/compile.d.ts +11 -4
- package/dist-library/types/local/evaluation/expression/data-functions.d.ts +23 -0
- package/dist-library/types/local/evaluation/expression/evaluation.d.ts +3 -1
- package/dist-library/types/local/evaluation/expression/internal-names.d.ts +8 -0
- package/dist-library/types/local/evaluation/expression/syntax.d.ts +19 -2
- package/dist-library/types/local/evaluation/expression/transform-budget.d.ts +13 -0
- package/dist-library/types/local/evaluation/expression/values.d.ts +9 -1
- package/dist-library/types/local/evaluation/validation.d.ts +8 -6
- package/dist-library/types/local/index.d.ts +4 -3
- package/dist-library/types/local/parsing/conditional-branches.d.ts +4 -0
- package/dist-library/types/local/parsing/source-revision.d.ts +3 -0
- package/dist-library/types/local/runtime/runtime-choices.d.ts +11 -0
- package/dist-library/types/local/runtime/runtime.d.ts +3 -1
- package/dist-library/types/local/runtime/state.d.ts +30 -15
- package/dist-library/types/local/source/authoring-requirements.d.ts +3 -0
- package/dist-library/types/local/source/authoring-syntax.d.ts +3 -2
- package/dist-library/types/local/source/authoring.d.ts +10 -0
- package/dist-library/types/local/source/source-migration.d.ts +1 -0
- package/dist-library/types/local/types.d.ts +33 -2
- package/dist-library/types/react/component-api.d.ts +21 -2
- package/dist-library/types/react/component-utils.d.ts +11 -0
- package/dist-library/types/react/font-aliases.d.ts +2 -0
- package/dist-library/types/react/package-core.d.ts +3 -0
- package/dist-library/types/react/rendering/document/validation-state.d.ts +1 -1
- package/dist-library/types/react/rendering/document/view-revision.d.ts +3 -12
- package/dist-library/types/react/rendering/table/data-table.d.ts +1 -1
- package/dist-library/types/react/sdk-core.d.ts +3 -1
- package/dist-library/types/sdk/assembly.d.ts +3 -0
- package/dist-library/types/sdk/font.d.ts +13 -0
- package/dist-library/types/sdk/index.d.ts +1 -0
- package/dist-library/types/sdk/theme.d.ts +5 -0
- package/dist-library/types/sdk/types.d.ts +6 -0
- package/dist-library/types/sdk/version.d.ts +1 -1
- package/dist-library/types/shareable.d.ts +15 -3
- package/dist-library/types/standalone/prepare.d.ts +4 -2
- package/dist-library/types/standalone/session-core.d.ts +4 -1
- package/dist-library/types/vite/index.d.ts +3 -0
- package/dist-library/types/vite/registration.d.ts +1 -0
- package/dist-library/{types-Bza88SGK.js → types-B4qG8J4S.js} +1 -1
- package/dist-library/types-FYhRWRn9.js +3 -0
- package/dist-library/use-hydrated-D1gFY2Dq.js +2655 -0
- package/dist-library/validation-DRuW0Wl9.js +433 -0
- package/dist-library/{version-B0G1699c.js → version-4wzhbvDG.js} +1 -1
- package/dist-library/{visual-helpers-CRmaqCHX.js → visual-helpers-UU6xiL8g.js} +3 -3
- package/dist-library/visuals-7xzoL9ql.js +49340 -0
- package/dist-library/{worker-D6WMV8xJ.js → worker-3ldRjOEG.js} +9 -9
- package/dist-standalone/reactive-md-standalone.css +1 -1
- package/dist-standalone/reactive-md-standalone.js +128 -368
- package/docs/README-ch.md +3 -1
- package/docs/README.md +3 -1
- package/docs/compatibility/api-stability-ch.md +1 -1
- package/docs/compatibility/api-stability-en.md +1 -1
- package/docs/compatibility/compatibility-ch.md +15 -15
- package/docs/compatibility/compatibility-en.md +15 -15
- package/docs/compatibility/compatibility-manifest.schema.json +3 -2
- package/docs/compatibility/deprecation-ch.md +2 -2
- package/docs/compatibility/deprecation-en.md +2 -2
- package/docs/compatibility/source-versioning-ch.md +22 -14
- package/docs/compatibility/source-versioning-en.md +22 -13
- package/docs/compatibility/support-matrix-ch.md +4 -3
- package/docs/compatibility/support-matrix-en.md +4 -3
- package/docs/development/component-development-ch.md +2 -2
- package/docs/development/component-development-en.md +2 -2
- package/docs/development/component-protocol-ch.md +18 -18
- package/docs/development/component-protocol-en.md +14 -14
- package/docs/guides/local-guide-ch.md +109 -20
- package/docs/guides/local-guide-en.md +109 -20
- package/docs/integration/author-tools-ch.md +1 -1
- package/docs/integration/author-tools-en.md +1 -1
- package/docs/integration/editor-ch.md +3 -3
- package/docs/integration/editor-en.md +3 -3
- package/docs/integration/extension-sdk-ch.md +29 -3
- package/docs/integration/extension-sdk-en.md +29 -3
- package/docs/integration/local-integration-ch.md +3 -3
- package/docs/integration/local-integration-en.md +3 -3
- package/docs/integration/pdf-export-ch.md +42 -0
- package/docs/integration/pdf-export-en.md +42 -0
- package/docs/integration/shareable-export-ch.md +11 -19
- package/docs/integration/shareable-export-en.md +11 -19
- package/docs/reference/diagnostics-counting-ch.md +24 -1
- package/docs/reference/diagnostics-counting-en.md +24 -1
- package/docs/reference/local-interaction-syntax-ch.md +222 -33
- package/docs/reference/local-interaction-syntax-en.md +220 -31
- package/docs/reference/public-api-ch.md +24 -18
- package/docs/reference/public-api-en.md +24 -18
- package/docs/reference/theme-protocol-ch.md +1 -1
- package/docs/reference/theme-protocol-en.md +1 -1
- package/docs/releases/release-0.10.0-ch.md +45 -0
- package/docs/releases/release-0.10.0-en.md +45 -0
- package/examples/conformance/README-ch.md +3 -3
- package/examples/conformance/README.md +3 -3
- package/examples/conformance/local-draft-4.json +441 -0
- package/examples/integration/README-ch.md +3 -3
- package/examples/integration/README.md +3 -3
- package/examples/integration/chat-session/package.json +1 -1
- package/examples/local/README-ch.md +1 -1
- package/examples/local/README.md +1 -1
- package/package.json +6 -1
- package/dist-library/LocalStaticDocumentView-2J7w0sKm.js +0 -143
- package/dist-library/authoring-B14SsOXZ.js +0 -893
- package/dist-library/compile-D50B5_Ww.js +0 -1249
- package/dist-library/computations-CffoW7Ff.js +0 -340
- package/dist-library/data-table-Kv_ZA2Z2.js +0 -297
- package/dist-library/default-options-DU5dxuU6.js +0 -125
- package/dist-library/layout-BfUzzO2b.js +0 -553
- package/dist-library/runtime-CuJndKqK.js +0 -1289
- package/dist-library/shareable-C6mUerpQ.js +0 -817
- package/dist-library/types-daDo2c_w.js +0 -3
- package/dist-library/use-hydrated-W-laKPhY.js +0 -22975
- package/dist-library/visuals-CoVSjVD8.js +0 -49159
|
@@ -1,40 +1,41 @@
|
|
|
1
1
|
import { r as e } from "./latex-1w7aQgD5.js";
|
|
2
|
-
import { y as t } from "./document-theme-
|
|
3
|
-
import { i as n, t as r } from "./compile-
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import { d as
|
|
2
|
+
import { y as t } from "./document-theme-CJvN-nC1.js";
|
|
3
|
+
import { i as n, t as r } from "./compile-B35rfzKr.js";
|
|
4
|
+
import { p as i } from "./choice-values-BItGjPD2.js";
|
|
5
|
+
import "./preset-core-BKPbH_Nv.js";
|
|
6
|
+
import { f as a, g as o, p as s } from "./validation-DRuW0Wl9.js";
|
|
7
|
+
import { n as c } from "./types-FYhRWRn9.js";
|
|
8
|
+
import { d as l } from "./component-kernel-CsJSabHX.js";
|
|
9
|
+
import "./version-4wzhbvDG.js";
|
|
9
10
|
// src/local/parsing/footnotes.ts
|
|
10
|
-
function
|
|
11
|
+
function u(e) {
|
|
11
12
|
return typeof e == "string" && e.trim() !== "" ? e : void 0;
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
+
function d(e) {
|
|
14
15
|
let t = /^\[\^([\s\S]*)\]$/.exec(e.trim());
|
|
15
16
|
return t ? t[1] : e;
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
+
function f(e) {
|
|
18
19
|
return e;
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
-
return
|
|
22
|
-
}
|
|
23
|
-
function p(e) {
|
|
24
|
-
return e.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase().toLowerCase();
|
|
21
|
+
function p(e, t) {
|
|
22
|
+
return u(e.attrs?.[t]);
|
|
25
23
|
}
|
|
26
24
|
function m(e) {
|
|
27
|
-
|
|
28
|
-
return l(t.identifier) ?? l(t.label) ?? f(e, "identifier") ?? f(e, "label") ?? (n ? u(n) : "");
|
|
25
|
+
return e.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase().toLowerCase();
|
|
29
26
|
}
|
|
30
27
|
function h(e) {
|
|
31
|
-
|
|
28
|
+
let t = f(e), n = u(e.value);
|
|
29
|
+
return u(t.identifier) ?? u(t.label) ?? p(e, "identifier") ?? p(e, "label") ?? (n ? d(n) : "");
|
|
32
30
|
}
|
|
33
31
|
function g(e) {
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
return m(h(e));
|
|
33
|
+
}
|
|
34
|
+
function _(e) {
|
|
35
|
+
let t = f(e), n = u(e.value);
|
|
36
|
+
return (u(t.label) ?? u(t.identifier) ?? p(e, "label") ?? p(e, "identifier") ?? (n ? d(n) : "")).trim().replace(/\s+/g, " ");
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
+
function v(e, t) {
|
|
38
39
|
let n = /* @__PURE__ */ new Map(), r = [], i = /* @__PURE__ */ new Map(), a = [{
|
|
39
40
|
nodes: e.nodes,
|
|
40
41
|
index: 0
|
|
@@ -47,7 +48,7 @@ function _(e, t) {
|
|
|
47
48
|
}
|
|
48
49
|
let t = e.nodes[e.index++];
|
|
49
50
|
if (t.type === "footnoteDefinition") {
|
|
50
|
-
let e =
|
|
51
|
+
let e = g(t);
|
|
51
52
|
e && !n.has(e) && n.set(e, t), t.children && a.push({
|
|
52
53
|
nodes: t.children,
|
|
53
54
|
index: 0,
|
|
@@ -79,12 +80,12 @@ function _(e, t) {
|
|
|
79
80
|
};
|
|
80
81
|
return o.push(a), s.set(e, a), a;
|
|
81
82
|
}, d = (e) => {
|
|
82
|
-
let n =
|
|
83
|
+
let n = g(e), r = n ? u(n) : null;
|
|
83
84
|
if (!r) {
|
|
84
85
|
c.set(e, {
|
|
85
86
|
id: "",
|
|
86
87
|
entry: null,
|
|
87
|
-
label:
|
|
88
|
+
label: _(e)
|
|
88
89
|
});
|
|
89
90
|
return;
|
|
90
91
|
}
|
|
@@ -97,7 +98,7 @@ function _(e, t) {
|
|
|
97
98
|
}), c.set(e, {
|
|
98
99
|
id: a,
|
|
99
100
|
entry: r,
|
|
100
|
-
label:
|
|
101
|
+
label: _(e)
|
|
101
102
|
});
|
|
102
103
|
};
|
|
103
104
|
for (let e of r) d(e);
|
|
@@ -113,11 +114,11 @@ function _(e, t) {
|
|
|
113
114
|
};
|
|
114
115
|
}
|
|
115
116
|
// src/local/html/html-details.ts
|
|
116
|
-
var
|
|
117
|
-
function
|
|
118
|
-
return e.type !== "text" || !
|
|
117
|
+
var y = /^\s*$/;
|
|
118
|
+
function b(e) {
|
|
119
|
+
return e.type !== "text" || !y.test(e.value ?? "");
|
|
119
120
|
}
|
|
120
|
-
function
|
|
121
|
+
function ee(e, t) {
|
|
121
122
|
let n = t[0]?.range, r = t[t.length - 1]?.range;
|
|
122
123
|
return n !== void 0 && r !== void 0 && Number.isInteger(n.start) && Number.isInteger(r.end) && n.start >= e.range.start && r.end <= e.range.end && n.start <= r.end ? {
|
|
123
124
|
...e,
|
|
@@ -131,18 +132,18 @@ function te(e, t) {
|
|
|
131
132
|
children: t
|
|
132
133
|
};
|
|
133
134
|
}
|
|
134
|
-
function
|
|
135
|
+
function te(e) {
|
|
135
136
|
let t = e.children;
|
|
136
137
|
if (!t || t.length === 0) return null;
|
|
137
138
|
let n = t.findIndex((e) => e.type === "summary");
|
|
138
139
|
if (n < 0) return null;
|
|
139
140
|
let r = t.filter((e, t) => t !== n);
|
|
140
|
-
return r.some(
|
|
141
|
+
return r.some(b) ? {
|
|
141
142
|
summary: t[n],
|
|
142
|
-
body:
|
|
143
|
+
body: ee(e, r)
|
|
143
144
|
} : { summary: t[n] };
|
|
144
145
|
}
|
|
145
|
-
function
|
|
146
|
+
function x(e) {
|
|
146
147
|
let t = e.findIndex((e) => e.type === "summary");
|
|
147
148
|
if (t >= 0) return {
|
|
148
149
|
summary: e[t],
|
|
@@ -151,7 +152,7 @@ function b(e) {
|
|
|
151
152
|
let n = [], r;
|
|
152
153
|
for (let t of e) {
|
|
153
154
|
if (r === void 0 && t.type === "paragraph") {
|
|
154
|
-
let e =
|
|
155
|
+
let e = te(t);
|
|
155
156
|
if (e) {
|
|
156
157
|
r = e.summary, e.body && n.push(e.body);
|
|
157
158
|
continue;
|
|
@@ -164,12 +165,12 @@ function b(e) {
|
|
|
164
165
|
body: n
|
|
165
166
|
};
|
|
166
167
|
}
|
|
167
|
-
function
|
|
168
|
-
let { summary: t, body: n } =
|
|
168
|
+
function S(e) {
|
|
169
|
+
let { summary: t, body: n } = x(e);
|
|
169
170
|
return t === void 0 ? n : [t, ...n];
|
|
170
171
|
}
|
|
171
172
|
// src/local/parsing/heading-anchors.ts
|
|
172
|
-
function
|
|
173
|
+
function C(e, t) {
|
|
173
174
|
return (e ?? []).map((e) => {
|
|
174
175
|
switch (e.type) {
|
|
175
176
|
case "text":
|
|
@@ -184,14 +185,14 @@ function x(e, t) {
|
|
|
184
185
|
} catch {
|
|
185
186
|
return "Cannot compute";
|
|
186
187
|
}
|
|
187
|
-
default: return
|
|
188
|
+
default: return C(e.children, t);
|
|
188
189
|
}
|
|
189
190
|
}).join("");
|
|
190
191
|
}
|
|
191
|
-
function
|
|
192
|
+
function ne(e) {
|
|
192
193
|
return e.trim().toLowerCase().replace(/[^\p{L}\p{N}\p{M}\s_-]/gu, "").replace(/\s+/g, "-") || "section";
|
|
193
194
|
}
|
|
194
|
-
function
|
|
195
|
+
function w(e, t) {
|
|
195
196
|
let n = /* @__PURE__ */ new Map(), r = t ?? (Array.isArray(e.componentDefinitions) ? e.componentDefinitions : []);
|
|
196
197
|
for (let e of r.slice(0, 192)) {
|
|
197
198
|
if (!e || typeof e.name != "string" || !Array.isArray(e.rules)) continue;
|
|
@@ -200,22 +201,22 @@ function S(e, t) {
|
|
|
200
201
|
}
|
|
201
202
|
return n;
|
|
202
203
|
}
|
|
203
|
-
function
|
|
204
|
+
function re(e, t) {
|
|
204
205
|
if (e.type !== "component" && e.type !== "hostComponent") return;
|
|
205
206
|
let n = t.get(e.name ?? "");
|
|
206
207
|
if (n === void 0) return;
|
|
207
208
|
let r = e.attrs?.[n];
|
|
208
209
|
if (typeof r == "string" && r.length !== 0) return /^[A-Za-z_][A-Za-z0-9_-]*$/.test(r) ? r : void 0;
|
|
209
210
|
}
|
|
210
|
-
function
|
|
211
|
+
function T(e) {
|
|
211
212
|
if (e.type === "component" || e.type === "hostComponent") return;
|
|
212
213
|
let t = e.attrs?.id;
|
|
213
214
|
if (typeof t != "string") return;
|
|
214
215
|
let n = t.trim().replace(/[\u0000- \u007f-\u009f]+/g, "-").replace(/^-+|-+$/g, "");
|
|
215
216
|
return n === "" ? void 0 : n;
|
|
216
217
|
}
|
|
217
|
-
function
|
|
218
|
-
let c =
|
|
218
|
+
function E(e, n, i = !0, o) {
|
|
219
|
+
let c = w(e, o), l = e.initialState;
|
|
219
220
|
if (e.computations) {
|
|
220
221
|
let t = {}, n = /* @__PURE__ */ new Map();
|
|
221
222
|
for (let [i, a] of Object.entries(e.computations)) {
|
|
@@ -224,11 +225,8 @@ function ie(e, n, i = !0, s) {
|
|
|
224
225
|
n.set(i, r(a.source));
|
|
225
226
|
} catch {}
|
|
226
227
|
}
|
|
227
|
-
let { order: i } =
|
|
228
|
-
l =
|
|
229
|
-
...l,
|
|
230
|
-
...s.values
|
|
231
|
-
};
|
|
228
|
+
let { order: i } = s(e.computations);
|
|
229
|
+
l = a(e.computations, i, n, l, t).environment;
|
|
232
230
|
}
|
|
233
231
|
let u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
|
|
234
232
|
function h(e) {
|
|
@@ -242,14 +240,14 @@ function ie(e, n, i = !0, s) {
|
|
|
242
240
|
};
|
|
243
241
|
}
|
|
244
242
|
for (let n of t(e.nodes)) if (n.type === "heading") {
|
|
245
|
-
let e =
|
|
243
|
+
let e = T(n) ?? ne(C(n.children, l));
|
|
246
244
|
u.set(n, h(e).id);
|
|
247
245
|
} else {
|
|
248
246
|
if (i) {
|
|
249
|
-
let e =
|
|
247
|
+
let e = re(n, c);
|
|
250
248
|
e && d.set(n, h(e).id);
|
|
251
249
|
}
|
|
252
|
-
let e =
|
|
250
|
+
let e = T(n);
|
|
253
251
|
e && f.set(n, h(e).id);
|
|
254
252
|
}
|
|
255
253
|
function g(e) {
|
|
@@ -280,9 +278,9 @@ function ie(e, n, i = !0, s) {
|
|
|
280
278
|
};
|
|
281
279
|
}
|
|
282
280
|
// src/local/compilation/dependencies.ts
|
|
283
|
-
var
|
|
284
|
-
function
|
|
285
|
-
let n = e.snapshot().revision, r =
|
|
281
|
+
var ie = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap();
|
|
282
|
+
function ae(e) {
|
|
283
|
+
let n = e.snapshot().revision, r = O.get(e);
|
|
286
284
|
if (r?.revision === n) return r.tokens;
|
|
287
285
|
let i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new WeakMap();
|
|
288
286
|
for (let n of t(e.document.nodes, !0)) {
|
|
@@ -290,108 +288,113 @@ function oe(e) {
|
|
|
290
288
|
for (let e of n.children ?? []) t += a.get(e);
|
|
291
289
|
i.set(n.id, t), a.set(n, t);
|
|
292
290
|
}
|
|
293
|
-
return
|
|
291
|
+
return O.set(e, {
|
|
294
292
|
revision: n,
|
|
295
293
|
tokens: i
|
|
296
294
|
}), i;
|
|
297
295
|
}
|
|
298
|
-
function
|
|
296
|
+
function k(e, t) {
|
|
299
297
|
for (let n of t) e.add(n);
|
|
300
298
|
}
|
|
301
|
-
function
|
|
302
|
-
let
|
|
303
|
-
if (
|
|
304
|
-
let
|
|
305
|
-
if (
|
|
306
|
-
let e = new Map(Object.entries(
|
|
307
|
-
return
|
|
308
|
-
definitions:
|
|
299
|
+
function A(a, s) {
|
|
300
|
+
let u = D.get(a);
|
|
301
|
+
if (u !== void 0 && u.definitions === s) return u.index;
|
|
302
|
+
let d = a.dependencies;
|
|
303
|
+
if (d !== void 0) {
|
|
304
|
+
let e = new Map(Object.entries(d));
|
|
305
|
+
return D.set(a, {
|
|
306
|
+
definitions: s,
|
|
309
307
|
index: e
|
|
310
308
|
}), e;
|
|
311
309
|
}
|
|
312
|
-
let
|
|
310
|
+
let f = s ?? (Array.isArray(a.componentDefinitions) ? a.componentDefinitions : []), p = /* @__PURE__ */ new Map(), m = o(a), h = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Set();
|
|
313
311
|
for (let [e, t] of Object.entries(a.bindings)) {
|
|
314
|
-
for (let e of t.nodeIds)
|
|
315
|
-
if (!e.startsWith("@")) for (let n of t.nodeIds) {
|
|
316
|
-
let t =
|
|
317
|
-
t.push(e),
|
|
312
|
+
for (let e of t.nodeIds) g.add(e);
|
|
313
|
+
if (!e.startsWith("@") || e.startsWith("@macro:")) for (let n of t.nodeIds) {
|
|
314
|
+
let t = h.get(n) ?? [];
|
|
315
|
+
t.push(e), h.set(n, t);
|
|
318
316
|
}
|
|
319
317
|
}
|
|
320
|
-
let
|
|
318
|
+
let _ = (e) => h.get(e.id) ?? [c(e)], v = (e, t) => {
|
|
321
319
|
let n = a.bindingSlots?.[t.id];
|
|
322
320
|
if (n !== void 0) {
|
|
323
|
-
e.add(
|
|
321
|
+
e.add(c(t));
|
|
324
322
|
for (let t of Object.values(n)) e.add(t);
|
|
325
323
|
}
|
|
326
|
-
},
|
|
327
|
-
for (let
|
|
328
|
-
let t = /* @__PURE__ */ new Set(),
|
|
329
|
-
if (
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
324
|
+
}, y = /* @__PURE__ */ new WeakMap();
|
|
325
|
+
for (let o of t(a.nodes, !0)) {
|
|
326
|
+
let t = /* @__PURE__ */ new Set(), s = !1;
|
|
327
|
+
if (o.attrs !== void 0 && !o.literalAttributes) {
|
|
328
|
+
for (let [e, r] of Object.entries(o.attrs)) if (!o.macroLiteralAttrs?.includes(e)) try {
|
|
329
|
+
k(t, n(r));
|
|
330
|
+
} catch {
|
|
331
|
+
s = !0;
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
334
|
}
|
|
335
|
-
if (!
|
|
336
|
-
if (
|
|
337
|
-
|
|
335
|
+
if (!s) {
|
|
336
|
+
if (o.type === "interpolation") try {
|
|
337
|
+
k(t, r(o.value ?? "").dependencies);
|
|
338
338
|
} catch {
|
|
339
|
-
|
|
339
|
+
s = !0;
|
|
340
340
|
}
|
|
341
|
-
else if (
|
|
342
|
-
|
|
341
|
+
else if (o.type === "math") try {
|
|
342
|
+
let n = e(o.value ?? "").dependencies;
|
|
343
|
+
k(t, n.map((e) => o.macroMathScope?.[e] ?? e));
|
|
343
344
|
} catch {
|
|
344
|
-
|
|
345
|
+
s = !0;
|
|
345
346
|
}
|
|
346
|
-
else if (
|
|
347
|
-
if (
|
|
348
|
-
let n =
|
|
347
|
+
else if (o.name !== void 0) {
|
|
348
|
+
if (m) {
|
|
349
|
+
let n = m.dependencyRules?.[o.id];
|
|
349
350
|
if (n?.selfBinding) {
|
|
350
351
|
let e = n.selfBinding.attribute;
|
|
351
|
-
(n.selfBinding.mode === "always" || e !== void 0 && (
|
|
352
|
+
(n.selfBinding.mode === "always" || e !== void 0 && (o.attrs?.[e] ?? "").trim() !== "") && k(t, _(o));
|
|
352
353
|
}
|
|
353
|
-
if (n?.inlineMathReads) for (let n of
|
|
354
|
+
if (n?.inlineMathReads) for (let n of o.children ?? []) {
|
|
354
355
|
if (n.type !== "inlineMath") continue;
|
|
355
356
|
let r = (n.value ?? "").trim();
|
|
356
357
|
if (/^y\s*=/u.test(r)) try {
|
|
357
|
-
|
|
358
|
+
k(t, e(r).dependencies);
|
|
358
359
|
} catch {}
|
|
359
360
|
}
|
|
360
|
-
n || (a.bindingSlots?.[
|
|
361
|
+
n || (a.bindingSlots?.[o.id] !== void 0 && t.add(c(o)), g.has(o.id) && k(t, _(o)), v(t, o));
|
|
361
362
|
} else {
|
|
362
|
-
let n =
|
|
363
|
-
if (
|
|
363
|
+
let n = o.name ? f.find((e) => e.name === o.name) : void 0, r = n ? l(n) : [], i = r.find((e) => e.kind === "self-binding-read"), a = r.some((e) => e.kind === "inline-math-reads");
|
|
364
|
+
if (i ? (i.mode === "always" || i.attribute !== void 0 && (o.attrs?.[i.attribute] ?? "").trim() !== "") && k(t, _(o)) : !a && g.has(o.id) && k(t, _(o)), a) for (let n of o.children ?? []) {
|
|
364
365
|
if (n.type !== "inlineMath") continue;
|
|
365
366
|
let r = (n.value ?? "").trim();
|
|
366
367
|
if (/^y\s*=/u.test(r)) try {
|
|
367
|
-
|
|
368
|
+
k(t, e(r).dependencies);
|
|
368
369
|
} catch {}
|
|
369
370
|
}
|
|
370
|
-
|
|
371
|
+
v(t, o);
|
|
371
372
|
}
|
|
372
373
|
}
|
|
373
374
|
}
|
|
374
|
-
let
|
|
375
|
-
for (let e of
|
|
376
|
-
let n =
|
|
377
|
-
n === null ?
|
|
375
|
+
let u = !1;
|
|
376
|
+
for (let e of o.children ?? []) {
|
|
377
|
+
let n = y.get(e);
|
|
378
|
+
n === null ? u = !0 : k(t, n);
|
|
378
379
|
}
|
|
379
|
-
let
|
|
380
|
-
|
|
380
|
+
let d = /* @__PURE__ */ new Set(), h = [...t];
|
|
381
|
+
for (let e of h) d.has(e) || (d.add(e), i(e) && h.push(...a.computations?.[e]?.dependencies ?? []));
|
|
382
|
+
let b = s || u ? null : [...d].filter((e) => !i(e));
|
|
383
|
+
p.set(o.id, b), y.set(o, b);
|
|
381
384
|
}
|
|
382
|
-
return
|
|
383
|
-
definitions:
|
|
384
|
-
index:
|
|
385
|
-
}),
|
|
385
|
+
return D.set(a, {
|
|
386
|
+
definitions: s,
|
|
387
|
+
index: p
|
|
388
|
+
}), p;
|
|
386
389
|
}
|
|
387
|
-
function
|
|
390
|
+
function oe(e, t) {
|
|
388
391
|
if (e.dependencies !== void 0) return;
|
|
389
|
-
let n =
|
|
392
|
+
let n = A(e, t), r = Object.create(null);
|
|
390
393
|
for (let [e, t] of n) r[e] = t === null ? null : Object.freeze([...t]);
|
|
391
394
|
e.dependencies = Object.freeze(r);
|
|
392
395
|
}
|
|
393
396
|
// src/local/css/author-css.ts
|
|
394
|
-
var
|
|
397
|
+
var j = /^data:image\/(?:png|jpeg|gif|webp);base64,[A-Za-z0-9+/]+={0,2}$/i, se = "[data-rmd-document]", M = [
|
|
395
398
|
"@import",
|
|
396
399
|
"expression(",
|
|
397
400
|
"javascript:",
|
|
@@ -400,12 +403,12 @@ var k = /^data:image\/(?:png|jpeg|gif|webp);base64,[A-Za-z0-9+/]+={0,2}$/i, ce =
|
|
|
400
403
|
"behavior:",
|
|
401
404
|
"image-set(",
|
|
402
405
|
"-webkit-image-set("
|
|
403
|
-
],
|
|
406
|
+
], N = /* @__PURE__ */ new Set([
|
|
404
407
|
"media",
|
|
405
408
|
"supports",
|
|
406
409
|
"container",
|
|
407
410
|
"starting-style"
|
|
408
|
-
]),
|
|
411
|
+
]), P = /* @__PURE__ */ new Set([
|
|
409
412
|
"import",
|
|
410
413
|
"charset",
|
|
411
414
|
"namespace",
|
|
@@ -423,26 +426,26 @@ var k = /^data:image\/(?:png|jpeg|gif|webp);base64,[A-Za-z0-9+/]+={0,2}$/i, ce =
|
|
|
423
426
|
"position-try",
|
|
424
427
|
"layer",
|
|
425
428
|
"scope"
|
|
426
|
-
]),
|
|
427
|
-
function
|
|
429
|
+
]), F = 4, I = /[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/;
|
|
430
|
+
function ce(e) {
|
|
428
431
|
let t = {}, n = {};
|
|
429
432
|
for (let r of X(Y(e), ";")) {
|
|
430
|
-
let e =
|
|
433
|
+
let e = U(r);
|
|
431
434
|
if (!e) continue;
|
|
432
|
-
let i =
|
|
433
|
-
i &&
|
|
435
|
+
let i = W(e.property);
|
|
436
|
+
i && V.test(i) && (!n[i] || e.important) && (n[i] = e.important, delete t[i], t[i] = e.important ? `${e.value} !important` : e.value);
|
|
434
437
|
}
|
|
435
438
|
return Object.freeze(t);
|
|
436
439
|
}
|
|
437
|
-
function
|
|
440
|
+
function L(e) {
|
|
438
441
|
let t = [], n = /* @__PURE__ */ new Set(), r = !1;
|
|
439
442
|
for (let i of X(Y(e), ";")) {
|
|
440
|
-
let e =
|
|
443
|
+
let e = U(i);
|
|
441
444
|
e && (n.has(e.property) && (r = !0), n.add(e.property), t.push(`${e.property}:${e.value}${e.important ? " !important" : ""};`));
|
|
442
445
|
}
|
|
443
446
|
return r ? t.join("") : void 0;
|
|
444
447
|
}
|
|
445
|
-
function
|
|
448
|
+
function R(e) {
|
|
446
449
|
let t = /^([\s\S]*?)\s*!\s*important\s*$/i.exec(e.trim());
|
|
447
450
|
return t ? {
|
|
448
451
|
value: t[1].trimEnd(),
|
|
@@ -452,65 +455,65 @@ function L(e) {
|
|
|
452
455
|
important: !1
|
|
453
456
|
};
|
|
454
457
|
}
|
|
455
|
-
function
|
|
456
|
-
let n = t === void 0 ? ":scope" :
|
|
458
|
+
function z(e, t) {
|
|
459
|
+
let n = t === void 0 ? ":scope" : me(t);
|
|
457
460
|
if (!n) return "";
|
|
458
461
|
let r = q(e, 0);
|
|
459
462
|
if (r.length === 0) return "";
|
|
460
|
-
let i = `${n} ${
|
|
461
|
-
return
|
|
463
|
+
let i = `${n} ${se}`;
|
|
464
|
+
return he(`@scope${t === void 0 ? "" : ` (${n})`} to (${i}) {\n${J(r.join("\n"))}\n}`);
|
|
462
465
|
}
|
|
463
|
-
function
|
|
466
|
+
function B(e, t) {
|
|
464
467
|
let n = [];
|
|
465
468
|
function r(e, i, a) {
|
|
466
|
-
if (!(a >
|
|
469
|
+
if (!(a > F)) for (let o of Z(e)) {
|
|
467
470
|
if (n.length >= t) return;
|
|
468
471
|
let e = /^@([A-Za-z-]+)/.exec(o.prelude)?.[1];
|
|
469
472
|
if (!e) continue;
|
|
470
473
|
let s = e.toLowerCase();
|
|
471
|
-
if (
|
|
474
|
+
if (P.has(s)) {
|
|
472
475
|
let t = i + o.start;
|
|
473
476
|
n.push({
|
|
474
477
|
name: e,
|
|
475
478
|
start: t,
|
|
476
479
|
end: t + e.length + 1
|
|
477
480
|
});
|
|
478
|
-
} else
|
|
481
|
+
} else N.has(s) && o.block !== null && r(o.block, i + o.blockStart, a + 1);
|
|
479
482
|
}
|
|
480
483
|
}
|
|
481
484
|
return r(e, 0, 0), n;
|
|
482
485
|
}
|
|
483
|
-
var
|
|
484
|
-
function
|
|
485
|
-
let t =
|
|
486
|
+
var V = /^(?:--[\w-]+|[A-Za-z][\w$]*)$/, H = /^(?:--[A-Za-z0-9_-]+|-{0,2}[A-Za-z][A-Za-z0-9-]*)$/;
|
|
487
|
+
function U(e) {
|
|
488
|
+
let t = ge(e);
|
|
486
489
|
if (t < 1) return null;
|
|
487
490
|
let n = e.slice(0, t).trim(), r = e.slice(t + 1).trim();
|
|
488
|
-
if (!
|
|
491
|
+
if (!H.test(n) || r === "") return null;
|
|
489
492
|
n.startsWith("--") || (n = n.toLowerCase());
|
|
490
|
-
let i =
|
|
491
|
-
return !
|
|
493
|
+
let i = R(r);
|
|
494
|
+
return !le(i.value) || !i.important && /!\s*important\b/i.test(i.value) ? null : {
|
|
492
495
|
property: n,
|
|
493
496
|
value: i.value,
|
|
494
497
|
important: i.important
|
|
495
498
|
};
|
|
496
499
|
}
|
|
497
|
-
function
|
|
500
|
+
function W(e) {
|
|
498
501
|
if (e.startsWith("--")) return e;
|
|
499
502
|
let t = e.startsWith("-"), n = e.replace(/^-+/, "");
|
|
500
503
|
if (!n) return null;
|
|
501
504
|
let r = n.replace(/-+([a-z0-9])/g, (e, t) => t.toUpperCase());
|
|
502
505
|
return t ? r.charAt(0).toUpperCase() + r.slice(1) : r;
|
|
503
506
|
}
|
|
504
|
-
function
|
|
505
|
-
if (e === "" ||
|
|
506
|
-
let t =
|
|
507
|
+
function le(e) {
|
|
508
|
+
if (e === "" || I.test(e)) return !1;
|
|
509
|
+
let t = ue(e);
|
|
507
510
|
if (t.separator || t.unbalanced) return !1;
|
|
508
511
|
let n = K(e), r = n.toLowerCase();
|
|
509
|
-
if (
|
|
510
|
-
for (let e of G(n)) if (!
|
|
512
|
+
if (M.some((e) => r.includes(e))) return !1;
|
|
513
|
+
for (let e of G(n)) if (!j.test(e.replace(/\s+/g, ""))) return !1;
|
|
511
514
|
return !0;
|
|
512
515
|
}
|
|
513
|
-
function
|
|
516
|
+
function ue(e) {
|
|
514
517
|
let t = "", n = 0;
|
|
515
518
|
for (let r = 0; r < e.length; r += 1) {
|
|
516
519
|
let i = e[r];
|
|
@@ -567,13 +570,13 @@ function K(e) {
|
|
|
567
570
|
});
|
|
568
571
|
}
|
|
569
572
|
function q(e, t) {
|
|
570
|
-
if (t >
|
|
573
|
+
if (t > F) return [];
|
|
571
574
|
let n = [];
|
|
572
575
|
for (let r of Z(Y(e))) {
|
|
573
576
|
if (r.prelude.startsWith("@")) {
|
|
574
577
|
let e = /^@([A-Za-z-]+)/.exec(r.prelude)?.[1]?.toLowerCase();
|
|
575
|
-
if (!e ||
|
|
576
|
-
let i =
|
|
578
|
+
if (!e || P.has(e) || !N.has(e) || r.block === null) continue;
|
|
579
|
+
let i = pe(r.prelude.slice(e.length + 1));
|
|
577
580
|
if (i === null) continue;
|
|
578
581
|
let a = q(r.block, t + 1);
|
|
579
582
|
if (a.length === 0) continue;
|
|
@@ -582,34 +585,34 @@ function q(e, t) {
|
|
|
582
585
|
continue;
|
|
583
586
|
}
|
|
584
587
|
if (r.block === null) continue;
|
|
585
|
-
let e = X(r.prelude, ",").map((e) => e.trim()).filter(
|
|
588
|
+
let e = X(r.prelude, ",").map((e) => e.trim()).filter(fe);
|
|
586
589
|
if (e.length === 0) continue;
|
|
587
|
-
let i =
|
|
590
|
+
let i = de(r.block);
|
|
588
591
|
i.length !== 0 && n.push(`${e.join(", ")} {\n${J(i.join("\n"))}\n}`);
|
|
589
592
|
}
|
|
590
593
|
return n;
|
|
591
594
|
}
|
|
592
|
-
function
|
|
595
|
+
function de(e) {
|
|
593
596
|
let t = [];
|
|
594
597
|
for (let n of X(e, ";")) {
|
|
595
|
-
let e =
|
|
598
|
+
let e = U(n);
|
|
596
599
|
e && t.push(`${e.property}: ${e.value}${e.important ? " !important" : ""};`);
|
|
597
600
|
}
|
|
598
601
|
return t;
|
|
599
602
|
}
|
|
600
|
-
function
|
|
603
|
+
function fe(e) {
|
|
601
604
|
return !(e === "" || e.length > 512 || /[{}@;]/.test(e) || /[\u0000-\u0008\u000b\u000e-\u001f\u007f]/.test(e) || /:root\b/i.test(e) || /(^|[\s>+~,])(?:html|body)(?:$|[\s.#:[>+~,])/i.test(e));
|
|
602
605
|
}
|
|
603
|
-
function
|
|
606
|
+
function pe(e) {
|
|
604
607
|
let t = e.trim();
|
|
605
608
|
if (!t) return "";
|
|
606
|
-
if (/[{}]/.test(t) ||
|
|
609
|
+
if (/[{}]/.test(t) || I.test(t)) return null;
|
|
607
610
|
let n = K(t).toLowerCase();
|
|
608
|
-
if (
|
|
609
|
-
for (let e of G(n)) if (!
|
|
611
|
+
if (M.some((e) => n.includes(e))) return null;
|
|
612
|
+
for (let e of G(n)) if (!j.test(e.replace(/\s+/g, ""))) return null;
|
|
610
613
|
return t;
|
|
611
614
|
}
|
|
612
|
-
function
|
|
615
|
+
function me(e) {
|
|
613
616
|
let t = e.trim();
|
|
614
617
|
if (t === "" || t.length > 512 || /[{}<>@;]|\/\*|[\u0000-\u001f\u007f]/.test(t)) return "";
|
|
615
618
|
let n = {
|
|
@@ -620,7 +623,7 @@ function pe(e) {
|
|
|
620
623
|
else if (n[e] && r.pop() !== n[e]) return "";
|
|
621
624
|
return r.length > 0 || /[\s>+~,]$/.test(t) ? "" : t;
|
|
622
625
|
}
|
|
623
|
-
function
|
|
626
|
+
function he(e) {
|
|
624
627
|
return e.replace(/\u0000/g, "�").replace(/<(?=\/style[\t\n\f\r />])/gi, "\\3c ");
|
|
625
628
|
}
|
|
626
629
|
function J(e) {
|
|
@@ -652,7 +655,7 @@ function X(e, t) {
|
|
|
652
655
|
}
|
|
653
656
|
return n.push(r), n;
|
|
654
657
|
}
|
|
655
|
-
function
|
|
658
|
+
function ge(e) {
|
|
656
659
|
let t = "", n = 0;
|
|
657
660
|
for (let r = 0; r < e.length; r += 1) {
|
|
658
661
|
let i = e[r];
|
|
@@ -664,7 +667,7 @@ function he(e) {
|
|
|
664
667
|
}
|
|
665
668
|
return -1;
|
|
666
669
|
}
|
|
667
|
-
function
|
|
670
|
+
function _e(e, t) {
|
|
668
671
|
let n = 0, r = "";
|
|
669
672
|
for (let i = t; i < e.length; i += 1) {
|
|
670
673
|
let t = e[i];
|
|
@@ -706,7 +709,7 @@ function Z(e) {
|
|
|
706
709
|
}
|
|
707
710
|
let o = e.slice(r, n).trim();
|
|
708
711
|
if (a === "{") {
|
|
709
|
-
let i =
|
|
712
|
+
let i = _e(e, n);
|
|
710
713
|
if (i < 0) {
|
|
711
714
|
o && t.push({
|
|
712
715
|
prelude: o,
|
|
@@ -735,14 +738,14 @@ function Z(e) {
|
|
|
735
738
|
return t;
|
|
736
739
|
}
|
|
737
740
|
// src/local/compilation/runtime-requirement.ts
|
|
738
|
-
var
|
|
741
|
+
var ve = /* @__PURE__ */ new Set(/* @__PURE__ */ "root.heading.paragraph.text.rawBody.emphasis.strong.delete.underline.mark.sup.sub.span.div.summary.details.inlineCode.code.blockquote.break.thematicBreak.list.listItem.link.image.htmlTable.htmlTableElement.table.tableRow.tableCell.math.inlineMath.html.extendedHtml.fallback.footnoteReference.footnoteDefinition.comment.definition.externalSlot".split("."));
|
|
739
742
|
function Q(e, t) {
|
|
740
743
|
return t?.capabilities.static === !0 && $(e);
|
|
741
744
|
}
|
|
742
745
|
function $(e) {
|
|
743
746
|
return e.literalAttributes === !0 || !Object.values(e.attrs ?? {}).some((e) => e.includes("{{"));
|
|
744
747
|
}
|
|
745
|
-
function
|
|
748
|
+
function ye(e) {
|
|
746
749
|
if (e.html || e.capabilities?.scripts.length || [
|
|
747
750
|
e.bindings,
|
|
748
751
|
e.computations,
|
|
@@ -754,7 +757,7 @@ function ve(e) {
|
|
|
754
757
|
if (r && (r.protocol !== "reactive-md-extensions/v1" || !Array.isArray(r.components) || r.components.length > 64)) return !0;
|
|
755
758
|
let i = r && new Map(r.components.flatMap((e) => e && typeof e.name == "string" ? [[e.name, e]] : [])), a = n.get("if")?.id === "reactive-md/if";
|
|
756
759
|
for (let r of t(e.nodes)) {
|
|
757
|
-
if (
|
|
760
|
+
if (ve.has(r.type) || a && r.type === "component" && r.name === "if" && (r.attrs?.when === "true" || r.attrs?.when === "false")) continue;
|
|
758
761
|
let e = n.get(r.name ?? "");
|
|
759
762
|
if (!(r.type === "component" && r.name !== "if" && Q(r, e))) {
|
|
760
763
|
if (r.type === "hostComponent" && r.name) {
|
|
@@ -766,4 +769,4 @@ function ve(e) {
|
|
|
766
769
|
}
|
|
767
770
|
return !1;
|
|
768
771
|
}
|
|
769
|
-
export {
|
|
772
|
+
export { m as _, L as a, oe as c, w as d, E as f, _ as g, v as h, z as i, A as l, x as m, ye as n, B as o, S as p, ce as r, ie as s, $ as t, ae as u };
|