@keboola/design 6.5.0 → 9.0.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.
Files changed (49) hide show
  1. package/AGENTS.md +7 -7
  2. package/COMPONENT-API.md +3 -9
  3. package/README.md +1 -1
  4. package/dist/charts.cjs +22 -22
  5. package/dist/charts.cjs.map +1 -1
  6. package/dist/charts.d.cts +5 -5
  7. package/dist/charts.d.ts +5 -5
  8. package/dist/charts.js +22 -22
  9. package/dist/charts.js.map +1 -1
  10. package/dist/editors.cjs +904 -550
  11. package/dist/editors.cjs.map +1 -1
  12. package/dist/editors.d.cts +35 -5
  13. package/dist/editors.d.ts +35 -5
  14. package/dist/editors.js +908 -537
  15. package/dist/editors.js.map +1 -1
  16. package/dist/icons.cjs +23817 -45
  17. package/dist/icons.cjs.map +1 -1
  18. package/dist/icons.d.cts +12 -3
  19. package/dist/icons.d.ts +12 -3
  20. package/dist/icons.js +297 -40
  21. package/dist/icons.js.map +1 -1
  22. package/dist/index.cjs +4702 -4755
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +183 -169
  25. package/dist/index.d.ts +183 -169
  26. package/dist/index.js +4700 -4754
  27. package/dist/index.js.map +1 -1
  28. package/dist/markdown-editor.cjs +817 -923
  29. package/dist/markdown-editor.cjs.map +1 -1
  30. package/dist/markdown-editor.js +818 -923
  31. package/dist/markdown-editor.js.map +1 -1
  32. package/dist/mermaid.cjs +308 -425
  33. package/dist/mermaid.cjs.map +1 -1
  34. package/dist/mermaid.d.cts +5 -1
  35. package/dist/mermaid.d.ts +5 -1
  36. package/dist/mermaid.js +310 -408
  37. package/dist/mermaid.js.map +1 -1
  38. package/dist/rjsf.cjs +1704 -1234
  39. package/dist/rjsf.cjs.map +1 -1
  40. package/dist/rjsf.js +1708 -1237
  41. package/dist/rjsf.js.map +1 -1
  42. package/dist/styles.css +2 -5
  43. package/dist/testing.cjs +86 -82
  44. package/dist/testing.cjs.map +1 -1
  45. package/dist/testing.js +86 -82
  46. package/dist/testing.js.map +1 -1
  47. package/package.json +26 -19
  48. package/src/styles.css +125 -105
  49. package/src/theme.css +264 -0
package/dist/mermaid.js CHANGED
@@ -1,36 +1,20 @@
1
- import { createContext, forwardRef, useId, useState, useRef, useEffect, useMemo, useCallback, use } from 'react';
1
+ import { createContext, useId, useState, useRef, useEffect, useMemo, useCallback, use } from 'react';
2
2
  import { renderMermaidSVG } from 'beautiful-mermaid';
3
3
  import colors from '@keboola/tailwind-config/colors';
4
+ import { createPortal } from 'react-dom';
5
+ import DOMPurify from 'dompurify';
6
+ import { Root, Slottable } from '@radix-ui/react-slot';
7
+ import { Minimize2, Maximize2, Loader2, Copy } from 'lucide-react';
4
8
  import { clsx } from 'clsx';
5
9
  import { extendTailwindMerge } from 'tailwind-merge';
6
10
  import { Root as Root$1, Trigger, Portal, Content } from '@radix-ui/react-tooltip';
7
11
  import { cva } from 'class-variance-authority';
8
12
  import { keboolaLegacySidebar, keboolaLegacyTopnav } from '@keboola/brand-registry';
9
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
10
- import { createPortal } from 'react-dom';
11
- import DOMPurify from 'dompurify';
12
- import { Root, Slottable } from '@radix-ui/react-slot';
13
- import * as lucide_react_star from 'lucide-react';
13
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
14
14
 
15
- var __defProp = Object.defineProperty;
16
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
17
- var __getOwnPropNames = Object.getOwnPropertyNames;
18
- var __hasOwnProp = Object.prototype.hasOwnProperty;
19
- var __export = (target, all) => {
20
- for (var name in all)
21
- __defProp(target, name, { get: all[name], enumerable: true });
22
- };
23
- var __copyProps = (to, from, except, desc) => {
24
- if (from && typeof from === "object" || typeof from === "function") {
25
- for (let key of __getOwnPropNames(from))
26
- if (!__hasOwnProp.call(to, key) && key !== except)
27
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
28
- }
29
- return to;
30
- };
31
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget);
15
+ // src/blocks/MermaidDiagram/MermaidDiagram.tsx
32
16
  var twMerge = extendTailwindMerge({
33
- prefix: "tw-"
17
+ prefix: "tw"
34
18
  });
35
19
  var cn = (...classes) => twMerge(clsx(...classes));
36
20
 
@@ -80,39 +64,39 @@ var useArgoDesign = () => use(ArgoDesignContext);
80
64
  var tooltipVariants = cva(
81
65
  [
82
66
  "tailwindcss-preflight",
83
- "tw-inline-block",
84
- "tw-break-anywhere",
85
- "tw-max-h-96",
86
- "tw-overflow-y-auto",
87
- "tw-z-[1060]",
67
+ "tw:inline-block",
68
+ "tw:break-anywhere",
69
+ "tw:max-h-96",
70
+ "tw:overflow-y-auto",
71
+ "tw:z-[1060]",
88
72
  // legacy (dark) chrome — default
89
- "tw-rounded",
90
- "tw-bg-neutral-800",
91
- "tw-text-white",
73
+ "tw:rounded",
74
+ "tw:bg-neutral-800",
75
+ "tw:text-white",
92
76
  // argo chrome overrides — semantic floating-panel tokens
93
- "data-[argo=true]:tw-rounded-2xl",
94
- "data-[argo=true]:tw-border",
95
- "data-[argo=true]:tw-border-solid",
96
- "data-[argo=true]:tw-border-border",
97
- "data-[argo=true]:tw-bg-popover",
98
- "data-[argo=true]:tw-text-popover-foreground",
99
- "data-[argo=true]:tw-shadow-md",
77
+ "tw:data-[argo=true]:rounded-2xl",
78
+ "tw:data-[argo=true]:border",
79
+ "tw:data-[argo=true]:border-solid",
80
+ "tw:data-[argo=true]:border-border",
81
+ "tw:data-[argo=true]:bg-popover",
82
+ "tw:data-[argo=true]:text-popover-foreground",
83
+ "tw:data-[argo=true]:shadow-md",
100
84
  // argo open animation
101
- "data-[argo=true]:data-[state=delayed-open]:tw-animate-in",
102
- "data-[argo=true]:data-[state=instant-open]:tw-animate-in",
103
- "data-[argo=true]:data-[state=delayed-open]:tw-fade-in-0",
104
- "data-[argo=true]:data-[state=instant-open]:tw-fade-in-0",
105
- "data-[argo=true]:data-[state=delayed-open]:tw-zoom-in-95",
106
- "data-[argo=true]:data-[state=instant-open]:tw-zoom-in-95",
85
+ "tw:data-[argo=true]:data-[state=delayed-open]:animate-in",
86
+ "tw:data-[argo=true]:data-[state=instant-open]:animate-in",
87
+ "tw:data-[argo=true]:data-[state=delayed-open]:fade-in-0",
88
+ "tw:data-[argo=true]:data-[state=instant-open]:fade-in-0",
89
+ "tw:data-[argo=true]:data-[state=delayed-open]:zoom-in-95",
90
+ "tw:data-[argo=true]:data-[state=instant-open]:zoom-in-95",
107
91
  // argo closed animation
108
- "data-[argo=true]:data-[state=closed]:tw-animate-out",
109
- "data-[argo=true]:data-[state=closed]:tw-fade-out-0",
110
- "data-[argo=true]:data-[state=closed]:tw-zoom-out-95",
92
+ "tw:data-[argo=true]:data-[state=closed]:animate-out",
93
+ "tw:data-[argo=true]:data-[state=closed]:fade-out-0",
94
+ "tw:data-[argo=true]:data-[state=closed]:zoom-out-95",
111
95
  // argo position animation
112
- "data-[argo=true]:data-[side=bottom]:tw-slide-in-from-top-2",
113
- "data-[argo=true]:data-[side=left]:tw-slide-in-from-right-2",
114
- "data-[argo=true]:data-[side=right]:tw-slide-in-from-left-2",
115
- "data-[argo=true]:data-[side=top]:tw-slide-in-from-bottom-2"
96
+ "tw:data-[argo=true]:data-[side=bottom]:slide-in-from-top-2",
97
+ "tw:data-[argo=true]:data-[side=left]:slide-in-from-right-2",
98
+ "tw:data-[argo=true]:data-[side=right]:slide-in-from-left-2",
99
+ "tw:data-[argo=true]:data-[side=top]:slide-in-from-bottom-2"
116
100
  ],
117
101
  {
118
102
  defaultVariants: {
@@ -121,22 +105,26 @@ var tooltipVariants = cva(
121
105
  variants: {
122
106
  variant: {
123
107
  action: [
124
- "tw-max-w-fit",
125
- "tw-px-3",
126
- "tw-py-2",
127
- "tw-text-center",
128
- "tw-text-xs",
129
- "tw-font-medium",
130
- "tw-uppercase",
131
- "tw-tracking-wider"
108
+ "tw:max-w-fit",
109
+ "tw:px-3",
110
+ "tw:py-2",
111
+ "tw:text-center",
112
+ "tw:text-xs",
113
+ "tw:font-medium",
114
+ // Legacy chrome uppercases the action tooltip; the Keboola V2 brand
115
+ // (`data-brand="keboola"`) renders it in standard case instead.
116
+ "tw:uppercase",
117
+ "tw:tracking-wider",
118
+ "tw:[[data-brand=keboola]_&]:normal-case",
119
+ "tw:[[data-brand=keboola]_&]:tracking-normal"
132
120
  ],
133
121
  explanatory: [
134
- "tw-max-w-80",
135
- "tw-px-4",
136
- "tw-py-3",
137
- "tw-text-left",
138
- "tw-text-sm",
139
- "tw-font-normal"
122
+ "tw:max-w-80",
123
+ "tw:px-4",
124
+ "tw:py-3",
125
+ "tw:text-left",
126
+ "tw:text-sm",
127
+ "tw:font-normal"
140
128
  ]
141
129
  }
142
130
  }
@@ -210,8 +198,8 @@ var TooltipTrigger = ({
210
198
  // (merged in via Slot) activates Tailwind's preflight inside the
211
199
  // span, which sets `svg { display: block }` — without an inline-flex
212
200
  // container that would stack any bare Lucide icon onto its own
213
- // line. `tw-inline-flex tw-items-center` keeps icon + text aligned.
214
- /* @__PURE__ */ jsx("span", { className: "tw-inline-flex tw-items-center", children })
201
+ // line. `tw:inline-flex tw:items-center` keeps icon + text aligned.
202
+ /* @__PURE__ */ jsx("span", { className: "tw:inline-flex tw:items-center", children })
215
203
  )
216
204
  }
217
205
  );
@@ -275,185 +263,49 @@ var Tooltip = ({
275
263
  Tooltip.Root = TooltipRoot;
276
264
  Tooltip.Content = TooltipContent;
277
265
  Tooltip.Trigger = TooltipTrigger;
278
- var HEIGHT_CLASS_NAME = {
279
- xxs: "tw-h-3 tw-rounded",
280
- xs: "tw-h-4 tw-rounded",
281
- sm: "tw-h-5 tw-rounded",
282
- md: "tw-h-6 tw-rounded-md",
283
- lg: "tw-h-8 tw-rounded-lg",
284
- xl: "tw-h-10 tw-rounded-lg",
285
- "2xl": "tw-h-12 tw-rounded-lg"
286
- };
287
- var ANIMATION_CLASS_NAME = cn(
288
- // base styles
289
- "tw-relative",
290
- "tw-overflow-hidden",
291
- "tw-pointer-events-none",
292
- "tw-bg-skeleton",
293
- // before
294
- 'before:tw-content-[""]',
295
- "before:tw-opacity-100",
296
- "before:tw-absolute",
297
- "before:tw-inset-0",
298
- "before:-tw-translate-x-full",
299
- "before:tw-animate-[shimmer_2s_infinite]",
300
- "before:tw-bg-gradient-to-r",
301
- "before:tw-from-transparent",
302
- "before:tw-to-transparent",
303
- "before:tw-via-white/40"
304
- );
305
- var Skeleton = ({ height = "md", className, count = 1 }) => {
306
- const prefixId = useId();
307
- const keys = Array.from({ length: count }, (_, i) => `${prefixId}-${i}`);
308
- return /* @__PURE__ */ jsx(Fragment, { children: keys.map((key) => /* @__PURE__ */ jsx(
309
- "div",
310
- {
311
- "data-skeleton": "true",
312
- className: cn(HEIGHT_CLASS_NAME[height], ANIMATION_CLASS_NAME, className)
313
- },
314
- key
315
- )) });
316
- };
317
-
318
- // src/icons/index.ts
319
- var icons_exports = {};
320
- __export(icons_exports, {
321
- Google: () => Google,
322
- Keboola: () => Keboola,
323
- Microsoft: () => Microsoft
324
- });
325
- __reExport(icons_exports, lucide_react_star);
326
- var Google = forwardRef(
327
- ({ size = 24, className, children, ...rest }, ref) => /* @__PURE__ */ jsxs(
328
- "svg",
329
- {
330
- ref,
331
- xmlns: "http://www.w3.org/2000/svg",
332
- width: size,
333
- height: size,
334
- viewBox: "12 10 20 20",
335
- fill: "none",
336
- className: cn("lucide", className),
337
- ...rest,
338
- children: [
339
- /* @__PURE__ */ jsx(
340
- "path",
341
- {
342
- d: "M31.6 20.2273C31.6 19.5182 31.5364 18.8364 31.4182 18.1818H22V22.05H27.3818C27.15 23.3 26.4455 24.3591 25.3864 25.0682V27.5773H28.6182C30.5091 25.8364 31.6 23.2727 31.6 20.2273Z",
343
- fill: "#4285F4"
344
- }
345
- ),
346
- /* @__PURE__ */ jsx(
347
- "path",
348
- {
349
- d: "M22 30C24.7 30 26.9636 29.1045 28.6181 27.5773L25.3863 25.0682C24.4909 25.6682 23.3454 26.0227 22 26.0227C19.3954 26.0227 17.1909 24.2636 16.4045 21.9H13.0636V24.4909C14.7091 27.7591 18.0909 30 22 30Z",
350
- fill: "#34A853"
351
- }
352
- ),
353
- /* @__PURE__ */ jsx(
354
- "path",
355
- {
356
- d: "M16.4045 21.9C16.2045 21.3 16.0909 20.6591 16.0909 20C16.0909 19.3409 16.2045 18.7 16.4045 18.1V15.5091H13.0636C12.3864 16.8591 12 18.3864 12 20C12 21.6136 12.3864 23.1409 13.0636 24.4909L16.4045 21.9Z",
357
- fill: "#FBBC04"
358
- }
359
- ),
360
- /* @__PURE__ */ jsx(
361
- "path",
362
- {
363
- d: "M22 13.9773C23.4681 13.9773 24.7863 14.4818 25.8227 15.4727L28.6909 12.6045C26.9591 10.9909 24.6954 10 22 10C18.0909 10 14.7091 12.2409 13.0636 15.5091L16.4045 18.1C17.1909 15.7364 19.3954 13.9773 22 13.9773Z",
364
- fill: "#EA4335"
365
- }
366
- ),
367
- children
368
- ]
369
- }
370
- )
371
- );
372
- Google.displayName = "Google";
373
- var Keboola = forwardRef(
374
- ({ size = 24, color = "currentColor", className, children, ...rest }, ref) => /* @__PURE__ */ jsxs(
375
- "svg",
376
- {
377
- ref,
378
- xmlns: "http://www.w3.org/2000/svg",
379
- width: size,
380
- height: size,
381
- viewBox: "0 0 300 512",
382
- overflow: "visible",
383
- fill: color,
384
- className: cn("lucide", className),
385
- ...rest,
386
- children: [
387
- /* @__PURE__ */ jsx("path", { d: "M152 320C79.7 320 24.5 233.9 24.5 124.7C24.5 15.6 70.5 0 152 0s123.6 15.6 123.6 124.7C275.5 233.9 217.7 320 152 320zm-8.7-50.5c0-11.2-9.5-20.3-21.2-20.3s-21.2 9.1-21.2 20.3c0 11.2 9.5 20.3 21.2 20.3s21.2-9.1 21.2-20.3zm55.7 0c0-11.2-9.5-20.3-21.2-20.3s-21.2 9.1-21.2 20.3c0 11.2 9.5 20.3 21.2 20.3s21.2-9.1 21.2-20.3zm68.9 115.1c10.2 9.3 20.2 20.5 29 35c5.9 9.7 2.6 22.1-7.5 27.8c-3.4 1.9-7.1 2.8-10.7 2.8c-7.2 0-14.3-3.6-18.3-10c-6.8-11.1-13.8-18.9-21.7-26.1c-7.3-6.7-15.6-12.7-24.9-19.5c-.7-.5-1.4-1-2.1-1.5c-5-3.6-10-6.8-14.9-9.4c.6 1 1.2 2.1 1.8 3.2c14.4 26.4 29.2 63.1 29.2 104.9c0 11.2-9.5 20.3-21.2 20.3c-11.7 0-21.2-9.1-21.2-20.3c.1-31.8-11.6-62.3-23.8-84.9c-4-7.4-8-13.9-11.6-19.3c-3.4 5.2-7.2 11.3-11 18.3c-12.5 22.7-24.5 53.8-24.4 86c0 11.2-9.5 20.3-21.2 20.3s-21.2-9.1-21.2-20.3c.1-41.8 14.9-78.4 29.2-104.9c.6-1.1 1.2-2.1 1.8-3.2c-5 2.7-9.9 5.8-14.9 9.4c-.6 .5-1.3 .9-1.9 1.4c-9.5 6.9-17.8 12.9-25.1 19.7c-7.9 7.2-14.9 15.1-21.7 26.1c-5.9 9.7-18.9 12.9-29 7.2C.5 441.8-2.9 429.3 3.1 419.7c8.9-14.4 18.8-25.7 29-35c9.2-8.4 18.5-15.1 27.6-21.7c1-.7 2-1.4 3-2.2c4.7-3.5 9.6-6.7 14.6-9.6c-5-2.9-9.8-6.1-14.6-9.6C39.8 325 19.9 302.5 3.1 275.1c-5.9-9.7-2.6-22.1 7.5-27.8c10.1-5.7 23.1-2.5 29 7.2c14.6 23.7 31.1 42 48.7 54.9c18.9 13.7 37.4 20.5 56.5 21.5c1.7-.1 3.5-.1 5.2-.1c1.8 0 3.5 .1 5.2 .1c0 0 0 0 0 0c19.1-1.1 37.6-7.9 56.5-21.5c17.6-12.8 34.2-31.2 48.7-54.9c6-9.7 18.9-12.9 29-7.2c10.1 5.7 13.4 18.1 7.5 27.8c-16.8 27.4-36.7 49.9-59.6 66.6c-4.7 3.5-9.6 6.7-14.5 9.6c4.9 2.9 9.8 6.1 14.5 9.6c.9 .7 1.8 1.3 2.7 2c9.2 6.7 18.5 13.5 27.9 22z" }),
388
- children
389
- ]
390
- }
391
- )
392
- );
393
- Keboola.displayName = "Keboola";
394
- var Microsoft = forwardRef(
395
- ({ size = 24, className, children, ...rest }, ref) => /* @__PURE__ */ jsxs(
396
- "svg",
397
- {
398
- ref,
399
- xmlns: "http://www.w3.org/2000/svg",
400
- width: size,
401
- height: size,
402
- viewBox: "0 0 21 21",
403
- fill: "none",
404
- className: cn("lucide", className),
405
- ...rest,
406
- children: [
407
- /* @__PURE__ */ jsx("rect", { x: "0", y: "0", width: "10", height: "10", fill: "#F25022" }),
408
- /* @__PURE__ */ jsx("rect", { x: "11", y: "0", width: "10", height: "10", fill: "#7FBA00" }),
409
- /* @__PURE__ */ jsx("rect", { x: "0", y: "11", width: "10", height: "10", fill: "#00A4EF" }),
410
- /* @__PURE__ */ jsx("rect", { x: "11", y: "11", width: "10", height: "10", fill: "#FFB900" }),
411
- children
412
- ]
413
- }
414
- )
415
- );
416
- Microsoft.displayName = "Microsoft";
417
266
  var variants = cva(
418
267
  [
419
268
  "tailwindcss-preflight",
420
- "tw-group/button",
421
- "tw-border-box",
269
+ "tw:group/button",
270
+ "tw:border-box",
422
271
  // layout
423
- "tw-relative",
424
- "tw-flex",
425
- "tw-items-center",
426
- "tw-justify-center",
427
- "tw-gap-2",
272
+ "tw:relative",
273
+ "tw:flex",
274
+ "tw:items-center",
275
+ "tw:justify-center",
276
+ "tw:gap-2",
428
277
  // text — chrome weight/tracking are brand-overridable tokens
429
- // (`--font-weight-medium` / `--letter-spacing-chrome`); casing stays `tw-uppercase`.
430
- "tw-text-xs",
431
- "tw-leading-5",
432
- "tw-font-medium",
433
- "tw-tracking-chrome",
434
- "tw-uppercase",
278
+ // (`--font-weight-medium` / `--letter-spacing-chrome`). Casing: standard case is
279
+ // the default; only legacy brands (`keboola-legacy-*`) uppercase the chrome, so
280
+ // modern brands (incl. Keboola V2) read naturally. Mirrors the V2 standard-case
281
+ // treatment shipped for Tooltip/Badge (PR 7629).
282
+ "tw:text-xs",
283
+ "tw:leading-5",
284
+ "tw:font-medium",
285
+ "tw:[[data-brand^=keboola-legacy]_&]:tracking-chrome",
286
+ "tw:[[data-brand^=keboola-legacy]_&]:uppercase",
435
287
  // border — legacy (non-argo) chrome uses a fixed radius, not the brand token.
436
- "tw-rounded",
437
- "tw-border",
438
- "tw-border-transparent",
288
+ "tw:rounded",
289
+ "tw:border",
290
+ "tw:border-transparent",
439
291
  // styling
440
- "tw-shadow-none",
441
- "[a]:tw-cursor-pointer",
292
+ "tw:shadow-none",
293
+ "tw:[a]:cursor-pointer",
442
294
  // explicitly set for anchor
443
- "focus-visible:tw-outline",
444
- "focus-visible:tw-outline-1",
445
- "focus-visible:-tw-outline-offset-1",
446
- "focus-visible:tw-outline-ring",
447
- "focus-visible:tw-ring-4",
448
- "focus-visible:tw-ring-ring/30",
295
+ "tw:focus-visible:outline",
296
+ "tw:focus-visible:outline-1",
297
+ "tw:focus-visible:-outline-offset-1",
298
+ "tw:focus-visible:outline-ring",
299
+ "tw:focus-visible:ring-4",
300
+ "tw:focus-visible:ring-ring/30",
449
301
  // disabled
450
- "disabled:tw-opacity-40",
451
- "disabled:tw-cursor-not-allowed",
302
+ "tw:disabled:opacity-40",
303
+ "tw:disabled:cursor-not-allowed",
452
304
  // anchor support
453
- "!tw-no-underline",
454
- "aria-disabled:tw-opacity-40",
455
- "aria-disabled:tw-cursor-not-allowed",
456
- "[&_svg]:tw-shrink-0"
305
+ "tw:!no-underline",
306
+ "tw:aria-disabled:opacity-40",
307
+ "tw:aria-disabled:cursor-not-allowed",
308
+ "tw:[&_svg]:shrink-0"
457
309
  ],
458
310
  {
459
311
  defaultVariants: {
@@ -463,113 +315,113 @@ var variants = cva(
463
315
  },
464
316
  variants: {
465
317
  block: {
466
- true: ["tw-w-full"]
318
+ true: ["tw:w-full"]
467
319
  },
468
320
  variant: {
469
321
  primary: [
470
- "tw-text-white",
471
- "tw-bg-primary-500",
472
- "focus:tw-text-white",
473
- "hover:tw-text-white",
474
- "hover:not-disabled:tw-bg-primary-600",
475
- "active:not-disabled:tw-bg-primary-800",
322
+ "tw:text-white",
323
+ "tw:bg-primary-500",
324
+ "tw:focus:text-white",
325
+ "tw:hover:text-white",
326
+ "tw:hover:not-disabled:bg-primary-600",
327
+ "tw:active:not-disabled:bg-primary-800",
476
328
  // anchor disabled override
477
- "aria-disabled:!tw-bg-primary-500"
329
+ "tw:aria-disabled:!bg-primary-500"
478
330
  ],
479
331
  secondary: [
480
- "tw-text-white",
481
- "tw-bg-secondary-500",
482
- "focus:tw-text-white",
483
- "hover:tw-text-white",
484
- "hover:not-disabled:tw-bg-secondary-700",
485
- "active:not-disabled:tw-bg-secondary-800",
332
+ "tw:text-white",
333
+ "tw:bg-secondary-500",
334
+ "tw:focus:text-white",
335
+ "tw:hover:text-white",
336
+ "tw:hover:not-disabled:bg-secondary-700",
337
+ "tw:active:not-disabled:bg-secondary-800",
486
338
  // anchor disabled override
487
- "aria-disabled:!tw-bg-secondary-500"
339
+ "tw:aria-disabled:!bg-secondary-500"
488
340
  ],
489
341
  danger: [
490
- "tw-text-white",
491
- "tw-bg-error-500",
492
- "focus:tw-text-white",
493
- "hover:tw-text-white",
494
- "hover:not-disabled:tw-bg-error-600",
495
- "active:not-disabled:tw-bg-error-700",
342
+ "tw:text-white",
343
+ "tw:bg-error-500",
344
+ "tw:focus:text-white",
345
+ "tw:hover:text-white",
346
+ "tw:hover:not-disabled:bg-error-600",
347
+ "tw:active:not-disabled:bg-error-700",
496
348
  // anchor disabled override
497
- "aria-disabled:!tw-bg-error-500"
349
+ "tw:aria-disabled:!bg-error-500"
498
350
  ],
499
351
  invisible: [
500
- "tw-text-neutral-800",
501
- "tw-bg-transparent",
502
- "focus:tw-text-neutral-800",
503
- "hover:not-disabled:tw-bg-neutral-100",
504
- "hover:tw-text-neutral-800",
505
- "active:not-disabled:tw-bg-neutral-150",
352
+ "tw:text-neutral-800",
353
+ "tw:bg-transparent",
354
+ "tw:focus:text-neutral-800",
355
+ "tw:hover:not-disabled:bg-neutral-100",
356
+ "tw:hover:text-neutral-800",
357
+ "tw:active:not-disabled:bg-neutral-150",
506
358
  // contrasting icon on hover/active
507
- "[&_svg]:tw-text-neutral-400",
508
- "[&_svg]:hover:not-disabled:tw-text-secondary-600",
509
- "[&_svg]:active:not-disabled:tw-text-secondary-600",
359
+ "tw:[&_svg]:text-neutral-400",
360
+ "tw:hover:not-disabled:[&_svg]:text-secondary-600",
361
+ "tw:active:not-disabled:[&_svg]:text-secondary-600",
510
362
  // anchor disabled override
511
- "aria-disabled:!tw-bg-transparent"
363
+ "tw:aria-disabled:!bg-transparent"
512
364
  ],
513
365
  outline: [
514
- "tw-text-neutral-800",
515
- "tw-bg-white",
366
+ "tw:text-neutral-800",
367
+ "tw:bg-white",
516
368
  // border
517
- "!tw-border-neutral-200",
518
- "hover:tw-text-neutral-800",
519
- "focus:tw-text-neutral-800",
520
- "hover:not-disabled:!tw-border-neutral-300",
521
- "hover:not-disabled:tw-bg-neutral-100",
522
- "active:not-disabled:tw-bg-neutral-200",
369
+ "tw:!border-neutral-200",
370
+ "tw:hover:text-neutral-800",
371
+ "tw:focus:text-neutral-800",
372
+ "tw:hover:not-disabled:!border-neutral-300",
373
+ "tw:hover:not-disabled:bg-neutral-100",
374
+ "tw:active:not-disabled:bg-neutral-200",
523
375
  // contrasting icon hover, same as invisible
524
- "[&_svg]:tw-text-neutral-400",
525
- "[&_svg]:not-disabled:hover:tw-text-secondary-600",
526
- "[&_svg]:active:not-disabled:tw-text-secondary-600",
376
+ "tw:[&_svg]:text-neutral-400",
377
+ "tw:not-disabled:hover:[&_svg]:text-secondary-600",
378
+ "tw:active:not-disabled:[&_svg]:text-secondary-600",
527
379
  // anchor disabled override
528
- "aria-disabled:!tw-bg-white",
529
- "aria-disabled:!tw-border-neutral-200"
380
+ "tw:aria-disabled:!bg-white",
381
+ "tw:aria-disabled:!border-neutral-200"
530
382
  ],
531
383
  inline: [
532
- "tw-text-neutral-800",
533
- "tw-bg-transparent",
534
- "tw-rounded-full",
535
- "[&_svg]:tw-text-neutral-400",
536
- "[&_svg]:not-disabled:hover:tw-text-secondary-600",
537
- "[&_svg]:not-disabled:focus:tw-text-secondary-600"
384
+ "tw:text-neutral-800",
385
+ "tw:bg-transparent",
386
+ "tw:rounded-full",
387
+ "tw:[&_svg]:text-neutral-400",
388
+ "tw:not-disabled:hover:[&_svg]:text-secondary-600",
389
+ "tw:not-disabled:focus:[&_svg]:text-secondary-600"
538
390
  ]
539
391
  },
540
392
  size: {
541
393
  medium: [
542
- "tw-max-h-10",
543
- "tw-min-h-10",
544
- "tw-px-4",
545
- "tw-py-2.5",
546
- '[&_svg:not([class*="tw-size-"])]:tw-size-4'
394
+ "tw:max-h-10",
395
+ "tw:min-h-10",
396
+ "tw:px-4",
397
+ "tw:py-2.5",
398
+ 'tw:[&_svg:not([class*="tw:size-"])]:size-4'
547
399
  ],
548
400
  small: [
549
- "tw-max-h-8",
550
- "tw-min-h-8",
551
- "tw-px-4",
552
- "tw-py-1.5",
553
- '[&_svg:not([class*="tw-size-"])]:tw-size-4'
401
+ "tw:max-h-8",
402
+ "tw:min-h-8",
403
+ "tw:px-4",
404
+ "tw:py-1.5",
405
+ 'tw:[&_svg:not([class*="tw:size-"])]:size-4'
554
406
  ],
555
407
  large: [
556
- "tw-max-h-12",
557
- "tw-min-h-12",
558
- "tw-px-4",
559
- "tw-py-3.5",
560
- '[&_svg:not([class*="tw-size-"])]:tw-size-4'
408
+ "tw:max-h-12",
409
+ "tw:min-h-12",
410
+ "tw:px-4",
411
+ "tw:py-3.5",
412
+ 'tw:[&_svg:not([class*="tw:size-"])]:size-4'
561
413
  ],
562
- "icon-lg": ["tw-size-12", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-6'],
563
- icon: ["tw-size-10", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-4'],
564
- "icon-sm": ["tw-size-8", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-4'],
565
- "icon-xs": ["tw-size-6", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-4'],
414
+ "icon-lg": ["tw:size-12", "tw:p-0", 'tw:[&_svg:not([class*="tw:size-"])]:size-6'],
415
+ icon: ["tw:size-10", "tw:p-0", 'tw:[&_svg:not([class*="tw:size-"])]:size-4'],
416
+ "icon-sm": ["tw:size-8", "tw:p-0", 'tw:[&_svg:not([class*="tw:size-"])]:size-4'],
417
+ "icon-xs": ["tw:size-6", "tw:p-0", 'tw:[&_svg:not([class*="tw:size-"])]:size-4'],
566
418
  "icon-2xs": [
567
- "!tw-inline-flex",
568
- "tw-size-5",
569
- "tw-max-h-5",
570
- '[&_svg:not([class*="tw-size-"])]:tw-size-3'
419
+ "tw:!inline-flex",
420
+ "tw:size-5",
421
+ "tw:max-h-5",
422
+ 'tw:[&_svg:not([class*="tw:size-"])]:size-3'
571
423
  ],
572
- "icon-3xs": ["tw-h-fit", "tw-w-fit", '[&_svg:not([class*="tw-size-"])]:tw-size-4']
424
+ "icon-3xs": ["tw:h-fit", "tw:w-fit", 'tw:[&_svg:not([class*="tw:size-"])]:size-4']
573
425
  }
574
426
  }
575
427
  }
@@ -578,37 +430,37 @@ var argoVariants = cva(
578
430
  [
579
431
  "tailwindcss-preflight",
580
432
  // layout
581
- "tw-relative",
582
- "tw-inline-flex",
583
- "tw-items-center",
584
- "tw-justify-center",
585
- "tw-whitespace-nowrap",
586
- "tw-gap-2",
433
+ "tw:relative",
434
+ "tw:inline-flex",
435
+ "tw:items-center",
436
+ "tw:justify-center",
437
+ "tw:whitespace-nowrap",
438
+ "tw:gap-2",
587
439
  // border
588
- "tw-border",
589
- "tw-border-transparent",
590
- "tw-rounded-[var(--radius-lg,0.25rem)]",
440
+ "tw:border",
441
+ "tw:border-transparent",
442
+ "tw:rounded-[var(--radius-lg,0.25rem)]",
591
443
  // text
592
- "tw-font-medium",
593
- "tw-select-none",
444
+ "tw:font-medium",
445
+ "tw:select-none",
594
446
  // focus visible
595
- "!tw-outline-none",
596
- "focus-visible:tw-ring-2",
447
+ "tw:!outline-hidden",
448
+ "tw:focus-visible:ring-2",
597
449
  // disabled
598
- "disabled:tw-cursor-not-allowed",
599
- "disabled:tw-opacity-50",
600
- "active:tw-opacity-60",
601
- "tw-transition-all",
602
- "tw-bg-clip-padding",
450
+ "tw:disabled:cursor-not-allowed",
451
+ "tw:disabled:opacity-50",
452
+ "tw:active:opacity-60",
453
+ "tw:transition-all",
454
+ "tw:bg-clip-padding",
603
455
  // anchor support
604
- "!tw-no-underline",
605
- "aria-disabled:tw-cursor-not-allowed",
606
- "aria-disabled:tw-opacity-50",
456
+ "tw:!no-underline",
457
+ "tw:aria-disabled:cursor-not-allowed",
458
+ "tw:aria-disabled:opacity-50",
607
459
  // icon
608
- "tw-shrink-0",
609
- "[&_svg]:tw-pointer-events-none",
610
- "[&_svg]:tw-shrink-0",
611
- "[&_svg:not([class*='tw-size-'])]:tw-size-4"
460
+ "tw:shrink-0",
461
+ "tw:[&_svg]:pointer-events-none",
462
+ "tw:[&_svg]:shrink-0",
463
+ "tw:[&_svg:not([class*='tw:size-'])]:size-4"
612
464
  ],
613
465
  {
614
466
  defaultVariants: {
@@ -617,77 +469,77 @@ var argoVariants = cva(
617
469
  },
618
470
  variants: {
619
471
  block: {
620
- true: ["tw-w-full"]
472
+ true: ["tw:w-full"]
621
473
  },
622
474
  variant: {
623
475
  primary: [
624
- "tw-bg-primary",
625
- "tw-text-primary-foreground",
626
- "[a]:hover:tw-bg-primary/80",
627
- "hover:not-disabled:tw-bg-primary/90",
628
- "hover:tw-text-primary-foreground",
629
- "focus:tw-text-primary-foreground",
630
- "focus-visible:tw-border-primary",
631
- "focus-visible:tw-ring-ring/50"
476
+ "tw:bg-primary",
477
+ "tw:text-primary-foreground",
478
+ "tw:[a]:hover:bg-primary/80",
479
+ "tw:hover:not-disabled:bg-primary/90",
480
+ "tw:hover:text-primary-foreground",
481
+ "tw:focus:text-primary-foreground",
482
+ "tw:focus-visible:border-primary",
483
+ "tw:focus-visible:ring-ring/50"
632
484
  ],
633
485
  secondary: [
634
- "tw-bg-primary/10",
635
- "tw-text-primary",
636
- "hover:not-disabled:tw-bg-primary/20",
637
- "focus-visible:tw-border-primary",
638
- "focus-visible:tw-ring-ring/50"
486
+ "tw:bg-primary/10",
487
+ "tw:text-primary",
488
+ "tw:hover:not-disabled:bg-primary/20",
489
+ "tw:focus-visible:border-primary",
490
+ "tw:focus-visible:ring-ring/50"
639
491
  ],
640
492
  // should be called "destructive" by Figma
641
493
  danger: [
642
- "tw-bg-destructive",
643
- "tw-text-destructive-foreground",
644
- "hover:tw-text-destructive-foreground",
645
- "focus:tw-text-destructive-foreground",
646
- "focus-visible:tw-border-destructive",
647
- "focus-visible:tw-ring-destructive/20"
494
+ "tw:bg-destructive",
495
+ "tw:text-destructive-foreground",
496
+ "tw:hover:text-destructive-foreground",
497
+ "tw:focus:text-destructive-foreground",
498
+ "tw:focus-visible:border-destructive",
499
+ "tw:focus-visible:ring-destructive/20"
648
500
  ],
649
501
  outline: [
650
- "!tw-border-input",
651
- "tw-bg-background",
502
+ "tw:!border-input",
503
+ "tw:bg-background",
652
504
  // Semantic base text color so the label/icon flips in dark mode
653
505
  // (matches `invisible`); previously unset → inherited a fixed dark color.
654
- "tw-text-foreground",
506
+ "tw:text-foreground",
655
507
  // Hover follows the brand primary (translucent tint), matching the
656
508
  // `secondary` variant — not the fixed `accent` blue.
657
- "hover:not-disabled:tw-bg-primary/10",
658
- "hover:not-disabled:tw-text-primary",
659
- "hover:active:tw-bg-background",
660
- "focus-visible:!tw-border-primary",
661
- "focus-visible:tw-ring-ring/50"
509
+ "tw:hover:not-disabled:bg-primary/10",
510
+ "tw:hover:not-disabled:text-primary",
511
+ "tw:hover:active:bg-background",
512
+ "tw:focus-visible:!border-primary",
513
+ "tw:focus-visible:ring-ring/50"
662
514
  ],
663
515
  // should be called "ghost" by Figma
664
516
  invisible: [
665
- "tw-bg-transparent",
666
- "tw-text-foreground",
667
- "hover:not-disabled:tw-bg-primary/10",
668
- "hover:not-disabled:tw-text-primary",
669
- "hover:not-disabled:tw-border-primary/10",
670
- "focus-visible:tw-ring-ring/50"
517
+ "tw:bg-transparent",
518
+ "tw:text-foreground",
519
+ "tw:hover:not-disabled:bg-primary/10",
520
+ "tw:hover:not-disabled:text-primary",
521
+ "tw:hover:not-disabled:border-primary/10",
522
+ "tw:focus-visible:ring-ring/50"
671
523
  ],
672
524
  // should be called "link" by Figma
673
525
  inline: [
674
- "tw-bg-transparent",
675
- "tw-text-primary",
676
- "hover:tw-underline",
677
- "hover:active:tw-bg-transparent",
678
- "focus-visible:tw-ring-ring/50"
526
+ "tw:bg-transparent",
527
+ "tw:text-primary",
528
+ "tw:hover:underline",
529
+ "tw:hover:active:bg-transparent",
530
+ "tw:focus-visible:ring-ring/50"
679
531
  ]
680
532
  },
681
533
  size: {
682
534
  // should be called "default" by Figma
683
- medium: ["tw-max-h-9", "tw-py-2", "tw-px-4", "tw-text-sm"],
535
+ medium: ["tw:max-h-9", "tw:py-2", "tw:px-4", "tw:text-sm"],
684
536
  // should be called "small" by Figma
685
- small: ["tw-max-h-8", "tw-py-2", "tw-px-3", "tw-text-xs"],
537
+ small: ["tw:max-h-8", "tw:py-2", "tw:px-3", "tw:text-xs"],
686
538
  // should be called "large" by Figma
687
- large: ["tw-max-h-10", "tw-py-2.5", "tw-px-6", "tw-text-sm"],
688
- "icon-lg": ["tw-size-10"],
689
- icon: ["tw-size-9"],
690
- "icon-sm": ["tw-size-8"],
539
+ large: ["tw:max-h-10", "tw:py-2.5", "tw:px-6", "tw:text-sm"],
540
+ "icon-lg": ["tw:size-10"],
541
+ icon: ["tw:size-9"],
542
+ "icon-sm": ["tw:size-8"],
691
543
  // unsupported in ARGO, remove when old design is gone
692
544
  "icon-xs": [],
693
545
  "icon-2xs": [],
@@ -735,13 +587,13 @@ var Button = ({
735
587
  onClick: handleClick,
736
588
  className: cn(classNames),
737
589
  children: [
738
- isLoading && /* @__PURE__ */ jsx(icons_exports.Loader2, { className: "tw-size-4 tw-shrink-0 tw-animate-spin" }),
590
+ isLoading && /* @__PURE__ */ jsx(Loader2, { className: "tw:size-4 tw:shrink-0 tw:animate-spin" }),
739
591
  /* @__PURE__ */ jsx(Slottable, { children: isLoading && isIconOnly ? null : children })
740
592
  ]
741
593
  }
742
594
  );
743
595
  };
744
- var Clipboard = ({
596
+ var Clipboard2 = ({
745
597
  ref,
746
598
  text: textProp,
747
599
  children,
@@ -766,6 +618,7 @@ var Clipboard = ({
766
618
  }
767
619
  };
768
620
  const handleOnClick = (event) => {
621
+ setIsTooltipOpen(true);
769
622
  if (text && state === "ready") void copy(text);
770
623
  onClick?.(event);
771
624
  };
@@ -780,6 +633,7 @@ var Clipboard = ({
780
633
  return tooltip;
781
634
  })();
782
635
  const tooltipVariant = state === "ready" && !!text ? tooltipVariantProp : "action";
636
+ const hasTooltipContent = tooltipContent !== null && tooltipContent !== void 0;
783
637
  return /* @__PURE__ */ jsxs(Tooltip.Root, { open: isTooltipOpen, onOpenChange: handleOnOpenChange, children: [
784
638
  /* @__PURE__ */ jsx(
785
639
  Tooltip.Trigger,
@@ -788,12 +642,12 @@ var Clipboard = ({
788
642
  asChild,
789
643
  keepOpenOnClick: true,
790
644
  onClick: handleOnClick,
791
- className: cn("tw-cursor-pointer", className),
645
+ className: cn("tw:cursor-pointer", className),
792
646
  ref,
793
647
  children: children ?? text
794
648
  }
795
649
  ),
796
- /* @__PURE__ */ jsx(
650
+ hasTooltipContent && /* @__PURE__ */ jsx(
797
651
  Tooltip.Content,
798
652
  {
799
653
  keepOpenOnPointerDownOutside: true,
@@ -804,7 +658,7 @@ var Clipboard = ({
804
658
  )
805
659
  ] });
806
660
  };
807
- var DEFAULT_ICON = /* @__PURE__ */ jsx(icons_exports.Copy, {});
661
+ var DEFAULT_ICON = /* @__PURE__ */ jsx(Copy, {});
808
662
  var DEFAULT_ARIA_LABEL = "Copy";
809
663
  var ClipboardButton = ({
810
664
  // clipboard props
@@ -821,7 +675,7 @@ var ClipboardButton = ({
821
675
  const defaultAriaLabel = typeof tooltip === "string" && tooltip.trim() ? tooltip : DEFAULT_ARIA_LABEL;
822
676
  const ariaLabel = rest["aria-label"] ?? (children == null ? defaultAriaLabel : void 0);
823
677
  return /* @__PURE__ */ jsx(
824
- Clipboard,
678
+ Clipboard2,
825
679
  {
826
680
  asChild: true,
827
681
  tooltip,
@@ -838,7 +692,13 @@ var ClipboardButton = ({
838
692
  var MIN_SCALE = 0.5;
839
693
  var MAX_SCALE = 3;
840
694
  var ZOOM_STEP = 0.1;
841
- var ZoomableSvg = ({ html, copyText, className, allowForeignObject }) => {
695
+ var ZoomableSvg = ({
696
+ html,
697
+ copyText,
698
+ className,
699
+ allowForeignObject,
700
+ renderActions
701
+ }) => {
842
702
  const safeHtml = useMemo(
843
703
  () => DOMPurify.sanitize(html, {
844
704
  USE_PROFILES: { svg: true, svgFilters: true },
@@ -917,7 +777,7 @@ var ZoomableSvg = ({ html, copyText, className, allowForeignObject }) => {
917
777
  "div",
918
778
  {
919
779
  role: "presentation",
920
- className: cn("tw-group/zoom tw-relative", isFullscreen && "tw-h-full"),
780
+ className: cn("tw:group/zoom tw:relative", isFullscreen && "tw:h-full"),
921
781
  onClick: handleClick,
922
782
  children: [
923
783
  /* @__PURE__ */ jsx(
@@ -926,8 +786,8 @@ var ZoomableSvg = ({ html, copyText, className, allowForeignObject }) => {
926
786
  role: "presentation",
927
787
  ref: containerRef,
928
788
  className: cn(
929
- "tw-overflow-hidden tw-cursor-grab active:tw-cursor-grabbing tw-p-3",
930
- isFullscreen && "tw-h-full"
789
+ "tw:overflow-hidden tw:cursor-grab tw:active:cursor-grabbing tw:p-3",
790
+ isFullscreen && "tw:h-full"
931
791
  ),
932
792
  onMouseDown: handleMouseDown,
933
793
  onMouseMove: handleMouseMove,
@@ -937,8 +797,8 @@ var ZoomableSvg = ({ html, copyText, className, allowForeignObject }) => {
937
797
  "div",
938
798
  {
939
799
  className: cn(
940
- "tw-flex tw-justify-center tw-origin-center",
941
- isFullscreen && "tw-h-full [&>svg]:tw-h-full"
800
+ "tw:flex tw:justify-center tw:origin-center",
801
+ isFullscreen && "tw:h-full tw:[&>svg]:h-full"
942
802
  ),
943
803
  style: { transform: `translate(${translate.x}px, ${translate.y}px) scale(${scale})` },
944
804
  dangerouslySetInnerHTML: { __html: safeHtml }
@@ -950,11 +810,12 @@ var ZoomableSvg = ({ html, copyText, className, allowForeignObject }) => {
950
810
  "div",
951
811
  {
952
812
  role: "presentation",
953
- className: "tw-absolute tw-right-1 tw-top-1 tw-flex tw-gap-1 tw-opacity-0 tw-transition-opacity group-hover/zoom:tw-opacity-100",
813
+ className: "tw:absolute tw:right-1 tw:top-1 tw:flex tw:gap-1 tw:opacity-0 tw:transition-opacity tw:focus-within:opacity-100 tw:group-hover/zoom:opacity-100",
954
814
  onClick: stopPropagation,
955
815
  children: [
956
816
  isZoomed && /* @__PURE__ */ jsx(Tooltip, { tooltip: "Reset zoom", placement: "top", triggerAsChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "outline", onClick: handleReset, children: "Reset" }) }),
957
817
  copyText && /* @__PURE__ */ jsx(ClipboardButton, { text: copyText, tooltip: "Copy code", size: "icon-sm", variant: "outline" }),
818
+ renderActions?.(safeHtml),
958
819
  /* @__PURE__ */ jsx(
959
820
  Tooltip,
960
821
  {
@@ -968,7 +829,7 @@ var ZoomableSvg = ({ html, copyText, className, allowForeignObject }) => {
968
829
  variant: "outline",
969
830
  "aria-label": isFullscreen ? "Exit fullscreen" : "Fullscreen",
970
831
  onClick: () => setIsFullscreen((f) => !f),
971
- children: isFullscreen ? /* @__PURE__ */ jsx(icons_exports.Minimize2, { className: "tw-size-4" }) : /* @__PURE__ */ jsx(icons_exports.Maximize2, { className: "tw-size-4" })
832
+ children: isFullscreen ? /* @__PURE__ */ jsx(Minimize2, { className: "tw:size-4" }) : /* @__PURE__ */ jsx(Maximize2, { className: "tw:size-4" })
972
833
  }
973
834
  )
974
835
  }
@@ -986,7 +847,7 @@ var ZoomableSvg = ({ html, copyText, className, allowForeignObject }) => {
986
847
  {
987
848
  role: "presentation",
988
849
  "data-testid": "zoomable-svg-fullscreen",
989
- className: "tailwindcss-preflight tw-fixed tw-inset-0 tw-z-[1060] tw-bg-muted tw-p-4",
850
+ className: "tw:fixed tw:inset-0 tw:z-[1060] tw:bg-muted tw:p-4 tailwindcss-preflight",
990
851
  onClick: stopPropagation,
991
852
  children: diagramContent
992
853
  }
@@ -998,13 +859,53 @@ var ZoomableSvg = ({ html, copyText, className, allowForeignObject }) => {
998
859
  "div",
999
860
  {
1000
861
  className: cn(
1001
- "tw-overflow-hidden tw-rounded-md tw-border tw-border-border tw-bg-muted",
862
+ "tw:overflow-hidden tw:rounded-md tw:border tw:border-border tw:bg-muted",
1002
863
  className
1003
864
  ),
1004
865
  children: diagramContent
1005
866
  }
1006
867
  );
1007
868
  };
869
+ var HEIGHT_CLASS_NAME = {
870
+ xxs: "tw:h-3 tw:rounded",
871
+ xs: "tw:h-4 tw:rounded",
872
+ sm: "tw:h-5 tw:rounded",
873
+ md: "tw:h-6 tw:rounded-md",
874
+ lg: "tw:h-8 tw:rounded-lg",
875
+ xl: "tw:h-10 tw:rounded-lg",
876
+ "2xl": "tw:h-12 tw:rounded-lg"
877
+ };
878
+ var ANIMATION_CLASS_NAME = cn(
879
+ // base styles
880
+ "tw:relative",
881
+ "tw:overflow-hidden",
882
+ "tw:pointer-events-none",
883
+ "tw:bg-skeleton",
884
+ // before
885
+ 'tw:before:content-[""]',
886
+ "tw:before:opacity-100",
887
+ "tw:before:absolute",
888
+ "tw:before:inset-0",
889
+ "tw:before:-translate-x-full",
890
+ "tw:before:animate-[shimmer_2s_infinite]",
891
+ "tw:before:bg-gradient-to-r",
892
+ "tw:before:from-transparent",
893
+ "tw:before:to-transparent",
894
+ "tw:before:via-white/40"
895
+ );
896
+ var Skeleton = ({ height = "md", className, count = 1 }) => {
897
+ const prefixId = useId();
898
+ const keys = Array.from({ length: count }, (_, i) => `${prefixId}-${i}`);
899
+ return /* @__PURE__ */ jsx(Fragment, { children: keys.map((key) => /* @__PURE__ */ jsx(
900
+ "div",
901
+ {
902
+ "data-skeleton": "true",
903
+ className: cn(HEIGHT_CLASS_NAME[height], ANIMATION_CLASS_NAME, className)
904
+ },
905
+ key
906
+ )) });
907
+ };
908
+ var DiagramSkeleton = () => /* @__PURE__ */ jsx("div", { className: "tw:my-3 tw:overflow-hidden tw:rounded-md tw:border tw:border-neutral-150 tw:bg-neutral-50 tw:p-6", children: /* @__PURE__ */ jsx(Skeleton, { className: "tw:h-40" }) });
1008
909
 
1009
910
  // src/blocks/MermaidDiagram/svgTransforms.ts
1010
911
  var HTML_TAG = /<[^>]+>/g;
@@ -1030,7 +931,7 @@ var makeResponsive = (svgString) => {
1030
931
  };
1031
932
  var PRIMARY_FALLBACK_CHANNELS = "31 143 255";
1032
933
  var resolvePrimary = () => {
1033
- const channels = typeof document === "undefined" ? PRIMARY_FALLBACK_CHANNELS : getComputedStyle(document.documentElement).getPropertyValue("--color-primary").trim() || PRIMARY_FALLBACK_CHANNELS;
934
+ const channels = typeof document === "undefined" ? PRIMARY_FALLBACK_CHANNELS : getComputedStyle(document.documentElement).getPropertyValue("--primary").trim() || PRIMARY_FALLBACK_CHANNELS;
1034
935
  return `rgb(${channels})`;
1035
936
  };
1036
937
  var mermaidPromise = null;
@@ -1135,7 +1036,7 @@ var resolveSyncSvg = (code) => {
1135
1036
  if (fast) svgCache.set(code, fast);
1136
1037
  return fast;
1137
1038
  };
1138
- var MermaidDiagram = ({ code }) => {
1039
+ var MermaidDiagram = ({ code, renderActions }) => {
1139
1040
  const id = useId();
1140
1041
  const [svg, setSvg] = useState(() => resolveSyncSvg(code));
1141
1042
  const [renderFailed, setRenderFailed] = useState(false);
@@ -1197,11 +1098,11 @@ var MermaidDiagram = ({ code }) => {
1197
1098
  "pre",
1198
1099
  {
1199
1100
  className: cn(
1200
- "tw-my-3 tw-overflow-auto tw-whitespace-pre-wrap tw-break-all",
1201
- "tw-py-3 tw-px-4",
1202
- "tw-bg-neutral-50",
1203
- "tw-rounded-md tw-text-neutral-400",
1204
- "tw-text-sm tw-font-mono"
1101
+ "tw:my-3 tw:overflow-auto tw:whitespace-pre-wrap tw:break-all",
1102
+ "tw:py-3 tw:px-4",
1103
+ "tw:bg-neutral-50",
1104
+ "tw:rounded-md tw:text-neutral-400",
1105
+ "tw:text-sm tw:font-mono"
1205
1106
  ),
1206
1107
  children: /* @__PURE__ */ jsx("code", { children: code })
1207
1108
  }
@@ -1215,13 +1116,14 @@ var MermaidDiagram = ({ code }) => {
1215
1116
  copyText: `\`\`\`mermaid
1216
1117
  ${code}
1217
1118
  \`\`\``,
1218
- className: "tw-my-3",
1219
- allowForeignObject: true
1119
+ className: "tw:my-3",
1120
+ allowForeignObject: true,
1121
+ renderActions
1220
1122
  },
1221
1123
  code
1222
1124
  );
1223
1125
  }
1224
- return /* @__PURE__ */ jsx("div", { className: "tw-my-3 tw-overflow-hidden tw-rounded-md tw-border tw-border-neutral-150 tw-bg-neutral-50 tw-p-6", children: /* @__PURE__ */ jsx(Skeleton, { className: "tw-h-40" }) });
1126
+ return /* @__PURE__ */ jsx(DiagramSkeleton, {});
1225
1127
  };
1226
1128
 
1227
1129
  export { MermaidDiagram };