@versini/sassysaint 8.121.0 → 8.121.1

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 (84) hide show
  1. package/dist/chunks/{AboutChangelog.BEMLUbae.js → AboutChangelog.CueW7QKj.js} +2 -2
  2. package/dist/chunks/{AboutEntry.BP20V5kd.js → AboutEntry.dQ_4JNsz.js} +7 -7
  3. package/dist/chunks/{App.C4nxPutS.js → App.6iDkXSOb.js} +16 -16
  4. package/dist/chunks/{BubbleActions.C8c4YvcJ.js → BubbleActions.DB_SDTs9.js} +3 -3
  5. package/dist/chunks/ButtonIconDelete.B3hYKTP6.js +668 -0
  6. package/dist/chunks/{Chart.UpIl99Mp.js → Chart.m2plpxTN.js} +2 -2
  7. package/dist/chunks/{ChatBubbleAssistant.SZMMe-ds.js → ChatBubbleAssistant.DhP5KHH7.js} +5 -5
  8. package/dist/chunks/{ChatBubbleUser.CoUxF7fg.js → ChatBubbleUser.DythvYOo.js} +4 -4
  9. package/dist/chunks/HistoryEntry._G88vZeP.js +721 -0
  10. package/dist/chunks/{LoginEntry.B_hnp3kn.js → LoginEntry.BBF4_rEV.js} +4 -4
  11. package/dist/chunks/{LogoEntry.D5pr7J7L.js → LogoEntry.BtwLANob.js} +1 -1
  12. package/dist/chunks/{MemoriesEntry.CmCC7oIt.js → MemoriesEntry.r2Wtd8nu.js} +34 -35
  13. package/dist/chunks/{ProfileEntry.DD6EWAdg.js → ProfileEntry.DwGmWxH2.js} +4 -4
  14. package/dist/chunks/{SettingsEntry.D2vkhDVP.js → SettingsEntry.D7b4vTwv.js} +5 -5
  15. package/dist/chunks/{UsageEntry.CPwTEetP.js → UsageEntry.BB5KalRi.js} +5 -5
  16. package/dist/chunks/{_baseUniq.CoZJjsf4.js → _baseUniq.22z3R--R.js} +1 -1
  17. package/dist/chunks/{arc.DCa0ktHo.js → arc.Cg0BJN6o.js} +1 -1
  18. package/dist/chunks/{architecture-U656AL7Q.jPKmAcqF.js → architecture-U656AL7Q.D7Nmp0uq.js} +1 -1
  19. package/dist/chunks/{architectureDiagram-VXUJARFQ.De0i9yVs.js → architectureDiagram-VXUJARFQ.D58LaEiy.js} +4 -4
  20. package/dist/chunks/{blockDiagram-VD42YOAC.C_-0tieR.js → blockDiagram-VD42YOAC.BS_n-q2N.js} +5 -5
  21. package/dist/chunks/{browser.CHnC-ta2.js → browser.YA6spcA7.js} +1 -1
  22. package/dist/chunks/{c4Diagram-YG6GDRKO.BsCj771T.js → c4Diagram-YG6GDRKO.lVOg2-ZH.js} +2 -2
  23. package/dist/chunks/{channel.BMmrJgu1.js → channel.DqxR-oS7.js} +1 -1
  24. package/dist/chunks/{chunk-4BX2VUAB.PHnk2h7S.js → chunk-4BX2VUAB.D5lbe9g-.js} +1 -1
  25. package/dist/chunks/{chunk-55IACEB6.DO1lSVjK.js → chunk-55IACEB6.BlgGY9Q6.js} +1 -1
  26. package/dist/chunks/{chunk-B4BG7PRW.DWoXKkeu.js → chunk-B4BG7PRW.Bn-86p3H.js} +4 -4
  27. package/dist/chunks/{chunk-DI55MBZ5.AFC0J_hR.js → chunk-DI55MBZ5.C2fqe7wu.js} +3 -3
  28. package/dist/chunks/{chunk-FMBD7UC4.MibDfgHx.js → chunk-FMBD7UC4.8IJZbT_o.js} +1 -1
  29. package/dist/chunks/{chunk-QN33PNHL.Cc4-mgjY.js → chunk-QN33PNHL.DOV2bTYS.js} +1 -1
  30. package/dist/chunks/{chunk-QZHKN3VN.JSlC3cS6.js → chunk-QZHKN3VN.CM1K8z3e.js} +1 -1
  31. package/dist/chunks/{chunk-TZMSLE5B.DwO6_k9Q.js → chunk-TZMSLE5B.CH_b17FM.js} +1 -1
  32. package/dist/chunks/{classDiagram-2ON5EDUG.DTLG4V26.js → classDiagram-2ON5EDUG.DeWSBBaZ.js} +2 -2
  33. package/dist/chunks/{classDiagram-v2-WZHVMYZB.DTLG4V26.js → classDiagram-v2-WZHVMYZB.DeWSBBaZ.js} +2 -2
  34. package/dist/chunks/{clone.DKF4uk6r.js → clone.B0TtmQHA.js} +1 -1
  35. package/dist/chunks/{cose-bilkent-S5V4N54A.VviytYtj.js → cose-bilkent-S5V4N54A.IzOlhIoo.js} +2 -2
  36. package/dist/chunks/{dagre-6UL2VRFP.BnyaaYxG.js → dagre-6UL2VRFP.COZ3hsXn.js} +5 -5
  37. package/dist/chunks/{diagram-PSM6KHXK._9uw_Asg.js → diagram-PSM6KHXK.JEnBJXhp.js} +4 -4
  38. package/dist/chunks/{diagram-QEK2KX5R.D8fcj4HF.js → diagram-QEK2KX5R.Bb3EEO2D.js} +3 -3
  39. package/dist/chunks/{diagram-S2PKOQOG.dRyHvEKp.js → diagram-S2PKOQOG.B_aUDr5F.js} +3 -3
  40. package/dist/chunks/{erDiagram-Q2GNP2WA.C1BZ7IIw.js → erDiagram-Q2GNP2WA.CYpL6V9w.js} +4 -4
  41. package/dist/chunks/{flowDiagram-NV44I4VS.DGv1Di7m.js → flowDiagram-NV44I4VS.CF9-8TaP.js} +5 -5
  42. package/dist/chunks/{ganttDiagram-JELNMOA3.BxWIrV3k.js → ganttDiagram-JELNMOA3.CdE8GB2s.js} +2 -2
  43. package/dist/chunks/{gitGraph-F6HP7TQM.XlxG37gi.js → gitGraph-F6HP7TQM.BWmUmcZV.js} +1 -1
  44. package/dist/chunks/{gitGraphDiagram-NY62KEGX.C6IZCfaV.js → gitGraphDiagram-NY62KEGX.Cn0Cu7Ww.js} +4 -4
  45. package/dist/chunks/{graph.sJUgf4to.js → graph.B0nity3n.js} +2 -2
  46. package/dist/chunks/{index.dU_uFcp3.js → index.Biab5cek.js} +1 -1
  47. package/dist/chunks/{index.PkMUAYHK.js → index.BkSC8d7B.js} +3 -3
  48. package/dist/chunks/{index.CogeyeP6.js → index.C2WmpF2e.js} +1 -1
  49. package/dist/chunks/{index.DiX9H7xn.js → index.CAuXCAe5.js} +1 -1
  50. package/dist/chunks/{index.vVEbZqrY.js → index.CJxTPes-.js} +1 -1
  51. package/dist/chunks/{index.BK010vU3.js → index.Ci5e_98Z.js} +3 -3
  52. package/dist/chunks/{index.CFUvysz5.js → index.D3dY6con.js} +1 -1
  53. package/dist/chunks/{index.B9oaH0MK.js → index.D_0HoqM8.js} +1 -1
  54. package/dist/chunks/{index.BztNm3SQ.js → index.Ds4-4dzy.js} +2 -2
  55. package/dist/chunks/{info-NVLQJR56.CB1yFEh0.js → info-NVLQJR56.DfoQxnaP.js} +1 -1
  56. package/dist/chunks/{infoDiagram-WHAUD3N6.C-F2hnF3.js → infoDiagram-WHAUD3N6.CbDQCj4t.js} +2 -2
  57. package/dist/chunks/{journeyDiagram-XKPGCS4Q.BOGagEe6.js → journeyDiagram-XKPGCS4Q.BGwMjBf9.js} +4 -4
  58. package/dist/chunks/{kanban-definition-3W4ZIXB7.DRixYBgm.js → kanban-definition-3W4ZIXB7.CS-TV1ji.js} +2 -2
  59. package/dist/chunks/{layout.NBNj8tNt.js → layout.DKjnDekM.js} +4 -4
  60. package/dist/chunks/{mermaid-parser.core.WUAPU6bl.js → mermaid-parser.core.CBflstHb.js} +10 -10
  61. package/dist/chunks/{min.pcif1d-R.js → min.eDGqv0vt.js} +2 -2
  62. package/dist/chunks/{mindmap-definition-VGOIOE7T.BoB_83-j.js → mindmap-definition-VGOIOE7T.GckYx6Fd.js} +3 -3
  63. package/dist/chunks/{packet-BFZMPI3H.obdUPGmt.js → packet-BFZMPI3H.DzGbdOiU.js} +1 -1
  64. package/dist/chunks/{pie-7BOR55EZ.CULyWvsL.js → pie-7BOR55EZ.CRxLvxJh.js} +1 -1
  65. package/dist/chunks/{pieDiagram-ADFJNKIX.cAhdeEuZ.js → pieDiagram-ADFJNKIX.BuekQ8o8.js} +4 -4
  66. package/dist/chunks/{quadrantDiagram-AYHSOK5B.BzL8QKyn.js → quadrantDiagram-AYHSOK5B.Cz1W80fL.js} +1 -1
  67. package/dist/chunks/{radar-NHE76QYJ.CGQJLLyR.js → radar-NHE76QYJ.D_eJ0pAQ.js} +1 -1
  68. package/dist/chunks/{rehype-mermaid.CEYn3QGz.js → rehype-mermaid.C6vWaLbm.js} +33 -33
  69. package/dist/chunks/{requirementDiagram-UZGBJVZJ.HEMcLvIC.js → requirementDiagram-UZGBJVZJ.D29ENfNv.js} +3 -3
  70. package/dist/chunks/{sankeyDiagram-TZEHDZUN.DHbrhGCv.js → sankeyDiagram-TZEHDZUN.BkA8zy0e.js} +1 -1
  71. package/dist/chunks/{sequenceDiagram-WL72ISMW.DWButQpu.js → sequenceDiagram-WL72ISMW.CohhptW1.js} +3 -3
  72. package/dist/chunks/{stateDiagram-FKZM4ZOC.CBFgulEf.js → stateDiagram-FKZM4ZOC.DXcdl9T3.js} +4 -4
  73. package/dist/chunks/{stateDiagram-v2-4FDKWEC3.DEk41WUx.js → stateDiagram-v2-4FDKWEC3.CyTSxcZ6.js} +2 -2
  74. package/dist/chunks/{timeline-definition-IT6M3QCI.eEEdc2b2.js → timeline-definition-IT6M3QCI.BvhsFWgy.js} +2 -2
  75. package/dist/chunks/{treemap-KMMF4GRG.DRjxIKwf.js → treemap-KMMF4GRG.DdhwEUUj.js} +1 -1
  76. package/dist/chunks/{useMarkdown.DxjQgTku.js → useMarkdown.CdWXCETb.js} +8 -8
  77. package/dist/chunks/{xychartDiagram-PRI3JC2R.DoDDE7QI.js → xychartDiagram-PRI3JC2R.vlO9NN_Y.js} +1 -1
  78. package/dist/components/SassySaint/SassySaint.js +1 -1
  79. package/dist/index.js +3 -3
  80. package/package.json +3 -3
  81. package/dist/chunks/ButtonIconDelete.CLpIgJ17.js +0 -550
  82. package/dist/chunks/HistoryDataGrid.BNOeaUQd.js +0 -445
  83. package/dist/chunks/HistoryEntry.CvshPCHz.js +0 -293
  84. package/dist/chunks/InlineFilter.C_2kmBp0.js +0 -123
@@ -1,8 +1,8 @@
1
1
  import { jsx as ge, jsxs as _n, Fragment as et } from "react/jsx-runtime";
2
- import { ButtonIcon as Rr, IconCopied as vr, IconCopy as Dr } from "./LogoEntry.D5pr7J7L.js";
2
+ import { ButtonIcon as Rr, IconCopied as vr, IconCopy as Dr } from "./LogoEntry.BtwLANob.js";
3
3
  import { useState as Ut, useEffect as jt, useCallback as Mn, useRef as Ae, createElement as Fr } from "react";
4
- import { getDefaultExportFromCjs as $t, unObfuscate as Or, obfuscate as Br } from "./App.C4nxPutS.js";
5
- import { isTauri as Ht } from "./index.BztNm3SQ.js";
4
+ import { getDefaultExportFromCjs as $t, unObfuscate as Or, obfuscate as Br } from "./App.6iDkXSOb.js";
5
+ import { isTauri as Ht } from "./index.Ds4-4dzy.js";
6
6
  function Ur({ copyToClipboard: e, ref: n, ...t }) {
7
7
  const [r, i] = Ut(!1), l = () => {
8
8
  typeof e == "string" && (navigator.clipboard.writeText(e), i(!0)), typeof e == "function" && (navigator.clipboard.writeText(e()), i(!0));
@@ -7243,7 +7243,7 @@ class Xu {
7243
7243
  if (!this.rehypeMermaid) {
7244
7244
  const { default: n } = await import(
7245
7245
  /* webpackChunkName: "md-rehype-mermaid" */
7246
- "./rehype-mermaid.CEYn3QGz.js"
7246
+ "./rehype-mermaid.C6vWaLbm.js"
7247
7247
  ).then((t) => t.rehypeMermaid);
7248
7248
  this.rehypeMermaid = n;
7249
7249
  }
@@ -7253,7 +7253,7 @@ class Xu {
7253
7253
  if (!this.remarkGfm) {
7254
7254
  const { default: n } = await import(
7255
7255
  /* webpackChunkName: "md-remark" */
7256
- "./index.dU_uFcp3.js"
7256
+ "./index.Biab5cek.js"
7257
7257
  );
7258
7258
  this.remarkGfm = n;
7259
7259
  }
@@ -7264,7 +7264,7 @@ class Xu {
7264
7264
  Zu("https://cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.css");
7265
7265
  const { default: n } = await import(
7266
7266
  /* webpackChunkName: "md-rehype-katex" */
7267
- "./index.BK010vU3.js"
7267
+ "./index.Ci5e_98Z.js"
7268
7268
  );
7269
7269
  this.rehypeKatex = n;
7270
7270
  }
@@ -7274,7 +7274,7 @@ class Xu {
7274
7274
  if (!this.remarkMath) {
7275
7275
  const { default: n } = await import(
7276
7276
  /* webpackChunkName: "md-remark" */
7277
- "./index.CFUvysz5.js"
7277
+ "./index.D3dY6con.js"
7278
7278
  );
7279
7279
  this.remarkMath = n;
7280
7280
  }
@@ -7284,7 +7284,7 @@ class Xu {
7284
7284
  if (!this.rehypeHighlight) {
7285
7285
  const { default: n } = await import(
7286
7286
  /* webpackChunkName: "md-rehype-highlight" */
7287
- "./index.PkMUAYHK.js"
7287
+ "./index.BkSC8d7B.js"
7288
7288
  );
7289
7289
  this.rehypeHighlight = n;
7290
7290
  }
@@ -1,4 +1,4 @@
1
- import { __name as a, setAccDescription as gi, getAccDescription as xi, getDiagramTitle as Xt, setDiagramTitle as di, getAccTitle as fi, setAccTitle as pi, log as Nt, selectSvgElement as mi, configureSvgSize as yi, clear as bi, getConfig as St, cleanAndMerge as Yt, defaultConfig_default as Ai, getThemeVariables3 as wi, sanitizeText as Ci, computeDimensionOfText as Si, line as Wt } from "./rehype-mermaid.CEYn3QGz.js";
1
+ import { __name as a, setAccDescription as gi, getAccDescription as xi, getDiagramTitle as Xt, setDiagramTitle as di, getAccTitle as fi, setAccTitle as pi, log as Nt, selectSvgElement as mi, configureSvgSize as yi, clear as bi, getConfig as St, cleanAndMerge as Yt, defaultConfig_default as Ai, getThemeVariables3 as wi, sanitizeText as Ci, computeDimensionOfText as Si, line as Wt } from "./rehype-mermaid.C6vWaLbm.js";
2
2
  import { initRange as _i } from "./init.DAGnb5BH.js";
3
3
  import { ordinal as ki } from "./ordinal.EWT-qnu7.js";
4
4
  import { linear as zt } from "./linear.CIDfImUo.js";
@@ -1,5 +1,5 @@
1
1
  import "react/jsx-runtime";
2
- import { SassySaint as a } from "../../chunks/index.BztNm3SQ.js";
2
+ import { SassySaint as a } from "../../chunks/index.Ds4-4dzy.js";
3
3
  export {
4
4
  a as SassySaint
5
5
  };
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { SassySaint as r } from "./chunks/index.BztNm3SQ.js";
1
+ import { SassySaint as r } from "./chunks/index.Ds4-4dzy.js";
2
2
  try {
3
3
  window.__VERSINI_SASSY_GLOBAL__ || (window.__VERSINI_SASSY_GLOBAL__ = {
4
- version: "8.121.0",
5
- buildTime: "01/14/2026 08:43 AM EST",
4
+ version: "8.121.1",
5
+ buildTime: "01/14/2026 06:31 PM EST",
6
6
  license: "MIT"
7
7
  });
8
8
  } catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/sassysaint",
3
- "version": "8.121.0",
3
+ "version": "8.121.1",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -33,7 +33,7 @@
33
33
  "react-dom": "^18.3.1 || ^19.0.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@sassysaint/client": "8.121.0",
36
+ "@sassysaint/client": "8.121.1",
37
37
  "@tailwindcss/vite": "4.1.18",
38
38
  "@versini/ui-styles": "8.4.0"
39
39
  },
@@ -45,5 +45,5 @@
45
45
  "sideEffects": [
46
46
  "**/*.css"
47
47
  ],
48
- "gitHead": "2a504af825d1e19b86c907b3a728dd5c7a4d2809"
48
+ "gitHead": "1b421f08e1531e1e9885b88bf8c1247f0f191184"
49
49
  }
@@ -1,550 +0,0 @@
1
- import me, { createContext as ve, useContext as ye, useRef as Z, useLayoutEffect as ee, useState as B, useCallback as F, useMemo as K, useId as Ce, useEffect as J } from "react";
2
- import d from "clsx";
3
- import { jsx as i, jsxs as D, Fragment as ke } from "react/jsx-runtime";
4
- import { CellWrapper as R, BlurEffects as E, IconSortUp as xe, IconSortDown as He, IconSort as we, ButtonIcon as Se, IconDelete as Te } from "./LogoEntry.D5pr7J7L.js";
5
- import { ResponsiveTooltip as Ne } from "./App.C4nxPutS.js";
6
- const T = ve({
7
- mode: "system"
8
- });
9
- function Ye(e) {
10
- return d("contents", e);
11
- }
12
- function Ke(e, s) {
13
- const r = ye(T), o = Z([]);
14
- ee(() => {
15
- const t = e.current, a = r.columns && (r.stickyHeader || r.stickyFooter);
16
- if (!t || !a || !r.setMeasuredColumnWidths)
17
- return;
18
- const n = t.querySelector('[role="row"]');
19
- if (!n)
20
- return;
21
- const c = n.querySelectorAll('[role="cell"], [role="columnheader"], [role="gridcell"]');
22
- if (c.length === 0)
23
- return;
24
- const g = () => {
25
- const u = Array.from(c).map((b) => b.getBoundingClientRect().width), f = o.current;
26
- (u.length !== f.length || u.some((b, k) => b !== f[k])) && (o.current = u, r.setMeasuredColumnWidths?.(u));
27
- };
28
- g();
29
- const l = new ResizeObserver(() => {
30
- g();
31
- });
32
- l.observe(t);
33
- for (const u of c)
34
- l.observe(u);
35
- return () => l.disconnect();
36
- }, [
37
- r.columns,
38
- r.stickyHeader,
39
- r.stickyFooter,
40
- r.setMeasuredColumnWidths,
41
- s
42
- ]);
43
- }
44
- const w = (e) => e === "dark", S = (e) => e === "light", h = (e) => e === "system", v = (e) => e === "alt-system", te = (e) => w(e) || h(e), re = (e) => S(e) || v(e), Ie = (e) => !!(e && e !== E.NONE), j = (e) => e === R.HEADER, se = (e) => e === R.FOOTER, oe = "text-copy-light", _ = "text-copy-dark", L = "text-copy-light dark:text-copy-dark", ae = "text-copy-dark dark:text-copy-light", Q = ({ mode: e }) => d({
45
- [oe]: w(e),
46
- [_]: S(e),
47
- [L]: h(e),
48
- [ae]: v(e)
49
- }), U = ({ mode: e, hasBlur: s }) => d({
50
- [_]: w(e) && !s || S(e),
51
- [L]: h(e) && s,
52
- "text-copy-dark dark:text-copy-dark": (h(e) || v(e)) && !s
53
- }), Be = ({ mode: e }) => d({
54
- "bg-surface-darker": te(e),
55
- "bg-surface-light": re(e),
56
- "dark:bg-surface-light": h(e),
57
- "dark:bg-surface-darker": v(e)
58
- }), G = ({ hasBlur: e, sticky: s }) => d({
59
- "bg-surface-medium/50 dark:bg-surface-medium/50": e && s,
60
- "bg-surface-medium-light dark:bg-surface-medium-light": !e
61
- }), Ee = ({ mode: e }) => d({
62
- "border-table-dark": te(e),
63
- "border-table-light": re(e),
64
- "dark:border-table-light": h(e),
65
- "dark:border-table-dark": v(e)
66
- }), Fe = ({ blurEffect: e }) => d({
67
- "backdrop-blur-sm": e === E.SMALL,
68
- "backdrop-blur-md": e === E.MEDIUM,
69
- "backdrop-blur-lg": e === E.LARGE
70
- }), De = ({ mode: e }) => d("text-lg font-medium", {
71
- [_]: S(e),
72
- [oe]: w(e),
73
- [ae]: v(e),
74
- [L]: h(e)
75
- }), Re = ({ mode: e }) => ({
76
- inner: "relative",
77
- overlay: d("absolute inset-0 z-20 cursor-not-allowed rounded-lg", "backdrop-blur-xs bg-white/30 dark:bg-black/30"),
78
- loadingWrapper: d("absolute z-30 top-0 left-0 right-0 h-[min(100%,100vh)]", "flex items-center justify-center", "pointer-events-none"),
79
- loadingText: De({
80
- mode: e
81
- })
82
- }), ze = ({ mode: e, className: s, wrapperClassName: r, stickyHeader: o, stickyFooter: t, loading: a }) => {
83
- const n = a ? Re({
84
- mode: e
85
- }) : null, c = o || t;
86
- return {
87
- overlay: n?.overlay ?? "",
88
- inner: n?.inner ?? "",
89
- loadingWrapper: n?.loadingWrapper ?? "",
90
- loadingText: n?.loadingText ?? "",
91
- wrapper: d("not-prose relative w-full rounded-lg shadow-md", {
92
- "overflow-x-auto": !c && !a,
93
- "overflow-hidden flex flex-col": c || a
94
- }, Be({
95
- mode: e
96
- }), Q({
97
- mode: e
98
- }), r),
99
- scrollableContent: d("overflow-y-auto overflow-x-hidden rounded-[inherit] flex-1 min-h-0"),
100
- grid: d("my-0 w-full text-left text-sm grid", s, Q({
101
- mode: e
102
- }))
103
- };
104
- }, Ae = ({ className: e, stickyHeader: s, mode: r, blurEffect: o }) => {
105
- const t = Ie(o), a = U({
106
- mode: r,
107
- hasBlur: t
108
- });
109
- return s ? d("flex flex-col border-b border-table-medium shadow-md", "absolute left-0 right-0 z-20 top-0 rounded-t-lg", G({
110
- hasBlur: t,
111
- sticky: !0
112
- }), a, Fe({
113
- blurEffect: o
114
- }), e) : d("contents", G({
115
- hasBlur: t,
116
- sticky: !1
117
- }), a, e);
118
- }, je = ({ captionClassName: e, mode: s, hasBlur: r, stickyHeader: o }) => d("py-2 text-sm text-center font-bold col-span-full", U({
119
- mode: s,
120
- hasBlur: r
121
- }), !o && G({
122
- hasBlur: r,
123
- sticky: !1
124
- }), e), O = "group grid items-center", Ge = ({ mode: e, className: s, cellWrapper: r, isLastRow: o, stickyHeader: t, stickyFooter: a }) => {
125
- if (j(r) || se(r)) {
126
- const c = j(r);
127
- return (c ? !t : !a) ? d(O, G({
128
- hasBlur: !1,
129
- sticky: !1
130
- }), c ? "border-b border-table-medium shadow-md" : "border-t border-table-medium", s) : d(O, s);
131
- }
132
- return d(O, o !== void 0 ? o ? "border-b border-b-transparent dark:border-b-transparent" : "border-b" : "border-b last:border-0", "hover:bg-surface-medium hover:text-copy-light", Ee({
133
- mode: e
134
- }), s);
135
- }, ne = ({ cellWrapper: e, className: s, compact: r, align: o, mode: t, borderLeft: a, borderRight: n }) => d({
136
- "px-2 py-1": r,
137
- "px-4 py-3": !r
138
- }, {
139
- "text-left justify-start": o === "left" || !o,
140
- "text-center justify-center": o === "center",
141
- "text-right justify-end": o === "right"
142
- }, {
143
- "font-bold": j(e) || se(e)
144
- }, "first:group-data-active:relative", "first:group-data-active:before:absolute first:group-data-active:before:left-0 first:group-data-active:before:top-0 first:group-data-active:before:bottom-0 first:group-data-active:before:w-1", "first:group-data-active:self-stretch first:group-data-active:flex first:group-data-active:items-center", {
145
- "first:group-data-active:before:bg-table-active-dark": w(t),
146
- "first:group-data-active:before:bg-table-active-light": S(t),
147
- "first:group-data-active:before:bg-table-active-dark dark:first:group-data-active:before:bg-table-active-light": h(t),
148
- "first:group-data-active:before:bg-table-active-light dark:first:group-data-active:before:bg-table-active-dark": v(t)
149
- }, {
150
- "self-stretch flex items-center": a || n,
151
- "border-l border-l-table-dark": a && w(t),
152
- "border-l border-l-table-light": a && S(t),
153
- "border-l border-l-table-dark dark:border-l-table-light": a && h(t),
154
- "border-l border-l-table-light dark:border-l-table-dark": a && v(t),
155
- "border-r border-r-table-dark": n && w(t),
156
- "border-r border-r-table-light": n && S(t),
157
- "border-r border-r-table-dark dark:border-r-table-light": n && h(t),
158
- "border-r border-r-table-light dark:border-r-table-dark": n && v(t)
159
- }, s), Me = (e) => j(e) ? "columnheader" : "gridcell";
160
- const Oe = ({ className: e, wrapperClassName: s, children: r, mode: o = "system", compact: t = !1, stickyHeader: a = !1, stickyFooter: n = !1, blurEffect: c = E.NONE, maxHeight: g, loading: l = !1, columns: u, ...f }) => {
161
- const [y, b] = B(0), [k, C] = B(0), [p, z] = B(0), [x, M] = B(0), [A, ie] = B([]), W = F(() => b((m) => m + 1), []), $ = F(() => b((m) => m - 1), []), X = F(() => C((m) => m + 1), []), V = F(() => C((m) => m - 1), []), le = y > 0, ce = k > 0, N = a && le, I = n && ce, [de, ue] = B(void 0), q = F((m) => {
162
- ue(m);
163
- }, []), H = K(() => ze({
164
- mode: o,
165
- className: e,
166
- wrapperClassName: s,
167
- stickyHeader: N,
168
- stickyFooter: I,
169
- loading: !!l
170
- }), [
171
- o,
172
- e,
173
- s,
174
- N,
175
- I,
176
- l
177
- ]), fe = K(() => ({
178
- mode: o,
179
- compact: t,
180
- stickyHeader: N,
181
- stickyFooter: I,
182
- blurEffect: c,
183
- columns: u,
184
- measuredColumnWidths: A,
185
- setCaptionId: q,
186
- registerHeader: W,
187
- unregisterHeader: $,
188
- registerFooter: X,
189
- unregisterFooter: V,
190
- setHeaderHeight: z,
191
- setFooterHeight: M,
192
- setMeasuredColumnWidths: ie
193
- }), [
194
- o,
195
- t,
196
- N,
197
- I,
198
- c,
199
- u,
200
- A,
201
- q,
202
- W,
203
- $,
204
- X,
205
- V
206
- ]), P = g ? {
207
- maxHeight: typeof g == "number" ? `${g}px` : g
208
- } : void 0, ge = {
209
- ...P,
210
- paddingTop: N ? p : void 0,
211
- paddingBottom: I ? x : void 0
212
- }, be = N || I, he = u ? {
213
- gridTemplateColumns: u.join(" ")
214
- } : void 0, Y = /* @__PURE__ */ i("div", {
215
- role: "grid",
216
- "aria-labelledby": de,
217
- className: H.grid,
218
- style: he,
219
- ...f,
220
- children: r
221
- }), pe = typeof l == "string" ? l : l ? "Loading..." : null;
222
- return /* @__PURE__ */ i(T.Provider, {
223
- value: fe,
224
- children: /* @__PURE__ */ D("div", {
225
- className: H.inner,
226
- children: [
227
- l && /* @__PURE__ */ D(ke, {
228
- children: [
229
- /* @__PURE__ */ i("div", {
230
- className: H.overlay,
231
- "aria-hidden": "true"
232
- }),
233
- /* @__PURE__ */ i("div", {
234
- className: H.loadingWrapper,
235
- children: /* @__PURE__ */ i("span", {
236
- className: H.loadingText,
237
- role: "status",
238
- children: pe
239
- })
240
- })
241
- ]
242
- }),
243
- /* @__PURE__ */ i("div", {
244
- className: H.wrapper,
245
- style: P,
246
- children: be ? /* @__PURE__ */ i("div", {
247
- className: H.scrollableContent,
248
- style: ge,
249
- children: Y
250
- }) : Y
251
- })
252
- ]
253
- })
254
- });
255
- }, Je = (e) => /* @__PURE__ */ i(
256
- Oe,
257
- {
258
- stickyHeader: !0,
259
- stickyFooter: !0,
260
- compact: !0,
261
- mode: "alt-system",
262
- blurEffect: "medium",
263
- wrapperClassName: d(
264
- "ring-2 ring-surface-light",
265
- "dark:ring-surface-medium",
266
- "max-h-[clamp(12rem,calc(100dvh-24rem),60dvh)]",
267
- "sm:max-h-[clamp(12rem,calc(100dvh-24rem),60dvh)]"
268
- ),
269
- ...e
270
- }
271
- );
272
- const Qe = ({ className: e, children: s, align: r, borderLeft: o, borderRight: t, colSpan: a, style: n, ...c }) => /* @__PURE__ */ i(T.Consumer, {
273
- children: ({ mode: g, compact: l, cellWrapper: u }) => {
274
- const f = ne({
275
- cellWrapper: u,
276
- className: e,
277
- mode: g,
278
- compact: l,
279
- align: r,
280
- borderLeft: o,
281
- borderRight: t
282
- }), y = Me(u), b = a && a > 1 ? {
283
- ...n,
284
- gridColumn: `span ${a}`
285
- } : n;
286
- return /* @__PURE__ */ i("div", {
287
- role: y,
288
- className: f,
289
- style: b,
290
- ...c,
291
- children: s
292
- });
293
- }
294
- });
295
- const _e = (e) => e ? d(
296
- "relative",
297
- "focus-within:static",
298
- "focus-within:after:border-transparent",
299
- "after:absolute",
300
- "after:content-['']",
301
- "after:border-b-2",
302
- "after:-bottom-1",
303
- "after:left-0",
304
- "after:right-0",
305
- // the small border at the bottom of the button when it is active (sorted)
306
- "after:border-table-light"
307
- ) : "", Le = ({ active: e = !1, className: s, onClick: r, labelRight: o, children: t, blurEffect: a, mode: n }) => {
308
- const c = !!(a && a !== E.NONE), g = d(
309
- // Base styles
310
- "flex items-center cursor-pointer",
311
- // Size - small
312
- "h-6 px-1 sm:px-2",
313
- // Font
314
- "text-sm font-bold",
315
- // Radius - small
316
- "rounded-xs",
317
- // Text color
318
- U({
319
- mode: n,
320
- hasBlur: c
321
- }),
322
- // Focus styles
323
- "focus:outline",
324
- "focus:outline-2",
325
- "focus:outline-offset-2",
326
- "focus:outline-focus-medium",
327
- // Hover styles
328
- "hover:text-copy-light-hover",
329
- "hover:bg-action-darker-hover",
330
- // Active styles
331
- "active:text-copy-medium-active",
332
- "active:bg-action-dark-active",
333
- // Custom className
334
- s
335
- ), l = _e(e);
336
- return /* @__PURE__ */ i("div", {
337
- className: l,
338
- children: /* @__PURE__ */ D("button", {
339
- className: g,
340
- type: "button",
341
- onClick: r,
342
- children: [
343
- /* @__PURE__ */ i("span", {
344
- className: "text-copy-light",
345
- children: t
346
- }),
347
- o && /* @__PURE__ */ i("span", {
348
- className: "pl-2",
349
- children: o
350
- })
351
- ]
352
- })
353
- });
354
- }, Ze = ({ className: e, children: s, cellId: r, onSort: o, sortDirection: t, sortedCell: a, slotLeft: n, slotRight: c, buttonClassName: g, align: l, ...u }) => {
355
- const f = a === r, y = () => {
356
- o && o(r, f && t ? t : void 0);
357
- }, b = () => f && t === "asc" ? /* @__PURE__ */ i(xe, {
358
- size: "size-4",
359
- monotone: !0
360
- }) : f && t === "desc" ? /* @__PURE__ */ i(He, {
361
- size: "size-4",
362
- monotone: !0
363
- }) : /* @__PURE__ */ i(we, {
364
- size: "size-4",
365
- monotone: !0
366
- }), k = () => f && t === "asc" ? "ascending" : f && t === "desc" ? "descending" : "other";
367
- return /* @__PURE__ */ i(T.Consumer, {
368
- children: ({ mode: C, compact: p, cellWrapper: z, blurEffect: x }) => {
369
- const M = ne({
370
- cellWrapper: z,
371
- className: e,
372
- mode: C,
373
- compact: p,
374
- align: l
375
- }), A = d("flex", {
376
- "justify-start": l === "left" || !l,
377
- "justify-center": l === "center",
378
- "justify-end": l === "right"
379
- });
380
- return /* @__PURE__ */ i("div", {
381
- className: M,
382
- role: "columnheader",
383
- "aria-sort": k(),
384
- ...u,
385
- children: /* @__PURE__ */ D("div", {
386
- className: A,
387
- children: [
388
- n,
389
- /* @__PURE__ */ i(Le, {
390
- mode: C,
391
- blurEffect: x,
392
- active: f,
393
- className: g,
394
- onClick: y,
395
- labelRight: s,
396
- children: b()
397
- }),
398
- c
399
- ]
400
- })
401
- });
402
- }
403
- });
404
- };
405
- const Ue = ({ caption: e, captionClassName: s, className: r, children: o, ...t }) => {
406
- const a = Ce();
407
- return /* @__PURE__ */ i(T.Consumer, {
408
- children: (n) => /* @__PURE__ */ i(We, {
409
- caption: e,
410
- captionClassName: s,
411
- captionId: a,
412
- className: r,
413
- ctx: n,
414
- ...t,
415
- children: o
416
- })
417
- });
418
- };
419
- Ue.displayName = "DataGridHeader";
420
- const We = ({ caption: e, captionClassName: s, captionId: r, className: o, ctx: t, children: a, ...n }) => {
421
- const c = Z(null);
422
- return J(() => (t.registerHeader?.(), () => {
423
- t.unregisterHeader?.();
424
- }), [
425
- t.registerHeader,
426
- t.unregisterHeader
427
- ]), J(() => (e && t.setCaptionId && t.setCaptionId(r), () => {
428
- t.setCaptionId && t.setCaptionId(void 0);
429
- }), [
430
- e,
431
- r,
432
- t.setCaptionId
433
- ]), ee(() => {
434
- const g = c.current;
435
- if (!g || !t.stickyHeader || !t.setHeaderHeight)
436
- return;
437
- const l = new ResizeObserver((u) => {
438
- const f = u[0]?.borderBoxSize?.[0]?.blockSize;
439
- f !== void 0 && t.setHeaderHeight?.(f);
440
- });
441
- return l.observe(g), () => l.disconnect();
442
- }, [
443
- t.stickyHeader,
444
- t.setHeaderHeight
445
- ]), /* @__PURE__ */ i(T.Provider, {
446
- value: {
447
- ...t,
448
- cellWrapper: R.HEADER
449
- },
450
- children: /* @__PURE__ */ D("div", {
451
- ref: c,
452
- role: "rowgroup",
453
- className: Ae({
454
- className: o,
455
- stickyHeader: t.stickyHeader,
456
- mode: t.mode,
457
- blurEffect: t.blurEffect
458
- }),
459
- ...n,
460
- children: [
461
- e && /* @__PURE__ */ i("div", {
462
- id: r,
463
- className: je({
464
- captionClassName: s,
465
- mode: t.mode,
466
- hasBlur: !!(t.blurEffect && t.blurEffect !== "none"),
467
- stickyHeader: !!t.stickyHeader
468
- }),
469
- children: e
470
- }),
471
- a
472
- ]
473
- })
474
- });
475
- };
476
- const et = ({ className: e, children: s, active: r, style: o, ...t }) => {
477
- const a = me.Children.count(s);
478
- return /* @__PURE__ */ i(T.Consumer, {
479
- children: ({ mode: n, cellWrapper: c, stickyHeader: g, stickyFooter: l, columns: u, measuredColumnWidths: f, isLastRow: y }) => {
480
- const b = c === R.HEADER && g, k = c === R.FOOTER && l, C = b || k;
481
- let p;
482
- return u ? C ? f && f.length === u.length && f.some((x) => x > 0) ? p = {
483
- gridTemplateColumns: f.map((x) => `${x}px`).join(" ")
484
- } : p = {
485
- gridTemplateColumns: u.join(" ")
486
- } : p = {
487
- gridColumn: "1 / -1",
488
- gridTemplateColumns: "subgrid"
489
- } : p = {
490
- gridTemplateColumns: `repeat(${a}, minmax(0, 1fr))`
491
- }, /* @__PURE__ */ i("div", {
492
- role: "row",
493
- className: Ge({
494
- mode: n,
495
- className: e,
496
- cellWrapper: c,
497
- isLastRow: y,
498
- stickyHeader: g,
499
- stickyFooter: l
500
- }),
501
- style: {
502
- ...p,
503
- ...o
504
- },
505
- "data-active": r || void 0,
506
- ...t,
507
- children: s
508
- });
509
- }
510
- });
511
- }, tt = ({
512
- label: e,
513
- disabled: s,
514
- onClick: r
515
- }) => /* @__PURE__ */ i(
516
- Ne,
517
- {
518
- label: e,
519
- placement: "top",
520
- trigger: /* @__PURE__ */ i(
521
- Se,
522
- {
523
- noBorder: !0,
524
- variant: "primary",
525
- label: e,
526
- disabled: s,
527
- onClick: r,
528
- children: /* @__PURE__ */ i(
529
- Te,
530
- {
531
- size: "size-3",
532
- monotone: !0,
533
- className: "text-copy-error-dark dark:text-copy-error-light"
534
- }
535
- )
536
- }
537
- )
538
- }
539
- );
540
- export {
541
- tt as ButtonIconDelete,
542
- Je as DataGrid,
543
- Qe as DataGridCell,
544
- Ze as DataGridCellSort,
545
- T as DataGridContext,
546
- Ue as DataGridHeader,
547
- et as DataGridRow,
548
- Ye as getBodyClass,
549
- Ke as useColumnMeasurement
550
- };