@publish.os/nextjs 0.0.1-alpha.81 → 0.0.1-alpha.90
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 +7 -3
- package/compiler-assets/nextjs/defaults/group/page.tsx +35 -43
- package/compiler-assets/nextjs/defaults/project/next.config.mjs +22 -11
- package/compiler-assets/nextjs/defaults/project/tsconfig.json.template +1 -4
- package/compiler-assets/nextjs/defaults/root/css/animation.css +131 -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/generated-group-page.tsx +19 -2
- package/compiler-assets/nextjs/shims/generated-leaf-page.tsx +16 -2
- package/compiler-assets/nextjs/shims/global-layout.tsx +11 -43
- package/compiler-assets/nextjs/shims/proxy.ts +21 -9
- 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 +34 -0
- package/compiler-assets/nextjs/shims/site-heading-level.tsx +14 -0
- package/compiler-assets/nextjs/shims/site-mdx-components.tsx +100 -0
- package/compiler-assets/nextjs/shims/site-mdx.tsx +12 -0
- package/compiler-assets/nextjs/shims/theme-defaults.css +41 -25
- package/dist/build-operation-2JAYBSKF.js +83 -0
- package/dist/button-CtzUJB8u.d.ts +11 -0
- package/dist/{button-CFdx-ohV.d.ts → button-c3WGnxIj.d.ts} +3 -3
- package/dist/chunk-535TM4A5.js +1455 -0
- package/dist/chunk-726GV2NF.js +2344 -0
- package/dist/chunk-7OGTPSKI.js +156 -0
- package/dist/chunk-AI2UULNX.js +9 -0
- package/dist/chunk-B2V22WRT.js +297 -0
- package/dist/chunk-DLDFHU7Y.js +191 -0
- package/dist/chunk-DWA3ZRGW.js +142 -0
- package/dist/chunk-GGKFQ3MA.js +621 -0
- package/dist/chunk-H6XILMZX.js +6154 -0
- package/dist/chunk-NECL5IBJ.js +318 -0
- package/dist/chunk-SVYGXXYR.js +36 -0
- package/dist/chunk-UF6ATARM.js +1100 -0
- package/dist/chunk-VO2I7MTM.js +56 -0
- package/dist/chunk-WDY4IK6Z.js +128 -0
- package/dist/chunk-WKTEO6RS.js +586 -0
- package/dist/chunk-YLTOLYWM.js +92 -0
- package/dist/compiler.d.ts +41 -7
- package/dist/compiler.js +48 -13143
- package/dist/compose-NN23UJGC.js +13 -0
- package/dist/config/createNextConfig.js +13 -0
- package/dist/dev-operation-TZDVJCN7.js +1055 -0
- package/dist/framework-selection-X4U6Y6QC.js +10 -0
- package/dist/ide-support-ZNW7ODFY.js +15 -0
- package/dist/index.d.ts +15 -3
- package/dist/kernel/components/blocks/AgentActions.js +71 -61
- package/dist/kernel/components/blocks/design-system-preview.d.ts +1 -1
- package/dist/kernel/components/blocks/design-system-preview.js +32 -13
- package/dist/kernel/components/blocks/link-playground.js +2 -2
- package/dist/kernel/components/blocks/logo-block.js +2 -2
- package/dist/kernel/components/blocks/nav-breadcrumb.d.ts +10 -2
- package/dist/kernel/components/blocks/nav-breadcrumb.js +20 -5
- package/dist/kernel/components/blocks/navbar.d.ts +2 -2
- package/dist/kernel/components/blocks/navbar.js +401 -60
- package/dist/kernel/components/blocks/navigation-progress-playground.js +4 -4
- package/dist/kernel/components/blocks/navigation-progress.js +4 -1
- package/dist/kernel/components/blocks/next-prev.d.ts +1 -1
- package/dist/kernel/components/blocks/next-prev.js +11 -23
- package/dist/kernel/components/blocks/page-list.d.ts +1 -1
- package/dist/kernel/components/blocks/page-list.js +5 -4
- package/dist/kernel/components/blocks/search.d.ts +83 -58
- package/dist/kernel/components/blocks/search.js +553 -426
- package/dist/kernel/components/blocks/sidebar-node.d.ts +2 -2
- package/dist/kernel/components/blocks/sidebar-node.js +11 -9
- package/dist/kernel/components/blocks/sidebar.d.ts +3 -3
- package/dist/kernel/components/blocks/sidebar.js +18 -11
- package/dist/kernel/components/blocks/theme-toggle.d.ts +2 -2
- package/dist/kernel/components/blocks/theme-toggle.js +48 -2
- package/dist/kernel/components/blocks/toc.js +3 -3
- package/dist/kernel/components/mdx/components/blockquote.js +1 -1
- package/dist/kernel/components/mdx/components/callout.d.ts +5 -7
- package/dist/kernel/components/mdx/components/callout.js +66 -35
- 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 +60 -0
- package/dist/kernel/components/mdx/components/figure-caption.js +1 -1
- package/dist/kernel/components/mdx/components/figure.js +1 -1
- package/dist/kernel/components/mdx/components/heading-copy-link.js +3 -3
- package/dist/kernel/components/mdx/components/image-zoom.js +1 -1
- package/dist/kernel/components/mdx/components/image.js +77 -56
- package/dist/kernel/components/mdx/components/inline-code.js +1 -1
- package/dist/kernel/components/mdx/components/kbd.d.ts +2 -2
- package/dist/kernel/components/mdx/components/kbd.js +3 -2
- package/dist/kernel/components/mdx/components/link.d.ts +35 -4
- package/dist/kernel/components/mdx/components/link.js +1 -1
- package/dist/kernel/components/mdx/components/paragraph.js +1 -4
- package/dist/kernel/components/mdx/components/task-list.js +1 -1
- package/dist/kernel/components/mdx/components/video-player.js +2 -2
- package/dist/kernel/components/mdx/components/video.js +1 -1
- package/dist/kernel/components/mdx/error-boundary.d.ts +1 -1
- package/dist/kernel/components/mdx/mdx.d.ts +12 -8
- package/dist/kernel/components/mdx/mdx.js +115 -39
- package/dist/kernel/components/mdx/rehype-heading-ids.js +1 -1
- package/dist/kernel/components/mdx/types.d.ts +1 -1
- package/dist/kernel/components/ui/breadcrumb-trail.d.ts +6 -23
- package/dist/kernel/components/ui/breadcrumb.d.ts +11 -3
- package/dist/kernel/components/ui/breadcrumb.js +6 -4
- package/dist/kernel/components/ui/button-group.d.ts +1 -1
- package/dist/kernel/components/ui/button-group.js +5 -4
- package/dist/kernel/components/ui/button.d.ts +2 -2
- package/dist/kernel/components/ui/button.js +6 -6
- package/dist/kernel/components/ui/card.d.ts +2 -2
- package/dist/kernel/components/ui/drawer.d.ts +3 -1
- package/dist/kernel/components/ui/drawer.js +5 -1
- package/dist/kernel/components/ui/input.d.ts +4 -4
- package/dist/kernel/components/ui/kbd.d.ts +1 -1
- package/dist/kernel/components/ui/kbd.js +9 -16
- package/dist/kernel/components/ui/link.d.ts +5 -3
- package/dist/kernel/components/ui/link.js +10 -9
- package/dist/kernel/components/ui/menu.js +5 -5
- 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 +2 -2
- package/dist/kernel/components/ui/progress.js +1 -1
- package/dist/kernel/components/ui/scroll-area.d.ts +8 -8
- package/dist/kernel/components/ui/scroll-area.js +4 -4
- package/dist/kernel/components/ui/select.js +7 -10
- package/dist/kernel/components/ui/text.d.ts +2 -2
- package/dist/kernel/components/ui/theme-toggle.d.ts +3 -3
- package/dist/kernel/components/ui/theme-toggle.js +4 -9
- package/dist/kernel/defaults.registry.d.ts +9 -9
- package/dist/kernel/defaults.registry.js +9 -9
- package/dist/kernel/routes/agent/markdown.d.ts +0 -1
- package/dist/kernel/routes/layouts/group.d.ts +1 -1
- package/dist/kernel/routes/metadata/feed.d.ts +1 -1
- package/dist/kernel/routes/metadata/feed.js +13 -9
- package/dist/kernel/routes/metadata/llms.d.ts +2 -1
- package/dist/kernel/routes/metadata/llms.js +4 -4
- 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 +6 -3
- package/dist/kernel/routes/metadata/sitemap.js +48 -20
- package/dist/kernel/routes/pages/group.d.ts +1 -1
- package/dist/kernel/routes/pages/group.js +20 -12
- package/dist/kernel/routes/pages/leaf.d.ts +2 -2
- package/dist/kernel/routes/pages/leaf.js +20 -12
- package/dist/kernel/routes/pages/root.d.ts +2 -2
- package/dist/kernel/routes/pages/root.js +18 -12
- package/dist/resolvers/manifest-resolver.js +29 -6
- package/dist/search.d.ts +6 -7
- package/dist/search.js +47 -22
- package/dist/{sidebar-types-Bgchdfd6.d.ts → sidebar-types-DKpR27II.d.ts} +1 -1
- package/dist/{types-CIwwieNw.d.ts → types-BzkZty3r.d.ts} +23 -3
- 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.d.ts +14 -6
- package/dist/validate-local-source-XRL2Y7XE.js +14 -0
- package/dist/validate-publish-os-source-DAPZ4QGE.js +12 -0
- package/init/seed/minimal/.gitignore +1 -0
- package/init/seed/minimal/publish.os/assets/favicon/favicon.dark.png +0 -0
- package/init/seed/minimal/publish.os/assets/favicon/favicon.png +0 -0
- package/init/seed/minimal/publish.os/docs/content/get-started.mdx +6 -10
- package/init/seed/minimal/publish.os/docs/content/groups.mdx +1 -1
- package/init/seed/minimal/publish.os/docs/content/{theme.mdx → themes.mdx} +14 -12
- package/init/seed/minimal/publish.os/publish.os.config.json +3 -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 +4 -1
- 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 +12 -26
- package/release/app/phosphor/package.json +3 -3
- package/release/app/phosphor/pnpm-lock.yaml.template +523 -360
- package/release/app/phosphor/pnpm-workspace.yaml +3 -0
- package/release/compiler/package.json +1 -1
- package/release/compiler/pnpm-lock.yaml.template +439 -286
- package/release/compiler/pnpm-workspace.yaml +3 -0
- package/release/release.json +7 -36
- 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/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/framework-icons.d.ts +0 -1
- package/dist/kernel/framework-icons.js +0 -39
- package/dist/link-CYaCRDb6.d.ts +0 -35
- package/dist/route-metadata-og-image-BeKKFHg7.d.ts +0 -58
- package/dist/types-sM2g9nW0.d.ts +0 -12
- 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
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Link } from "@components/ui/link";
|
|
2
|
+
import type {
|
|
3
|
+
IndexPageProps,
|
|
4
|
+
PageNode,
|
|
5
|
+
TreeNode,
|
|
6
|
+
} from "@publish.os/nextjs/types";
|
|
7
|
+
import { log } from "@source/_internal/logger";
|
|
8
|
+
|
|
9
|
+
function pageNodes(nodes: TreeNode[]): PageNode[] {
|
|
10
|
+
return nodes.flatMap((node) => {
|
|
11
|
+
if (node.type === "page") return [node];
|
|
12
|
+
if (node.type === "section" || node.type === "folder") {
|
|
13
|
+
return pageNodes(node.children);
|
|
14
|
+
}
|
|
15
|
+
return [];
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default function GroupPage(props: IndexPageProps) {
|
|
20
|
+
log.debug("[default:group-page]", props);
|
|
21
|
+
const { node, tree } = props;
|
|
22
|
+
const pages = pageNodes(tree);
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<div className="flex min-h-[calc(100vh-var(--layout-global-nav-height))] min-w-0 items-start justify-center px-6 pb-16 pt-[clamp(5rem,18vh,10rem)] text-foreground-1 lg:px-10 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
|
+
<div className="w-full max-w-md">
|
|
27
|
+
<p className="mb-6 text-sm font-semibold text-foreground-1">
|
|
28
|
+
{node.title}
|
|
29
|
+
</p>
|
|
30
|
+
<h1 className="max-w-sm text-balance text-xl font-semibold leading-7 tracking-tight text-foreground-1">
|
|
31
|
+
Browse the pages in this section.
|
|
32
|
+
</h1>
|
|
33
|
+
|
|
34
|
+
{pages.length > 0 ? (
|
|
35
|
+
<nav aria-label={`${node.title} pages`} className="mt-8">
|
|
36
|
+
<ul className="flex flex-col gap-2 text-sm">
|
|
37
|
+
{pages.map((page) => (
|
|
38
|
+
<li key={`${page.group}:${page.fileID}`}>
|
|
39
|
+
<Link href={page.path} rightIcon="->" size="sm">
|
|
40
|
+
{page.title}
|
|
41
|
+
</Link>
|
|
42
|
+
</li>
|
|
43
|
+
))}
|
|
44
|
+
</ul>
|
|
45
|
+
</nav>
|
|
46
|
+
) : null}
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
@@ -7,11 +7,15 @@ export default function GroupLayout(props: LayoutProps) {
|
|
|
7
7
|
log.debug("[default:group-layout]", { currentPath, group });
|
|
8
8
|
|
|
9
9
|
return (
|
|
10
|
-
<section className="mx-auto grid min-h-[calc(
|
|
11
|
-
<aside className="fixed top-
|
|
10
|
+
<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)] xl: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))]">
|
|
11
|
+
<aside className="fixed top-(--layout-global-nav-height) z-content hidden h-[calc(100vh-var(--layout-global-nav-height))] min-h-0 border-l border-stroke-3 bg-surface-1 md:left-[max(0px,calc((100%-var(--layout-site-max-width))/2))] md:flex md:w-(--layout-sidebar-width) supports-[height:100dvh]:h-[calc(100dvh-var(--layout-global-nav-height))] supports-[top:anchor-size(--global-navbar_height)]:top-[anchor-size(--global-navbar_height,3.5rem)] supports-[top:anchor-size(--global-navbar_height)]:h-[calc(100vh-anchor-size(--global-navbar_height,3.5rem))] supports-[top:anchor-size(--global-navbar_height)]:supports-[height:100dvh]:h-[calc(100dvh-anchor-size(--global-navbar_height,3.5rem))]">
|
|
12
12
|
<Sidebar currentPath={currentPath} title={node.title} tree={tree} />
|
|
13
13
|
</aside>
|
|
14
|
-
<main
|
|
14
|
+
<main
|
|
15
|
+
className="flex min-h-0 min-w-0 flex-1 scroll-mt-[calc(var(--layout-global-nav-height)+1rem)] flex-col bg-surface-1 md:col-start-2"
|
|
16
|
+
id="main-content"
|
|
17
|
+
tabIndex={-1}
|
|
18
|
+
>
|
|
15
19
|
{children}
|
|
16
20
|
</main>
|
|
17
21
|
<aside
|
|
@@ -1,50 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
TreeNode,
|
|
6
|
-
} from "@publish.os/nextjs/types";
|
|
1
|
+
import { AgentActions } from "@components/blocks/AgentActions";
|
|
2
|
+
import { NextPrev } from "@components/blocks/next-prev";
|
|
3
|
+
import { MDX } from "@publish.os/nextjs/mdx";
|
|
4
|
+
import type { PageProps } from "@publish.os/nextjs/types";
|
|
7
5
|
import { log } from "@source/_internal/logger";
|
|
8
6
|
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default function GroupPage(props: IndexPageProps) {
|
|
20
|
-
log.debug("[default:group-page]", props);
|
|
21
|
-
const { node, tree } = props;
|
|
22
|
-
const pages = pageNodes(tree);
|
|
7
|
+
export default async function ContentPage(props: PageProps) {
|
|
8
|
+
log.debug("[default:content-page]", props);
|
|
9
|
+
const sourceUrl =
|
|
10
|
+
typeof props.page.meta.sourceUrl === "string"
|
|
11
|
+
? props.page.meta.sourceUrl
|
|
12
|
+
: typeof props.page.meta.githubUrl === "string"
|
|
13
|
+
? props.page.meta.githubUrl
|
|
14
|
+
: undefined;
|
|
23
15
|
|
|
24
16
|
return (
|
|
25
|
-
<
|
|
26
|
-
<div className="w-full max-w-
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
17
|
+
<div className="flex min-h-[calc(100vh-var(--layout-global-nav-height))] min-w-0 flex-1 flex-col px-6 py-10 text-foreground-1 lg:px-10 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))]">
|
|
18
|
+
<div className="mx-auto flex w-full max-w-(--layout-content-max-width) flex-1 flex-col">
|
|
19
|
+
<article className="min-h-0 min-w-0 flex-1">
|
|
20
|
+
<h1 className="text-3xl font-semibold tracking-tight text-foreground-1">
|
|
21
|
+
{props.page.title}
|
|
22
|
+
</h1>
|
|
23
|
+
<AgentActions
|
|
24
|
+
className="mt-4"
|
|
25
|
+
markdown={props.page.body}
|
|
26
|
+
pagePath={props.currentPath}
|
|
27
|
+
siteUrl={props.site.origin}
|
|
28
|
+
sourceUrl={sourceUrl}
|
|
29
|
+
/>
|
|
30
|
+
<div className="mt-6">
|
|
31
|
+
<MDX page={props.page} />
|
|
32
|
+
</div>
|
|
33
|
+
</article>
|
|
34
|
+
<NextPrev
|
|
35
|
+
className="mt-auto pt-12"
|
|
36
|
+
currentPath={props.currentPath}
|
|
37
|
+
tree={props.tree}
|
|
38
|
+
/>
|
|
47
39
|
</div>
|
|
48
|
-
</
|
|
40
|
+
</div>
|
|
49
41
|
);
|
|
50
42
|
}
|
|
@@ -4,36 +4,47 @@ import { dirname } from "node:path";
|
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
|
|
6
6
|
const projectRoot = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const ASSET_PREFIX = "__PUBLISHOS_ASSET_PREFIX__";
|
|
8
|
+
const IMAGE_OPTIMIZER_PATH = "__PUBLISHOS_IMAGE_PATH__";
|
|
9
|
+
const NEXT_IMAGE_OPTIMIZER_PATH = "__PUBLISHOS_NEXT_IMAGE_PATH__";
|
|
7
10
|
|
|
8
11
|
/** @type {import("next").NextConfig} */
|
|
9
12
|
export default {
|
|
13
|
+
assetPrefix: ASSET_PREFIX,
|
|
10
14
|
cacheComponents: true,
|
|
15
|
+
partialPrefetching: false,
|
|
16
|
+
// Relocating Shiki as an external loses its pnpm-owned dependencies.
|
|
17
|
+
transpilePackages: ["shiki"],
|
|
11
18
|
turbopack: {
|
|
12
19
|
resolveAlias: {
|
|
13
|
-
"@publish.os/nextjs/
|
|
14
|
-
"./source/.publishos/framework-icons.generated.tsx",
|
|
20
|
+
"@publish.os/nextjs/mdx": "./source/.publishos/mdx.tsx",
|
|
15
21
|
},
|
|
16
22
|
root: projectRoot,
|
|
17
23
|
},
|
|
18
|
-
experimental: {
|
|
19
|
-
optimizePackageImports: [
|
|
20
|
-
"@phosphor-icons/react",
|
|
21
|
-
"@tabler/icons-react",
|
|
22
|
-
"lucide-react",
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
24
|
images: {
|
|
26
25
|
dangerouslyAllowSVG: false,
|
|
27
26
|
deviceSizes: [640, 828, 1080, 1200, 1600, 1920, 2560, 3840],
|
|
28
27
|
formats: ["image/webp"],
|
|
29
28
|
imageSizes: [32, 48, 64, 96, 128, 256, 384],
|
|
29
|
+
path: IMAGE_OPTIMIZER_PATH,
|
|
30
30
|
localPatterns: [
|
|
31
|
-
{
|
|
32
|
-
|
|
31
|
+
{
|
|
32
|
+
pathname: `${ASSET_PREFIX}/_publishos/assets/**/images/**`,
|
|
33
|
+
search: "",
|
|
34
|
+
},
|
|
35
|
+
{ pathname: `${ASSET_PREFIX}/assets/images/**`, search: "" },
|
|
33
36
|
],
|
|
34
37
|
minimumCacheTTL: 2678400,
|
|
35
38
|
qualities: [50, 60, 75, 85, 95, 100],
|
|
36
39
|
},
|
|
40
|
+
async rewrites() {
|
|
41
|
+
return [
|
|
42
|
+
{
|
|
43
|
+
source: IMAGE_OPTIMIZER_PATH,
|
|
44
|
+
destination: NEXT_IMAGE_OPTIMIZER_PATH,
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
},
|
|
37
48
|
cacheLife: {
|
|
38
49
|
// Published content changes with each build, which gets new use-cache keys.
|
|
39
50
|
page: {
|
|
@@ -16,10 +16,7 @@
|
|
|
16
16
|
"baseUrl": ".",
|
|
17
17
|
"paths": {
|
|
18
18
|
"@app/*": ["./app/*"],
|
|
19
|
-
"@publish.os/nextjs/
|
|
20
|
-
"@publish.os/nextjs/kernel/framework-icons": [
|
|
21
|
-
"./source/.publishos/framework-icons.generated"
|
|
22
|
-
],
|
|
19
|
+
"@publish.os/nextjs/mdx": ["./source/.publishos/mdx"],
|
|
23
20
|
"@components/*": [
|
|
24
21
|
"./source/components/*",
|
|
25
22
|
"./node_modules/@publish.os/nextjs/dist/kernel/components/*"
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
--animation-enter-scale: 0.96;
|
|
17
17
|
--animation-enter-y: 0.25rem;
|
|
18
18
|
--animation-exit-scale: 0.98;
|
|
19
|
+
--animation-duration-search-close: 80ms;
|
|
20
|
+
--animation-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
@layer utilities {
|
|
@@ -79,12 +81,141 @@
|
|
|
79
81
|
transform: translateX(100%);
|
|
80
82
|
}
|
|
81
83
|
|
|
84
|
+
.animate-mobile-navigation {
|
|
85
|
+
transform: none;
|
|
86
|
+
transition-property: opacity;
|
|
87
|
+
transition-duration: 100ms;
|
|
88
|
+
transition-timing-function: var(--animation-ease-out);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.animate-mobile-navigation[data-starting-style],
|
|
92
|
+
.animate-mobile-navigation[data-ending-style] {
|
|
93
|
+
opacity: 0;
|
|
94
|
+
transform: none;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.animate-mobile-navigation[data-ending-style] {
|
|
98
|
+
transition-duration: 60ms;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.animate-search-dialog {
|
|
102
|
+
transform-origin: center;
|
|
103
|
+
transition-property: opacity, transform;
|
|
104
|
+
transition-duration: var(--animation-duration-fast);
|
|
105
|
+
transition-timing-function: var(--animation-ease-out);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.animate-search-dialog[data-starting-style] {
|
|
109
|
+
opacity: 0;
|
|
110
|
+
transform: scale(var(--animation-enter-scale));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.animate-search-dialog[data-ending-style] {
|
|
114
|
+
opacity: 0;
|
|
115
|
+
transform: scale(var(--animation-exit-scale));
|
|
116
|
+
transition-duration: var(--animation-duration-search-close);
|
|
117
|
+
transition-timing-function: var(--animation-ease-out);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.animate-search-backdrop[data-ending-style] {
|
|
121
|
+
transition-duration: var(--animation-duration-search-close);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.animate-search-drawer {
|
|
125
|
+
transform: translateY(var(--drawer-swipe-movement-y, 0px));
|
|
126
|
+
transition-property: transform, opacity;
|
|
127
|
+
transition-duration: var(--animation-duration-base);
|
|
128
|
+
transition-timing-function: var(--animation-ease-drawer);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.animate-search-drawer[data-starting-style] {
|
|
132
|
+
opacity: 0;
|
|
133
|
+
transform: translateY(100%);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.animate-search-drawer[data-ending-style] {
|
|
137
|
+
opacity: 0;
|
|
138
|
+
transform: translateY(100%);
|
|
139
|
+
transition-duration: var(--animation-duration-search-close);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.animate-search-drawer[data-swiping] {
|
|
143
|
+
transition-duration: 0ms;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.animate-search-backdrop {
|
|
147
|
+
opacity: calc(1 - var(--drawer-swipe-progress, 0));
|
|
148
|
+
transition-property: opacity;
|
|
149
|
+
transition-duration: var(--animation-duration-fast);
|
|
150
|
+
transition-timing-function: var(--animation-ease-out);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.animate-search-backdrop[data-starting-style],
|
|
154
|
+
.animate-search-backdrop[data-ending-style] {
|
|
155
|
+
opacity: 0;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.animate-search-results {
|
|
159
|
+
grid-template-rows: 0fr;
|
|
160
|
+
opacity: 0;
|
|
161
|
+
transition:
|
|
162
|
+
grid-template-rows 180ms var(--animation-ease-out),
|
|
163
|
+
opacity 180ms var(--animation-ease-out);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.animate-search-results[data-expanded="true"] {
|
|
167
|
+
grid-template-rows: 1fr;
|
|
168
|
+
opacity: 1;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.animate-search-progress {
|
|
172
|
+
transform: scaleX(var(--search-progress));
|
|
173
|
+
transform-origin: left;
|
|
174
|
+
transition: transform 200ms var(--animation-ease-progress);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.animate-search-progress[data-state="exiting"] {
|
|
178
|
+
transform: scaleX(0);
|
|
179
|
+
transform-origin: right;
|
|
180
|
+
transition-duration: 150ms;
|
|
181
|
+
transition-timing-function: var(--animation-ease-progress-exit);
|
|
182
|
+
}
|
|
183
|
+
|
|
82
184
|
@media (prefers-reduced-motion: reduce) {
|
|
185
|
+
.animate-mobile-navigation,
|
|
186
|
+
.animate-mobile-navigation[data-ending-style] {
|
|
187
|
+
transition-duration: 0ms;
|
|
188
|
+
}
|
|
189
|
+
|
|
83
190
|
.animate-overlay,
|
|
84
191
|
.animate-dialog-popup,
|
|
85
192
|
.animate-popup,
|
|
86
193
|
.animate-drawer-popup {
|
|
87
194
|
transition-duration: 1ms;
|
|
88
195
|
}
|
|
196
|
+
|
|
197
|
+
.animate-search-dialog,
|
|
198
|
+
.animate-search-drawer,
|
|
199
|
+
.animate-search-backdrop {
|
|
200
|
+
transition-property: opacity;
|
|
201
|
+
transition-duration: var(--animation-duration-search-close);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.animate-search-dialog[data-starting-style],
|
|
205
|
+
.animate-search-dialog[data-ending-style],
|
|
206
|
+
.animate-search-drawer[data-starting-style],
|
|
207
|
+
.animate-search-drawer[data-ending-style] {
|
|
208
|
+
transform: none;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.animate-search-results,
|
|
212
|
+
.animate-search-progress {
|
|
213
|
+
transition: none;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.animate-search-progress[data-state="exiting"] {
|
|
217
|
+
transform: none;
|
|
218
|
+
opacity: 0;
|
|
219
|
+
}
|
|
89
220
|
}
|
|
90
221
|
}
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
--dialog-foreground-2: var(--floating-foreground-2);
|
|
17
17
|
--dialog-foreground-3: var(--floating-foreground-3);
|
|
18
18
|
--dialog-stroke-2: var(--floating-stroke-2);
|
|
19
|
-
--dialog-backdrop:
|
|
19
|
+
--dialog-backdrop: light-dark(
|
|
20
|
+
color-mix(in oklab, var(--backdrop) 30%, transparent),
|
|
21
|
+
color-mix(in oklab, var(--backdrop) 50%, transparent)
|
|
22
|
+
);
|
|
20
23
|
--dialog-shadow: var(--border-shadow-1);
|
|
21
24
|
}
|
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
--navigation-menu-stroke-3: var(--floating-stroke-3);
|
|
22
22
|
--navigation-menu-highlight-surface: var(--navigation-menu-surface-3);
|
|
23
23
|
--navigation-menu-highlight-foreground: var(--navigation-menu-foreground-1);
|
|
24
|
-
--navigation-menu-shadow: var(--
|
|
24
|
+
--navigation-menu-shadow: var(--floating-shadow);
|
|
25
25
|
}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--shadow-edge-color: rgb(0 0 0);
|
|
3
3
|
--shadow-color: rgb(0 0 0);
|
|
4
|
-
--shadow-inset-opacity: 0%;
|
|
5
4
|
--shadow-edge-1-opacity: 12%;
|
|
6
5
|
--shadow-edge-2-opacity: 10%;
|
|
7
6
|
--shadow-edge-3-opacity: 8%;
|
|
8
7
|
--shadow-edge-4-opacity: 6%;
|
|
9
8
|
|
|
9
|
+
/* Floating surfaces already draw their own translucent border. */
|
|
10
|
+
--floating-shadow:
|
|
11
|
+
0 2px 6px rgb(from var(--shadow-color) r g b / 8%),
|
|
12
|
+
0 12px 24px -8px rgb(from var(--shadow-color) r g b / 12%);
|
|
13
|
+
|
|
14
|
+
/* Inset edges blend with the surface fill, not the surrounding page. */
|
|
10
15
|
--border-shadow-1:
|
|
11
16
|
inset 0 0 0 1px rgb(
|
|
12
|
-
from var(--shadow-edge-color) r g b /
|
|
13
|
-
var(--shadow-inset-opacity)
|
|
14
|
-
),
|
|
15
|
-
0 0 0 1px rgb(
|
|
16
17
|
from var(--shadow-edge-color) r g b /
|
|
17
18
|
var(--shadow-edge-1-opacity)
|
|
18
19
|
),
|
|
@@ -25,10 +26,6 @@
|
|
|
25
26
|
0 40px 48px -32px rgb(from var(--shadow-color) r g b / 4%);
|
|
26
27
|
--border-shadow-1-hover:
|
|
27
28
|
inset 0 0 0 1px rgb(
|
|
28
|
-
from var(--shadow-edge-color) r g b /
|
|
29
|
-
var(--shadow-inset-opacity)
|
|
30
|
-
),
|
|
31
|
-
0 0 0 1px rgb(
|
|
32
29
|
from var(--shadow-edge-color) r g b /
|
|
33
30
|
calc(var(--shadow-edge-1-opacity) + 2%)
|
|
34
31
|
),
|
|
@@ -42,10 +39,6 @@
|
|
|
42
39
|
|
|
43
40
|
--border-shadow-2:
|
|
44
41
|
inset 0 0 0 1px rgb(
|
|
45
|
-
from var(--shadow-edge-color) r g b /
|
|
46
|
-
var(--shadow-inset-opacity)
|
|
47
|
-
),
|
|
48
|
-
0 0 0 1px rgb(
|
|
49
42
|
from var(--shadow-edge-color) r g b /
|
|
50
43
|
var(--shadow-edge-2-opacity)
|
|
51
44
|
),
|
|
@@ -55,10 +48,6 @@
|
|
|
55
48
|
0 12px 24px -8px rgb(from var(--shadow-color) r g b / 6%);
|
|
56
49
|
--border-shadow-2-hover:
|
|
57
50
|
inset 0 0 0 1px rgb(
|
|
58
|
-
from var(--shadow-edge-color) r g b /
|
|
59
|
-
var(--shadow-inset-opacity)
|
|
60
|
-
),
|
|
61
|
-
0 0 0 1px rgb(
|
|
62
51
|
from var(--shadow-edge-color) r g b /
|
|
63
52
|
calc(var(--shadow-edge-2-opacity) + 2%)
|
|
64
53
|
),
|
|
@@ -69,15 +58,11 @@
|
|
|
69
58
|
|
|
70
59
|
--border-shadow-3:
|
|
71
60
|
inset 0 0 0 1px
|
|
72
|
-
rgb(from var(--shadow-edge-color) r g b / var(--shadow-inset-opacity)),
|
|
73
|
-
0 0 0 1px
|
|
74
61
|
rgb(from var(--shadow-edge-color) r g b / var(--shadow-edge-3-opacity)),
|
|
75
62
|
0 0.5px 1px rgb(from var(--shadow-color) r g b / 10%),
|
|
76
63
|
0 2px 4px -2px rgb(from var(--shadow-color) r g b / 6%);
|
|
77
64
|
--border-shadow-3-hover:
|
|
78
65
|
inset 0 0 0 1px
|
|
79
|
-
rgb(from var(--shadow-edge-color) r g b / var(--shadow-inset-opacity)),
|
|
80
|
-
0 0 0 1px
|
|
81
66
|
rgb(
|
|
82
67
|
from var(--shadow-edge-color) r g b /
|
|
83
68
|
calc(var(--shadow-edge-3-opacity) + 2%)
|
|
@@ -87,15 +72,11 @@
|
|
|
87
72
|
|
|
88
73
|
--border-shadow-4:
|
|
89
74
|
inset 0 0 0 1px
|
|
90
|
-
rgb(from var(--shadow-edge-color) r g b / var(--shadow-inset-opacity)),
|
|
91
|
-
0 0 0 1px
|
|
92
75
|
rgb(from var(--shadow-edge-color) r g b / var(--shadow-edge-4-opacity)),
|
|
93
76
|
0 0.5px 1px rgb(from var(--shadow-color) r g b / 6%),
|
|
94
77
|
0 1px 2px -1px rgb(from var(--shadow-color) r g b / 4%);
|
|
95
78
|
--border-shadow-4-hover:
|
|
96
79
|
inset 0 0 0 1px
|
|
97
|
-
rgb(from var(--shadow-edge-color) r g b / var(--shadow-inset-opacity)),
|
|
98
|
-
0 0 0 1px
|
|
99
80
|
rgb(
|
|
100
81
|
from var(--shadow-edge-color) r g b /
|
|
101
82
|
calc(var(--shadow-edge-4-opacity) + 2%)
|
|
@@ -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 *)
|