@publish.os/nextjs 0.0.1-alpha.81 → 0.0.1-alpha.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiler-assets/nextjs/defaults/app/globals.css +1 -0
- package/compiler-assets/nextjs/defaults/group/index.tsx +50 -0
- package/compiler-assets/nextjs/defaults/group/layout.tsx +8 -8
- package/compiler-assets/nextjs/defaults/group/page.tsx +44 -43
- package/compiler-assets/nextjs/defaults/project/next.config.mjs +33 -13
- package/compiler-assets/nextjs/defaults/project/tsconfig.json.template +10 -3
- package/compiler-assets/nextjs/defaults/root/css/animation.css +131 -0
- package/compiler-assets/nextjs/defaults/root/css/components/code-block.css +18 -0
- package/compiler-assets/nextjs/defaults/root/css/components/dialog.css +4 -1
- package/compiler-assets/nextjs/defaults/root/css/components/menu.css +1 -1
- package/compiler-assets/nextjs/defaults/root/css/components/navigation-menu.css +1 -1
- package/compiler-assets/nextjs/defaults/root/css/components/popover.css +1 -1
- package/compiler-assets/nextjs/defaults/root/css/components/select.css +1 -1
- package/compiler-assets/nextjs/defaults/root/css/components/tooltip.css +1 -1
- package/compiler-assets/nextjs/defaults/root/css/shadow.css +6 -25
- package/compiler-assets/nextjs/defaults/root/css/typography.css +51 -68
- package/compiler-assets/nextjs/defaults/root/globals.css +25 -0
- package/compiler-assets/nextjs/defaults/root/{page.tsx → index.tsx} +6 -2
- package/compiler-assets/nextjs/defaults/root/layout.tsx +7 -1
- package/compiler-assets/nextjs/defaults/root/theme.css +22 -22
- package/compiler-assets/nextjs/shims/document.tsx +38 -0
- package/compiler-assets/nextjs/shims/generated-group-page.tsx +19 -2
- package/compiler-assets/nextjs/shims/generated-leaf-page.tsx +18 -2
- package/compiler-assets/nextjs/shims/global-layout.tsx +19 -85
- package/compiler-assets/nextjs/shims/global-not-found.tsx +69 -0
- package/compiler-assets/nextjs/shims/markdown-route.ts +2 -0
- package/compiler-assets/nextjs/shims/metadata-icons.tsx +39 -0
- package/compiler-assets/nextjs/shims/not-found-content.tsx +53 -0
- package/compiler-assets/nextjs/shims/not-found-navigation.tsx +60 -0
- package/compiler-assets/nextjs/shims/proxy.ts +143 -65
- package/compiler-assets/nextjs/shims/publish-os-theme-provider.tsx +76 -15
- package/compiler-assets/nextjs/shims/root-page.tsx +7 -1
- package/compiler-assets/nextjs/shims/site-fenced-code-block.tsx +30 -0
- package/compiler-assets/nextjs/shims/site-heading-level.tsx +14 -0
- package/compiler-assets/nextjs/shims/site-mdx-components.tsx +112 -0
- package/compiler-assets/nextjs/shims/site-mdx.tsx +17 -0
- package/compiler-assets/nextjs/shims/theme-defaults.css +41 -25
- package/dist/build-operation-5QMLXF7N.js +89 -0
- package/dist/{button-CFdx-ohV.d.ts → button-BdCScEKi.d.ts} +6 -6
- package/dist/capture-local-source-WGGDIUU2.js +258 -0
- package/dist/chunk-22RSSUNV.js +13 -0
- package/dist/chunk-4BC2L2KA.js +620 -0
- package/dist/chunk-5J3YUNRY.js +121 -0
- package/dist/chunk-5KAD7W53.js +248 -0
- package/dist/chunk-6C65KV7O.js +142 -0
- package/dist/chunk-6D2E6UMD.js +695 -0
- package/dist/chunk-7NY22B5U.js +161 -0
- package/dist/chunk-AI2UULNX.js +9 -0
- package/dist/chunk-EFO6AWXN.js +19 -0
- package/dist/chunk-F3AGNDF4.js +2377 -0
- package/dist/chunk-GBPLER5H.js +426 -0
- package/dist/chunk-IL4RJOKI.js +186 -0
- package/dist/chunk-NNBJZPFM.js +193 -0
- package/dist/chunk-ORIUWJBQ.js +58 -0
- package/dist/chunk-OXOFRXEI.js +7129 -0
- package/dist/chunk-UYGCOWRF.js +1709 -0
- package/dist/chunk-WL75GQ5M.js +80 -0
- package/dist/compiler.d.ts +54 -7
- package/dist/compiler.js +121 -13147
- package/dist/components/blocks/agent-actions.d.ts +81 -0
- package/dist/components/blocks/agent-actions.js +594 -0
- package/dist/components/blocks/toc.d.ts +43 -0
- package/dist/components/blocks/toc.js +136 -0
- package/dist/components/ui/button.d.ts +5 -0
- package/dist/components/ui/button.js +94 -0
- package/dist/compose-CVBJRAF6.js +16 -0
- package/dist/config/createNextConfig.js +27 -0
- package/dist/dev-operation-OSHHWRWK.js +1095 -0
- package/dist/framework-selection-ZVO323PK.js +11 -0
- package/dist/ide-support-CU6Z5PVR.js +16 -0
- package/dist/index.d.ts +55 -4
- package/dist/jsx-dev-runtime.d.ts +6 -0
- package/dist/jsx-dev-runtime.js +100 -0
- package/dist/jsx-runtime.d.ts +7 -0
- package/dist/jsx-runtime.js +97 -0
- package/dist/kernel/components/blocks/AgentActions.d.ts +35 -6
- package/dist/kernel/components/blocks/AgentActions.js +401 -150
- package/dist/kernel/components/blocks/agent-actions.d.ts +5 -0
- package/dist/kernel/components/blocks/agent-actions.js +594 -0
- package/dist/kernel/components/blocks/animated-icon-swap.js +1 -1
- package/dist/kernel/components/blocks/color-palette.js +4 -4
- package/dist/kernel/components/blocks/logo-block.js +3 -3
- package/dist/kernel/components/blocks/nav-breadcrumb.d.ts +10 -2
- package/dist/kernel/components/blocks/nav-breadcrumb.js +22 -7
- package/dist/kernel/components/blocks/navbar.d.ts +2 -2
- package/dist/kernel/components/blocks/navbar.js +406 -65
- package/dist/kernel/components/blocks/navigation-progress.js +6 -3
- package/dist/kernel/components/blocks/next-prev.d.ts +1 -1
- package/dist/kernel/components/blocks/next-prev.js +12 -24
- package/dist/kernel/components/blocks/page-list.d.ts +1 -1
- package/dist/kernel/components/blocks/page-list.js +7 -6
- package/dist/kernel/components/blocks/search.d.ts +83 -58
- package/dist/kernel/components/blocks/search.js +554 -428
- package/dist/kernel/components/blocks/sidebar-node.d.ts +2 -2
- package/dist/kernel/components/blocks/sidebar-node.js +12 -10
- package/dist/kernel/components/blocks/sidebar.d.ts +3 -3
- package/dist/kernel/components/blocks/sidebar.js +24 -14
- package/dist/kernel/components/blocks/theme-toggle.d.ts +2 -2
- package/dist/kernel/components/blocks/theme-toggle.js +47 -1
- package/dist/kernel/components/blocks/toc-client.d.ts +40 -0
- package/dist/kernel/components/blocks/toc-client.js +495 -0
- package/dist/kernel/components/blocks/toc.d.ts +19 -1
- package/dist/kernel/components/blocks/toc.js +122 -180
- package/dist/kernel/components/mdx/components/blockquote.js +2 -2
- package/dist/kernel/components/mdx/components/callout.d.ts +5 -7
- package/dist/kernel/components/mdx/components/callout.js +67 -36
- package/dist/kernel/components/mdx/components/code-block.d.ts +5 -2
- package/dist/kernel/components/mdx/components/code-block.js +106 -5
- package/dist/kernel/components/mdx/components/copy-code-button.d.ts +8 -0
- package/dist/kernel/components/mdx/components/copy-code-button.js +61 -0
- package/dist/kernel/components/mdx/components/figure-caption.d.ts +1 -1
- package/dist/kernel/components/mdx/components/figure-caption.js +4 -3
- package/dist/kernel/components/mdx/components/figure.d.ts +6 -2
- package/dist/kernel/components/mdx/components/figure.js +24 -14
- package/dist/kernel/components/mdx/components/footnotes.js +1 -1
- package/dist/kernel/components/mdx/components/heading-copy-link.js +4 -4
- package/dist/kernel/components/mdx/components/heading.js +6 -3
- package/dist/kernel/components/mdx/components/hr.js +2 -2
- package/dist/kernel/components/mdx/components/image-zoom.js +2 -2
- package/dist/kernel/components/mdx/components/image.d.ts +1 -1
- package/dist/kernel/components/mdx/components/image.js +94 -68
- package/dist/kernel/components/mdx/components/inline-code.js +2 -2
- package/dist/kernel/components/mdx/components/kbd.d.ts +2 -2
- package/dist/kernel/components/mdx/components/kbd.js +5 -4
- package/dist/kernel/components/mdx/components/link.d.ts +35 -4
- package/dist/kernel/components/mdx/components/link.js +3 -3
- package/dist/kernel/components/mdx/components/paragraph.js +2 -5
- package/dist/kernel/components/mdx/components/strikethrough.js +1 -1
- package/dist/kernel/components/mdx/components/table.js +2 -2
- package/dist/kernel/components/mdx/components/task-list.js +2 -2
- package/dist/kernel/components/mdx/components/video-player.d.ts +6 -2
- package/dist/kernel/components/mdx/components/video-player.js +8 -4
- package/dist/kernel/components/mdx/components/video.d.ts +5 -3
- package/dist/kernel/components/mdx/components/video.js +8 -6
- package/dist/kernel/components/mdx/error-boundary.js +2 -2
- package/dist/kernel/components/mdx/error-fallback.js +1 -1
- package/dist/kernel/components/mdx/mdx.d.ts +28 -14
- package/dist/kernel/components/mdx/mdx.js +336 -63
- package/dist/kernel/components/mdx/rehype-heading-ids.d.ts +1 -0
- package/dist/kernel/components/mdx/rehype-heading-ids.js +6 -4
- package/dist/kernel/components/next-image.d.ts +12 -0
- package/dist/kernel/components/next-image.js +61 -0
- package/dist/kernel/components/ui/accordion.js +1 -1
- package/dist/kernel/components/ui/breadcrumb-trail.d.ts +6 -23
- package/dist/kernel/components/ui/breadcrumb-trail.js +2 -2
- package/dist/kernel/components/ui/breadcrumb.d.ts +11 -3
- package/dist/kernel/components/ui/breadcrumb.js +10 -8
- package/dist/kernel/components/ui/button-group.js +8 -7
- package/dist/kernel/components/ui/button.d.ts +58 -6
- package/dist/kernel/components/ui/button.js +43 -39
- package/dist/kernel/components/ui/card.d.ts +2 -2
- package/dist/kernel/components/ui/card.js +1 -1
- package/dist/kernel/components/ui/dialog.js +1 -1
- package/dist/kernel/components/ui/drawer.d.ts +3 -1
- package/dist/kernel/components/ui/drawer.js +6 -2
- package/dist/kernel/components/ui/input.d.ts +2 -2
- package/dist/kernel/components/ui/input.js +1 -1
- package/dist/kernel/components/ui/kbd.js +10 -17
- package/dist/kernel/components/ui/link.d.ts +11 -3
- package/dist/kernel/components/ui/link.js +12 -11
- package/dist/kernel/components/ui/menu.js +6 -6
- package/dist/kernel/components/ui/mod-key.d.ts +10 -0
- package/dist/kernel/components/ui/mod-key.js +36 -0
- package/dist/kernel/components/ui/navigation-menu.js +3 -3
- package/dist/kernel/components/ui/popover.js +1 -1
- package/dist/kernel/components/ui/progress.js +2 -2
- package/dist/kernel/components/ui/scroll-area.js +5 -5
- package/dist/kernel/components/ui/select.js +8 -11
- package/dist/kernel/components/ui/separator.js +1 -1
- package/dist/kernel/components/ui/table.js +1 -1
- package/dist/kernel/components/ui/tabs.js +1 -1
- package/dist/kernel/components/ui/tag.js +1 -1
- package/dist/kernel/components/ui/text.d.ts +2 -2
- package/dist/kernel/components/ui/text.js +1 -1
- package/dist/kernel/components/ui/toast.js +1 -1
- package/dist/kernel/components/ui/tooltip.js +1 -1
- package/dist/kernel/defaults.registry.d.ts +11 -24
- package/dist/kernel/defaults.registry.js +11 -26
- package/dist/kernel/routes/agent/markdown.d.ts +3 -1
- package/dist/kernel/routes/agent/markdown.js +219 -48
- package/dist/kernel/routes/layouts/group.d.ts +1 -1
- package/dist/kernel/routes/layouts/group.js +5 -7
- package/dist/kernel/routes/metadata/feed.d.ts +1 -1
- package/dist/kernel/routes/metadata/feed.js +111 -81
- package/dist/kernel/routes/metadata/llms.d.ts +12 -3
- package/dist/kernel/routes/metadata/llms.js +156 -59
- package/dist/kernel/routes/metadata/og-image.js +1 -1
- package/dist/kernel/routes/metadata/robots.d.ts +1 -1
- package/dist/kernel/routes/metadata/robots.js +2 -2
- package/dist/kernel/routes/metadata/sitemap.d.ts +26 -4
- package/dist/kernel/routes/metadata/sitemap.js +206 -38
- package/dist/kernel/routes/not-found.d.ts +34 -0
- package/dist/kernel/routes/not-found.js +213 -0
- package/dist/kernel/routes/pages/group.d.ts +2 -2
- package/dist/kernel/routes/pages/group.js +21 -13
- package/dist/kernel/routes/pages/leaf.d.ts +28 -1
- package/dist/kernel/routes/pages/leaf.js +25 -16
- package/dist/kernel/routes/pages/root.js +19 -13
- package/dist/keyboard-shortcuts.js +1 -1
- package/dist/resolvers/manifest-resolver.js +29 -6
- package/dist/search.d.ts +6 -7
- package/dist/search.js +52 -29
- package/dist/{sidebar-types-Bgchdfd6.d.ts → sidebar-types-DKpR27II.d.ts} +1 -1
- package/dist/theme-scope.js +1 -1
- package/dist/{types-DHBm7-j6.d.ts → types-CJWRG05y.d.ts} +20 -1
- package/dist/{types-B_b3C0U6.d.ts → types-CUtrppxt.d.ts} +8 -2
- package/dist/{types-CIwwieNw.d.ts → types-J2w_puPF.d.ts} +11 -10
- package/dist/types.d.ts +15 -6
- package/dist/utils/heading-ids.js +30 -11
- package/dist/utils/toc-selection.d.ts +7 -0
- package/dist/utils/toc-selection.js +14 -0
- package/dist/validate-local-source-SV44DBQT.js +16 -0
- package/dist/validate-publish-os-source-NZJF3TB2.js +14 -0
- package/init/seed/minimal/.gitignore +1 -0
- package/init/seed/minimal/publish.os/assets/blog/hello-world.svg +13 -0
- package/init/seed/minimal/publish.os/assets/favicon.dark.svg +13 -0
- package/init/seed/minimal/publish.os/assets/favicon.svg +13 -0
- package/init/seed/minimal/publish.os/blog/content/hello-world.mdx +48 -0
- package/init/seed/minimal/publish.os/blog/content/series-a.mdx +11 -0
- package/init/seed/minimal/publish.os/blog/index.tsx +82 -0
- package/init/seed/minimal/publish.os/blog/layout.tsx +13 -0
- package/init/seed/minimal/publish.os/blog/page.tsx +76 -0
- package/init/seed/minimal/publish.os/components/blog/copy-link.tsx +64 -0
- package/init/seed/minimal/publish.os/docs/content/get-started.mdx +6 -11
- package/init/seed/minimal/publish.os/docs/content/groups.mdx +6 -7
- package/init/seed/minimal/publish.os/docs/content/{theme.mdx → themes.mdx} +14 -12
- package/init/seed/minimal/publish.os/publish.os.config.json +7 -7
- package/init/seed/minimal/publish.os/theme.css +52 -24
- package/init/seed/minimal/publish.os/tsconfig.json +3 -0
- package/init/seed/minimal/seed.json +12 -2
- package/init/seed/scratch/publish.os/docs/content/get-started.mdx +6 -0
- package/init/seed/scratch/publish.os/publish.os.config.json +4 -0
- package/init/seed/scratch/seed.json +5 -0
- package/package.json +55 -44
- package/release/app/phosphor/package.json +5 -5
- package/release/app/phosphor/pnpm-lock.yaml.template +553 -377
- package/release/app/phosphor/pnpm-workspace.yaml +3 -0
- package/release/compiler/package.json +5 -3
- package/release/compiler/pnpm-lock.yaml.template +500 -303
- package/release/compiler/pnpm-workspace.yaml +3 -0
- package/release/release.json +8 -37
- package/compiler-assets/nextjs/defaults/group/leaf.tsx +0 -48
- package/dist/icons.d.ts +0 -1
- package/dist/icons.js +0 -2
- package/dist/kernel/components/blocks/design-system-preview.d.ts +0 -61
- package/dist/kernel/components/blocks/design-system-preview.js +0 -648
- package/dist/kernel/components/blocks/link-playground.d.ts +0 -5
- package/dist/kernel/components/blocks/link-playground.js +0 -744
- package/dist/kernel/components/blocks/navigation-progress-playground.d.ts +0 -5
- package/dist/kernel/components/blocks/navigation-progress-playground.js +0 -629
- package/dist/kernel/components/mdx/components/pre.d.ts +0 -6
- package/dist/kernel/components/mdx/components/pre.js +0 -18
- package/dist/kernel/components/ui/meta-key.d.ts +0 -17
- package/dist/kernel/components/ui/meta-key.js +0 -9
- package/dist/kernel/components/ui/theme-toggle.d.ts +0 -24
- package/dist/kernel/components/ui/theme-toggle.js +0 -58
- package/dist/kernel/framework-icons.d.ts +0 -1
- package/dist/kernel/framework-icons.js +0 -39
- package/dist/link-CYaCRDb6.d.ts +0 -35
- package/release/app/lucide/package.json +0 -30
- package/release/app/lucide/pnpm-lock.yaml.template +0 -2905
- package/release/app/lucide/pnpm-workspace.yaml +0 -11
- package/release/app/tabler/package.json +0 -30
- package/release/app/tabler/pnpm-lock.yaml.template +0 -2911
- package/release/app/tabler/pnpm-workspace.yaml +0 -11
|
@@ -46,6 +46,57 @@
|
|
|
46
46
|
0 0.08em 0.17em color-mix(in oklab, black 85%, transparent);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
@media (scripting: none) {
|
|
50
|
+
.publishos-mod-key-slot {
|
|
51
|
+
display: none;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.code-block-highlight :is(.shiki, .shiki span) {
|
|
56
|
+
color: var(--shiki-light, inherit);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.dark .code-block-highlight :is(.shiki, .shiki span) {
|
|
60
|
+
color: var(--shiki-dark, inherit);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@media (scripting: none) {
|
|
64
|
+
[data-slot="copy-code-button"] {
|
|
65
|
+
display: none;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Ordinary prose follows the note; nested components keep their own tokens. */
|
|
70
|
+
@layer components {
|
|
71
|
+
:where([data-slot="callout-content"]) {
|
|
72
|
+
--typography-body-foreground: currentColor;
|
|
73
|
+
--typography-quote-foreground: currentColor;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:where([data-slot="callout-content"] > ul) {
|
|
77
|
+
list-style-type: disc;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:where([data-slot="callout-content"] > ol) {
|
|
81
|
+
list-style-type: decimal;
|
|
82
|
+
padding-inline-start: 1.5em;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@layer utilities {
|
|
87
|
+
[data-slot="callout-content"] > :is(p, ul, ol) {
|
|
88
|
+
margin-block: 0.5em;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
[data-slot="callout-content"] > :first-child {
|
|
92
|
+
margin-block-start: 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
[data-slot="callout-content"] > :last-child {
|
|
96
|
+
margin-block-end: 0;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
49
100
|
@layer components {
|
|
50
101
|
code,
|
|
51
102
|
kbd,
|
|
@@ -333,20 +384,6 @@
|
|
|
333
384
|
padding-inline-start: 1.625em;
|
|
334
385
|
}
|
|
335
386
|
|
|
336
|
-
& :where(code):not(.not-markdown-prose):not(:where(.not-markdown-prose *)) {
|
|
337
|
-
box-sizing: border-box;
|
|
338
|
-
height: fit-content;
|
|
339
|
-
border: 1px solid var(--stroke-2);
|
|
340
|
-
border-radius: var(--radius-inline-code);
|
|
341
|
-
background-color: var(--surface-2);
|
|
342
|
-
color: var(--foreground-1);
|
|
343
|
-
font-family: var(--font-mono);
|
|
344
|
-
font-size: 0.95em;
|
|
345
|
-
font-weight: 400;
|
|
346
|
-
line-height: 1.25;
|
|
347
|
-
padding: 0.15em 0.35em;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
387
|
& :where(code):not(:where(pre code))::before,
|
|
351
388
|
& :where(code):not(:where(pre code))::after {
|
|
352
389
|
content: none;
|
|
@@ -403,60 +440,6 @@
|
|
|
403
440
|
content: none;
|
|
404
441
|
}
|
|
405
442
|
|
|
406
|
-
& :where(kbd):not(.not-markdown-prose):not(:where(.not-markdown-prose *)) {
|
|
407
|
-
position: relative;
|
|
408
|
-
top: -0.03em;
|
|
409
|
-
display: inline-flex;
|
|
410
|
-
align-items: center;
|
|
411
|
-
justify-content: center;
|
|
412
|
-
box-sizing: border-box;
|
|
413
|
-
height: fit-content;
|
|
414
|
-
min-width: 1.75em;
|
|
415
|
-
flex-shrink: 0;
|
|
416
|
-
user-select: none;
|
|
417
|
-
border-radius: max(var(--radius-kbd), 1px);
|
|
418
|
-
background-color: var(--surface-1);
|
|
419
|
-
box-shadow: var(--kbd-shadow);
|
|
420
|
-
color: var(--foreground-1);
|
|
421
|
-
font-family: var(--font-main);
|
|
422
|
-
font-size: 0.875rem;
|
|
423
|
-
font-weight: 400;
|
|
424
|
-
line-height: 1.7em;
|
|
425
|
-
padding: 0.05em 0.5em 0.1em;
|
|
426
|
-
vertical-align: text-top;
|
|
427
|
-
white-space: nowrap;
|
|
428
|
-
word-spacing: -0.1em;
|
|
429
|
-
transition-duration: 150ms;
|
|
430
|
-
transition-property: background-color, box-shadow;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
&
|
|
434
|
-
:where(kbd):not(.not-markdown-prose):not(
|
|
435
|
-
:where(.not-markdown-prose *)
|
|
436
|
-
):hover {
|
|
437
|
-
background-color: var(--surface-page);
|
|
438
|
-
box-shadow:
|
|
439
|
-
var(--kbd-shadow),
|
|
440
|
-
0 0 0 0.05em color-mix(in oklab, var(--stroke-2) 50%, transparent);
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
&
|
|
444
|
-
:where(kbd):not(.not-markdown-prose):not(
|
|
445
|
-
:where(.not-markdown-prose *)
|
|
446
|
-
):focus-visible {
|
|
447
|
-
outline: 2px solid var(--focus-stroke);
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
&
|
|
451
|
-
:where(kbd):not(.not-markdown-prose):not(
|
|
452
|
-
:where(.not-markdown-prose *)
|
|
453
|
-
):active {
|
|
454
|
-
padding-top: 0.1em;
|
|
455
|
-
padding-bottom: 0.05em;
|
|
456
|
-
background-color: var(--surface-2);
|
|
457
|
-
box-shadow: var(--kbd-shadow-active);
|
|
458
|
-
}
|
|
459
|
-
|
|
460
443
|
&
|
|
461
444
|
:where(blockquote):not(.not-markdown-prose):not(
|
|
462
445
|
:where(.not-markdown-prose *)
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
--color-focus-stroke: var(--focus-stroke);
|
|
23
23
|
|
|
24
24
|
--color-accent-1: var(--accent-1);
|
|
25
|
+
--color-accent-text-foreground: var(--accent-text-foreground);
|
|
25
26
|
--color-accent-1-foreground: var(--accent-1-foreground);
|
|
26
27
|
--color-accent-1-stroke: var(--accent-1-stroke);
|
|
27
28
|
--color-accent-1-hover: var(--accent-1-hover);
|
|
@@ -157,6 +158,23 @@
|
|
|
157
158
|
}
|
|
158
159
|
|
|
159
160
|
@layer base {
|
|
161
|
+
/* Keep light-dark() tokens valid when Next.js lowers them for older browsers. */
|
|
162
|
+
:root {
|
|
163
|
+
color-scheme: light;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
:root,
|
|
167
|
+
.light {
|
|
168
|
+
--logo-block-light-display: block;
|
|
169
|
+
--logo-block-dark-display: none;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.dark {
|
|
173
|
+
color-scheme: dark;
|
|
174
|
+
--logo-block-light-display: none;
|
|
175
|
+
--logo-block-dark-display: block;
|
|
176
|
+
}
|
|
177
|
+
|
|
160
178
|
*,
|
|
161
179
|
*::before,
|
|
162
180
|
*::after {
|
|
@@ -188,4 +206,11 @@
|
|
|
188
206
|
background-color: var(--selection-surface);
|
|
189
207
|
color: var(--selection-foreground);
|
|
190
208
|
}
|
|
209
|
+
|
|
210
|
+
@media (forced-colors: active) {
|
|
211
|
+
::selection {
|
|
212
|
+
background-color: Highlight;
|
|
213
|
+
color: HighlightText;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
191
216
|
}
|
|
@@ -22,9 +22,13 @@ export default function HomePage(props: RootPageProps) {
|
|
|
22
22
|
const navNodes = rootNavNodes(tree);
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
|
-
<section className="mx-auto grid min-h-[calc(
|
|
25
|
+
<section className="mx-auto grid min-h-[calc(100vh-var(--layout-global-nav-height))] w-full max-w-(--layout-site-max-width) grid-cols-1 border-x border-stroke-3 bg-surface-1 md:grid-cols-[var(--layout-sidebar-width)_minmax(0,1fr)_var(--layout-toc-width)] supports-[height:100dvh]:min-h-[calc(100dvh-var(--layout-global-nav-height))] supports-[top:anchor-size(--global-navbar_height)]:min-h-[calc(100vh-anchor-size(--global-navbar_height,3.5rem))] supports-[top:anchor-size(--global-navbar_height)]:supports-[height:100dvh]:min-h-[calc(100dvh-anchor-size(--global-navbar_height,3.5rem))]">
|
|
26
26
|
<div className="hidden md:block" />
|
|
27
|
-
<main
|
|
27
|
+
<main
|
|
28
|
+
className="flex min-w-0 scroll-mt-[calc(var(--layout-global-nav-height)+1rem)] items-start justify-center px-6 pb-16 pt-[clamp(5rem,18vh,10rem)] text-foreground-1 lg:px-10"
|
|
29
|
+
id="main-content"
|
|
30
|
+
tabIndex={-1}
|
|
31
|
+
>
|
|
28
32
|
<div className="w-full max-w-md">
|
|
29
33
|
<p className="mb-6 text-sm font-semibold text-foreground-1">
|
|
30
34
|
{site.name}
|
|
@@ -12,8 +12,14 @@ export default function DefaultRootLayout(props: RootLayoutProps) {
|
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
14
|
<div className="flex min-h-dvh flex-col bg-surface-2">
|
|
15
|
+
<a
|
|
16
|
+
className="sr-only focus:not-sr-only focus:fixed focus:start-4 focus:top-2 focus:z-toast focus:rounded-button focus:bg-surface-1 focus:px-4 focus:py-3 focus:text-sm focus:text-foreground-1 focus:outline-2 focus:outline-focus-stroke"
|
|
17
|
+
href="#main-content"
|
|
18
|
+
>
|
|
19
|
+
Skip to content
|
|
20
|
+
</a>
|
|
15
21
|
<Navbar logo={faviconsAndLogos.logo} site={site} tree={tree} />
|
|
16
|
-
<
|
|
22
|
+
<div className="flex w-full flex-1 flex-col">{children}</div>
|
|
17
23
|
</div>
|
|
18
24
|
);
|
|
19
25
|
}
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
:root {
|
|
4
4
|
--theme-radius: var(--theme-radius-md);
|
|
5
5
|
|
|
6
|
-
--gray-100: #
|
|
7
|
-
--gray-200: #
|
|
8
|
-
--gray-300: #
|
|
9
|
-
--gray-400: #
|
|
10
|
-
--gray-500: #
|
|
11
|
-
--gray-600: #
|
|
12
|
-
--gray-700: #
|
|
6
|
+
--gray-100: #fcfcfc;
|
|
7
|
+
--gray-200: #f9f9f9;
|
|
8
|
+
--gray-300: #f3f3f3;
|
|
9
|
+
--gray-400: #f0f0f0;
|
|
10
|
+
--gray-500: #e0e0e0;
|
|
11
|
+
--gray-600: #c6c6c6;
|
|
12
|
+
--gray-700: #999999;
|
|
13
13
|
--gray-800: #737373;
|
|
14
|
-
--gray-900: #
|
|
15
|
-
--gray-1000: #
|
|
16
|
-
--gray-1100: #
|
|
17
|
-
--gray-1200: #
|
|
14
|
+
--gray-900: #5d5d5d;
|
|
15
|
+
--gray-1000: #464646;
|
|
16
|
+
--gray-1100: #2e2e2e;
|
|
17
|
+
--gray-1200: #171717;
|
|
18
18
|
|
|
19
19
|
--neutral-100: var(--gray-100);
|
|
20
20
|
--neutral-200: var(--gray-200);
|
|
@@ -33,18 +33,18 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.dark {
|
|
36
|
-
--gray-100: #
|
|
37
|
-
--gray-200: #
|
|
38
|
-
--gray-300: #
|
|
39
|
-
--gray-400: #
|
|
40
|
-
--gray-500: #
|
|
36
|
+
--gray-100: #131313;
|
|
37
|
+
--gray-200: #1a1a1a;
|
|
38
|
+
--gray-300: #212121;
|
|
39
|
+
--gray-400: #292929;
|
|
40
|
+
--gray-500: #383838;
|
|
41
41
|
--gray-600: #525252;
|
|
42
|
-
--gray-700: #
|
|
43
|
-
--gray-800: #
|
|
44
|
-
--gray-900: #
|
|
45
|
-
--gray-1000: #
|
|
46
|
-
--gray-1100: #
|
|
47
|
-
--gray-1200: #
|
|
42
|
+
--gray-700: #767676;
|
|
43
|
+
--gray-800: #b3b3b3;
|
|
44
|
+
--gray-900: #c4c4c4;
|
|
45
|
+
--gray-1000: #d2d2d2;
|
|
46
|
+
--gray-1100: #e6e6e6;
|
|
47
|
+
--gray-1200: #f5f5f5;
|
|
48
48
|
|
|
49
49
|
--accent: var(--gray-1200);
|
|
50
50
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Providers } from "@app/providers";
|
|
2
|
+
import manifest from "@manifest";
|
|
3
|
+
import { preloadRootFonts, rootFontClassName } from "@source/.fonts.generated";
|
|
4
|
+
import RootLayout from "@source/layout";
|
|
5
|
+
import { type ComponentType, Fragment, type ReactNode } from "react";
|
|
6
|
+
import "@source/.fonts.generated.css";
|
|
7
|
+
import "@app/globals.css";
|
|
8
|
+
|
|
9
|
+
/** Shared document and authored shell for successful pages and routing-level 404s. */
|
|
10
|
+
export default function SiteDocument({
|
|
11
|
+
children,
|
|
12
|
+
head,
|
|
13
|
+
beforeShell,
|
|
14
|
+
bodyWrapper: BodyWrapper = Fragment,
|
|
15
|
+
}: {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
head?: ReactNode;
|
|
18
|
+
beforeShell?: ReactNode;
|
|
19
|
+
bodyWrapper?: ComponentType<{ children: ReactNode }>;
|
|
20
|
+
}) {
|
|
21
|
+
preloadRootFonts();
|
|
22
|
+
return (
|
|
23
|
+
<html className={rootFontClassName} lang="en" suppressHydrationWarning>
|
|
24
|
+
{/* biome-ignore lint/style/noHeadElement: global-not-found owns a full document outside the Next metadata layout tree. */}
|
|
25
|
+
{head ? <head>{head}</head> : null}
|
|
26
|
+
<body className="publish-os-app-root">
|
|
27
|
+
{beforeShell}
|
|
28
|
+
<BodyWrapper>
|
|
29
|
+
<Providers>
|
|
30
|
+
<RootLayout site={manifest.site} tree={manifest.tree}>
|
|
31
|
+
{children}
|
|
32
|
+
</RootLayout>
|
|
33
|
+
</Providers>
|
|
34
|
+
</BodyWrapper>
|
|
35
|
+
</body>
|
|
36
|
+
</html>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { PublishOSThemeScope } from "@app/publish-os-theme-provider";
|
|
1
2
|
import manifest from "@manifest";
|
|
2
3
|
import {
|
|
3
4
|
createGroupMetadata,
|
|
4
5
|
createGroupPage,
|
|
5
6
|
} from "@publish.os/nextjs/kernel/routes/pages/group";
|
|
6
7
|
import { ogManifest } from "@source/.publishos/og-manifest.generated";
|
|
7
|
-
import
|
|
8
|
+
import { groupThemes } from "@source/.theme.generated";
|
|
9
|
+
import IndexPage from "@source/__PUBLISHOS_OWNER_KEY__/index";
|
|
8
10
|
import type { Metadata } from "next";
|
|
9
11
|
|
|
10
12
|
const route = {
|
|
@@ -14,5 +16,20 @@ const route = {
|
|
|
14
16
|
IndexPage,
|
|
15
17
|
} as const;
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
const GroupPage = createGroupPage(route);
|
|
20
|
+
|
|
21
|
+
export default function GeneratedGroupPage() {
|
|
22
|
+
return (
|
|
23
|
+
<PublishOSThemeScope group={groupThemes[route.group].group}>
|
|
24
|
+
<GroupPage />
|
|
25
|
+
</PublishOSThemeScope>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
18
29
|
export const metadata: Metadata = createGroupMetadata(route);
|
|
30
|
+
|
|
31
|
+
export const ensureStatic = "navigation";
|
|
32
|
+
|
|
33
|
+
// Next 16.4 still misclassifies redirect() during instant validation.
|
|
34
|
+
// Keep its HTTP response; ensureStatic independently validates prerendering.
|
|
35
|
+
export const instant = false;
|
|
@@ -1,21 +1,37 @@
|
|
|
1
|
+
import { PublishOSThemeScope } from "@app/publish-os-theme-provider";
|
|
1
2
|
import manifest from "@manifest";
|
|
2
3
|
import {
|
|
3
4
|
createLeafMetadata,
|
|
4
5
|
createLeafPage,
|
|
5
6
|
createLeafStaticParams,
|
|
6
7
|
} from "@publish.os/nextjs/kernel/routes/pages/leaf";
|
|
8
|
+
import { markdownArtifactManifest } from "@source/.publishos/markdown-index.generated";
|
|
7
9
|
import { ogManifest } from "@source/.publishos/og-manifest.generated";
|
|
8
|
-
import
|
|
10
|
+
import { groupThemes } from "@source/.theme.generated";
|
|
11
|
+
import Leaf from "@source/__PUBLISHOS_OWNER_KEY__/page";
|
|
9
12
|
import { PoweredByFooter } from "@source/_internal/powered-by-footer.generated";
|
|
10
13
|
|
|
11
14
|
const route = {
|
|
12
15
|
group: __PUBLISHOS_GROUP_KEY__,
|
|
13
16
|
manifest,
|
|
17
|
+
markdownArtifactManifest,
|
|
14
18
|
ogManifest,
|
|
15
19
|
Leaf,
|
|
16
20
|
PoweredByFooter,
|
|
17
21
|
} as const;
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
const LeafPage = createLeafPage(route);
|
|
24
|
+
|
|
25
|
+
export default function GeneratedLeafPage(props: {
|
|
26
|
+
params: Promise<{ slug: string[] }>;
|
|
27
|
+
}) {
|
|
28
|
+
return (
|
|
29
|
+
<PublishOSThemeScope group={groupThemes[route.group].group}>
|
|
30
|
+
<LeafPage {...props} />
|
|
31
|
+
</PublishOSThemeScope>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
20
35
|
export const generateMetadata = createLeafMetadata(route);
|
|
21
36
|
export const generateStaticParams = createLeafStaticParams(route);
|
|
37
|
+
export const ensureStatic = "navigation";
|
|
@@ -1,87 +1,23 @@
|
|
|
1
|
+
import SiteDocument from "@app/document";
|
|
2
|
+
import { metadataIcons } from "@app/metadata-icons";
|
|
1
3
|
import manifest from "@manifest";
|
|
2
|
-
import "@source/.fonts.generated.css";
|
|
3
|
-
import { Providers } from "@app/providers";
|
|
4
|
-
import { preloadRootFonts, rootFontClassName } from "@source/.fonts.generated";
|
|
5
|
-
import { faviconsAndLogos } from "@source/.publishos/favicons-and-logos.generated";
|
|
6
|
-
import { ogManifest } from "@source/.publishos/og-manifest.generated";
|
|
7
|
-
import RootLayout from "@source/layout";
|
|
8
4
|
import type { Metadata } from "next";
|
|
9
5
|
import type { ReactNode } from "react";
|
|
10
|
-
import "@app/globals.css";
|
|
11
6
|
|
|
12
7
|
const siteDescription =
|
|
13
8
|
"description" in manifest.site &&
|
|
14
9
|
typeof manifest.site.description === "string"
|
|
15
10
|
? manifest.site.description
|
|
16
11
|
: undefined;
|
|
17
|
-
const
|
|
18
|
-
"
|
|
19
|
-
? manifest.site.
|
|
12
|
+
const siteOrigin =
|
|
13
|
+
"origin" in manifest.site && typeof manifest.site.origin === "string"
|
|
14
|
+
? manifest.site.origin
|
|
20
15
|
: undefined;
|
|
21
16
|
const isDevelopment = process.env.NODE_ENV === "development";
|
|
22
17
|
const metadataBase = isDevelopment
|
|
23
18
|
? new URL(`http://localhost:${process.env.PORT ?? "3000"}`)
|
|
24
|
-
:
|
|
25
|
-
? new URL(
|
|
26
|
-
: undefined;
|
|
27
|
-
type GeneratedMetadataIcons = {
|
|
28
|
-
icon?: readonly {
|
|
29
|
-
media?: string;
|
|
30
|
-
sizes?: string;
|
|
31
|
-
type?: string;
|
|
32
|
-
url: string;
|
|
33
|
-
}[];
|
|
34
|
-
apple?: readonly {
|
|
35
|
-
sizes?: string;
|
|
36
|
-
type?: string;
|
|
37
|
-
url: string;
|
|
38
|
-
}[];
|
|
39
|
-
};
|
|
40
|
-
const generatedMetadataIcons =
|
|
41
|
-
faviconsAndLogos.metadataIcons as GeneratedMetadataIcons;
|
|
42
|
-
const metadataIcons: Metadata["icons"] | undefined =
|
|
43
|
-
Object.keys(generatedMetadataIcons).length > 0
|
|
44
|
-
? {
|
|
45
|
-
...(generatedMetadataIcons.icon
|
|
46
|
-
? { icon: [...generatedMetadataIcons.icon] }
|
|
47
|
-
: {}),
|
|
48
|
-
...(generatedMetadataIcons.apple
|
|
49
|
-
? { apple: [...generatedMetadataIcons.apple] }
|
|
50
|
-
: {}),
|
|
51
|
-
}
|
|
52
|
-
: undefined;
|
|
53
|
-
const rootOgKey = ogManifest.routes["/"];
|
|
54
|
-
const rootOgImage = rootOgKey ? ogManifest.entries[rootOgKey] : undefined;
|
|
55
|
-
const absoluteUrl = (path: string): string => {
|
|
56
|
-
if (/^https:\/\//.test(path)) return path;
|
|
57
|
-
if (isDevelopment || !siteUrl) return path;
|
|
58
|
-
return new URL(path, siteUrl).toString();
|
|
59
|
-
};
|
|
60
|
-
const rootSocialMetadata: Pick<Metadata, "openGraph" | "twitter"> | undefined =
|
|
61
|
-
rootOgImage
|
|
62
|
-
? {
|
|
63
|
-
openGraph: {
|
|
64
|
-
description: siteDescription,
|
|
65
|
-
images: [
|
|
66
|
-
{
|
|
67
|
-
alt: rootOgImage.alt,
|
|
68
|
-
height: rootOgImage.height,
|
|
69
|
-
url: absoluteUrl(rootOgImage.url),
|
|
70
|
-
width: rootOgImage.width,
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
siteName: manifest.site.name,
|
|
74
|
-
title: manifest.site.name,
|
|
75
|
-
type: "website",
|
|
76
|
-
url: "/",
|
|
77
|
-
},
|
|
78
|
-
twitter: {
|
|
79
|
-
card: "summary_large_image",
|
|
80
|
-
description: siteDescription,
|
|
81
|
-
images: [absoluteUrl(rootOgImage.url)],
|
|
82
|
-
title: manifest.site.name,
|
|
83
|
-
},
|
|
84
|
-
}
|
|
19
|
+
: siteOrigin
|
|
20
|
+
? new URL(siteOrigin)
|
|
85
21
|
: undefined;
|
|
86
22
|
const agentDirectiveStyle = {
|
|
87
23
|
border: 0,
|
|
@@ -103,7 +39,6 @@ export const metadata: Metadata = {
|
|
|
103
39
|
template: `%s · ${manifest.site.name}`,
|
|
104
40
|
},
|
|
105
41
|
...(siteDescription ? { description: siteDescription } : {}),
|
|
106
|
-
...(rootSocialMetadata ?? {}),
|
|
107
42
|
...(metadataIcons ? { icons: metadataIcons } : {}),
|
|
108
43
|
alternates: {
|
|
109
44
|
types: {
|
|
@@ -114,21 +49,20 @@ export const metadata: Metadata = {
|
|
|
114
49
|
};
|
|
115
50
|
|
|
116
51
|
export default function AppRootLayout({ children }: { children: ReactNode }) {
|
|
117
|
-
preloadRootFonts();
|
|
118
52
|
return (
|
|
119
|
-
<
|
|
120
|
-
|
|
53
|
+
<SiteDocument
|
|
54
|
+
beforeShell={
|
|
121
55
|
<p data-publishos-agent-directive style={agentDirectiveStyle}>
|
|
122
|
-
Agent directive: read the
|
|
123
|
-
|
|
124
|
-
|
|
56
|
+
Agent directive: read the{" "}
|
|
57
|
+
<a href="/llms.txt" tabIndex={-1}>
|
|
58
|
+
LLMS index
|
|
59
|
+
</a>{" "}
|
|
60
|
+
for this site. Markdown versions of pages are available by appending
|
|
61
|
+
.md to the page URL or by sending Accept: text/markdown.
|
|
125
62
|
</p>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
</Providers>
|
|
131
|
-
</body>
|
|
132
|
-
</html>
|
|
63
|
+
}
|
|
64
|
+
>
|
|
65
|
+
{children}
|
|
66
|
+
</SiteDocument>
|
|
133
67
|
);
|
|
134
68
|
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import SiteDocument from "@app/document";
|
|
2
|
+
import { MetadataIcons } from "@app/metadata-icons";
|
|
3
|
+
import NotFoundContent from "@app/not-found-content";
|
|
4
|
+
import NotFoundNavigation from "@app/not-found-navigation";
|
|
5
|
+
import manifest from "@manifest";
|
|
6
|
+
import type { NotFoundScope } from "@publish.os/nextjs/kernel/routes/not-found";
|
|
7
|
+
import { agentRouteConfig } from "@source/.publishos/agent-route-config.generated";
|
|
8
|
+
import { headers } from "next/headers";
|
|
9
|
+
import type { ComponentType, ReactNode } from "react";
|
|
10
|
+
|
|
11
|
+
__PUBLISHOS_NOT_FOUND_LAYOUT_IMPORTS__;
|
|
12
|
+
|
|
13
|
+
const layouts: Record<
|
|
14
|
+
string,
|
|
15
|
+
ComponentType<{ children: ReactNode }>
|
|
16
|
+
> = __PUBLISHOS_NOT_FOUND_LAYOUTS__;
|
|
17
|
+
const generic: NotFoundScope = {
|
|
18
|
+
id: "none",
|
|
19
|
+
path: "/",
|
|
20
|
+
htmlPath: "/_not-found",
|
|
21
|
+
recommendations: [],
|
|
22
|
+
indexes: [],
|
|
23
|
+
markdown: "",
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// Routing-level errors must stay outside successful pages' prerender trees.
|
|
27
|
+
export const instant = false;
|
|
28
|
+
|
|
29
|
+
export default async function GlobalNotFound() {
|
|
30
|
+
const id = (await headers()).get("x-publishos-not-found-scope");
|
|
31
|
+
const scope =
|
|
32
|
+
agentRouteConfig.notFoundScopes.find((entry) => entry.id === id) ?? generic;
|
|
33
|
+
const Layout = layouts[scope.id as keyof typeof layouts];
|
|
34
|
+
const content = <NotFoundContent scope={scope} />;
|
|
35
|
+
return (
|
|
36
|
+
<SiteDocument
|
|
37
|
+
bodyWrapper={NotFoundNavigation}
|
|
38
|
+
head={
|
|
39
|
+
<>
|
|
40
|
+
<title>{`Page not found · ${manifest.site.name}`}</title>
|
|
41
|
+
<meta name="robots" content="noindex" />
|
|
42
|
+
<MetadataIcons />
|
|
43
|
+
{agentRouteConfig.enabled && agentRouteConfig.discoveryHeaders ? (
|
|
44
|
+
<>
|
|
45
|
+
{scope.describedBy ? (
|
|
46
|
+
<link href={scope.describedBy} rel="describedby" />
|
|
47
|
+
) : null}
|
|
48
|
+
{scope.indexes.map((link) => (
|
|
49
|
+
<link href={link.href} key={link.href} rel="related" />
|
|
50
|
+
))}
|
|
51
|
+
</>
|
|
52
|
+
) : null}
|
|
53
|
+
</>
|
|
54
|
+
}
|
|
55
|
+
>
|
|
56
|
+
{Layout ? (
|
|
57
|
+
<Layout>{content}</Layout>
|
|
58
|
+
) : (
|
|
59
|
+
<main
|
|
60
|
+
className="flex min-h-0 flex-1 flex-col"
|
|
61
|
+
id="main-content"
|
|
62
|
+
tabIndex={-1}
|
|
63
|
+
>
|
|
64
|
+
{content}
|
|
65
|
+
</main>
|
|
66
|
+
)}
|
|
67
|
+
</SiteDocument>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createMarkdownRouteHandlers } from "@publish.os/nextjs/kernel/routes/agent/markdown";
|
|
2
|
+
import { agentRouteConfig } from "@source/.publishos/agent-route-config.generated";
|
|
2
3
|
import {
|
|
3
4
|
loadMarkdownArtifact,
|
|
4
5
|
markdownArtifactManifest,
|
|
@@ -11,6 +12,7 @@ const handlers = createMarkdownRouteHandlers(
|
|
|
11
12
|
},
|
|
12
13
|
{
|
|
13
14
|
discoveryLinks: __PUBLISHOS_MARKDOWN_DISCOVERY_LINKS__,
|
|
15
|
+
notFoundScopes: agentRouteConfig.notFoundScopes,
|
|
14
16
|
},
|
|
15
17
|
);
|
|
16
18
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { faviconsAndLogos } from "@source/.publishos/favicons-and-logos.generated";
|
|
2
|
+
import type { Metadata } from "next";
|
|
3
|
+
|
|
4
|
+
type GeneratedMetadataIcons = {
|
|
5
|
+
icon?: readonly {
|
|
6
|
+
media?: string;
|
|
7
|
+
sizes?: string;
|
|
8
|
+
type?: string;
|
|
9
|
+
url: string;
|
|
10
|
+
}[];
|
|
11
|
+
apple?: readonly {
|
|
12
|
+
sizes?: string;
|
|
13
|
+
type?: string;
|
|
14
|
+
url: string;
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const generated = faviconsAndLogos.metadataIcons as GeneratedMetadataIcons;
|
|
19
|
+
|
|
20
|
+
export const metadataIcons = Object.keys(generated).length
|
|
21
|
+
? ({
|
|
22
|
+
...(generated.icon ? { icon: [...generated.icon] } : {}),
|
|
23
|
+
...(generated.apple ? { apple: [...generated.apple] } : {}),
|
|
24
|
+
} satisfies Metadata["icons"])
|
|
25
|
+
: undefined;
|
|
26
|
+
|
|
27
|
+
/** Global errors bypass Next's layout metadata but use the same resolved icons. */
|
|
28
|
+
export function MetadataIcons() {
|
|
29
|
+
return (
|
|
30
|
+
<>
|
|
31
|
+
{metadataIcons?.icon?.map(({ url, ...attributes }) => (
|
|
32
|
+
<link href={url} key={url} rel="icon" {...attributes} />
|
|
33
|
+
))}
|
|
34
|
+
{metadataIcons?.apple?.map(({ url, ...attributes }) => (
|
|
35
|
+
<link href={url} key={url} rel="apple-touch-icon" {...attributes} />
|
|
36
|
+
))}
|
|
37
|
+
</>
|
|
38
|
+
);
|
|
39
|
+
}
|