@alfadocs/ui-kit 1.42.0 → 1.44.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 (126) hide show
  1. package/dist/_chunks/{calendar-ChJQzRw-.js → calendar-U6N0F99w.js} +383 -359
  2. package/dist/_chunks/calendar-workspace-DBYAtdyd.js +12161 -0
  3. package/dist/_chunks/control-room-rail-Cv7GpMqX.js +354 -0
  4. package/dist/_chunks/{face-scheme-Dg6ZyLKb.js → face-scheme-Bm6pe7R8.js} +265 -275
  5. package/dist/_chunks/help-me-write-templates-GUeEn3Ff.js +741 -0
  6. package/dist/_chunks/{marketplace-app-shell-D_g9BaDI.js → marketplace-app-shell-DdwPj03y.js} +3 -3
  7. package/dist/_chunks/{notes-panel-CRAovkjx.js → notes-panel-CY4KmDo-.js} +159 -152
  8. package/dist/_chunks/{panel-subview-PMBRPFOa.js → panel-subview-CYnuX-KR.js} +61 -40
  9. package/dist/_chunks/rich-text-editor-BYE6kK4u.js +3839 -0
  10. package/dist/_chunks/{sidebar-ClTY9lLI.js → sidebar-DbZXLl8h.js} +2 -2
  11. package/dist/_chunks/tab-bar-Cw9UK18Z.js +228 -0
  12. package/dist/_chunks/{tool-rail-D89USYE6.js → tool-rail-CCFqDfAn.js} +282 -276
  13. package/dist/_chunks/undo-2-CYNAzclj.js +26 -0
  14. package/dist/_chunks/use-edge-resize-BHesP0kg.js +149 -0
  15. package/dist/_chunks/use-scroll-overflow-UbLrUfBo.js +72 -0
  16. package/dist/_chunks/variables-menu-vXUaSBj4.js +401 -0
  17. package/dist/agent-catalog.json +84 -3
  18. package/dist/agent-i18n/en.json +14 -3
  19. package/dist/components/calendar/calendar.d.ts +6 -0
  20. package/dist/components/calendar/index.js +1 -1
  21. package/dist/components/control-room-rail/control-room-rail.d.ts +9 -0
  22. package/dist/components/control-room-rail/index.js +1 -1
  23. package/dist/components/face-scheme/index.js +1 -1
  24. package/dist/components/index.d.ts +1 -0
  25. package/dist/components/notes-panel/index.js +1 -1
  26. package/dist/components/notes-panel/notes-panel.d.ts +4 -0
  27. package/dist/components/panel-subview/index.js +1 -1
  28. package/dist/components/panel-subview/panel-subview.d.ts +6 -0
  29. package/dist/components/rich-text-editor/editor-toolbar.d.ts +35 -3
  30. package/dist/components/rich-text-editor/index.d.ts +1 -1
  31. package/dist/components/rich-text-editor/index.js +1 -1
  32. package/dist/components/rich-text-editor/rich-text-editor.d.ts +98 -15
  33. package/dist/components/sidebar/index.js +1 -1
  34. package/dist/components/tab-bar/index.js +1 -1
  35. package/dist/components/tool-rail/index.js +1 -1
  36. package/dist/components/tool-rail/tool-rail.d.ts +16 -0
  37. package/dist/components/variables-menu/index.d.ts +4 -0
  38. package/dist/components/variables-menu/index.js +6 -0
  39. package/dist/components/variables-menu/variables-menu.agent.d.ts +10 -0
  40. package/dist/components/variables-menu/variables-menu.d.ts +53 -0
  41. package/dist/hooks/index.d.ts +2 -0
  42. package/dist/hooks/index.js +35 -32
  43. package/dist/hooks/use-edge-resize.d.ts +13 -1
  44. package/dist/host-compat.css +5 -5
  45. package/dist/i18n/locales/ar.d.ts +77 -6
  46. package/dist/i18n/locales/ar.js +78 -7
  47. package/dist/i18n/locales/de.d.ts +77 -6
  48. package/dist/i18n/locales/de.js +78 -7
  49. package/dist/i18n/locales/el.d.ts +77 -6
  50. package/dist/i18n/locales/el.js +78 -7
  51. package/dist/i18n/locales/en.d.ts +77 -6
  52. package/dist/i18n/locales/en.js +85 -7
  53. package/dist/i18n/locales/es.d.ts +77 -6
  54. package/dist/i18n/locales/es.js +78 -7
  55. package/dist/i18n/locales/fr.d.ts +77 -6
  56. package/dist/i18n/locales/fr.js +78 -7
  57. package/dist/i18n/locales/hi.d.ts +77 -6
  58. package/dist/i18n/locales/hi.js +78 -7
  59. package/dist/i18n/locales/it.d.ts +77 -6
  60. package/dist/i18n/locales/it.js +78 -7
  61. package/dist/i18n/locales/ja.d.ts +77 -6
  62. package/dist/i18n/locales/ja.js +78 -7
  63. package/dist/i18n/locales/nl.d.ts +77 -6
  64. package/dist/i18n/locales/nl.js +78 -7
  65. package/dist/i18n/locales/pl.d.ts +77 -6
  66. package/dist/i18n/locales/pl.js +78 -7
  67. package/dist/i18n/locales/pt.d.ts +77 -6
  68. package/dist/i18n/locales/pt.js +78 -7
  69. package/dist/i18n/locales/ro.d.ts +77 -6
  70. package/dist/i18n/locales/ro.js +78 -7
  71. package/dist/i18n/locales/ru.d.ts +77 -6
  72. package/dist/i18n/locales/ru.js +78 -7
  73. package/dist/i18n/locales/sq.d.ts +77 -6
  74. package/dist/i18n/locales/sq.js +78 -7
  75. package/dist/i18n/locales/sv.d.ts +77 -6
  76. package/dist/i18n/locales/sv.js +78 -7
  77. package/dist/i18n/locales/tr.d.ts +77 -6
  78. package/dist/i18n/locales/tr.js +78 -7
  79. package/dist/i18n/locales/zh.d.ts +77 -6
  80. package/dist/i18n/locales/zh.js +78 -7
  81. package/dist/index.js +916 -913
  82. package/dist/locales/ar.json +78 -7
  83. package/dist/locales/de.json +78 -7
  84. package/dist/locales/el.json +78 -7
  85. package/dist/locales/en.json +78 -7
  86. package/dist/locales/es.json +78 -7
  87. package/dist/locales/fr.json +78 -7
  88. package/dist/locales/hi.json +78 -7
  89. package/dist/locales/it.json +78 -7
  90. package/dist/locales/ja.json +78 -7
  91. package/dist/locales/nl.json +78 -7
  92. package/dist/locales/pl.json +78 -7
  93. package/dist/locales/pt.json +78 -7
  94. package/dist/locales/ro.json +78 -7
  95. package/dist/locales/ru.json +78 -7
  96. package/dist/locales/sq.json +78 -7
  97. package/dist/locales/sv.json +78 -7
  98. package/dist/locales/tr.json +78 -7
  99. package/dist/locales/zh.json +78 -7
  100. package/dist/patterns/calendar/calendar-bookings-panel.d.ts +8 -3
  101. package/dist/patterns/calendar/calendar-care-rules.d.ts +49 -0
  102. package/dist/patterns/calendar/calendar-task-editor.d.ts +31 -0
  103. package/dist/patterns/calendar/calendar-workspace.d.ts +8 -1
  104. package/dist/patterns/calendar/calendar-workspace.model.d.ts +39 -12
  105. package/dist/patterns/calendar/calendar.data.d.ts +9 -0
  106. package/dist/patterns/calendar/calendar.journey.d.ts +35 -3
  107. package/dist/patterns/calendar/calendar.model.d.ts +23 -1
  108. package/dist/patterns/calendar/calendar.sheets.d.ts +21 -3
  109. package/dist/patterns/calendar/calendar.surface.d.ts +6 -1
  110. package/dist/patterns/calendar/calendar.types.d.ts +32 -1
  111. package/dist/patterns/calendar/index.js +1 -1
  112. package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts +58 -26
  113. package/dist/patterns/help-me-write-templates/index.d.ts +1 -1
  114. package/dist/patterns/help-me-write-templates/index.js +1 -1
  115. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  116. package/dist/tokens.css +6 -6
  117. package/package.json +5 -1
  118. package/dist/_chunks/calendar-workspace-qlxrxCqm.js +0 -11392
  119. package/dist/_chunks/control-room-rail-CnNZusR5.js +0 -337
  120. package/dist/_chunks/help-me-write-templates-B-m7zgJa.js +0 -775
  121. package/dist/_chunks/highlighter-DSkckT2Q.js +0 -15
  122. package/dist/_chunks/rich-text-editor-DUMeifwc.js +0 -3176
  123. package/dist/_chunks/tab-bar-rDkLiaA6.js +0 -268
  124. package/dist/_chunks/use-edge-resize-ZnGG7gyO.js +0 -139
  125. package/dist/_chunks/use-overflow-collapse-BIOzKbni.js +0 -32
  126. package/dist/_chunks/wand-sparkles-DAjKyhz7.js +0 -27
@@ -1,268 +0,0 @@
1
- import { jsx as a, jsxs as v, Fragment as S } from "react/jsx-runtime";
2
- import { useRef as V, useState as F, useCallback as O, forwardRef as D, Fragment as M } from "react";
3
- import { c as C } from "./index-D2ZczOXr.js";
4
- import { useTranslation as L } from "react-i18next";
5
- import { B as W } from "./badge-BudgzTe_.js";
6
- import { D as b } from "./dropdown-menu-DU-Hrf33.js";
7
- import { u as P } from "./use-media-query-CcAx5SMM.js";
8
- import { u as I } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
9
- import { u as Q } from "./use-overflow-collapse-BIOzKbni.js";
10
- import { C as q } from "./chevron-down-DWE7GSq9.js";
11
- import { C as G } from "./check-DrFSN__t.js";
12
- import { C as H } from "./chevron-left-B8cOyH-V.js";
13
- import { C as J } from "./chevron-right-I9AeSxH2.js";
14
- function K(d = !0) {
15
- const c = V(null), [u, o] = F({ start: !1, end: !1 });
16
- I(() => {
17
- const r = c.current;
18
- if (!r || !d) {
19
- o(
20
- (t) => t.start || t.end ? { start: !1, end: !1 } : t
21
- );
22
- return;
23
- }
24
- const e = () => {
25
- const t = Math.abs(r.scrollLeft), f = r.scrollWidth - r.clientWidth, i = t > 1, m = f - t > 1;
26
- o(
27
- (p) => p.start === i && p.end === m ? p : { start: i, end: m }
28
- );
29
- };
30
- e(), r.addEventListener("scroll", e, { passive: !0 });
31
- let n;
32
- return typeof ResizeObserver < "u" && (n = new ResizeObserver(e), n.observe(r), r.firstElementChild && n.observe(r.firstElementChild)), () => {
33
- r.removeEventListener("scroll", e), n == null || n.disconnect();
34
- };
35
- }, [d]);
36
- const g = O((r) => {
37
- var i;
38
- const e = c.current;
39
- if (!e || typeof window > "u") return;
40
- const n = window.getComputedStyle(e).direction === "rtl", t = (i = window.matchMedia) == null ? void 0 : i.call(
41
- window,
42
- "(prefers-reduced-motion: reduce)"
43
- ).matches, f = e.clientWidth * 0.85 * r * (n ? -1 : 1);
44
- e.scrollBy({ left: f, behavior: t ? "auto" : "smooth" });
45
- }, []);
46
- return {
47
- ref: c,
48
- canScrollStart: u.start,
49
- canScrollEnd: u.end,
50
- scrollByPage: g
51
- };
52
- }
53
- function U(d) {
54
- return d > 99 ? "99+" : String(d);
55
- }
56
- const X = C("ds:shrink-0", {
57
- variants: {
58
- position: {
59
- top: "ds:pt-[var(--spacing-md)]",
60
- bottom: "ds:pb-[var(--spacing-md)]"
61
- },
62
- fill: {
63
- false: "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
64
- true: ""
65
- }
66
- },
67
- defaultVariants: { position: "top", fill: !1 }
68
- }), Y = "ds:rounded-[var(--radius-lg)] ds:border ds:border-[color:var(--card-border)] ds:bg-[var(--card)]/80 ds:backdrop-blur-md ds:shadow-[var(--shadow-md)]", Z = [
69
- "ds:flex ds:[justify-content:safe_center] ds:overflow-x-auto ds:py-[var(--spacing-xs)]",
70
- "ds:[--tabbar-mask-start:black] ds:[--tabbar-mask-end:black]",
71
- "ds:ltr:data-[fade-start=true]:[--tabbar-mask-start:transparent]",
72
- "ds:ltr:data-[fade-end=true]:[--tabbar-mask-end:transparent]",
73
- "ds:rtl:data-[fade-start=true]:[--tabbar-mask-end:transparent]",
74
- "ds:rtl:data-[fade-end=true]:[--tabbar-mask-start:transparent]",
75
- "ds:[mask-image:linear-gradient(to_right,var(--tabbar-mask-start)_0,black_var(--tabbar-fade-distance,var(--spacing-lg)),black_calc(100%-var(--tabbar-fade-distance,var(--spacing-lg))),var(--tabbar-mask-end)_100%)]",
76
- "ds:motion-reduce:[mask-image:none]",
77
- "ds:[.theme-accessible_&]:[mask-image:none]",
78
- "ds:forced-colors:[mask-image:none]"
79
- ].join(" "), ss = C(
80
- "ds:flex ds:items-stretch ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
81
- {
82
- variants: {
83
- fill: { false: "ds:shrink-0", true: "ds:w-full" }
84
- },
85
- defaultVariants: { fill: !1 }
86
- }
87
- ), R = C(
88
- "ds:group ds:flex ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)] ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] ds:whitespace-nowrap ds:cursor-pointer ds:appearance-none ds:border-0 ds:bg-transparent ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-regular)] ds:text-[color:var(--foreground)] ds:no-underline ds:hover:bg-[var(--muted)]/20 ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]",
89
- {
90
- variants: {
91
- fill: {
92
- // Responsive: label under the icon below `sm`, beside it at `sm`+.
93
- false: "ds:flex-col ds:sm:flex-row ds:sm:gap-[var(--spacing-sm)]",
94
- // Fill the bar, always icon-over-label. No `min-w-0`, so a tab never
95
- // shrinks below its label (labels never overlap); if the full set can't
96
- // fit, the pill scrolls instead.
97
- true: "ds:flex-1 ds:basis-0 ds:flex-col"
98
- }
99
- },
100
- defaultVariants: { fill: !1 }
101
- }
102
- ), E = "ds:inline-flex ds:items-center ds:text-[color:var(--accent)] ds:[&>svg]:size-4", as = "ds:group-aria-[current=page]:underline ds:group-aria-[current=page]:decoration-2 ds:group-aria-[current=page]:decoration-[color:var(--accent)] ds:group-aria-[current=page]:underline-offset-[var(--spacing-xs)]", rs = "ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-sm)] ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] ds:cursor-pointer ds:appearance-none ds:border-0 ds:bg-transparent ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-regular)] ds:text-[color:var(--foreground)] ds:hover:bg-[var(--muted)]/20 ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]", T = "ds:absolute ds:top-px ds:bottom-px ds:z-10 ds:flex ds:min-w-[var(--min-target-size)] ds:items-center ds:cursor-pointer ds:appearance-none ds:border-0 ds:bg-transparent ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]", es = "ds:start-px ds:justify-start ds:ps-[var(--spacing-xs)]", ns = "ds:end-px ds:justify-end ds:pe-[var(--spacing-xs)]", $ = "ds:size-4 ds:shrink-0 ds:text-[color:var(--accent)] ds:rtl:-scale-x-100", ts = D(
103
- ({
104
- items: d,
105
- id: c,
106
- ariaLabel: u,
107
- onSelect: o,
108
- renderLink: g,
109
- fill: r = !1,
110
- position: e = "top",
111
- collapseToMenu: n = !1,
112
- className: t
113
- }, f) => {
114
- const { t: i } = L(), m = P("(max-width: 640px)"), { containerRef: p, contentRef: j, isOverflowing: A } = Q(n), w = n && (m || A), {
115
- ref: _,
116
- canScrollStart: k,
117
- canScrollEnd: N,
118
- scrollByPage: y
119
- } = K(!w), l = d.find((s) => s.isActive) ?? d[0];
120
- return /* @__PURE__ */ a(
121
- "div",
122
- {
123
- ref: f,
124
- "data-component": "tab-bar",
125
- "data-component-id": c,
126
- className: `${X({ position: e, fill: r })}${t ? ` ${t}` : ""}`,
127
- children: /* @__PURE__ */ v("div", { className: "ds:relative", children: [
128
- /* @__PURE__ */ a("div", { ref: p, className: Y, children: w ? /* @__PURE__ */ a("nav", { "aria-label": u, className: "ds:w-full", children: /* @__PURE__ */ v(b.Root, { children: [
129
- /* @__PURE__ */ v(b.Trigger, { className: rs, children: [
130
- l != null && l.icon ? /* @__PURE__ */ a("span", { "aria-hidden": "true", className: E, children: l.icon }) : null,
131
- /* @__PURE__ */ a("span", { className: "ds:flex-1 ds:truncate ds:text-start", children: l == null ? void 0 : l.label }),
132
- /* @__PURE__ */ a(
133
- q,
134
- {
135
- "aria-hidden": "true",
136
- className: "ds:size-4 ds:shrink-0 ds:text-[color:var(--muted-foreground)]"
137
- }
138
- )
139
- ] }),
140
- /* @__PURE__ */ a(
141
- b.Content,
142
- {
143
- align: "start",
144
- className: "ds:min-w-[12rem]",
145
- children: d.map((s) => /* @__PURE__ */ a(
146
- b.Item,
147
- {
148
- "data-tab-id": s.id,
149
- startIcon: s.icon,
150
- endIcon: s.isActive ? /* @__PURE__ */ a(
151
- G,
152
- {
153
- "aria-hidden": "true",
154
- className: "ds:text-[color:var(--accent)]"
155
- }
156
- ) : void 0,
157
- "aria-current": s.isActive ? "page" : void 0,
158
- onSelect: () => {
159
- s.href ? window.location.assign(s.href) : o == null || o(s.id);
160
- },
161
- children: s.label
162
- },
163
- s.id
164
- ))
165
- }
166
- )
167
- ] }) }) : /* @__PURE__ */ a(
168
- "div",
169
- {
170
- ref: _,
171
- "data-fade-start": k ? "true" : void 0,
172
- "data-fade-end": N ? "true" : void 0,
173
- className: Z,
174
- children: /* @__PURE__ */ a(
175
- "nav",
176
- {
177
- ref: j,
178
- "aria-label": u,
179
- className: ss({ fill: r }),
180
- children: d.map((s) => {
181
- const z = typeof s.badgeCount == "number" && s.badgeCount > 0 ? s.badgeCount : void 0, h = s.isActive ? "page" : void 0, x = /* @__PURE__ */ v(S, { children: [
182
- s.icon ? /* @__PURE__ */ a("span", { "aria-hidden": "true", className: E, children: s.icon }) : null,
183
- /* @__PURE__ */ v("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
184
- /* @__PURE__ */ a("span", { className: as, children: s.label }),
185
- z !== void 0 ? /* @__PURE__ */ a(W, { variant: "neutral", children: U(z) }) : null
186
- ] })
187
- ] });
188
- if (s.href !== void 0) {
189
- const B = R({ fill: r });
190
- return g ? /* @__PURE__ */ a(M, { children: g({
191
- href: s.href,
192
- className: B,
193
- children: x,
194
- "aria-current": h,
195
- "data-tab-id": s.id,
196
- onClick: s.onClick
197
- }) }, s.id) : /* @__PURE__ */ a(
198
- "a",
199
- {
200
- href: s.href,
201
- "data-tab-id": s.id,
202
- "aria-current": h,
203
- className: B,
204
- ...s.onClick ? { onClick: s.onClick } : {},
205
- children: x
206
- },
207
- s.id
208
- );
209
- }
210
- return /* @__PURE__ */ a(
211
- "button",
212
- {
213
- type: "button",
214
- "data-tab-id": s.id,
215
- "aria-current": h,
216
- className: R({ fill: r }),
217
- onClick: () => o == null ? void 0 : o(s.id),
218
- children: x
219
- },
220
- s.id
221
- );
222
- })
223
- }
224
- )
225
- }
226
- ) }),
227
- k ? /* @__PURE__ */ a(
228
- "button",
229
- {
230
- type: "button",
231
- "aria-label": i("navigation.tabBar.scrollBack"),
232
- onClick: () => y(-1),
233
- className: `${T} ${es}`,
234
- children: /* @__PURE__ */ a(
235
- H,
236
- {
237
- "aria-hidden": "true",
238
- className: $
239
- }
240
- )
241
- }
242
- ) : null,
243
- N ? /* @__PURE__ */ a(
244
- "button",
245
- {
246
- type: "button",
247
- "aria-label": i("navigation.tabBar.scrollForward"),
248
- onClick: () => y(1),
249
- className: `${T} ${ns}`,
250
- children: /* @__PURE__ */ a(
251
- J,
252
- {
253
- "aria-hidden": "true",
254
- className: $
255
- }
256
- )
257
- }
258
- ) : null
259
- ] })
260
- }
261
- );
262
- }
263
- );
264
- ts.displayName = "TabBar";
265
- export {
266
- ts as T
267
- };
268
- //# sourceMappingURL=tab-bar-rDkLiaA6.js.map
@@ -1,139 +0,0 @@
1
- import { useState as X, useRef as T, useCallback as o } from "react";
2
- import { useTranslation as B } from "react-i18next";
3
- import { u as L } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
4
- const S = 16, Y = 64;
5
- function O({
6
- edge: I,
7
- targetRef: e,
8
- cssProperty: d,
9
- minSize: i,
10
- maxSize: p,
11
- defaultSize: C,
12
- disabled: c = !1,
13
- onResize: n
14
- }) {
15
- const { t: b } = B(), [f, E] = X(null), [x, P] = X(!1), h = T(null), m = T(null);
16
- L(() => {
17
- const t = e.current;
18
- if (!t) return;
19
- const r = t.getBoundingClientRect().width;
20
- r > 0 && (h.current = r);
21
- });
22
- const y = o(
23
- (t) => Math.min(p, Math.max(i, t)),
24
- [i, p]
25
- ), s = o(() => {
26
- if (f !== null) return f;
27
- const t = e.current;
28
- if (t) {
29
- const r = t.getBoundingClientRect().width;
30
- if (r > 0)
31
- return h.current = r, r;
32
- }
33
- return h.current ?? C;
34
- }, [f, C, e]), a = o(
35
- (t) => {
36
- var u;
37
- const r = y(t);
38
- return E(r), (u = e.current) == null || u.style.setProperty(d, `${r}px`), r;
39
- },
40
- [y, d, e]
41
- ), w = o(() => {
42
- var t;
43
- E(null), (t = e.current) == null || t.style.removeProperty(d), h.current = null, n == null || n(null);
44
- }, [d, n, e]), g = o(() => {
45
- const t = e.current, r = t ? getComputedStyle(t).direction === "rtl" : !1;
46
- return (I === "inline-end" ? 1 : -1) * (r ? -1 : 1);
47
- }, [I, e]), A = o(
48
- (t) => {
49
- c || !t.isPrimary || (t.currentTarget.setPointerCapture(t.pointerId), m.current = {
50
- pointerId: t.pointerId,
51
- startX: t.clientX,
52
- startSize: s(),
53
- sign: g()
54
- }, P(!0));
55
- },
56
- [c, s, g]
57
- ), K = o(
58
- (t) => {
59
- const r = m.current;
60
- !r || t.pointerId !== r.pointerId || a(r.startSize + r.sign * (t.clientX - r.startX));
61
- },
62
- [a]
63
- ), k = o(
64
- (t) => {
65
- const r = m.current;
66
- if (!r || t.pointerId !== r.pointerId) return;
67
- t.currentTarget.releasePointerCapture(t.pointerId), m.current = null, P(!1);
68
- const u = a(
69
- r.startSize + r.sign * (t.clientX - r.startX)
70
- );
71
- n == null || n(u);
72
- },
73
- [a, n]
74
- ), M = o(
75
- (t) => {
76
- if (c) return;
77
- const r = t.shiftKey ? Y : S, u = g();
78
- let l = null;
79
- switch (t.key) {
80
- case "ArrowRight":
81
- l = s() + u * r;
82
- break;
83
- case "ArrowLeft":
84
- l = s() - u * r;
85
- break;
86
- case "Home":
87
- l = i;
88
- break;
89
- case "End":
90
- l = p;
91
- break;
92
- case "Enter":
93
- t.preventDefault(), w();
94
- return;
95
- default:
96
- return;
97
- }
98
- if (l === null) return;
99
- t.preventDefault();
100
- const _ = a(l);
101
- n == null || n(_);
102
- },
103
- [
104
- a,
105
- s,
106
- c,
107
- p,
108
- i,
109
- n,
110
- w,
111
- g
112
- ]
113
- ), D = Math.round(s());
114
- return {
115
- separatorProps: {
116
- role: "separator",
117
- tabIndex: c ? -1 : 0,
118
- "aria-orientation": "vertical",
119
- "aria-valuemin": i,
120
- "aria-valuemax": p,
121
- "aria-valuenow": D,
122
- "aria-valuetext": b("resizable.widthAnnounce", { width: D }),
123
- "aria-disabled": c || void 0,
124
- onPointerDown: A,
125
- onPointerMove: K,
126
- onPointerUp: k,
127
- onPointerCancel: k,
128
- onKeyDown: M,
129
- onDoubleClick: w
130
- },
131
- isResizing: x,
132
- isResized: f !== null,
133
- reset: w
134
- };
135
- }
136
- export {
137
- O as u
138
- };
139
- //# sourceMappingURL=use-edge-resize-ZnGG7gyO.js.map
@@ -1,32 +0,0 @@
1
- import { useRef as a, useState as m, useCallback as O } from "react";
2
- import { u as h } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
3
- function b(r = !0) {
4
- const u = a(null), [e, v] = m(null), R = O(
5
- (t) => {
6
- r && v(t);
7
- },
8
- [r]
9
- ), [d, c] = m(!1), o = a(null);
10
- return h(() => {
11
- if (!r) {
12
- o.current = null, c((n) => n && !1);
13
- return;
14
- }
15
- const t = u.current;
16
- if (!t) return;
17
- const i = () => {
18
- e && (o.current = e.scrollWidth);
19
- const n = o.current;
20
- if (n == null) return;
21
- const f = n - t.clientWidth > 1;
22
- c((l) => l === f ? l : f);
23
- };
24
- if (i(), typeof ResizeObserver > "u") return;
25
- const s = new ResizeObserver(i);
26
- return s.observe(t), e && s.observe(e), () => s.disconnect();
27
- }, [r, e]), { containerRef: u, contentRef: R, isOverflowing: d };
28
- }
29
- export {
30
- b as u
31
- };
32
- //# sourceMappingURL=use-overflow-collapse-BIOzKbni.js.map
@@ -1,27 +0,0 @@
1
- import { c as a } from "./createLucideIcon-DhHxpK9K.js";
2
- /**
3
- * @license lucide-react v1.22.0 - ISC
4
- *
5
- * This source code is licensed under the ISC license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */
8
- const e = [
9
- [
10
- "path",
11
- {
12
- d: "m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",
13
- key: "ul74o6"
14
- }
15
- ],
16
- ["path", { d: "m14 7 3 3", key: "1r5n42" }],
17
- ["path", { d: "M5 6v4", key: "ilb8ba" }],
18
- ["path", { d: "M19 14v4", key: "blhpug" }],
19
- ["path", { d: "M10 2v2", key: "7u0qdc" }],
20
- ["path", { d: "M7 8H3", key: "zfb6yr" }],
21
- ["path", { d: "M21 16h-4", key: "1cnmox" }],
22
- ["path", { d: "M11 3H9", key: "1obp7u" }]
23
- ], d = a("wand-sparkles", e);
24
- export {
25
- d as W
26
- };
27
- //# sourceMappingURL=wand-sparkles-DAjKyhz7.js.map