@echolab-auto/echo-prodoc 0.1.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/README.md +56 -0
- package/bin/echo-prodoc.js +2 -0
- package/package.json +49 -0
- package/packages/prodoc-cli/dist/index.d.ts +10 -0
- package/packages/prodoc-cli/dist/index.d.ts.map +1 -0
- package/packages/prodoc-cli/dist/index.js +251 -0
- package/packages/prodoc-cli/dist/index.js.map +1 -0
- package/packages/prodoc-cli/dist/server.d.ts +13 -0
- package/packages/prodoc-cli/dist/server.d.ts.map +1 -0
- package/packages/prodoc-cli/package.json +39 -0
- package/packages/prodoc-core/dist/index.cjs +1 -0
- package/packages/prodoc-core/dist/index.d.ts +12 -0
- package/packages/prodoc-core/dist/index.d.ts.map +1 -0
- package/packages/prodoc-core/dist/index.js +2 -0
- package/packages/prodoc-core/package.json +30 -0
- package/packages/prodoc-editor/dist/index.cjs +1 -0
- package/packages/prodoc-editor/dist/index.css +2 -0
- package/packages/prodoc-editor/dist/index.d.ts +10 -0
- package/packages/prodoc-editor/dist/index.d.ts.map +1 -0
- package/packages/prodoc-editor/dist/index.js +3 -0
- package/packages/prodoc-editor/package.json +40 -0
- package/packages/prodoc-renderer/dist/index.cjs +1 -0
- package/packages/prodoc-renderer/dist/index.css +2 -0
- package/packages/prodoc-renderer/dist/index.d.ts +11 -0
- package/packages/prodoc-renderer/dist/index.d.ts.map +1 -0
- package/packages/prodoc-renderer/dist/index.js +3 -0
- package/packages/prodoc-renderer/package.json +38 -0
- package/scripts/build-if-needed.js +37 -0
- package/scripts/install-ui-frame.js +269 -0
- package/scripts/link-system-bin.js +82 -0
- package/scripts/publish.sh +64 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismAlert.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismAutoComplete.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismAvatar.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismBadge.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismBreadcrumb.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismButton.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismCanvas.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismCard.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismCheckbox.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismCol.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismCollapse.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismContainer.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismDatePicker.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismDivider.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismDrawer.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismDropdown.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismEmpty.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismFieldError.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismFieldLabel.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismFormItem.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismInput.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismInputNumber.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismLayout.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismList.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismMenu.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismModal.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismNavMenu.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismPagination.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismPopover.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismProgress.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismRadioGroup.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismSelect.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismSkeleton.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismSlider.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismSteps.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismSwitch.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismTable.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismTabs.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismTag.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismTextarea.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismThemeToggle.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismToastProvider.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismTooltip.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismTree.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismUpload.css +1 -0
- package/vendor/@echolab/ui-frame/dist/NeumorphismVirtualList.css +1 -0
- package/vendor/@echolab/ui-frame/dist/ThemeProvider.css +1 -0
- package/vendor/@echolab/ui-frame/dist/base.css +1 -0
- package/vendor/@echolab/ui-frame/dist/base.d.ts +1 -0
- package/vendor/@echolab/ui-frame/dist/base.js +1 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismAlert-C8gUjcJ9.js +130 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismAutoComplete-DI9cIsCr.js +255 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismAvatar-D7pr7n61.js +65 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismBadge-Br8ESUFf.js +64 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismBreadcrumb-PeUQHAqO.js +58 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismButton-CiIrdqlV.js +81 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismCanvas-CBLkbovI.js +176 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismCard-Cgy4dCPE.js +66 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismCheckbox-Bo5Q7yC_.js +114 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismCol-DwoaSc5J.js +117 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismCollapse-BLSShHjJ.js +95 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismContainer-B1g0c9Ps.js +32 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismDatePicker-TLkTC22A.js +315 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismDivider-CjDyku2C.js +56 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismDrawer-BmpGyAlZ.js +133 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismDropdown-B_cuLYvV.js +120 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismEmpty-DAsVUAXw.js +49 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismFieldError-BxamHjhs.js +20 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismFieldLabel-CBF1nZs1.js +26 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismFormItem-DjtFqfsK.js +149 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismInput-CV0AQcff.js +121 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismInputNumber-BLSDUrG2.js +119 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismLayout-C7hoaRIo.js +155 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismList-BPjiY2ok.js +106 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismMenu-xfgTqwex.js +294 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismModal-BejbU5Uw.js +139 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismNavMenu-D_aeJ9zj.js +297 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismPagination-Dj-JuN7F.js +162 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismPopover-RB48cpPq.js +197 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismProgress-jGoOJqN4.js +72 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismRadioGroup-BC-NFcXF.js +122 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismSelect-D57-kOit.js +200 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismSkeleton-CIBufbBR.js +56 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismSlider-CJGJhgAY.js +163 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismSteps-Eq8pY0Yo.js +147 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismSwitch-HSJ9_0Zq.js +76 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismTable-BEcMl0Sh.js +189 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismTabs-DhV7RpfS.js +98 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismTag-D-HO-n7l.js +83 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismTextarea-hf4f9EM1.js +126 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismThemeToggle-B-lky48G.js +144 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismToastProvider-CJvxNDwJ.js +132 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismTooltip-DEac8yVH.js +116 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismTree-C5jKWadX.js +302 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismUpload-CK8GutG5.js +584 -0
- package/vendor/@echolab/ui-frame/dist/chunks/NeumorphismVirtualList-BI322-e4.js +55 -0
- package/vendor/@echolab/ui-frame/dist/chunks/ThemeProvider-CCR_TjUs.js +30 -0
- package/vendor/@echolab/ui-frame/dist/chunks/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/vendor/@echolab/ui-frame/dist/chunks/componentRegistry-XcPWEoEL.js +48 -0
- package/vendor/@echolab/ui-frame/dist/chunks/createComponent-jnXBYqCm.js +11 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismAlert/NeumorphismAlert.d.ts +78 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismAlert/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismAlert/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismAutoComplete/NeumorphismAutoComplete.d.ts +83 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismAutoComplete/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismAutoComplete/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismAvatar/NeumorphismAvatar.d.ts +50 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismAvatar/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismAvatar/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismBadge/NeumorphismBadge.d.ts +47 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismBadge/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismBadge/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismBreadcrumb/NeumorphismBreadcrumb.d.ts +45 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismBreadcrumb/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismBreadcrumb/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismButton/NeumorphismButton.d.ts +74 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismButton/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismButton/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismCanvas/NeumorphismCanvas.d.ts +85 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismCanvas/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismCanvas/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismCard/NeumorphismCard.d.ts +83 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismCard/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismCard/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismCheckbox/NeumorphismCheckbox.d.ts +58 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismCheckbox/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismCheckbox/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismCollapse/NeumorphismCollapse.d.ts +59 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismCollapse/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismCollapse/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismContainer/NeumorphismContainer.d.ts +48 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismContainer/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismContainer/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismDatePicker/NeumorphismDatePicker.d.ts +69 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismDatePicker/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismDatePicker/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismDivider/NeumorphismDivider.d.ts +51 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismDivider/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismDivider/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismDrawer/NeumorphismDrawer.d.ts +71 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismDrawer/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismDrawer/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismDropdown/NeumorphismDropdown.d.ts +75 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismDropdown/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismDropdown/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismEmpty/NeumorphismEmpty.d.ts +41 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismEmpty/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismEmpty/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismField/NeumorphismFieldError.d.ts +17 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismField/NeumorphismFieldLabel.d.ts +19 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismField/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismField/index.js +6 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismForm/NeumorphismForm.d.ts +67 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismForm/NeumorphismFormItem.d.ts +54 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismForm/index.d.ts +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismForm/index.js +5 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismGrid/NeumorphismCol.d.ts +54 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismGrid/NeumorphismRow.d.ts +51 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismGrid/index.d.ts +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismGrid/index.js +5 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismInput/NeumorphismInput.d.ts +87 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismInput/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismInput/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismInputNumber/NeumorphismInputNumber.d.ts +85 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismInputNumber/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismInputNumber/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismLayout/NeumorphismLayout.d.ts +79 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismLayout/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismLayout/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismList/NeumorphismList.d.ts +74 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismList/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismList/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismMenu/NeumorphismMenu.d.ts +73 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismMenu/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismMenu/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismModal/NeumorphismModal.d.ts +88 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismModal/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismModal/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismNavMenu/NeumorphismNavMenu.d.ts +63 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismNavMenu/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismNavMenu/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismPagination/NeumorphismPagination.d.ts +87 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismPagination/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismPagination/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismPopover/NeumorphismPopover.d.ts +78 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismPopover/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismPopover/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismProgress/NeumorphismProgress.d.ts +53 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismProgress/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismProgress/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismRadio/NeumorphismRadio.d.ts +52 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismRadio/NeumorphismRadioGroup.d.ts +53 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismRadio/index.d.ts +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismRadio/index.js +5 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismSelect/NeumorphismSelect.d.ts +96 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismSelect/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismSelect/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismSkeleton/NeumorphismSkeleton.d.ts +38 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismSkeleton/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismSkeleton/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismSlider/NeumorphismSlider.d.ts +76 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismSlider/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismSlider/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismSteps/NeumorphismSteps.d.ts +69 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismSteps/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismSteps/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismSwitch/NeumorphismSwitch.d.ts +64 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismSwitch/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismSwitch/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismTable/NeumorphismTable.d.ts +99 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismTable/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismTable/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismTabs/NeumorphismTabs.d.ts +71 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismTabs/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismTabs/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismTag/NeumorphismTag.d.ts +65 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismTag/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismTag/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismTextarea/NeumorphismTextarea.d.ts +80 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismTextarea/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismTextarea/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismThemeToggle/NeumorphismThemeToggle.d.ts +52 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismThemeToggle/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismThemeToggle/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismToast/NeumorphismToastProvider.d.ts +57 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismToast/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismToast/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismTooltip/NeumorphismTooltip.d.ts +58 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismTooltip/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismTooltip/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismTree/NeumorphismTree.d.ts +58 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismTree/NeumorphismTreeNode.d.ts +59 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismTree/index.d.ts +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismTree/index.js +5 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismUpload/NeumorphismUpload.d.ts +126 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismUpload/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismUpload/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismVirtualList/NeumorphismVirtualList.d.ts +59 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismVirtualList/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/NeumorphismVirtualList/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/ThemeProvider/ThemeProvider.d.ts +56 -0
- package/vendor/@echolab/ui-frame/dist/components/ThemeProvider/index.d.ts +2 -0
- package/vendor/@echolab/ui-frame/dist/components/ThemeProvider/index.js +4 -0
- package/vendor/@echolab/ui-frame/dist/components/index.d.ts +92 -0
- package/vendor/@echolab/ui-frame/dist/composables/injectionKeys.d.ts +27 -0
- package/vendor/@echolab/ui-frame/dist/composables/injectionKeys.js +6 -0
- package/vendor/@echolab/ui-frame/dist/composables/useAlert.d.ts +30 -0
- package/vendor/@echolab/ui-frame/dist/composables/useAlert.js +25 -0
- package/vendor/@echolab/ui-frame/dist/composables/useAutoComplete.d.ts +50 -0
- package/vendor/@echolab/ui-frame/dist/composables/useAutoComplete.js +118 -0
- package/vendor/@echolab/ui-frame/dist/composables/useCheckable.d.ts +17 -0
- package/vendor/@echolab/ui-frame/dist/composables/useCheckable.js +17 -0
- package/vendor/@echolab/ui-frame/dist/composables/useCollapse.d.ts +26 -0
- package/vendor/@echolab/ui-frame/dist/composables/useCollapse.js +25 -0
- package/vendor/@echolab/ui-frame/dist/composables/useConfig.d.ts +243 -0
- package/vendor/@echolab/ui-frame/dist/composables/useConfig.js +12 -0
- package/vendor/@echolab/ui-frame/dist/composables/useDatePicker.d.ts +73 -0
- package/vendor/@echolab/ui-frame/dist/composables/useDatePicker.js +118 -0
- package/vendor/@echolab/ui-frame/dist/composables/useDrawer.d.ts +34 -0
- package/vendor/@echolab/ui-frame/dist/composables/useDrawer.js +97 -0
- package/vendor/@echolab/ui-frame/dist/composables/useFormField.d.ts +24 -0
- package/vendor/@echolab/ui-frame/dist/composables/useFormField.js +34 -0
- package/vendor/@echolab/ui-frame/dist/composables/useFormValidation.d.ts +18 -0
- package/vendor/@echolab/ui-frame/dist/composables/useFormValidation.js +44 -0
- package/vendor/@echolab/ui-frame/dist/composables/useLocale.d.ts +38 -0
- package/vendor/@echolab/ui-frame/dist/composables/useLocale.js +34 -0
- package/vendor/@echolab/ui-frame/dist/composables/useMenu.d.ts +55 -0
- package/vendor/@echolab/ui-frame/dist/composables/useMenu.js +218 -0
- package/vendor/@echolab/ui-frame/dist/composables/useModal.d.ts +31 -0
- package/vendor/@echolab/ui-frame/dist/composables/useModal.js +93 -0
- package/vendor/@echolab/ui-frame/dist/composables/useNumberInput.d.ts +52 -0
- package/vendor/@echolab/ui-frame/dist/composables/useNumberInput.js +100 -0
- package/vendor/@echolab/ui-frame/dist/composables/usePagination.d.ts +37 -0
- package/vendor/@echolab/ui-frame/dist/composables/usePagination.js +40 -0
- package/vendor/@echolab/ui-frame/dist/composables/usePopover.d.ts +38 -0
- package/vendor/@echolab/ui-frame/dist/composables/usePopover.js +54 -0
- package/vendor/@echolab/ui-frame/dist/composables/useSelect.d.ts +30 -0
- package/vendor/@echolab/ui-frame/dist/composables/useSelect.js +76 -0
- package/vendor/@echolab/ui-frame/dist/composables/useSlider.d.ts +39 -0
- package/vendor/@echolab/ui-frame/dist/composables/useSlider.js +79 -0
- package/vendor/@echolab/ui-frame/dist/composables/useSteps.d.ts +54 -0
- package/vendor/@echolab/ui-frame/dist/composables/useSteps.js +26 -0
- package/vendor/@echolab/ui-frame/dist/composables/useTable.d.ts +78 -0
- package/vendor/@echolab/ui-frame/dist/composables/useTable.js +103 -0
- package/vendor/@echolab/ui-frame/dist/composables/useTabs.d.ts +33 -0
- package/vendor/@echolab/ui-frame/dist/composables/useTabs.js +43 -0
- package/vendor/@echolab/ui-frame/dist/composables/useTheme.d.ts +40 -0
- package/vendor/@echolab/ui-frame/dist/composables/useTheme.js +81 -0
- package/vendor/@echolab/ui-frame/dist/composables/useToast.d.ts +44 -0
- package/vendor/@echolab/ui-frame/dist/composables/useToast.js +57 -0
- package/vendor/@echolab/ui-frame/dist/composables/useTooltip.d.ts +29 -0
- package/vendor/@echolab/ui-frame/dist/composables/useTooltip.js +27 -0
- package/vendor/@echolab/ui-frame/dist/composables/useTouchDevice.d.ts +7 -0
- package/vendor/@echolab/ui-frame/dist/composables/useTouchDevice.js +25 -0
- package/vendor/@echolab/ui-frame/dist/composables/useTree.d.ts +50 -0
- package/vendor/@echolab/ui-frame/dist/composables/useTree.js +219 -0
- package/vendor/@echolab/ui-frame/dist/composables/useUpload.d.ts +81 -0
- package/vendor/@echolab/ui-frame/dist/composables/useUpload.js +169 -0
- package/vendor/@echolab/ui-frame/dist/composables/useVirtualList.d.ts +59 -0
- package/vendor/@echolab/ui-frame/dist/composables/useVirtualList.js +107 -0
- package/vendor/@echolab/ui-frame/dist/doc/DocEditor.d.ts +41 -0
- package/vendor/@echolab/ui-frame/dist/doc/DocViewer.d.ts +39 -0
- package/vendor/@echolab/ui-frame/dist/doc/MarkdownEditor.d.ts +37 -0
- package/vendor/@echolab/ui-frame/dist/doc/MarkdownRenderer.d.ts +42 -0
- package/vendor/@echolab/ui-frame/dist/doc/doc-tree.d.ts +8 -0
- package/vendor/@echolab/ui-frame/dist/doc/index.d.ts +27 -0
- package/vendor/@echolab/ui-frame/dist/doc/index.js +1055 -0
- package/vendor/@echolab/ui-frame/dist/doc/parser.d.ts +15 -0
- package/vendor/@echolab/ui-frame/dist/doc/tree-utils.d.ts +22 -0
- package/vendor/@echolab/ui-frame/dist/doc/types.d.ts +42 -0
- package/vendor/@echolab/ui-frame/dist/doc/useDocLayout.d.ts +38 -0
- package/vendor/@echolab/ui-frame/dist/extensions/componentRegistry.d.ts +39 -0
- package/vendor/@echolab/ui-frame/dist/extensions/createComponent.d.ts +43 -0
- package/vendor/@echolab/ui-frame/dist/extensions/index.d.ts +4 -0
- package/vendor/@echolab/ui-frame/dist/extensions/index.js +6 -0
- package/vendor/@echolab/ui-frame/dist/extensions/types.d.ts +56 -0
- package/vendor/@echolab/ui-frame/dist/index.css +1 -0
- package/vendor/@echolab/ui-frame/dist/index.d.ts +80 -0
- package/vendor/@echolab/ui-frame/dist/locales/en-US.d.ts +3 -0
- package/vendor/@echolab/ui-frame/dist/locales/index.d.ts +3 -0
- package/vendor/@echolab/ui-frame/dist/locales/index.js +171 -0
- package/vendor/@echolab/ui-frame/dist/locales/types.d.ts +89 -0
- package/vendor/@echolab/ui-frame/dist/locales/zh-CN.d.ts +3 -0
- package/vendor/@echolab/ui-frame/dist/style.css +1 -0
- package/vendor/@echolab/ui-frame/dist/styles/base.d.ts +1 -0
- package/vendor/@echolab/ui-frame/dist/styles/tokens.d.ts +1 -0
- package/vendor/@echolab/ui-frame/dist/tokens.css +1 -0
- package/vendor/@echolab/ui-frame/dist/tokens.d.ts +1 -0
- package/vendor/@echolab/ui-frame/dist/tokens.js +1 -0
- package/vendor/@echolab/ui-frame/dist/ui-frame.css +1 -0
- package/vendor/@echolab/ui-frame/dist/ui-frame.d.ts +3 -0
- package/vendor/@echolab/ui-frame/dist/ui-frame.js +247 -0
- package/vendor/@echolab/ui-frame/dist/ui-frame.umd.cjs +3 -0
- package/vendor/@echolab/ui-frame/dist/utils/index.d.ts +14 -0
- package/vendor/@echolab/ui-frame/dist/utils/index.js +20 -0
- package/vendor/@echolab/ui-frame/package.json +131 -0
- package/vendor/fsevents-stub/index.d.ts +2 -0
- package/vendor/fsevents-stub/index.js +3 -0
- package/vendor/fsevents-stub/package.json +8 -0
|
@@ -0,0 +1,1055 @@
|
|
|
1
|
+
import { ref as S, computed as M, watch as Q, defineComponent as ee, nextTick as fe, onBeforeUnmount as He, openBlock as $, createElementBlock as N, normalizeClass as A, createElementVNode as p, normalizeStyle as Pe, createVNode as y, withCtx as g, Fragment as ae, renderList as ve, withModifiers as G, toDisplayString as H, createCommentVNode as P, Transition as ge, unref as _, createBlock as O, createTextVNode as V, isRef as U } from "vue";
|
|
2
|
+
import { useTheme as Ve } from "../composables/useTheme.js";
|
|
3
|
+
import { N as ye } from "../chunks/NeumorphismLayout-C7hoaRIo.js";
|
|
4
|
+
import { N as J } from "../chunks/NeumorphismButton-CiIrdqlV.js";
|
|
5
|
+
import { N as F } from "../chunks/NeumorphismCard-Cgy4dCPE.js";
|
|
6
|
+
import { N as ke } from "../chunks/NeumorphismThemeToggle-B-lky48G.js";
|
|
7
|
+
import { N as be } from "../chunks/NeumorphismTree-C5jKWadX.js";
|
|
8
|
+
import { N as we } from "../chunks/NeumorphismDivider-CjDyku2C.js";
|
|
9
|
+
import { N as Z } from "../chunks/NeumorphismTag-D-HO-n7l.js";
|
|
10
|
+
import { N as $e } from "../chunks/NeumorphismContainer-B1g0c9Ps.js";
|
|
11
|
+
import { marked as re } from "marked";
|
|
12
|
+
import { N as Fe } from "../chunks/NeumorphismBadge-Br8ESUFf.js";
|
|
13
|
+
import { generateId as Ie } from "../utils/index.js";
|
|
14
|
+
import { _ as ce } from "../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
|
+
import { N as qe } from "../chunks/NeumorphismTabs-DhV7RpfS.js";
|
|
16
|
+
import { N as Be } from "../chunks/NeumorphismTextarea-hf4f9EM1.js";
|
|
17
|
+
import '../index.css';function Ke(r) {
|
|
18
|
+
var l;
|
|
19
|
+
const s = ((l = r.path) == null ? void 0 : l.toLowerCase()) || "";
|
|
20
|
+
return s.includes("api") ? "🔌" : s.includes("guide") ? "📖" : s.includes("config") ? "⚙️" : s.includes("example") ? "💡" : s.includes("install") ? "📦" : s.includes("changelog") ? "📝" : s.includes("faq") ? "❓" : "📄";
|
|
21
|
+
}
|
|
22
|
+
function _e(r) {
|
|
23
|
+
const s = r.children.length > 0 ? "📁" : Ke(r);
|
|
24
|
+
return {
|
|
25
|
+
key: r.path,
|
|
26
|
+
label: r.title,
|
|
27
|
+
icon: s,
|
|
28
|
+
children: r.children.map(_e)
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function Oe(r) {
|
|
32
|
+
const s = /* @__PURE__ */ new Map();
|
|
33
|
+
function l(d) {
|
|
34
|
+
s.set(d.path, d);
|
|
35
|
+
for (const i of d.children)
|
|
36
|
+
l(i);
|
|
37
|
+
}
|
|
38
|
+
l(r);
|
|
39
|
+
const m = /* @__PURE__ */ new Map();
|
|
40
|
+
function c(d) {
|
|
41
|
+
m.set(d.id, d);
|
|
42
|
+
for (const i of d.children)
|
|
43
|
+
c(i);
|
|
44
|
+
}
|
|
45
|
+
return c(r), {
|
|
46
|
+
root: r,
|
|
47
|
+
nodeMap: s,
|
|
48
|
+
findByPath(d) {
|
|
49
|
+
return s.get(d);
|
|
50
|
+
},
|
|
51
|
+
findById(d) {
|
|
52
|
+
return m.get(d);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function jt(r) {
|
|
57
|
+
const s = [];
|
|
58
|
+
function l(m) {
|
|
59
|
+
s.push(m);
|
|
60
|
+
for (const c of m.children)
|
|
61
|
+
l(c);
|
|
62
|
+
}
|
|
63
|
+
return l(r), s;
|
|
64
|
+
}
|
|
65
|
+
function Gt(r, s) {
|
|
66
|
+
const l = [];
|
|
67
|
+
function m(c, d, i) {
|
|
68
|
+
if (c.id === d)
|
|
69
|
+
return l.push(...i), !0;
|
|
70
|
+
for (const h of c.children)
|
|
71
|
+
if (m(h, d, [...i, c]))
|
|
72
|
+
return !0;
|
|
73
|
+
return !1;
|
|
74
|
+
}
|
|
75
|
+
return m(s, r.id, []), l;
|
|
76
|
+
}
|
|
77
|
+
function xe(r) {
|
|
78
|
+
var w;
|
|
79
|
+
const { root: s, initialPath: l } = r, m = S(l ?? ((w = s.children[0]) == null ? void 0 : w.path) ?? ""), c = S([]), { theme: d, setTheme: i } = Ve(), h = M({
|
|
80
|
+
get: () => d.value,
|
|
81
|
+
set: (f) => i(f)
|
|
82
|
+
}), o = M(() => s.children.map(_e)), T = S(m.value ? [m.value] : []);
|
|
83
|
+
Q(m, (f) => {
|
|
84
|
+
T.value = f ? [f] : [];
|
|
85
|
+
});
|
|
86
|
+
const E = M(() => Oe(s)), k = M(() => {
|
|
87
|
+
if (m.value)
|
|
88
|
+
return E.value.findByPath(m.value);
|
|
89
|
+
}), C = M(() => k.value || s.children[0]);
|
|
90
|
+
function R(f) {
|
|
91
|
+
m.value = f;
|
|
92
|
+
}
|
|
93
|
+
function u(f, L) {
|
|
94
|
+
m.value = L, f("docLink", L);
|
|
95
|
+
}
|
|
96
|
+
return Q(
|
|
97
|
+
() => l,
|
|
98
|
+
(f) => {
|
|
99
|
+
f && (m.value = f);
|
|
100
|
+
}
|
|
101
|
+
), {
|
|
102
|
+
selectedPath: m,
|
|
103
|
+
selectedKeys: T,
|
|
104
|
+
expandedKeys: c,
|
|
105
|
+
treeData: o,
|
|
106
|
+
selectedNode: k,
|
|
107
|
+
displayNode: C,
|
|
108
|
+
docTree: E,
|
|
109
|
+
themeModel: h,
|
|
110
|
+
handleTreeSelect: R,
|
|
111
|
+
handleDocLink: u
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
const Ue = { class: "neumorphism-markdown-body" }, We = ["innerHTML"], je = { class: "neumorphism-toc-header" }, Ge = {
|
|
115
|
+
class: "neumorphism-toc-list",
|
|
116
|
+
role: "list"
|
|
117
|
+
}, Ze = ["aria-current", "onClick"], Xe = ["aria-label", "onClick"], Ye = { class: "toc-text" }, Je = { class: "neumorphism-toc-mobile-header" }, Qe = {
|
|
118
|
+
class: "neumorphism-toc-list",
|
|
119
|
+
role: "list"
|
|
120
|
+
}, et = ["aria-current", "onClick"], tt = ["aria-label", "onClick"], nt = { class: "toc-text" }, Ce = /* @__PURE__ */ ee({
|
|
121
|
+
__name: "MarkdownRenderer",
|
|
122
|
+
props: {
|
|
123
|
+
content: {},
|
|
124
|
+
className: { default: "" },
|
|
125
|
+
showToc: { type: Boolean, default: !0 },
|
|
126
|
+
scrollContainer: {}
|
|
127
|
+
},
|
|
128
|
+
emits: ["docLink"],
|
|
129
|
+
setup(r, { emit: s }) {
|
|
130
|
+
const l = r, m = s, c = S(null), d = S(null), i = S(""), h = S(!1), o = S(/* @__PURE__ */ new Set()), T = S(!1), E = S({});
|
|
131
|
+
let k = null, C = null, R = null;
|
|
132
|
+
const u = Ie("toc");
|
|
133
|
+
function w(t) {
|
|
134
|
+
return `${u}-${Te(t)}`;
|
|
135
|
+
}
|
|
136
|
+
const f = /(\/\/.*$|\/\*[\s\S]*?\*\/|#\s+.*$|--.*$)/gm, L = /(".*?"|\'.*?\'|`.*?`)/g, q = /\b(const|let|var|function|return|if|else|for|while|do|switch|case|break|continue|default|try|catch|finally|throw|new|this|typeof|instanceof|class|extends|import|export|from|async|await|yield|static|public|private|protected|interface|type|enum|namespace|module|declare|abstract|readonly|implements|void|number|string|boolean|any|never|unknown|null|undefined|true|false)\b/g, te = /\b([a-zA-Z_]\w*)(?=\()/g, x = /\b(\d+\.?\d*)\b/g, b = /\b([A-Z][a-zA-Z0-9_]*)\b/g;
|
|
137
|
+
function z(t, n) {
|
|
138
|
+
if (!n || n === "text" || n === "plain")
|
|
139
|
+
return D(t);
|
|
140
|
+
let e = D(t);
|
|
141
|
+
return e = e.replace(f, '<span class="token-comment">$1</span>'), e = e.replace(L, '<span class="token-string">$1</span>'), e = e.replace(q, '<span class="token-keyword">$1</span>'), e = e.replace(te, '<span class="token-function">$1</span>'), e = e.replace(x, '<span class="token-number">$1</span>'), e = e.replace(b, '<span class="token-type">$1</span>'), e;
|
|
142
|
+
}
|
|
143
|
+
function D(t) {
|
|
144
|
+
return t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
145
|
+
}
|
|
146
|
+
function Te(t) {
|
|
147
|
+
return t.toLowerCase().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-");
|
|
148
|
+
}
|
|
149
|
+
function ne(t) {
|
|
150
|
+
return t.map((n) => {
|
|
151
|
+
const e = n;
|
|
152
|
+
return e.text ? String(e.text) : e.tokens ? ne(e.tokens) : "";
|
|
153
|
+
}).join("");
|
|
154
|
+
}
|
|
155
|
+
function Ne(t) {
|
|
156
|
+
const n = [], e = re.lexer(t);
|
|
157
|
+
for (const a of e)
|
|
158
|
+
if (a.type === "heading") {
|
|
159
|
+
const v = ne(a.tokens);
|
|
160
|
+
n.push({
|
|
161
|
+
level: a.depth,
|
|
162
|
+
text: v,
|
|
163
|
+
id: w(v)
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
return n;
|
|
167
|
+
}
|
|
168
|
+
const B = new re.Renderer();
|
|
169
|
+
B.heading = ({ tokens: t, depth: n }) => {
|
|
170
|
+
const e = ne(t), a = w(e);
|
|
171
|
+
return `<h${n} id="${a}"><a href="#${a}" class="heading-anchor" aria-hidden="true">#</a>${e}</h${n}>`;
|
|
172
|
+
}, B.code = ({ text: t, lang: n }) => {
|
|
173
|
+
const e = n || "text", a = z(t, n), v = t.split(`
|
|
174
|
+
`).length, j = Array.from({ length: v }, (Y, Ae) => Ae + 1).map((Y) => `<span class="line-num">${Y}</span>`).join("");
|
|
175
|
+
return `
|
|
176
|
+
<div class="code-block-wrapper">
|
|
177
|
+
<div class="code-block-header">
|
|
178
|
+
<span class="code-lang">${e}</span>
|
|
179
|
+
<span class="code-lines">${v} lines</span>
|
|
180
|
+
<button class="code-copy-btn" data-code="${D(t)}">复制</button>
|
|
181
|
+
</div>
|
|
182
|
+
<div class="code-block-body">
|
|
183
|
+
<div class="line-numbers">${j}</div>
|
|
184
|
+
<pre><code class="language-${e}">${a}</code></pre>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
`;
|
|
188
|
+
}, B.codespan = ({ text: t }) => `<code class="inline-code">${D(t)}</code>`, B.image = ({ href: t, title: n, text: e }) => `<img src="${t}" alt="${e}" title="${n || ""}" loading="lazy" />`, B.listitem = ({ text: t, task: n, checked: e }) => n ? `
|
|
189
|
+
<li class="task-list-item">
|
|
190
|
+
<label class="task-checkbox">
|
|
191
|
+
<input type="checkbox" ${e ? "checked" : ""} disabled />
|
|
192
|
+
<span class="checkmark"></span>
|
|
193
|
+
<span class="task-text">${t.replace(/^\[[ x]\]\s*/, "")}</span>
|
|
194
|
+
</label>
|
|
195
|
+
</li>
|
|
196
|
+
` : `<li>${t}</li>`;
|
|
197
|
+
const Ee = M(() => re.parse(l.content, {
|
|
198
|
+
async: !1,
|
|
199
|
+
gfm: !0,
|
|
200
|
+
breaks: !1,
|
|
201
|
+
renderer: B
|
|
202
|
+
})), W = M(() => Ne(l.content)), de = M(() => {
|
|
203
|
+
const t = W.value, n = [], e = [];
|
|
204
|
+
for (const a of t) {
|
|
205
|
+
const v = { level: a.level, text: a.text, id: a.id, children: [] };
|
|
206
|
+
for (; e.length > 0 && e[e.length - 1].level >= v.level; )
|
|
207
|
+
e.pop();
|
|
208
|
+
e.length === 0 ? n.push(v) : e[e.length - 1].children.push(v), e.push(v);
|
|
209
|
+
}
|
|
210
|
+
return n;
|
|
211
|
+
}), ue = M(() => {
|
|
212
|
+
const t = [];
|
|
213
|
+
function n(e) {
|
|
214
|
+
for (const a of e)
|
|
215
|
+
t.push({
|
|
216
|
+
level: a.level,
|
|
217
|
+
text: a.text,
|
|
218
|
+
id: a.id,
|
|
219
|
+
hasChildren: a.children.length > 0
|
|
220
|
+
}), a.children.length > 0 && !o.value.has(a.id) && n(a.children);
|
|
221
|
+
}
|
|
222
|
+
return n(de.value), t;
|
|
223
|
+
});
|
|
224
|
+
function me(t) {
|
|
225
|
+
var n, e;
|
|
226
|
+
(e = (n = c.value) == null ? void 0 : n.querySelector(`[id="${t}"]`)) == null || e.scrollIntoView({ behavior: "smooth" });
|
|
227
|
+
}
|
|
228
|
+
function Re(t) {
|
|
229
|
+
me(t), h.value = !1;
|
|
230
|
+
}
|
|
231
|
+
function pe(t) {
|
|
232
|
+
const n = new Set(o.value);
|
|
233
|
+
n.has(t) ? n.delete(t) : n.add(t), o.value = n;
|
|
234
|
+
}
|
|
235
|
+
function X(t) {
|
|
236
|
+
return o.value.has(t);
|
|
237
|
+
}
|
|
238
|
+
function De() {
|
|
239
|
+
if (!d.value || window.innerWidth <= 1100) return;
|
|
240
|
+
const t = d.value.querySelector(
|
|
241
|
+
".neumorphism-toc-item.active"
|
|
242
|
+
);
|
|
243
|
+
t && t.scrollIntoView({ block: "nearest", behavior: "smooth" });
|
|
244
|
+
}
|
|
245
|
+
function Se(t) {
|
|
246
|
+
const n = t.target, e = n.closest(".code-copy-btn");
|
|
247
|
+
if (e) {
|
|
248
|
+
const v = e.dataset.code;
|
|
249
|
+
v && (t.preventDefault(), navigator.clipboard.writeText(v).then(() => {
|
|
250
|
+
const j = e.textContent;
|
|
251
|
+
e.textContent = "已复制!", setTimeout(() => {
|
|
252
|
+
e && (e.textContent = j);
|
|
253
|
+
}, 1500);
|
|
254
|
+
}));
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
const a = n.closest("a");
|
|
258
|
+
if (a) {
|
|
259
|
+
const v = a.getAttribute("href");
|
|
260
|
+
v && (v.startsWith("/") || v.startsWith(".") || v.endsWith(".md")) && (t.preventDefault(), m("docLink", v));
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
function K() {
|
|
264
|
+
return c.value ? l.scrollContainer instanceof HTMLElement ? l.scrollContainer : typeof l.scrollContainer == "string" ? c.value.closest(l.scrollContainer) : c.value.closest(".nm-layout__content") : null;
|
|
265
|
+
}
|
|
266
|
+
function he() {
|
|
267
|
+
const t = K();
|
|
268
|
+
if (!t) return 64;
|
|
269
|
+
const n = t.closest(".nm-layout"), e = n == null ? void 0 : n.querySelector(".nm-layout__header");
|
|
270
|
+
return e ? e.getBoundingClientRect().height : 64;
|
|
271
|
+
}
|
|
272
|
+
function Le() {
|
|
273
|
+
return he() + 20;
|
|
274
|
+
}
|
|
275
|
+
function oe() {
|
|
276
|
+
if (!d.value) return;
|
|
277
|
+
if (window.innerWidth <= 1100) {
|
|
278
|
+
T.value = !1, E.value = {};
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
const n = K();
|
|
282
|
+
if (!n) {
|
|
283
|
+
T.value = !1;
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
T.value = !0;
|
|
287
|
+
const e = he(), a = n.getBoundingClientRect(), v = Math.max(0, window.innerWidth - a.right);
|
|
288
|
+
E.value = {
|
|
289
|
+
position: "fixed",
|
|
290
|
+
top: `${e + 20}px`,
|
|
291
|
+
maxHeight: `calc(100vh - ${e + 40}px)`,
|
|
292
|
+
right: `${v}px`,
|
|
293
|
+
width: "220px",
|
|
294
|
+
zIndex: "10"
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
function Me() {
|
|
298
|
+
var e;
|
|
299
|
+
se();
|
|
300
|
+
const t = K();
|
|
301
|
+
if (!t) return;
|
|
302
|
+
k = new ResizeObserver(() => {
|
|
303
|
+
C !== null && cancelAnimationFrame(C), C = requestAnimationFrame(() => {
|
|
304
|
+
C = null, oe(), le();
|
|
305
|
+
});
|
|
306
|
+
}), k.observe(t);
|
|
307
|
+
const n = (e = t.closest(".nm-layout")) == null ? void 0 : e.querySelector(".nm-layout__header");
|
|
308
|
+
n && k.observe(n);
|
|
309
|
+
}
|
|
310
|
+
function se() {
|
|
311
|
+
k && (k.disconnect(), k = null);
|
|
312
|
+
}
|
|
313
|
+
function le() {
|
|
314
|
+
var a;
|
|
315
|
+
const t = K();
|
|
316
|
+
if (!t) return;
|
|
317
|
+
const n = (a = c.value) == null ? void 0 : a.querySelectorAll("h1, h2, h3");
|
|
318
|
+
if (!n) return;
|
|
319
|
+
let e = "";
|
|
320
|
+
for (const v of n) {
|
|
321
|
+
const j = v.getBoundingClientRect(), Y = t.getBoundingClientRect();
|
|
322
|
+
if (j.top - Y.top <= Le())
|
|
323
|
+
e = v.id;
|
|
324
|
+
else
|
|
325
|
+
break;
|
|
326
|
+
}
|
|
327
|
+
e !== i.value && (i.value = e, fe(() => De()));
|
|
328
|
+
}
|
|
329
|
+
function ze(t, n) {
|
|
330
|
+
let e = 0, a = null;
|
|
331
|
+
return () => {
|
|
332
|
+
const v = Date.now();
|
|
333
|
+
v - e >= n ? (e = v, t()) : a === null && (a = requestAnimationFrame(() => {
|
|
334
|
+
a = null, t();
|
|
335
|
+
}));
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
const ie = ze(le, 80);
|
|
339
|
+
let I = null;
|
|
340
|
+
return Q(c, (t, n) => {
|
|
341
|
+
if (n) {
|
|
342
|
+
const e = K();
|
|
343
|
+
e == null || e.removeEventListener("scroll", ie), se(), R && (window.removeEventListener("resize", R), R = null);
|
|
344
|
+
}
|
|
345
|
+
t && fe(() => {
|
|
346
|
+
I = K(), I == null || I.addEventListener("scroll", ie), oe(), Me(), R = () => {
|
|
347
|
+
C !== null && cancelAnimationFrame(C), C = requestAnimationFrame(() => {
|
|
348
|
+
C = null, oe();
|
|
349
|
+
});
|
|
350
|
+
}, window.addEventListener("resize", R, { passive: !0 }), le();
|
|
351
|
+
});
|
|
352
|
+
}), He(() => {
|
|
353
|
+
I == null || I.removeEventListener("scroll", ie), se(), C !== null && (cancelAnimationFrame(C), C = null), R && (window.removeEventListener("resize", R), R = null);
|
|
354
|
+
}), Q(i, (t) => {
|
|
355
|
+
if (!t) return;
|
|
356
|
+
function n(e) {
|
|
357
|
+
for (const a of e) {
|
|
358
|
+
if (a.id === t) return !0;
|
|
359
|
+
if (n(a.children)) {
|
|
360
|
+
if (o.value.has(a.id)) {
|
|
361
|
+
const v = new Set(o.value);
|
|
362
|
+
v.delete(a.id), o.value = v;
|
|
363
|
+
}
|
|
364
|
+
return !0;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
return !1;
|
|
368
|
+
}
|
|
369
|
+
n(de.value);
|
|
370
|
+
}), (t, n) => ($(), N("div", {
|
|
371
|
+
class: A(`neumorphism-markdown ${l.className}`)
|
|
372
|
+
}, [
|
|
373
|
+
p("div", Ue, [
|
|
374
|
+
p("div", {
|
|
375
|
+
ref_key: "contentRef",
|
|
376
|
+
ref: c,
|
|
377
|
+
class: "neumorphism-markdown-content",
|
|
378
|
+
onClick: Se,
|
|
379
|
+
innerHTML: Ee.value
|
|
380
|
+
}, null, 8, We)
|
|
381
|
+
]),
|
|
382
|
+
r.showToc && W.value.length > 0 ? ($(), N("nav", {
|
|
383
|
+
key: 0,
|
|
384
|
+
ref_key: "tocNavRef",
|
|
385
|
+
ref: d,
|
|
386
|
+
class: A(["neumorphism-toc", { "neumorphism-toc--fixed": T.value }]),
|
|
387
|
+
style: Pe(T.value ? E.value : {}),
|
|
388
|
+
"aria-label": "文档目录"
|
|
389
|
+
}, [
|
|
390
|
+
y(F, {
|
|
391
|
+
elevation: -2,
|
|
392
|
+
"no-padding": "",
|
|
393
|
+
class: "neumorphism-toc-card"
|
|
394
|
+
}, {
|
|
395
|
+
default: g(() => [
|
|
396
|
+
p("div", je, [
|
|
397
|
+
n[3] || (n[3] = p("span", null, "📑 目录", -1)),
|
|
398
|
+
y(Fe, {
|
|
399
|
+
value: W.value.length
|
|
400
|
+
}, null, 8, ["value"])
|
|
401
|
+
]),
|
|
402
|
+
p("ul", Ge, [
|
|
403
|
+
($(!0), N(ae, null, ve(ue.value, (e) => ($(), N("li", {
|
|
404
|
+
key: e.id,
|
|
405
|
+
class: A(`neumorphism-toc-item level-${e.level} ${i.value === e.id ? "active" : ""} ${e.hasChildren ? "has-children" : ""}`),
|
|
406
|
+
role: "listitem"
|
|
407
|
+
}, [
|
|
408
|
+
p("a", {
|
|
409
|
+
href: "#",
|
|
410
|
+
role: "button",
|
|
411
|
+
"aria-current": i.value === e.id ? "location" : void 0,
|
|
412
|
+
onClick: G((a) => me(e.id), ["prevent"])
|
|
413
|
+
}, [
|
|
414
|
+
e.hasChildren ? ($(), N("button", {
|
|
415
|
+
key: 0,
|
|
416
|
+
class: "toc-toggle",
|
|
417
|
+
"aria-label": X(e.id) ? "展开子标题" : "折叠子标题",
|
|
418
|
+
onClick: G((a) => pe(e.id), ["stop", "prevent"])
|
|
419
|
+
}, H(X(e.id) ? "▸" : "▾"), 9, Xe)) : P("", !0),
|
|
420
|
+
p("span", Ye, H(e.text), 1)
|
|
421
|
+
], 8, Ze)
|
|
422
|
+
], 2))), 128))
|
|
423
|
+
])
|
|
424
|
+
]),
|
|
425
|
+
_: 1
|
|
426
|
+
})
|
|
427
|
+
], 6)) : P("", !0),
|
|
428
|
+
r.showToc && W.value.length > 0 ? ($(), N("button", {
|
|
429
|
+
key: 1,
|
|
430
|
+
class: A(["neumorphism-toc-mobile-btn", { active: h.value }]),
|
|
431
|
+
"aria-label": "切换目录",
|
|
432
|
+
onClick: n[0] || (n[0] = (e) => h.value = !h.value)
|
|
433
|
+
}, " 📑 ", 2)) : P("", !0),
|
|
434
|
+
y(ge, { name: "neumorphism-toc-drawer" }, {
|
|
435
|
+
default: g(() => [
|
|
436
|
+
r.showToc && W.value.length > 0 && h.value ? ($(), N("div", {
|
|
437
|
+
key: 0,
|
|
438
|
+
class: "neumorphism-toc-mobile-overlay",
|
|
439
|
+
onClick: n[2] || (n[2] = G((e) => h.value = !1, ["self"]))
|
|
440
|
+
}, [
|
|
441
|
+
y(F, {
|
|
442
|
+
elevation: 0,
|
|
443
|
+
class: "neumorphism-toc-mobile-panel"
|
|
444
|
+
}, {
|
|
445
|
+
default: g(() => [
|
|
446
|
+
p("div", Je, [
|
|
447
|
+
n[4] || (n[4] = p("span", { class: "neumorphism-toc-mobile-title" }, "📑 目录", -1)),
|
|
448
|
+
p("button", {
|
|
449
|
+
class: "neumorphism-toc-mobile-close",
|
|
450
|
+
"aria-label": "关闭目录",
|
|
451
|
+
onClick: n[1] || (n[1] = (e) => h.value = !1)
|
|
452
|
+
}, " ✕ ")
|
|
453
|
+
]),
|
|
454
|
+
p("ul", Qe, [
|
|
455
|
+
($(!0), N(ae, null, ve(ue.value, (e) => ($(), N("li", {
|
|
456
|
+
key: e.id,
|
|
457
|
+
class: A(`neumorphism-toc-item level-${e.level} ${i.value === e.id ? "active" : ""} ${e.hasChildren ? "has-children" : ""}`),
|
|
458
|
+
role: "listitem"
|
|
459
|
+
}, [
|
|
460
|
+
p("a", {
|
|
461
|
+
href: "#",
|
|
462
|
+
role: "button",
|
|
463
|
+
"aria-current": i.value === e.id ? "location" : void 0,
|
|
464
|
+
onClick: G((a) => Re(e.id), ["prevent"])
|
|
465
|
+
}, [
|
|
466
|
+
e.hasChildren ? ($(), N("button", {
|
|
467
|
+
key: 0,
|
|
468
|
+
class: "toc-toggle",
|
|
469
|
+
"aria-label": X(e.id) ? "展开子标题" : "折叠子标题",
|
|
470
|
+
onClick: G((a) => pe(e.id), ["stop", "prevent"])
|
|
471
|
+
}, H(X(e.id) ? "▸" : "▾"), 9, tt)) : P("", !0),
|
|
472
|
+
p("span", nt, H(e.text), 1)
|
|
473
|
+
], 8, et)
|
|
474
|
+
], 2))), 128))
|
|
475
|
+
])
|
|
476
|
+
]),
|
|
477
|
+
_: 1
|
|
478
|
+
})
|
|
479
|
+
])) : P("", !0)
|
|
480
|
+
]),
|
|
481
|
+
_: 1
|
|
482
|
+
})
|
|
483
|
+
], 2));
|
|
484
|
+
}
|
|
485
|
+
}), ot = {
|
|
486
|
+
key: 0,
|
|
487
|
+
class: "neumorphism-sider-content"
|
|
488
|
+
}, st = {
|
|
489
|
+
key: 1,
|
|
490
|
+
class: "neumorphism-sider-collapsed"
|
|
491
|
+
}, lt = { class: "neumorphism-doc-header" }, it = { class: "neumorphism-doc-title" }, rt = { class: "neumorphism-doc-meta" }, at = { class: "neumorphism-doc-body" }, ct = {
|
|
492
|
+
key: 1,
|
|
493
|
+
class: "neumorphism-empty-state"
|
|
494
|
+
}, dt = /* @__PURE__ */ ee({
|
|
495
|
+
__name: "DocViewer",
|
|
496
|
+
props: {
|
|
497
|
+
root: {},
|
|
498
|
+
initialPath: {},
|
|
499
|
+
className: { default: "" }
|
|
500
|
+
},
|
|
501
|
+
emits: ["docLink"],
|
|
502
|
+
setup(r, { emit: s }) {
|
|
503
|
+
const l = r, m = s, {
|
|
504
|
+
selectedPath: c,
|
|
505
|
+
selectedKeys: d,
|
|
506
|
+
expandedKeys: i,
|
|
507
|
+
treeData: h,
|
|
508
|
+
displayNode: o,
|
|
509
|
+
themeModel: T,
|
|
510
|
+
handleTreeSelect: E,
|
|
511
|
+
handleDocLink: k
|
|
512
|
+
} = xe({ root: l.root, initialPath: l.initialPath });
|
|
513
|
+
function C(R) {
|
|
514
|
+
k(m, R);
|
|
515
|
+
}
|
|
516
|
+
return (R, u) => ($(), N("div", {
|
|
517
|
+
class: A(`neumorphism-doc-viewer ${l.className}`)
|
|
518
|
+
}, [
|
|
519
|
+
y(ye, {
|
|
520
|
+
"show-header": "",
|
|
521
|
+
"show-sider": "",
|
|
522
|
+
"sider-width": 280,
|
|
523
|
+
collapsible: ""
|
|
524
|
+
}, {
|
|
525
|
+
"header-left": g(() => [...u[4] || (u[4] = [
|
|
526
|
+
p("span", { class: "neumorphism-header-brand" }, "📚 Doc Viewer", -1)
|
|
527
|
+
])]),
|
|
528
|
+
"header-right": g(() => [
|
|
529
|
+
y(ke, {
|
|
530
|
+
modelValue: _(T),
|
|
531
|
+
"onUpdate:modelValue": u[0] || (u[0] = (w) => U(T) ? T.value = w : null),
|
|
532
|
+
size: "small"
|
|
533
|
+
}, null, 8, ["modelValue"])
|
|
534
|
+
]),
|
|
535
|
+
sider: g(({ collapsed: w }) => [
|
|
536
|
+
w ? ($(), N("div", st, "📚")) : ($(), N("div", ot, [
|
|
537
|
+
y(be, {
|
|
538
|
+
"selected-keys": _(d),
|
|
539
|
+
"onUpdate:selectedKeys": u[1] || (u[1] = (f) => U(d) ? d.value = f : null),
|
|
540
|
+
"expanded-keys": _(i),
|
|
541
|
+
"onUpdate:expandedKeys": u[2] || (u[2] = (f) => U(i) ? i.value = f : null),
|
|
542
|
+
data: _(h),
|
|
543
|
+
"show-search": "",
|
|
544
|
+
"search-placeholder": "搜索文档...",
|
|
545
|
+
onNodeSelect: _(E)
|
|
546
|
+
}, null, 8, ["selected-keys", "expanded-keys", "data", "onNodeSelect"])
|
|
547
|
+
]))
|
|
548
|
+
]),
|
|
549
|
+
default: g(() => [
|
|
550
|
+
y($e, {
|
|
551
|
+
"no-padding": "",
|
|
552
|
+
class: "neumorphism-main-container"
|
|
553
|
+
}, {
|
|
554
|
+
default: g(() => [
|
|
555
|
+
y(F, {
|
|
556
|
+
elevation: -3,
|
|
557
|
+
"no-padding": "",
|
|
558
|
+
class: "neumorphism-content-card"
|
|
559
|
+
}, {
|
|
560
|
+
default: g(() => [
|
|
561
|
+
_(o) ? ($(), N(ae, { key: 0 }, [
|
|
562
|
+
p("div", lt, [
|
|
563
|
+
p("h1", it, H(_(o).title), 1),
|
|
564
|
+
p("div", rt, [
|
|
565
|
+
_(o).path ? ($(), O(Z, {
|
|
566
|
+
key: 0,
|
|
567
|
+
variant: "primary",
|
|
568
|
+
size: "small",
|
|
569
|
+
rounded: ""
|
|
570
|
+
}, {
|
|
571
|
+
default: g(() => [
|
|
572
|
+
V(H(_(o).path), 1)
|
|
573
|
+
]),
|
|
574
|
+
_: 1
|
|
575
|
+
})) : P("", !0),
|
|
576
|
+
_(o).children.length > 0 ? ($(), O(Z, {
|
|
577
|
+
key: 1,
|
|
578
|
+
variant: "info",
|
|
579
|
+
size: "small",
|
|
580
|
+
rounded: ""
|
|
581
|
+
}, {
|
|
582
|
+
default: g(() => [
|
|
583
|
+
V(" 📁 " + H(_(o).children.length) + " 个子项 ", 1)
|
|
584
|
+
]),
|
|
585
|
+
_: 1
|
|
586
|
+
})) : P("", !0)
|
|
587
|
+
])
|
|
588
|
+
]),
|
|
589
|
+
y(we),
|
|
590
|
+
p("div", at, [
|
|
591
|
+
y(ge, {
|
|
592
|
+
name: "neumorphism-doc-switch",
|
|
593
|
+
mode: "out-in"
|
|
594
|
+
}, {
|
|
595
|
+
default: g(() => [
|
|
596
|
+
($(), O(Ce, {
|
|
597
|
+
key: _(o).path,
|
|
598
|
+
content: _(o).body,
|
|
599
|
+
onDocLink: C
|
|
600
|
+
}, null, 8, ["content"]))
|
|
601
|
+
]),
|
|
602
|
+
_: 1
|
|
603
|
+
})
|
|
604
|
+
])
|
|
605
|
+
], 64)) : ($(), N("div", ct, [
|
|
606
|
+
y(F, {
|
|
607
|
+
elevation: 2,
|
|
608
|
+
hoverable: "bulge",
|
|
609
|
+
class: "neumorphism-empty-icon"
|
|
610
|
+
}, {
|
|
611
|
+
default: g(() => [...u[5] || (u[5] = [
|
|
612
|
+
p("span", { class: "neumorphism-empty-emoji" }, "📂", -1)
|
|
613
|
+
])]),
|
|
614
|
+
_: 1
|
|
615
|
+
}),
|
|
616
|
+
u[7] || (u[7] = p("p", null, "请从左侧选择一篇文档", -1)),
|
|
617
|
+
y(J, {
|
|
618
|
+
variant: "raised",
|
|
619
|
+
size: "small",
|
|
620
|
+
onClick: u[3] || (u[3] = (w) => {
|
|
621
|
+
var f;
|
|
622
|
+
return c.value = ((f = _(h)[0]) == null ? void 0 : f.key) ?? "";
|
|
623
|
+
})
|
|
624
|
+
}, {
|
|
625
|
+
default: g(() => [...u[6] || (u[6] = [
|
|
626
|
+
V(" 打开第一篇 ", -1)
|
|
627
|
+
])]),
|
|
628
|
+
_: 1
|
|
629
|
+
})
|
|
630
|
+
]))
|
|
631
|
+
]),
|
|
632
|
+
_: 1
|
|
633
|
+
})
|
|
634
|
+
]),
|
|
635
|
+
_: 1
|
|
636
|
+
})
|
|
637
|
+
]),
|
|
638
|
+
_: 1
|
|
639
|
+
})
|
|
640
|
+
], 2));
|
|
641
|
+
}
|
|
642
|
+
}), Zt = /* @__PURE__ */ ce(dt, [["__scopeId", "data-v-aa1a5e08"]]), ut = { class: "neumorphism-editor-toolbar" }, mt = { class: "editor-stat" }, pt = /* @__PURE__ */ ee({
|
|
643
|
+
__name: "MarkdownEditor",
|
|
644
|
+
props: {
|
|
645
|
+
value: {},
|
|
646
|
+
className: { default: "" }
|
|
647
|
+
},
|
|
648
|
+
emits: ["change", "docLink"],
|
|
649
|
+
setup(r, { emit: s }) {
|
|
650
|
+
const l = r, m = s, c = S("split");
|
|
651
|
+
function d(u) {
|
|
652
|
+
m("docLink", u);
|
|
653
|
+
}
|
|
654
|
+
const i = [
|
|
655
|
+
{ key: "edit", label: "✏️ 编辑" },
|
|
656
|
+
{ key: "split", label: "⬌ 分栏" },
|
|
657
|
+
{ key: "preview", label: "👁 预览" }
|
|
658
|
+
], h = M(() => l.value.length), o = M(() => l.value.split(`
|
|
659
|
+
`).length), T = S(null), E = S(null);
|
|
660
|
+
let k = !1;
|
|
661
|
+
function C() {
|
|
662
|
+
var L;
|
|
663
|
+
if (k || c.value !== "split") return;
|
|
664
|
+
const u = (L = T.value) == null ? void 0 : L.querySelector("textarea"), w = E.value;
|
|
665
|
+
if (!u || !w) return;
|
|
666
|
+
const f = u.scrollTop / (u.scrollHeight - u.clientHeight || 1);
|
|
667
|
+
k = !0, w.scrollTop = f * (w.scrollHeight - w.clientHeight), requestAnimationFrame(() => {
|
|
668
|
+
k = !1;
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
function R() {
|
|
672
|
+
var L;
|
|
673
|
+
if (k || c.value !== "split") return;
|
|
674
|
+
const u = (L = T.value) == null ? void 0 : L.querySelector("textarea"), w = E.value;
|
|
675
|
+
if (!u || !w) return;
|
|
676
|
+
const f = w.scrollTop / (w.scrollHeight - w.clientHeight || 1);
|
|
677
|
+
k = !0, u.scrollTop = f * (u.scrollHeight - u.clientHeight), requestAnimationFrame(() => {
|
|
678
|
+
k = !1;
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
return (u, w) => ($(), N("div", {
|
|
682
|
+
class: A(`neumorphism-markdown-editor ${l.className}`)
|
|
683
|
+
}, [
|
|
684
|
+
p("div", ut, [
|
|
685
|
+
y(qe, {
|
|
686
|
+
modelValue: c.value,
|
|
687
|
+
"onUpdate:modelValue": w[0] || (w[0] = (f) => c.value = f),
|
|
688
|
+
tabs: i,
|
|
689
|
+
size: "small",
|
|
690
|
+
class: "neumorphism-editor-mode-tabs"
|
|
691
|
+
}, null, 8, ["modelValue"]),
|
|
692
|
+
p("span", mt, H(o.value) + " 行 · " + H(h.value) + " 字", 1)
|
|
693
|
+
]),
|
|
694
|
+
p("div", {
|
|
695
|
+
class: A(["neumorphism-editor-panels", `neumorphism-mode-${c.value}`])
|
|
696
|
+
}, [
|
|
697
|
+
p("div", {
|
|
698
|
+
ref_key: "editPanelRef",
|
|
699
|
+
ref: T,
|
|
700
|
+
class: A(["neumorphism-editor-panel neumorphism-editor-panel--edit", { hidden: c.value === "preview" }]),
|
|
701
|
+
onScroll: C
|
|
702
|
+
}, [
|
|
703
|
+
y(F, {
|
|
704
|
+
elevation: -3,
|
|
705
|
+
"no-padding": "",
|
|
706
|
+
class: "edit-card"
|
|
707
|
+
}, {
|
|
708
|
+
default: g(() => [
|
|
709
|
+
y(Be, {
|
|
710
|
+
class: "neumorphism-editor-textarea",
|
|
711
|
+
"model-value": l.value,
|
|
712
|
+
placeholder: "在此输入 Markdown...",
|
|
713
|
+
"auto-resize": !1,
|
|
714
|
+
"show-count": !1,
|
|
715
|
+
"onUpdate:modelValue": w[1] || (w[1] = (f) => m("change", f))
|
|
716
|
+
}, null, 8, ["model-value"])
|
|
717
|
+
]),
|
|
718
|
+
_: 1
|
|
719
|
+
})
|
|
720
|
+
], 34),
|
|
721
|
+
p("div", {
|
|
722
|
+
ref_key: "previewPanelRef",
|
|
723
|
+
ref: E,
|
|
724
|
+
class: A(["neumorphism-editor-panel neumorphism-editor-panel--preview", { hidden: c.value === "edit" }]),
|
|
725
|
+
onScroll: R
|
|
726
|
+
}, [
|
|
727
|
+
y(F, {
|
|
728
|
+
elevation: -2,
|
|
729
|
+
"no-padding": "",
|
|
730
|
+
class: "preview-card"
|
|
731
|
+
}, {
|
|
732
|
+
default: g(() => [
|
|
733
|
+
y(Ce, {
|
|
734
|
+
content: l.value,
|
|
735
|
+
"show-toc": !1,
|
|
736
|
+
onDocLink: d
|
|
737
|
+
}, null, 8, ["content"])
|
|
738
|
+
]),
|
|
739
|
+
_: 1
|
|
740
|
+
})
|
|
741
|
+
], 34)
|
|
742
|
+
], 2)
|
|
743
|
+
], 2));
|
|
744
|
+
}
|
|
745
|
+
}), ht = /* @__PURE__ */ ce(pt, [["__scopeId", "data-v-c47cd884"]]), ft = { class: "neumorphism-editor-actions" }, vt = {
|
|
746
|
+
key: 0,
|
|
747
|
+
class: "neumorphism-editor-sider"
|
|
748
|
+
}, gt = {
|
|
749
|
+
key: 1,
|
|
750
|
+
class: "neumorphism-editor-sider-collapsed"
|
|
751
|
+
}, yt = {
|
|
752
|
+
key: 0,
|
|
753
|
+
class: "neumorphism-editor-layout"
|
|
754
|
+
}, kt = { class: "neumorphism-editor-header" }, bt = { class: "neumorphism-editor-title" }, wt = { class: "neumorphism-editor-meta" }, $t = { class: "neumorphism-editor-body" }, _t = {
|
|
755
|
+
key: 1,
|
|
756
|
+
class: "neumorphism-editor-empty"
|
|
757
|
+
}, xt = 50, Ct = /* @__PURE__ */ ee({
|
|
758
|
+
__name: "DocEditor",
|
|
759
|
+
props: {
|
|
760
|
+
root: {},
|
|
761
|
+
initialPath: {},
|
|
762
|
+
className: { default: "" }
|
|
763
|
+
},
|
|
764
|
+
emits: ["save", "docLink"],
|
|
765
|
+
setup(r, { emit: s }) {
|
|
766
|
+
const l = r, m = s, {
|
|
767
|
+
selectedPath: c,
|
|
768
|
+
selectedKeys: d,
|
|
769
|
+
expandedKeys: i,
|
|
770
|
+
treeData: h,
|
|
771
|
+
displayNode: o,
|
|
772
|
+
themeModel: T,
|
|
773
|
+
handleTreeSelect: E
|
|
774
|
+
} = xe({ root: l.root, initialPath: l.initialPath }), k = S({}), C = S([]);
|
|
775
|
+
function R(x, b) {
|
|
776
|
+
const z = C.value.filter((D) => D !== x);
|
|
777
|
+
for (z.push(x); z.length > xt; ) {
|
|
778
|
+
const D = z.shift();
|
|
779
|
+
D !== x && delete k.value[D];
|
|
780
|
+
}
|
|
781
|
+
C.value = z, k.value[x] = b;
|
|
782
|
+
}
|
|
783
|
+
function u(x) {
|
|
784
|
+
return k.value[x.path] ?? x.content;
|
|
785
|
+
}
|
|
786
|
+
function w(x) {
|
|
787
|
+
o.value && R(o.value.path, x);
|
|
788
|
+
}
|
|
789
|
+
function f() {
|
|
790
|
+
o.value && m("save", o.value.path, u(o.value));
|
|
791
|
+
}
|
|
792
|
+
function L(x) {
|
|
793
|
+
c.value = x, m("docLink", x);
|
|
794
|
+
}
|
|
795
|
+
const q = M(() => {
|
|
796
|
+
if (!o.value) return !1;
|
|
797
|
+
const x = k.value[o.value.path];
|
|
798
|
+
return x !== void 0 && x !== o.value.content;
|
|
799
|
+
});
|
|
800
|
+
function te(x) {
|
|
801
|
+
(x.ctrlKey || x.metaKey) && x.key === "s" && (x.preventDefault(), f());
|
|
802
|
+
}
|
|
803
|
+
return (x, b) => ($(), N("div", {
|
|
804
|
+
class: A(`neumorphism-doc-editor ${l.className}`),
|
|
805
|
+
onKeydown: te
|
|
806
|
+
}, [
|
|
807
|
+
y(ye, {
|
|
808
|
+
"show-header": "",
|
|
809
|
+
"show-sider": "",
|
|
810
|
+
"sider-width": 280,
|
|
811
|
+
collapsible: ""
|
|
812
|
+
}, {
|
|
813
|
+
"header-left": g(() => [...b[4] || (b[4] = [
|
|
814
|
+
p("span", { class: "neumorphism-editor-brand" }, "📝 Doc Editor", -1)
|
|
815
|
+
])]),
|
|
816
|
+
"header-center": g(() => [
|
|
817
|
+
y(ke, {
|
|
818
|
+
modelValue: _(T),
|
|
819
|
+
"onUpdate:modelValue": b[0] || (b[0] = (z) => U(T) ? T.value = z : null),
|
|
820
|
+
size: "small"
|
|
821
|
+
}, null, 8, ["modelValue"])
|
|
822
|
+
]),
|
|
823
|
+
"header-right": g(() => [
|
|
824
|
+
p("div", ft, [
|
|
825
|
+
q.value ? ($(), O(Z, {
|
|
826
|
+
key: 0,
|
|
827
|
+
variant: "warning",
|
|
828
|
+
size: "small"
|
|
829
|
+
}, {
|
|
830
|
+
default: g(() => [...b[5] || (b[5] = [
|
|
831
|
+
V(" 未保存 ", -1)
|
|
832
|
+
])]),
|
|
833
|
+
_: 1
|
|
834
|
+
})) : P("", !0),
|
|
835
|
+
y(J, {
|
|
836
|
+
variant: "raised",
|
|
837
|
+
size: "small",
|
|
838
|
+
disabled: !q.value,
|
|
839
|
+
onClick: f
|
|
840
|
+
}, {
|
|
841
|
+
default: g(() => [...b[6] || (b[6] = [
|
|
842
|
+
V(" 💾 保存 ", -1)
|
|
843
|
+
])]),
|
|
844
|
+
_: 1
|
|
845
|
+
}, 8, ["disabled"])
|
|
846
|
+
])
|
|
847
|
+
]),
|
|
848
|
+
sider: g(({ collapsed: z }) => [
|
|
849
|
+
z ? ($(), N("div", gt, "📝")) : ($(), N("div", vt, [
|
|
850
|
+
y(be, {
|
|
851
|
+
"selected-keys": _(d),
|
|
852
|
+
"onUpdate:selectedKeys": b[1] || (b[1] = (D) => U(d) ? d.value = D : null),
|
|
853
|
+
"expanded-keys": _(i),
|
|
854
|
+
"onUpdate:expandedKeys": b[2] || (b[2] = (D) => U(i) ? i.value = D : null),
|
|
855
|
+
data: _(h),
|
|
856
|
+
"show-search": "",
|
|
857
|
+
"search-placeholder": "搜索文档...",
|
|
858
|
+
onNodeSelect: _(E)
|
|
859
|
+
}, null, 8, ["selected-keys", "expanded-keys", "data", "onNodeSelect"])
|
|
860
|
+
]))
|
|
861
|
+
]),
|
|
862
|
+
default: g(() => [
|
|
863
|
+
y($e, {
|
|
864
|
+
"no-padding": "",
|
|
865
|
+
class: "neumorphism-editor-container"
|
|
866
|
+
}, {
|
|
867
|
+
default: g(() => [
|
|
868
|
+
y(F, {
|
|
869
|
+
elevation: -3,
|
|
870
|
+
"no-padding": "",
|
|
871
|
+
class: "neumorphism-editor-card"
|
|
872
|
+
}, {
|
|
873
|
+
default: g(() => [
|
|
874
|
+
_(o) ? ($(), N("div", yt, [
|
|
875
|
+
p("header", kt, [
|
|
876
|
+
p("div", null, [
|
|
877
|
+
p("h1", bt, H(_(o).title), 1),
|
|
878
|
+
p("div", wt, [
|
|
879
|
+
_(o).path ? ($(), O(Z, {
|
|
880
|
+
key: 0,
|
|
881
|
+
variant: "primary",
|
|
882
|
+
size: "small",
|
|
883
|
+
rounded: ""
|
|
884
|
+
}, {
|
|
885
|
+
default: g(() => [
|
|
886
|
+
V(H(_(o).path), 1)
|
|
887
|
+
]),
|
|
888
|
+
_: 1
|
|
889
|
+
})) : P("", !0),
|
|
890
|
+
q.value ? ($(), O(Z, {
|
|
891
|
+
key: 1,
|
|
892
|
+
variant: "warning",
|
|
893
|
+
size: "small"
|
|
894
|
+
}, {
|
|
895
|
+
default: g(() => [...b[7] || (b[7] = [
|
|
896
|
+
V(" 已修改 ", -1)
|
|
897
|
+
])]),
|
|
898
|
+
_: 1
|
|
899
|
+
})) : P("", !0)
|
|
900
|
+
])
|
|
901
|
+
]),
|
|
902
|
+
y(J, {
|
|
903
|
+
variant: "raised",
|
|
904
|
+
size: "small",
|
|
905
|
+
disabled: !q.value,
|
|
906
|
+
onClick: f
|
|
907
|
+
}, {
|
|
908
|
+
default: g(() => [...b[8] || (b[8] = [
|
|
909
|
+
V(" 💾 保存 ", -1)
|
|
910
|
+
])]),
|
|
911
|
+
_: 1
|
|
912
|
+
}, 8, ["disabled"])
|
|
913
|
+
]),
|
|
914
|
+
y(we),
|
|
915
|
+
p("div", $t, [
|
|
916
|
+
y(ht, {
|
|
917
|
+
value: u(_(o)),
|
|
918
|
+
onChange: w,
|
|
919
|
+
onDocLink: L
|
|
920
|
+
}, null, 8, ["value"])
|
|
921
|
+
])
|
|
922
|
+
])) : ($(), N("div", _t, [
|
|
923
|
+
y(F, {
|
|
924
|
+
elevation: 2,
|
|
925
|
+
hoverable: "bulge",
|
|
926
|
+
class: "neumorphism-editor-empty-icon"
|
|
927
|
+
}, {
|
|
928
|
+
default: g(() => [...b[9] || (b[9] = [
|
|
929
|
+
p("span", { class: "neumorphism-editor-empty-emoji" }, "📂", -1)
|
|
930
|
+
])]),
|
|
931
|
+
_: 1
|
|
932
|
+
}),
|
|
933
|
+
b[11] || (b[11] = p("p", null, "请从左侧选择一篇文档进行编辑", -1)),
|
|
934
|
+
y(J, {
|
|
935
|
+
variant: "raised",
|
|
936
|
+
size: "small",
|
|
937
|
+
onClick: b[3] || (b[3] = (z) => {
|
|
938
|
+
var D;
|
|
939
|
+
return c.value = ((D = _(h)[0]) == null ? void 0 : D.key) ?? "";
|
|
940
|
+
})
|
|
941
|
+
}, {
|
|
942
|
+
default: g(() => [...b[10] || (b[10] = [
|
|
943
|
+
V(" 打开第一篇 ", -1)
|
|
944
|
+
])]),
|
|
945
|
+
_: 1
|
|
946
|
+
})
|
|
947
|
+
]))
|
|
948
|
+
]),
|
|
949
|
+
_: 1
|
|
950
|
+
})
|
|
951
|
+
]),
|
|
952
|
+
_: 1
|
|
953
|
+
})
|
|
954
|
+
]),
|
|
955
|
+
_: 1
|
|
956
|
+
})
|
|
957
|
+
], 34));
|
|
958
|
+
}
|
|
959
|
+
}), Xt = /* @__PURE__ */ ce(Ct, [["__scopeId", "data-v-974c39ef"]]), Tt = /^---\s*\n([\s\S]*?)\n---\s*\n?/;
|
|
960
|
+
function Nt(r) {
|
|
961
|
+
const s = r.match(Tt);
|
|
962
|
+
if (!s)
|
|
963
|
+
return { meta: {}, body: r };
|
|
964
|
+
const l = s[1], m = r.slice(s[0].length), c = {};
|
|
965
|
+
for (const d of l.split(`
|
|
966
|
+
`)) {
|
|
967
|
+
const i = d.indexOf(":");
|
|
968
|
+
if (i === -1) continue;
|
|
969
|
+
const h = d.slice(0, i).trim();
|
|
970
|
+
let o = d.slice(i + 1).trim();
|
|
971
|
+
/^-?\d+$/.test(o) ? o = parseInt(o, 10) : /^-?\d+\.\d+$/.test(o) ? o = parseFloat(o) : o === "true" ? o = !0 : o === "false" ? o = !1 : (o.startsWith('"') && o.endsWith('"') || o.startsWith("'") && o.endsWith("'")) && (o = o.slice(1, -1)), c[h] = o;
|
|
972
|
+
}
|
|
973
|
+
return { meta: c, body: m };
|
|
974
|
+
}
|
|
975
|
+
function Et(r) {
|
|
976
|
+
return r.replace(/\.md$/i, "").replace(/\//g, "-").replace(/\\/g, "-");
|
|
977
|
+
}
|
|
978
|
+
function Rt(r, s) {
|
|
979
|
+
if (s.title && typeof s.title == "string")
|
|
980
|
+
return s.title;
|
|
981
|
+
const l = r.match(/^#\s+(.+)$/m);
|
|
982
|
+
return l ? l[1].trim() : "Untitled";
|
|
983
|
+
}
|
|
984
|
+
function Dt(r, s) {
|
|
985
|
+
const { meta: l, body: m } = Nt(s), c = Rt(m, l), d = typeof l.order == "number" ? l.order : 9999;
|
|
986
|
+
return {
|
|
987
|
+
id: Et(r),
|
|
988
|
+
title: c,
|
|
989
|
+
path: r,
|
|
990
|
+
content: s,
|
|
991
|
+
body: m,
|
|
992
|
+
meta: l,
|
|
993
|
+
children: [],
|
|
994
|
+
order: d
|
|
995
|
+
};
|
|
996
|
+
}
|
|
997
|
+
function Yt(r) {
|
|
998
|
+
const s = /* @__PURE__ */ new Map();
|
|
999
|
+
for (const [i, h] of Object.entries(r)) {
|
|
1000
|
+
if (!i.endsWith(".md")) continue;
|
|
1001
|
+
const o = Dt(i, h);
|
|
1002
|
+
s.set(i, o);
|
|
1003
|
+
}
|
|
1004
|
+
const l = [], m = Array.from(s.keys()).sort();
|
|
1005
|
+
for (const i of m) {
|
|
1006
|
+
const h = i.split("/");
|
|
1007
|
+
if (h.length === 1) {
|
|
1008
|
+
l.push(i);
|
|
1009
|
+
continue;
|
|
1010
|
+
}
|
|
1011
|
+
let o = null;
|
|
1012
|
+
const E = `${h.slice(0, -1).join("/")}/index.md`;
|
|
1013
|
+
if (s.has(E) && E !== i)
|
|
1014
|
+
o = E;
|
|
1015
|
+
else {
|
|
1016
|
+
const k = h.slice(0, -1).join("/") + ".md";
|
|
1017
|
+
s.has(k) && (o = k);
|
|
1018
|
+
}
|
|
1019
|
+
if (o && s.has(o)) {
|
|
1020
|
+
const k = s.get(o), C = s.get(i);
|
|
1021
|
+
k.children.push(C);
|
|
1022
|
+
} else
|
|
1023
|
+
l.push(i);
|
|
1024
|
+
}
|
|
1025
|
+
for (const i of s.values())
|
|
1026
|
+
i.children.sort((h, o) => h.order - o.order || h.title.localeCompare(o.title));
|
|
1027
|
+
const c = l.map((i) => s.get(i)).sort((i, h) => i.order - h.order || i.title.localeCompare(h.title));
|
|
1028
|
+
return {
|
|
1029
|
+
id: "root",
|
|
1030
|
+
title: "Root",
|
|
1031
|
+
path: "",
|
|
1032
|
+
content: "",
|
|
1033
|
+
body: "",
|
|
1034
|
+
meta: {},
|
|
1035
|
+
children: c,
|
|
1036
|
+
order: 0
|
|
1037
|
+
};
|
|
1038
|
+
}
|
|
1039
|
+
export {
|
|
1040
|
+
Xt as DocEditor,
|
|
1041
|
+
Zt as DocViewer,
|
|
1042
|
+
ht as MarkdownEditor,
|
|
1043
|
+
Ce as MarkdownRenderer,
|
|
1044
|
+
Yt as buildDocTree,
|
|
1045
|
+
Oe as createDocTree,
|
|
1046
|
+
Dt as createNode,
|
|
1047
|
+
Rt as extractTitle,
|
|
1048
|
+
jt as flattenDocTree,
|
|
1049
|
+
Gt as getAncestors,
|
|
1050
|
+
Ke as getNodeIcon,
|
|
1051
|
+
_e as nodeToTreeData,
|
|
1052
|
+
Nt as parseFrontmatter,
|
|
1053
|
+
Et as pathToId,
|
|
1054
|
+
xe as useDocLayout
|
|
1055
|
+
};
|