@alfadocs/ui-kit 0.46.0 → 0.47.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/_chunks/alia-sidebar-CVIPrdc9.js +1125 -0
- package/dist/_chunks/{audio-recorder-C1rhKhSN.js → audio-recorder-DC-v9YFW.js} +81 -91
- package/dist/_chunks/{chat-input-CQe7nR_v.js → chat-input-CFwc7JxL.js} +2 -1
- package/dist/_chunks/{chat-message-ASgGtj-L.js → chat-message-B5JpFj0F.js} +79 -73
- package/dist/_chunks/code-block-HoddNOKJ.js +106 -0
- package/dist/_chunks/download-CDF1sbL9.js +16 -0
- package/dist/_chunks/{editable-currency-cell-renderer-BEBUQl9P.js → editable-currency-cell-renderer-CLil9B29.js} +283 -293
- package/dist/_chunks/mic-B4Gog3Gi.js +16 -0
- package/dist/_chunks/pencil-CfQX-0Qc.js +21 -0
- package/dist/_chunks/{streaming-text-GH07yIYh.js → streaming-text-CfhDqtIT.js} +49 -45
- package/dist/_chunks/{workflow-map-BFNpzTiw.js → workflow-map-Djn1QMJc.js} +135 -150
- package/dist/agent-catalog.json +1 -1
- package/dist/components/_shared/code-block.d.ts +39 -0
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/chat-message/chat-message.d.ts +6 -0
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +15 -0
- package/dist/i18n/locales/ar.js +16 -1
- package/dist/i18n/locales/de.d.ts +15 -0
- package/dist/i18n/locales/de.js +16 -1
- package/dist/i18n/locales/el.d.ts +15 -0
- package/dist/i18n/locales/el.js +16 -1
- package/dist/i18n/locales/en.d.ts +15 -0
- package/dist/i18n/locales/en.js +16 -1
- package/dist/i18n/locales/es.d.ts +15 -0
- package/dist/i18n/locales/es.js +16 -1
- package/dist/i18n/locales/fr.d.ts +15 -0
- package/dist/i18n/locales/fr.js +16 -1
- package/dist/i18n/locales/hi.d.ts +15 -0
- package/dist/i18n/locales/hi.js +16 -1
- package/dist/i18n/locales/it.d.ts +15 -0
- package/dist/i18n/locales/it.js +16 -1
- package/dist/i18n/locales/ja.d.ts +15 -0
- package/dist/i18n/locales/ja.js +16 -1
- package/dist/i18n/locales/nl.d.ts +15 -0
- package/dist/i18n/locales/nl.js +16 -1
- package/dist/i18n/locales/pl.d.ts +15 -0
- package/dist/i18n/locales/pl.js +16 -1
- package/dist/i18n/locales/pt.d.ts +15 -0
- package/dist/i18n/locales/pt.js +16 -1
- package/dist/i18n/locales/ro.d.ts +15 -0
- package/dist/i18n/locales/ro.js +16 -1
- package/dist/i18n/locales/ru.d.ts +15 -0
- package/dist/i18n/locales/ru.js +16 -1
- package/dist/i18n/locales/sq.d.ts +15 -0
- package/dist/i18n/locales/sq.js +16 -1
- package/dist/i18n/locales/sv.d.ts +15 -0
- package/dist/i18n/locales/sv.js +16 -1
- package/dist/i18n/locales/tr.d.ts +15 -0
- package/dist/i18n/locales/tr.js +16 -1
- package/dist/i18n/locales/zh.d.ts +15 -0
- package/dist/i18n/locales/zh.js +16 -1
- package/dist/index.js +7 -7
- package/dist/locales/ar.json +16 -1
- package/dist/locales/de.json +16 -1
- package/dist/locales/el.json +16 -1
- package/dist/locales/en.json +16 -1
- package/dist/locales/es.json +16 -1
- package/dist/locales/fr.json +16 -1
- package/dist/locales/hi.json +16 -1
- package/dist/locales/it.json +16 -1
- package/dist/locales/ja.json +16 -1
- package/dist/locales/nl.json +16 -1
- package/dist/locales/pl.json +16 -1
- package/dist/locales/pt.json +16 -1
- package/dist/locales/ro.json +16 -1
- package/dist/locales/ru.json +16 -1
- package/dist/locales/sq.json +16 -1
- package/dist/locales/sv.json +16 -1
- package/dist/locales/tr.json +16 -1
- package/dist/locales/zh.json +16 -1
- package/dist/patterns/alia-assistant/alia-types.d.ts +61 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/alia-sidebar-Be8FhKYd.js +0 -837
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsxs as d, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { B as
|
|
6
|
-
import { A } from "./avatar-BNQNhoyL.js";
|
|
7
|
-
import { T as
|
|
8
|
-
import { s as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { C as
|
|
12
|
-
import { C as
|
|
13
|
-
|
|
2
|
+
import { forwardRef as j, useMemo as T, Fragment as l } from "react";
|
|
3
|
+
import { c as h } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as z } from "react-i18next";
|
|
5
|
+
import { B as F } from "./button-DD_0Xdmr.js";
|
|
6
|
+
import { A as I } from "./avatar-BNQNhoyL.js";
|
|
7
|
+
import { T as A } from "./timestamp-BV2lC-wV.js";
|
|
8
|
+
import { s as B, C as M } from "./code-block-HoddNOKJ.js";
|
|
9
|
+
import { s as S } from "./safe-image-src-DstKgCo7.js";
|
|
10
|
+
import { R as V } from "./rotate-ccw-BWANpitO.js";
|
|
11
|
+
import { C as D } from "./clock-21AGPWJ5.js";
|
|
12
|
+
import { C as E } from "./check-DPdL_Sm7.js";
|
|
13
|
+
import { C as L } from "./circle-alert-ChA9opNA.js";
|
|
14
|
+
const R = h(
|
|
14
15
|
"ds:flex ds:w-full ds:items-start ds:gap-[var(--spacing-sm)]",
|
|
15
16
|
{
|
|
16
17
|
variants: {
|
|
@@ -22,7 +23,7 @@ const D = v(
|
|
|
22
23
|
},
|
|
23
24
|
defaultVariants: { role: "assistant" }
|
|
24
25
|
}
|
|
25
|
-
),
|
|
26
|
+
), _ = h(
|
|
26
27
|
[
|
|
27
28
|
// Cap at 42rem on wide surfaces; on narrow docks (Alia sidebar ≈22rem)
|
|
28
29
|
// leave room for the avatar column (size-8 = 32px = --spacing-xl) +
|
|
@@ -44,31 +45,31 @@ const D = v(
|
|
|
44
45
|
},
|
|
45
46
|
defaultVariants: { role: "assistant" }
|
|
46
47
|
}
|
|
47
|
-
),
|
|
48
|
-
function
|
|
48
|
+
), $ = /^(https?:|mailto:)/i;
|
|
49
|
+
function k(n) {
|
|
49
50
|
const e = [];
|
|
50
|
-
let
|
|
51
|
-
const
|
|
52
|
-
for (;
|
|
53
|
-
const
|
|
54
|
-
if (!
|
|
55
|
-
e.push({ type: "text", value:
|
|
51
|
+
let s = n;
|
|
52
|
+
const t = /\*\*([^*]+)\*\*|`([^`]+)`|\[([^\]]+)\]\(([^)]+)\)|\n/;
|
|
53
|
+
for (; s.length > 0; ) {
|
|
54
|
+
const r = t.exec(s);
|
|
55
|
+
if (!r) {
|
|
56
|
+
e.push({ type: "text", value: s });
|
|
56
57
|
break;
|
|
57
58
|
}
|
|
58
|
-
|
|
59
|
+
r.index > 0 && e.push({ type: "text", value: s.slice(0, r.index) }), r[1] !== void 0 ? e.push({ type: "bold", value: r[1] }) : r[2] !== void 0 ? e.push({ type: "code", value: r[2] }) : r[3] !== void 0 && r[4] !== void 0 ? e.push({ type: "link", label: r[3], href: r[4] }) : e.push({ type: "br" }), s = s.slice(r.index + r[0].length);
|
|
59
60
|
}
|
|
60
61
|
return e;
|
|
61
62
|
}
|
|
62
|
-
function
|
|
63
|
-
return
|
|
63
|
+
function H(n) {
|
|
64
|
+
return k(n).map((e, s) => e.type === "bold" ? /* @__PURE__ */ a("strong", { children: e.value }, s) : e.type === "code" ? /* @__PURE__ */ a(
|
|
64
65
|
"code",
|
|
65
66
|
{
|
|
66
67
|
dir: "ltr",
|
|
67
68
|
className: "ds:rounded-[var(--radius-sm)] ds:bg-muted/30 ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:font-[family-name:var(--font-mono)]",
|
|
68
69
|
children: e.value
|
|
69
70
|
},
|
|
70
|
-
|
|
71
|
-
) : e.type === "br" ? /* @__PURE__ */ a("br", {},
|
|
71
|
+
s
|
|
72
|
+
) : e.type === "br" ? /* @__PURE__ */ a("br", {}, s) : e.type === "link" ? $.test(e.href) ? /* @__PURE__ */ a(
|
|
72
73
|
"a",
|
|
73
74
|
{
|
|
74
75
|
href: e.href,
|
|
@@ -77,63 +78,67 @@ function _(t) {
|
|
|
77
78
|
className: "ds:underline ds:underline-offset-2 ds:hover:opacity-80",
|
|
78
79
|
children: e.label
|
|
79
80
|
},
|
|
80
|
-
|
|
81
|
-
) : /* @__PURE__ */ a(
|
|
81
|
+
s
|
|
82
|
+
) : /* @__PURE__ */ a(l, { children: e.label }, s) : /* @__PURE__ */ a(l, { children: e.value }, s));
|
|
82
83
|
}
|
|
83
|
-
|
|
84
|
+
function q(n) {
|
|
85
|
+
return B(n).map((e, s) => e.type === "code" ? /* @__PURE__ */ a(M, { code: e.value, language: e.lang }, s) : /* @__PURE__ */ a(l, { children: H(e.value) }, s));
|
|
86
|
+
}
|
|
87
|
+
const G = j(
|
|
84
88
|
({
|
|
85
|
-
role:
|
|
89
|
+
role: n,
|
|
86
90
|
content: e,
|
|
87
|
-
avatar:
|
|
88
|
-
timestamp:
|
|
89
|
-
status:
|
|
90
|
-
renderMarkdown:
|
|
91
|
-
onRetry:
|
|
91
|
+
avatar: s,
|
|
92
|
+
timestamp: t,
|
|
93
|
+
status: r,
|
|
94
|
+
renderMarkdown: x = !1,
|
|
95
|
+
onRetry: m,
|
|
96
|
+
actions: c,
|
|
92
97
|
className: b,
|
|
93
|
-
...
|
|
94
|
-
},
|
|
95
|
-
const { t: i, i18n:
|
|
96
|
-
if (!
|
|
97
|
-
const
|
|
98
|
-
return Number.isNaN(
|
|
98
|
+
...y
|
|
99
|
+
}, N) => {
|
|
100
|
+
const { t: i, i18n: u } = z(), o = T(() => {
|
|
101
|
+
if (!t) return null;
|
|
102
|
+
const v = t instanceof Date ? t : new Date(t);
|
|
103
|
+
return Number.isNaN(v.getTime()) ? null : new Intl.DateTimeFormat(u.language, {
|
|
99
104
|
hour: "2-digit",
|
|
100
105
|
minute: "2-digit"
|
|
101
|
-
}).format(
|
|
102
|
-
}, [
|
|
103
|
-
|
|
106
|
+
}).format(v);
|
|
107
|
+
}, [t, u.language]), f = i(`chat.message.role.${n}`), w = o ? i("chat.message.label", { role: f, time: o }) : i("chat.message.labelNoTime", { role: f }), C = x ? q(e) : e, p = !r || r === "edited" ? null : r === "sending" ? /* @__PURE__ */ a(D, { "aria-hidden": "true", className: "ds:size-3.5" }) : r === "sent" ? /* @__PURE__ */ a(E, { "aria-hidden": "true", className: "ds:size-3.5" }) : /* @__PURE__ */ a(
|
|
108
|
+
L,
|
|
104
109
|
{
|
|
105
110
|
"aria-hidden": "true",
|
|
106
111
|
className: "ds:size-3.5 ds:text-[color:var(--destructive)]"
|
|
107
112
|
}
|
|
108
|
-
),
|
|
113
|
+
), g = r ? i(`chat.message.status.${r}`) : null;
|
|
109
114
|
return /* @__PURE__ */ d(
|
|
110
115
|
"article",
|
|
111
116
|
{
|
|
112
|
-
ref:
|
|
113
|
-
"aria-label":
|
|
117
|
+
ref: N,
|
|
118
|
+
"aria-label": w,
|
|
114
119
|
"data-component": "chat-message",
|
|
115
120
|
className: [
|
|
116
|
-
|
|
121
|
+
R({ role: n, className: b }),
|
|
117
122
|
// Entrance: fade + slide up on mount. `--animation-duration` is 0ms
|
|
118
123
|
// under `prefers-reduced-motion` and `.theme-accessible`, so both
|
|
119
124
|
// collapse the animation to an instant state change automatically.
|
|
120
125
|
"ds:motion-safe:animate-in ds:motion-safe:fade-in-0 ds:motion-safe:slide-in-from-bottom-2",
|
|
121
126
|
"ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]"
|
|
122
127
|
].join(" "),
|
|
123
|
-
...
|
|
128
|
+
...y,
|
|
124
129
|
children: [
|
|
125
|
-
|
|
130
|
+
n !== "system" && s ? s.slot ? (
|
|
126
131
|
// Consumer-supplied avatar node (e.g. Alia's Sparkles tile).
|
|
127
|
-
|
|
132
|
+
s.slot
|
|
128
133
|
) : (
|
|
129
134
|
// Allow-list the src: LLM-supplied values can carry
|
|
130
135
|
// `javascript:` / `data:text/html` / `data:image/svg+xml` and so
|
|
131
136
|
// are scrubbed here before reaching <Avatar>. Fallback to initials.
|
|
132
137
|
/* @__PURE__ */ a(
|
|
133
|
-
|
|
138
|
+
I,
|
|
134
139
|
{
|
|
135
|
-
name:
|
|
136
|
-
src:
|
|
140
|
+
name: s.name,
|
|
141
|
+
src: S(s.src),
|
|
137
142
|
size: "sm"
|
|
138
143
|
}
|
|
139
144
|
)
|
|
@@ -147,7 +152,7 @@ const $ = C(
|
|
|
147
152
|
// CJK run, hash) can force the bubble wider than the parent
|
|
148
153
|
// and spill outside narrow containers like the Alia sidebar.
|
|
149
154
|
"ds:flex ds:flex-col ds:min-w-0",
|
|
150
|
-
|
|
155
|
+
n === "user" ? "ds:items-end" : n === "assistant" ? "ds:items-start" : "ds:items-center"
|
|
151
156
|
].join(" "),
|
|
152
157
|
children: [
|
|
153
158
|
/* @__PURE__ */ a(
|
|
@@ -155,17 +160,17 @@ const $ = C(
|
|
|
155
160
|
{
|
|
156
161
|
dir: "auto",
|
|
157
162
|
className: [
|
|
158
|
-
|
|
163
|
+
_({ role: n }),
|
|
159
164
|
// `break-words` (from bubbleVariants) handles soft hyphens;
|
|
160
165
|
// `overflow-wrap: anywhere` is the last-resort break for
|
|
161
166
|
// URLs, hashes, or CJK runs that would otherwise push the
|
|
162
167
|
// bubble wider than its parent in narrow docks like Alia.
|
|
163
168
|
"ds:[overflow-wrap:anywhere]"
|
|
164
169
|
].join(" "),
|
|
165
|
-
children:
|
|
170
|
+
children: C
|
|
166
171
|
}
|
|
167
172
|
),
|
|
168
|
-
(o ||
|
|
173
|
+
(o || g) && n !== "system" ? /* @__PURE__ */ d(
|
|
169
174
|
"div",
|
|
170
175
|
{
|
|
171
176
|
className: [
|
|
@@ -173,16 +178,16 @@ const $ = C(
|
|
|
173
178
|
"type-meta ds:text-[color:var(--muted-foreground)]"
|
|
174
179
|
].join(" "),
|
|
175
180
|
children: [
|
|
176
|
-
|
|
177
|
-
|
|
181
|
+
t ? /* @__PURE__ */ a(
|
|
182
|
+
A,
|
|
178
183
|
{
|
|
179
|
-
value:
|
|
184
|
+
value: t,
|
|
180
185
|
format: "absolute",
|
|
181
186
|
absoluteFormat: { hour: "2-digit", minute: "2-digit" },
|
|
182
187
|
dir: "ltr"
|
|
183
188
|
}
|
|
184
189
|
) : null,
|
|
185
|
-
|
|
190
|
+
p ? (
|
|
186
191
|
// `key={status}` re-mounts the span on every status change so
|
|
187
192
|
// `animate-in` re-runs — gives the sending → sent → error
|
|
188
193
|
// swap a subtle cross-fade instead of an abrupt pop.
|
|
@@ -195,26 +200,27 @@ const $ = C(
|
|
|
195
200
|
"ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]"
|
|
196
201
|
].join(" "),
|
|
197
202
|
children: [
|
|
198
|
-
|
|
199
|
-
/* @__PURE__ */ a("span", { className: "ds:sr-only", children:
|
|
203
|
+
p,
|
|
204
|
+
/* @__PURE__ */ a("span", { className: "ds:sr-only", children: g })
|
|
200
205
|
]
|
|
201
206
|
},
|
|
202
|
-
|
|
207
|
+
r
|
|
203
208
|
)
|
|
204
209
|
) : null,
|
|
205
|
-
|
|
206
|
-
|
|
210
|
+
r === "error" && m ? /* @__PURE__ */ a(
|
|
211
|
+
F,
|
|
207
212
|
{
|
|
208
213
|
intent: "ghost",
|
|
209
214
|
size: "sm",
|
|
210
|
-
onClick:
|
|
211
|
-
startIcon: /* @__PURE__ */ a(
|
|
215
|
+
onClick: m,
|
|
216
|
+
startIcon: /* @__PURE__ */ a(V, {}),
|
|
212
217
|
children: i("chat.message.retry")
|
|
213
218
|
}
|
|
214
219
|
) : null
|
|
215
220
|
]
|
|
216
221
|
}
|
|
217
|
-
) : null
|
|
222
|
+
) : null,
|
|
223
|
+
c ? /* @__PURE__ */ a("div", { className: "ds:mt-[var(--spacing-xs)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: c }) : null
|
|
218
224
|
]
|
|
219
225
|
}
|
|
220
226
|
)
|
|
@@ -223,8 +229,8 @@ const $ = C(
|
|
|
223
229
|
);
|
|
224
230
|
}
|
|
225
231
|
);
|
|
226
|
-
|
|
232
|
+
G.displayName = "ChatMessage";
|
|
227
233
|
export {
|
|
228
|
-
|
|
234
|
+
G as C
|
|
229
235
|
};
|
|
230
|
-
//# sourceMappingURL=chat-message-
|
|
236
|
+
//# sourceMappingURL=chat-message-B5JpFj0F.js.map
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { jsxs as m, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as u, useState as g, useCallback as x } from "react";
|
|
3
|
+
import { c as h } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as b } from "react-i18next";
|
|
5
|
+
import { I as y } from "./icon-button-CKEOrN37.js";
|
|
6
|
+
import { C } from "./check-DPdL_Sm7.js";
|
|
7
|
+
import { C as k } from "./copy-B00HK7tj.js";
|
|
8
|
+
function F(e) {
|
|
9
|
+
const s = [], t = /```([^\n`]*)\n([\s\S]*?)(?:\n?```|$)/g;
|
|
10
|
+
let o = 0, r;
|
|
11
|
+
for (; (r = t.exec(e)) !== null; )
|
|
12
|
+
r.index > o && s.push({ type: "text", value: e.slice(o, r.index) }), s.push({
|
|
13
|
+
type: "code",
|
|
14
|
+
lang: r[1].trim() || void 0,
|
|
15
|
+
value: r[2]
|
|
16
|
+
}), o = t.lastIndex;
|
|
17
|
+
return o < e.length && s.push({ type: "text", value: e.slice(o) }), s;
|
|
18
|
+
}
|
|
19
|
+
const w = h(
|
|
20
|
+
[
|
|
21
|
+
"ds:my-[var(--spacing-sm)] ds:overflow-hidden",
|
|
22
|
+
"ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
|
|
23
|
+
"ds:bg-[var(--muted)]"
|
|
24
|
+
].join(" ")
|
|
25
|
+
), B = u(
|
|
26
|
+
({ code: e, language: s, showCopy: t = !0, className: o, ...r }, f) => {
|
|
27
|
+
var l;
|
|
28
|
+
const { t: d } = b(), [n, i] = g(!1), c = t && typeof navigator < "u" && typeof ((l = navigator.clipboard) == null ? void 0 : l.writeText) == "function", v = x(() => {
|
|
29
|
+
var p;
|
|
30
|
+
(p = navigator.clipboard) == null || p.writeText(e).then(() => {
|
|
31
|
+
i(!0), setTimeout(() => i(!1), 2e3);
|
|
32
|
+
}).catch(() => {
|
|
33
|
+
});
|
|
34
|
+
}, [e]);
|
|
35
|
+
return /* @__PURE__ */ m(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
ref: f,
|
|
39
|
+
"data-component": "code-block",
|
|
40
|
+
className: [w(), o].filter(Boolean).join(" "),
|
|
41
|
+
...r,
|
|
42
|
+
children: [
|
|
43
|
+
s || c ? /* @__PURE__ */ m(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
className: [
|
|
47
|
+
"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]",
|
|
48
|
+
"ds:border-b ds:border-[color:var(--border)]",
|
|
49
|
+
"ds:bg-[color-mix(in_srgb,var(--muted-foreground)_8%,transparent)]",
|
|
50
|
+
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-xs)]",
|
|
51
|
+
"ds:pt-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]"
|
|
52
|
+
].join(" "),
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ a(
|
|
55
|
+
"span",
|
|
56
|
+
{
|
|
57
|
+
dir: "ltr",
|
|
58
|
+
className: "type-meta ds:text-[color:var(--muted-foreground)]",
|
|
59
|
+
children: s ?? ""
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
c ? /* @__PURE__ */ a(
|
|
63
|
+
y,
|
|
64
|
+
{
|
|
65
|
+
icon: n ? /* @__PURE__ */ a(C, {}) : /* @__PURE__ */ a(k, {}),
|
|
66
|
+
"aria-label": d(n ? "codeBlock.copied" : "codeBlock.copy"),
|
|
67
|
+
intent: "ghost",
|
|
68
|
+
size: "sm",
|
|
69
|
+
onClick: v
|
|
70
|
+
}
|
|
71
|
+
) : null
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
) : null,
|
|
75
|
+
/* @__PURE__ */ a(
|
|
76
|
+
"pre",
|
|
77
|
+
{
|
|
78
|
+
tabIndex: 0,
|
|
79
|
+
className: "ds:m-0 ds:overflow-x-auto ds:p-[var(--spacing-md)]",
|
|
80
|
+
children: /* @__PURE__ */ a(
|
|
81
|
+
"code",
|
|
82
|
+
{
|
|
83
|
+
dir: "ltr",
|
|
84
|
+
className: [
|
|
85
|
+
"ds:font-[family-name:var(--font-mono)]",
|
|
86
|
+
"ds:text-[length:var(--font-size-sm)] ds:leading-relaxed",
|
|
87
|
+
"ds:text-[color:var(--foreground)]",
|
|
88
|
+
"ds:whitespace-pre"
|
|
89
|
+
].join(" "),
|
|
90
|
+
children: e
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ a("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: n ? d("codeBlock.copied") : "" })
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
B.displayName = "CodeBlock";
|
|
102
|
+
export {
|
|
103
|
+
B as C,
|
|
104
|
+
F as s
|
|
105
|
+
};
|
|
106
|
+
//# sourceMappingURL=code-block-HoddNOKJ.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { c as o } from "./createLucideIcon-CrFbzy84.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v1.8.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const a = [
|
|
9
|
+
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
10
|
+
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
11
|
+
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
12
|
+
], e = o("download", a);
|
|
13
|
+
export {
|
|
14
|
+
e as D
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=download-CDF1sbL9.js.map
|