@nikala-ui/docs 0.12.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 +22 -0
- package/dist/cli/commands/build.d.ts +5 -0
- package/dist/cli/commands/build.d.ts.map +1 -0
- package/dist/cli/commands/build.js +27 -0
- package/dist/cli/commands/build.js.map +1 -0
- package/dist/cli/commands/dev.d.ts +7 -0
- package/dist/cli/commands/dev.d.ts.map +1 -0
- package/dist/cli/commands/dev.js +32 -0
- package/dist/cli/commands/dev.js.map +1 -0
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +308 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/preview.d.ts +7 -0
- package/dist/cli/commands/preview.d.ts.map +1 -0
- package/dist/cli/commands/preview.js +24 -0
- package/dist/cli/commands/preview.js.map +1 -0
- package/dist/cli/commands/serve.d.ts +7 -0
- package/dist/cli/commands/serve.d.ts.map +1 -0
- package/dist/cli/commands/serve.js +33 -0
- package/dist/cli/commands/serve.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +53 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/client/App.d.ts +5 -0
- package/dist/client/App.d.ts.map +1 -0
- package/dist/client/App.jsx +31 -0
- package/dist/client/App.jsx.map +1 -0
- package/dist/client/app-types.d.ts +14 -0
- package/dist/client/app-types.d.ts.map +1 -0
- package/dist/client/app-types.js +2 -0
- package/dist/client/app-types.js.map +1 -0
- package/dist/client/components/DocsLayoutShell.d.ts +21 -0
- package/dist/client/components/DocsLayoutShell.d.ts.map +1 -0
- package/dist/client/components/DocsLayoutShell.jsx +14 -0
- package/dist/client/components/DocsLayoutShell.jsx.map +1 -0
- package/dist/client/components/DocsPageContent.d.ts +9 -0
- package/dist/client/components/DocsPageContent.d.ts.map +1 -0
- package/dist/client/components/DocsPageContent.jsx +10 -0
- package/dist/client/components/DocsPageContent.jsx.map +1 -0
- package/dist/client/entry.d.ts +2 -0
- package/dist/client/entry.d.ts.map +1 -0
- package/dist/client/entry.jsx +28 -0
- package/dist/client/entry.jsx.map +1 -0
- package/dist/client/index.html +21 -0
- package/dist/client/navigation/page-navigation.d.ts +9 -0
- package/dist/client/navigation/page-navigation.d.ts.map +1 -0
- package/dist/client/navigation/page-navigation.js +51 -0
- package/dist/client/navigation/page-navigation.js.map +1 -0
- package/dist/client/routing/use-docs-router.d.ts +17 -0
- package/dist/client/routing/use-docs-router.d.ts.map +1 -0
- package/dist/client/routing/use-docs-router.js +71 -0
- package/dist/client/routing/use-docs-router.js.map +1 -0
- package/dist/client/ssr-entry.d.ts +3 -0
- package/dist/client/ssr-entry.d.ts.map +1 -0
- package/dist/client/ssr-entry.jsx +13 -0
- package/dist/client/ssr-entry.jsx.map +1 -0
- package/dist/client/style.css +183 -0
- package/dist/client/utils/sidebar.d.ts +2 -0
- package/dist/client/utils/sidebar.d.ts.map +1 -0
- package/dist/client/utils/sidebar.js +2 -0
- package/dist/client/utils/sidebar.js.map +1 -0
- package/dist/components/mdx-components.d.ts +34 -0
- package/dist/components/mdx-components.d.ts.map +1 -0
- package/dist/components/mdx-components.jsx +131 -0
- package/dist/components/mdx-components.jsx.map +1 -0
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +105 -0
- package/dist/config.js.map +1 -0
- package/dist/core/content-scanner.d.ts +10 -0
- package/dist/core/content-scanner.d.ts.map +1 -0
- package/dist/core/content-scanner.js +153 -0
- package/dist/core/content-scanner.js.map +1 -0
- package/dist/core/route-tree.d.ts +19 -0
- package/dist/core/route-tree.d.ts.map +1 -0
- package/dist/core/route-tree.js +176 -0
- package/dist/core/route-tree.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/cn.d.ts +6 -0
- package/dist/lib/cn.d.ts.map +1 -0
- package/dist/lib/cn.js +9 -0
- package/dist/lib/cn.js.map +1 -0
- package/dist/mdx/compiler.d.ts +13 -0
- package/dist/mdx/compiler.d.ts.map +1 -0
- package/dist/mdx/compiler.js +38 -0
- package/dist/mdx/compiler.js.map +1 -0
- package/dist/mdx/highlighter.d.ts +22 -0
- package/dist/mdx/highlighter.d.ts.map +1 -0
- package/dist/mdx/highlighter.js +139 -0
- package/dist/mdx/highlighter.js.map +1 -0
- package/dist/mdx/rehype-shiki.d.ts +3 -0
- package/dist/mdx/rehype-shiki.d.ts.map +1 -0
- package/dist/mdx/rehype-shiki.js +83 -0
- package/dist/mdx/rehype-shiki.js.map +1 -0
- package/dist/navigation/index.d.ts +2 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/navigation/index.js +2 -0
- package/dist/navigation/index.js.map +1 -0
- package/dist/navigation/sidebar-state.d.ts +6 -0
- package/dist/navigation/sidebar-state.d.ts.map +1 -0
- package/dist/navigation/sidebar-state.js +20 -0
- package/dist/navigation/sidebar-state.js.map +1 -0
- package/dist/navigation/sidebar-tree.d.ts +7 -0
- package/dist/navigation/sidebar-tree.d.ts.map +1 -0
- package/dist/navigation/sidebar-tree.js +11 -0
- package/dist/navigation/sidebar-tree.js.map +1 -0
- package/dist/registry/accordion.json +18 -0
- package/dist/registry/alert.json +18 -0
- package/dist/registry/api-table.json +21 -0
- package/dist/registry/aspect-ratio.json +17 -0
- package/dist/registry/avatar.json +17 -0
- package/dist/registry/badge.json +18 -0
- package/dist/registry/banner.json +19 -0
- package/dist/registry/breadcrumb.json +17 -0
- package/dist/registry/bubble.json +18 -0
- package/dist/registry/button-group.json +20 -0
- package/dist/registry/button.json +21 -0
- package/dist/registry/callout.json +19 -0
- package/dist/registry/card.json +17 -0
- package/dist/registry/checkbox.json +20 -0
- package/dist/registry/code-block.json +26 -0
- package/dist/registry/code-group.json +20 -0
- package/dist/registry/collapsible.json +18 -0
- package/dist/registry/combobox.json +21 -0
- package/dist/registry/command.json +27 -0
- package/dist/registry/component-viewer.json +25 -0
- package/dist/registry/container.json +18 -0
- package/dist/registry/context-menu.json +24 -0
- package/dist/registry/create-active-element.json +13 -0
- package/dist/registry/create-app-updater.json +13 -0
- package/dist/registry/create-audio.json +7 -0
- package/dist/registry/create-battery.json +13 -0
- package/dist/registry/create-chat-scroll.json +13 -0
- package/dist/registry/create-click-outside.json +13 -0
- package/dist/registry/create-clipboard.json +13 -0
- package/dist/registry/create-color-mode.json +13 -0
- package/dist/registry/create-controllable-signal.json +13 -0
- package/dist/registry/create-debounce.json +13 -0
- package/dist/registry/create-disclosure.json +13 -0
- package/dist/registry/create-document-tabs.json +13 -0
- package/dist/registry/create-document-title.json +13 -0
- package/dist/registry/create-drop-zone.json +13 -0
- package/dist/registry/create-event-source.json +13 -0
- package/dist/registry/create-favicon.json +13 -0
- package/dist/registry/create-fetch.json +13 -0
- package/dist/registry/create-focus-trap.json +13 -0
- package/dist/registry/create-form.json +13 -0
- package/dist/registry/create-fullscreen.json +13 -0
- package/dist/registry/create-geolocation.json +13 -0
- package/dist/registry/create-global-shortcut.json +13 -0
- package/dist/registry/create-hover.json +13 -0
- package/dist/registry/create-idle.json +13 -0
- package/dist/registry/create-infinite-scroll.json +13 -0
- package/dist/registry/create-input-mask.json +13 -0
- package/dist/registry/create-intersection-observer.json +13 -0
- package/dist/registry/create-keybindings.json +13 -0
- package/dist/registry/create-lock-scroll.json +13 -0
- package/dist/registry/create-long-press.json +13 -0
- package/dist/registry/create-media-query.json +13 -0
- package/dist/registry/create-mouse-position.json +13 -0
- package/dist/registry/create-network-status.json +13 -0
- package/dist/registry/create-orientation.json +13 -0
- package/dist/registry/create-pagination.json +13 -0
- package/dist/registry/create-permission.json +13 -0
- package/dist/registry/create-previous.json +13 -0
- package/dist/registry/create-resize-observer.json +13 -0
- package/dist/registry/create-scroll-into-view.json +13 -0
- package/dist/registry/create-scroll-position.json +13 -0
- package/dist/registry/create-storage.json +13 -0
- package/dist/registry/create-tauri-window.json +13 -0
- package/dist/registry/create-timer.json +13 -0
- package/dist/registry/create-tiptap-editor.json +34 -0
- package/dist/registry/create-undo-redo.json +13 -0
- package/dist/registry/create-web-notification.json +13 -0
- package/dist/registry/create-websocket.json +13 -0
- package/dist/registry/create-window-size.json +13 -0
- package/dist/registry/dialog.json +21 -0
- package/dist/registry/dropdown-menu.json +22 -0
- package/dist/registry/dropzone.json +21 -0
- package/dist/registry/empty.json +17 -0
- package/dist/registry/field.json +20 -0
- package/dist/registry/file-tree.json +21 -0
- package/dist/registry/footer.json +18 -0
- package/dist/registry/forgot-password-01.json +28 -0
- package/dist/registry/form-message.json +17 -0
- package/dist/registry/form.json +17 -0
- package/dist/registry/hero-01.json +22 -0
- package/dist/registry/hover-card.json +18 -0
- package/dist/registry/icon-button.json +20 -0
- package/dist/registry/index.json +1489 -0
- package/dist/registry/input-group.json +21 -0
- package/dist/registry/input.json +17 -0
- package/dist/registry/kbd.json +18 -0
- package/dist/registry/label.json +18 -0
- package/dist/registry/list.json +20 -0
- package/dist/registry/login-01.json +28 -0
- package/dist/registry/logo.json +17 -0
- package/dist/registry/marker.json +17 -0
- package/dist/registry/marquee.json +17 -0
- package/dist/registry/message.json +17 -0
- package/dist/registry/navbar.json +19 -0
- package/dist/registry/navigation-menu.json +22 -0
- package/dist/registry/number-input.json +24 -0
- package/dist/registry/otp-verification-01.json +26 -0
- package/dist/registry/package-manager-tabs.json +24 -0
- package/dist/registry/pager.json +21 -0
- package/dist/registry/pagination.json +22 -0
- package/dist/registry/pin-input.json +17 -0
- package/dist/registry/popover.json +22 -0
- package/dist/registry/progress.json +18 -0
- package/dist/registry/radio-group.json +18 -0
- package/dist/registry/rating.json +19 -0
- package/dist/registry/register-01.json +31 -0
- package/dist/registry/resizable.json +21 -0
- package/dist/registry/review-card.json +23 -0
- package/dist/registry/rich-text-editor.json +95 -0
- package/dist/registry/scroll-area.json +21 -0
- package/dist/registry/section-heading.json +21 -0
- package/dist/registry/select.json +22 -0
- package/dist/registry/separator.json +17 -0
- package/dist/registry/sheet.json +22 -0
- package/dist/registry/sidebar.json +24 -0
- package/dist/registry/skeleton.json +17 -0
- package/dist/registry/slider.json +18 -0
- package/dist/registry/spinner.json +18 -0
- package/dist/registry/stat.json +19 -0
- package/dist/registry/status.json +18 -0
- package/dist/registry/steps.json +20 -0
- package/dist/registry/switch.json +20 -0
- package/dist/registry/table-of-contents.json +23 -0
- package/dist/registry/table.json +17 -0
- package/dist/registry/tabs.json +20 -0
- package/dist/registry/textarea.json +17 -0
- package/dist/registry/theme-manager.json +39 -0
- package/dist/registry/timeline.json +18 -0
- package/dist/registry/titlebar-tabs.json +24 -0
- package/dist/registry/titlebar.json +26 -0
- package/dist/registry/toast.json +20 -0
- package/dist/registry/toggle-group.json +21 -0
- package/dist/registry/toggle.json +18 -0
- package/dist/registry/tooltip.json +18 -0
- package/dist/registry/updater-modal.json +26 -0
- package/dist/server/index.d.ts +18 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +526 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/plugin.d.ts +10 -0
- package/dist/server/plugin.d.ts.map +1 -0
- package/dist/server/plugin.js +271 -0
- package/dist/server/plugin.js.map +1 -0
- package/dist/themes/default/content/breadcrumbs.d.ts +4 -0
- package/dist/themes/default/content/breadcrumbs.d.ts.map +1 -0
- package/dist/themes/default/content/breadcrumbs.jsx +31 -0
- package/dist/themes/default/content/breadcrumbs.jsx.map +1 -0
- package/dist/themes/default/content/pager.d.ts +5 -0
- package/dist/themes/default/content/pager.d.ts.map +1 -0
- package/dist/themes/default/content/pager.jsx +9 -0
- package/dist/themes/default/content/pager.jsx.map +1 -0
- package/dist/themes/default/content/table-of-contents.d.ts +4 -0
- package/dist/themes/default/content/table-of-contents.d.ts.map +1 -0
- package/dist/themes/default/content/table-of-contents.jsx +19 -0
- package/dist/themes/default/content/table-of-contents.jsx.map +1 -0
- package/dist/themes/default/index.d.ts +11 -0
- package/dist/themes/default/index.d.ts.map +1 -0
- package/dist/themes/default/index.js +30 -0
- package/dist/themes/default/index.js.map +1 -0
- package/dist/themes/default/layout.d.ts +4 -0
- package/dist/themes/default/layout.d.ts.map +1 -0
- package/dist/themes/default/layout.jsx +75 -0
- package/dist/themes/default/layout.jsx.map +1 -0
- package/dist/themes/default/navbar.d.ts +4 -0
- package/dist/themes/default/navbar.d.ts.map +1 -0
- package/dist/themes/default/navbar.jsx +74 -0
- package/dist/themes/default/navbar.jsx.map +1 -0
- package/dist/themes/default/navigation/mobile-table-of-contents.d.ts +4 -0
- package/dist/themes/default/navigation/mobile-table-of-contents.d.ts.map +1 -0
- package/dist/themes/default/navigation/mobile-table-of-contents.jsx +22 -0
- package/dist/themes/default/navigation/mobile-table-of-contents.jsx.map +1 -0
- package/dist/themes/default/navigation/sidebar-tree.d.ts +8 -0
- package/dist/themes/default/navigation/sidebar-tree.d.ts.map +1 -0
- package/dist/themes/default/navigation/sidebar-tree.jsx +100 -0
- package/dist/themes/default/navigation/sidebar-tree.jsx.map +1 -0
- package/dist/themes/default/overlays/search-dialog.d.ts +4 -0
- package/dist/themes/default/overlays/search-dialog.d.ts.map +1 -0
- package/dist/themes/default/overlays/search-dialog.jsx +34 -0
- package/dist/themes/default/overlays/search-dialog.jsx.map +1 -0
- package/dist/themes/default/sidebar.d.ts +4 -0
- package/dist/themes/default/sidebar.d.ts.map +1 -0
- package/dist/themes/default/sidebar.jsx +60 -0
- package/dist/themes/default/sidebar.jsx.map +1 -0
- package/dist/themes/index.d.ts +4 -0
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/index.js +5 -0
- package/dist/themes/index.js.map +1 -0
- package/dist/themes/types.d.ts +83 -0
- package/dist/themes/types.d.ts.map +1 -0
- package/dist/themes/types.js +2 -0
- package/dist/themes/types.js.map +1 -0
- package/dist/types.d.ts +97 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/vendor/core-src/index.css +11 -0
- package/dist/vendor/core-src/index.ts +48 -0
- package/dist/vendor/core-src/lib/cn.ts +9 -0
- package/dist/vendor/core-src/registry/blocks/forgot-password-01.tsx +141 -0
- package/dist/vendor/core-src/registry/blocks/hero-01.tsx +28 -0
- package/dist/vendor/core-src/registry/blocks/login-01.tsx +231 -0
- package/dist/vendor/core-src/registry/blocks/otp-verification-01.tsx +170 -0
- package/dist/vendor/core-src/registry/blocks/register-01.tsx +318 -0
- package/dist/vendor/core-src/registry/components/ui/accordion.tsx +128 -0
- package/dist/vendor/core-src/registry/components/ui/alert.tsx +155 -0
- package/dist/vendor/core-src/registry/components/ui/api-table.tsx +117 -0
- package/dist/vendor/core-src/registry/components/ui/aspect-ratio.tsx +31 -0
- package/dist/vendor/core-src/registry/components/ui/avatar.tsx +114 -0
- package/dist/vendor/core-src/registry/components/ui/badge.tsx +56 -0
- package/dist/vendor/core-src/registry/components/ui/banner.tsx +187 -0
- package/dist/vendor/core-src/registry/components/ui/breadcrumb.tsx +136 -0
- package/dist/vendor/core-src/registry/components/ui/bubble.tsx +142 -0
- package/dist/vendor/core-src/registry/components/ui/button-group.tsx +42 -0
- package/dist/vendor/core-src/registry/components/ui/button.tsx +82 -0
- package/dist/vendor/core-src/registry/components/ui/callout.tsx +137 -0
- package/dist/vendor/core-src/registry/components/ui/card.tsx +113 -0
- package/dist/vendor/core-src/registry/components/ui/checkbox.tsx +74 -0
- package/dist/vendor/core-src/registry/components/ui/code-block.tsx +326 -0
- package/dist/vendor/core-src/registry/components/ui/code-group.tsx +105 -0
- package/dist/vendor/core-src/registry/components/ui/collapsible.tsx +73 -0
- package/dist/vendor/core-src/registry/components/ui/combobox.tsx +299 -0
- package/dist/vendor/core-src/registry/components/ui/command.tsx +378 -0
- package/dist/vendor/core-src/registry/components/ui/component-viewer.tsx +363 -0
- package/dist/vendor/core-src/registry/components/ui/container.tsx +45 -0
- package/dist/vendor/core-src/registry/components/ui/context-menu.tsx +237 -0
- package/dist/vendor/core-src/registry/components/ui/dialog.tsx +200 -0
- package/dist/vendor/core-src/registry/components/ui/dropdown-menu.tsx +298 -0
- package/dist/vendor/core-src/registry/components/ui/dropzone.tsx +189 -0
- package/dist/vendor/core-src/registry/components/ui/empty.tsx +83 -0
- package/dist/vendor/core-src/registry/components/ui/field.tsx +71 -0
- package/dist/vendor/core-src/registry/components/ui/file-tree.tsx +181 -0
- package/dist/vendor/core-src/registry/components/ui/footer.tsx +247 -0
- package/dist/vendor/core-src/registry/components/ui/form-message.tsx +36 -0
- package/dist/vendor/core-src/registry/components/ui/form.tsx +21 -0
- package/dist/vendor/core-src/registry/components/ui/hover-card.tsx +105 -0
- package/dist/vendor/core-src/registry/components/ui/icon-button.tsx +34 -0
- package/dist/vendor/core-src/registry/components/ui/input-group.tsx +80 -0
- package/dist/vendor/core-src/registry/components/ui/input.tsx +28 -0
- package/dist/vendor/core-src/registry/components/ui/kbd.tsx +73 -0
- package/dist/vendor/core-src/registry/components/ui/label.tsx +30 -0
- package/dist/vendor/core-src/registry/components/ui/list.tsx +222 -0
- package/dist/vendor/core-src/registry/components/ui/logo.tsx +68 -0
- package/dist/vendor/core-src/registry/components/ui/marker.tsx +102 -0
- package/dist/vendor/core-src/registry/components/ui/marquee.tsx +118 -0
- package/dist/vendor/core-src/registry/components/ui/message.tsx +168 -0
- package/dist/vendor/core-src/registry/components/ui/navbar.tsx +375 -0
- package/dist/vendor/core-src/registry/components/ui/navigation-menu.tsx +358 -0
- package/dist/vendor/core-src/registry/components/ui/number-input.tsx +150 -0
- package/dist/vendor/core-src/registry/components/ui/package-manager-tabs.tsx +226 -0
- package/dist/vendor/core-src/registry/components/ui/pager.tsx +102 -0
- package/dist/vendor/core-src/registry/components/ui/pagination.tsx +258 -0
- package/dist/vendor/core-src/registry/components/ui/pin-input.tsx +198 -0
- package/dist/vendor/core-src/registry/components/ui/popover.tsx +90 -0
- package/dist/vendor/core-src/registry/components/ui/progress.tsx +66 -0
- package/dist/vendor/core-src/registry/components/ui/radio-group.tsx +95 -0
- package/dist/vendor/core-src/registry/components/ui/rating.tsx +185 -0
- package/dist/vendor/core-src/registry/components/ui/resizable.tsx +195 -0
- package/dist/vendor/core-src/registry/components/ui/review-card.tsx +195 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/bubble-menu.tsx +236 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/editor.tsx +308 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/extensions.ts +116 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/footer.tsx +36 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/image-dialog.tsx +75 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/index.ts +11 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/link-dialog.tsx +48 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/markdown.ts +170 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/slash-command.tsx +301 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/table-controls.tsx +68 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/toolbar.tsx +465 -0
- package/dist/vendor/core-src/registry/components/ui/rich-text-editor/use-editor.ts +231 -0
- package/dist/vendor/core-src/registry/components/ui/scroll-area.tsx +228 -0
- package/dist/vendor/core-src/registry/components/ui/section-heading.tsx +108 -0
- package/dist/vendor/core-src/registry/components/ui/select.tsx +156 -0
- package/dist/vendor/core-src/registry/components/ui/separator.tsx +37 -0
- package/dist/vendor/core-src/registry/components/ui/sheet.tsx +220 -0
- package/dist/vendor/core-src/registry/components/ui/sidebar.tsx +692 -0
- package/dist/vendor/core-src/registry/components/ui/skeleton.tsx +24 -0
- package/dist/vendor/core-src/registry/components/ui/slider.tsx +153 -0
- package/dist/vendor/core-src/registry/components/ui/spinner.tsx +41 -0
- package/dist/vendor/core-src/registry/components/ui/stat.tsx +245 -0
- package/dist/vendor/core-src/registry/components/ui/status.tsx +121 -0
- package/dist/vendor/core-src/registry/components/ui/steps.tsx +198 -0
- package/dist/vendor/core-src/registry/components/ui/switch.tsx +68 -0
- package/dist/vendor/core-src/registry/components/ui/table-of-contents.tsx +131 -0
- package/dist/vendor/core-src/registry/components/ui/table.tsx +160 -0
- package/dist/vendor/core-src/registry/components/ui/tabs.tsx +204 -0
- package/dist/vendor/core-src/registry/components/ui/textarea.tsx +82 -0
- package/dist/vendor/core-src/registry/components/ui/theme-toggle.tsx +238 -0
- package/dist/vendor/core-src/registry/components/ui/timeline.tsx +350 -0
- package/dist/vendor/core-src/registry/components/ui/titlebar-tabs.tsx +773 -0
- package/dist/vendor/core-src/registry/components/ui/titlebar.tsx +468 -0
- package/dist/vendor/core-src/registry/components/ui/toast.tsx +124 -0
- package/dist/vendor/core-src/registry/components/ui/toggle-group.tsx +203 -0
- package/dist/vendor/core-src/registry/components/ui/toggle.tsx +101 -0
- package/dist/vendor/core-src/registry/components/ui/tooltip.tsx +41 -0
- package/dist/vendor/core-src/registry/components/ui/updater-modal.tsx +254 -0
- package/dist/vendor/core-src/registry/index.ts +50 -0
- package/dist/vendor/core-src/registry/metadata.ts +742 -0
- package/dist/vendor/core-src/registry/providers/theme-provider.tsx +216 -0
- package/dist/vendor/core-src/registry/providers/theme-script.tsx +78 -0
- package/dist/vendor/core-src/registry/providers/theme-transitions.ts +139 -0
- package/dist/vendor/hooks-src/create-active-element.ts +51 -0
- package/dist/vendor/hooks-src/create-app-updater.ts +272 -0
- package/dist/vendor/hooks-src/create-audio-video.ts +444 -0
- package/dist/vendor/hooks-src/create-battery.ts +78 -0
- package/dist/vendor/hooks-src/create-chat-scroll.ts +113 -0
- package/dist/vendor/hooks-src/create-click-outside.ts +82 -0
- package/dist/vendor/hooks-src/create-clipboard.ts +69 -0
- package/dist/vendor/hooks-src/create-color-mode.ts +115 -0
- package/dist/vendor/hooks-src/create-controllable-signal.ts +56 -0
- package/dist/vendor/hooks-src/create-debounce.ts +90 -0
- package/dist/vendor/hooks-src/create-disclosure.ts +82 -0
- package/dist/vendor/hooks-src/create-document-tabs.ts +267 -0
- package/dist/vendor/hooks-src/create-document-title.ts +33 -0
- package/dist/vendor/hooks-src/create-drop-zone.ts +317 -0
- package/dist/vendor/hooks-src/create-event-source.ts +126 -0
- package/dist/vendor/hooks-src/create-favicon.ts +52 -0
- package/dist/vendor/hooks-src/create-fetch.ts +93 -0
- package/dist/vendor/hooks-src/create-focus-trap.ts +94 -0
- package/dist/vendor/hooks-src/create-form.ts +200 -0
- package/dist/vendor/hooks-src/create-fullscreen.ts +105 -0
- package/dist/vendor/hooks-src/create-geolocation.ts +140 -0
- package/dist/vendor/hooks-src/create-global-shortcut.ts +140 -0
- package/dist/vendor/hooks-src/create-hover.ts +88 -0
- package/dist/vendor/hooks-src/create-idle.ts +109 -0
- package/dist/vendor/hooks-src/create-infinite-scroll.ts +90 -0
- package/dist/vendor/hooks-src/create-input-mask.ts +109 -0
- package/dist/vendor/hooks-src/create-intersection-observer.ts +82 -0
- package/dist/vendor/hooks-src/create-keybindings.ts +148 -0
- package/dist/vendor/hooks-src/create-lock-scroll.ts +97 -0
- package/dist/vendor/hooks-src/create-long-press.ts +85 -0
- package/dist/vendor/hooks-src/create-media-query.ts +94 -0
- package/dist/vendor/hooks-src/create-mouse-position.ts +87 -0
- package/dist/vendor/hooks-src/create-network-status.ts +100 -0
- package/dist/vendor/hooks-src/create-orientation.ts +129 -0
- package/dist/vendor/hooks-src/create-pagination.ts +208 -0
- package/dist/vendor/hooks-src/create-permission.ts +91 -0
- package/dist/vendor/hooks-src/create-previous.ts +21 -0
- package/dist/vendor/hooks-src/create-resize-observer.ts +89 -0
- package/dist/vendor/hooks-src/create-scroll-into-view.ts +57 -0
- package/dist/vendor/hooks-src/create-scroll-position.ts +129 -0
- package/dist/vendor/hooks-src/create-storage.ts +106 -0
- package/dist/vendor/hooks-src/create-tauri-window.ts +628 -0
- package/dist/vendor/hooks-src/create-timer.ts +150 -0
- package/dist/vendor/hooks-src/create-tiptap-editor.ts +326 -0
- package/dist/vendor/hooks-src/create-undo-redo.ts +100 -0
- package/dist/vendor/hooks-src/create-web-notification.ts +111 -0
- package/dist/vendor/hooks-src/create-websocket.ts +179 -0
- package/dist/vendor/hooks-src/create-window-size.ts +41 -0
- package/dist/vendor/hooks-src/index.ts +48 -0
- package/package.json +87 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import fs from "fs-extra";
|
|
4
|
+
import { scanContent, scanContentDirectories } from "../core/content-scanner.js";
|
|
5
|
+
import { buildSidebarTree } from "../core/route-tree.js";
|
|
6
|
+
import { compileMdx } from "../mdx/compiler.js";
|
|
7
|
+
import { loadConfig } from "../config.js";
|
|
8
|
+
const VIRTUAL_CONFIG_ID = "virtual:nikala-docs-config";
|
|
9
|
+
const RESOLVED_CONFIG_ID = "\0" + VIRTUAL_CONFIG_ID;
|
|
10
|
+
const VIRTUAL_TREE_ID = "virtual:nikala-docs-tree";
|
|
11
|
+
const RESOLVED_TREE_ID = "\0" + VIRTUAL_TREE_ID;
|
|
12
|
+
const VIRTUAL_ROUTES_ID = "virtual:nikala-docs-routes";
|
|
13
|
+
const RESOLVED_ROUTES_ID = "\0" + VIRTUAL_ROUTES_ID;
|
|
14
|
+
const VIRTUAL_THEME_ID = "virtual:nikala-docs-theme";
|
|
15
|
+
const RESOLVED_THEME_ID = "\0" + VIRTUAL_THEME_ID;
|
|
16
|
+
const VIRTUAL_SHIKI_ID = "virtual:nikala-docs-shiki-stub";
|
|
17
|
+
const RESOLVED_SHIKI_ID = "\0" + VIRTUAL_SHIKI_ID;
|
|
18
|
+
const CONFIG_FILENAMES = new Set([
|
|
19
|
+
"docs.config.ts",
|
|
20
|
+
"docs.config.js",
|
|
21
|
+
"docs.config.mjs",
|
|
22
|
+
"nikala.docs.config.ts",
|
|
23
|
+
"nikala.docs.config.js",
|
|
24
|
+
"nikala.docs.config.mjs",
|
|
25
|
+
// Backward compatibility for older docs projects.
|
|
26
|
+
"nikala.config.ts",
|
|
27
|
+
"nikala.config.js",
|
|
28
|
+
]);
|
|
29
|
+
function findConfigFile(rootDir) {
|
|
30
|
+
return [...CONFIG_FILENAMES]
|
|
31
|
+
.map((filename) => path.join(rootDir, filename))
|
|
32
|
+
.find((file) => fs.existsSync(file));
|
|
33
|
+
}
|
|
34
|
+
export function nikalaDocsPlugin(options = {}) {
|
|
35
|
+
// Vite's root is the docs engine client directory. It is not the user's
|
|
36
|
+
// project root, so content/config paths must always resolve from configRoot.
|
|
37
|
+
let rootDir = path.resolve(options.configRoot || process.cwd());
|
|
38
|
+
let docsDir = options.docsDir ? path.resolve(rootDir, options.docsDir) : path.resolve(rootDir, "docs");
|
|
39
|
+
let resolvedConfig = options.config || { title: "Nikala Docs" };
|
|
40
|
+
let cachedPages = [];
|
|
41
|
+
return {
|
|
42
|
+
name: "vite-plugin-nikala-docs",
|
|
43
|
+
enforce: "pre",
|
|
44
|
+
async configResolved(viteConfig) {
|
|
45
|
+
// Keep Vite's internal root separate from the consuming project's root.
|
|
46
|
+
// Otherwise a relative contentDir could resolve under packages/docs.
|
|
47
|
+
rootDir = path.resolve(options.configRoot || process.cwd());
|
|
48
|
+
if (!options.docsDir) {
|
|
49
|
+
// The config is authoritative for new projects; keep legacy auto-detection.
|
|
50
|
+
const fs = await import("fs-extra");
|
|
51
|
+
if (!options.config) {
|
|
52
|
+
resolvedConfig = await loadConfig(options.configRoot || rootDir);
|
|
53
|
+
}
|
|
54
|
+
if (resolvedConfig.contentDir) {
|
|
55
|
+
docsDir = path.resolve(rootDir, resolvedConfig.contentDir);
|
|
56
|
+
}
|
|
57
|
+
else if (await fs.pathExists(path.resolve(rootDir, "docs"))) {
|
|
58
|
+
docsDir = path.resolve(rootDir, "docs");
|
|
59
|
+
}
|
|
60
|
+
else if (await fs.pathExists(path.resolve(rootDir, "content"))) {
|
|
61
|
+
docsDir = path.resolve(rootDir, "content");
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
docsDir = rootDir;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
docsDir = path.resolve(rootDir, options.docsDir);
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
resolveId(id, importer) {
|
|
72
|
+
if (id === "shiki" || id.startsWith("shiki/")) {
|
|
73
|
+
if (importer && (importer.includes("/mdx/") || importer.includes("\\mdx\\"))) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
return RESOLVED_SHIKI_ID;
|
|
77
|
+
}
|
|
78
|
+
if (id === VIRTUAL_CONFIG_ID)
|
|
79
|
+
return RESOLVED_CONFIG_ID;
|
|
80
|
+
if (id === VIRTUAL_TREE_ID)
|
|
81
|
+
return RESOLVED_TREE_ID;
|
|
82
|
+
if (id === VIRTUAL_ROUTES_ID)
|
|
83
|
+
return RESOLVED_ROUTES_ID;
|
|
84
|
+
if (id === VIRTUAL_THEME_ID)
|
|
85
|
+
return RESOLVED_THEME_ID;
|
|
86
|
+
return null;
|
|
87
|
+
},
|
|
88
|
+
async load(id) {
|
|
89
|
+
if (id === RESOLVED_SHIKI_ID) {
|
|
90
|
+
return `
|
|
91
|
+
export const createHighlighter = async () => null;
|
|
92
|
+
export const bundledLanguages = {};
|
|
93
|
+
export const bundledThemes = {};
|
|
94
|
+
export default { createHighlighter, bundledLanguages, bundledThemes };
|
|
95
|
+
`;
|
|
96
|
+
}
|
|
97
|
+
if (id === RESOLVED_CONFIG_ID) {
|
|
98
|
+
const configFile = findConfigFile(rootDir);
|
|
99
|
+
if (!configFile)
|
|
100
|
+
return `export default ${JSON.stringify(resolvedConfig)};`;
|
|
101
|
+
return `
|
|
102
|
+
import userConfig from ${JSON.stringify(configFile)};
|
|
103
|
+
const defaults = ${JSON.stringify(resolvedConfig)};
|
|
104
|
+
const config = {
|
|
105
|
+
...defaults,
|
|
106
|
+
...userConfig,
|
|
107
|
+
navigation: {
|
|
108
|
+
...defaults.navigation,
|
|
109
|
+
...userConfig.navigation,
|
|
110
|
+
sidebar: { ...defaults.navigation?.sidebar, ...userConfig.navigation?.sidebar },
|
|
111
|
+
},
|
|
112
|
+
theme: { ...defaults.theme, ...userConfig.theme },
|
|
113
|
+
shiki: {
|
|
114
|
+
...defaults.shiki,
|
|
115
|
+
...userConfig.shiki,
|
|
116
|
+
themes: { ...defaults.shiki?.themes, ...userConfig.shiki?.themes },
|
|
117
|
+
},
|
|
118
|
+
search: { ...defaults.search, ...userConfig.search },
|
|
119
|
+
};
|
|
120
|
+
export default config;
|
|
121
|
+
`;
|
|
122
|
+
}
|
|
123
|
+
if (id === RESOLVED_TREE_ID) {
|
|
124
|
+
cachedPages = await scanContent(docsDir);
|
|
125
|
+
const directories = await scanContentDirectories(docsDir);
|
|
126
|
+
const tree = buildSidebarTree(cachedPages, directories);
|
|
127
|
+
return `
|
|
128
|
+
export const pages = ${JSON.stringify(cachedPages)};
|
|
129
|
+
export const tree = ${JSON.stringify(tree)};
|
|
130
|
+
export default { pages, tree };
|
|
131
|
+
`;
|
|
132
|
+
}
|
|
133
|
+
if (id === RESOLVED_ROUTES_ID) {
|
|
134
|
+
cachedPages = await scanContent(docsDir);
|
|
135
|
+
const routeEntries = cachedPages.map((page) => {
|
|
136
|
+
// Normalize file path for ESM import
|
|
137
|
+
const escapedPath = JSON.stringify(page.filePath);
|
|
138
|
+
const escapedUrl = JSON.stringify(page.url);
|
|
139
|
+
return ` ${escapedUrl}: () => import(${escapedPath})`;
|
|
140
|
+
});
|
|
141
|
+
return `
|
|
142
|
+
export const routes = {
|
|
143
|
+
${routeEntries.join(",\n")}
|
|
144
|
+
};
|
|
145
|
+
export default routes;
|
|
146
|
+
`;
|
|
147
|
+
}
|
|
148
|
+
if (id === RESOLVED_THEME_ID) {
|
|
149
|
+
const configuredPath = resolvedConfig.theme?.path;
|
|
150
|
+
if (!configuredPath) {
|
|
151
|
+
const defaultEntry = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../themes/default/index.js");
|
|
152
|
+
return `import defaultTheme from ${JSON.stringify(defaultEntry)}; export const theme = defaultTheme; export default theme;`;
|
|
153
|
+
}
|
|
154
|
+
const requestedPath = path.resolve(options.configRoot || rootDir, configuredPath);
|
|
155
|
+
const candidates = [
|
|
156
|
+
requestedPath,
|
|
157
|
+
path.join(requestedPath, "index.ts"),
|
|
158
|
+
path.join(requestedPath, "index.tsx"),
|
|
159
|
+
path.join(requestedPath, "index.js"),
|
|
160
|
+
path.join(requestedPath, "index.jsx"),
|
|
161
|
+
];
|
|
162
|
+
const themeEntry = candidates.find((candidate) => fs.existsSync(candidate));
|
|
163
|
+
if (!themeEntry)
|
|
164
|
+
throw new Error(`[nikala-docs] Theme path does not exist: ${requestedPath}`);
|
|
165
|
+
return `import configuredTheme from ${JSON.stringify(themeEntry)}; export const theme = configuredTheme.default || configuredTheme; export default theme;`;
|
|
166
|
+
}
|
|
167
|
+
return null;
|
|
168
|
+
},
|
|
169
|
+
async transform(code, id, transformOptions) {
|
|
170
|
+
// Inject Tailwind v4 @source directives into style.css
|
|
171
|
+
if (id.endsWith("style.css")) {
|
|
172
|
+
const sources = [];
|
|
173
|
+
const bundledCoreSource = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../vendor/core-src");
|
|
174
|
+
if (fs.existsSync(bundledCoreSource))
|
|
175
|
+
sources.push(bundledCoreSource);
|
|
176
|
+
sources.push(path.resolve(rootDir, "src"));
|
|
177
|
+
const themesDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../themes");
|
|
178
|
+
if (fs.existsSync(themesDir)) {
|
|
179
|
+
sources.push(themesDir);
|
|
180
|
+
}
|
|
181
|
+
if (docsDir && fs.existsSync(docsDir)) {
|
|
182
|
+
sources.push(docsDir);
|
|
183
|
+
}
|
|
184
|
+
const sourceDirectives = sources
|
|
185
|
+
.filter(Boolean)
|
|
186
|
+
.map((src) => `@source "${src}";`)
|
|
187
|
+
.join("\n");
|
|
188
|
+
return {
|
|
189
|
+
code: `@import "tailwindcss";\n${sourceDirectives}\n${code.replace('@import "tailwindcss";', "")}`,
|
|
190
|
+
map: null,
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
// Compile Markdown / MDX files to SolidJS JSX
|
|
194
|
+
if (/\.(md|mdx)$/.test(id)) {
|
|
195
|
+
const isSsr = Boolean(transformOptions?.ssr);
|
|
196
|
+
const result = await compileMdx(code, {
|
|
197
|
+
filePath: id,
|
|
198
|
+
development: !isSsr && process.env.NODE_ENV !== "production",
|
|
199
|
+
shiki: resolvedConfig.shiki,
|
|
200
|
+
});
|
|
201
|
+
return {
|
|
202
|
+
code: result.code,
|
|
203
|
+
map: null,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
return null;
|
|
207
|
+
},
|
|
208
|
+
configureServer(server) {
|
|
209
|
+
// Vite's root is the packaged client directory, so the consuming
|
|
210
|
+
// project's config/content files are outside its default watch scope.
|
|
211
|
+
// Register them explicitly for dev reloads.
|
|
212
|
+
const configFiles = [...CONFIG_FILENAMES]
|
|
213
|
+
.map((filename) => path.join(rootDir, filename))
|
|
214
|
+
.filter((file) => fs.existsSync(file));
|
|
215
|
+
if (configFiles.length)
|
|
216
|
+
server.watcher.add(configFiles);
|
|
217
|
+
if (docsDir && fs.existsSync(docsDir))
|
|
218
|
+
server.watcher.add(docsDir);
|
|
219
|
+
let reloadTimer;
|
|
220
|
+
const invalidateVirtualModules = (includeConfig = false) => {
|
|
221
|
+
const modTree = server.moduleGraph.getModuleById(RESOLVED_TREE_ID);
|
|
222
|
+
const modRoutes = server.moduleGraph.getModuleById(RESOLVED_ROUTES_ID);
|
|
223
|
+
if (modTree)
|
|
224
|
+
server.moduleGraph.invalidateModule(modTree);
|
|
225
|
+
if (modRoutes)
|
|
226
|
+
server.moduleGraph.invalidateModule(modRoutes);
|
|
227
|
+
if (includeConfig) {
|
|
228
|
+
const modConfig = server.moduleGraph.getModuleById(RESOLVED_CONFIG_ID);
|
|
229
|
+
const modTheme = server.moduleGraph.getModuleById(RESOLVED_THEME_ID);
|
|
230
|
+
if (modConfig)
|
|
231
|
+
server.moduleGraph.invalidateModule(modConfig);
|
|
232
|
+
if (modTheme)
|
|
233
|
+
server.moduleGraph.invalidateModule(modTheme);
|
|
234
|
+
}
|
|
235
|
+
if (reloadTimer)
|
|
236
|
+
clearTimeout(reloadTimer);
|
|
237
|
+
reloadTimer = setTimeout(() => {
|
|
238
|
+
reloadTimer = undefined;
|
|
239
|
+
server.ws.send({ type: "full-reload" });
|
|
240
|
+
}, 75);
|
|
241
|
+
};
|
|
242
|
+
// Watch content directory for file additions or removals
|
|
243
|
+
server.watcher.on("add", (file) => {
|
|
244
|
+
if (/\.(md|mdx)$/.test(file)) {
|
|
245
|
+
invalidateVirtualModules();
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
server.watcher.on("unlink", (file) => {
|
|
249
|
+
if (/\.(md|mdx)$/.test(file)) {
|
|
250
|
+
invalidateVirtualModules();
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
server.watcher.on("change", async (file) => {
|
|
254
|
+
if (/\.(md|mdx)$/.test(file)) {
|
|
255
|
+
invalidateVirtualModules();
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
if (CONFIG_FILENAMES.has(path.basename(file))) {
|
|
259
|
+
if (!options.config) {
|
|
260
|
+
resolvedConfig = await loadConfig(rootDir);
|
|
261
|
+
if (resolvedConfig.contentDir) {
|
|
262
|
+
docsDir = path.resolve(rootDir, resolvedConfig.contentDir);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
invalidateVirtualModules(true);
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
},
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/server/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC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,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;gBACzC,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;oBAC7B,wBAAwB,EAAE,CAAC;oBAC3B,OAAO;gBACT,CAAC;gBACD,IAAI,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;oBAC9C,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;wBACpB,cAAc,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC;wBAC3C,IAAI,cAAc,CAAC,UAAU,EAAE,CAAC;4BAC9B,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;wBAC7D,CAAC;oBACH,CAAC;oBACD,wBAAwB,CAAC,IAAI,CAAC,CAAC;gBACjC,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../../src/themes/default/content/breadcrumbs.tsx"],"names":[],"mappings":"AACA,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAOjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,eAAO,MAAM,eAAe,EAAE,SAAS,CAAC,oBAAoB,CA6B3D,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// packages/docs/src/themes/default/content/breadcrumbs.tsx
|
|
2
|
+
import { For, Show, splitProps } from "solid-js";
|
|
3
|
+
import { Breadcrumb } from "@/components/ui/breadcrumb";
|
|
4
|
+
import { BreadcrumbList } from "@/components/ui/breadcrumb";
|
|
5
|
+
import { BreadcrumbItem } from "@/components/ui/breadcrumb";
|
|
6
|
+
import { BreadcrumbLink } from "@/components/ui/breadcrumb";
|
|
7
|
+
import { BreadcrumbSeparator } from "@/components/ui/breadcrumb";
|
|
8
|
+
import { BreadcrumbPage } from "@/components/ui/breadcrumb";
|
|
9
|
+
export const DocsBreadcrumbs = (props) => {
|
|
10
|
+
const [local, rest] = splitProps(props, ["items", "class"]);
|
|
11
|
+
return (<Breadcrumb class={local.class} {...rest}>
|
|
12
|
+
<BreadcrumbList>
|
|
13
|
+
<For each={local.items}>
|
|
14
|
+
{(item, index) => {
|
|
15
|
+
const isLast = () => index() === local.items.length - 1;
|
|
16
|
+
return (<>
|
|
17
|
+
<BreadcrumbItem>
|
|
18
|
+
<Show when={!isLast() && item.href} fallback={<BreadcrumbPage>{item.title}</BreadcrumbPage>}>
|
|
19
|
+
<BreadcrumbLink href={item.href}>{item.title}</BreadcrumbLink>
|
|
20
|
+
</Show>
|
|
21
|
+
</BreadcrumbItem>
|
|
22
|
+
<Show when={!isLast()}>
|
|
23
|
+
<BreadcrumbSeparator />
|
|
24
|
+
</Show>
|
|
25
|
+
</>);
|
|
26
|
+
}}
|
|
27
|
+
</For>
|
|
28
|
+
</BreadcrumbList>
|
|
29
|
+
</Breadcrumb>);
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=breadcrumbs.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumbs.jsx","sourceRoot":"","sources":["../../../../src/themes/default/content/breadcrumbs.tsx"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,UAAU,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,M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AAc,CAClB;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Component } from "solid-js";
|
|
2
|
+
import type { DocsPagerProps } from "../../types.js";
|
|
3
|
+
export declare const DocsPager: Component<DocsPagerProps>;
|
|
4
|
+
export declare const DocsPagination: Component<import("../../types.js").DocsPaginationProps>;
|
|
5
|
+
//# sourceMappingURL=pager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pager.d.ts","sourceRoot":"","sources":["../../../../src/themes/default/content/pager.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAEtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,eAAO,MAAM,SAAS,EAAE,SAAS,CAAC,cAAc,CAW/C,CAAC;AAEF,eAAO,MAAM,cAAc,yDAAY,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// packages/docs/src/themes/default/content/pager.tsx
|
|
2
|
+
import { splitProps } from "solid-js";
|
|
3
|
+
import { Pager as CorePager } from "@/components/ui/pager";
|
|
4
|
+
export const DocsPager = (props) => {
|
|
5
|
+
const [local, rest] = splitProps(props, ["prev", "next", "class"]);
|
|
6
|
+
return (<CorePager prev={local.prev} next={local.next} class={local.class} {...rest}/>);
|
|
7
|
+
};
|
|
8
|
+
export const DocsPagination = DocsPager;
|
|
9
|
+
//# sourceMappingURL=pager.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pager.jsx","sourceRoot":"","sources":["../../../../src/themes/default/content/pager.tsx"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,OAAO,EAAE,UAAU,EAAkB,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAG3D,MAAM,CAAC,MAAM,SAAS,GAA8B,CAAC,KAAK,EAAE,EAAE;IAC5D,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAEnE,OAAO,CACL,CAAC,SAAS,CACR,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CACjB,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CACjB,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CACnB,IAAI,IAAI,CAAC,EACT,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-of-contents.d.ts","sourceRoot":"","sources":["../../../../src/themes/default/content/table-of-contents.tsx"],"names":[],"mappings":"AACA,OAAO,EAA2C,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAEnF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE/D,eAAO,MAAM,mBAAmB,EAAE,SAAS,CAAC,wBAAwB,CAwBnE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// packages/docs/src/themes/default/content/table-of-contents.tsx
|
|
2
|
+
import { createSignal, onMount, Show, splitProps } from "solid-js";
|
|
3
|
+
import { TableOfContents as CoreTableOfContents } from "@/components/ui/table-of-contents";
|
|
4
|
+
export const DocsTableOfContents = (props) => {
|
|
5
|
+
const [local, rest] = splitProps(props, ["items", "title", "class"]);
|
|
6
|
+
const [ready, setReady] = createSignal(false);
|
|
7
|
+
onMount(() => {
|
|
8
|
+
if (typeof window === "undefined") {
|
|
9
|
+
setReady(true);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const frame = window.requestAnimationFrame(() => setReady(true));
|
|
13
|
+
return () => window.cancelAnimationFrame(frame);
|
|
14
|
+
});
|
|
15
|
+
return (<Show when={ready()}>
|
|
16
|
+
<CoreTableOfContents items={local.items} title={local.title ?? "On this page"} class={local.class} {...rest}/>
|
|
17
|
+
</Show>);
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=table-of-contents.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-of-contents.jsx","sourceRoot":"","sources":["../../../../src/themes/default/content/table-of-contents.tsx"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,UAAU,CAAC;AACnF,OAAO,EAAE,eAAe,IAAI,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAG3F,MAAM,CAAC,MAAM,mBAAmB,GAAwC,CAAC,KAAK,EAAE,EAAE;IAChF,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IACrE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IAE9C,OAAO,CAAC,GAAG,EAAE;QACX,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACf,OAAO;QACT,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,qBAAqB,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QACjE,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,OAAO,CACL,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAClB;MAAA,CAAC,mBAAmB,CAClB,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CACnB,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,cAAc,CAAC,CACrC,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CACnB,IAAI,IAAI,CAAC,EAEb;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./layout.jsx";
|
|
2
|
+
export * from "./navbar.jsx";
|
|
3
|
+
export * from "./sidebar.jsx";
|
|
4
|
+
export * from "./content/table-of-contents.jsx";
|
|
5
|
+
export * from "./content/breadcrumbs.jsx";
|
|
6
|
+
export * from "./content/pager.jsx";
|
|
7
|
+
export * from "./overlays/search-dialog.jsx";
|
|
8
|
+
import type { DocsThemeContract } from "../types.js";
|
|
9
|
+
export declare const defaultTheme: DocsThemeContract;
|
|
10
|
+
export default defaultTheme;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/themes/default/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAU7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,YAAY,EAAE,iBAW1B,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// packages/docs/src/themes/default/index.ts
|
|
2
|
+
export * from "./layout.jsx";
|
|
3
|
+
export * from "./navbar.jsx";
|
|
4
|
+
export * from "./sidebar.jsx";
|
|
5
|
+
export * from "./content/table-of-contents.jsx";
|
|
6
|
+
export * from "./content/breadcrumbs.jsx";
|
|
7
|
+
export * from "./content/pager.jsx";
|
|
8
|
+
export * from "./overlays/search-dialog.jsx";
|
|
9
|
+
import { DocsLayout } from "./layout.jsx";
|
|
10
|
+
import { DocsNavbar } from "./navbar.jsx";
|
|
11
|
+
import { DocsSidebar } from "./sidebar.jsx";
|
|
12
|
+
import { DocsTableOfContents } from "./content/table-of-contents.jsx";
|
|
13
|
+
import { DocsBreadcrumbs } from "./content/breadcrumbs.jsx";
|
|
14
|
+
import { DocsPager, DocsPagination } from "./content/pager.jsx";
|
|
15
|
+
import { DocsSearchDialog } from "./overlays/search-dialog.jsx";
|
|
16
|
+
import { ThemeProvider } from "@/providers/theme-provider";
|
|
17
|
+
export const defaultTheme = {
|
|
18
|
+
name: "default",
|
|
19
|
+
Provider: ThemeProvider,
|
|
20
|
+
Layout: DocsLayout,
|
|
21
|
+
Navbar: DocsNavbar,
|
|
22
|
+
Sidebar: DocsSidebar,
|
|
23
|
+
TableOfContents: DocsTableOfContents,
|
|
24
|
+
Breadcrumbs: DocsBreadcrumbs,
|
|
25
|
+
Pagination: DocsPagination,
|
|
26
|
+
Pager: DocsPager,
|
|
27
|
+
SearchDialog: DocsSearchDialog,
|
|
28
|
+
};
|
|
29
|
+
export default defaultTheme;
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/themes/default/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,MAAM,CAAC,MAAM,YAAY,GAAsB;IAC7C,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,aAAa;IACvB,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,UAAU;IAClB,OAAO,EAAE,WAAW;IACpB,eAAe,EAAE,mBAAmB;IACpC,WAAW,EAAE,eAAe;IAC5B,UAAU,EAAE,cAAc;IAC1B,KAAK,EAAE,SAAS;IAChB,YAAY,EAAE,gBAAgB;CAC/B,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/themes/default/layout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkC,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAYhF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,eAAe,CAqFvD,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// packages/docs/src/themes/default/layout.tsx
|
|
2
|
+
import { createSignal, Show, splitProps } from "solid-js";
|
|
3
|
+
import { SidebarProvider } from "@/components/ui/sidebar";
|
|
4
|
+
import { SidebarInset } from "@/components/ui/sidebar";
|
|
5
|
+
import { Container } from "@/components/ui/container";
|
|
6
|
+
import { SectionHeading } from "@/components/ui/section-heading";
|
|
7
|
+
import { DocsNavbar } from "./navbar.jsx";
|
|
8
|
+
import { DocsSidebar } from "./sidebar.jsx";
|
|
9
|
+
import { DocsBreadcrumbs } from "./content/breadcrumbs.jsx";
|
|
10
|
+
import { DocsPager } from "./content/pager.jsx";
|
|
11
|
+
import { DocsTableOfContents } from "./content/table-of-contents.jsx";
|
|
12
|
+
import { DocsMobileTableOfContents } from "./navigation/mobile-table-of-contents.jsx";
|
|
13
|
+
import { DocsSearchDialog } from "./overlays/search-dialog.jsx";
|
|
14
|
+
export const DocsLayout = (props) => {
|
|
15
|
+
const [local, rest] = splitProps(props, [
|
|
16
|
+
"config",
|
|
17
|
+
"tree",
|
|
18
|
+
"currentPage",
|
|
19
|
+
"breadcrumbs",
|
|
20
|
+
"toc",
|
|
21
|
+
"prev",
|
|
22
|
+
"next",
|
|
23
|
+
"children",
|
|
24
|
+
"class",
|
|
25
|
+
]);
|
|
26
|
+
const [searchOpen, setSearchOpen] = createSignal(false);
|
|
27
|
+
const currentUrl = () => local.currentPage?.url;
|
|
28
|
+
const showToc = () => Boolean(local.toc &&
|
|
29
|
+
local.toc.length > 0 &&
|
|
30
|
+
local.currentPage?.frontmatter?.toc !== false);
|
|
31
|
+
const sidebarLayout = () => local.config.navigation?.layout !== "top";
|
|
32
|
+
const sidebarHeader = () => local.config.navigation?.sidebar?.header !== false;
|
|
33
|
+
const sidebarFooter = () => local.config.navigation?.sidebar?.footer !== false;
|
|
34
|
+
const sidebar = () => (<DocsSidebar tree={local.tree} currentUrl={currentUrl()} title={local.config.title} logo={local.config.logo} headerSubtitle={local.config.navigation?.sidebar?.headerSubtitle} footerText={local.config.navigation?.sidebar?.footerText} showHeader={sidebarHeader()} showFooter={sidebarFooter()}/>);
|
|
35
|
+
const content = () => (<SidebarInset class={local.class} {...rest}>
|
|
36
|
+
<Container as="main" size="2xl" class="flex-1 flex gap-4 sm:gap-8 py-6 sm:py-8">
|
|
37
|
+
<Container as="article" size="xl" class="flex-1 min-w-0 px-0 sm:px-4 w-full">
|
|
38
|
+
<Show when={local.breadcrumbs && local.breadcrumbs.length > 0}>
|
|
39
|
+
<DocsBreadcrumbs items={local.breadcrumbs} class="mb-6"/>
|
|
40
|
+
</Show>
|
|
41
|
+
<Show when={local.currentPage?.title}>
|
|
42
|
+
<SectionHeading variant="page" title={local.currentPage.title} description={local.currentPage?.description} class="mb-8"/>
|
|
43
|
+
</Show>
|
|
44
|
+
<Show when={showToc()}>
|
|
45
|
+
<DocsMobileTableOfContents items={local.toc} class="mb-6"/>
|
|
46
|
+
</Show>
|
|
47
|
+
<Container as="div" size="full" class="prose prose-zinc dark:prose-invert max-w-none px-0 sm:px-0 lg:px-0">
|
|
48
|
+
{local.children}
|
|
49
|
+
</Container>
|
|
50
|
+
<Show when={local.prev || local.next}>
|
|
51
|
+
<DocsPager prev={local.prev} next={local.next}/>
|
|
52
|
+
</Show>
|
|
53
|
+
</Container>
|
|
54
|
+
<Show when={showToc() && local.currentPage?.url} keyed>
|
|
55
|
+
<Container as="aside" size="sm" class="hidden xl:block w-64 shrink-0 px-0 sticky top-14 z-10 h-fit max-h-[calc(100vh-3.5rem)] overflow-hidden bg-background">
|
|
56
|
+
<DocsTableOfContents items={local.toc} class="max-h-[calc(100vh-3.5rem)]"/>
|
|
57
|
+
</Container>
|
|
58
|
+
</Show>
|
|
59
|
+
</Container>
|
|
60
|
+
<DocsSearchDialog open={searchOpen()} onOpenChange={setSearchOpen}/>
|
|
61
|
+
</SidebarInset>);
|
|
62
|
+
return (<SidebarProvider defaultOpen={true} class="min-h-screen w-full items-stretch">
|
|
63
|
+
<Show when={sidebarLayout()} fallback={<div class="flex min-h-screen min-w-0 flex-1 flex-col">
|
|
64
|
+
<DocsNavbar config={local.config} showBrand={true} onOpenSearch={() => setSearchOpen(true)}/>
|
|
65
|
+
<div class="flex min-h-0 flex-1 items-start">{sidebar()}{content()}</div>
|
|
66
|
+
</div>}>
|
|
67
|
+
{sidebar()}
|
|
68
|
+
<div class="flex min-h-screen min-w-0 flex-1 flex-col">
|
|
69
|
+
<DocsNavbar config={local.config} showBrand={false} onOpenSearch={() => setSearchOpen(true)}/>
|
|
70
|
+
{content()}
|
|
71
|
+
</div>
|
|
72
|
+
</Show>
|
|
73
|
+
</SidebarProvider>);
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=layout.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.jsx","sourceRoot":"","sources":["../../../src/themes/default/layout.tsx"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAwB,MAAM,UAAU,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,MAAM,CAAC,MAAM,UAAU,GAAqC,CAAC,KAAK,EAAE,EAAE;IACpE,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE;QACtC,QAAQ;QACR,MAAM;QACN,aAAa;QACb,aAAa;QACb,KAAK;QACL,MAAM;QACN,MAAM;QACN,UAAU;QACV,OAAO;KACR,CAAC,CAAC;IAEH,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IAExD,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC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ACV;QAAA,CAAC,GAAG,CAAC,KAAK,CAAC,2CAA2C,CACpD;UAAA,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,EAC5F;UAAA,CAAC,OAAO,EAAE,CACZ;QAAA,EAAE,GAAG,CACP;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../../../src/themes/default/navbar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAe5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,UAAU,EAAE,SAAS,CAAC,eAAe,CAuFjD,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// packages/docs/src/themes/default/navbar.tsx
|
|
2
|
+
import { Show, splitProps } from "solid-js";
|
|
3
|
+
import { Navbar } from "@/components/ui/navbar";
|
|
4
|
+
import { NavbarContainer } from "@/components/ui/navbar";
|
|
5
|
+
import { NavbarBrand } from "@/components/ui/navbar";
|
|
6
|
+
import { NavbarContent } from "@/components/ui/navbar";
|
|
7
|
+
import { NavbarItem } from "@/components/ui/navbar";
|
|
8
|
+
import { Button } from "@/components/ui/button";
|
|
9
|
+
import { buttonVariants } from "@/components/ui/button";
|
|
10
|
+
import { Kbd } from "@/components/ui/kbd";
|
|
11
|
+
import { SidebarTrigger } from "@/components/ui/sidebar";
|
|
12
|
+
import { useSidebar } from "@/components/ui/sidebar";
|
|
13
|
+
import { ThemeToggle } from "@/components/ui/theme-toggle";
|
|
14
|
+
import { Logo } from "@/components/ui/logo";
|
|
15
|
+
import { Search } from "lucide-solid";
|
|
16
|
+
export const DocsNavbar = (props) => {
|
|
17
|
+
const [local, rest] = splitProps(props, ["config", "onOpenSearch", "showBrand", "class"]);
|
|
18
|
+
const title = () => local.config.title || "Nikala Docs";
|
|
19
|
+
const logoText = () => local.config.logo?.text || title();
|
|
20
|
+
const logoHref = () => local.config.logo?.href || "/";
|
|
21
|
+
const repoUrl = () => local.config.repository?.url;
|
|
22
|
+
const sidebar = useSidebar();
|
|
23
|
+
return (<Navbar variant="default" maxWidth="full" isSticky={true} class={local.class} {...rest}>
|
|
24
|
+
<NavbarContainer class="h-14 px-4 sm:px-6">
|
|
25
|
+
<NavbarContent justify="start" class="gap-3">
|
|
26
|
+
<SidebarTrigger aria-label="Toggle documentation sidebar" onClick={() => {
|
|
27
|
+
if (sidebar.isMobile())
|
|
28
|
+
sidebar.setOpenMobile(!sidebar.openMobile());
|
|
29
|
+
}}/>
|
|
30
|
+
<Show when={local.showBrand !== false}>
|
|
31
|
+
<NavbarBrand href={logoHref()} class="text-base font-bold tracking-tight">
|
|
32
|
+
<Show when={local.config.logo?.image} fallback={<Logo class="size-6"/>}>
|
|
33
|
+
{(img) => <img src={img()} alt={logoText()} class="size-6 object-contain"/>}
|
|
34
|
+
</Show>
|
|
35
|
+
<span>{logoText()}</span>
|
|
36
|
+
</NavbarBrand>
|
|
37
|
+
</Show>
|
|
38
|
+
</NavbarContent>
|
|
39
|
+
|
|
40
|
+
<NavbarContent justify="end" class="gap-2">
|
|
41
|
+
{/* Search Trigger Button */}
|
|
42
|
+
<Show when={local.config.search?.enabled !== false && local.onOpenSearch}>
|
|
43
|
+
<NavbarItem>
|
|
44
|
+
<Button variant="outline" size="sm" onClick={() => local.onOpenSearch?.()} class="hidden sm:inline-flex text-muted-foreground w-48 sm:w-64 justify-between h-8 text-xs font-normal">
|
|
45
|
+
<span class="inline-flex items-center gap-2">
|
|
46
|
+
<Search class="size-3.5"/>
|
|
47
|
+
<span>Search docs...</span>
|
|
48
|
+
</span>
|
|
49
|
+
<Kbd size="sm">⌘K</Kbd>
|
|
50
|
+
</Button>
|
|
51
|
+
<Button variant="ghost" size="sm" onClick={() => local.onOpenSearch?.()} class="sm:hidden p-2" aria-label="Search docs">
|
|
52
|
+
<Search class="size-4"/>
|
|
53
|
+
</Button>
|
|
54
|
+
</NavbarItem>
|
|
55
|
+
</Show>
|
|
56
|
+
|
|
57
|
+
{/* GitHub Repository Link */}
|
|
58
|
+
<Show when={repoUrl()}>
|
|
59
|
+
{(url) => (<NavbarItem>
|
|
60
|
+
<a href={url()} target="_blank" rel="noreferrer" class={buttonVariants({ variant: "ghost", size: "sm" }) + " hidden sm:inline-flex h-8 px-2 text-xs"}>
|
|
61
|
+
GitHub
|
|
62
|
+
</a>
|
|
63
|
+
</NavbarItem>)}
|
|
64
|
+
</Show>
|
|
65
|
+
|
|
66
|
+
{/* Theme Toggle */}
|
|
67
|
+
<NavbarItem>
|
|
68
|
+
<ThemeToggle />
|
|
69
|
+
</NavbarItem>
|
|
70
|
+
</NavbarContent>
|
|
71
|
+
</NavbarContainer>
|
|
72
|
+
</Navbar>);
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=navbar.jsx.map
|