@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,12 @@
|
|
|
1
|
+
import type { MDXProps } from "@publish.os/nextjs/mdx/mdx";
|
|
2
|
+
import { renderMdx } from "@publish.os/nextjs/mdx/mdx";
|
|
3
|
+
import { mdxComponents } from "@source/_internal/mdx-components.generated";
|
|
4
|
+
|
|
5
|
+
export type { MDXComponents, MDXProps } from "@publish.os/nextjs/mdx/mdx";
|
|
6
|
+
export { Figure, Image, Link, Video } from "@publish.os/nextjs/mdx/mdx";
|
|
7
|
+
|
|
8
|
+
export async function MDX(props: MDXProps) {
|
|
9
|
+
return renderMdx({ ...props, siteComponents: mdxComponents });
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
Object.defineProperty(MDX, "__publishOsMdx", { value: true });
|
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
--surface-2: var(--neutral-200);
|
|
5
5
|
--surface-3: var(--neutral-300);
|
|
6
6
|
--surface-4: var(--neutral-400);
|
|
7
|
-
--surface-hover: var(--
|
|
8
|
-
--surface-active: var(--
|
|
7
|
+
--surface-hover: color-mix(in oklab, var(--foreground-1) 4%, transparent);
|
|
8
|
+
--surface-active: color-mix(in oklab, var(--foreground-1) 7%, transparent);
|
|
9
9
|
|
|
10
10
|
--foreground-1: var(--neutral-1200);
|
|
11
11
|
--foreground-2: var(--neutral-1100);
|
|
12
12
|
--foreground-3: var(--neutral-1000);
|
|
13
13
|
--foreground-4: var(--neutral-800);
|
|
14
14
|
|
|
15
|
-
--stroke-1: var(--
|
|
16
|
-
--stroke-2: var(--
|
|
17
|
-
--stroke-3: var(--
|
|
18
|
-
--stroke-4: var(--
|
|
15
|
+
--stroke-1: color-mix(in oklab, var(--foreground-1) 32%, transparent);
|
|
16
|
+
--stroke-2: color-mix(in oklab, var(--foreground-1) 18%, transparent);
|
|
17
|
+
--stroke-3: color-mix(in oklab, var(--foreground-1) 10%, transparent);
|
|
18
|
+
--stroke-4: color-mix(in oklab, var(--foreground-1) 6%, transparent);
|
|
19
19
|
--backdrop: rgb(0 0 0 / 72%);
|
|
20
20
|
|
|
21
21
|
--accent-1: var(--accent);
|
|
@@ -24,9 +24,17 @@
|
|
|
24
24
|
--accent-4: color-mix(in oklch, var(--accent) 6%, transparent);
|
|
25
25
|
/* biome-ignore lint/correctness/noUnknownFunction: CSS Color 5. */
|
|
26
26
|
--accent-foreground: contrast-color(var(--accent-1));
|
|
27
|
+
/* Keep accent text vivid, not mixed with gray. Scale chroma with lightness
|
|
28
|
+
when darkening to avoid clipping saturated accents outside sRGB. */
|
|
29
|
+
--accent-text-foreground: light-dark(
|
|
30
|
+
oklch(
|
|
31
|
+
from var(--accent-1) min(l, 0.5) calc(c * min(1, 0.5 / max(l, 0.001))) h
|
|
32
|
+
),
|
|
33
|
+
oklch(from var(--accent-1) max(l, 0.72) c h)
|
|
34
|
+
);
|
|
27
35
|
|
|
28
36
|
--accent-1-foreground: var(--accent-foreground);
|
|
29
|
-
--accent-1-stroke: var(--accent-1);
|
|
37
|
+
--accent-1-stroke: color-mix(in oklch, var(--accent-1) 85%, transparent);
|
|
30
38
|
--accent-1-hover: oklch(
|
|
31
39
|
from var(--accent-1) calc(l - 0.025) calc(c * 1.02) h
|
|
32
40
|
);
|
|
@@ -36,25 +44,25 @@
|
|
|
36
44
|
|
|
37
45
|
/* biome-ignore lint/correctness/noUnknownFunction: CSS Color 5. */
|
|
38
46
|
--accent-2-foreground: contrast-color(var(--accent-2));
|
|
39
|
-
--accent-2-stroke:
|
|
40
|
-
--accent-2-hover:
|
|
41
|
-
--accent-2-active:
|
|
47
|
+
--accent-2-stroke: oklch(from var(--accent-2) l c h / 0.3);
|
|
48
|
+
--accent-2-hover: oklch(from var(--accent-2) l c h / 0.24);
|
|
49
|
+
--accent-2-active: oklch(from var(--accent-2) l c h / 0.3);
|
|
42
50
|
|
|
43
51
|
/* biome-ignore lint/correctness/noUnknownFunction: CSS Color 5. */
|
|
44
52
|
--accent-3-foreground: contrast-color(var(--accent-3));
|
|
45
|
-
--accent-3-stroke:
|
|
46
|
-
--accent-3-hover:
|
|
47
|
-
--accent-3-active:
|
|
53
|
+
--accent-3-stroke: oklch(from var(--accent-3) l c h / 0.2);
|
|
54
|
+
--accent-3-hover: oklch(from var(--accent-3) l c h / 0.18);
|
|
55
|
+
--accent-3-active: oklch(from var(--accent-3) l c h / 0.24);
|
|
48
56
|
|
|
49
57
|
/* biome-ignore lint/correctness/noUnknownFunction: CSS Color 5. */
|
|
50
58
|
--accent-4-foreground: contrast-color(var(--accent-4));
|
|
51
|
-
--accent-4-stroke:
|
|
52
|
-
--accent-4-hover:
|
|
53
|
-
--accent-4-active:
|
|
59
|
+
--accent-4-stroke: oklch(from var(--accent-4) l c h / 0.12);
|
|
60
|
+
--accent-4-hover: oklch(from var(--accent-4) l c h / 0.1);
|
|
61
|
+
--accent-4-active: oklch(from var(--accent-4) l c h / 0.14);
|
|
54
62
|
|
|
55
|
-
--focus-stroke: var(--accent-
|
|
56
|
-
--selection-surface: var(--accent-
|
|
57
|
-
--selection-foreground: var(--
|
|
63
|
+
--focus-stroke: var(--accent-1);
|
|
64
|
+
--selection-surface: color-mix(in oklch, var(--accent-1) 12%, transparent);
|
|
65
|
+
--selection-foreground: var(--accent-1);
|
|
58
66
|
--progress-track-surface: transparent;
|
|
59
67
|
--progress-indicator-surface: var(--accent-1);
|
|
60
68
|
--progress-height: 2px;
|
|
@@ -150,12 +158,20 @@
|
|
|
150
158
|
--typography-quote-foreground: var(--foreground-2);
|
|
151
159
|
--typography-quote-stroke: var(--stroke-4);
|
|
152
160
|
--typography-caption-foreground: var(--foreground-4);
|
|
153
|
-
--typography-code-foreground: var(--foreground
|
|
154
|
-
--typography-code-surface:
|
|
155
|
-
|
|
161
|
+
--typography-code-foreground: var(--accent-text-foreground);
|
|
162
|
+
--typography-code-surface: color-mix(
|
|
163
|
+
in oklch,
|
|
164
|
+
var(--accent-1) 8%,
|
|
165
|
+
transparent
|
|
166
|
+
);
|
|
167
|
+
--typography-code-stroke: color-mix(
|
|
168
|
+
in oklch,
|
|
169
|
+
var(--accent-1) 20%,
|
|
170
|
+
transparent
|
|
171
|
+
);
|
|
156
172
|
--typography-variable-foreground: var(--accent-1);
|
|
157
173
|
--typography-pre-foreground: var(--foreground-2);
|
|
158
|
-
--typography-pre-surface: var(--surface-
|
|
174
|
+
--typography-pre-surface: var(--surface-1);
|
|
159
175
|
--typography-pre-stroke: var(--stroke-3);
|
|
160
176
|
--typography-table-heading-stroke: var(--stroke-3);
|
|
161
177
|
--typography-table-cell-stroke: var(--stroke-4);
|
|
@@ -164,8 +180,8 @@
|
|
|
164
180
|
|
|
165
181
|
--floating-surface-1: var(--surface-1);
|
|
166
182
|
--floating-surface-2: var(--surface-2);
|
|
167
|
-
--floating-surface-3: var(--surface-
|
|
168
|
-
--floating-surface-4: var(--surface-
|
|
183
|
+
--floating-surface-3: var(--surface-hover);
|
|
184
|
+
--floating-surface-4: var(--surface-active);
|
|
169
185
|
--floating-foreground-1: var(--foreground-1);
|
|
170
186
|
--floating-foreground-2: var(--foreground-2);
|
|
171
187
|
--floating-foreground-3: var(--foreground-3);
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import {
|
|
2
|
+
prepareIdeSupport
|
|
3
|
+
} from "./chunk-UF6ATARM.js";
|
|
4
|
+
import {
|
|
5
|
+
composeFrameworkSource
|
|
6
|
+
} from "./chunk-H6XILMZX.js";
|
|
7
|
+
import {
|
|
8
|
+
validateLocalSource
|
|
9
|
+
} from "./chunk-VO2I7MTM.js";
|
|
10
|
+
import "./chunk-726GV2NF.js";
|
|
11
|
+
import "./chunk-NECL5IBJ.js";
|
|
12
|
+
import "./chunk-535TM4A5.js";
|
|
13
|
+
import {
|
|
14
|
+
approveLocalComposition
|
|
15
|
+
} from "./chunk-SVYGXXYR.js";
|
|
16
|
+
import {
|
|
17
|
+
withLocalOperation
|
|
18
|
+
} from "./chunk-B2V22WRT.js";
|
|
19
|
+
import {
|
|
20
|
+
installLocalApp
|
|
21
|
+
} from "./chunk-WKTEO6RS.js";
|
|
22
|
+
import "./chunk-GGKFQ3MA.js";
|
|
23
|
+
import "./chunk-DLDFHU7Y.js";
|
|
24
|
+
import "./chunk-7OGTPSKI.js";
|
|
25
|
+
import "./chunk-YLTOLYWM.js";
|
|
26
|
+
import "./chunk-AI2UULNX.js";
|
|
27
|
+
import "./chunk-WDY4IK6Z.js";
|
|
28
|
+
|
|
29
|
+
// src/lib/compiler/lifecycle/build-operation.ts
|
|
30
|
+
async function runLocalBuild(options) {
|
|
31
|
+
return withLocalOperation({
|
|
32
|
+
sourceRoot: options.request.paths.source,
|
|
33
|
+
outputDir: options.request.paths.output,
|
|
34
|
+
operation: "build",
|
|
35
|
+
signal: options.signal,
|
|
36
|
+
run: async (lifetime) => {
|
|
37
|
+
let { source, framework } = await validateLocalSource({
|
|
38
|
+
options,
|
|
39
|
+
sourceDir: lifetime.sourceDir,
|
|
40
|
+
sourceRoot: lifetime.sourceRoot
|
|
41
|
+
});
|
|
42
|
+
return await approveLocalComposition({ options }), options.request.context?.ide && await prepareIdeSupport({
|
|
43
|
+
publishOsDir: lifetime.sourceRoot,
|
|
44
|
+
source,
|
|
45
|
+
framework,
|
|
46
|
+
frameworkOptions: { ...options, signal: lifetime.signal }
|
|
47
|
+
}), await lifetime.replaceOutput(async (outputDir) => {
|
|
48
|
+
await composeFrameworkSource({
|
|
49
|
+
request: {
|
|
50
|
+
...options.request,
|
|
51
|
+
paths: {
|
|
52
|
+
source: lifetime.sourceDir,
|
|
53
|
+
originalSource: lifetime.sourceRoot,
|
|
54
|
+
output: outputDir
|
|
55
|
+
},
|
|
56
|
+
context: {
|
|
57
|
+
...options.request.context,
|
|
58
|
+
previewUrl: void 0,
|
|
59
|
+
sourceRevision: lifetime.sourceRevision,
|
|
60
|
+
sourcePath: options.request.context?.sourcePath ?? "publish.os"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
source,
|
|
64
|
+
signal: lifetime.signal,
|
|
65
|
+
onProgress: (message) => options.onEvent?.({ type: "progress", message })
|
|
66
|
+
});
|
|
67
|
+
let app = await installLocalApp({
|
|
68
|
+
outputDir,
|
|
69
|
+
framework,
|
|
70
|
+
options,
|
|
71
|
+
lifetime
|
|
72
|
+
});
|
|
73
|
+
options.onEvent?.({
|
|
74
|
+
type: "progress",
|
|
75
|
+
message: "Building production output"
|
|
76
|
+
}), await app.run(["run", "build"]);
|
|
77
|
+
}), { status: "success", type: "result" };
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
runLocalBuild
|
|
83
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
|
|
4
|
+
declare const buttonVariants: (props?: ({
|
|
5
|
+
variant?: "solid" | "soft" | "outline" | "ghost" | null | undefined;
|
|
6
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
7
|
+
iconOnly?: boolean | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
type ButtonVariantProps = VariantProps<typeof buttonVariants>;
|
|
10
|
+
|
|
11
|
+
export type { ButtonVariantProps as B };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { ReactNode,
|
|
3
|
+
import { ReactNode, ComponentPropsWithRef } from 'react';
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
6
|
variant?: "solid" | "soft" | "outline" | "ghost" | null | undefined;
|
|
@@ -15,6 +15,6 @@ type ButtonProps = {
|
|
|
15
15
|
leftIcon?: ReactNode;
|
|
16
16
|
loading?: boolean;
|
|
17
17
|
rightIcon?: ReactNode;
|
|
18
|
-
} & ButtonVariantProps & Omit<
|
|
18
|
+
} & ButtonVariantProps & Omit<ComponentPropsWithRef<"button">, "children" | "className">;
|
|
19
19
|
|
|
20
|
-
export type {
|
|
20
|
+
export type { ButtonProps as B, ButtonVariantProps as a };
|