@publish.os/nextjs 0.0.1-alpha.8 → 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.d.ts +2 -2
- 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
|
@@ -12,7 +12,6 @@ import { InlineCode } from "@publish.os/nextjs/kernel/components/mdx/components/
|
|
|
12
12
|
import { Kbd } from "@publish.os/nextjs/kernel/components/mdx/components/kbd";
|
|
13
13
|
import { Link } from "@publish.os/nextjs/kernel/components/mdx/components/link";
|
|
14
14
|
import { Paragraph } from "@publish.os/nextjs/kernel/components/mdx/components/paragraph";
|
|
15
|
-
import { Pre } from "@publish.os/nextjs/kernel/components/mdx/components/pre";
|
|
16
15
|
import { Strikethrough } from "@publish.os/nextjs/kernel/components/mdx/components/strikethrough";
|
|
17
16
|
import {
|
|
18
17
|
Table,
|
|
@@ -28,58 +27,131 @@ import { MDXErrorBoundary } from "@publish.os/nextjs/kernel/components/mdx/error
|
|
|
28
27
|
import { rehypeHeadingIds } from "@publish.os/nextjs/kernel/components/mdx/rehype-heading-ids";
|
|
29
28
|
import { compileMDX } from "next-mdx-remote/rsc";
|
|
30
29
|
import remarkGfm from "remark-gfm";
|
|
30
|
+
|
|
31
|
+
// src/components/mdx/mod-key.tsx
|
|
32
|
+
import {
|
|
33
|
+
ModKey as UiModKey
|
|
34
|
+
} from "@publish.os/nextjs/kernel/components/ui/mod-key";
|
|
35
|
+
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
36
|
+
import { jsx } from "react/jsx-runtime";
|
|
37
|
+
function ModKey({ className, ...props }) {
|
|
38
|
+
return /* @__PURE__ */ jsx(
|
|
39
|
+
UiModKey,
|
|
40
|
+
{
|
|
41
|
+
...props,
|
|
42
|
+
size: null,
|
|
43
|
+
className: cn("text-[0.75em]", className)
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// src/components/mdx/plugins/remark-code-title.ts
|
|
49
|
+
function remarkCodeTitle() {
|
|
50
|
+
return (tree) => {
|
|
51
|
+
function visit(node) {
|
|
52
|
+
if (node.type === "code") {
|
|
53
|
+
let title = /^title="(.*)"$/.exec(node.meta?.trim() ?? "")?.[1];
|
|
54
|
+
title !== void 0 && (node.data = {
|
|
55
|
+
...node.data,
|
|
56
|
+
hProperties: { ...node.data?.hProperties ?? {}, title }
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
if ("children" in node)
|
|
60
|
+
for (let child of node.children) visit(child);
|
|
61
|
+
}
|
|
62
|
+
visit(tree);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// src/components/mdx/plugins/remark-keyboard-input.ts
|
|
67
|
+
function remarkKeyboardInput() {
|
|
68
|
+
return (tree) => {
|
|
69
|
+
function visit(node) {
|
|
70
|
+
if ((node.type === "mdxJsxFlowElement" || node.type === "mdxJsxTextElement") && node.name === "kbd" && node.data && Reflect.deleteProperty(node.data, "_mdxExplicitJsx"), "children" in node)
|
|
71
|
+
for (let child of node.children) visit(child);
|
|
72
|
+
}
|
|
73
|
+
visit(tree);
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// src/components/mdx/mdx.tsx
|
|
31
78
|
import { Figure as Figure2 } from "@publish.os/nextjs/kernel/components/mdx/components/figure";
|
|
32
79
|
import { Image as Image2 } from "@publish.os/nextjs/kernel/components/mdx/components/image";
|
|
33
80
|
import { Link as Link2 } from "@publish.os/nextjs/kernel/components/mdx/components/link";
|
|
34
81
|
import { Video as Video2 } from "@publish.os/nextjs/kernel/components/mdx/components/video";
|
|
35
|
-
import { jsx } from "react/jsx-runtime";
|
|
82
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
36
83
|
var defaultMdxComponents = {
|
|
37
|
-
h1: (props) => /* @__PURE__ */
|
|
38
|
-
h2: (props) => /* @__PURE__ */
|
|
39
|
-
h3: (props) => /* @__PURE__ */
|
|
40
|
-
h4: (props) => /* @__PURE__ */
|
|
41
|
-
h5: (props) => /* @__PURE__ */
|
|
42
|
-
h6: (props) => /* @__PURE__ */
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
84
|
+
h1: (props) => /* @__PURE__ */ jsx2(Heading, { as: "h1", ...props }),
|
|
85
|
+
h2: (props) => /* @__PURE__ */ jsx2(Heading, { as: "h2", ...props }),
|
|
86
|
+
h3: (props) => /* @__PURE__ */ jsx2(Heading, { as: "h3", ...props }),
|
|
87
|
+
h4: (props) => /* @__PURE__ */ jsx2(Heading, { as: "h4", ...props }),
|
|
88
|
+
h5: (props) => /* @__PURE__ */ jsx2(Heading, { as: "h5", ...props }),
|
|
89
|
+
h6: (props) => /* @__PURE__ */ jsx2(Heading, { as: "h6", ...props }),
|
|
90
|
+
Heading,
|
|
91
|
+
a: Link,
|
|
92
|
+
p: Paragraph,
|
|
93
|
+
blockquote: Blockquote,
|
|
94
|
+
Blockquote,
|
|
46
95
|
Callout,
|
|
47
|
-
code:
|
|
96
|
+
code: InlineCode,
|
|
97
|
+
InlineCode,
|
|
48
98
|
CodeBlock,
|
|
49
|
-
del:
|
|
50
|
-
figcaption:
|
|
51
|
-
|
|
99
|
+
del: Strikethrough,
|
|
100
|
+
figcaption: FigureCaption,
|
|
101
|
+
FigureCaption,
|
|
102
|
+
figure: Figure,
|
|
52
103
|
Figure,
|
|
53
|
-
hr:
|
|
54
|
-
|
|
104
|
+
hr: Hr,
|
|
105
|
+
Hr,
|
|
106
|
+
img: Image,
|
|
55
107
|
Image,
|
|
56
|
-
input:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
108
|
+
input: TaskListInput,
|
|
109
|
+
TaskListInput,
|
|
110
|
+
Kbd,
|
|
111
|
+
ModKey,
|
|
112
|
+
kbd: Kbd,
|
|
113
|
+
pre: CodeBlock,
|
|
114
|
+
Paragraph,
|
|
115
|
+
section: Footnotes,
|
|
116
|
+
Footnotes,
|
|
117
|
+
Strikethrough,
|
|
118
|
+
table: Table,
|
|
119
|
+
Table,
|
|
120
|
+
tbody: TableBodyGroup,
|
|
121
|
+
TableBodyGroup,
|
|
122
|
+
td: TableDataCell,
|
|
123
|
+
TableDataCell,
|
|
124
|
+
th: TableHeaderCell,
|
|
125
|
+
TableHeaderCell,
|
|
126
|
+
thead: TableHeadGroup,
|
|
127
|
+
TableHeadGroup,
|
|
128
|
+
tr: TableRowGroup,
|
|
129
|
+
TableRowGroup,
|
|
130
|
+
ul: TaskList,
|
|
131
|
+
TaskList,
|
|
132
|
+
video: Video,
|
|
69
133
|
Video
|
|
70
134
|
};
|
|
71
135
|
function getErrorMessage(error) {
|
|
72
136
|
return error instanceof Error ? error.message : "An error occurred while rendering the content";
|
|
73
137
|
}
|
|
74
|
-
async function
|
|
138
|
+
async function renderMdx({
|
|
139
|
+
components,
|
|
140
|
+
page,
|
|
141
|
+
siteComponents
|
|
142
|
+
}) {
|
|
75
143
|
let mdx = await compileMDX({
|
|
76
|
-
source:
|
|
77
|
-
components: {
|
|
144
|
+
source: page.body,
|
|
145
|
+
components: {
|
|
146
|
+
...defaultMdxComponents,
|
|
147
|
+
...siteComponents ?? {},
|
|
148
|
+
...components ?? {}
|
|
149
|
+
},
|
|
78
150
|
options: {
|
|
79
151
|
parseFrontmatter: !1,
|
|
80
152
|
mdxOptions: {
|
|
81
153
|
rehypePlugins: [rehypeHeadingIds],
|
|
82
|
-
remarkPlugins: [remarkGfm]
|
|
154
|
+
remarkPlugins: [remarkGfm, remarkCodeTitle, remarkKeyboardInput]
|
|
83
155
|
}
|
|
84
156
|
}
|
|
85
157
|
}).then(({ content: compiledContent }) => ({
|
|
@@ -89,21 +161,25 @@ async function MDX({ components, content, pageId, slug }) {
|
|
|
89
161
|
compiledContent: null,
|
|
90
162
|
errorMessage: getErrorMessage(error)
|
|
91
163
|
}));
|
|
92
|
-
return /* @__PURE__ */
|
|
164
|
+
return /* @__PURE__ */ jsx2(
|
|
93
165
|
MDXErrorBoundary,
|
|
94
166
|
{
|
|
95
167
|
errorMessage: mdx.errorMessage,
|
|
96
|
-
pageId,
|
|
97
|
-
slug,
|
|
98
|
-
children: /* @__PURE__ */
|
|
168
|
+
pageId: page.fileID,
|
|
169
|
+
slug: page.slug,
|
|
170
|
+
children: /* @__PURE__ */ jsx2("div", { className: "markdown-prose", children: mdx.compiledContent })
|
|
99
171
|
}
|
|
100
172
|
);
|
|
101
173
|
}
|
|
174
|
+
async function MDX(props) {
|
|
175
|
+
return renderMdx(props);
|
|
176
|
+
}
|
|
102
177
|
Object.defineProperty(MDX, "__publishOsMdx", { value: !0 });
|
|
103
178
|
export {
|
|
104
179
|
Figure2 as Figure,
|
|
105
180
|
Image2 as Image,
|
|
106
181
|
Link2 as Link,
|
|
107
182
|
MDX,
|
|
108
|
-
Video2 as Video
|
|
183
|
+
Video2 as Video,
|
|
184
|
+
renderMdx
|
|
109
185
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MDXComponents as MDXComponents$1 } from 'mdx/types.js';
|
|
2
|
-
import {
|
|
2
|
+
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
3
3
|
|
|
4
4
|
type MDXComponents = MDXComponents$1;
|
|
5
5
|
type HeadingElement = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
@@ -1,27 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
9
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
|
-
type BreadcrumbVariantProps = VariantProps<typeof breadcrumbVariants>;
|
|
11
|
-
type BreadcrumbStyleVariant = "default" | `link.${LinkStyleVariant}` | LinkButtonVariant;
|
|
12
|
-
type BreadcrumbSizeProps = Pick<BreadcrumbVariantProps, "size">;
|
|
13
|
-
type BreadcrumbStyleProps = {
|
|
14
|
-
variant?: BreadcrumbStyleVariant;
|
|
15
|
-
};
|
|
16
|
-
type BreadcrumbTrailItem = {
|
|
17
|
-
current?: boolean;
|
|
18
|
-
href: string;
|
|
19
|
-
title: ReactNode;
|
|
20
|
-
};
|
|
21
|
-
type BreadcrumbTrailProps = {
|
|
22
|
-
className?: string;
|
|
23
|
-
items: BreadcrumbTrailItem[];
|
|
24
|
-
} & BreadcrumbSizeProps & BreadcrumbStyleProps;
|
|
2
|
+
import { BreadcrumbTrailProps } from './breadcrumb.js';
|
|
3
|
+
import 'class-variance-authority/types';
|
|
4
|
+
import '../../../button-CtzUJB8u.js';
|
|
5
|
+
import 'class-variance-authority';
|
|
6
|
+
import 'next/link';
|
|
7
|
+
import 'react';
|
|
25
8
|
|
|
26
9
|
type CollapsibleBreadcrumbTrailProps = BreadcrumbTrailProps & {
|
|
27
10
|
menuLabel?: string;
|
|
@@ -1,10 +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 {
|
|
3
|
+
import { B as ButtonVariantProps } from '../../../button-CtzUJB8u.js';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
import NextLink from 'next/link';
|
|
6
|
-
import {
|
|
7
|
-
|
|
6
|
+
import { ReactNode, ComponentPropsWithoutRef, HTMLAttributes } from 'react';
|
|
7
|
+
|
|
8
|
+
declare const linkVariants: (props?: ({
|
|
9
|
+
color?: "accent" | "default" | null | undefined;
|
|
10
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
11
|
+
variant?: "inline" | "standalone" | null | undefined;
|
|
12
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
13
|
+
type LinkVariantProps = VariantProps<typeof linkVariants>;
|
|
14
|
+
type LinkStyleVariant = NonNullable<LinkVariantProps["variant"]>;
|
|
15
|
+
type LinkButtonVariant = `button.${NonNullable<ButtonVariantProps["variant"]>}`;
|
|
8
16
|
|
|
9
17
|
declare const breadcrumbVariants: (props?: ({
|
|
10
18
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
@@ -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,6 +1,6 @@
|
|
|
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 '
|
|
3
|
+
import { B as ButtonVariantProps } from '../../../button-CtzUJB8u.js';
|
|
4
4
|
import { Separator } from '@base-ui/react/separator';
|
|
5
5
|
import { ComponentPropsWithoutRef } from 'react';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -10,13 +10,14 @@ var buttonGroupVariants = cva(
|
|
|
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,7 +1,7 @@
|
|
|
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
6
|
declare const buttonVariants: (props?: ({
|
|
7
7
|
variant?: "solid" | "soft" | "outline" | "ghost" | null | undefined;
|
|
@@ -16,7 +16,7 @@ type ButtonProps = {
|
|
|
16
16
|
leftIcon?: ReactNode;
|
|
17
17
|
loading?: boolean;
|
|
18
18
|
rightIcon?: ReactNode;
|
|
19
|
-
} & ButtonVariantProps & Omit<
|
|
19
|
+
} & ButtonVariantProps & Omit<ComponentPropsWithRef<"button">, "children" | "className">;
|
|
20
20
|
declare function Button({ active, children, className, disabled, iconOnly, leftIcon, loading, rightIcon, size, type, variant, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
21
21
|
|
|
22
22
|
export { Button, type ButtonProps, type ButtonVariantProps, buttonVariants };
|
|
@@ -13,17 +13,17 @@ var buttonVariants = cva(
|
|
|
13
13
|
{
|
|
14
14
|
variants: {
|
|
15
15
|
variant: {
|
|
16
|
-
solid: "border-accent-1 bg-accent-1 text-accent-1-foreground
|
|
16
|
+
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",
|
|
17
17
|
soft: "border-0 bg-accent-2 text-accent-1 hover:not-data-disabled:bg-accent-2-hover active:not-data-disabled:bg-accent-2-active data-[state=path-active]:bg-accent-2-active",
|
|
18
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
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
20
|
},
|
|
21
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"
|
|
22
|
+
xs: "h-7 gap-1.5 px-2 text-xs leading-none",
|
|
23
|
+
sm: "h-8 px-3 text-sm leading-none",
|
|
24
|
+
md: "h-10 px-4 text-sm leading-none",
|
|
25
|
+
lg: "h-11 px-5 text-base leading-none",
|
|
26
|
+
xl: "h-12 px-6 text-base leading-none"
|
|
27
27
|
},
|
|
28
28
|
iconOnly: {
|
|
29
29
|
false: "",
|
|
@@ -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;
|
|
@@ -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 };
|
|
@@ -8,6 +8,9 @@ import { jsx } from "react/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
|
};
|
|
@@ -6,13 +6,13 @@ import { Input as Input$1 } from '@base-ui/react/input';
|
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
7
|
|
|
8
8
|
declare const inputVariants: (props?: ({
|
|
9
|
-
size?: "
|
|
10
|
-
variant?: "
|
|
9
|
+
size?: "sm" | "md" | "lg" | "xs" | "xl" | null | undefined;
|
|
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
|
-
size?: "
|
|
15
|
-
variant?: "
|
|
14
|
+
size?: "sm" | "md" | "lg" | "xs" | "xl" | null | undefined;
|
|
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 };
|
|
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
import { HTMLAttributes } from 'react';
|
|
5
5
|
|
|
6
6
|
declare const kbdVariants: (props?: ({
|
|
7
|
-
size?: "
|
|
7
|
+
size?: "sm" | "md" | "lg" | "xs" | "xl" | null | undefined;
|
|
8
8
|
square?: boolean | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
type KbdProps = HTMLAttributes<HTMLElement> & VariantProps<typeof kbdVariants>;
|
|
@@ -3,28 +3,21 @@ import { cn } from "@publish.os/nextjs/utils/cn";
|
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { jsx } from "react/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(
|
|
@@ -2,11 +2,12 @@ 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 { ButtonVariantProps } from './button.js';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import { LinkProps as LinkProps$1 } from 'next/link';
|
|
5
6
|
import { ReactNode, AnchorHTMLAttributes } from 'react';
|
|
6
7
|
|
|
7
8
|
declare const linkVariants: (props?: ({
|
|
8
|
-
color?: "
|
|
9
|
-
size?: "
|
|
9
|
+
color?: "default" | "accent" | null | undefined;
|
|
10
|
+
size?: "sm" | "md" | "lg" | "xs" | "xl" | null | undefined;
|
|
10
11
|
variant?: "inline" | "standalone" | null | undefined;
|
|
11
12
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
13
|
type LinkVariantProps = VariantProps<typeof linkVariants>;
|
|
@@ -23,9 +24,10 @@ type LinkProps = {
|
|
|
23
24
|
href?: string;
|
|
24
25
|
iconOnly?: ButtonVariantProps["iconOnly"];
|
|
25
26
|
leftIcon?: ReactNode;
|
|
27
|
+
prefetch?: LinkProps$1["prefetch"];
|
|
26
28
|
rightIcon?: ReactNode;
|
|
27
29
|
variant?: LinkVariant;
|
|
28
30
|
} & 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;
|
|
31
|
+
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
32
|
|
|
31
33
|
export { Link, type LinkButtonVariant, type LinkProps, type LinkStyleVariant, type LinkVariant, type LinkVariantProps, linkVariants };
|