@publish.os/nextjs 0.0.1-alpha.5 → 0.0.1-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/config/createNextConfig.js +3 -3
- package/dist/index.js +7 -5
- package/dist/kernel/components/blocks/color-palette.js +35 -4
- package/dist/kernel/components/blocks/logo-block.js +1 -1
- package/dist/kernel/components/blocks/nav-breadcrumb.js +2 -12
- package/dist/kernel/components/mdx/components/image.js +1 -1
- package/dist/kernel/components/ui/breadcrumb-trail.d.ts +3 -1
- package/dist/kernel/components/ui/breadcrumb-trail.js +1 -0
- package/dist/kernel/components/ui/breadcrumb.d.ts +1 -5
- package/dist/kernel/components/ui/breadcrumb.js +1 -16
- package/dist/kernel/components/ui/menu.js +5 -5
- package/dist/kernel/components/ui/navigation-menu.js +2 -2
- package/dist/kernel/components/ui/popover.js +5 -11
- package/dist/kernel/components/ui/select.js +5 -5
- package/dist/kernel/components/ui/text.js +109 -106
- package/dist/kernel/components/ui/tooltip.js +2 -2
- package/dist/kernel/defaults.registry.d.ts +60 -69
- package/dist/kernel/defaults.registry.js +59 -67
- package/dist/kernel/routes/agent/markdown.js +2 -2
- package/dist/kernel/routes/metadata/feed.js +2 -2
- package/dist/kernel/routes/metadata/llms.js +4 -2
- package/dist/kernel/routes/metadata/og-image.d.ts +1 -1
- package/dist/kernel/routes/metadata/robots.js +2 -2
- package/dist/kernel/routes/metadata/sitemap.js +2 -2
- package/dist/utils/cn.d.ts +1 -1
- package/package.json +2 -6
- package/release/package.json +3 -2
- package/release/release.json +5 -5
- package/release/{pnpm-lock.yaml → runtime-pnpm-lock.yaml} +135 -34
- package/dist/cache/tags.cjs +0 -79
- package/dist/cache/tags.d.cts +0 -13
- package/dist/config/createNextConfig.cjs +0 -52
- package/dist/config/createNextConfig.d.cts +0 -8
- package/dist/config.cjs +0 -78
- package/dist/config.d.cts +0 -101
- package/dist/config.d.ts +0 -101
- package/dist/config.js +0 -48
- package/dist/index.cjs +0 -1266
- package/dist/index.d.cts +0 -18
- package/dist/kernel/components/blocks/AgentActions.cjs +0 -425
- package/dist/kernel/components/blocks/AgentActions.d.cts +0 -52
- package/dist/kernel/components/blocks/animated-icon-swap.cjs +0 -101
- package/dist/kernel/components/blocks/animated-icon-swap.d.cts +0 -16
- package/dist/kernel/components/blocks/color-palette.cjs +0 -413
- package/dist/kernel/components/blocks/color-palette.d.cts +0 -7
- package/dist/kernel/components/blocks/design-system-preview.cjs +0 -593
- package/dist/kernel/components/blocks/design-system-preview.d.cts +0 -29
- package/dist/kernel/components/blocks/link-playground.cjs +0 -816
- package/dist/kernel/components/blocks/link-playground.d.cts +0 -5
- package/dist/kernel/components/blocks/logo-block.cjs +0 -156
- package/dist/kernel/components/blocks/logo-block.d.cts +0 -21
- package/dist/kernel/components/blocks/nav-breadcrumb.cjs +0 -122
- package/dist/kernel/components/blocks/nav-breadcrumb.d.cts +0 -11
- package/dist/kernel/components/blocks/navbar.cjs +0 -154
- package/dist/kernel/components/blocks/navbar.d.cts +0 -16
- package/dist/kernel/components/blocks/navigation-progress-playground.cjs +0 -735
- package/dist/kernel/components/blocks/navigation-progress-playground.d.cts +0 -5
- package/dist/kernel/components/blocks/navigation-progress.cjs +0 -270
- package/dist/kernel/components/blocks/navigation-progress.d.cts +0 -16
- package/dist/kernel/components/blocks/next-prev.cjs +0 -142
- package/dist/kernel/components/blocks/next-prev.d.cts +0 -11
- package/dist/kernel/components/blocks/page-list.cjs +0 -59
- package/dist/kernel/components/blocks/page-list.d.cts +0 -11
- package/dist/kernel/components/blocks/search.cjs +0 -717
- package/dist/kernel/components/blocks/search.d.cts +0 -77
- package/dist/kernel/components/blocks/sidebar-node.cjs +0 -309
- package/dist/kernel/components/blocks/sidebar-node.d.cts +0 -8
- package/dist/kernel/components/blocks/sidebar.cjs +0 -317
- package/dist/kernel/components/blocks/sidebar.d.cts +0 -33
- package/dist/kernel/components/blocks/theme-toggle.cjs +0 -31
- package/dist/kernel/components/blocks/theme-toggle.d.cts +0 -6
- package/dist/kernel/components/blocks/toc.cjs +0 -356
- package/dist/kernel/components/blocks/toc.d.cts +0 -10
- package/dist/kernel/components/mdx/components/blockquote.cjs +0 -66
- package/dist/kernel/components/mdx/components/blockquote.d.cts +0 -6
- package/dist/kernel/components/mdx/components/callout.cjs +0 -137
- package/dist/kernel/components/mdx/components/callout.d.cts +0 -18
- package/dist/kernel/components/mdx/components/code-block.cjs +0 -39
- package/dist/kernel/components/mdx/components/code-block.d.cts +0 -9
- package/dist/kernel/components/mdx/components/figure-caption.cjs +0 -63
- package/dist/kernel/components/mdx/components/figure-caption.d.cts +0 -6
- package/dist/kernel/components/mdx/components/figure.cjs +0 -78
- package/dist/kernel/components/mdx/components/figure.d.cts +0 -10
- package/dist/kernel/components/mdx/components/footnotes.cjs +0 -66
- package/dist/kernel/components/mdx/components/footnotes.d.cts +0 -6
- package/dist/kernel/components/mdx/components/heading-copy-link.cjs +0 -108
- package/dist/kernel/components/mdx/components/heading-copy-link.d.cts +0 -23
- package/dist/kernel/components/mdx/components/heading.cjs +0 -166
- package/dist/kernel/components/mdx/components/heading.d.cts +0 -8
- package/dist/kernel/components/mdx/components/hr.cjs +0 -34
- package/dist/kernel/components/mdx/components/hr.d.cts +0 -9
- package/dist/kernel/components/mdx/components/image-zoom.cjs +0 -49
- package/dist/kernel/components/mdx/components/image-zoom.d.cts +0 -10
- package/dist/kernel/components/mdx/components/image.cjs +0 -192
- package/dist/kernel/components/mdx/components/image.d.cts +0 -21
- package/dist/kernel/components/mdx/components/inline-code.cjs +0 -66
- package/dist/kernel/components/mdx/components/inline-code.d.cts +0 -6
- package/dist/kernel/components/mdx/components/kbd.cjs +0 -34
- package/dist/kernel/components/mdx/components/kbd.d.cts +0 -10
- package/dist/kernel/components/mdx/components/link.cjs +0 -49
- package/dist/kernel/components/mdx/components/link.d.cts +0 -11
- package/dist/kernel/components/mdx/components/paragraph.cjs +0 -87
- package/dist/kernel/components/mdx/components/paragraph.d.cts +0 -5
- package/dist/kernel/components/mdx/components/pre.cjs +0 -66
- package/dist/kernel/components/mdx/components/pre.d.cts +0 -6
- package/dist/kernel/components/mdx/components/strikethrough.cjs +0 -63
- package/dist/kernel/components/mdx/components/strikethrough.d.cts +0 -6
- package/dist/kernel/components/mdx/components/table.cjs +0 -59
- package/dist/kernel/components/mdx/components/table.d.cts +0 -10
- package/dist/kernel/components/mdx/components/task-list.cjs +0 -88
- package/dist/kernel/components/mdx/components/task-list.d.cts +0 -8
- package/dist/kernel/components/mdx/components/video-player.cjs +0 -173
- package/dist/kernel/components/mdx/components/video-player.d.cts +0 -18
- package/dist/kernel/components/mdx/components/video.cjs +0 -185
- package/dist/kernel/components/mdx/components/video.d.cts +0 -15
- package/dist/kernel/components/mdx/error-boundary.cjs +0 -62
- package/dist/kernel/components/mdx/error-boundary.d.cts +0 -8
- package/dist/kernel/components/mdx/error-fallback.cjs +0 -58
- package/dist/kernel/components/mdx/error-fallback.d.cts +0 -9
- package/dist/kernel/components/mdx/mdx.cjs +0 -141
- package/dist/kernel/components/mdx/mdx.d.cts +0 -22
- package/dist/kernel/components/mdx/rehype-heading-ids.cjs +0 -113
- package/dist/kernel/components/mdx/rehype-heading-ids.d.cts +0 -10
- package/dist/kernel/components/mdx/types.cjs +0 -18
- package/dist/kernel/components/mdx/types.d.cts +0 -18
- package/dist/kernel/components/ui/accordion.cjs +0 -104
- package/dist/kernel/components/ui/accordion.d.cts +0 -16
- package/dist/kernel/components/ui/breadcrumb-trail.cjs +0 -238
- package/dist/kernel/components/ui/breadcrumb-trail.d.cts +0 -13
- package/dist/kernel/components/ui/breadcrumb.cjs +0 -399
- package/dist/kernel/components/ui/breadcrumb.d.cts +0 -52
- package/dist/kernel/components/ui/button-group.cjs +0 -143
- package/dist/kernel/components/ui/button-group.d.cts +0 -19
- package/dist/kernel/components/ui/button.cjs +0 -139
- package/dist/kernel/components/ui/button.d.cts +0 -22
- package/dist/kernel/components/ui/card.cjs +0 -133
- package/dist/kernel/components/ui/card.d.cts +0 -17
- package/dist/kernel/components/ui/dialog.cjs +0 -149
- package/dist/kernel/components/ui/dialog.d.cts +0 -22
- package/dist/kernel/components/ui/drawer.cjs +0 -163
- package/dist/kernel/components/ui/drawer.d.cts +0 -24
- package/dist/kernel/components/ui/input.cjs +0 -96
- package/dist/kernel/components/ui/input.d.cts +0 -18
- package/dist/kernel/components/ui/kbd.cjs +0 -105
- package/dist/kernel/components/ui/kbd.d.cts +0 -13
- package/dist/kernel/components/ui/link.cjs +0 -253
- package/dist/kernel/components/ui/link.d.cts +0 -31
- package/dist/kernel/components/ui/menu.cjs +0 -301
- package/dist/kernel/components/ui/menu.d.cts +0 -70
- package/dist/kernel/components/ui/meta-key.cjs +0 -34
- package/dist/kernel/components/ui/meta-key.d.cts +0 -12
- package/dist/kernel/components/ui/navigation-menu.cjs +0 -253
- package/dist/kernel/components/ui/navigation-menu.d.cts +0 -47
- package/dist/kernel/components/ui/popover.cjs +0 -168
- package/dist/kernel/components/ui/popover.d.cts +0 -24
- package/dist/kernel/components/ui/progress.cjs +0 -112
- package/dist/kernel/components/ui/progress.d.cts +0 -16
- package/dist/kernel/components/ui/scroll-area.cjs +0 -413
- package/dist/kernel/components/ui/scroll-area.d.cts +0 -58
- package/dist/kernel/components/ui/select.cjs +0 -244
- package/dist/kernel/components/ui/select.d.cts +0 -40
- package/dist/kernel/components/ui/separator.cjs +0 -73
- package/dist/kernel/components/ui/separator.d.cts +0 -8
- package/dist/kernel/components/ui/table.cjs +0 -131
- package/dist/kernel/components/ui/table.d.cts +0 -11
- package/dist/kernel/components/ui/tabs.cjs +0 -450
- package/dist/kernel/components/ui/tabs.d.cts +0 -82
- package/dist/kernel/components/ui/tag.cjs +0 -104
- package/dist/kernel/components/ui/tag.d.cts +0 -14
- package/dist/kernel/components/ui/text.cjs +0 -184
- package/dist/kernel/components/ui/text.d.cts +0 -17
- package/dist/kernel/components/ui/theme-toggle.cjs +0 -108
- package/dist/kernel/components/ui/theme-toggle.d.cts +0 -10
- package/dist/kernel/components/ui/toast.cjs +0 -154
- package/dist/kernel/components/ui/toast.d.cts +0 -26
- package/dist/kernel/components/ui/tooltip.cjs +0 -127
- package/dist/kernel/components/ui/tooltip.d.cts +0 -20
- package/dist/kernel/defaults.registry.cjs +0 -541
- package/dist/kernel/defaults.registry.d.cts +0 -469
- package/dist/kernel/routes/agent/markdown.cjs +0 -202
- package/dist/kernel/routes/agent/markdown.d.cts +0 -58
- package/dist/kernel/routes/layouts/group.cjs +0 -181
- package/dist/kernel/routes/layouts/group.d.cts +0 -20
- package/dist/kernel/routes/metadata/feed.cjs +0 -293
- package/dist/kernel/routes/metadata/feed.d.cts +0 -20
- package/dist/kernel/routes/metadata/llms.cjs +0 -239
- package/dist/kernel/routes/metadata/llms.d.cts +0 -26
- package/dist/kernel/routes/metadata/og-image.cjs +0 -630
- package/dist/kernel/routes/metadata/og-image.d.cts +0 -62
- package/dist/kernel/routes/metadata/robots.cjs +0 -148
- package/dist/kernel/routes/metadata/robots.d.cts +0 -6
- package/dist/kernel/routes/metadata/sitemap.cjs +0 -192
- package/dist/kernel/routes/metadata/sitemap.d.cts +0 -8
- package/dist/kernel/routes/pages/group.cjs +0 -263
- package/dist/kernel/routes/pages/group.d.cts +0 -17
- package/dist/kernel/routes/pages/leaf.cjs +0 -421
- package/dist/kernel/routes/pages/leaf.d.cts +0 -36
- package/dist/kernel/routes/pages/root.cjs +0 -229
- package/dist/kernel/routes/pages/root.d.cts +0 -16
- package/dist/keyboard-shortcuts.cjs +0 -345
- package/dist/keyboard-shortcuts.d.cts +0 -34
- package/dist/resolvers/manifest-resolver.cjs +0 -111
- package/dist/resolvers/manifest-resolver.d.cts +0 -13
- package/dist/search.cjs +0 -411
- package/dist/search.d.cts +0 -20
- package/dist/types.cjs +0 -30
- package/dist/types.d.cts +0 -269
- package/dist/utils/cn.cjs +0 -49
- package/dist/utils/cn.d.cts +0 -15
- package/dist/utils/heading-ids.cjs +0 -119
- package/dist/utils/heading-ids.d.cts +0 -15
- package/dist/utils/pretty-date.cjs +0 -55
- package/dist/utils/pretty-date.d.cts +0 -6
|
@@ -1,469 +0,0 @@
|
|
|
1
|
-
type KernelDefaultCategory = "ui" | "mdx" | "block" | "route" | "css";
|
|
2
|
-
type KernelDefaultStatus = "available" | "planned";
|
|
3
|
-
type KernelDefaultEntry = {
|
|
4
|
-
category: KernelDefaultCategory;
|
|
5
|
-
name: string;
|
|
6
|
-
status: KernelDefaultStatus;
|
|
7
|
-
description: string;
|
|
8
|
-
kernelImport?: string;
|
|
9
|
-
tenantPath?: string;
|
|
10
|
-
copyCommand?: string;
|
|
11
|
-
contract?: string;
|
|
12
|
-
docs?: string;
|
|
13
|
-
};
|
|
14
|
-
type KernelDefaultsRegistry = {
|
|
15
|
-
version: 1;
|
|
16
|
-
entries: KernelDefaultEntry[];
|
|
17
|
-
};
|
|
18
|
-
declare const kernelDefaultsRegistry: {
|
|
19
|
-
readonly version: 1;
|
|
20
|
-
readonly entries: [{
|
|
21
|
-
readonly category: "block";
|
|
22
|
-
readonly name: "ThemeToggle";
|
|
23
|
-
readonly status: "available";
|
|
24
|
-
readonly description: "Client island for cycling system, light, and dark themes.";
|
|
25
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/blocks/theme-toggle";
|
|
26
|
-
readonly tenantPath: "publish.os/components/blocks/theme-toggle.tsx";
|
|
27
|
-
}, {
|
|
28
|
-
readonly category: "block";
|
|
29
|
-
readonly name: "AnimatedIconSwap";
|
|
30
|
-
readonly status: "available";
|
|
31
|
-
readonly description: "Slot-based icon transition wrapper for swapping between inactive and active states.";
|
|
32
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/blocks/animated-icon-swap";
|
|
33
|
-
readonly tenantPath: "publish.os/components/blocks/animated-icon-swap.tsx";
|
|
34
|
-
readonly copyCommand: "publish.os add block AnimatedIconSwap";
|
|
35
|
-
readonly contract: "AnimatedIconSwapProps";
|
|
36
|
-
}, {
|
|
37
|
-
readonly category: "block";
|
|
38
|
-
readonly name: "AgentActions";
|
|
39
|
-
readonly status: "available";
|
|
40
|
-
readonly description: "Agent-readable page actions for opening Markdown in AI chats, copying Markdown, and linking to Markdown artifacts.";
|
|
41
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/blocks/AgentActions";
|
|
42
|
-
readonly tenantPath: "publish.os/components/blocks/AgentActions.tsx";
|
|
43
|
-
readonly copyCommand: "publish.os add block AgentActions";
|
|
44
|
-
readonly contract: "AgentActionsProps";
|
|
45
|
-
}, {
|
|
46
|
-
readonly category: "ui";
|
|
47
|
-
readonly name: "Button";
|
|
48
|
-
readonly status: "available";
|
|
49
|
-
readonly description: "Base UI button with publishOS semantic variants.";
|
|
50
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/button";
|
|
51
|
-
readonly tenantPath: "publish.os/components/ui/button.tsx";
|
|
52
|
-
readonly copyCommand: "publish.os add ui Button";
|
|
53
|
-
readonly contract: "ButtonProps";
|
|
54
|
-
}, {
|
|
55
|
-
readonly category: "ui";
|
|
56
|
-
readonly name: "ButtonGroup";
|
|
57
|
-
readonly status: "available";
|
|
58
|
-
readonly description: "Composable button grouping primitives for joined action controls.";
|
|
59
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/button-group";
|
|
60
|
-
readonly tenantPath: "publish.os/components/ui/button-group.tsx";
|
|
61
|
-
readonly copyCommand: "publish.os add ui ButtonGroup";
|
|
62
|
-
readonly contract: "ButtonGroupProps";
|
|
63
|
-
}, {
|
|
64
|
-
readonly category: "ui";
|
|
65
|
-
readonly name: "Link";
|
|
66
|
-
readonly status: "available";
|
|
67
|
-
readonly description: "Internal/external link primitive styled with publishOS tokens.";
|
|
68
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/link";
|
|
69
|
-
readonly tenantPath: "publish.os/components/ui/link.tsx";
|
|
70
|
-
readonly contract: "LinkProps";
|
|
71
|
-
}, {
|
|
72
|
-
readonly category: "ui";
|
|
73
|
-
readonly name: "Card";
|
|
74
|
-
readonly status: "available";
|
|
75
|
-
readonly description: "Composable surface container with semantic padding variants.";
|
|
76
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/card";
|
|
77
|
-
readonly tenantPath: "publish.os/components/ui/card.tsx";
|
|
78
|
-
readonly contract: "CardProps";
|
|
79
|
-
}, {
|
|
80
|
-
readonly category: "ui";
|
|
81
|
-
readonly name: "Tag";
|
|
82
|
-
readonly status: "available";
|
|
83
|
-
readonly description: "Small status and metadata label component.";
|
|
84
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/tag";
|
|
85
|
-
readonly tenantPath: "publish.os/components/ui/tag.tsx";
|
|
86
|
-
readonly contract: "TagProps";
|
|
87
|
-
}, {
|
|
88
|
-
readonly category: "ui";
|
|
89
|
-
readonly name: "Kbd";
|
|
90
|
-
readonly status: "available";
|
|
91
|
-
readonly description: "Keyboard shortcut glyph using radius and foreground tokens.";
|
|
92
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/kbd";
|
|
93
|
-
readonly tenantPath: "publish.os/components/ui/kbd.tsx";
|
|
94
|
-
readonly contract: "KbdProps";
|
|
95
|
-
}, {
|
|
96
|
-
readonly category: "ui";
|
|
97
|
-
readonly name: "Separator";
|
|
98
|
-
readonly status: "available";
|
|
99
|
-
readonly description: "Base UI separator styled with stroke tokens.";
|
|
100
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/separator";
|
|
101
|
-
readonly tenantPath: "publish.os/components/ui/separator.tsx";
|
|
102
|
-
readonly contract: "SeparatorProps";
|
|
103
|
-
}, {
|
|
104
|
-
readonly category: "ui";
|
|
105
|
-
readonly name: "Breadcrumb";
|
|
106
|
-
readonly status: "available";
|
|
107
|
-
readonly description: "Composable breadcrumb navigation primitives.";
|
|
108
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/breadcrumb";
|
|
109
|
-
readonly tenantPath: "publish.os/components/ui/breadcrumb.tsx";
|
|
110
|
-
}, {
|
|
111
|
-
readonly category: "ui";
|
|
112
|
-
readonly name: "Table";
|
|
113
|
-
readonly status: "available";
|
|
114
|
-
readonly description: "Responsive table primitives for UI and MDX rendering.";
|
|
115
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/table";
|
|
116
|
-
readonly tenantPath: "publish.os/components/ui/table.tsx";
|
|
117
|
-
}, {
|
|
118
|
-
readonly category: "ui";
|
|
119
|
-
readonly name: "Text";
|
|
120
|
-
readonly status: "available";
|
|
121
|
-
readonly description: "Tokenized text primitive with semantic variants.";
|
|
122
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/text";
|
|
123
|
-
readonly tenantPath: "publish.os/components/ui/text.tsx";
|
|
124
|
-
}, {
|
|
125
|
-
readonly category: "ui";
|
|
126
|
-
readonly name: "Input";
|
|
127
|
-
readonly status: "available";
|
|
128
|
-
readonly description: "Base UI input with publishOS field styling.";
|
|
129
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/input";
|
|
130
|
-
readonly tenantPath: "publish.os/components/ui/input.tsx";
|
|
131
|
-
}, {
|
|
132
|
-
readonly category: "ui";
|
|
133
|
-
readonly name: "Select";
|
|
134
|
-
readonly status: "available";
|
|
135
|
-
readonly description: "Composable Base UI select primitives.";
|
|
136
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/select";
|
|
137
|
-
readonly tenantPath: "publish.os/components/ui/select.tsx";
|
|
138
|
-
}, {
|
|
139
|
-
readonly category: "ui";
|
|
140
|
-
readonly name: "ScrollArea";
|
|
141
|
-
readonly status: "available";
|
|
142
|
-
readonly description: "Tokenized scroll area primitives.";
|
|
143
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/scroll-area";
|
|
144
|
-
readonly tenantPath: "publish.os/components/ui/scroll-area.tsx";
|
|
145
|
-
}, {
|
|
146
|
-
readonly category: "ui";
|
|
147
|
-
readonly name: "Tooltip";
|
|
148
|
-
readonly status: "available";
|
|
149
|
-
readonly description: "Accessible tooltip primitives.";
|
|
150
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/tooltip";
|
|
151
|
-
readonly tenantPath: "publish.os/components/ui/tooltip.tsx";
|
|
152
|
-
}, {
|
|
153
|
-
readonly category: "ui";
|
|
154
|
-
readonly name: "Popover";
|
|
155
|
-
readonly status: "available";
|
|
156
|
-
readonly description: "Accessible anchored popover primitives.";
|
|
157
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/popover";
|
|
158
|
-
readonly tenantPath: "publish.os/components/ui/popover.tsx";
|
|
159
|
-
}, {
|
|
160
|
-
readonly category: "ui";
|
|
161
|
-
readonly name: "Dialog";
|
|
162
|
-
readonly status: "available";
|
|
163
|
-
readonly description: "Accessible modal dialog primitives.";
|
|
164
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/dialog";
|
|
165
|
-
readonly tenantPath: "publish.os/components/ui/dialog.tsx";
|
|
166
|
-
}, {
|
|
167
|
-
readonly category: "ui";
|
|
168
|
-
readonly name: "Menu";
|
|
169
|
-
readonly status: "available";
|
|
170
|
-
readonly description: "Accessible menu primitives.";
|
|
171
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/menu";
|
|
172
|
-
readonly tenantPath: "publish.os/components/ui/menu.tsx";
|
|
173
|
-
}, {
|
|
174
|
-
readonly category: "ui";
|
|
175
|
-
readonly name: "Drawer";
|
|
176
|
-
readonly status: "available";
|
|
177
|
-
readonly description: "Accessible drawer primitives.";
|
|
178
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/drawer";
|
|
179
|
-
readonly tenantPath: "publish.os/components/ui/drawer.tsx";
|
|
180
|
-
}, {
|
|
181
|
-
readonly category: "ui";
|
|
182
|
-
readonly name: "Tabs";
|
|
183
|
-
readonly status: "available";
|
|
184
|
-
readonly description: "Accessible tabs primitives.";
|
|
185
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/tabs";
|
|
186
|
-
readonly tenantPath: "publish.os/components/ui/tabs.tsx";
|
|
187
|
-
}, {
|
|
188
|
-
readonly category: "ui";
|
|
189
|
-
readonly name: "MetaKey";
|
|
190
|
-
readonly status: "available";
|
|
191
|
-
readonly description: "Platform meta key display primitive.";
|
|
192
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/meta-key";
|
|
193
|
-
readonly tenantPath: "publish.os/components/ui/meta-key.tsx";
|
|
194
|
-
}, {
|
|
195
|
-
readonly category: "ui";
|
|
196
|
-
readonly name: "Toast";
|
|
197
|
-
readonly status: "available";
|
|
198
|
-
readonly description: "Accessible toast primitives and manager helpers.";
|
|
199
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/toast";
|
|
200
|
-
readonly tenantPath: "publish.os/components/ui/toast.tsx";
|
|
201
|
-
}, {
|
|
202
|
-
readonly category: "ui";
|
|
203
|
-
readonly name: "Progress";
|
|
204
|
-
readonly status: "available";
|
|
205
|
-
readonly description: "Accessible progress primitives.";
|
|
206
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/progress";
|
|
207
|
-
readonly tenantPath: "publish.os/components/ui/progress.tsx";
|
|
208
|
-
}, {
|
|
209
|
-
readonly category: "ui";
|
|
210
|
-
readonly name: "Accordion";
|
|
211
|
-
readonly status: "available";
|
|
212
|
-
readonly description: "Accessible accordion primitives.";
|
|
213
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/ui/accordion";
|
|
214
|
-
readonly tenantPath: "publish.os/components/ui/accordion.tsx";
|
|
215
|
-
}, {
|
|
216
|
-
readonly category: "block";
|
|
217
|
-
readonly name: "Search";
|
|
218
|
-
readonly status: "available";
|
|
219
|
-
readonly description: "Accessible site search primitive backed by the publishOS search wrapper.";
|
|
220
|
-
readonly kernelImport: "@publish.os/nextjs/search";
|
|
221
|
-
readonly tenantPath: "publish.os/components/blocks/search.tsx";
|
|
222
|
-
readonly copyCommand: "publish.os add block Search";
|
|
223
|
-
readonly contract: "SearchBlockContextValue";
|
|
224
|
-
}, {
|
|
225
|
-
readonly category: "block";
|
|
226
|
-
readonly name: "Navbar";
|
|
227
|
-
readonly status: "available";
|
|
228
|
-
readonly description: "Server-compatible site header with breadcrumbs and group navigation.";
|
|
229
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/blocks/navbar";
|
|
230
|
-
readonly tenantPath: "publish.os/components/blocks/navbar.tsx";
|
|
231
|
-
readonly copyCommand: "publish.os add block Navbar";
|
|
232
|
-
}, {
|
|
233
|
-
readonly category: "block";
|
|
234
|
-
readonly name: "Sidebar";
|
|
235
|
-
readonly status: "available";
|
|
236
|
-
readonly description: "Docs tree navigation with stable layout width, scroll area, and collapsible groups. Uses the copied SidebarNode primitive for node markup.";
|
|
237
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/blocks/sidebar";
|
|
238
|
-
readonly tenantPath: "publish.os/components/blocks/sidebar.tsx";
|
|
239
|
-
readonly copyCommand: "publish.os add block Sidebar";
|
|
240
|
-
readonly contract: "SidebarProps";
|
|
241
|
-
}, {
|
|
242
|
-
readonly category: "block";
|
|
243
|
-
readonly name: "SidebarNode";
|
|
244
|
-
readonly status: "available";
|
|
245
|
-
readonly description: "Sidebar node markup primitive. Swap this primitive for base or minimal node styling.";
|
|
246
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/blocks/sidebar-node";
|
|
247
|
-
readonly tenantPath: "publish.os/components/blocks/sidebar-node.tsx";
|
|
248
|
-
readonly contract: "SidebarNodePrimitiveProps";
|
|
249
|
-
}, {
|
|
250
|
-
readonly category: "block";
|
|
251
|
-
readonly name: "NavigationProgressBar";
|
|
252
|
-
readonly status: "available";
|
|
253
|
-
readonly description: "Route transition progress indicator backed by the Progress primitive.";
|
|
254
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/blocks/navigation-progress";
|
|
255
|
-
readonly tenantPath: "publish.os/components/blocks/navigation-progress.tsx";
|
|
256
|
-
}, {
|
|
257
|
-
readonly category: "block";
|
|
258
|
-
readonly name: "LinkPlayground";
|
|
259
|
-
readonly status: "available";
|
|
260
|
-
readonly description: "Design-system playground for tuning UI and MDX link styling.";
|
|
261
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/blocks/link-playground";
|
|
262
|
-
}, {
|
|
263
|
-
readonly category: "block";
|
|
264
|
-
readonly name: "NavBreadcrumb";
|
|
265
|
-
readonly status: "available";
|
|
266
|
-
readonly description: "Breadcrumb trail derived from the manifest tree.";
|
|
267
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/blocks/nav-breadcrumb";
|
|
268
|
-
readonly tenantPath: "publish.os/components/blocks/nav-breadcrumb.tsx";
|
|
269
|
-
}, {
|
|
270
|
-
readonly category: "block";
|
|
271
|
-
readonly name: "PageList";
|
|
272
|
-
readonly status: "available";
|
|
273
|
-
readonly description: "Flat page list for group pages and leaves.";
|
|
274
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/blocks/page-list";
|
|
275
|
-
readonly tenantPath: "publish.os/components/blocks/page-list.tsx";
|
|
276
|
-
}, {
|
|
277
|
-
readonly category: "block";
|
|
278
|
-
readonly name: "NextPrev";
|
|
279
|
-
readonly status: "available";
|
|
280
|
-
readonly description: "Previous and next page navigation for content leaves.";
|
|
281
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/blocks/next-prev";
|
|
282
|
-
readonly tenantPath: "publish.os/components/blocks/next-prev.tsx";
|
|
283
|
-
}, {
|
|
284
|
-
readonly category: "block";
|
|
285
|
-
readonly name: "Toc";
|
|
286
|
-
readonly status: "available";
|
|
287
|
-
readonly description: "Client table of contents derived from MDX headings with active-section styling.";
|
|
288
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/blocks/toc";
|
|
289
|
-
readonly tenantPath: "publish.os/components/blocks/toc.tsx";
|
|
290
|
-
readonly contract: "TocProps";
|
|
291
|
-
}, {
|
|
292
|
-
readonly category: "block";
|
|
293
|
-
readonly name: "ColorPalette";
|
|
294
|
-
readonly status: "available";
|
|
295
|
-
readonly description: "Current token/color preview block. Will be replaced by DesignSystemPreview.";
|
|
296
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/blocks/color-palette";
|
|
297
|
-
readonly tenantPath: "publish.os/components/blocks/color-palette.tsx";
|
|
298
|
-
}, {
|
|
299
|
-
readonly category: "block";
|
|
300
|
-
readonly name: "DesignSystemPreview";
|
|
301
|
-
readonly status: "available";
|
|
302
|
-
readonly description: "Tabbed preview for active tokens, typography, UI, MDX, and blocks.";
|
|
303
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/blocks/design-system-preview";
|
|
304
|
-
readonly tenantPath: "publish.os/components/blocks/design-system-preview.tsx";
|
|
305
|
-
}, {
|
|
306
|
-
readonly category: "mdx";
|
|
307
|
-
readonly name: "Heading";
|
|
308
|
-
readonly status: "available";
|
|
309
|
-
readonly description: "Default h1-h6 renderer with stable heading IDs.";
|
|
310
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/mdx/components/heading";
|
|
311
|
-
readonly tenantPath: "publish.os/components/mdx/heading.tsx";
|
|
312
|
-
readonly contract: "HeadingProps";
|
|
313
|
-
}, {
|
|
314
|
-
readonly category: "mdx";
|
|
315
|
-
readonly name: "Paragraph";
|
|
316
|
-
readonly status: "available";
|
|
317
|
-
readonly description: "Default paragraph renderer.";
|
|
318
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/mdx/components/paragraph";
|
|
319
|
-
readonly tenantPath: "publish.os/components/mdx/paragraph.tsx";
|
|
320
|
-
readonly contract: "ComponentPropsWithoutRef<'p'>";
|
|
321
|
-
}, {
|
|
322
|
-
readonly category: "mdx";
|
|
323
|
-
readonly name: "Link";
|
|
324
|
-
readonly status: "available";
|
|
325
|
-
readonly description: "Public MDX link override contract with internal/external edge cases.";
|
|
326
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/mdx/components/link";
|
|
327
|
-
readonly tenantPath: "publish.os/components/mdx/link.tsx";
|
|
328
|
-
readonly copyCommand: "publish.os add mdx Link";
|
|
329
|
-
readonly contract: "MdxLinkProps";
|
|
330
|
-
}, {
|
|
331
|
-
readonly category: "mdx";
|
|
332
|
-
readonly name: "Kbd";
|
|
333
|
-
readonly status: "available";
|
|
334
|
-
readonly description: "MDX keyboard glyph renderer.";
|
|
335
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/mdx/components/kbd";
|
|
336
|
-
readonly tenantPath: "publish.os/components/mdx/kbd.tsx";
|
|
337
|
-
}, {
|
|
338
|
-
readonly category: "mdx";
|
|
339
|
-
readonly name: "Strikethrough";
|
|
340
|
-
readonly status: "available";
|
|
341
|
-
readonly description: "GFM strikethrough renderer.";
|
|
342
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/mdx/components/strikethrough";
|
|
343
|
-
readonly tenantPath: "publish.os/components/mdx/strikethrough.tsx";
|
|
344
|
-
}, {
|
|
345
|
-
readonly category: "mdx";
|
|
346
|
-
readonly name: "Blockquote";
|
|
347
|
-
readonly status: "available";
|
|
348
|
-
readonly description: "Tokenized blockquote renderer.";
|
|
349
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/mdx/components/blockquote";
|
|
350
|
-
readonly tenantPath: "publish.os/components/mdx/blockquote.tsx";
|
|
351
|
-
}, {
|
|
352
|
-
readonly category: "mdx";
|
|
353
|
-
readonly name: "Hr";
|
|
354
|
-
readonly status: "available";
|
|
355
|
-
readonly description: "Themed horizontal rule renderer.";
|
|
356
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/mdx/components/hr";
|
|
357
|
-
readonly tenantPath: "publish.os/components/mdx/hr.tsx";
|
|
358
|
-
}, {
|
|
359
|
-
readonly category: "mdx";
|
|
360
|
-
readonly name: "Table";
|
|
361
|
-
readonly status: "available";
|
|
362
|
-
readonly description: "GFM table renderers backed by UI table primitives.";
|
|
363
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/mdx/components/table";
|
|
364
|
-
readonly tenantPath: "publish.os/components/mdx/table.tsx";
|
|
365
|
-
}, {
|
|
366
|
-
readonly category: "mdx";
|
|
367
|
-
readonly name: "TaskList";
|
|
368
|
-
readonly status: "available";
|
|
369
|
-
readonly description: "GFM task list renderer.";
|
|
370
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/mdx/components/task-list";
|
|
371
|
-
readonly tenantPath: "publish.os/components/mdx/task-list.tsx";
|
|
372
|
-
}, {
|
|
373
|
-
readonly category: "mdx";
|
|
374
|
-
readonly name: "Footnotes";
|
|
375
|
-
readonly status: "available";
|
|
376
|
-
readonly description: "GFM footnotes section renderer.";
|
|
377
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/mdx/components/footnotes";
|
|
378
|
-
readonly tenantPath: "publish.os/components/mdx/footnotes.tsx";
|
|
379
|
-
}, {
|
|
380
|
-
readonly category: "mdx";
|
|
381
|
-
readonly name: "Callout";
|
|
382
|
-
readonly status: "available";
|
|
383
|
-
readonly description: "Rich MDX callout block.";
|
|
384
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/mdx/components/callout";
|
|
385
|
-
readonly tenantPath: "publish.os/components/mdx/callout.tsx";
|
|
386
|
-
}, {
|
|
387
|
-
readonly category: "mdx";
|
|
388
|
-
readonly name: "Code";
|
|
389
|
-
readonly status: "available";
|
|
390
|
-
readonly description: "Inline and block code renderers.";
|
|
391
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/mdx/components/code-block";
|
|
392
|
-
readonly tenantPath: "publish.os/components/mdx/code-block.tsx";
|
|
393
|
-
}, {
|
|
394
|
-
readonly category: "mdx";
|
|
395
|
-
readonly name: "Image";
|
|
396
|
-
readonly status: "available";
|
|
397
|
-
readonly description: "Responsive MDX image renderer.";
|
|
398
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/mdx/components/image";
|
|
399
|
-
readonly tenantPath: "publish.os/components/mdx/image.tsx";
|
|
400
|
-
}, {
|
|
401
|
-
readonly category: "mdx";
|
|
402
|
-
readonly name: "Figure";
|
|
403
|
-
readonly status: "available";
|
|
404
|
-
readonly description: "Figure and caption renderers.";
|
|
405
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/mdx/components/figure";
|
|
406
|
-
readonly tenantPath: "publish.os/components/mdx/figure.tsx";
|
|
407
|
-
}, {
|
|
408
|
-
readonly category: "mdx";
|
|
409
|
-
readonly name: "Video";
|
|
410
|
-
readonly status: "available";
|
|
411
|
-
readonly description: "Responsive MDX video renderer.";
|
|
412
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/components/mdx/components/video";
|
|
413
|
-
readonly tenantPath: "publish.os/components/mdx/video.tsx";
|
|
414
|
-
}, {
|
|
415
|
-
readonly category: "route";
|
|
416
|
-
readonly name: "RootLayout";
|
|
417
|
-
readonly status: "available";
|
|
418
|
-
readonly description: "Builder-owned default root layout wrapper.";
|
|
419
|
-
readonly tenantPath: "publish.os/layout.tsx";
|
|
420
|
-
}, {
|
|
421
|
-
readonly category: "route";
|
|
422
|
-
readonly name: "RootPage";
|
|
423
|
-
readonly status: "available";
|
|
424
|
-
readonly description: "Default home page.";
|
|
425
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/routes/pages/root";
|
|
426
|
-
readonly tenantPath: "publish.os/page.tsx";
|
|
427
|
-
}, {
|
|
428
|
-
readonly category: "route";
|
|
429
|
-
readonly name: "GroupLayout";
|
|
430
|
-
readonly status: "available";
|
|
431
|
-
readonly description: "Default group layout.";
|
|
432
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/routes/layouts/group";
|
|
433
|
-
readonly tenantPath: "publish.os/<group>/layout.tsx";
|
|
434
|
-
}, {
|
|
435
|
-
readonly category: "route";
|
|
436
|
-
readonly name: "GroupPage";
|
|
437
|
-
readonly status: "available";
|
|
438
|
-
readonly description: "Default group index page.";
|
|
439
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/routes/pages/group";
|
|
440
|
-
readonly tenantPath: "publish.os/<group>/page.tsx";
|
|
441
|
-
}, {
|
|
442
|
-
readonly category: "route";
|
|
443
|
-
readonly name: "LeafPage";
|
|
444
|
-
readonly status: "available";
|
|
445
|
-
readonly description: "Default content leaf page.";
|
|
446
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/routes/pages/leaf";
|
|
447
|
-
readonly tenantPath: "publish.os/<group>/leaf.tsx";
|
|
448
|
-
}, {
|
|
449
|
-
readonly category: "route";
|
|
450
|
-
readonly name: "MetadataRoutes";
|
|
451
|
-
readonly status: "available";
|
|
452
|
-
readonly description: "llms.txt, robots.txt, and sitemap.xml route factories.";
|
|
453
|
-
readonly kernelImport: "@publish.os/nextjs/kernel/routes/metadata/*";
|
|
454
|
-
}, {
|
|
455
|
-
readonly category: "css";
|
|
456
|
-
readonly name: "globals.css";
|
|
457
|
-
readonly status: "available";
|
|
458
|
-
readonly description: "Tailwind mappings and app/global CSS layer.";
|
|
459
|
-
readonly tenantPath: "publish.os/globals.css";
|
|
460
|
-
}, {
|
|
461
|
-
readonly category: "css";
|
|
462
|
-
readonly name: "theme.css";
|
|
463
|
-
readonly status: "available";
|
|
464
|
-
readonly description: "Palette, semantic runtime variables, and theme controls.";
|
|
465
|
-
readonly tenantPath: "publish.os/theme.css";
|
|
466
|
-
}];
|
|
467
|
-
};
|
|
468
|
-
|
|
469
|
-
export { type KernelDefaultCategory, type KernelDefaultEntry, type KernelDefaultStatus, type KernelDefaultsRegistry, kernelDefaultsRegistry };
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/kernel/routes/agent/markdown.ts
|
|
21
|
-
var markdown_exports = {};
|
|
22
|
-
__export(markdown_exports, {
|
|
23
|
-
createMarkdownRouteHandlers: () => createMarkdownRouteHandlers,
|
|
24
|
-
findArtifact: () => findArtifact
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(markdown_exports);
|
|
27
|
-
|
|
28
|
-
// src/internal/utils/logger.ts
|
|
29
|
-
var isDev = process.env.NODE_ENV !== "production";
|
|
30
|
-
var isDebugEnabled = process.env.NEXT_PRIVATE_DEBUG_CACHE === "1";
|
|
31
|
-
var log = {
|
|
32
|
-
debug(...args) {
|
|
33
|
-
if (isDev && isDebugEnabled) console.debug("[publish.os:debug]", ...args);
|
|
34
|
-
},
|
|
35
|
-
info(...args) {
|
|
36
|
-
console.log("[publish.os]", ...args);
|
|
37
|
-
},
|
|
38
|
-
warn(...args) {
|
|
39
|
-
console.warn("[publish.os:warn]", ...args);
|
|
40
|
-
},
|
|
41
|
-
error(...args) {
|
|
42
|
-
console.error("[publish.os:error]", ...args);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
// src/kernel/routes/response.ts
|
|
47
|
-
var CACHE_CONTROL = "public, max-age=300, s-maxage=86400, stale-while-revalidate=3600, must-revalidate";
|
|
48
|
-
var CDN_CACHE_CONTROL = "public, max-age=2592000, stale-while-revalidate=31536000";
|
|
49
|
-
var SHORT_CACHE_CONTROL = "public, max-age=60, s-maxage=600, stale-while-revalidate=300, must-revalidate";
|
|
50
|
-
var SHORT_CDN_CACHE_CONTROL = "public, max-age=300, stale-while-revalidate=3600";
|
|
51
|
-
function cacheControl(policy) {
|
|
52
|
-
if (!policy || policy === "default") return CACHE_CONTROL;
|
|
53
|
-
if (policy === "short") return SHORT_CACHE_CONTROL;
|
|
54
|
-
return policy;
|
|
55
|
-
}
|
|
56
|
-
function cdnCacheControl(policy) {
|
|
57
|
-
if (!policy || policy === "default") return CDN_CACHE_CONTROL;
|
|
58
|
-
if (policy === "short") return SHORT_CDN_CACHE_CONTROL;
|
|
59
|
-
return policy;
|
|
60
|
-
}
|
|
61
|
-
function cachedTextHeaders(contentType, options = {}) {
|
|
62
|
-
const headers = new Headers(options.headers);
|
|
63
|
-
headers.set("cache-control", cacheControl(options.cachePolicy));
|
|
64
|
-
headers.set("cdn-cache-control", cdnCacheControl(options.cachePolicy));
|
|
65
|
-
headers.set("vercel-cdn-cache-control", cdnCacheControl(options.cachePolicy));
|
|
66
|
-
headers.set("content-type", contentType);
|
|
67
|
-
headers.set("x-content-type-options", "nosniff");
|
|
68
|
-
if (options.noindex) headers.set("x-robots-tag", "noindex");
|
|
69
|
-
return headers;
|
|
70
|
-
}
|
|
71
|
-
function createCachedTextResponse(options) {
|
|
72
|
-
const status = options.status ?? 200;
|
|
73
|
-
const method = options.method ?? "GET";
|
|
74
|
-
const headers = cachedTextHeaders(options.contentType, options);
|
|
75
|
-
return new Response(method === "HEAD" ? null : options.body, {
|
|
76
|
-
headers,
|
|
77
|
-
status
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// src/kernel/routes/agent/markdown.ts
|
|
82
|
-
var DEFAULT_DISCOVERY_LINKS = {
|
|
83
|
-
home: "/",
|
|
84
|
-
llms: "/llms.txt",
|
|
85
|
-
sitemap: "/sitemap.md"
|
|
86
|
-
};
|
|
87
|
-
function debugMarkdownResponse(details) {
|
|
88
|
-
log.debug("[agent-route]", "md-response", details);
|
|
89
|
-
}
|
|
90
|
-
function normalizeArtifactPath(parts) {
|
|
91
|
-
if (!parts?.length) return "/index.md";
|
|
92
|
-
if (parts.some((part) => part === ".." || part.includes("\0"))) {
|
|
93
|
-
return null;
|
|
94
|
-
}
|
|
95
|
-
return `/${parts.join("/")}`.replace(/\/+/g, "/");
|
|
96
|
-
}
|
|
97
|
-
function findArtifactKey(artifacts, artifactPath) {
|
|
98
|
-
if (artifacts[artifactPath]) return artifactPath;
|
|
99
|
-
const suffixedPath = artifactPath.endsWith(".md") ? artifactPath : `${artifactPath}.md`;
|
|
100
|
-
if (artifacts[suffixedPath]) return suffixedPath;
|
|
101
|
-
return void 0;
|
|
102
|
-
}
|
|
103
|
-
function findArtifact(artifacts, artifactPath) {
|
|
104
|
-
return artifacts[artifactPath] ?? artifacts[artifactPath.endsWith(".md") ? artifactPath : `${artifactPath}.md`];
|
|
105
|
-
}
|
|
106
|
-
function markdownHeaders(artifact) {
|
|
107
|
-
return {
|
|
108
|
-
headers: {
|
|
109
|
-
link: `<${artifact.markdownPath}>; rel="alternate"; type="text/markdown", </llms.txt>; rel="llms-txt"; type="text/plain"`
|
|
110
|
-
},
|
|
111
|
-
contentType: "text/markdown; charset=utf-8"
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
function markdown404Body(discoveryLinks) {
|
|
115
|
-
const links = [
|
|
116
|
-
discoveryLinks.home ? `> Home: ${discoveryLinks.home}` : void 0,
|
|
117
|
-
discoveryLinks.sitemap ? `> Sitemap: ${discoveryLinks.sitemap}` : void 0,
|
|
118
|
-
discoveryLinks.llms ? `> LLMS index: ${discoveryLinks.llms}` : void 0
|
|
119
|
-
].filter((line) => Boolean(line));
|
|
120
|
-
return [
|
|
121
|
-
"# Not found",
|
|
122
|
-
"",
|
|
123
|
-
...links,
|
|
124
|
-
"",
|
|
125
|
-
"The requested Markdown page was not found.",
|
|
126
|
-
""
|
|
127
|
-
].join("\n");
|
|
128
|
-
}
|
|
129
|
-
function notFoundResponse(method, discoveryLinks, artifactPath, reason) {
|
|
130
|
-
debugMarkdownResponse({
|
|
131
|
-
artifactPath,
|
|
132
|
-
method,
|
|
133
|
-
reason,
|
|
134
|
-
status: 404
|
|
135
|
-
});
|
|
136
|
-
return createCachedTextResponse({
|
|
137
|
-
body: markdown404Body(discoveryLinks),
|
|
138
|
-
cachePolicy: "short",
|
|
139
|
-
contentType: "text/markdown; charset=utf-8",
|
|
140
|
-
method,
|
|
141
|
-
noindex: true,
|
|
142
|
-
status: 404
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
async function markdownResponse(artifacts, discoveryLinks, method, context) {
|
|
146
|
-
const params = await Promise.resolve(context.params);
|
|
147
|
-
const artifactPath = normalizeArtifactPath(params?.path);
|
|
148
|
-
if (!artifactPath) {
|
|
149
|
-
return notFoundResponse(method, discoveryLinks, void 0, "invalid-path");
|
|
150
|
-
}
|
|
151
|
-
const artifactKey = findArtifactKey(artifacts.index, artifactPath);
|
|
152
|
-
if (!artifactKey) {
|
|
153
|
-
return notFoundResponse(
|
|
154
|
-
method,
|
|
155
|
-
discoveryLinks,
|
|
156
|
-
artifactPath,
|
|
157
|
-
"missing-index"
|
|
158
|
-
);
|
|
159
|
-
}
|
|
160
|
-
const artifact = await artifacts.loadArtifact(artifactKey);
|
|
161
|
-
if (!artifact) {
|
|
162
|
-
return notFoundResponse(
|
|
163
|
-
method,
|
|
164
|
-
discoveryLinks,
|
|
165
|
-
artifactPath,
|
|
166
|
-
"missing-shard"
|
|
167
|
-
);
|
|
168
|
-
}
|
|
169
|
-
const { contentType, headers } = markdownHeaders(artifact);
|
|
170
|
-
debugMarkdownResponse({
|
|
171
|
-
artifactPath: artifact.markdownPath,
|
|
172
|
-
contentType,
|
|
173
|
-
method,
|
|
174
|
-
status: 200
|
|
175
|
-
});
|
|
176
|
-
return createCachedTextResponse({
|
|
177
|
-
body: artifact.body,
|
|
178
|
-
contentType,
|
|
179
|
-
headers,
|
|
180
|
-
method,
|
|
181
|
-
status: 200
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
function createMarkdownRouteHandlers(artifacts, options = {}) {
|
|
185
|
-
const discoveryLinks = {
|
|
186
|
-
...DEFAULT_DISCOVERY_LINKS,
|
|
187
|
-
...options.discoveryLinks
|
|
188
|
-
};
|
|
189
|
-
const generateStaticParams = () => Object.keys(artifacts.index).map((artifactPath) => ({
|
|
190
|
-
path: artifactPath.replace(/^\//, "").replace(/\.md$/, "").split("/")
|
|
191
|
-
}));
|
|
192
|
-
return {
|
|
193
|
-
GET: (_request, context) => markdownResponse(artifacts, discoveryLinks, "GET", context),
|
|
194
|
-
HEAD: (_request, context) => markdownResponse(artifacts, discoveryLinks, "HEAD", context),
|
|
195
|
-
generateStaticParams
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
199
|
-
0 && (module.exports = {
|
|
200
|
-
createMarkdownRouteHandlers,
|
|
201
|
-
findArtifact
|
|
202
|
-
});
|