@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.cjs CHANGED
@@ -3,60 +3,25 @@
3
3
  var react = require('react');
4
4
  var beautifulMermaid = require('beautiful-mermaid');
5
5
  var colors = require('@keboola/tailwind-config/colors');
6
+ var reactDom = require('react-dom');
7
+ var DOMPurify = require('dompurify');
8
+ var reactSlot = require('@radix-ui/react-slot');
9
+ var lucideReact = require('lucide-react');
6
10
  var clsx = require('clsx');
7
11
  var tailwindMerge = require('tailwind-merge');
8
12
  var reactTooltip = require('@radix-ui/react-tooltip');
9
13
  var classVarianceAuthority = require('class-variance-authority');
10
14
  var brandRegistry = require('@keboola/brand-registry');
11
15
  var jsxRuntime = require('react/jsx-runtime');
12
- var reactDom = require('react-dom');
13
- var DOMPurify = require('dompurify');
14
- var reactSlot = require('@radix-ui/react-slot');
15
- var lucide_react_star = require('lucide-react');
16
16
 
17
17
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
18
18
 
19
- function _interopNamespace(e) {
20
- if (e && e.__esModule) return e;
21
- var n = Object.create(null);
22
- if (e) {
23
- Object.keys(e).forEach(function (k) {
24
- if (k !== 'default') {
25
- var d = Object.getOwnPropertyDescriptor(e, k);
26
- Object.defineProperty(n, k, d.get ? d : {
27
- enumerable: true,
28
- get: function () { return e[k]; }
29
- });
30
- }
31
- });
32
- }
33
- n.default = e;
34
- return Object.freeze(n);
35
- }
36
-
37
19
  var colors__default = /*#__PURE__*/_interopDefault(colors);
38
20
  var DOMPurify__default = /*#__PURE__*/_interopDefault(DOMPurify);
39
- var lucide_react_star__namespace = /*#__PURE__*/_interopNamespace(lucide_react_star);
40
21
 
41
- var __defProp = Object.defineProperty;
42
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
43
- var __getOwnPropNames = Object.getOwnPropertyNames;
44
- var __hasOwnProp = Object.prototype.hasOwnProperty;
45
- var __export = (target, all) => {
46
- for (var name in all)
47
- __defProp(target, name, { get: all[name], enumerable: true });
48
- };
49
- var __copyProps = (to, from, except, desc) => {
50
- if (from && typeof from === "object" || typeof from === "function") {
51
- for (let key of __getOwnPropNames(from))
52
- if (!__hasOwnProp.call(to, key) && key !== except)
53
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
54
- }
55
- return to;
56
- };
57
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget);
22
+ // src/blocks/MermaidDiagram/MermaidDiagram.tsx
58
23
  var twMerge = tailwindMerge.extendTailwindMerge({
59
- prefix: "tw-"
24
+ prefix: "tw"
60
25
  });
61
26
  var cn = (...classes) => twMerge(clsx.clsx(...classes));
62
27
 
@@ -106,39 +71,39 @@ var useArgoDesign = () => react.use(ArgoDesignContext);
106
71
  var tooltipVariants = classVarianceAuthority.cva(
107
72
  [
108
73
  "tailwindcss-preflight",
109
- "tw-inline-block",
110
- "tw-break-anywhere",
111
- "tw-max-h-96",
112
- "tw-overflow-y-auto",
113
- "tw-z-[1060]",
74
+ "tw:inline-block",
75
+ "tw:break-anywhere",
76
+ "tw:max-h-96",
77
+ "tw:overflow-y-auto",
78
+ "tw:z-[1060]",
114
79
  // legacy (dark) chrome — default
115
- "tw-rounded",
116
- "tw-bg-neutral-800",
117
- "tw-text-white",
80
+ "tw:rounded",
81
+ "tw:bg-neutral-800",
82
+ "tw:text-white",
118
83
  // argo chrome overrides — semantic floating-panel tokens
119
- "data-[argo=true]:tw-rounded-2xl",
120
- "data-[argo=true]:tw-border",
121
- "data-[argo=true]:tw-border-solid",
122
- "data-[argo=true]:tw-border-border",
123
- "data-[argo=true]:tw-bg-popover",
124
- "data-[argo=true]:tw-text-popover-foreground",
125
- "data-[argo=true]:tw-shadow-md",
84
+ "tw:data-[argo=true]:rounded-2xl",
85
+ "tw:data-[argo=true]:border",
86
+ "tw:data-[argo=true]:border-solid",
87
+ "tw:data-[argo=true]:border-border",
88
+ "tw:data-[argo=true]:bg-popover",
89
+ "tw:data-[argo=true]:text-popover-foreground",
90
+ "tw:data-[argo=true]:shadow-md",
126
91
  // argo open animation
127
- "data-[argo=true]:data-[state=delayed-open]:tw-animate-in",
128
- "data-[argo=true]:data-[state=instant-open]:tw-animate-in",
129
- "data-[argo=true]:data-[state=delayed-open]:tw-fade-in-0",
130
- "data-[argo=true]:data-[state=instant-open]:tw-fade-in-0",
131
- "data-[argo=true]:data-[state=delayed-open]:tw-zoom-in-95",
132
- "data-[argo=true]:data-[state=instant-open]:tw-zoom-in-95",
92
+ "tw:data-[argo=true]:data-[state=delayed-open]:animate-in",
93
+ "tw:data-[argo=true]:data-[state=instant-open]:animate-in",
94
+ "tw:data-[argo=true]:data-[state=delayed-open]:fade-in-0",
95
+ "tw:data-[argo=true]:data-[state=instant-open]:fade-in-0",
96
+ "tw:data-[argo=true]:data-[state=delayed-open]:zoom-in-95",
97
+ "tw:data-[argo=true]:data-[state=instant-open]:zoom-in-95",
133
98
  // argo closed animation
134
- "data-[argo=true]:data-[state=closed]:tw-animate-out",
135
- "data-[argo=true]:data-[state=closed]:tw-fade-out-0",
136
- "data-[argo=true]:data-[state=closed]:tw-zoom-out-95",
99
+ "tw:data-[argo=true]:data-[state=closed]:animate-out",
100
+ "tw:data-[argo=true]:data-[state=closed]:fade-out-0",
101
+ "tw:data-[argo=true]:data-[state=closed]:zoom-out-95",
137
102
  // argo position animation
138
- "data-[argo=true]:data-[side=bottom]:tw-slide-in-from-top-2",
139
- "data-[argo=true]:data-[side=left]:tw-slide-in-from-right-2",
140
- "data-[argo=true]:data-[side=right]:tw-slide-in-from-left-2",
141
- "data-[argo=true]:data-[side=top]:tw-slide-in-from-bottom-2"
103
+ "tw:data-[argo=true]:data-[side=bottom]:slide-in-from-top-2",
104
+ "tw:data-[argo=true]:data-[side=left]:slide-in-from-right-2",
105
+ "tw:data-[argo=true]:data-[side=right]:slide-in-from-left-2",
106
+ "tw:data-[argo=true]:data-[side=top]:slide-in-from-bottom-2"
142
107
  ],
143
108
  {
144
109
  defaultVariants: {
@@ -147,22 +112,26 @@ var tooltipVariants = classVarianceAuthority.cva(
147
112
  variants: {
148
113
  variant: {
149
114
  action: [
150
- "tw-max-w-fit",
151
- "tw-px-3",
152
- "tw-py-2",
153
- "tw-text-center",
154
- "tw-text-xs",
155
- "tw-font-medium",
156
- "tw-uppercase",
157
- "tw-tracking-wider"
115
+ "tw:max-w-fit",
116
+ "tw:px-3",
117
+ "tw:py-2",
118
+ "tw:text-center",
119
+ "tw:text-xs",
120
+ "tw:font-medium",
121
+ // Legacy chrome uppercases the action tooltip; the Keboola V2 brand
122
+ // (`data-brand="keboola"`) renders it in standard case instead.
123
+ "tw:uppercase",
124
+ "tw:tracking-wider",
125
+ "tw:[[data-brand=keboola]_&]:normal-case",
126
+ "tw:[[data-brand=keboola]_&]:tracking-normal"
158
127
  ],
159
128
  explanatory: [
160
- "tw-max-w-80",
161
- "tw-px-4",
162
- "tw-py-3",
163
- "tw-text-left",
164
- "tw-text-sm",
165
- "tw-font-normal"
129
+ "tw:max-w-80",
130
+ "tw:px-4",
131
+ "tw:py-3",
132
+ "tw:text-left",
133
+ "tw:text-sm",
134
+ "tw:font-normal"
166
135
  ]
167
136
  }
168
137
  }
@@ -236,8 +205,8 @@ var TooltipTrigger = ({
236
205
  // (merged in via Slot) activates Tailwind's preflight inside the
237
206
  // span, which sets `svg { display: block }` — without an inline-flex
238
207
  // container that would stack any bare Lucide icon onto its own
239
- // line. `tw-inline-flex tw-items-center` keeps icon + text aligned.
240
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tw-inline-flex tw-items-center", children })
208
+ // line. `tw:inline-flex tw:items-center` keeps icon + text aligned.
209
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tw:inline-flex tw:items-center", children })
241
210
  )
242
211
  }
243
212
  );
@@ -301,185 +270,49 @@ var Tooltip = ({
301
270
  Tooltip.Root = TooltipRoot;
302
271
  Tooltip.Content = TooltipContent;
303
272
  Tooltip.Trigger = TooltipTrigger;
304
- var HEIGHT_CLASS_NAME = {
305
- xxs: "tw-h-3 tw-rounded",
306
- xs: "tw-h-4 tw-rounded",
307
- sm: "tw-h-5 tw-rounded",
308
- md: "tw-h-6 tw-rounded-md",
309
- lg: "tw-h-8 tw-rounded-lg",
310
- xl: "tw-h-10 tw-rounded-lg",
311
- "2xl": "tw-h-12 tw-rounded-lg"
312
- };
313
- var ANIMATION_CLASS_NAME = cn(
314
- // base styles
315
- "tw-relative",
316
- "tw-overflow-hidden",
317
- "tw-pointer-events-none",
318
- "tw-bg-skeleton",
319
- // before
320
- 'before:tw-content-[""]',
321
- "before:tw-opacity-100",
322
- "before:tw-absolute",
323
- "before:tw-inset-0",
324
- "before:-tw-translate-x-full",
325
- "before:tw-animate-[shimmer_2s_infinite]",
326
- "before:tw-bg-gradient-to-r",
327
- "before:tw-from-transparent",
328
- "before:tw-to-transparent",
329
- "before:tw-via-white/40"
330
- );
331
- var Skeleton = ({ height = "md", className, count = 1 }) => {
332
- const prefixId = react.useId();
333
- const keys = Array.from({ length: count }, (_, i) => `${prefixId}-${i}`);
334
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: keys.map((key) => /* @__PURE__ */ jsxRuntime.jsx(
335
- "div",
336
- {
337
- "data-skeleton": "true",
338
- className: cn(HEIGHT_CLASS_NAME[height], ANIMATION_CLASS_NAME, className)
339
- },
340
- key
341
- )) });
342
- };
343
-
344
- // src/icons/index.ts
345
- var icons_exports = {};
346
- __export(icons_exports, {
347
- Google: () => Google,
348
- Keboola: () => Keboola,
349
- Microsoft: () => Microsoft
350
- });
351
- __reExport(icons_exports, lucide_react_star__namespace);
352
- var Google = react.forwardRef(
353
- ({ size = 24, className, children, ...rest }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
354
- "svg",
355
- {
356
- ref,
357
- xmlns: "http://www.w3.org/2000/svg",
358
- width: size,
359
- height: size,
360
- viewBox: "12 10 20 20",
361
- fill: "none",
362
- className: cn("lucide", className),
363
- ...rest,
364
- children: [
365
- /* @__PURE__ */ jsxRuntime.jsx(
366
- "path",
367
- {
368
- 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",
369
- fill: "#4285F4"
370
- }
371
- ),
372
- /* @__PURE__ */ jsxRuntime.jsx(
373
- "path",
374
- {
375
- 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",
376
- fill: "#34A853"
377
- }
378
- ),
379
- /* @__PURE__ */ jsxRuntime.jsx(
380
- "path",
381
- {
382
- 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",
383
- fill: "#FBBC04"
384
- }
385
- ),
386
- /* @__PURE__ */ jsxRuntime.jsx(
387
- "path",
388
- {
389
- 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",
390
- fill: "#EA4335"
391
- }
392
- ),
393
- children
394
- ]
395
- }
396
- )
397
- );
398
- Google.displayName = "Google";
399
- var Keboola = react.forwardRef(
400
- ({ size = 24, color = "currentColor", className, children, ...rest }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
401
- "svg",
402
- {
403
- ref,
404
- xmlns: "http://www.w3.org/2000/svg",
405
- width: size,
406
- height: size,
407
- viewBox: "0 0 300 512",
408
- overflow: "visible",
409
- fill: color,
410
- className: cn("lucide", className),
411
- ...rest,
412
- children: [
413
- /* @__PURE__ */ jsxRuntime.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" }),
414
- children
415
- ]
416
- }
417
- )
418
- );
419
- Keboola.displayName = "Keboola";
420
- var Microsoft = react.forwardRef(
421
- ({ size = 24, className, children, ...rest }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
422
- "svg",
423
- {
424
- ref,
425
- xmlns: "http://www.w3.org/2000/svg",
426
- width: size,
427
- height: size,
428
- viewBox: "0 0 21 21",
429
- fill: "none",
430
- className: cn("lucide", className),
431
- ...rest,
432
- children: [
433
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "0", y: "0", width: "10", height: "10", fill: "#F25022" }),
434
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "11", y: "0", width: "10", height: "10", fill: "#7FBA00" }),
435
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "0", y: "11", width: "10", height: "10", fill: "#00A4EF" }),
436
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "11", y: "11", width: "10", height: "10", fill: "#FFB900" }),
437
- children
438
- ]
439
- }
440
- )
441
- );
442
- Microsoft.displayName = "Microsoft";
443
273
  var variants = classVarianceAuthority.cva(
444
274
  [
445
275
  "tailwindcss-preflight",
446
- "tw-group/button",
447
- "tw-border-box",
276
+ "tw:group/button",
277
+ "tw:border-box",
448
278
  // layout
449
- "tw-relative",
450
- "tw-flex",
451
- "tw-items-center",
452
- "tw-justify-center",
453
- "tw-gap-2",
279
+ "tw:relative",
280
+ "tw:flex",
281
+ "tw:items-center",
282
+ "tw:justify-center",
283
+ "tw:gap-2",
454
284
  // text — chrome weight/tracking are brand-overridable tokens
455
- // (`--font-weight-medium` / `--letter-spacing-chrome`); casing stays `tw-uppercase`.
456
- "tw-text-xs",
457
- "tw-leading-5",
458
- "tw-font-medium",
459
- "tw-tracking-chrome",
460
- "tw-uppercase",
285
+ // (`--font-weight-medium` / `--letter-spacing-chrome`). Casing: standard case is
286
+ // the default; only legacy brands (`keboola-legacy-*`) uppercase the chrome, so
287
+ // modern brands (incl. Keboola V2) read naturally. Mirrors the V2 standard-case
288
+ // treatment shipped for Tooltip/Badge (PR 7629).
289
+ "tw:text-xs",
290
+ "tw:leading-5",
291
+ "tw:font-medium",
292
+ "tw:[[data-brand^=keboola-legacy]_&]:tracking-chrome",
293
+ "tw:[[data-brand^=keboola-legacy]_&]:uppercase",
461
294
  // border — legacy (non-argo) chrome uses a fixed radius, not the brand token.
462
- "tw-rounded",
463
- "tw-border",
464
- "tw-border-transparent",
295
+ "tw:rounded",
296
+ "tw:border",
297
+ "tw:border-transparent",
465
298
  // styling
466
- "tw-shadow-none",
467
- "[a]:tw-cursor-pointer",
299
+ "tw:shadow-none",
300
+ "tw:[a]:cursor-pointer",
468
301
  // explicitly set for anchor
469
- "focus-visible:tw-outline",
470
- "focus-visible:tw-outline-1",
471
- "focus-visible:-tw-outline-offset-1",
472
- "focus-visible:tw-outline-ring",
473
- "focus-visible:tw-ring-4",
474
- "focus-visible:tw-ring-ring/30",
302
+ "tw:focus-visible:outline",
303
+ "tw:focus-visible:outline-1",
304
+ "tw:focus-visible:-outline-offset-1",
305
+ "tw:focus-visible:outline-ring",
306
+ "tw:focus-visible:ring-4",
307
+ "tw:focus-visible:ring-ring/30",
475
308
  // disabled
476
- "disabled:tw-opacity-40",
477
- "disabled:tw-cursor-not-allowed",
309
+ "tw:disabled:opacity-40",
310
+ "tw:disabled:cursor-not-allowed",
478
311
  // anchor support
479
- "!tw-no-underline",
480
- "aria-disabled:tw-opacity-40",
481
- "aria-disabled:tw-cursor-not-allowed",
482
- "[&_svg]:tw-shrink-0"
312
+ "tw:!no-underline",
313
+ "tw:aria-disabled:opacity-40",
314
+ "tw:aria-disabled:cursor-not-allowed",
315
+ "tw:[&_svg]:shrink-0"
483
316
  ],
484
317
  {
485
318
  defaultVariants: {
@@ -489,113 +322,113 @@ var variants = classVarianceAuthority.cva(
489
322
  },
490
323
  variants: {
491
324
  block: {
492
- true: ["tw-w-full"]
325
+ true: ["tw:w-full"]
493
326
  },
494
327
  variant: {
495
328
  primary: [
496
- "tw-text-white",
497
- "tw-bg-primary-500",
498
- "focus:tw-text-white",
499
- "hover:tw-text-white",
500
- "hover:not-disabled:tw-bg-primary-600",
501
- "active:not-disabled:tw-bg-primary-800",
329
+ "tw:text-white",
330
+ "tw:bg-primary-500",
331
+ "tw:focus:text-white",
332
+ "tw:hover:text-white",
333
+ "tw:hover:not-disabled:bg-primary-600",
334
+ "tw:active:not-disabled:bg-primary-800",
502
335
  // anchor disabled override
503
- "aria-disabled:!tw-bg-primary-500"
336
+ "tw:aria-disabled:!bg-primary-500"
504
337
  ],
505
338
  secondary: [
506
- "tw-text-white",
507
- "tw-bg-secondary-500",
508
- "focus:tw-text-white",
509
- "hover:tw-text-white",
510
- "hover:not-disabled:tw-bg-secondary-700",
511
- "active:not-disabled:tw-bg-secondary-800",
339
+ "tw:text-white",
340
+ "tw:bg-secondary-500",
341
+ "tw:focus:text-white",
342
+ "tw:hover:text-white",
343
+ "tw:hover:not-disabled:bg-secondary-700",
344
+ "tw:active:not-disabled:bg-secondary-800",
512
345
  // anchor disabled override
513
- "aria-disabled:!tw-bg-secondary-500"
346
+ "tw:aria-disabled:!bg-secondary-500"
514
347
  ],
515
348
  danger: [
516
- "tw-text-white",
517
- "tw-bg-error-500",
518
- "focus:tw-text-white",
519
- "hover:tw-text-white",
520
- "hover:not-disabled:tw-bg-error-600",
521
- "active:not-disabled:tw-bg-error-700",
349
+ "tw:text-white",
350
+ "tw:bg-error-500",
351
+ "tw:focus:text-white",
352
+ "tw:hover:text-white",
353
+ "tw:hover:not-disabled:bg-error-600",
354
+ "tw:active:not-disabled:bg-error-700",
522
355
  // anchor disabled override
523
- "aria-disabled:!tw-bg-error-500"
356
+ "tw:aria-disabled:!bg-error-500"
524
357
  ],
525
358
  invisible: [
526
- "tw-text-neutral-800",
527
- "tw-bg-transparent",
528
- "focus:tw-text-neutral-800",
529
- "hover:not-disabled:tw-bg-neutral-100",
530
- "hover:tw-text-neutral-800",
531
- "active:not-disabled:tw-bg-neutral-150",
359
+ "tw:text-neutral-800",
360
+ "tw:bg-transparent",
361
+ "tw:focus:text-neutral-800",
362
+ "tw:hover:not-disabled:bg-neutral-100",
363
+ "tw:hover:text-neutral-800",
364
+ "tw:active:not-disabled:bg-neutral-150",
532
365
  // contrasting icon on hover/active
533
- "[&_svg]:tw-text-neutral-400",
534
- "[&_svg]:hover:not-disabled:tw-text-secondary-600",
535
- "[&_svg]:active:not-disabled:tw-text-secondary-600",
366
+ "tw:[&_svg]:text-neutral-400",
367
+ "tw:hover:not-disabled:[&_svg]:text-secondary-600",
368
+ "tw:active:not-disabled:[&_svg]:text-secondary-600",
536
369
  // anchor disabled override
537
- "aria-disabled:!tw-bg-transparent"
370
+ "tw:aria-disabled:!bg-transparent"
538
371
  ],
539
372
  outline: [
540
- "tw-text-neutral-800",
541
- "tw-bg-white",
373
+ "tw:text-neutral-800",
374
+ "tw:bg-white",
542
375
  // border
543
- "!tw-border-neutral-200",
544
- "hover:tw-text-neutral-800",
545
- "focus:tw-text-neutral-800",
546
- "hover:not-disabled:!tw-border-neutral-300",
547
- "hover:not-disabled:tw-bg-neutral-100",
548
- "active:not-disabled:tw-bg-neutral-200",
376
+ "tw:!border-neutral-200",
377
+ "tw:hover:text-neutral-800",
378
+ "tw:focus:text-neutral-800",
379
+ "tw:hover:not-disabled:!border-neutral-300",
380
+ "tw:hover:not-disabled:bg-neutral-100",
381
+ "tw:active:not-disabled:bg-neutral-200",
549
382
  // contrasting icon hover, same as invisible
550
- "[&_svg]:tw-text-neutral-400",
551
- "[&_svg]:not-disabled:hover:tw-text-secondary-600",
552
- "[&_svg]:active:not-disabled:tw-text-secondary-600",
383
+ "tw:[&_svg]:text-neutral-400",
384
+ "tw:not-disabled:hover:[&_svg]:text-secondary-600",
385
+ "tw:active:not-disabled:[&_svg]:text-secondary-600",
553
386
  // anchor disabled override
554
- "aria-disabled:!tw-bg-white",
555
- "aria-disabled:!tw-border-neutral-200"
387
+ "tw:aria-disabled:!bg-white",
388
+ "tw:aria-disabled:!border-neutral-200"
556
389
  ],
557
390
  inline: [
558
- "tw-text-neutral-800",
559
- "tw-bg-transparent",
560
- "tw-rounded-full",
561
- "[&_svg]:tw-text-neutral-400",
562
- "[&_svg]:not-disabled:hover:tw-text-secondary-600",
563
- "[&_svg]:not-disabled:focus:tw-text-secondary-600"
391
+ "tw:text-neutral-800",
392
+ "tw:bg-transparent",
393
+ "tw:rounded-full",
394
+ "tw:[&_svg]:text-neutral-400",
395
+ "tw:not-disabled:hover:[&_svg]:text-secondary-600",
396
+ "tw:not-disabled:focus:[&_svg]:text-secondary-600"
564
397
  ]
565
398
  },
566
399
  size: {
567
400
  medium: [
568
- "tw-max-h-10",
569
- "tw-min-h-10",
570
- "tw-px-4",
571
- "tw-py-2.5",
572
- '[&_svg:not([class*="tw-size-"])]:tw-size-4'
401
+ "tw:max-h-10",
402
+ "tw:min-h-10",
403
+ "tw:px-4",
404
+ "tw:py-2.5",
405
+ 'tw:[&_svg:not([class*="tw:size-"])]:size-4'
573
406
  ],
574
407
  small: [
575
- "tw-max-h-8",
576
- "tw-min-h-8",
577
- "tw-px-4",
578
- "tw-py-1.5",
579
- '[&_svg:not([class*="tw-size-"])]:tw-size-4'
408
+ "tw:max-h-8",
409
+ "tw:min-h-8",
410
+ "tw:px-4",
411
+ "tw:py-1.5",
412
+ 'tw:[&_svg:not([class*="tw:size-"])]:size-4'
580
413
  ],
581
414
  large: [
582
- "tw-max-h-12",
583
- "tw-min-h-12",
584
- "tw-px-4",
585
- "tw-py-3.5",
586
- '[&_svg:not([class*="tw-size-"])]:tw-size-4'
415
+ "tw:max-h-12",
416
+ "tw:min-h-12",
417
+ "tw:px-4",
418
+ "tw:py-3.5",
419
+ 'tw:[&_svg:not([class*="tw:size-"])]:size-4'
587
420
  ],
588
- "icon-lg": ["tw-size-12", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-6'],
589
- icon: ["tw-size-10", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-4'],
590
- "icon-sm": ["tw-size-8", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-4'],
591
- "icon-xs": ["tw-size-6", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-4'],
421
+ "icon-lg": ["tw:size-12", "tw:p-0", 'tw:[&_svg:not([class*="tw:size-"])]:size-6'],
422
+ icon: ["tw:size-10", "tw:p-0", 'tw:[&_svg:not([class*="tw:size-"])]:size-4'],
423
+ "icon-sm": ["tw:size-8", "tw:p-0", 'tw:[&_svg:not([class*="tw:size-"])]:size-4'],
424
+ "icon-xs": ["tw:size-6", "tw:p-0", 'tw:[&_svg:not([class*="tw:size-"])]:size-4'],
592
425
  "icon-2xs": [
593
- "!tw-inline-flex",
594
- "tw-size-5",
595
- "tw-max-h-5",
596
- '[&_svg:not([class*="tw-size-"])]:tw-size-3'
426
+ "tw:!inline-flex",
427
+ "tw:size-5",
428
+ "tw:max-h-5",
429
+ 'tw:[&_svg:not([class*="tw:size-"])]:size-3'
597
430
  ],
598
- "icon-3xs": ["tw-h-fit", "tw-w-fit", '[&_svg:not([class*="tw-size-"])]:tw-size-4']
431
+ "icon-3xs": ["tw:h-fit", "tw:w-fit", 'tw:[&_svg:not([class*="tw:size-"])]:size-4']
599
432
  }
600
433
  }
601
434
  }
@@ -604,37 +437,37 @@ var argoVariants = classVarianceAuthority.cva(
604
437
  [
605
438
  "tailwindcss-preflight",
606
439
  // layout
607
- "tw-relative",
608
- "tw-inline-flex",
609
- "tw-items-center",
610
- "tw-justify-center",
611
- "tw-whitespace-nowrap",
612
- "tw-gap-2",
440
+ "tw:relative",
441
+ "tw:inline-flex",
442
+ "tw:items-center",
443
+ "tw:justify-center",
444
+ "tw:whitespace-nowrap",
445
+ "tw:gap-2",
613
446
  // border
614
- "tw-border",
615
- "tw-border-transparent",
616
- "tw-rounded-[var(--radius-lg,0.25rem)]",
447
+ "tw:border",
448
+ "tw:border-transparent",
449
+ "tw:rounded-[var(--radius-lg,0.25rem)]",
617
450
  // text
618
- "tw-font-medium",
619
- "tw-select-none",
451
+ "tw:font-medium",
452
+ "tw:select-none",
620
453
  // focus visible
621
- "!tw-outline-none",
622
- "focus-visible:tw-ring-2",
454
+ "tw:!outline-hidden",
455
+ "tw:focus-visible:ring-2",
623
456
  // disabled
624
- "disabled:tw-cursor-not-allowed",
625
- "disabled:tw-opacity-50",
626
- "active:tw-opacity-60",
627
- "tw-transition-all",
628
- "tw-bg-clip-padding",
457
+ "tw:disabled:cursor-not-allowed",
458
+ "tw:disabled:opacity-50",
459
+ "tw:active:opacity-60",
460
+ "tw:transition-all",
461
+ "tw:bg-clip-padding",
629
462
  // anchor support
630
- "!tw-no-underline",
631
- "aria-disabled:tw-cursor-not-allowed",
632
- "aria-disabled:tw-opacity-50",
463
+ "tw:!no-underline",
464
+ "tw:aria-disabled:cursor-not-allowed",
465
+ "tw:aria-disabled:opacity-50",
633
466
  // icon
634
- "tw-shrink-0",
635
- "[&_svg]:tw-pointer-events-none",
636
- "[&_svg]:tw-shrink-0",
637
- "[&_svg:not([class*='tw-size-'])]:tw-size-4"
467
+ "tw:shrink-0",
468
+ "tw:[&_svg]:pointer-events-none",
469
+ "tw:[&_svg]:shrink-0",
470
+ "tw:[&_svg:not([class*='tw:size-'])]:size-4"
638
471
  ],
639
472
  {
640
473
  defaultVariants: {
@@ -643,77 +476,77 @@ var argoVariants = classVarianceAuthority.cva(
643
476
  },
644
477
  variants: {
645
478
  block: {
646
- true: ["tw-w-full"]
479
+ true: ["tw:w-full"]
647
480
  },
648
481
  variant: {
649
482
  primary: [
650
- "tw-bg-primary",
651
- "tw-text-primary-foreground",
652
- "[a]:hover:tw-bg-primary/80",
653
- "hover:not-disabled:tw-bg-primary/90",
654
- "hover:tw-text-primary-foreground",
655
- "focus:tw-text-primary-foreground",
656
- "focus-visible:tw-border-primary",
657
- "focus-visible:tw-ring-ring/50"
483
+ "tw:bg-primary",
484
+ "tw:text-primary-foreground",
485
+ "tw:[a]:hover:bg-primary/80",
486
+ "tw:hover:not-disabled:bg-primary/90",
487
+ "tw:hover:text-primary-foreground",
488
+ "tw:focus:text-primary-foreground",
489
+ "tw:focus-visible:border-primary",
490
+ "tw:focus-visible:ring-ring/50"
658
491
  ],
659
492
  secondary: [
660
- "tw-bg-primary/10",
661
- "tw-text-primary",
662
- "hover:not-disabled:tw-bg-primary/20",
663
- "focus-visible:tw-border-primary",
664
- "focus-visible:tw-ring-ring/50"
493
+ "tw:bg-primary/10",
494
+ "tw:text-primary",
495
+ "tw:hover:not-disabled:bg-primary/20",
496
+ "tw:focus-visible:border-primary",
497
+ "tw:focus-visible:ring-ring/50"
665
498
  ],
666
499
  // should be called "destructive" by Figma
667
500
  danger: [
668
- "tw-bg-destructive",
669
- "tw-text-destructive-foreground",
670
- "hover:tw-text-destructive-foreground",
671
- "focus:tw-text-destructive-foreground",
672
- "focus-visible:tw-border-destructive",
673
- "focus-visible:tw-ring-destructive/20"
501
+ "tw:bg-destructive",
502
+ "tw:text-destructive-foreground",
503
+ "tw:hover:text-destructive-foreground",
504
+ "tw:focus:text-destructive-foreground",
505
+ "tw:focus-visible:border-destructive",
506
+ "tw:focus-visible:ring-destructive/20"
674
507
  ],
675
508
  outline: [
676
- "!tw-border-input",
677
- "tw-bg-background",
509
+ "tw:!border-input",
510
+ "tw:bg-background",
678
511
  // Semantic base text color so the label/icon flips in dark mode
679
512
  // (matches `invisible`); previously unset → inherited a fixed dark color.
680
- "tw-text-foreground",
513
+ "tw:text-foreground",
681
514
  // Hover follows the brand primary (translucent tint), matching the
682
515
  // `secondary` variant — not the fixed `accent` blue.
683
- "hover:not-disabled:tw-bg-primary/10",
684
- "hover:not-disabled:tw-text-primary",
685
- "hover:active:tw-bg-background",
686
- "focus-visible:!tw-border-primary",
687
- "focus-visible:tw-ring-ring/50"
516
+ "tw:hover:not-disabled:bg-primary/10",
517
+ "tw:hover:not-disabled:text-primary",
518
+ "tw:hover:active:bg-background",
519
+ "tw:focus-visible:!border-primary",
520
+ "tw:focus-visible:ring-ring/50"
688
521
  ],
689
522
  // should be called "ghost" by Figma
690
523
  invisible: [
691
- "tw-bg-transparent",
692
- "tw-text-foreground",
693
- "hover:not-disabled:tw-bg-primary/10",
694
- "hover:not-disabled:tw-text-primary",
695
- "hover:not-disabled:tw-border-primary/10",
696
- "focus-visible:tw-ring-ring/50"
524
+ "tw:bg-transparent",
525
+ "tw:text-foreground",
526
+ "tw:hover:not-disabled:bg-primary/10",
527
+ "tw:hover:not-disabled:text-primary",
528
+ "tw:hover:not-disabled:border-primary/10",
529
+ "tw:focus-visible:ring-ring/50"
697
530
  ],
698
531
  // should be called "link" by Figma
699
532
  inline: [
700
- "tw-bg-transparent",
701
- "tw-text-primary",
702
- "hover:tw-underline",
703
- "hover:active:tw-bg-transparent",
704
- "focus-visible:tw-ring-ring/50"
533
+ "tw:bg-transparent",
534
+ "tw:text-primary",
535
+ "tw:hover:underline",
536
+ "tw:hover:active:bg-transparent",
537
+ "tw:focus-visible:ring-ring/50"
705
538
  ]
706
539
  },
707
540
  size: {
708
541
  // should be called "default" by Figma
709
- medium: ["tw-max-h-9", "tw-py-2", "tw-px-4", "tw-text-sm"],
542
+ medium: ["tw:max-h-9", "tw:py-2", "tw:px-4", "tw:text-sm"],
710
543
  // should be called "small" by Figma
711
- small: ["tw-max-h-8", "tw-py-2", "tw-px-3", "tw-text-xs"],
544
+ small: ["tw:max-h-8", "tw:py-2", "tw:px-3", "tw:text-xs"],
712
545
  // should be called "large" by Figma
713
- large: ["tw-max-h-10", "tw-py-2.5", "tw-px-6", "tw-text-sm"],
714
- "icon-lg": ["tw-size-10"],
715
- icon: ["tw-size-9"],
716
- "icon-sm": ["tw-size-8"],
546
+ large: ["tw:max-h-10", "tw:py-2.5", "tw:px-6", "tw:text-sm"],
547
+ "icon-lg": ["tw:size-10"],
548
+ icon: ["tw:size-9"],
549
+ "icon-sm": ["tw:size-8"],
717
550
  // unsupported in ARGO, remove when old design is gone
718
551
  "icon-xs": [],
719
552
  "icon-2xs": [],
@@ -761,13 +594,13 @@ var Button = ({
761
594
  onClick: handleClick,
762
595
  className: cn(classNames),
763
596
  children: [
764
- isLoading && /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Loader2, { className: "tw-size-4 tw-shrink-0 tw-animate-spin" }),
597
+ isLoading && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "tw:size-4 tw:shrink-0 tw:animate-spin" }),
765
598
  /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slottable, { children: isLoading && isIconOnly ? null : children })
766
599
  ]
767
600
  }
768
601
  );
769
602
  };
770
- var Clipboard = ({
603
+ var Clipboard2 = ({
771
604
  ref,
772
605
  text: textProp,
773
606
  children,
@@ -792,6 +625,7 @@ var Clipboard = ({
792
625
  }
793
626
  };
794
627
  const handleOnClick = (event) => {
628
+ setIsTooltipOpen(true);
795
629
  if (text && state === "ready") void copy(text);
796
630
  onClick?.(event);
797
631
  };
@@ -806,6 +640,7 @@ var Clipboard = ({
806
640
  return tooltip;
807
641
  })();
808
642
  const tooltipVariant = state === "ready" && !!text ? tooltipVariantProp : "action";
643
+ const hasTooltipContent = tooltipContent !== null && tooltipContent !== void 0;
809
644
  return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip.Root, { open: isTooltipOpen, onOpenChange: handleOnOpenChange, children: [
810
645
  /* @__PURE__ */ jsxRuntime.jsx(
811
646
  Tooltip.Trigger,
@@ -814,12 +649,12 @@ var Clipboard = ({
814
649
  asChild,
815
650
  keepOpenOnClick: true,
816
651
  onClick: handleOnClick,
817
- className: cn("tw-cursor-pointer", className),
652
+ className: cn("tw:cursor-pointer", className),
818
653
  ref,
819
654
  children: children ?? text
820
655
  }
821
656
  ),
822
- /* @__PURE__ */ jsxRuntime.jsx(
657
+ hasTooltipContent && /* @__PURE__ */ jsxRuntime.jsx(
823
658
  Tooltip.Content,
824
659
  {
825
660
  keepOpenOnPointerDownOutside: true,
@@ -830,7 +665,7 @@ var Clipboard = ({
830
665
  )
831
666
  ] });
832
667
  };
833
- var DEFAULT_ICON = /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Copy, {});
668
+ var DEFAULT_ICON = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, {});
834
669
  var DEFAULT_ARIA_LABEL = "Copy";
835
670
  var ClipboardButton = ({
836
671
  // clipboard props
@@ -847,7 +682,7 @@ var ClipboardButton = ({
847
682
  const defaultAriaLabel = typeof tooltip === "string" && tooltip.trim() ? tooltip : DEFAULT_ARIA_LABEL;
848
683
  const ariaLabel = rest["aria-label"] ?? (children == null ? defaultAriaLabel : void 0);
849
684
  return /* @__PURE__ */ jsxRuntime.jsx(
850
- Clipboard,
685
+ Clipboard2,
851
686
  {
852
687
  asChild: true,
853
688
  tooltip,
@@ -864,7 +699,13 @@ var ClipboardButton = ({
864
699
  var MIN_SCALE = 0.5;
865
700
  var MAX_SCALE = 3;
866
701
  var ZOOM_STEP = 0.1;
867
- var ZoomableSvg = ({ html, copyText, className, allowForeignObject }) => {
702
+ var ZoomableSvg = ({
703
+ html,
704
+ copyText,
705
+ className,
706
+ allowForeignObject,
707
+ renderActions
708
+ }) => {
868
709
  const safeHtml = react.useMemo(
869
710
  () => DOMPurify__default.default.sanitize(html, {
870
711
  USE_PROFILES: { svg: true, svgFilters: true },
@@ -943,7 +784,7 @@ var ZoomableSvg = ({ html, copyText, className, allowForeignObject }) => {
943
784
  "div",
944
785
  {
945
786
  role: "presentation",
946
- className: cn("tw-group/zoom tw-relative", isFullscreen && "tw-h-full"),
787
+ className: cn("tw:group/zoom tw:relative", isFullscreen && "tw:h-full"),
947
788
  onClick: handleClick,
948
789
  children: [
949
790
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -952,8 +793,8 @@ var ZoomableSvg = ({ html, copyText, className, allowForeignObject }) => {
952
793
  role: "presentation",
953
794
  ref: containerRef,
954
795
  className: cn(
955
- "tw-overflow-hidden tw-cursor-grab active:tw-cursor-grabbing tw-p-3",
956
- isFullscreen && "tw-h-full"
796
+ "tw:overflow-hidden tw:cursor-grab tw:active:cursor-grabbing tw:p-3",
797
+ isFullscreen && "tw:h-full"
957
798
  ),
958
799
  onMouseDown: handleMouseDown,
959
800
  onMouseMove: handleMouseMove,
@@ -963,8 +804,8 @@ var ZoomableSvg = ({ html, copyText, className, allowForeignObject }) => {
963
804
  "div",
964
805
  {
965
806
  className: cn(
966
- "tw-flex tw-justify-center tw-origin-center",
967
- isFullscreen && "tw-h-full [&>svg]:tw-h-full"
807
+ "tw:flex tw:justify-center tw:origin-center",
808
+ isFullscreen && "tw:h-full tw:[&>svg]:h-full"
968
809
  ),
969
810
  style: { transform: `translate(${translate.x}px, ${translate.y}px) scale(${scale})` },
970
811
  dangerouslySetInnerHTML: { __html: safeHtml }
@@ -976,11 +817,12 @@ var ZoomableSvg = ({ html, copyText, className, allowForeignObject }) => {
976
817
  "div",
977
818
  {
978
819
  role: "presentation",
979
- 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",
820
+ 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",
980
821
  onClick: stopPropagation,
981
822
  children: [
982
823
  isZoomed && /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { tooltip: "Reset zoom", placement: "top", triggerAsChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "small", variant: "outline", onClick: handleReset, children: "Reset" }) }),
983
824
  copyText && /* @__PURE__ */ jsxRuntime.jsx(ClipboardButton, { text: copyText, tooltip: "Copy code", size: "icon-sm", variant: "outline" }),
825
+ renderActions?.(safeHtml),
984
826
  /* @__PURE__ */ jsxRuntime.jsx(
985
827
  Tooltip,
986
828
  {
@@ -994,7 +836,7 @@ var ZoomableSvg = ({ html, copyText, className, allowForeignObject }) => {
994
836
  variant: "outline",
995
837
  "aria-label": isFullscreen ? "Exit fullscreen" : "Fullscreen",
996
838
  onClick: () => setIsFullscreen((f) => !f),
997
- children: isFullscreen ? /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Minimize2, { className: "tw-size-4" }) : /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Maximize2, { className: "tw-size-4" })
839
+ children: isFullscreen ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Minimize2, { className: "tw:size-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Maximize2, { className: "tw:size-4" })
998
840
  }
999
841
  )
1000
842
  }
@@ -1012,7 +854,7 @@ var ZoomableSvg = ({ html, copyText, className, allowForeignObject }) => {
1012
854
  {
1013
855
  role: "presentation",
1014
856
  "data-testid": "zoomable-svg-fullscreen",
1015
- className: "tailwindcss-preflight tw-fixed tw-inset-0 tw-z-[1060] tw-bg-muted tw-p-4",
857
+ className: "tw:fixed tw:inset-0 tw:z-[1060] tw:bg-muted tw:p-4 tailwindcss-preflight",
1016
858
  onClick: stopPropagation,
1017
859
  children: diagramContent
1018
860
  }
@@ -1024,13 +866,53 @@ var ZoomableSvg = ({ html, copyText, className, allowForeignObject }) => {
1024
866
  "div",
1025
867
  {
1026
868
  className: cn(
1027
- "tw-overflow-hidden tw-rounded-md tw-border tw-border-border tw-bg-muted",
869
+ "tw:overflow-hidden tw:rounded-md tw:border tw:border-border tw:bg-muted",
1028
870
  className
1029
871
  ),
1030
872
  children: diagramContent
1031
873
  }
1032
874
  );
1033
875
  };
876
+ var HEIGHT_CLASS_NAME = {
877
+ xxs: "tw:h-3 tw:rounded",
878
+ xs: "tw:h-4 tw:rounded",
879
+ sm: "tw:h-5 tw:rounded",
880
+ md: "tw:h-6 tw:rounded-md",
881
+ lg: "tw:h-8 tw:rounded-lg",
882
+ xl: "tw:h-10 tw:rounded-lg",
883
+ "2xl": "tw:h-12 tw:rounded-lg"
884
+ };
885
+ var ANIMATION_CLASS_NAME = cn(
886
+ // base styles
887
+ "tw:relative",
888
+ "tw:overflow-hidden",
889
+ "tw:pointer-events-none",
890
+ "tw:bg-skeleton",
891
+ // before
892
+ 'tw:before:content-[""]',
893
+ "tw:before:opacity-100",
894
+ "tw:before:absolute",
895
+ "tw:before:inset-0",
896
+ "tw:before:-translate-x-full",
897
+ "tw:before:animate-[shimmer_2s_infinite]",
898
+ "tw:before:bg-gradient-to-r",
899
+ "tw:before:from-transparent",
900
+ "tw:before:to-transparent",
901
+ "tw:before:via-white/40"
902
+ );
903
+ var Skeleton = ({ height = "md", className, count = 1 }) => {
904
+ const prefixId = react.useId();
905
+ const keys = Array.from({ length: count }, (_, i) => `${prefixId}-${i}`);
906
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: keys.map((key) => /* @__PURE__ */ jsxRuntime.jsx(
907
+ "div",
908
+ {
909
+ "data-skeleton": "true",
910
+ className: cn(HEIGHT_CLASS_NAME[height], ANIMATION_CLASS_NAME, className)
911
+ },
912
+ key
913
+ )) });
914
+ };
915
+ var DiagramSkeleton = () => /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(Skeleton, { className: "tw:h-40" }) });
1034
916
 
1035
917
  // src/blocks/MermaidDiagram/svgTransforms.ts
1036
918
  var HTML_TAG = /<[^>]+>/g;
@@ -1056,7 +938,7 @@ var makeResponsive = (svgString) => {
1056
938
  };
1057
939
  var PRIMARY_FALLBACK_CHANNELS = "31 143 255";
1058
940
  var resolvePrimary = () => {
1059
- const channels = typeof document === "undefined" ? PRIMARY_FALLBACK_CHANNELS : getComputedStyle(document.documentElement).getPropertyValue("--color-primary").trim() || PRIMARY_FALLBACK_CHANNELS;
941
+ const channels = typeof document === "undefined" ? PRIMARY_FALLBACK_CHANNELS : getComputedStyle(document.documentElement).getPropertyValue("--primary").trim() || PRIMARY_FALLBACK_CHANNELS;
1060
942
  return `rgb(${channels})`;
1061
943
  };
1062
944
  var mermaidPromise = null;
@@ -1161,7 +1043,7 @@ var resolveSyncSvg = (code) => {
1161
1043
  if (fast) svgCache.set(code, fast);
1162
1044
  return fast;
1163
1045
  };
1164
- var MermaidDiagram = ({ code }) => {
1046
+ var MermaidDiagram = ({ code, renderActions }) => {
1165
1047
  const id = react.useId();
1166
1048
  const [svg, setSvg] = react.useState(() => resolveSyncSvg(code));
1167
1049
  const [renderFailed, setRenderFailed] = react.useState(false);
@@ -1223,11 +1105,11 @@ var MermaidDiagram = ({ code }) => {
1223
1105
  "pre",
1224
1106
  {
1225
1107
  className: cn(
1226
- "tw-my-3 tw-overflow-auto tw-whitespace-pre-wrap tw-break-all",
1227
- "tw-py-3 tw-px-4",
1228
- "tw-bg-neutral-50",
1229
- "tw-rounded-md tw-text-neutral-400",
1230
- "tw-text-sm tw-font-mono"
1108
+ "tw:my-3 tw:overflow-auto tw:whitespace-pre-wrap tw:break-all",
1109
+ "tw:py-3 tw:px-4",
1110
+ "tw:bg-neutral-50",
1111
+ "tw:rounded-md tw:text-neutral-400",
1112
+ "tw:text-sm tw:font-mono"
1231
1113
  ),
1232
1114
  children: /* @__PURE__ */ jsxRuntime.jsx("code", { children: code })
1233
1115
  }
@@ -1241,13 +1123,14 @@ var MermaidDiagram = ({ code }) => {
1241
1123
  copyText: `\`\`\`mermaid
1242
1124
  ${code}
1243
1125
  \`\`\``,
1244
- className: "tw-my-3",
1245
- allowForeignObject: true
1126
+ className: "tw:my-3",
1127
+ allowForeignObject: true,
1128
+ renderActions
1246
1129
  },
1247
1130
  code
1248
1131
  );
1249
1132
  }
1250
- return /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(Skeleton, { className: "tw-h-40" }) });
1133
+ return /* @__PURE__ */ jsxRuntime.jsx(DiagramSkeleton, {});
1251
1134
  };
1252
1135
 
1253
1136
  exports.MermaidDiagram = MermaidDiagram;