@publish.os/nextjs 0.0.1-alpha.81 → 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/app/globals.css +1 -0
- package/compiler-assets/nextjs/defaults/group/index.tsx +50 -0
- package/compiler-assets/nextjs/defaults/group/layout.tsx +8 -8
- package/compiler-assets/nextjs/defaults/group/page.tsx +44 -43
- package/compiler-assets/nextjs/defaults/project/next.config.mjs +33 -13
- package/compiler-assets/nextjs/defaults/project/tsconfig.json.template +10 -3
- package/compiler-assets/nextjs/defaults/root/css/animation.css +131 -0
- package/compiler-assets/nextjs/defaults/root/css/components/code-block.css +18 -0
- package/compiler-assets/nextjs/defaults/root/css/components/dialog.css +4 -1
- package/compiler-assets/nextjs/defaults/root/css/components/menu.css +1 -1
- package/compiler-assets/nextjs/defaults/root/css/components/navigation-menu.css +1 -1
- package/compiler-assets/nextjs/defaults/root/css/components/popover.css +1 -1
- package/compiler-assets/nextjs/defaults/root/css/components/select.css +1 -1
- package/compiler-assets/nextjs/defaults/root/css/components/tooltip.css +1 -1
- package/compiler-assets/nextjs/defaults/root/css/shadow.css +6 -25
- package/compiler-assets/nextjs/defaults/root/css/typography.css +51 -68
- package/compiler-assets/nextjs/defaults/root/globals.css +25 -0
- package/compiler-assets/nextjs/defaults/root/{page.tsx → index.tsx} +6 -2
- package/compiler-assets/nextjs/defaults/root/layout.tsx +7 -1
- package/compiler-assets/nextjs/defaults/root/theme.css +22 -22
- package/compiler-assets/nextjs/shims/document.tsx +38 -0
- package/compiler-assets/nextjs/shims/generated-group-page.tsx +19 -2
- package/compiler-assets/nextjs/shims/generated-leaf-page.tsx +18 -2
- package/compiler-assets/nextjs/shims/global-layout.tsx +19 -85
- 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 +143 -65
- package/compiler-assets/nextjs/shims/publish-os-theme-provider.tsx +76 -15
- package/compiler-assets/nextjs/shims/root-page.tsx +7 -1
- package/compiler-assets/nextjs/shims/site-fenced-code-block.tsx +30 -0
- package/compiler-assets/nextjs/shims/site-heading-level.tsx +14 -0
- package/compiler-assets/nextjs/shims/site-mdx-components.tsx +112 -0
- package/compiler-assets/nextjs/shims/site-mdx.tsx +17 -0
- package/compiler-assets/nextjs/shims/theme-defaults.css +41 -25
- package/dist/build-operation-5QMLXF7N.js +89 -0
- package/dist/{button-CFdx-ohV.d.ts → button-BdCScEKi.d.ts} +6 -6
- package/dist/capture-local-source-WGGDIUU2.js +258 -0
- package/dist/chunk-22RSSUNV.js +13 -0
- package/dist/chunk-4BC2L2KA.js +620 -0
- package/dist/chunk-5J3YUNRY.js +121 -0
- package/dist/chunk-5KAD7W53.js +248 -0
- package/dist/chunk-6C65KV7O.js +142 -0
- package/dist/chunk-6D2E6UMD.js +695 -0
- package/dist/chunk-7NY22B5U.js +161 -0
- package/dist/chunk-AI2UULNX.js +9 -0
- package/dist/chunk-EFO6AWXN.js +19 -0
- package/dist/chunk-F3AGNDF4.js +2377 -0
- package/dist/chunk-GBPLER5H.js +426 -0
- package/dist/chunk-IL4RJOKI.js +186 -0
- package/dist/chunk-NNBJZPFM.js +193 -0
- package/dist/chunk-ORIUWJBQ.js +58 -0
- package/dist/chunk-OXOFRXEI.js +7129 -0
- package/dist/chunk-UYGCOWRF.js +1709 -0
- package/dist/chunk-WL75GQ5M.js +80 -0
- package/dist/compiler.d.ts +54 -7
- package/dist/compiler.js +121 -13147
- 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 +27 -0
- package/dist/dev-operation-OSHHWRWK.js +1095 -0
- package/dist/framework-selection-ZVO323PK.js +11 -0
- package/dist/ide-support-CU6Z5PVR.js +16 -0
- package/dist/index.d.ts +55 -4
- 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 +401 -150
- 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 +3 -3
- package/dist/kernel/components/blocks/nav-breadcrumb.d.ts +10 -2
- package/dist/kernel/components/blocks/nav-breadcrumb.js +22 -7
- package/dist/kernel/components/blocks/navbar.d.ts +2 -2
- package/dist/kernel/components/blocks/navbar.js +406 -65
- package/dist/kernel/components/blocks/navigation-progress.js +6 -3
- package/dist/kernel/components/blocks/next-prev.d.ts +1 -1
- package/dist/kernel/components/blocks/next-prev.js +12 -24
- package/dist/kernel/components/blocks/page-list.d.ts +1 -1
- package/dist/kernel/components/blocks/page-list.js +7 -6
- package/dist/kernel/components/blocks/search.d.ts +83 -58
- package/dist/kernel/components/blocks/search.js +554 -428
- package/dist/kernel/components/blocks/sidebar-node.d.ts +2 -2
- package/dist/kernel/components/blocks/sidebar-node.js +12 -10
- package/dist/kernel/components/blocks/sidebar.d.ts +3 -3
- package/dist/kernel/components/blocks/sidebar.js +24 -14
- package/dist/kernel/components/blocks/theme-toggle.d.ts +2 -2
- package/dist/kernel/components/blocks/theme-toggle.js +47 -1
- 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 +122 -180
- package/dist/kernel/components/mdx/components/blockquote.js +2 -2
- package/dist/kernel/components/mdx/components/callout.d.ts +5 -7
- package/dist/kernel/components/mdx/components/callout.js +67 -36
- package/dist/kernel/components/mdx/components/code-block.d.ts +5 -2
- package/dist/kernel/components/mdx/components/code-block.js +106 -5
- package/dist/kernel/components/mdx/components/copy-code-button.d.ts +8 -0
- package/dist/kernel/components/mdx/components/copy-code-button.js +61 -0
- package/dist/kernel/components/mdx/components/figure-caption.d.ts +1 -1
- package/dist/kernel/components/mdx/components/figure-caption.js +4 -3
- package/dist/kernel/components/mdx/components/figure.d.ts +6 -2
- package/dist/kernel/components/mdx/components/figure.js +24 -14
- package/dist/kernel/components/mdx/components/footnotes.js +1 -1
- package/dist/kernel/components/mdx/components/heading-copy-link.js +4 -4
- 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 +2 -2
- package/dist/kernel/components/mdx/components/image.d.ts +1 -1
- package/dist/kernel/components/mdx/components/image.js +94 -68
- package/dist/kernel/components/mdx/components/inline-code.js +2 -2
- package/dist/kernel/components/mdx/components/kbd.d.ts +2 -2
- package/dist/kernel/components/mdx/components/kbd.js +5 -4
- package/dist/kernel/components/mdx/components/link.d.ts +35 -4
- package/dist/kernel/components/mdx/components/link.js +3 -3
- package/dist/kernel/components/mdx/components/paragraph.js +2 -5
- 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 +2 -2
- package/dist/kernel/components/mdx/components/video-player.d.ts +6 -2
- package/dist/kernel/components/mdx/components/video-player.js +8 -4
- package/dist/kernel/components/mdx/components/video.d.ts +5 -3
- package/dist/kernel/components/mdx/components/video.js +8 -6
- 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 +28 -14
- package/dist/kernel/components/mdx/mdx.js +336 -63
- package/dist/kernel/components/mdx/rehype-heading-ids.d.ts +1 -0
- package/dist/kernel/components/mdx/rehype-heading-ids.js +6 -4
- 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 +6 -23
- package/dist/kernel/components/ui/breadcrumb-trail.js +2 -2
- package/dist/kernel/components/ui/breadcrumb.d.ts +11 -3
- package/dist/kernel/components/ui/breadcrumb.js +10 -8
- package/dist/kernel/components/ui/button-group.js +8 -7
- package/dist/kernel/components/ui/button.d.ts +58 -6
- package/dist/kernel/components/ui/button.js +43 -39
- package/dist/kernel/components/ui/card.d.ts +2 -2
- package/dist/kernel/components/ui/card.js +1 -1
- package/dist/kernel/components/ui/dialog.js +1 -1
- package/dist/kernel/components/ui/drawer.d.ts +3 -1
- package/dist/kernel/components/ui/drawer.js +6 -2
- 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.js +10 -17
- package/dist/kernel/components/ui/link.d.ts +11 -3
- package/dist/kernel/components/ui/link.js +12 -11
- package/dist/kernel/components/ui/menu.js +6 -6
- package/dist/kernel/components/ui/mod-key.d.ts +10 -0
- package/dist/kernel/components/ui/mod-key.js +36 -0
- package/dist/kernel/components/ui/navigation-menu.js +3 -3
- package/dist/kernel/components/ui/popover.js +1 -1
- package/dist/kernel/components/ui/progress.js +2 -2
- package/dist/kernel/components/ui/scroll-area.js +5 -5
- package/dist/kernel/components/ui/select.js +8 -11
- 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 +2 -2
- 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 +11 -24
- package/dist/kernel/defaults.registry.js +11 -26
- package/dist/kernel/routes/agent/markdown.d.ts +3 -1
- 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 +111 -81
- package/dist/kernel/routes/metadata/llms.d.ts +12 -3
- package/dist/kernel/routes/metadata/llms.js +156 -59
- 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/robots.js +2 -2
- package/dist/kernel/routes/metadata/sitemap.d.ts +26 -4
- package/dist/kernel/routes/metadata/sitemap.js +206 -38
- 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 +21 -13
- package/dist/kernel/routes/pages/leaf.d.ts +28 -1
- package/dist/kernel/routes/pages/leaf.js +25 -16
- package/dist/kernel/routes/pages/root.js +19 -13
- package/dist/keyboard-shortcuts.js +1 -1
- package/dist/resolvers/manifest-resolver.js +29 -6
- package/dist/search.d.ts +6 -7
- package/dist/search.js +52 -29
- package/dist/{sidebar-types-Bgchdfd6.d.ts → sidebar-types-DKpR27II.d.ts} +1 -1
- package/dist/theme-scope.js +1 -1
- package/dist/{types-DHBm7-j6.d.ts → types-CJWRG05y.d.ts} +20 -1
- package/dist/{types-B_b3C0U6.d.ts → types-CUtrppxt.d.ts} +8 -2
- package/dist/{types-CIwwieNw.d.ts → types-J2w_puPF.d.ts} +11 -10
- package/dist/types.d.ts +15 -6
- 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/.gitignore +1 -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 +6 -11
- package/init/seed/minimal/publish.os/docs/content/groups.mdx +6 -7
- package/init/seed/minimal/publish.os/docs/content/{theme.mdx → themes.mdx} +14 -12
- package/init/seed/minimal/publish.os/publish.os.config.json +7 -7
- package/init/seed/minimal/publish.os/theme.css +52 -24
- package/init/seed/minimal/publish.os/tsconfig.json +3 -0
- package/init/seed/minimal/seed.json +12 -2
- package/init/seed/scratch/publish.os/docs/content/get-started.mdx +6 -0
- package/init/seed/scratch/publish.os/publish.os.config.json +4 -0
- package/init/seed/scratch/seed.json +5 -0
- package/package.json +55 -44
- package/release/app/phosphor/package.json +5 -5
- package/release/app/phosphor/pnpm-lock.yaml.template +553 -377
- package/release/app/phosphor/pnpm-workspace.yaml +3 -0
- package/release/compiler/package.json +5 -3
- package/release/compiler/pnpm-lock.yaml.template +500 -303
- package/release/compiler/pnpm-workspace.yaml +3 -0
- package/release/release.json +8 -37
- package/compiler-assets/nextjs/defaults/group/leaf.tsx +0 -48
- package/dist/icons.d.ts +0 -1
- package/dist/icons.js +0 -2
- package/dist/kernel/components/blocks/design-system-preview.d.ts +0 -61
- package/dist/kernel/components/blocks/design-system-preview.js +0 -648
- 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/mdx/components/pre.d.ts +0 -6
- package/dist/kernel/components/mdx/components/pre.js +0 -18
- package/dist/kernel/components/ui/meta-key.d.ts +0 -17
- package/dist/kernel/components/ui/meta-key.js +0 -9
- package/dist/kernel/components/ui/theme-toggle.d.ts +0 -24
- package/dist/kernel/components/ui/theme-toggle.js +0 -58
- package/dist/kernel/framework-icons.d.ts +0 -1
- package/dist/kernel/framework-icons.js +0 -39
- package/dist/link-CYaCRDb6.d.ts +0 -35
- package/release/app/lucide/package.json +0 -30
- package/release/app/lucide/pnpm-lock.yaml.template +0 -2905
- package/release/app/lucide/pnpm-workspace.yaml +0 -11
- package/release/app/tabler/package.json +0 -30
- package/release/app/tabler/pnpm-lock.yaml.template +0 -2911
- package/release/app/tabler/pnpm-workspace.yaml +0 -11
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
assertFrameworkSelection,
|
|
3
|
+
readCheckoutTypeScriptConfig
|
|
4
|
+
} from "./chunk-NNBJZPFM.js";
|
|
5
|
+
import "./chunk-AI2UULNX.js";
|
|
6
|
+
import "./chunk-5J3YUNRY.js";
|
|
7
|
+
import "./chunk-22RSSUNV.js";
|
|
8
|
+
export {
|
|
9
|
+
assertFrameworkSelection,
|
|
10
|
+
readCheckoutTypeScriptConfig
|
|
11
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
prepareIdeSupport
|
|
3
|
+
} from "./chunk-GBPLER5H.js";
|
|
4
|
+
import "./chunk-6D2E6UMD.js";
|
|
5
|
+
import "./chunk-OXOFRXEI.js";
|
|
6
|
+
import "./chunk-NNBJZPFM.js";
|
|
7
|
+
import "./chunk-UYGCOWRF.js";
|
|
8
|
+
import "./chunk-EFO6AWXN.js";
|
|
9
|
+
import "./chunk-5KAD7W53.js";
|
|
10
|
+
import "./chunk-WL75GQ5M.js";
|
|
11
|
+
import "./chunk-AI2UULNX.js";
|
|
12
|
+
import "./chunk-5J3YUNRY.js";
|
|
13
|
+
import "./chunk-22RSSUNV.js";
|
|
14
|
+
export {
|
|
15
|
+
prepareIdeSupport
|
|
16
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ import 'next';
|
|
|
8
8
|
type SiteData = {
|
|
9
9
|
name: string;
|
|
10
10
|
description?: string;
|
|
11
|
-
|
|
12
|
-
og?:
|
|
11
|
+
origin?: string;
|
|
12
|
+
og?: OgIndexMetadata;
|
|
13
13
|
};
|
|
14
14
|
type OgImageMetadata = string | {
|
|
15
15
|
src: string;
|
|
@@ -20,6 +20,9 @@ type OgMetadata = {
|
|
|
20
20
|
description?: string;
|
|
21
21
|
image?: OgImageMetadata;
|
|
22
22
|
};
|
|
23
|
+
type OgIndexMetadata = OgMetadata & {
|
|
24
|
+
scope?: "page" | "subtree";
|
|
25
|
+
};
|
|
23
26
|
type Author = {
|
|
24
27
|
id?: string;
|
|
25
28
|
name: string;
|
|
@@ -49,6 +52,7 @@ type PageNode = {
|
|
|
49
52
|
fileID: string;
|
|
50
53
|
title: string;
|
|
51
54
|
path: string;
|
|
55
|
+
href?: string;
|
|
52
56
|
group: string;
|
|
53
57
|
description?: string;
|
|
54
58
|
status: PageStatus;
|
|
@@ -64,6 +68,7 @@ type SectionNode = {
|
|
|
64
68
|
id: string;
|
|
65
69
|
title: string;
|
|
66
70
|
path?: string;
|
|
71
|
+
href?: string;
|
|
67
72
|
group?: string;
|
|
68
73
|
children: TreeNode[];
|
|
69
74
|
};
|
|
@@ -72,6 +77,7 @@ type FolderNode = {
|
|
|
72
77
|
id: string;
|
|
73
78
|
title: string;
|
|
74
79
|
path?: string;
|
|
80
|
+
href?: string;
|
|
75
81
|
group?: string;
|
|
76
82
|
children: TreeNode[];
|
|
77
83
|
};
|
|
@@ -106,7 +112,9 @@ type GroupManifest = {
|
|
|
106
112
|
key: string;
|
|
107
113
|
title: string;
|
|
108
114
|
path: string;
|
|
115
|
+
origin?: string;
|
|
109
116
|
ancestry?: string[];
|
|
117
|
+
og?: OgIndexMetadata;
|
|
110
118
|
meta?: Record<string, unknown>;
|
|
111
119
|
tree: TreeNode[];
|
|
112
120
|
pages: PageData[];
|
|
@@ -145,6 +153,7 @@ type PageProps<TMeta extends Record<string, unknown> = Record<string, unknown>>
|
|
|
145
153
|
tree: TreeNode[];
|
|
146
154
|
node: TreeNode;
|
|
147
155
|
page: PageData<TMeta>;
|
|
156
|
+
markdownRevision?: string;
|
|
148
157
|
currentPath: string;
|
|
149
158
|
group: string;
|
|
150
159
|
};
|
|
@@ -187,6 +196,32 @@ declare function createRssFeedRoute(manifest: ManifestLike, options?: FeedRouteO
|
|
|
187
196
|
declare function createAtomFeedRoute(manifest: ManifestLike, options?: FeedRouteOptions): () => Promise<Response>;
|
|
188
197
|
declare function createJsonFeedRoute(manifest: ManifestLike, options?: FeedRouteOptions): () => Promise<Response>;
|
|
189
198
|
|
|
199
|
+
type MarkdownRouteArtifact = {
|
|
200
|
+
body: string;
|
|
201
|
+
bodyHash?: string;
|
|
202
|
+
byteSize?: number;
|
|
203
|
+
htmlPath: string;
|
|
204
|
+
markdownPath: string;
|
|
205
|
+
sourceHash?: string;
|
|
206
|
+
title: string;
|
|
207
|
+
};
|
|
208
|
+
type MarkdownRouteArtifactIndexEntry = Omit<MarkdownRouteArtifact, "body"> & {
|
|
209
|
+
shardId: string;
|
|
210
|
+
};
|
|
211
|
+
type MarkdownRouteArtifactIndex = Record<string, MarkdownRouteArtifactIndexEntry>;
|
|
212
|
+
type MarkdownRouteArtifactShardMetadata = {
|
|
213
|
+
byteSize: number;
|
|
214
|
+
contentHash: string;
|
|
215
|
+
id: string;
|
|
216
|
+
modulePath: string;
|
|
217
|
+
pageCount: number;
|
|
218
|
+
};
|
|
219
|
+
type MarkdownRouteArtifactManifest = {
|
|
220
|
+
byHtmlPath: Record<string, string>;
|
|
221
|
+
byMarkdownPath: MarkdownRouteArtifactIndex;
|
|
222
|
+
shards: MarkdownRouteArtifactShardMetadata[];
|
|
223
|
+
};
|
|
224
|
+
|
|
190
225
|
type LlmsRouteOptions = {
|
|
191
226
|
scope?: "site" | "group" | "self";
|
|
192
227
|
group?: string;
|
|
@@ -195,9 +230,15 @@ type LlmsRouteOptions = {
|
|
|
195
230
|
links?: Array<{
|
|
196
231
|
title: string;
|
|
197
232
|
path: string;
|
|
233
|
+
group?: string;
|
|
234
|
+
}>;
|
|
235
|
+
otherGroupLinks?: Array<{
|
|
236
|
+
title: string;
|
|
237
|
+
path: string;
|
|
238
|
+
group?: string;
|
|
198
239
|
}>;
|
|
199
240
|
};
|
|
200
|
-
declare function createLlmsTxtRoute(manifest: ManifestLike, options?: LlmsRouteOptions): () => Promise<Response>;
|
|
241
|
+
declare function createLlmsTxtRoute(manifest: ManifestLike, options?: LlmsRouteOptions, artifactManifest?: MarkdownRouteArtifactManifest): () => Promise<Response>;
|
|
201
242
|
|
|
202
243
|
type OgImageEntryLike = {
|
|
203
244
|
key: string;
|
|
@@ -272,7 +313,17 @@ declare function createOgImageStaticParams({ manifest }: OgImageRouteConfig): {
|
|
|
272
313
|
|
|
273
314
|
declare function createRobotsTxtRoute(manifest: ManifestLike): () => Promise<Response>;
|
|
274
315
|
|
|
275
|
-
|
|
316
|
+
type SitemapReference = {
|
|
317
|
+
path: string;
|
|
318
|
+
group?: string;
|
|
319
|
+
};
|
|
320
|
+
type SitemapRouteOptions = {
|
|
321
|
+
group?: string;
|
|
322
|
+
path?: string;
|
|
323
|
+
sitemaps?: SitemapReference[];
|
|
324
|
+
exclude?: SitemapReference[];
|
|
325
|
+
};
|
|
326
|
+
declare function createSitemapXmlRoute(manifest: ManifestLike, options?: SitemapRouteOptions): () => Promise<Response>;
|
|
276
327
|
|
|
277
328
|
type ResolvedLeaf = PageProps;
|
|
278
329
|
type ResolvedGroup = Omit<IndexPageProps, "children">;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// src/jsx-dev-runtime.ts
|
|
2
|
+
import { jsxDEV as reactJsxDEV } from "react/jsx-dev-runtime";
|
|
3
|
+
|
|
4
|
+
// src/lib/hosting/framework-paths.ts
|
|
5
|
+
var FRAMEWORK_PREFIX = "/publishos", SOURCE_ASSET_PREFIX = `${FRAMEWORK_PREFIX}/assets`, INTERNAL_PREFIX = `${FRAMEWORK_PREFIX}/internal`, SITE_API_PREFIX = `${FRAMEWORK_PREFIX}/api`, SEARCH_PREFIX = `${INTERNAL_PREFIX}/search`, PAGEFIND_MODULE_URL = `${SEARCH_PREFIX}/pagefind.js`, PAGEFIND_ENTRY_URL = `${SEARCH_PREFIX}/pagefind-entry.json`, IMAGE_OPTIMIZER_PATH = `${SITE_API_PREFIX}/image`;
|
|
6
|
+
var OG_SERVICE_PREFIX = `${SITE_API_PREFIX}/og`, PUBLIC_INTERNAL_DIRECTORY = INTERNAL_PREFIX.slice(1), PUBLIC_FONT_DIRECTORY = `${PUBLIC_INTERNAL_DIRECTORY}/fonts`, PUBLIC_SEARCH_DIRECTORY = `public/${PUBLIC_INTERNAL_DIRECTORY}/search`, FRAMEWORK_PROXY_MATCHER = `/((?!${FRAMEWORK_PREFIX.slice(1)}(?:/|$)|_next/static|_next/image|_next/webpack-hmr).*)`;
|
|
7
|
+
|
|
8
|
+
// src/lib/assets/map-source-asset-url.ts
|
|
9
|
+
var SOURCE_ASSET_PATH = "/assets/", URL_PROPS = [
|
|
10
|
+
"action",
|
|
11
|
+
"cite",
|
|
12
|
+
"data",
|
|
13
|
+
"formAction",
|
|
14
|
+
"href",
|
|
15
|
+
"poster",
|
|
16
|
+
"src",
|
|
17
|
+
"xlinkHref"
|
|
18
|
+
];
|
|
19
|
+
function hasUnsafeControlCharacters(value) {
|
|
20
|
+
for (let character of value) {
|
|
21
|
+
let code = character.codePointAt(0) ?? 0;
|
|
22
|
+
if (code <= 31 || code >= 127 && code <= 159) return !0;
|
|
23
|
+
}
|
|
24
|
+
return !1;
|
|
25
|
+
}
|
|
26
|
+
function assertSafeAssetPath(path) {
|
|
27
|
+
if (path.includes("\\") || hasUnsafeControlCharacters(path))
|
|
28
|
+
throw new TypeError("Local asset URLs must use safe path segments.");
|
|
29
|
+
for (let segment of path.split("/")) {
|
|
30
|
+
if (!segment)
|
|
31
|
+
throw new TypeError("Local asset URLs must use safe path segments.");
|
|
32
|
+
let decoded;
|
|
33
|
+
try {
|
|
34
|
+
decoded = decodeURIComponent(segment);
|
|
35
|
+
} catch {
|
|
36
|
+
throw new TypeError("Local asset URLs must use valid URL encoding.");
|
|
37
|
+
}
|
|
38
|
+
if (decoded === "." || decoded === ".." || decoded.includes("/") || decoded.includes("\\") || hasUnsafeControlCharacters(decoded))
|
|
39
|
+
throw new TypeError("Local asset URLs must use safe path segments.");
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function mapSourceAssetUrl(value) {
|
|
43
|
+
if (typeof value != "string" || !value.startsWith(SOURCE_ASSET_PATH))
|
|
44
|
+
return value;
|
|
45
|
+
let suffixIndex = value.search(/[?#]/u), pathname = suffixIndex < 0 ? value : value.slice(0, suffixIndex), suffix = suffixIndex < 0 ? "" : value.slice(suffixIndex), path = pathname.slice(SOURCE_ASSET_PATH.length);
|
|
46
|
+
return assertSafeAssetPath(path), `${SOURCE_ASSET_PREFIX}/${path}${suffix}`;
|
|
47
|
+
}
|
|
48
|
+
function mapSourceSet(value) {
|
|
49
|
+
let candidates = [], cursor = 0;
|
|
50
|
+
for (; cursor < value.length; ) {
|
|
51
|
+
for (; cursor < value.length && /[\s,]/u.test(value[cursor] ?? ""); )
|
|
52
|
+
cursor += 1;
|
|
53
|
+
if (cursor >= value.length) break;
|
|
54
|
+
let start = cursor;
|
|
55
|
+
for (; cursor < value.length && !/\s/u.test(value[cursor] ?? ""); )
|
|
56
|
+
cursor += 1;
|
|
57
|
+
let url = value.slice(start, cursor), endsCandidate = url.endsWith(",");
|
|
58
|
+
endsCandidate && (url = url.replace(/,+$/u, ""));
|
|
59
|
+
let mapped = String(mapSourceAssetUrl(url));
|
|
60
|
+
if (endsCandidate) {
|
|
61
|
+
candidates.push(mapped);
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
for (; cursor < value.length && /\s/u.test(value[cursor] ?? ""); )
|
|
65
|
+
cursor += 1;
|
|
66
|
+
let descriptorStart = cursor;
|
|
67
|
+
for (; cursor < value.length && value[cursor] !== ","; ) cursor += 1;
|
|
68
|
+
let descriptor = value.slice(descriptorStart, cursor).trim();
|
|
69
|
+
candidates.push(descriptor ? `${mapped} ${descriptor}` : mapped), value[cursor] === "," && (cursor += 1);
|
|
70
|
+
}
|
|
71
|
+
return candidates.join(", ");
|
|
72
|
+
}
|
|
73
|
+
function mapSourceAssetProps(props) {
|
|
74
|
+
if (!props || typeof props != "object") return props;
|
|
75
|
+
let source = props, mapped;
|
|
76
|
+
for (let name of URL_PROPS) {
|
|
77
|
+
let value = source[name], next = mapSourceAssetUrl(value);
|
|
78
|
+
next !== value && (mapped ??= { ...source }, mapped[name] = next);
|
|
79
|
+
}
|
|
80
|
+
if (typeof source.srcSet == "string") {
|
|
81
|
+
let next = mapSourceSet(source.srcSet);
|
|
82
|
+
next !== source.srcSet && (mapped ??= { ...source }, mapped.srcSet = next);
|
|
83
|
+
}
|
|
84
|
+
return mapped ?? props;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// src/jsx-dev-runtime.ts
|
|
88
|
+
import { Fragment } from "react/jsx-dev-runtime";
|
|
89
|
+
var jsxDEV = (type, props, key, isStaticChildren, source, self) => reactJsxDEV(
|
|
90
|
+
type,
|
|
91
|
+
mapSourceAssetProps(props),
|
|
92
|
+
key,
|
|
93
|
+
isStaticChildren,
|
|
94
|
+
source,
|
|
95
|
+
self
|
|
96
|
+
);
|
|
97
|
+
export {
|
|
98
|
+
Fragment,
|
|
99
|
+
jsxDEV
|
|
100
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// src/jsx-runtime.ts
|
|
2
|
+
import {
|
|
3
|
+
Fragment,
|
|
4
|
+
jsx as reactJsx,
|
|
5
|
+
jsxs as reactJsxs
|
|
6
|
+
} from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
// src/lib/hosting/framework-paths.ts
|
|
9
|
+
var FRAMEWORK_PREFIX = "/publishos", SOURCE_ASSET_PREFIX = `${FRAMEWORK_PREFIX}/assets`, INTERNAL_PREFIX = `${FRAMEWORK_PREFIX}/internal`, SITE_API_PREFIX = `${FRAMEWORK_PREFIX}/api`, SEARCH_PREFIX = `${INTERNAL_PREFIX}/search`, PAGEFIND_MODULE_URL = `${SEARCH_PREFIX}/pagefind.js`, PAGEFIND_ENTRY_URL = `${SEARCH_PREFIX}/pagefind-entry.json`, IMAGE_OPTIMIZER_PATH = `${SITE_API_PREFIX}/image`;
|
|
10
|
+
var OG_SERVICE_PREFIX = `${SITE_API_PREFIX}/og`, PUBLIC_INTERNAL_DIRECTORY = INTERNAL_PREFIX.slice(1), PUBLIC_FONT_DIRECTORY = `${PUBLIC_INTERNAL_DIRECTORY}/fonts`, PUBLIC_SEARCH_DIRECTORY = `public/${PUBLIC_INTERNAL_DIRECTORY}/search`, FRAMEWORK_PROXY_MATCHER = `/((?!${FRAMEWORK_PREFIX.slice(1)}(?:/|$)|_next/static|_next/image|_next/webpack-hmr).*)`;
|
|
11
|
+
|
|
12
|
+
// src/lib/assets/map-source-asset-url.ts
|
|
13
|
+
var SOURCE_ASSET_PATH = "/assets/", URL_PROPS = [
|
|
14
|
+
"action",
|
|
15
|
+
"cite",
|
|
16
|
+
"data",
|
|
17
|
+
"formAction",
|
|
18
|
+
"href",
|
|
19
|
+
"poster",
|
|
20
|
+
"src",
|
|
21
|
+
"xlinkHref"
|
|
22
|
+
];
|
|
23
|
+
function hasUnsafeControlCharacters(value) {
|
|
24
|
+
for (let character of value) {
|
|
25
|
+
let code = character.codePointAt(0) ?? 0;
|
|
26
|
+
if (code <= 31 || code >= 127 && code <= 159) return !0;
|
|
27
|
+
}
|
|
28
|
+
return !1;
|
|
29
|
+
}
|
|
30
|
+
function assertSafeAssetPath(path) {
|
|
31
|
+
if (path.includes("\\") || hasUnsafeControlCharacters(path))
|
|
32
|
+
throw new TypeError("Local asset URLs must use safe path segments.");
|
|
33
|
+
for (let segment of path.split("/")) {
|
|
34
|
+
if (!segment)
|
|
35
|
+
throw new TypeError("Local asset URLs must use safe path segments.");
|
|
36
|
+
let decoded;
|
|
37
|
+
try {
|
|
38
|
+
decoded = decodeURIComponent(segment);
|
|
39
|
+
} catch {
|
|
40
|
+
throw new TypeError("Local asset URLs must use valid URL encoding.");
|
|
41
|
+
}
|
|
42
|
+
if (decoded === "." || decoded === ".." || decoded.includes("/") || decoded.includes("\\") || hasUnsafeControlCharacters(decoded))
|
|
43
|
+
throw new TypeError("Local asset URLs must use safe path segments.");
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function mapSourceAssetUrl(value) {
|
|
47
|
+
if (typeof value != "string" || !value.startsWith(SOURCE_ASSET_PATH))
|
|
48
|
+
return value;
|
|
49
|
+
let suffixIndex = value.search(/[?#]/u), pathname = suffixIndex < 0 ? value : value.slice(0, suffixIndex), suffix = suffixIndex < 0 ? "" : value.slice(suffixIndex), path = pathname.slice(SOURCE_ASSET_PATH.length);
|
|
50
|
+
return assertSafeAssetPath(path), `${SOURCE_ASSET_PREFIX}/${path}${suffix}`;
|
|
51
|
+
}
|
|
52
|
+
function mapSourceSet(value) {
|
|
53
|
+
let candidates = [], cursor = 0;
|
|
54
|
+
for (; cursor < value.length; ) {
|
|
55
|
+
for (; cursor < value.length && /[\s,]/u.test(value[cursor] ?? ""); )
|
|
56
|
+
cursor += 1;
|
|
57
|
+
if (cursor >= value.length) break;
|
|
58
|
+
let start = cursor;
|
|
59
|
+
for (; cursor < value.length && !/\s/u.test(value[cursor] ?? ""); )
|
|
60
|
+
cursor += 1;
|
|
61
|
+
let url = value.slice(start, cursor), endsCandidate = url.endsWith(",");
|
|
62
|
+
endsCandidate && (url = url.replace(/,+$/u, ""));
|
|
63
|
+
let mapped = String(mapSourceAssetUrl(url));
|
|
64
|
+
if (endsCandidate) {
|
|
65
|
+
candidates.push(mapped);
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
for (; cursor < value.length && /\s/u.test(value[cursor] ?? ""); )
|
|
69
|
+
cursor += 1;
|
|
70
|
+
let descriptorStart = cursor;
|
|
71
|
+
for (; cursor < value.length && value[cursor] !== ","; ) cursor += 1;
|
|
72
|
+
let descriptor = value.slice(descriptorStart, cursor).trim();
|
|
73
|
+
candidates.push(descriptor ? `${mapped} ${descriptor}` : mapped), value[cursor] === "," && (cursor += 1);
|
|
74
|
+
}
|
|
75
|
+
return candidates.join(", ");
|
|
76
|
+
}
|
|
77
|
+
function mapSourceAssetProps(props) {
|
|
78
|
+
if (!props || typeof props != "object") return props;
|
|
79
|
+
let source = props, mapped;
|
|
80
|
+
for (let name of URL_PROPS) {
|
|
81
|
+
let value = source[name], next = mapSourceAssetUrl(value);
|
|
82
|
+
next !== value && (mapped ??= { ...source }, mapped[name] = next);
|
|
83
|
+
}
|
|
84
|
+
if (typeof source.srcSet == "string") {
|
|
85
|
+
let next = mapSourceSet(source.srcSet);
|
|
86
|
+
next !== source.srcSet && (mapped ??= { ...source }, mapped.srcSet = next);
|
|
87
|
+
}
|
|
88
|
+
return mapped ?? props;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// src/jsx-runtime.ts
|
|
92
|
+
var jsx = (type, props, key) => reactJsx(type, mapSourceAssetProps(props), key), jsxs = (type, props, key) => reactJsxs(type, mapSourceAssetProps(props), key);
|
|
93
|
+
export {
|
|
94
|
+
Fragment,
|
|
95
|
+
jsx,
|
|
96
|
+
jsxs
|
|
97
|
+
};
|
|
@@ -4,9 +4,9 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
5
5
|
|
|
6
6
|
declare const buttonVariants: (props?: ({
|
|
7
|
-
variant?: "solid" | "soft" | "outline" | "ghost" | null | undefined;
|
|
8
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
9
|
-
iconOnly?: boolean | null | undefined;
|
|
7
|
+
readonly variant?: "solid" | "soft" | "outline" | "ghost" | null | undefined;
|
|
8
|
+
readonly size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
9
|
+
readonly iconOnly?: boolean | null | undefined;
|
|
10
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
11
|
type ButtonVariantProps = VariantProps<typeof buttonVariants>;
|
|
12
12
|
|
|
@@ -38,12 +38,13 @@ type AgentActionGroup = {
|
|
|
38
38
|
title?: string;
|
|
39
39
|
actions: AgentActionConfig[];
|
|
40
40
|
};
|
|
41
|
-
type AgentActionsProps =
|
|
41
|
+
type AgentActionsProps = ComponentPropsWithoutRef<"div"> & {
|
|
42
42
|
pagePath?: string;
|
|
43
43
|
pageUrl?: string;
|
|
44
44
|
markdownPath?: string;
|
|
45
45
|
markdownUrl?: string;
|
|
46
46
|
markdown?: string;
|
|
47
|
+
markdownRevision?: string;
|
|
47
48
|
siteUrl?: string;
|
|
48
49
|
sourceUrl?: string;
|
|
49
50
|
prompt?: string;
|
|
@@ -52,7 +53,35 @@ type AgentActionsProps = Omit<ComponentPropsWithoutRef<"div">, "children"> & {
|
|
|
52
53
|
buttonSize?: ButtonVariantProps["size"];
|
|
53
54
|
buttonVariant?: ButtonVariantProps["variant"];
|
|
54
55
|
menuLabel?: string;
|
|
56
|
+
markdownLinkLabel?: string;
|
|
57
|
+
showMarkdownLink?: boolean;
|
|
58
|
+
};
|
|
59
|
+
declare function AgentActionsToolbar({ className, ...props }: ComponentPropsWithoutRef<"div">): react_jsx_runtime.JSX.Element;
|
|
60
|
+
declare function AgentActionsMarkdownLink(): ReactNode;
|
|
61
|
+
declare function AgentActionsPrimaryAction({ action }: {
|
|
62
|
+
action?: AgentActionConfig;
|
|
63
|
+
}): ReactNode;
|
|
64
|
+
declare function AgentActionsFeedback(): react_jsx_runtime.JSX.Element;
|
|
65
|
+
declare function AgentActionsGroup({ title, children, }: {
|
|
66
|
+
title?: string;
|
|
67
|
+
children: ReactNode;
|
|
68
|
+
}): react_jsx_runtime.JSX.Element;
|
|
69
|
+
declare function AgentActionsItem({ action }: {
|
|
70
|
+
action: AgentActionConfig;
|
|
71
|
+
}): ReactNode;
|
|
72
|
+
declare function AgentActionsMenu({ children }: {
|
|
73
|
+
children?: ReactNode;
|
|
74
|
+
}): react_jsx_runtime.JSX.Element;
|
|
75
|
+
declare function AgentActionsRoot(props: AgentActionsProps): react_jsx_runtime.JSX.Element;
|
|
76
|
+
declare const AgentActions: typeof AgentActionsRoot & {
|
|
77
|
+
Feedback: typeof AgentActionsFeedback;
|
|
78
|
+
Group: typeof AgentActionsGroup;
|
|
79
|
+
Item: typeof AgentActionsItem;
|
|
80
|
+
MarkdownLink: typeof AgentActionsMarkdownLink;
|
|
81
|
+
Menu: typeof AgentActionsMenu;
|
|
82
|
+
PrimaryAction: typeof AgentActionsPrimaryAction;
|
|
83
|
+
Root: typeof AgentActionsRoot;
|
|
84
|
+
Toolbar: typeof AgentActionsToolbar;
|
|
55
85
|
};
|
|
56
|
-
declare function AgentActions({ actionGroups, buttonSize, buttonVariant, className, markdown, markdownPath, markdownUrl, menuLabel, pagePath, pageUrl, primaryAction, prompt, siteUrl, sourceUrl, ...props }: AgentActionsProps): react_jsx_runtime.JSX.Element;
|
|
57
86
|
|
|
58
|
-
export { type AgentActionConfig, type AgentActionContext, type AgentActionCopyTarget, type AgentActionGroup, AgentActions, type AgentActionsProps };
|
|
87
|
+
export { type AgentActionConfig, type AgentActionContext, type AgentActionCopyTarget, type AgentActionGroup, AgentActions, type AgentActionsProps, AgentActionsFeedback as Feedback, AgentActionsGroup as Group, AgentActionsItem as Item, AgentActionsMarkdownLink as MarkdownLink, AgentActionsMenu as Menu, AgentActionsPrimaryAction as PrimaryAction, AgentActionsRoot as Root, AgentActionsToolbar as Toolbar };
|