@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/components/ui/breadcrumb.tsx
|
|
2
|
-
import { buttonVariants } from "@
|
|
2
|
+
import { buttonVariants } from "@components/ui/button";
|
|
3
3
|
import {
|
|
4
4
|
linkVariants
|
|
5
|
-
} from "@
|
|
5
|
+
} from "@components/ui/link";
|
|
6
6
|
import {
|
|
7
7
|
Menu,
|
|
8
8
|
MenuLinkItem,
|
|
@@ -10,14 +10,14 @@ import {
|
|
|
10
10
|
MenuPortal,
|
|
11
11
|
MenuPositioner,
|
|
12
12
|
MenuTrigger
|
|
13
|
-
} from "@
|
|
13
|
+
} from "@components/ui/menu";
|
|
14
14
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
15
15
|
import { cva } from "class-variance-authority";
|
|
16
16
|
import NextLink from "next/link";
|
|
17
17
|
import {
|
|
18
18
|
Fragment
|
|
19
19
|
} from "react";
|
|
20
|
-
import { jsx, jsxs } from "
|
|
20
|
+
import { jsx, jsxs } from "@publish.os/nextjs/jsx-runtime";
|
|
21
21
|
var breadcrumbVariants = cva(
|
|
22
22
|
"flex min-w-0 flex-wrap items-center text-foreground-3",
|
|
23
23
|
{
|
|
@@ -59,7 +59,7 @@ var breadcrumbVariants = cva(
|
|
|
59
59
|
}
|
|
60
60
|
}), breadcrumbDefaultVariants = cva(
|
|
61
61
|
[
|
|
62
|
-
"inline-flex min-w-0 max-w-full truncate rounded-button text-foreground-2 opacity-100 transition-[color,opacity] hover:text-foreground-1 hover:opacity-90",
|
|
62
|
+
"inline-flex min-w-0 max-w-full items-center truncate rounded-button text-foreground-2 opacity-100 transition-[color,opacity] hover:text-foreground-1 hover:opacity-90",
|
|
63
63
|
"focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-stroke",
|
|
64
64
|
"data-[state=path-active]:text-foreground-1 data-[state=path-active]:opacity-100"
|
|
65
65
|
].join(" "),
|
|
@@ -123,6 +123,7 @@ function breadcrumbLinkClasses({
|
|
|
123
123
|
return cn(
|
|
124
124
|
buttonVariant ? buttonVariants({ size, variant: buttonVariant }) : linkVariant ? linkVariants({ color: "default", size, variant: linkVariant }) : breadcrumbDefaultVariants({ size }),
|
|
125
125
|
active ? "font-medium" : void 0,
|
|
126
|
+
!buttonVariant && !linkVariant ? "leading-none" : void 0,
|
|
126
127
|
className
|
|
127
128
|
);
|
|
128
129
|
}
|
|
@@ -193,6 +194,7 @@ function BreadcrumbPage({
|
|
|
193
194
|
className: cn(
|
|
194
195
|
variant ? breadcrumbLinkClasses({ active: !0, size, variant }) : "max-w-full truncate font-medium text-foreground-1 opacity-100",
|
|
195
196
|
breadcrumbPageVariants({ size }),
|
|
197
|
+
variant ? void 0 : "leading-none",
|
|
196
198
|
className
|
|
197
199
|
),
|
|
198
200
|
"data-state": "path-active",
|
|
@@ -211,8 +213,9 @@ function BreadcrumbSeparator({
|
|
|
211
213
|
{
|
|
212
214
|
"aria-hidden": "true",
|
|
213
215
|
className: cn(
|
|
214
|
-
"text-stroke-1",
|
|
216
|
+
"inline-flex items-center text-stroke-1",
|
|
215
217
|
breadcrumbTextVariants({ size }),
|
|
218
|
+
"leading-none",
|
|
216
219
|
className
|
|
217
220
|
),
|
|
218
221
|
role: "presentation",
|
|
@@ -281,8 +284,7 @@ function BreadcrumbTrailMenu({
|
|
|
281
284
|
{
|
|
282
285
|
"aria-label": menuLabel,
|
|
283
286
|
className: cn(
|
|
284
|
-
|
|
285
|
-
breadcrumbEllipsisVariants({ size })
|
|
287
|
+
buttonVariants({ iconOnly: !0, size, variant: "ghost" })
|
|
286
288
|
),
|
|
287
289
|
children: /* @__PURE__ */ jsx(BreadcrumbEllipsis, { size })
|
|
288
290
|
}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
// src/components/ui/button-group.tsx
|
|
2
|
-
import { buttonVariants } from "@
|
|
3
|
-
import { Separator } from "@
|
|
2
|
+
import { buttonVariants } from "@components/ui/button";
|
|
3
|
+
import { Separator } from "@components/ui/separator";
|
|
4
4
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
5
5
|
import { cva } from "class-variance-authority";
|
|
6
|
-
import { jsx } from "
|
|
6
|
+
import { jsx } from "@publish.os/nextjs/jsx-runtime";
|
|
7
7
|
var buttonGroupVariants = cva(
|
|
8
8
|
[
|
|
9
9
|
"inline-flex w-fit items-stretch",
|
|
10
10
|
"has-[>[data-slot=button-group]]:gap-2",
|
|
11
11
|
"[&>*]:focus-visible:relative [&>*]:focus-visible:z-content",
|
|
12
12
|
"[&>input]:flex-1",
|
|
13
|
-
"[&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit"
|
|
13
|
+
"[&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit",
|
|
14
|
+
"[&>:not([data-slot=button-group],[data-slot=button-group-separator])]:border [&>:not([data-slot=button-group],[data-slot=button-group-separator])]:border-stroke-3"
|
|
14
15
|
].join(" "),
|
|
15
16
|
{
|
|
16
17
|
variants: {
|
|
17
18
|
orientation: {
|
|
18
|
-
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none [&>*:has(+[data-slot=button-group-separator])]:border-r-0",
|
|
19
|
-
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>*:has(+[data-slot=button-group-separator])]:border-b-0"
|
|
19
|
+
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not([data-slot=button-group-separator]):not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none [&>*:not([data-slot=button-group-separator]):has(+[data-slot=button-group-separator])]:border-r-0",
|
|
20
|
+
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not([data-slot=button-group-separator]):not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>*:not([data-slot=button-group-separator]):has(+[data-slot=button-group-separator])]:border-b-0"
|
|
20
21
|
}
|
|
21
22
|
},
|
|
22
23
|
defaultVariants: {
|
|
@@ -75,7 +76,7 @@ function ButtonGroupSeparator({
|
|
|
75
76
|
Separator,
|
|
76
77
|
{
|
|
77
78
|
className: cn(
|
|
78
|
-
"relative
|
|
79
|
+
"relative m-0! shrink-0 self-stretch bg-stroke-3 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-auto data-[orientation=vertical]:w-px",
|
|
79
80
|
className
|
|
80
81
|
),
|
|
81
82
|
"data-slot": "button-group-separator",
|
|
@@ -1,12 +1,64 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
import { ReactNode,
|
|
4
|
+
import { ReactNode, ComponentPropsWithRef } from 'react';
|
|
5
5
|
|
|
6
|
+
declare const buttonVariantBase: string;
|
|
7
|
+
/**
|
|
8
|
+
* The default CVA recipe. Consumers that own a project Button can extend
|
|
9
|
+
* these variants and keep using the framework Button's interaction behavior.
|
|
10
|
+
*/
|
|
11
|
+
declare const buttonVariantConfig: {
|
|
12
|
+
readonly variants: {
|
|
13
|
+
readonly variant: {
|
|
14
|
+
readonly solid: "border-accent-1 bg-accent-1 text-accent-1-foreground hover:not-data-disabled:border-accent-1-hover hover:not-data-disabled:bg-accent-1-hover active:not-data-disabled:border-accent-1-active active:not-data-disabled:bg-accent-1-active data-[state=path-active]:border-accent-1-hover data-[state=path-active]:bg-accent-1-hover";
|
|
15
|
+
readonly soft: "border-0 bg-accent-2 text-accent-text-foreground hover:not-data-disabled:not-active:not-data-[state=path-active]:bg-accent-2-hover active:not-data-disabled:bg-accent-2-active data-[state=path-active]:bg-accent-2-active";
|
|
16
|
+
readonly outline: "border-stroke-2 bg-transparent text-foreground-1 hover:not-data-disabled:bg-surface-hover active:not-data-disabled:bg-surface-active data-[state=path-active]:border-accent-2-stroke data-[state=path-active]:bg-accent-2-hover data-[state=path-active]:text-accent-1";
|
|
17
|
+
readonly ghost: "border-transparent bg-transparent text-foreground-2 hover:not-data-disabled:not-active:not-data-[state=path-active]:bg-surface-hover hover:not-data-disabled:text-foreground-1 active:not-data-disabled:bg-surface-active active:not-data-disabled:text-foreground-1 data-[state=path-active]:bg-surface-active data-[state=path-active]:text-foreground-1";
|
|
18
|
+
};
|
|
19
|
+
readonly size: {
|
|
20
|
+
readonly xs: "h-7 gap-1.5 px-2 text-xs leading-none";
|
|
21
|
+
readonly sm: "h-8 px-3 text-sm leading-none";
|
|
22
|
+
readonly md: "h-10 px-4 text-sm leading-none";
|
|
23
|
+
readonly lg: "h-11 px-5 text-base leading-none";
|
|
24
|
+
readonly xl: "h-12 px-6 text-base leading-none";
|
|
25
|
+
};
|
|
26
|
+
readonly iconOnly: {
|
|
27
|
+
readonly false: "";
|
|
28
|
+
readonly true: "gap-0 px-0";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
readonly compoundVariants: readonly [{
|
|
32
|
+
readonly className: "size-7 p-0";
|
|
33
|
+
readonly iconOnly: true;
|
|
34
|
+
readonly size: "xs";
|
|
35
|
+
}, {
|
|
36
|
+
readonly className: "size-8 p-0";
|
|
37
|
+
readonly iconOnly: true;
|
|
38
|
+
readonly size: "sm";
|
|
39
|
+
}, {
|
|
40
|
+
readonly className: "size-10 p-0";
|
|
41
|
+
readonly iconOnly: true;
|
|
42
|
+
readonly size: "md";
|
|
43
|
+
}, {
|
|
44
|
+
readonly className: "size-11 p-0";
|
|
45
|
+
readonly iconOnly: true;
|
|
46
|
+
readonly size: "lg";
|
|
47
|
+
}, {
|
|
48
|
+
readonly className: "size-12 p-0";
|
|
49
|
+
readonly iconOnly: true;
|
|
50
|
+
readonly size: "xl";
|
|
51
|
+
}];
|
|
52
|
+
readonly defaultVariants: {
|
|
53
|
+
readonly iconOnly: false;
|
|
54
|
+
readonly size: "md";
|
|
55
|
+
readonly variant: "solid";
|
|
56
|
+
};
|
|
57
|
+
};
|
|
6
58
|
declare const buttonVariants: (props?: ({
|
|
7
|
-
variant?: "solid" | "soft" | "outline" | "ghost" | null | undefined;
|
|
8
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
9
|
-
iconOnly?: boolean | null | undefined;
|
|
59
|
+
readonly variant?: "solid" | "soft" | "outline" | "ghost" | null | undefined;
|
|
60
|
+
readonly size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
61
|
+
readonly iconOnly?: boolean | null | undefined;
|
|
10
62
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
63
|
type ButtonVariantProps = VariantProps<typeof buttonVariants>;
|
|
12
64
|
type ButtonProps = {
|
|
@@ -16,7 +68,7 @@ type ButtonProps = {
|
|
|
16
68
|
leftIcon?: ReactNode;
|
|
17
69
|
loading?: boolean;
|
|
18
70
|
rightIcon?: ReactNode;
|
|
19
|
-
} & ButtonVariantProps & Omit<
|
|
71
|
+
} & ButtonVariantProps & Omit<ComponentPropsWithRef<"button">, "children" | "className">;
|
|
20
72
|
declare function Button({ active, children, className, disabled, iconOnly, leftIcon, loading, rightIcon, size, type, variant, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
21
73
|
|
|
22
|
-
export { Button, type ButtonProps, type ButtonVariantProps, buttonVariants };
|
|
74
|
+
export { Button, type ButtonProps, type ButtonVariantProps, buttonVariantBase, buttonVariantConfig, buttonVariants };
|
|
@@ -2,48 +2,50 @@
|
|
|
2
2
|
import { Button as BaseButton } from "@base-ui/react/button";
|
|
3
3
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
|
-
import { jsx, jsxs } from "
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
outline: "border-stroke-2 bg-transparent text-foreground-1 hover:not-data-disabled:bg-surface-hover active:not-data-disabled:bg-surface-active data-[state=path-active]:border-accent-2-stroke data-[state=path-active]:bg-accent-2-hover data-[state=path-active]:text-accent-1",
|
|
19
|
-
ghost: "border-transparent bg-transparent text-foreground-2 hover:not-data-disabled:bg-surface-hover hover:not-data-disabled:text-foreground-1 active:not-data-disabled:bg-surface-active data-[state=path-active]:bg-accent-2-hover data-[state=path-active]:text-accent-1"
|
|
20
|
-
},
|
|
21
|
-
size: {
|
|
22
|
-
xs: "h-7 gap-1.5 px-2 text-xs",
|
|
23
|
-
sm: "h-8 px-3 text-sm",
|
|
24
|
-
md: "h-10 px-4 text-sm",
|
|
25
|
-
lg: "h-11 px-5 text-base",
|
|
26
|
-
xl: "h-12 px-6 text-base"
|
|
27
|
-
},
|
|
28
|
-
iconOnly: {
|
|
29
|
-
false: "",
|
|
30
|
-
true: "gap-0 px-0"
|
|
31
|
-
}
|
|
5
|
+
import { jsx, jsxs } from "@publish.os/nextjs/jsx-runtime";
|
|
6
|
+
var buttonVariantBase = [
|
|
7
|
+
"inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-button border font-medium leading-none",
|
|
8
|
+
"focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-stroke",
|
|
9
|
+
"disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
10
|
+
"[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"
|
|
11
|
+
].join(" "), buttonVariantConfig = {
|
|
12
|
+
variants: {
|
|
13
|
+
variant: {
|
|
14
|
+
solid: "border-accent-1 bg-accent-1 text-accent-1-foreground hover:not-data-disabled:border-accent-1-hover hover:not-data-disabled:bg-accent-1-hover active:not-data-disabled:border-accent-1-active active:not-data-disabled:bg-accent-1-active data-[state=path-active]:border-accent-1-hover data-[state=path-active]:bg-accent-1-hover",
|
|
15
|
+
soft: "border-0 bg-accent-2 text-accent-text-foreground hover:not-data-disabled:not-active:not-data-[state=path-active]:bg-accent-2-hover active:not-data-disabled:bg-accent-2-active data-[state=path-active]:bg-accent-2-active",
|
|
16
|
+
outline: "border-stroke-2 bg-transparent text-foreground-1 hover:not-data-disabled:bg-surface-hover active:not-data-disabled:bg-surface-active data-[state=path-active]:border-accent-2-stroke data-[state=path-active]:bg-accent-2-hover data-[state=path-active]:text-accent-1",
|
|
17
|
+
ghost: "border-transparent bg-transparent text-foreground-2 hover:not-data-disabled:not-active:not-data-[state=path-active]:bg-surface-hover hover:not-data-disabled:text-foreground-1 active:not-data-disabled:bg-surface-active active:not-data-disabled:text-foreground-1 data-[state=path-active]:bg-surface-active data-[state=path-active]:text-foreground-1"
|
|
32
18
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
variant: "solid"
|
|
19
|
+
size: {
|
|
20
|
+
xs: "h-7 gap-1.5 px-2 text-xs leading-none",
|
|
21
|
+
sm: "h-8 px-3 text-sm leading-none",
|
|
22
|
+
md: "h-10 px-4 text-sm leading-none",
|
|
23
|
+
lg: "h-11 px-5 text-base leading-none",
|
|
24
|
+
xl: "h-12 px-6 text-base leading-none"
|
|
25
|
+
},
|
|
26
|
+
iconOnly: {
|
|
27
|
+
false: "",
|
|
28
|
+
true: "gap-0 px-0"
|
|
44
29
|
}
|
|
30
|
+
},
|
|
31
|
+
compoundVariants: [
|
|
32
|
+
{ className: "size-7 p-0", iconOnly: !0, size: "xs" },
|
|
33
|
+
{ className: "size-8 p-0", iconOnly: !0, size: "sm" },
|
|
34
|
+
{ className: "size-10 p-0", iconOnly: !0, size: "md" },
|
|
35
|
+
{ className: "size-11 p-0", iconOnly: !0, size: "lg" },
|
|
36
|
+
{ className: "size-12 p-0", iconOnly: !0, size: "xl" }
|
|
37
|
+
],
|
|
38
|
+
defaultVariants: {
|
|
39
|
+
iconOnly: !1,
|
|
40
|
+
size: "md",
|
|
41
|
+
variant: "solid"
|
|
45
42
|
}
|
|
46
|
-
|
|
43
|
+
}, buttonVariants = cva(buttonVariantBase, {
|
|
44
|
+
...buttonVariantConfig,
|
|
45
|
+
compoundVariants: buttonVariantConfig.compoundVariants.map((variant) => ({
|
|
46
|
+
...variant
|
|
47
|
+
}))
|
|
48
|
+
});
|
|
47
49
|
function Spinner() {
|
|
48
50
|
return /* @__PURE__ */ jsx(
|
|
49
51
|
"span",
|
|
@@ -86,5 +88,7 @@ function Button({
|
|
|
86
88
|
}
|
|
87
89
|
export {
|
|
88
90
|
Button,
|
|
91
|
+
buttonVariantBase,
|
|
92
|
+
buttonVariantConfig,
|
|
89
93
|
buttonVariants
|
|
90
94
|
};
|
|
@@ -4,8 +4,8 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
import { HTMLAttributes } from 'react';
|
|
5
5
|
|
|
6
6
|
declare const cardVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
8
|
-
padding?: "
|
|
7
|
+
variant?: "default" | "elevated" | "ghost" | "inset" | null | undefined;
|
|
8
|
+
padding?: "none" | "sm" | "md" | "lg" | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
type CardProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof cardVariants>;
|
|
11
11
|
declare function Card({ className, padding, variant, ...props }: CardProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/components/ui/card.tsx
|
|
2
2
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
|
-
import { jsx } from "
|
|
4
|
+
import { jsx } from "@publish.os/nextjs/jsx-runtime";
|
|
5
5
|
var cardVariants = cva("rounded-card border text-foreground-1", {
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { Dialog as BaseDialog } from "@base-ui/react/dialog";
|
|
5
5
|
import { useThemeScope } from "@publish.os/nextjs/theme-scope";
|
|
6
6
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
7
|
-
import { jsx } from "
|
|
7
|
+
import { jsx } from "@publish.os/nextjs/jsx-runtime";
|
|
8
8
|
function Dialog(props) {
|
|
9
9
|
return /* @__PURE__ */ jsx(BaseDialog.Root, { ...props });
|
|
10
10
|
}
|
|
@@ -5,6 +5,7 @@ import { ComponentPropsWithRef } from 'react';
|
|
|
5
5
|
type DrawerProps = ComponentPropsWithRef<typeof Drawer$1.Root>;
|
|
6
6
|
type DrawerTriggerProps = ComponentPropsWithRef<typeof Drawer$1.Trigger>;
|
|
7
7
|
type DrawerPortalProps = ComponentPropsWithRef<typeof Drawer$1.Portal>;
|
|
8
|
+
type DrawerVirtualKeyboardProviderProps = ComponentPropsWithRef<typeof Drawer$1.VirtualKeyboardProvider>;
|
|
8
9
|
type DrawerBackdropProps = ComponentPropsWithRef<typeof Drawer$1.Backdrop>;
|
|
9
10
|
type DrawerViewportProps = ComponentPropsWithRef<typeof Drawer$1.Viewport>;
|
|
10
11
|
type DrawerPopupProps = ComponentPropsWithRef<typeof Drawer$1.Popup>;
|
|
@@ -12,6 +13,7 @@ type DrawerTitleProps = ComponentPropsWithRef<typeof Drawer$1.Title>;
|
|
|
12
13
|
type DrawerDescriptionProps = ComponentPropsWithRef<typeof Drawer$1.Description>;
|
|
13
14
|
type DrawerCloseProps = ComponentPropsWithRef<typeof Drawer$1.Close>;
|
|
14
15
|
declare function Drawer(props: DrawerProps): react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare function DrawerVirtualKeyboardProvider(props: DrawerVirtualKeyboardProviderProps): react_jsx_runtime.JSX.Element;
|
|
15
17
|
declare function DrawerTrigger({ className, ...props }: DrawerTriggerProps): react_jsx_runtime.JSX.Element;
|
|
16
18
|
declare function DrawerPortal(props: DrawerPortalProps): react_jsx_runtime.JSX.Element;
|
|
17
19
|
declare function DrawerBackdrop({ className, ...props }: DrawerBackdropProps): react_jsx_runtime.JSX.Element;
|
|
@@ -21,4 +23,4 @@ declare function DrawerTitle({ className, ...props }: DrawerTitleProps): react_j
|
|
|
21
23
|
declare function DrawerDescription({ className, ...props }: DrawerDescriptionProps): react_jsx_runtime.JSX.Element;
|
|
22
24
|
declare function DrawerClose({ className, ...props }: DrawerCloseProps): react_jsx_runtime.JSX.Element;
|
|
23
25
|
|
|
24
|
-
export { Drawer, DrawerBackdrop, type DrawerBackdropProps, DrawerClose, type DrawerCloseProps, DrawerDescription, type DrawerDescriptionProps, DrawerPopup, type DrawerPopupProps, DrawerPortal, type DrawerPortalProps, type DrawerProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, DrawerViewport, type DrawerViewportProps };
|
|
26
|
+
export { Drawer, DrawerBackdrop, type DrawerBackdropProps, DrawerClose, type DrawerCloseProps, DrawerDescription, type DrawerDescriptionProps, DrawerPopup, type DrawerPopupProps, DrawerPortal, type DrawerPortalProps, type DrawerProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, DrawerViewport, type DrawerViewportProps, DrawerVirtualKeyboardProvider, type DrawerVirtualKeyboardProviderProps };
|
|
@@ -4,10 +4,13 @@
|
|
|
4
4
|
import { Drawer as BaseDrawer } from "@base-ui/react/drawer";
|
|
5
5
|
import { useThemeScope } from "@publish.os/nextjs/theme-scope";
|
|
6
6
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
7
|
-
import { jsx } from "
|
|
7
|
+
import { jsx } from "@publish.os/nextjs/jsx-runtime";
|
|
8
8
|
function Drawer(props) {
|
|
9
9
|
return /* @__PURE__ */ jsx(BaseDrawer.Root, { ...props });
|
|
10
10
|
}
|
|
11
|
+
function DrawerVirtualKeyboardProvider(props) {
|
|
12
|
+
return /* @__PURE__ */ jsx(BaseDrawer.VirtualKeyboardProvider, { ...props });
|
|
13
|
+
}
|
|
11
14
|
function DrawerTrigger({ className, ...props }) {
|
|
12
15
|
return /* @__PURE__ */ jsx(
|
|
13
16
|
BaseDrawer.Trigger,
|
|
@@ -109,5 +112,6 @@ export {
|
|
|
109
112
|
DrawerPortal,
|
|
110
113
|
DrawerTitle,
|
|
111
114
|
DrawerTrigger,
|
|
112
|
-
DrawerViewport
|
|
115
|
+
DrawerViewport,
|
|
116
|
+
DrawerVirtualKeyboardProvider
|
|
113
117
|
};
|
|
@@ -7,12 +7,12 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
7
7
|
|
|
8
8
|
declare const inputVariants: (props?: ({
|
|
9
9
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
10
|
-
variant?: "
|
|
10
|
+
variant?: "default" | "ghost" | null | undefined;
|
|
11
11
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
12
|
type InputProps = ComponentPropsWithoutRef<typeof Input$1> & VariantProps<typeof inputVariants>;
|
|
13
13
|
declare const Input: react.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.InputProps, "ref"> & react.RefAttributes<HTMLElement>, "ref"> & VariantProps<(props?: ({
|
|
14
14
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
15
|
-
variant?: "
|
|
15
|
+
variant?: "default" | "ghost" | null | undefined;
|
|
16
16
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & react.RefAttributes<HTMLInputElement>>;
|
|
17
17
|
|
|
18
18
|
export { Input, type InputProps, inputVariants };
|
|
@@ -3,7 +3,7 @@ import { Input as BaseInput } from "@base-ui/react/input";
|
|
|
3
3
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import { forwardRef } from "react";
|
|
6
|
-
import { jsx } from "
|
|
6
|
+
import { jsx } from "@publish.os/nextjs/jsx-runtime";
|
|
7
7
|
var inputVariants = cva(
|
|
8
8
|
[
|
|
9
9
|
"flex w-full rounded-input border bg-surface-1 text-foreground-1 transition-colors",
|
|
@@ -1,30 +1,23 @@
|
|
|
1
1
|
// src/components/ui/kbd.tsx
|
|
2
2
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
|
-
import { jsx } from "
|
|
4
|
+
import { jsx } from "@publish.os/nextjs/jsx-runtime";
|
|
5
5
|
var kbdVariants = cva(
|
|
6
|
-
"not-markdown-prose relative -
|
|
6
|
+
"not-markdown-prose relative inline-flex h-[1.9em] min-w-[1.9em] shrink-0 select-none items-center justify-center whitespace-nowrap bg-surface-1 align-text-top font-sans font-normal leading-none text-foreground-1 [--kbd-fallback-shadow:inset_0_-0.05em_0.5em_color-mix(in_oklab,var(--stroke-4)_80%,transparent),inset_0_0.05em_color-mix(in_oklab,var(--neutral-100)_95%,transparent),inset_0_0.25em_0.5em_color-mix(in_oklab,var(--surface-3)_70%,transparent),inset_0_-0.075em_color-mix(in_oklab,var(--stroke-1)_58%,var(--stroke-2)),0_0_0_0.065em_color-mix(in_oklab,var(--stroke-2)_82%,transparent),0_0.08em_0.17em_color-mix(in_oklab,var(--stroke-1)_45%,transparent)] [--kbd-fallback-shadow-active:inset_0_0.05em_color-mix(in_oklab,var(--foreground-4)_45%,transparent),0_0_0_0.065em_color-mix(in_oklab,var(--stroke-1)_64%,transparent)] [border-radius:max(var(--radius-kbd),1px)] [box-shadow:var(--kbd-shadow,var(--kbd-fallback-shadow))] [word-spacing:-0.1em] transition-[background-color,box-shadow] duration-150 hover:bg-surface-hover hover:[box-shadow:var(--kbd-shadow,var(--kbd-fallback-shadow)),0_0_0_0.05em_color-mix(in_oklab,var(--stroke-2)_50%,transparent)] focus-visible:outline-2 focus-visible:outline-focus-stroke active:translate-y-px active:bg-surface-active active:[box-shadow:var(--kbd-shadow-active,var(--kbd-fallback-shadow-active))] [&_*]:leading-none",
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
9
9
|
size: {
|
|
10
|
-
xs: "
|
|
11
|
-
sm: "
|
|
12
|
-
md: "
|
|
13
|
-
lg: "
|
|
14
|
-
xl: "
|
|
10
|
+
xs: "text-[0.625rem]",
|
|
11
|
+
sm: "text-xs",
|
|
12
|
+
md: "text-sm",
|
|
13
|
+
lg: "text-base",
|
|
14
|
+
xl: "text-lg"
|
|
15
15
|
},
|
|
16
16
|
square: {
|
|
17
|
-
false: "",
|
|
18
|
-
true: "px-0"
|
|
17
|
+
false: "px-[0.45em]",
|
|
18
|
+
true: "w-[1.9em] px-0"
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
|
-
compoundVariants: [
|
|
22
|
-
{ className: "w-[1.75em]", size: "xs", square: !0 },
|
|
23
|
-
{ className: "w-[1.75em]", size: "sm", square: !0 },
|
|
24
|
-
{ className: "w-[1.75em]", size: "md", square: !0 },
|
|
25
|
-
{ className: "w-[1.75em]", size: "lg", square: !0 },
|
|
26
|
-
{ className: "w-[1.75em]", size: "xl", square: !0 }
|
|
27
|
-
],
|
|
28
21
|
defaultVariants: {
|
|
29
22
|
size: "md",
|
|
30
23
|
square: !1
|
|
@@ -32,7 +25,7 @@ var kbdVariants = cva(
|
|
|
32
25
|
}
|
|
33
26
|
);
|
|
34
27
|
function isSingleCharacter(children) {
|
|
35
|
-
return typeof children == "string" && Array.from(children.trim()).length === 1;
|
|
28
|
+
return (typeof children == "string" || typeof children == "number") && Array.from(String(children).trim()).length === 1;
|
|
36
29
|
}
|
|
37
30
|
function Kbd({ children, className, size, square, ...props }) {
|
|
38
31
|
return /* @__PURE__ */ jsx(
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
-
import { ButtonVariantProps } from './button.js';
|
|
4
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { LinkProps as LinkProps$1 } from 'next/link';
|
|
5
5
|
import { ReactNode, AnchorHTMLAttributes } from 'react';
|
|
6
6
|
|
|
7
|
+
declare const buttonVariants: (props?: ({
|
|
8
|
+
readonly variant?: "ghost" | "solid" | "soft" | "outline" | null | undefined;
|
|
9
|
+
readonly size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
10
|
+
readonly iconOnly?: boolean | null | undefined;
|
|
11
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
|
+
type ButtonVariantProps = VariantProps<typeof buttonVariants>;
|
|
13
|
+
|
|
7
14
|
declare const linkVariants: (props?: ({
|
|
8
|
-
color?: "
|
|
15
|
+
color?: "default" | "accent" | null | undefined;
|
|
9
16
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
10
17
|
variant?: "inline" | "standalone" | null | undefined;
|
|
11
18
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
@@ -23,9 +30,10 @@ type LinkProps = {
|
|
|
23
30
|
href?: string;
|
|
24
31
|
iconOnly?: ButtonVariantProps["iconOnly"];
|
|
25
32
|
leftIcon?: ReactNode;
|
|
33
|
+
prefetch?: LinkProps$1["prefetch"];
|
|
26
34
|
rightIcon?: ReactNode;
|
|
27
35
|
variant?: LinkVariant;
|
|
28
36
|
} & Omit<LinkVariantProps, "color" | "variant"> & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "color" | "href">;
|
|
29
|
-
declare function Link({ active, children, className, color, disabled, href, iconOnly, leftIcon, rel, rightIcon, size, style, target, variant, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
|
|
37
|
+
declare function Link({ active, children, className, color, disabled, href, iconOnly, leftIcon, prefetch, rel, rightIcon, size, style, target, variant, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
|
|
30
38
|
|
|
31
39
|
export { Link, type LinkButtonVariant, type LinkProps, type LinkStyleVariant, type LinkVariant, type LinkVariantProps, linkVariants };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// src/components/ui/link.tsx
|
|
2
|
-
import { buttonVariants } from "@
|
|
2
|
+
import { buttonVariants } from "@components/ui/button";
|
|
3
3
|
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import NextLink from "next/link";
|
|
6
6
|
|
|
7
|
-
// ../../node_modules/.pnpm/tailwindcss@4.3.
|
|
8
|
-
var l = { inherit: "inherit", current: "currentcolor", transparent: "transparent", black: "#000", white: "#fff", slate: { 50: "oklch(98.4% 0.003 247.858)", 100: "oklch(96.8% 0.007 247.896)", 200: "oklch(92.9% 0.013 255.508)", 300: "oklch(86.9% 0.022 252.894)", 400: "oklch(70.4% 0.04 256.788)", 500: "oklch(55.4% 0.046 257.417)", 600: "oklch(44.6% 0.043 257.281)", 700: "oklch(37.2% 0.044 257.287)", 800: "oklch(27.9% 0.041 260.031)", 900: "oklch(20.8% 0.042 265.755)", 950: "oklch(12.9% 0.042 264.695)" }, gray: { 50: "oklch(98.5% 0.002 247.839)", 100: "oklch(96.7% 0.003 264.542)", 200: "oklch(92.8% 0.006 264.531)", 300: "oklch(87.2% 0.01 258.338)", 400: "oklch(70.7% 0.022 261.325)", 500: "oklch(55.1% 0.027 264.364)", 600: "oklch(44.6% 0.03 256.802)", 700: "oklch(37.3% 0.034 259.733)", 800: "oklch(27.8% 0.033 256.848)", 900: "oklch(21% 0.034 264.665)", 950: "oklch(13% 0.028 261.692)" }, zinc: { 50: "oklch(98.5% 0 0)", 100: "oklch(96.7% 0.001 286.375)", 200: "oklch(92% 0.004 286.32)", 300: "oklch(87.1% 0.006 286.286)", 400: "oklch(70.5% 0.015 286.067)", 500: "oklch(55.2% 0.016 285.938)", 600: "oklch(44.2% 0.017 285.786)", 700: "oklch(37% 0.013 285.805)", 800: "oklch(27.4% 0.006 286.033)", 900: "oklch(21% 0.006 285.885)", 950: "oklch(14.1% 0.005 285.823)" }, neutral: { 50: "oklch(98.5% 0 0)", 100: "oklch(97% 0 0)", 200: "oklch(92.2% 0 0)", 300: "oklch(87% 0 0)", 400: "oklch(70.8% 0 0)", 500: "oklch(55.6% 0 0)", 600: "oklch(43.9% 0 0)", 700: "oklch(37.1% 0 0)", 800: "oklch(26.9% 0 0)", 900: "oklch(20.5% 0 0)", 950: "oklch(14.5% 0 0)" }, stone: { 50: "oklch(98.5% 0.001 106.423)", 100: "oklch(97% 0.001 106.424)", 200: "oklch(92.3% 0.003 48.717)", 300: "oklch(86.9% 0.005 56.366)", 400: "oklch(70.9% 0.01 56.259)", 500: "oklch(55.3% 0.013 58.071)", 600: "oklch(44.4% 0.011 73.639)", 700: "oklch(37.4% 0.01 67.558)", 800: "oklch(26.8% 0.007 34.298)", 900: "oklch(21.6% 0.006 56.043)", 950: "oklch(14.7% 0.004 49.25)" }, mauve: { 50: "oklch(98.5% 0 0)", 100: "oklch(96% 0.003 325.6)", 200: "oklch(92.2% 0.005 325.62)", 300: "oklch(86.5% 0.012 325.68)", 400: "oklch(71.1% 0.019 323.02)", 500: "oklch(54.2% 0.034 322.5)", 600: "oklch(43.5% 0.029 321.78)", 700: "oklch(36.4% 0.029 323.89)", 800: "oklch(26.3% 0.024 320.12)", 900: "oklch(21.2% 0.019 322.12)", 950: "oklch(14.5% 0.008 326)" }, olive: { 50: "oklch(98.8% 0.003 106.5)", 100: "oklch(96.6% 0.005 106.5)", 200: "oklch(93% 0.007 106.5)", 300: "oklch(88% 0.011 106.6)", 400: "oklch(73.7% 0.021 106.9)", 500: "oklch(58% 0.031 107.3)", 600: "oklch(46.6% 0.025 107.3)", 700: "oklch(39.4% 0.023 107.4)", 800: "oklch(28.6% 0.016 107.4)", 900: "oklch(22.8% 0.013 107.4)", 950: "oklch(15.3% 0.006 107.1)" }, mist: { 50: "oklch(98.7% 0.002 197.1)", 100: "oklch(96.3% 0.002 197.1)", 200: "oklch(92.5% 0.005 214.3)", 300: "oklch(87.2% 0.007 219.6)", 400: "oklch(72.3% 0.014 214.4)", 500: "oklch(56% 0.021 213.5)", 600: "oklch(45% 0.017 213.2)", 700: "oklch(37.8% 0.015 216)", 800: "oklch(27.5% 0.011 216.9)", 900: "oklch(21.8% 0.008 223.9)", 950: "oklch(14.8% 0.004 228.8)" }, taupe: { 50: "oklch(98.6% 0.002 67.8)", 100: "oklch(96% 0.002 17.2)", 200: "oklch(92.2% 0.005 34.3)", 300: "oklch(86.8% 0.007 39.5)", 400: "oklch(71.4% 0.014 41.2)", 500: "oklch(54.7% 0.021 43.1)", 600: "oklch(43.8% 0.017 39.3)", 700: "oklch(36.7% 0.016 35.7)", 800: "oklch(26.8% 0.011 36.5)", 900: "oklch(21.4% 0.009 43.1)", 950: "oklch(14.7% 0.004 49.3)" }, red: { 50: "oklch(97.1% 0.013 17.38)", 100: "oklch(93.6% 0.032 17.717)", 200: "oklch(88.5% 0.062 18.334)", 300: "oklch(80.8% 0.114 19.571)", 400: "oklch(70.4% 0.191 22.216)", 500: "oklch(63.7% 0.237 25.331)", 600: "oklch(57.7% 0.245 27.325)", 700: "oklch(50.5% 0.213 27.518)", 800: "oklch(44.4% 0.177 26.899)", 900: "oklch(39.6% 0.141 25.723)", 950: "oklch(25.8% 0.092 26.042)" }, orange: { 50: "oklch(98% 0.016 73.684)", 100: "oklch(95.4% 0.038 75.164)", 200: "oklch(90.1% 0.076 70.697)", 300: "oklch(83.7% 0.128 66.29)", 400: "oklch(75% 0.183 55.934)", 500: "oklch(70.5% 0.213 47.604)", 600: "oklch(64.6% 0.222 41.116)", 700: "oklch(55.3% 0.195 38.402)", 800: "oklch(47% 0.157 37.304)", 900: "oklch(40.8% 0.123 38.172)", 950: "oklch(26.6% 0.079 36.259)" }, amber: { 50: "oklch(98.7% 0.022 95.277)", 100: "oklch(96.2% 0.059 95.617)", 200: "oklch(92.4% 0.12 95.746)", 300: "oklch(87.9% 0.169 91.605)", 400: "oklch(82.8% 0.189 84.429)", 500: "oklch(76.9% 0.188 70.08)", 600: "oklch(66.6% 0.179 58.318)", 700: "oklch(55.5% 0.163 48.998)", 800: "oklch(47.3% 0.137 46.201)", 900: "oklch(41.4% 0.112 45.904)", 950: "oklch(27.9% 0.077 45.635)" }, yellow: { 50: "oklch(98.7% 0.026 102.212)", 100: "oklch(97.3% 0.071 103.193)", 200: "oklch(94.5% 0.129 101.54)", 300: "oklch(90.5% 0.182 98.111)", 400: "oklch(85.2% 0.199 91.936)", 500: "oklch(79.5% 0.184 86.047)", 600: "oklch(68.1% 0.162 75.834)", 700: "oklch(55.4% 0.135 66.442)", 800: "oklch(47.6% 0.114 61.907)", 900: "oklch(42.1% 0.095 57.708)", 950: "oklch(28.6% 0.066 53.813)" }, lime: { 50: "oklch(98.6% 0.031 120.757)", 100: "oklch(96.7% 0.067 122.328)", 200: "oklch(93.8% 0.127 124.321)", 300: "oklch(89.7% 0.196 126.665)", 400: "oklch(84.1% 0.238 128.85)", 500: "oklch(76.8% 0.233 130.85)", 600: "oklch(64.8% 0.2 131.684)", 700: "oklch(53.2% 0.157 131.589)", 800: "oklch(45.3% 0.124 130.933)", 900: "oklch(40.5% 0.101 131.063)", 950: "oklch(27.4% 0.072 132.109)" }, green: { 50: "oklch(98.2% 0.018 155.826)", 100: "oklch(96.2% 0.044 156.743)", 200: "oklch(92.5% 0.084 155.995)", 300: "oklch(87.1% 0.15 154.449)", 400: "oklch(79.2% 0.209 151.711)", 500: "oklch(72.3% 0.219 149.579)", 600: "oklch(62.7% 0.194 149.214)", 700: "oklch(52.7% 0.154 150.069)", 800: "oklch(44.8% 0.119 151.328)", 900: "oklch(39.3% 0.095 152.535)", 950: "oklch(26.6% 0.065 152.934)" }, emerald: { 50: "oklch(97.9% 0.021 166.113)", 100: "oklch(95% 0.052 163.051)", 200: "oklch(90.5% 0.093 164.15)", 300: "oklch(84.5% 0.143 164.978)", 400: "oklch(76.5% 0.177 163.223)", 500: "oklch(69.6% 0.17 162.48)", 600: "oklch(59.6% 0.145 163.225)", 700: "oklch(50.8% 0.118 165.612)", 800: "oklch(43.2% 0.095 166.913)", 900: "oklch(37.8% 0.077 168.94)", 950: "oklch(26.2% 0.051 172.552)" }, teal: { 50: "oklch(98.4% 0.014 180.72)", 100: "oklch(95.3% 0.051 180.801)", 200: "oklch(91% 0.096 180.426)", 300: "oklch(85.5% 0.138 181.071)", 400: "oklch(77.7% 0.152 181.912)", 500: "oklch(70.4% 0.14 182.503)", 600: "oklch(60% 0.118 184.704)", 700: "oklch(51.1% 0.096 186.391)", 800: "oklch(43.7% 0.078 188.216)", 900: "oklch(38.6% 0.063 188.416)", 950: "oklch(27.7% 0.046 192.524)" }, cyan: { 50: "oklch(98.4% 0.019 200.873)", 100: "oklch(95.6% 0.045 203.388)", 200: "oklch(91.7% 0.08 205.041)", 300: "oklch(86.5% 0.127 207.078)", 400: "oklch(78.9% 0.154 211.53)", 500: "oklch(71.5% 0.143 215.221)", 600: "oklch(60.9% 0.126 221.723)", 700: "oklch(52% 0.105 223.128)", 800: "oklch(45% 0.085 224.283)", 900: "oklch(39.8% 0.07 227.392)", 950: "oklch(30.2% 0.056 229.695)" }, sky: { 50: "oklch(97.7% 0.013 236.62)", 100: "oklch(95.1% 0.026 236.824)", 200: "oklch(90.1% 0.058 230.902)", 300: "oklch(82.8% 0.111 230.318)", 400: "oklch(74.6% 0.16 232.661)", 500: "oklch(68.5% 0.169 237.323)", 600: "oklch(58.8% 0.158 241.966)", 700: "oklch(50% 0.134 242.749)", 800: "oklch(44.3% 0.11 240.79)", 900: "oklch(39.1% 0.09 240.876)", 950: "oklch(29.3% 0.066 243.157)" }, blue: { 50: "oklch(97% 0.014 254.604)", 100: "oklch(93.2% 0.032 255.585)", 200: "oklch(88.2% 0.059 254.128)", 300: "oklch(80.9% 0.105 251.813)", 400: "oklch(70.7% 0.165 254.624)", 500: "oklch(62.3% 0.214 259.815)", 600: "oklch(54.6% 0.245 262.881)", 700: "oklch(48.8% 0.243 264.376)", 800: "oklch(42.4% 0.199 265.638)", 900: "oklch(37.9% 0.146 265.522)", 950: "oklch(28.2% 0.091 267.935)" }, indigo: { 50: "oklch(96.2% 0.018 272.314)", 100: "oklch(93% 0.034 272.788)", 200: "oklch(87% 0.065 274.039)", 300: "oklch(78.5% 0.115 274.713)", 400: "oklch(67.3% 0.182 276.935)", 500: "oklch(58.5% 0.233 277.117)", 600: "oklch(51.1% 0.262 276.966)", 700: "oklch(45.7% 0.24 277.023)", 800: "oklch(39.8% 0.195 277.366)", 900: "oklch(35.9% 0.144 278.697)", 950: "oklch(25.7% 0.09 281.288)" }, violet: { 50: "oklch(96.9% 0.016 293.756)", 100: "oklch(94.3% 0.029 294.588)", 200: "oklch(89.4% 0.057 293.283)", 300: "oklch(81.1% 0.111 293.571)", 400: "oklch(70.2% 0.183 293.541)", 500: "oklch(60.6% 0.25 292.717)", 600: "oklch(54.1% 0.281 293.009)", 700: "oklch(49.1% 0.27 292.581)", 800: "oklch(43.2% 0.232 292.759)", 900: "oklch(38% 0.189 293.745)", 950: "oklch(28.3% 0.141 291.089)" }, purple: { 50: "oklch(97.7% 0.014 308.299)", 100: "oklch(94.6% 0.033 307.174)", 200: "oklch(90.2% 0.063 306.703)", 300: "oklch(82.7% 0.119 306.383)", 400: "oklch(71.4% 0.203 305.504)", 500: "oklch(62.7% 0.265 303.9)", 600: "oklch(55.8% 0.288 302.321)", 700: "oklch(49.6% 0.265 301.924)", 800: "oklch(43.8% 0.218 303.724)", 900: "oklch(38.1% 0.176 304.987)", 950: "oklch(29.1% 0.149 302.717)" }, fuchsia: { 50: "oklch(97.7% 0.017 320.058)", 100: "oklch(95.2% 0.037 318.852)", 200: "oklch(90.3% 0.076 319.62)", 300: "oklch(83.3% 0.145 321.434)", 400: "oklch(74% 0.238 322.16)", 500: "oklch(66.7% 0.295 322.15)", 600: "oklch(59.1% 0.293 322.896)", 700: "oklch(51.8% 0.253 323.949)", 800: "oklch(45.2% 0.211 324.591)", 900: "oklch(40.1% 0.17 325.612)", 950: "oklch(29.3% 0.136 325.661)" }, pink: { 50: "oklch(97.1% 0.014 343.198)", 100: "oklch(94.8% 0.028 342.258)", 200: "oklch(89.9% 0.061 343.231)", 300: "oklch(82.3% 0.12 346.018)", 400: "oklch(71.8% 0.202 349.761)", 500: "oklch(65.6% 0.241 354.308)", 600: "oklch(59.2% 0.249 0.584)", 700: "oklch(52.5% 0.223 3.958)", 800: "oklch(45.9% 0.187 3.815)", 900: "oklch(40.8% 0.153 2.432)", 950: "oklch(28.4% 0.109 3.907)" }, rose: { 50: "oklch(96.9% 0.015 12.422)", 100: "oklch(94.1% 0.03 12.58)", 200: "oklch(89.2% 0.058 10.001)", 300: "oklch(81% 0.117 11.638)", 400: "oklch(71.2% 0.194 13.428)", 500: "oklch(64.5% 0.246 16.439)", 600: "oklch(58.6% 0.253 17.585)", 700: "oklch(51.4% 0.222 16.935)", 800: "oklch(45.5% 0.188 13.697)", 900: "oklch(41% 0.159 10.272)", 950: "oklch(27.1% 0.105 12.094)" } };
|
|
7
|
+
// ../../node_modules/.pnpm/tailwindcss@4.3.3/node_modules/tailwindcss/dist/chunk-DCG7AFIE.mjs
|
|
8
|
+
var o = { inherit: "inherit", current: "currentcolor", transparent: "transparent", black: "#000", white: "#fff", slate: { 50: "oklch(98.4% 0.003 247.858)", 100: "oklch(96.8% 0.007 247.896)", 200: "oklch(92.9% 0.013 255.508)", 300: "oklch(86.9% 0.022 252.894)", 400: "oklch(70.4% 0.04 256.788)", 500: "oklch(55.4% 0.046 257.417)", 600: "oklch(44.6% 0.043 257.281)", 700: "oklch(37.2% 0.044 257.287)", 800: "oklch(27.9% 0.041 260.031)", 900: "oklch(20.8% 0.042 265.755)", 950: "oklch(12.9% 0.042 264.695)" }, gray: { 50: "oklch(98.5% 0.002 247.839)", 100: "oklch(96.7% 0.003 264.542)", 200: "oklch(92.8% 0.006 264.531)", 300: "oklch(87.2% 0.01 258.338)", 400: "oklch(70.7% 0.022 261.325)", 500: "oklch(55.1% 0.027 264.364)", 600: "oklch(44.6% 0.03 256.802)", 700: "oklch(37.3% 0.034 259.733)", 800: "oklch(27.8% 0.033 256.848)", 900: "oklch(21% 0.034 264.665)", 950: "oklch(13% 0.028 261.692)" }, zinc: { 50: "oklch(98.5% 0 none)", 100: "oklch(96.7% 0.001 286.375)", 200: "oklch(92% 0.004 286.32)", 300: "oklch(87.1% 0.006 286.286)", 400: "oklch(70.5% 0.015 286.067)", 500: "oklch(55.2% 0.016 285.938)", 600: "oklch(44.2% 0.017 285.786)", 700: "oklch(37% 0.013 285.805)", 800: "oklch(27.4% 0.006 286.033)", 900: "oklch(21% 0.006 285.885)", 950: "oklch(14.1% 0.005 285.823)" }, neutral: { 50: "oklch(98.5% 0 none)", 100: "oklch(97% 0 none)", 200: "oklch(92.2% 0 none)", 300: "oklch(87% 0 none)", 400: "oklch(70.8% 0 none)", 500: "oklch(55.6% 0 none)", 600: "oklch(43.9% 0 none)", 700: "oklch(37.1% 0 none)", 800: "oklch(26.9% 0 none)", 900: "oklch(20.5% 0 none)", 950: "oklch(14.5% 0 none)" }, stone: { 50: "oklch(98.5% 0.001 106.423)", 100: "oklch(97% 0.001 106.424)", 200: "oklch(92.3% 0.003 48.717)", 300: "oklch(86.9% 0.005 56.366)", 400: "oklch(70.9% 0.01 56.259)", 500: "oklch(55.3% 0.013 58.071)", 600: "oklch(44.4% 0.011 73.639)", 700: "oklch(37.4% 0.01 67.558)", 800: "oklch(26.8% 0.007 34.298)", 900: "oklch(21.6% 0.006 56.043)", 950: "oklch(14.7% 0.004 49.25)" }, mauve: { 50: "oklch(98.5% 0 none)", 100: "oklch(96% 0.003 325.6)", 200: "oklch(92.2% 0.005 325.62)", 300: "oklch(86.5% 0.012 325.68)", 400: "oklch(71.1% 0.019 323.02)", 500: "oklch(54.2% 0.034 322.5)", 600: "oklch(43.5% 0.029 321.78)", 700: "oklch(36.4% 0.029 323.89)", 800: "oklch(26.3% 0.024 320.12)", 900: "oklch(21.2% 0.019 322.12)", 950: "oklch(14.5% 0.008 326)" }, olive: { 50: "oklch(98.8% 0.003 106.5)", 100: "oklch(96.6% 0.005 106.5)", 200: "oklch(93% 0.007 106.5)", 300: "oklch(88% 0.011 106.6)", 400: "oklch(73.7% 0.021 106.9)", 500: "oklch(58% 0.031 107.3)", 600: "oklch(46.6% 0.025 107.3)", 700: "oklch(39.4% 0.023 107.4)", 800: "oklch(28.6% 0.016 107.4)", 900: "oklch(22.8% 0.013 107.4)", 950: "oklch(15.3% 0.006 107.1)" }, mist: { 50: "oklch(98.7% 0.002 197.1)", 100: "oklch(96.3% 0.002 197.1)", 200: "oklch(92.5% 0.005 214.3)", 300: "oklch(87.2% 0.007 219.6)", 400: "oklch(72.3% 0.014 214.4)", 500: "oklch(56% 0.021 213.5)", 600: "oklch(45% 0.017 213.2)", 700: "oklch(37.8% 0.015 216)", 800: "oklch(27.5% 0.011 216.9)", 900: "oklch(21.8% 0.008 223.9)", 950: "oklch(14.8% 0.004 228.8)" }, taupe: { 50: "oklch(98.6% 0.002 67.8)", 100: "oklch(96% 0.002 17.2)", 200: "oklch(92.2% 0.005 34.3)", 300: "oklch(86.8% 0.007 39.5)", 400: "oklch(71.4% 0.014 41.2)", 500: "oklch(54.7% 0.021 43.1)", 600: "oklch(43.8% 0.017 39.3)", 700: "oklch(36.7% 0.016 35.7)", 800: "oklch(26.8% 0.011 36.5)", 900: "oklch(21.4% 0.009 43.1)", 950: "oklch(14.7% 0.004 49.3)" }, red: { 50: "oklch(97.1% 0.013 17.38)", 100: "oklch(93.6% 0.032 17.717)", 200: "oklch(88.5% 0.062 18.334)", 300: "oklch(80.8% 0.114 19.571)", 400: "oklch(70.4% 0.191 22.216)", 500: "oklch(63.7% 0.237 25.331)", 600: "oklch(57.7% 0.245 27.325)", 700: "oklch(50.5% 0.213 27.518)", 800: "oklch(44.4% 0.177 26.899)", 900: "oklch(39.6% 0.141 25.723)", 950: "oklch(25.8% 0.092 26.042)" }, orange: { 50: "oklch(98% 0.016 73.684)", 100: "oklch(95.4% 0.038 75.164)", 200: "oklch(90.1% 0.076 70.697)", 300: "oklch(83.7% 0.128 66.29)", 400: "oklch(75% 0.183 55.934)", 500: "oklch(70.5% 0.213 47.604)", 600: "oklch(64.6% 0.222 41.116)", 700: "oklch(55.3% 0.195 38.402)", 800: "oklch(47% 0.157 37.304)", 900: "oklch(40.8% 0.123 38.172)", 950: "oklch(26.6% 0.079 36.259)" }, amber: { 50: "oklch(98.7% 0.022 95.277)", 100: "oklch(96.2% 0.059 95.617)", 200: "oklch(92.4% 0.12 95.746)", 300: "oklch(87.9% 0.169 91.605)", 400: "oklch(82.8% 0.189 84.429)", 500: "oklch(76.9% 0.188 70.08)", 600: "oklch(66.6% 0.179 58.318)", 700: "oklch(55.5% 0.163 48.998)", 800: "oklch(47.3% 0.137 46.201)", 900: "oklch(41.4% 0.112 45.904)", 950: "oklch(27.9% 0.077 45.635)" }, yellow: { 50: "oklch(98.7% 0.026 102.212)", 100: "oklch(97.3% 0.071 103.193)", 200: "oklch(94.5% 0.129 101.54)", 300: "oklch(90.5% 0.182 98.111)", 400: "oklch(85.2% 0.199 91.936)", 500: "oklch(79.5% 0.184 86.047)", 600: "oklch(68.1% 0.162 75.834)", 700: "oklch(55.4% 0.135 66.442)", 800: "oklch(47.6% 0.114 61.907)", 900: "oklch(42.1% 0.095 57.708)", 950: "oklch(28.6% 0.066 53.813)" }, lime: { 50: "oklch(98.6% 0.031 120.757)", 100: "oklch(96.7% 0.067 122.328)", 200: "oklch(93.8% 0.127 124.321)", 300: "oklch(89.7% 0.196 126.665)", 400: "oklch(84.1% 0.238 128.85)", 500: "oklch(76.8% 0.233 130.85)", 600: "oklch(64.8% 0.2 131.684)", 700: "oklch(53.2% 0.157 131.589)", 800: "oklch(45.3% 0.124 130.933)", 900: "oklch(40.5% 0.101 131.063)", 950: "oklch(27.4% 0.072 132.109)" }, green: { 50: "oklch(98.2% 0.018 155.826)", 100: "oklch(96.2% 0.044 156.743)", 200: "oklch(92.5% 0.084 155.995)", 300: "oklch(87.1% 0.15 154.449)", 400: "oklch(79.2% 0.209 151.711)", 500: "oklch(72.3% 0.219 149.579)", 600: "oklch(62.7% 0.194 149.214)", 700: "oklch(52.7% 0.154 150.069)", 800: "oklch(44.8% 0.119 151.328)", 900: "oklch(39.3% 0.095 152.535)", 950: "oklch(26.6% 0.065 152.934)" }, emerald: { 50: "oklch(97.9% 0.021 166.113)", 100: "oklch(95% 0.052 163.051)", 200: "oklch(90.5% 0.093 164.15)", 300: "oklch(84.5% 0.143 164.978)", 400: "oklch(76.5% 0.177 163.223)", 500: "oklch(69.6% 0.17 162.48)", 600: "oklch(59.6% 0.145 163.225)", 700: "oklch(50.8% 0.118 165.612)", 800: "oklch(43.2% 0.095 166.913)", 900: "oklch(37.8% 0.077 168.94)", 950: "oklch(26.2% 0.051 172.552)" }, teal: { 50: "oklch(98.4% 0.014 180.72)", 100: "oklch(95.3% 0.051 180.801)", 200: "oklch(91% 0.096 180.426)", 300: "oklch(85.5% 0.138 181.071)", 400: "oklch(77.7% 0.152 181.912)", 500: "oklch(70.4% 0.14 182.503)", 600: "oklch(60% 0.118 184.704)", 700: "oklch(51.1% 0.096 186.391)", 800: "oklch(43.7% 0.078 188.216)", 900: "oklch(38.6% 0.063 188.416)", 950: "oklch(27.7% 0.046 192.524)" }, cyan: { 50: "oklch(98.4% 0.019 200.873)", 100: "oklch(95.6% 0.045 203.388)", 200: "oklch(91.7% 0.08 205.041)", 300: "oklch(86.5% 0.127 207.078)", 400: "oklch(78.9% 0.154 211.53)", 500: "oklch(71.5% 0.143 215.221)", 600: "oklch(60.9% 0.126 221.723)", 700: "oklch(52% 0.105 223.128)", 800: "oklch(45% 0.085 224.283)", 900: "oklch(39.8% 0.07 227.392)", 950: "oklch(30.2% 0.056 229.695)" }, sky: { 50: "oklch(97.7% 0.013 236.62)", 100: "oklch(95.1% 0.026 236.824)", 200: "oklch(90.1% 0.058 230.902)", 300: "oklch(82.8% 0.111 230.318)", 400: "oklch(74.6% 0.16 232.661)", 500: "oklch(68.5% 0.169 237.323)", 600: "oklch(58.8% 0.158 241.966)", 700: "oklch(50% 0.134 242.749)", 800: "oklch(44.3% 0.11 240.79)", 900: "oklch(39.1% 0.09 240.876)", 950: "oklch(29.3% 0.066 243.157)" }, blue: { 50: "oklch(97% 0.014 254.604)", 100: "oklch(93.2% 0.032 255.585)", 200: "oklch(88.2% 0.059 254.128)", 300: "oklch(80.9% 0.105 251.813)", 400: "oklch(70.7% 0.165 254.624)", 500: "oklch(62.3% 0.214 259.815)", 600: "oklch(54.6% 0.245 262.881)", 700: "oklch(48.8% 0.243 264.376)", 800: "oklch(42.4% 0.199 265.638)", 900: "oklch(37.9% 0.146 265.522)", 950: "oklch(28.2% 0.091 267.935)" }, indigo: { 50: "oklch(96.2% 0.018 272.314)", 100: "oklch(93% 0.034 272.788)", 200: "oklch(87% 0.065 274.039)", 300: "oklch(78.5% 0.115 274.713)", 400: "oklch(67.3% 0.182 276.935)", 500: "oklch(58.5% 0.233 277.117)", 600: "oklch(51.1% 0.262 276.966)", 700: "oklch(45.7% 0.24 277.023)", 800: "oklch(39.8% 0.195 277.366)", 900: "oklch(35.9% 0.144 278.697)", 950: "oklch(25.7% 0.09 281.288)" }, violet: { 50: "oklch(96.9% 0.016 293.756)", 100: "oklch(94.3% 0.029 294.588)", 200: "oklch(89.4% 0.057 293.283)", 300: "oklch(81.1% 0.111 293.571)", 400: "oklch(70.2% 0.183 293.541)", 500: "oklch(60.6% 0.25 292.717)", 600: "oklch(54.1% 0.281 293.009)", 700: "oklch(49.1% 0.27 292.581)", 800: "oklch(43.2% 0.232 292.759)", 900: "oklch(38% 0.189 293.745)", 950: "oklch(28.3% 0.141 291.089)" }, purple: { 50: "oklch(97.7% 0.014 308.299)", 100: "oklch(94.6% 0.033 307.174)", 200: "oklch(90.2% 0.063 306.703)", 300: "oklch(82.7% 0.119 306.383)", 400: "oklch(71.4% 0.203 305.504)", 500: "oklch(62.7% 0.265 303.9)", 600: "oklch(55.8% 0.288 302.321)", 700: "oklch(49.6% 0.265 301.924)", 800: "oklch(43.8% 0.218 303.724)", 900: "oklch(38.1% 0.176 304.987)", 950: "oklch(29.1% 0.149 302.717)" }, fuchsia: { 50: "oklch(97.7% 0.017 320.058)", 100: "oklch(95.2% 0.037 318.852)", 200: "oklch(90.3% 0.076 319.62)", 300: "oklch(83.3% 0.145 321.434)", 400: "oklch(74% 0.238 322.16)", 500: "oklch(66.7% 0.295 322.15)", 600: "oklch(59.1% 0.293 322.896)", 700: "oklch(51.8% 0.253 323.949)", 800: "oklch(45.2% 0.211 324.591)", 900: "oklch(40.1% 0.17 325.612)", 950: "oklch(29.3% 0.136 325.661)" }, pink: { 50: "oklch(97.1% 0.014 343.198)", 100: "oklch(94.8% 0.028 342.258)", 200: "oklch(89.9% 0.061 343.231)", 300: "oklch(82.3% 0.12 346.018)", 400: "oklch(71.8% 0.202 349.761)", 500: "oklch(65.6% 0.241 354.308)", 600: "oklch(59.2% 0.249 0.584)", 700: "oklch(52.5% 0.223 3.958)", 800: "oklch(45.9% 0.187 3.815)", 900: "oklch(40.8% 0.153 2.432)", 950: "oklch(28.4% 0.109 3.907)" }, rose: { 50: "oklch(96.9% 0.015 12.422)", 100: "oklch(94.1% 0.03 12.58)", 200: "oklch(89.2% 0.058 10.001)", 300: "oklch(81% 0.117 11.638)", 400: "oklch(71.2% 0.194 13.428)", 500: "oklch(64.5% 0.246 16.439)", 600: "oklch(58.6% 0.253 17.585)", 700: "oklch(51.4% 0.222 16.935)", 800: "oklch(45.5% 0.188 13.697)", 900: "oklch(41% 0.159 10.272)", 950: "oklch(27.1% 0.105 12.094)" } };
|
|
9
9
|
|
|
10
10
|
// src/components/ui/link.tsx
|
|
11
|
-
import { Fragment, jsx, jsxs } from "
|
|
11
|
+
import { Fragment, jsx, jsxs } from "@publish.os/nextjs/jsx-runtime";
|
|
12
12
|
var linkVariants = cva(
|
|
13
13
|
[
|
|
14
14
|
"group/link inline break-words rounded-button font-medium !no-underline hover:!no-underline active:!no-underline",
|
|
@@ -59,14 +59,14 @@ function namedLinkColor(color) {
|
|
|
59
59
|
return color === "accent" ? "accent" : color === "default" ? "default" : null;
|
|
60
60
|
}
|
|
61
61
|
function tailwindColorValue(color) {
|
|
62
|
-
let named =
|
|
62
|
+
let named = o[color];
|
|
63
63
|
if (typeof named == "string")
|
|
64
64
|
return named === "current" || named === "currentcolor" ? "currentColor" : named;
|
|
65
65
|
let match = color.match(/^(.+)-([0-9]{2,3})$/);
|
|
66
66
|
if (!match) return;
|
|
67
67
|
let [, paletteName, shade] = match;
|
|
68
68
|
if (!paletteName || !shade) return;
|
|
69
|
-
let palette =
|
|
69
|
+
let palette = o[paletteName];
|
|
70
70
|
if (!(!palette || typeof palette == "string"))
|
|
71
71
|
return palette[shade];
|
|
72
72
|
}
|
|
@@ -104,6 +104,7 @@ function Link({
|
|
|
104
104
|
href = "#",
|
|
105
105
|
iconOnly,
|
|
106
106
|
leftIcon,
|
|
107
|
+
prefetch,
|
|
107
108
|
rel,
|
|
108
109
|
rightIcon,
|
|
109
110
|
size,
|
|
@@ -112,10 +113,10 @@ function Link({
|
|
|
112
113
|
variant = "link.standalone",
|
|
113
114
|
...props
|
|
114
115
|
}) {
|
|
115
|
-
let { buttonVariant, linkVariant } = resolveLinkVariant(variant), resolvedColor = namedLinkColor(color), customColor = linkColorValue(color), resolvedStyle = customColor ? { ...style, "--link-color": customColor } : style, state = active ? "path-active" : void 0, content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
116
|
-
leftIcon ? /* @__PURE__ */ jsx("span", { className: "
|
|
117
|
-
|
|
118
|
-
rightIcon ? /* @__PURE__ */ jsx("span", { className: "
|
|
116
|
+
let { buttonVariant, linkVariant } = resolveLinkVariant(variant), resolvedColor = namedLinkColor(color), customColor = linkColorValue(color), resolvedStyle = customColor ? { ...style, "--link-color": customColor } : style, state = active ? "path-active" : void 0, label = buttonVariant ? children : /* @__PURE__ */ jsx("span", { className: linkUnderlineClasses, "data-state": state, children }), content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
117
|
+
leftIcon ? /* @__PURE__ */ jsx("span", { className: cn("inline-flex shrink-0", !buttonVariant && "me-1"), children: leftIcon }) : null,
|
|
118
|
+
label,
|
|
119
|
+
rightIcon ? /* @__PURE__ */ jsx("span", { className: cn("inline-flex shrink-0", !buttonVariant && "ms-1"), children: rightIcon }) : null
|
|
119
120
|
] }), classes = cn(
|
|
120
121
|
buttonVariant ? buttonVariants({
|
|
121
122
|
iconOnly,
|
|
@@ -158,7 +159,7 @@ function Link({
|
|
|
158
159
|
...commonProps,
|
|
159
160
|
children: content
|
|
160
161
|
}
|
|
161
|
-
) : /* @__PURE__ */ jsx(NextLink, { href, ...commonProps, children: content });
|
|
162
|
+
) : /* @__PURE__ */ jsx(NextLink, { href, prefetch, ...commonProps, children: content });
|
|
162
163
|
}
|
|
163
164
|
export {
|
|
164
165
|
Link,
|