reactive-md 0.9.2 → 0.9.3
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 +363 -333
- package/CHANGELOG.md +364 -334
- 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/bin/reactive-md.mjs +39 -39
- package/cli/args.mjs +263 -263
- package/cli/assets.mjs +395 -395
- package/cli/build.mjs +445 -445
- 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-D6zQkTkt.js +112 -0
- package/dist-library/{LocalDocumentViewCore-DXE0I0Qc.js → LocalDocumentViewCore-CmJhemcA.js} +356 -9441
- package/dist-library/LocalReactiveDocumentCore-lAKOGAZ7.js +283 -0
- package/dist-library/LocalStaticDocumentView-2J7w0sKm.js +143 -0
- package/dist-library/{authoring-Ci_KzJ0q.js → authoring-B14SsOXZ.js} +21 -20
- package/dist-library/chart-B1TUtzm-.js +3 -0
- package/dist-library/color-values-r8Wf7ALn.js +6 -0
- package/dist-library/{compile-Dx6Uw3D9.js → compile-D50B5_Ww.js} +25 -25
- package/dist-library/compile-cache-key-6GgpETz_.js +28 -0
- package/dist-library/compiler-DLkKUK4t.js +98 -0
- package/dist-library/{compiler-core-DDDdvuLy.js → compiler-core-Niqhp9wV.js} +2877 -3262
- package/dist-library/{registry-core-C9xOunaw.js → component-kernel-IG4wOO0i.js} +72 -195
- package/dist-library/{component-state-BRwvTV0d.js → component-state-Ht-hOK0W.js} +1 -1
- package/dist-library/component-utils-eSj5IdG4.js +338 -0
- package/dist-library/computations-CffoW7Ff.js +340 -0
- package/dist-library/config-validation-Cpol91_M.js +456 -0
- package/dist-library/controls-B-CLSK8Q.js +5927 -0
- package/dist-library/controls-DWlx-AQl.js +3 -0
- package/dist-library/{coordinate-B1VFK9fd.js → coordinate-PyLPMIQK.js} +85 -85
- package/dist-library/data-BtFlkJzp.js +3 -0
- package/dist-library/{data-table-8-3F15Jf.js → data-table-Kv_ZA2Z2.js} +14 -13
- package/dist-library/data-visuals-_Z7QqYTk.js +384 -0
- package/dist-library/{default-components-s21NevON.js → default-components-jugH7Ubr.js} +327 -326
- package/dist-library/{config-DXLvctiZ.js → default-config-DIrRpuQz.js} +103 -88
- package/dist-library/default-options-DU5dxuU6.js +125 -0
- package/dist-library/{registry-D6OGkOcX.js → default-registry-BlloaZi7.js} +4 -4
- package/dist-library/default-schema-Ch-Vznpm.js +33 -0
- package/dist-library/diagram-BLepzI8l.js +3 -0
- package/dist-library/{display-B_uutKkN.js → display-y4v9v0Qd.js} +1 -1
- package/dist-library/dist-Cueh1Psp.js +4761 -0
- package/dist-library/{document-theme-C8J6UyNO.js → document-theme-DBAfnk7y.js} +57 -2
- package/dist-library/{export-CIAIPBov.js → export-heVBqgxA.js} +64 -63
- package/dist-library/gallery-BC6FYTqw.js +3 -0
- package/dist-library/{gallery-Dv1rOvL0.js → gallery-Q6VPS2ep.js} +1 -1
- package/dist-library/{html-Cr4CBwAH.js → html-CCnvzan1.js} +49 -48
- package/dist-library/{incremental-9nx92u9c.js → incremental-Bzvh8_lB.js} +526 -379
- package/dist-library/{layout-BBB2VF0S.js → layout-BfUzzO2b.js} +147 -156
- package/dist-library/layout-BnfDeUNy.js +3 -0
- package/dist-library/limits-CFERRrlC.js +10 -0
- package/dist-library/localization-COdJ6lw2.js +6 -0
- package/dist-library/mafs-CnzDC5CR.js +3 -0
- package/dist-library/math-view-B0jthpRw.js +20 -0
- package/dist-library/motion-tokens-Czk0RDmS.js +283 -0
- package/dist-library/mount-preset-C_i37FvY.js +24 -0
- package/dist-library/numeric-sliders-CkWS0-ja.js +542 -0
- package/dist-library/{observability-4KqXhIEU.js → observability-CYLuvFfL.js} +124 -43
- package/dist-library/package-core-9UK5ZdqB.js +127 -0
- package/dist-library/parser-9yNJxGip.js +8 -0
- package/dist-library/parser-standard-BPIy4HOu.js +4872 -0
- package/dist-library/plugin-packs-CZb46nuv.js +19 -0
- package/dist-library/{preset-core-DeZPA8IE.js → preset-core-BW3NWZJ9.js} +212 -210
- package/dist-library/props-pJRrfDc6.js +179 -0
- package/dist-library/react-BSo0o998.js +32 -0
- package/dist-library/reactive-md-authoring.js +268 -257
- package/dist-library/reactive-md-build.js +7 -10
- package/dist-library/reactive-md-compiler-session.js +4 -0
- package/dist-library/reactive-md-compiler-standard.js +6 -6
- package/dist-library/reactive-md-compiler.js +3 -3
- package/dist-library/reactive-md-contracts.js +6 -0
- package/dist-library/reactive-md-default-packs.js +31 -15
- package/dist-library/reactive-md-default-preset.js +7 -7
- package/dist-library/reactive-md-export.js +6 -5
- package/dist-library/reactive-md-minimal-preset.js +2 -2
- package/dist-library/reactive-md-minimal-react-preset.js +22 -20
- package/dist-library/reactive-md-minimal.css +1 -1
- package/dist-library/reactive-md-observability.js +125 -3
- package/dist-library/reactive-md-pack-style-manifest.js +797 -0
- package/dist-library/reactive-md-plugin-chart.js +6 -5
- package/dist-library/reactive-md-plugin-data.js +8 -8
- package/dist-library/reactive-md-plugin-diagram.js +7 -6
- package/dist-library/reactive-md-plugin-forms.js +14 -13
- package/dist-library/reactive-md-plugin-gallery.js +6 -5
- package/dist-library/reactive-md-plugin-navigation.js +9 -9
- package/dist-library/reactive-md-plugin-network.js +13 -13
- package/dist-library/reactive-md-plugin-plot.js +7 -6
- package/dist-library/reactive-md-print.css +304 -304
- package/dist-library/reactive-md-react-component-accordion.js +10 -0
- package/dist-library/reactive-md-react-component-alert.js +10 -0
- package/dist-library/reactive-md-react-component-anchor.js +10 -0
- package/dist-library/reactive-md-react-component-badge.js +10 -0
- package/dist-library/reactive-md-react-component-card.js +10 -0
- package/dist-library/reactive-md-react-component-chart.js +22 -0
- package/dist-library/reactive-md-react-component-checkbox.js +10 -0
- package/dist-library/reactive-md-react-component-checklist.js +10 -0
- package/dist-library/reactive-md-react-component-choices.js +10 -0
- package/dist-library/reactive-md-react-component-column.js +6 -0
- package/dist-library/reactive-md-react-component-coordinate.js +21 -0
- package/dist-library/reactive-md-react-component-counter.js +10 -0
- package/dist-library/reactive-md-react-component-data-table.js +14 -0
- package/dist-library/reactive-md-react-component-date.js +10 -0
- package/dist-library/reactive-md-react-component-diagram.js +22 -0
- package/dist-library/reactive-md-react-component-disclosure.js +10 -0
- package/dist-library/reactive-md-react-component-edge.js +22 -0
- package/dist-library/reactive-md-react-component-gallery-item.js +10 -0
- package/dist-library/reactive-md-react-component-gallery.js +10 -0
- package/dist-library/reactive-md-react-component-grid.js +10 -0
- package/dist-library/reactive-md-react-component-if.js +10 -0
- package/dist-library/reactive-md-react-component-input.js +10 -0
- package/dist-library/reactive-md-react-component-jump.js +10 -0
- package/dist-library/reactive-md-react-component-multi-select.js +10 -0
- package/dist-library/reactive-md-react-component-node.js +22 -0
- package/dist-library/reactive-md-react-component-number.js +10 -0
- package/dist-library/reactive-md-react-component-option.js +10 -0
- package/dist-library/reactive-md-react-component-panel.js +10 -0
- package/dist-library/reactive-md-react-component-plot.js +26 -0
- package/dist-library/reactive-md-react-component-progress.js +10 -0
- package/dist-library/reactive-md-react-component-quiz.js +10 -0
- package/dist-library/reactive-md-react-component-radio-group.js +10 -0
- package/dist-library/reactive-md-react-component-range-slider.js +10 -0
- package/dist-library/reactive-md-react-component-section.js +10 -0
- package/dist-library/reactive-md-react-component-select.js +10 -0
- package/dist-library/reactive-md-react-component-slider.js +10 -0
- package/dist-library/reactive-md-react-component-step.js +10 -0
- package/dist-library/reactive-md-react-component-steps.js +10 -0
- package/dist-library/reactive-md-react-component-tab.js +10 -0
- package/dist-library/reactive-md-react-component-table.js +14 -0
- package/dist-library/reactive-md-react-component-tabs.js +10 -0
- package/dist-library/reactive-md-react-component-text.js +10 -0
- package/dist-library/reactive-md-react-component-textarea.js +10 -0
- package/dist-library/reactive-md-react-component-timeline.js +14 -0
- package/dist-library/reactive-md-react-component-timer.js +10 -0
- package/dist-library/reactive-md-react-component-toggle.js +10 -0
- package/dist-library/reactive-md-react-component-tooltip.js +10 -0
- package/dist-library/reactive-md-react-component-validation.js +10 -0
- package/dist-library/reactive-md-react-minimal.js +4 -4
- package/dist-library/reactive-md-react-pack-controls.js +44 -0
- package/dist-library/reactive-md-react-pack-data.js +21 -0
- package/dist-library/reactive-md-react-pack-layout.js +36 -0
- package/dist-library/reactive-md-react-pack-visuals.js +43 -0
- package/dist-library/reactive-md-react-packed.js +50 -0
- package/dist-library/reactive-md-react-server.js +26 -25
- package/dist-library/reactive-md-react-static-server.js +24 -0
- package/dist-library/reactive-md-react-static.js +1 -0
- package/dist-library/reactive-md-react-unstyled.js +15 -12
- package/dist-library/reactive-md-react.js +15 -12
- package/dist-library/reactive-md-scan.js +1 -0
- package/dist-library/reactive-md-sdk.js +9 -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 +32 -32
- package/dist-library/reactive-md-testing.js +12 -12
- package/dist-library/reactive-md-worker-pool.js +401 -0
- package/dist-library/reactive-md.css +1 -1
- package/dist-library/reactive-md.js +82 -1548
- package/dist-library/registry-core-CziAIP5P.js +125 -0
- package/dist-library/render-nodes-DKjg_TR1.js +9369 -0
- package/dist-library/requirements-DhIkxAbl.js +157 -0
- package/dist-library/resources-B_nbROgj.js +74 -0
- package/dist-library/rmd-pack-controls.css +1032 -0
- package/dist-library/rmd-pack-data.css +724 -0
- package/dist-library/rmd-pack-layout.css +1825 -0
- package/dist-library/rmd-pack-resource-chart.css +300 -0
- package/dist-library/rmd-pack-resource-controls.css +781 -0
- package/dist-library/rmd-pack-resource-data-visuals.css +501 -0
- package/dist-library/rmd-pack-resource-diagram.css +106 -0
- package/dist-library/rmd-pack-resource-gallery.css +346 -0
- package/dist-library/rmd-pack-resource-graphics.css +516 -0
- package/dist-library/rmd-pack-resource-layout.css +1480 -0
- package/dist-library/rmd-pack-resource-mafs-core.css +124 -0
- package/dist-library/rmd-pack-resource-mafs.css +129 -0
- package/dist-library/rmd-pack-resource-visual-base.css +224 -0
- package/dist-library/rmd-pack-visuals.css +1394 -0
- package/dist-library/{runtime-BpQdZmFI.js → runtime-CuJndKqK.js} +53 -52
- package/dist-library/runtime-requirement-C4-vNcf5.js +769 -0
- package/dist-library/schema-core-4sd1Vu7V.js +132 -0
- package/dist-library/{sdk-core-ChslheKs.js → sdk-core-BLsW9cCy.js} +497 -524
- package/dist-library/{session-core-dxQCJBNa.js → session-core-DLBRPV7f.js} +26 -25
- package/dist-library/{shareable-B8xMoGEa.js → shareable-C6mUerpQ.js} +145 -142
- package/dist-library/shared-bTzN-F4g.js +3 -0
- package/dist-library/structural-views-30-YD_TJ.js +11 -0
- package/dist-library/table-surface-CfZn_tk-.js +13 -0
- package/dist-library/types/assemblies/compile-cache-key.d.ts +11 -0
- package/dist-library/types/assemblies/default-config.d.ts +35 -0
- package/dist-library/types/{local/configuration/options.d.ts → assemblies/default-options.d.ts} +4 -4
- package/dist-library/types/assemblies/default-registry.d.ts +18 -0
- package/dist-library/types/{local/configuration/schema.d.ts → assemblies/default-schema.d.ts} +4 -4
- package/dist-library/types/authoring/catalog.d.ts +11 -1
- package/dist-library/types/authoring/extensions.d.ts +1 -1
- package/dist-library/types/authoring/index.d.ts +3 -3
- package/dist-library/types/authoring/templates.d.ts +1 -1
- package/dist-library/types/compiler/index.d.ts +1 -0
- package/dist-library/types/compiler/session.d.ts +19 -0
- package/dist-library/types/compiler/standard.d.ts +1 -0
- package/dist-library/types/components/entries/accordion.d.ts +3 -0
- package/dist-library/types/components/entries/alert.d.ts +3 -0
- package/dist-library/types/components/entries/anchor.d.ts +3 -0
- package/dist-library/types/components/entries/badge.d.ts +3 -0
- package/dist-library/types/components/entries/card.d.ts +3 -0
- package/dist-library/types/components/entries/chart.d.ts +3 -0
- package/dist-library/types/components/entries/checkbox.d.ts +3 -0
- package/dist-library/types/components/entries/checklist.d.ts +3 -0
- package/dist-library/types/components/entries/choices.d.ts +3 -0
- package/dist-library/types/components/entries/column.d.ts +3 -0
- package/dist-library/types/components/entries/coordinate.d.ts +3 -0
- package/dist-library/types/components/entries/counter.d.ts +3 -0
- package/dist-library/types/components/entries/data-table.d.ts +3 -0
- package/dist-library/types/components/entries/date.d.ts +3 -0
- package/dist-library/types/components/entries/diagram.d.ts +3 -0
- package/dist-library/types/components/entries/disclosure.d.ts +3 -0
- package/dist-library/types/components/entries/edge.d.ts +3 -0
- package/dist-library/types/components/entries/gallery-item.d.ts +3 -0
- package/dist-library/types/components/entries/gallery.d.ts +3 -0
- package/dist-library/types/components/entries/grid.d.ts +3 -0
- package/dist-library/types/components/entries/if.d.ts +3 -0
- package/dist-library/types/components/entries/input.d.ts +3 -0
- package/dist-library/types/components/entries/jump.d.ts +3 -0
- package/dist-library/types/components/entries/multi-select.d.ts +3 -0
- package/dist-library/types/components/entries/node.d.ts +3 -0
- package/dist-library/types/components/entries/number.d.ts +3 -0
- package/dist-library/types/components/entries/option.d.ts +3 -0
- package/dist-library/types/components/entries/panel.d.ts +3 -0
- package/dist-library/types/components/entries/plot.d.ts +3 -0
- package/dist-library/types/components/entries/progress.d.ts +3 -0
- package/dist-library/types/components/entries/quiz.d.ts +3 -0
- package/dist-library/types/components/entries/radio-group.d.ts +3 -0
- package/dist-library/types/components/entries/range-slider.d.ts +3 -0
- package/dist-library/types/components/entries/section.d.ts +3 -0
- package/dist-library/types/components/entries/select.d.ts +3 -0
- package/dist-library/types/components/entries/slider.d.ts +3 -0
- package/dist-library/types/components/entries/step.d.ts +3 -0
- package/dist-library/types/components/entries/steps.d.ts +3 -0
- package/dist-library/types/components/entries/tab.d.ts +3 -0
- package/dist-library/types/components/entries/table.d.ts +3 -0
- package/dist-library/types/components/entries/tabs.d.ts +3 -0
- package/dist-library/types/components/entries/text.d.ts +3 -0
- package/dist-library/types/components/entries/textarea.d.ts +3 -0
- package/dist-library/types/components/entries/timeline.d.ts +3 -0
- package/dist-library/types/components/entries/timer.d.ts +3 -0
- package/dist-library/types/components/entries/toggle.d.ts +3 -0
- package/dist-library/types/components/entries/tooltip.d.ts +3 -0
- package/dist-library/types/components/entries/validation.d.ts +3 -0
- package/dist-library/types/components/layout/layout.d.ts +1 -3
- package/dist-library/types/components/layout/structural-views.d.ts +3 -0
- package/dist-library/types/components/mount-preset.d.ts +2 -0
- package/dist-library/types/components/packs/controls.d.ts +2 -0
- package/dist-library/types/components/packs/data.d.ts +2 -0
- package/dist-library/types/components/packs/layout.d.ts +2 -0
- package/dist-library/types/components/packs/visuals.d.ts +2 -0
- package/dist-library/types/components/shared/data-visuals.d.ts +3 -0
- package/dist-library/types/components/shared/table-surface.d.ts +10 -0
- package/dist-library/types/components/shared/visual-helpers.d.ts +24 -0
- package/dist-library/types/components/shared/visuals.d.ts +0 -2
- package/dist-library/types/components/table/data-table-model.d.ts +48 -0
- package/dist-library/types/components/table/data-table.d.ts +1 -48
- package/dist-library/types/{local/configuration → contracts}/component-kernel.d.ts +4 -2
- package/dist-library/types/contracts/index.d.ts +8 -0
- package/dist-library/types/{local/configuration → contracts}/limits.d.ts +9 -1
- package/dist-library/types/contracts/localization.d.ts +6 -0
- package/dist-library/types/contracts/runtime-types.d.ts +19 -0
- package/dist-library/types/local/compilation/cache-version.d.ts +1 -0
- package/dist-library/types/local/compilation/compile-status.d.ts +2 -0
- package/dist-library/types/local/compilation/compiler-bindings.d.ts +1 -1
- package/dist-library/types/local/compilation/compiler-capabilities.d.ts +4 -1
- package/dist-library/types/local/compilation/compiler-core.d.ts +1 -1
- package/dist-library/types/local/compilation/compiler-embedding.d.ts +20 -0
- package/dist-library/types/local/compilation/compiler-expressions.d.ts +5 -4
- package/dist-library/types/local/compilation/compiler-structure.d.ts +1 -1
- package/dist-library/types/local/compilation/compiler-tables.d.ts +3 -2
- package/dist-library/types/local/compilation/compiler-validation.d.ts +5 -9
- package/dist-library/types/local/compilation/compiler-values.d.ts +1 -1
- package/dist-library/types/local/compilation/compiler.d.ts +1 -1
- package/dist-library/types/local/compilation/component-usage.d.ts +2 -0
- package/dist-library/types/local/compilation/runtime-requirement.d.ts +3 -0
- package/dist-library/types/local/compilation/session/incremental.d.ts +5 -1
- package/dist-library/types/local/compilation/streaming.d.ts +1 -1
- package/dist-library/types/local/configuration/diagnostic-messages.d.ts +55 -0
- package/dist-library/types/local/configuration/embedding.d.ts +4 -0
- package/dist-library/types/local/configuration/kernel-value-rules.d.ts +1 -1
- package/dist-library/types/local/configuration/options-core.d.ts +8 -2
- package/dist-library/types/local/index.d.ts +6 -1
- package/dist-library/types/local/observability-core.d.ts +20 -1
- package/dist-library/types/local/observability.d.ts +2 -0
- package/dist-library/types/local/parsing/parse-budget.d.ts +18 -2
- package/dist-library/types/local/parsing/parser-region.d.ts +13 -2
- package/dist-library/types/local/parsing/parser-tags.d.ts +6 -1
- package/dist-library/types/local/parsing/rmd-recovery.d.ts +8 -0
- package/dist-library/types/local/performance-report.d.ts +70 -0
- package/dist-library/types/local/runtime/runtime-pool.d.ts +14 -0
- package/dist-library/types/local/transport/worker-handler.d.ts +3 -0
- package/dist-library/types/local/transport/worker-job.d.ts +12 -2
- package/dist-library/types/local/transport/worker-pool.d.ts +68 -0
- package/dist-library/types/local/transport/worker.d.ts +14 -0
- package/dist-library/types/local/types.d.ts +37 -25
- package/dist-library/types/observability.d.ts +1 -0
- package/dist-library/types/presets/default-semantics.d.ts +1 -1
- package/dist-library/types/presets/identity.d.ts +1 -8
- package/dist-library/types/presets/pack-style-entry.d.ts +3 -0
- package/dist-library/types/presets/pack-style-manifest.d.ts +11 -0
- package/dist-library/types/react/component-api.d.ts +3 -2
- package/dist-library/types/react/component-loader.d.ts +61 -0
- package/dist-library/types/react/component-primitives.d.ts +5 -5
- package/dist-library/types/react/index.d.ts +9 -5
- package/dist-library/types/react/localization.d.ts +5 -6
- package/dist-library/types/react/minimal.d.ts +2 -2
- package/dist-library/types/react/package-core.d.ts +3 -0
- package/dist-library/types/react/packed.d.ts +17 -0
- package/dist-library/types/react/render-lifecycle.d.ts +9 -0
- package/dist-library/types/{local → react}/rendering/document/ExtendedHtmlFragment.d.ts +1 -1
- package/dist-library/types/{local → react}/rendering/document/LocalDocumentViewCore.d.ts +11 -4
- package/dist-library/types/react/rendering/document/LocalPooledDocumentView.d.ts +8 -0
- package/dist-library/types/react/rendering/document/LocalReactiveDocumentCore.d.ts +6 -0
- package/dist-library/types/react/rendering/document/LocalStaticDocumentView.d.ts +18 -0
- package/dist-library/types/react/rendering/document/StaticExternalSlot.d.ts +25 -0
- package/dist-library/types/react/rendering/document/StaticHostData.d.ts +14 -0
- package/dist-library/types/{local → react}/rendering/document/render-nodes.d.ts +8 -8
- package/dist-library/types/react/rendering/document/static-runtime.d.ts +11 -0
- package/dist-library/types/{local → react}/rendering/document/use-author-script.d.ts +2 -2
- package/dist-library/types/{local → react}/rendering/document/validation-state.d.ts +2 -2
- package/dist-library/types/{local → react}/rendering/document/view-render-context.d.ts +40 -8
- package/dist-library/types/{local → react}/rendering/document/view-revision.d.ts +2 -2
- package/dist-library/types/{local → react}/rendering/render-types.d.ts +5 -5
- package/dist-library/types/react/rendering/table/data-table.d.ts +5 -0
- package/dist-library/types/{local → react}/rendering/table/table-numeric-columns.d.ts +3 -3
- package/dist-library/types/react/sdk-core.d.ts +12 -3
- package/dist-library/types/react/sdk.d.ts +2 -1
- package/dist-library/types/react/server.d.ts +3 -10
- package/dist-library/types/react/static-server.d.ts +12 -0
- package/dist-library/types/scan/index.d.ts +15 -0
- package/dist-library/types/sdk/config.d.ts +2 -35
- package/dist-library/types/sdk/default-identity.d.ts +3 -0
- package/dist-library/types/sdk/index.d.ts +1 -1
- package/dist-library/types/sdk/preset.d.ts +9 -0
- package/dist-library/types/sdk/props.d.ts +8 -3
- package/dist-library/types/sdk/registry-core.d.ts +2 -2
- package/dist-library/types/sdk/registry.d.ts +2 -18
- package/dist-library/types/sdk/types.d.ts +2 -2
- package/dist-library/types/sdk/version.d.ts +2 -0
- package/dist-library/types/standalone/session-core.d.ts +1 -1
- package/dist-library/{types-Ib5kSScP.js → types-Bza88SGK.js} +1 -1
- package/dist-library/use-hydrated-W-laKPhY.js +22975 -0
- package/dist-library/validation-XXlb-spV.js +860 -0
- package/dist-library/{version-DAxuGOG2.js → version-B0G1699c.js} +24 -33
- package/dist-library/visual-frame-y5RFhJ0_.js +19 -0
- package/dist-library/visual-helpers-CRmaqCHX.js +75 -0
- package/dist-library/visuals-CdHezgh5.js +3 -0
- package/dist-library/visuals-CoVSjVD8.js +49159 -0
- package/dist-library/worker-D6WMV8xJ.js +1632 -0
- package/dist-standalone/reactive-md-standalone.css +1 -1
- package/dist-standalone/reactive-md-standalone.js +121 -120
- package/docs/README-ch.md +102 -101
- package/docs/README.md +102 -101
- package/docs/compatibility/compatibility-ch.md +146 -146
- package/docs/compatibility/compatibility-en.md +146 -146
- package/docs/compatibility/deprecation-ch.md +1 -1
- package/docs/compatibility/deprecation-en.md +1 -1
- 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 +1 -1
- package/docs/compatibility/support-matrix-en.md +1 -1
- 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 +269 -253
- package/docs/development/component-development-reference-en.md +254 -238
- package/docs/development/component-protocol-ch.md +768 -748
- package/docs/development/component-protocol-en.md +770 -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 +66 -64
- package/docs/integration/author-tools-en.md +66 -64
- package/docs/integration/compiler-ch.md +90 -49
- package/docs/integration/compiler-en.md +77 -36
- 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 +398 -394
- package/docs/integration/extension-sdk-en.md +383 -379
- package/docs/integration/local-integration-ch.md +648 -646
- package/docs/integration/local-integration-en.md +664 -662
- package/docs/integration/shareable-export-ch.md +307 -307
- package/docs/integration/shareable-export-en.md +309 -309
- 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 -93
- package/docs/reference/html-compatibility-en.md +95 -95
- 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 +114 -7
- package/docs/reference/public-api-en.md +114 -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.3-ch.md +45 -0
- package/docs/releases/release-0.9.3-en.md +45 -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 +114 -82
- package/examples/integration/README.md +114 -82
- package/examples/integration/chat-session/index.mjs +91 -0
- package/examples/integration/chat-session/package.json +10 -0
- 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/static-embed/embed.mjs +44 -0
- package/examples/integration/static-embed/index.html +12 -0
- package/examples/integration/static-embed/main.mjs +24 -0
- package/examples/integration/static-embed/references.mjs +5 -0
- package/examples/integration/static-embed/render.mjs +10 -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 +61 -2
- package/dist-library/LocalDocumentView-BuqgJZEY.js +0 -109
- package/dist-library/LocalReactiveDocumentCore-CWBe4Mm5.js +0 -275
- package/dist-library/compiler-dxLPB9Ym.js +0 -86
- package/dist-library/config-validation-D3D7Dy2J.js +0 -586
- package/dist-library/controls-DoZyLCrV.js +0 -6740
- package/dist-library/mount-preset-DMZ5wd3t.js +0 -13
- package/dist-library/options-BBp9IcHm.js +0 -121
- package/dist-library/package-core-K5xesGqy.js +0 -117
- package/dist-library/parser-standard-CBA1-hdG.js +0 -9630
- package/dist-library/plugin-packs-Bh1HhLym.js +0 -19
- package/dist-library/props-sJ8vk0cr.js +0 -183
- package/dist-library/react-0DCh-Mar.js +0 -7
- package/dist-library/resources-B0x_w3s9.js +0 -229
- package/dist-library/schema-BryM_VRW.js +0 -40
- package/dist-library/types/local/rendering/document/LocalReactiveDocumentCore.d.ts +0 -6
- package/dist-library/types/local/rendering/table/data-table.d.ts +0 -13
- package/dist-library/validation-B3RI0xOk.js +0 -1123
- package/dist-library/visual-frame-_rcd5HUv.js +0 -48
- package/dist-library/visuals-DkDhNdEZ.js +0 -72572
- /package/dist-library/types/{local/configuration → contracts}/color-values.d.ts +0 -0
- /package/dist-library/types/{local/html → contracts}/html-names.d.ts +0 -0
- /package/dist-library/types/{local/configuration → contracts}/schema-core.d.ts +0 -0
- /package/dist-library/types/{local → react}/rendering/code/code-block.d.ts +0 -0
- /package/dist-library/types/{local → react}/rendering/code/code-languages.d.ts +0 -0
- /package/dist-library/types/{local → react}/rendering/document/LocalDocumentView.d.ts +0 -0
- /package/dist-library/types/{local → react}/rendering/document/use-color-scheme.d.ts +0 -0
- /package/dist-library/types/{local → react}/rendering/image/image-view.d.ts +0 -0
- /package/dist-library/types/{local → react}/rendering/math-view.d.ts +0 -0
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { o as e } from "./compile-
|
|
2
|
-
import {
|
|
3
|
-
import { t as n } from "./registry-core-
|
|
4
|
-
import {
|
|
5
|
-
import { s as d } from "./
|
|
6
|
-
import {
|
|
7
|
-
import { t as m } from "./
|
|
8
|
-
import { i as h, n as
|
|
9
|
-
import {
|
|
1
|
+
import { o as e } from "./compile-D50B5_Ww.js";
|
|
2
|
+
import { n as t } from "./schema-core-4sd1Vu7V.js";
|
|
3
|
+
import { t as n } from "./registry-core-CziAIP5P.js";
|
|
4
|
+
import { t as r } from "./compiler-DLkKUK4t.js";
|
|
5
|
+
import { a as i, c as a, d as o, i as s, l as c, o as l, s as u, u as d } from "./default-components-jugH7Ubr.js";
|
|
6
|
+
import { s as f } from "./default-config-DIrRpuQz.js";
|
|
7
|
+
import { r as p, t as m } from "./default-options-DU5dxuU6.js";
|
|
8
|
+
import { i as h, n as g, r as _, t as v } from "./authoring-B14SsOXZ.js";
|
|
9
|
+
import { t as y } from "./parser-9yNJxGip.js";
|
|
10
|
+
import { a as ee, i as b, n as te, o as ne, r as re, s as ie, t as ae } from "./default-schema-Ch-Vznpm.js";
|
|
10
11
|
// src/authoring/editor-i18n.ts
|
|
11
|
-
var
|
|
12
|
+
var oe = {
|
|
12
13
|
en: {
|
|
13
14
|
boldPlaceholder: "bold text",
|
|
14
15
|
italicPlaceholder: "italic text",
|
|
@@ -57,11 +58,11 @@ var b = {
|
|
|
57
58
|
}
|
|
58
59
|
};
|
|
59
60
|
// src/authoring/editor-commands.ts
|
|
60
|
-
function
|
|
61
|
+
function se(e, t) {
|
|
61
62
|
return typeof e != "number" || Number.isNaN(e) ? 0 : Math.min(Math.max(Math.trunc(e), 0), t);
|
|
62
63
|
}
|
|
63
|
-
function
|
|
64
|
-
let n =
|
|
64
|
+
function x(e, t) {
|
|
65
|
+
let n = se(t.start, e.length), r = se(t.end, e.length);
|
|
65
66
|
return n <= r ? {
|
|
66
67
|
start: n,
|
|
67
68
|
end: r
|
|
@@ -70,14 +71,14 @@ function S(e, t) {
|
|
|
70
71
|
end: n
|
|
71
72
|
};
|
|
72
73
|
}
|
|
73
|
-
function
|
|
74
|
-
return
|
|
74
|
+
function S(e) {
|
|
75
|
+
return oe[e] ?? oe.en;
|
|
75
76
|
}
|
|
76
|
-
function
|
|
77
|
+
function C(e, t) {
|
|
77
78
|
return t <= 0 ? 0 : e.lastIndexOf("\n", t - 1) + 1;
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
-
let n =
|
|
80
|
+
function w(e, t) {
|
|
81
|
+
let n = C(e, t.start), r = t.end > t.start && e[t.end - 1] === "\n" ? t.end - 1 : t.end, i = e.indexOf("\n", r), a = i === -1 ? e.length : i, o = [], s = n;
|
|
81
82
|
for (;;) {
|
|
82
83
|
let t = e.indexOf("\n", s), n = t === -1 || t > a ? a : t;
|
|
83
84
|
if (o.push({
|
|
@@ -89,7 +90,7 @@ function T(e, t) {
|
|
|
89
90
|
}
|
|
90
91
|
return o;
|
|
91
92
|
}
|
|
92
|
-
function
|
|
93
|
+
function T(e, t, n) {
|
|
93
94
|
if (n.length === 0) return {
|
|
94
95
|
value: e,
|
|
95
96
|
selection: t
|
|
@@ -123,7 +124,7 @@ function E(e, t, n) {
|
|
|
123
124
|
}
|
|
124
125
|
};
|
|
125
126
|
}
|
|
126
|
-
function
|
|
127
|
+
function E(e, t, n, r) {
|
|
127
128
|
return t === e.text ? null : {
|
|
128
129
|
start: e.start,
|
|
129
130
|
end: e.end,
|
|
@@ -132,13 +133,13 @@ function D(e, t, n, r) {
|
|
|
132
133
|
newPrefixLength: r
|
|
133
134
|
};
|
|
134
135
|
}
|
|
135
|
-
function
|
|
136
|
+
function D(e, t, n, r) {
|
|
136
137
|
return n === "*" ? r ? e[t.start - 1] !== "*" && e[t.end] !== "*" : e[t.start - n.length - 1] !== "*" && e[t.end + n.length] !== "*" : !0;
|
|
137
138
|
}
|
|
138
139
|
function O(e, t, n, r) {
|
|
139
|
-
let i =
|
|
140
|
+
let i = x(e, t), a = n.length, { start: o, end: s } = i, c = e.slice(o, s);
|
|
140
141
|
if (o !== s) {
|
|
141
|
-
if (c.length >= a * 2 && c.startsWith(n) && c.endsWith(n) && (n !== "*" || !c.startsWith("**") && !c.endsWith("**")) &&
|
|
142
|
+
if (c.length >= a * 2 && c.startsWith(n) && c.endsWith(n) && (n !== "*" || !c.startsWith("**") && !c.endsWith("**")) && D(e, i, n, !0)) {
|
|
142
143
|
let t = c.slice(a, c.length - a);
|
|
143
144
|
return {
|
|
144
145
|
value: e.slice(0, o) + t + e.slice(s),
|
|
@@ -149,7 +150,7 @@ function O(e, t, n, r) {
|
|
|
149
150
|
};
|
|
150
151
|
}
|
|
151
152
|
let t = o - a, r = s + a;
|
|
152
|
-
return t >= 0 && r <= e.length && e.slice(t, o) === n && e.slice(s, r) === n &&
|
|
153
|
+
return t >= 0 && r <= e.length && e.slice(t, o) === n && e.slice(s, r) === n && D(e, i, n, !1) ? {
|
|
153
154
|
value: e.slice(0, t) + c + e.slice(r),
|
|
154
155
|
selection: {
|
|
155
156
|
start: t,
|
|
@@ -173,13 +174,13 @@ function O(e, t, n, r) {
|
|
|
173
174
|
};
|
|
174
175
|
}
|
|
175
176
|
function ce(e, t, n = "en") {
|
|
176
|
-
return O(e, t, "**",
|
|
177
|
+
return O(e, t, "**", S(n).boldPlaceholder);
|
|
177
178
|
}
|
|
178
179
|
function le(e, t, n = "en") {
|
|
179
|
-
return O(e, t, "*",
|
|
180
|
+
return O(e, t, "*", S(n).italicPlaceholder);
|
|
180
181
|
}
|
|
181
182
|
function ue(e, t, n = "en") {
|
|
182
|
-
return O(e, t, "~~",
|
|
183
|
+
return O(e, t, "~~", S(n).strikePlaceholder);
|
|
183
184
|
}
|
|
184
185
|
function k(e) {
|
|
185
186
|
let t = 0;
|
|
@@ -202,9 +203,9 @@ function de(e, t) {
|
|
|
202
203
|
return !d || k(i) >= d.run ? null : d;
|
|
203
204
|
}
|
|
204
205
|
function fe(e, t, n = "en") {
|
|
205
|
-
let r =
|
|
206
|
+
let r = x(e, t), { start: i, end: a } = r, o = e.slice(i, a);
|
|
206
207
|
if (i === a) {
|
|
207
|
-
let t =
|
|
208
|
+
let t = S(n).inlineCodePlaceholder, r = `\`${t}\``;
|
|
208
209
|
return {
|
|
209
210
|
value: e.slice(0, i) + r + e.slice(a),
|
|
210
211
|
selection: {
|
|
@@ -246,14 +247,14 @@ function fe(e, t, n = "en") {
|
|
|
246
247
|
}
|
|
247
248
|
var pe = /^(#{1,6})[ \t]+/;
|
|
248
249
|
function me(e, t, n) {
|
|
249
|
-
let r =
|
|
250
|
-
for (let t of
|
|
250
|
+
let r = x(e, t), i = [];
|
|
251
|
+
for (let t of w(e, r)) {
|
|
251
252
|
let e = pe.exec(t.text), r = e ? e[0].length : 0;
|
|
252
253
|
if (n === 0 && !e) continue;
|
|
253
|
-
let a = t.text.slice(r), o = n === 0 ? "" : `${"#".repeat(n)} `, s =
|
|
254
|
+
let a = t.text.slice(r), o = n === 0 ? "" : `${"#".repeat(n)} `, s = E(t, o + a, r, o.length);
|
|
254
255
|
s && i.push(s);
|
|
255
256
|
}
|
|
256
|
-
return
|
|
257
|
+
return T(e, r, i);
|
|
257
258
|
}
|
|
258
259
|
var j = /^([ \t]*)([-*+] )/, M = /^([ \t]*)(\d+[.)] )/, N = /^([ \t]*)([-*+] \[[ xX]\] )/, P = /^([ \t]*)(> ?)/;
|
|
259
260
|
function F(e, t) {
|
|
@@ -271,7 +272,7 @@ function he(e) {
|
|
|
271
272
|
return t ? t[0] : "";
|
|
272
273
|
}
|
|
273
274
|
function I(e, t, n, r) {
|
|
274
|
-
let i =
|
|
275
|
+
let i = x(e, t), a = w(e, i), o = a.map((e) => n(e.text)), s = 0, c = !0;
|
|
275
276
|
for (let e = 0; e < a.length; e += 1) {
|
|
276
277
|
let t = a[e];
|
|
277
278
|
(o[e] || t.text.trim().length > 0) && (s += 1, o[e] || (c = !1));
|
|
@@ -281,14 +282,14 @@ function I(e, t, n, r) {
|
|
|
281
282
|
let t = a[e], n = o[e] ?? null;
|
|
282
283
|
if (l) {
|
|
283
284
|
if (!n) continue;
|
|
284
|
-
let e =
|
|
285
|
+
let e = E(t, n.indent + t.text.slice(n.prefixLength), n.prefixLength, n.indent.length);
|
|
285
286
|
e && u.push(e);
|
|
286
287
|
continue;
|
|
287
288
|
}
|
|
288
|
-
let i = n ? n.indent : he(t.text), s = t.text.slice(n ? n.prefixLength : i.length), c = r(i, e + 1), d =
|
|
289
|
+
let i = n ? n.indent : he(t.text), s = t.text.slice(n ? n.prefixLength : i.length), c = r(i, e + 1), d = E(t, i + c + s, n ? n.prefixLength : i.length, i.length + c.length);
|
|
289
290
|
d && u.push(d);
|
|
290
291
|
}
|
|
291
|
-
return
|
|
292
|
+
return T(e, i, u);
|
|
292
293
|
}
|
|
293
294
|
function ge(e, t) {
|
|
294
295
|
return I(e, t, (e) => F(e, j), () => "- ");
|
|
@@ -303,8 +304,8 @@ function ye(e, t) {
|
|
|
303
304
|
return I(e, t, (e) => F(e, P), () => "> ");
|
|
304
305
|
}
|
|
305
306
|
function be(e, t) {
|
|
306
|
-
let n =
|
|
307
|
-
return
|
|
307
|
+
let n = x(e, t);
|
|
308
|
+
return T(e, n, w(e, n).map((e) => ({
|
|
308
309
|
start: e.start,
|
|
309
310
|
end: e.end,
|
|
310
311
|
text: ` ${e.text}`,
|
|
@@ -325,17 +326,17 @@ function xe(e) {
|
|
|
325
326
|
};
|
|
326
327
|
}
|
|
327
328
|
function Se(e, t) {
|
|
328
|
-
let n =
|
|
329
|
-
for (let t of
|
|
329
|
+
let n = x(e, t), r = [];
|
|
330
|
+
for (let t of w(e, n)) {
|
|
330
331
|
let e = xe(t.text);
|
|
331
332
|
if (e.removed === 0) continue;
|
|
332
|
-
let n =
|
|
333
|
+
let n = E(t, e.text, e.removed, 0);
|
|
333
334
|
n && r.push(n);
|
|
334
335
|
}
|
|
335
|
-
return
|
|
336
|
+
return T(e, n, r);
|
|
336
337
|
}
|
|
337
338
|
function Ce(e, t, n = "en") {
|
|
338
|
-
let { start: r, end: i } =
|
|
339
|
+
let { start: r, end: i } = x(e, t), a = e.slice(r, i), o = "https://example.com";
|
|
339
340
|
if (a.length > 0) {
|
|
340
341
|
let t = `[${a}](${o})`, n = r + 1 + a.length + 2;
|
|
341
342
|
return {
|
|
@@ -346,7 +347,7 @@ function Ce(e, t, n = "en") {
|
|
|
346
347
|
}
|
|
347
348
|
};
|
|
348
349
|
}
|
|
349
|
-
let s =
|
|
350
|
+
let s = S(n).linkText, c = `[${s}](${o})`;
|
|
350
351
|
return {
|
|
351
352
|
value: e.slice(0, r) + c + e.slice(i),
|
|
352
353
|
selection: {
|
|
@@ -356,7 +357,7 @@ function Ce(e, t, n = "en") {
|
|
|
356
357
|
};
|
|
357
358
|
}
|
|
358
359
|
function we(e, t, n = "en") {
|
|
359
|
-
let { start: r, end: i } =
|
|
360
|
+
let { start: r, end: i } = x(e, t), a = e.slice(r, i), o = "images/example.png";
|
|
360
361
|
if (a.length > 0) {
|
|
361
362
|
let t = ``, n = r + 2 + a.length + 2;
|
|
362
363
|
return {
|
|
@@ -367,7 +368,7 @@ function we(e, t, n = "en") {
|
|
|
367
368
|
}
|
|
368
369
|
};
|
|
369
370
|
}
|
|
370
|
-
let s =
|
|
371
|
+
let s = S(n).imageAlt, c = ``;
|
|
371
372
|
return {
|
|
372
373
|
value: e.slice(0, r) + c + e.slice(i),
|
|
373
374
|
selection: {
|
|
@@ -377,8 +378,8 @@ function we(e, t, n = "en") {
|
|
|
377
378
|
};
|
|
378
379
|
}
|
|
379
380
|
function Te(e, t, n = "en") {
|
|
380
|
-
let r =
|
|
381
|
-
return
|
|
381
|
+
let r = x(e, t), i = e.slice(r.start, r.end), a = i.length > 0 ? i : S(n).codeBlockPlaceholder, o = "`".repeat(Math.max(3, k(a) + 1)), s = `${o}text\n`;
|
|
382
|
+
return L(e, r, `${s}${a}\n${o}`, {
|
|
382
383
|
start: s.length,
|
|
383
384
|
end: s.length + a.length
|
|
384
385
|
});
|
|
@@ -390,11 +391,11 @@ function Ee(e) {
|
|
|
390
391
|
...e.tableRows.map((e) => `| ${e.join(" | ")} |`)
|
|
391
392
|
].join("\n");
|
|
392
393
|
}
|
|
393
|
-
function
|
|
394
|
-
let n =
|
|
394
|
+
function De(e, t) {
|
|
395
|
+
let n = C(e, t.start), r = e.slice(n, t.start), i = e.indexOf("\n", t.end), a = i === -1 ? e.length : i, o = e.slice(t.end, a), s = "";
|
|
395
396
|
if (/\S/.test(r)) s = "\n\n";
|
|
396
397
|
else if (n > 0) {
|
|
397
|
-
let t =
|
|
398
|
+
let t = C(e, n - 1);
|
|
398
399
|
/\S/.test(e.slice(t, n - 1)) && (s = "\n");
|
|
399
400
|
}
|
|
400
401
|
return {
|
|
@@ -402,8 +403,8 @@ function L(e, t) {
|
|
|
402
403
|
suffix: /\S/.test(o) ? "\n\n" : ""
|
|
403
404
|
};
|
|
404
405
|
}
|
|
405
|
-
function
|
|
406
|
-
let { prefix: i, suffix: a } =
|
|
406
|
+
function L(e, t, n, r) {
|
|
407
|
+
let { prefix: i, suffix: a } = De(e, t), o = t.start + i.length;
|
|
407
408
|
return {
|
|
408
409
|
value: e.slice(0, t.start) + i + n + a + e.slice(t.end),
|
|
409
410
|
selection: {
|
|
@@ -412,21 +413,21 @@ function R(e, t, n, r) {
|
|
|
412
413
|
}
|
|
413
414
|
};
|
|
414
415
|
}
|
|
415
|
-
function
|
|
416
|
-
let r =
|
|
417
|
-
return
|
|
416
|
+
function Oe(e, t, n = "en") {
|
|
417
|
+
let r = x(e, t), i = S(n), a = Ee(i), o = i.tableRows[0][0], s = a.indexOf(o);
|
|
418
|
+
return L(e, r, a, {
|
|
418
419
|
start: s,
|
|
419
420
|
end: s + o.length
|
|
420
421
|
});
|
|
421
422
|
}
|
|
422
|
-
function
|
|
423
|
-
return
|
|
423
|
+
function ke(e, t) {
|
|
424
|
+
return L(e, x(e, t), "---", {
|
|
424
425
|
start: 3,
|
|
425
426
|
end: 3
|
|
426
427
|
});
|
|
427
428
|
}
|
|
428
|
-
function
|
|
429
|
-
let r =
|
|
429
|
+
function Ae(e, t, n) {
|
|
430
|
+
let r = x(e, t), i = r.start + n.length;
|
|
430
431
|
return {
|
|
431
432
|
value: e.slice(0, r.start) + n + e.slice(r.end),
|
|
432
433
|
selection: {
|
|
@@ -435,11 +436,11 @@ function ke(e, t, n) {
|
|
|
435
436
|
}
|
|
436
437
|
};
|
|
437
438
|
}
|
|
438
|
-
var
|
|
439
|
-
function
|
|
439
|
+
var R = /\{\{(selection(?::[^{}]*)?|caret|select:[^{}]*)\}\}/g;
|
|
440
|
+
function je(e, t) {
|
|
440
441
|
let n = "", r = 0, i = null, a = null, o = null;
|
|
441
|
-
|
|
442
|
-
for (let s =
|
|
442
|
+
R.lastIndex = 0;
|
|
443
|
+
for (let s = R.exec(e); s; s = R.exec(e)) {
|
|
443
444
|
let c = s.index;
|
|
444
445
|
n += e.slice(r, c), r = c + s[0].length;
|
|
445
446
|
let l = s[1] ?? "";
|
|
@@ -470,8 +471,8 @@ function Ae(e, t) {
|
|
|
470
471
|
caret: o
|
|
471
472
|
};
|
|
472
473
|
}
|
|
473
|
-
function
|
|
474
|
-
let i =
|
|
474
|
+
function z(e, t, n, r = {}) {
|
|
475
|
+
let i = x(e, t), a = je(n, e.slice(i.start, i.end)), o = r.block === !0 && a.text.length > 0 ? De(e, i) : {
|
|
475
476
|
prefix: "",
|
|
476
477
|
suffix: ""
|
|
477
478
|
}, s = i.start + o.prefix.length, c;
|
|
@@ -492,7 +493,7 @@ function B(e, t, n, r = {}) {
|
|
|
492
493
|
selection: c
|
|
493
494
|
};
|
|
494
495
|
}
|
|
495
|
-
function
|
|
496
|
+
function Me(e, t) {
|
|
496
497
|
let n = [], r = 0;
|
|
497
498
|
for (; r < e.length;) {
|
|
498
499
|
if (e[r] !== t) {
|
|
@@ -509,18 +510,18 @@ function je(e, t) {
|
|
|
509
510
|
}
|
|
510
511
|
return n;
|
|
511
512
|
}
|
|
512
|
-
function
|
|
513
|
-
if (t === "inlineCode") return
|
|
514
|
-
let n =
|
|
513
|
+
function Ne(e, t) {
|
|
514
|
+
if (t === "inlineCode") return Me(e, "`");
|
|
515
|
+
let n = Me(e, t === "strike" ? "~" : "*");
|
|
515
516
|
return t === "italic" ? n.filter((e) => e.length % 2 == 1) : n.filter((e) => e.length >= 2);
|
|
516
517
|
}
|
|
517
|
-
function
|
|
518
|
+
function Pe(e, t, n) {
|
|
518
519
|
return e >= t ? !1 : n.some((r) => r.start === e && n.some((e) => e.end === t && e.length === r.length && e.start >= r.end));
|
|
519
520
|
}
|
|
520
|
-
function
|
|
521
|
+
function Fe(e, t, n) {
|
|
521
522
|
return e >= t ? !1 : n.some((r) => r.end === e && n.some((e) => e.start === t && e.length === r.length && e.start >= r.end));
|
|
522
523
|
}
|
|
523
|
-
function
|
|
524
|
+
function Ie(e, t) {
|
|
524
525
|
let n = 0;
|
|
525
526
|
for (; n < t.length;) {
|
|
526
527
|
let r = t[n], i = n + 1;
|
|
@@ -534,14 +535,14 @@ function Fe(e, t) {
|
|
|
534
535
|
}
|
|
535
536
|
return !1;
|
|
536
537
|
}
|
|
537
|
-
function
|
|
538
|
+
function B(e, t, n, r) {
|
|
538
539
|
if (t.start !== t.end) {
|
|
539
|
-
let n =
|
|
540
|
-
return
|
|
540
|
+
let n = Ne(e, r);
|
|
541
|
+
return Pe(t.start, t.end, n) || Fe(t.start, t.end, n);
|
|
541
542
|
}
|
|
542
|
-
return
|
|
543
|
+
return Ie(Math.min(Math.max(t.start - n.start, 0), n.text.length), Ne(n.text, r).filter((e) => e.start >= Le(n.text)));
|
|
543
544
|
}
|
|
544
|
-
function
|
|
545
|
+
function Le(e) {
|
|
545
546
|
let t = 0;
|
|
546
547
|
for (;;) {
|
|
547
548
|
let n = e.slice(t), r = F(n, N) ?? F(n, j) ?? F(n, M) ?? F(n, P);
|
|
@@ -549,83 +550,83 @@ function Ie(e) {
|
|
|
549
550
|
t += r.prefixLength;
|
|
550
551
|
}
|
|
551
552
|
}
|
|
552
|
-
function
|
|
553
|
+
function Re(e) {
|
|
553
554
|
return F(e, N) ? "task" : F(e, j) ? "bullet" : F(e, M) ? "ordered" : null;
|
|
554
555
|
}
|
|
555
|
-
function
|
|
556
|
-
let n =
|
|
556
|
+
function ze(e, t) {
|
|
557
|
+
let n = x(e, t), r = w(e, {
|
|
557
558
|
start: n.start,
|
|
558
559
|
end: n.start
|
|
559
560
|
})[0], i = r.text, a = pe.exec(i);
|
|
560
561
|
return {
|
|
561
562
|
headingLevel: a ? a[1].length : 0,
|
|
562
|
-
bold:
|
|
563
|
-
italic:
|
|
564
|
-
strike:
|
|
565
|
-
inlineCode:
|
|
566
|
-
list:
|
|
563
|
+
bold: B(e, n, r, "bold"),
|
|
564
|
+
italic: B(e, n, r, "italic"),
|
|
565
|
+
strike: B(e, n, r, "strike"),
|
|
566
|
+
inlineCode: B(e, n, r, "inlineCode"),
|
|
567
|
+
list: Re(i),
|
|
567
568
|
quote: F(i, P) !== null
|
|
568
569
|
};
|
|
569
570
|
}
|
|
570
571
|
// src/authoring/native-components.ts
|
|
571
|
-
var
|
|
572
|
+
var Be = Object.freeze(s.map((e) => ({
|
|
572
573
|
id: e.id,
|
|
573
|
-
label:
|
|
574
|
+
label: o(e.title, "en", e.id)
|
|
574
575
|
})));
|
|
575
|
-
function
|
|
576
|
-
let n =
|
|
576
|
+
function Ve(e, t) {
|
|
577
|
+
let n = l[e];
|
|
577
578
|
return {
|
|
578
579
|
id: e,
|
|
579
|
-
label:
|
|
580
|
-
description:
|
|
580
|
+
label: o(n.title, t, e),
|
|
581
|
+
description: o(n.description, t, e),
|
|
581
582
|
group: n.category,
|
|
582
|
-
keywords: [...
|
|
583
|
+
keywords: [...a(e) ?? []],
|
|
583
584
|
...n.inline === !0 ? { inline: !0 } : {},
|
|
584
|
-
template:
|
|
585
|
+
template: o(n.insertText, t, n.insertText.en ?? "")
|
|
585
586
|
};
|
|
586
587
|
}
|
|
587
|
-
var
|
|
588
|
+
var V = i.map((e) => Ve(e, "en")), H = Object.freeze(s.map((e) => ({
|
|
588
589
|
id: e.id,
|
|
589
|
-
label:
|
|
590
|
-
}))),
|
|
590
|
+
label: o(e.title, "zh", e.id)
|
|
591
|
+
}))), U = i.map((e) => Ve(e, "zh")), He = V.filter((e) => l[e.id]?.extended === !0), Ue = Object.freeze(Object.fromEntries(U.filter((e) => l[e.id]?.extended === !0).map((e) => [e.id, Object.freeze({
|
|
591
592
|
label: e.label,
|
|
592
593
|
description: e.description,
|
|
593
594
|
keywords: Object.freeze([...e.keywords]),
|
|
594
595
|
template: e.template
|
|
595
596
|
})])));
|
|
596
|
-
function
|
|
597
|
+
function We(e = "en") {
|
|
597
598
|
return e === "zh" ? {
|
|
598
|
-
groups:
|
|
599
|
-
components:
|
|
599
|
+
groups: H,
|
|
600
|
+
components: U
|
|
600
601
|
} : {
|
|
601
|
-
groups:
|
|
602
|
-
components:
|
|
602
|
+
groups: Be,
|
|
603
|
+
components: V
|
|
603
604
|
};
|
|
604
605
|
}
|
|
605
|
-
function
|
|
606
|
+
function Ge(e) {
|
|
606
607
|
return new Set(e.match(/[A-Za-z_][A-Za-z0-9_]*/g) ?? []);
|
|
607
608
|
}
|
|
608
|
-
function
|
|
609
|
+
function Ke(e) {
|
|
609
610
|
let t = e.trim().replace(/[^A-Za-z0-9_]/g, "_");
|
|
610
611
|
return t ? /^[0-9]/.test(t) ? `_${t}` : t : "value";
|
|
611
612
|
}
|
|
612
|
-
function
|
|
613
|
+
function qe(e, t) {
|
|
613
614
|
if (!t.has(e)) return e;
|
|
614
615
|
let n = 2;
|
|
615
616
|
for (; t.has(`${e}${n}`);) n += 1;
|
|
616
617
|
return `${e}${n}`;
|
|
617
618
|
}
|
|
618
|
-
function
|
|
619
|
-
let r =
|
|
619
|
+
function W(e, t, n) {
|
|
620
|
+
let r = Ge(t), i = /* @__PURE__ */ new Map();
|
|
620
621
|
return e.template.replace(/\{\{bind:([^{}]+)\}\}/g, (e, t) => {
|
|
621
622
|
let n = t.trim(), a = i.get(n);
|
|
622
623
|
if (a) return a;
|
|
623
|
-
let o = Ke(
|
|
624
|
+
let o = qe(Ke(n), r);
|
|
624
625
|
return r.add(o), i.set(n, o), o;
|
|
625
626
|
});
|
|
626
627
|
}
|
|
627
628
|
// src/authoring/templates.ts
|
|
628
|
-
function
|
|
629
|
+
function G(e) {
|
|
629
630
|
let t = {};
|
|
630
631
|
for (let [n, r] of Object.entries(e.props)) t[n] = {
|
|
631
632
|
kind: r.kind,
|
|
@@ -640,22 +641,22 @@ function K(e) {
|
|
|
640
641
|
};
|
|
641
642
|
return t;
|
|
642
643
|
}
|
|
643
|
-
function
|
|
644
|
+
function Je(e) {
|
|
644
645
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
645
646
|
}
|
|
646
|
-
function
|
|
647
|
-
return e === null ? "" :
|
|
647
|
+
function Ye(e) {
|
|
648
|
+
return e === null ? "" : Je(String(e));
|
|
648
649
|
}
|
|
649
|
-
function
|
|
650
|
+
function Xe(t) {
|
|
650
651
|
let n = t.replace(/[^A-Za-z0-9_]/g, "_"), r = /^[0-9]/.test(n) ? `_${n}` : n;
|
|
651
652
|
return e.has(r) ? `${r}_value` : r;
|
|
652
653
|
}
|
|
653
|
-
function
|
|
654
|
-
if (e.defaultValue !== void 0 && e.defaultValue !== null) return
|
|
654
|
+
function Ze(e, t) {
|
|
655
|
+
if (e.defaultValue !== void 0 && e.defaultValue !== null) return Ye(e.defaultValue);
|
|
655
656
|
switch (e.kind) {
|
|
656
657
|
case "boolean": return "false";
|
|
657
658
|
case "enum":
|
|
658
|
-
if (e.values?.length) return
|
|
659
|
+
if (e.values?.length) return Ye(e.values[0]);
|
|
659
660
|
throw Error(`${t} is a required enum without values; provide an authoring.insertText.`);
|
|
660
661
|
case "number": {
|
|
661
662
|
let n = e.min === void 0 ? void 0 : e.integer ? Math.ceil(e.min) : e.min, r = e.max === void 0 ? void 0 : e.integer ? Math.floor(e.max) : e.max;
|
|
@@ -671,22 +672,24 @@ function Xe(e, t) {
|
|
|
671
672
|
default: throw Error(`${t} has an unsupported property kind; provide an authoring.insertText.`);
|
|
672
673
|
}
|
|
673
674
|
}
|
|
674
|
-
function
|
|
675
|
+
function Qe(e) {
|
|
675
676
|
if (e.structure && e.structure.rule !== "none" && e.structure.rule !== "any" && e.structure.rule !== "inline") return !0;
|
|
676
677
|
let t = e.children;
|
|
677
678
|
return Array.isArray(t) ? t.some((e) => typeof e == "object" && !!e && (e.required === !0 || typeof e.min == "number" && e.min > 0)) : typeof t == "object" && t ? t.required === !0 || typeof t.min == "number" && t.min > 0 : !1;
|
|
678
679
|
}
|
|
679
|
-
function
|
|
680
|
+
function $e(e, t) {
|
|
680
681
|
let n = e.name, r = e.form;
|
|
681
682
|
if (r !== "leaf" && r !== "inline" && r !== "container") throw Error(`component "${n}" has an unsupported form; provide an authoring.insertText.`);
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
let
|
|
687
|
-
|
|
688
|
-
}
|
|
689
|
-
|
|
683
|
+
let i = e.structure?.rule === "raw-body";
|
|
684
|
+
if (i && r !== "container") throw Error(`component "${n}" declares a raw body on a non-container form; provide an authoring.insertText.`);
|
|
685
|
+
if (!i && Qe(e)) throw Error(`component "${n}" requires children; provide an authoring.insertText.`);
|
|
686
|
+
let a = Object.entries(e.bindings ?? {}), o = new Set(a.flatMap(([, e]) => [e.bind, e.initial])), s = [];
|
|
687
|
+
for (let [e, t] of a) s.push(`${t.bind}="${Xe(e === "value" ? n : `${n}_${e}`)}"`);
|
|
688
|
+
for (let [e, r] of Object.entries(t)) r.required && (o.has(e) || s.push(`${e}="${Ze(r, `component "${n}" property "${e}"`)}"`));
|
|
689
|
+
let c = `<${n}${s.length > 0 ? ` ${s.join(" ")}` : ""}`;
|
|
690
|
+
return r === "leaf" ? `${c}>` : r === "inline" ? `${c}></${n}>` : i ? `${c}>${(e.structure?.min ?? 0) > 0 ? "\n…\n" : "\n\n"}</${n}>` : `${c}>\n\n</${n}>`;
|
|
691
|
+
}
|
|
692
|
+
var et = {
|
|
690
693
|
id: "authoring-template",
|
|
691
694
|
label: "",
|
|
692
695
|
description: "",
|
|
@@ -694,64 +697,67 @@ var $e = {
|
|
|
694
697
|
keywords: [],
|
|
695
698
|
template: ""
|
|
696
699
|
};
|
|
697
|
-
function
|
|
698
|
-
let n =
|
|
699
|
-
|
|
700
|
+
function K(e, t = "") {
|
|
701
|
+
let n = W({
|
|
702
|
+
...et,
|
|
700
703
|
template: e
|
|
701
704
|
}, t);
|
|
702
|
-
return
|
|
705
|
+
return z(t, {
|
|
703
706
|
start: t.length,
|
|
704
707
|
end: t.length
|
|
705
708
|
}, n).value.slice(t.length);
|
|
706
709
|
}
|
|
707
|
-
function
|
|
710
|
+
function tt(e) {
|
|
708
711
|
return e.diagnostics.map((e) => `${e.code}: ${e.message}`).join("; ");
|
|
709
712
|
}
|
|
710
|
-
function
|
|
711
|
-
let n =
|
|
713
|
+
function nt(e, t) {
|
|
714
|
+
let n = K(t), r = `</${e}>`, i = n.lastIndexOf(r);
|
|
712
715
|
if (!(i < 0)) return {
|
|
713
716
|
before: `${n.slice(0, i)}\n`,
|
|
714
717
|
after: `\n${n.slice(i)}`
|
|
715
718
|
};
|
|
716
719
|
}
|
|
717
|
-
function
|
|
718
|
-
let
|
|
720
|
+
function rt(e, t, n, i) {
|
|
721
|
+
let a = i === void 0 ? K(e) : K(e, i.before), o = i === void 0 ? a : `${i.before}${a}${i.after}`, s;
|
|
719
722
|
try {
|
|
720
|
-
|
|
723
|
+
s = r(o, t ?? {});
|
|
721
724
|
} catch (e) {
|
|
722
725
|
throw Error(`${n} authoring.insertText could not be compiled: ${e instanceof Error ? e.message : String(e)}.`);
|
|
723
726
|
}
|
|
724
|
-
if (
|
|
725
|
-
let
|
|
726
|
-
throw Error(`${n} authoring.insertText does not compile with this configuration${
|
|
727
|
+
if (s.ok) return;
|
|
728
|
+
let c = tt(s);
|
|
729
|
+
throw Error(`${n} authoring.insertText does not compile with this configuration${c ? ` (${c})` : ""}.`);
|
|
727
730
|
}
|
|
728
|
-
function
|
|
729
|
-
let
|
|
731
|
+
function it(e, t, n, i) {
|
|
732
|
+
let a = i === void 0 ? e : `${i.before}${e}${i.after}`, o;
|
|
730
733
|
try {
|
|
731
|
-
|
|
734
|
+
o = r(a, t ?? {});
|
|
732
735
|
} catch (e) {
|
|
733
736
|
throw Error(`${n} has no authoring.insertText and its synthesized template could not be compiled: ${e instanceof Error ? e.message : String(e)}. Provide authoring.insertText.`);
|
|
734
737
|
}
|
|
735
|
-
if (
|
|
736
|
-
let
|
|
737
|
-
throw Error(`${n} has no authoring.insertText and its synthesized template does not compile with this configuration${
|
|
738
|
+
if (o.ok) return;
|
|
739
|
+
let s = o.diagnostics.map((e) => `${e.code}: ${e.message}`).join("; ");
|
|
740
|
+
throw Error(`${n} has no authoring.insertText and its synthesized template does not compile with this configuration${s ? ` (${s})` : ""}. Provide authoring.insertText.`);
|
|
738
741
|
}
|
|
739
742
|
// src/authoring/catalog.ts
|
|
740
|
-
function
|
|
743
|
+
function q(e) {
|
|
741
744
|
return /* @__PURE__ */ Error(`Invalid local component catalog: ${e}`);
|
|
742
745
|
}
|
|
743
|
-
function
|
|
744
|
-
return
|
|
746
|
+
function J(e, t, n) {
|
|
747
|
+
return o(e, t, n);
|
|
745
748
|
}
|
|
746
|
-
function
|
|
747
|
-
let n =
|
|
749
|
+
function at(e, t) {
|
|
750
|
+
let n = J(e, t, "");
|
|
748
751
|
return n === "" ? void 0 : n;
|
|
749
752
|
}
|
|
750
|
-
function
|
|
753
|
+
function ot(e) {
|
|
751
754
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") return e;
|
|
752
755
|
if (e === null) return null;
|
|
753
756
|
}
|
|
754
|
-
function
|
|
757
|
+
function Y(e) {
|
|
758
|
+
return e?.rule === "raw-body" ? "raw" : "markdown";
|
|
759
|
+
}
|
|
760
|
+
function st(e, t) {
|
|
755
761
|
return Object.freeze({
|
|
756
762
|
name: e,
|
|
757
763
|
kind: t.kind,
|
|
@@ -759,17 +765,17 @@ function ot(e, t) {
|
|
|
759
765
|
static: t.static === !0,
|
|
760
766
|
dynamic: t.dynamic === !0,
|
|
761
767
|
...t.values ? { values: Object.freeze([...t.values]) } : {},
|
|
762
|
-
...
|
|
768
|
+
...ot(t.default) === void 0 ? {} : { defaultValue: ot(t.default) }
|
|
763
769
|
});
|
|
764
770
|
}
|
|
765
|
-
function
|
|
771
|
+
function ct(e, t) {
|
|
766
772
|
let n = {};
|
|
767
|
-
for (let [t, r] of Object.entries(e)) n[t] =
|
|
773
|
+
for (let [t, r] of Object.entries(e)) n[t] = st(t, r);
|
|
768
774
|
return n;
|
|
769
775
|
}
|
|
770
|
-
function
|
|
776
|
+
function lt(e, t, n) {
|
|
771
777
|
for (let [r, i] of Object.entries(e.props)) {
|
|
772
|
-
let e =
|
|
778
|
+
let e = at(i.description, n);
|
|
773
779
|
if (e === void 0) continue;
|
|
774
780
|
let a = t[r];
|
|
775
781
|
t[r] = Object.freeze({
|
|
@@ -785,7 +791,7 @@ function ct(e, t, n) {
|
|
|
785
791
|
}
|
|
786
792
|
return t;
|
|
787
793
|
}
|
|
788
|
-
function
|
|
794
|
+
function ut(e) {
|
|
789
795
|
return Object.freeze({
|
|
790
796
|
id: e.id,
|
|
791
797
|
name: e.name,
|
|
@@ -795,6 +801,7 @@ function lt(e) {
|
|
|
795
801
|
categoryLabel: e.categoryLabel,
|
|
796
802
|
insertText: e.insertText,
|
|
797
803
|
form: e.form,
|
|
804
|
+
bodyKind: e.bodyKind,
|
|
798
805
|
paired: e.form !== "leaf",
|
|
799
806
|
inline: e.inline ?? e.form === "inline",
|
|
800
807
|
...e.parents === void 0 ? {} : { parents: Object.freeze([...e.parents]) },
|
|
@@ -805,14 +812,14 @@ function lt(e) {
|
|
|
805
812
|
...e.requires === void 0 ? {} : { requires: Object.freeze({ ...e.requires }) }
|
|
806
813
|
});
|
|
807
814
|
}
|
|
808
|
-
function
|
|
815
|
+
function dt(e) {
|
|
809
816
|
let t = e.structure;
|
|
810
817
|
return {
|
|
811
818
|
...t?.parents?.length ? { parents: t.parents } : {},
|
|
812
819
|
...t?.children?.length ? { allowedChildren: t.children } : {}
|
|
813
820
|
};
|
|
814
821
|
}
|
|
815
|
-
function
|
|
822
|
+
function ft(e, t) {
|
|
816
823
|
if (e === t) return !0;
|
|
817
824
|
if (e === void 0 || t === void 0) return !1;
|
|
818
825
|
let n = Object.keys(e).sort(), r = Object.keys(t).sort();
|
|
@@ -821,37 +828,37 @@ function dt(e, t) {
|
|
|
821
828
|
function X(e) {
|
|
822
829
|
let t = e.authoring;
|
|
823
830
|
if (t === void 0) return;
|
|
824
|
-
if (
|
|
825
|
-
let n =
|
|
826
|
-
return t.title !== void 0 && !
|
|
831
|
+
if (c(e.name) === void 0) return t;
|
|
832
|
+
let n = d(e.name), r = {};
|
|
833
|
+
return t.title !== void 0 && !ft(t.title, n?.title) && (r.title = t.title), t.description !== void 0 && !ft(t.description, n?.description) && (r.description = t.description), t.category !== void 0 && t.category !== n?.category && (r.category = t.category), t.insertText !== void 0 && t.insertText !== n?.insertText && (r.insertText = t.insertText), Object.keys(r).length === 0 ? void 0 : Object.freeze(r);
|
|
827
834
|
}
|
|
828
835
|
function Z(e, t) {
|
|
829
|
-
let n =
|
|
836
|
+
let n = c(e.name), r = X(e);
|
|
830
837
|
if (n) {
|
|
831
838
|
let e = r?.insertText;
|
|
832
839
|
if (e !== void 0) return e.trim() === "" ? void 0 : e;
|
|
833
|
-
let i =
|
|
840
|
+
let i = J(n.insertText, t, n.insertText.en ?? "");
|
|
834
841
|
return i === "" ? void 0 : i;
|
|
835
842
|
}
|
|
836
843
|
let i = r?.insertText;
|
|
837
844
|
return i !== void 0 && i.trim() !== "" ? i : void 0;
|
|
838
845
|
}
|
|
839
|
-
function
|
|
846
|
+
function pt(e, t) {
|
|
840
847
|
let n = Z(e, t);
|
|
841
|
-
return n === void 0 ?
|
|
848
|
+
return n === void 0 ? $e(e, G(e)) : n;
|
|
842
849
|
}
|
|
843
|
-
function
|
|
850
|
+
function Q(e, t, r) {
|
|
844
851
|
let i = n(e).structure?.parents;
|
|
845
852
|
if (i !== void 0 && i.length !== 0) for (let e of i) {
|
|
846
853
|
let n = t.get(e);
|
|
847
854
|
if (n === void 0 || n.form !== "container") continue;
|
|
848
855
|
let i;
|
|
849
856
|
try {
|
|
850
|
-
i =
|
|
857
|
+
i = pt(n, r);
|
|
851
858
|
} catch {
|
|
852
859
|
continue;
|
|
853
860
|
}
|
|
854
|
-
let a =
|
|
861
|
+
let a = nt(e, i);
|
|
855
862
|
if (a !== void 0) return a;
|
|
856
863
|
}
|
|
857
864
|
}
|
|
@@ -859,107 +866,109 @@ function mt(e, t) {
|
|
|
859
866
|
if (e.parents !== void 0 && e.parents.length !== 0) for (let n of e.parents) {
|
|
860
867
|
let e = t.find((e) => e.name === n);
|
|
861
868
|
if (e === void 0 || e.form !== "container") continue;
|
|
862
|
-
let r =
|
|
869
|
+
let r = nt(n, e.insertText);
|
|
863
870
|
if (r !== void 0) return r;
|
|
864
871
|
}
|
|
865
872
|
}
|
|
866
|
-
function
|
|
867
|
-
let
|
|
868
|
-
if (
|
|
869
|
-
if (
|
|
870
|
-
let n =
|
|
873
|
+
function ht(e, t, r, i, o) {
|
|
874
|
+
let s = n(e), l = c(e.name), d = e.authoring, f = X(e), p = J(l ? f?.title ?? l.title : d?.title, t, e.name), m = J(l ? f?.description ?? l.description : d?.description, t, p), h = l ? f?.category ?? l.category : d?.category !== void 0 && d.category.trim() !== "" ? d.category : "extension", g = u(h, t), _ = Z(e, t), v = dt(s), y;
|
|
875
|
+
if (_ !== void 0) {
|
|
876
|
+
if (y = _, o) {
|
|
877
|
+
let n = Q(e, i, t);
|
|
871
878
|
try {
|
|
872
|
-
|
|
879
|
+
rt(y, r, `component "${e.name}"`, n);
|
|
873
880
|
} catch (e) {
|
|
874
|
-
throw
|
|
881
|
+
throw q(e instanceof Error ? e.message : String(e));
|
|
875
882
|
}
|
|
876
883
|
}
|
|
877
884
|
} else {
|
|
878
885
|
try {
|
|
879
|
-
|
|
886
|
+
y = $e(e, G(e));
|
|
880
887
|
} catch (e) {
|
|
881
|
-
throw
|
|
888
|
+
throw q(e instanceof Error ? e.message : String(e));
|
|
882
889
|
}
|
|
883
890
|
if (o) try {
|
|
884
|
-
|
|
891
|
+
it(y, r, `component "${e.name}"`, Q(e, i, t));
|
|
885
892
|
} catch (e) {
|
|
886
|
-
throw
|
|
893
|
+
throw q(e instanceof Error ? e.message : String(e));
|
|
887
894
|
}
|
|
888
895
|
}
|
|
889
|
-
let
|
|
890
|
-
return
|
|
891
|
-
id:
|
|
896
|
+
let ee = lt(e, ct(s.props, t), t), b = a(e.name);
|
|
897
|
+
return ut({
|
|
898
|
+
id: l ? e.name : e.id,
|
|
892
899
|
name: e.name,
|
|
893
900
|
title: p,
|
|
894
901
|
description: m,
|
|
895
902
|
category: h,
|
|
896
|
-
categoryLabel:
|
|
897
|
-
insertText:
|
|
903
|
+
categoryLabel: g,
|
|
904
|
+
insertText: y,
|
|
898
905
|
form: e.form,
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
...
|
|
902
|
-
|
|
906
|
+
bodyKind: Y(s.structure),
|
|
907
|
+
inline: l ? l.inline === !0 : e.form === "inline",
|
|
908
|
+
...v,
|
|
909
|
+
...b === void 0 ? {} : { keywords: b },
|
|
910
|
+
props: ee,
|
|
903
911
|
...e.styles === void 0 ? {} : { styles: e.styles },
|
|
904
912
|
...e.requires === void 0 ? {} : { requires: e.requires }
|
|
905
913
|
});
|
|
906
914
|
}
|
|
907
|
-
function
|
|
915
|
+
function gt(e, t, n, r, a) {
|
|
908
916
|
let o = new Map(e.map((e) => [e.name, e])), s = [], c = /* @__PURE__ */ new Set();
|
|
909
|
-
for (let e of
|
|
917
|
+
for (let e of i) {
|
|
910
918
|
let t = o.get(e);
|
|
911
|
-
t && t.authoring !== void 0 && (s.push(
|
|
919
|
+
t && t.authoring !== void 0 && (s.push(ht(t, n, r, o, !1)), c.add(e));
|
|
912
920
|
}
|
|
913
|
-
for (let
|
|
921
|
+
for (let i of e) c.has(i.name) || (i.authoring !== void 0 || t.has(i.name)) && (s.push(ht(i, n, r, o, a && t.has(i.name))), c.add(i.name));
|
|
914
922
|
return s;
|
|
915
923
|
}
|
|
916
|
-
function
|
|
917
|
-
let r =
|
|
918
|
-
for (let [t, n] of Object.entries(e.props))
|
|
924
|
+
function _t(e, t) {
|
|
925
|
+
let r = c(e.name), i = e.authoring, o = X(e), s = {};
|
|
926
|
+
for (let [t, n] of Object.entries(e.props)) s[t] = n.description;
|
|
919
927
|
return JSON.stringify({
|
|
920
928
|
name: e.name,
|
|
921
929
|
id: e.id,
|
|
922
930
|
form: e.form,
|
|
923
|
-
title:
|
|
924
|
-
description:
|
|
925
|
-
category: r ? o?.category ?? r.category :
|
|
926
|
-
categoryLabel:
|
|
931
|
+
title: J(r ? o?.title ?? r.title : i?.title, t, e.name),
|
|
932
|
+
description: J(r ? o?.description ?? r.description : i?.description, t, ""),
|
|
933
|
+
category: r ? o?.category ?? r.category : i?.category ?? "",
|
|
934
|
+
categoryLabel: u(r ? o?.category ?? r.category : i?.category ?? "extension", t),
|
|
927
935
|
insertText: Z(e, t) ?? null,
|
|
928
936
|
inline: r ? r.inline === !0 : e.form === "inline",
|
|
929
|
-
|
|
930
|
-
|
|
937
|
+
bodyKind: Y(n(e).structure),
|
|
938
|
+
keywords: a(e.name) ?? null,
|
|
939
|
+
manifest: i ?? null,
|
|
931
940
|
preset: r ?? null,
|
|
932
|
-
propDescriptions:
|
|
941
|
+
propDescriptions: s,
|
|
933
942
|
structure: n(e).structure ?? null,
|
|
934
943
|
styles: e.styles ?? null,
|
|
935
944
|
requires: e.requires ?? null
|
|
936
945
|
});
|
|
937
946
|
}
|
|
938
|
-
function
|
|
939
|
-
let n =
|
|
947
|
+
function vt(e, t = "en") {
|
|
948
|
+
let n = p(e);
|
|
940
949
|
if (!n.ok) return `invalid|${t}`;
|
|
941
|
-
let r = n.registry.map((e) =>
|
|
942
|
-
return `${
|
|
950
|
+
let r = n.registry.map((e) => _t(e, t));
|
|
951
|
+
return `${m(e)}|${t}|${r.join("\0")}`;
|
|
943
952
|
}
|
|
944
953
|
function $(e, t, n, r) {
|
|
945
|
-
return Object.freeze(
|
|
954
|
+
return Object.freeze(gt(e.registry, e.externalComponentNames, t, n, r));
|
|
946
955
|
}
|
|
947
|
-
function
|
|
948
|
-
let n =
|
|
949
|
-
if (!r.ok) throw
|
|
956
|
+
function yt(e, t = "en") {
|
|
957
|
+
let n = f(e), r = p({ config: n });
|
|
958
|
+
if (!r.ok) throw q(r.message);
|
|
950
959
|
return $(r, t, { config: n }, !0);
|
|
951
960
|
}
|
|
952
|
-
function
|
|
953
|
-
let n =
|
|
954
|
-
if (!r.ok) throw
|
|
961
|
+
function bt(e, t = "en") {
|
|
962
|
+
let n = f(e), r = p({ config: n });
|
|
963
|
+
if (!r.ok) throw q(r.message);
|
|
955
964
|
return $(r, t, { config: n }, !1);
|
|
956
965
|
}
|
|
957
|
-
function
|
|
958
|
-
let n =
|
|
966
|
+
function xt(e, t = "en") {
|
|
967
|
+
let n = p(e);
|
|
959
968
|
return n.ok ? $(n, t, e, !0) : Object.freeze([]);
|
|
960
969
|
}
|
|
961
|
-
function
|
|
962
|
-
let t = new Map(
|
|
970
|
+
function St(e) {
|
|
971
|
+
let t = new Map(s.map((e, t) => [e.id, t])), n = /* @__PURE__ */ new Map();
|
|
963
972
|
for (let t of e) {
|
|
964
973
|
let e = n.get(t.category);
|
|
965
974
|
e ? e.entries.push(t) : n.set(t.category, {
|
|
@@ -978,7 +987,7 @@ function xt(e) {
|
|
|
978
987
|
entries: Object.freeze([...e.entries])
|
|
979
988
|
})));
|
|
980
989
|
}
|
|
981
|
-
function
|
|
990
|
+
function Ct(e, t = {}) {
|
|
982
991
|
let n = t.ancestors ?? [], r = n[n.length - 1], i = (r === void 0 ? void 0 : e.find((e) => e.name === r))?.allowedChildren, a = (t.query ?? "").trim().toLowerCase(), o = e.filter((e) => e.parents !== void 0 && e.parents.length > 0 && !e.parents.some((e) => n.includes(e)) || i !== void 0 && i.length > 0 && !i.includes(e.name) ? !1 : a === "" || [
|
|
983
992
|
e.name,
|
|
984
993
|
e.title,
|
|
@@ -988,17 +997,17 @@ function St(e, t = {}) {
|
|
|
988
997
|
].some((e) => e.toLowerCase().includes(a)));
|
|
989
998
|
return Object.freeze(o);
|
|
990
999
|
}
|
|
991
|
-
function
|
|
1000
|
+
function wt(e) {
|
|
992
1001
|
let t = [];
|
|
993
1002
|
e.description !== "" && t.push(e.description);
|
|
994
1003
|
for (let n of Object.values(e.props)) n.description !== void 0 && t.push(`${n.name}: ${n.description}`);
|
|
995
1004
|
return t.join("\n");
|
|
996
1005
|
}
|
|
997
|
-
function
|
|
998
|
-
if (typeof e != "string" || !Number.isFinite(t) || !
|
|
1006
|
+
function Tt(e, t, n) {
|
|
1007
|
+
if (typeof e != "string" || !Number.isFinite(t) || !p(n).ok) return Object.freeze([]);
|
|
999
1008
|
let r = Math.max(0, Math.min(e.length, Math.floor(t))), i = Object.freeze([]), a;
|
|
1000
1009
|
try {
|
|
1001
|
-
a =
|
|
1010
|
+
a = y(e, n);
|
|
1002
1011
|
} catch {
|
|
1003
1012
|
return i;
|
|
1004
1013
|
}
|
|
@@ -1010,7 +1019,7 @@ function wt(e, t, n) {
|
|
|
1010
1019
|
};
|
|
1011
1020
|
return o(a.nodes, Object.freeze([])), i;
|
|
1012
1021
|
}
|
|
1013
|
-
function
|
|
1022
|
+
function Et(e) {
|
|
1014
1023
|
let t = {};
|
|
1015
1024
|
if (!e) return t;
|
|
1016
1025
|
for (let [n, r] of Object.entries(e.props)) t[n] = Object.freeze({
|
|
@@ -1024,10 +1033,11 @@ function Tt(e) {
|
|
|
1024
1033
|
});
|
|
1025
1034
|
return t;
|
|
1026
1035
|
}
|
|
1027
|
-
function
|
|
1036
|
+
function Dt(e) {
|
|
1028
1037
|
return Object.freeze({
|
|
1029
1038
|
name: e.name,
|
|
1030
1039
|
form: e.form,
|
|
1040
|
+
bodyKind: e.bodyKind,
|
|
1031
1041
|
paired: e.form !== "leaf",
|
|
1032
1042
|
title: e.title,
|
|
1033
1043
|
description: e.description,
|
|
@@ -1042,7 +1052,7 @@ function Et(e) {
|
|
|
1042
1052
|
...e.requires === void 0 ? {} : { requires: Object.freeze({ ...e.requires }) }
|
|
1043
1053
|
});
|
|
1044
1054
|
}
|
|
1045
|
-
function
|
|
1055
|
+
function Ot(e) {
|
|
1046
1056
|
let t = new Map(e.map((e) => [e.name, e])), n = Object.freeze([...e]);
|
|
1047
1057
|
return Object.freeze({
|
|
1048
1058
|
tags: n,
|
|
@@ -1054,9 +1064,9 @@ function Dt(e) {
|
|
|
1054
1064
|
}
|
|
1055
1065
|
});
|
|
1056
1066
|
}
|
|
1057
|
-
function
|
|
1058
|
-
let n =
|
|
1059
|
-
if (!n.ok) return
|
|
1067
|
+
function kt(e, t = "en") {
|
|
1068
|
+
let n = p(e);
|
|
1069
|
+
if (!n.ok) return Ot([]);
|
|
1060
1070
|
let r = [];
|
|
1061
1071
|
try {
|
|
1062
1072
|
r = $(n, t, e, !1);
|
|
@@ -1065,14 +1075,15 @@ function Ot(e, t = "en") {
|
|
|
1065
1075
|
}
|
|
1066
1076
|
let i = new Map(r.map((e) => [e.name, e])), a = [];
|
|
1067
1077
|
for (let [e, t] of n.schemaByName) {
|
|
1068
|
-
let n = i.get(e), r =
|
|
1078
|
+
let n = i.get(e), r = Et(t);
|
|
1069
1079
|
for (let [e, t] of Object.entries(n?.props ?? {})) r[e] = Object.freeze({
|
|
1070
1080
|
...r[e],
|
|
1071
1081
|
...t
|
|
1072
1082
|
});
|
|
1073
|
-
a.push(
|
|
1083
|
+
a.push(Dt({
|
|
1074
1084
|
name: e,
|
|
1075
1085
|
form: t.form,
|
|
1086
|
+
bodyKind: Y(t.structure),
|
|
1076
1087
|
title: n?.title ?? e,
|
|
1077
1088
|
description: n?.description ?? "",
|
|
1078
1089
|
category: n?.category ?? "component",
|
|
@@ -1086,12 +1097,12 @@ function Ot(e, t = "en") {
|
|
|
1086
1097
|
...n?.requires === void 0 ? {} : { requires: n.requires }
|
|
1087
1098
|
}));
|
|
1088
1099
|
}
|
|
1089
|
-
return
|
|
1100
|
+
return Ot(a);
|
|
1090
1101
|
}
|
|
1091
1102
|
// src/authoring/insert.ts
|
|
1092
|
-
var
|
|
1093
|
-
function
|
|
1094
|
-
let i = new Set(r.match(
|
|
1103
|
+
var At = /[A-Za-z_][A-Za-z0-9_]*/g;
|
|
1104
|
+
function jt(t, n, r) {
|
|
1105
|
+
let i = new Set(r.match(At) ?? []), a = v(t, n, { diagnostics: !1 }).bindings.filter((e) => e.declarations.length > 0).map((e) => e.name), o = new Set(a), s = t;
|
|
1095
1106
|
for (let t of a) {
|
|
1096
1107
|
let r = t, a = 2;
|
|
1097
1108
|
for (; i.has(r) || e.has(r) || r !== t && o.has(r);) r = `${t}${a}`, a += 1;
|
|
@@ -1099,7 +1110,7 @@ function At(t, n, r) {
|
|
|
1099
1110
|
}
|
|
1100
1111
|
return s;
|
|
1101
1112
|
}
|
|
1102
|
-
function
|
|
1113
|
+
function Mt(e) {
|
|
1103
1114
|
return {
|
|
1104
1115
|
id: e.id,
|
|
1105
1116
|
label: e.title,
|
|
@@ -1109,40 +1120,40 @@ function jt(e) {
|
|
|
1109
1120
|
template: e.insertText
|
|
1110
1121
|
};
|
|
1111
1122
|
}
|
|
1112
|
-
function
|
|
1113
|
-
return
|
|
1123
|
+
function Nt(e, t, n, r) {
|
|
1124
|
+
return z(n, r, jt(W(Mt(e), n), t, n), { block: !e.inline });
|
|
1114
1125
|
}
|
|
1115
|
-
function
|
|
1126
|
+
function Pt(e, t, n, r, i = "en") {
|
|
1116
1127
|
if (typeof n != "string") throw TypeError("insertLocalComponent requires source text.");
|
|
1117
1128
|
if (typeof t != "string" || t.length === 0) throw TypeError("insertLocalComponent requires a component id.");
|
|
1118
|
-
let a =
|
|
1129
|
+
let a = p(e);
|
|
1119
1130
|
if (!a.ok) throw Error(`Invalid compile options: ${a.message}`);
|
|
1120
|
-
let o =
|
|
1131
|
+
let o = xt(e, i).find((e) => e.id === t || e.name === t);
|
|
1121
1132
|
if (!o) throw Error(`Unknown local component "${t}".`);
|
|
1122
|
-
return
|
|
1133
|
+
return Nt(o, e, n, r);
|
|
1123
1134
|
}
|
|
1124
|
-
function
|
|
1125
|
-
return
|
|
1135
|
+
function Ft(e, t, n, r, i = "en") {
|
|
1136
|
+
return Pt({ config: f(e) }, t, n, r, i);
|
|
1126
1137
|
}
|
|
1127
1138
|
// src/authoring/conformance.ts
|
|
1128
|
-
function
|
|
1129
|
-
let n =
|
|
1130
|
-
for (let e of
|
|
1131
|
-
if (!
|
|
1132
|
-
let t =
|
|
1139
|
+
function It(e, t = "en") {
|
|
1140
|
+
let n = f(e), i = new Set(n.components.map((e) => e.name)), a = [], o = { config: n }, s = bt(n, t);
|
|
1141
|
+
for (let e of s) {
|
|
1142
|
+
if (!i.has(e.name)) continue;
|
|
1143
|
+
let t = Nt(e, o, "", {
|
|
1133
1144
|
start: 0,
|
|
1134
1145
|
end: 0
|
|
1135
|
-
}).value, n = mt(e,
|
|
1136
|
-
|
|
1146
|
+
}).value, n = mt(e, s), c = n === void 0 ? t : `${n.before}${t}${n.after}`, l = r(c, o);
|
|
1147
|
+
l.ok || a.push(Object.freeze({
|
|
1137
1148
|
id: e.id,
|
|
1138
1149
|
name: e.name,
|
|
1139
1150
|
message: `Insert template for <${e.name}> does not compile with this configuration.`,
|
|
1140
|
-
diagnostics: Object.freeze(
|
|
1151
|
+
diagnostics: Object.freeze(l.diagnostics.map((e) => Object.freeze({
|
|
1141
1152
|
code: e.code,
|
|
1142
1153
|
message: e.message
|
|
1143
1154
|
})))
|
|
1144
1155
|
}));
|
|
1145
1156
|
}
|
|
1146
|
-
return Object.freeze(
|
|
1157
|
+
return Object.freeze(a);
|
|
1147
1158
|
}
|
|
1148
|
-
export {
|
|
1159
|
+
export { He as EXTENDED_NATIVE_COMPONENTS, Ue as EXTENDED_NATIVE_COMPONENT_COPY_ZH, ae as LOCAL_COMPONENTS, te as LOCAL_COMPONENT_NAMES, V as NATIVE_COMPONENTS, U as NATIVE_COMPONENTS_ZH, Be as NATIVE_COMPONENT_GROUPS, H as NATIVE_COMPONENT_GROUPS_ZH, v as analyzeLocalSource, t as closestName, g as completeLocalSource, kt as createLocalAuthoringLookup, yt as createLocalComponentCatalog, xt as createLocalComponentCatalogForOptions, Ct as filterLocalComponentCatalog, ce as formatBold, ge as formatBulletList, me as formatHeading, fe as formatInlineCode, le as formatItalic, _ as formatLocalSource, _e as formatOrderedList, ye as formatQuote, ue as formatStrike, ve as formatTaskList, re as getLocalComponent, We as getNativeComponentCatalog, b as getPropDefault, be as indentSelection, Te as insertCodeBlock, ke as insertDivider, we as insertImage, Ce as insertLink, Ft as insertLocalComponent, Pt as insertLocalComponentFromOptions, Oe as insertTable, z as insertTemplate, Ae as insertText, Tt as localCatalogAncestors, St as localComponentCatalogGroups, vt as localComponentCatalogKey, wt as localComponentHelp, ee as localComponentNames, Se as outdentSelection, ze as readFormatState, h as renameLocalBinding, W as renderNativeSnippet, ne as suggestAttribute, ie as suggestComponent, It as validateLocalComponentInsertTemplates };
|