@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
package/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# ProDoc — 文档渲染与编辑框架
|
|
2
|
+
|
|
3
|
+
> 基于 [**@echolab/ui-frame**](https://github.com/EchoLab-Auto/ui-frame) 新拟态设计系统构建的 Markdown 文档框架。
|
|
4
|
+
|
|
5
|
+
ProDoc 是一个文档渲染与编辑框架,采用 **新拟态(Neumorphism / Soft UI)** 设计语言。
|
|
6
|
+
|
|
7
|
+
## 快速开始
|
|
8
|
+
|
|
9
|
+
### 安装
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# 从 npm 全局安装 CLI 工具(推荐)
|
|
13
|
+
npm install -g @echolab-auto/echo-prodoc
|
|
14
|
+
|
|
15
|
+
# 或从 GitHub 打包后全局安装
|
|
16
|
+
TARBALL=$(npm pack github:EchoLab-Auto/DocRenderer | tail -1) && npm install -g "$TARBALL" && rm -f "$TARBALL"
|
|
17
|
+
|
|
18
|
+
# 如果安装后命令不在 PATH 中,可创建系统级软链接
|
|
19
|
+
sudo -E env "PATH=$PATH" node "$(npm root -g)/@echolab-auto/echo-prodoc/scripts/link-system-bin.js"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### 使用
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# 渲染文档目录
|
|
26
|
+
echo-prodoc view ./docs
|
|
27
|
+
|
|
28
|
+
# 编辑文档目录
|
|
29
|
+
echo-prodoc edit ./docs
|
|
30
|
+
|
|
31
|
+
# 指定端口
|
|
32
|
+
echo-prodoc view ./docs --port 8080
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
也可以通过源码安装:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
git clone https://github.com/EchoLab-Auto/DocRenderer.git
|
|
39
|
+
cd DocRenderer
|
|
40
|
+
npm install && npm run build
|
|
41
|
+
npm link
|
|
42
|
+
echo-prodoc view ./examples/demo/document
|
|
43
|
+
# 或本地运行:npm run view -- ./examples/demo/document
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 技术栈
|
|
47
|
+
|
|
48
|
+
- **TypeScript** — 完整的类型定义
|
|
49
|
+
- **Vue 3** — 组件库
|
|
50
|
+
- **Vite** — Library Mode 构建
|
|
51
|
+
- **marked** — Markdown 解析
|
|
52
|
+
- **@echolab/ui-frame** — 新拟态设计系统
|
|
53
|
+
|
|
54
|
+
## 许可证
|
|
55
|
+
|
|
56
|
+
MIT
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@echolab-auto/echo-prodoc",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "ProDoc - 文档渲染与编辑框架",
|
|
5
|
+
"workspaces": [
|
|
6
|
+
"packages/*"
|
|
7
|
+
],
|
|
8
|
+
"bin": {
|
|
9
|
+
"echo-prodoc": "./bin/echo-prodoc.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"bin/",
|
|
13
|
+
"packages/*/dist/**",
|
|
14
|
+
"packages/*/package.json",
|
|
15
|
+
"scripts/",
|
|
16
|
+
"vendor/@echolab/ui-frame/**",
|
|
17
|
+
"vendor/fsevents-stub/**"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "npm run build --workspaces",
|
|
21
|
+
"build:ui-frame": "node scripts/install-ui-frame.js",
|
|
22
|
+
"type-check": "npm run type-check --workspaces",
|
|
23
|
+
"clean": "npm run clean --workspaces",
|
|
24
|
+
"view": "node ./packages/prodoc-cli/dist/index.js view",
|
|
25
|
+
"edit": "node ./packages/prodoc-cli/dist/index.js edit",
|
|
26
|
+
"prepublishOnly": "node scripts/install-ui-frame.js && npm run build"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^22.0.0",
|
|
30
|
+
"typescript": "^5.7.0",
|
|
31
|
+
"vite": "^8.0.16"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=18.0.0"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@echolab/ui-frame": "file:vendor/@echolab/ui-frame",
|
|
38
|
+
"@prodoc/core": "file:packages/prodoc-core",
|
|
39
|
+
"@prodoc/editor": "file:packages/prodoc-editor",
|
|
40
|
+
"@prodoc/renderer": "file:packages/prodoc-renderer",
|
|
41
|
+
"@vitejs/plugin-vue": "^6.0.7",
|
|
42
|
+
"marked": "^18.0.5",
|
|
43
|
+
"vue": "^3.5.35",
|
|
44
|
+
"vue-tsc": "^2.2.12"
|
|
45
|
+
},
|
|
46
|
+
"overrides": {
|
|
47
|
+
"fsevents": "file:vendor/fsevents-stub"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;GAMG"}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import e from "path";
|
|
3
|
+
import t from "fs/promises";
|
|
4
|
+
import { createServer as n } from "vite";
|
|
5
|
+
import r from "@vitejs/plugin-vue";
|
|
6
|
+
import { createRequire as i } from "module";
|
|
7
|
+
import a from "fs";
|
|
8
|
+
//#region src/server.ts
|
|
9
|
+
var o = i(import.meta.url);
|
|
10
|
+
function s(t) {
|
|
11
|
+
try {
|
|
12
|
+
let n = o.resolve(`${t}/package.json`);
|
|
13
|
+
return e.dirname(n);
|
|
14
|
+
} catch {
|
|
15
|
+
let n = o.resolve(t), r = e.dirname(n);
|
|
16
|
+
for (; r !== e.dirname(r);) {
|
|
17
|
+
if (a.existsSync(e.join(r, "package.json"))) return r;
|
|
18
|
+
r = e.dirname(r);
|
|
19
|
+
}
|
|
20
|
+
throw Error(`Cannot find package directory for ${t}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
var c = 3344, l = 10 * 1024 * 1024, u = "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <title>ProDoc</title>\n <style>\n html, body {\n margin: 0;\n padding: 0;\n height: 100%;\n background: var(--nm-bg-color, #e0e0e0);\n }\n </style>\n </head>\n <body>\n <div id=\"app\"></div>\n <script type=\"module\" src=\"/@prodoc/entry\"><\/script>\n </body>\n</html>";
|
|
24
|
+
async function d(n) {
|
|
25
|
+
let r = {};
|
|
26
|
+
async function i(n, a = "") {
|
|
27
|
+
let o = await t.readdir(n, { withFileTypes: !0 });
|
|
28
|
+
for (let s of o) {
|
|
29
|
+
let o = a ? `${a}/${s.name}` : s.name, c = e.join(n, s.name);
|
|
30
|
+
s.isDirectory() ? await i(c, o) : s.name.endsWith(".md") && (r[o] = await t.readFile(c, "utf-8"));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return await i(n), r;
|
|
34
|
+
}
|
|
35
|
+
function f(t) {
|
|
36
|
+
let n = e.join(s(t), "dist", "style.css").replace(/\\/g, "/");
|
|
37
|
+
if (!a.existsSync(n)) throw Error(`CSS file not found for ${t}: ${n}. Please run "npm run build:ui-frame" first.`);
|
|
38
|
+
return n;
|
|
39
|
+
}
|
|
40
|
+
function p(t) {
|
|
41
|
+
let n = s(t), r = e.join(n, "src", "index.ts"), i = e.join(n, "dist", "index.js");
|
|
42
|
+
return process.env.PRODOC_DEV === "1" && a.existsSync(r) ? r.replace(/\\/g, "/") : i.replace(/\\/g, "/");
|
|
43
|
+
}
|
|
44
|
+
function m() {
|
|
45
|
+
return "async (filePath, content) => {\n try {\n const res = await fetch('/__prodoc_api/save', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ path: filePath, content }),\n });\n const data = await res.json();\n if (data.success) {\n console.log('[ProDoc] saved:', filePath);\n } else {\n console.error('[ProDoc] save failed:', data.error);\n }\n } catch (e) {\n console.error('[ProDoc] save error:', e);\n }\n }";
|
|
46
|
+
}
|
|
47
|
+
function h(t, n) {
|
|
48
|
+
let r = t === "view" ? "DocViewer" : "DocEditor", i = `import { ${r} } from '@prodoc/${t === "view" ? "renderer" : "editor"}';`, a = [`import '${f("@echolab/ui-frame")}';`, `import '${e.join(s("@prodoc/renderer"), "dist", "index.css").replace(/\\/g, "/")}'`];
|
|
49
|
+
t === "edit" && a.push(`import '${e.join(s("@prodoc/editor"), "dist", "index.css").replace(/\\/g, "/")}'`);
|
|
50
|
+
let o = ["onDocLink: (p) => { console.log('[ProDoc] navigate to:', p); history.replaceState(null, '', '#' + p); }"];
|
|
51
|
+
return t === "edit" && o.push(`onSave: ${m()}`), `
|
|
52
|
+
import { createApp, h } from 'vue';
|
|
53
|
+
import uiFrame, { ThemeProvider } from '@echolab/ui-frame';
|
|
54
|
+
import { buildDocTree } from '@prodoc/core';
|
|
55
|
+
${i}
|
|
56
|
+
${a.join("\n")};
|
|
57
|
+
|
|
58
|
+
const files = ${JSON.stringify(n)};
|
|
59
|
+
const docTree = buildDocTree(files);
|
|
60
|
+
const initialPath = window.location.hash ? window.location.hash.slice(1) : undefined;
|
|
61
|
+
|
|
62
|
+
const app = createApp({
|
|
63
|
+
render() {
|
|
64
|
+
return h('div', { style: { height: '100vh', width: '100vw' } }, [
|
|
65
|
+
h(ThemeProvider, { defaultTheme: 'auto', storageKey: 'prodoc-theme', followSystem: true }, {
|
|
66
|
+
default: () => h(${r}, {
|
|
67
|
+
root: docTree,
|
|
68
|
+
initialPath,
|
|
69
|
+
${o.join(",\n ")},
|
|
70
|
+
}),
|
|
71
|
+
}),
|
|
72
|
+
]);
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
app.use(uiFrame);
|
|
77
|
+
app.mount('#app');
|
|
78
|
+
`;
|
|
79
|
+
}
|
|
80
|
+
async function g(i, a, o = {}) {
|
|
81
|
+
let s = o.port ?? c;
|
|
82
|
+
console.log(`📂 Loading documents from: ${e.resolve(a)}`);
|
|
83
|
+
let f = await d(a), m = Object.keys(f).length;
|
|
84
|
+
if (m === 0) throw Error(`No .md files found in: ${a}`);
|
|
85
|
+
console.log(`✅ Loaded ${m} document(s)`);
|
|
86
|
+
let g = await n({
|
|
87
|
+
root: process.cwd(),
|
|
88
|
+
configFile: !1,
|
|
89
|
+
server: {
|
|
90
|
+
port: s,
|
|
91
|
+
open: o.open ?? !0,
|
|
92
|
+
host: !0
|
|
93
|
+
},
|
|
94
|
+
resolve: { alias: [
|
|
95
|
+
{
|
|
96
|
+
find: "@prodoc/core",
|
|
97
|
+
replacement: p("@prodoc/core")
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
find: "@prodoc/renderer",
|
|
101
|
+
replacement: p("@prodoc/renderer")
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
find: "@prodoc/editor",
|
|
105
|
+
replacement: p("@prodoc/editor")
|
|
106
|
+
}
|
|
107
|
+
] },
|
|
108
|
+
optimizeDeps: { include: ["marked"] },
|
|
109
|
+
plugins: [
|
|
110
|
+
r(),
|
|
111
|
+
{
|
|
112
|
+
name: "prodoc-html",
|
|
113
|
+
configureServer(e) {
|
|
114
|
+
e.middlewares.use((e, t, n) => {
|
|
115
|
+
if (e.url === "/" || e.url === "/index.html") {
|
|
116
|
+
t.setHeader("content-type", "text/html; charset=utf-8"), t.end(u);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
n();
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: "prodoc-entry",
|
|
125
|
+
enforce: "pre",
|
|
126
|
+
resolveId(e) {
|
|
127
|
+
if (e === "/@prodoc/entry") return "\0prodoc-entry";
|
|
128
|
+
},
|
|
129
|
+
load(e) {
|
|
130
|
+
if (e === "\0prodoc-entry") return h(i, f);
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
...i === "edit" ? [{
|
|
134
|
+
name: "prodoc-save-api",
|
|
135
|
+
configureServer(n) {
|
|
136
|
+
n.middlewares.use(async (n, r, i) => {
|
|
137
|
+
if (n.url === "/__prodoc_api/save" && n.method === "POST") {
|
|
138
|
+
try {
|
|
139
|
+
let i = "", o = 0;
|
|
140
|
+
n.on("data", (e) => {
|
|
141
|
+
if (o += e.length, o > l) {
|
|
142
|
+
r.statusCode = 413, r.setHeader("content-type", "application/json"), r.end(JSON.stringify({
|
|
143
|
+
success: !1,
|
|
144
|
+
error: "Payload Too Large"
|
|
145
|
+
}));
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
i += e.toString();
|
|
149
|
+
}), n.on("end", async () => {
|
|
150
|
+
try {
|
|
151
|
+
let { path: n, content: o } = JSON.parse(i), s = e.resolve(a, n), c = e.resolve(a) + e.sep;
|
|
152
|
+
if (!e.resolve(s).startsWith(c)) {
|
|
153
|
+
r.statusCode = 403, r.setHeader("content-type", "application/json"), r.end(JSON.stringify({
|
|
154
|
+
success: !1,
|
|
155
|
+
error: "Forbidden: path outside doc root"
|
|
156
|
+
}));
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
await t.writeFile(s, o, "utf-8"), r.setHeader("content-type", "application/json"), r.end(JSON.stringify({ success: !0 }));
|
|
160
|
+
} catch (e) {
|
|
161
|
+
r.statusCode = 500, r.setHeader("content-type", "application/json"), r.end(JSON.stringify({
|
|
162
|
+
success: !1,
|
|
163
|
+
error: e.message
|
|
164
|
+
}));
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
} catch (e) {
|
|
168
|
+
r.statusCode = 500, r.setHeader("content-type", "application/json"), r.end(JSON.stringify({
|
|
169
|
+
success: !1,
|
|
170
|
+
error: e.message
|
|
171
|
+
}));
|
|
172
|
+
}
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
i();
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}] : []
|
|
179
|
+
]
|
|
180
|
+
});
|
|
181
|
+
await g.listen();
|
|
182
|
+
let _ = g.resolvedUrls ?? {
|
|
183
|
+
local: [],
|
|
184
|
+
network: []
|
|
185
|
+
}, v = _.local[0] ?? `http://localhost:${s}`;
|
|
186
|
+
return console.log("\n🚀 Echo-ProDoc server is running!\n"), console.log(` Mode: ${i === "view" ? "👁 View" : "✏️ Edit"}`), console.log(` Docs: ${e.resolve(a)}`), console.log(` Local: ${v}`), _.network.length > 0 && console.log(` Network: ${_.network[0]}`), console.log(""), i === "edit" && console.log(" Press Ctrl+S in the editor to save changes.\n"), g;
|
|
187
|
+
}
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region src/index.ts
|
|
190
|
+
var _ = "echo-prodoc", v = "0.1.0";
|
|
191
|
+
function y() {
|
|
192
|
+
console.log(`
|
|
193
|
+
${_} v${v}
|
|
194
|
+
|
|
195
|
+
Usage:
|
|
196
|
+
${_} view <document-path> Start a rendering server for the document directory
|
|
197
|
+
${_} edit <document-path> Start an editing server for the document directory
|
|
198
|
+
${_} --help Show this help message
|
|
199
|
+
${_} --version Show version
|
|
200
|
+
|
|
201
|
+
Options:
|
|
202
|
+
--port, -p <number> Server port (default: 3344)
|
|
203
|
+
--no-open Do not open browser automatically
|
|
204
|
+
|
|
205
|
+
Examples:
|
|
206
|
+
${_} view ./docs
|
|
207
|
+
${_} edit ./docs --port 8080
|
|
208
|
+
`);
|
|
209
|
+
}
|
|
210
|
+
function b(e) {
|
|
211
|
+
let t = e.slice(2), n = {
|
|
212
|
+
open: !0,
|
|
213
|
+
help: !1,
|
|
214
|
+
version: !1
|
|
215
|
+
};
|
|
216
|
+
for (let e = 0; e < t.length; e++) {
|
|
217
|
+
let r = t[e];
|
|
218
|
+
r === "--help" || r === "-h" ? n.help = !0 : r === "--version" || r === "-v" ? n.version = !0 : r === "--port" || r === "-p" ? ((e + 1 >= t.length || isNaN(parseInt(t[e + 1], 10))) && (console.error("Error: --port requires a valid number"), process.exit(1)), n.port = parseInt(t[++e], 10)) : r === "--no-open" ? n.open = !1 : r.startsWith("-") || (n.command ? n.docPath ||= r : r === "view" || r === "edit" ? n.command = r : (console.error(`Unknown command: ${r}`), process.exit(1)));
|
|
219
|
+
}
|
|
220
|
+
return n;
|
|
221
|
+
}
|
|
222
|
+
async function x(n) {
|
|
223
|
+
let r = e.resolve(n);
|
|
224
|
+
try {
|
|
225
|
+
if (!(await t.stat(r)).isDirectory()) throw Error(`Path is not a directory: ${r}`);
|
|
226
|
+
} catch (e) {
|
|
227
|
+
throw e.code === "ENOENT" ? Error(`Directory not found: ${r}`) : e;
|
|
228
|
+
}
|
|
229
|
+
return r;
|
|
230
|
+
}
|
|
231
|
+
async function S() {
|
|
232
|
+
let e = b(process.argv);
|
|
233
|
+
e.help && (y(), process.exit(0)), e.version && (console.log(`${_} v${v}`), process.exit(0)), e.command || (console.error("Error: No command specified. Use \"view\" or \"edit\"."), console.error(`\nRun "${_} --help" for usage information.`), process.exit(1)), e.docPath || (console.error("Error: No document path specified."), console.error(`\nRun "${_} --help" for usage information.`), process.exit(1));
|
|
234
|
+
try {
|
|
235
|
+
let t = await x(e.docPath), n = await g(e.command, t, {
|
|
236
|
+
port: e.port,
|
|
237
|
+
open: e.open
|
|
238
|
+
}), r = () => {
|
|
239
|
+
console.log("\n👋 Shutting down..."), n.close().then(() => {
|
|
240
|
+
process.exit(0);
|
|
241
|
+
});
|
|
242
|
+
};
|
|
243
|
+
process.on("SIGINT", r), process.on("SIGTERM", r);
|
|
244
|
+
} catch (e) {
|
|
245
|
+
console.error(`\n❌ Error: ${e.message}\n`), process.exit(1);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
S();
|
|
249
|
+
//#endregion
|
|
250
|
+
|
|
251
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/server.ts","../src/index.ts"],"sourcesContent":["/**\n * ProDoc CLI 服务器启动逻辑\n *\n * 使用 Vite 的 createServer API 启动一个本地开发服务器,\n * 通过虚拟模块注入文档内容和运行模式,实现零文件系统依赖。\n */\n\nimport { createServer, type ViteDevServer } from 'vite';\nimport vue from '@vitejs/plugin-vue';\nimport fs from 'fs/promises';\nimport path from 'path';\nimport { createRequire } from 'module';\nimport fsSync from 'fs';\n\nconst require = createRequire(import.meta.url);\n\n/** 解析 npm 包的根目录 */\nfunction resolvePkgDir(pkgName: string): string {\n try {\n const pkgJsonPath = require.resolve(`${pkgName}/package.json`);\n return path.dirname(pkgJsonPath);\n } catch {\n // fallback: 从入口文件路径向上回溯找到包含 package.json 的目录\n const entryPath = require.resolve(pkgName);\n let dir = path.dirname(entryPath);\n while (dir !== path.dirname(dir)) {\n if (fsSync.existsSync(path.join(dir, 'package.json'))) {\n return dir;\n }\n dir = path.dirname(dir);\n }\n throw new Error(`Cannot find package directory for ${pkgName}`);\n }\n}\n\n/** 默认服务器端口 */\nconst DEFAULT_PORT = 3344;\nconst MAX_SAVE_BODY_SIZE = 10 * 1024 * 1024; // 10 MB\n\n/** HTML 入口模板 — 完全内联,无需文件系统 */\nconst INDEX_HTML = `<!DOCTYPE html>\n<html lang=\"zh-CN\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <title>ProDoc</title>\n <style>\n html, body {\n margin: 0;\n padding: 0;\n height: 100%;\n background: var(--nm-bg-color, #e0e0e0);\n }\n </style>\n </head>\n <body>\n <div id=\"app\"></div>\n <script type=\"module\" src=\"/@prodoc/entry\"></script>\n </body>\n</html>`;\n\n/** 加载目录中的所有 Markdown 文件 */\nasync function loadMarkdownFiles(dir: string): Promise<Record<string, string>> {\n const files: Record<string, string> = {};\n\n async function walk(currentDir: string, relativePrefix = '') {\n const entries = await fs.readdir(currentDir, { withFileTypes: true });\n for (const entry of entries) {\n const relativePath = relativePrefix ? `${relativePrefix}/${entry.name}` : entry.name;\n const fullPath = path.join(currentDir, entry.name);\n\n if (entry.isDirectory()) {\n await walk(fullPath, relativePath);\n } else if (entry.name.endsWith('.md')) {\n files[relativePath] = await fs.readFile(fullPath, 'utf-8');\n }\n }\n }\n\n await walk(dir);\n return files;\n}\n\n/** 解析 CSS 文件的绝对路径(替换反斜杠为正斜杠) */\nfunction resolveCssPath(pkgName: string): string {\n const cssPath = path.join(resolvePkgDir(pkgName), 'dist', 'style.css').replace(/\\\\/g, '/');\n if (!fsSync.existsSync(cssPath)) {\n throw new Error(`CSS file not found for ${pkgName}: ${cssPath}. Please run \"npm run build:ui-frame\" first.`);\n }\n return cssPath;\n}\n\n/** 解析 ProDoc workspace 包的入口文件 */\nfunction resolveProDocEntry(pkgName: string): string {\n const pkgDir = resolvePkgDir(pkgName);\n // 开发模式可通过 PRODOC_DEV=1 使用源码,默认使用构建产物以确保发布包可用\n const devSrc = path.join(pkgDir, 'src', 'index.ts');\n const distEntry = path.join(pkgDir, 'dist', 'index.js');\n if (process.env.PRODOC_DEV === '1' && fsSync.existsSync(devSrc)) {\n return devSrc.replace(/\\\\/g, '/');\n }\n return distEntry.replace(/\\\\/g, '/');\n}\n\n/** 构建保存处理函数代码 */\nfunction buildSaveHandler(): string {\n return `async (filePath, content) => {\n try {\n const res = await fetch('/__prodoc_api/save', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ path: filePath, content }),\n });\n const data = await res.json();\n if (data.success) {\n console.log('[ProDoc] saved:', filePath);\n } else {\n console.error('[ProDoc] save failed:', data.error);\n }\n } catch (e) {\n console.error('[ProDoc] save error:', e);\n }\n }`;\n}\n\n/** 生成客户端入口代码 */\nfunction generateClientEntry(mode: 'view' | 'edit', files: Record<string, string>): string {\n const componentName = mode === 'view' ? 'DocViewer' : 'DocEditor';\n const componentImport = `import { ${componentName} } from '@prodoc/${mode === 'view' ? 'renderer' : 'editor'}';`;\n\n // 使用绝对路径导入 CSS,避免 Vite alias 对 CSS 解析问题\n const cssImports = [\n `import '${resolveCssPath('@echolab/ui-frame')}';`,\n `import '${path.join(resolvePkgDir('@prodoc/renderer'), 'dist', 'index.css').replace(/\\\\/g, '/')}'`,\n ];\n if (mode === 'edit') {\n cssImports.push(`import '${path.join(resolvePkgDir('@prodoc/editor'), 'dist', 'index.css').replace(/\\\\/g, '/')}'`);\n }\n\n const eventProps = [\n 'onDocLink: (p) => { console.log(\\'[ProDoc] navigate to:\\', p); history.replaceState(null, \\'\\', \\'#\\' + p); }',\n ];\n if (mode === 'edit') {\n eventProps.push(`onSave: ${buildSaveHandler()}`);\n }\n\n return `\nimport { createApp, h } from 'vue';\nimport uiFrame, { ThemeProvider } from '@echolab/ui-frame';\nimport { buildDocTree } from '@prodoc/core';\n${componentImport}\n${cssImports.join('\\n')};\n\nconst files = ${JSON.stringify(files)};\nconst docTree = buildDocTree(files);\nconst initialPath = window.location.hash ? window.location.hash.slice(1) : undefined;\n\nconst app = createApp({\n render() {\n return h('div', { style: { height: '100vh', width: '100vw' } }, [\n h(ThemeProvider, { defaultTheme: 'auto', storageKey: 'prodoc-theme', followSystem: true }, {\n default: () => h(${componentName}, {\n root: docTree,\n initialPath,\n ${eventProps.join(',\\n ')},\n }),\n }),\n ]);\n },\n});\n\napp.use(uiFrame);\napp.mount('#app');\n`;\n}\n\n/** 启动 ProDoc 服务器 */\nexport async function startProDocServer(\n mode: 'view' | 'edit',\n docRoot: string,\n options: { port?: number; open?: boolean } = {}\n): Promise<ViteDevServer> {\n const port = options.port ?? DEFAULT_PORT;\n\n // 1. 加载文档文件\n console.log(`📂 Loading documents from: ${path.resolve(docRoot)}`);\n const files = await loadMarkdownFiles(docRoot);\n const fileCount = Object.keys(files).length;\n if (fileCount === 0) {\n throw new Error(`No .md files found in: ${docRoot}`);\n }\n console.log(`✅ Loaded ${fileCount} document(s)`);\n\n // 2. 创建 Vite 服务器\n const server = await createServer({\n root: process.cwd(),\n configFile: false,\n server: {\n port,\n open: options.open ?? true,\n host: true,\n },\n resolve: {\n alias: [\n { find: '@prodoc/core', replacement: resolveProDocEntry('@prodoc/core') },\n { find: '@prodoc/renderer', replacement: resolveProDocEntry('@prodoc/renderer') },\n { find: '@prodoc/editor', replacement: resolveProDocEntry('@prodoc/editor') },\n ],\n },\n optimizeDeps: {\n include: ['marked'],\n },\n plugins: [\n vue(),\n\n // 插件:提供 HTML 入口\n {\n name: 'prodoc-html',\n configureServer(s) {\n s.middlewares.use((req, res, next) => {\n if (req.url === '/' || req.url === '/index.html') {\n res.setHeader('content-type', 'text/html; charset=utf-8');\n res.end(INDEX_HTML);\n return;\n }\n next();\n });\n },\n },\n\n // 插件:提供客户端入口代码\n {\n name: 'prodoc-entry',\n enforce: 'pre',\n resolveId(id) {\n if (id === '/@prodoc/entry') return '\\0prodoc-entry';\n },\n load(id) {\n if (id === '\\0prodoc-entry') {\n return generateClientEntry(mode, files);\n }\n },\n },\n\n // 插件:edit 模式下提供保存 API\n ...(mode === 'edit'\n ? [\n {\n name: 'prodoc-save-api',\n configureServer(s: ViteDevServer) {\n s.middlewares.use(async (req, res, next) => {\n if (req.url === '/__prodoc_api/save' && req.method === 'POST') {\n try {\n let body = '';\n let bodySize = 0;\n req.on('data', (chunk: Buffer) => {\n bodySize += chunk.length;\n if (bodySize > MAX_SAVE_BODY_SIZE) {\n res.statusCode = 413;\n res.setHeader('content-type', 'application/json');\n res.end(JSON.stringify({ success: false, error: 'Payload Too Large' }));\n return;\n }\n body += chunk.toString();\n });\n req.on('end', async () => {\n try {\n const { path: filePath, content } = JSON.parse(body);\n const fullPath = path.resolve(docRoot, filePath);\n // 安全检查:确保文件在 docRoot 内\n const resolvedDocRoot = path.resolve(docRoot) + path.sep;\n const resolvedTarget = path.resolve(fullPath);\n if (!resolvedTarget.startsWith(resolvedDocRoot)) {\n res.statusCode = 403;\n res.setHeader('content-type', 'application/json');\n res.end(JSON.stringify({ success: false, error: 'Forbidden: path outside doc root' }));\n return;\n }\n await fs.writeFile(fullPath, content, 'utf-8');\n res.setHeader('content-type', 'application/json');\n res.end(JSON.stringify({ success: true }));\n } catch (err: any) {\n res.statusCode = 500;\n res.setHeader('content-type', 'application/json');\n res.end(JSON.stringify({ success: false, error: err.message }));\n }\n });\n } catch (err: any) {\n res.statusCode = 500;\n res.setHeader('content-type', 'application/json');\n res.end(JSON.stringify({ success: false, error: err.message }));\n }\n return;\n }\n next();\n });\n },\n } as any,\n ]\n : []),\n ],\n });\n\n // 3. 启动服务器\n await server.listen();\n\n const addresses = server.resolvedUrls ?? { local: [], network: [] };\n const localUrl = addresses.local[0] ?? `http://localhost:${port}`;\n\n console.log('\\n🚀 Echo-ProDoc server is running!\\n');\n console.log(` Mode: ${mode === 'view' ? '👁 View' : '✏️ Edit'}`);\n console.log(` Docs: ${path.resolve(docRoot)}`);\n console.log(` Local: ${localUrl}`);\n if (addresses.network.length > 0) {\n console.log(` Network: ${addresses.network[0]}`);\n }\n console.log('');\n\n if (mode === 'edit') {\n console.log(' Press Ctrl+S in the editor to save changes.\\n');\n }\n\n return server;\n}\n","#!/usr/bin/env node\n/**\n * Echo-ProDoc CLI 入口\n *\n * 命令:\n * echo-prodoc view <document-path> — 启动渲染服务器\n * echo-prodoc edit <document-path> — 启动编辑服务器\n */\n\nimport path from 'path';\nimport fs from 'fs/promises';\nimport { startProDocServer } from './server.js';\n\nconst PKG_NAME = 'echo-prodoc';\nconst PKG_VERSION = '0.1.0';\n\n/** 显示帮助信息 */\nfunction showHelp() {\n console.log(`\n${PKG_NAME} v${PKG_VERSION}\n\nUsage:\n ${PKG_NAME} view <document-path> Start a rendering server for the document directory\n ${PKG_NAME} edit <document-path> Start an editing server for the document directory\n ${PKG_NAME} --help Show this help message\n ${PKG_NAME} --version Show version\n\nOptions:\n --port, -p <number> Server port (default: 3344)\n --no-open Do not open browser automatically\n\nExamples:\n ${PKG_NAME} view ./docs\n ${PKG_NAME} edit ./docs --port 8080\n`);\n}\n\n/** 解析命令行参数 */\nfunction parseArgs(argv: string[]) {\n const args = argv.slice(2);\n const result: {\n command?: 'view' | 'edit';\n docPath?: string;\n port?: number;\n open: boolean;\n help: boolean;\n version: boolean;\n } = { open: true, help: false, version: false };\n\n for (let i = 0; i < args.length; i++) {\n const arg = args[i];\n\n if (arg === '--help' || arg === '-h') {\n result.help = true;\n } else if (arg === '--version' || arg === '-v') {\n result.version = true;\n } else if (arg === '--port' || arg === '-p') {\n if (i + 1 >= args.length || isNaN(parseInt(args[i + 1], 10))) {\n console.error('Error: --port requires a valid number');\n process.exit(1);\n }\n result.port = parseInt(args[++i], 10);\n } else if (arg === '--no-open') {\n result.open = false;\n } else if (!arg.startsWith('-')) {\n if (!result.command) {\n if (arg === 'view' || arg === 'edit') {\n result.command = arg;\n } else {\n console.error(`Unknown command: ${arg}`);\n process.exit(1);\n }\n } else if (!result.docPath) {\n result.docPath = arg;\n }\n }\n }\n\n return result;\n}\n\n/** 验证文档路径 */\nasync function validateDocPath(docPath: string): Promise<string> {\n const resolved = path.resolve(docPath);\n try {\n const stat = await fs.stat(resolved);\n if (!stat.isDirectory()) {\n throw new Error(`Path is not a directory: ${resolved}`);\n }\n } catch (err: any) {\n if (err.code === 'ENOENT') {\n throw new Error(`Directory not found: ${resolved}`);\n }\n throw err;\n }\n return resolved;\n}\n\n/** 主入口 */\nasync function main() {\n const args = parseArgs(process.argv);\n\n if (args.help) {\n showHelp();\n process.exit(0);\n }\n\n if (args.version) {\n console.log(`${PKG_NAME} v${PKG_VERSION}`);\n process.exit(0);\n }\n\n if (!args.command) {\n console.error('Error: No command specified. Use \"view\" or \"edit\".');\n console.error(`\\nRun \"${PKG_NAME} --help\" for usage information.`);\n process.exit(1);\n }\n\n if (!args.docPath) {\n console.error('Error: No document path specified.');\n console.error(`\\nRun \"${PKG_NAME} --help\" for usage information.`);\n process.exit(1);\n }\n\n try {\n const docRoot = await validateDocPath(args.docPath);\n const server = await startProDocServer(args.command, docRoot, {\n port: args.port,\n open: args.open,\n });\n\n // 优雅退出\n const shutdown = () => {\n console.log('\\n👋 Shutting down...');\n server.close().then(() => {\n process.exit(0);\n });\n };\n\n process.on('SIGINT', shutdown);\n process.on('SIGTERM', shutdown);\n } catch (err: any) {\n console.error(`\\n❌ Error: ${err.message}\\n`);\n process.exit(1);\n }\n}\n\nmain();\n"],"mappings":";;;;;;;;AAcA,IAAM,IAAU,EAAc,OAAO,KAAK,GAAG;AAG7C,SAAS,EAAc,GAAyB;CAC9C,IAAI;EACF,IAAM,IAAc,EAAQ,QAAQ,GAAG,EAAQ,cAAc;EAC7D,OAAO,EAAK,QAAQ,CAAW;CACjC,QAAQ;EAEN,IAAM,IAAY,EAAQ,QAAQ,CAAO,GACrC,IAAM,EAAK,QAAQ,CAAS;EAChC,OAAO,MAAQ,EAAK,QAAQ,CAAG,IAAG;GAChC,IAAI,EAAO,WAAW,EAAK,KAAK,GAAK,cAAc,CAAC,GAClD,OAAO;GAET,IAAM,EAAK,QAAQ,CAAG;EACxB;EACA,MAAU,MAAM,qCAAqC,GAAS;CAChE;AACF;AAGA,IAAM,IAAe,MACf,IAAqB,KAAK,OAAO,MAGjC,IAAa;AAsBnB,eAAe,EAAkB,GAA8C;CAC7E,IAAM,IAAgC,CAAC;CAEvC,eAAe,EAAK,GAAoB,IAAiB,IAAI;EAC3D,IAAM,IAAU,MAAM,EAAG,QAAQ,GAAY,EAAE,eAAe,GAAK,CAAC;EACpE,KAAK,IAAM,KAAS,GAAS;GAC3B,IAAM,IAAe,IAAiB,GAAG,EAAe,GAAG,EAAM,SAAS,EAAM,MAC1E,IAAW,EAAK,KAAK,GAAY,EAAM,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EAGA,AADA,QAAQ,GAAG,UAAU,CAAQ,GAC7B,QAAQ,GAAG,WAAW,CAAQ;CAChC,SAAS,GAAU;EAEjB,AADA,QAAQ,MAAM,cAAc,EAAI,QAAQ,GAAG,GAC3C,QAAQ,KAAK,CAAC;CAChB;AACF;AAEA,EAAK"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProDoc CLI 服务器启动逻辑
|
|
3
|
+
*
|
|
4
|
+
* 使用 Vite 的 createServer API 启动一个本地开发服务器,
|
|
5
|
+
* 通过虚拟模块注入文档内容和运行模式,实现零文件系统依赖。
|
|
6
|
+
*/
|
|
7
|
+
import { type ViteDevServer } from 'vite';
|
|
8
|
+
/** 启动 ProDoc 服务器 */
|
|
9
|
+
export declare function startProDocServer(mode: 'view' | 'edit', docRoot: string, options?: {
|
|
10
|
+
port?: number;
|
|
11
|
+
open?: boolean;
|
|
12
|
+
}): Promise<ViteDevServer>;
|
|
13
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAgB,KAAK,aAAa,EAAE,MAAM,MAAM,CAAC;AAyKxD,oBAAoB;AACpB,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,GAAG,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAC9C,OAAO,CAAC,aAAa,CAAC,CA8IxB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@prodoc/cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "ProDoc CLI - 命令行工具",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"bin": {
|
|
10
|
+
"echo-prodoc": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./package.json": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "vite build && tsc --emitDeclarationOnly && chmod +x dist/index.js",
|
|
24
|
+
"type-check": "tsc --noEmit",
|
|
25
|
+
"clean": "rm -rf dist"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@prodoc/core": "file:../prodoc-core",
|
|
29
|
+
"@prodoc/editor": "file:../prodoc-editor",
|
|
30
|
+
"@prodoc/renderer": "file:../prodoc-renderer",
|
|
31
|
+
"@vitejs/plugin-vue": "^6.0.7",
|
|
32
|
+
"vite": "^8.0.16",
|
|
33
|
+
"vue": "^3.4.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/node": "^22.0.0",
|
|
37
|
+
"typescript": "^5.7.0"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@echolab/ui-frame/doc");Object.defineProperty(exports,"buildDocTree",{enumerable:!0,get:function(){return e.buildDocTree}}),Object.defineProperty(exports,"createDocTree",{enumerable:!0,get:function(){return e.createDocTree}}),Object.defineProperty(exports,"createNode",{enumerable:!0,get:function(){return e.createNode}}),Object.defineProperty(exports,"extractTitle",{enumerable:!0,get:function(){return e.extractTitle}}),Object.defineProperty(exports,"flattenDocTree",{enumerable:!0,get:function(){return e.flattenDocTree}}),Object.defineProperty(exports,"getAncestors",{enumerable:!0,get:function(){return e.getAncestors}}),Object.defineProperty(exports,"getNodeIcon",{enumerable:!0,get:function(){return e.getNodeIcon}}),Object.defineProperty(exports,"nodeToTreeData",{enumerable:!0,get:function(){return e.nodeToTreeData}}),Object.defineProperty(exports,"parseFrontmatter",{enumerable:!0,get:function(){return e.parseFrontmatter}}),Object.defineProperty(exports,"pathToId",{enumerable:!0,get:function(){return e.pathToId}});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProDoc Core - 文档解析与数据模型
|
|
3
|
+
*
|
|
4
|
+
* 所有实现来自 @echolab/ui-frame/doc,此处只做重新导出。
|
|
5
|
+
* 不维护独立的实现副本,确保行为与 ui-frame 完全一致。
|
|
6
|
+
*/
|
|
7
|
+
export type { ProDocNode, DocTree, ProDocOptions, } from '@echolab/ui-frame/doc';
|
|
8
|
+
export { parseFrontmatter, pathToId, extractTitle, createNode, buildDocTree, } from '@echolab/ui-frame/doc';
|
|
9
|
+
export { createDocTree, flattenDocTree, getAncestors, } from '@echolab/ui-frame/doc';
|
|
10
|
+
export { getNodeIcon, nodeToTreeData, } from '@echolab/ui-frame/doc';
|
|
11
|
+
export type { DocTreeNode } from '@echolab/ui-frame/doc';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACV,UAAU,EACV,OAAO,EACP,aAAa,GACd,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,YAAY,GACb,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EACL,aAAa,EACb,cAAc,EACd,YAAY,GACb,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EACL,WAAW,EACX,cAAc,GACf,MAAM,uBAAuB,CAAA;AAC9B,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { buildDocTree as e, createDocTree as t, createNode as n, extractTitle as r, flattenDocTree as i, getAncestors as a, getNodeIcon as o, nodeToTreeData as s, parseFrontmatter as c, pathToId as l } from "@echolab/ui-frame/doc";
|
|
2
|
+
export { e as buildDocTree, t as createDocTree, n as createNode, r as extractTitle, i as flattenDocTree, a as getAncestors, o as getNodeIcon, s as nodeToTreeData, c as parseFrontmatter, l as pathToId };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@prodoc/core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "ProDoc 核心库 - 文档解析与数据模型",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "vite build && tsc --emitDeclarationOnly",
|
|
22
|
+
"type-check": "tsc --noEmit",
|
|
23
|
+
"clean": "rm -rf dist"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@echolab/ui-frame": "file:../../vendor/@echolab/ui-frame",
|
|
27
|
+
"typescript": "^5.7.0",
|
|
28
|
+
"vite": "^8.0.16"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@echolab/ui-frame/doc");require("@echolab/ui-frame/dist/style.css"),Object.defineProperty(exports,"DocEditor",{enumerable:!0,get:function(){return e.DocEditor}}),Object.defineProperty(exports,"MarkdownEditor",{enumerable:!0,get:function(){return e.MarkdownEditor}});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.neumorphism-doc-editor,.neumorphism-markdown-editor,.neumorphism-editor-toolbar,.neumorphism-editor-panels,.neumorphism-editor-panel,.edit-card,.preview-card,.neumorphism-editor-textarea{transition:background-color var(--nm-transition-slow), color var(--nm-transition-slow), border-color var(--nm-transition-slow)}.neumorphism-doc-editor .nm-layout__content::-webkit-scrollbar{width:5px}.neumorphism-editor-textarea::-webkit-scrollbar{width:5px}.neumorphism-doc-editor .nm-layout__content::-webkit-scrollbar-track{background:0 0}.neumorphism-editor-textarea::-webkit-scrollbar-track{background:0 0}.neumorphism-doc-editor .nm-layout__content::-webkit-scrollbar-thumb{background:color-mix(in srgb, var(--nm-text-placeholder) 25%, transparent);border-radius:3px}.neumorphism-editor-textarea::-webkit-scrollbar-thumb{background:color-mix(in srgb, var(--nm-text-placeholder) 25%, transparent);border-radius:3px}.neumorphism-doc-editor .nm-layout__content::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb, var(--nm-text-secondary) 40%, transparent)}.neumorphism-editor-textarea::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb, var(--nm-text-secondary) 40%, transparent)}
|
|
2
|
+
/*$vite$:1*/
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProDoc Editor - Vue 3 编辑器组件库
|
|
3
|
+
*
|
|
4
|
+
* 组件实现来自 @echolab/ui-frame/doc,此处只做重新导出。
|
|
5
|
+
*/
|
|
6
|
+
export { DocEditor, type DocEditorProps } from '@echolab/ui-frame/doc';
|
|
7
|
+
export { MarkdownEditor, type MarkdownEditorProps } from '@echolab/ui-frame/doc';
|
|
8
|
+
import '@echolab/ui-frame/dist/style.css';
|
|
9
|
+
import './styles/index.css';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAGhF,OAAO,kCAAkC,CAAA;AAEzC,OAAO,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@prodoc/editor",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "ProDoc 编辑器 - Vue 3 编辑器组件库",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./style.css": "./dist/index.css",
|
|
16
|
+
"./package.json": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "vite build && vue-tsc --declaration --emitDeclarationOnly",
|
|
23
|
+
"type-check": "vue-tsc --noEmit",
|
|
24
|
+
"clean": "rm -rf dist"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"vue": "^3.4.0"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@prodoc/core": "file:../prodoc-core"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@echolab/ui-frame": "file:../../vendor/@echolab/ui-frame",
|
|
34
|
+
"@vitejs/plugin-vue": "^6.0.7",
|
|
35
|
+
"typescript": "^5.7.0",
|
|
36
|
+
"vite": "^8.0.16",
|
|
37
|
+
"vue": "^3.4.0",
|
|
38
|
+
"vue-tsc": "^2.2.12"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@echolab/ui-frame/doc");require("@echolab/ui-frame/dist/style.css"),Object.defineProperty(exports,"DocViewer",{enumerable:!0,get:function(){return e.DocViewer}}),Object.defineProperty(exports,"MarkdownRenderer",{enumerable:!0,get:function(){return e.MarkdownRenderer}});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
:root{--pd-border-subtle:color-mix(in srgb, var(--nm-text-placeholder) 12%, transparent);--pd-border-medium:color-mix(in srgb, var(--nm-text-placeholder) 15%, transparent);--pd-selection-bg:color-mix(in srgb, var(--nm-primary-color) 30%, transparent);--pd-transition-fast:.2s ease;--pd-transition-medium:.25s ease;--pd-font-mono:"SF Mono", "Cascadia Code", Monaco, "Fira Code", "Cousine", monospace}[data-theme=dark]{--pd-selection-bg:color-mix(in srgb, var(--nm-primary-color) 50%, transparent)}.neumorphism-doc-viewer,.neumorphism-markdown,.neumorphism-toc,.neumorphism-markdown-content,.neumorphism-markdown-content h1,.neumorphism-markdown-content h2,.neumorphism-markdown-content h3,.neumorphism-markdown-content h4,.neumorphism-markdown-content h5,.neumorphism-markdown-content h6,.neumorphism-markdown-content p,.neumorphism-markdown-content a,.neumorphism-markdown-content ul,.neumorphism-markdown-content ol,.neumorphism-markdown-content li,.neumorphism-markdown-content blockquote,.neumorphism-markdown-content table,.neumorphism-markdown-content th,.neumorphism-markdown-content td,.neumorphism-toc-item a,.code-block-wrapper,.code-block-header,.code-copy-btn,.inline-code,.line-num{transition:background-color var(--nm-transition-slow), color var(--nm-transition-slow), border-color var(--nm-transition-slow)}.neumorphism-doc-viewer .nm-layout__content::-webkit-scrollbar{width:5px}.neumorphism-toc::-webkit-scrollbar{width:5px}.neumorphism-doc-viewer .nm-layout__content::-webkit-scrollbar-track{background:0 0}.neumorphism-toc::-webkit-scrollbar-track{background:0 0}.neumorphism-doc-viewer .nm-layout__content::-webkit-scrollbar-thumb{background:color-mix(in srgb, var(--nm-text-placeholder) 25%, transparent);border-radius:3px}.neumorphism-toc::-webkit-scrollbar-thumb{background:color-mix(in srgb, var(--nm-text-placeholder) 25%, transparent);border-radius:3px}.neumorphism-doc-viewer .nm-layout__content::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb, var(--nm-text-secondary) 40%, transparent)}.neumorphism-toc::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb, var(--nm-text-secondary) 40%, transparent)}.neumorphism-doc-viewer .nm-layout__content{scroll-behavior:smooth}.neumorphism-markdown-content ::selection{background-color:var(--pd-selection-bg)}
|
|
2
|
+
/*$vite$:1*/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProDoc Renderer - Vue 3 渲染组件库
|
|
3
|
+
*
|
|
4
|
+
* 组件实现来自 @echolab/ui-frame/doc,此处只做重新导出。
|
|
5
|
+
* 保留 ProDoc 特有的样式定制(主题过渡、滚动条、选中颜色等)。
|
|
6
|
+
*/
|
|
7
|
+
export { DocViewer, type DocViewerProps } from '@echolab/ui-frame/doc';
|
|
8
|
+
export { MarkdownRenderer, type MarkdownRendererProps } from '@echolab/ui-frame/doc';
|
|
9
|
+
import '@echolab/ui-frame/dist/style.css';
|
|
10
|
+
import './styles/index.css';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAGpF,OAAO,kCAAkC,CAAA;AAEzC,OAAO,oBAAoB,CAAA"}
|