@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.
Files changed (153) hide show
  1. package/compiler-assets/nextjs/defaults/group/index.tsx +16 -11
  2. package/compiler-assets/nextjs/defaults/group/layout.tsx +6 -2
  3. package/compiler-assets/nextjs/defaults/group/page.tsx +7 -6
  4. package/compiler-assets/nextjs/defaults/project/next.config.mjs +2 -1
  5. package/compiler-assets/nextjs/defaults/root/index.tsx +16 -11
  6. package/compiler-assets/nextjs/defaults/root/layout.tsx +7 -3
  7. package/compiler-assets/nextjs/shims/agent-user-agents.ts +65 -0
  8. package/compiler-assets/nextjs/shims/document.tsx +9 -1
  9. package/compiler-assets/nextjs/shims/generated-leaf-page.tsx +3 -0
  10. package/compiler-assets/nextjs/shims/proxy.ts +156 -54
  11. package/dist/{build-operation-5QMLXF7N.js → build-operation-CJDUL4OW.js} +5 -5
  12. package/dist/{chunk-GBPLER5H.js → chunk-3T4HVDSC.js} +2 -2
  13. package/dist/{chunk-UYGCOWRF.js → chunk-DX7PXFCM.js} +860 -50
  14. package/dist/{chunk-F3AGNDF4.js → chunk-DZ3VWEV5.js} +860 -575
  15. package/dist/{chunk-OXOFRXEI.js → chunk-NHSLTARU.js} +1284 -1164
  16. package/dist/{chunk-ORIUWJBQ.js → chunk-SBMDONTV.js} +3 -2
  17. package/dist/compiler.js +42 -23
  18. package/dist/components/blocks/agent-actions.d.ts +7 -7
  19. package/dist/components/blocks/agent-actions.js +1 -32
  20. package/dist/components/blocks/toc.d.ts +7 -7
  21. package/dist/components/ui/button.d.ts +1 -2
  22. package/dist/{compose-CVBJRAF6.js → compose-44GJSMXD.js} +2 -2
  23. package/dist/config/createNextConfig.js +2 -0
  24. package/dist/{dev-operation-OSHHWRWK.js → dev-operation-WNECBHZ5.js} +17 -7
  25. package/dist/{ide-support-CU6Z5PVR.js → ide-support-TG74L4FF.js} +3 -3
  26. package/dist/index.d.ts +143 -126
  27. package/dist/index.js +25 -0
  28. package/dist/kernel/components/blocks/AgentActions.d.ts +7 -7
  29. package/dist/kernel/components/blocks/AgentActions.js +1 -32
  30. package/dist/kernel/components/blocks/agent-actions.d.ts +1 -2
  31. package/dist/kernel/components/blocks/agent-actions.js +1 -32
  32. package/dist/kernel/components/blocks/animated-icon-swap.d.ts +2 -2
  33. package/dist/kernel/components/blocks/color-palette.d.ts +2 -2
  34. package/dist/kernel/components/blocks/logo-block.d.ts +2 -2
  35. package/dist/kernel/components/blocks/nav-breadcrumb.d.ts +6 -5
  36. package/dist/kernel/components/blocks/nav-breadcrumb.js +19 -13
  37. package/dist/kernel/components/blocks/navbar.d.ts +5 -4
  38. package/dist/kernel/components/blocks/navbar.js +62 -42
  39. package/dist/kernel/components/blocks/navigation-progress.d.ts +2 -2
  40. package/dist/kernel/components/blocks/next-prev.d.ts +4 -4
  41. package/dist/kernel/components/blocks/next-prev.js +29 -6
  42. package/dist/kernel/components/blocks/page-list.d.ts +4 -4
  43. package/dist/kernel/components/blocks/page-list.js +30 -7
  44. package/dist/kernel/components/blocks/search.d.ts +9 -15
  45. package/dist/kernel/components/blocks/sidebar-node.d.ts +3 -5
  46. package/dist/kernel/components/blocks/sidebar-node.js +12 -2
  47. package/dist/kernel/components/blocks/sidebar.d.ts +6 -7
  48. package/dist/kernel/components/blocks/sidebar.js +132 -26
  49. package/dist/kernel/components/blocks/theme-toggle.d.ts +3 -4
  50. package/dist/kernel/components/blocks/toc-client.d.ts +7 -7
  51. package/dist/kernel/components/blocks/toc.d.ts +3 -3
  52. package/dist/kernel/components/mdx/components/blockquote.d.ts +2 -2
  53. package/dist/kernel/components/mdx/components/callout.d.ts +3 -3
  54. package/dist/kernel/components/mdx/components/code-block.d.ts +2 -2
  55. package/dist/kernel/components/mdx/components/copy-code-button.d.ts +2 -2
  56. package/dist/kernel/components/mdx/components/figure-caption.d.ts +2 -2
  57. package/dist/kernel/components/mdx/components/figure.d.ts +3 -3
  58. package/dist/kernel/components/mdx/components/footnotes.d.ts +2 -2
  59. package/dist/kernel/components/mdx/components/heading-copy-link.d.ts +2 -2
  60. package/dist/kernel/components/mdx/components/heading.d.ts +2 -2
  61. package/dist/kernel/components/mdx/components/hr.d.ts +4 -4
  62. package/dist/kernel/components/mdx/components/image-zoom.d.ts +3 -3
  63. package/dist/kernel/components/mdx/components/image-zoom.js +3 -2
  64. package/dist/kernel/components/mdx/components/image.d.ts +2 -2
  65. package/dist/kernel/components/mdx/components/image.js +1 -1
  66. package/dist/kernel/components/mdx/components/inline-code.d.ts +2 -2
  67. package/dist/kernel/components/mdx/components/kbd.d.ts +3 -3
  68. package/dist/kernel/components/mdx/components/link.d.ts +3 -3
  69. package/dist/kernel/components/mdx/components/paragraph.d.ts +2 -2
  70. package/dist/kernel/components/mdx/components/strikethrough.d.ts +2 -2
  71. package/dist/kernel/components/mdx/components/table.d.ts +7 -7
  72. package/dist/kernel/components/mdx/components/task-list.d.ts +3 -3
  73. package/dist/kernel/components/mdx/components/video-player.d.ts +2 -2
  74. package/dist/kernel/components/mdx/components/video.d.ts +2 -3
  75. package/dist/kernel/components/mdx/error-boundary.d.ts +2 -3
  76. package/dist/kernel/components/mdx/error-fallback.d.ts +2 -2
  77. package/dist/kernel/components/mdx/mdx.d.ts +42 -11
  78. package/dist/kernel/components/mdx/mdx.js +1 -1
  79. package/dist/kernel/components/next-image.d.ts +3 -3
  80. package/dist/kernel/components/ui/accordion.d.ts +7 -7
  81. package/dist/kernel/components/ui/breadcrumb-trail.d.ts +2 -3
  82. package/dist/kernel/components/ui/breadcrumb.d.ts +13 -13
  83. package/dist/kernel/components/ui/button-group.d.ts +5 -5
  84. package/dist/kernel/components/ui/button.d.ts +3 -3
  85. package/dist/kernel/components/ui/card.d.ts +7 -7
  86. package/dist/kernel/components/ui/dialog.d.ts +10 -10
  87. package/dist/kernel/components/ui/drawer.d.ts +12 -12
  88. package/dist/kernel/components/ui/kbd.d.ts +3 -3
  89. package/dist/kernel/components/ui/link.d.ts +3 -3
  90. package/dist/kernel/components/ui/menu.d.ts +22 -22
  91. package/dist/kernel/components/ui/mod-key.d.ts +2 -3
  92. package/dist/kernel/components/ui/navigation-menu.d.ts +15 -15
  93. package/dist/kernel/components/ui/popover.d.ts +11 -11
  94. package/dist/kernel/components/ui/progress.d.ts +7 -7
  95. package/dist/kernel/components/ui/scroll-area.d.ts +1 -2
  96. package/dist/kernel/components/ui/select.d.ts +16 -16
  97. package/dist/kernel/components/ui/separator.d.ts +3 -3
  98. package/dist/kernel/components/ui/table.d.ts +7 -7
  99. package/dist/kernel/components/ui/tabs.d.ts +12 -12
  100. package/dist/kernel/components/ui/tag.d.ts +3 -3
  101. package/dist/kernel/components/ui/text.d.ts +4 -4
  102. package/dist/kernel/components/ui/toast.d.ts +11 -11
  103. package/dist/kernel/components/ui/tooltip.d.ts +9 -9
  104. package/dist/kernel/defaults.registry.d.ts +2 -2
  105. package/dist/kernel/defaults.registry.js +2 -2
  106. package/dist/kernel/routes/agent/markdown.d.ts +4 -0
  107. package/dist/kernel/routes/agent/markdown.js +11 -7
  108. package/dist/kernel/routes/layouts/group.d.ts +1 -1
  109. package/dist/kernel/routes/metadata/feed.d.ts +1 -2
  110. package/dist/kernel/routes/metadata/feed.js +34 -29
  111. package/dist/kernel/routes/metadata/llms.d.ts +3 -31
  112. package/dist/kernel/routes/metadata/llms.js +2 -200
  113. package/dist/kernel/routes/metadata/robots.d.ts +5 -3
  114. package/dist/kernel/routes/metadata/robots.js +4 -25
  115. package/dist/kernel/routes/metadata/sitemap.d.ts +15 -1
  116. package/dist/kernel/routes/metadata/sitemap.js +200 -112
  117. package/dist/kernel/routes/not-found.js +1 -1
  118. package/dist/kernel/routes/pages/group.d.ts +3 -3
  119. package/dist/kernel/routes/pages/group.js +10 -4
  120. package/dist/kernel/routes/pages/leaf.d.ts +9 -4
  121. package/dist/kernel/routes/pages/leaf.js +16 -8
  122. package/dist/kernel/routes/pages/root.d.ts +3 -3
  123. package/dist/kernel/routes/pages/root.js +20 -5
  124. package/dist/keyboard-shortcuts.d.ts +2 -2
  125. package/dist/manifest-types-CcVPH_jh.d.ts +83 -0
  126. package/dist/resolvers/manifest-resolver.d.ts +2 -2
  127. package/dist/resolvers/manifest-resolver.js +65 -35
  128. package/dist/search.d.ts +2 -9
  129. package/dist/search.js +2 -7
  130. package/dist/sidebar-types-CMrMM0Nj.d.ts +105 -0
  131. package/dist/theme-scope.d.ts +2 -2
  132. package/dist/types-BbqmOzLC.d.ts +168 -0
  133. package/dist/types-TjH1ek0X.d.ts +22 -0
  134. package/dist/types.d.ts +116 -91
  135. package/dist/{validate-local-source-SV44DBQT.js → validate-local-source-EN2GW4FR.js} +3 -3
  136. package/dist/{validate-publish-os-source-NZJF3TB2.js → validate-publish-os-source-OEWQDB7B.js} +2 -2
  137. package/init/seed/minimal/publish.os/blog/index.tsx +25 -22
  138. package/init/seed/minimal/publish.os/blog/page.tsx +31 -16
  139. package/init/seed/minimal/publish.os/components/blog/copy-link.tsx +1 -1
  140. package/init/seed/minimal/publish.os/components/blog/frontmatter.ts +41 -0
  141. package/init/seed/minimal/publish.os/publish.os.config.json +13 -2
  142. package/init/seed/minimal/seed.json +1 -0
  143. package/init/seed/scratch/publish.os/publish.os.config.json +1 -1
  144. package/package.json +4 -4
  145. package/release/app/phosphor/package.json +1 -1
  146. package/release/app/phosphor/pnpm-lock.yaml.template +53 -127
  147. package/release/compiler/pnpm-lock.yaml.template +49 -123
  148. package/release/release.json +4 -4
  149. package/dist/sidebar-types-DKpR27II.d.ts +0 -25
  150. package/dist/types-CJWRG05y.d.ts +0 -76
  151. package/dist/types-CUtrppxt.d.ts +0 -69
  152. package/dist/types-J2w_puPF.d.ts +0 -128
  153. package/dist/{button-BdCScEKi.d.ts → button-D6Xp2HBm.d.ts} +1 -1
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-NNBJZPFM.js";
4
4
  import {
5
5
  validatePublishOsSource
6
- } from "./chunk-F3AGNDF4.js";
6
+ } from "./chunk-DZ3VWEV5.js";
7
7
  import {
8
8
  readInstalledFramework
9
9
  } from "./chunk-5J3YUNRY.js";
@@ -20,7 +20,8 @@ async function validateLocalSource({
20
20
  options.signal?.throwIfAborted(), options.onEvent?.({ type: "progress", message: "Validating source" });
21
21
  let validation = await validatePublishOsSource({
22
22
  publishOsDir: sourceDir,
23
- sourceIdentity: { sourceRoot }
23
+ sourceIdentity: { sourceRoot },
24
+ includeDrafts: options.request.operation === "dev"
24
25
  });
25
26
  if (options.signal?.throwIfAborted(), options.onEvent?.({
26
27
  type: "diagnostics",
package/dist/compiler.js CHANGED
@@ -29,7 +29,7 @@ function serveCompilerIpc(options) {
29
29
  finished = !0, dispose();
30
30
  let terminal = protocolFailure ?? result;
31
31
  process.exitCode = disconnected || terminal.status === "failure" ? 1 : terminal.status === "cancelled" ? cancellationExitCode : 0, !(!process.connected || !process.send) && process.send(terminal, (error) => {
32
- error && (process.exitCode = 1), process.connected && process.disconnect();
32
+ error && (process.exitCode = 1), process.connected && process.disconnect?.();
33
33
  });
34
34
  }, cancel = (reason, exitCode = 130) => {
35
35
  if (!(finished || controller.signal.aborted)) {
@@ -134,33 +134,51 @@ function boundedDiagnostic(diagnostic) {
134
134
  };
135
135
  }
136
136
  function createDiagnosticBudget(onEvent) {
137
- let emitted = 0, omitted = 0, omittedErrors = 0, pending, finished = !1, send = (diagnostics) => {
137
+ let total = 0, errors = 0, retained = [], finished = !1, priority = (diagnostic) => diagnostic.severity === "error" ? 2 : diagnostic.code === "CONTENT_STATUS_INVALID" ? 1 : 0, send = (diagnostics) => {
138
138
  diagnostics.length !== 0 && onEvent?.({ type: "diagnostics", diagnostics: { diagnostics } });
139
139
  };
140
140
  return {
141
141
  emit(event) {
142
- if (finished) return;
143
- if (event.type !== "diagnostics") {
144
- onEvent?.(event);
145
- return;
146
- }
147
- if (event.diagnostics.diagnostics.length === 0) {
148
- onEvent?.(event);
149
- return;
142
+ if (!finished) {
143
+ if (event.type !== "diagnostics") {
144
+ onEvent?.(event);
145
+ return;
146
+ }
147
+ if (event.diagnostics.diagnostics.length === 0) {
148
+ onEvent?.(event);
149
+ return;
150
+ }
151
+ for (let diagnostic of event.diagnostics.diagnostics) {
152
+ total += 1, diagnostic.severity === "error" && (errors += 1);
153
+ let item = boundedDiagnostic(diagnostic);
154
+ if (retained.length < 100)
155
+ retained.push(item);
156
+ else {
157
+ let lowest = retained.findIndex(
158
+ (existing) => priority(existing) < priority(item)
159
+ );
160
+ lowest !== -1 && retained.splice(lowest, 1, item);
161
+ }
162
+ }
150
163
  }
151
- let retained = [];
152
- for (let diagnostic of event.diagnostics.diagnostics)
153
- emitted < 99 ? (retained.push(boundedDiagnostic(diagnostic)), emitted += 1) : (omitted += 1, diagnostic.severity === "error" && (omittedErrors += 1), omitted === 1 && (pending = boundedDiagnostic(diagnostic)));
154
- send(retained);
155
164
  },
156
165
  finish() {
157
- finished || (finished = !0, omitted === 1 && pending && send([pending]), omitted > 1 && send([
166
+ if (finished) return;
167
+ finished = !0, retained.sort((a, b) => priority(b) - priority(a));
168
+ let selected = retained.slice(
169
+ 0,
170
+ total > 100 ? 99 : 100
171
+ );
172
+ send(selected);
173
+ let omitted = total - selected.length, omittedErrors = errors - selected.filter((item) => item.severity === "error").length;
174
+ omitted > 0 && send([
158
175
  {
159
176
  code: "FRAMEWORK_DIAGNOSTICS_TRUNCATED",
160
177
  severity: omittedErrors > 0 ? "error" : "warning",
161
- message: `${omitted} additional diagnostics were omitted (${omittedErrors} ${omittedErrors === 1 ? "error" : "errors"}). Correct the reported files and repeat the command.`
178
+ message: `${omitted} additional diagnostics were omitted (${omittedErrors} ${omittedErrors === 1 ? "error" : "errors"}).`,
179
+ correction: "Run the build locally to see all diagnostics."
162
180
  }
163
- ]));
181
+ ]);
164
182
  }
165
183
  };
166
184
  }
@@ -230,17 +248,18 @@ async function runFrameworkOperation(options) {
230
248
  });
231
249
  try {
232
250
  if (options.signal?.throwIfAborted(), options.request.operation === "build") {
233
- let { runLocalBuild } = await import("./build-operation-5QMLXF7N.js");
251
+ let { runLocalBuild } = await import("./build-operation-CJDUL4OW.js");
234
252
  return await runLocalBuild(options);
235
253
  }
236
254
  if (options.request.operation === "dev") {
237
- let { runDevelopment } = await import("./dev-operation-OSHHWRWK.js");
255
+ let { runDevelopment } = await import("./dev-operation-WNECBHZ5.js");
238
256
  return await runDevelopment(options);
239
257
  }
240
258
  options.onEvent?.({ message: "Validating source", type: "progress" });
241
- let { validatePublishOsSource } = await import("./validate-publish-os-source-NZJF3TB2.js"), validation = await validatePublishOsSource({
259
+ let { validatePublishOsSource } = await import("./validate-publish-os-source-OEWQDB7B.js"), validation = await validatePublishOsSource({
242
260
  publishOsDir: options.request.paths.source,
243
- sourceIdentity: options.request.paths.originalSource ? { sourceRoot: options.request.paths.originalSource } : void 0
261
+ sourceIdentity: options.request.paths.originalSource ? { sourceRoot: options.request.paths.originalSource } : void 0,
262
+ includeDrafts: options.request.operation === "compose" && !!options.request.context?.previewUrl && !options.request.context?.hostedSite
244
263
  });
245
264
  if (options.signal?.throwIfAborted(), options.onEvent?.({
246
265
  type: "diagnostics",
@@ -261,7 +280,7 @@ async function runFrameworkOperation(options) {
261
280
  framework,
262
281
  runtime: validation.source.config.runtime
263
282
  }), options.request.operation === "validate" && options.request.context?.ide) {
264
- let source = validation.source, { prepareIdeSupport } = await import("./ide-support-CU6Z5PVR.js");
283
+ let source = validation.source, { prepareIdeSupport } = await import("./ide-support-TG74L4FF.js");
265
284
  await prepareIdeSupport({
266
285
  frameworkOptions: options,
267
286
  publishOsDir: options.request.paths.source,
@@ -284,7 +303,7 @@ async function runFrameworkOperation(options) {
284
303
  message: "The caller did not authorize composition."
285
304
  });
286
305
  options.signal?.throwIfAborted();
287
- let { composeFrameworkSource } = await import("./compose-CVBJRAF6.js");
306
+ let { composeFrameworkSource } = await import("./compose-44GJSMXD.js");
288
307
  await composeFrameworkSource({
289
308
  request: options.request,
290
309
  source: validation.source,
@@ -1,6 +1,6 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ButtonVariantProps } from '../../kernel/components/ui/button.js';
1
+ import * as react from 'react';
3
2
  import { ReactNode, ComponentPropsWithoutRef } from 'react';
3
+ import { ButtonVariantProps } from '../../kernel/components/ui/button.js';
4
4
  import 'class-variance-authority/types';
5
5
  import 'class-variance-authority';
6
6
 
@@ -50,23 +50,23 @@ type AgentActionsProps = ComponentPropsWithoutRef<"div"> & {
50
50
  markdownLinkLabel?: string;
51
51
  showMarkdownLink?: boolean;
52
52
  };
53
- declare function AgentActionsToolbar({ className, ...props }: ComponentPropsWithoutRef<"div">): react_jsx_runtime.JSX.Element;
53
+ declare function AgentActionsToolbar({ className, ...props }: ComponentPropsWithoutRef<"div">): react.JSX.Element;
54
54
  declare function AgentActionsMarkdownLink(): ReactNode;
55
55
  declare function AgentActionsPrimaryAction({ action }: {
56
56
  action?: AgentActionConfig;
57
57
  }): ReactNode;
58
- declare function AgentActionsFeedback(): react_jsx_runtime.JSX.Element;
58
+ declare function AgentActionsFeedback(): react.JSX.Element;
59
59
  declare function AgentActionsGroup({ title, children, }: {
60
60
  title?: string;
61
61
  children: ReactNode;
62
- }): react_jsx_runtime.JSX.Element;
62
+ }): react.JSX.Element;
63
63
  declare function AgentActionsItem({ action }: {
64
64
  action: AgentActionConfig;
65
65
  }): ReactNode;
66
66
  declare function AgentActionsMenu({ children }: {
67
67
  children?: ReactNode;
68
- }): react_jsx_runtime.JSX.Element;
69
- declare function AgentActionsRoot(props: AgentActionsProps): react_jsx_runtime.JSX.Element;
68
+ }): react.JSX.Element;
69
+ declare function AgentActionsRoot(props: AgentActionsProps): react.JSX.Element;
70
70
  declare const AgentActions: typeof AgentActionsRoot & {
71
71
  Feedback: typeof AgentActionsFeedback;
72
72
  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" : normalized.endsWith(".md") ? normalized : `${normalized}.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,21 +1,21 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
3
 
4
4
  declare function TocDesktop({ children }: {
5
5
  children?: ReactNode;
6
- }): react_jsx_runtime.JSX.Element;
6
+ }): react.JSX.Element;
7
7
  declare function TocMobile({ children }: {
8
8
  children?: ReactNode;
9
- }): react_jsx_runtime.JSX.Element;
9
+ }): react.JSX.Element;
10
10
  declare function TocMobileHeader({ children }: {
11
11
  children?: ReactNode;
12
- }): react_jsx_runtime.JSX.Element;
12
+ }): react.JSX.Element;
13
13
  declare function TocLinksSlot({ className, listClassName, viewport, }: {
14
14
  className?: string;
15
15
  listClassName?: string;
16
16
  viewport?: "desktop" | "mobile";
17
- }): react_jsx_runtime.JSX.Element;
18
- declare function TocTitle({ children, className, ...props }: React.ComponentPropsWithoutRef<"span">): react_jsx_runtime.JSX.Element;
17
+ }): react.JSX.Element;
18
+ declare function TocTitle({ children, className, ...props }: React.ComponentPropsWithoutRef<"span">): react.JSX.Element;
19
19
 
20
20
  type TocProps = {
21
21
  children?: ReactNode;
@@ -30,7 +30,7 @@ type TocProps = {
30
30
  readingOffset?: number;
31
31
  title?: string;
32
32
  };
33
- declare function TocRoot({ className, content, desktopClassName, desktopListClassName, levels, listClassName, mobileClassName, mobileQuery, readingOffset, title, children, }: TocProps): react_jsx_runtime.JSX.Element | null;
33
+ declare function TocRoot({ className, content, desktopClassName, desktopListClassName, levels, listClassName, mobileClassName, mobileQuery, readingOffset, title, children, }: TocProps): react.JSX.Element | null;
34
34
  declare const Toc: typeof TocRoot & {
35
35
  Desktop: typeof TocDesktop;
36
36
  Links: typeof TocLinksSlot;
@@ -1,5 +1,4 @@
1
- import 'react/jsx-runtime';
1
+ import 'react';
2
2
  import 'class-variance-authority/types';
3
3
  import 'class-variance-authority';
4
- import 'react';
5
4
  export { Button, ButtonProps, ButtonVariantProps, buttonVariantBase, buttonVariantConfig, buttonVariants } from '../../kernel/components/ui/button.js';
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  composeFrameworkSource,
3
3
  createIdeSourceArtifacts
4
- } from "./chunk-OXOFRXEI.js";
4
+ } from "./chunk-NHSLTARU.js";
5
5
  import "./chunk-NNBJZPFM.js";
6
- import "./chunk-UYGCOWRF.js";
6
+ import "./chunk-DX7PXFCM.js";
7
7
  import "./chunk-EFO6AWXN.js";
8
8
  import "./chunk-5KAD7W53.js";
9
9
  import "./chunk-WL75GQ5M.js";
@@ -6,6 +6,7 @@ function createNextConfig({
6
6
  outputDir
7
7
  }) {
8
8
  return {
9
+ env: { PUBLISHOS_SITE_BUILD_TIME: (/* @__PURE__ */ new Date()).toISOString() },
9
10
  distDir: outputDir,
10
11
  // Internal rewrites must retain the server's original loopback hostname.
11
12
  skipProxyUrlNormalize: !0,
@@ -33,6 +34,7 @@ function createNextConfig({
33
34
  },
34
35
  transpilePackages: ["@publish.os/nextjs"],
35
36
  cacheComponents: !0,
37
+ partialPrefetching: !0,
36
38
  cacheLife: {
37
39
  // Published content changes with each build, which gets new use-cache keys.
38
40
  page: {
@@ -482,7 +482,7 @@ async function reusablePreview(options) {
482
482
  let cache = JSON.parse(
483
483
  await readFile3(join3(options.outputDir, CACHE_FILE), "utf8")
484
484
  );
485
- if (cache.version !== 5 || cache.inputKind !== (options.inputKind ?? "customer") || cache.runtimeGraph !== (options.inputKind === "checkout" ? "checkout-source" : void 0) || cache.runtime !== options.runtime || cache.sourcePath !== options.sourcePath || typeof cache.integrity != "string")
485
+ if (cache.version !== 8 || cache.inputKind !== (options.inputKind ?? "customer") || cache.runtimeGraph !== (options.inputKind === "checkout" ? "checkout-source" : void 0) || cache.runtime !== options.runtime || cache.sourcePath !== options.sourcePath || typeof cache.integrity != "string")
486
486
  return;
487
487
  let current = cache.revision === options.revision && cache.frameworkIdentity === options.frameworkIdentity && cache.compilerRevision === options.compilerRevision && cache.checkoutDependencyRevision === options.checkoutDependencyRevision && cache.url === options.url;
488
488
  return !current && options.inputKind !== "checkout" || options.inputKind === "checkout" && (!options.checkoutRoot || await realpath(
@@ -498,7 +498,7 @@ async function reusablePreview(options) {
498
498
  async function recordPreviewCache(options) {
499
499
  if (!options.revision) return;
500
500
  let cache = {
501
- version: 5,
501
+ version: 8,
502
502
  inputKind: options.inputKind ?? "customer",
503
503
  ...options.inputKind === "checkout" ? { runtimeGraph: "checkout-source" } : {},
504
504
  revision: options.revision,
@@ -767,7 +767,7 @@ async function runDevelopment(options) {
767
767
  checkoutRoot: options.request.context?.framework?.kind === "checkout" ? options.request.context.framework.packageRoot : void 0
768
768
  });
769
769
  checkoutDependenciesDirty = reuse?.dependenciesChanged ?? !1;
770
- let validateSource = async () => (await import("./validate-local-source-SV44DBQT.js")).validateLocalSource({
770
+ let validateSource = async () => (await import("./validate-local-source-EN2GW4FR.js")).validateLocalSource({
771
771
  options: localOptions,
772
772
  sourceDir: lifetime.sourceDir,
773
773
  sourceRoot: lifetime.sourceRoot
@@ -783,7 +783,7 @@ async function runDevelopment(options) {
783
783
  });
784
784
  };
785
785
  if (options.request.context?.ide) {
786
- let { prepareIdeSupport } = await import("./ide-support-CU6Z5PVR.js"), ideSource = prepared?.source ?? (await validateSource()).source;
786
+ let { prepareIdeSupport } = await import("./ide-support-TG74L4FF.js"), ideSource = prepared?.source ?? (await validateSource()).source;
787
787
  await prepareIdeSupport({
788
788
  frameworkOptions: localOptions,
789
789
  publishOsDir: lifetime.sourceRoot,
@@ -792,7 +792,7 @@ async function runDevelopment(options) {
792
792
  });
793
793
  }
794
794
  let compose = async (outputDir, preparedSource) => {
795
- let { composeFrameworkSource } = await import("./compose-CVBJRAF6.js");
795
+ let { composeFrameworkSource } = await import("./compose-44GJSMXD.js");
796
796
  await composeFrameworkSource({
797
797
  request: {
798
798
  ...options.request,
@@ -930,7 +930,7 @@ async function runDevelopment(options) {
930
930
  );
931
931
  let revisionBefore = await sourceWatch.revision(), compilerRevisionBefore = await checkoutWatch?.revision(), dependencyRevisionBefore = await checkoutWatch?.dependencyRevision(), inputsCurrent = async () => revisionBefore !== void 0 && revisionBefore === await sourceWatch.revision() && (!checkoutWatch || compilerRevisionBefore !== void 0 && compilerRevisionBefore === await checkoutWatch.revision());
932
932
  await assertSelection();
933
- let validation = checkoutWatch ? void 0 : await (await import("./validate-local-source-SV44DBQT.js")).validateLocalSource({
933
+ let validation = checkoutWatch ? void 0 : await (await import("./validate-local-source-EN2GW4FR.js")).validateLocalSource({
934
934
  options: localOptions,
935
935
  sourceDir: lifetime.sourceDir,
936
936
  sourceRoot: lifetime.sourceRoot
@@ -938,7 +938,17 @@ async function runDevelopment(options) {
938
938
  await assertSelection(), await assertOutput(), await assertGeneratedOutput({ outputDir: lifetime.outputDir, scope });
939
939
  let temporary = await mkdtemp2(join5(lifetime.outputDir, ".refresh-")), identity = await assertLocalDirectory(temporary), retain = !1, recordGeneratedOutput, primaryFailure, cleanup = async () => {
940
940
  try {
941
- await assertOutput(), await assertLocalDirectory(temporary, identity), await recordGeneratedOutput?.(), await rm3(temporary, { recursive: !0, force: !0 });
941
+ await assertOutput(), await assertLocalDirectory(temporary, identity), await recordGeneratedOutput?.(), lifetime.signal.aborted && recordGeneratedOutput && inputKind === "checkout" && await recordPreviewCache({
942
+ outputDir: lifetime.outputDir,
943
+ revision: "interrupted",
944
+ runtime: selection.runtime ?? "",
945
+ frameworkIdentity,
946
+ compilerRevision: compilerRevisionBefore,
947
+ checkoutDependencyRevision: dependencyRevisionBefore,
948
+ inputKind,
949
+ url,
950
+ sourcePath: options.request.context?.sourcePath ?? "publish.os"
951
+ }), await rm3(temporary, { recursive: !0, force: !0 });
942
952
  } catch (error) {
943
953
  if (!primaryFailure) throw error;
944
954
  primaryFailure.error instanceof Error && (primaryFailure.error.cause = {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  prepareIdeSupport
3
- } from "./chunk-GBPLER5H.js";
3
+ } from "./chunk-3T4HVDSC.js";
4
4
  import "./chunk-6D2E6UMD.js";
5
- import "./chunk-OXOFRXEI.js";
5
+ import "./chunk-NHSLTARU.js";
6
6
  import "./chunk-NNBJZPFM.js";
7
- import "./chunk-UYGCOWRF.js";
7
+ import "./chunk-DX7PXFCM.js";
8
8
  import "./chunk-EFO6AWXN.js";
9
9
  import "./chunk-5KAD7W53.js";
10
10
  import "./chunk-WL75GQ5M.js";