livemark 0.7.2 → 0.8.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/package.json +14 -14
- package/source/actions/changelog/build.ts +245 -0
- package/source/actions/changelog/build.unit.ts +69 -0
- package/source/actions/config/define.ts +11 -0
- package/source/actions/config/define.unit.ts +33 -0
- package/source/actions/config/load.ts +22 -0
- package/source/actions/config/load.unit.ts +30 -0
- package/source/commands/build.ts +21 -0
- package/source/commands/escape.ts +77 -0
- package/source/commands/preview.ts +25 -0
- package/source/commands/start.ts +26 -0
- package/{build/website → source}/components/Article.tsx +12 -2
- package/{build/website → source}/components/Callout.tsx +1 -1
- package/{build/website → source}/components/Layout.tsx +3 -14
- package/{build/website → source}/components/LinkButton.tsx +1 -1
- package/{build/website → source}/components/PageToolbar.tsx +21 -8
- package/{build/website → source}/components/Section.tsx +1 -1
- package/{build/website → source}/components/SectionHeader.tsx +1 -1
- package/{build/website/components/MiniSidebar.tsx → source/components/Sidebar.tsx} +21 -5
- package/{build/website/components/Sidebar.tsx → source/components/SidebarArticles.tsx} +22 -55
- package/source/components/SidebarPosts.tsx +129 -0
- package/source/components/SidebarReleases.tsx +85 -0
- package/{build/website → source}/content-collections.ts +2 -2
- package/{build/website → source}/elements/accordion.tsx +1 -1
- package/{build/website → source}/elements/alert-dialog.tsx +1 -1
- package/{build/website → source}/elements/alert.tsx +1 -1
- package/{build/website → source}/elements/aspect-ratio.tsx +1 -1
- package/{build/website → source}/elements/avatar.tsx +1 -1
- package/{build/website → source}/elements/badge.tsx +1 -1
- package/{build/website → source}/elements/breadcrumb.tsx +1 -1
- package/{build/website → source}/elements/button-group.tsx +1 -1
- package/{build/website → source}/elements/button.tsx +1 -1
- package/{build/website → source}/elements/calendar.tsx +1 -1
- package/{build/website → source}/elements/card.tsx +1 -1
- package/{build/website → source}/elements/carousel.tsx +1 -1
- package/{build/website → source}/elements/chart.tsx +1 -1
- package/{build/website → source}/elements/checkbox.tsx +1 -1
- package/{build/website → source}/elements/command.tsx +1 -1
- package/{build/website → source}/elements/context-menu.tsx +1 -1
- package/{build/website → source}/elements/dialog.tsx +1 -1
- package/{build/website → source}/elements/drawer.tsx +1 -1
- package/{build/website → source}/elements/dropdown-menu.tsx +1 -1
- package/{build/website → source}/elements/empty.tsx +1 -1
- package/{build/website → source}/elements/field.tsx +1 -1
- package/{build/website → source}/elements/hover-card.tsx +1 -1
- package/{build/website → source}/elements/input-group.tsx +1 -1
- package/{build/website → source}/elements/input-otp.tsx +1 -1
- package/{build/website → source}/elements/input.tsx +1 -1
- package/{build/website → source}/elements/item.tsx +1 -1
- package/{build/website → source}/elements/kbd.tsx +1 -1
- package/{build/website → source}/elements/label.tsx +1 -1
- package/{build/website → source}/elements/menubar.tsx +1 -1
- package/{build/website → source}/elements/native-select.tsx +1 -1
- package/{build/website → source}/elements/navigation-menu.tsx +1 -1
- package/{build/website → source}/elements/pagination.tsx +1 -1
- package/{build/website → source}/elements/popover.tsx +1 -1
- package/{build/website → source}/elements/progress.tsx +1 -1
- package/{build/website → source}/elements/radio-group.tsx +1 -1
- package/{build/website → source}/elements/resizable.tsx +1 -1
- package/{build/website → source}/elements/scroll-area.tsx +1 -1
- package/{build/website → source}/elements/select.tsx +1 -1
- package/{build/website → source}/elements/separator.tsx +1 -1
- package/{build/website → source}/elements/sheet.tsx +1 -1
- package/{build/website → source}/elements/sidebar.tsx +7 -4
- package/{build/website → source}/elements/skeleton.tsx +1 -1
- package/{build/website → source}/elements/slider.tsx +1 -1
- package/{build/website → source}/elements/spinner.tsx +1 -1
- package/{build/website → source}/elements/switch.tsx +1 -1
- package/{build/website → source}/elements/table.tsx +1 -1
- package/{build/website → source}/elements/tabs.tsx +1 -1
- package/{build/website → source}/elements/textarea.tsx +1 -1
- package/{build/website → source}/elements/toggle-group.tsx +1 -1
- package/{build/website → source}/elements/toggle.tsx +1 -1
- package/{build/website → source}/elements/tooltip.tsx +1 -1
- package/source/entrypoints/main.ts +12 -0
- package/{build/website → source}/env.d.ts +1 -1
- package/source/helpers/program.ts +6 -0
- package/{build/website → source}/helpers/section.ts +1 -1
- package/source/hooks/media.ts +29 -0
- package/source/index.ts +1 -0
- package/{build/website → source}/models/article.ts +4 -0
- package/source/models/config.ts +51 -0
- package/source/models/link.ts +11 -0
- package/source/models/patch.ts +9 -0
- package/source/models/section.ts +45 -0
- package/source/models/theme.ts +74 -0
- package/source/program.ts +18 -0
- package/source/settings.ts +6 -0
- package/{build/website → source}/vite.config.ts +3 -3
- package/{build → target}/actions/changelog/build.d.ts +1 -0
- package/target/actions/changelog/build.js +187 -0
- package/target/actions/changelog/build.unit.js +66 -0
- package/target/actions/config/define.js +8 -0
- package/target/actions/config/define.unit.js +29 -0
- package/target/actions/config/load.js +25 -0
- package/target/actions/config/load.unit.js +23 -0
- package/target/client.d.ts +1 -0
- package/target/client.js +6 -0
- package/target/commands/build.js +14 -0
- package/target/commands/escape.js +56 -0
- package/target/commands/preview.js +18 -0
- package/target/commands/start.js +19 -0
- package/target/components/Abbr.d.ts +5 -0
- package/target/components/Abbr.js +9 -0
- package/target/components/AnsiCode.d.ts +4 -0
- package/target/components/AnsiCode.js +6 -0
- package/target/components/Article.d.ts +5 -0
- package/target/components/Article.js +105 -0
- package/target/components/BackToTop.d.ts +3 -0
- package/target/components/BackToTop.js +19 -0
- package/target/components/Banner.d.ts +2 -0
- package/target/components/Banner.js +12 -0
- package/target/components/BlogIndex.d.ts +4 -0
- package/target/components/BlogIndex.js +62 -0
- package/target/components/Breadcrumbs.d.ts +1 -0
- package/target/components/Breadcrumbs.js +13 -0
- package/target/components/Callout.d.ts +8 -0
- package/target/components/Callout.js +43 -0
- package/target/components/Card.d.ts +7 -0
- package/target/components/Card.js +17 -0
- package/target/components/Cards.d.ts +4 -0
- package/target/components/Cards.js +6 -0
- package/target/components/ChangelogIndex.d.ts +4 -0
- package/target/components/ChangelogIndex.js +57 -0
- package/target/components/CodeBlock.d.ts +1 -0
- package/target/components/CodeBlock.js +47 -0
- package/target/components/CodeTabs.d.ts +6 -0
- package/target/components/CodeTabs.js +49 -0
- package/target/components/Column.d.ts +4 -0
- package/target/components/Column.js +6 -0
- package/target/components/Columns.d.ts +5 -0
- package/target/components/Columns.js +10 -0
- package/target/components/Content.d.ts +3 -0
- package/target/components/Content.js +5 -0
- package/target/components/ContentTab.d.ts +5 -0
- package/target/components/ContentTab.js +6 -0
- package/target/components/ContentTabs.d.ts +5 -0
- package/target/components/ContentTabs.js +47 -0
- package/target/components/DefaultCatchBoundary.d.ts +2 -0
- package/target/components/DefaultCatchBoundary.js +20 -0
- package/target/components/DefinitionList.d.ts +7 -0
- package/target/components/DefinitionList.js +14 -0
- package/target/components/Details.d.ts +5 -0
- package/target/components/Details.js +13 -0
- package/target/components/FileTree.d.ts +4 -0
- package/target/components/FileTree.js +17 -0
- package/target/components/Footer.d.ts +2 -0
- package/target/components/Footer.js +9 -0
- package/target/components/FootnoteRef.d.ts +3 -0
- package/target/components/FootnoteRef.js +31 -0
- package/target/components/Heading.d.ts +8 -0
- package/target/components/Heading.js +18 -0
- package/target/components/InlineBadge.d.ts +5 -0
- package/target/components/InlineBadge.js +7 -0
- package/target/components/InlineIcon.d.ts +5 -0
- package/target/components/InlineIcon.js +10 -0
- package/target/components/InlineToc.d.ts +4 -0
- package/target/components/InlineToc.js +14 -0
- package/target/components/Layout.d.ts +4 -0
- package/target/components/Layout.js +65 -0
- package/target/components/LinkButton.d.ts +7 -0
- package/target/components/LinkButton.js +11 -0
- package/target/components/Mermaid.d.ts +4 -0
- package/target/components/Mermaid.js +8 -0
- package/target/components/MermaidRenderer.d.ts +4 -0
- package/target/components/MermaidRenderer.js +32 -0
- package/target/components/NotFound.d.ts +3 -0
- package/target/components/NotFound.js +10 -0
- package/target/components/PackageTabs.d.ts +9 -0
- package/target/components/PackageTabs.js +28 -0
- package/target/components/PageToolbar.d.ts +7 -0
- package/target/components/PageToolbar.js +34 -0
- package/target/components/PrevNext.d.ts +4 -0
- package/target/components/PrevNext.js +34 -0
- package/target/components/Search.d.ts +2 -0
- package/target/components/Search.js +16 -0
- package/target/components/SearchDialog.d.ts +5 -0
- package/target/components/SearchDialog.js +139 -0
- package/target/components/Section.d.ts +5 -0
- package/target/components/Section.js +8 -0
- package/target/components/SectionHeader.d.ts +7 -0
- package/target/components/SectionHeader.js +7 -0
- package/target/components/Sidebar.d.ts +4 -0
- package/target/components/Sidebar.js +33 -0
- package/target/components/SidebarArticles.d.ts +2 -0
- package/target/components/SidebarArticles.js +45 -0
- package/target/components/SidebarLinks.d.ts +4 -0
- package/target/components/SidebarLinks.js +26 -0
- package/target/components/SidebarPosts.d.ts +2 -0
- package/target/components/SidebarPosts.js +53 -0
- package/target/components/SidebarReleases.d.ts +2 -0
- package/target/components/SidebarReleases.js +35 -0
- package/target/components/SidebarSections.d.ts +4 -0
- package/target/components/SidebarSections.js +36 -0
- package/target/components/SiteTitle.d.ts +2 -0
- package/target/components/SiteTitle.js +12 -0
- package/target/components/SortableTable.d.ts +5 -0
- package/target/components/SortableTable.js +63 -0
- package/target/components/SoundCloud.d.ts +4 -0
- package/target/components/SoundCloud.js +7 -0
- package/target/components/TagIndex.d.ts +5 -0
- package/target/components/TagIndex.js +64 -0
- package/target/components/Theme.d.ts +1 -0
- package/target/components/Theme.js +21 -0
- package/target/components/Toc.d.ts +12 -0
- package/target/components/Toc.js +128 -0
- package/target/components/YouTube.d.ts +4 -0
- package/target/components/YouTube.js +6 -0
- package/target/components/ZoomImage.d.ts +4 -0
- package/target/components/ZoomImage.js +26 -0
- package/target/content/article.d.ts +43 -0
- package/target/content/article.js +54 -0
- package/target/content/tag.d.ts +2 -0
- package/target/content/tag.js +30 -0
- package/target/content-collections.d.ts +2 -0
- package/target/content-collections.js +192 -0
- package/target/elements/accordion.d.ts +6 -0
- package/target/elements/accordion.js +19 -0
- package/target/elements/alert-dialog.d.ts +18 -0
- package/target/elements/alert-dialog.js +44 -0
- package/target/elements/alert.d.ts +9 -0
- package/target/elements/alert.js +28 -0
- package/target/elements/aspect-ratio.d.ts +4 -0
- package/target/elements/aspect-ratio.js +9 -0
- package/target/elements/avatar.d.ts +11 -0
- package/target/elements/avatar.js +23 -0
- package/target/elements/badge.d.ts +7 -0
- package/target/elements/badge.js +34 -0
- package/target/elements/breadcrumb.d.ts +9 -0
- package/target/elements/breadcrumb.js +39 -0
- package/target/elements/button-group.d.ts +10 -0
- package/target/elements/button-group.js +37 -0
- package/target/elements/button.d.ts +8 -0
- package/target/elements/button.js +35 -0
- package/target/elements/calendar.d.ts +10 -0
- package/target/elements/calendar.js +76 -0
- package/target/elements/card.d.ts +11 -0
- package/target/elements/card.js +25 -0
- package/target/elements/carousel.d.ts +28 -0
- package/target/elements/carousel.js +95 -0
- package/target/elements/chart.d.ts +44 -0
- package/target/elements/chart.js +140 -0
- package/target/elements/checkbox.d.ts +3 -0
- package/target/elements/checkbox.js +9 -0
- package/target/elements/collapsible.d.ts +5 -0
- package/target/elements/collapsible.js +13 -0
- package/target/elements/command.d.ts +23 -0
- package/target/elements/command.js +42 -0
- package/target/elements/context-menu.d.ts +29 -0
- package/target/elements/context-menu.js +54 -0
- package/target/elements/dialog.d.ts +16 -0
- package/target/elements/dialog.js +41 -0
- package/target/elements/direction.d.ts +1 -0
- package/target/elements/direction.js +2 -0
- package/target/elements/drawer.d.ts +12 -0
- package/target/elements/drawer.js +38 -0
- package/target/elements/dropdown-menu.d.ts +24 -0
- package/target/elements/dropdown-menu.js +54 -0
- package/target/elements/empty.d.ts +11 -0
- package/target/elements/empty.js +34 -0
- package/target/elements/field.d.ts +24 -0
- package/target/elements/field.js +69 -0
- package/target/elements/hover-card.d.ts +5 -0
- package/target/elements/hover-card.js +14 -0
- package/target/elements/input-group.d.ts +18 -0
- package/target/elements/input-group.js +60 -0
- package/target/elements/input-otp.d.ts +11 -0
- package/target/elements/input-otp.js +21 -0
- package/target/elements/input.d.ts +2 -0
- package/target/elements/input.js +8 -0
- package/target/elements/item.d.ts +21 -0
- package/target/elements/item.js +79 -0
- package/target/elements/kbd.d.ts +3 -0
- package/target/elements/kbd.js +10 -0
- package/target/elements/label.d.ts +2 -0
- package/target/elements/label.js +8 -0
- package/target/elements/menubar.d.ts +29 -0
- package/target/elements/menubar.js +58 -0
- package/target/elements/native-select.d.ts +8 -0
- package/target/elements/native-select.js +16 -0
- package/target/elements/navigation-menu.d.ts +11 -0
- package/target/elements/navigation-menu.js +34 -0
- package/target/elements/pagination.d.ts +17 -0
- package/target/elements/pagination.js +33 -0
- package/target/elements/popover.d.ts +9 -0
- package/target/elements/popover.js +23 -0
- package/target/elements/progress.d.ts +7 -0
- package/target/elements/progress.js +21 -0
- package/target/elements/radio-group.d.ts +5 -0
- package/target/elements/radio-group.js +12 -0
- package/target/elements/resizable.d.ts +7 -0
- package/target/elements/resizable.js +14 -0
- package/target/elements/scroll-area.d.ts +4 -0
- package/target/elements/scroll-area.js +13 -0
- package/target/elements/select.d.ts +15 -0
- package/target/elements/select.js +39 -0
- package/target/elements/separator.d.ts +3 -0
- package/target/elements/separator.js +8 -0
- package/target/elements/sheet.d.ts +13 -0
- package/target/elements/sheet.js +41 -0
- package/target/elements/sidebar.d.ts +63 -0
- package/target/elements/sidebar.js +272 -0
- package/target/elements/skeleton.d.ts +2 -0
- package/target/elements/skeleton.js +7 -0
- package/target/elements/slider.d.ts +3 -0
- package/target/elements/slider.js +15 -0
- package/target/elements/sonner.d.ts +3 -0
- package/target/elements/sonner.js +23 -0
- package/target/elements/spinner.d.ts +2 -0
- package/target/elements/spinner.js +8 -0
- package/target/elements/switch.d.ts +5 -0
- package/target/elements/switch.js +8 -0
- package/target/elements/table.d.ts +9 -0
- package/target/elements/table.js +28 -0
- package/target/elements/tabs.d.ts +10 -0
- package/target/elements/tabs.js +29 -0
- package/target/elements/textarea.d.ts +2 -0
- package/target/elements/textarea.js +7 -0
- package/target/elements/toggle-group.d.ts +10 -0
- package/target/elements/toggle-group.js +24 -0
- package/target/elements/toggle.d.ts +8 -0
- package/target/elements/toggle.js +26 -0
- package/target/elements/tooltip.d.ts +6 -0
- package/target/elements/tooltip.js +18 -0
- package/target/entrypoints/main.js +12 -0
- package/target/helpers/article-icon.d.ts +3 -0
- package/target/helpers/article-icon.js +34 -0
- package/target/helpers/article.d.ts +24 -0
- package/target/helpers/article.js +73 -0
- package/target/helpers/changelog-source.d.ts +7 -0
- package/target/helpers/changelog-source.js +16 -0
- package/target/helpers/changelog-source.unit.d.ts +1 -0
- package/target/helpers/changelog-source.unit.js +33 -0
- package/target/helpers/dynamic-icon-resolver.d.ts +5 -0
- package/target/helpers/dynamic-icon-resolver.js +17 -0
- package/target/helpers/dynamic-icon.d.ts +5 -0
- package/target/helpers/dynamic-icon.js +8 -0
- package/target/helpers/favicon.d.ts +2 -0
- package/target/helpers/favicon.js +11 -0
- package/target/helpers/model.d.ts +3 -0
- package/target/helpers/model.js +4 -0
- package/target/helpers/program.js +5 -0
- package/target/helpers/resolve-asset-path.d.ts +2 -0
- package/target/helpers/resolve-asset-path.js +9 -0
- package/target/helpers/resolve-includes.d.ts +2 -0
- package/target/helpers/resolve-includes.js +113 -0
- package/target/helpers/resolve-includes.unit.d.ts +1 -0
- package/target/helpers/resolve-includes.unit.js +76 -0
- package/target/helpers/search-text.d.ts +2 -0
- package/target/helpers/search-text.js +16 -0
- package/target/helpers/section.d.ts +13 -0
- package/target/helpers/section.js +39 -0
- package/target/helpers/section.unit.d.ts +1 -0
- package/target/helpers/section.unit.js +62 -0
- package/target/helpers/theme.d.ts +5 -0
- package/target/helpers/theme.js +23 -0
- package/target/helpers/toc-context.d.ts +5 -0
- package/target/helpers/toc-context.js +8 -0
- package/target/helpers/toc.d.ts +3 -0
- package/target/helpers/toc.js +41 -0
- package/target/helpers/toc.unit.d.ts +1 -0
- package/target/helpers/toc.unit.js +65 -0
- package/target/hooks/in-view.d.ts +4 -0
- package/target/hooks/in-view.js +23 -0
- package/target/hooks/media.d.ts +6 -0
- package/target/hooks/media.js +25 -0
- package/target/index.js +2 -0
- package/target/models/article.d.ts +57 -0
- package/target/models/article.js +21 -0
- package/{build → target}/models/config.d.ts +10 -0
- package/target/models/config.js +34 -0
- package/target/models/link.js +9 -0
- package/{build → target}/models/patch.d.ts +5 -0
- package/target/models/patch.js +7 -0
- package/target/models/section.js +26 -0
- package/target/models/theme.js +73 -0
- package/target/models/toc.d.ts +5 -0
- package/target/models/toc.js +2 -0
- package/target/plugins/rehype-inline-code.d.ts +19 -0
- package/target/plugins/rehype-inline-code.js +55 -0
- package/target/plugins/rehype-task-list-a11y.d.ts +10 -0
- package/target/plugins/rehype-task-list-a11y.js +29 -0
- package/target/plugins/remark-abbr.d.ts +6 -0
- package/target/plugins/remark-abbr.js +39 -0
- package/target/plugins/remark-abbr.unit.d.ts +1 -0
- package/target/plugins/remark-abbr.unit.js +79 -0
- package/target/plugins/remark-ansi.d.ts +8 -0
- package/target/plugins/remark-ansi.js +239 -0
- package/target/plugins/remark-ansi.unit.d.ts +1 -0
- package/target/plugins/remark-ansi.unit.js +134 -0
- package/target/plugins/remark-badge.d.ts +6 -0
- package/target/plugins/remark-badge.js +43 -0
- package/target/plugins/remark-badge.unit.d.ts +1 -0
- package/target/plugins/remark-badge.unit.js +76 -0
- package/target/plugins/remark-button.d.ts +6 -0
- package/target/plugins/remark-button.js +52 -0
- package/target/plugins/remark-button.unit.d.ts +1 -0
- package/target/plugins/remark-button.unit.js +105 -0
- package/target/plugins/remark-callout.d.ts +4 -0
- package/target/plugins/remark-callout.js +39 -0
- package/target/plugins/remark-card.d.ts +4 -0
- package/target/plugins/remark-card.js +66 -0
- package/target/plugins/remark-code-tabs.d.ts +4 -0
- package/target/plugins/remark-code-tabs.js +72 -0
- package/target/plugins/remark-columns.d.ts +4 -0
- package/target/plugins/remark-columns.js +54 -0
- package/target/plugins/remark-custom-heading-id.d.ts +14 -0
- package/target/plugins/remark-custom-heading-id.js +54 -0
- package/target/plugins/remark-custom-heading-id.unit.d.ts +1 -0
- package/target/plugins/remark-custom-heading-id.unit.js +91 -0
- package/target/plugins/remark-deflist.d.ts +4 -0
- package/target/plugins/remark-deflist.js +31 -0
- package/target/plugins/remark-details.d.ts +4 -0
- package/target/plugins/remark-details.js +33 -0
- package/target/plugins/remark-filetree.d.ts +12 -0
- package/target/plugins/remark-filetree.js +61 -0
- package/target/plugins/remark-filetree.unit.d.ts +1 -0
- package/target/plugins/remark-filetree.unit.js +87 -0
- package/target/plugins/remark-github-callout.d.ts +4 -0
- package/target/plugins/remark-github-callout.js +62 -0
- package/target/plugins/remark-icon.d.ts +4 -0
- package/target/plugins/remark-icon.js +36 -0
- package/target/plugins/remark-image.d.ts +9 -0
- package/target/plugins/remark-image.js +26 -0
- package/target/plugins/remark-media.d.ts +6 -0
- package/target/plugins/remark-media.js +52 -0
- package/target/plugins/remark-media.unit.d.ts +1 -0
- package/target/plugins/remark-media.unit.js +54 -0
- package/target/plugins/remark-mermaid.d.ts +4 -0
- package/target/plugins/remark-mermaid.js +20 -0
- package/target/plugins/remark-npm.d.ts +4 -0
- package/target/plugins/remark-npm.js +32 -0
- package/target/plugins/remark-steps.d.ts +6 -0
- package/target/plugins/remark-steps.js +30 -0
- package/target/plugins/remark-steps.unit.d.ts +1 -0
- package/target/plugins/remark-steps.unit.js +65 -0
- package/target/plugins/remark-tab.d.ts +6 -0
- package/target/plugins/remark-tab.js +76 -0
- package/target/plugins/remark-tab.unit.d.ts +1 -0
- package/target/plugins/remark-tab.unit.js +156 -0
- package/target/plugins/remark-toc.d.ts +6 -0
- package/target/plugins/remark-toc.js +33 -0
- package/target/plugins/remark-toc.unit.d.ts +1 -0
- package/target/plugins/remark-toc.unit.js +57 -0
- package/target/plugins/shiki-icon.d.ts +16 -0
- package/target/plugins/shiki-icon.js +66 -0
- package/target/plugins/shiki-line-highlight.d.ts +27 -0
- package/target/plugins/shiki-line-highlight.js +140 -0
- package/target/plugins/vite-livemark.d.ts +13 -0
- package/target/plugins/vite-livemark.js +76 -0
- package/target/program.js +18 -0
- package/target/routeTree.gen.d.ts +57 -0
- package/target/routeTree.gen.js +27 -0
- package/target/router.d.ts +6 -0
- package/target/router.js +26 -0
- package/target/routes/$.d.ts +1 -0
- package/target/routes/$.js +85 -0
- package/target/routes/__root.d.ts +1 -0
- package/target/routes/__root.js +69 -0
- package/target/server.d.ts +2 -0
- package/target/server.js +7 -0
- package/target/settings.js +7 -0
- package/target/utils/style.d.ts +2 -0
- package/target/utils/style.js +6 -0
- package/target/vite.config.d.ts +2 -0
- package/target/vite.config.js +64 -0
- package/build/actions/changelog/build.js +0 -158
- package/build/actions/changelog/build.unit.js +0 -66
- package/build/actions/config/define.js +0 -8
- package/build/actions/config/define.unit.js +0 -29
- package/build/actions/config/load.js +0 -25
- package/build/actions/config/load.unit.js +0 -23
- package/build/commands/build.js +0 -14
- package/build/commands/escape.js +0 -56
- package/build/commands/preview.js +0 -18
- package/build/commands/start.js +0 -19
- package/build/docs/markdown/includes/example.d.ts +0 -58
- package/build/docs/markdown/includes/example.js +0 -5
- package/build/entrypoints/main.js +0 -12
- package/build/helpers/program.js +0 -5
- package/build/index.js +0 -2
- package/build/livemark.config.d.ts +0 -58
- package/build/livemark.config.js +0 -25
- package/build/models/config.js +0 -34
- package/build/models/link.js +0 -9
- package/build/models/patch.js +0 -7
- package/build/models/section.js +0 -26
- package/build/models/theme.js +0 -73
- package/build/package.json +0 -138
- package/build/program.js +0 -18
- package/build/settings.js +0 -7
- package/build/vite.config.d.ts +0 -2
- package/build/vite.config.js +0 -48
- package/build/website/components/BlogSidebar.tsx +0 -162
- package/build/website/components/ChangelogSidebar.tsx +0 -120
- package/build/website/hooks/media.ts +0 -19
- /package/{build/website → source}/assets/logo.svg +0 -0
- /package/{build/website → source}/client.tsx +0 -0
- /package/{build/website → source}/components/Abbr.tsx +0 -0
- /package/{build/website → source}/components/AnsiCode.tsx +0 -0
- /package/{build/website → source}/components/BackToTop.tsx +0 -0
- /package/{build/website → source}/components/Banner.tsx +0 -0
- /package/{build/website → source}/components/BlogIndex.tsx +0 -0
- /package/{build/website → source}/components/Breadcrumbs.tsx +0 -0
- /package/{build/website → source}/components/Card.tsx +0 -0
- /package/{build/website → source}/components/Cards.tsx +0 -0
- /package/{build/website → source}/components/ChangelogIndex.tsx +0 -0
- /package/{build/website → source}/components/CodeBlock.tsx +0 -0
- /package/{build/website → source}/components/CodeTabs.tsx +0 -0
- /package/{build/website → source}/components/Column.tsx +0 -0
- /package/{build/website → source}/components/Columns.tsx +0 -0
- /package/{build/website → source}/components/Content.tsx +0 -0
- /package/{build/website → source}/components/ContentTab.tsx +0 -0
- /package/{build/website → source}/components/ContentTabs.tsx +0 -0
- /package/{build/website → source}/components/DefaultCatchBoundary.tsx +0 -0
- /package/{build/website → source}/components/DefinitionList.tsx +0 -0
- /package/{build/website → source}/components/Details.tsx +0 -0
- /package/{build/website → source}/components/FileTree.tsx +0 -0
- /package/{build/website → source}/components/Footer.tsx +0 -0
- /package/{build/website → source}/components/FootnoteRef.tsx +0 -0
- /package/{build/website → source}/components/Heading.tsx +0 -0
- /package/{build/website → source}/components/InlineBadge.tsx +0 -0
- /package/{build/website → source}/components/InlineIcon.tsx +0 -0
- /package/{build/website → source}/components/InlineToc.tsx +0 -0
- /package/{build/website → source}/components/Mermaid.tsx +0 -0
- /package/{build/website → source}/components/MermaidRenderer.tsx +0 -0
- /package/{build/website → source}/components/NotFound.tsx +0 -0
- /package/{build/website → source}/components/PackageTabs.tsx +0 -0
- /package/{build/website → source}/components/PrevNext.tsx +0 -0
- /package/{build/website → source}/components/Search.tsx +0 -0
- /package/{build/website → source}/components/SearchDialog.tsx +0 -0
- /package/{build/website → source}/components/SidebarLinks.tsx +0 -0
- /package/{build/website → source}/components/SidebarSections.tsx +0 -0
- /package/{build/website → source}/components/SiteTitle.tsx +0 -0
- /package/{build/website → source}/components/SortableTable.tsx +0 -0
- /package/{build/website → source}/components/SoundCloud.tsx +0 -0
- /package/{build/website → source}/components/TagIndex.tsx +0 -0
- /package/{build/website → source}/components/Theme.tsx +0 -0
- /package/{build/website → source}/components/Toc.tsx +0 -0
- /package/{build/website → source}/components/YouTube.tsx +0 -0
- /package/{build/website → source}/components/ZoomImage.tsx +0 -0
- /package/{build/website → source}/content/article.ts +0 -0
- /package/{build/website → source}/content/tag.ts +0 -0
- /package/{build/website → source}/elements/collapsible.tsx +0 -0
- /package/{build/website → source}/elements/direction.tsx +0 -0
- /package/{build/website → source}/elements/sonner.tsx +0 -0
- /package/{build/website → source}/helpers/article-icon.ts +0 -0
- /package/{build/website → source}/helpers/article.ts +0 -0
- /package/{build/website → source}/helpers/changelog-source.ts +0 -0
- /package/{build/website → source}/helpers/changelog-source.unit.ts +0 -0
- /package/{build/website → source}/helpers/dynamic-icon-resolver.tsx +0 -0
- /package/{build/website → source}/helpers/dynamic-icon.tsx +0 -0
- /package/{build/website → source}/helpers/favicon.ts +0 -0
- /package/{build/website → source}/helpers/model.ts +0 -0
- /package/{build/website → source}/helpers/resolve-asset-path.ts +0 -0
- /package/{build/website → source}/helpers/resolve-includes.ts +0 -0
- /package/{build/website → source}/helpers/resolve-includes.unit.ts +0 -0
- /package/{build/website → source}/helpers/search-text.ts +0 -0
- /package/{build/website → source}/helpers/section.unit.ts +0 -0
- /package/{build/website → source}/helpers/theme.ts +0 -0
- /package/{build/website → source}/helpers/toc-context.ts +0 -0
- /package/{build/website → source}/helpers/toc.ts +0 -0
- /package/{build/website → source}/helpers/toc.unit.ts +0 -0
- /package/{build/website → source}/hooks/in-view.ts +0 -0
- /package/{build/website → source}/models/toc.ts +0 -0
- /package/{build/website → source}/plugins/rehype-inline-code.ts +0 -0
- /package/{build/website → source}/plugins/rehype-task-list-a11y.ts +0 -0
- /package/{build/website → source}/plugins/remark-abbr.ts +0 -0
- /package/{build/website → source}/plugins/remark-abbr.unit.ts +0 -0
- /package/{build/website → source}/plugins/remark-ansi.ts +0 -0
- /package/{build/website → source}/plugins/remark-ansi.unit.ts +0 -0
- /package/{build/website → source}/plugins/remark-badge.ts +0 -0
- /package/{build/website → source}/plugins/remark-badge.unit.ts +0 -0
- /package/{build/website → source}/plugins/remark-button.ts +0 -0
- /package/{build/website → source}/plugins/remark-button.unit.ts +0 -0
- /package/{build/website → source}/plugins/remark-callout.ts +0 -0
- /package/{build/website → source}/plugins/remark-card.ts +0 -0
- /package/{build/website → source}/plugins/remark-code-tabs.ts +0 -0
- /package/{build/website → source}/plugins/remark-columns.ts +0 -0
- /package/{build/website → source}/plugins/remark-custom-heading-id.ts +0 -0
- /package/{build/website → source}/plugins/remark-custom-heading-id.unit.ts +0 -0
- /package/{build/website → source}/plugins/remark-deflist.ts +0 -0
- /package/{build/website → source}/plugins/remark-details.ts +0 -0
- /package/{build/website → source}/plugins/remark-filetree.ts +0 -0
- /package/{build/website → source}/plugins/remark-filetree.unit.ts +0 -0
- /package/{build/website → source}/plugins/remark-github-callout.ts +0 -0
- /package/{build/website → source}/plugins/remark-icon.ts +0 -0
- /package/{build/website → source}/plugins/remark-image.ts +0 -0
- /package/{build/website → source}/plugins/remark-media.ts +0 -0
- /package/{build/website → source}/plugins/remark-media.unit.ts +0 -0
- /package/{build/website → source}/plugins/remark-mermaid.ts +0 -0
- /package/{build/website → source}/plugins/remark-npm.ts +0 -0
- /package/{build/website → source}/plugins/remark-steps.ts +0 -0
- /package/{build/website → source}/plugins/remark-steps.unit.ts +0 -0
- /package/{build/website → source}/plugins/remark-tab.ts +0 -0
- /package/{build/website → source}/plugins/remark-tab.unit.ts +0 -0
- /package/{build/website → source}/plugins/remark-toc.ts +0 -0
- /package/{build/website → source}/plugins/remark-toc.unit.ts +0 -0
- /package/{build/website → source}/plugins/shiki-icon.ts +0 -0
- /package/{build/website → source}/plugins/shiki-line-highlight.ts +0 -0
- /package/{build/website → source}/plugins/vite-livemark.ts +0 -0
- /package/{build/website → source}/routeTree.gen.ts +0 -0
- /package/{build/website → source}/router.tsx +0 -0
- /package/{build/website → source}/routes/$.tsx +0 -0
- /package/{build/website → source}/routes/__root.tsx +0 -0
- /package/{build/website → source}/server.ts +0 -0
- /package/{build/website → source}/styles/general.css +0 -0
- /package/{build/website → source}/styles/markdown.css +0 -0
- /package/{build/website/helpers → source/utils}/style.ts +0 -0
- /package/{build → target}/actions/changelog/build.unit.d.ts +0 -0
- /package/{build → target}/actions/config/define.d.ts +0 -0
- /package/{build → target}/actions/config/define.unit.d.ts +0 -0
- /package/{build → target}/actions/config/load.d.ts +0 -0
- /package/{build → target}/actions/config/load.unit.d.ts +0 -0
- /package/{build → target}/commands/build.d.ts +0 -0
- /package/{build → target}/commands/escape.d.ts +0 -0
- /package/{build → target}/commands/preview.d.ts +0 -0
- /package/{build → target}/commands/start.d.ts +0 -0
- /package/{build → target}/entrypoints/main.d.ts +0 -0
- /package/{build → target}/helpers/program.d.ts +0 -0
- /package/{build → target}/index.d.ts +0 -0
- /package/{build → target}/models/link.d.ts +0 -0
- /package/{build → target}/models/section.d.ts +0 -0
- /package/{build → target}/models/theme.d.ts +0 -0
- /package/{build → target}/program.d.ts +0 -0
- /package/{build → target}/settings.d.ts +0 -0
|
@@ -17,9 +17,6 @@ import {
|
|
|
17
17
|
} from "../elements/sidebar.tsx"
|
|
18
18
|
import { BackToTop } from "./BackToTop.tsx"
|
|
19
19
|
import { Banner } from "./Banner.tsx"
|
|
20
|
-
import { BlogSidebar } from "./BlogSidebar.tsx"
|
|
21
|
-
import { ChangelogSidebar } from "./ChangelogSidebar.tsx"
|
|
22
|
-
import { MiniSidebar } from "./MiniSidebar.tsx"
|
|
23
20
|
import { Sidebar } from "./Sidebar.tsx"
|
|
24
21
|
import { SiteTitle } from "./SiteTitle.tsx"
|
|
25
22
|
|
|
@@ -147,20 +144,12 @@ export function Layout(props: {
|
|
|
147
144
|
</header>
|
|
148
145
|
)
|
|
149
146
|
|
|
150
|
-
const SidebarComponent = !props.withSidebar
|
|
151
|
-
? MiniSidebar
|
|
152
|
-
: activeSection?.type === "blog"
|
|
153
|
-
? BlogSidebar
|
|
154
|
-
: activeSection?.type === "changelog"
|
|
155
|
-
? ChangelogSidebar
|
|
156
|
-
: Sidebar
|
|
157
|
-
|
|
158
147
|
return (
|
|
159
148
|
<SidebarProvider
|
|
160
149
|
key={props.withSidebar ? "sidebar" : "mini"}
|
|
161
150
|
defaultOpen={!!props.withSidebar}
|
|
162
151
|
>
|
|
163
|
-
<SidebarShell
|
|
152
|
+
<SidebarShell withSidebar={props.withSidebar} header={header}>
|
|
164
153
|
{props.children}
|
|
165
154
|
</SidebarShell>
|
|
166
155
|
</SidebarProvider>
|
|
@@ -168,7 +157,7 @@ export function Layout(props: {
|
|
|
168
157
|
}
|
|
169
158
|
|
|
170
159
|
function SidebarShell(props: {
|
|
171
|
-
|
|
160
|
+
withSidebar?: boolean
|
|
172
161
|
header: React.ReactNode
|
|
173
162
|
children?: React.ReactNode
|
|
174
163
|
}) {
|
|
@@ -179,7 +168,7 @@ function SidebarShell(props: {
|
|
|
179
168
|
}
|
|
180
169
|
return (
|
|
181
170
|
<div style={{ display: "contents" }} onClick={onClick}>
|
|
182
|
-
<props.
|
|
171
|
+
<Sidebar withSidebar={props.withSidebar} />
|
|
183
172
|
<SidebarInset>
|
|
184
173
|
{props.header}
|
|
185
174
|
<main className="flex-1">{props.children}</main>
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
import { useState, useCallback } from "react"
|
|
2
|
-
import { Pencil, Copy, Check, ExternalLink } from "lucide-react"
|
|
2
|
+
import { Eye, Pencil, Copy, Check, ExternalLink } from "lucide-react"
|
|
3
3
|
|
|
4
4
|
/** Toolbar with action buttons displayed for the article content */
|
|
5
|
-
export function PageToolbar(props: {
|
|
5
|
+
export function PageToolbar(props: {
|
|
6
|
+
file?: string
|
|
7
|
+
sourceUrl?: string
|
|
8
|
+
sourceAction?: "edit" | "view"
|
|
9
|
+
content: string
|
|
10
|
+
}) {
|
|
6
11
|
const [copied, setCopied] = useState(false)
|
|
12
|
+
const sourceHref =
|
|
13
|
+
props.sourceUrl ??
|
|
14
|
+
(props.file
|
|
15
|
+
? `https://github.com/datisthq/livemark/edit/main/${props.file}`
|
|
16
|
+
: undefined)
|
|
17
|
+
const isView = props.sourceAction === "view"
|
|
18
|
+
const sourceLabel = isView ? "View on GitHub" : "Edit on GitHub"
|
|
19
|
+
const SourceIcon = isView ? Eye : Pencil
|
|
7
20
|
|
|
8
21
|
const handleCopy = useCallback(() => {
|
|
9
22
|
navigator.clipboard.writeText(props.content)
|
|
@@ -26,23 +39,23 @@ export function PageToolbar(props: { file?: string; content: string }) {
|
|
|
26
39
|
<>
|
|
27
40
|
<div className="mb-6 flex flex-col gap-2 text-sm">
|
|
28
41
|
<p className="text-sm font-medium mb-1">Actions</p>
|
|
29
|
-
{
|
|
42
|
+
{sourceHref ? (
|
|
30
43
|
<a
|
|
31
|
-
href={
|
|
44
|
+
href={sourceHref}
|
|
32
45
|
target="_blank"
|
|
33
46
|
rel="noopener noreferrer"
|
|
34
47
|
className={buttonClass}
|
|
35
48
|
>
|
|
36
|
-
<
|
|
37
|
-
|
|
49
|
+
<SourceIcon className="size-3.5" />
|
|
50
|
+
{sourceLabel}
|
|
38
51
|
</a>
|
|
39
52
|
) : (
|
|
40
53
|
<span
|
|
41
54
|
className={`${buttonClass} opacity-50 cursor-not-allowed hover:text-muted-foreground`}
|
|
42
55
|
aria-disabled="true"
|
|
43
56
|
>
|
|
44
|
-
<
|
|
45
|
-
|
|
57
|
+
<SourceIcon className="size-3.5" />
|
|
58
|
+
{sourceLabel}
|
|
46
59
|
</span>
|
|
47
60
|
)}
|
|
48
61
|
<button type="button" onClick={handleCopy} className={buttonClass}>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Link } from "@tanstack/react-router"
|
|
1
|
+
import { Link, useLocation, useMatch } from "@tanstack/react-router"
|
|
2
2
|
import { useHotkey } from "@tanstack/react-hotkeys"
|
|
3
|
+
import { currentSection } from "../content/article.ts"
|
|
3
4
|
import {
|
|
4
5
|
Sidebar as SidebarRoot,
|
|
5
6
|
SidebarContent,
|
|
@@ -12,18 +13,26 @@ import {
|
|
|
12
13
|
useSidebar,
|
|
13
14
|
} from "../elements/sidebar.tsx"
|
|
14
15
|
import { Search } from "./Search.tsx"
|
|
16
|
+
import { SidebarArticles } from "./SidebarArticles.tsx"
|
|
15
17
|
import { SidebarLinks } from "./SidebarLinks.tsx"
|
|
18
|
+
import { SidebarPosts } from "./SidebarPosts.tsx"
|
|
19
|
+
import { SidebarReleases } from "./SidebarReleases.tsx"
|
|
16
20
|
import { SidebarSections } from "./SidebarSections.tsx"
|
|
17
21
|
import { SiteTitle } from "./SiteTitle.tsx"
|
|
18
22
|
import { Theme } from "./Theme.tsx"
|
|
19
23
|
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
/** Application sidebar shell: header, body slot picked by section.type, footer */
|
|
25
|
+
export function Sidebar(props: { withSidebar?: boolean }) {
|
|
26
|
+
const pathname = useLocation({ select: l => l.pathname })
|
|
27
|
+
const articleRoute = useMatch({ from: "/$", shouldThrow: false })
|
|
24
28
|
const { toggleSidebar } = useSidebar()
|
|
29
|
+
|
|
25
30
|
useHotkey("S", toggleSidebar)
|
|
26
31
|
|
|
32
|
+
const section = articleRoute
|
|
33
|
+
? currentSection(`/${pathname.replace(/^\/|\/$/g, "")}/`)
|
|
34
|
+
: undefined
|
|
35
|
+
|
|
27
36
|
return (
|
|
28
37
|
<SidebarRoot>
|
|
29
38
|
<SidebarHeader>
|
|
@@ -37,6 +46,13 @@ export function MiniSidebar() {
|
|
|
37
46
|
</SidebarHeader>
|
|
38
47
|
<SidebarContent>
|
|
39
48
|
<SidebarSections />
|
|
49
|
+
{props.withSidebar && section?.type === "blog" && <SidebarPosts />}
|
|
50
|
+
{props.withSidebar && section?.type === "changelog" && (
|
|
51
|
+
<SidebarReleases />
|
|
52
|
+
)}
|
|
53
|
+
{props.withSidebar &&
|
|
54
|
+
section?.type !== "blog" &&
|
|
55
|
+
section?.type !== "changelog" && <SidebarArticles />}
|
|
40
56
|
<SidebarLinks />
|
|
41
57
|
</SidebarContent>
|
|
42
58
|
<SidebarFooter className="p-4 space-y-2">
|
|
@@ -1,47 +1,32 @@
|
|
|
1
1
|
import { Link, useLocation } from "@tanstack/react-router"
|
|
2
|
-
import { useHotkey } from "@tanstack/react-hotkeys"
|
|
3
2
|
import { ChevronRight, FileText } from "lucide-react"
|
|
4
3
|
import {
|
|
5
4
|
articleGroups,
|
|
6
5
|
currentSection,
|
|
7
6
|
sectionArticleGroups,
|
|
8
7
|
} from "../content/article.ts"
|
|
9
|
-
import { articleIcons } from "../helpers/article-icon.ts"
|
|
10
|
-
import type { ArticleNode } from "../models/article.ts"
|
|
11
8
|
import {
|
|
12
9
|
Collapsible,
|
|
13
10
|
CollapsibleContent,
|
|
14
11
|
CollapsibleTrigger,
|
|
15
12
|
} from "../elements/collapsible.tsx"
|
|
16
13
|
import {
|
|
17
|
-
Sidebar as SidebarRoot,
|
|
18
|
-
SidebarContent,
|
|
19
|
-
SidebarFooter,
|
|
20
14
|
SidebarGroup,
|
|
21
15
|
SidebarGroupContent,
|
|
22
16
|
SidebarGroupLabel,
|
|
23
|
-
SidebarHeader,
|
|
24
17
|
SidebarMenu,
|
|
25
18
|
SidebarMenuButton,
|
|
26
19
|
SidebarMenuItem,
|
|
27
20
|
SidebarMenuSub,
|
|
28
21
|
SidebarMenuSubButton,
|
|
29
22
|
SidebarMenuSubItem,
|
|
30
|
-
SidebarRail,
|
|
31
|
-
useSidebar,
|
|
32
23
|
} from "../elements/sidebar.tsx"
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import { SidebarSections } from "./SidebarSections.tsx"
|
|
36
|
-
import { SiteTitle } from "./SiteTitle.tsx"
|
|
37
|
-
import { Theme } from "./Theme.tsx"
|
|
24
|
+
import { articleIcons } from "../helpers/article-icon.ts"
|
|
25
|
+
import type { ArticleNode } from "../models/article.ts"
|
|
38
26
|
|
|
39
|
-
/**
|
|
40
|
-
export function
|
|
27
|
+
/** Article-tree body slot for the Sidebar shell */
|
|
28
|
+
export function SidebarArticles() {
|
|
41
29
|
const pathname = useLocation({ select: l => l.pathname })
|
|
42
|
-
const { toggleSidebar } = useSidebar()
|
|
43
|
-
|
|
44
|
-
useHotkey("S", toggleSidebar)
|
|
45
30
|
|
|
46
31
|
const configSections = import.meta.env.CONFIG.sections
|
|
47
32
|
const section = currentSection(`/${pathname.replace(/^\/|\/$/g, "")}/`)
|
|
@@ -51,42 +36,24 @@ export function Sidebar() {
|
|
|
51
36
|
: articleGroups
|
|
52
37
|
|
|
53
38
|
return (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
</
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
)}
|
|
73
|
-
<SidebarGroupContent>
|
|
74
|
-
<SidebarMenu>
|
|
75
|
-
{group.nodes.map(node => (
|
|
76
|
-
<NavNode key={node.path} node={node} currentPath={pathname} />
|
|
77
|
-
))}
|
|
78
|
-
</SidebarMenu>
|
|
79
|
-
</SidebarGroupContent>
|
|
80
|
-
</SidebarGroup>
|
|
81
|
-
))}
|
|
82
|
-
<SidebarLinks />
|
|
83
|
-
</SidebarContent>
|
|
84
|
-
<SidebarFooter className="p-4 space-y-2">
|
|
85
|
-
<Search />
|
|
86
|
-
<Theme />
|
|
87
|
-
</SidebarFooter>
|
|
88
|
-
<SidebarRail />
|
|
89
|
-
</SidebarRoot>
|
|
39
|
+
<>
|
|
40
|
+
{groups.map((group, index) => (
|
|
41
|
+
<SidebarGroup key={group.name ?? `__unnamed-${index}`}>
|
|
42
|
+
{group.name && (
|
|
43
|
+
<SidebarGroupLabel className="uppercase font-mono text-xs tracking-widest">
|
|
44
|
+
{group.name}
|
|
45
|
+
</SidebarGroupLabel>
|
|
46
|
+
)}
|
|
47
|
+
<SidebarGroupContent>
|
|
48
|
+
<SidebarMenu>
|
|
49
|
+
{group.nodes.map(node => (
|
|
50
|
+
<NavNode key={node.path} node={node} currentPath={pathname} />
|
|
51
|
+
))}
|
|
52
|
+
</SidebarMenu>
|
|
53
|
+
</SidebarGroupContent>
|
|
54
|
+
</SidebarGroup>
|
|
55
|
+
))}
|
|
56
|
+
</>
|
|
90
57
|
)
|
|
91
58
|
}
|
|
92
59
|
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { Link, useLocation } from "@tanstack/react-router"
|
|
2
|
+
import { Clock, List, Rss, Tag } from "lucide-react"
|
|
3
|
+
import {
|
|
4
|
+
currentSection,
|
|
5
|
+
sectionFlatArticles,
|
|
6
|
+
sortedArticles,
|
|
7
|
+
} from "../content/article.ts"
|
|
8
|
+
import {
|
|
9
|
+
SidebarGroup,
|
|
10
|
+
SidebarGroupContent,
|
|
11
|
+
SidebarGroupLabel,
|
|
12
|
+
SidebarMenu,
|
|
13
|
+
SidebarMenuButton,
|
|
14
|
+
SidebarMenuItem,
|
|
15
|
+
SidebarMenuSub,
|
|
16
|
+
SidebarMenuSubButton,
|
|
17
|
+
SidebarMenuSubItem,
|
|
18
|
+
} from "../elements/sidebar.tsx"
|
|
19
|
+
|
|
20
|
+
/** Blog body slot for the Sidebar shell: All Posts / Recent Posts / RSS / Tags */
|
|
21
|
+
export function SidebarPosts() {
|
|
22
|
+
const pathname = useLocation({ select: l => l.pathname })
|
|
23
|
+
|
|
24
|
+
const section = currentSection(`/${pathname.replace(/^\/|\/$/g, "")}/`)
|
|
25
|
+
const flat = section ? (sectionFlatArticles.get(section.prefix) ?? []) : []
|
|
26
|
+
const posts = flat
|
|
27
|
+
.map(p => sortedArticles.find(a => a.path === p))
|
|
28
|
+
.filter(a => a !== undefined)
|
|
29
|
+
const recentPosts = posts.slice(0, 5)
|
|
30
|
+
|
|
31
|
+
const allTags = new Set<string>()
|
|
32
|
+
for (const post of posts) {
|
|
33
|
+
for (const tag of post.tags ?? []) {
|
|
34
|
+
allTags.add(tag)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const tags = [...allTags].sort()
|
|
38
|
+
|
|
39
|
+
const normalized = `/${pathname.replace(/^\/|\/$/g, "")}/`
|
|
40
|
+
const isIndex = section ? normalized === section.prefix : false
|
|
41
|
+
const sectionPath = (section?.prefix ?? "/blog/").replace(/^\/|\/$/g, "")
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<>
|
|
45
|
+
<SidebarGroup>
|
|
46
|
+
<SidebarGroupLabel className="uppercase font-mono text-xs tracking-widest">
|
|
47
|
+
Posts
|
|
48
|
+
</SidebarGroupLabel>
|
|
49
|
+
<SidebarGroupContent>
|
|
50
|
+
<SidebarMenu>
|
|
51
|
+
<SidebarMenuItem>
|
|
52
|
+
<SidebarMenuButton
|
|
53
|
+
isActive={isIndex}
|
|
54
|
+
className={isIndex ? "" : "opacity-75"}
|
|
55
|
+
render={<Link to="/$" params={{ _splat: sectionPath }} />}
|
|
56
|
+
>
|
|
57
|
+
<List className="size-4" />
|
|
58
|
+
<span>All Posts</span>
|
|
59
|
+
</SidebarMenuButton>
|
|
60
|
+
</SidebarMenuItem>
|
|
61
|
+
<SidebarMenuItem>
|
|
62
|
+
<SidebarMenuButton className="opacity-75">
|
|
63
|
+
<Clock className="size-4" />
|
|
64
|
+
<span>Recent Posts</span>
|
|
65
|
+
</SidebarMenuButton>
|
|
66
|
+
<SidebarMenuSub>
|
|
67
|
+
{recentPosts.map(post => {
|
|
68
|
+
const active = normalized === post.path
|
|
69
|
+
return (
|
|
70
|
+
<SidebarMenuSubItem key={post.path}>
|
|
71
|
+
<SidebarMenuSubButton
|
|
72
|
+
isActive={active}
|
|
73
|
+
className={active ? "" : "opacity-75"}
|
|
74
|
+
render={
|
|
75
|
+
<Link
|
|
76
|
+
to="/$"
|
|
77
|
+
params={{
|
|
78
|
+
_splat: post.path.replace(/^\/|\/$/g, ""),
|
|
79
|
+
}}
|
|
80
|
+
/>
|
|
81
|
+
}
|
|
82
|
+
>
|
|
83
|
+
<span>{post.title}</span>
|
|
84
|
+
</SidebarMenuSubButton>
|
|
85
|
+
</SidebarMenuSubItem>
|
|
86
|
+
)
|
|
87
|
+
})}
|
|
88
|
+
</SidebarMenuSub>
|
|
89
|
+
</SidebarMenuItem>
|
|
90
|
+
<SidebarMenuItem>
|
|
91
|
+
<SidebarMenuButton className="opacity-75">
|
|
92
|
+
<Rss className="size-4" />
|
|
93
|
+
<span>RSS Feed</span>
|
|
94
|
+
</SidebarMenuButton>
|
|
95
|
+
</SidebarMenuItem>
|
|
96
|
+
</SidebarMenu>
|
|
97
|
+
</SidebarGroupContent>
|
|
98
|
+
</SidebarGroup>
|
|
99
|
+
|
|
100
|
+
{tags.length > 0 && (
|
|
101
|
+
<SidebarGroup>
|
|
102
|
+
<SidebarGroupLabel className="uppercase font-mono text-xs tracking-widest">
|
|
103
|
+
Tags
|
|
104
|
+
</SidebarGroupLabel>
|
|
105
|
+
<SidebarGroupContent>
|
|
106
|
+
<SidebarMenu>
|
|
107
|
+
{tags.map(tag => {
|
|
108
|
+
const tagPath = `${sectionPath}/tags/${tag}`
|
|
109
|
+
const tagActive = normalized === `/${tagPath}/`
|
|
110
|
+
return (
|
|
111
|
+
<SidebarMenuItem key={tag}>
|
|
112
|
+
<SidebarMenuButton
|
|
113
|
+
isActive={tagActive}
|
|
114
|
+
className={tagActive ? "" : "opacity-75"}
|
|
115
|
+
render={<Link to="/$" params={{ _splat: tagPath }} />}
|
|
116
|
+
>
|
|
117
|
+
<Tag className="size-3.5" />
|
|
118
|
+
<span>{tag}</span>
|
|
119
|
+
</SidebarMenuButton>
|
|
120
|
+
</SidebarMenuItem>
|
|
121
|
+
)
|
|
122
|
+
})}
|
|
123
|
+
</SidebarMenu>
|
|
124
|
+
</SidebarGroupContent>
|
|
125
|
+
</SidebarGroup>
|
|
126
|
+
)}
|
|
127
|
+
</>
|
|
128
|
+
)
|
|
129
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Link, useLocation } from "@tanstack/react-router"
|
|
2
|
+
import { Clock, List } from "lucide-react"
|
|
3
|
+
import {
|
|
4
|
+
currentSection,
|
|
5
|
+
sectionFlatArticles,
|
|
6
|
+
sortedArticles,
|
|
7
|
+
} from "../content/article.ts"
|
|
8
|
+
import {
|
|
9
|
+
SidebarGroup,
|
|
10
|
+
SidebarGroupContent,
|
|
11
|
+
SidebarGroupLabel,
|
|
12
|
+
SidebarMenu,
|
|
13
|
+
SidebarMenuButton,
|
|
14
|
+
SidebarMenuItem,
|
|
15
|
+
SidebarMenuSub,
|
|
16
|
+
SidebarMenuSubButton,
|
|
17
|
+
SidebarMenuSubItem,
|
|
18
|
+
} from "../elements/sidebar.tsx"
|
|
19
|
+
|
|
20
|
+
/** Changelog body slot for the Sidebar shell: All Releases / Recent Releases */
|
|
21
|
+
export function SidebarReleases() {
|
|
22
|
+
const pathname = useLocation({ select: l => l.pathname })
|
|
23
|
+
|
|
24
|
+
const section = currentSection(`/${pathname.replace(/^\/|\/$/g, "")}/`)
|
|
25
|
+
const flat = section ? (sectionFlatArticles.get(section.prefix) ?? []) : []
|
|
26
|
+
const entries = flat
|
|
27
|
+
.map(p => sortedArticles.find(a => a.path === p))
|
|
28
|
+
.filter(a => a !== undefined)
|
|
29
|
+
const recent = entries.slice(0, 5)
|
|
30
|
+
|
|
31
|
+
const normalized = `/${pathname.replace(/^\/|\/$/g, "")}/`
|
|
32
|
+
const isIndex = section ? normalized === section.prefix : false
|
|
33
|
+
const sectionPath = (section?.prefix ?? "/changelog/").replace(/^\/|\/$/g, "")
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<SidebarGroup>
|
|
37
|
+
<SidebarGroupLabel className="uppercase font-mono text-xs tracking-widest">
|
|
38
|
+
Releases
|
|
39
|
+
</SidebarGroupLabel>
|
|
40
|
+
<SidebarGroupContent>
|
|
41
|
+
<SidebarMenu>
|
|
42
|
+
<SidebarMenuItem>
|
|
43
|
+
<SidebarMenuButton
|
|
44
|
+
isActive={isIndex}
|
|
45
|
+
className={isIndex ? "" : "opacity-75"}
|
|
46
|
+
render={<Link to="/$" params={{ _splat: sectionPath }} />}
|
|
47
|
+
>
|
|
48
|
+
<List className="size-4" />
|
|
49
|
+
<span>All Releases</span>
|
|
50
|
+
</SidebarMenuButton>
|
|
51
|
+
</SidebarMenuItem>
|
|
52
|
+
<SidebarMenuItem>
|
|
53
|
+
<SidebarMenuButton className="opacity-75">
|
|
54
|
+
<Clock className="size-4" />
|
|
55
|
+
<span>Recent Releases</span>
|
|
56
|
+
</SidebarMenuButton>
|
|
57
|
+
<SidebarMenuSub>
|
|
58
|
+
{recent.map(entry => {
|
|
59
|
+
const active = normalized === entry.path
|
|
60
|
+
return (
|
|
61
|
+
<SidebarMenuSubItem key={entry.path}>
|
|
62
|
+
<SidebarMenuSubButton
|
|
63
|
+
isActive={active}
|
|
64
|
+
className={active ? "" : "opacity-75"}
|
|
65
|
+
render={
|
|
66
|
+
<Link
|
|
67
|
+
to="/$"
|
|
68
|
+
params={{
|
|
69
|
+
_splat: entry.path.replace(/^\/|\/$/g, ""),
|
|
70
|
+
}}
|
|
71
|
+
/>
|
|
72
|
+
}
|
|
73
|
+
>
|
|
74
|
+
<span>{entry.title}</span>
|
|
75
|
+
</SidebarMenuSubButton>
|
|
76
|
+
</SidebarMenuSubItem>
|
|
77
|
+
)
|
|
78
|
+
})}
|
|
79
|
+
</SidebarMenuSub>
|
|
80
|
+
</SidebarMenuItem>
|
|
81
|
+
</SidebarMenu>
|
|
82
|
+
</SidebarGroupContent>
|
|
83
|
+
</SidebarGroup>
|
|
84
|
+
)
|
|
85
|
+
}
|
|
@@ -11,8 +11,8 @@ import remarkDirective from "remark-directive"
|
|
|
11
11
|
import remarkGemoji from "remark-gemoji"
|
|
12
12
|
import remarkGfm from "remark-gfm"
|
|
13
13
|
import remarkMath from "remark-math"
|
|
14
|
-
import { loadConfig } from "
|
|
15
|
-
import { buildChangelog, cacheIncludeGlob } from "
|
|
14
|
+
import { loadConfig } from "./actions/config/load.ts"
|
|
15
|
+
import { buildChangelog, cacheIncludeGlob } from "./actions/changelog/build.ts"
|
|
16
16
|
import { Article } from "./models/article.ts"
|
|
17
17
|
import { pickDefaultIcon } from "./helpers/article-icon.ts"
|
|
18
18
|
import slugify from "@sindresorhus/slugify"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion"
|
|
2
2
|
import { ChevronDownIcon, ChevronUpIcon } from "lucide-react"
|
|
3
3
|
|
|
4
|
-
import { cn } from "../
|
|
4
|
+
import { cn } from "../utils/style.ts"
|
|
5
5
|
|
|
6
6
|
function Accordion({ className, ...props }: AccordionPrimitive.Root.Props) {
|
|
7
7
|
return (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog"
|
|
3
3
|
|
|
4
|
-
import { cn } from "../
|
|
4
|
+
import { cn } from "../utils/style.ts"
|
|
5
5
|
import { Button } from "./button.tsx"
|
|
6
6
|
|
|
7
7
|
function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
2
|
-
import { cn } from "../
|
|
2
|
+
import { cn } from "../utils/style.ts"
|
|
3
3
|
|
|
4
4
|
const alertVariants = cva(
|
|
5
5
|
"grid gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 w-full relative group/alert",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mergeProps } from "@base-ui/react/merge-props"
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render"
|
|
3
3
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
|
-
import { cn } from "../
|
|
4
|
+
import { cn } from "../utils/style.ts"
|
|
5
5
|
|
|
6
6
|
const badgeVariants = cva(
|
|
7
7
|
"h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive overflow-hidden group/badge",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mergeProps } from "@base-ui/react/merge-props"
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render"
|
|
3
3
|
import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react"
|
|
4
|
-
import { cn } from "../
|
|
4
|
+
import { cn } from "../utils/style.ts"
|
|
5
5
|
|
|
6
6
|
function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">) {
|
|
7
7
|
return (
|
|
@@ -2,7 +2,7 @@ import { mergeProps } from "@base-ui/react/merge-props"
|
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render"
|
|
3
3
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
4
|
|
|
5
|
-
import { cn } from "../
|
|
5
|
+
import { cn } from "../utils/style.ts"
|
|
6
6
|
import { Separator } from "./separator.tsx"
|
|
7
7
|
|
|
8
8
|
const buttonGroupVariants = cva(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button as ButtonPrimitive } from "@base-ui/react/button"
|
|
2
2
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
3
|
-
import { cn } from "../
|
|
3
|
+
import { cn } from "../utils/style.ts"
|
|
4
4
|
|
|
5
5
|
const buttonVariants = cva(
|
|
6
6
|
"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-[3px] aria-invalid:ring-[3px] [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",
|
|
@@ -4,7 +4,7 @@ import useEmblaCarousel, {
|
|
|
4
4
|
} from "embla-carousel-react"
|
|
5
5
|
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react"
|
|
6
6
|
|
|
7
|
-
import { cn } from "../
|
|
7
|
+
import { cn } from "../utils/style.ts"
|
|
8
8
|
import { Button } from "./button.tsx"
|
|
9
9
|
|
|
10
10
|
type CarouselApi = UseEmblaCarouselType[1]
|
|
@@ -2,7 +2,7 @@ import * as React from "react"
|
|
|
2
2
|
import * as RechartsPrimitive from "recharts"
|
|
3
3
|
import type { TooltipValueType } from "recharts"
|
|
4
4
|
|
|
5
|
-
import { cn } from "../
|
|
5
|
+
import { cn } from "../utils/style.ts"
|
|
6
6
|
|
|
7
7
|
// Format: { THEME_NAME: CSS_SELECTOR }
|
|
8
8
|
const THEMES = { light: "", dark: ".dark" } as const
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox"
|
|
2
2
|
import { CheckIcon } from "lucide-react"
|
|
3
3
|
|
|
4
|
-
import { cn } from "../
|
|
4
|
+
import { cn } from "../utils/style.ts"
|
|
5
5
|
|
|
6
6
|
function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {
|
|
7
7
|
return (
|