@publish.os/nextjs 0.0.1-alpha.91 → 0.0.1-alpha.92
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/index.tsx +16 -11
- package/compiler-assets/nextjs/defaults/group/layout.tsx +6 -2
- package/compiler-assets/nextjs/defaults/group/page.tsx +7 -6
- package/compiler-assets/nextjs/defaults/project/next.config.mjs +2 -1
- package/compiler-assets/nextjs/defaults/root/index.tsx +16 -11
- package/compiler-assets/nextjs/defaults/root/layout.tsx +7 -3
- package/compiler-assets/nextjs/shims/agent-user-agents.ts +65 -0
- package/compiler-assets/nextjs/shims/document.tsx +9 -1
- package/compiler-assets/nextjs/shims/generated-leaf-page.tsx +3 -0
- package/compiler-assets/nextjs/shims/proxy.ts +156 -54
- package/dist/{build-operation-5QMLXF7N.js → build-operation-CJDUL4OW.js} +5 -5
- package/dist/{chunk-GBPLER5H.js → chunk-3T4HVDSC.js} +2 -2
- package/dist/{chunk-UYGCOWRF.js → chunk-DX7PXFCM.js} +860 -50
- package/dist/{chunk-F3AGNDF4.js → chunk-DZ3VWEV5.js} +860 -575
- package/dist/{chunk-OXOFRXEI.js → chunk-NHSLTARU.js} +1284 -1164
- package/dist/{chunk-ORIUWJBQ.js → chunk-SBMDONTV.js} +3 -2
- package/dist/compiler.js +42 -23
- package/dist/components/blocks/agent-actions.d.ts +7 -7
- package/dist/components/blocks/agent-actions.js +1 -32
- package/dist/components/blocks/toc.d.ts +7 -7
- package/dist/components/ui/button.d.ts +1 -2
- package/dist/{compose-CVBJRAF6.js → compose-44GJSMXD.js} +2 -2
- package/dist/config/createNextConfig.js +2 -0
- package/dist/{dev-operation-OSHHWRWK.js → dev-operation-WNECBHZ5.js} +17 -7
- package/dist/{ide-support-CU6Z5PVR.js → ide-support-TG74L4FF.js} +3 -3
- package/dist/index.d.ts +143 -126
- package/dist/index.js +25 -0
- package/dist/kernel/components/blocks/AgentActions.d.ts +7 -7
- package/dist/kernel/components/blocks/AgentActions.js +1 -32
- package/dist/kernel/components/blocks/agent-actions.d.ts +1 -2
- package/dist/kernel/components/blocks/agent-actions.js +1 -32
- package/dist/kernel/components/blocks/animated-icon-swap.d.ts +2 -2
- package/dist/kernel/components/blocks/color-palette.d.ts +2 -2
- package/dist/kernel/components/blocks/logo-block.d.ts +2 -2
- package/dist/kernel/components/blocks/nav-breadcrumb.d.ts +6 -5
- package/dist/kernel/components/blocks/nav-breadcrumb.js +19 -13
- package/dist/kernel/components/blocks/navbar.d.ts +5 -4
- package/dist/kernel/components/blocks/navbar.js +62 -42
- package/dist/kernel/components/blocks/navigation-progress.d.ts +2 -2
- package/dist/kernel/components/blocks/next-prev.d.ts +4 -4
- package/dist/kernel/components/blocks/next-prev.js +29 -6
- package/dist/kernel/components/blocks/page-list.d.ts +4 -4
- package/dist/kernel/components/blocks/page-list.js +30 -7
- package/dist/kernel/components/blocks/search.d.ts +9 -15
- package/dist/kernel/components/blocks/sidebar-node.d.ts +3 -5
- package/dist/kernel/components/blocks/sidebar-node.js +12 -2
- package/dist/kernel/components/blocks/sidebar.d.ts +6 -7
- package/dist/kernel/components/blocks/sidebar.js +132 -26
- package/dist/kernel/components/blocks/theme-toggle.d.ts +3 -4
- package/dist/kernel/components/blocks/toc-client.d.ts +7 -7
- package/dist/kernel/components/blocks/toc.d.ts +3 -3
- package/dist/kernel/components/mdx/components/blockquote.d.ts +2 -2
- package/dist/kernel/components/mdx/components/callout.d.ts +3 -3
- package/dist/kernel/components/mdx/components/code-block.d.ts +2 -2
- package/dist/kernel/components/mdx/components/copy-code-button.d.ts +2 -2
- package/dist/kernel/components/mdx/components/figure-caption.d.ts +2 -2
- package/dist/kernel/components/mdx/components/figure.d.ts +3 -3
- package/dist/kernel/components/mdx/components/footnotes.d.ts +2 -2
- package/dist/kernel/components/mdx/components/heading-copy-link.d.ts +2 -2
- package/dist/kernel/components/mdx/components/heading.d.ts +2 -2
- package/dist/kernel/components/mdx/components/hr.d.ts +4 -4
- package/dist/kernel/components/mdx/components/image-zoom.d.ts +3 -3
- package/dist/kernel/components/mdx/components/image-zoom.js +3 -2
- package/dist/kernel/components/mdx/components/image.d.ts +2 -2
- package/dist/kernel/components/mdx/components/image.js +1 -1
- package/dist/kernel/components/mdx/components/inline-code.d.ts +2 -2
- package/dist/kernel/components/mdx/components/kbd.d.ts +3 -3
- package/dist/kernel/components/mdx/components/link.d.ts +3 -3
- package/dist/kernel/components/mdx/components/paragraph.d.ts +2 -2
- package/dist/kernel/components/mdx/components/strikethrough.d.ts +2 -2
- package/dist/kernel/components/mdx/components/table.d.ts +7 -7
- package/dist/kernel/components/mdx/components/task-list.d.ts +3 -3
- package/dist/kernel/components/mdx/components/video-player.d.ts +2 -2
- package/dist/kernel/components/mdx/components/video.d.ts +2 -3
- package/dist/kernel/components/mdx/error-boundary.d.ts +2 -3
- package/dist/kernel/components/mdx/error-fallback.d.ts +2 -2
- package/dist/kernel/components/mdx/mdx.d.ts +42 -11
- package/dist/kernel/components/mdx/mdx.js +1 -1
- package/dist/kernel/components/next-image.d.ts +3 -3
- package/dist/kernel/components/ui/accordion.d.ts +7 -7
- package/dist/kernel/components/ui/breadcrumb-trail.d.ts +2 -3
- package/dist/kernel/components/ui/breadcrumb.d.ts +13 -13
- package/dist/kernel/components/ui/button-group.d.ts +5 -5
- package/dist/kernel/components/ui/button.d.ts +3 -3
- package/dist/kernel/components/ui/card.d.ts +7 -7
- package/dist/kernel/components/ui/dialog.d.ts +10 -10
- package/dist/kernel/components/ui/drawer.d.ts +12 -12
- package/dist/kernel/components/ui/kbd.d.ts +3 -3
- package/dist/kernel/components/ui/link.d.ts +3 -3
- package/dist/kernel/components/ui/menu.d.ts +22 -22
- package/dist/kernel/components/ui/mod-key.d.ts +2 -3
- package/dist/kernel/components/ui/navigation-menu.d.ts +15 -15
- package/dist/kernel/components/ui/popover.d.ts +11 -11
- package/dist/kernel/components/ui/progress.d.ts +7 -7
- package/dist/kernel/components/ui/scroll-area.d.ts +1 -2
- package/dist/kernel/components/ui/select.d.ts +16 -16
- package/dist/kernel/components/ui/separator.d.ts +3 -3
- package/dist/kernel/components/ui/table.d.ts +7 -7
- package/dist/kernel/components/ui/tabs.d.ts +12 -12
- package/dist/kernel/components/ui/tag.d.ts +3 -3
- package/dist/kernel/components/ui/text.d.ts +4 -4
- package/dist/kernel/components/ui/toast.d.ts +11 -11
- package/dist/kernel/components/ui/tooltip.d.ts +9 -9
- package/dist/kernel/defaults.registry.d.ts +2 -2
- package/dist/kernel/defaults.registry.js +2 -2
- package/dist/kernel/routes/agent/markdown.d.ts +4 -0
- package/dist/kernel/routes/agent/markdown.js +11 -7
- package/dist/kernel/routes/layouts/group.d.ts +1 -1
- package/dist/kernel/routes/metadata/feed.d.ts +1 -2
- package/dist/kernel/routes/metadata/feed.js +34 -29
- package/dist/kernel/routes/metadata/llms.d.ts +3 -31
- package/dist/kernel/routes/metadata/llms.js +2 -200
- package/dist/kernel/routes/metadata/robots.d.ts +5 -3
- package/dist/kernel/routes/metadata/robots.js +4 -25
- package/dist/kernel/routes/metadata/sitemap.d.ts +15 -1
- package/dist/kernel/routes/metadata/sitemap.js +200 -112
- package/dist/kernel/routes/not-found.js +1 -1
- package/dist/kernel/routes/pages/group.d.ts +3 -3
- package/dist/kernel/routes/pages/group.js +10 -4
- package/dist/kernel/routes/pages/leaf.d.ts +9 -4
- package/dist/kernel/routes/pages/leaf.js +16 -8
- package/dist/kernel/routes/pages/root.d.ts +3 -3
- package/dist/kernel/routes/pages/root.js +20 -5
- package/dist/keyboard-shortcuts.d.ts +2 -2
- package/dist/manifest-types-CcVPH_jh.d.ts +83 -0
- package/dist/resolvers/manifest-resolver.d.ts +2 -2
- package/dist/resolvers/manifest-resolver.js +65 -35
- package/dist/search.d.ts +2 -9
- package/dist/search.js +2 -7
- package/dist/sidebar-types-CMrMM0Nj.d.ts +105 -0
- package/dist/theme-scope.d.ts +2 -2
- package/dist/types-BbqmOzLC.d.ts +168 -0
- package/dist/types-TjH1ek0X.d.ts +22 -0
- package/dist/types.d.ts +116 -91
- package/dist/{validate-local-source-SV44DBQT.js → validate-local-source-EN2GW4FR.js} +3 -3
- package/dist/{validate-publish-os-source-NZJF3TB2.js → validate-publish-os-source-OEWQDB7B.js} +2 -2
- package/init/seed/minimal/publish.os/blog/index.tsx +25 -22
- package/init/seed/minimal/publish.os/blog/page.tsx +31 -16
- package/init/seed/minimal/publish.os/components/blog/copy-link.tsx +1 -1
- package/init/seed/minimal/publish.os/components/blog/frontmatter.ts +41 -0
- package/init/seed/minimal/publish.os/publish.os.config.json +13 -2
- package/init/seed/minimal/seed.json +1 -0
- package/init/seed/scratch/publish.os/publish.os.config.json +1 -1
- package/package.json +4 -4
- package/release/app/phosphor/package.json +1 -1
- package/release/app/phosphor/pnpm-lock.yaml.template +53 -127
- package/release/compiler/pnpm-lock.yaml.template +49 -123
- package/release/release.json +4 -4
- package/dist/sidebar-types-DKpR27II.d.ts +0 -25
- package/dist/types-CJWRG05y.d.ts +0 -76
- package/dist/types-CUtrppxt.d.ts +0 -69
- package/dist/types-J2w_puPF.d.ts +0 -128
- package/dist/{button-BdCScEKi.d.ts → button-D6Xp2HBm.d.ts} +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,98 +1,134 @@
|
|
|
1
1
|
export { tags } from './cache/tags.js';
|
|
2
2
|
export { createNextConfig } from './config/createNextConfig.js';
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import react__default, { ReactNode } from 'react';
|
|
5
5
|
import { CnFunction } from 'cn';
|
|
6
6
|
import 'next';
|
|
7
7
|
|
|
8
|
-
type
|
|
9
|
-
name: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
origin?: string;
|
|
12
|
-
og?: OgIndexMetadata;
|
|
13
|
-
};
|
|
14
|
-
type OgImageMetadata = string | {
|
|
8
|
+
type OgImageMetadata$1 = string | {
|
|
15
9
|
src: string;
|
|
16
10
|
alt?: string;
|
|
17
11
|
};
|
|
18
|
-
type OgMetadata = {
|
|
12
|
+
type OgMetadata$1 = {
|
|
19
13
|
title?: string;
|
|
20
14
|
description?: string;
|
|
21
|
-
image?: OgImageMetadata;
|
|
22
|
-
};
|
|
23
|
-
type
|
|
24
|
-
|
|
15
|
+
image?: OgImageMetadata$1;
|
|
16
|
+
};
|
|
17
|
+
type PageStatus$1 = "published" | "draft";
|
|
18
|
+
type PageMetadata$1 = {
|
|
19
|
+
openGraph?: OgMetadata$1;
|
|
20
|
+
robots?: {
|
|
21
|
+
index?: boolean;
|
|
22
|
+
follow?: boolean;
|
|
23
|
+
};
|
|
25
24
|
};
|
|
26
|
-
type
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
type PageFrontmatter$1<TCustom extends Record<string, unknown> = Record<string, unknown>> = TCustom & {
|
|
26
|
+
title: string;
|
|
27
|
+
description: string;
|
|
28
|
+
slug: string;
|
|
29
|
+
status: PageStatus$1;
|
|
30
|
+
metadata: PageMetadata$1;
|
|
32
31
|
};
|
|
33
|
-
type
|
|
34
|
-
type PageData<TMeta extends Record<string, unknown> = Record<string, unknown>> = {
|
|
32
|
+
type PageData$1<TCustom extends Record<string, unknown> = Record<string, unknown>> = {
|
|
35
33
|
fileID: string;
|
|
36
34
|
group: string;
|
|
37
|
-
slug: string;
|
|
38
35
|
path: string;
|
|
39
|
-
|
|
40
|
-
description?: string;
|
|
41
|
-
status: PageStatus;
|
|
42
|
-
publishedAt?: string;
|
|
43
|
-
updatedAt?: string;
|
|
44
|
-
authors: Author[];
|
|
45
|
-
tags: string[];
|
|
46
|
-
og?: OgMetadata;
|
|
47
|
-
meta: TMeta;
|
|
36
|
+
frontmatter: PageFrontmatter$1<TCustom>;
|
|
48
37
|
body: string;
|
|
49
38
|
};
|
|
50
|
-
type
|
|
39
|
+
type NavigationPageNode = {
|
|
40
|
+
id: string;
|
|
51
41
|
type: "page";
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
status: PageStatus;
|
|
59
|
-
publishedAt?: string;
|
|
60
|
-
updatedAt?: string;
|
|
61
|
-
authors: Author[];
|
|
62
|
-
tags?: string[];
|
|
63
|
-
og?: OgMetadata;
|
|
64
|
-
meta: Record<string, unknown>;
|
|
65
|
-
};
|
|
66
|
-
type SectionNode = {
|
|
67
|
-
type: "section";
|
|
42
|
+
label: string;
|
|
43
|
+
href: string;
|
|
44
|
+
page: Omit<PageData$1, "body">;
|
|
45
|
+
children?: NavigationNode[];
|
|
46
|
+
};
|
|
47
|
+
type NavigationGroupNode = {
|
|
68
48
|
id: string;
|
|
69
|
-
|
|
70
|
-
|
|
49
|
+
type: "group";
|
|
50
|
+
label: string;
|
|
51
|
+
groupKey: string;
|
|
52
|
+
route: string;
|
|
53
|
+
presentation: "page" | "folder";
|
|
71
54
|
href?: string;
|
|
72
|
-
|
|
73
|
-
children: TreeNode[];
|
|
55
|
+
children: NavigationNode[];
|
|
74
56
|
};
|
|
75
|
-
type
|
|
76
|
-
type: "folder";
|
|
57
|
+
type NavigationContainerNode = {
|
|
77
58
|
id: string;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
group?: string;
|
|
82
|
-
children: TreeNode[];
|
|
59
|
+
type: "section" | "folder";
|
|
60
|
+
label: string;
|
|
61
|
+
children: NavigationNode[];
|
|
83
62
|
};
|
|
84
|
-
type
|
|
63
|
+
type NavigationLinkNode = {
|
|
64
|
+
id: string;
|
|
85
65
|
type: "link";
|
|
66
|
+
label: string;
|
|
67
|
+
href: string;
|
|
68
|
+
};
|
|
69
|
+
type NavigationViewNode = {
|
|
70
|
+
id: string;
|
|
71
|
+
type: "view";
|
|
72
|
+
label?: string;
|
|
73
|
+
viewId?: string;
|
|
74
|
+
items: NavigationNode[];
|
|
75
|
+
};
|
|
76
|
+
type NavigationSwitchViewNode = {
|
|
86
77
|
id: string;
|
|
78
|
+
type: "switch-view";
|
|
79
|
+
label: string;
|
|
80
|
+
target: string | {
|
|
81
|
+
view: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
type NavigationNode = NavigationPageNode | NavigationGroupNode | NavigationContainerNode | NavigationLinkNode | NavigationViewNode | NavigationSwitchViewNode;
|
|
85
|
+
type ResolvedNavigation = {
|
|
86
|
+
rootGroup: string;
|
|
87
|
+
items: NavigationNode[];
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
type SiteData = {
|
|
91
|
+
name: string;
|
|
92
|
+
description?: string;
|
|
93
|
+
origin?: string;
|
|
94
|
+
metadata?: IndexMetadata;
|
|
95
|
+
};
|
|
96
|
+
type OgImageMetadata = string | {
|
|
97
|
+
src: string;
|
|
98
|
+
alt?: string;
|
|
99
|
+
};
|
|
100
|
+
type OgMetadata = {
|
|
101
|
+
title?: string;
|
|
102
|
+
description?: string;
|
|
103
|
+
image?: OgImageMetadata;
|
|
104
|
+
};
|
|
105
|
+
type IndexMetadata = {
|
|
106
|
+
openGraph?: OgMetadata & {
|
|
107
|
+
scope?: "page" | "subtree";
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
type PageStatus = "published" | "draft";
|
|
111
|
+
type PageMetadata = {
|
|
112
|
+
openGraph?: OgMetadata;
|
|
113
|
+
robots?: {
|
|
114
|
+
index?: boolean;
|
|
115
|
+
follow?: boolean;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
type PageFrontmatter<TCustom extends Record<string, unknown> = Record<string, unknown>> = TCustom & {
|
|
87
119
|
title: string;
|
|
88
|
-
|
|
120
|
+
description: string;
|
|
121
|
+
slug: string;
|
|
122
|
+
status: PageStatus;
|
|
123
|
+
metadata: PageMetadata;
|
|
124
|
+
};
|
|
125
|
+
type PageData<TCustom extends Record<string, unknown> = Record<string, unknown>> = {
|
|
126
|
+
fileID: string;
|
|
127
|
+
group: string;
|
|
128
|
+
path: string;
|
|
129
|
+
frontmatter: PageFrontmatter<TCustom>;
|
|
130
|
+
body: string;
|
|
89
131
|
};
|
|
90
|
-
type TreeNode = PageNode | SectionNode | FolderNode | LinkNode;
|
|
91
|
-
type NavPage = PageNode;
|
|
92
|
-
type NavLink = LinkNode;
|
|
93
|
-
type NavSection = SectionNode;
|
|
94
|
-
type NavFolder = FolderNode;
|
|
95
|
-
type NavItem = TreeNode;
|
|
96
132
|
type RouteRecord = {
|
|
97
133
|
fileID: string;
|
|
98
134
|
slug: string;
|
|
@@ -114,9 +150,9 @@ type GroupManifest = {
|
|
|
114
150
|
path: string;
|
|
115
151
|
origin?: string;
|
|
116
152
|
ancestry?: string[];
|
|
117
|
-
|
|
153
|
+
metadata?: IndexMetadata;
|
|
118
154
|
meta?: Record<string, unknown>;
|
|
119
|
-
|
|
155
|
+
navigation: ResolvedNavigation;
|
|
120
156
|
pages: PageData[];
|
|
121
157
|
};
|
|
122
158
|
type ManifestLike = {
|
|
@@ -124,34 +160,33 @@ type ManifestLike = {
|
|
|
124
160
|
groups: Record<string, GroupManifest>;
|
|
125
161
|
routes: RouteRecord[];
|
|
126
162
|
pages: PageData[];
|
|
127
|
-
tree: TreeNode[];
|
|
128
163
|
attribution?: Record<string, ResolvedAttribution>;
|
|
129
164
|
contentHash: string;
|
|
130
165
|
};
|
|
131
166
|
type RootLayoutProps = {
|
|
132
167
|
children: React.ReactNode;
|
|
133
168
|
site: SiteData;
|
|
134
|
-
|
|
169
|
+
navigation: ResolvedNavigation;
|
|
135
170
|
currentPath?: string;
|
|
136
171
|
currentGroup?: GroupContext;
|
|
137
172
|
activeGroups?: readonly GroupContext[];
|
|
138
173
|
};
|
|
139
174
|
type RootPageProps = {
|
|
140
175
|
site: SiteData;
|
|
141
|
-
|
|
176
|
+
navigation: ResolvedNavigation;
|
|
142
177
|
};
|
|
143
178
|
type LayoutProps = {
|
|
144
179
|
children: React.ReactNode;
|
|
145
180
|
site: SiteData;
|
|
146
|
-
|
|
147
|
-
node:
|
|
181
|
+
navigation: ResolvedNavigation;
|
|
182
|
+
node: NavigationNode;
|
|
148
183
|
currentPath: string;
|
|
149
184
|
group: string;
|
|
150
185
|
};
|
|
151
186
|
type PageProps<TMeta extends Record<string, unknown> = Record<string, unknown>> = {
|
|
152
187
|
site: SiteData;
|
|
153
|
-
|
|
154
|
-
node:
|
|
188
|
+
navigation: ResolvedNavigation;
|
|
189
|
+
node: NavigationNode;
|
|
155
190
|
page: PageData<TMeta>;
|
|
156
191
|
markdownRevision?: string;
|
|
157
192
|
currentPath: string;
|
|
@@ -159,8 +194,8 @@ type PageProps<TMeta extends Record<string, unknown> = Record<string, unknown>>
|
|
|
159
194
|
};
|
|
160
195
|
type IndexPageProps = {
|
|
161
196
|
site: SiteData;
|
|
162
|
-
|
|
163
|
-
node:
|
|
197
|
+
navigation: ResolvedNavigation;
|
|
198
|
+
node: NavigationNode;
|
|
164
199
|
currentPath: string;
|
|
165
200
|
group: string;
|
|
166
201
|
};
|
|
@@ -179,66 +214,26 @@ type GroupContext = {
|
|
|
179
214
|
};
|
|
180
215
|
|
|
181
216
|
type PageListProps = {
|
|
182
|
-
|
|
217
|
+
navigation: ResolvedNavigation;
|
|
183
218
|
currentPath?: string;
|
|
184
219
|
className?: string;
|
|
185
220
|
};
|
|
186
|
-
declare function PageList({
|
|
221
|
+
declare function PageList({ navigation, currentPath, className, }: PageListProps): react.JSX.Element | null;
|
|
187
222
|
|
|
188
223
|
type FeedScope = "site" | "group" | "self";
|
|
189
224
|
type FeedRouteOptions = {
|
|
190
225
|
scope?: FeedScope;
|
|
191
226
|
group?: string;
|
|
192
227
|
limit?: number;
|
|
193
|
-
status?: PageStatus[];
|
|
194
228
|
};
|
|
195
229
|
declare function createRssFeedRoute(manifest: ManifestLike, options?: FeedRouteOptions): () => Promise<Response>;
|
|
196
230
|
declare function createAtomFeedRoute(manifest: ManifestLike, options?: FeedRouteOptions): () => Promise<Response>;
|
|
197
231
|
declare function createJsonFeedRoute(manifest: ManifestLike, options?: FeedRouteOptions): () => Promise<Response>;
|
|
198
232
|
|
|
199
|
-
type
|
|
233
|
+
type LlmsTxtOutput = {
|
|
200
234
|
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
|
-
|
|
225
|
-
type LlmsRouteOptions = {
|
|
226
|
-
scope?: "site" | "group" | "self";
|
|
227
|
-
group?: string;
|
|
228
|
-
limit?: number;
|
|
229
|
-
includeDescriptions?: boolean;
|
|
230
|
-
links?: Array<{
|
|
231
|
-
title: string;
|
|
232
|
-
path: string;
|
|
233
|
-
group?: string;
|
|
234
|
-
}>;
|
|
235
|
-
otherGroupLinks?: Array<{
|
|
236
|
-
title: string;
|
|
237
|
-
path: string;
|
|
238
|
-
group?: string;
|
|
239
|
-
}>;
|
|
240
235
|
};
|
|
241
|
-
declare function createLlmsTxtRoute(
|
|
236
|
+
declare function createLlmsTxtRoute(output: LlmsTxtOutput): () => Response;
|
|
242
237
|
|
|
243
238
|
type OgImageEntryLike = {
|
|
244
239
|
key: string;
|
|
@@ -311,7 +306,11 @@ declare function createOgImageStaticParams({ manifest }: OgImageRouteConfig): {
|
|
|
311
306
|
key: string;
|
|
312
307
|
}[];
|
|
313
308
|
|
|
314
|
-
declare function createRobotsTxtRoute(
|
|
309
|
+
declare function createRobotsTxtRoute(defaultOutput: {
|
|
310
|
+
body: string;
|
|
311
|
+
}, outputsByOrigin?: Record<string, {
|
|
312
|
+
body: string;
|
|
313
|
+
}>): (request: Request) => Response;
|
|
315
314
|
|
|
316
315
|
type SitemapReference = {
|
|
317
316
|
path: string;
|
|
@@ -320,6 +319,7 @@ type SitemapReference = {
|
|
|
320
319
|
type SitemapRouteOptions = {
|
|
321
320
|
group?: string;
|
|
322
321
|
path?: string;
|
|
322
|
+
includeUrls?: SitemapReference[];
|
|
323
323
|
sitemaps?: SitemapReference[];
|
|
324
324
|
exclude?: SitemapReference[];
|
|
325
325
|
};
|
|
@@ -329,7 +329,7 @@ type ResolvedLeaf = PageProps;
|
|
|
329
329
|
type ResolvedGroup = Omit<IndexPageProps, "children">;
|
|
330
330
|
declare function resolveLeaf(manifest: ManifestLike, group: string, slug: string | string[]): ResolvedLeaf | null;
|
|
331
331
|
declare function resolveGroup(manifest: ManifestLike, group: string): ResolvedGroup | null;
|
|
332
|
-
declare function resolveGroupLayout(manifest: ManifestLike, group: string, children:
|
|
332
|
+
declare function resolveGroupLayout(manifest: ManifestLike, group: string, children: react__default.ReactNode): LayoutProps | null;
|
|
333
333
|
declare function listStaticParams(manifest: ManifestLike, group: string): Array<{
|
|
334
334
|
slug: string[];
|
|
335
335
|
}>;
|
|
@@ -354,4 +354,21 @@ declare function createHeadingIdGenerator(): HeadingIdGenerator;
|
|
|
354
354
|
declare function extractMdxHeadings(content: string | undefined, levels: [number, number]): MdxHeadingItem[];
|
|
355
355
|
declare function urlIdToText(urlId: string): string;
|
|
356
356
|
|
|
357
|
-
|
|
357
|
+
type NavigationPageSelection = {
|
|
358
|
+
id: string;
|
|
359
|
+
label: string;
|
|
360
|
+
href: string;
|
|
361
|
+
path: string;
|
|
362
|
+
page: NavigationPageNode["page"];
|
|
363
|
+
group?: never;
|
|
364
|
+
} | {
|
|
365
|
+
id: string;
|
|
366
|
+
label: string;
|
|
367
|
+
href: string;
|
|
368
|
+
path: string;
|
|
369
|
+
page?: never;
|
|
370
|
+
group: NavigationGroupNode;
|
|
371
|
+
};
|
|
372
|
+
declare function selectNavigationPages(nodes: NavigationNode[]): NavigationPageSelection[];
|
|
373
|
+
|
|
374
|
+
export { type GroupContext, type HeadingIdGenerator, type IndexPageProps, type LayoutProps, type ManifestLike, type MdxHeadingItem, type NavigationContainerNode, type NavigationGroupNode, type NavigationLinkNode, type NavigationNode, type NavigationPageNode, type NavigationPageSelection, type NavigationSwitchViewNode, type NavigationViewNode, type OgImageMetadata, type OgMetadata, type PageData, PageList, type PageProps, type ResolvedAttribution, type ResolvedNavigation, type RootLayoutProps, type RootPageProps, type SiteData, cleanHeadingText, cn, createAtomFeedRoute, createHeadingIdGenerator, createJsonFeedRoute, createLlmsTxtRoute, createOgImageRoute, createOgImageStaticParams, createRobotsTxtRoute, createRssFeedRoute, createSitemapXmlRoute, extractMdxHeadings, headingToHTMLId, listStaticParams, resolveGroup, resolveGroupLayout, resolveLeaf, selectNavigationPages, urlIdToText };
|
package/dist/index.js
CHANGED
|
@@ -28,6 +28,30 @@ import {
|
|
|
28
28
|
headingToHTMLId,
|
|
29
29
|
urlIdToText
|
|
30
30
|
} from "@publish.os/nextjs/utils/heading-ids";
|
|
31
|
+
|
|
32
|
+
// src/components/block/page-navigation/page-nodes.ts
|
|
33
|
+
function selectNavigationPages(nodes) {
|
|
34
|
+
return nodes.flatMap((node) => node.type === "page" ? [
|
|
35
|
+
{
|
|
36
|
+
id: node.id,
|
|
37
|
+
label: node.label,
|
|
38
|
+
href: node.href,
|
|
39
|
+
path: node.page.path,
|
|
40
|
+
page: node.page
|
|
41
|
+
}
|
|
42
|
+
] : node.type === "group" ? [
|
|
43
|
+
...node.presentation === "page" ? [
|
|
44
|
+
{
|
|
45
|
+
id: node.id,
|
|
46
|
+
label: node.label,
|
|
47
|
+
href: node.href ?? node.route,
|
|
48
|
+
path: node.route,
|
|
49
|
+
group: node
|
|
50
|
+
}
|
|
51
|
+
] : [],
|
|
52
|
+
...selectNavigationPages(node.children)
|
|
53
|
+
] : node.type === "section" || node.type === "folder" ? selectNavigationPages(node.children) : node.type === "view" ? selectNavigationPages(node.items) : []);
|
|
54
|
+
}
|
|
31
55
|
export {
|
|
32
56
|
PageList,
|
|
33
57
|
cleanHeadingText,
|
|
@@ -48,6 +72,7 @@ export {
|
|
|
48
72
|
resolveGroup,
|
|
49
73
|
resolveGroupLayout,
|
|
50
74
|
resolveLeaf,
|
|
75
|
+
selectNavigationPages,
|
|
51
76
|
tags,
|
|
52
77
|
urlIdToText
|
|
53
78
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
4
|
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
5
5
|
|
|
6
6
|
declare const buttonVariants: (props?: ({
|
|
7
7
|
readonly variant?: "solid" | "soft" | "outline" | "ghost" | null | undefined;
|
|
@@ -56,23 +56,23 @@ type AgentActionsProps = ComponentPropsWithoutRef<"div"> & {
|
|
|
56
56
|
markdownLinkLabel?: string;
|
|
57
57
|
showMarkdownLink?: boolean;
|
|
58
58
|
};
|
|
59
|
-
declare function AgentActionsToolbar({ className, ...props }: ComponentPropsWithoutRef<"div">):
|
|
59
|
+
declare function AgentActionsToolbar({ className, ...props }: ComponentPropsWithoutRef<"div">): react.JSX.Element;
|
|
60
60
|
declare function AgentActionsMarkdownLink(): ReactNode;
|
|
61
61
|
declare function AgentActionsPrimaryAction({ action }: {
|
|
62
62
|
action?: AgentActionConfig;
|
|
63
63
|
}): ReactNode;
|
|
64
|
-
declare function AgentActionsFeedback():
|
|
64
|
+
declare function AgentActionsFeedback(): react.JSX.Element;
|
|
65
65
|
declare function AgentActionsGroup({ title, children, }: {
|
|
66
66
|
title?: string;
|
|
67
67
|
children: ReactNode;
|
|
68
|
-
}):
|
|
68
|
+
}): react.JSX.Element;
|
|
69
69
|
declare function AgentActionsItem({ action }: {
|
|
70
70
|
action: AgentActionConfig;
|
|
71
71
|
}): ReactNode;
|
|
72
72
|
declare function AgentActionsMenu({ children }: {
|
|
73
73
|
children?: ReactNode;
|
|
74
|
-
}):
|
|
75
|
-
declare function AgentActionsRoot(props: AgentActionsProps):
|
|
74
|
+
}): react.JSX.Element;
|
|
75
|
+
declare function AgentActionsRoot(props: AgentActionsProps): react.JSX.Element;
|
|
76
76
|
declare const AgentActions: typeof AgentActionsRoot & {
|
|
77
77
|
Feedback: typeof AgentActionsFeedback;
|
|
78
78
|
Group: typeof AgentActionsGroup;
|
|
@@ -44,7 +44,7 @@ function normalizePath(path) {
|
|
|
44
44
|
}
|
|
45
45
|
function markdownPathForPagePath(path) {
|
|
46
46
|
let normalized = normalizePath(path);
|
|
47
|
-
return normalized === "/" ? "/index.md" :
|
|
47
|
+
return normalized === "/" ? "/index.md" : `${normalized}.md`;
|
|
48
48
|
}
|
|
49
49
|
function isAbsoluteUrl(url) {
|
|
50
50
|
return /^[a-z][a-z\d+\-.]*:/i.test(url);
|
|
@@ -77,42 +77,11 @@ var DEFAULT_PRIMARY_ACTION = {
|
|
|
77
77
|
id: "open-in-ai",
|
|
78
78
|
title: "Open in",
|
|
79
79
|
actions: [
|
|
80
|
-
{
|
|
81
|
-
id: "open-claude",
|
|
82
|
-
title: "Claude",
|
|
83
|
-
href: ({ prompt }) => providerPromptUrl("https://claude.ai/new", prompt),
|
|
84
|
-
openInNew: !0
|
|
85
|
-
},
|
|
86
80
|
{
|
|
87
81
|
id: "open-chatgpt",
|
|
88
82
|
title: "ChatGPT",
|
|
89
83
|
href: ({ prompt }) => providerPromptUrl("https://chatgpt.com/?hints=search", prompt),
|
|
90
84
|
openInNew: !0
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
id: "open-cursor",
|
|
94
|
-
title: "Cursor",
|
|
95
|
-
href: ({ prompt }) => providerPromptUrl("https://cursor.com/link/prompt", prompt, "text"),
|
|
96
|
-
openInNew: !0
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
id: "open-copilot",
|
|
100
|
-
title: "Copilot",
|
|
101
|
-
href: ({ prompt }) => providerPromptUrl("https://copilot.microsoft.com/", prompt),
|
|
102
|
-
openInNew: !0
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
id: "open-t3-chat",
|
|
106
|
-
title: "T3 Chat",
|
|
107
|
-
href: ({ prompt }) => providerPromptUrl("https://t3.chat/new", prompt),
|
|
108
|
-
openInNew: !0
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
id: "open-github",
|
|
112
|
-
title: "GitHub source",
|
|
113
|
-
href: ({ sourceUrl }) => sourceUrl,
|
|
114
|
-
openInNew: !0,
|
|
115
|
-
disabled: ({ sourceUrl }) => !sourceUrl
|
|
116
85
|
}
|
|
117
86
|
]
|
|
118
87
|
},
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import 'react/jsx-runtime';
|
|
2
|
-
export { AgentActionConfig, AgentActionContext, AgentActionCopyTarget, AgentActionGroup, AgentActions, AgentActionsProps, Feedback, Group, Item, MarkdownLink, Menu, PrimaryAction, Root, Toolbar } from './AgentActions.js';
|
|
3
1
|
import 'react';
|
|
2
|
+
export { AgentActionConfig, AgentActionContext, AgentActionCopyTarget, AgentActionGroup, AgentActions, AgentActionsProps, Feedback, Group, Item, MarkdownLink, Menu, PrimaryAction, Root, Toolbar } from './AgentActions.js';
|
|
4
3
|
import 'class-variance-authority/types';
|
|
5
4
|
import 'class-variance-authority';
|
|
@@ -44,7 +44,7 @@ function normalizePath(path) {
|
|
|
44
44
|
}
|
|
45
45
|
function markdownPathForPagePath(path) {
|
|
46
46
|
let normalized = normalizePath(path);
|
|
47
|
-
return normalized === "/" ? "/index.md" :
|
|
47
|
+
return normalized === "/" ? "/index.md" : `${normalized}.md`;
|
|
48
48
|
}
|
|
49
49
|
function isAbsoluteUrl(url) {
|
|
50
50
|
return /^[a-z][a-z\d+\-.]*:/i.test(url);
|
|
@@ -77,42 +77,11 @@ var DEFAULT_PRIMARY_ACTION = {
|
|
|
77
77
|
id: "open-in-ai",
|
|
78
78
|
title: "Open in",
|
|
79
79
|
actions: [
|
|
80
|
-
{
|
|
81
|
-
id: "open-claude",
|
|
82
|
-
title: "Claude",
|
|
83
|
-
href: ({ prompt }) => providerPromptUrl("https://claude.ai/new", prompt),
|
|
84
|
-
openInNew: !0
|
|
85
|
-
},
|
|
86
80
|
{
|
|
87
81
|
id: "open-chatgpt",
|
|
88
82
|
title: "ChatGPT",
|
|
89
83
|
href: ({ prompt }) => providerPromptUrl("https://chatgpt.com/?hints=search", prompt),
|
|
90
84
|
openInNew: !0
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
id: "open-cursor",
|
|
94
|
-
title: "Cursor",
|
|
95
|
-
href: ({ prompt }) => providerPromptUrl("https://cursor.com/link/prompt", prompt, "text"),
|
|
96
|
-
openInNew: !0
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
id: "open-copilot",
|
|
100
|
-
title: "Copilot",
|
|
101
|
-
href: ({ prompt }) => providerPromptUrl("https://copilot.microsoft.com/", prompt),
|
|
102
|
-
openInNew: !0
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
id: "open-t3-chat",
|
|
106
|
-
title: "T3 Chat",
|
|
107
|
-
href: ({ prompt }) => providerPromptUrl("https://t3.chat/new", prompt),
|
|
108
|
-
openInNew: !0
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
id: "open-github",
|
|
112
|
-
title: "GitHub source",
|
|
113
|
-
href: ({ sourceUrl }) => sourceUrl,
|
|
114
|
-
openInNew: !0,
|
|
115
|
-
disabled: ({ sourceUrl }) => !sourceUrl
|
|
116
85
|
}
|
|
117
86
|
]
|
|
118
87
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
type AnimatedIconSwapProps = Omit<ComponentPropsWithoutRef<"span">, "children"> & {
|
|
@@ -11,6 +11,6 @@ type AnimatedIconSwapProps = Omit<ComponentPropsWithoutRef<"span">, "children">
|
|
|
11
11
|
/** Square wrapper size in pixels. */
|
|
12
12
|
size: number;
|
|
13
13
|
};
|
|
14
|
-
declare function AnimatedIconSwap({ active, activeIcon, className, defaultIcon, size, style, ...props }: AnimatedIconSwapProps):
|
|
14
|
+
declare function AnimatedIconSwap({ active, activeIcon, className, defaultIcon, size, style, ...props }: AnimatedIconSwapProps): react.JSX.Element;
|
|
15
15
|
|
|
16
16
|
export { AnimatedIconSwap, type AnimatedIconSwapProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
|
|
3
3
|
declare function collectTokenNamesFromCssText(css: string): string[];
|
|
4
4
|
declare function deriveTokenGroup(name: string): string;
|
|
5
|
-
declare function ColorPalette():
|
|
5
|
+
declare function ColorPalette(): react.JSX.Element;
|
|
6
6
|
|
|
7
7
|
export { collectTokenNamesFromCssText, ColorPalette as default, deriveTokenGroup };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
|
|
3
3
|
type LogoBlockAsset = {
|
|
4
4
|
readonly outputPath: string;
|
|
@@ -16,6 +16,6 @@ type LogoBlockProps = {
|
|
|
16
16
|
maxWidth?: number;
|
|
17
17
|
siteName: string;
|
|
18
18
|
};
|
|
19
|
-
declare function LogoBlock({ className, logo, maxHeight, maxWidth, siteName, }: LogoBlockProps):
|
|
19
|
+
declare function LogoBlock({ className, logo, maxHeight, maxWidth, siteName, }: LogoBlockProps): react.JSX.Element;
|
|
20
20
|
|
|
21
21
|
export { LogoBlock, type LogoBlockAsset, type LogoBlockLogo, type LogoBlockProps };
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
import { S as SiteData
|
|
4
|
+
import { S as SiteData } from '../../../types-TjH1ek0X.js';
|
|
5
|
+
import { R as ResolvedNavigation } from '../../../manifest-types-CcVPH_jh.js';
|
|
5
6
|
|
|
6
7
|
declare const breadcrumbVariants: (props?: ({
|
|
7
8
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
8
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
10
|
type BreadcrumbVariantProps = VariantProps<typeof breadcrumbVariants>;
|
|
10
11
|
|
|
11
|
-
declare function NavBreadcrumb({ currentPath, showRoot, size, site,
|
|
12
|
+
declare function NavBreadcrumb({ currentPath, showRoot, size, site, navigation, }: {
|
|
12
13
|
currentPath?: string;
|
|
13
14
|
showRoot?: boolean;
|
|
14
15
|
size?: BreadcrumbVariantProps["size"];
|
|
15
16
|
site: SiteData;
|
|
16
|
-
|
|
17
|
-
}):
|
|
17
|
+
navigation: ResolvedNavigation;
|
|
18
|
+
}): react.JSX.Element | null;
|
|
18
19
|
|
|
19
20
|
export { NavBreadcrumb };
|