reactive-md 0.6.1 → 0.8.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 +66 -0
- package/CHANGELOG.md +66 -0
- package/CONTRIBUTING-ch.md +6 -62
- package/CONTRIBUTING.md +5 -63
- package/README-ch.md +232 -67
- package/README-en.md +209 -71
- package/README.md +209 -71
- package/SECURITY-ch.md +3 -1
- package/SECURITY.md +3 -1
- package/THIRD_PARTY_NOTICES.md +1909 -87
- package/cli/args.mjs +33 -1
- package/cli/build.mjs +62 -1
- package/cli/check.mjs +444 -0
- package/cli/help.mjs +181 -3
- package/cli/init.mjs +1577 -0
- package/cli/main.mjs +11 -1
- package/cli/package-loader.mjs +41 -0
- package/dist-library/LocalDocumentView-6trX7xJc.js +97920 -0
- package/dist-library/{authoring-BEVyth5X.js → authoring-BsfSwQRm.js} +237 -209
- package/dist-library/compiler--ea2CKQF.js +61 -0
- package/dist-library/compiler-core-kPiH-gOV.js +11805 -0
- package/dist-library/component-state-Cq2K5gkS.js +490 -0
- package/dist-library/component-state-D_cw_EHe.js +54 -0
- package/dist-library/config-validation-DXTynAw7.js +3005 -0
- package/dist-library/default-components-Z_YMio5P.js +2346 -0
- package/dist-library/identity-MYJXKSkB.js +1443 -0
- package/dist-library/math-display-BJz4gbFc.js +24000 -0
- package/dist-library/math-sample-BGEW49zY.js +1124 -0
- package/dist-library/options-CX5m5n-J.js +115 -0
- package/dist-library/parser-standard-DlCk7sLo.js +10122 -0
- package/dist-library/props-DGlBk0e5.js +183 -0
- package/dist-library/react-ByOHunUW.js +122 -0
- package/dist-library/reactive-md-authoring.js +712 -1077
- package/dist-library/reactive-md-build.js +7966 -0
- package/dist-library/reactive-md-compiler-standard.js +33 -0
- package/dist-library/reactive-md-compiler.js +22 -0
- package/dist-library/reactive-md-default-packs.js +71 -0
- package/dist-library/reactive-md-default-preset.js +10 -0
- package/dist-library/reactive-md-export.js +111 -0
- package/dist-library/reactive-md-print.css +18 -3
- package/dist-library/reactive-md-react-runtime.js +251 -0
- package/dist-library/reactive-md-react-server.js +55 -0
- package/dist-library/reactive-md-react-unstyled.js +9 -1
- package/dist-library/reactive-md-react.js +9 -1
- package/dist-library/reactive-md-runtime-browser.js +51 -0
- package/dist-library/reactive-md-runtime.js +3 -0
- package/dist-library/reactive-md-sdk.js +6 -0
- package/dist-library/reactive-md-standalone-host.js +442 -0
- package/dist-library/reactive-md-testing-browser.js +523 -0
- package/dist-library/reactive-md-testing-react.js +221 -0
- package/dist-library/reactive-md-testing.js +638 -0
- package/dist-library/reactive-md-vite.js +959 -0
- package/dist-library/reactive-md.css +1 -1
- package/dist-library/reactive-md.js +1080 -795
- package/dist-library/registry-B9Jc3FVe.js +1174 -0
- package/dist-library/resources-BGt8mpDA.js +204 -0
- package/dist-library/runtime-C-sbfpOX.js +1157 -0
- package/dist-library/runtime-Dkq7ldyg.js +172 -0
- package/dist-library/schema-ZFufO8V0.js +39 -0
- package/dist-library/shareable-DDVL4Fi9.js +844 -0
- package/dist-library/types/authoring/catalog.d.ts +168 -0
- package/dist-library/types/authoring/conformance.d.ts +24 -0
- package/dist-library/types/{editor → authoring}/editor-i18n.d.ts +3 -24
- package/dist-library/types/authoring/extensions.d.ts +13 -0
- package/dist-library/types/authoring/index.d.ts +14 -11
- package/dist-library/types/authoring/insert.d.ts +16 -0
- package/dist-library/types/{editor → authoring}/native-components.d.ts +19 -2
- package/dist-library/types/authoring/templates.d.ts +65 -0
- package/dist-library/types/build/diagnostics.d.ts +8 -0
- package/dist-library/types/build/digest.d.ts +5 -0
- package/dist-library/types/build/entry.d.ts +9 -0
- package/dist-library/types/build/host.d.ts +36 -0
- package/dist-library/types/build/index.d.ts +99 -0
- package/dist-library/types/build/notices.d.ts +29 -0
- package/dist-library/types/build/resources.d.ts +60 -0
- package/dist-library/types/build/vite.d.ts +15 -0
- package/dist-library/types/compiler/index.d.ts +22 -0
- package/dist-library/types/compiler/result.d.ts +30 -0
- package/dist-library/types/compiler/standard.d.ts +16 -0
- package/dist-library/types/compiler/types.d.ts +69 -0
- package/dist-library/types/components/chart-motion.d.ts +12 -0
- package/dist-library/types/components/controls.d.ts +21 -0
- package/dist-library/types/{local → components}/data-table.d.ts +10 -24
- package/dist-library/types/components/default-chart-types.d.ts +22 -0
- package/dist-library/types/components/default-chart.d.ts +2 -0
- package/dist-library/types/components/default-preset.d.ts +10 -0
- package/dist-library/types/components/diagram-inspector.d.ts +24 -0
- package/dist-library/types/components/gallery.d.ts +6 -0
- package/dist-library/types/components/layout.d.ts +23 -0
- package/dist-library/types/components/mafs-plot-grid.d.ts +57 -0
- package/dist-library/types/components/mafs-visuals.d.ts +40 -0
- package/dist-library/types/components/numeric-sliders.d.ts +3 -0
- package/dist-library/types/components/uiarc/calendar/calendar.d.ts +26 -0
- package/dist-library/types/components/uiarc/date-picker/date-picker.d.ts +29 -0
- package/dist-library/types/components/uiarc/lib/motion-tokens.d.ts +2 -0
- package/dist-library/types/components/uiarc/lib/use-today.d.ts +2 -0
- package/dist-library/types/components/uiarc/motion-tokens.d.ts +60 -0
- package/dist-library/types/components/uiarc/rmd-motion.d.ts +12 -0
- package/dist-library/types/components/uiarc/select/select.d.ts +21 -0
- package/dist-library/types/components/uiarc/slider/slider.d.ts +53 -0
- package/dist-library/types/components/use-hydrated.d.ts +6 -0
- package/dist-library/types/components/visuals.d.ts +13 -0
- package/dist-library/types/export/component-state.d.ts +39 -0
- package/dist-library/types/export/index.d.ts +47 -0
- package/dist-library/types/export/requirements.d.ts +23 -0
- package/dist-library/types/export/resources.d.ts +8 -0
- package/dist-library/types/export/restoration.d.ts +52 -0
- package/dist-library/types/index.d.ts +1 -0
- package/dist-library/types/local/compilation/compiler-core.d.ts +16 -0
- package/dist-library/types/local/compilation/compiler-services.d.ts +64 -0
- package/dist-library/types/local/compilation/compiler-structure.d.ts +46 -0
- package/dist-library/types/local/compilation/compiler-values.d.ts +9 -0
- package/dist-library/types/local/compilation/compiler.d.ts +34 -0
- package/dist-library/types/local/compilation/component-kernel.d.ts +487 -0
- package/dist-library/types/local/{dependencies.d.ts → compilation/dependencies.d.ts} +4 -3
- package/dist-library/types/local/{diagnostics.d.ts → configuration/diagnostic-messages.d.ts} +193 -65
- package/dist-library/types/local/configuration/diagnostics.d.ts +58 -0
- package/dist-library/types/local/{limits.d.ts → configuration/limits.d.ts} +15 -2
- package/dist-library/types/local/configuration/options-core.d.ts +120 -0
- package/dist-library/types/local/configuration/options.d.ts +17 -0
- package/dist-library/types/local/configuration/portable-options.d.ts +3 -0
- package/dist-library/types/local/configuration/schema-core.d.ts +32 -0
- package/dist-library/types/local/configuration/schema.d.ts +12 -0
- package/dist-library/types/local/contracts/types.d.ts +519 -0
- package/dist-library/types/local/{version.d.ts → contracts/version.d.ts} +1 -1
- package/dist-library/types/local/{computations.d.ts → evaluation/computations.d.ts} +6 -3
- package/dist-library/types/local/{expression.d.ts → evaluation/expression.d.ts} +2 -2
- package/dist-library/types/local/{math-display.d.ts → evaluation/math-display.d.ts} +2 -16
- package/dist-library/types/local/evaluation/math-sample.d.ts +23 -0
- package/dist-library/types/local/evaluation/math.d.ts +73 -0
- package/dist-library/types/local/{validation.d.ts → evaluation/validation.d.ts} +1 -1
- package/dist-library/types/local/html/html-details.d.ts +16 -0
- package/dist-library/types/local/html/html-entities.d.ts +7 -0
- package/dist-library/types/local/html/html-policy.d.ts +43 -0
- package/dist-library/types/local/html/html-recovery.d.ts +16 -0
- package/dist-library/types/local/html/html-table-names.d.ts +9 -0
- package/dist-library/types/local/{html-table.d.ts → html/html-table.d.ts} +2 -6
- package/dist-library/types/local/{html.d.ts → html/html.d.ts} +1 -1
- package/dist-library/types/local/index.d.ts +31 -24
- package/dist-library/types/local/markdown/fast-markdown.d.ts +137 -0
- package/dist-library/types/local/{footnotes.d.ts → markdown/footnotes.d.ts} +1 -1
- package/dist-library/types/local/{heading-anchors.d.ts → markdown/heading-anchors.d.ts} +12 -2
- package/dist-library/types/local/markdown/markdown-blocks.d.ts +55 -0
- package/dist-library/types/local/markdown/markdown-structure.d.ts +3 -0
- package/dist-library/types/local/markdown/plain-paragraphs.d.ts +10 -0
- package/dist-library/types/local/parsing/lexical.d.ts +21 -0
- package/dist-library/types/local/parsing/parse-budget.d.ts +67 -0
- package/dist-library/types/local/parsing/parser-capabilities.d.ts +42 -0
- package/dist-library/types/local/parsing/parser-core.d.ts +65 -0
- package/dist-library/types/local/parsing/parser-standard.d.ts +7 -0
- package/dist-library/types/local/parsing/parser.d.ts +16 -0
- package/dist-library/types/local/parsing/rmd-recovery.d.ts +48 -0
- package/dist-library/types/local/{LocalDocumentView.d.ts → rendering/LocalDocumentView.d.ts} +67 -24
- package/dist-library/types/local/rendering/legacy-component-adapter.d.ts +36 -0
- package/dist-library/types/local/rendering/render-types.d.ts +57 -0
- package/dist-library/types/local/rendering/view-revision.d.ts +75 -0
- package/dist-library/types/local/{retention.d.ts → runtime/retention.d.ts} +1 -1
- package/dist-library/types/local/runtime/runtime.d.ts +34 -0
- package/dist-library/types/local/{state.d.ts → runtime/state.d.ts} +4 -4
- package/dist-library/types/local/session/compiler-cache.d.ts +44 -0
- package/dist-library/types/local/session/incremental.d.ts +48 -0
- package/dist-library/types/local/session/parse-session.d.ts +62 -0
- package/dist-library/types/local/session/row-reuse.d.ts +46 -0
- package/dist-library/types/local/{authoring.d.ts → source/authoring.d.ts} +11 -3
- package/dist-library/types/local/source/node-walk.d.ts +3 -0
- package/dist-library/types/local/source/source-context.d.ts +63 -0
- package/dist-library/types/local/{source-migration.d.ts → source/source-migration.d.ts} +2 -2
- package/dist-library/types/local/{i18n.d.ts → theme/i18n.d.ts} +2 -2
- package/dist-library/types/local/theme/theme-name.d.ts +3 -0
- package/dist-library/types/local/{theme.d.ts → theme/theme.d.ts} +3 -3
- package/dist-library/types/local/transport/compile-patch.d.ts +127 -0
- package/dist-library/types/local/{compiled-data.d.ts → transport/compiled-data.d.ts} +1 -1
- package/dist-library/types/local/transport/flat-compiled-data.d.ts +17 -0
- package/dist-library/types/local/transport/shared-data.d.ts +10 -0
- package/dist-library/types/local/transport/worker.d.ts +265 -0
- package/dist-library/types/local/widgets/visuals.d.ts +25 -0
- package/dist-library/types/presets/default-authoring.d.ts +50 -0
- package/dist-library/types/presets/default-components.d.ts +4 -0
- package/dist-library/types/presets/default-semantics.d.ts +8 -0
- package/dist-library/types/presets/default.d.ts +11 -0
- package/dist-library/types/presets/identity.d.ts +7 -0
- package/dist-library/types/presets/packs.d.ts +4 -0
- package/dist-library/types/react/component-api.d.ts +260 -0
- package/dist-library/types/react/component-primitives.d.ts +21 -0
- package/dist-library/types/react/component-utils.d.ts +125 -0
- package/dist-library/types/react/default-theme.d.ts +6 -0
- package/dist-library/types/react/field-validation.d.ts +11 -0
- package/dist-library/types/react/index.d.ts +17 -5
- package/dist-library/types/react/overflow-text-tooltip.d.ts +6 -0
- package/dist-library/types/react/package.d.ts +69 -0
- package/dist-library/types/react/runtime/common.d.ts +4 -0
- package/dist-library/types/react/runtime/index.d.ts +8 -0
- package/dist-library/types/react/runtime/useComponentState.d.ts +30 -0
- package/dist-library/types/react/runtime/useKeys.d.ts +16 -0
- package/dist-library/types/react/runtime/useSwipe.d.ts +27 -0
- package/dist-library/types/react/runtime/useTicker.d.ts +17 -0
- package/dist-library/types/react/sdk.d.ts +110 -0
- package/dist-library/types/react/server.d.ts +15 -0
- package/dist-library/types/react/tooltip-layer.d.ts +10 -0
- package/dist-library/types/react/use-draft-field.d.ts +17 -0
- package/dist-library/types/runtime-services/browser/index.d.ts +63 -0
- package/dist-library/types/runtime-services/component-state.d.ts +152 -0
- package/dist-library/types/runtime-services/identity.d.ts +41 -0
- package/dist-library/types/runtime-services/index.d.ts +10 -0
- package/dist-library/types/runtime-services/random.d.ts +42 -0
- package/dist-library/types/runtime-services/runtime.d.ts +51 -0
- package/dist-library/types/runtime-services/scheduler.d.ts +44 -0
- package/dist-library/types/sdk/assembly.d.ts +73 -0
- package/dist-library/types/sdk/compat-profile.d.ts +57 -0
- package/dist-library/types/sdk/compiler-config.d.ts +33 -0
- package/dist-library/types/sdk/config-validation.d.ts +33 -0
- package/dist-library/types/sdk/config.d.ts +35 -0
- package/dist-library/types/sdk/hash.d.ts +9 -0
- package/dist-library/types/sdk/index.d.ts +10 -0
- package/dist-library/types/sdk/manifest.d.ts +49 -0
- package/dist-library/types/sdk/pattern.d.ts +11 -0
- package/dist-library/types/sdk/preset-core.d.ts +11 -0
- package/dist-library/types/sdk/preset.d.ts +9 -0
- package/dist-library/types/sdk/props.d.ts +33 -0
- package/dist-library/types/sdk/registry-core.d.ts +16 -0
- package/dist-library/types/sdk/registry.d.ts +18 -0
- package/dist-library/types/sdk/theme.d.ts +73 -0
- package/dist-library/types/sdk/types.d.ts +221 -0
- package/dist-library/types/sdk/version.d.ts +49 -0
- package/dist-library/types/shareable.d.ts +29 -3
- package/dist-library/types/standalone/diagnostics.d.ts +16 -0
- package/dist-library/types/standalone/events.d.ts +4 -0
- package/dist-library/types/standalone/library.d.ts +6 -0
- package/dist-library/types/standalone/payload.d.ts +15 -0
- package/dist-library/types/standalone/prepare.d.ts +21 -0
- package/dist-library/types/standalone/session.d.ts +68 -0
- package/dist-library/types/standalone/version.d.ts +7 -0
- package/dist-library/types/testing/behavior.d.ts +19 -0
- package/dist-library/types/testing/browser.d.ts +126 -0
- package/dist-library/types/testing/cases.d.ts +16 -0
- package/dist-library/types/testing/index.d.ts +13 -0
- package/dist-library/types/testing/manifest.d.ts +10 -0
- package/dist-library/types/testing/react.d.ts +45 -0
- package/dist-library/types/testing/report.d.ts +20 -0
- package/dist-library/types/testing/types.d.ts +125 -0
- package/dist-library/types/testing/values.d.ts +22 -0
- package/dist-library/types/vite/client.d.ts +36 -0
- package/dist-library/types/vite/discovery.d.ts +51 -0
- package/dist-library/types/vite/index.d.ts +31 -0
- package/dist-library/types/vite/registration.d.ts +109 -0
- package/dist-library/types-BFCrMrg0.js +52 -0
- package/dist-library/validation-W-bmny-x.js +2253 -0
- package/dist-library/values-CIt8AjiU.js +134 -0
- package/dist-standalone/reactive-md-standalone.css +1 -1
- package/dist-standalone/reactive-md-standalone.js +591 -95
- package/docs/README-ch.md +90 -0
- package/docs/README.md +87 -81
- package/docs/compatibility/compatibility-ch.md +22 -14
- package/docs/compatibility/compatibility-en.md +22 -14
- package/docs/compatibility/source-versioning-ch.md +15 -12
- package/docs/compatibility/source-versioning-en.md +16 -13
- package/docs/development/component-development-ch.md +51 -195
- package/docs/development/component-development-en.md +51 -195
- package/docs/development/component-development-reference-ch.md +253 -0
- package/docs/development/component-development-reference-en.md +238 -0
- package/docs/development/component-protocol-ch.md +51 -50
- package/docs/development/component-protocol-en.md +52 -49
- package/docs/development/local-module-layout-ch.md +59 -0
- package/docs/development/local-module-layout-en.md +59 -0
- package/docs/development/performance-overview-ch.md +402 -0
- package/docs/development/performance-overview-en.md +402 -0
- package/docs/development/releasing-ch.md +8 -104
- package/docs/development/releasing-en.md +8 -104
- package/docs/guides/local-guide-ch.md +28 -9
- package/docs/guides/local-guide-en.md +31 -12
- package/docs/integration/author-tools-ch.md +4 -2
- package/docs/integration/author-tools-en.md +4 -2
- package/docs/integration/codemirror-ch.md +52 -0
- package/docs/integration/codemirror-en.md +29 -0
- package/docs/integration/compiler-ch.md +47 -0
- package/docs/integration/compiler-en.md +34 -0
- package/docs/integration/directory-discovery-ch.md +53 -0
- package/docs/integration/directory-discovery-en.md +31 -0
- package/docs/integration/editor-ch.md +48 -21
- package/docs/integration/editor-en.md +48 -21
- package/docs/integration/extension-sdk-ch.md +392 -0
- package/docs/integration/extension-sdk-en.md +377 -0
- package/docs/integration/local-integration-ch.md +63 -9
- package/docs/integration/local-integration-en.md +89 -13
- package/docs/integration/repository-split-ch.md +40 -0
- package/docs/integration/repository-split-en.md +23 -0
- package/docs/integration/shareable-export-ch.md +46 -2
- package/docs/integration/shareable-export-en.md +46 -2
- package/docs/reference/computations-formatting-ch.md +4 -2
- package/docs/reference/computations-formatting-en.md +4 -2
- package/docs/reference/constraints-collections-ch.md +21 -1
- package/docs/reference/constraints-collections-en.md +21 -1
- package/docs/reference/diagnostics-counting-ch.md +1 -1
- package/docs/reference/diagnostics-counting-en.md +1 -1
- package/docs/reference/html-compatibility-ch.md +4 -0
- package/docs/reference/html-compatibility-en.md +4 -0
- package/docs/reference/local-components-v2-ch.md +2 -0
- package/docs/reference/local-components-v2-en.md +2 -0
- package/docs/reference/local-interaction-syntax-ch.md +51 -15
- package/docs/reference/local-interaction-syntax-en.md +58 -14
- package/docs/reference/theme-protocol-ch.md +79 -7
- package/docs/reference/theme-protocol-en.md +79 -7
- package/docs/reference/tolerance-ch.md +64 -0
- package/docs/reference/tolerance-en.md +57 -0
- package/docs/releases/release-0.4.0-ch.md +2 -0
- package/docs/releases/release-0.4.0-en.md +2 -0
- package/docs/releases/release-0.4.1-ch.md +2 -0
- package/docs/releases/release-0.4.1-en.md +2 -0
- package/docs/releases/release-0.5.0-ch.md +2 -0
- package/docs/releases/release-0.5.0-en.md +2 -0
- package/docs/releases/release-0.5.1-ch.md +2 -0
- package/docs/releases/release-0.5.1-en.md +2 -0
- package/docs/releases/release-0.5.2-ch.md +2 -0
- package/docs/releases/release-0.5.2-en.md +2 -0
- package/docs/releases/release-0.5.3-ch.md +2 -0
- package/docs/releases/release-0.5.3-en.md +2 -0
- package/docs/releases/release-0.6.0-ch.md +2 -0
- package/docs/releases/release-0.6.0-en.md +2 -0
- package/docs/releases/release-0.6.1-ch.md +2 -0
- package/docs/releases/release-0.6.1-en.md +2 -0
- package/docs/releases/release-0.7.0-ch.md +86 -0
- package/docs/releases/release-0.7.0-en.md +86 -0
- package/docs/releases/release-0.8.0-ch.md +126 -0
- package/docs/releases/release-0.8.0-en.md +126 -0
- package/examples/component-package/LICENSE +21 -0
- package/examples/component-package/NOTICES.md +12 -0
- package/examples/component-package/README-ch.md +101 -0
- package/examples/component-package/README.md +133 -0
- package/examples/component-package/package.json +35 -0
- package/examples/component-package/sample/document.reactive.md +14 -0
- package/examples/component-package/scripts/build-export.mjs +44 -0
- package/examples/component-package/scripts/build.mjs +130 -0
- package/examples/component-package/scripts/verify.mjs +257 -0
- package/examples/component-package/src/assets/notice.svg +4 -0
- package/examples/component-package/src/component.css +40 -0
- package/examples/component-package/src/components.tsx +105 -0
- package/examples/component-package/src/harness.tsx +34 -0
- package/examples/component-package/src/manifests.ts +71 -0
- package/examples/component-package/src/node-entry.ts +18 -0
- package/examples/component-package/src/sample.ts +4 -0
- package/examples/component-package/src/theme.css +44 -0
- package/examples/component-package/src/theme.ts +22 -0
- package/examples/component-package/tsconfig.json +15 -0
- package/examples/conformance/README-ch.md +55 -0
- package/examples/conformance/README.md +2 -0
- package/examples/conformance/local-draft-3.json +296 -0
- package/examples/game-2048-package/LICENSE +21 -0
- package/examples/game-2048-package/NOTICES.md +11 -0
- package/examples/game-2048-package/README-ch.md +97 -0
- package/examples/game-2048-package/README.md +102 -0
- package/examples/game-2048-package/package.json +35 -0
- package/examples/game-2048-package/sample/document.reactive.md +17 -0
- package/examples/game-2048-package/scripts/build-export.mjs +44 -0
- package/examples/game-2048-package/scripts/build.mjs +130 -0
- package/examples/game-2048-package/scripts/verify.mjs +180 -0
- package/examples/game-2048-package/src/component.css +161 -0
- package/examples/game-2048-package/src/components.tsx +326 -0
- package/examples/game-2048-package/src/game-engine.ts +228 -0
- package/examples/game-2048-package/src/harness.tsx +34 -0
- package/examples/game-2048-package/src/manifest.ts +85 -0
- package/examples/game-2048-package/src/node-entry.ts +30 -0
- package/examples/game-2048-package/src/sample.ts +4 -0
- package/examples/game-2048-package/tsconfig.json +15 -0
- package/examples/integration/README-ch.md +63 -0
- package/examples/integration/README.md +17 -1
- package/examples/integration/extension-sdk/README-ch.md +24 -0
- package/examples/integration/extension-sdk/README.md +24 -0
- package/examples/integration/extension-sdk/advanced-standalone.ts +6 -0
- package/examples/integration/extension-sdk/advanced.tsx +101 -0
- package/examples/integration/extension-sdk/env.d.ts +2 -0
- package/examples/integration/extension-sdk/extensions.tsx +97 -0
- package/examples/integration/extension-sdk/index.html +3 -0
- package/examples/integration/extension-sdk/main.tsx +10 -0
- package/examples/integration/extension-sdk/package.json +6 -0
- package/examples/integration/extension-sdk/standalone.ts +7 -0
- package/examples/integration/extension-sdk/tsconfig.json +8 -0
- package/examples/integration/react-comprehensive/index.html +12 -0
- package/examples/integration/react-comprehensive/main.jsx +123 -0
- package/examples/integration/react-comprehensive/package.json +18 -0
- package/examples/local/README-ch.md +76 -0
- package/examples/local/README.md +4 -2
- package/examples/local/scenarios/blog-zh.reactive.md +71 -0
- package/examples/local/scenarios/blog.reactive.md +71 -0
- package/examples/local/scenarios/classroom-zh.reactive.md +97 -0
- package/examples/local/scenarios/classroom.reactive.md +97 -0
- package/examples/local/scenarios/proposal-zh.reactive.md +79 -0
- package/examples/local/scenarios/proposal.reactive.md +79 -0
- package/examples/local/scenarios/survey-zh.reactive.md +74 -0
- package/examples/local/scenarios/survey.reactive.md +74 -0
- package/examples/local/showcase/README-ch.md +22 -0
- package/examples/local/showcase/README.md +9 -3
- package/examples/local/showcase/features.reactive.md +637 -0
- package/examples/local/showcase/zh/features.reactive.md +637 -0
- package/examples/sci-fi-theme/README-ch.md +131 -0
- package/examples/sci-fi-theme/README.md +146 -0
- package/examples/sci-fi-theme/demo/demo.css +532 -0
- package/examples/sci-fi-theme/demo/document.reactive.md +185 -0
- package/examples/sci-fi-theme/demo/index.html +13 -0
- package/examples/sci-fi-theme/demo/main.tsx +180 -0
- package/examples/sci-fi-theme/docs/design-system-ch.md +245 -0
- package/examples/sci-fi-theme/docs/design-system.md +474 -0
- package/examples/sci-fi-theme/package.json +27 -0
- package/examples/sci-fi-theme/scripts/screenshot.mjs +98 -0
- package/examples/sci-fi-theme/src/components.css +1460 -0
- package/examples/sci-fi-theme/src/index.ts +6 -0
- package/examples/sci-fi-theme/src/sci-fi.css +5 -0
- package/examples/sci-fi-theme/src/theme.ts +37 -0
- package/examples/sci-fi-theme/src/tokens.css +408 -0
- package/examples/sci-fi-theme/tsconfig.json +20 -0
- package/examples/sci-fi-theme/vite.config.ts +24 -0
- package/examples/tetris-package/LICENSE +21 -0
- package/examples/tetris-package/NOTICES.md +11 -0
- package/examples/tetris-package/README-ch.md +91 -0
- package/examples/tetris-package/README.md +95 -0
- package/examples/tetris-package/package.json +35 -0
- package/examples/tetris-package/sample/document.reactive.md +16 -0
- package/examples/tetris-package/scripts/build-export.mjs +44 -0
- package/examples/tetris-package/scripts/build.mjs +130 -0
- package/examples/tetris-package/scripts/verify.mjs +173 -0
- package/examples/tetris-package/src/component.css +145 -0
- package/examples/tetris-package/src/components.tsx +334 -0
- package/examples/tetris-package/src/harness.tsx +34 -0
- package/examples/tetris-package/src/manifests.ts +93 -0
- package/examples/tetris-package/src/node-entry.ts +16 -0
- package/examples/tetris-package/src/sample.ts +4 -0
- package/examples/tetris-package/src/tetris-engine.ts +325 -0
- package/examples/tetris-package/tsconfig.json +15 -0
- package/package.json +98 -44
- package/dist-library/compiler-Cm3ppMxG.js +0 -46044
- package/dist-library/react-Bh7_oxZp.js +0 -59655
- package/dist-library/reactive-md-editor.css +0 -2
- package/dist-library/reactive-md-editor.js +0 -3853
- package/dist-library/runtime-DlFYQ4s_.js +0 -498
- package/dist-library/types/editor/ReactiveMarkdownEditor.d.ts +0 -7
- package/dist-library/types/editor/editor-toolbar.d.ts +0 -24
- package/dist-library/types/editor/editor-view-bar.d.ts +0 -11
- package/dist-library/types/editor/extended-native-components.d.ts +0 -58
- package/dist-library/types/editor/index.d.ts +0 -9
- package/dist-library/types/editor/locale.d.ts +0 -13
- package/dist-library/types/editor/source-authoring.d.ts +0 -59
- package/dist-library/types/editor/types.d.ts +0 -48
- package/dist-library/types/editor/use-gutter-metrics.d.ts +0 -5
- package/dist-library/types/editor/use-source-history.d.ts +0 -16
- package/dist-library/types/local/compiler.d.ts +0 -4
- package/dist-library/types/local/math.d.ts +0 -48
- package/dist-library/types/local/options.d.ts +0 -36
- package/dist-library/types/local/parser.d.ts +0 -13
- package/dist-library/types/local/render-types.d.ts +0 -27
- package/dist-library/types/local/runtime.d.ts +0 -2
- package/dist-library/types/local/schema.d.ts +0 -77
- package/dist-library/types/local/types.d.ts +0 -263
- package/dist-library/types/local/visuals.d.ts +0 -12
- package/dist-library/types/local/worker.d.ts +0 -98
- package/docs/development/performance-ch.md +0 -76
- package/docs/development/performance-en.md +0 -76
- /package/dist-library/types/{editor → authoring}/command-types.d.ts +0 -0
- /package/dist-library/types/{editor → authoring}/editor-commands.d.ts +0 -0
- /package/dist-library/types/local/{locale.d.ts → contracts/locale.d.ts} +0 -0
- /package/dist-library/types/local/{collection-functions.d.ts → evaluation/collection-functions.d.ts} +0 -0
- /package/dist-library/types/local/{data-functions.d.ts → evaluation/data-functions.d.ts} +0 -0
- /package/dist-library/types/local/{dates.d.ts → evaluation/dates.d.ts} +0 -0
- /package/dist-library/types/local/{formatting.d.ts → evaluation/formatting.d.ts} +0 -0
- /package/dist-library/types/local/{html-names.d.ts → html/html-names.d.ts} +0 -0
- /package/dist-library/types/local/{text-length.d.ts → source/text-length.d.ts} +0 -0
- /package/dist-library/types/local/{colors.d.ts → theme/colors.d.ts} +0 -0
- /package/dist-library/types/local/{code-block.d.ts → widgets/code-block.d.ts} +0 -0
- /package/dist-library/types/local/{code-languages.d.ts → widgets/code-languages.d.ts} +0 -0
- /package/dist-library/types/local/{diagram-layout.d.ts → widgets/diagram-layout.d.ts} +0 -0
- /package/dist-library/types/local/{image-view.d.ts → widgets/image-view.d.ts} +0 -0
- /package/dist-library/types/local/{math-view.d.ts → widgets/math-view.d.ts} +0 -0
- /package/dist-library/types/local/{table-surface.d.ts → widgets/table-surface.d.ts} +0 -0
|
@@ -0,0 +1,2346 @@
|
|
|
1
|
+
import { $ as e, N as t, Q as n, et as r, nt as i, ot as a, w as o, z as s } from "./identity-MYJXKSkB.js";
|
|
2
|
+
// src/presets/default-authoring.ts
|
|
3
|
+
var c = Object.freeze([
|
|
4
|
+
{
|
|
5
|
+
id: "input",
|
|
6
|
+
title: {
|
|
7
|
+
en: "Input controls",
|
|
8
|
+
zh: "输入控件"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: "action",
|
|
13
|
+
title: {
|
|
14
|
+
en: "Interactive tools",
|
|
15
|
+
zh: "交互工具"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: "layout",
|
|
20
|
+
title: {
|
|
21
|
+
en: "Content layout",
|
|
22
|
+
zh: "内容组织"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: "data",
|
|
27
|
+
title: {
|
|
28
|
+
en: "Data visualization",
|
|
29
|
+
zh: "数据可视化"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: "hint",
|
|
34
|
+
title: {
|
|
35
|
+
en: "Feedback",
|
|
36
|
+
zh: "提示反馈"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
]), l = new Set(c.map((e) => e.id)), u = Object.freeze({
|
|
40
|
+
jump: {
|
|
41
|
+
title: {
|
|
42
|
+
en: "Jump and anchor",
|
|
43
|
+
zh: "跳转与锚点"
|
|
44
|
+
},
|
|
45
|
+
description: {
|
|
46
|
+
en: "Link to a named position in this document.",
|
|
47
|
+
zh: "跳到当前文档中的指定位置。"
|
|
48
|
+
},
|
|
49
|
+
category: "action",
|
|
50
|
+
keywords: {
|
|
51
|
+
en: [
|
|
52
|
+
"jump",
|
|
53
|
+
"anchor",
|
|
54
|
+
"navigation"
|
|
55
|
+
],
|
|
56
|
+
zh: [
|
|
57
|
+
"跳转",
|
|
58
|
+
"锚点",
|
|
59
|
+
"导航"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
insertText: {
|
|
63
|
+
en: "<jump to=\"{{bind:destination}}\" appearance=\"button\" color=\"#2563eb\">View results</jump>\n\n<anchor id=\"{{bind:destination}}\">\n\n{{selection:Results appear here.}}",
|
|
64
|
+
zh: "<jump to=\"{{bind:destination}}\" appearance=\"button\" color=\"#2563eb\">查看结果</jump>\n\n<anchor id=\"{{bind:destination}}\">\n\n{{selection:结果显示在这里。}}"
|
|
65
|
+
},
|
|
66
|
+
extended: !0
|
|
67
|
+
},
|
|
68
|
+
anchor: {
|
|
69
|
+
title: {
|
|
70
|
+
en: "Anchor",
|
|
71
|
+
zh: "锚点"
|
|
72
|
+
},
|
|
73
|
+
description: {
|
|
74
|
+
en: "Name a destination for document links.",
|
|
75
|
+
zh: "为文档内的跳转指定目标位置。"
|
|
76
|
+
},
|
|
77
|
+
category: "layout",
|
|
78
|
+
keywords: {
|
|
79
|
+
en: [
|
|
80
|
+
"anchor",
|
|
81
|
+
"target",
|
|
82
|
+
"destination"
|
|
83
|
+
],
|
|
84
|
+
zh: [
|
|
85
|
+
"锚点",
|
|
86
|
+
"目标",
|
|
87
|
+
"位置"
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
insertText: {
|
|
91
|
+
en: "<anchor id=\"{{bind:destination}}\">",
|
|
92
|
+
zh: "<anchor id=\"{{bind:destination}}\">"
|
|
93
|
+
},
|
|
94
|
+
extended: !0
|
|
95
|
+
},
|
|
96
|
+
text: {
|
|
97
|
+
title: {
|
|
98
|
+
en: "Colored text",
|
|
99
|
+
zh: "文字颜色"
|
|
100
|
+
},
|
|
101
|
+
description: {
|
|
102
|
+
en: "Give selected words a foreground color.",
|
|
103
|
+
zh: "为选中的局部文字指定颜色。"
|
|
104
|
+
},
|
|
105
|
+
category: "hint",
|
|
106
|
+
keywords: {
|
|
107
|
+
en: [
|
|
108
|
+
"text",
|
|
109
|
+
"color",
|
|
110
|
+
"foreground"
|
|
111
|
+
],
|
|
112
|
+
zh: [
|
|
113
|
+
"文字",
|
|
114
|
+
"颜色",
|
|
115
|
+
"前景"
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
inline: !0,
|
|
119
|
+
insertText: {
|
|
120
|
+
en: "<text color=\"#a2273a\">{{selection:Important reminder}}</text>",
|
|
121
|
+
zh: "<text color=\"#a2273a\">{{selection:重要提醒}}</text>"
|
|
122
|
+
},
|
|
123
|
+
extended: !0
|
|
124
|
+
},
|
|
125
|
+
section: {
|
|
126
|
+
title: {
|
|
127
|
+
en: "Colored section",
|
|
128
|
+
zh: "正文颜色"
|
|
129
|
+
},
|
|
130
|
+
description: {
|
|
131
|
+
en: "Apply a shared text color to several paragraphs.",
|
|
132
|
+
zh: "为一段或多段正文指定统一颜色。"
|
|
133
|
+
},
|
|
134
|
+
category: "layout",
|
|
135
|
+
keywords: {
|
|
136
|
+
en: [
|
|
137
|
+
"section",
|
|
138
|
+
"color",
|
|
139
|
+
"paragraph"
|
|
140
|
+
],
|
|
141
|
+
zh: [
|
|
142
|
+
"正文",
|
|
143
|
+
"段落",
|
|
144
|
+
"颜色"
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
insertText: {
|
|
148
|
+
en: "<section color=\"#45536f\">\n\n{{selection:Your paragraphs go here.}}\n\n</section>",
|
|
149
|
+
zh: "<section color=\"#45536f\">\n\n{{selection:在这里填写正文。}}\n\n</section>"
|
|
150
|
+
},
|
|
151
|
+
extended: !0
|
|
152
|
+
},
|
|
153
|
+
"multi-select": {
|
|
154
|
+
title: {
|
|
155
|
+
en: "Multiple selection",
|
|
156
|
+
zh: "多选"
|
|
157
|
+
},
|
|
158
|
+
description: {
|
|
159
|
+
en: "Choose up to two items and read their values.",
|
|
160
|
+
zh: "最多选择两个选项,公开选项值数组。"
|
|
161
|
+
},
|
|
162
|
+
category: "input",
|
|
163
|
+
keywords: {
|
|
164
|
+
en: [
|
|
165
|
+
"multiple",
|
|
166
|
+
"select",
|
|
167
|
+
"subjects",
|
|
168
|
+
"checkbox"
|
|
169
|
+
],
|
|
170
|
+
zh: [
|
|
171
|
+
"多选",
|
|
172
|
+
"选项",
|
|
173
|
+
"主题"
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
insertText: {
|
|
177
|
+
en: "<multi-select bind=\"{{bind:subjects}}\" label=\"Subjects\" max-selected=\"2\">\n<option value=\"math\">Math</option>\n<option value=\"physics\">Physics</option>\n<option value=\"chemistry\">Chemistry</option>\n</multi-select>",
|
|
178
|
+
zh: "<multi-select bind=\"{{bind:subjects}}\" label=\"主题\" max-selected=\"2\">\n<option value=\"math\">数学</option>\n<option value=\"physics\">物理</option>\n<option value=\"chemistry\">化学</option>\n</multi-select>"
|
|
179
|
+
},
|
|
180
|
+
extended: !0
|
|
181
|
+
},
|
|
182
|
+
"range-slider": {
|
|
183
|
+
title: {
|
|
184
|
+
en: "Interval slider",
|
|
185
|
+
zh: "区间滑块"
|
|
186
|
+
},
|
|
187
|
+
description: {
|
|
188
|
+
en: "Choose the lower and upper bounds of an interval.",
|
|
189
|
+
zh: "同时选择区间的起点和终点。"
|
|
190
|
+
},
|
|
191
|
+
category: "input",
|
|
192
|
+
keywords: {
|
|
193
|
+
en: [
|
|
194
|
+
"range",
|
|
195
|
+
"interval",
|
|
196
|
+
"slider",
|
|
197
|
+
"bounds"
|
|
198
|
+
],
|
|
199
|
+
zh: [
|
|
200
|
+
"区间",
|
|
201
|
+
"滑块",
|
|
202
|
+
"上下限"
|
|
203
|
+
]
|
|
204
|
+
},
|
|
205
|
+
insertText: {
|
|
206
|
+
en: "<range-slider label=\"Interval\" bind-start=\"{{bind:low}}\" bind-end=\"{{bind:high}}\" initial-start=\"20\" initial-end=\"80\" min=\"0\" max=\"100\" step=\"1\">",
|
|
207
|
+
zh: "<range-slider label=\"观察区间\" bind-start=\"{{bind:low}}\" bind-end=\"{{bind:high}}\" initial-start=\"20\" initial-end=\"80\" min=\"0\" max=\"100\" step=\"1\">"
|
|
208
|
+
},
|
|
209
|
+
extended: !0
|
|
210
|
+
},
|
|
211
|
+
coordinate: {
|
|
212
|
+
title: {
|
|
213
|
+
en: "Coordinate point",
|
|
214
|
+
zh: "二维坐标"
|
|
215
|
+
},
|
|
216
|
+
description: {
|
|
217
|
+
en: "Drag a point or change its two coordinates.",
|
|
218
|
+
zh: "拖动坐标点,或直接修改两个坐标。"
|
|
219
|
+
},
|
|
220
|
+
category: "input",
|
|
221
|
+
keywords: {
|
|
222
|
+
en: [
|
|
223
|
+
"coordinate",
|
|
224
|
+
"point",
|
|
225
|
+
"drag",
|
|
226
|
+
"geometry"
|
|
227
|
+
],
|
|
228
|
+
zh: [
|
|
229
|
+
"坐标",
|
|
230
|
+
"拖动",
|
|
231
|
+
"几何"
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
insertText: {
|
|
235
|
+
en: "<coordinate label=\"Point\" bind-x=\"{{bind:px}}\" bind-y=\"{{bind:py}}\" initial-x=\"1\" initial-y=\"2\" x-min=\"-5\" x-max=\"5\" y-min=\"-5\" y-max=\"5\">",
|
|
236
|
+
zh: "<coordinate label=\"坐标点\" bind-x=\"{{bind:px}}\" bind-y=\"{{bind:py}}\" initial-x=\"1\" initial-y=\"2\" x-min=\"-5\" x-max=\"5\" y-min=\"-5\" y-max=\"5\">"
|
|
237
|
+
},
|
|
238
|
+
extended: !0
|
|
239
|
+
},
|
|
240
|
+
quiz: {
|
|
241
|
+
title: {
|
|
242
|
+
en: "Practice question",
|
|
243
|
+
zh: "练习题"
|
|
244
|
+
},
|
|
245
|
+
description: {
|
|
246
|
+
en: "Check an answer and read a short explanation.",
|
|
247
|
+
zh: "检查答案并阅读简短解析。"
|
|
248
|
+
},
|
|
249
|
+
category: "action",
|
|
250
|
+
keywords: {
|
|
251
|
+
en: [
|
|
252
|
+
"quiz",
|
|
253
|
+
"practice",
|
|
254
|
+
"answer",
|
|
255
|
+
"learn"
|
|
256
|
+
],
|
|
257
|
+
zh: [
|
|
258
|
+
"练习",
|
|
259
|
+
"题目",
|
|
260
|
+
"答案"
|
|
261
|
+
]
|
|
262
|
+
},
|
|
263
|
+
insertText: {
|
|
264
|
+
en: "<quiz type=\"choice\" label=\"What is 2 + 3?\" answer=\"b\" explanation=\"The sum is 5.\">\n<option value=\"a\">4</option>\n<option value=\"b\">5</option>\n</quiz>",
|
|
265
|
+
zh: "<quiz type=\"choice\" label=\"2 + 3 等于多少?\" answer=\"b\" explanation=\"相加得到 5。\">\n<option value=\"a\">4</option>\n<option value=\"b\">5</option>\n</quiz>"
|
|
266
|
+
},
|
|
267
|
+
extended: !0
|
|
268
|
+
},
|
|
269
|
+
steps: {
|
|
270
|
+
title: {
|
|
271
|
+
en: "Guided steps",
|
|
272
|
+
zh: "分步阅读"
|
|
273
|
+
},
|
|
274
|
+
description: {
|
|
275
|
+
en: "Read instructions one step at a time.",
|
|
276
|
+
zh: "按顺序阅读说明,内置上一步和下一步。"
|
|
277
|
+
},
|
|
278
|
+
category: "layout",
|
|
279
|
+
keywords: {
|
|
280
|
+
en: [
|
|
281
|
+
"steps",
|
|
282
|
+
"guide",
|
|
283
|
+
"previous",
|
|
284
|
+
"next"
|
|
285
|
+
],
|
|
286
|
+
zh: [
|
|
287
|
+
"步骤",
|
|
288
|
+
"引导",
|
|
289
|
+
"下一步"
|
|
290
|
+
]
|
|
291
|
+
},
|
|
292
|
+
insertText: {
|
|
293
|
+
en: "<steps label=\"Learning path\" bind=\"{{bind:lesson}}\">\n<step label=\"Observe\">\nChange a parameter.\n</step>\n<step label=\"Practice\">\nCheck an answer.\n</step>\n</steps>",
|
|
294
|
+
zh: "<steps label=\"学习路线\" bind=\"{{bind:lesson}}\">\n<step label=\"观察\">\n调整参数。\n</step>\n<step label=\"练习\">\n检查答案。\n</step>\n</steps>"
|
|
295
|
+
},
|
|
296
|
+
extended: !0
|
|
297
|
+
},
|
|
298
|
+
slider: {
|
|
299
|
+
title: {
|
|
300
|
+
en: "Slider",
|
|
301
|
+
zh: "滑块"
|
|
302
|
+
},
|
|
303
|
+
description: {
|
|
304
|
+
en: "Drag the slider to choose a number within a range.",
|
|
305
|
+
zh: "拖动滑块在指定范围内选择一个数值。"
|
|
306
|
+
},
|
|
307
|
+
category: "input",
|
|
308
|
+
keywords: {
|
|
309
|
+
en: [
|
|
310
|
+
"slider",
|
|
311
|
+
"range",
|
|
312
|
+
"number",
|
|
313
|
+
"drag",
|
|
314
|
+
"value"
|
|
315
|
+
],
|
|
316
|
+
zh: [
|
|
317
|
+
"滑块",
|
|
318
|
+
"范围",
|
|
319
|
+
"数值",
|
|
320
|
+
"拖动",
|
|
321
|
+
"滑动"
|
|
322
|
+
]
|
|
323
|
+
},
|
|
324
|
+
insertText: {
|
|
325
|
+
en: "<slider bind=\"{{bind:amount}}\" label=\"Amount\" initial=\"10\" min=\"0\" max=\"100\" step=\"1\">",
|
|
326
|
+
zh: "<slider bind=\"{{bind:amount}}\" label=\"数量\" initial=\"10\" min=\"0\" max=\"100\" step=\"1\">"
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
number: {
|
|
330
|
+
title: {
|
|
331
|
+
en: "Number input",
|
|
332
|
+
zh: "数字输入"
|
|
333
|
+
},
|
|
334
|
+
description: {
|
|
335
|
+
en: "Enter an exact number with an optional range and step.",
|
|
336
|
+
zh: "输入精确数字,可限制范围和步长。"
|
|
337
|
+
},
|
|
338
|
+
category: "input",
|
|
339
|
+
keywords: {
|
|
340
|
+
en: [
|
|
341
|
+
"number",
|
|
342
|
+
"numeric",
|
|
343
|
+
"input",
|
|
344
|
+
"step",
|
|
345
|
+
"quantity"
|
|
346
|
+
],
|
|
347
|
+
zh: [
|
|
348
|
+
"数字",
|
|
349
|
+
"数值",
|
|
350
|
+
"输入",
|
|
351
|
+
"步长",
|
|
352
|
+
"数量"
|
|
353
|
+
]
|
|
354
|
+
},
|
|
355
|
+
insertText: {
|
|
356
|
+
en: "<number bind=\"{{bind:quantity}}\" label=\"Quantity\" initial=\"1\" min=\"0\" max=\"100\" step=\"1\">",
|
|
357
|
+
zh: "<number bind=\"{{bind:quantity}}\" label=\"数量\" initial=\"1\" min=\"0\" max=\"100\" step=\"1\">"
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
input: {
|
|
361
|
+
title: {
|
|
362
|
+
en: "Single-line text",
|
|
363
|
+
zh: "单行文本"
|
|
364
|
+
},
|
|
365
|
+
description: {
|
|
366
|
+
en: "Enter a name, title or other single-line text.",
|
|
367
|
+
zh: "输入姓名、标题等单行文本。"
|
|
368
|
+
},
|
|
369
|
+
category: "input",
|
|
370
|
+
keywords: {
|
|
371
|
+
en: [
|
|
372
|
+
"input",
|
|
373
|
+
"text",
|
|
374
|
+
"single-line",
|
|
375
|
+
"field",
|
|
376
|
+
"name"
|
|
377
|
+
],
|
|
378
|
+
zh: [
|
|
379
|
+
"文本",
|
|
380
|
+
"单行",
|
|
381
|
+
"输入框",
|
|
382
|
+
"名称",
|
|
383
|
+
"输入"
|
|
384
|
+
]
|
|
385
|
+
},
|
|
386
|
+
insertText: {
|
|
387
|
+
en: "<input bind=\"{{bind:name}}\" label=\"Name\" placeholder=\"Enter a name\">",
|
|
388
|
+
zh: "<input bind=\"{{bind:name}}\" label=\"名称\" placeholder=\"请输入名称\">"
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
textarea: {
|
|
392
|
+
title: {
|
|
393
|
+
en: "Multi-line text",
|
|
394
|
+
zh: "多行文本"
|
|
395
|
+
},
|
|
396
|
+
description: {
|
|
397
|
+
en: "Enter notes, descriptions or other multi-line text.",
|
|
398
|
+
zh: "输入说明、备注等多行文字。"
|
|
399
|
+
},
|
|
400
|
+
category: "input",
|
|
401
|
+
keywords: {
|
|
402
|
+
en: [
|
|
403
|
+
"textarea",
|
|
404
|
+
"text area",
|
|
405
|
+
"multi-line",
|
|
406
|
+
"notes",
|
|
407
|
+
"description"
|
|
408
|
+
],
|
|
409
|
+
zh: [
|
|
410
|
+
"文本域",
|
|
411
|
+
"多行",
|
|
412
|
+
"说明",
|
|
413
|
+
"备注",
|
|
414
|
+
"详细"
|
|
415
|
+
]
|
|
416
|
+
},
|
|
417
|
+
insertText: {
|
|
418
|
+
en: "<textarea bind=\"{{bind:message}}\" label=\"Details\" placeholder=\"Enter details\" rows=\"4\">",
|
|
419
|
+
zh: "<textarea bind=\"{{bind:message}}\" label=\"详细说明\" placeholder=\"请输入详细说明\" rows=\"4\">"
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
toggle: {
|
|
423
|
+
title: {
|
|
424
|
+
en: "Toggle",
|
|
425
|
+
zh: "开关"
|
|
426
|
+
},
|
|
427
|
+
description: {
|
|
428
|
+
en: "Switch a boolean option on or off.",
|
|
429
|
+
zh: "在开启与关闭之间切换一个布尔选项。"
|
|
430
|
+
},
|
|
431
|
+
category: "input",
|
|
432
|
+
keywords: {
|
|
433
|
+
en: [
|
|
434
|
+
"toggle",
|
|
435
|
+
"switch",
|
|
436
|
+
"boolean",
|
|
437
|
+
"enable",
|
|
438
|
+
"on"
|
|
439
|
+
],
|
|
440
|
+
zh: [
|
|
441
|
+
"开关",
|
|
442
|
+
"布尔",
|
|
443
|
+
"启用",
|
|
444
|
+
"切换",
|
|
445
|
+
"选项"
|
|
446
|
+
]
|
|
447
|
+
},
|
|
448
|
+
insertText: {
|
|
449
|
+
en: "<toggle bind=\"{{bind:enabled}}\" label=\"Enable option\">",
|
|
450
|
+
zh: "<toggle bind=\"{{bind:enabled}}\" label=\"启用选项\">"
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
checkbox: {
|
|
454
|
+
title: {
|
|
455
|
+
en: "Checkbox",
|
|
456
|
+
zh: "复选框"
|
|
457
|
+
},
|
|
458
|
+
description: {
|
|
459
|
+
en: "Check or uncheck a boolean option.",
|
|
460
|
+
zh: "勾选或取消一个布尔选项。"
|
|
461
|
+
},
|
|
462
|
+
category: "input",
|
|
463
|
+
keywords: {
|
|
464
|
+
en: [
|
|
465
|
+
"checkbox",
|
|
466
|
+
"check",
|
|
467
|
+
"boolean",
|
|
468
|
+
"confirm",
|
|
469
|
+
"option"
|
|
470
|
+
],
|
|
471
|
+
zh: [
|
|
472
|
+
"复选",
|
|
473
|
+
"勾选",
|
|
474
|
+
"布尔",
|
|
475
|
+
"确认",
|
|
476
|
+
"选项"
|
|
477
|
+
]
|
|
478
|
+
},
|
|
479
|
+
insertText: {
|
|
480
|
+
en: "<checkbox bind=\"{{bind:confirmed}}\" label=\"Confirm option\">",
|
|
481
|
+
zh: "<checkbox bind=\"{{bind:confirmed}}\" label=\"确认选项\">"
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
date: {
|
|
485
|
+
title: {
|
|
486
|
+
en: "Date picker",
|
|
487
|
+
zh: "日期选择"
|
|
488
|
+
},
|
|
489
|
+
description: {
|
|
490
|
+
en: "Pick a date; the value stays empty until one is chosen.",
|
|
491
|
+
zh: "选择一个日期,未选择时为空字符串。"
|
|
492
|
+
},
|
|
493
|
+
category: "input",
|
|
494
|
+
keywords: {
|
|
495
|
+
en: [
|
|
496
|
+
"date",
|
|
497
|
+
"calendar",
|
|
498
|
+
"picker",
|
|
499
|
+
"day"
|
|
500
|
+
],
|
|
501
|
+
zh: [
|
|
502
|
+
"日期",
|
|
503
|
+
"日历",
|
|
504
|
+
"时间",
|
|
505
|
+
"选择"
|
|
506
|
+
]
|
|
507
|
+
},
|
|
508
|
+
insertText: {
|
|
509
|
+
en: "<date bind=\"{{bind:date}}\" label=\"Pick a date\">",
|
|
510
|
+
zh: "<date bind=\"{{bind:date}}\" label=\"选择日期\">"
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
choices: {
|
|
514
|
+
title: {
|
|
515
|
+
en: "Choice cards",
|
|
516
|
+
zh: "选项卡片"
|
|
517
|
+
},
|
|
518
|
+
description: {
|
|
519
|
+
en: "Pick one option from a set of cards.",
|
|
520
|
+
zh: "从多个选项卡中选择一项。"
|
|
521
|
+
},
|
|
522
|
+
category: "input",
|
|
523
|
+
keywords: {
|
|
524
|
+
en: [
|
|
525
|
+
"choices",
|
|
526
|
+
"options",
|
|
527
|
+
"cards",
|
|
528
|
+
"select",
|
|
529
|
+
"radio"
|
|
530
|
+
],
|
|
531
|
+
zh: [
|
|
532
|
+
"选项",
|
|
533
|
+
"选择",
|
|
534
|
+
"卡片",
|
|
535
|
+
"单选",
|
|
536
|
+
"方案"
|
|
537
|
+
]
|
|
538
|
+
},
|
|
539
|
+
insertText: {
|
|
540
|
+
en: "<choices bind=\"{{bind:plan}}\" label=\"Choose a plan\">\n<option value=\"basic\">Basic</option>\n<option value=\"pro\">Pro</option>\n</choices>",
|
|
541
|
+
zh: "<choices bind=\"{{bind:plan}}\" label=\"选择方案\">\n<option value=\"basic\">基础版</option>\n<option value=\"pro\">专业版</option>\n</choices>"
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
counter: {
|
|
545
|
+
title: {
|
|
546
|
+
en: "Counter",
|
|
547
|
+
zh: "计数器"
|
|
548
|
+
},
|
|
549
|
+
description: {
|
|
550
|
+
en: "Adjust an integer with plus and minus buttons, then reset it in one click.",
|
|
551
|
+
zh: "通过加减按钮调整整数,并可一键重置。"
|
|
552
|
+
},
|
|
553
|
+
category: "action",
|
|
554
|
+
keywords: {
|
|
555
|
+
en: [
|
|
556
|
+
"counter",
|
|
557
|
+
"count",
|
|
558
|
+
"plus",
|
|
559
|
+
"minus",
|
|
560
|
+
"integer"
|
|
561
|
+
],
|
|
562
|
+
zh: [
|
|
563
|
+
"计数",
|
|
564
|
+
"加减",
|
|
565
|
+
"整数",
|
|
566
|
+
"调整",
|
|
567
|
+
"重置"
|
|
568
|
+
]
|
|
569
|
+
},
|
|
570
|
+
insertText: {
|
|
571
|
+
en: "<counter bind=\"{{bind:count}}\" label=\"Count\" initial=\"0\" min=\"0\" max=\"99\">",
|
|
572
|
+
zh: "<counter bind=\"{{bind:count}}\" label=\"计数\" initial=\"0\" min=\"0\" max=\"99\">"
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
timer: {
|
|
576
|
+
title: {
|
|
577
|
+
en: "Countdown timer",
|
|
578
|
+
zh: "倒计时"
|
|
579
|
+
},
|
|
580
|
+
description: {
|
|
581
|
+
en: "Start, pause and reset a focus timer.",
|
|
582
|
+
zh: "启动、暂停和重置一段专注计时。"
|
|
583
|
+
},
|
|
584
|
+
category: "action",
|
|
585
|
+
keywords: {
|
|
586
|
+
en: [
|
|
587
|
+
"timer",
|
|
588
|
+
"countdown",
|
|
589
|
+
"focus",
|
|
590
|
+
"seconds",
|
|
591
|
+
"pause"
|
|
592
|
+
],
|
|
593
|
+
zh: [
|
|
594
|
+
"计时",
|
|
595
|
+
"倒计时",
|
|
596
|
+
"专注",
|
|
597
|
+
"秒",
|
|
598
|
+
"暂停"
|
|
599
|
+
]
|
|
600
|
+
},
|
|
601
|
+
insertText: {
|
|
602
|
+
en: "<timer bind=\"{{bind:remaining}}\" label=\"Focus timer\" duration=\"60\">",
|
|
603
|
+
zh: "<timer bind=\"{{bind:remaining}}\" label=\"专注计时\" duration=\"60\">"
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
checklist: {
|
|
607
|
+
title: {
|
|
608
|
+
en: "Checklist",
|
|
609
|
+
zh: "任务清单"
|
|
610
|
+
},
|
|
611
|
+
description: {
|
|
612
|
+
en: "Track completion with a checkable task list.",
|
|
613
|
+
zh: "用可勾选的任务列表记录完成情况。"
|
|
614
|
+
},
|
|
615
|
+
category: "action",
|
|
616
|
+
keywords: {
|
|
617
|
+
en: [
|
|
618
|
+
"checklist",
|
|
619
|
+
"tasks",
|
|
620
|
+
"todo",
|
|
621
|
+
"check",
|
|
622
|
+
"done"
|
|
623
|
+
],
|
|
624
|
+
zh: [
|
|
625
|
+
"清单",
|
|
626
|
+
"任务",
|
|
627
|
+
"勾选",
|
|
628
|
+
"待办",
|
|
629
|
+
"完成"
|
|
630
|
+
]
|
|
631
|
+
},
|
|
632
|
+
insertText: {
|
|
633
|
+
en: "<checklist bind=\"{{bind:done}}\" label=\"Task checklist\">\n- [ ] First task\n- [ ] Second task\n- [ ] Third task\n</checklist>",
|
|
634
|
+
zh: "<checklist bind=\"{{bind:done}}\" label=\"完成清单\">\n- [ ] 第一项任务\n- [ ] 第二项任务\n- [ ] 第三项任务\n</checklist>"
|
|
635
|
+
}
|
|
636
|
+
},
|
|
637
|
+
progress: {
|
|
638
|
+
title: {
|
|
639
|
+
en: "Progress bar",
|
|
640
|
+
zh: "进度条"
|
|
641
|
+
},
|
|
642
|
+
description: {
|
|
643
|
+
en: "Show completion from 0 to 100.",
|
|
644
|
+
zh: "展示 0 到 100 之间的完成进度。"
|
|
645
|
+
},
|
|
646
|
+
category: "action",
|
|
647
|
+
keywords: {
|
|
648
|
+
en: [
|
|
649
|
+
"progress",
|
|
650
|
+
"completion",
|
|
651
|
+
"bar",
|
|
652
|
+
"percent"
|
|
653
|
+
],
|
|
654
|
+
zh: [
|
|
655
|
+
"进度",
|
|
656
|
+
"完成度",
|
|
657
|
+
"进度条",
|
|
658
|
+
"百分比"
|
|
659
|
+
]
|
|
660
|
+
},
|
|
661
|
+
insertText: {
|
|
662
|
+
en: "<progress label=\"Progress\" value=\"{{ 40 }}\">",
|
|
663
|
+
zh: "<progress label=\"完成进度\" value=\"{{ 40 }}\">"
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
panel: {
|
|
667
|
+
title: {
|
|
668
|
+
en: "Parameter panel",
|
|
669
|
+
zh: "参数面板"
|
|
670
|
+
},
|
|
671
|
+
description: {
|
|
672
|
+
en: "Group controls in a panel with a restore-defaults button.",
|
|
673
|
+
zh: "把一组控件包进面板,并附带恢复默认按钮。"
|
|
674
|
+
},
|
|
675
|
+
category: "layout",
|
|
676
|
+
keywords: {
|
|
677
|
+
en: [
|
|
678
|
+
"panel",
|
|
679
|
+
"parameters",
|
|
680
|
+
"reset",
|
|
681
|
+
"form",
|
|
682
|
+
"group"
|
|
683
|
+
],
|
|
684
|
+
zh: [
|
|
685
|
+
"面板",
|
|
686
|
+
"参数",
|
|
687
|
+
"重置",
|
|
688
|
+
"表单",
|
|
689
|
+
"控件"
|
|
690
|
+
]
|
|
691
|
+
},
|
|
692
|
+
insertText: {
|
|
693
|
+
en: "<panel title=\"Parameters\">\n{{selection:Sample content}}\n</panel>",
|
|
694
|
+
zh: "<panel title=\"参数面板\">\n{{selection:示例内容}}\n</panel>"
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
card: {
|
|
698
|
+
title: {
|
|
699
|
+
en: "Content card",
|
|
700
|
+
zh: "内容卡片"
|
|
701
|
+
},
|
|
702
|
+
description: {
|
|
703
|
+
en: "Organize a self-contained piece of content in a card.",
|
|
704
|
+
zh: "用卡片组织一段独立内容。"
|
|
705
|
+
},
|
|
706
|
+
category: "layout",
|
|
707
|
+
keywords: {
|
|
708
|
+
en: [
|
|
709
|
+
"card",
|
|
710
|
+
"container",
|
|
711
|
+
"content",
|
|
712
|
+
"section"
|
|
713
|
+
],
|
|
714
|
+
zh: [
|
|
715
|
+
"卡片",
|
|
716
|
+
"容器",
|
|
717
|
+
"内容",
|
|
718
|
+
"区块"
|
|
719
|
+
]
|
|
720
|
+
},
|
|
721
|
+
insertText: {
|
|
722
|
+
en: "<card title=\"Content card\">\n{{selection:Sample content}}\n</card>",
|
|
723
|
+
zh: "<card title=\"内容卡片\">\n{{selection:示例内容}}\n</card>"
|
|
724
|
+
}
|
|
725
|
+
},
|
|
726
|
+
if: {
|
|
727
|
+
title: {
|
|
728
|
+
en: "Conditional section",
|
|
729
|
+
zh: "条件区域"
|
|
730
|
+
},
|
|
731
|
+
description: {
|
|
732
|
+
en: "Show the contents only when a condition is true.",
|
|
733
|
+
zh: "只有条件为真时才显示其中内容。"
|
|
734
|
+
},
|
|
735
|
+
category: "layout",
|
|
736
|
+
keywords: {
|
|
737
|
+
en: [
|
|
738
|
+
"if",
|
|
739
|
+
"condition",
|
|
740
|
+
"when",
|
|
741
|
+
"show",
|
|
742
|
+
"visible"
|
|
743
|
+
],
|
|
744
|
+
zh: [
|
|
745
|
+
"条件",
|
|
746
|
+
"判断",
|
|
747
|
+
"显示",
|
|
748
|
+
"当"
|
|
749
|
+
]
|
|
750
|
+
},
|
|
751
|
+
insertText: {
|
|
752
|
+
en: "<if when=\"{{ {{select:true}} }}\">\n{{selection:Sample content}}\n</if>",
|
|
753
|
+
zh: "<if when=\"{{ {{select:true}} }}\">\n{{selection:示例内容}}\n</if>"
|
|
754
|
+
}
|
|
755
|
+
},
|
|
756
|
+
gallery: {
|
|
757
|
+
title: {
|
|
758
|
+
en: "Gallery",
|
|
759
|
+
zh: "横向画廊"
|
|
760
|
+
},
|
|
761
|
+
description: {
|
|
762
|
+
en: "Browse images, cards and Markdown in a horizontal strip.",
|
|
763
|
+
zh: "横向浏览图片、卡片与 Markdown 内容。"
|
|
764
|
+
},
|
|
765
|
+
category: "layout",
|
|
766
|
+
keywords: {
|
|
767
|
+
en: [
|
|
768
|
+
"gallery",
|
|
769
|
+
"images",
|
|
770
|
+
"cards",
|
|
771
|
+
"scroll"
|
|
772
|
+
],
|
|
773
|
+
zh: [
|
|
774
|
+
"画廊",
|
|
775
|
+
"图片",
|
|
776
|
+
"卡片",
|
|
777
|
+
"横向滚动"
|
|
778
|
+
]
|
|
779
|
+
},
|
|
780
|
+
insertText: {
|
|
781
|
+
en: "<gallery label=\"Gallery\" item-width=\"280\">\n<gallery-item label=\"First item\">\n{{selection:Sample content}}\n</gallery-item>\n<gallery-item label=\"Second item\">\nMore content.\n</gallery-item>\n</gallery>",
|
|
782
|
+
zh: "<gallery label=\"横向画廊\" item-width=\"280\">\n<gallery-item label=\"项目一\">\n{{selection:示例内容}}\n</gallery-item>\n<gallery-item label=\"项目二\">\n更多内容。\n</gallery-item>\n</gallery>"
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
"gallery-item": {
|
|
786
|
+
title: {
|
|
787
|
+
en: "Gallery item",
|
|
788
|
+
zh: "画廊项目"
|
|
789
|
+
},
|
|
790
|
+
description: {
|
|
791
|
+
en: "One gallery item with Markdown or nested components.",
|
|
792
|
+
zh: "一项画廊内容,可包含 Markdown 和子组件。"
|
|
793
|
+
},
|
|
794
|
+
category: "layout",
|
|
795
|
+
keywords: {
|
|
796
|
+
en: [
|
|
797
|
+
"gallery",
|
|
798
|
+
"item",
|
|
799
|
+
"slide"
|
|
800
|
+
],
|
|
801
|
+
zh: [
|
|
802
|
+
"画廊",
|
|
803
|
+
"项目",
|
|
804
|
+
"切片"
|
|
805
|
+
]
|
|
806
|
+
},
|
|
807
|
+
insertText: {
|
|
808
|
+
en: "<gallery-item label=\"Item\">\n{{selection:Sample content}}\n</gallery-item>",
|
|
809
|
+
zh: "<gallery-item label=\"项目\">\n{{selection:示例内容}}\n</gallery-item>"
|
|
810
|
+
}
|
|
811
|
+
},
|
|
812
|
+
tabs: {
|
|
813
|
+
title: {
|
|
814
|
+
en: "Tabs",
|
|
815
|
+
zh: "标签页"
|
|
816
|
+
},
|
|
817
|
+
description: {
|
|
818
|
+
en: "Split content across switchable tabs.",
|
|
819
|
+
zh: "把内容分到多个可切换的标签页中。"
|
|
820
|
+
},
|
|
821
|
+
category: "layout",
|
|
822
|
+
keywords: {
|
|
823
|
+
en: [
|
|
824
|
+
"tabs",
|
|
825
|
+
"switch",
|
|
826
|
+
"sections",
|
|
827
|
+
"groups"
|
|
828
|
+
],
|
|
829
|
+
zh: [
|
|
830
|
+
"标签页",
|
|
831
|
+
"切换",
|
|
832
|
+
"分组",
|
|
833
|
+
"选项卡"
|
|
834
|
+
]
|
|
835
|
+
},
|
|
836
|
+
insertText: {
|
|
837
|
+
en: "<tabs label=\"Content tabs\">\n<tab label=\"Tab one\">\n{{selection:Sample content}}\n</tab>\n\n<tab label=\"Tab two\">\nContent for the second tab.\n</tab>\n</tabs>",
|
|
838
|
+
zh: "<tabs label=\"内容标签页\">\n<tab label=\"标签一\">\n{{selection:示例内容}}\n</tab>\n\n<tab label=\"标签二\">\n第二个标签页的内容。\n</tab>\n</tabs>"
|
|
839
|
+
}
|
|
840
|
+
},
|
|
841
|
+
accordion: {
|
|
842
|
+
title: {
|
|
843
|
+
en: "Accordion",
|
|
844
|
+
zh: "折叠面板"
|
|
845
|
+
},
|
|
846
|
+
description: {
|
|
847
|
+
en: "Put notes into items that expand and collapse.",
|
|
848
|
+
zh: "把说明放进可展开和收起的条目。"
|
|
849
|
+
},
|
|
850
|
+
category: "layout",
|
|
851
|
+
keywords: {
|
|
852
|
+
en: [
|
|
853
|
+
"accordion",
|
|
854
|
+
"collapse",
|
|
855
|
+
"expand",
|
|
856
|
+
"faq",
|
|
857
|
+
"disclosure"
|
|
858
|
+
],
|
|
859
|
+
zh: [
|
|
860
|
+
"折叠",
|
|
861
|
+
"展开",
|
|
862
|
+
"问答",
|
|
863
|
+
"手风琴",
|
|
864
|
+
"条目"
|
|
865
|
+
]
|
|
866
|
+
},
|
|
867
|
+
insertText: {
|
|
868
|
+
en: "<accordion label=\"FAQ\">\n<disclosure label=\"Question one\">\n{{selection:Sample content}}\n</disclosure>\n\n<disclosure label=\"Question two\">\nDetails for the second item.\n</disclosure>\n</accordion>",
|
|
869
|
+
zh: "<accordion label=\"常见问题\">\n<disclosure label=\"问题一\">\n{{selection:示例内容}}\n</disclosure>\n\n<disclosure label=\"问题二\">\n第二个条目的说明。\n</disclosure>\n</accordion>"
|
|
870
|
+
}
|
|
871
|
+
},
|
|
872
|
+
chart: {
|
|
873
|
+
title: {
|
|
874
|
+
en: "Bar chart",
|
|
875
|
+
zh: "柱状图"
|
|
876
|
+
},
|
|
877
|
+
description: {
|
|
878
|
+
en: "Turn a Markdown table into a bar chart.",
|
|
879
|
+
zh: "把 Markdown 表格转换成柱状图。"
|
|
880
|
+
},
|
|
881
|
+
category: "data",
|
|
882
|
+
keywords: {
|
|
883
|
+
en: [
|
|
884
|
+
"chart",
|
|
885
|
+
"bar",
|
|
886
|
+
"graph",
|
|
887
|
+
"table",
|
|
888
|
+
"data"
|
|
889
|
+
],
|
|
890
|
+
zh: [
|
|
891
|
+
"图表",
|
|
892
|
+
"柱状图",
|
|
893
|
+
"表格",
|
|
894
|
+
"数据",
|
|
895
|
+
"对比"
|
|
896
|
+
]
|
|
897
|
+
},
|
|
898
|
+
insertText: {
|
|
899
|
+
en: "<chart kind=\"bar\" title=\"Category comparison\" y-label=\"Value\">\n| Item | Value |\n| --- | ---: |\n| Item A | 20 |\n| Item B | 35 |\n</chart>",
|
|
900
|
+
zh: "<chart kind=\"bar\" title=\"分类对比\" y-label=\"数值\">\n| 项目 | 数值 |\n| --- | ---: |\n| 项目甲 | 20 |\n| 项目乙 | 35 |\n</chart>"
|
|
901
|
+
}
|
|
902
|
+
},
|
|
903
|
+
table: {
|
|
904
|
+
title: {
|
|
905
|
+
en: "Enhanced table",
|
|
906
|
+
zh: "增强表格"
|
|
907
|
+
},
|
|
908
|
+
description: {
|
|
909
|
+
en: "A Markdown table with search, sorting and paging.",
|
|
910
|
+
zh: "带搜索、排序和分页的 Markdown 表格。"
|
|
911
|
+
},
|
|
912
|
+
category: "data",
|
|
913
|
+
keywords: {
|
|
914
|
+
en: [
|
|
915
|
+
"table",
|
|
916
|
+
"search",
|
|
917
|
+
"sort",
|
|
918
|
+
"paging",
|
|
919
|
+
"data"
|
|
920
|
+
],
|
|
921
|
+
zh: [
|
|
922
|
+
"表格",
|
|
923
|
+
"搜索",
|
|
924
|
+
"排序",
|
|
925
|
+
"分页",
|
|
926
|
+
"数据"
|
|
927
|
+
]
|
|
928
|
+
},
|
|
929
|
+
insertText: {
|
|
930
|
+
en: "<table label=\"Data table\" page-size=\"5\">\n| Name | Category | Value |\n| --- | --- | ---: |\n| Item A | Category one | 20 |\n| Item B | Category two | 35 |\n</table>",
|
|
931
|
+
zh: "<table label=\"数据表格\" page-size=\"5\">\n| 名称 | 分类 | 数值 |\n| --- | --- | ---: |\n| 项目甲 | 分类一 | 20 |\n| 项目乙 | 分类二 | 35 |\n</table>"
|
|
932
|
+
}
|
|
933
|
+
},
|
|
934
|
+
timeline: {
|
|
935
|
+
title: {
|
|
936
|
+
en: "Timeline",
|
|
937
|
+
zh: "时间轴"
|
|
938
|
+
},
|
|
939
|
+
description: {
|
|
940
|
+
en: "Show task start times and durations in a table.",
|
|
941
|
+
zh: "用表格展示任务的开始时间与时长。"
|
|
942
|
+
},
|
|
943
|
+
category: "data",
|
|
944
|
+
keywords: {
|
|
945
|
+
en: [
|
|
946
|
+
"timeline",
|
|
947
|
+
"schedule",
|
|
948
|
+
"plan",
|
|
949
|
+
"duration",
|
|
950
|
+
"gantt"
|
|
951
|
+
],
|
|
952
|
+
zh: [
|
|
953
|
+
"时间轴",
|
|
954
|
+
"计划",
|
|
955
|
+
"时长",
|
|
956
|
+
"日程",
|
|
957
|
+
"任务"
|
|
958
|
+
]
|
|
959
|
+
},
|
|
960
|
+
insertText: {
|
|
961
|
+
en: "<timeline title=\"Task timeline\">\n| Task | Start | Duration | Notes |\n| --- | ---: | ---: | --- |\n| Prepare | 0 | 10 | List the materials |\n| Execute | 10 | 20 | Complete the main work |\n| Review | 30 | 5 | Check the results |\n</timeline>",
|
|
962
|
+
zh: "<timeline title=\"任务时间轴\">\n| 事项 | 开始 | 时长 | 说明 |\n| --- | ---: | ---: | --- |\n| 准备 | 0 | 10 | 列出所需材料 |\n| 执行 | 10 | 20 | 完成主要内容 |\n| 检查 | 30 | 5 | 复核结果 |\n</timeline>"
|
|
963
|
+
}
|
|
964
|
+
},
|
|
965
|
+
diagram: {
|
|
966
|
+
title: {
|
|
967
|
+
en: "Interactive diagram",
|
|
968
|
+
zh: "交互图解"
|
|
969
|
+
},
|
|
970
|
+
description: {
|
|
971
|
+
en: "Show a flow with nodes and edges; hover or focus a node to read its notes.",
|
|
972
|
+
zh: "用节点和连线展示流程,悬浮或聚焦节点查看说明。"
|
|
973
|
+
},
|
|
974
|
+
category: "data",
|
|
975
|
+
keywords: {
|
|
976
|
+
en: [
|
|
977
|
+
"diagram",
|
|
978
|
+
"flow",
|
|
979
|
+
"node",
|
|
980
|
+
"edge",
|
|
981
|
+
"graph"
|
|
982
|
+
],
|
|
983
|
+
zh: [
|
|
984
|
+
"图解",
|
|
985
|
+
"流程",
|
|
986
|
+
"节点",
|
|
987
|
+
"连线",
|
|
988
|
+
"关系图"
|
|
989
|
+
]
|
|
990
|
+
},
|
|
991
|
+
insertText: {
|
|
992
|
+
en: "<diagram label=\"Flow overview\">\n<node id=\"start\" label=\"Start\">\nWhere the flow begins.\n</node>\n\n<node id=\"process\" label=\"Process\">\nPerform the main step.\n</node>\n\n<node id=\"end\" label=\"End\">\nReview the result.\n</node>\n\n<edge from=\"start\" to=\"process\" label=\"Proceed\">\n<edge from=\"process\" to=\"end\" label=\"Complete\">\n</diagram>",
|
|
993
|
+
zh: "<diagram label=\"流程示意\">\n<node id=\"start\" label=\"开始\">\n流程起点。\n</node>\n\n<node id=\"process\" label=\"处理\">\n执行主要步骤。\n</node>\n\n<node id=\"end\" label=\"结束\">\n查看结果。\n</node>\n\n<edge from=\"start\" to=\"process\" label=\"进入\">\n<edge from=\"process\" to=\"end\" label=\"完成\">\n</diagram>"
|
|
994
|
+
}
|
|
995
|
+
},
|
|
996
|
+
plot: {
|
|
997
|
+
title: {
|
|
998
|
+
en: "Function plot",
|
|
999
|
+
zh: "函数曲线"
|
|
1000
|
+
},
|
|
1001
|
+
description: {
|
|
1002
|
+
en: "Plot explicit, parametric or implicit curves from LaTeX formulas.",
|
|
1003
|
+
zh: "用 LaTeX 公式绘制显式、参数方程或隐函数曲线。"
|
|
1004
|
+
},
|
|
1005
|
+
category: "data",
|
|
1006
|
+
keywords: {
|
|
1007
|
+
en: [
|
|
1008
|
+
"plot",
|
|
1009
|
+
"curve",
|
|
1010
|
+
"function",
|
|
1011
|
+
"parametric",
|
|
1012
|
+
"implicit",
|
|
1013
|
+
"formula",
|
|
1014
|
+
"latex",
|
|
1015
|
+
"math"
|
|
1016
|
+
],
|
|
1017
|
+
zh: [
|
|
1018
|
+
"曲线",
|
|
1019
|
+
"函数",
|
|
1020
|
+
"参数方程",
|
|
1021
|
+
"隐函数",
|
|
1022
|
+
"公式",
|
|
1023
|
+
"数学",
|
|
1024
|
+
"绘图"
|
|
1025
|
+
]
|
|
1026
|
+
},
|
|
1027
|
+
insertText: {
|
|
1028
|
+
en: "<plot min=\"-5\" max=\"5\" label=\"Function plot\">\n$$ y = x^2 $$\n</plot>",
|
|
1029
|
+
zh: "<plot min=\"-5\" max=\"5\" label=\"函数曲线\">\n$$ y = x^2 $$\n</plot>"
|
|
1030
|
+
}
|
|
1031
|
+
},
|
|
1032
|
+
alert: {
|
|
1033
|
+
title: {
|
|
1034
|
+
en: "Alert",
|
|
1035
|
+
zh: "提示框"
|
|
1036
|
+
},
|
|
1037
|
+
description: {
|
|
1038
|
+
en: "Highlight info, success or warning messages with different tones.",
|
|
1039
|
+
zh: "用不同语气突出普通、成功或警告信息。"
|
|
1040
|
+
},
|
|
1041
|
+
category: "hint",
|
|
1042
|
+
keywords: {
|
|
1043
|
+
en: [
|
|
1044
|
+
"alert",
|
|
1045
|
+
"notice",
|
|
1046
|
+
"warning",
|
|
1047
|
+
"info",
|
|
1048
|
+
"message"
|
|
1049
|
+
],
|
|
1050
|
+
zh: [
|
|
1051
|
+
"提示",
|
|
1052
|
+
"警告",
|
|
1053
|
+
"通知",
|
|
1054
|
+
"信息",
|
|
1055
|
+
"消息"
|
|
1056
|
+
]
|
|
1057
|
+
},
|
|
1058
|
+
insertText: {
|
|
1059
|
+
en: "<alert tone=\"info\" title=\"Notice\">\n{{selection:Sample content}}\n</alert>",
|
|
1060
|
+
zh: "<alert tone=\"info\" title=\"提示\">\n{{selection:示例内容}}\n</alert>"
|
|
1061
|
+
}
|
|
1062
|
+
},
|
|
1063
|
+
badge: {
|
|
1064
|
+
title: {
|
|
1065
|
+
en: "Badge",
|
|
1066
|
+
zh: "徽标"
|
|
1067
|
+
},
|
|
1068
|
+
description: {
|
|
1069
|
+
en: "Show a short status marker inside a sentence.",
|
|
1070
|
+
zh: "在句子里显示一个简短状态标记。"
|
|
1071
|
+
},
|
|
1072
|
+
category: "hint",
|
|
1073
|
+
keywords: {
|
|
1074
|
+
en: [
|
|
1075
|
+
"badge",
|
|
1076
|
+
"label",
|
|
1077
|
+
"status",
|
|
1078
|
+
"inline",
|
|
1079
|
+
"tag"
|
|
1080
|
+
],
|
|
1081
|
+
zh: [
|
|
1082
|
+
"徽标",
|
|
1083
|
+
"标签",
|
|
1084
|
+
"状态",
|
|
1085
|
+
"行内",
|
|
1086
|
+
"标记"
|
|
1087
|
+
]
|
|
1088
|
+
},
|
|
1089
|
+
inline: !0,
|
|
1090
|
+
insertText: {
|
|
1091
|
+
en: "<badge tone=\"success\">Badge</badge>",
|
|
1092
|
+
zh: "<badge tone=\"success\">标签</badge>"
|
|
1093
|
+
}
|
|
1094
|
+
},
|
|
1095
|
+
tooltip: {
|
|
1096
|
+
title: {
|
|
1097
|
+
en: "Tooltip",
|
|
1098
|
+
zh: "行内提示"
|
|
1099
|
+
},
|
|
1100
|
+
description: {
|
|
1101
|
+
en: "Attach a hover or focus note to a word in a sentence.",
|
|
1102
|
+
zh: "为句中的词语附加悬停或聚焦说明。"
|
|
1103
|
+
},
|
|
1104
|
+
category: "hint",
|
|
1105
|
+
keywords: {
|
|
1106
|
+
en: [
|
|
1107
|
+
"tooltip",
|
|
1108
|
+
"hint",
|
|
1109
|
+
"hover",
|
|
1110
|
+
"focus",
|
|
1111
|
+
"inline"
|
|
1112
|
+
],
|
|
1113
|
+
zh: [
|
|
1114
|
+
"提示",
|
|
1115
|
+
"悬停",
|
|
1116
|
+
"说明",
|
|
1117
|
+
"行内",
|
|
1118
|
+
"气泡"
|
|
1119
|
+
]
|
|
1120
|
+
},
|
|
1121
|
+
inline: !0,
|
|
1122
|
+
insertText: {
|
|
1123
|
+
en: "<tooltip text=\"Extra details appear here.\">Hover to view</tooltip>",
|
|
1124
|
+
zh: "<tooltip text=\"这里显示补充说明。\">悬停查看</tooltip>"
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
}), d = Object.freeze(Object.keys(u));
|
|
1128
|
+
function f(e) {
|
|
1129
|
+
return Object.hasOwn(u, e) ? u[e] : void 0;
|
|
1130
|
+
}
|
|
1131
|
+
function p(e, t, n = "") {
|
|
1132
|
+
if (e === void 0) return n;
|
|
1133
|
+
for (let n of [
|
|
1134
|
+
t,
|
|
1135
|
+
"en",
|
|
1136
|
+
"zh"
|
|
1137
|
+
]) {
|
|
1138
|
+
let t = e[n];
|
|
1139
|
+
if (typeof t == "string" && t.trim() !== "") return t;
|
|
1140
|
+
}
|
|
1141
|
+
for (let t of Object.values(e)) if (typeof t == "string" && t.trim() !== "") return t;
|
|
1142
|
+
return n;
|
|
1143
|
+
}
|
|
1144
|
+
function m(e, t) {
|
|
1145
|
+
let n = c.find((t) => t.id === e);
|
|
1146
|
+
return n ? p(n.title, t, n.id) : e;
|
|
1147
|
+
}
|
|
1148
|
+
function h(e) {
|
|
1149
|
+
let t = f(e);
|
|
1150
|
+
if (!t) return;
|
|
1151
|
+
let n = [];
|
|
1152
|
+
for (let e of [...t.keywords.en, ...t.keywords.zh]) {
|
|
1153
|
+
let t = e.toLowerCase();
|
|
1154
|
+
n.some((e) => e.toLowerCase() === t) || n.push(e);
|
|
1155
|
+
}
|
|
1156
|
+
return Object.freeze(n);
|
|
1157
|
+
}
|
|
1158
|
+
function g(e) {
|
|
1159
|
+
let t = f(e);
|
|
1160
|
+
if (!t) return;
|
|
1161
|
+
let n = t.insertText.en;
|
|
1162
|
+
if (typeof n == "string" && n.trim() !== "") return {
|
|
1163
|
+
title: t.title,
|
|
1164
|
+
description: t.description,
|
|
1165
|
+
category: l.has(t.category) ? t.category : void 0,
|
|
1166
|
+
insertText: n
|
|
1167
|
+
};
|
|
1168
|
+
}
|
|
1169
|
+
// src/presets/default-semantics.ts
|
|
1170
|
+
var _ = s, v = {
|
|
1171
|
+
text: (e = {}) => ({
|
|
1172
|
+
kind: "string",
|
|
1173
|
+
coerce: "text",
|
|
1174
|
+
...e
|
|
1175
|
+
}),
|
|
1176
|
+
expressionText: (e = {}) => ({
|
|
1177
|
+
kind: "string",
|
|
1178
|
+
...e
|
|
1179
|
+
}),
|
|
1180
|
+
dynamicText: (e = {}) => ({
|
|
1181
|
+
kind: "string",
|
|
1182
|
+
dynamic: !0,
|
|
1183
|
+
...e
|
|
1184
|
+
}),
|
|
1185
|
+
staticText: (e = {}) => ({
|
|
1186
|
+
kind: "string",
|
|
1187
|
+
static: !0,
|
|
1188
|
+
...e
|
|
1189
|
+
}),
|
|
1190
|
+
number: (e = {}) => ({
|
|
1191
|
+
kind: "number",
|
|
1192
|
+
...e
|
|
1193
|
+
}),
|
|
1194
|
+
boolean: (e = {}) => ({
|
|
1195
|
+
kind: "boolean",
|
|
1196
|
+
...e
|
|
1197
|
+
}),
|
|
1198
|
+
choice: (e, t = {}) => ({
|
|
1199
|
+
kind: "enum",
|
|
1200
|
+
enum: e,
|
|
1201
|
+
...t
|
|
1202
|
+
})
|
|
1203
|
+
}, y = (e = {}) => v.text(e), b = () => v.text(), x = () => v.text(), S = () => v.boolean({
|
|
1204
|
+
dynamic: !0,
|
|
1205
|
+
default: !1
|
|
1206
|
+
}), C = () => v.staticText({ color: !0 });
|
|
1207
|
+
function ee() {
|
|
1208
|
+
return Object.freeze({
|
|
1209
|
+
interactive: !0,
|
|
1210
|
+
static: !0,
|
|
1211
|
+
ssr: !0,
|
|
1212
|
+
offline: !0
|
|
1213
|
+
});
|
|
1214
|
+
}
|
|
1215
|
+
function w(e, t, n, r = {}) {
|
|
1216
|
+
return Object.freeze({
|
|
1217
|
+
kind: e,
|
|
1218
|
+
family: t,
|
|
1219
|
+
bind: "bind",
|
|
1220
|
+
initial: "initial",
|
|
1221
|
+
initialRule: n,
|
|
1222
|
+
...r
|
|
1223
|
+
});
|
|
1224
|
+
}
|
|
1225
|
+
function T(e, t, n = {}) {
|
|
1226
|
+
return Object.freeze({
|
|
1227
|
+
kind: "number",
|
|
1228
|
+
family: "number",
|
|
1229
|
+
bind: `bind-${e}`,
|
|
1230
|
+
initial: `initial-${e}`,
|
|
1231
|
+
initialRule: t,
|
|
1232
|
+
exclusive: !0,
|
|
1233
|
+
...n
|
|
1234
|
+
});
|
|
1235
|
+
}
|
|
1236
|
+
var E = (e, t, n = "step") => ({
|
|
1237
|
+
min: { prop: e },
|
|
1238
|
+
max: { prop: t },
|
|
1239
|
+
step: { prop: n }
|
|
1240
|
+
});
|
|
1241
|
+
function D(e) {
|
|
1242
|
+
return Object.freeze(e);
|
|
1243
|
+
}
|
|
1244
|
+
function O(...e) {
|
|
1245
|
+
return Object.freeze(e.map((e) => Object.freeze(e)));
|
|
1246
|
+
}
|
|
1247
|
+
function k(e, n, r) {
|
|
1248
|
+
return o({
|
|
1249
|
+
id: `reactive-md/${e}`,
|
|
1250
|
+
name: e,
|
|
1251
|
+
version: _,
|
|
1252
|
+
protocol: t,
|
|
1253
|
+
form: n,
|
|
1254
|
+
capabilities: ee(),
|
|
1255
|
+
...r
|
|
1256
|
+
});
|
|
1257
|
+
}
|
|
1258
|
+
var A = k("input", "leaf", {
|
|
1259
|
+
props: {
|
|
1260
|
+
label: y(),
|
|
1261
|
+
type: v.choice(["text", "email"], {
|
|
1262
|
+
static: !0,
|
|
1263
|
+
default: "text"
|
|
1264
|
+
}),
|
|
1265
|
+
placeholder: v.text(),
|
|
1266
|
+
required: v.boolean({
|
|
1267
|
+
dynamic: !0,
|
|
1268
|
+
default: !1
|
|
1269
|
+
}),
|
|
1270
|
+
"min-length": v.number({
|
|
1271
|
+
integer: !0,
|
|
1272
|
+
min: 0,
|
|
1273
|
+
default: 0
|
|
1274
|
+
}),
|
|
1275
|
+
"max-length": v.number({
|
|
1276
|
+
integer: !0,
|
|
1277
|
+
min: 0
|
|
1278
|
+
}),
|
|
1279
|
+
disabled: S()
|
|
1280
|
+
},
|
|
1281
|
+
bindings: { value: w("string", "text", "empty") },
|
|
1282
|
+
structure: D({
|
|
1283
|
+
rule: "none",
|
|
1284
|
+
label: "required"
|
|
1285
|
+
}),
|
|
1286
|
+
rules: O({
|
|
1287
|
+
kind: "text-length",
|
|
1288
|
+
min: "min-length",
|
|
1289
|
+
max: "max-length"
|
|
1290
|
+
}, {
|
|
1291
|
+
kind: "dynamic-constraints",
|
|
1292
|
+
attributes: ["required"]
|
|
1293
|
+
}, {
|
|
1294
|
+
kind: "value-length",
|
|
1295
|
+
min: "min-length",
|
|
1296
|
+
max: "max-length",
|
|
1297
|
+
email: "type",
|
|
1298
|
+
emailType: "email"
|
|
1299
|
+
}, {
|
|
1300
|
+
kind: "value-required",
|
|
1301
|
+
required: "required"
|
|
1302
|
+
})
|
|
1303
|
+
}), j = k("textarea", "leaf", {
|
|
1304
|
+
props: {
|
|
1305
|
+
label: y(),
|
|
1306
|
+
placeholder: v.text(),
|
|
1307
|
+
rows: v.number({
|
|
1308
|
+
integer: !0,
|
|
1309
|
+
positive: !0,
|
|
1310
|
+
default: 4
|
|
1311
|
+
}),
|
|
1312
|
+
required: v.boolean({
|
|
1313
|
+
dynamic: !0,
|
|
1314
|
+
default: !1
|
|
1315
|
+
}),
|
|
1316
|
+
"min-length": v.number({
|
|
1317
|
+
integer: !0,
|
|
1318
|
+
min: 0,
|
|
1319
|
+
default: 0
|
|
1320
|
+
}),
|
|
1321
|
+
"max-length": v.number({
|
|
1322
|
+
integer: !0,
|
|
1323
|
+
min: 0
|
|
1324
|
+
}),
|
|
1325
|
+
disabled: S()
|
|
1326
|
+
},
|
|
1327
|
+
bindings: { value: w("string", "text", "empty") },
|
|
1328
|
+
structure: D({
|
|
1329
|
+
rule: "none",
|
|
1330
|
+
label: "required"
|
|
1331
|
+
}),
|
|
1332
|
+
rules: O({
|
|
1333
|
+
kind: "text-length",
|
|
1334
|
+
min: "min-length",
|
|
1335
|
+
max: "max-length"
|
|
1336
|
+
}, {
|
|
1337
|
+
kind: "dynamic-constraints",
|
|
1338
|
+
attributes: ["required"]
|
|
1339
|
+
}, {
|
|
1340
|
+
kind: "value-length",
|
|
1341
|
+
min: "min-length",
|
|
1342
|
+
max: "max-length"
|
|
1343
|
+
}, {
|
|
1344
|
+
kind: "value-required",
|
|
1345
|
+
required: "required"
|
|
1346
|
+
})
|
|
1347
|
+
}), M = k("number", "leaf", {
|
|
1348
|
+
props: {
|
|
1349
|
+
label: y(),
|
|
1350
|
+
min: v.number({ dynamic: !0 }),
|
|
1351
|
+
max: v.number({ dynamic: !0 }),
|
|
1352
|
+
step: v.number({
|
|
1353
|
+
positive: !0,
|
|
1354
|
+
default: 1
|
|
1355
|
+
}),
|
|
1356
|
+
disabled: S()
|
|
1357
|
+
},
|
|
1358
|
+
bindings: { value: w("number", "number", "nearest-zero", { constraints: E("min", "max") }) },
|
|
1359
|
+
structure: D({
|
|
1360
|
+
rule: "none",
|
|
1361
|
+
label: "required"
|
|
1362
|
+
}),
|
|
1363
|
+
rules: O({
|
|
1364
|
+
kind: "numeric-range",
|
|
1365
|
+
min: "min",
|
|
1366
|
+
max: "max",
|
|
1367
|
+
step: "step"
|
|
1368
|
+
}, {
|
|
1369
|
+
kind: "dynamic-constraints",
|
|
1370
|
+
attributes: ["min", "max"]
|
|
1371
|
+
})
|
|
1372
|
+
}), N = k("slider", "leaf", {
|
|
1373
|
+
props: {
|
|
1374
|
+
label: y(),
|
|
1375
|
+
min: v.number({
|
|
1376
|
+
dynamic: !0,
|
|
1377
|
+
default: 0
|
|
1378
|
+
}),
|
|
1379
|
+
max: v.number({
|
|
1380
|
+
dynamic: !0,
|
|
1381
|
+
default: 100
|
|
1382
|
+
}),
|
|
1383
|
+
step: v.number({
|
|
1384
|
+
positive: !0,
|
|
1385
|
+
default: 1
|
|
1386
|
+
}),
|
|
1387
|
+
disabled: S(),
|
|
1388
|
+
color: C()
|
|
1389
|
+
},
|
|
1390
|
+
bindings: { value: w("number", "number", "min", { constraints: E("min", "max") }) },
|
|
1391
|
+
structure: D({
|
|
1392
|
+
rule: "none",
|
|
1393
|
+
label: "required"
|
|
1394
|
+
}),
|
|
1395
|
+
rules: O({
|
|
1396
|
+
kind: "numeric-range",
|
|
1397
|
+
min: "min",
|
|
1398
|
+
max: "max",
|
|
1399
|
+
step: "step"
|
|
1400
|
+
}, {
|
|
1401
|
+
kind: "dynamic-constraints",
|
|
1402
|
+
attributes: ["min", "max"]
|
|
1403
|
+
})
|
|
1404
|
+
}), P = k("range-slider", "leaf", {
|
|
1405
|
+
props: {
|
|
1406
|
+
label: y(),
|
|
1407
|
+
min: v.number({ default: 0 }),
|
|
1408
|
+
max: v.number({ default: 100 }),
|
|
1409
|
+
step: v.number({
|
|
1410
|
+
positive: !0,
|
|
1411
|
+
default: 1
|
|
1412
|
+
}),
|
|
1413
|
+
disabled: S(),
|
|
1414
|
+
color: C()
|
|
1415
|
+
},
|
|
1416
|
+
bindings: {
|
|
1417
|
+
start: T("start", "min", { constraints: E("min", "max") }),
|
|
1418
|
+
end: T("end", "max-step", { constraints: E("min", "max") })
|
|
1419
|
+
},
|
|
1420
|
+
slotRelations: [{
|
|
1421
|
+
lower: "start",
|
|
1422
|
+
upper: "end"
|
|
1423
|
+
}],
|
|
1424
|
+
structure: D({
|
|
1425
|
+
rule: "none",
|
|
1426
|
+
label: "required"
|
|
1427
|
+
}),
|
|
1428
|
+
rules: O({
|
|
1429
|
+
kind: "numeric-range",
|
|
1430
|
+
min: "min",
|
|
1431
|
+
max: "max",
|
|
1432
|
+
step: "step"
|
|
1433
|
+
})
|
|
1434
|
+
}), F = k("coordinate", "leaf", {
|
|
1435
|
+
props: {
|
|
1436
|
+
label: y(),
|
|
1437
|
+
"x-min": v.number({ default: -5 }),
|
|
1438
|
+
"x-max": v.number({ default: 5 }),
|
|
1439
|
+
"y-min": v.number({ default: -5 }),
|
|
1440
|
+
"y-max": v.number({ default: 5 }),
|
|
1441
|
+
step: v.number({
|
|
1442
|
+
positive: !0,
|
|
1443
|
+
default: 1
|
|
1444
|
+
}),
|
|
1445
|
+
disabled: S(),
|
|
1446
|
+
color: C()
|
|
1447
|
+
},
|
|
1448
|
+
bindings: {
|
|
1449
|
+
x: T("x", "nearest-zero", { constraints: {
|
|
1450
|
+
min: { prop: "x-min" },
|
|
1451
|
+
max: { prop: "x-max" },
|
|
1452
|
+
step: { prop: "step" }
|
|
1453
|
+
} }),
|
|
1454
|
+
y: T("y", "nearest-zero", { constraints: {
|
|
1455
|
+
min: { prop: "y-min" },
|
|
1456
|
+
max: { prop: "y-max" },
|
|
1457
|
+
step: { prop: "step" }
|
|
1458
|
+
} })
|
|
1459
|
+
},
|
|
1460
|
+
structure: D({
|
|
1461
|
+
rule: "none",
|
|
1462
|
+
label: "required"
|
|
1463
|
+
}),
|
|
1464
|
+
rules: O({
|
|
1465
|
+
kind: "numeric-range",
|
|
1466
|
+
min: "x-min",
|
|
1467
|
+
max: "x-max",
|
|
1468
|
+
step: "step"
|
|
1469
|
+
}, {
|
|
1470
|
+
kind: "numeric-range",
|
|
1471
|
+
min: "y-min",
|
|
1472
|
+
max: "y-max"
|
|
1473
|
+
})
|
|
1474
|
+
}), I = k("toggle", "leaf", {
|
|
1475
|
+
props: {
|
|
1476
|
+
label: y(),
|
|
1477
|
+
disabled: S(),
|
|
1478
|
+
color: C()
|
|
1479
|
+
},
|
|
1480
|
+
bindings: { value: w("boolean", "boolean", "false") },
|
|
1481
|
+
structure: D({
|
|
1482
|
+
rule: "none",
|
|
1483
|
+
label: "required"
|
|
1484
|
+
})
|
|
1485
|
+
}), L = k("checkbox", "leaf", {
|
|
1486
|
+
props: {
|
|
1487
|
+
label: y(),
|
|
1488
|
+
disabled: S(),
|
|
1489
|
+
color: C()
|
|
1490
|
+
},
|
|
1491
|
+
bindings: { value: w("boolean", "boolean", "false") },
|
|
1492
|
+
structure: D({
|
|
1493
|
+
rule: "none",
|
|
1494
|
+
label: "required"
|
|
1495
|
+
})
|
|
1496
|
+
}), R = k("date", "leaf", {
|
|
1497
|
+
props: {
|
|
1498
|
+
label: y(),
|
|
1499
|
+
min: v.dynamicText(),
|
|
1500
|
+
max: v.dynamicText(),
|
|
1501
|
+
required: v.boolean({
|
|
1502
|
+
dynamic: !0,
|
|
1503
|
+
default: !1
|
|
1504
|
+
}),
|
|
1505
|
+
disabled: S()
|
|
1506
|
+
},
|
|
1507
|
+
bindings: { value: w("string", "date", "empty") },
|
|
1508
|
+
structure: D({
|
|
1509
|
+
rule: "none",
|
|
1510
|
+
label: "required"
|
|
1511
|
+
}),
|
|
1512
|
+
rules: O({
|
|
1513
|
+
kind: "date-bounds",
|
|
1514
|
+
min: "min",
|
|
1515
|
+
max: "max"
|
|
1516
|
+
}, {
|
|
1517
|
+
kind: "dynamic-constraints",
|
|
1518
|
+
attributes: [
|
|
1519
|
+
"min",
|
|
1520
|
+
"max",
|
|
1521
|
+
"required"
|
|
1522
|
+
]
|
|
1523
|
+
}, {
|
|
1524
|
+
kind: "value-date",
|
|
1525
|
+
min: "min",
|
|
1526
|
+
max: "max",
|
|
1527
|
+
required: "required"
|
|
1528
|
+
})
|
|
1529
|
+
});
|
|
1530
|
+
function z(e, t = "container") {
|
|
1531
|
+
return k(e, t, {
|
|
1532
|
+
props: {
|
|
1533
|
+
label: y(),
|
|
1534
|
+
disabled: S(),
|
|
1535
|
+
color: C()
|
|
1536
|
+
},
|
|
1537
|
+
bindings: { value: w("string", "choice", "first-option") },
|
|
1538
|
+
structure: D({
|
|
1539
|
+
rule: "options",
|
|
1540
|
+
label: "required",
|
|
1541
|
+
child: "option",
|
|
1542
|
+
children: ["option"],
|
|
1543
|
+
min: 1,
|
|
1544
|
+
max: n,
|
|
1545
|
+
valueAttribute: "value"
|
|
1546
|
+
}),
|
|
1547
|
+
rules: O({
|
|
1548
|
+
kind: "options-body",
|
|
1549
|
+
child: "option",
|
|
1550
|
+
valueAttribute: "value",
|
|
1551
|
+
unique: !0,
|
|
1552
|
+
max: n
|
|
1553
|
+
})
|
|
1554
|
+
});
|
|
1555
|
+
}
|
|
1556
|
+
var B = z("select"), V = z("choices"), H = z("radio-group"), U = k("multi-select", "container", {
|
|
1557
|
+
props: {
|
|
1558
|
+
label: y(),
|
|
1559
|
+
"max-selected": v.number({
|
|
1560
|
+
integer: !0,
|
|
1561
|
+
min: 0
|
|
1562
|
+
}),
|
|
1563
|
+
disabled: S(),
|
|
1564
|
+
color: C()
|
|
1565
|
+
},
|
|
1566
|
+
bindings: { value: w("array", "multi-select", "empty-array", {
|
|
1567
|
+
exclusive: !0,
|
|
1568
|
+
maxItems: { prop: "max-selected" }
|
|
1569
|
+
}) },
|
|
1570
|
+
structure: D({
|
|
1571
|
+
rule: "options",
|
|
1572
|
+
label: "required",
|
|
1573
|
+
child: "option",
|
|
1574
|
+
children: ["option"],
|
|
1575
|
+
min: 1,
|
|
1576
|
+
max: n,
|
|
1577
|
+
valueAttribute: "value",
|
|
1578
|
+
forbidSeparator: ","
|
|
1579
|
+
}),
|
|
1580
|
+
rules: O({
|
|
1581
|
+
kind: "options-body",
|
|
1582
|
+
child: "option",
|
|
1583
|
+
valueAttribute: "value",
|
|
1584
|
+
unique: !0,
|
|
1585
|
+
max: n,
|
|
1586
|
+
forbidSeparator: ","
|
|
1587
|
+
}, {
|
|
1588
|
+
kind: "option-count",
|
|
1589
|
+
max: "max-selected"
|
|
1590
|
+
})
|
|
1591
|
+
}), W = k("option", "container", {
|
|
1592
|
+
props: { value: v.staticText({ required: !0 }) },
|
|
1593
|
+
structure: D({
|
|
1594
|
+
rule: "inline",
|
|
1595
|
+
label: "none",
|
|
1596
|
+
inlineOnly: !0,
|
|
1597
|
+
noComponents: !0
|
|
1598
|
+
}),
|
|
1599
|
+
rules: O({
|
|
1600
|
+
kind: "inline-body",
|
|
1601
|
+
strict: !0
|
|
1602
|
+
}, { kind: "no-components" })
|
|
1603
|
+
}), G = k("counter", "leaf", {
|
|
1604
|
+
props: {
|
|
1605
|
+
label: y(),
|
|
1606
|
+
min: v.number({ default: 0 }),
|
|
1607
|
+
max: v.number(),
|
|
1608
|
+
step: v.number({
|
|
1609
|
+
positive: !0,
|
|
1610
|
+
default: 1
|
|
1611
|
+
}),
|
|
1612
|
+
disabled: S()
|
|
1613
|
+
},
|
|
1614
|
+
bindings: { value: w("number", "number", "nearest-zero", { constraints: E("min", "max") }) },
|
|
1615
|
+
structure: D({
|
|
1616
|
+
rule: "none",
|
|
1617
|
+
label: "required"
|
|
1618
|
+
}),
|
|
1619
|
+
rules: O({
|
|
1620
|
+
kind: "numeric-range",
|
|
1621
|
+
min: "min",
|
|
1622
|
+
max: "max",
|
|
1623
|
+
step: "step"
|
|
1624
|
+
})
|
|
1625
|
+
}), K = k("timer", "leaf", {
|
|
1626
|
+
props: {
|
|
1627
|
+
label: y(),
|
|
1628
|
+
duration: v.number({
|
|
1629
|
+
integer: !0,
|
|
1630
|
+
positive: !0,
|
|
1631
|
+
default: 60
|
|
1632
|
+
})
|
|
1633
|
+
},
|
|
1634
|
+
bindings: { value: w("number", "timer", "duration", {
|
|
1635
|
+
exclusive: !0,
|
|
1636
|
+
constraints: {
|
|
1637
|
+
min: { literal: 0 },
|
|
1638
|
+
max: { prop: "duration" },
|
|
1639
|
+
step: { literal: 1 }
|
|
1640
|
+
},
|
|
1641
|
+
retain: !1
|
|
1642
|
+
}) },
|
|
1643
|
+
structure: D({
|
|
1644
|
+
rule: "none",
|
|
1645
|
+
label: "required"
|
|
1646
|
+
}),
|
|
1647
|
+
rules: O({
|
|
1648
|
+
kind: "timer-duration",
|
|
1649
|
+
attribute: "duration",
|
|
1650
|
+
default: 60
|
|
1651
|
+
}, {
|
|
1652
|
+
kind: "retain",
|
|
1653
|
+
value: !1
|
|
1654
|
+
})
|
|
1655
|
+
}), q = k("checklist", "container", {
|
|
1656
|
+
props: {
|
|
1657
|
+
label: y(),
|
|
1658
|
+
disabled: S(),
|
|
1659
|
+
color: C()
|
|
1660
|
+
},
|
|
1661
|
+
bindings: { value: w("array", "checklist", "checked", {
|
|
1662
|
+
exclusive: !0,
|
|
1663
|
+
retain: !1
|
|
1664
|
+
}) },
|
|
1665
|
+
structure: D({
|
|
1666
|
+
rule: "content",
|
|
1667
|
+
label: "required",
|
|
1668
|
+
noComponents: !0
|
|
1669
|
+
}),
|
|
1670
|
+
rules: O({
|
|
1671
|
+
kind: "checklist-body",
|
|
1672
|
+
itemLimit: n
|
|
1673
|
+
}, {
|
|
1674
|
+
kind: "retain",
|
|
1675
|
+
value: !1
|
|
1676
|
+
})
|
|
1677
|
+
}), J = k("progress", "leaf", {
|
|
1678
|
+
props: {
|
|
1679
|
+
label: y(),
|
|
1680
|
+
value: v.number({
|
|
1681
|
+
dynamic: !0,
|
|
1682
|
+
required: !0
|
|
1683
|
+
}),
|
|
1684
|
+
max: v.number({
|
|
1685
|
+
positive: !0,
|
|
1686
|
+
default: 100
|
|
1687
|
+
}),
|
|
1688
|
+
color: C()
|
|
1689
|
+
},
|
|
1690
|
+
structure: D({
|
|
1691
|
+
rule: "none",
|
|
1692
|
+
label: "required"
|
|
1693
|
+
}),
|
|
1694
|
+
rules: O({
|
|
1695
|
+
kind: "progress-bounds",
|
|
1696
|
+
value: "value",
|
|
1697
|
+
max: "max",
|
|
1698
|
+
defaultMax: 100
|
|
1699
|
+
})
|
|
1700
|
+
}), Y = k("jump", "inline", {
|
|
1701
|
+
props: {
|
|
1702
|
+
to: v.staticText({ required: !0 }),
|
|
1703
|
+
appearance: v.choice(["link", "button"], {
|
|
1704
|
+
static: !0,
|
|
1705
|
+
default: "link"
|
|
1706
|
+
}),
|
|
1707
|
+
color: C()
|
|
1708
|
+
},
|
|
1709
|
+
structure: D({
|
|
1710
|
+
rule: "inline",
|
|
1711
|
+
label: "none",
|
|
1712
|
+
inlineOnly: !0,
|
|
1713
|
+
noComponents: !0
|
|
1714
|
+
}),
|
|
1715
|
+
rules: O({
|
|
1716
|
+
kind: "inline-body",
|
|
1717
|
+
strict: !0
|
|
1718
|
+
}, { kind: "no-components" }, {
|
|
1719
|
+
kind: "navigation",
|
|
1720
|
+
target: "to"
|
|
1721
|
+
})
|
|
1722
|
+
}), X = k("anchor", "leaf", {
|
|
1723
|
+
props: { id: v.staticText({ required: !0 }) },
|
|
1724
|
+
structure: D({
|
|
1725
|
+
rule: "none",
|
|
1726
|
+
label: "none"
|
|
1727
|
+
}),
|
|
1728
|
+
rules: O({
|
|
1729
|
+
kind: "anchor",
|
|
1730
|
+
id: "id"
|
|
1731
|
+
})
|
|
1732
|
+
}), Z = k("text", "inline", {
|
|
1733
|
+
props: { color: v.staticText({
|
|
1734
|
+
required: !0,
|
|
1735
|
+
color: !0
|
|
1736
|
+
}) },
|
|
1737
|
+
structure: D({
|
|
1738
|
+
rule: "inline",
|
|
1739
|
+
label: "none",
|
|
1740
|
+
inlineOnly: !0,
|
|
1741
|
+
noComponents: !0
|
|
1742
|
+
}),
|
|
1743
|
+
rules: O({
|
|
1744
|
+
kind: "inline-body",
|
|
1745
|
+
strict: !0
|
|
1746
|
+
}, { kind: "no-components" })
|
|
1747
|
+
}), te = k("section", "container", {
|
|
1748
|
+
props: { color: v.staticText({
|
|
1749
|
+
required: !0,
|
|
1750
|
+
color: !0
|
|
1751
|
+
}) },
|
|
1752
|
+
structure: D({
|
|
1753
|
+
rule: "any",
|
|
1754
|
+
label: "none"
|
|
1755
|
+
})
|
|
1756
|
+
}), Q = k("quiz", "container", {
|
|
1757
|
+
props: {
|
|
1758
|
+
type: v.choice(["choice", "number"], {
|
|
1759
|
+
static: !0,
|
|
1760
|
+
default: "choice"
|
|
1761
|
+
}),
|
|
1762
|
+
label: y(),
|
|
1763
|
+
answer: v.staticText({ required: !0 }),
|
|
1764
|
+
explanation: v.text(),
|
|
1765
|
+
tolerance: v.number({
|
|
1766
|
+
min: 0,
|
|
1767
|
+
default: 0
|
|
1768
|
+
}),
|
|
1769
|
+
disabled: S()
|
|
1770
|
+
},
|
|
1771
|
+
structure: D({
|
|
1772
|
+
rule: "quiz",
|
|
1773
|
+
label: "required",
|
|
1774
|
+
child: "option",
|
|
1775
|
+
children: ["option"],
|
|
1776
|
+
max: n,
|
|
1777
|
+
valueAttribute: "value"
|
|
1778
|
+
}),
|
|
1779
|
+
rules: O({
|
|
1780
|
+
kind: "quiz-body",
|
|
1781
|
+
type: "type",
|
|
1782
|
+
answer: "answer",
|
|
1783
|
+
tolerance: "tolerance",
|
|
1784
|
+
child: "option",
|
|
1785
|
+
valueAttribute: "value",
|
|
1786
|
+
max: n
|
|
1787
|
+
}, {
|
|
1788
|
+
kind: "nonempty",
|
|
1789
|
+
attribute: "answer"
|
|
1790
|
+
})
|
|
1791
|
+
}), ne = k("panel", "container", {
|
|
1792
|
+
props: {
|
|
1793
|
+
title: x(),
|
|
1794
|
+
reset: v.boolean({ default: !0 })
|
|
1795
|
+
},
|
|
1796
|
+
structure: D({
|
|
1797
|
+
rule: "any",
|
|
1798
|
+
label: "none"
|
|
1799
|
+
}),
|
|
1800
|
+
rules: O({
|
|
1801
|
+
kind: "self-binding-read",
|
|
1802
|
+
mode: "always"
|
|
1803
|
+
})
|
|
1804
|
+
}), re = k("card", "container", {
|
|
1805
|
+
props: { title: x() },
|
|
1806
|
+
structure: D({
|
|
1807
|
+
rule: "any",
|
|
1808
|
+
label: "none"
|
|
1809
|
+
})
|
|
1810
|
+
}), ie = k("grid", "container", {
|
|
1811
|
+
props: { columns: v.number({
|
|
1812
|
+
integer: !0,
|
|
1813
|
+
min: 1,
|
|
1814
|
+
max: 4,
|
|
1815
|
+
default: 2
|
|
1816
|
+
}) },
|
|
1817
|
+
structure: D({
|
|
1818
|
+
rule: "components",
|
|
1819
|
+
label: "none",
|
|
1820
|
+
child: "card",
|
|
1821
|
+
children: ["card"],
|
|
1822
|
+
min: 1
|
|
1823
|
+
}),
|
|
1824
|
+
rules: O({
|
|
1825
|
+
kind: "only-children",
|
|
1826
|
+
children: ["card"],
|
|
1827
|
+
min: 1
|
|
1828
|
+
})
|
|
1829
|
+
}), ae = k("gallery", "container", {
|
|
1830
|
+
props: {
|
|
1831
|
+
label: y({ required: !0 }),
|
|
1832
|
+
"item-width": v.number({
|
|
1833
|
+
dynamic: !0,
|
|
1834
|
+
integer: !0,
|
|
1835
|
+
default: 280,
|
|
1836
|
+
min: 180,
|
|
1837
|
+
max: 480
|
|
1838
|
+
})
|
|
1839
|
+
},
|
|
1840
|
+
structure: D({
|
|
1841
|
+
rule: "components",
|
|
1842
|
+
label: "required",
|
|
1843
|
+
child: "gallery-item",
|
|
1844
|
+
children: ["gallery-item"],
|
|
1845
|
+
min: 1
|
|
1846
|
+
}),
|
|
1847
|
+
rules: O({
|
|
1848
|
+
kind: "only-children",
|
|
1849
|
+
children: ["gallery-item"],
|
|
1850
|
+
min: 1
|
|
1851
|
+
})
|
|
1852
|
+
}), oe = k("gallery-item", "container", {
|
|
1853
|
+
props: { label: b() },
|
|
1854
|
+
structure: D({
|
|
1855
|
+
rule: "any",
|
|
1856
|
+
label: "none"
|
|
1857
|
+
})
|
|
1858
|
+
}), se = k("tabs", "container", {
|
|
1859
|
+
props: { label: b() },
|
|
1860
|
+
bindings: { value: w("string", "tabs", "first-tab", { exclusive: !0 }) },
|
|
1861
|
+
structure: D({
|
|
1862
|
+
rule: "tabs",
|
|
1863
|
+
label: "optional",
|
|
1864
|
+
child: "tab",
|
|
1865
|
+
children: ["tab"],
|
|
1866
|
+
min: 1,
|
|
1867
|
+
valueAttribute: "value",
|
|
1868
|
+
generatedPrefix: "tab-"
|
|
1869
|
+
}),
|
|
1870
|
+
rules: O({
|
|
1871
|
+
kind: "value-sequence",
|
|
1872
|
+
child: "tab",
|
|
1873
|
+
valueAttribute: "value",
|
|
1874
|
+
min: 1,
|
|
1875
|
+
generatedPrefix: "tab-",
|
|
1876
|
+
unique: !0
|
|
1877
|
+
})
|
|
1878
|
+
}), ce = k("tab", "container", {
|
|
1879
|
+
props: {
|
|
1880
|
+
label: y(),
|
|
1881
|
+
value: v.staticText()
|
|
1882
|
+
},
|
|
1883
|
+
structure: D({
|
|
1884
|
+
rule: "any",
|
|
1885
|
+
label: "required",
|
|
1886
|
+
parents: ["tabs"]
|
|
1887
|
+
})
|
|
1888
|
+
}), le = k("steps", "container", {
|
|
1889
|
+
props: { label: b() },
|
|
1890
|
+
bindings: { value: w("string", "steps", "first-step", { exclusive: !0 }) },
|
|
1891
|
+
structure: D({
|
|
1892
|
+
rule: "steps",
|
|
1893
|
+
label: "optional",
|
|
1894
|
+
child: "step",
|
|
1895
|
+
children: ["step"],
|
|
1896
|
+
min: 1,
|
|
1897
|
+
valueAttribute: "value",
|
|
1898
|
+
generatedPrefix: "step-"
|
|
1899
|
+
}),
|
|
1900
|
+
rules: O({
|
|
1901
|
+
kind: "value-sequence",
|
|
1902
|
+
child: "step",
|
|
1903
|
+
valueAttribute: "value",
|
|
1904
|
+
min: 1,
|
|
1905
|
+
generatedPrefix: "step-",
|
|
1906
|
+
unique: !0
|
|
1907
|
+
})
|
|
1908
|
+
}), ue = k("step", "container", {
|
|
1909
|
+
props: {
|
|
1910
|
+
label: y(),
|
|
1911
|
+
value: v.staticText()
|
|
1912
|
+
},
|
|
1913
|
+
structure: D({
|
|
1914
|
+
rule: "any",
|
|
1915
|
+
label: "required",
|
|
1916
|
+
parents: ["steps"]
|
|
1917
|
+
})
|
|
1918
|
+
}), de = k("accordion", "container", {
|
|
1919
|
+
props: { label: b() },
|
|
1920
|
+
structure: D({
|
|
1921
|
+
rule: "components",
|
|
1922
|
+
label: "optional",
|
|
1923
|
+
child: "disclosure",
|
|
1924
|
+
children: ["disclosure"],
|
|
1925
|
+
min: 1
|
|
1926
|
+
}),
|
|
1927
|
+
rules: O({
|
|
1928
|
+
kind: "only-children",
|
|
1929
|
+
children: ["disclosure"],
|
|
1930
|
+
min: 1
|
|
1931
|
+
})
|
|
1932
|
+
}), fe = k("disclosure", "container", {
|
|
1933
|
+
props: {
|
|
1934
|
+
label: y(),
|
|
1935
|
+
open: v.boolean({ default: !1 })
|
|
1936
|
+
},
|
|
1937
|
+
structure: D({
|
|
1938
|
+
rule: "any",
|
|
1939
|
+
label: "required",
|
|
1940
|
+
parents: ["accordion"]
|
|
1941
|
+
})
|
|
1942
|
+
}), pe = k("if", "container", {
|
|
1943
|
+
props: { when: v.boolean({
|
|
1944
|
+
dynamic: !0,
|
|
1945
|
+
required: !0
|
|
1946
|
+
}) },
|
|
1947
|
+
structure: D({
|
|
1948
|
+
rule: "any",
|
|
1949
|
+
label: "none"
|
|
1950
|
+
}),
|
|
1951
|
+
rules: O({
|
|
1952
|
+
kind: "require-full-interpolation",
|
|
1953
|
+
attributes: ["when"]
|
|
1954
|
+
})
|
|
1955
|
+
}), me = k("alert", "container", {
|
|
1956
|
+
props: {
|
|
1957
|
+
title: x(),
|
|
1958
|
+
tone: v.choice([
|
|
1959
|
+
"info",
|
|
1960
|
+
"success",
|
|
1961
|
+
"warning"
|
|
1962
|
+
], {
|
|
1963
|
+
dynamic: !0,
|
|
1964
|
+
default: "info"
|
|
1965
|
+
})
|
|
1966
|
+
},
|
|
1967
|
+
structure: D({
|
|
1968
|
+
rule: "any",
|
|
1969
|
+
label: "none"
|
|
1970
|
+
})
|
|
1971
|
+
}), he = k("badge", "inline", {
|
|
1972
|
+
props: {
|
|
1973
|
+
tone: v.choice([
|
|
1974
|
+
"neutral",
|
|
1975
|
+
"success",
|
|
1976
|
+
"warning"
|
|
1977
|
+
], {
|
|
1978
|
+
dynamic: !0,
|
|
1979
|
+
default: "neutral"
|
|
1980
|
+
}),
|
|
1981
|
+
color: C()
|
|
1982
|
+
},
|
|
1983
|
+
structure: D({
|
|
1984
|
+
rule: "inline",
|
|
1985
|
+
label: "none",
|
|
1986
|
+
inlineOnly: !0,
|
|
1987
|
+
noComponents: !0
|
|
1988
|
+
}),
|
|
1989
|
+
rules: O({
|
|
1990
|
+
kind: "inline-body",
|
|
1991
|
+
strict: !0
|
|
1992
|
+
}, { kind: "no-components" })
|
|
1993
|
+
}), ge = k("tooltip", "inline", {
|
|
1994
|
+
props: { text: v.text({ required: !0 }) },
|
|
1995
|
+
structure: D({
|
|
1996
|
+
rule: "inline",
|
|
1997
|
+
label: "none",
|
|
1998
|
+
inlineOnly: !0,
|
|
1999
|
+
noComponents: !0
|
|
2000
|
+
}),
|
|
2001
|
+
rules: O({
|
|
2002
|
+
kind: "inline-body",
|
|
2003
|
+
strict: !0
|
|
2004
|
+
}, { kind: "no-components" })
|
|
2005
|
+
}), _e = k("validation", "leaf", {
|
|
2006
|
+
props: {
|
|
2007
|
+
when: v.boolean({
|
|
2008
|
+
dynamic: !0,
|
|
2009
|
+
required: !0
|
|
2010
|
+
}),
|
|
2011
|
+
message: v.text({ required: !0 }),
|
|
2012
|
+
fields: v.staticText({ required: !0 })
|
|
2013
|
+
},
|
|
2014
|
+
structure: D({
|
|
2015
|
+
rule: "none",
|
|
2016
|
+
label: "none"
|
|
2017
|
+
}),
|
|
2018
|
+
rules: O({
|
|
2019
|
+
kind: "validation-rule",
|
|
2020
|
+
when: "when",
|
|
2021
|
+
fields: "fields",
|
|
2022
|
+
message: "message",
|
|
2023
|
+
placement: "prose",
|
|
2024
|
+
max: 100
|
|
2025
|
+
}, {
|
|
2026
|
+
kind: "scoped-expressions",
|
|
2027
|
+
attributes: ["fields"],
|
|
2028
|
+
scope: "validation"
|
|
2029
|
+
})
|
|
2030
|
+
}), ve = k("data-table", "container", {
|
|
2031
|
+
props: {
|
|
2032
|
+
label: v.staticText(),
|
|
2033
|
+
rows: v.expressionText({ required: !0 }),
|
|
2034
|
+
key: v.expressionText({ required: !0 }),
|
|
2035
|
+
"max-rows": v.number({
|
|
2036
|
+
integer: !0,
|
|
2037
|
+
positive: !0,
|
|
2038
|
+
max: i,
|
|
2039
|
+
default: 100
|
|
2040
|
+
})
|
|
2041
|
+
},
|
|
2042
|
+
structure: D({
|
|
2043
|
+
rule: "components",
|
|
2044
|
+
label: "required",
|
|
2045
|
+
child: "column",
|
|
2046
|
+
children: ["column"],
|
|
2047
|
+
min: 1,
|
|
2048
|
+
max: 20
|
|
2049
|
+
}),
|
|
2050
|
+
rules: O({
|
|
2051
|
+
kind: "data-table",
|
|
2052
|
+
rows: "rows",
|
|
2053
|
+
key: "key",
|
|
2054
|
+
child: "column",
|
|
2055
|
+
childValue: "value",
|
|
2056
|
+
label: "label",
|
|
2057
|
+
maxRows: "max-rows",
|
|
2058
|
+
defaultMaxRows: 100,
|
|
2059
|
+
documentRows: r,
|
|
2060
|
+
documentCells: e,
|
|
2061
|
+
maxColumns: 20
|
|
2062
|
+
}, {
|
|
2063
|
+
kind: "require-full-interpolation",
|
|
2064
|
+
attributes: ["rows", "key"]
|
|
2065
|
+
}, {
|
|
2066
|
+
kind: "scoped-expressions",
|
|
2067
|
+
attributes: ["key"],
|
|
2068
|
+
scope: "row"
|
|
2069
|
+
}, {
|
|
2070
|
+
kind: "row-values",
|
|
2071
|
+
rows: "rows",
|
|
2072
|
+
key: "key",
|
|
2073
|
+
child: "column",
|
|
2074
|
+
childValue: "value"
|
|
2075
|
+
})
|
|
2076
|
+
}), ye = k("column", "leaf", {
|
|
2077
|
+
props: {
|
|
2078
|
+
label: v.staticText({ required: !0 }),
|
|
2079
|
+
value: v.expressionText({ required: !0 })
|
|
2080
|
+
},
|
|
2081
|
+
structure: D({
|
|
2082
|
+
rule: "none",
|
|
2083
|
+
label: "none",
|
|
2084
|
+
parents: ["data-table"]
|
|
2085
|
+
}),
|
|
2086
|
+
rules: O({
|
|
2087
|
+
kind: "require-full-interpolation",
|
|
2088
|
+
attributes: ["value"]
|
|
2089
|
+
}, {
|
|
2090
|
+
kind: "scoped-expressions",
|
|
2091
|
+
attributes: ["value"],
|
|
2092
|
+
scope: "row"
|
|
2093
|
+
})
|
|
2094
|
+
}), be = k("table", "container", {
|
|
2095
|
+
props: {
|
|
2096
|
+
label: b(),
|
|
2097
|
+
searchable: v.boolean({ default: !0 }),
|
|
2098
|
+
sortable: v.boolean({ default: !0 }),
|
|
2099
|
+
"page-size": v.number({
|
|
2100
|
+
integer: !0,
|
|
2101
|
+
positive: !0,
|
|
2102
|
+
default: 10
|
|
2103
|
+
}),
|
|
2104
|
+
key: v.staticText()
|
|
2105
|
+
},
|
|
2106
|
+
bindings: { value: w("string", "selection", "none", { requiresAttributes: ["key"] }) },
|
|
2107
|
+
structure: D({
|
|
2108
|
+
rule: "table",
|
|
2109
|
+
label: "optional"
|
|
2110
|
+
}),
|
|
2111
|
+
rules: O({ kind: "single-table" }, {
|
|
2112
|
+
kind: "selection-requires",
|
|
2113
|
+
key: "key",
|
|
2114
|
+
attributes: ["bind", "initial"]
|
|
2115
|
+
}, {
|
|
2116
|
+
kind: "table-selection",
|
|
2117
|
+
key: "key",
|
|
2118
|
+
bindings: ["bind"]
|
|
2119
|
+
}, {
|
|
2120
|
+
kind: "self-binding-read",
|
|
2121
|
+
mode: "attribute",
|
|
2122
|
+
attribute: "key"
|
|
2123
|
+
})
|
|
2124
|
+
}), xe = k("chart", "container", {
|
|
2125
|
+
props: {
|
|
2126
|
+
kind: v.choice([
|
|
2127
|
+
"bar",
|
|
2128
|
+
"line",
|
|
2129
|
+
"area",
|
|
2130
|
+
"scatter",
|
|
2131
|
+
"donut",
|
|
2132
|
+
"pie"
|
|
2133
|
+
], {
|
|
2134
|
+
static: !0,
|
|
2135
|
+
default: "bar"
|
|
2136
|
+
}),
|
|
2137
|
+
title: x(),
|
|
2138
|
+
x: v.staticText(),
|
|
2139
|
+
y: v.staticText(),
|
|
2140
|
+
"x-label": v.text(),
|
|
2141
|
+
"y-label": v.text(),
|
|
2142
|
+
key: v.staticText()
|
|
2143
|
+
},
|
|
2144
|
+
bindings: { value: w("string", "selection", "none", { requiresAttributes: ["key"] }) },
|
|
2145
|
+
structure: D({
|
|
2146
|
+
rule: "table",
|
|
2147
|
+
label: "none"
|
|
2148
|
+
}),
|
|
2149
|
+
rules: O({ kind: "single-table" }, {
|
|
2150
|
+
kind: "chart-table",
|
|
2151
|
+
chartKind: "kind",
|
|
2152
|
+
x: "x",
|
|
2153
|
+
y: "y"
|
|
2154
|
+
}, {
|
|
2155
|
+
kind: "table-selection",
|
|
2156
|
+
key: "key",
|
|
2157
|
+
bindings: ["bind"]
|
|
2158
|
+
}, {
|
|
2159
|
+
kind: "selection-requires",
|
|
2160
|
+
key: "key",
|
|
2161
|
+
attributes: ["bind", "initial"]
|
|
2162
|
+
}, {
|
|
2163
|
+
kind: "self-binding-read",
|
|
2164
|
+
mode: "attribute",
|
|
2165
|
+
attribute: "key"
|
|
2166
|
+
})
|
|
2167
|
+
}), Se = k("plot", "container", {
|
|
2168
|
+
props: {
|
|
2169
|
+
label: b(),
|
|
2170
|
+
min: v.number({
|
|
2171
|
+
dynamic: !0,
|
|
2172
|
+
default: -10
|
|
2173
|
+
}),
|
|
2174
|
+
max: v.number({
|
|
2175
|
+
dynamic: !0,
|
|
2176
|
+
default: 10
|
|
2177
|
+
}),
|
|
2178
|
+
samples: v.number({
|
|
2179
|
+
integer: !0,
|
|
2180
|
+
min: 2,
|
|
2181
|
+
max: 2e3,
|
|
2182
|
+
static: !0,
|
|
2183
|
+
default: 200
|
|
2184
|
+
}),
|
|
2185
|
+
"x-label": v.text({ default: "x" }),
|
|
2186
|
+
"y-label": v.text({ default: "y" })
|
|
2187
|
+
},
|
|
2188
|
+
structure: D({
|
|
2189
|
+
rule: "plot",
|
|
2190
|
+
label: "optional"
|
|
2191
|
+
}),
|
|
2192
|
+
rules: O({ kind: "math-body" }, {
|
|
2193
|
+
kind: "numeric-range",
|
|
2194
|
+
min: "min",
|
|
2195
|
+
max: "max",
|
|
2196
|
+
order: "increasing"
|
|
2197
|
+
}, {
|
|
2198
|
+
kind: "plot-math",
|
|
2199
|
+
min: "min",
|
|
2200
|
+
max: "max",
|
|
2201
|
+
samples: "samples",
|
|
2202
|
+
curves: 16,
|
|
2203
|
+
points: a
|
|
2204
|
+
}, { kind: "inline-math-reads" })
|
|
2205
|
+
}), Ce = k("timeline", "container", {
|
|
2206
|
+
props: {
|
|
2207
|
+
title: x(),
|
|
2208
|
+
unit: v.text({ default: "minutes" })
|
|
2209
|
+
},
|
|
2210
|
+
structure: D({
|
|
2211
|
+
rule: "table",
|
|
2212
|
+
label: "none"
|
|
2213
|
+
}),
|
|
2214
|
+
rules: O({ kind: "single-table" }, {
|
|
2215
|
+
kind: "timeline-table",
|
|
2216
|
+
headerSets: [[
|
|
2217
|
+
"Task",
|
|
2218
|
+
"Start",
|
|
2219
|
+
"Duration",
|
|
2220
|
+
"Notes"
|
|
2221
|
+
], [
|
|
2222
|
+
"事项",
|
|
2223
|
+
"开始",
|
|
2224
|
+
"时长",
|
|
2225
|
+
"说明"
|
|
2226
|
+
]]
|
|
2227
|
+
})
|
|
2228
|
+
}), we = k("diagram", "container", {
|
|
2229
|
+
props: {
|
|
2230
|
+
label: b(),
|
|
2231
|
+
direction: v.choice(["right", "down"], {
|
|
2232
|
+
static: !0,
|
|
2233
|
+
default: "right"
|
|
2234
|
+
})
|
|
2235
|
+
},
|
|
2236
|
+
bindings: { value: w("string", "diagram", "first-node", { exclusive: !0 }) },
|
|
2237
|
+
structure: D({
|
|
2238
|
+
rule: "diagram",
|
|
2239
|
+
label: "optional",
|
|
2240
|
+
child: "node",
|
|
2241
|
+
children: ["node", "edge"],
|
|
2242
|
+
min: 1
|
|
2243
|
+
}),
|
|
2244
|
+
rules: O({
|
|
2245
|
+
kind: "diagram-body",
|
|
2246
|
+
node: "node",
|
|
2247
|
+
edge: "edge",
|
|
2248
|
+
id: "id",
|
|
2249
|
+
from: "from",
|
|
2250
|
+
to: "to",
|
|
2251
|
+
label: "label"
|
|
2252
|
+
}, {
|
|
2253
|
+
kind: "self-binding-read",
|
|
2254
|
+
mode: "always"
|
|
2255
|
+
})
|
|
2256
|
+
}), Te = k("node", "container", {
|
|
2257
|
+
props: {
|
|
2258
|
+
id: v.staticText({ required: !0 }),
|
|
2259
|
+
label: y(),
|
|
2260
|
+
tone: v.choice([
|
|
2261
|
+
"neutral",
|
|
2262
|
+
"success",
|
|
2263
|
+
"warning"
|
|
2264
|
+
], {
|
|
2265
|
+
dynamic: !0,
|
|
2266
|
+
default: "neutral"
|
|
2267
|
+
})
|
|
2268
|
+
},
|
|
2269
|
+
structure: D({
|
|
2270
|
+
rule: "content",
|
|
2271
|
+
label: "required",
|
|
2272
|
+
noComponents: !0,
|
|
2273
|
+
parents: ["diagram"]
|
|
2274
|
+
}),
|
|
2275
|
+
rules: O({ kind: "no-components" })
|
|
2276
|
+
}), Ee = k("edge", "leaf", {
|
|
2277
|
+
props: {
|
|
2278
|
+
from: v.staticText({ required: !0 }),
|
|
2279
|
+
to: v.staticText({ required: !0 }),
|
|
2280
|
+
label: b()
|
|
2281
|
+
},
|
|
2282
|
+
structure: D({
|
|
2283
|
+
rule: "none",
|
|
2284
|
+
label: "none",
|
|
2285
|
+
parents: ["diagram"]
|
|
2286
|
+
})
|
|
2287
|
+
}), $ = Object.freeze([
|
|
2288
|
+
A,
|
|
2289
|
+
j,
|
|
2290
|
+
M,
|
|
2291
|
+
N,
|
|
2292
|
+
P,
|
|
2293
|
+
F,
|
|
2294
|
+
I,
|
|
2295
|
+
L,
|
|
2296
|
+
R,
|
|
2297
|
+
B,
|
|
2298
|
+
V,
|
|
2299
|
+
H,
|
|
2300
|
+
U,
|
|
2301
|
+
W,
|
|
2302
|
+
G,
|
|
2303
|
+
K,
|
|
2304
|
+
q,
|
|
2305
|
+
J,
|
|
2306
|
+
Y,
|
|
2307
|
+
X,
|
|
2308
|
+
Z,
|
|
2309
|
+
te,
|
|
2310
|
+
Q,
|
|
2311
|
+
ne,
|
|
2312
|
+
re,
|
|
2313
|
+
ie,
|
|
2314
|
+
ae,
|
|
2315
|
+
oe,
|
|
2316
|
+
se,
|
|
2317
|
+
ce,
|
|
2318
|
+
le,
|
|
2319
|
+
ue,
|
|
2320
|
+
de,
|
|
2321
|
+
fe,
|
|
2322
|
+
pe,
|
|
2323
|
+
me,
|
|
2324
|
+
he,
|
|
2325
|
+
ge,
|
|
2326
|
+
_e,
|
|
2327
|
+
ve,
|
|
2328
|
+
ye,
|
|
2329
|
+
be,
|
|
2330
|
+
xe,
|
|
2331
|
+
Se,
|
|
2332
|
+
Ce,
|
|
2333
|
+
we,
|
|
2334
|
+
Te,
|
|
2335
|
+
Ee
|
|
2336
|
+
]), De = Object.freeze($.map((e) => e.name));
|
|
2337
|
+
// src/presets/default-components.ts
|
|
2338
|
+
function Oe(e) {
|
|
2339
|
+
let t = g(e.name);
|
|
2340
|
+
return t ? o({
|
|
2341
|
+
...e,
|
|
2342
|
+
authoring: t
|
|
2343
|
+
}) : e;
|
|
2344
|
+
}
|
|
2345
|
+
var ke = Object.freeze($.map(Oe));
|
|
2346
|
+
export { u as a, f as c, d as i, g as l, De as n, m as o, c as r, h as s, ke as t, p as u };
|