@aithe/aithe-ui 26.2.3 → 26.3.2
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 +19 -11
- package/dist/apps/admin/app.js +12 -0
- package/dist/apps/admin/components/admin-app.js +83 -0
- package/dist/apps/admin/components/admin-layout.d.ts +0 -1
- package/dist/apps/admin/components/admin-layout.d.ts.map +1 -1
- package/dist/apps/admin/components/admin-layout.js +250 -0
- package/dist/apps/admin/datahub/auth.js +24 -0
- package/dist/apps/admin/datahub/dashboard.js +16 -0
- package/dist/apps/admin/datahub/index.js +42 -0
- package/dist/apps/admin/datahub/menu.js +16 -0
- package/dist/apps/admin/datahub/mock/auth.js +11 -0
- package/dist/apps/admin/datahub/mock/dashboard.js +10 -0
- package/dist/apps/admin/datahub/mock/menu.js +42 -0
- package/dist/apps/admin/i18n/de-DE.js +37 -0
- package/dist/apps/admin/i18n/en-US.js +37 -0
- package/dist/apps/admin/i18n/es-ES.js +38 -0
- package/dist/apps/admin/i18n/fr-FR.js +37 -0
- package/dist/apps/admin/i18n/index.js +27 -0
- package/dist/apps/admin/i18n/ja-JP.js +38 -0
- package/dist/apps/admin/i18n/ko-KR.js +37 -0
- package/dist/apps/admin/i18n/pt-BR.js +37 -0
- package/dist/apps/admin/i18n/zh-CN.js +37 -0
- package/dist/apps/admin/i18n/zh-HK.js +37 -0
- package/dist/apps/admin/i18n/zh-TW.js +37 -0
- package/dist/apps/admin/pages/dashboard-page.d.ts +1 -0
- package/dist/apps/admin/pages/dashboard-page.d.ts.map +1 -1
- package/dist/apps/admin/pages/dashboard-page.js +199 -0
- package/dist/apps/admin/pages/login-page.js +278 -0
- package/dist/apps/admin/pages/not-found-page.js +57 -0
- package/dist/apps/admin/pages/role-page.js +76 -0
- package/dist/apps/admin/pages/settings-page.js +95 -0
- package/dist/apps/admin/pages/user-page.js +76 -0
- package/dist/apps/admin/router/index.js +43 -0
- package/dist/apps/admin/standalone.js +1 -0
- package/dist/apps/admin/store/auth.js +42 -0
- package/dist/apps/api/app.js +82 -0
- package/dist/apps/api/demo-data.d.ts.map +1 -1
- package/dist/apps/api/demo-data.js +965 -0
- package/dist/apps/api/docs-viewer.js +684 -0
- package/dist/apps/api/i18n/de-DE.d.ts.map +1 -1
- package/dist/apps/api/i18n/de-DE.js +131 -0
- package/dist/apps/api/i18n/en-US.d.ts.map +1 -1
- package/dist/apps/api/i18n/en-US.js +141 -0
- package/dist/apps/api/i18n/es-ES.d.ts.map +1 -1
- package/dist/apps/api/i18n/es-ES.js +131 -0
- package/dist/apps/api/i18n/fr-FR.d.ts.map +1 -1
- package/dist/apps/api/i18n/fr-FR.js +131 -0
- package/dist/apps/api/i18n/index.js +27 -0
- package/dist/apps/api/i18n/ja-JP.d.ts.map +1 -1
- package/dist/apps/api/i18n/ja-JP.js +131 -0
- package/dist/apps/api/i18n/ko-KR.d.ts.map +1 -1
- package/dist/apps/api/i18n/ko-KR.js +131 -0
- package/dist/apps/api/i18n/pt-BR.d.ts.map +1 -1
- package/dist/apps/api/i18n/pt-BR.js +131 -0
- package/dist/apps/api/i18n/zh-CN.d.ts.map +1 -1
- package/dist/apps/api/i18n/zh-CN.js +141 -0
- package/dist/apps/api/i18n/zh-HK.d.ts.map +1 -1
- package/dist/apps/api/i18n/zh-HK.js +131 -0
- package/dist/apps/api/i18n/zh-TW.d.ts.map +1 -1
- package/dist/apps/api/i18n/zh-TW.js +131 -0
- package/dist/apps/api/pages/docs.d.ts.map +1 -1
- package/dist/apps/api/pages/docs.js +369 -0
- package/dist/apps/api/standalone.js +1 -0
- package/dist/apps/demo/app.d.ts.map +1 -1
- package/dist/apps/demo/app.js +275 -0
- package/dist/apps/demo/editor.d.ts.map +1 -1
- package/dist/apps/demo/editor.js +270 -0
- package/dist/apps/demo/helpers.js +7 -0
- package/dist/apps/demo/i18n/de-DE.d.ts.map +1 -1
- package/dist/apps/demo/i18n/de-DE.js +289 -0
- package/dist/apps/demo/i18n/en-US.d.ts.map +1 -1
- package/dist/apps/demo/i18n/en-US.js +301 -0
- package/dist/apps/demo/i18n/es-ES.d.ts.map +1 -1
- package/dist/apps/demo/i18n/es-ES.js +289 -0
- package/dist/apps/demo/i18n/fr-FR.d.ts.map +1 -1
- package/dist/apps/demo/i18n/fr-FR.js +289 -0
- package/dist/apps/demo/i18n/index.js +27 -0
- package/dist/apps/demo/i18n/ja-JP.d.ts.map +1 -1
- package/dist/apps/demo/i18n/ja-JP.js +289 -0
- package/dist/apps/demo/i18n/ko-KR.d.ts.map +1 -1
- package/dist/apps/demo/i18n/ko-KR.js +289 -0
- package/dist/apps/demo/i18n/pt-BR.d.ts.map +1 -1
- package/dist/apps/demo/i18n/pt-BR.js +289 -0
- package/dist/apps/demo/i18n/zh-CN.d.ts.map +1 -1
- package/dist/apps/demo/i18n/zh-CN.js +301 -0
- package/dist/apps/demo/i18n/zh-HK.d.ts.map +1 -1
- package/dist/apps/demo/i18n/zh-HK.js +289 -0
- package/dist/apps/demo/i18n/zh-TW.d.ts.map +1 -1
- package/dist/apps/demo/i18n/zh-TW.js +289 -0
- package/dist/apps/demo/pages/autoform.d.ts.map +1 -1
- package/dist/apps/demo/pages/autoform.js +422 -0
- package/dist/apps/demo/pages/autoview.d.ts +3 -0
- package/dist/apps/demo/pages/autoview.d.ts.map +1 -0
- package/dist/apps/demo/pages/autoview.js +310 -0
- package/dist/apps/demo/pages/basic.js +157 -0
- package/dist/apps/demo/pages/code.js +1088 -0
- package/dist/apps/demo/pages/container.js +42 -0
- package/dist/apps/demo/pages/dashboard.js +159 -0
- package/dist/apps/demo/pages/data.d.ts.map +1 -1
- package/dist/apps/demo/pages/data.js +327 -0
- package/dist/apps/demo/pages/display.d.ts.map +1 -1
- package/dist/apps/demo/pages/display.js +295 -0
- package/dist/apps/demo/pages/feedback.js +94 -0
- package/dist/apps/demo/pages/form.d.ts.map +1 -1
- package/dist/apps/demo/pages/form.js +119 -0
- package/dist/apps/demo/pages/layout.js +74 -0
- package/dist/apps/demo/pages/navigation.js +54 -0
- package/dist/apps/demo/pages/progress.js +42 -0
- package/dist/apps/demo/pages/theme.js +126 -0
- package/dist/apps/demo/standalone.js +1 -0
- package/dist/components/basic/AGENTS.md +1 -0
- package/dist/components/basic/avatar.js +168 -0
- package/dist/components/basic/badge.js +157 -0
- package/dist/components/basic/button-group.js +70 -0
- package/dist/components/basic/button.d.ts +2 -4
- package/dist/components/basic/button.d.ts.map +1 -1
- package/dist/components/basic/button.js +315 -0
- package/dist/components/basic/card.js +186 -0
- package/dist/components/basic/chip.js +103 -0
- package/dist/components/basic/divider.js +127 -0
- package/dist/components/basic/empty.js +72 -0
- package/dist/components/basic/icon.js +129 -0
- package/dist/components/basic/input.d.ts.map +1 -1
- package/dist/components/basic/input.js +314 -0
- package/dist/components/basic/tag.d.ts +7 -2
- package/dist/components/basic/tag.d.ts.map +1 -1
- package/dist/components/basic/tag.js +248 -0
- package/dist/components/basic/textarea.d.ts +0 -1
- package/dist/components/basic/textarea.d.ts.map +1 -1
- package/dist/components/basic/textarea.js +130 -0
- package/dist/components/container/callout.js +108 -0
- package/dist/components/container/details.js +117 -0
- package/dist/components/container/scroller.js +144 -0
- package/dist/components/container/split-panel.js +150 -0
- package/dist/components/data/AGENTS.md +1 -1
- package/dist/components/data/box-table.d.ts +53 -0
- package/dist/components/data/box-table.d.ts.map +1 -0
- package/dist/components/data/box-table.js +220 -0
- package/dist/components/data/dropdown.d.ts +8 -5
- package/dist/components/data/dropdown.d.ts.map +1 -1
- package/dist/components/data/dropdown.js +219 -0
- package/dist/components/data/metrics-group.js +180 -0
- package/dist/components/data/metrics.d.ts +11 -0
- package/dist/components/data/metrics.d.ts.map +1 -1
- package/dist/components/data/metrics.js +309 -0
- package/dist/components/data/pagination.js +119 -0
- package/dist/components/data/tab-pane.d.ts +58 -12
- package/dist/components/data/tab-pane.d.ts.map +1 -1
- package/dist/components/data/tab-pane.js +130 -0
- package/dist/components/data/table-column.d.ts +29 -5
- package/dist/components/data/table-column.d.ts.map +1 -1
- package/dist/components/data/table-column.js +123 -0
- package/dist/components/data/table.d.ts +134 -54
- package/dist/components/data/table.d.ts.map +1 -1
- package/dist/components/data/table.js +1210 -0
- package/dist/components/data/tabs.d.ts +60 -3
- package/dist/components/data/tabs.d.ts.map +1 -1
- package/dist/components/data/tabs.js +416 -0
- package/dist/components/data/timeline-item.js +127 -0
- package/dist/components/data/timeline.js +204 -0
- package/dist/components/data/tree-menu.d.ts +12 -2
- package/dist/components/data/tree-menu.d.ts.map +1 -1
- package/dist/components/data/tree-menu.js +482 -0
- package/dist/components/data/tree.js +269 -0
- package/dist/components/display/AGENTS.md +5 -2
- package/dist/components/display/animated-image.js +98 -0
- package/dist/components/display/autoview.d.ts +139 -0
- package/dist/components/display/autoview.d.ts.map +1 -0
- package/dist/components/display/autoview.js +460 -0
- package/dist/components/display/brief-box.d.ts +42 -0
- package/dist/components/display/brief-box.d.ts.map +1 -0
- package/dist/components/display/brief-box.js +117 -0
- package/dist/components/display/carousel.js +223 -0
- package/dist/components/display/code-editor.d.ts.map +1 -1
- package/dist/components/display/code-editor.js +976 -0
- package/dist/components/display/comparison.js +132 -0
- package/dist/components/display/desc-item.d.ts +48 -0
- package/dist/components/display/desc-item.d.ts.map +1 -0
- package/dist/components/display/desc-item.js +150 -0
- package/dist/components/display/desc.d.ts +68 -0
- package/dist/components/display/desc.d.ts.map +1 -0
- package/dist/components/display/desc.js +405 -0
- package/dist/components/display/detail-box.d.ts +51 -0
- package/dist/components/display/detail-box.d.ts.map +1 -0
- package/dist/components/display/detail-box.js +157 -0
- package/dist/components/display/label.js +166 -0
- package/dist/components/display/markdown-editor.js +319 -0
- package/dist/components/display/markdown.d.ts.map +1 -1
- package/dist/components/display/markdown.js +193 -0
- package/dist/components/display/mini-box.d.ts +31 -0
- package/dist/components/display/mini-box.d.ts.map +1 -0
- package/dist/components/display/mini-box.js +137 -0
- package/dist/components/display/profile.d.ts +18 -0
- package/dist/components/display/profile.d.ts.map +1 -0
- package/dist/components/display/profile.js +164 -0
- package/dist/components/feedback/AGENTS.md +1 -0
- package/dist/components/feedback/alert.js +150 -0
- package/dist/components/feedback/dialog.js +228 -0
- package/dist/components/feedback/drawer.d.ts.map +1 -1
- package/dist/components/feedback/drawer.js +338 -0
- package/dist/components/feedback/loading.js +130 -0
- package/dist/components/feedback/modal.d.ts.map +1 -1
- package/dist/components/feedback/modal.js +303 -0
- package/dist/components/feedback/notification.js +170 -0
- package/dist/components/feedback/popover.d.ts +1 -1
- package/dist/components/feedback/popover.js +124 -0
- package/dist/components/feedback/toast.js +142 -0
- package/dist/components/feedback/tooltip.d.ts +1 -1
- package/dist/components/feedback/tooltip.js +153 -0
- package/dist/components/form/AGENTS.md +4 -0
- package/dist/components/form/autoform-item.d.ts +6 -0
- package/dist/components/form/autoform-item.d.ts.map +1 -1
- package/dist/components/form/autoform-item.js +791 -0
- package/dist/components/form/autoform.d.ts +15 -5
- package/dist/components/form/autoform.d.ts.map +1 -1
- package/dist/components/form/autoform.js +303 -0
- package/dist/components/form/checkbox-group.js +118 -0
- package/dist/components/form/checkbox.js +123 -0
- package/dist/components/form/color-picker.js +148 -0
- package/dist/components/form/combobox.d.ts +4 -0
- package/dist/components/form/combobox.d.ts.map +1 -1
- package/dist/components/form/combobox.js +325 -0
- package/dist/components/form/date-picker.js +123 -0
- package/dist/components/form/form-item.d.ts.map +1 -1
- package/dist/components/form/form-item.js +141 -0
- package/dist/components/form/form.js +94 -0
- package/dist/components/form/radio-group.js +106 -0
- package/dist/components/form/radio.js +110 -0
- package/dist/components/form/rate.js +116 -0
- package/dist/components/form/select.d.ts +5 -1
- package/dist/components/form/select.d.ts.map +1 -1
- package/dist/components/form/select.js +539 -0
- package/dist/components/form/slider.js +134 -0
- package/dist/components/form/switch.js +146 -0
- package/dist/components/form/time-picker.js +92 -0
- package/dist/components/form/transfer.js +273 -0
- package/dist/components/form/upload.js +138 -0
- package/dist/components/framework/body.js +333 -0
- package/dist/components/framework/dashboard-panel.js +519 -0
- package/dist/components/framework/dashboard.d.ts.map +1 -1
- package/dist/components/framework/dashboard.js +1084 -0
- package/dist/components/framework/header.js +237 -0
- package/dist/components/framework/log-panel.js +637 -0
- package/dist/components/framework/page.js +151 -0
- package/dist/components/framework/sidebar.d.ts +4 -10
- package/dist/components/framework/sidebar.d.ts.map +1 -1
- package/dist/components/framework/sidebar.js +477 -0
- package/dist/components/layout/affix.js +137 -0
- package/dist/components/layout/col.js +103 -0
- package/dist/components/layout/collapse-item.js +165 -0
- package/dist/components/layout/collapse.js +108 -0
- package/dist/components/layout/container.js +92 -0
- package/dist/components/layout/flex.js +100 -0
- package/dist/components/layout/row.js +103 -0
- package/dist/components/layout/space.js +85 -0
- package/dist/components/navigation/back-top.js +127 -0
- package/dist/components/navigation/breadcrumb-item.js +108 -0
- package/dist/components/navigation/breadcrumb.js +70 -0
- package/dist/components/navigation/menu-item.js +181 -0
- package/dist/components/navigation/menu.js +126 -0
- package/dist/components/navigation/steps.js +183 -0
- package/dist/components/navigation/sub-menu.d.ts.map +1 -1
- package/dist/components/navigation/sub-menu.js +252 -0
- package/dist/components/progress/progress-bar.js +97 -0
- package/dist/components/progress/progress-ring.js +111 -0
- package/dist/components/progress/skeleton.js +108 -0
- package/dist/components/progress/spinner.js +129 -0
- package/dist/components/theme/locale-switch.js +241 -0
- package/dist/components/theme/shadow-picker.js +233 -0
- package/dist/components/theme/shape-picker.js +232 -0
- package/dist/components/theme/theme-picker.js +236 -0
- package/dist/components/theme/theme-preview.d.ts +1 -2
- package/dist/components/theme/theme-preview.d.ts.map +1 -1
- package/dist/components/theme/theme-preview.js +376 -0
- package/dist/components/theme/theme-switch.d.ts.map +1 -1
- package/dist/components/theme/theme-switch.js +318 -0
- package/dist/components/theme/typo-picker.js +219 -0
- package/dist/core/AGENTS.md +6 -1
- package/dist/core/aithe-element.d.ts +2 -2
- package/dist/core/aithe-element.js +135 -0
- package/dist/core/aithe-widget.js +30 -0
- package/dist/core/anchored-overlay.d.ts +3 -0
- package/dist/core/anchored-overlay.d.ts.map +1 -1
- package/dist/core/anchored-overlay.js +111 -0
- package/dist/core/autoform/autoform.js +79 -0
- package/dist/core/autoform/autoview.d.ts +86 -0
- package/dist/core/autoform/autoview.d.ts.map +1 -0
- package/dist/core/autoform/autoview.js +37 -0
- package/dist/core/autoform/condition.js +170 -0
- package/dist/core/autoform/index.d.ts +2 -0
- package/dist/core/autoform/index.d.ts.map +1 -1
- package/dist/core/autoform/index.js +9 -0
- package/dist/core/autoform/types.js +7 -0
- package/dist/core/datahub/__tests__/force-options.test.d.ts +8 -0
- package/dist/core/datahub/__tests__/force-options.test.d.ts.map +1 -0
- package/dist/core/datahub/__tests__/force-options.test.js +161 -0
- package/dist/core/datahub/config/strategy.d.ts +1 -1
- package/dist/core/datahub/config/strategy.d.ts.map +1 -1
- package/dist/core/datahub/config/strategy.js +50 -0
- package/dist/core/datahub/core/adapter/fetch-adapter.d.ts +1 -1
- package/dist/core/datahub/core/adapter/fetch-adapter.d.ts.map +1 -1
- package/dist/core/datahub/core/adapter/fetch-adapter.js +118 -0
- package/dist/core/datahub/core/adapter/index.js +7 -0
- package/dist/core/datahub/core/adapter/mock-adapter.d.ts +1 -1
- package/dist/core/datahub/core/adapter/mock-adapter.d.ts.map +1 -1
- package/dist/core/datahub/core/adapter/mock-adapter.js +58 -0
- package/dist/core/datahub/core/api-styles.d.ts +1 -1
- package/dist/core/datahub/core/api-styles.d.ts.map +1 -1
- package/dist/core/datahub/core/api-styles.js +136 -0
- package/dist/core/datahub/core/datahub-core.d.ts +53 -3
- package/dist/core/datahub/core/datahub-core.d.ts.map +1 -1
- package/dist/core/datahub/core/datahub-core.js +520 -0
- package/dist/core/datahub/core/index.js +7 -0
- package/dist/core/datahub/index.js +50 -0
- package/dist/core/datahub/types.d.ts +24 -0
- package/dist/core/datahub/types.d.ts.map +1 -1
- package/dist/core/datahub/types.js +31 -0
- package/dist/core/datahub/utils/cache.js +55 -0
- package/dist/core/datahub/utils/common.js +23 -0
- package/dist/core/datahub/utils/dedup.d.ts +1 -1
- package/dist/core/datahub/utils/dedup.d.ts.map +1 -1
- package/dist/core/datahub/utils/dedup.js +52 -0
- package/dist/core/datahub/utils/idempotent.js +61 -0
- package/dist/core/datahub/utils/is-query.js +53 -0
- package/dist/core/datahub/utils/loading.js +78 -0
- package/dist/core/filter/__tests__/index.test.d.ts +2 -0
- package/dist/core/filter/__tests__/index.test.d.ts.map +1 -0
- package/dist/core/filter/__tests__/index.test.js +230 -0
- package/dist/core/filter/builtins.d.ts +60 -0
- package/dist/core/filter/builtins.d.ts.map +1 -0
- package/dist/core/filter/builtins.js +172 -0
- package/dist/core/filter/factory.d.ts +54 -0
- package/dist/core/filter/factory.d.ts.map +1 -0
- package/dist/core/filter/factory.js +96 -0
- package/dist/core/filter/index.d.ts +11 -0
- package/dist/core/filter/index.d.ts.map +1 -0
- package/dist/core/filter/index.js +9 -0
- package/dist/core/filter/types.d.ts +12 -0
- package/dist/core/filter/types.d.ts.map +1 -0
- package/dist/core/filter/types.js +1 -0
- package/dist/core/floating.js +132 -0
- package/dist/core/highlight/index.js +43 -0
- package/dist/core/highlight/lang-bash.js +27 -0
- package/dist/core/highlight/lang-c.js +27 -0
- package/dist/core/highlight/lang-cmake.js +27 -0
- package/dist/core/highlight/lang-cpp.js +27 -0
- package/dist/core/highlight/lang-css.js +24 -0
- package/dist/core/highlight/lang-dart.js +27 -0
- package/dist/core/highlight/lang-dockerfile.js +16 -0
- package/dist/core/highlight/lang-fsharp.js +23 -0
- package/dist/core/highlight/lang-go.js +22 -0
- package/dist/core/highlight/lang-html.js +12 -0
- package/dist/core/highlight/lang-java.js +22 -0
- package/dist/core/highlight/lang-javascript.js +26 -0
- package/dist/core/highlight/lang-json.js +13 -0
- package/dist/core/highlight/lang-jsonline.js +13 -0
- package/dist/core/highlight/lang-jsx.js +30 -0
- package/dist/core/highlight/lang-kotlin.js +27 -0
- package/dist/core/highlight/lang-latex.js +22 -0
- package/dist/core/highlight/lang-lua.js +26 -0
- package/dist/core/highlight/lang-makefile.js +22 -0
- package/dist/core/highlight/lang-markdown.js +18 -0
- package/dist/core/highlight/lang-objectivec.js +24 -0
- package/dist/core/highlight/lang-perl.js +30 -0
- package/dist/core/highlight/lang-powershell.js +23 -0
- package/dist/core/highlight/lang-python.js +27 -0
- package/dist/core/highlight/lang-r.js +21 -0
- package/dist/core/highlight/lang-ruby.js +29 -0
- package/dist/core/highlight/lang-rust.js +24 -0
- package/dist/core/highlight/lang-scala.js +26 -0
- package/dist/core/highlight/lang-sql.js +21 -0
- package/dist/core/highlight/lang-svelte.js +27 -0
- package/dist/core/highlight/lang-swift.js +28 -0
- package/dist/core/highlight/lang-tsx.js +35 -0
- package/dist/core/highlight/lang-typescript.js +31 -0
- package/dist/core/highlight/lang-vue.js +29 -0
- package/dist/core/highlight/lang-wasm.js +22 -0
- package/dist/core/highlight/lang-xml.js +12 -0
- package/dist/core/highlight/lang-yaml.js +14 -0
- package/dist/core/highlight/registry.js +99 -0
- package/dist/core/logger/LoggerCore.js +626 -0
- package/dist/core/logger/index.js +10 -0
- package/dist/core/logger/types.js +29 -0
- package/dist/core/markdown/index.js +20 -0
- package/dist/core/markdown/parser.d.ts +2 -0
- package/dist/core/markdown/parser.d.ts.map +1 -1
- package/dist/core/markdown/parser.js +376 -0
- package/dist/core/markdown/plugins.d.ts +2 -1
- package/dist/core/markdown/plugins.d.ts.map +1 -1
- package/dist/core/markdown/plugins.js +755 -0
- package/dist/core/markdown/types.d.ts +5 -0
- package/dist/core/markdown/types.d.ts.map +1 -1
- package/dist/core/markdown/types.js +7 -0
- package/dist/core/router/index.js +244 -0
- package/dist/core/styles.js +44 -0
- package/dist/core/types.d.ts +52 -3
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3695 -1622
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1844 -758
- package/dist/index.umd.js.map +1 -1
- package/dist/styles/aithe-ui.d.ts +23 -0
- package/dist/styles/aithe-ui.d.ts.map +1 -1
- package/dist/styles/aithe-ui.js +185 -0
- package/dist/styles/global.css.d.ts +1 -1
- package/dist/styles/global.css.d.ts.map +1 -1
- package/dist/styles/global.css.js +119 -0
- package/dist/styles/i18n/index.js +206 -0
- package/dist/styles/i18n/locales/de-DE.d.ts.map +1 -1
- package/dist/styles/i18n/locales/de-DE.js +151 -0
- package/dist/styles/i18n/locales/en-US.d.ts.map +1 -1
- package/dist/styles/i18n/locales/en-US.js +160 -0
- package/dist/styles/i18n/locales/es-ES.d.ts.map +1 -1
- package/dist/styles/i18n/locales/es-ES.js +151 -0
- package/dist/styles/i18n/locales/fr-FR.d.ts.map +1 -1
- package/dist/styles/i18n/locales/fr-FR.js +151 -0
- package/dist/styles/i18n/locales/index.js +14 -0
- package/dist/styles/i18n/locales/ja-JP.d.ts.map +1 -1
- package/dist/styles/i18n/locales/ja-JP.js +151 -0
- package/dist/styles/i18n/locales/ko-KR.d.ts.map +1 -1
- package/dist/styles/i18n/locales/ko-KR.js +151 -0
- package/dist/styles/i18n/locales/pt-BR.d.ts.map +1 -1
- package/dist/styles/i18n/locales/pt-BR.js +151 -0
- package/dist/styles/i18n/locales/zh-CN.d.ts.map +1 -1
- package/dist/styles/i18n/locales/zh-CN.js +160 -0
- package/dist/styles/i18n/locales/zh-HK.d.ts.map +1 -1
- package/dist/styles/i18n/locales/zh-HK.js +151 -0
- package/dist/styles/i18n/locales/zh-TW.d.ts.map +1 -1
- package/dist/styles/i18n/locales/zh-TW.js +151 -0
- package/dist/styles/layout/index.js +88 -0
- package/dist/styles/mixins.js +43 -0
- package/dist/styles/shadow/cyber.js +19 -0
- package/dist/styles/shadow/deep.js +19 -0
- package/dist/styles/shadow/diffuse.js +19 -0
- package/dist/styles/shadow/flat.js +19 -0
- package/dist/styles/shadow/glassmorphism.js +19 -0
- package/dist/styles/shadow/index.js +129 -0
- package/dist/styles/shadow/neumorphism.js +21 -0
- package/dist/styles/shadow/retro.js +19 -0
- package/dist/styles/shadow/sharp-business.js +19 -0
- package/dist/styles/shadow/skeuomorphic.js +21 -0
- package/dist/styles/shape/chamfer.js +19 -0
- package/dist/styles/shape/circle.js +19 -0
- package/dist/styles/shape/index.js +174 -0
- package/dist/styles/shape/organic.js +19 -0
- package/dist/styles/shape/pill.js +19 -0
- package/dist/styles/shape/rounded.js +21 -0
- package/dist/styles/shape/rounder.js +19 -0
- package/dist/styles/shape/sharp.js +19 -0
- package/dist/styles/shape/smooth.js +19 -0
- package/dist/styles/theme/aliyun.d.ts +1 -1
- package/dist/styles/theme/aliyun.d.ts.map +1 -1
- package/dist/styles/theme/aliyun.js +102 -0
- package/dist/styles/theme/amber.d.ts +1 -1
- package/dist/styles/theme/amber.d.ts.map +1 -1
- package/dist/styles/theme/amber.js +101 -0
- package/dist/styles/theme/blue.d.ts +1 -1
- package/dist/styles/theme/blue.d.ts.map +1 -1
- package/dist/styles/theme/blue.js +101 -0
- package/dist/styles/theme/charcoal.d.ts +1 -1
- package/dist/styles/theme/charcoal.d.ts.map +1 -1
- package/dist/styles/theme/charcoal.js +106 -0
- package/dist/styles/theme/cyan.d.ts +1 -1
- package/dist/styles/theme/cyan.d.ts.map +1 -1
- package/dist/styles/theme/cyan.js +96 -0
- package/dist/styles/theme/dark.d.ts +1 -1
- package/dist/styles/theme/dark.d.ts.map +1 -1
- package/dist/styles/theme/dark.js +106 -0
- package/dist/styles/theme/ebony.d.ts +1 -1
- package/dist/styles/theme/ebony.d.ts.map +1 -1
- package/dist/styles/theme/ebony.js +106 -0
- package/dist/styles/theme/festive.d.ts +1 -1
- package/dist/styles/theme/festive.d.ts.map +1 -1
- package/dist/styles/theme/festive.js +101 -0
- package/dist/styles/theme/graphite.d.ts +1 -1
- package/dist/styles/theme/graphite.d.ts.map +1 -1
- package/dist/styles/theme/graphite.js +106 -0
- package/dist/styles/theme/gray.d.ts +1 -1
- package/dist/styles/theme/gray.d.ts.map +1 -1
- package/dist/styles/theme/gray.js +101 -0
- package/dist/styles/theme/huawei.d.ts +1 -1
- package/dist/styles/theme/huawei.d.ts.map +1 -1
- package/dist/styles/theme/huawei.js +102 -0
- package/dist/styles/theme/index.d.ts +1 -1
- package/dist/styles/theme/index.d.ts.map +1 -1
- package/dist/styles/theme/index.js +276 -0
- package/dist/styles/theme/indigo.d.ts +1 -1
- package/dist/styles/theme/indigo.d.ts.map +1 -1
- package/dist/styles/theme/indigo.js +101 -0
- package/dist/styles/theme/ink.d.ts +1 -1
- package/dist/styles/theme/ink.d.ts.map +1 -1
- package/dist/styles/theme/ink.js +106 -0
- package/dist/styles/theme/light.d.ts +1 -1
- package/dist/styles/theme/light.d.ts.map +1 -1
- package/dist/styles/theme/light.js +102 -0
- package/dist/styles/theme/midnight.d.ts +1 -1
- package/dist/styles/theme/midnight.d.ts.map +1 -1
- package/dist/styles/theme/midnight.js +106 -0
- package/dist/styles/theme/navy.d.ts +1 -1
- package/dist/styles/theme/navy.d.ts.map +1 -1
- package/dist/styles/theme/navy.js +106 -0
- package/dist/styles/theme/obsidian.d.ts +1 -1
- package/dist/styles/theme/obsidian.d.ts.map +1 -1
- package/dist/styles/theme/obsidian.js +106 -0
- package/dist/styles/theme/onyx.d.ts +1 -1
- package/dist/styles/theme/onyx.d.ts.map +1 -1
- package/dist/styles/theme/onyx.js +106 -0
- package/dist/styles/theme/orange.d.ts +1 -1
- package/dist/styles/theme/orange.d.ts.map +1 -1
- package/dist/styles/theme/orange.js +101 -0
- package/dist/styles/theme/pink.d.ts +1 -1
- package/dist/styles/theme/pink.d.ts.map +1 -1
- package/dist/styles/theme/pink.js +101 -0
- package/dist/styles/theme/purple.d.ts +1 -1
- package/dist/styles/theme/purple.d.ts.map +1 -1
- package/dist/styles/theme/purple.js +101 -0
- package/dist/styles/theme/raisin.d.ts +1 -1
- package/dist/styles/theme/raisin.d.ts.map +1 -1
- package/dist/styles/theme/raisin.js +106 -0
- package/dist/styles/theme/slate.d.ts +1 -1
- package/dist/styles/theme/slate.d.ts.map +1 -1
- package/dist/styles/theme/slate.js +106 -0
- package/dist/styles/theme/teal.d.ts +1 -1
- package/dist/styles/theme/teal.d.ts.map +1 -1
- package/dist/styles/theme/teal.js +101 -0
- package/dist/styles/theme/tianyi.d.ts +1 -1
- package/dist/styles/theme/tianyi.d.ts.map +1 -1
- package/dist/styles/theme/tianyi.js +102 -0
- package/dist/styles/types.js +1 -0
- package/dist/styles/typo/business.js +34 -0
- package/dist/styles/typo/compact.js +34 -0
- package/dist/styles/typo/index.js +99 -0
- package/dist/styles/typo/luxury.js +34 -0
- package/dist/styles/typo/minimal.js +34 -0
- package/dist/types/index.js +2 -0
- package/dist/utils/dom.js +51 -0
- package/dist/utils/events.js +32 -0
- package/dist/utils/icon.js +176 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/utils.d.ts +5 -5
- package/dist/utils/utils.js +89 -0
- package/dist/utils/validation.js +52 -0
- package/docs/api/basic/button.md +9 -6
- package/docs/api/basic/tag.md +24 -17
- package/docs/api/data/box-table.md +73 -0
- package/docs/api/data/dropdown.md +3 -2
- package/docs/api/data/metrics.md +2 -0
- package/docs/api/data/table-column.md +37 -23
- package/docs/api/data/table.md +158 -44
- package/docs/api/data/tabs.md +46 -1
- package/docs/api/data/tree-menu.md +55 -2
- package/docs/api/display/autoview.md +277 -0
- package/docs/api/display/box.md +66 -0
- package/docs/api/display/brief-box.md +73 -0
- package/docs/api/display/desc-item.md +57 -0
- package/docs/api/display/desc.md +246 -0
- package/docs/api/display/detail-box.md +75 -0
- package/docs/api/display/mini-box.md +100 -0
- package/docs/api/display/profile.md +92 -0
- package/docs/api/feedback/popover.md +10 -10
- package/docs/api/feedback/tooltip.md +14 -14
- package/docs/api/form/autoform-item.md +115 -0
- package/docs/api/form/autoform.md +7 -3
- package/docs/api/form/combobox.md +27 -7
- package/docs/api/form/select.md +50 -28
- package/docs/api/framework/log-panel.md +46 -0
- package/docs/api/framework/sidebar.md +3 -2
- package/docs/api/summary.md +46 -35
- package/docs/api/theme/theme-switch.md +1 -1
- package/docs/autoform.md +14 -33
- package/docs/changelog/CHANGELOG.md +155 -0
- package/docs/changelog/VERSION_26.3.1.md +966 -0
- package/docs/changelog/VERSION_26.3.2.md +852 -0
- package/docs/datahub.md +4 -1
- package/docs/filter.md +332 -0
- package/docs/framework-integration.md +2 -2
- package/docs/guide.md +72 -6
- package/docs/i18n.md +2 -4
- package/docs/issue/26.3.1/issue_26.3.1.0.md +84 -0
- package/docs/issue/26.3.1/issue_26.3.1.1.md +72 -0
- package/docs/issue/26.3.1/issue_26.3.1.2.md +75 -0
- package/docs/issue/26.3.1/issue_26.3.1.3.md +78 -0
- package/docs/issue/26.3.1/issue_26.3.1.4.md +113 -0
- package/docs/issue/26.3.1/issue_26.3.1.5.md +142 -0
- package/docs/issue/26.3.1/issue_26.3.1.6.md +100 -0
- package/docs/issue/26.3.1/issue_26.3.1.7.md +78 -0
- package/docs/issue/26.3.2/issue_26.3.2.1.md +46 -0
- package/docs/issue/26.3.2/issue_26.3.2.2.md +82 -0
- package/docs/issue/26.3.2/issue_26.3.2.3.md +57 -0
- package/docs/issue/26.3.2/issue_26.3.2.4.md +43 -0
- package/docs/issue/AGENTS.md +24 -3
- package/docs/markdown.md +2 -2
- package/docs/quickstart.md +5 -5
- package/docs/theming.md +5 -4
- package/package.json +5 -2
- package/dist/components/navigation/dropdown.d.ts +0 -56
- package/dist/components/navigation/dropdown.d.ts.map +0 -1
- /package/docs/issue/{issue_26.2.2.1.md → 26.2.2/issue_26.2.2.1.md} +0 -0
- /package/docs/issue/{issue_26.2.2.2.md → 26.2.2/issue_26.2.2.2.md} +0 -0
- /package/docs/issue/{issue_26.2.2.3.md → 26.2.2/issue_26.2.2.3.md} +0 -0
- /package/docs/issue/{issue_26.2.2.4.md → 26.2.2/issue_26.2.2.4.md} +0 -0
- /package/docs/issue/{issue_26.2.3.1.md → 26.2.3/issue_26.2.3.1.md} +0 -0
- /package/docs/issue/{issue_26.2.3.10.md → 26.2.3/issue_26.2.3.10.md} +0 -0
- /package/docs/issue/{issue_26.2.3.11.md → 26.2.3/issue_26.2.3.11.md} +0 -0
- /package/docs/issue/{issue_26.2.3.12.md → 26.2.3/issue_26.2.3.12.md} +0 -0
- /package/docs/issue/{issue_26.2.3.13.md → 26.2.3/issue_26.2.3.13.md} +0 -0
- /package/docs/issue/{issue_26.2.3.14.md → 26.2.3/issue_26.2.3.14.md} +0 -0
- /package/docs/issue/{issue_26.2.3.15.md → 26.2.3/issue_26.2.3.15.md} +0 -0
- /package/docs/issue/{issue_26.2.3.16.md → 26.2.3/issue_26.2.3.16.md} +0 -0
- /package/docs/issue/{issue_26.2.3.2.md → 26.2.3/issue_26.2.3.2.md} +0 -0
- /package/docs/issue/{issue_26.2.3.3.md → 26.2.3/issue_26.2.3.3.md} +0 -0
- /package/docs/issue/{issue_26.2.3.4.md → 26.2.3/issue_26.2.3.4.md} +0 -0
- /package/docs/issue/{issue_26.2.3.5.md → 26.2.3/issue_26.2.3.5.md} +0 -0
- /package/docs/issue/{issue_26.2.3.6.md → 26.2.3/issue_26.2.3.6.md} +0 -0
- /package/docs/issue/{issue_26.2.3.7.md → 26.2.3/issue_26.2.3.7.md} +0 -0
- /package/docs/issue/{issue_26.2.3.8.md → 26.2.3/issue_26.2.3.8.md} +0 -0
- /package/docs/issue/{issue_26.2.3.9.md → 26.2.3/issue_26.2.3.9.md} +0 -0
|
@@ -0,0 +1,684 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* API 文档查看器组件
|
|
9
|
+
* API documentation viewer component with sidebar navigation and live demo support.
|
|
10
|
+
*
|
|
11
|
+
* 支持国际化:label 可为字符串或返回字符串的函数,在渲染时动态解析。
|
|
12
|
+
* Supports i18n: labels can be strings or functions returning strings, resolved at render time.
|
|
13
|
+
*/
|
|
14
|
+
import { LitElement, css, html } from 'lit';
|
|
15
|
+
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
16
|
+
import { onAitheLocaleChange, t } from '../../styles/i18n';
|
|
17
|
+
/** 代码块语言别名映射 */
|
|
18
|
+
const LANG_ALIAS = {
|
|
19
|
+
ts: 'typescript',
|
|
20
|
+
js: 'javascript',
|
|
21
|
+
py: 'python',
|
|
22
|
+
rb: 'ruby',
|
|
23
|
+
sh: 'bash',
|
|
24
|
+
yml: 'yaml',
|
|
25
|
+
md: 'markdown',
|
|
26
|
+
html: 'html',
|
|
27
|
+
css: 'css',
|
|
28
|
+
json: 'json',
|
|
29
|
+
xml: 'xml',
|
|
30
|
+
sql: 'sql',
|
|
31
|
+
rs: 'rust',
|
|
32
|
+
go: 'go',
|
|
33
|
+
java: 'java',
|
|
34
|
+
kt: 'kotlin',
|
|
35
|
+
swift: 'swift',
|
|
36
|
+
mjs: 'javascript',
|
|
37
|
+
cjs: 'javascript',
|
|
38
|
+
jsx: 'jsx',
|
|
39
|
+
tsx: 'tsx',
|
|
40
|
+
vue: 'vue',
|
|
41
|
+
svelte: 'svelte',
|
|
42
|
+
wasm: 'wasm',
|
|
43
|
+
dockerfile: 'dockerfile',
|
|
44
|
+
makefile: 'makefile',
|
|
45
|
+
gradle: 'gradle',
|
|
46
|
+
cmake: 'cmake',
|
|
47
|
+
tex: 'latex',
|
|
48
|
+
fs: 'fsharp',
|
|
49
|
+
ps: 'powershell',
|
|
50
|
+
pl: 'perl',
|
|
51
|
+
lua: 'lua',
|
|
52
|
+
scala: 'scala',
|
|
53
|
+
dart: 'dart',
|
|
54
|
+
r: 'r',
|
|
55
|
+
m: 'objectivec',
|
|
56
|
+
mm: 'objectivec',
|
|
57
|
+
h: 'c',
|
|
58
|
+
hpp: 'cpp',
|
|
59
|
+
};
|
|
60
|
+
/** 将 markdown-it 生成的 <pre><code> 替换为 <aithe-code-editor> */
|
|
61
|
+
function transformCodeBlocks(html) {
|
|
62
|
+
return html.replace(/<pre><code class="language-(\w+)">([\s\S]*?)<\/code><\/pre>/g, (_match, lang, code) => {
|
|
63
|
+
const resolved = LANG_ALIAS[lang] || lang;
|
|
64
|
+
const escaped = code
|
|
65
|
+
.replaceAll('&', '&')
|
|
66
|
+
.replaceAll('<', '<')
|
|
67
|
+
.replaceAll('>', '>')
|
|
68
|
+
.replaceAll('"', '"')
|
|
69
|
+
.replaceAll('`', '`')
|
|
70
|
+
.replaceAll('*', '*')
|
|
71
|
+
.replaceAll('_', '_')
|
|
72
|
+
.replaceAll('~', '~')
|
|
73
|
+
.replaceAll('[', '[')
|
|
74
|
+
.replaceAll(']', ']')
|
|
75
|
+
.replaceAll('(', '(')
|
|
76
|
+
.replaceAll(')', ')')
|
|
77
|
+
.replaceAll('!', '!')
|
|
78
|
+
.replaceAll('&', '&')
|
|
79
|
+
.replaceAll('"', '"')
|
|
80
|
+
.replaceAll('<', '<')
|
|
81
|
+
.replaceAll('>', '>')
|
|
82
|
+
.replaceAll('`', '`')
|
|
83
|
+
.replaceAll('*', '*')
|
|
84
|
+
.replaceAll('_', '_')
|
|
85
|
+
.replaceAll('~', '~')
|
|
86
|
+
.replaceAll('[', '[')
|
|
87
|
+
.replaceAll(']', ']')
|
|
88
|
+
.replaceAll('(', '(')
|
|
89
|
+
.replaceAll(')', ')')
|
|
90
|
+
.replaceAll('!', '!');
|
|
91
|
+
return `<aithe-code-editor readonly show-toolbar show-theme language="${resolved}" value="${escaped}" class="md-code-fence"></aithe-code-editor>`;
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
let AitheDocsViewer = class AitheDocsViewer extends LitElement {
|
|
95
|
+
constructor() {
|
|
96
|
+
super(...arguments);
|
|
97
|
+
this.categories = [];
|
|
98
|
+
this.activeCategory = '';
|
|
99
|
+
this.activeEntry = '';
|
|
100
|
+
this.demoSource = '';
|
|
101
|
+
this.demoError = '';
|
|
102
|
+
/** locale 变更版本号,用于触发 Lit 重新渲染 / Locale version counter to trigger Lit re-render */
|
|
103
|
+
this.localeVersion = 0;
|
|
104
|
+
this.handleContentClick = (event) => {
|
|
105
|
+
const target = event.target;
|
|
106
|
+
const anchor = target.closest('a');
|
|
107
|
+
if (!anchor)
|
|
108
|
+
return;
|
|
109
|
+
const href = anchor.getAttribute('href');
|
|
110
|
+
if (!href)
|
|
111
|
+
return;
|
|
112
|
+
if (!href.endsWith('.md'))
|
|
113
|
+
return;
|
|
114
|
+
event.preventDefault();
|
|
115
|
+
const { catDir, filePart } = this.parseMdLink(href);
|
|
116
|
+
if (!catDir)
|
|
117
|
+
return;
|
|
118
|
+
if (this.trySelectGuide(catDir))
|
|
119
|
+
return;
|
|
120
|
+
if (!filePart)
|
|
121
|
+
return;
|
|
122
|
+
this.trySelectComponent(catDir, filePart);
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
static { this.styles = css `
|
|
126
|
+
:host {
|
|
127
|
+
display: block;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.shell {
|
|
131
|
+
display: grid;
|
|
132
|
+
grid-template-columns: 220px 1fr;
|
|
133
|
+
gap: var(--aithe-space-6);
|
|
134
|
+
min-height: 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.sidebar {
|
|
138
|
+
position: sticky;
|
|
139
|
+
top: 0;
|
|
140
|
+
align-self: start;
|
|
141
|
+
padding: var(--aithe-space-4);
|
|
142
|
+
border: 1px solid var(--aithe-color-border);
|
|
143
|
+
border-radius: var(--aithe-container-radius-xl);
|
|
144
|
+
background: var(--aithe-color-surface);
|
|
145
|
+
box-shadow: var(--aithe-shadow-1);
|
|
146
|
+
overflow: auto;
|
|
147
|
+
max-height: calc(100vh - 40px);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.cat-title {
|
|
151
|
+
margin: var(--aithe-space-3) 0 var(--aithe-space-2);
|
|
152
|
+
font-size: var(--aithe-font-size-sm);
|
|
153
|
+
font-weight: var(--aithe-font-weight-bold);
|
|
154
|
+
color: var(--aithe-color-text-muted);
|
|
155
|
+
text-transform: uppercase;
|
|
156
|
+
letter-spacing: 0.06em;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.cat-title:first-child {
|
|
160
|
+
margin-top: 0;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.entry-btn {
|
|
164
|
+
display: block;
|
|
165
|
+
width: 100%;
|
|
166
|
+
padding: var(--aithe-space-2) var(--aithe-space-3);
|
|
167
|
+
border: none;
|
|
168
|
+
border-radius: var(--aithe-radius-md);
|
|
169
|
+
background: transparent;
|
|
170
|
+
color: var(--aithe-color-text);
|
|
171
|
+
font-size: var(--aithe-font-size-sm);
|
|
172
|
+
text-align: left;
|
|
173
|
+
cursor: pointer;
|
|
174
|
+
transition:
|
|
175
|
+
background 0.15s,
|
|
176
|
+
color 0.15s;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.entry-btn:hover {
|
|
180
|
+
background: var(--aithe-color-bg-subtle);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.entry-btn.active {
|
|
184
|
+
background: linear-gradient(180deg, var(--aithe-primary-6), var(--aithe-primary-7));
|
|
185
|
+
color: white;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.content {
|
|
189
|
+
min-width: 0;
|
|
190
|
+
padding: var(--aithe-space-6);
|
|
191
|
+
border: 1px solid var(--aithe-color-border);
|
|
192
|
+
border-radius: var(--aithe-container-radius-xl);
|
|
193
|
+
background: var(--aithe-color-surface-elevated);
|
|
194
|
+
box-shadow: var(--aithe-shadow-1);
|
|
195
|
+
overflow: auto;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.content h1,
|
|
199
|
+
.content h2,
|
|
200
|
+
.content h3,
|
|
201
|
+
.content h4 {
|
|
202
|
+
color: var(--aithe-color-text);
|
|
203
|
+
margin-top: var(--aithe-space-6);
|
|
204
|
+
margin-bottom: var(--aithe-space-3);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.content h1 {
|
|
208
|
+
font-size: var(--aithe-font-size-xl);
|
|
209
|
+
border-bottom: 1px solid var(--aithe-color-border);
|
|
210
|
+
padding-bottom: var(--aithe-space-3);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.content h1:first-child {
|
|
214
|
+
margin-top: 0;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.content h2 {
|
|
218
|
+
font-size: var(--aithe-font-size-lg);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.content h3 {
|
|
222
|
+
font-size: var(--aithe-font-size-md);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.content p,
|
|
226
|
+
.content blockquote {
|
|
227
|
+
color: var(--aithe-color-text);
|
|
228
|
+
line-height: 1.7;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.content blockquote {
|
|
232
|
+
margin: var(--aithe-space-3) 0;
|
|
233
|
+
padding: var(--aithe-space-3) var(--aithe-space-4);
|
|
234
|
+
border-left: 3px solid var(--aithe-primary-6);
|
|
235
|
+
background: var(--aithe-color-bg-subtle);
|
|
236
|
+
border-radius: var(--aithe-container-radius-md);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.content table {
|
|
240
|
+
width: 100%;
|
|
241
|
+
border-collapse: collapse;
|
|
242
|
+
margin: var(--aithe-space-4) 0;
|
|
243
|
+
font-size: var(--aithe-font-size-sm);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.content th,
|
|
247
|
+
.content td {
|
|
248
|
+
padding: var(--aithe-space-2) var(--aithe-space-3);
|
|
249
|
+
border: 1px solid var(--aithe-color-border);
|
|
250
|
+
text-align: left;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.content th {
|
|
254
|
+
background: var(--aithe-color-bg-subtle);
|
|
255
|
+
font-weight: var(--aithe-font-weight-semibold);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.content code {
|
|
259
|
+
padding: 2px 6px;
|
|
260
|
+
border-radius: var(--aithe-container-radius-sm);
|
|
261
|
+
background: var(--aithe-color-bg-subtle);
|
|
262
|
+
font-family: var(--aithe-font-family-mono);
|
|
263
|
+
font-size: 0.9em;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.content pre {
|
|
267
|
+
margin: var(--aithe-space-4) 0;
|
|
268
|
+
padding: var(--aithe-space-4);
|
|
269
|
+
border: 1px solid var(--aithe-color-border);
|
|
270
|
+
border-radius: var(--aithe-container-radius-xl);
|
|
271
|
+
background: #09111f;
|
|
272
|
+
color: #edf4ff;
|
|
273
|
+
overflow-x: auto;
|
|
274
|
+
font-family: var(--aithe-font-family-mono);
|
|
275
|
+
font-size: 13px;
|
|
276
|
+
line-height: 1.6;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.content pre code {
|
|
280
|
+
padding: 0;
|
|
281
|
+
background: transparent;
|
|
282
|
+
color: inherit;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.content a {
|
|
286
|
+
color: var(--aithe-primary-6);
|
|
287
|
+
text-decoration: none;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.content a:hover {
|
|
291
|
+
text-decoration: underline;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.content ul,
|
|
295
|
+
.content ol {
|
|
296
|
+
padding-left: var(--aithe-space-5);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.content hr {
|
|
300
|
+
border: none;
|
|
301
|
+
border-top: 1px solid var(--aithe-color-border);
|
|
302
|
+
margin: var(--aithe-space-5) 0;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.empty {
|
|
306
|
+
display: flex;
|
|
307
|
+
align-items: center;
|
|
308
|
+
justify-content: center;
|
|
309
|
+
min-height: 320px;
|
|
310
|
+
color: var(--aithe-color-text-muted);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.demo-section {
|
|
314
|
+
margin-top: var(--aithe-space-6);
|
|
315
|
+
border-top: 1px solid var(--aithe-color-border);
|
|
316
|
+
padding-top: var(--aithe-space-5);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.demo-section-title {
|
|
320
|
+
font-size: var(--aithe-font-size-lg);
|
|
321
|
+
font-weight: var(--aithe-font-weight-semibold);
|
|
322
|
+
color: var(--aithe-color-text);
|
|
323
|
+
margin-bottom: var(--aithe-space-4);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.demo-body {
|
|
327
|
+
display: grid;
|
|
328
|
+
grid-template-columns: 1fr 1fr;
|
|
329
|
+
gap: var(--aithe-space-4);
|
|
330
|
+
min-width: 0;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.demo-body.vertical {
|
|
334
|
+
grid-template-columns: 1fr;
|
|
335
|
+
grid-template-rows: auto auto;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.demo-body.vertical .demo-preview-shell {
|
|
339
|
+
min-height: 300px;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.demo-preview-shell {
|
|
343
|
+
min-width: 0;
|
|
344
|
+
max-width: 100%;
|
|
345
|
+
border: 1px solid var(--aithe-color-border);
|
|
346
|
+
border-radius: var(--aithe-container-radius-xl);
|
|
347
|
+
background:
|
|
348
|
+
radial-gradient(circle at top right, rgba(77, 141, 255, 0.08), transparent 32%),
|
|
349
|
+
var(--aithe-color-bg);
|
|
350
|
+
overflow: hidden;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.demo-preview {
|
|
354
|
+
min-width: 0;
|
|
355
|
+
max-width: 100%;
|
|
356
|
+
min-height: 180px;
|
|
357
|
+
padding: var(--aithe-space-5);
|
|
358
|
+
overflow: auto;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.demo-code-shell {
|
|
362
|
+
display: flex;
|
|
363
|
+
flex-direction: column;
|
|
364
|
+
min-width: 0;
|
|
365
|
+
max-width: 100%;
|
|
366
|
+
gap: var(--aithe-space-2);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.demo-code-header {
|
|
370
|
+
display: flex;
|
|
371
|
+
align-items: center;
|
|
372
|
+
justify-content: space-between;
|
|
373
|
+
gap: var(--aithe-space-3);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.demo-code-label {
|
|
377
|
+
font-size: var(--aithe-font-size-sm);
|
|
378
|
+
font-weight: var(--aithe-font-weight-semibold);
|
|
379
|
+
color: var(--aithe-color-text-muted);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.demo-reset-btn {
|
|
383
|
+
min-height: 36px;
|
|
384
|
+
padding: 0 var(--aithe-space-3);
|
|
385
|
+
border: 1px solid var(--aithe-color-border);
|
|
386
|
+
border-radius: var(--aithe-radius-md);
|
|
387
|
+
background: var(--aithe-color-surface);
|
|
388
|
+
color: var(--aithe-color-text);
|
|
389
|
+
cursor: pointer;
|
|
390
|
+
font-size: var(--aithe-font-size-sm);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.demo-reset-btn:hover {
|
|
394
|
+
background: var(--aithe-color-bg-subtle);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.demo-editor {
|
|
398
|
+
display: block;
|
|
399
|
+
width: 100%;
|
|
400
|
+
min-width: 0;
|
|
401
|
+
max-width: 100%;
|
|
402
|
+
min-height: 220px;
|
|
403
|
+
padding: var(--aithe-space-4);
|
|
404
|
+
border: 1px solid var(--aithe-color-border);
|
|
405
|
+
border-radius: var(--aithe-container-radius-xl);
|
|
406
|
+
background: #09111f;
|
|
407
|
+
color: #edf4ff;
|
|
408
|
+
font: 13px/1.6 var(--aithe-font-family-mono);
|
|
409
|
+
overflow-x: auto;
|
|
410
|
+
resize: vertical;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.demo-error {
|
|
414
|
+
padding: var(--aithe-space-3) var(--aithe-space-4);
|
|
415
|
+
border-top: 1px solid var(--aithe-color-border);
|
|
416
|
+
background: rgba(223, 82, 107, 0.08);
|
|
417
|
+
color: var(--aithe-danger-7);
|
|
418
|
+
font-family: var(--aithe-font-family-mono);
|
|
419
|
+
font-size: var(--aithe-font-size-sm);
|
|
420
|
+
white-space: pre-wrap;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
@media (max-width: 768px) {
|
|
424
|
+
.shell {
|
|
425
|
+
grid-template-columns: 1fr;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.sidebar {
|
|
429
|
+
position: static;
|
|
430
|
+
max-height: none;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.demo-body {
|
|
434
|
+
grid-template-columns: 1fr;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
`; }
|
|
438
|
+
connectedCallback() {
|
|
439
|
+
super.connectedCallback();
|
|
440
|
+
this.unsubscribeLocale = onAitheLocaleChange(() => {
|
|
441
|
+
this.localeVersion++;
|
|
442
|
+
});
|
|
443
|
+
if (this.categories.length > 0 && !this.activeCategory) {
|
|
444
|
+
this.activeCategory = this.categories[0].key;
|
|
445
|
+
if (this.categories[0].entries.length > 0) {
|
|
446
|
+
this.activeEntry = this.categories[0].entries[0].key;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
disconnectedCallback() {
|
|
451
|
+
super.disconnectedCallback();
|
|
452
|
+
this.unsubscribeLocale?.();
|
|
453
|
+
}
|
|
454
|
+
parseMdLink(href) {
|
|
455
|
+
const segments = href.replace(/^\/+/, '').split('/');
|
|
456
|
+
const lastTwo = segments.length >= 2 ? segments.slice(-2) : segments;
|
|
457
|
+
const catDir = lastTwo[0];
|
|
458
|
+
const filePart = lastTwo[1]?.replace(/\.md$/, '') ?? lastTwo[0]?.replace(/\.md$/, '');
|
|
459
|
+
return { catDir, filePart };
|
|
460
|
+
}
|
|
461
|
+
trySelectGuide(catDir) {
|
|
462
|
+
const guideDir = catDir.replace(/\.md$/, '');
|
|
463
|
+
const guideMap = {
|
|
464
|
+
quickstart: 'guide-quickstart',
|
|
465
|
+
guide: 'guide-guide',
|
|
466
|
+
theming: 'guide-theming',
|
|
467
|
+
i18n: 'guide-i18n',
|
|
468
|
+
datahub: 'guide-datahub',
|
|
469
|
+
'framework-integration': 'guide-framework-integration',
|
|
470
|
+
autoform: 'guide-autoform',
|
|
471
|
+
markdown: 'guide-markdown',
|
|
472
|
+
highlight: 'guide-highlight',
|
|
473
|
+
};
|
|
474
|
+
const guideEntryKey = guideMap[guideDir];
|
|
475
|
+
if (!guideEntryKey)
|
|
476
|
+
return false;
|
|
477
|
+
for (const cat of this.categories) {
|
|
478
|
+
if (cat.key !== 'guides')
|
|
479
|
+
continue;
|
|
480
|
+
for (const entry of cat.entries) {
|
|
481
|
+
if (entry.key === guideEntryKey) {
|
|
482
|
+
this.selectEntry(cat.key, entry.key);
|
|
483
|
+
return true;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
return false;
|
|
488
|
+
}
|
|
489
|
+
trySelectComponent(catDir, filePart) {
|
|
490
|
+
const catMap = {
|
|
491
|
+
basic: 'basic',
|
|
492
|
+
layout: 'layout',
|
|
493
|
+
framework: 'framework',
|
|
494
|
+
navigation: 'navigation',
|
|
495
|
+
form: 'form',
|
|
496
|
+
feedback: 'feedback',
|
|
497
|
+
data: 'data',
|
|
498
|
+
display: 'display',
|
|
499
|
+
progress: 'progress',
|
|
500
|
+
container: 'container',
|
|
501
|
+
theme: 'theme',
|
|
502
|
+
};
|
|
503
|
+
const catKey = catMap[catDir];
|
|
504
|
+
if (!catKey)
|
|
505
|
+
return;
|
|
506
|
+
const keyPrefixMap = {
|
|
507
|
+
basic: 'basic',
|
|
508
|
+
layout: 'layout',
|
|
509
|
+
framework: 'framework',
|
|
510
|
+
navigation: 'nav',
|
|
511
|
+
form: 'form',
|
|
512
|
+
feedback: 'fb',
|
|
513
|
+
data: 'data',
|
|
514
|
+
display: 'disp',
|
|
515
|
+
progress: 'prog',
|
|
516
|
+
container: 'cont',
|
|
517
|
+
theme: 'theme',
|
|
518
|
+
};
|
|
519
|
+
const keyPrefix = keyPrefixMap[catKey] ?? catKey;
|
|
520
|
+
for (const cat of this.categories) {
|
|
521
|
+
if (cat.key !== catKey)
|
|
522
|
+
continue;
|
|
523
|
+
for (const entry of cat.entries) {
|
|
524
|
+
if (entry.key === `${keyPrefix}-${filePart}`) {
|
|
525
|
+
this.selectEntry(catKey, entry.key);
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
get currentEntry() {
|
|
532
|
+
for (const cat of this.categories) {
|
|
533
|
+
for (const entry of cat.entries) {
|
|
534
|
+
if (entry.key === this.activeEntry) {
|
|
535
|
+
return entry;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
return undefined;
|
|
540
|
+
}
|
|
541
|
+
selectEntry(catKey, entryKey) {
|
|
542
|
+
this.activeCategory = catKey;
|
|
543
|
+
this.activeEntry = entryKey;
|
|
544
|
+
}
|
|
545
|
+
willUpdate(changed) {
|
|
546
|
+
if (changed.has('activeEntry')) {
|
|
547
|
+
const entry = this.currentEntry;
|
|
548
|
+
this.demoSource = entry?.demoCode ?? '';
|
|
549
|
+
this.demoError = '';
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
updated(changed) {
|
|
553
|
+
if ((changed.has('demoSource') || changed.has('activeEntry')) && this.demoPreview) {
|
|
554
|
+
this.scheduleDemoRender();
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
scheduleDemoRender() {
|
|
558
|
+
clearTimeout(this.demoDebounceTimer);
|
|
559
|
+
this.demoDebounceTimer = setTimeout(() => this.renderDemoPreview(), 300);
|
|
560
|
+
}
|
|
561
|
+
renderDemoPreview() {
|
|
562
|
+
if (!this.demoPreview)
|
|
563
|
+
return;
|
|
564
|
+
const entry = this.currentEntry;
|
|
565
|
+
if (!entry?.demoCode)
|
|
566
|
+
return;
|
|
567
|
+
try {
|
|
568
|
+
this.demoPreview.innerHTML = this.demoSource;
|
|
569
|
+
entry.demoSetup?.(this.demoPreview);
|
|
570
|
+
this.demoError = '';
|
|
571
|
+
}
|
|
572
|
+
catch (error) {
|
|
573
|
+
this.demoError = error instanceof Error ? error.stack || error.message : String(error);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
renderSidebar() {
|
|
577
|
+
return this.categories.map((cat) => html `
|
|
578
|
+
<div class="cat-title">${typeof cat.label === 'function' ? cat.label() : cat.label}</div>
|
|
579
|
+
${cat.entries.map((entry) => html `
|
|
580
|
+
<button
|
|
581
|
+
class=${`entry-btn ${this.activeEntry === entry.key ? 'active' : ''}`}
|
|
582
|
+
type="button"
|
|
583
|
+
@click=${() => this.selectEntry(cat.key, entry.key)}
|
|
584
|
+
>
|
|
585
|
+
${typeof entry.label === 'function' ? entry.label() : entry.label}
|
|
586
|
+
</button>
|
|
587
|
+
`)}
|
|
588
|
+
`);
|
|
589
|
+
}
|
|
590
|
+
renderEmpty() {
|
|
591
|
+
return html `
|
|
592
|
+
<div class="empty">${t('api.empty')}</div>
|
|
593
|
+
`;
|
|
594
|
+
}
|
|
595
|
+
renderDemoSection(entry) {
|
|
596
|
+
if (!entry.demoCode)
|
|
597
|
+
return '';
|
|
598
|
+
const previewStyle = entry.previewHeight ? `min-height:${entry.previewHeight}` : '';
|
|
599
|
+
const demoErrorBlock = this.demoError
|
|
600
|
+
? html `
|
|
601
|
+
<div class="demo-error">${this.demoError}</div>
|
|
602
|
+
`
|
|
603
|
+
: '';
|
|
604
|
+
const layoutClass = entry.layout === 'vertical' ? 'demo-body vertical' : 'demo-body';
|
|
605
|
+
return html `
|
|
606
|
+
<div class="demo-section">
|
|
607
|
+
<div class="demo-section-title">${t('api.demoSection')}</div>
|
|
608
|
+
<div class=${layoutClass}>
|
|
609
|
+
<div class="demo-preview-shell">
|
|
610
|
+
<div class="demo-preview" style=${previewStyle}></div>
|
|
611
|
+
${demoErrorBlock}
|
|
612
|
+
</div>
|
|
613
|
+
<div class="demo-code-shell">
|
|
614
|
+
<div class="demo-code-header">
|
|
615
|
+
<span class="demo-code-label">${t('api.code')}</span>
|
|
616
|
+
<button
|
|
617
|
+
class="demo-reset-btn"
|
|
618
|
+
type="button"
|
|
619
|
+
@click=${() => {
|
|
620
|
+
this.demoSource = entry.demoCode ?? '';
|
|
621
|
+
}}
|
|
622
|
+
>
|
|
623
|
+
${t('api.reset')}
|
|
624
|
+
</button>
|
|
625
|
+
</div>
|
|
626
|
+
<textarea
|
|
627
|
+
class="demo-editor"
|
|
628
|
+
.value=${this.demoSource}
|
|
629
|
+
spellcheck="false"
|
|
630
|
+
@input=${(event) => {
|
|
631
|
+
this.demoSource = event.currentTarget.value;
|
|
632
|
+
}}
|
|
633
|
+
></textarea>
|
|
634
|
+
</div>
|
|
635
|
+
</div>
|
|
636
|
+
</div>
|
|
637
|
+
`;
|
|
638
|
+
}
|
|
639
|
+
renderContent(entry) {
|
|
640
|
+
const currentHtml = entry?.html ?? '';
|
|
641
|
+
if (!currentHtml)
|
|
642
|
+
return this.renderEmpty();
|
|
643
|
+
const transformedHtml = transformCodeBlocks(currentHtml);
|
|
644
|
+
return html `
|
|
645
|
+
<div .innerHTML=${transformedHtml} @click=${this.handleContentClick}></div>
|
|
646
|
+
${this.renderDemoSection(entry)}
|
|
647
|
+
`;
|
|
648
|
+
}
|
|
649
|
+
render() {
|
|
650
|
+
const entry = this.currentEntry;
|
|
651
|
+
return html `
|
|
652
|
+
<div class="shell">
|
|
653
|
+
<aside class="sidebar">${this.renderSidebar()}</aside>
|
|
654
|
+
|
|
655
|
+
<main class="content">${this.renderContent(entry)}</main>
|
|
656
|
+
</div>
|
|
657
|
+
`;
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
__decorate([
|
|
661
|
+
property({ attribute: false })
|
|
662
|
+
], AitheDocsViewer.prototype, "categories", void 0);
|
|
663
|
+
__decorate([
|
|
664
|
+
state()
|
|
665
|
+
], AitheDocsViewer.prototype, "activeCategory", void 0);
|
|
666
|
+
__decorate([
|
|
667
|
+
state()
|
|
668
|
+
], AitheDocsViewer.prototype, "activeEntry", void 0);
|
|
669
|
+
__decorate([
|
|
670
|
+
state()
|
|
671
|
+
], AitheDocsViewer.prototype, "demoSource", void 0);
|
|
672
|
+
__decorate([
|
|
673
|
+
state()
|
|
674
|
+
], AitheDocsViewer.prototype, "demoError", void 0);
|
|
675
|
+
__decorate([
|
|
676
|
+
state()
|
|
677
|
+
], AitheDocsViewer.prototype, "localeVersion", void 0);
|
|
678
|
+
__decorate([
|
|
679
|
+
query('.demo-preview')
|
|
680
|
+
], AitheDocsViewer.prototype, "demoPreview", void 0);
|
|
681
|
+
AitheDocsViewer = __decorate([
|
|
682
|
+
customElement('aithe-docs-viewer')
|
|
683
|
+
], AitheDocsViewer);
|
|
684
|
+
export { AitheDocsViewer };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"de-DE.d.ts","sourceRoot":"","sources":["../../../../src/apps/api/i18n/de-DE.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"de-DE.d.ts","sourceRoot":"","sources":["../../../../src/apps/api/i18n/de-DE.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA6IxC,CAAC"}
|