@publish.os/nextjs 0.0.1-alpha.90 → 0.0.1-alpha.91
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/compiler-assets/nextjs/defaults/group/layout.tsx +1 -5
- package/compiler-assets/nextjs/defaults/group/page.tsx +31 -22
- package/compiler-assets/nextjs/defaults/project/next.config.mjs +19 -10
- package/compiler-assets/nextjs/defaults/project/tsconfig.json.template +10 -0
- package/compiler-assets/nextjs/defaults/root/css/components/code-block.css +18 -0
- package/compiler-assets/nextjs/shims/document.tsx +38 -0
- package/compiler-assets/nextjs/shims/generated-leaf-page.tsx +2 -0
- package/compiler-assets/nextjs/shims/global-layout.tsx +8 -42
- package/compiler-assets/nextjs/shims/global-not-found.tsx +69 -0
- package/compiler-assets/nextjs/shims/markdown-route.ts +2 -0
- package/compiler-assets/nextjs/shims/metadata-icons.tsx +39 -0
- package/compiler-assets/nextjs/shims/not-found-content.tsx +53 -0
- package/compiler-assets/nextjs/shims/not-found-navigation.tsx +60 -0
- package/compiler-assets/nextjs/shims/proxy.ts +126 -60
- package/compiler-assets/nextjs/shims/site-fenced-code-block.tsx +2 -6
- package/compiler-assets/nextjs/shims/site-mdx-components.tsx +28 -16
- package/compiler-assets/nextjs/shims/site-mdx.tsx +6 -1
- package/dist/{build-operation-2JAYBSKF.js → build-operation-5QMLXF7N.js} +29 -23
- package/dist/{button-c3WGnxIj.d.ts → button-BdCScEKi.d.ts} +3 -3
- package/dist/capture-local-source-WGGDIUU2.js +258 -0
- package/dist/chunk-22RSSUNV.js +13 -0
- package/dist/{chunk-WKTEO6RS.js → chunk-4BC2L2KA.js} +46 -12
- package/dist/{chunk-WDY4IK6Z.js → chunk-5J3YUNRY.js} +3 -10
- package/dist/chunk-5KAD7W53.js +248 -0
- package/dist/{chunk-DWA3ZRGW.js → chunk-6C65KV7O.js} +2 -2
- package/dist/{chunk-GGKFQ3MA.js → chunk-6D2E6UMD.js} +144 -70
- package/dist/{chunk-7OGTPSKI.js → chunk-7NY22B5U.js} +8 -3
- package/dist/chunk-EFO6AWXN.js +19 -0
- package/dist/{chunk-726GV2NF.js → chunk-F3AGNDF4.js} +100 -67
- package/dist/chunk-GBPLER5H.js +426 -0
- package/dist/chunk-IL4RJOKI.js +186 -0
- package/dist/{chunk-DLDFHU7Y.js → chunk-NNBJZPFM.js} +4 -2
- package/dist/{chunk-VO2I7MTM.js → chunk-ORIUWJBQ.js} +8 -6
- package/dist/{chunk-H6XILMZX.js → chunk-OXOFRXEI.js} +1806 -831
- package/dist/chunk-UYGCOWRF.js +1709 -0
- package/dist/{chunk-YLTOLYWM.js → chunk-WL75GQ5M.js} +6 -18
- package/dist/compiler.d.ts +15 -2
- package/dist/compiler.js +90 -21
- package/dist/components/blocks/agent-actions.d.ts +81 -0
- package/dist/components/blocks/agent-actions.js +594 -0
- package/dist/components/blocks/toc.d.ts +43 -0
- package/dist/components/blocks/toc.js +136 -0
- package/dist/components/ui/button.d.ts +5 -0
- package/dist/components/ui/button.js +94 -0
- package/dist/compose-CVBJRAF6.js +16 -0
- package/dist/config/createNextConfig.js +17 -3
- package/dist/{dev-operation-TZDVJCN7.js → dev-operation-OSHHWRWK.js} +121 -81
- package/dist/{framework-selection-X4U6Y6QC.js → framework-selection-ZVO323PK.js} +3 -2
- package/dist/ide-support-CU6Z5PVR.js +16 -0
- package/dist/index.d.ts +40 -1
- package/dist/jsx-dev-runtime.d.ts +6 -0
- package/dist/jsx-dev-runtime.js +100 -0
- package/dist/jsx-runtime.d.ts +7 -0
- package/dist/jsx-runtime.js +97 -0
- package/dist/kernel/components/blocks/AgentActions.d.ts +35 -6
- package/dist/kernel/components/blocks/AgentActions.js +383 -142
- package/dist/kernel/components/blocks/agent-actions.d.ts +5 -0
- package/dist/kernel/components/blocks/agent-actions.js +594 -0
- package/dist/kernel/components/blocks/animated-icon-swap.js +1 -1
- package/dist/kernel/components/blocks/color-palette.js +4 -4
- package/dist/kernel/components/blocks/logo-block.js +1 -1
- package/dist/kernel/components/blocks/nav-breadcrumb.js +2 -2
- package/dist/kernel/components/blocks/navbar.js +17 -17
- package/dist/kernel/components/blocks/navigation-progress.js +2 -2
- package/dist/kernel/components/blocks/next-prev.js +1 -1
- package/dist/kernel/components/blocks/page-list.js +2 -2
- package/dist/kernel/components/blocks/search.d.ts +1 -1
- package/dist/kernel/components/blocks/search.js +16 -17
- package/dist/kernel/components/blocks/sidebar-node.js +1 -1
- package/dist/kernel/components/blocks/sidebar.js +7 -4
- package/dist/kernel/components/blocks/theme-toggle.d.ts +1 -1
- package/dist/kernel/components/blocks/theme-toggle.js +5 -5
- package/dist/kernel/components/blocks/toc-client.d.ts +40 -0
- package/dist/kernel/components/blocks/toc-client.js +495 -0
- package/dist/kernel/components/blocks/toc.d.ts +19 -1
- package/dist/kernel/components/blocks/toc.js +121 -179
- package/dist/kernel/components/mdx/components/blockquote.js +1 -1
- package/dist/kernel/components/mdx/components/callout.js +1 -1
- package/dist/kernel/components/mdx/components/code-block.js +2 -2
- package/dist/kernel/components/mdx/components/copy-code-button.js +5 -4
- package/dist/kernel/components/mdx/components/figure-caption.d.ts +1 -1
- package/dist/kernel/components/mdx/components/figure-caption.js +3 -2
- package/dist/kernel/components/mdx/components/figure.d.ts +6 -2
- package/dist/kernel/components/mdx/components/figure.js +23 -13
- package/dist/kernel/components/mdx/components/footnotes.js +1 -1
- package/dist/kernel/components/mdx/components/heading-copy-link.js +1 -1
- package/dist/kernel/components/mdx/components/heading.js +6 -3
- package/dist/kernel/components/mdx/components/hr.js +2 -2
- package/dist/kernel/components/mdx/components/image-zoom.js +1 -1
- package/dist/kernel/components/mdx/components/image.d.ts +1 -1
- package/dist/kernel/components/mdx/components/image.js +21 -16
- package/dist/kernel/components/mdx/components/inline-code.js +1 -1
- package/dist/kernel/components/mdx/components/kbd.js +2 -2
- package/dist/kernel/components/mdx/components/link.d.ts +3 -3
- package/dist/kernel/components/mdx/components/link.js +2 -2
- package/dist/kernel/components/mdx/components/paragraph.js +1 -1
- package/dist/kernel/components/mdx/components/strikethrough.js +1 -1
- package/dist/kernel/components/mdx/components/table.js +2 -2
- package/dist/kernel/components/mdx/components/task-list.js +1 -1
- package/dist/kernel/components/mdx/components/video-player.d.ts +6 -2
- package/dist/kernel/components/mdx/components/video-player.js +6 -2
- package/dist/kernel/components/mdx/components/video.d.ts +5 -3
- package/dist/kernel/components/mdx/components/video.js +7 -5
- package/dist/kernel/components/mdx/error-boundary.d.ts +1 -1
- package/dist/kernel/components/mdx/error-boundary.js +2 -2
- package/dist/kernel/components/mdx/error-fallback.js +1 -1
- package/dist/kernel/components/mdx/mdx.d.ts +20 -10
- package/dist/kernel/components/mdx/mdx.js +231 -34
- package/dist/kernel/components/mdx/rehype-heading-ids.d.ts +1 -0
- package/dist/kernel/components/mdx/rehype-heading-ids.js +5 -3
- package/dist/kernel/components/mdx/types.d.ts +1 -1
- package/dist/kernel/components/next-image.d.ts +12 -0
- package/dist/kernel/components/next-image.js +61 -0
- package/dist/kernel/components/ui/accordion.js +1 -1
- package/dist/kernel/components/ui/breadcrumb-trail.d.ts +2 -2
- package/dist/kernel/components/ui/breadcrumb-trail.js +2 -2
- package/dist/kernel/components/ui/breadcrumb.d.ts +1 -1
- package/dist/kernel/components/ui/breadcrumb.js +4 -4
- package/dist/kernel/components/ui/button-group.d.ts +1 -1
- package/dist/kernel/components/ui/button-group.js +3 -3
- package/dist/kernel/components/ui/button.d.ts +56 -4
- package/dist/kernel/components/ui/button.js +43 -39
- package/dist/kernel/components/ui/card.js +1 -1
- package/dist/kernel/components/ui/dialog.js +1 -1
- package/dist/kernel/components/ui/drawer.js +1 -1
- package/dist/kernel/components/ui/input.d.ts +2 -2
- package/dist/kernel/components/ui/input.js +1 -1
- package/dist/kernel/components/ui/kbd.d.ts +1 -1
- package/dist/kernel/components/ui/kbd.js +1 -1
- package/dist/kernel/components/ui/link.d.ts +8 -2
- package/dist/kernel/components/ui/link.js +2 -2
- package/dist/kernel/components/ui/menu.js +1 -1
- package/dist/kernel/components/ui/mod-key.js +2 -2
- package/dist/kernel/components/ui/navigation-menu.js +1 -1
- package/dist/kernel/components/ui/popover.js +1 -1
- package/dist/kernel/components/ui/progress.js +1 -1
- package/dist/kernel/components/ui/scroll-area.d.ts +8 -8
- package/dist/kernel/components/ui/scroll-area.js +1 -1
- package/dist/kernel/components/ui/select.js +1 -1
- package/dist/kernel/components/ui/separator.js +1 -1
- package/dist/kernel/components/ui/table.js +1 -1
- package/dist/kernel/components/ui/tabs.js +1 -1
- package/dist/kernel/components/ui/tag.js +1 -1
- package/dist/kernel/components/ui/text.d.ts +1 -1
- package/dist/kernel/components/ui/text.js +1 -1
- package/dist/kernel/components/ui/toast.js +1 -1
- package/dist/kernel/components/ui/tooltip.js +1 -1
- package/dist/kernel/defaults.registry.d.ts +2 -15
- package/dist/kernel/defaults.registry.js +2 -17
- package/dist/kernel/routes/agent/markdown.d.ts +3 -0
- package/dist/kernel/routes/agent/markdown.js +219 -48
- package/dist/kernel/routes/layouts/group.d.ts +1 -1
- package/dist/kernel/routes/layouts/group.js +5 -7
- package/dist/kernel/routes/metadata/feed.d.ts +1 -1
- package/dist/kernel/routes/metadata/feed.js +109 -83
- package/dist/kernel/routes/metadata/llms.d.ts +11 -3
- package/dist/kernel/routes/metadata/llms.js +154 -57
- package/dist/kernel/routes/metadata/og-image.js +1 -1
- package/dist/kernel/routes/metadata/robots.d.ts +1 -1
- package/dist/kernel/routes/metadata/sitemap.d.ts +22 -3
- package/dist/kernel/routes/metadata/sitemap.js +183 -43
- package/dist/kernel/routes/not-found.d.ts +34 -0
- package/dist/kernel/routes/not-found.js +213 -0
- package/dist/kernel/routes/pages/group.d.ts +2 -2
- package/dist/kernel/routes/pages/group.js +1 -1
- package/dist/kernel/routes/pages/leaf.d.ts +30 -3
- package/dist/kernel/routes/pages/leaf.js +5 -4
- package/dist/kernel/routes/pages/root.d.ts +2 -2
- package/dist/kernel/routes/pages/root.js +1 -1
- package/dist/keyboard-shortcuts.js +1 -1
- package/dist/route-metadata-og-image-BeKKFHg7.d.ts +58 -0
- package/dist/search.js +7 -9
- package/dist/theme-scope.js +1 -1
- package/dist/{types-BzkZty3r.d.ts → types-J2w_puPF.d.ts} +1 -20
- package/dist/types-sM2g9nW0.d.ts +12 -0
- package/dist/types.d.ts +1 -0
- package/dist/utils/heading-ids.js +30 -11
- package/dist/utils/toc-selection.d.ts +7 -0
- package/dist/utils/toc-selection.js +14 -0
- package/dist/validate-local-source-SV44DBQT.js +16 -0
- package/dist/validate-publish-os-source-NZJF3TB2.js +14 -0
- package/init/seed/minimal/publish.os/assets/blog/hello-world.svg +13 -0
- package/init/seed/minimal/publish.os/assets/favicon.dark.svg +13 -0
- package/init/seed/minimal/publish.os/assets/favicon.svg +13 -0
- package/init/seed/minimal/publish.os/blog/content/hello-world.mdx +48 -0
- package/init/seed/minimal/publish.os/blog/content/series-a.mdx +11 -0
- package/init/seed/minimal/publish.os/blog/index.tsx +82 -0
- package/init/seed/minimal/publish.os/blog/layout.tsx +13 -0
- package/init/seed/minimal/publish.os/blog/page.tsx +76 -0
- package/init/seed/minimal/publish.os/components/blog/copy-link.tsx +64 -0
- package/init/seed/minimal/publish.os/docs/content/get-started.mdx +2 -3
- package/init/seed/minimal/publish.os/docs/content/groups.mdx +5 -6
- package/init/seed/minimal/publish.os/publish.os.config.json +6 -2
- package/init/seed/minimal/publish.os/theme.css +3 -3
- package/init/seed/minimal/seed.json +11 -4
- package/init/seed/scratch/publish.os/docs/content/get-started.mdx +1 -1
- package/init/seed/scratch/publish.os/publish.os.config.json +1 -1
- package/package.json +45 -20
- package/release/app/phosphor/package.json +3 -3
- package/release/app/phosphor/pnpm-lock.yaml.template +88 -75
- package/release/compiler/package.json +5 -3
- package/release/compiler/pnpm-lock.yaml.template +118 -74
- package/release/release.json +6 -6
- package/dist/button-CtzUJB8u.d.ts +0 -11
- package/dist/chunk-535TM4A5.js +0 -1455
- package/dist/chunk-B2V22WRT.js +0 -297
- package/dist/chunk-NECL5IBJ.js +0 -318
- package/dist/chunk-SVYGXXYR.js +0 -36
- package/dist/chunk-UF6ATARM.js +0 -1100
- package/dist/compose-NN23UJGC.js +0 -13
- package/dist/ide-support-ZNW7ODFY.js +0 -15
- package/dist/kernel/components/blocks/design-system-preview.d.ts +0 -61
- package/dist/kernel/components/blocks/design-system-preview.js +0 -667
- package/dist/kernel/components/blocks/link-playground.d.ts +0 -5
- package/dist/kernel/components/blocks/link-playground.js +0 -744
- package/dist/kernel/components/blocks/navigation-progress-playground.d.ts +0 -5
- package/dist/kernel/components/blocks/navigation-progress-playground.js +0 -629
- package/dist/kernel/components/ui/theme-toggle.d.ts +0 -24
- package/dist/kernel/components/ui/theme-toggle.js +0 -53
- package/dist/validate-local-source-XRL2Y7XE.js +0 -14
- package/dist/validate-publish-os-source-DAPZ4QGE.js +0 -12
- package/init/seed/minimal/publish.os/assets/favicon/favicon.dark.png +0 -0
- package/init/seed/minimal/publish.os/assets/favicon/favicon.png +0 -0
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
// src/components/block/navbar/navbar.tsx
|
|
4
4
|
import {
|
|
5
5
|
LogoBlock
|
|
6
|
-
} from "@
|
|
7
|
-
import { Search } from "@
|
|
8
|
-
import { Sidebar } from "@
|
|
9
|
-
import { ThemeToggle } from "@
|
|
10
|
-
import { Button as Button2 } from "@
|
|
6
|
+
} from "@components/blocks/logo-block";
|
|
7
|
+
import { Search } from "@components/blocks/search";
|
|
8
|
+
import { Sidebar } from "@components/blocks/sidebar";
|
|
9
|
+
import { ThemeToggle } from "@components/blocks/theme-toggle";
|
|
10
|
+
import { Button as Button2 } from "@components/ui/button";
|
|
11
11
|
import {
|
|
12
12
|
Drawer,
|
|
13
13
|
DrawerClose,
|
|
@@ -17,9 +17,9 @@ import {
|
|
|
17
17
|
DrawerTitle,
|
|
18
18
|
DrawerTrigger,
|
|
19
19
|
DrawerViewport
|
|
20
|
-
} from "@
|
|
21
|
-
import { Link as Link3 } from "@
|
|
22
|
-
import { ScrollArea as ScrollArea2 } from "@
|
|
20
|
+
} from "@components/ui/drawer";
|
|
21
|
+
import { Link as Link3 } from "@components/ui/link";
|
|
22
|
+
import { ScrollArea as ScrollArea2 } from "@components/ui/scroll-area";
|
|
23
23
|
import {
|
|
24
24
|
ArrowRightIcon,
|
|
25
25
|
CaretLeftIcon,
|
|
@@ -32,8 +32,8 @@ import { usePathname } from "next/navigation";
|
|
|
32
32
|
import { useEffect, useRef as useRef2, useState as useState2 } from "react";
|
|
33
33
|
|
|
34
34
|
// src/components/block/navbar/group-navigation.tsx
|
|
35
|
-
import { Button } from "@
|
|
36
|
-
import { Link } from "@
|
|
35
|
+
import { Button } from "@components/ui/button";
|
|
36
|
+
import { Link } from "@components/ui/link";
|
|
37
37
|
import {
|
|
38
38
|
Menu,
|
|
39
39
|
MenuLinkItem,
|
|
@@ -41,11 +41,11 @@ import {
|
|
|
41
41
|
MenuPortal,
|
|
42
42
|
MenuPositioner,
|
|
43
43
|
MenuTrigger
|
|
44
|
-
} from "@
|
|
44
|
+
} from "@components/ui/menu";
|
|
45
45
|
import { CaretDownIcon } from "@phosphor-icons/react/ssr";
|
|
46
46
|
import NextLink from "next/link";
|
|
47
47
|
import { useLayoutEffect, useRef, useState } from "react";
|
|
48
|
-
import { jsx, jsxs } from "
|
|
48
|
+
import { jsx, jsxs } from "@publish.os/nextjs/jsx-runtime";
|
|
49
49
|
function GroupNavigation({
|
|
50
50
|
currentPath,
|
|
51
51
|
tree
|
|
@@ -89,7 +89,7 @@ function GroupNavigation({
|
|
|
89
89
|
{
|
|
90
90
|
active: isActive(group.path),
|
|
91
91
|
"aria-current": isActive(group.path) ? "location" : void 0,
|
|
92
|
-
className: "
|
|
92
|
+
className: "pointer-coarse:min-h-11 pointer-coarse:min-w-11",
|
|
93
93
|
href: group.href ?? group.path,
|
|
94
94
|
size: "xs",
|
|
95
95
|
target: "_self",
|
|
@@ -134,9 +134,9 @@ function GroupNavigation({
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
// src/components/block/navbar/mobile-navigation-tree.tsx
|
|
137
|
-
import { Link as Link2 } from "@
|
|
138
|
-
import { ScrollArea } from "@
|
|
139
|
-
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "
|
|
137
|
+
import { Link as Link2 } from "@components/ui/link";
|
|
138
|
+
import { ScrollArea } from "@components/ui/scroll-area";
|
|
139
|
+
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "@publish.os/nextjs/jsx-runtime";
|
|
140
140
|
function MobileNavigationTree({
|
|
141
141
|
currentPath,
|
|
142
142
|
indexCurrentPath,
|
|
@@ -212,7 +212,7 @@ function PageLink({
|
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
// src/components/block/navbar/navbar.tsx
|
|
215
|
-
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "
|
|
215
|
+
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "@publish.os/nextjs/jsx-runtime";
|
|
216
216
|
function Navbar({
|
|
217
217
|
logo,
|
|
218
218
|
showThemeToggle = !0,
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
Progress,
|
|
6
6
|
ProgressIndicator,
|
|
7
7
|
ProgressTrack
|
|
8
|
-
} from "@
|
|
8
|
+
} from "@components/ui/progress";
|
|
9
9
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
10
10
|
import { usePathname, useSearchParams } from "next/navigation";
|
|
11
11
|
import { Suspense, useCallback, useEffect, useRef, useState } from "react";
|
|
12
|
-
import { jsx } from "
|
|
12
|
+
import { jsx } from "@publish.os/nextjs/jsx-runtime";
|
|
13
13
|
var navigationProgressConfig = {
|
|
14
14
|
initialProgress: 0,
|
|
15
15
|
targetProgress: 98,
|
|
@@ -9,7 +9,7 @@ function pageNodes(nodes) {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
// src/components/block/page-navigation/next-prev.tsx
|
|
12
|
-
import { jsx, jsxs } from "
|
|
12
|
+
import { jsx, jsxs } from "@publish.os/nextjs/jsx-runtime";
|
|
13
13
|
function DirectionIcon({ direction }) {
|
|
14
14
|
return /* @__PURE__ */ jsx("span", { className: "shrink-0 text-foreground-3 transition-colors duration-200 group-hover/next-prev:text-foreground-2", children: direction === "previous" ? /* @__PURE__ */ jsx(CaretLeftIcon, { "aria-hidden": "true", size: 14 }) : /* @__PURE__ */ jsx(CaretRightIcon, { "aria-hidden": "true", size: 14 }) });
|
|
15
15
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/components/block/page-navigation/page-list.tsx
|
|
2
|
-
import { Link } from "@
|
|
2
|
+
import { Link } from "@components/ui/link";
|
|
3
3
|
|
|
4
4
|
// src/components/block/page-navigation/page-nodes.ts
|
|
5
5
|
function pageNodes(nodes) {
|
|
@@ -7,7 +7,7 @@ function pageNodes(nodes) {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
// src/components/block/page-navigation/page-list.tsx
|
|
10
|
-
import { jsx } from "
|
|
10
|
+
import { jsx } from "@publish.os/nextjs/jsx-runtime";
|
|
11
11
|
function PageList({ tree, currentPath, className }) {
|
|
12
12
|
let pages = pageNodes(tree);
|
|
13
13
|
return pages.length === 0 ? null : /* @__PURE__ */ jsx("nav", { "aria-label": "Pages in this group", className, children: /* @__PURE__ */ jsx("ul", { className: "space-y-2 text-sm", children: pages.map((page) => {
|
|
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode, ComponentPropsWithRef, ComponentPropsWithoutRef } from 'react';
|
|
4
4
|
import { useRender } from '@base-ui/react/use-render';
|
|
5
|
-
import { B as ButtonProps } from '../../../button-
|
|
5
|
+
import { B as ButtonProps } from '../../../button-BdCScEKi.js';
|
|
6
6
|
import { Dialog } from '@base-ui/react/dialog';
|
|
7
7
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
8
8
|
import { Input } from '@base-ui/react/input';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/modules/search/search-block.tsx
|
|
4
4
|
import { useRender } from "@base-ui/react/use-render";
|
|
5
|
-
import { Button } from "@
|
|
5
|
+
import { Button } from "@components/ui/button";
|
|
6
6
|
import {
|
|
7
7
|
Dialog,
|
|
8
8
|
DialogBackdrop,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
DialogPopup,
|
|
11
11
|
DialogPortal,
|
|
12
12
|
DialogTitle
|
|
13
|
-
} from "@
|
|
13
|
+
} from "@components/ui/dialog";
|
|
14
14
|
import {
|
|
15
15
|
Drawer,
|
|
16
16
|
DrawerBackdrop,
|
|
@@ -20,11 +20,11 @@ import {
|
|
|
20
20
|
DrawerTitle,
|
|
21
21
|
DrawerViewport,
|
|
22
22
|
DrawerVirtualKeyboardProvider
|
|
23
|
-
} from "@
|
|
24
|
-
import { Input } from "@
|
|
25
|
-
import { Kbd as Kbd2
|
|
26
|
-
import { ModKey } from "@
|
|
27
|
-
import { Separator as Separator2 } from "@
|
|
23
|
+
} from "@components/ui/drawer";
|
|
24
|
+
import { Input } from "@components/ui/input";
|
|
25
|
+
import { Kbd as Kbd2 } from "@components/ui/kbd";
|
|
26
|
+
import { ModKey } from "@components/ui/mod-key";
|
|
27
|
+
import { Separator as Separator2 } from "@components/ui/separator";
|
|
28
28
|
import { MagnifyingGlassIcon } from "@phosphor-icons/react/ssr";
|
|
29
29
|
import { formatShortcut } from "@publish.os/nextjs/keyboard-shortcuts";
|
|
30
30
|
import {
|
|
@@ -38,21 +38,21 @@ import {
|
|
|
38
38
|
} from "react";
|
|
39
39
|
|
|
40
40
|
// src/modules/search/results.tsx
|
|
41
|
-
import { Kbd } from "@
|
|
41
|
+
import { Kbd } from "@components/ui/kbd";
|
|
42
42
|
import {
|
|
43
43
|
ScrollAreaContent,
|
|
44
44
|
ScrollAreaRoot,
|
|
45
45
|
ScrollAreaScrollbar,
|
|
46
46
|
ScrollAreaThumb,
|
|
47
47
|
ScrollAreaViewport
|
|
48
|
-
} from "@
|
|
49
|
-
import { Separator } from "@
|
|
48
|
+
} from "@components/ui/scroll-area";
|
|
49
|
+
import { Separator } from "@components/ui/separator";
|
|
50
50
|
import { ArrowElbowDownLeftIcon } from "@phosphor-icons/react/ssr";
|
|
51
51
|
import { useSearchBlock } from "@publish.os/nextjs/search";
|
|
52
52
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
53
53
|
import NextLink from "next/link";
|
|
54
54
|
import { useEffect } from "react";
|
|
55
|
-
import { Fragment, jsx, jsxs } from "
|
|
55
|
+
import { Fragment, jsx, jsxs } from "@publish.os/nextjs/jsx-runtime";
|
|
56
56
|
var SEARCH_RESULT_SNIPPET_LENGTH = 180;
|
|
57
57
|
function getSearchPanel({
|
|
58
58
|
displayResults,
|
|
@@ -323,11 +323,11 @@ import {
|
|
|
323
323
|
Progress,
|
|
324
324
|
ProgressIndicator,
|
|
325
325
|
ProgressTrack
|
|
326
|
-
} from "@
|
|
326
|
+
} from "@components/ui/progress";
|
|
327
327
|
import { useSearchBlock as useSearchBlock2 } from "@publish.os/nextjs/search";
|
|
328
328
|
import { cn as cn2 } from "@publish.os/nextjs/utils/cn";
|
|
329
329
|
import { useLayoutEffect, useRef, useState } from "react";
|
|
330
|
-
import { jsx as jsx2 } from "
|
|
330
|
+
import { jsx as jsx2 } from "@publish.os/nextjs/jsx-runtime";
|
|
331
331
|
var INITIAL_PROGRESS = 5, FAST_PHASE_END = 25, TARGET_PROGRESS = 95, FAST_DURATION = 50, MAX_DURATION = 5e3, COMPLETE_DURATION = 200, EXIT_DURATION = 150;
|
|
332
332
|
function SearchProgressBar({ className }) {
|
|
333
333
|
let {
|
|
@@ -393,7 +393,7 @@ function SearchProgressBar({ className }) {
|
|
|
393
393
|
}
|
|
394
394
|
|
|
395
395
|
// src/modules/search/search-block.tsx
|
|
396
|
-
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "
|
|
396
|
+
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "@publish.os/nextjs/jsx-runtime";
|
|
397
397
|
function Trigger({
|
|
398
398
|
children,
|
|
399
399
|
className,
|
|
@@ -625,13 +625,12 @@ function SearchInputField({
|
|
|
625
625
|
{
|
|
626
626
|
"aria-label": "Close search",
|
|
627
627
|
className: cn3(
|
|
628
|
-
|
|
629
|
-
"absolute right-4 top-1/2 hidden -translate-y-1/2 cursor-pointer text-foreground-2 before:absolute before:left-1/2 before:top-1/2 before:size-10 before:-translate-1/2 before:content-[''] active:translate-y-[calc(-50%_+_1px)] md:inline-flex",
|
|
628
|
+
"absolute right-4 top-1/2 hidden -translate-y-1/2 cursor-pointer before:absolute before:left-1/2 before:top-1/2 before:size-10 before:-translate-1/2 before:content-[''] active:translate-y-[calc(-50%_+_1px)] md:inline-flex",
|
|
630
629
|
closeClassName
|
|
631
630
|
),
|
|
632
631
|
onClick: () => setOpen(!1),
|
|
633
632
|
type: "button",
|
|
634
|
-
children: closeLabel
|
|
633
|
+
children: /* @__PURE__ */ jsx3(Kbd2, { size: "xs", children: closeLabel })
|
|
635
634
|
}
|
|
636
635
|
) : null,
|
|
637
636
|
/* @__PURE__ */ jsx3(Separator2, { className: "absolute inset-x-0 bottom-0 z-content md:hidden group-data-[search-presentation=drawer]/search:block group-data-[search-presentation=dialog]/search:hidden" })
|
|
@@ -3,7 +3,7 @@ import { CaretRightIcon } from "@phosphor-icons/react/ssr";
|
|
|
3
3
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import NextLink from "next/link";
|
|
6
|
-
import { jsx, jsxs } from "
|
|
6
|
+
import { jsx, jsxs } from "@publish.os/nextjs/jsx-runtime";
|
|
7
7
|
var SIDEBAR_NODE_VARIANT = "base", depthClassByDepth = {
|
|
8
8
|
0: "pl-2",
|
|
9
9
|
1: "pl-5",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
// src/components/block/sidebar/sidebar.tsx
|
|
4
|
-
import { SidebarNode } from "@
|
|
5
|
-
import { ScrollArea } from "@
|
|
4
|
+
import { SidebarNode } from "@components/blocks/sidebar-node";
|
|
5
|
+
import { ScrollArea } from "@components/ui/scroll-area";
|
|
6
6
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
7
7
|
import { usePathname } from "next/navigation";
|
|
8
8
|
import {
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
useRef,
|
|
16
16
|
useState
|
|
17
17
|
} from "react";
|
|
18
|
-
import { jsx, jsxs } from "
|
|
18
|
+
import { jsx, jsxs } from "@publish.os/nextjs/jsx-runtime";
|
|
19
19
|
function normalizePath(path) {
|
|
20
20
|
if (!path) return "";
|
|
21
21
|
let [withoutQuery = ""] = path.split(/[?#]/);
|
|
@@ -53,7 +53,10 @@ function createActiveIndex({
|
|
|
53
53
|
}) {
|
|
54
54
|
let activeIndex = /* @__PURE__ */ new Map();
|
|
55
55
|
function visit(node) {
|
|
56
|
-
let path = nodePath(node), exactActive = isExactActivePath(path, currentPath), pathActive = node.type === "page" && isActivePath(path, currentPath), childActive =
|
|
56
|
+
let path = nodePath(node), exactActive = isExactActivePath(path, currentPath), pathActive = node.type === "page" && isActivePath(path, currentPath), childActive = !1;
|
|
57
|
+
for (let child of nodeChildren(node))
|
|
58
|
+
childActive = visit(child) || childActive;
|
|
59
|
+
let activeState = exactActive ? "path-active" : childActive || pathActive ? "child-path-active" : void 0;
|
|
57
60
|
return activeIndex.set(node, {
|
|
58
61
|
activeState,
|
|
59
62
|
initiallyExpanded: exactActive || pathActive || childActive
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { B as ButtonProps } from '../../../button-
|
|
2
|
+
import { B as ButtonProps } from '../../../button-BdCScEKi.js';
|
|
3
3
|
import 'class-variance-authority/types';
|
|
4
4
|
import 'class-variance-authority';
|
|
5
5
|
import 'react';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
// src/components/
|
|
4
|
-
import { Button } from "@
|
|
5
|
-
import {
|
|
3
|
+
// src/components/block/theme-toggle.tsx
|
|
4
|
+
import { Button } from "@components/ui/button";
|
|
5
|
+
import { CircleHalfIcon, MoonIcon, SunIcon } from "@phosphor-icons/react/ssr";
|
|
6
6
|
import { useTheme } from "next-themes";
|
|
7
7
|
import { useEffect, useMemo, useState } from "react";
|
|
8
|
-
import { jsx } from "
|
|
8
|
+
import { jsx } from "@publish.os/nextjs/jsx-runtime";
|
|
9
9
|
var themeOrder = ["system", "light", "dark"];
|
|
10
10
|
function ThemeIcon({ theme }) {
|
|
11
|
-
return theme === "light" ? /* @__PURE__ */ jsx(SunIcon, { "aria-hidden": "true", size: 16 }) : theme === "dark" ? /* @__PURE__ */ jsx(MoonIcon, { "aria-hidden": "true", size: 16 }) : /* @__PURE__ */ jsx(
|
|
11
|
+
return theme === "light" ? /* @__PURE__ */ jsx(SunIcon, { "aria-hidden": "true", size: 16, weight: "fill" }) : theme === "dark" ? /* @__PURE__ */ jsx(MoonIcon, { "aria-hidden": "true", size: 16, weight: "fill" }) : /* @__PURE__ */ jsx(CircleHalfIcon, { "aria-hidden": "true", size: 16, weight: "fill" });
|
|
12
12
|
}
|
|
13
13
|
function normalizeTheme(theme) {
|
|
14
14
|
return theme === "light" || theme === "dark" ? theme : "system";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
type TocHeading = {
|
|
5
|
+
id: string;
|
|
6
|
+
level: number;
|
|
7
|
+
text: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
type TocClientProps = {
|
|
11
|
+
className: string;
|
|
12
|
+
desktopClassName: string;
|
|
13
|
+
desktopListClassName?: string;
|
|
14
|
+
headings: TocHeading[];
|
|
15
|
+
levels: [number, number];
|
|
16
|
+
listClassName?: string;
|
|
17
|
+
mobileClassName: string;
|
|
18
|
+
mobileQuery: string;
|
|
19
|
+
readingOffset?: number;
|
|
20
|
+
title: string;
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
};
|
|
23
|
+
declare function TocClientProvider({ className, desktopClassName, desktopListClassName, headings, levels, listClassName, mobileClassName, mobileQuery, readingOffset, title, children, }: TocClientProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
declare function TocDesktop({ children }: {
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
}): react_jsx_runtime.JSX.Element;
|
|
27
|
+
declare function TocMobile({ children }: {
|
|
28
|
+
children?: ReactNode;
|
|
29
|
+
}): react_jsx_runtime.JSX.Element;
|
|
30
|
+
declare function TocMobileHeader({ children }: {
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
}): react_jsx_runtime.JSX.Element;
|
|
33
|
+
declare function TocLinksSlot({ className, listClassName, viewport, }: {
|
|
34
|
+
className?: string;
|
|
35
|
+
listClassName?: string;
|
|
36
|
+
viewport?: "desktop" | "mobile";
|
|
37
|
+
}): react_jsx_runtime.JSX.Element;
|
|
38
|
+
declare function TocTitle({ children, className, ...props }: React.ComponentPropsWithoutRef<"span">): react_jsx_runtime.JSX.Element;
|
|
39
|
+
|
|
40
|
+
export { TocClientProvider, TocDesktop, TocLinksSlot, TocMobile, TocMobileHeader, TocTitle };
|