@bergetai/ui 0.20.1 → 0.22.0
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/dist/components/dropdown-menu/DropdownMenu.d.cts +2 -2
- package/dist/components/dropdown-menu/DropdownMenu.d.mts +2 -2
- package/dist/components/markdown/Markdown.cjs +169 -0
- package/dist/components/markdown/Markdown.cjs.map +1 -0
- package/dist/components/markdown/Markdown.d.cts +10 -0
- package/dist/components/markdown/Markdown.d.cts.map +1 -0
- package/dist/components/markdown/Markdown.d.mts +10 -0
- package/dist/components/markdown/Markdown.d.mts.map +1 -0
- package/dist/components/markdown/Markdown.mjs +167 -0
- package/dist/components/markdown/Markdown.mjs.map +1 -0
- package/dist/components/markdown/MarkdownCodeBlock.cjs +25 -0
- package/dist/components/markdown/MarkdownCodeBlock.cjs.map +1 -0
- package/dist/components/markdown/MarkdownCodeBlock.d.cts +12 -0
- package/dist/components/markdown/MarkdownCodeBlock.d.cts.map +1 -0
- package/dist/components/markdown/MarkdownCodeBlock.d.mts +12 -0
- package/dist/components/markdown/MarkdownCodeBlock.d.mts.map +1 -0
- package/dist/components/markdown/MarkdownCodeBlock.mjs +25 -0
- package/dist/components/markdown/MarkdownCodeBlock.mjs.map +1 -0
- package/dist/components/markdown/index.d.cts +3 -0
- package/dist/components/markdown/index.d.mts +3 -0
- package/dist/components/tooltip/Tooltip.d.cts +1 -1
- package/dist/components/tooltip/Tooltip.d.mts +1 -1
- package/dist/components/trace/index.cjs +46 -0
- package/dist/components/trace/index.cjs.map +1 -0
- package/dist/components/trace/index.d.cts +14 -0
- package/dist/components/trace/index.d.cts.map +1 -0
- package/dist/components/trace/index.d.mts +14 -0
- package/dist/components/trace/index.d.mts.map +1 -0
- package/dist/components/trace/index.mjs +37 -0
- package/dist/components/trace/index.mjs.map +1 -0
- package/dist/index.cjs +14 -0
- package/dist/index.d.cts +6 -1
- package/dist/index.d.mts +6 -1
- package/dist/index.mjs +5 -1
- package/dist/primitives/collapsible.cjs +27 -0
- package/dist/primitives/collapsible.cjs.map +1 -0
- package/dist/primitives/collapsible.d.cts +8 -0
- package/dist/primitives/collapsible.d.cts.map +1 -0
- package/dist/primitives/collapsible.d.mts +8 -0
- package/dist/primitives/collapsible.d.mts.map +1 -0
- package/dist/primitives/collapsible.mjs +25 -0
- package/dist/primitives/collapsible.mjs.map +1 -0
- package/dist/primitives/field.d.cts +1 -1
- package/dist/primitives/field.d.mts +1 -1
- package/dist/primitives/trace.cjs +86 -0
- package/dist/primitives/trace.cjs.map +1 -0
- package/dist/primitives/trace.d.cts +21 -0
- package/dist/primitives/trace.d.cts.map +1 -0
- package/dist/primitives/trace.d.mts +21 -0
- package/dist/primitives/trace.d.mts.map +1 -0
- package/dist/primitives/trace.mjs +77 -0
- package/dist/primitives/trace.mjs.map +1 -0
- package/dist/styles/index.css +9 -0
- package/package.json +2 -1
|
@@ -14,8 +14,8 @@ type DropdownMenuSubTriggerProps = Omit<React.ComponentProps<typeof DropdownMenu
|
|
|
14
14
|
asChild?: boolean;
|
|
15
15
|
};
|
|
16
16
|
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuSubTriggerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
-
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPopupProps & Pick<import("@base-ui/react").MenuPositionerProps, "
|
|
18
|
-
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPopupProps & Pick<import("@base-ui/react").MenuPositionerProps, "
|
|
17
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPopupProps & Pick<import("@base-ui/react").MenuPositionerProps, "side" | "align" | "alignOffset" | "sideOffset">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPopupProps & Pick<import("@base-ui/react").MenuPositionerProps, "side" | "align" | "alignOffset" | "sideOffset">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
19
|
type DropdownMenuItemProps = Omit<React.ComponentProps<typeof DropdownMenuItem$1>, 'className' | 'render' | 'label'> & {
|
|
20
20
|
className?: string;
|
|
21
21
|
inset?: boolean;
|
|
@@ -14,8 +14,8 @@ type DropdownMenuSubTriggerProps = Omit<React.ComponentProps<typeof DropdownMenu
|
|
|
14
14
|
asChild?: boolean;
|
|
15
15
|
};
|
|
16
16
|
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuSubTriggerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
-
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPopupProps & Pick<import("@base-ui/react").MenuPositionerProps, "
|
|
18
|
-
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPopupProps & Pick<import("@base-ui/react").MenuPositionerProps, "
|
|
17
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPopupProps & Pick<import("@base-ui/react").MenuPositionerProps, "side" | "align" | "alignOffset" | "sideOffset">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPopupProps & Pick<import("@base-ui/react").MenuPositionerProps, "side" | "align" | "alignOffset" | "sideOffset">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
19
|
type DropdownMenuItemProps = Omit<React.ComponentProps<typeof DropdownMenuItem$1>, 'className' | 'render' | 'label'> & {
|
|
20
20
|
className?: string;
|
|
21
21
|
inset?: boolean;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
const require_utils = require("../../lib/utils.cjs");
|
|
4
|
+
const require_MarkdownCodeBlock = require("./MarkdownCodeBlock.cjs");
|
|
5
|
+
let react = require("react");
|
|
6
|
+
react = require_runtime.__toESM(react, 1);
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let streamdown = require("streamdown");
|
|
9
|
+
//#region src/components/markdown/Markdown.tsx
|
|
10
|
+
/**
|
|
11
|
+
* Markdown renderer for chat/UI text, built on Streamdown (incomplete-markdown
|
|
12
|
+
* repair during streaming, GFM tables, rehype-sanitize + rehype-harden).
|
|
13
|
+
*
|
|
14
|
+
* Streamdown ships its own Tailwind classes inside its dist files, which
|
|
15
|
+
* consumers' Tailwind builds never scan — so every element is given a full
|
|
16
|
+
* Berget class set here instead of relying on the defaults. Utility classes
|
|
17
|
+
* used below live in this package's own dist, which the shipped `@source`
|
|
18
|
+
* covers for all consumers.
|
|
19
|
+
*
|
|
20
|
+
* Code highlighting reuses the package CodeBlock family and the shared Shiki
|
|
21
|
+
* highlighter (Berget CSS-variable theme). Mermaid/KaTeX are intentionally
|
|
22
|
+
* not enabled.
|
|
23
|
+
*/
|
|
24
|
+
const bergetComponents = {
|
|
25
|
+
h1: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(streamdown.defaultComponents.h1, {
|
|
26
|
+
...props,
|
|
27
|
+
className: `
|
|
28
|
+
mt-4 mb-2 text-lg font-semibold
|
|
29
|
+
`
|
|
30
|
+
}),
|
|
31
|
+
h2: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(streamdown.defaultComponents.h2, {
|
|
32
|
+
...props,
|
|
33
|
+
className: `
|
|
34
|
+
mt-4 mb-2 text-base font-semibold
|
|
35
|
+
`
|
|
36
|
+
}),
|
|
37
|
+
h3: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(streamdown.defaultComponents.h3, {
|
|
38
|
+
...props,
|
|
39
|
+
className: `
|
|
40
|
+
mt-3 mb-1.5 text-sm font-semibold
|
|
41
|
+
`
|
|
42
|
+
}),
|
|
43
|
+
h4: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(streamdown.defaultComponents.h4, {
|
|
44
|
+
...props,
|
|
45
|
+
className: `
|
|
46
|
+
mt-3 mb-1.5 text-sm font-semibold
|
|
47
|
+
`
|
|
48
|
+
}),
|
|
49
|
+
h5: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(streamdown.defaultComponents.h5, {
|
|
50
|
+
...props,
|
|
51
|
+
className: `
|
|
52
|
+
mt-3 mb-1.5 text-sm font-semibold
|
|
53
|
+
`
|
|
54
|
+
}),
|
|
55
|
+
h6: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(streamdown.defaultComponents.h6, {
|
|
56
|
+
...props,
|
|
57
|
+
className: `
|
|
58
|
+
mt-3 mb-1.5 text-sm font-semibold
|
|
59
|
+
`
|
|
60
|
+
}),
|
|
61
|
+
p: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(streamdown.defaultComponents.p, {
|
|
62
|
+
...props,
|
|
63
|
+
className: `
|
|
64
|
+
my-2
|
|
65
|
+
first:mt-0
|
|
66
|
+
last:mb-0
|
|
67
|
+
`
|
|
68
|
+
}),
|
|
69
|
+
ul: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(streamdown.defaultComponents.ul, {
|
|
70
|
+
...props,
|
|
71
|
+
className: `
|
|
72
|
+
my-2 ms-5 list-disc space-y-1
|
|
73
|
+
marker:text-berget-muted-foreground
|
|
74
|
+
`
|
|
75
|
+
}),
|
|
76
|
+
ol: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(streamdown.defaultComponents.ol, {
|
|
77
|
+
...props,
|
|
78
|
+
className: `
|
|
79
|
+
my-2 ms-5 list-decimal space-y-1
|
|
80
|
+
`
|
|
81
|
+
}),
|
|
82
|
+
li: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(streamdown.defaultComponents.li, {
|
|
83
|
+
...props,
|
|
84
|
+
className: `leading-relaxed`
|
|
85
|
+
}),
|
|
86
|
+
del: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("del", {
|
|
87
|
+
...props,
|
|
88
|
+
className: `line-through`
|
|
89
|
+
}),
|
|
90
|
+
em: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("em", {
|
|
91
|
+
...props,
|
|
92
|
+
className: `italic`
|
|
93
|
+
}),
|
|
94
|
+
blockquote: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(streamdown.defaultComponents.blockquote, {
|
|
95
|
+
...props,
|
|
96
|
+
className: `
|
|
97
|
+
my-3 border-berget-border ps-3 text-berget-muted-foreground italic
|
|
98
|
+
`
|
|
99
|
+
}),
|
|
100
|
+
hr: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(streamdown.defaultComponents.hr, {
|
|
101
|
+
...props,
|
|
102
|
+
className: `
|
|
103
|
+
my-4 border-berget-border
|
|
104
|
+
`
|
|
105
|
+
}),
|
|
106
|
+
img: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(streamdown.defaultComponents.img, {
|
|
107
|
+
...props,
|
|
108
|
+
className: `my-3 max-w-full rounded-berget-xs border-berget-border`
|
|
109
|
+
}),
|
|
110
|
+
a: ({ node: _node, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
111
|
+
...props,
|
|
112
|
+
target: "_blank",
|
|
113
|
+
rel: "noopener noreferrer nofollow",
|
|
114
|
+
className: `text-berget-primary underline underline-offset-2`
|
|
115
|
+
}),
|
|
116
|
+
code: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(streamdown.defaultComponents.code, {
|
|
117
|
+
...props,
|
|
118
|
+
className: `
|
|
119
|
+
rounded-berget-xs bg-muted px-1.5 py-0.5 font-mono text-[0.85em]
|
|
120
|
+
`
|
|
121
|
+
}),
|
|
122
|
+
pre: ({ children }) => {
|
|
123
|
+
if (react.isValidElement(children)) {
|
|
124
|
+
const { className, children: code } = children.props;
|
|
125
|
+
const language = /language-([\w+-]+)/.exec(className ?? "")?.[1] ?? "text";
|
|
126
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MarkdownCodeBlock.MarkdownCodeBlock, {
|
|
127
|
+
code: String(code ?? ""),
|
|
128
|
+
language
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children });
|
|
132
|
+
},
|
|
133
|
+
table: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
134
|
+
className: `
|
|
135
|
+
my-3 max-w-full overflow-x-auto rounded-berget-xs border-berget-border
|
|
136
|
+
`,
|
|
137
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("table", {
|
|
138
|
+
...props,
|
|
139
|
+
className: `w-full border-collapse text-sm`
|
|
140
|
+
})
|
|
141
|
+
}),
|
|
142
|
+
thead: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(streamdown.defaultComponents.thead, {
|
|
143
|
+
...props,
|
|
144
|
+
className: `bg-muted/50`
|
|
145
|
+
}),
|
|
146
|
+
th: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(streamdown.defaultComponents.th, {
|
|
147
|
+
...props,
|
|
148
|
+
className: `border-b-berget-border px-3 py-1.5 text-start font-semibold`
|
|
149
|
+
}),
|
|
150
|
+
td: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(streamdown.defaultComponents.td, {
|
|
151
|
+
...props,
|
|
152
|
+
className: `
|
|
153
|
+
border-b-berget-border px-3 py-1.5
|
|
154
|
+
`
|
|
155
|
+
})
|
|
156
|
+
};
|
|
157
|
+
function Markdown({ className, ...props }) {
|
|
158
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(streamdown.Streamdown, {
|
|
159
|
+
...props,
|
|
160
|
+
dir: "ltr",
|
|
161
|
+
components: bergetComponents,
|
|
162
|
+
className: require_utils.cn("text-caption/relaxed text-berget-foreground", className)
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
Markdown.displayName = "Markdown";
|
|
166
|
+
//#endregion
|
|
167
|
+
exports.Markdown = Markdown;
|
|
168
|
+
|
|
169
|
+
//# sourceMappingURL=Markdown.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Markdown.cjs","names":["defaultComponents","React","MarkdownCodeBlock","Streamdown","cn"],"sources":["../../../src/components/markdown/Markdown.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Streamdown, defaultComponents, type Components, type StreamdownProps } from 'streamdown';\nimport { cn } from '../../lib/utils';\nimport { MarkdownCodeBlock } from './MarkdownCodeBlock';\n\n/**\n * Markdown renderer for chat/UI text, built on Streamdown (incomplete-markdown\n * repair during streaming, GFM tables, rehype-sanitize + rehype-harden).\n *\n * Streamdown ships its own Tailwind classes inside its dist files, which\n * consumers' Tailwind builds never scan — so every element is given a full\n * Berget class set here instead of relying on the defaults. Utility classes\n * used below live in this package's own dist, which the shipped `@source`\n * covers for all consumers.\n *\n * Code highlighting reuses the package CodeBlock family and the shared Shiki\n * highlighter (Berget CSS-variable theme). Mermaid/KaTeX are intentionally\n * not enabled.\n */\nconst bergetComponents: Components = {\n h1: (props) => (\n <defaultComponents.h1\n {...props}\n className={`\n mt-4 mb-2 text-lg font-semibold\n `}\n />\n ),\n h2: (props) => (\n <defaultComponents.h2\n {...props}\n className={`\n mt-4 mb-2 text-base font-semibold\n `}\n />\n ),\n h3: (props) => (\n <defaultComponents.h3\n {...props}\n className={`\n mt-3 mb-1.5 text-sm font-semibold\n `}\n />\n ),\n h4: (props) => (\n <defaultComponents.h4\n {...props}\n className={`\n mt-3 mb-1.5 text-sm font-semibold\n `}\n />\n ),\n h5: (props) => (\n <defaultComponents.h5\n {...props}\n className={`\n mt-3 mb-1.5 text-sm font-semibold\n `}\n />\n ),\n h6: (props) => (\n <defaultComponents.h6\n {...props}\n className={`\n mt-3 mb-1.5 text-sm font-semibold\n `}\n />\n ),\n p: (props) => (\n <defaultComponents.p\n {...props}\n className={`\n my-2\n first:mt-0\n last:mb-0\n `}\n />\n ),\n ul: (props) => (\n <defaultComponents.ul\n {...props}\n className={`\n my-2 ms-5 list-disc space-y-1\n marker:text-berget-muted-foreground\n `}\n />\n ),\n ol: (props) => (\n <defaultComponents.ol\n {...props}\n className={`\n my-2 ms-5 list-decimal space-y-1\n `}\n />\n ),\n li: (props) => <defaultComponents.li {...props} className={`leading-relaxed`} />,\n del: (props) => <del {...props} className={`line-through`} />,\n em: (props) => <em {...props} className={`italic`} />,\n blockquote: (props) => (\n <defaultComponents.blockquote\n {...props}\n className={`\n my-3 border-berget-border ps-3 text-berget-muted-foreground italic\n `}\n />\n ),\n hr: (props) => (\n <defaultComponents.hr\n {...props}\n className={`\n my-4 border-berget-border\n `}\n />\n ),\n img: (props) => (\n <defaultComponents.img\n {...props}\n className={`my-3 max-w-full rounded-berget-xs border-berget-border`}\n />\n ),\n // Real anchor, not Streamdown's default <button>: links must keep href\n // semantics (middle-click, new tab). Hardening attrs are added explicitly\n // since rehype-harden can only act on real anchors.\n a: ({ node: _node, ...props }) => (\n <a\n {...props}\n target=\"_blank\"\n rel=\"noopener noreferrer nofollow\"\n className={`text-berget-primary underline underline-offset-2`}\n />\n ),\n // Inline code only — fenced blocks are consumed by the `pre` override below.\n code: (props) => (\n <defaultComponents.code\n {...props}\n className={`\n rounded-berget-xs bg-muted px-1.5 py-0.5 font-mono text-[0.85em]\n `}\n />\n ),\n // Fenced / indented code: derive code + language from the child code\n // element and render with the package CodeBlock (highlighting included).\n pre: ({ children }) => {\n if (React.isValidElement(children)) {\n const { className, children: code } = children.props as {\n className?: string;\n children?: React.ReactNode;\n };\n const language = /language-([\\w+-]+)/.exec(className ?? '')?.[1] ?? 'text';\n return <MarkdownCodeBlock code={String(code ?? '')} language={language} />;\n }\n return <>{children}</>;\n },\n table: (props) => (\n <div\n className={`\n my-3 max-w-full overflow-x-auto rounded-berget-xs border-berget-border\n `}\n >\n <table {...props} className={`w-full border-collapse text-sm`} />\n </div>\n ),\n thead: (props) => <defaultComponents.thead {...props} className={`bg-muted/50`} />,\n th: (props) => (\n <defaultComponents.th\n {...props}\n className={`border-b-berget-border px-3 py-1.5 text-start font-semibold`}\n />\n ),\n td: (props) => (\n <defaultComponents.td\n {...props}\n className={`\n border-b-berget-border px-3 py-1.5\n `}\n />\n ),\n};\n\ntype MarkdownProps = Omit<StreamdownProps, 'components' | 'plugins' | 'dir' | 'prefix'>;\nexport type { MarkdownProps };\n\nexport function Markdown({ className, ...props }: MarkdownProps) {\n return (\n <Streamdown\n {...props}\n dir=\"ltr\"\n components={bergetComponents}\n className={cn('text-caption/relaxed text-berget-foreground', className)}\n />\n );\n}\n\nMarkdown.displayName = 'Markdown';\n"],"mappings":"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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StreamdownProps } from "streamdown";
|
|
2
|
+
//#region src/components/markdown/Markdown.d.ts
|
|
3
|
+
type MarkdownProps = Omit<StreamdownProps, 'components' | 'plugins' | 'dir' | 'prefix'>;
|
|
4
|
+
export declare function Markdown({ className, ...props }: MarkdownProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare namespace Markdown {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export type { MarkdownProps };
|
|
10
|
+
//# sourceMappingURL=Markdown.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Markdown.d.cts","names":[],"sources":["../../../src/components/markdown/Markdown.tsx"],"mappings":";;KAqLK,gBAAgB,KAAK;wBAGV,WAAW,cAAc,SAAS,4CAAa,IAAA;yBAA/C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StreamdownProps } from "streamdown";
|
|
2
|
+
//#region src/components/markdown/Markdown.d.ts
|
|
3
|
+
type MarkdownProps = Omit<StreamdownProps, 'components' | 'plugins' | 'dir' | 'prefix'>;
|
|
4
|
+
export declare function Markdown({ className, ...props }: MarkdownProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare namespace Markdown {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export type { MarkdownProps };
|
|
10
|
+
//# sourceMappingURL=Markdown.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Markdown.d.mts","names":[],"sources":["../../../src/components/markdown/Markdown.tsx"],"mappings":";;KAqLK,gBAAgB,KAAK;wBAGV,WAAW,cAAc,SAAS,4CAAa,IAAA;yBAA/C"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.mjs";
|
|
3
|
+
import { MarkdownCodeBlock } from "./MarkdownCodeBlock.mjs";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Streamdown, defaultComponents } from "streamdown";
|
|
7
|
+
//#region src/components/markdown/Markdown.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Markdown renderer for chat/UI text, built on Streamdown (incomplete-markdown
|
|
10
|
+
* repair during streaming, GFM tables, rehype-sanitize + rehype-harden).
|
|
11
|
+
*
|
|
12
|
+
* Streamdown ships its own Tailwind classes inside its dist files, which
|
|
13
|
+
* consumers' Tailwind builds never scan — so every element is given a full
|
|
14
|
+
* Berget class set here instead of relying on the defaults. Utility classes
|
|
15
|
+
* used below live in this package's own dist, which the shipped `@source`
|
|
16
|
+
* covers for all consumers.
|
|
17
|
+
*
|
|
18
|
+
* Code highlighting reuses the package CodeBlock family and the shared Shiki
|
|
19
|
+
* highlighter (Berget CSS-variable theme). Mermaid/KaTeX are intentionally
|
|
20
|
+
* not enabled.
|
|
21
|
+
*/
|
|
22
|
+
const bergetComponents = {
|
|
23
|
+
h1: (props) => /* @__PURE__ */ jsx(defaultComponents.h1, {
|
|
24
|
+
...props,
|
|
25
|
+
className: `
|
|
26
|
+
mt-4 mb-2 text-lg font-semibold
|
|
27
|
+
`
|
|
28
|
+
}),
|
|
29
|
+
h2: (props) => /* @__PURE__ */ jsx(defaultComponents.h2, {
|
|
30
|
+
...props,
|
|
31
|
+
className: `
|
|
32
|
+
mt-4 mb-2 text-base font-semibold
|
|
33
|
+
`
|
|
34
|
+
}),
|
|
35
|
+
h3: (props) => /* @__PURE__ */ jsx(defaultComponents.h3, {
|
|
36
|
+
...props,
|
|
37
|
+
className: `
|
|
38
|
+
mt-3 mb-1.5 text-sm font-semibold
|
|
39
|
+
`
|
|
40
|
+
}),
|
|
41
|
+
h4: (props) => /* @__PURE__ */ jsx(defaultComponents.h4, {
|
|
42
|
+
...props,
|
|
43
|
+
className: `
|
|
44
|
+
mt-3 mb-1.5 text-sm font-semibold
|
|
45
|
+
`
|
|
46
|
+
}),
|
|
47
|
+
h5: (props) => /* @__PURE__ */ jsx(defaultComponents.h5, {
|
|
48
|
+
...props,
|
|
49
|
+
className: `
|
|
50
|
+
mt-3 mb-1.5 text-sm font-semibold
|
|
51
|
+
`
|
|
52
|
+
}),
|
|
53
|
+
h6: (props) => /* @__PURE__ */ jsx(defaultComponents.h6, {
|
|
54
|
+
...props,
|
|
55
|
+
className: `
|
|
56
|
+
mt-3 mb-1.5 text-sm font-semibold
|
|
57
|
+
`
|
|
58
|
+
}),
|
|
59
|
+
p: (props) => /* @__PURE__ */ jsx(defaultComponents.p, {
|
|
60
|
+
...props,
|
|
61
|
+
className: `
|
|
62
|
+
my-2
|
|
63
|
+
first:mt-0
|
|
64
|
+
last:mb-0
|
|
65
|
+
`
|
|
66
|
+
}),
|
|
67
|
+
ul: (props) => /* @__PURE__ */ jsx(defaultComponents.ul, {
|
|
68
|
+
...props,
|
|
69
|
+
className: `
|
|
70
|
+
my-2 ms-5 list-disc space-y-1
|
|
71
|
+
marker:text-berget-muted-foreground
|
|
72
|
+
`
|
|
73
|
+
}),
|
|
74
|
+
ol: (props) => /* @__PURE__ */ jsx(defaultComponents.ol, {
|
|
75
|
+
...props,
|
|
76
|
+
className: `
|
|
77
|
+
my-2 ms-5 list-decimal space-y-1
|
|
78
|
+
`
|
|
79
|
+
}),
|
|
80
|
+
li: (props) => /* @__PURE__ */ jsx(defaultComponents.li, {
|
|
81
|
+
...props,
|
|
82
|
+
className: `leading-relaxed`
|
|
83
|
+
}),
|
|
84
|
+
del: (props) => /* @__PURE__ */ jsx("del", {
|
|
85
|
+
...props,
|
|
86
|
+
className: `line-through`
|
|
87
|
+
}),
|
|
88
|
+
em: (props) => /* @__PURE__ */ jsx("em", {
|
|
89
|
+
...props,
|
|
90
|
+
className: `italic`
|
|
91
|
+
}),
|
|
92
|
+
blockquote: (props) => /* @__PURE__ */ jsx(defaultComponents.blockquote, {
|
|
93
|
+
...props,
|
|
94
|
+
className: `
|
|
95
|
+
my-3 border-berget-border ps-3 text-berget-muted-foreground italic
|
|
96
|
+
`
|
|
97
|
+
}),
|
|
98
|
+
hr: (props) => /* @__PURE__ */ jsx(defaultComponents.hr, {
|
|
99
|
+
...props,
|
|
100
|
+
className: `
|
|
101
|
+
my-4 border-berget-border
|
|
102
|
+
`
|
|
103
|
+
}),
|
|
104
|
+
img: (props) => /* @__PURE__ */ jsx(defaultComponents.img, {
|
|
105
|
+
...props,
|
|
106
|
+
className: `my-3 max-w-full rounded-berget-xs border-berget-border`
|
|
107
|
+
}),
|
|
108
|
+
a: ({ node: _node, ...props }) => /* @__PURE__ */ jsx("a", {
|
|
109
|
+
...props,
|
|
110
|
+
target: "_blank",
|
|
111
|
+
rel: "noopener noreferrer nofollow",
|
|
112
|
+
className: `text-berget-primary underline underline-offset-2`
|
|
113
|
+
}),
|
|
114
|
+
code: (props) => /* @__PURE__ */ jsx(defaultComponents.code, {
|
|
115
|
+
...props,
|
|
116
|
+
className: `
|
|
117
|
+
rounded-berget-xs bg-muted px-1.5 py-0.5 font-mono text-[0.85em]
|
|
118
|
+
`
|
|
119
|
+
}),
|
|
120
|
+
pre: ({ children }) => {
|
|
121
|
+
if (React.isValidElement(children)) {
|
|
122
|
+
const { className, children: code } = children.props;
|
|
123
|
+
const language = /language-([\w+-]+)/.exec(className ?? "")?.[1] ?? "text";
|
|
124
|
+
return /* @__PURE__ */ jsx(MarkdownCodeBlock, {
|
|
125
|
+
code: String(code ?? ""),
|
|
126
|
+
language
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
130
|
+
},
|
|
131
|
+
table: (props) => /* @__PURE__ */ jsx("div", {
|
|
132
|
+
className: `
|
|
133
|
+
my-3 max-w-full overflow-x-auto rounded-berget-xs border-berget-border
|
|
134
|
+
`,
|
|
135
|
+
children: /* @__PURE__ */ jsx("table", {
|
|
136
|
+
...props,
|
|
137
|
+
className: `w-full border-collapse text-sm`
|
|
138
|
+
})
|
|
139
|
+
}),
|
|
140
|
+
thead: (props) => /* @__PURE__ */ jsx(defaultComponents.thead, {
|
|
141
|
+
...props,
|
|
142
|
+
className: `bg-muted/50`
|
|
143
|
+
}),
|
|
144
|
+
th: (props) => /* @__PURE__ */ jsx(defaultComponents.th, {
|
|
145
|
+
...props,
|
|
146
|
+
className: `border-b-berget-border px-3 py-1.5 text-start font-semibold`
|
|
147
|
+
}),
|
|
148
|
+
td: (props) => /* @__PURE__ */ jsx(defaultComponents.td, {
|
|
149
|
+
...props,
|
|
150
|
+
className: `
|
|
151
|
+
border-b-berget-border px-3 py-1.5
|
|
152
|
+
`
|
|
153
|
+
})
|
|
154
|
+
};
|
|
155
|
+
function Markdown({ className, ...props }) {
|
|
156
|
+
return /* @__PURE__ */ jsx(Streamdown, {
|
|
157
|
+
...props,
|
|
158
|
+
dir: "ltr",
|
|
159
|
+
components: bergetComponents,
|
|
160
|
+
className: cn("text-caption/relaxed text-berget-foreground", className)
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
Markdown.displayName = "Markdown";
|
|
164
|
+
//#endregion
|
|
165
|
+
export { Markdown };
|
|
166
|
+
|
|
167
|
+
//# sourceMappingURL=Markdown.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Markdown.mjs","names":[],"sources":["../../../src/components/markdown/Markdown.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Streamdown, defaultComponents, type Components, type StreamdownProps } from 'streamdown';\nimport { cn } from '../../lib/utils';\nimport { MarkdownCodeBlock } from './MarkdownCodeBlock';\n\n/**\n * Markdown renderer for chat/UI text, built on Streamdown (incomplete-markdown\n * repair during streaming, GFM tables, rehype-sanitize + rehype-harden).\n *\n * Streamdown ships its own Tailwind classes inside its dist files, which\n * consumers' Tailwind builds never scan — so every element is given a full\n * Berget class set here instead of relying on the defaults. Utility classes\n * used below live in this package's own dist, which the shipped `@source`\n * covers for all consumers.\n *\n * Code highlighting reuses the package CodeBlock family and the shared Shiki\n * highlighter (Berget CSS-variable theme). Mermaid/KaTeX are intentionally\n * not enabled.\n */\nconst bergetComponents: Components = {\n h1: (props) => (\n <defaultComponents.h1\n {...props}\n className={`\n mt-4 mb-2 text-lg font-semibold\n `}\n />\n ),\n h2: (props) => (\n <defaultComponents.h2\n {...props}\n className={`\n mt-4 mb-2 text-base font-semibold\n `}\n />\n ),\n h3: (props) => (\n <defaultComponents.h3\n {...props}\n className={`\n mt-3 mb-1.5 text-sm font-semibold\n `}\n />\n ),\n h4: (props) => (\n <defaultComponents.h4\n {...props}\n className={`\n mt-3 mb-1.5 text-sm font-semibold\n `}\n />\n ),\n h5: (props) => (\n <defaultComponents.h5\n {...props}\n className={`\n mt-3 mb-1.5 text-sm font-semibold\n `}\n />\n ),\n h6: (props) => (\n <defaultComponents.h6\n {...props}\n className={`\n mt-3 mb-1.5 text-sm font-semibold\n `}\n />\n ),\n p: (props) => (\n <defaultComponents.p\n {...props}\n className={`\n my-2\n first:mt-0\n last:mb-0\n `}\n />\n ),\n ul: (props) => (\n <defaultComponents.ul\n {...props}\n className={`\n my-2 ms-5 list-disc space-y-1\n marker:text-berget-muted-foreground\n `}\n />\n ),\n ol: (props) => (\n <defaultComponents.ol\n {...props}\n className={`\n my-2 ms-5 list-decimal space-y-1\n `}\n />\n ),\n li: (props) => <defaultComponents.li {...props} className={`leading-relaxed`} />,\n del: (props) => <del {...props} className={`line-through`} />,\n em: (props) => <em {...props} className={`italic`} />,\n blockquote: (props) => (\n <defaultComponents.blockquote\n {...props}\n className={`\n my-3 border-berget-border ps-3 text-berget-muted-foreground italic\n `}\n />\n ),\n hr: (props) => (\n <defaultComponents.hr\n {...props}\n className={`\n my-4 border-berget-border\n `}\n />\n ),\n img: (props) => (\n <defaultComponents.img\n {...props}\n className={`my-3 max-w-full rounded-berget-xs border-berget-border`}\n />\n ),\n // Real anchor, not Streamdown's default <button>: links must keep href\n // semantics (middle-click, new tab). Hardening attrs are added explicitly\n // since rehype-harden can only act on real anchors.\n a: ({ node: _node, ...props }) => (\n <a\n {...props}\n target=\"_blank\"\n rel=\"noopener noreferrer nofollow\"\n className={`text-berget-primary underline underline-offset-2`}\n />\n ),\n // Inline code only — fenced blocks are consumed by the `pre` override below.\n code: (props) => (\n <defaultComponents.code\n {...props}\n className={`\n rounded-berget-xs bg-muted px-1.5 py-0.5 font-mono text-[0.85em]\n `}\n />\n ),\n // Fenced / indented code: derive code + language from the child code\n // element and render with the package CodeBlock (highlighting included).\n pre: ({ children }) => {\n if (React.isValidElement(children)) {\n const { className, children: code } = children.props as {\n className?: string;\n children?: React.ReactNode;\n };\n const language = /language-([\\w+-]+)/.exec(className ?? '')?.[1] ?? 'text';\n return <MarkdownCodeBlock code={String(code ?? '')} language={language} />;\n }\n return <>{children}</>;\n },\n table: (props) => (\n <div\n className={`\n my-3 max-w-full overflow-x-auto rounded-berget-xs border-berget-border\n `}\n >\n <table {...props} className={`w-full border-collapse text-sm`} />\n </div>\n ),\n thead: (props) => <defaultComponents.thead {...props} className={`bg-muted/50`} />,\n th: (props) => (\n <defaultComponents.th\n {...props}\n className={`border-b-berget-border px-3 py-1.5 text-start font-semibold`}\n />\n ),\n td: (props) => (\n <defaultComponents.td\n {...props}\n className={`\n border-b-berget-border px-3 py-1.5\n `}\n />\n ),\n};\n\ntype MarkdownProps = Omit<StreamdownProps, 'components' | 'plugins' | 'dir' | 'prefix'>;\nexport type { MarkdownProps };\n\nexport function Markdown({ className, ...props }: MarkdownProps) {\n return (\n <Streamdown\n {...props}\n dir=\"ltr\"\n components={bergetComponents}\n className={cn('text-caption/relaxed text-berget-foreground', className)}\n />\n );\n}\n\nMarkdown.displayName = 'Markdown';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,mBAA+B;CACnC,KAAK,UACH,oBAAC,kBAAkB,IAAnB;EACE,GAAI;EACJ,WAAW;;;CAGZ,CAAA;CAEH,KAAK,UACH,oBAAC,kBAAkB,IAAnB;EACE,GAAI;EACJ,WAAW;;;CAGZ,CAAA;CAEH,KAAK,UACH,oBAAC,kBAAkB,IAAnB;EACE,GAAI;EACJ,WAAW;;;CAGZ,CAAA;CAEH,KAAK,UACH,oBAAC,kBAAkB,IAAnB;EACE,GAAI;EACJ,WAAW;;;CAGZ,CAAA;CAEH,KAAK,UACH,oBAAC,kBAAkB,IAAnB;EACE,GAAI;EACJ,WAAW;;;CAGZ,CAAA;CAEH,KAAK,UACH,oBAAC,kBAAkB,IAAnB;EACE,GAAI;EACJ,WAAW;;;CAGZ,CAAA;CAEH,IAAI,UACF,oBAAC,kBAAkB,GAAnB;EACE,GAAI;EACJ,WAAW;;;;;CAKZ,CAAA;CAEH,KAAK,UACH,oBAAC,kBAAkB,IAAnB;EACE,GAAI;EACJ,WAAW;;;;CAIZ,CAAA;CAEH,KAAK,UACH,oBAAC,kBAAkB,IAAnB;EACE,GAAI;EACJ,WAAW;;;CAGZ,CAAA;CAEH,KAAK,UAAU,oBAAC,kBAAkB,IAAnB;EAAsB,GAAI;EAAO,WAAW;CAAoB,CAAA;CAC/E,MAAM,UAAU,oBAAC,OAAD;EAAK,GAAI;EAAO,WAAW;CAAiB,CAAA;CAC5D,KAAK,UAAU,oBAAC,MAAD;EAAI,GAAI;EAAO,WAAW;CAAW,CAAA;CACpD,aAAa,UACX,oBAAC,kBAAkB,YAAnB;EACE,GAAI;EACJ,WAAW;;;CAGZ,CAAA;CAEH,KAAK,UACH,oBAAC,kBAAkB,IAAnB;EACE,GAAI;EACJ,WAAW;;;CAGZ,CAAA;CAEH,MAAM,UACJ,oBAAC,kBAAkB,KAAnB;EACE,GAAI;EACJ,WAAW;CACZ,CAAA;CAKH,IAAI,EAAE,MAAM,OAAO,GAAG,YACpB,oBAAC,KAAD;EACE,GAAI;EACJ,QAAO;EACP,KAAI;EACJ,WAAW;CACZ,CAAA;CAGH,OAAO,UACL,oBAAC,kBAAkB,MAAnB;EACE,GAAI;EACJ,WAAW;;;CAGZ,CAAA;CAIH,MAAM,EAAE,eAAe;EACrB,IAAI,MAAM,eAAe,QAAQ,GAAG;GAClC,MAAM,EAAE,WAAW,UAAU,SAAS,SAAS;GAI/C,MAAM,WAAW,qBAAqB,KAAK,aAAa,EAAE,CAAC,GAAG,MAAM;GACpE,OAAO,oBAAC,mBAAD;IAAmB,MAAM,OAAO,QAAQ,EAAE;IAAa;GAAW,CAAA;EAC3E;EACA,OAAO,oBAAA,UAAA,EAAG,SAAW,CAAA;CACvB;CACA,QAAQ,UACN,oBAAC,OAAD;EACE,WAAW;;;EAIX,UAAA,oBAAC,SAAD;GAAO,GAAI;GAAO,WAAW;EAAmC,CAAA;CAC7D,CAAA;CAEP,QAAQ,UAAU,oBAAC,kBAAkB,OAAnB;EAAyB,GAAI;EAAO,WAAW;CAAgB,CAAA;CACjF,KAAK,UACH,oBAAC,kBAAkB,IAAnB;EACE,GAAI;EACJ,WAAW;CACZ,CAAA;CAEH,KAAK,UACH,oBAAC,kBAAkB,IAAnB;EACE,GAAI;EACJ,WAAW;;;CAGZ,CAAA;AAEL;AAKA,SAAgB,SAAS,EAAE,WAAW,GAAG,SAAwB;CAC/D,OACE,oBAAC,YAAD;EACE,GAAI;EACJ,KAAI;EACJ,YAAY;EACZ,WAAW,GAAG,+CAA+C,SAAS;CACvE,CAAA;AAEL;AAEA,SAAS,cAAc"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const require_code_block = require("../../primitives/code-block.cjs");
|
|
3
|
+
const require_CodeBlock = require("../code-block/CodeBlock.cjs");
|
|
4
|
+
const require_use_highlighted_code = require("../../hooks/use-highlighted-code.cjs");
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
//#region src/components/markdown/MarkdownCodeBlock.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Fenced code block inside rendered markdown. Reuses the package CodeBlock
|
|
9
|
+
* composition (Berget tokens) and the shared Shiki highlighter so markdown
|
|
10
|
+
* code highlighting matches the rest of the design system.
|
|
11
|
+
*/
|
|
12
|
+
function MarkdownCodeBlock({ code, language }) {
|
|
13
|
+
const lines = require_use_highlighted_code.useHighlightedCode(code, language);
|
|
14
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_CodeBlock.CodeBlock, {
|
|
15
|
+
className: "my-3",
|
|
16
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_CodeBlock.CodeBlockHeader, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_CodeBlock.CodeBlockTitle, { children: language }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_code_block.CodeBlockActions, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_code_block.CodeBlockCopyButton, { value: code }) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_code_block.CodeBlockContent, {
|
|
17
|
+
lineNumbers: false,
|
|
18
|
+
children: lines.map((line, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_code_block.CodeBlockLine, { children: line }, index))
|
|
19
|
+
})]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
exports.MarkdownCodeBlock = MarkdownCodeBlock;
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=MarkdownCodeBlock.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownCodeBlock.cjs","names":["useHighlightedCode","CodeBlock","CodeBlockHeader","CodeBlockTitle","CodeBlockActions","CodeBlockCopyButton","CodeBlockContent","CodeBlockLine"],"sources":["../../../src/components/markdown/MarkdownCodeBlock.tsx"],"sourcesContent":["'use client';\n\nimport {\n CodeBlock,\n CodeBlockActions,\n CodeBlockContent,\n CodeBlockCopyButton,\n CodeBlockHeader,\n CodeBlockLine,\n CodeBlockTitle,\n} from '../code-block';\nimport { useHighlightedCode } from '../../hooks/use-highlighted-code';\n\n/**\n * Fenced code block inside rendered markdown. Reuses the package CodeBlock\n * composition (Berget tokens) and the shared Shiki highlighter so markdown\n * code highlighting matches the rest of the design system.\n */\nexport function MarkdownCodeBlock({ code, language }: { code: string; language: string }) {\n const lines = useHighlightedCode(code, language);\n\n return (\n <CodeBlock className=\"my-3\">\n <CodeBlockHeader>\n <CodeBlockTitle>{language}</CodeBlockTitle>\n <CodeBlockActions>\n <CodeBlockCopyButton value={code} />\n </CodeBlockActions>\n </CodeBlockHeader>\n <CodeBlockContent lineNumbers={false}>\n {lines.map((line, index) => (\n <CodeBlockLine key={index}>{line}</CodeBlockLine>\n ))}\n </CodeBlockContent>\n </CodeBlock>\n );\n}\n"],"mappings":";;;;;;;;;;;AAkBA,SAAgB,kBAAkB,EAAE,MAAM,YAAgD;CACxF,MAAM,QAAQA,6BAAAA,mBAAmB,MAAM,QAAQ;CAE/C,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,kBAAAA,WAAD;EAAW,WAAU;EAArB,UAAA,CACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,kBAAAA,iBAAD,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,kBAAAA,gBAAD,EAAA,UAAiB,SAAyB,CAAA,GAC1C,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,kBAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,qBAAD,EAAqB,OAAO,KAAO,CAAA,EACnB,CAAA,CACH,EAAA,CAAA,GACjB,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,kBAAD;GAAkB,aAAa;GAC5B,UAAA,MAAM,KAAK,MAAM,UAChB,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,eAAD,EAAA,UAA4B,KAAoB,GAA5B,KAA4B,CACjD;EACe,CAAA,CACT;;AAEf"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/components/markdown/MarkdownCodeBlock.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Fenced code block inside rendered markdown. Reuses the package CodeBlock
|
|
4
|
+
* composition (Berget tokens) and the shared Shiki highlighter so markdown
|
|
5
|
+
* code highlighting matches the rest of the design system.
|
|
6
|
+
*/
|
|
7
|
+
export declare function MarkdownCodeBlock({ code, language }: {
|
|
8
|
+
code: string;
|
|
9
|
+
language: string;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
//# sourceMappingURL=MarkdownCodeBlock.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownCodeBlock.d.cts","names":[],"sources":["../../../src/components/markdown/MarkdownCodeBlock.tsx"],"mappings":";;;;;;wBAkBgB,oBAAoB,MAAM;EAAc;EAAc;gCAAkB,IAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/components/markdown/MarkdownCodeBlock.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Fenced code block inside rendered markdown. Reuses the package CodeBlock
|
|
4
|
+
* composition (Berget tokens) and the shared Shiki highlighter so markdown
|
|
5
|
+
* code highlighting matches the rest of the design system.
|
|
6
|
+
*/
|
|
7
|
+
export declare function MarkdownCodeBlock({ code, language }: {
|
|
8
|
+
code: string;
|
|
9
|
+
language: string;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
//# sourceMappingURL=MarkdownCodeBlock.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownCodeBlock.d.mts","names":[],"sources":["../../../src/components/markdown/MarkdownCodeBlock.tsx"],"mappings":";;;;;;wBAkBgB,oBAAoB,MAAM;EAAc;EAAc;gCAAkB,IAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { CodeBlockActions, CodeBlockContent, CodeBlockCopyButton, CodeBlockLine } from "../../primitives/code-block.mjs";
|
|
3
|
+
import { CodeBlock, CodeBlockHeader, CodeBlockTitle } from "../code-block/CodeBlock.mjs";
|
|
4
|
+
import { useHighlightedCode } from "../../hooks/use-highlighted-code.mjs";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/markdown/MarkdownCodeBlock.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Fenced code block inside rendered markdown. Reuses the package CodeBlock
|
|
9
|
+
* composition (Berget tokens) and the shared Shiki highlighter so markdown
|
|
10
|
+
* code highlighting matches the rest of the design system.
|
|
11
|
+
*/
|
|
12
|
+
function MarkdownCodeBlock({ code, language }) {
|
|
13
|
+
const lines = useHighlightedCode(code, language);
|
|
14
|
+
return /* @__PURE__ */ jsxs(CodeBlock, {
|
|
15
|
+
className: "my-3",
|
|
16
|
+
children: [/* @__PURE__ */ jsxs(CodeBlockHeader, { children: [/* @__PURE__ */ jsx(CodeBlockTitle, { children: language }), /* @__PURE__ */ jsx(CodeBlockActions, { children: /* @__PURE__ */ jsx(CodeBlockCopyButton, { value: code }) })] }), /* @__PURE__ */ jsx(CodeBlockContent, {
|
|
17
|
+
lineNumbers: false,
|
|
18
|
+
children: lines.map((line, index) => /* @__PURE__ */ jsx(CodeBlockLine, { children: line }, index))
|
|
19
|
+
})]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { MarkdownCodeBlock };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=MarkdownCodeBlock.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownCodeBlock.mjs","names":[],"sources":["../../../src/components/markdown/MarkdownCodeBlock.tsx"],"sourcesContent":["'use client';\n\nimport {\n CodeBlock,\n CodeBlockActions,\n CodeBlockContent,\n CodeBlockCopyButton,\n CodeBlockHeader,\n CodeBlockLine,\n CodeBlockTitle,\n} from '../code-block';\nimport { useHighlightedCode } from '../../hooks/use-highlighted-code';\n\n/**\n * Fenced code block inside rendered markdown. Reuses the package CodeBlock\n * composition (Berget tokens) and the shared Shiki highlighter so markdown\n * code highlighting matches the rest of the design system.\n */\nexport function MarkdownCodeBlock({ code, language }: { code: string; language: string }) {\n const lines = useHighlightedCode(code, language);\n\n return (\n <CodeBlock className=\"my-3\">\n <CodeBlockHeader>\n <CodeBlockTitle>{language}</CodeBlockTitle>\n <CodeBlockActions>\n <CodeBlockCopyButton value={code} />\n </CodeBlockActions>\n </CodeBlockHeader>\n <CodeBlockContent lineNumbers={false}>\n {lines.map((line, index) => (\n <CodeBlockLine key={index}>{line}</CodeBlockLine>\n ))}\n </CodeBlockContent>\n </CodeBlock>\n );\n}\n"],"mappings":";;;;;;;;;;;AAkBA,SAAgB,kBAAkB,EAAE,MAAM,YAAgD;CACxF,MAAM,QAAQ,mBAAmB,MAAM,QAAQ;CAE/C,OACE,qBAAC,WAAD;EAAW,WAAU;EAArB,UAAA,CACE,qBAAC,iBAAD,EAAA,UAAA,CACE,oBAAC,gBAAD,EAAA,UAAiB,SAAyB,CAAA,GAC1C,oBAAC,kBAAD,EAAA,UACE,oBAAC,qBAAD,EAAqB,OAAO,KAAO,CAAA,EACnB,CAAA,CACH,EAAA,CAAA,GACjB,oBAAC,kBAAD;GAAkB,aAAa;GAC5B,UAAA,MAAM,KAAK,MAAM,UAChB,oBAAC,eAAD,EAAA,UAA4B,KAAoB,GAA5B,KAA4B,CACjD;EACe,CAAA,CACT;;AAEf"}
|
|
@@ -8,7 +8,7 @@ export type TooltipTriggerProps = Omit<React.ComponentProps<typeof TooltipTrigge
|
|
|
8
8
|
};
|
|
9
9
|
declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<TooltipTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
10
|
export type TooltipContentProps = React.ComponentProps<typeof TooltipContent$1>;
|
|
11
|
-
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").TooltipPopupProps & Pick<import("@base-ui/react").TooltipPositionerProps, "
|
|
11
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").TooltipPopupProps & Pick<import("@base-ui/react").TooltipPositionerProps, "side" | "align" | "alignOffset" | "sideOffset">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
14
14
|
//# sourceMappingURL=Tooltip.d.cts.map
|
|
@@ -8,7 +8,7 @@ export type TooltipTriggerProps = Omit<React.ComponentProps<typeof TooltipTrigge
|
|
|
8
8
|
};
|
|
9
9
|
declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<TooltipTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
10
|
export type TooltipContentProps = React.ComponentProps<typeof TooltipContent$1>;
|
|
11
|
-
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").TooltipPopupProps & Pick<import("@base-ui/react").TooltipPositionerProps, "
|
|
11
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").TooltipPopupProps & Pick<import("@base-ui/react").TooltipPositionerProps, "side" | "align" | "alignOffset" | "sideOffset">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
14
14
|
//# sourceMappingURL=Tooltip.d.mts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
const require_utils = require("../../lib/utils.cjs");
|
|
4
|
+
const require_trace = require("../../primitives/trace.cjs");
|
|
5
|
+
let react = require("react");
|
|
6
|
+
react = require_runtime.__toESM(react, 1);
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
//#region src/components/trace/index.tsx
|
|
9
|
+
function TraceLine({ className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_trace.TraceLine, {
|
|
11
|
+
className: require_utils.cn("text-berget-trace-fg", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function TraceDescription({ className, ...props }) {
|
|
16
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_trace.TraceDescription, {
|
|
17
|
+
className: require_utils.cn("text-berget-trace-fg", className),
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function TraceCollapsibleTrigger({ className, ...props }) {
|
|
22
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_trace.TraceCollapsibleTrigger, {
|
|
23
|
+
className: require_utils.cn("text-berget-trace-fg", className),
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function TraceCollapsibleContent({ children, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_trace.TraceCollapsibleContent, {
|
|
29
|
+
...props,
|
|
30
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
31
|
+
className: "block text-berget-trace-fg",
|
|
32
|
+
children
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
exports.Trace = require_trace.Trace;
|
|
38
|
+
exports.TraceCollapsible = require_trace.TraceCollapsible;
|
|
39
|
+
exports.TraceCollapsibleContent = TraceCollapsibleContent;
|
|
40
|
+
exports.TraceCollapsibleTrigger = TraceCollapsibleTrigger;
|
|
41
|
+
exports.TraceDescription = TraceDescription;
|
|
42
|
+
exports.TraceIcon = require_trace.TraceIcon;
|
|
43
|
+
exports.TraceLine = TraceLine;
|
|
44
|
+
exports.TraceTitle = require_trace.TraceTitle;
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["TraceLinePrimitive","cn","TraceDescriptionPrimitive","TraceCollapsibleTriggerPrimitive","TraceCollapsibleContentPrimitive"],"sources":["../../../src/components/trace/index.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport {\n Trace,\n TraceIcon,\n TraceTitle,\n TraceCollapsible,\n TraceCollapsibleTrigger as TraceCollapsibleTriggerPrimitive,\n TraceLine as TraceLinePrimitive,\n TraceDescription as TraceDescriptionPrimitive,\n TraceCollapsibleContent as TraceCollapsibleContentPrimitive,\n} from '../../primitives/trace';\n\ntype TraceLineProps = React.ComponentProps<typeof TraceLinePrimitive>;\ntype TraceDescriptionProps = React.ComponentProps<typeof TraceDescriptionPrimitive>;\ntype TraceCollapsibleTriggerProps = React.ComponentProps<typeof TraceCollapsibleTriggerPrimitive>;\ntype TraceCollapsibleContentProps = React.ComponentProps<typeof TraceCollapsibleContentPrimitive>;\n\n/*\n * Reasoning lines read as secondary information. The shadcn bridge maps\n * muted-foreground to full Peak, so trace parts carry an explicit dimmer\n * token (--berget-trace-fg) instead of the primitive's default color.\n */\nfunction TraceLine({ className, ...props }: TraceLineProps) {\n return <TraceLinePrimitive className={cn('text-berget-trace-fg', className)} {...props} />;\n}\n\nfunction TraceDescription({ className, ...props }: TraceDescriptionProps) {\n return <TraceDescriptionPrimitive className={cn('text-berget-trace-fg', className)} {...props} />;\n}\n\nfunction TraceCollapsibleTrigger({ className, ...props }: TraceCollapsibleTriggerProps) {\n return (\n <TraceCollapsibleTriggerPrimitive\n className={cn('text-berget-trace-fg', className)}\n {...props}\n />\n );\n}\n\n/* The primitive's content panel hardcodes the bridge color and doesn't\n forward className, so the color is set on a block inside the panel. */\nfunction TraceCollapsibleContent({ children, ...props }: TraceCollapsibleContentProps) {\n return (\n <TraceCollapsibleContentPrimitive {...props}>\n <span className=\"block text-berget-trace-fg\">{children}</span>\n </TraceCollapsibleContentPrimitive>\n );\n}\n\nexport {\n Trace,\n TraceLine,\n TraceIcon,\n TraceTitle,\n TraceDescription,\n TraceCollapsible,\n TraceCollapsibleTrigger,\n TraceCollapsibleContent,\n};\n"],"mappings":";;;;;;;;AAyBA,SAAS,UAAU,EAAE,WAAW,GAAG,SAAyB;CAC1D,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACA,cAAAA,WAAD;EAAoB,WAAWC,cAAAA,GAAG,wBAAwB,SAAS;EAAG,GAAI;CAAQ,CAAA;AAC3F;AAEA,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAgC;CACxE,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACC,cAAAA,kBAAD;EAA2B,WAAWD,cAAAA,GAAG,wBAAwB,SAAS;EAAG,GAAI;CAAQ,CAAA;AAClG;AAEA,SAAS,wBAAwB,EAAE,WAAW,GAAG,SAAuC;CACtF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACE,cAAAA,yBAAD;EACE,WAAWF,cAAAA,GAAG,wBAAwB,SAAS;EAC/C,GAAI;CACL,CAAA;AAEL;AAIA,SAAS,wBAAwB,EAAE,UAAU,GAAG,SAAuC;CACrF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACG,cAAAA,yBAAD;EAAkC,GAAI;EACpC,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GAAM,WAAU;GAA8B;EAAe,CAAA;CAC7B,CAAA;AAEtC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Trace, TraceCollapsible, TraceCollapsibleContent as TraceCollapsibleContent$1, TraceCollapsibleTrigger as TraceCollapsibleTrigger$1, TraceDescription as TraceDescription$1, TraceIcon, TraceLine as TraceLine$1, TraceTitle } from "../../primitives/trace.cjs";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
//#region src/components/trace/index.d.ts
|
|
4
|
+
type TraceLineProps = React.ComponentProps<typeof TraceLine$1>;
|
|
5
|
+
type TraceDescriptionProps = React.ComponentProps<typeof TraceDescription$1>;
|
|
6
|
+
type TraceCollapsibleTriggerProps = React.ComponentProps<typeof TraceCollapsibleTrigger$1>;
|
|
7
|
+
type TraceCollapsibleContentProps = React.ComponentProps<typeof TraceCollapsibleContent$1>;
|
|
8
|
+
declare function TraceLine({ className, ...props }: TraceLineProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function TraceDescription({ className, ...props }: TraceDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function TraceCollapsibleTrigger({ className, ...props }: TraceCollapsibleTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function TraceCollapsibleContent({ children, ...props }: TraceCollapsibleContentProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle };
|
|
14
|
+
//# sourceMappingURL=index.d.cts.map
|