reactive-md 0.9.3 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG-ch.md +34 -0
- package/CHANGELOG.md +34 -0
- package/README-ch.md +7 -7
- package/README-en.md +7 -7
- package/README.md +7 -7
- package/THIRD_PARTY_NOTICES.md +0 -57
- package/cli/help.mjs +6 -4
- package/cli/init.mjs +1 -1
- package/cli/migrate.mjs +1 -1
- package/dist-library/{LocalDocumentView-D6zQkTkt.js → LocalDocumentView-CP2QG86k.js} +46 -44
- package/dist-library/{LocalDocumentViewCore-CmJhemcA.js → LocalDocumentViewCore-Cd6yMEkg.js} +284 -265
- package/dist-library/{LocalReactiveDocumentCore-lAKOGAZ7.js → LocalReactiveDocumentCore-VuYpZqdn.js} +7 -7
- package/dist-library/LocalStaticDocumentView-DfX6bemE.js +147 -0
- package/dist-library/authoring-Bwu_zCWs.js +768 -0
- package/dist-library/choice-values-BItGjPD2.js +58 -0
- package/dist-library/compile-B35rfzKr.js +1742 -0
- package/dist-library/{compile-cache-key-6GgpETz_.js → compile-cache-key-D21X2Obx.js} +5 -5
- package/dist-library/{compiler-DLkKUK4t.js → compiler-DBwLawMZ.js} +4 -4
- package/dist-library/{compiler-core-Niqhp9wV.js → compiler-core-kkDiQ1RK.js} +3146 -2055
- package/dist-library/{component-kernel-IG4wOO0i.js → component-kernel-CsJSabHX.js} +42 -26
- package/dist-library/{component-state-Ht-hOK0W.js → component-state-Da0G8Ajc.js} +1 -1
- package/dist-library/{component-utils-eSj5IdG4.js → component-utils-ZM3jUJNy.js} +80 -79
- package/dist-library/conditional-branches-CIhJXasR.js +17 -0
- package/dist-library/{config-validation-Cpol91_M.js → config-validation-DbmsWAEV.js} +165 -152
- package/dist-library/{controls-B-CLSK8Q.js → controls-DRy5rzzN.js} +271 -228
- package/dist-library/{coordinate-PyLPMIQK.js → coordinate-c54pHfgf.js} +29 -29
- package/dist-library/data-table-CSAkm1eU.js +290 -0
- package/dist-library/data-table-model-DruztQFt.js +391 -0
- package/dist-library/{data-visuals-_Z7QqYTk.js → data-visuals-rZQUeQM0.js} +14 -14
- package/dist-library/{default-components-jugH7Ubr.js → default-components-B-39etG9.js} +233 -71
- package/dist-library/{default-config-DIrRpuQz.js → default-config-CCa8rm2k.js} +236 -216
- package/dist-library/default-options-By16CVw1.js +131 -0
- package/dist-library/{default-registry-BlloaZi7.js → default-registry-DXJy66xj.js} +3 -3
- package/dist-library/{default-schema-Ch-Vznpm.js → default-schema-CeYiEW1K.js} +3 -3
- package/dist-library/display-Bb6hAG5T.js +2065 -0
- package/dist-library/{document-theme-DBAfnk7y.js → document-theme-CJvN-nC1.js} +190 -3
- package/dist-library/{export-heVBqgxA.js → export-BSV4E0jv.js} +105 -106
- package/dist-library/font-aliases-CKYjwn4o.js +4 -0
- package/dist-library/{gallery-Q6VPS2ep.js → gallery-DM2yTVZJ.js} +1 -1
- package/dist-library/{html-CCnvzan1.js → html-CY9mC3Sr.js} +5 -5
- package/dist-library/{incremental-Bzvh8_lB.js → incremental-B-wW4H3F.js} +251 -245
- package/dist-library/{display-y4v9v0Qd.js → katex-4ukd4ZxT.js} +1555 -3618
- package/dist-library/layout-CPQggKxk.js +592 -0
- package/dist-library/{layout-BnfDeUNy.js → layout-CaDWsDof.js} +1 -1
- package/dist-library/{math-view-B0jthpRw.js → math-view-CyGTS6kv.js} +1 -1
- package/dist-library/{mount-preset-C_i37FvY.js → mount-preset-DtrCX4G8.js} +4 -4
- package/dist-library/{numeric-sliders-CkWS0-ja.js → numeric-sliders-BmJ1LCLx.js} +190 -190
- package/dist-library/{observability-CYLuvFfL.js → observability-BVQ16ByQ.js} +5 -4
- package/dist-library/{package-core-9UK5ZdqB.js → package-core-Cu_r_qs7.js} +7 -6
- package/dist-library/{parser-9yNJxGip.js → parser-BHl9Lxbw.js} +2 -2
- package/dist-library/{parser-standard-BPIy4HOu.js → parser-standard-DDAKv_DZ.js} +247 -247
- package/dist-library/{plugin-packs-CZb46nuv.js → plugin-packs-CkI0floL.js} +3 -3
- package/dist-library/{preset-core-BW3NWZJ9.js → preset-core-BKPbH_Nv.js} +377 -306
- package/dist-library/{props-pJRrfDc6.js → props-0iDqxlTk.js} +56 -61
- package/dist-library/{react-BSo0o998.js → react-74jdGBmu.js} +2 -2
- package/dist-library/reactive-md-authoring.js +277 -269
- package/dist-library/reactive-md-build.js +327 -33
- package/dist-library/reactive-md-compiler-session.js +3 -3
- package/dist-library/reactive-md-compiler-standard.js +10 -10
- package/dist-library/reactive-md-compiler.js +3 -3
- package/dist-library/reactive-md-contracts.js +4 -4
- package/dist-library/reactive-md-default-packs.js +4 -3
- package/dist-library/reactive-md-default-preset.js +3 -3
- package/dist-library/reactive-md-export.js +6 -6
- package/dist-library/reactive-md-minimal-preset.js +3 -2
- package/dist-library/reactive-md-minimal-react-preset.js +18 -17
- package/dist-library/reactive-md-minimal.css +1 -1
- package/dist-library/reactive-md-observability.js +2 -2
- package/dist-library/reactive-md-pack-style-manifest.js +8 -0
- package/dist-library/reactive-md-plugin-chart.js +13 -9
- package/dist-library/reactive-md-plugin-data.js +4 -4
- package/dist-library/reactive-md-plugin-diagram.js +3 -3
- package/dist-library/reactive-md-plugin-forms.js +5 -5
- package/dist-library/reactive-md-plugin-gallery.js +3 -3
- package/dist-library/reactive-md-plugin-navigation.js +10 -10
- package/dist-library/reactive-md-plugin-network.js +5 -5
- package/dist-library/reactive-md-plugin-plot.js +4 -4
- package/dist-library/reactive-md-react-component-accordion.js +3 -3
- package/dist-library/reactive-md-react-component-alert.js +3 -3
- package/dist-library/reactive-md-react-component-anchor.js +3 -3
- package/dist-library/reactive-md-react-component-badge.js +3 -3
- package/dist-library/reactive-md-react-component-card.js +3 -3
- package/dist-library/reactive-md-react-component-chart.js +2 -2
- package/dist-library/reactive-md-react-component-checkbox.js +2 -2
- package/dist-library/reactive-md-react-component-checklist.js +2 -2
- package/dist-library/reactive-md-react-component-choices.js +2 -2
- package/dist-library/reactive-md-react-component-column.js +1 -1
- package/dist-library/reactive-md-react-component-coordinate.js +2 -2
- package/dist-library/reactive-md-react-component-counter.js +2 -2
- package/dist-library/reactive-md-react-component-data-table.js +2 -2
- package/dist-library/reactive-md-react-component-date.js +2 -2
- package/dist-library/reactive-md-react-component-diagram.js +2 -2
- package/dist-library/reactive-md-react-component-disclosure.js +3 -3
- package/dist-library/reactive-md-react-component-edge.js +1 -1
- package/dist-library/reactive-md-react-component-else.js +10 -0
- package/dist-library/reactive-md-react-component-gallery-item.js +2 -2
- package/dist-library/reactive-md-react-component-gallery.js +2 -2
- package/dist-library/reactive-md-react-component-grid.js +3 -3
- package/dist-library/reactive-md-react-component-if.js +3 -3
- package/dist-library/reactive-md-react-component-input.js +2 -2
- package/dist-library/reactive-md-react-component-jump.js +3 -3
- package/dist-library/reactive-md-react-component-multi-select.js +2 -2
- package/dist-library/reactive-md-react-component-node.js +2 -2
- package/dist-library/reactive-md-react-component-number.js +2 -2
- package/dist-library/reactive-md-react-component-option.js +1 -1
- package/dist-library/reactive-md-react-component-panel.js +3 -3
- package/dist-library/reactive-md-react-component-plot.js +2 -2
- package/dist-library/reactive-md-react-component-progress.js +2 -2
- package/dist-library/reactive-md-react-component-quiz.js +2 -2
- package/dist-library/reactive-md-react-component-radio-group.js +2 -2
- package/dist-library/reactive-md-react-component-range-slider.js +2 -2
- package/dist-library/reactive-md-react-component-section.js +3 -3
- package/dist-library/reactive-md-react-component-select.js +2 -2
- package/dist-library/reactive-md-react-component-slider.js +2 -2
- package/dist-library/reactive-md-react-component-step.js +3 -3
- package/dist-library/reactive-md-react-component-steps.js +3 -3
- package/dist-library/reactive-md-react-component-tab.js +3 -3
- package/dist-library/reactive-md-react-component-table.js +2 -2
- package/dist-library/reactive-md-react-component-tabs.js +3 -3
- package/dist-library/reactive-md-react-component-text.js +3 -3
- package/dist-library/reactive-md-react-component-textarea.js +2 -2
- package/dist-library/reactive-md-react-component-timeline.js +2 -2
- package/dist-library/reactive-md-react-component-timer.js +2 -2
- package/dist-library/reactive-md-react-component-toggle.js +2 -2
- package/dist-library/reactive-md-react-component-tooltip.js +3 -3
- package/dist-library/reactive-md-react-component-validation.js +3 -3
- package/dist-library/reactive-md-react-minimal.js +4 -4
- package/dist-library/reactive-md-react-pack-controls.js +4 -4
- package/dist-library/reactive-md-react-pack-data.js +3 -3
- package/dist-library/reactive-md-react-pack-layout.js +25 -24
- package/dist-library/reactive-md-react-pack-visuals.js +2 -2
- package/dist-library/reactive-md-react-packed.js +6 -6
- package/dist-library/reactive-md-react-server.js +37 -36
- package/dist-library/reactive-md-react-static-server.js +2 -2
- package/dist-library/reactive-md-react-static.js +1 -1
- package/dist-library/reactive-md-react-unstyled.js +12 -12
- package/dist-library/reactive-md-react.js +12 -12
- package/dist-library/reactive-md-scan.js +1 -1
- package/dist-library/reactive-md-sdk.js +23 -9
- package/dist-library/reactive-md-standalone-configured.js +2 -2
- package/dist-library/reactive-md-standalone-host.js +2 -2
- package/dist-library/reactive-md-testing-browser.js +2 -2
- package/dist-library/reactive-md-testing-react.js +6 -6
- package/dist-library/reactive-md-testing.js +6 -6
- package/dist-library/reactive-md-vite.js +25 -9
- package/dist-library/reactive-md-worker-pool.js +3 -3
- package/dist-library/reactive-md.css +1 -1
- package/dist-library/reactive-md.js +52 -43
- package/dist-library/{registry-core-CziAIP5P.js → registry-core-DxEaxhJ6.js} +3 -2
- package/dist-library/{render-nodes-DKjg_TR1.js → render-nodes-B6j6Ip5I.js} +766 -731
- package/dist-library/{requirements-DhIkxAbl.js → requirements-C56sFIEs.js} +2 -2
- package/dist-library/{resources-B_nbROgj.js → resources-6VaNgk-h.js} +2 -2
- package/dist-library/rmd-pack-layout.css +9 -0
- package/dist-library/rmd-pack-resource-layout.css +9 -0
- package/dist-library/runtime-BHeuLOv_.js +1369 -0
- package/dist-library/{runtime-requirement-C4-vNcf5.js → runtime-requirement-DzPO8raU.js} +166 -163
- package/dist-library/{schema-core-4sd1Vu7V.js → schema-core-CDXfxdID.js} +24 -1
- package/dist-library/{sdk-core-BLsW9cCy.js → sdk-core-CnE-n0Z7.js} +469 -314
- package/dist-library/{session-core-DLBRPV7f.js → session-core-C071yQwV.js} +140 -127
- package/dist-library/{validation-XXlb-spV.js → sha256-utf16-Bmandi_H.js} +392 -315
- package/dist-library/shareable-CHCDnl6j.js +844 -0
- package/dist-library/types/authoring/catalog.d.ts +3 -1
- package/dist-library/types/authoring/index.d.ts +1 -1
- package/dist-library/types/components/chart/default-chart-types.d.ts +3 -0
- package/dist-library/types/components/chart/default-chart.d.ts +7 -0
- package/dist-library/types/components/entries/else.d.ts +3 -0
- package/dist-library/types/components/layout/layout.d.ts +5 -0
- package/dist-library/types/components/shared/visuals.d.ts +1 -1
- package/dist-library/types/components/table/data-table-model.d.ts +95 -2
- package/dist-library/types/components/table/data-table.d.ts +2 -2
- package/dist-library/types/contracts/component-kernel.d.ts +5 -0
- package/dist-library/types/contracts/font-aliases.d.ts +18 -0
- package/dist-library/types/contracts/number-literal.d.ts +2 -0
- package/dist-library/types/contracts/sha256-utf16.d.ts +2 -0
- package/dist-library/types/export/index.d.ts +4 -1
- package/dist-library/types/local/compilation/compiler-choices.d.ts +4 -0
- package/dist-library/types/local/compilation/compiler-declarations.d.ts +2 -1
- package/dist-library/types/local/compilation/compiler-expressions.d.ts +12 -1
- package/dist-library/types/local/compilation/compiler-macros.d.ts +18 -0
- package/dist-library/types/local/compilation/compiler-structure.d.ts +8 -2
- package/dist-library/types/local/compilation/compiler-tables.d.ts +1 -0
- package/dist-library/types/local/compilation/compiler-validation.d.ts +11 -0
- package/dist-library/types/local/compilation/compiler-values.d.ts +1 -2
- package/dist-library/types/local/configuration/diagnostic-messages.d.ts +173 -2
- package/dist-library/types/local/configuration/diagnostic-runtime-messages.d.ts +40 -0
- package/dist-library/types/local/evaluation/choice-values.d.ts +22 -0
- package/dist-library/types/local/evaluation/computations.d.ts +13 -5
- package/dist-library/types/local/evaluation/dataset.d.ts +4 -0
- package/dist-library/types/local/evaluation/expression/collection-functions.d.ts +13 -0
- package/dist-library/types/local/evaluation/expression/compile.d.ts +11 -4
- package/dist-library/types/local/evaluation/expression/data-functions.d.ts +23 -0
- package/dist-library/types/local/evaluation/expression/evaluation.d.ts +3 -1
- package/dist-library/types/local/evaluation/expression/internal-names.d.ts +8 -0
- package/dist-library/types/local/evaluation/expression/syntax.d.ts +19 -2
- package/dist-library/types/local/evaluation/expression/transform-budget.d.ts +13 -0
- package/dist-library/types/local/evaluation/expression/values.d.ts +9 -1
- package/dist-library/types/local/evaluation/validation.d.ts +8 -6
- package/dist-library/types/local/index.d.ts +4 -3
- package/dist-library/types/local/parsing/conditional-branches.d.ts +4 -0
- package/dist-library/types/local/parsing/source-revision.d.ts +3 -0
- package/dist-library/types/local/runtime/runtime-choices.d.ts +11 -0
- package/dist-library/types/local/runtime/runtime.d.ts +3 -1
- package/dist-library/types/local/runtime/state.d.ts +30 -15
- package/dist-library/types/local/source/authoring-requirements.d.ts +3 -0
- package/dist-library/types/local/source/authoring-syntax.d.ts +3 -2
- package/dist-library/types/local/source/authoring.d.ts +10 -0
- package/dist-library/types/local/source/source-migration.d.ts +1 -0
- package/dist-library/types/local/types.d.ts +33 -2
- package/dist-library/types/react/component-api.d.ts +21 -2
- package/dist-library/types/react/component-utils.d.ts +11 -0
- package/dist-library/types/react/font-aliases.d.ts +2 -0
- package/dist-library/types/react/package-core.d.ts +3 -0
- package/dist-library/types/react/rendering/document/validation-state.d.ts +1 -1
- package/dist-library/types/react/rendering/document/view-revision.d.ts +3 -12
- package/dist-library/types/react/rendering/table/data-table.d.ts +1 -1
- package/dist-library/types/react/sdk-core.d.ts +3 -1
- package/dist-library/types/sdk/assembly.d.ts +3 -0
- package/dist-library/types/sdk/font.d.ts +13 -0
- package/dist-library/types/sdk/index.d.ts +1 -0
- package/dist-library/types/sdk/theme.d.ts +5 -0
- package/dist-library/types/sdk/types.d.ts +6 -0
- package/dist-library/types/sdk/version.d.ts +1 -1
- package/dist-library/types/shareable.d.ts +15 -3
- package/dist-library/types/standalone/prepare.d.ts +4 -2
- package/dist-library/types/standalone/session-core.d.ts +4 -1
- package/dist-library/types/vite/index.d.ts +3 -0
- package/dist-library/types/vite/registration.d.ts +1 -0
- package/dist-library/{types-Bza88SGK.js → types-B4qG8J4S.js} +1 -1
- package/dist-library/types-FYhRWRn9.js +3 -0
- package/dist-library/use-hydrated-D1gFY2Dq.js +2655 -0
- package/dist-library/validation-DRuW0Wl9.js +433 -0
- package/dist-library/{version-B0G1699c.js → version-4wzhbvDG.js} +1 -1
- package/dist-library/{visual-helpers-CRmaqCHX.js → visual-helpers-UU6xiL8g.js} +3 -3
- package/dist-library/visuals-7xzoL9ql.js +49340 -0
- package/dist-library/{worker-D6WMV8xJ.js → worker-3ldRjOEG.js} +9 -9
- package/dist-standalone/reactive-md-standalone.css +1 -1
- package/dist-standalone/reactive-md-standalone.js +128 -368
- package/docs/README-ch.md +3 -1
- package/docs/README.md +3 -1
- package/docs/compatibility/api-stability-ch.md +1 -1
- package/docs/compatibility/api-stability-en.md +1 -1
- package/docs/compatibility/compatibility-ch.md +15 -15
- package/docs/compatibility/compatibility-en.md +15 -15
- package/docs/compatibility/compatibility-manifest.schema.json +3 -2
- package/docs/compatibility/deprecation-ch.md +2 -2
- package/docs/compatibility/deprecation-en.md +2 -2
- package/docs/compatibility/source-versioning-ch.md +22 -14
- package/docs/compatibility/source-versioning-en.md +22 -13
- package/docs/compatibility/support-matrix-ch.md +4 -3
- package/docs/compatibility/support-matrix-en.md +4 -3
- package/docs/development/component-development-ch.md +2 -2
- package/docs/development/component-development-en.md +2 -2
- package/docs/development/component-protocol-ch.md +18 -18
- package/docs/development/component-protocol-en.md +14 -14
- package/docs/guides/local-guide-ch.md +109 -20
- package/docs/guides/local-guide-en.md +109 -20
- package/docs/integration/author-tools-ch.md +1 -1
- package/docs/integration/author-tools-en.md +1 -1
- package/docs/integration/editor-ch.md +3 -3
- package/docs/integration/editor-en.md +3 -3
- package/docs/integration/extension-sdk-ch.md +29 -3
- package/docs/integration/extension-sdk-en.md +29 -3
- package/docs/integration/local-integration-ch.md +3 -3
- package/docs/integration/local-integration-en.md +3 -3
- package/docs/integration/pdf-export-ch.md +42 -0
- package/docs/integration/pdf-export-en.md +42 -0
- package/docs/integration/shareable-export-ch.md +11 -19
- package/docs/integration/shareable-export-en.md +11 -19
- package/docs/reference/diagnostics-counting-ch.md +24 -1
- package/docs/reference/diagnostics-counting-en.md +24 -1
- package/docs/reference/local-interaction-syntax-ch.md +222 -33
- package/docs/reference/local-interaction-syntax-en.md +220 -31
- package/docs/reference/public-api-ch.md +24 -18
- package/docs/reference/public-api-en.md +24 -18
- package/docs/reference/theme-protocol-ch.md +1 -1
- package/docs/reference/theme-protocol-en.md +1 -1
- package/docs/releases/release-0.10.0-ch.md +45 -0
- package/docs/releases/release-0.10.0-en.md +45 -0
- package/examples/conformance/README-ch.md +3 -3
- package/examples/conformance/README.md +3 -3
- package/examples/conformance/local-draft-4.json +441 -0
- package/examples/integration/README-ch.md +3 -3
- package/examples/integration/README.md +3 -3
- package/examples/integration/chat-session/package.json +1 -1
- package/examples/local/README-ch.md +1 -1
- package/examples/local/README.md +1 -1
- package/package.json +6 -1
- package/dist-library/LocalStaticDocumentView-2J7w0sKm.js +0 -143
- package/dist-library/authoring-B14SsOXZ.js +0 -893
- package/dist-library/compile-D50B5_Ww.js +0 -1249
- package/dist-library/computations-CffoW7Ff.js +0 -340
- package/dist-library/data-table-Kv_ZA2Z2.js +0 -297
- package/dist-library/default-options-DU5dxuU6.js +0 -125
- package/dist-library/layout-BfUzzO2b.js +0 -553
- package/dist-library/runtime-CuJndKqK.js +0 -1289
- package/dist-library/shareable-C6mUerpQ.js +0 -817
- package/dist-library/types-daDo2c_w.js +0 -3
- package/dist-library/use-hydrated-W-laKPhY.js +0 -22975
- package/dist-library/visuals-CoVSjVD8.js +0 -49159
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import "./limits-CFERRrlC.js";
|
|
2
|
-
import { c as e } from "./computations-CffoW7Ff.js";
|
|
3
|
-
import { f as t, l as n, p as r } from "./validation-XXlb-spV.js";
|
|
4
|
-
import { t as i } from "./parser-standard-BPIy4HOu.js";
|
|
5
|
-
import a from "./reactive-md-default-preset.js";
|
|
6
|
-
import { a as o, o as s, s as c } from "./default-config-DIrRpuQz.js";
|
|
7
|
-
import { n as l } from "./default-registry-BlloaZi7.js";
|
|
8
|
-
// src/assemblies/default-options.ts
|
|
9
|
-
function u(e) {
|
|
10
|
-
return t(e, {
|
|
11
|
-
defaults: l(),
|
|
12
|
-
preset: {
|
|
13
|
-
id: a.id,
|
|
14
|
-
version: a.version
|
|
15
|
-
},
|
|
16
|
-
defaultConfigKey: o(),
|
|
17
|
-
readConfig: (e) => c(e),
|
|
18
|
-
configKey: (e) => o(e),
|
|
19
|
-
capabilities: i
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
function d(e) {
|
|
23
|
-
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
24
|
-
}
|
|
25
|
-
var f = 256, p = 4096, m = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new WeakMap(), _ = 0;
|
|
26
|
-
function v() {
|
|
27
|
-
return _ += 1, _;
|
|
28
|
-
}
|
|
29
|
-
function y(e) {
|
|
30
|
-
if (typeof e == "object" && e || typeof e == "function") {
|
|
31
|
-
let t = e, n = g.get(t);
|
|
32
|
-
return n === void 0 && (n = v(), g.set(t, n)), `unreadable#${n}`;
|
|
33
|
-
}
|
|
34
|
-
return `unreadable:${typeof e}:${String(e)}`;
|
|
35
|
-
}
|
|
36
|
-
function b(e) {
|
|
37
|
-
let t = [], n = 0, r = (e) => {
|
|
38
|
-
if (n += 1, n > p) throw RangeError("signature budget");
|
|
39
|
-
switch (typeof e) {
|
|
40
|
-
case "string": return `s${JSON.stringify(e)}`;
|
|
41
|
-
case "number": return `n${Object.is(e, -0) ? "-0" : String(e)}`;
|
|
42
|
-
case "boolean": return e ? "b1" : "b0";
|
|
43
|
-
case "undefined": return "u";
|
|
44
|
-
case "bigint": return `g${e.toString()}`;
|
|
45
|
-
case "symbol": {
|
|
46
|
-
let t = h.get(e);
|
|
47
|
-
return t === void 0 && (t = v(), h.set(e, t)), `y${t}`;
|
|
48
|
-
}
|
|
49
|
-
case "function": {
|
|
50
|
-
let t = m.get(e);
|
|
51
|
-
return t === void 0 && (t = v(), m.set(e, t)), `f${t}`;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
if (e === null) return "null";
|
|
55
|
-
let i = e, a = t.indexOf(i);
|
|
56
|
-
if (a >= 0) return `r${a}`;
|
|
57
|
-
t.push(i);
|
|
58
|
-
try {
|
|
59
|
-
if (Array.isArray(i)) {
|
|
60
|
-
let e = Math.min(i.length, 8);
|
|
61
|
-
if (i.length > f) {
|
|
62
|
-
let t = `a#${i.length}[`;
|
|
63
|
-
for (let n = 0; n < e; n += 1) t += `${r(i[n])},`;
|
|
64
|
-
return `${t}]`;
|
|
65
|
-
}
|
|
66
|
-
let t = `a${i.length}[`;
|
|
67
|
-
for (let e = 0; e < i.length; e += 1) t += `${r(i[e])},`;
|
|
68
|
-
return `${t}]`;
|
|
69
|
-
}
|
|
70
|
-
let e = Object.keys(i);
|
|
71
|
-
if (e.length > f) {
|
|
72
|
-
let t = `o#${e.length}{`;
|
|
73
|
-
for (let n of e.slice(0, 8)) t += `${r(n)},`;
|
|
74
|
-
return `${t}}`;
|
|
75
|
-
}
|
|
76
|
-
e.sort();
|
|
77
|
-
let t = "o{";
|
|
78
|
-
for (let n of e) t += `${r(n)}:${r(i[n])},`;
|
|
79
|
-
return `${t}}`;
|
|
80
|
-
} finally {
|
|
81
|
-
t.pop();
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
try {
|
|
85
|
-
return r(e);
|
|
86
|
-
} catch {
|
|
87
|
-
return y(e);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
function x(e) {
|
|
91
|
-
return C(e, !0);
|
|
92
|
-
}
|
|
93
|
-
function S(e) {
|
|
94
|
-
return C(e, !1);
|
|
95
|
-
}
|
|
96
|
-
function C(t, i) {
|
|
97
|
-
if (t === void 0 && (t = {}), !d(t)) return "invalid";
|
|
98
|
-
let a = i ? n.map((n) => {
|
|
99
|
-
let r = Object.hasOwn(t, n) ? t[n] : void 0;
|
|
100
|
-
return r === void 0 ? e[n] ? "1" : "0" : r === !0 ? "1" : r === !1 ? "0" : "!";
|
|
101
|
-
}).join("") : "", o = "";
|
|
102
|
-
if (Object.hasOwn(t, "limits")) {
|
|
103
|
-
let e = t.limits;
|
|
104
|
-
if (e === void 0) o = "default";
|
|
105
|
-
else if (!d(e)) o = "invalid";
|
|
106
|
-
else {
|
|
107
|
-
let t = (t) => !Object.hasOwn(e, t) || e[t] === void 0 ? "default" : String(e[t]);
|
|
108
|
-
o = `${t("maxSyntaxNodes")}:${t("maxParseWork")}:${t("maxMarkdownDepth")}:${t("maxRawBodyChars")}`;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
let c = "";
|
|
112
|
-
if (Object.hasOwn(t, "hostComponents") && t.hostComponents !== void 0) {
|
|
113
|
-
let e = t.hostComponents;
|
|
114
|
-
try {
|
|
115
|
-
Array.isArray(e) ? e.length > 0 && (c = e.length > 32 ? `:hosts=oversize:${e.length}` : `:hosts=${b(e)}`) : c = `:hosts=${b(e)}`;
|
|
116
|
-
} catch {
|
|
117
|
-
c = `:hosts=${y(e)}`;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
let l = !Object.hasOwn(t, "markdownBreaks") || t.markdownBreaks === void 0 ? "-" : t.markdownBreaks === !0 ? "1" : t.markdownBreaks === !1 ? "0" : "!", u = !Object.hasOwn(t, "strict") || t.strict === void 0 || t.strict === !0 ? "strict=1" : t.strict === !1 ? "strict=0:recovery=2" : "strict=!", f = "";
|
|
121
|
-
Object.hasOwn(t, "config") && t.config !== void 0 && (f = `:config=${s(t.config)}`);
|
|
122
|
-
let p = i && Object.hasOwn(t, "embedding") ? r(t.embedding) : "";
|
|
123
|
-
return `${a}:${o}:${l}:${u}${c}${f}${p}`;
|
|
124
|
-
}
|
|
125
|
-
export { S as n, u as r, x as t };
|
|
@@ -1,553 +0,0 @@
|
|
|
1
|
-
import { A as e, F as t, L as n, N as r, O as i, S as a, _ as o, a as s, g as c, j as l, k as u, n as d, o as f, r as p, s as m, t as h } from "./component-utils-eSj5IdG4.js";
|
|
2
|
-
import { n as g, t as _ } from "./tooltip-layer-HDLrSWs0.js";
|
|
3
|
-
import { useEffect as v, useId as y, useRef as b, useState as x } from "react";
|
|
4
|
-
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
5
|
-
// src/components/layout/layout.tsx
|
|
6
|
-
function T(t) {
|
|
7
|
-
let n = e(t), r = l(t), { content: a, runtime: o, mode: s, t: c } = r, u = i(t, "title", ""), d = m(t, "reset", !0) && s !== "static", [f, p] = x(null), g = () => {
|
|
8
|
-
try {
|
|
9
|
-
o.reset(a), p(null);
|
|
10
|
-
} catch (e) {
|
|
11
|
-
p(e instanceof Error ? e.message : c("Cannot reset", "无法恢复默认"));
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
return /* @__PURE__ */ w("section", {
|
|
15
|
-
...n(),
|
|
16
|
-
className: "md-panel local-panel",
|
|
17
|
-
"aria-label": u || c("Parameter panel", "参数面板"),
|
|
18
|
-
children: [
|
|
19
|
-
u || d ? /* @__PURE__ */ w("div", {
|
|
20
|
-
className: "local-panel-head",
|
|
21
|
-
children: [u ? /* @__PURE__ */ C("h3", {
|
|
22
|
-
className: "md-panel-title local-panel-title",
|
|
23
|
-
children: u
|
|
24
|
-
}) : /* @__PURE__ */ C("span", {}), d ? /* @__PURE__ */ C("button", {
|
|
25
|
-
type: "button",
|
|
26
|
-
className: "md-button md-button-quiet local-panel-reset",
|
|
27
|
-
onClick: g,
|
|
28
|
-
"aria-label": u ? c(`Reset ${u}`, `${u} 恢复默认`) : c("Reset", "恢复默认"),
|
|
29
|
-
children: c("Reset", "恢复默认")
|
|
30
|
-
}) : null]
|
|
31
|
-
}) : null,
|
|
32
|
-
/* @__PURE__ */ C("div", {
|
|
33
|
-
className: "md-panel-body local-panel-body",
|
|
34
|
-
children: r.render()
|
|
35
|
-
}),
|
|
36
|
-
/* @__PURE__ */ C(h, { message: f })
|
|
37
|
-
]
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
function E(t) {
|
|
41
|
-
let n = e(t), r = l(t), a = i(t, "title", "");
|
|
42
|
-
return /* @__PURE__ */ w("section", {
|
|
43
|
-
...n(),
|
|
44
|
-
className: "md-card local-card",
|
|
45
|
-
children: [a ? /* @__PURE__ */ C("h3", {
|
|
46
|
-
className: "md-card-title",
|
|
47
|
-
children: a
|
|
48
|
-
}) : null, /* @__PURE__ */ C("div", {
|
|
49
|
-
className: "md-card-body",
|
|
50
|
-
children: r.render()
|
|
51
|
-
})]
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
function D(t) {
|
|
55
|
-
let n = e(t), r = l(t), i = Math.min(4, Math.max(1, Math.floor(Number(t.props.columns ?? 2) || 2)));
|
|
56
|
-
return /* @__PURE__ */ C("div", {
|
|
57
|
-
className: "local-grid",
|
|
58
|
-
...n({ "--local-grid-columns": String(i) }),
|
|
59
|
-
children: r.render()
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
function O(t) {
|
|
63
|
-
let n = e(t), r = l(t);
|
|
64
|
-
return /* @__PURE__ */ C("div", {
|
|
65
|
-
...n(),
|
|
66
|
-
className: "local-tabpanel-body",
|
|
67
|
-
children: r.render()
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
function k(o) {
|
|
71
|
-
let s = e(o), u = l(o), f = y(), { content: m, mode: g, visible: _, t: v } = u, { write: S, error: T } = n(o), E = i(o, "label", ""), D = t(o), O = m.children.filter((e) => e.kind === "component" && e.name === "tab"), k = O.map((e, t) => a(e, "value") ?? `tab-${t + 1}`), A = O.map((e, t) => c(o, e, "label", k[t])), j = a(m, "initial") ?? k[0] ?? "", M = a(m, "bind") !== void 0, N = o.runtime.get(m), P = typeof N == "string" ? N : "", [F, I] = x(() => k.includes(j) ? j : k[0] ?? ""), L = b([]);
|
|
72
|
-
if (r(o, () => {
|
|
73
|
-
I(k.includes(j) ? j : k[0] ?? "");
|
|
74
|
-
}), O.length === 0) return /* @__PURE__ */ C(d, { message: v("Tabs requires at least one tab", "标签页至少需要一个 tab") });
|
|
75
|
-
if (g === "static") return /* @__PURE__ */ w("section", {
|
|
76
|
-
...s(),
|
|
77
|
-
className: "local-tabs local-static-tabs",
|
|
78
|
-
"aria-label": E || v("Tabs", "选项卡"),
|
|
79
|
-
children: [E ? /* @__PURE__ */ C("div", {
|
|
80
|
-
className: "local-tabs-label",
|
|
81
|
-
children: E
|
|
82
|
-
}) : null, O.map((e, t) => /* @__PURE__ */ w("section", {
|
|
83
|
-
className: "local-static-tab",
|
|
84
|
-
children: [/* @__PURE__ */ C("h4", {
|
|
85
|
-
className: "local-static-tab-label",
|
|
86
|
-
children: A[t]
|
|
87
|
-
}), /* @__PURE__ */ C("div", {
|
|
88
|
-
className: "local-static-tab-body",
|
|
89
|
-
children: u.render(e.children, _)
|
|
90
|
-
})]
|
|
91
|
-
}, e.id))]
|
|
92
|
-
});
|
|
93
|
-
let R = M ? k.includes(P) ? P : k[0] : k.includes(F) ? F : k[0], z = Math.max(0, k.indexOf(R)), B = (e) => {
|
|
94
|
-
let t = k[e];
|
|
95
|
-
t !== void 0 && (M ? S(t) : I(t), L.current[e]?.focus());
|
|
96
|
-
}, V = (e) => {
|
|
97
|
-
let t = -1;
|
|
98
|
-
e.key === "ArrowRight" ? t = (z + 1) % O.length : e.key === "ArrowLeft" ? t = (z - 1 + O.length) % O.length : e.key === "Home" ? t = 0 : e.key === "End" && (t = O.length - 1), !(t < 0) && (e.preventDefault(), B(t));
|
|
99
|
-
};
|
|
100
|
-
return /* @__PURE__ */ w("section", {
|
|
101
|
-
...s(),
|
|
102
|
-
className: "md-tabs local-tabs",
|
|
103
|
-
"aria-label": E || v("Tabs", "选项卡"),
|
|
104
|
-
"aria-invalid": D.invalid || void 0,
|
|
105
|
-
"aria-describedby": D.describedBy,
|
|
106
|
-
children: [
|
|
107
|
-
E ? /* @__PURE__ */ C("div", {
|
|
108
|
-
className: "local-tabs-label",
|
|
109
|
-
children: E
|
|
110
|
-
}) : null,
|
|
111
|
-
/* @__PURE__ */ C("div", {
|
|
112
|
-
className: "md-tablist local-tablist",
|
|
113
|
-
role: "tablist",
|
|
114
|
-
"aria-label": E || v("Tabs", "选项卡"),
|
|
115
|
-
onKeyDown: V,
|
|
116
|
-
children: O.map((e, t) => {
|
|
117
|
-
let n = k[t], r = n === R;
|
|
118
|
-
return /* @__PURE__ */ C("button", {
|
|
119
|
-
ref: (e) => {
|
|
120
|
-
L.current[t] = e;
|
|
121
|
-
},
|
|
122
|
-
id: `${f}-tab-${t}`,
|
|
123
|
-
type: "button",
|
|
124
|
-
role: "tab",
|
|
125
|
-
className: `md-tab local-tab${r ? " is-selected" : ""}`,
|
|
126
|
-
"aria-selected": r,
|
|
127
|
-
"aria-controls": `${f}-panel-${t}`,
|
|
128
|
-
tabIndex: r ? 0 : -1,
|
|
129
|
-
onClick: () => {
|
|
130
|
-
M ? S(n) : I(n);
|
|
131
|
-
},
|
|
132
|
-
children: A[t]
|
|
133
|
-
}, e.id);
|
|
134
|
-
})
|
|
135
|
-
}),
|
|
136
|
-
O.map((e, t) => {
|
|
137
|
-
let n = k[t] === R;
|
|
138
|
-
return /* @__PURE__ */ w("div", {
|
|
139
|
-
id: `${f}-panel-${t}`,
|
|
140
|
-
className: "md-tabpanel local-tabpanel",
|
|
141
|
-
role: "tabpanel",
|
|
142
|
-
"aria-labelledby": `${f}-tab-${t}`,
|
|
143
|
-
tabIndex: 0,
|
|
144
|
-
hidden: !n,
|
|
145
|
-
children: [/* @__PURE__ */ C(p, {
|
|
146
|
-
block: !0,
|
|
147
|
-
value: A[t]
|
|
148
|
-
}), u.render(e.children, _ && n)]
|
|
149
|
-
}, e.id);
|
|
150
|
-
}),
|
|
151
|
-
/* @__PURE__ */ C(h, { message: T })
|
|
152
|
-
]
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
function A(o) {
|
|
156
|
-
let s = e(o), u = l(o), f = y(), { content: p, mode: m, visible: g, t: _ } = u, { write: x, error: S, setError: T } = n(o), E = i(o, "label", ""), D = t(o), O = p.children.filter((e) => e.kind === "component" && e.name === "step"), k = O.map((e, t) => a(e, "value") ?? `step-${t + 1}`), A = O.map((e, t) => c(o, e, "label", k[t])), j = a(p, "initial") ?? "", M = k.includes(j) ? j : k[0] ?? "", N = o.runtime.get(p), P = typeof N == "string" ? N : "", F = b([]), I = b(!1);
|
|
157
|
-
r(o, () => {
|
|
158
|
-
T(null), I.current = !1;
|
|
159
|
-
});
|
|
160
|
-
let L = k.includes(P) ? P : M, R = Math.max(0, k.indexOf(L));
|
|
161
|
-
if (v(() => {
|
|
162
|
-
I.current && (I.current = !1, F.current[R]?.focus({ preventScroll: !0 }));
|
|
163
|
-
}, [R, L]), O.length === 0) return /* @__PURE__ */ C(d, { message: _("Steps requires at least one step", "步骤至少需要一个 step") });
|
|
164
|
-
if (m === "static") {
|
|
165
|
-
let e = O[R];
|
|
166
|
-
return /* @__PURE__ */ w("section", {
|
|
167
|
-
...s(),
|
|
168
|
-
className: "local-steps local-static-steps",
|
|
169
|
-
"aria-label": E || _("Steps", "步骤"),
|
|
170
|
-
children: [
|
|
171
|
-
E ? /* @__PURE__ */ C("div", {
|
|
172
|
-
className: "local-steps-label",
|
|
173
|
-
children: E
|
|
174
|
-
}) : null,
|
|
175
|
-
/* @__PURE__ */ C("ol", {
|
|
176
|
-
className: "local-steps-rail",
|
|
177
|
-
"aria-hidden": "true",
|
|
178
|
-
style: { "--local-steps-progress": `${O.length <= 1 ? 100 : R / (O.length - 1) * 100}%` },
|
|
179
|
-
children: O.map((e, t) => /* @__PURE__ */ C("li", {
|
|
180
|
-
className: `local-steps-dot${t < R ? " is-complete" : t === R ? " is-current" : ""}`,
|
|
181
|
-
children: /* @__PURE__ */ C("span", { children: t + 1 })
|
|
182
|
-
}, e.id))
|
|
183
|
-
}),
|
|
184
|
-
/* @__PURE__ */ C("div", {
|
|
185
|
-
className: "local-steps-nav local-static-steps-nav",
|
|
186
|
-
children: /* @__PURE__ */ C("span", {
|
|
187
|
-
className: "local-steps-status",
|
|
188
|
-
role: "status",
|
|
189
|
-
"aria-live": "polite",
|
|
190
|
-
children: _(`Step ${R + 1} of ${O.length}`, `第 ${R + 1} 步,共 ${O.length} 步`)
|
|
191
|
-
})
|
|
192
|
-
}),
|
|
193
|
-
/* @__PURE__ */ C("div", {
|
|
194
|
-
className: "local-steps-panel",
|
|
195
|
-
role: "group",
|
|
196
|
-
"aria-label": A[R],
|
|
197
|
-
children: u.render(e.children, g)
|
|
198
|
-
})
|
|
199
|
-
]
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
let z = (e) => {
|
|
203
|
-
let t = k[e];
|
|
204
|
-
t !== void 0 && (I.current = !0, x(t));
|
|
205
|
-
};
|
|
206
|
-
return /* @__PURE__ */ w("section", {
|
|
207
|
-
...s(),
|
|
208
|
-
className: "local-steps",
|
|
209
|
-
"aria-label": E || _("Steps", "步骤"),
|
|
210
|
-
"aria-invalid": D.invalid || void 0,
|
|
211
|
-
"aria-describedby": D.describedBy,
|
|
212
|
-
children: [
|
|
213
|
-
E ? /* @__PURE__ */ C("div", {
|
|
214
|
-
className: "local-steps-label",
|
|
215
|
-
children: E
|
|
216
|
-
}) : null,
|
|
217
|
-
/* @__PURE__ */ C("ol", {
|
|
218
|
-
className: "local-steps-rail",
|
|
219
|
-
"aria-hidden": "true",
|
|
220
|
-
style: { "--local-steps-progress": `${O.length <= 1 ? 100 : R / (O.length - 1) * 100}%` },
|
|
221
|
-
children: O.map((e, t) => /* @__PURE__ */ C("li", {
|
|
222
|
-
className: `local-steps-dot${t < R ? " is-complete" : t === R ? " is-current" : ""}`,
|
|
223
|
-
children: /* @__PURE__ */ C("span", { children: t + 1 })
|
|
224
|
-
}, e.id))
|
|
225
|
-
}),
|
|
226
|
-
/* @__PURE__ */ w("div", {
|
|
227
|
-
className: "local-steps-nav",
|
|
228
|
-
children: [
|
|
229
|
-
/* @__PURE__ */ C("button", {
|
|
230
|
-
type: "button",
|
|
231
|
-
className: "md-button md-button-secondary local-steps-prev",
|
|
232
|
-
disabled: R <= 0,
|
|
233
|
-
onClick: () => z(R - 1),
|
|
234
|
-
children: _("Previous", "上一步")
|
|
235
|
-
}),
|
|
236
|
-
/* @__PURE__ */ C("span", {
|
|
237
|
-
className: "local-steps-status",
|
|
238
|
-
role: "status",
|
|
239
|
-
"aria-live": "polite",
|
|
240
|
-
children: _(`Step ${R + 1} of ${O.length}`, `第 ${R + 1} 步,共 ${O.length} 步`)
|
|
241
|
-
}),
|
|
242
|
-
/* @__PURE__ */ C("button", {
|
|
243
|
-
type: "button",
|
|
244
|
-
className: "md-button md-button-secondary local-steps-next",
|
|
245
|
-
disabled: R >= O.length - 1,
|
|
246
|
-
onClick: () => z(R + 1),
|
|
247
|
-
children: _("Next", "下一步")
|
|
248
|
-
})
|
|
249
|
-
]
|
|
250
|
-
}),
|
|
251
|
-
O.map((e, t) => {
|
|
252
|
-
let n = t === R;
|
|
253
|
-
return /* @__PURE__ */ C("div", {
|
|
254
|
-
id: `${f}-step-${t}`,
|
|
255
|
-
ref: (e) => {
|
|
256
|
-
F.current[t] = e;
|
|
257
|
-
},
|
|
258
|
-
className: "local-steps-panel",
|
|
259
|
-
role: "group",
|
|
260
|
-
"aria-label": A[t],
|
|
261
|
-
tabIndex: -1,
|
|
262
|
-
hidden: !n,
|
|
263
|
-
children: u.render(e.children, g && n)
|
|
264
|
-
}, e.id);
|
|
265
|
-
}),
|
|
266
|
-
/* @__PURE__ */ C(h, { message: S })
|
|
267
|
-
]
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
function j() {
|
|
271
|
-
return null;
|
|
272
|
-
}
|
|
273
|
-
function M(t) {
|
|
274
|
-
let n = e(t), r = l(t), a = i(t, "label", "");
|
|
275
|
-
return /* @__PURE__ */ w("div", {
|
|
276
|
-
...n(),
|
|
277
|
-
className: "local-accordion",
|
|
278
|
-
role: "group",
|
|
279
|
-
"aria-label": a || r.t("Accordion", "折叠面板"),
|
|
280
|
-
children: [a ? /* @__PURE__ */ C("div", {
|
|
281
|
-
className: "local-accordion-label",
|
|
282
|
-
children: a
|
|
283
|
-
}) : null, r.render()]
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
function N(t) {
|
|
287
|
-
let n = e(t), a = l(t), o = y(), { mode: s, visible: c, t: u } = a, d = i(t, "label", u("Details", "折叠内容")), f = m(t, "open", !1), [h, g] = x(f);
|
|
288
|
-
if (r(t, () => {
|
|
289
|
-
g(f);
|
|
290
|
-
}), s === "static") return /* @__PURE__ */ w("section", {
|
|
291
|
-
...n(),
|
|
292
|
-
className: "local-disclosure local-static-disclosure",
|
|
293
|
-
children: [/* @__PURE__ */ C("h3", {
|
|
294
|
-
className: "local-disclosure-heading",
|
|
295
|
-
children: d
|
|
296
|
-
}), /* @__PURE__ */ C("div", {
|
|
297
|
-
className: "local-disclosure-panel",
|
|
298
|
-
children: a.render()
|
|
299
|
-
})]
|
|
300
|
-
});
|
|
301
|
-
let _ = `${o}-disclosure-trigger`, v = `${o}-disclosure-panel`;
|
|
302
|
-
return /* @__PURE__ */ w("div", {
|
|
303
|
-
...n(),
|
|
304
|
-
className: "local-disclosure",
|
|
305
|
-
children: [/* @__PURE__ */ w("h3", {
|
|
306
|
-
className: "local-disclosure-heading",
|
|
307
|
-
children: [/* @__PURE__ */ w("button", {
|
|
308
|
-
id: _,
|
|
309
|
-
type: "button",
|
|
310
|
-
className: "local-disclosure-trigger",
|
|
311
|
-
"data-rmd-appearance": "custom",
|
|
312
|
-
"aria-expanded": h,
|
|
313
|
-
"aria-controls": v,
|
|
314
|
-
onClick: () => g((e) => !e),
|
|
315
|
-
children: [/* @__PURE__ */ C("span", {
|
|
316
|
-
className: "local-disclosure-label",
|
|
317
|
-
children: d
|
|
318
|
-
}), /* @__PURE__ */ C("svg", {
|
|
319
|
-
className: `local-chevron${h ? " is-open" : ""}`,
|
|
320
|
-
viewBox: "0 0 24 24",
|
|
321
|
-
width: "17",
|
|
322
|
-
height: "17",
|
|
323
|
-
fill: "none",
|
|
324
|
-
stroke: "currentColor",
|
|
325
|
-
strokeWidth: "1.75",
|
|
326
|
-
strokeLinecap: "round",
|
|
327
|
-
strokeLinejoin: "round",
|
|
328
|
-
"aria-hidden": "true",
|
|
329
|
-
focusable: "false",
|
|
330
|
-
children: /* @__PURE__ */ C("path", { d: "m6 9 6 6 6-6" })
|
|
331
|
-
})]
|
|
332
|
-
}), /* @__PURE__ */ C(p, { value: d })]
|
|
333
|
-
}), /* @__PURE__ */ C("div", {
|
|
334
|
-
id: v,
|
|
335
|
-
className: "local-disclosure-panel",
|
|
336
|
-
role: "region",
|
|
337
|
-
"aria-labelledby": _,
|
|
338
|
-
hidden: !h,
|
|
339
|
-
inert: !h,
|
|
340
|
-
children: /* @__PURE__ */ C("div", {
|
|
341
|
-
className: "local-disclosure-body",
|
|
342
|
-
children: a.render(void 0, c)
|
|
343
|
-
})
|
|
344
|
-
})]
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
function P(t) {
|
|
348
|
-
let n = e(t)(), r = l(t), { content: i, t: o, visible: s } = r, c = a(i, "when"), u = t.props.when, f = typeof u == "boolean" && u, p = c !== void 0 && typeof u != "boolean", m = b(null), h = b(f), g = b(!1);
|
|
349
|
-
return v(() => {
|
|
350
|
-
if (h.current && !f) {
|
|
351
|
-
if (g.current) {
|
|
352
|
-
let e = m.current?.closest(".local-document");
|
|
353
|
-
e && (e.tabIndex = -1, e.focus({ preventScroll: !0 }));
|
|
354
|
-
}
|
|
355
|
-
g.current = !1;
|
|
356
|
-
}
|
|
357
|
-
h.current = f;
|
|
358
|
-
}, [f]), /* @__PURE__ */ w(S, { children: [p ? /* @__PURE__ */ C(d, { message: o("Cannot compute", "无法计算") }) : null, /* @__PURE__ */ C("div", {
|
|
359
|
-
style: n.style,
|
|
360
|
-
ref: (e) => {
|
|
361
|
-
m.current = e, n.ref?.(e);
|
|
362
|
-
},
|
|
363
|
-
className: "local-if md-if",
|
|
364
|
-
role: "group",
|
|
365
|
-
"aria-label": o("Conditional content", "条件内容"),
|
|
366
|
-
tabIndex: -1,
|
|
367
|
-
hidden: !f,
|
|
368
|
-
"aria-hidden": !f,
|
|
369
|
-
onFocus: () => {
|
|
370
|
-
g.current = !0;
|
|
371
|
-
},
|
|
372
|
-
onBlur: (e) => {
|
|
373
|
-
m.current?.contains(e.relatedTarget) || (g.current = !1);
|
|
374
|
-
},
|
|
375
|
-
children: r.render(void 0, s && f)
|
|
376
|
-
})] });
|
|
377
|
-
}
|
|
378
|
-
function F(t) {
|
|
379
|
-
let n = e(t), r = l(t), a = i(t, "title", ""), { tone: o, error: c } = u(t, "tone", [
|
|
380
|
-
"info",
|
|
381
|
-
"success",
|
|
382
|
-
"warning",
|
|
383
|
-
"error"
|
|
384
|
-
], "info"), d = o === "warning" || o === "error" ? "alert" : "status";
|
|
385
|
-
return /* @__PURE__ */ w(S, { children: [c ? /* @__PURE__ */ C(s, { message: r.t("Invalid tone; using the default style", "色调无效,已使用默认样式") }) : null, /* @__PURE__ */ w("div", {
|
|
386
|
-
className: `md-alert md-alert-${o} local-alert local-alert-${o}`,
|
|
387
|
-
role: d,
|
|
388
|
-
...n(),
|
|
389
|
-
children: [a ? /* @__PURE__ */ C("div", {
|
|
390
|
-
className: "md-alert-title local-alert-title",
|
|
391
|
-
children: a
|
|
392
|
-
}) : null, /* @__PURE__ */ C("div", {
|
|
393
|
-
className: "md-alert-body local-alert-body",
|
|
394
|
-
children: r.render()
|
|
395
|
-
})]
|
|
396
|
-
})] });
|
|
397
|
-
}
|
|
398
|
-
function I(t) {
|
|
399
|
-
let n = e(t), r = l(t), { tone: i, error: a } = u(t, "tone", [
|
|
400
|
-
"neutral",
|
|
401
|
-
"success",
|
|
402
|
-
"warning"
|
|
403
|
-
], "neutral"), c = o(r.content);
|
|
404
|
-
return /* @__PURE__ */ w(S, { children: [a ? /* @__PURE__ */ C(s, { message: r.t("Invalid tone; using the default style", "色调无效,已使用默认样式") }) : null, /* @__PURE__ */ C("span", {
|
|
405
|
-
className: `md-badge md-badge-${i} local-badge`,
|
|
406
|
-
...n(c ? { color: c } : void 0),
|
|
407
|
-
children: /* @__PURE__ */ C("span", {
|
|
408
|
-
className: "md-badge-label",
|
|
409
|
-
children: r.renderInline()
|
|
410
|
-
})
|
|
411
|
-
})] });
|
|
412
|
-
}
|
|
413
|
-
function L(t) {
|
|
414
|
-
let n = e(t), r = l(t), a = y(), { mode: o, t: s } = r, c = i(t, "text", s("Tooltip", "提示")), [u, d] = x(!1), f = b(null), m = b(null), h = `${a}-tooltip`, S = u && t.visible && o !== "static";
|
|
415
|
-
return g(m, S), v(() => d(!1), [
|
|
416
|
-
t.visible,
|
|
417
|
-
t.resetToken,
|
|
418
|
-
o
|
|
419
|
-
]), _(() => {
|
|
420
|
-
let e = m.current, t = f.current;
|
|
421
|
-
if (!S || !e || !t) return;
|
|
422
|
-
let n = () => {
|
|
423
|
-
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = Number.parseFloat(getComputedStyle(e).getPropertyValue("--space-2")) || 8, a = Math.max(8, Math.min(r.left, window.innerWidth - n.width - 8)), o = r.top - n.height - i, s = o >= 8 ? o : Math.max(8, Math.min(r.bottom + i, window.innerHeight - n.height - 8));
|
|
424
|
-
e.style.left = `${a}px`, e.style.top = `${s}px`;
|
|
425
|
-
};
|
|
426
|
-
n(), window.addEventListener("resize", n), window.addEventListener("scroll", n, {
|
|
427
|
-
capture: !0,
|
|
428
|
-
passive: !0
|
|
429
|
-
});
|
|
430
|
-
let r = new ResizeObserver(n);
|
|
431
|
-
return r.observe(t), r.observe(e), () => {
|
|
432
|
-
window.removeEventListener("resize", n), window.removeEventListener("scroll", n, !0), r.disconnect();
|
|
433
|
-
};
|
|
434
|
-
}, [S, c]), o === "static" ? /* @__PURE__ */ w("span", {
|
|
435
|
-
...n(),
|
|
436
|
-
className: "local-tooltip local-static-tooltip",
|
|
437
|
-
children: [/* @__PURE__ */ C("span", {
|
|
438
|
-
className: "local-tooltip-trigger",
|
|
439
|
-
children: r.renderInline()
|
|
440
|
-
}), /* @__PURE__ */ C("span", {
|
|
441
|
-
className: "md-tooltip local-tooltip-bubble is-visible",
|
|
442
|
-
role: "note",
|
|
443
|
-
children: c
|
|
444
|
-
})]
|
|
445
|
-
}) : /* @__PURE__ */ w("span", {
|
|
446
|
-
...n(),
|
|
447
|
-
className: "local-tooltip",
|
|
448
|
-
onMouseEnter: () => d(!0),
|
|
449
|
-
onMouseLeave: () => d(!1),
|
|
450
|
-
children: [
|
|
451
|
-
/* @__PURE__ */ C("span", {
|
|
452
|
-
className: "local-tooltip-trigger",
|
|
453
|
-
ref: f,
|
|
454
|
-
tabIndex: 0,
|
|
455
|
-
"aria-describedby": h,
|
|
456
|
-
onFocus: () => d(!0),
|
|
457
|
-
onBlur: () => d(!1),
|
|
458
|
-
onKeyDown: (e) => {
|
|
459
|
-
e.key === "Escape" && (e.stopPropagation(), d(!1));
|
|
460
|
-
},
|
|
461
|
-
children: r.renderInline()
|
|
462
|
-
}),
|
|
463
|
-
/* @__PURE__ */ C("span", {
|
|
464
|
-
id: h,
|
|
465
|
-
ref: m,
|
|
466
|
-
role: "tooltip",
|
|
467
|
-
popover: "manual",
|
|
468
|
-
className: `md-tooltip local-tooltip-bubble${S ? " is-visible" : ""}`,
|
|
469
|
-
children: c
|
|
470
|
-
}),
|
|
471
|
-
/* @__PURE__ */ C(p, { value: c })
|
|
472
|
-
]
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
function R(t) {
|
|
476
|
-
let n = e(t), i = l(t), s = y(), { content: c, mode: u, t: d } = i, p = `${s}-jump-feedback`, [m, h] = x(null), g = a(c, "to") ?? "", _ = i.navigation.targetId(g), v = a(c, "appearance") === "button" ? "button" : "link", b = o(c), T = _ ? `#${_}` : "#", E = _ !== void 0 && i.navigation.allowed(g);
|
|
477
|
-
if (r(t, () => h(null)), u === "static") return E && _ ? /* @__PURE__ */ C("a", {
|
|
478
|
-
href: `#${_}`,
|
|
479
|
-
className: "local-jump local-jump-link local-jump-static",
|
|
480
|
-
...n(f(b)),
|
|
481
|
-
children: i.renderInline()
|
|
482
|
-
}) : /* @__PURE__ */ C("span", {
|
|
483
|
-
className: "local-jump local-jump-static-blocked",
|
|
484
|
-
...n(f(b)),
|
|
485
|
-
children: i.renderInline()
|
|
486
|
-
});
|
|
487
|
-
let D = (e) => {
|
|
488
|
-
if (!E || !_) {
|
|
489
|
-
e.preventDefault(), h(_ ? d("Jump is blocked by the host", "跳转已被主机策略阻止") : d("Jump target not found", "找不到跳转目标"));
|
|
490
|
-
return;
|
|
491
|
-
}
|
|
492
|
-
if (e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
|
|
493
|
-
let t = i.navigation.jump(g);
|
|
494
|
-
t === "missing" ? (e.preventDefault(), h(d("Jump target not found", "找不到跳转目标"))) : t === "hidden" ? (e.preventDefault(), h(d("Jump target is hidden", "跳转目标当前隐藏"))) : (e.preventDefault(), h(null));
|
|
495
|
-
};
|
|
496
|
-
return /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("a", {
|
|
497
|
-
href: E ? T : "#",
|
|
498
|
-
className: v === "button" ? "local-jump local-jump-button md-button md-button-secondary" : "local-jump local-jump-link",
|
|
499
|
-
...n(f(b)),
|
|
500
|
-
"data-local-custom-color": b ? "true" : void 0,
|
|
501
|
-
"data-local-target-missing": _ ? void 0 : "true",
|
|
502
|
-
"data-local-jump-blocked": _ && !E ? "true" : void 0,
|
|
503
|
-
"aria-describedby": m ? p : void 0,
|
|
504
|
-
onClick: D,
|
|
505
|
-
children: i.renderInline()
|
|
506
|
-
}), m ? /* @__PURE__ */ C("span", {
|
|
507
|
-
id: p,
|
|
508
|
-
className: "local-jump-feedback",
|
|
509
|
-
role: "status",
|
|
510
|
-
"aria-live": "polite",
|
|
511
|
-
children: m
|
|
512
|
-
}) : null] });
|
|
513
|
-
}
|
|
514
|
-
function z(t) {
|
|
515
|
-
let n = e(t), r = l(t).navigation.anchorId();
|
|
516
|
-
return r ? /* @__PURE__ */ C("span", {
|
|
517
|
-
...n(),
|
|
518
|
-
className: "local-anchor",
|
|
519
|
-
id: r,
|
|
520
|
-
"data-local-anchor": ""
|
|
521
|
-
}) : null;
|
|
522
|
-
}
|
|
523
|
-
function B(t) {
|
|
524
|
-
let n = e(t), r = l(t), i = o(r.content);
|
|
525
|
-
return /* @__PURE__ */ C("span", {
|
|
526
|
-
className: "local-text",
|
|
527
|
-
...n(i ? { color: i } : void 0),
|
|
528
|
-
children: r.renderInline()
|
|
529
|
-
});
|
|
530
|
-
}
|
|
531
|
-
function V(t) {
|
|
532
|
-
let n = e(t), r = l(t), i = o(r.content);
|
|
533
|
-
return /* @__PURE__ */ C("div", {
|
|
534
|
-
className: "local-section",
|
|
535
|
-
...n(i ? { color: i } : void 0),
|
|
536
|
-
children: r.render()
|
|
537
|
-
});
|
|
538
|
-
}
|
|
539
|
-
function H(t) {
|
|
540
|
-
let n = e(t), r = l(t), i = t.validation.hintFor(t.content);
|
|
541
|
-
if (!i) return null;
|
|
542
|
-
let a = i.failed || i.error, o = r.visible && a;
|
|
543
|
-
return /* @__PURE__ */ C("span", {
|
|
544
|
-
...n(),
|
|
545
|
-
id: i.id,
|
|
546
|
-
className: "local-validation-hint",
|
|
547
|
-
"data-local-validation": i.error ? "error" : i.failed ? "failed" : "passed",
|
|
548
|
-
role: o ? "status" : void 0,
|
|
549
|
-
"aria-live": o ? "polite" : void 0,
|
|
550
|
-
children: a ? i.message : null
|
|
551
|
-
});
|
|
552
|
-
}
|
|
553
|
-
export { L as _, E as a, P as c, V as d, j as f, B as g, k as h, I as i, R as l, O as m, F as n, N as o, A as p, z as r, D as s, M as t, T as u, H as v };
|