@gram-ai/elements 1.13.6 → 1.13.8

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.
@@ -1,15 +1,15 @@
1
1
  import { jsxs as fe, jsx as te } from "react/jsx-runtime";
2
- import { createContext as Fe, useContext as _e, forwardRef as Ce, createElement as se, useRef as We, useState as be, useEffect as Be } from "react";
2
+ import { createContext as Fe, useContext as We, forwardRef as Ce, createElement as se, useRef as _e, useState as be, useEffect as Ue } from "react";
3
3
  import { useAssistantState as $e } from "@assistant-ui/react";
4
- import { parse as Ue, View as De, Warn as Je } from "vega";
5
- const Ye = Fe(
4
+ import { parse as Be, View as De, Warn as Je } from "vega";
5
+ const qe = Fe(
6
6
  void 0
7
7
  ), ze = () => {
8
- const e = _e(Ye);
8
+ const e = We(qe);
9
9
  if (!e)
10
10
  throw new Error("useElements must be used within a ElementsProvider");
11
11
  return e;
12
- }, qe = {
12
+ }, Ye = {
13
13
  compact: {
14
14
  // Padding - small increments (1, 1.5, 2, 2.5, 3)
15
15
  "p-xs": "p-1",
@@ -102,7 +102,7 @@ const Ye = Fe(
102
102
  }
103
103
  }, Xe = () => {
104
104
  const { config: e } = ze(), r = e.theme?.density ?? "normal";
105
- return (t) => qe[r][t];
105
+ return (t) => Ye[r][t];
106
106
  }, Ze = {
107
107
  sharp: {
108
108
  sm: "rounded-sm",
@@ -288,31 +288,31 @@ const Qe = (e, r) => {
288
288
  const l = [];
289
289
  let i = 0, m = 0, c = 0, g;
290
290
  const f = a.length;
291
- for (let C = 0; C < f; C++) {
292
- const w = a[C];
291
+ for (let z = 0; z < f; z++) {
292
+ const w = a[z];
293
293
  if (i === 0 && m === 0) {
294
294
  if (w === xe) {
295
- l.push(a.slice(c, C)), c = C + 1;
295
+ l.push(a.slice(c, z)), c = z + 1;
296
296
  continue;
297
297
  }
298
298
  if (w === "/") {
299
- g = C;
299
+ g = z;
300
300
  continue;
301
301
  }
302
302
  }
303
303
  w === "[" ? i++ : w === "]" ? i-- : w === "(" ? m++ : w === ")" && m--;
304
304
  }
305
305
  const v = l.length === 0 ? a : a.slice(c);
306
- let x = v, z = !1;
307
- v.endsWith(ne) ? (x = v.slice(0, -1), z = !0) : (
306
+ let x = v, C = !1;
307
+ v.endsWith(ne) ? (x = v.slice(0, -1), C = !0) : (
308
308
  /**
309
309
  * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
310
310
  * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
311
311
  */
312
- v.startsWith(ne) && (x = v.slice(1), z = !0)
312
+ v.startsWith(ne) && (x = v.slice(1), C = !0)
313
313
  );
314
- const M = g && g > c ? g - c : void 0;
315
- return ye(l, z, x, M);
314
+ const A = g && g > c ? g - c : void 0;
315
+ return ye(l, C, x, A);
316
316
  };
317
317
  if (r) {
318
318
  const a = r + xe, l = o;
@@ -356,34 +356,34 @@ const Qe = (e, r) => {
356
356
  const f = m[g], {
357
357
  isExternal: v,
358
358
  modifiers: x,
359
- hasImportantModifier: z,
360
- baseClassName: M,
361
- maybePostfixModifierPosition: C
359
+ hasImportantModifier: C,
360
+ baseClassName: A,
361
+ maybePostfixModifierPosition: z
362
362
  } = t(f);
363
363
  if (v) {
364
364
  c = f + (c.length > 0 ? " " + c : c);
365
365
  continue;
366
366
  }
367
- let w = !!C, P = o(w ? M.substring(0, C) : M);
368
- if (!P) {
367
+ let w = !!z, E = o(w ? A.substring(0, z) : A);
368
+ if (!E) {
369
369
  if (!w) {
370
370
  c = f + (c.length > 0 ? " " + c : c);
371
371
  continue;
372
372
  }
373
- if (P = o(M), !P) {
373
+ if (E = o(A), !E) {
374
374
  c = f + (c.length > 0 ? " " + c : c);
375
375
  continue;
376
376
  }
377
377
  w = !1;
378
378
  }
379
- const $ = x.length === 0 ? "" : x.length === 1 ? x[0] : l(x).join(":"), _ = z ? $ + ne : $, G = _ + P;
380
- if (i.indexOf(G) > -1)
379
+ const $ = x.length === 0 ? "" : x.length === 1 ? x[0] : l(x).join(":"), W = C ? $ + ne : $, P = W + E;
380
+ if (i.indexOf(P) > -1)
381
381
  continue;
382
- i.push(G);
383
- const T = a(P, w);
384
- for (let E = 0; E < T.length; ++E) {
385
- const W = T[E];
386
- i.push(_ + W);
382
+ i.push(P);
383
+ const j = a(E, w);
384
+ for (let M = 0; M < j.length; ++M) {
385
+ const _ = j[M];
386
+ i.push(W + _);
387
387
  }
388
388
  c = f + (c.length > 0 ? " " + c : c);
389
389
  }
@@ -391,14 +391,14 @@ const Qe = (e, r) => {
391
391
  }, xt = (...e) => {
392
392
  let r = 0, t, o, a = "";
393
393
  for (; r < e.length; )
394
- (t = e[r++]) && (o = Me(t)) && (a && (a += " "), a += o);
394
+ (t = e[r++]) && (o = Ne(t)) && (a && (a += " "), a += o);
395
395
  return a;
396
- }, Me = (e) => {
396
+ }, Ne = (e) => {
397
397
  if (typeof e == "string")
398
398
  return e;
399
399
  let r, t = "";
400
400
  for (let o = 0; o < e.length; o++)
401
- e[o] && (r = Me(e[o])) && (t && (t += " "), t += r);
401
+ e[o] && (r = Ne(e[o])) && (t && (t += " "), t += r);
402
402
  return t;
403
403
  }, yt = (e, ...r) => {
404
404
  let t, o, a, l;
@@ -416,19 +416,19 @@ const Qe = (e, r) => {
416
416
  }, wt = [], b = (e) => {
417
417
  const r = (t) => t[e] || wt;
418
418
  return r.isThemeGetter = !0, r;
419
- }, Pe = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Ee = /^\((?:(\w[\w-]*):)?(.+)\)$/i, kt = /^\d+\/\d+$/, vt = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Ct = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, zt = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, At = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, St = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, O = (e) => kt.test(e), u = (e) => !!e && !Number.isNaN(Number(e)), I = (e) => !!e && Number.isInteger(Number(e)), re = (e) => e.endsWith("%") && u(e.slice(0, -1)), R = (e) => vt.test(e), Rt = () => !0, It = (e) => (
419
+ }, Ee = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Me = /^\((?:(\w[\w-]*):)?(.+)\)$/i, kt = /^\d+\/\d+$/, vt = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Ct = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, zt = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, At = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, St = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, L = (e) => kt.test(e), u = (e) => !!e && !Number.isNaN(Number(e)), N = (e) => !!e && Number.isInteger(Number(e)), re = (e) => e.endsWith("%") && u(e.slice(0, -1)), I = (e) => vt.test(e), Rt = () => !0, It = (e) => (
420
420
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
421
421
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
422
422
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
423
423
  Ct.test(e) && !zt.test(e)
424
- ), Ne = () => !1, Mt = (e) => At.test(e), Pt = (e) => St.test(e), Et = (e) => !s(e) && !n(e), Nt = (e) => V(e, Te, Ne), s = (e) => Pe.test(e), j = (e) => V(e, Le, It), oe = (e) => V(e, Ot, u), we = (e) => V(e, je, Ne), jt = (e) => V(e, Ge, Pt), X = (e) => V(e, Oe, Mt), n = (e) => Ee.test(e), B = (e) => F(e, Le), Gt = (e) => F(e, Vt), ke = (e) => F(e, je), Tt = (e) => F(e, Te), Lt = (e) => F(e, Ge), Z = (e) => F(e, Oe, !0), V = (e, r, t) => {
425
- const o = Pe.exec(e);
424
+ ), Oe = () => !1, Nt = (e) => At.test(e), Et = (e) => St.test(e), Mt = (e) => !s(e) && !n(e), Ot = (e) => V(e, je, Oe), s = (e) => Ee.test(e), T = (e) => V(e, Ge, It), oe = (e) => V(e, Lt, u), we = (e) => V(e, Te, Oe), Tt = (e) => V(e, Pe, Et), X = (e) => V(e, Le, Nt), n = (e) => Me.test(e), U = (e) => F(e, Ge), Pt = (e) => F(e, Vt), ke = (e) => F(e, Te), jt = (e) => F(e, je), Gt = (e) => F(e, Pe), Z = (e) => F(e, Le, !0), V = (e, r, t) => {
425
+ const o = Ee.exec(e);
426
426
  return o ? o[1] ? r(o[1]) : t(o[2]) : !1;
427
427
  }, F = (e, r, t = !1) => {
428
- const o = Ee.exec(e);
428
+ const o = Me.exec(e);
429
429
  return o ? o[1] ? r(o[1]) : t : !1;
430
- }, je = (e) => e === "position" || e === "percentage", Ge = (e) => e === "image" || e === "url", Te = (e) => e === "length" || e === "size" || e === "bg-size", Le = (e) => e === "length", Ot = (e) => e === "number", Vt = (e) => e === "family-name", Oe = (e) => e === "shadow", Ft = () => {
431
- const e = b("color"), r = b("font"), t = b("text"), o = b("font-weight"), a = b("tracking"), l = b("leading"), i = b("breakpoint"), m = b("container"), c = b("spacing"), g = b("radius"), f = b("shadow"), v = b("inset-shadow"), x = b("text-shadow"), z = b("drop-shadow"), M = b("blur"), C = b("perspective"), w = b("aspect"), P = b("ease"), $ = b("animate"), _ = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], G = () => [
430
+ }, Te = (e) => e === "position" || e === "percentage", Pe = (e) => e === "image" || e === "url", je = (e) => e === "length" || e === "size" || e === "bg-size", Ge = (e) => e === "length", Lt = (e) => e === "number", Vt = (e) => e === "family-name", Le = (e) => e === "shadow", Ft = () => {
431
+ const e = b("color"), r = b("font"), t = b("text"), o = b("font-weight"), a = b("tracking"), l = b("leading"), i = b("breakpoint"), m = b("container"), c = b("spacing"), g = b("radius"), f = b("shadow"), v = b("inset-shadow"), x = b("text-shadow"), C = b("drop-shadow"), A = b("blur"), z = b("perspective"), w = b("aspect"), E = b("ease"), $ = b("animate"), W = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], P = () => [
432
432
  "center",
433
433
  "top",
434
434
  "bottom",
@@ -446,15 +446,15 @@ const Qe = (e, r) => {
446
446
  "bottom-left",
447
447
  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
448
448
  "left-bottom"
449
- ], T = () => [...G(), n, s], E = () => ["auto", "hidden", "clip", "visible", "scroll"], W = () => ["auto", "contain", "none"], p = () => [n, s, c], A = () => [O, "full", "auto", ...p()], ie = () => [I, "none", "subgrid", n, s], le = () => ["auto", {
450
- span: ["full", I, n, s]
451
- }, I, n, s], U = () => [I, "auto", n, s], ce = () => ["auto", "min", "max", "fr", n, s], K = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], L = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], S = () => ["auto", ...p()], N = () => [O, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...p()], d = () => [e, n, s], de = () => [...G(), ke, we, {
449
+ ], j = () => [...P(), n, s], M = () => ["auto", "hidden", "clip", "visible", "scroll"], _ = () => ["auto", "contain", "none"], p = () => [n, s, c], S = () => [L, "full", "auto", ...p()], ie = () => [N, "none", "subgrid", n, s], le = () => ["auto", {
450
+ span: ["full", N, n, s]
451
+ }, N, n, s], B = () => [N, "auto", n, s], ce = () => ["auto", "min", "max", "fr", n, s], K = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], G = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], R = () => ["auto", ...p()], O = () => [L, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...p()], d = () => [e, n, s], de = () => [...P(), ke, we, {
452
452
  position: [n, s]
453
453
  }], pe = () => ["no-repeat", {
454
454
  repeat: ["", "x", "y", "space", "round"]
455
- }], me = () => ["auto", "cover", "contain", Tt, Nt, {
455
+ }], me = () => ["auto", "cover", "contain", jt, Ot, {
456
456
  size: [n, s]
457
- }], Q = () => [re, B, j], y = () => [
457
+ }], Q = () => [re, U, T], y = () => [
458
458
  // Deprecated since Tailwind CSS v4.0.0
459
459
  "",
460
460
  "none",
@@ -462,35 +462,35 @@ const Qe = (e, r) => {
462
462
  g,
463
463
  n,
464
464
  s
465
- ], k = () => ["", u, B, j], D = () => ["solid", "dashed", "dotted", "double"], ue = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], h = () => [u, re, ke, we], ge = () => [
465
+ ], k = () => ["", u, U, T], D = () => ["solid", "dashed", "dotted", "double"], ue = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], h = () => [u, re, ke, we], ge = () => [
466
466
  // Deprecated since Tailwind CSS v4.0.0
467
467
  "",
468
468
  "none",
469
- M,
469
+ A,
470
470
  n,
471
471
  s
472
- ], J = () => ["none", u, n, s], Y = () => ["none", u, n, s], ee = () => [u, n, s], q = () => [O, "full", ...p()];
472
+ ], J = () => ["none", u, n, s], q = () => ["none", u, n, s], ee = () => [u, n, s], Y = () => [L, "full", ...p()];
473
473
  return {
474
474
  cacheSize: 500,
475
475
  theme: {
476
476
  animate: ["spin", "ping", "pulse", "bounce"],
477
477
  aspect: ["video"],
478
- blur: [R],
479
- breakpoint: [R],
478
+ blur: [I],
479
+ breakpoint: [I],
480
480
  color: [Rt],
481
- container: [R],
482
- "drop-shadow": [R],
481
+ container: [I],
482
+ "drop-shadow": [I],
483
483
  ease: ["in", "out", "in-out"],
484
- font: [Et],
484
+ font: [Mt],
485
485
  "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
486
- "inset-shadow": [R],
486
+ "inset-shadow": [I],
487
487
  leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
488
488
  perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
489
- radius: [R],
490
- shadow: [R],
489
+ radius: [I],
490
+ shadow: [I],
491
491
  spacing: ["px", u],
492
- text: [R],
493
- "text-shadow": [R],
492
+ text: [I],
493
+ "text-shadow": [I],
494
494
  tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
495
495
  },
496
496
  classGroups: {
@@ -502,7 +502,7 @@ const Qe = (e, r) => {
502
502
  * @see https://tailwindcss.com/docs/aspect-ratio
503
503
  */
504
504
  aspect: [{
505
- aspect: ["auto", "square", O, s, n, w]
505
+ aspect: ["auto", "square", L, s, n, w]
506
506
  }],
507
507
  /**
508
508
  * Container
@@ -522,14 +522,14 @@ const Qe = (e, r) => {
522
522
  * @see https://tailwindcss.com/docs/break-after
523
523
  */
524
524
  "break-after": [{
525
- "break-after": _()
525
+ "break-after": W()
526
526
  }],
527
527
  /**
528
528
  * Break Before
529
529
  * @see https://tailwindcss.com/docs/break-before
530
530
  */
531
531
  "break-before": [{
532
- "break-before": _()
532
+ "break-before": W()
533
533
  }],
534
534
  /**
535
535
  * Break Inside
@@ -593,49 +593,49 @@ const Qe = (e, r) => {
593
593
  * @see https://tailwindcss.com/docs/object-position
594
594
  */
595
595
  "object-position": [{
596
- object: T()
596
+ object: j()
597
597
  }],
598
598
  /**
599
599
  * Overflow
600
600
  * @see https://tailwindcss.com/docs/overflow
601
601
  */
602
602
  overflow: [{
603
- overflow: E()
603
+ overflow: M()
604
604
  }],
605
605
  /**
606
606
  * Overflow X
607
607
  * @see https://tailwindcss.com/docs/overflow
608
608
  */
609
609
  "overflow-x": [{
610
- "overflow-x": E()
610
+ "overflow-x": M()
611
611
  }],
612
612
  /**
613
613
  * Overflow Y
614
614
  * @see https://tailwindcss.com/docs/overflow
615
615
  */
616
616
  "overflow-y": [{
617
- "overflow-y": E()
617
+ "overflow-y": M()
618
618
  }],
619
619
  /**
620
620
  * Overscroll Behavior
621
621
  * @see https://tailwindcss.com/docs/overscroll-behavior
622
622
  */
623
623
  overscroll: [{
624
- overscroll: W()
624
+ overscroll: _()
625
625
  }],
626
626
  /**
627
627
  * Overscroll Behavior X
628
628
  * @see https://tailwindcss.com/docs/overscroll-behavior
629
629
  */
630
630
  "overscroll-x": [{
631
- "overscroll-x": W()
631
+ "overscroll-x": _()
632
632
  }],
633
633
  /**
634
634
  * Overscroll Behavior Y
635
635
  * @see https://tailwindcss.com/docs/overscroll-behavior
636
636
  */
637
637
  "overscroll-y": [{
638
- "overscroll-y": W()
638
+ "overscroll-y": _()
639
639
  }],
640
640
  /**
641
641
  * Position
@@ -647,63 +647,63 @@ const Qe = (e, r) => {
647
647
  * @see https://tailwindcss.com/docs/top-right-bottom-left
648
648
  */
649
649
  inset: [{
650
- inset: A()
650
+ inset: S()
651
651
  }],
652
652
  /**
653
653
  * Right / Left
654
654
  * @see https://tailwindcss.com/docs/top-right-bottom-left
655
655
  */
656
656
  "inset-x": [{
657
- "inset-x": A()
657
+ "inset-x": S()
658
658
  }],
659
659
  /**
660
660
  * Top / Bottom
661
661
  * @see https://tailwindcss.com/docs/top-right-bottom-left
662
662
  */
663
663
  "inset-y": [{
664
- "inset-y": A()
664
+ "inset-y": S()
665
665
  }],
666
666
  /**
667
667
  * Start
668
668
  * @see https://tailwindcss.com/docs/top-right-bottom-left
669
669
  */
670
670
  start: [{
671
- start: A()
671
+ start: S()
672
672
  }],
673
673
  /**
674
674
  * End
675
675
  * @see https://tailwindcss.com/docs/top-right-bottom-left
676
676
  */
677
677
  end: [{
678
- end: A()
678
+ end: S()
679
679
  }],
680
680
  /**
681
681
  * Top
682
682
  * @see https://tailwindcss.com/docs/top-right-bottom-left
683
683
  */
684
684
  top: [{
685
- top: A()
685
+ top: S()
686
686
  }],
687
687
  /**
688
688
  * Right
689
689
  * @see https://tailwindcss.com/docs/top-right-bottom-left
690
690
  */
691
691
  right: [{
692
- right: A()
692
+ right: S()
693
693
  }],
694
694
  /**
695
695
  * Bottom
696
696
  * @see https://tailwindcss.com/docs/top-right-bottom-left
697
697
  */
698
698
  bottom: [{
699
- bottom: A()
699
+ bottom: S()
700
700
  }],
701
701
  /**
702
702
  * Left
703
703
  * @see https://tailwindcss.com/docs/top-right-bottom-left
704
704
  */
705
705
  left: [{
706
- left: A()
706
+ left: S()
707
707
  }],
708
708
  /**
709
709
  * Visibility
@@ -715,7 +715,7 @@ const Qe = (e, r) => {
715
715
  * @see https://tailwindcss.com/docs/z-index
716
716
  */
717
717
  z: [{
718
- z: [I, "auto", n, s]
718
+ z: [N, "auto", n, s]
719
719
  }],
720
720
  // ------------------------
721
721
  // --- Flexbox and Grid ---
@@ -725,7 +725,7 @@ const Qe = (e, r) => {
725
725
  * @see https://tailwindcss.com/docs/flex-basis
726
726
  */
727
727
  basis: [{
728
- basis: [O, "full", "auto", m, ...p()]
728
+ basis: [L, "full", "auto", m, ...p()]
729
729
  }],
730
730
  /**
731
731
  * Flex Direction
@@ -746,7 +746,7 @@ const Qe = (e, r) => {
746
746
  * @see https://tailwindcss.com/docs/flex
747
747
  */
748
748
  flex: [{
749
- flex: [u, O, "auto", "initial", "none", s]
749
+ flex: [u, L, "auto", "initial", "none", s]
750
750
  }],
751
751
  /**
752
752
  * Flex Grow
@@ -767,7 +767,7 @@ const Qe = (e, r) => {
767
767
  * @see https://tailwindcss.com/docs/order
768
768
  */
769
769
  order: [{
770
- order: [I, "first", "last", "none", n, s]
770
+ order: [N, "first", "last", "none", n, s]
771
771
  }],
772
772
  /**
773
773
  * Grid Template Columns
@@ -788,14 +788,14 @@ const Qe = (e, r) => {
788
788
  * @see https://tailwindcss.com/docs/grid-column
789
789
  */
790
790
  "col-start": [{
791
- "col-start": U()
791
+ "col-start": B()
792
792
  }],
793
793
  /**
794
794
  * Grid Column End
795
795
  * @see https://tailwindcss.com/docs/grid-column
796
796
  */
797
797
  "col-end": [{
798
- "col-end": U()
798
+ "col-end": B()
799
799
  }],
800
800
  /**
801
801
  * Grid Template Rows
@@ -816,14 +816,14 @@ const Qe = (e, r) => {
816
816
  * @see https://tailwindcss.com/docs/grid-row
817
817
  */
818
818
  "row-start": [{
819
- "row-start": U()
819
+ "row-start": B()
820
820
  }],
821
821
  /**
822
822
  * Grid Row End
823
823
  * @see https://tailwindcss.com/docs/grid-row
824
824
  */
825
825
  "row-end": [{
826
- "row-end": U()
826
+ "row-end": B()
827
827
  }],
828
828
  /**
829
829
  * Grid Auto Flow
@@ -879,14 +879,14 @@ const Qe = (e, r) => {
879
879
  * @see https://tailwindcss.com/docs/justify-items
880
880
  */
881
881
  "justify-items": [{
882
- "justify-items": [...L(), "normal"]
882
+ "justify-items": [...G(), "normal"]
883
883
  }],
884
884
  /**
885
885
  * Justify Self
886
886
  * @see https://tailwindcss.com/docs/justify-self
887
887
  */
888
888
  "justify-self": [{
889
- "justify-self": ["auto", ...L()]
889
+ "justify-self": ["auto", ...G()]
890
890
  }],
891
891
  /**
892
892
  * Align Content
@@ -900,7 +900,7 @@ const Qe = (e, r) => {
900
900
  * @see https://tailwindcss.com/docs/align-items
901
901
  */
902
902
  "align-items": [{
903
- items: [...L(), {
903
+ items: [...G(), {
904
904
  baseline: ["", "last"]
905
905
  }]
906
906
  }],
@@ -909,7 +909,7 @@ const Qe = (e, r) => {
909
909
  * @see https://tailwindcss.com/docs/align-self
910
910
  */
911
911
  "align-self": [{
912
- self: ["auto", ...L(), {
912
+ self: ["auto", ...G(), {
913
913
  baseline: ["", "last"]
914
914
  }]
915
915
  }],
@@ -925,14 +925,14 @@ const Qe = (e, r) => {
925
925
  * @see https://tailwindcss.com/docs/place-items
926
926
  */
927
927
  "place-items": [{
928
- "place-items": [...L(), "baseline"]
928
+ "place-items": [...G(), "baseline"]
929
929
  }],
930
930
  /**
931
931
  * Place Self
932
932
  * @see https://tailwindcss.com/docs/place-self
933
933
  */
934
934
  "place-self": [{
935
- "place-self": ["auto", ...L()]
935
+ "place-self": ["auto", ...G()]
936
936
  }],
937
937
  // Spacing
938
938
  /**
@@ -1003,63 +1003,63 @@ const Qe = (e, r) => {
1003
1003
  * @see https://tailwindcss.com/docs/margin
1004
1004
  */
1005
1005
  m: [{
1006
- m: S()
1006
+ m: R()
1007
1007
  }],
1008
1008
  /**
1009
1009
  * Margin X
1010
1010
  * @see https://tailwindcss.com/docs/margin
1011
1011
  */
1012
1012
  mx: [{
1013
- mx: S()
1013
+ mx: R()
1014
1014
  }],
1015
1015
  /**
1016
1016
  * Margin Y
1017
1017
  * @see https://tailwindcss.com/docs/margin
1018
1018
  */
1019
1019
  my: [{
1020
- my: S()
1020
+ my: R()
1021
1021
  }],
1022
1022
  /**
1023
1023
  * Margin Start
1024
1024
  * @see https://tailwindcss.com/docs/margin
1025
1025
  */
1026
1026
  ms: [{
1027
- ms: S()
1027
+ ms: R()
1028
1028
  }],
1029
1029
  /**
1030
1030
  * Margin End
1031
1031
  * @see https://tailwindcss.com/docs/margin
1032
1032
  */
1033
1033
  me: [{
1034
- me: S()
1034
+ me: R()
1035
1035
  }],
1036
1036
  /**
1037
1037
  * Margin Top
1038
1038
  * @see https://tailwindcss.com/docs/margin
1039
1039
  */
1040
1040
  mt: [{
1041
- mt: S()
1041
+ mt: R()
1042
1042
  }],
1043
1043
  /**
1044
1044
  * Margin Right
1045
1045
  * @see https://tailwindcss.com/docs/margin
1046
1046
  */
1047
1047
  mr: [{
1048
- mr: S()
1048
+ mr: R()
1049
1049
  }],
1050
1050
  /**
1051
1051
  * Margin Bottom
1052
1052
  * @see https://tailwindcss.com/docs/margin
1053
1053
  */
1054
1054
  mb: [{
1055
- mb: S()
1055
+ mb: R()
1056
1056
  }],
1057
1057
  /**
1058
1058
  * Margin Left
1059
1059
  * @see https://tailwindcss.com/docs/margin
1060
1060
  */
1061
1061
  ml: [{
1062
- ml: S()
1062
+ ml: R()
1063
1063
  }],
1064
1064
  /**
1065
1065
  * Space Between X
@@ -1093,14 +1093,14 @@ const Qe = (e, r) => {
1093
1093
  * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
1094
1094
  */
1095
1095
  size: [{
1096
- size: N()
1096
+ size: O()
1097
1097
  }],
1098
1098
  /**
1099
1099
  * Width
1100
1100
  * @see https://tailwindcss.com/docs/width
1101
1101
  */
1102
1102
  w: [{
1103
- w: [m, "screen", ...N()]
1103
+ w: [m, "screen", ...O()]
1104
1104
  }],
1105
1105
  /**
1106
1106
  * Min-Width
@@ -1112,7 +1112,7 @@ const Qe = (e, r) => {
1112
1112
  "screen",
1113
1113
  /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1114
1114
  "none",
1115
- ...N()
1115
+ ...O()
1116
1116
  ]
1117
1117
  }],
1118
1118
  /**
@@ -1130,7 +1130,7 @@ const Qe = (e, r) => {
1130
1130
  {
1131
1131
  screen: [i]
1132
1132
  },
1133
- ...N()
1133
+ ...O()
1134
1134
  ]
1135
1135
  }],
1136
1136
  /**
@@ -1138,21 +1138,21 @@ const Qe = (e, r) => {
1138
1138
  * @see https://tailwindcss.com/docs/height
1139
1139
  */
1140
1140
  h: [{
1141
- h: ["screen", "lh", ...N()]
1141
+ h: ["screen", "lh", ...O()]
1142
1142
  }],
1143
1143
  /**
1144
1144
  * Min-Height
1145
1145
  * @see https://tailwindcss.com/docs/min-height
1146
1146
  */
1147
1147
  "min-h": [{
1148
- "min-h": ["screen", "lh", "none", ...N()]
1148
+ "min-h": ["screen", "lh", "none", ...O()]
1149
1149
  }],
1150
1150
  /**
1151
1151
  * Max-Height
1152
1152
  * @see https://tailwindcss.com/docs/max-height
1153
1153
  */
1154
1154
  "max-h": [{
1155
- "max-h": ["screen", "lh", ...N()]
1155
+ "max-h": ["screen", "lh", ...O()]
1156
1156
  }],
1157
1157
  // ------------------
1158
1158
  // --- Typography ---
@@ -1162,7 +1162,7 @@ const Qe = (e, r) => {
1162
1162
  * @see https://tailwindcss.com/docs/font-size
1163
1163
  */
1164
1164
  "font-size": [{
1165
- text: ["base", t, B, j]
1165
+ text: ["base", t, U, T]
1166
1166
  }],
1167
1167
  /**
1168
1168
  * Font Smoothing
@@ -1193,7 +1193,7 @@ const Qe = (e, r) => {
1193
1193
  * @see https://tailwindcss.com/docs/font-family
1194
1194
  */
1195
1195
  "font-family": [{
1196
- font: [Gt, s, r]
1196
+ font: [Pt, s, r]
1197
1197
  }],
1198
1198
  /**
1199
1199
  * Font Variant Numeric
@@ -1310,7 +1310,7 @@ const Qe = (e, r) => {
1310
1310
  * @see https://tailwindcss.com/docs/text-decoration-thickness
1311
1311
  */
1312
1312
  "text-decoration-thickness": [{
1313
- decoration: [u, "from-font", "auto", n, j]
1313
+ decoration: [u, "from-font", "auto", n, T]
1314
1314
  }],
1315
1315
  /**
1316
1316
  * Text Decoration Color
@@ -1445,10 +1445,10 @@ const Qe = (e, r) => {
1445
1445
  bg: ["none", {
1446
1446
  linear: [{
1447
1447
  to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1448
- }, I, n, s],
1448
+ }, N, n, s],
1449
1449
  radial: ["", n, s],
1450
- conic: [I, n, s]
1451
- }, Lt, jt]
1450
+ conic: [N, n, s]
1451
+ }, Gt, Tt]
1452
1452
  }],
1453
1453
  /**
1454
1454
  * Background Color
@@ -1797,7 +1797,7 @@ const Qe = (e, r) => {
1797
1797
  * @see https://tailwindcss.com/docs/outline-width
1798
1798
  */
1799
1799
  "outline-w": [{
1800
- outline: ["", u, B, j]
1800
+ outline: ["", u, U, T]
1801
1801
  }],
1802
1802
  /**
1803
1803
  * Outline Color
@@ -1872,7 +1872,7 @@ const Qe = (e, r) => {
1872
1872
  * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
1873
1873
  */
1874
1874
  "ring-offset-w": [{
1875
- "ring-offset": [u, j]
1875
+ "ring-offset": [u, T]
1876
1876
  }],
1877
1877
  /**
1878
1878
  * Ring Offset Color
@@ -2062,7 +2062,7 @@ const Qe = (e, r) => {
2062
2062
  }]
2063
2063
  }],
2064
2064
  "mask-image-radial-pos": [{
2065
- "mask-radial-at": G()
2065
+ "mask-radial-at": P()
2066
2066
  }],
2067
2067
  "mask-image-conic-pos": [{
2068
2068
  "mask-conic": [u]
@@ -2174,7 +2174,7 @@ const Qe = (e, r) => {
2174
2174
  // Deprecated since Tailwind CSS v4.0.0
2175
2175
  "",
2176
2176
  "none",
2177
- z,
2177
+ C,
2178
2178
  Z,
2179
2179
  X
2180
2180
  ]
@@ -2371,7 +2371,7 @@ const Qe = (e, r) => {
2371
2371
  * @see https://tailwindcss.com/docs/transition-timing-function
2372
2372
  */
2373
2373
  ease: [{
2374
- ease: ["linear", "initial", P, n, s]
2374
+ ease: ["linear", "initial", E, n, s]
2375
2375
  }],
2376
2376
  /**
2377
2377
  * Transition Delay
@@ -2402,14 +2402,14 @@ const Qe = (e, r) => {
2402
2402
  * @see https://tailwindcss.com/docs/perspective
2403
2403
  */
2404
2404
  perspective: [{
2405
- perspective: [C, n, s]
2405
+ perspective: [z, n, s]
2406
2406
  }],
2407
2407
  /**
2408
2408
  * Perspective Origin
2409
2409
  * @see https://tailwindcss.com/docs/perspective-origin
2410
2410
  */
2411
2411
  "perspective-origin": [{
2412
- "perspective-origin": T()
2412
+ "perspective-origin": j()
2413
2413
  }],
2414
2414
  /**
2415
2415
  * Rotate
@@ -2444,28 +2444,28 @@ const Qe = (e, r) => {
2444
2444
  * @see https://tailwindcss.com/docs/scale
2445
2445
  */
2446
2446
  scale: [{
2447
- scale: Y()
2447
+ scale: q()
2448
2448
  }],
2449
2449
  /**
2450
2450
  * Scale X
2451
2451
  * @see https://tailwindcss.com/docs/scale
2452
2452
  */
2453
2453
  "scale-x": [{
2454
- "scale-x": Y()
2454
+ "scale-x": q()
2455
2455
  }],
2456
2456
  /**
2457
2457
  * Scale Y
2458
2458
  * @see https://tailwindcss.com/docs/scale
2459
2459
  */
2460
2460
  "scale-y": [{
2461
- "scale-y": Y()
2461
+ "scale-y": q()
2462
2462
  }],
2463
2463
  /**
2464
2464
  * Scale Z
2465
2465
  * @see https://tailwindcss.com/docs/scale
2466
2466
  */
2467
2467
  "scale-z": [{
2468
- "scale-z": Y()
2468
+ "scale-z": q()
2469
2469
  }],
2470
2470
  /**
2471
2471
  * Scale 3D
@@ -2505,7 +2505,7 @@ const Qe = (e, r) => {
2505
2505
  * @see https://tailwindcss.com/docs/transform-origin
2506
2506
  */
2507
2507
  "transform-origin": [{
2508
- origin: T()
2508
+ origin: j()
2509
2509
  }],
2510
2510
  /**
2511
2511
  * Transform Style
@@ -2519,28 +2519,28 @@ const Qe = (e, r) => {
2519
2519
  * @see https://tailwindcss.com/docs/translate
2520
2520
  */
2521
2521
  translate: [{
2522
- translate: q()
2522
+ translate: Y()
2523
2523
  }],
2524
2524
  /**
2525
2525
  * Translate X
2526
2526
  * @see https://tailwindcss.com/docs/translate
2527
2527
  */
2528
2528
  "translate-x": [{
2529
- "translate-x": q()
2529
+ "translate-x": Y()
2530
2530
  }],
2531
2531
  /**
2532
2532
  * Translate Y
2533
2533
  * @see https://tailwindcss.com/docs/translate
2534
2534
  */
2535
2535
  "translate-y": [{
2536
- "translate-y": q()
2536
+ "translate-y": Y()
2537
2537
  }],
2538
2538
  /**
2539
2539
  * Translate Z
2540
2540
  * @see https://tailwindcss.com/docs/translate
2541
2541
  */
2542
2542
  "translate-z": [{
2543
- "translate-z": q()
2543
+ "translate-z": Y()
2544
2544
  }],
2545
2545
  /**
2546
2546
  * Translate None
@@ -2822,7 +2822,7 @@ const Qe = (e, r) => {
2822
2822
  * @see https://tailwindcss.com/docs/stroke-width
2823
2823
  */
2824
2824
  "stroke-w": [{
2825
- stroke: [u, B, j, oe]
2825
+ stroke: [u, U, T, oe]
2826
2826
  }],
2827
2827
  /**
2828
2828
  * Stroke
@@ -2897,20 +2897,20 @@ const Qe = (e, r) => {
2897
2897
  },
2898
2898
  orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
2899
2899
  };
2900
- }, _t = /* @__PURE__ */ yt(Ft);
2901
- function Wt(...e) {
2902
- return _t(Ke(e));
2900
+ }, Wt = /* @__PURE__ */ yt(Ft);
2901
+ function _t(...e) {
2902
+ return Wt(Ke(e));
2903
2903
  }
2904
2904
  function rr(e) {
2905
2905
  throw new Error(`Unexpected value: ${e}`);
2906
2906
  }
2907
- const Bt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), $t = (e) => e.replace(
2907
+ const Ut = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), $t = (e) => e.replace(
2908
2908
  /^([A-Z])|[\s-_]+(\w)/g,
2909
2909
  (r, t, o) => o ? o.toUpperCase() : t.toLowerCase()
2910
2910
  ), ve = (e) => {
2911
2911
  const r = $t(e);
2912
2912
  return r.charAt(0).toUpperCase() + r.slice(1);
2913
- }, Ve = (...e) => e.filter((r, t, o) => !!r && r.trim() !== "" && o.indexOf(r) === t).join(" ").trim(), Ut = (e) => {
2913
+ }, Ve = (...e) => e.filter((r, t, o) => !!r && r.trim() !== "" && o.indexOf(r) === t).join(" ").trim(), Bt = (e) => {
2914
2914
  for (const r in e)
2915
2915
  if (r.startsWith("aria-") || r === "role" || r === "title")
2916
2916
  return !0;
@@ -2946,7 +2946,7 @@ const Jt = Ce(
2946
2946
  stroke: e,
2947
2947
  strokeWidth: o ? Number(t) * 24 / Number(r) : t,
2948
2948
  className: Ve("lucide", a),
2949
- ...!l && !Ut(m) && { "aria-hidden": "true" },
2949
+ ...!l && !Bt(m) && { "aria-hidden": "true" },
2950
2950
  ...m
2951
2951
  },
2952
2952
  [
@@ -2955,13 +2955,13 @@ const Jt = Ce(
2955
2955
  ]
2956
2956
  )
2957
2957
  );
2958
- const Yt = (e, r) => {
2958
+ const qt = (e, r) => {
2959
2959
  const t = Ce(
2960
2960
  ({ className: o, ...a }, l) => se(Jt, {
2961
2961
  ref: l,
2962
2962
  iconNode: r,
2963
2963
  className: Ve(
2964
- `lucide-${Bt(ve(e))}`,
2964
+ `lucide-${Ut(ve(e))}`,
2965
2965
  `lucide-${e}`,
2966
2966
  o
2967
2967
  ),
@@ -2970,27 +2970,37 @@ const Yt = (e, r) => {
2970
2970
  );
2971
2971
  return t.displayName = ve(e), t;
2972
2972
  };
2973
- const qt = [
2973
+ const Yt = [
2974
2974
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
2975
2975
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
2976
2976
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
2977
- ], Xt = Yt("circle-alert", qt), Zt = ({ code: e }) => {
2978
- const r = $e(({ message: f }) => f), t = We(null), [o, a] = be(!0), [l, i] = be(null), m = r.status?.type === "complete", c = He(), g = Xe();
2979
- return Be(() => {
2977
+ ], Xt = qt("circle-alert", Yt), Zt = ({ code: e }) => {
2978
+ const r = $e(({ message: f }) => f), t = _e(null), [o, a] = be(!0), [l, i] = be(null), m = r.status?.type === "complete", c = He(), g = Xe();
2979
+ return Ue(() => {
2980
2980
  if (!m || !t.current)
2981
2981
  return;
2982
2982
  let f = null;
2983
2983
  return (async () => {
2984
2984
  try {
2985
- const x = JSON.parse(e), z = Ue(x);
2986
- f = new De(z, {
2985
+ let x;
2986
+ try {
2987
+ x = JSON.parse(e);
2988
+ } catch (A) {
2989
+ throw new Error(
2990
+ `Invalid JSON syntax: ${A instanceof Error ? A.message : "Unable to parse"}`
2991
+ );
2992
+ }
2993
+ const C = Be(x);
2994
+ f = new De(C, {
2987
2995
  container: t.current ?? void 0,
2988
2996
  renderer: "svg",
2989
2997
  hover: !0,
2990
2998
  logLevel: Je
2991
2999
  }), await f.runAsync(), a(!1);
2992
3000
  } catch (x) {
2993
- console.error("Failed to render chart:", x), i(x instanceof Error ? x.message : "Failed to render chart"), a(!1);
3001
+ console.error("Failed to render chart:", x);
3002
+ const C = x instanceof Error ? x.message : "Failed to render chart";
3003
+ i(C), a(!1);
2994
3004
  }
2995
3005
  })(), () => {
2996
3006
  f && f.finalize();
@@ -2998,9 +3008,9 @@ const qt = [
2998
3008
  }, [m, e]), /* @__PURE__ */ fe(
2999
3009
  "div",
3000
3010
  {
3001
- className: Wt(
3011
+ className: _t(
3002
3012
  // the after:hidden is to prevent assistant-ui from showing its default code block loading indicator
3003
- "relative flex min-h-[400px] max-w-xl min-w-[400px] items-center justify-center border p-6 after:hidden",
3013
+ "relative flex min-h-[400px] w-fit max-w-full min-w-[400px] items-center justify-center border p-6 after:hidden",
3004
3014
  c("lg"),
3005
3015
  g("p-lg")
3006
3016
  ),
@@ -3022,20 +3032,31 @@ const qt = [
3022
3032
  );
3023
3033
  }, Ht = {
3024
3034
  language: "vega",
3025
- prompt: `If a user asks for a chart of any kind or visualization, return only a Vega spec in JSON format (https://vega.github.io/vega/) code block with the language 'vega'.
3026
-
3027
- Rather than describing the visual properties of the chart, instead describe what trends are found in the data.
3028
-
3029
- Make sure that the Vega spec JSON is valid and doesn't include any comments.`,
3035
+ prompt: `When a user requests a chart or visualization, respond with a valid Vega specification (https://vega.github.io/vega/) in a code block with language 'vega'.
3036
+
3037
+ CRITICAL JSON REQUIREMENTS:
3038
+ - The code block MUST contain ONLY valid, parseable JSON
3039
+ - NO comments (no // or /* */ anywhere)
3040
+ - NO trailing commas
3041
+ - Use double quotes for all strings and keys
3042
+ - NO text before or after the JSON object
3043
+ - The JSON must start with { and end with }
3044
+
3045
+ CONTENT GUIDELINES:
3046
+ - Outside the code block, describe trends and insights found in the data
3047
+ - Do not describe visual properties or technical implementation details
3048
+ - Do not mention "Vega" or other technical terms - this is user-facing
3049
+
3050
+ The Vega spec will be parsed with JSON.parse() - if it fails, the chart will error. Ensure strict JSON validity.`,
3030
3051
  Component: Zt,
3031
3052
  Header: void 0
3032
3053
  }, or = [Ht];
3033
3054
  export {
3034
3055
  Xt as C,
3035
- Ye as E,
3056
+ qe as E,
3036
3057
  Ke as a,
3037
- Wt as b,
3038
- Yt as c,
3058
+ _t as b,
3059
+ qt as c,
3039
3060
  Xe as d,
3040
3061
  He as e,
3041
3062
  rr as f,