@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
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-NNBJZPFM.js";
|
|
4
4
|
import {
|
|
5
5
|
validatePublishOsSource
|
|
6
|
-
} from "./chunk-
|
|
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
|
|
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)
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
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
|
-
|
|
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"})
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
|
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">):
|
|
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():
|
|
58
|
+
declare function AgentActionsFeedback(): react.JSX.Element;
|
|
59
59
|
declare function AgentActionsGroup({ title, children, }: {
|
|
60
60
|
title?: string;
|
|
61
61
|
children: ReactNode;
|
|
62
|
-
}):
|
|
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
|
-
}):
|
|
69
|
-
declare function AgentActionsRoot(props: AgentActionsProps):
|
|
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" :
|
|
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
|
|
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
|
-
}):
|
|
6
|
+
}): react.JSX.Element;
|
|
7
7
|
declare function TocMobile({ children }: {
|
|
8
8
|
children?: ReactNode;
|
|
9
|
-
}):
|
|
9
|
+
}): react.JSX.Element;
|
|
10
10
|
declare function TocMobileHeader({ children }: {
|
|
11
11
|
children?: ReactNode;
|
|
12
|
-
}):
|
|
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
|
-
}):
|
|
18
|
-
declare function TocTitle({ children, className, ...props }: React.ComponentPropsWithoutRef<"span">):
|
|
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):
|
|
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
|
|
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-
|
|
4
|
+
} from "./chunk-NHSLTARU.js";
|
|
5
5
|
import "./chunk-NNBJZPFM.js";
|
|
6
|
-
import "./chunk-
|
|
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 !==
|
|
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:
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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?.(),
|
|
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-
|
|
3
|
+
} from "./chunk-3T4HVDSC.js";
|
|
4
4
|
import "./chunk-6D2E6UMD.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-NHSLTARU.js";
|
|
6
6
|
import "./chunk-NNBJZPFM.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-DX7PXFCM.js";
|
|
8
8
|
import "./chunk-EFO6AWXN.js";
|
|
9
9
|
import "./chunk-5KAD7W53.js";
|
|
10
10
|
import "./chunk-WL75GQ5M.js";
|