@aintela/chat 0.2.59 → 0.3.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 (109) hide show
  1. package/README.md +77 -0
  2. package/dist/{ClientMessage-EKgfuTp8.js → ClientMessage-DUby3KyC.js} +16 -22
  3. package/dist/{ClientMessage-EKgfuTp8.js.map → ClientMessage-DUby3KyC.js.map} +1 -1
  4. package/dist/Memory-CjrYSkzB.js +47 -0
  5. package/dist/Memory-CjrYSkzB.js.map +1 -0
  6. package/dist/atMentions-CnHuJKhX.js +959 -0
  7. package/dist/atMentions-CnHuJKhX.js.map +1 -0
  8. package/dist/components.js +10161 -11344
  9. package/dist/components.js.map +1 -1
  10. package/dist/environmentUtils-VZNTCzEE.js +88 -0
  11. package/dist/environmentUtils-VZNTCzEE.js.map +1 -0
  12. package/dist/hooks.js +4 -5
  13. package/dist/{httpArtifactService-CpbRpTHb.js → httpArtifactService-Ba9xFy1E.js} +537 -646
  14. package/dist/httpArtifactService-Ba9xFy1E.js.map +1 -0
  15. package/dist/{httpSessionService-BEQMIKfv.js → httpSessionService-DXlT2vxT.js} +34 -24
  16. package/dist/httpSessionService-DXlT2vxT.js.map +1 -0
  17. package/dist/index.js +242 -243
  18. package/dist/models.js +48 -51
  19. package/dist/models.js.map +1 -1
  20. package/dist/serializer-D2W42bdT.js +1730 -0
  21. package/dist/serializer-D2W42bdT.js.map +1 -0
  22. package/dist/services.js +2 -2
  23. package/dist/src/components/AiChat/AiChatContext.d.ts +0 -3
  24. package/dist/src/components/AiChat/AiChatProvider.agent.test.d.ts +1 -0
  25. package/dist/src/components/AiChat/AiChatProvider.d.ts +2 -2
  26. package/dist/src/components/AiChat/AiChatTypes.d.ts +45 -27
  27. package/dist/src/components/AiChat/ChatPane/ChatPane.test.d.ts +1 -0
  28. package/dist/src/components/AiChat/ChatPane/MessageAgent.d.ts +0 -1
  29. package/dist/src/components/AiChat/ChatPane/MessagePart.d.ts +5 -3
  30. package/dist/src/components/AiChat/ChatPane/MessagePart.test.d.ts +1 -0
  31. package/dist/src/components/AiChat/ChatPane/friendlyToolConfig.test.d.ts +1 -0
  32. package/dist/src/components/AiChat/ChatPane/messageAgentThoughts.test.d.ts +1 -0
  33. package/dist/src/components/AiChat/ChatPane/parts/ThoughtRun.d.ts +28 -0
  34. package/dist/src/components/AiChat/ChatPane/parts/ThoughtRunContext.d.ts +18 -0
  35. package/dist/src/components/AiChat/ChatPane/parts/index.d.ts +5 -1
  36. package/dist/src/components/AiChat/ChatPane/parts/thoughtRun.test.d.ts +1 -0
  37. package/dist/src/components/AiChat/ChatPane/parts/uiToolDispatcher.test.d.ts +1 -0
  38. package/dist/src/components/AiChat/ChatPane/parts/uiToolRegistry.test.d.ts +1 -0
  39. package/dist/src/components/AiChat/aiChatEngine.d.ts +24 -5
  40. package/dist/src/components/AiChat/index.d.ts +1 -3
  41. package/dist/src/components/AiChat/sessionStateManagerService.bind.test.d.ts +1 -0
  42. package/dist/src/components/AiChat/sessionStateManagerService.d.ts +22 -10
  43. package/dist/src/components/AiChat/useAgentEngine.d.ts +69 -0
  44. package/dist/src/components/AiChat/useAgentEngine.test.d.ts +1 -0
  45. package/dist/src/components/index.d.ts +4 -7
  46. package/dist/src/components/v2/AiChatFloating.d.ts +3 -0
  47. package/dist/src/components/v2/PromptV2.d.ts +21 -6
  48. package/dist/src/components/v2/PromptV2.test.d.ts +1 -0
  49. package/dist/src/components/v2/icons.d.ts +1 -0
  50. package/dist/src/components/v2/index.d.ts +25 -25
  51. package/dist/src/hooks/index.d.ts +1 -1
  52. package/dist/src/hooks/useContainerWidth.d.ts +0 -1
  53. package/dist/src/models/ArtifactData.d.ts +0 -7
  54. package/dist/src/models/ChatSession.d.ts +0 -32
  55. package/dist/src/models/ClientMessage.d.ts +0 -4
  56. package/dist/src/models/ServerEvent.d.ts +0 -36
  57. package/dist/src/models/enums.d.ts +0 -1
  58. package/dist/src/models/index.d.ts +1 -2
  59. package/dist/src/models/interactionPartUtils.test.d.ts +1 -0
  60. package/dist/src/models/semanticKernelModel/sanitizeJsonString.test.d.ts +0 -0
  61. package/dist/src/models/serverEventDecode.test.d.ts +0 -0
  62. package/dist/src/services/WebSocketConnection/webSocketConnectionV2.reconnect.test.d.ts +0 -0
  63. package/dist/src/services/interactionService.d.ts +11 -0
  64. package/dist/src/services/interactionServiceGrouping.test.d.ts +1 -0
  65. package/dist/src/services/servers/AgentGatewayService.d.ts +25 -18
  66. package/dist/src/services/servers/AgentGatewayWSAsync.d.ts +0 -1
  67. package/dist/src/services/servers/agentGatewayAgentContext.test.d.ts +1 -0
  68. package/dist/src/services/storageService.d.ts +34 -59
  69. package/dist/src/services/storageService.test.d.ts +1 -0
  70. package/dist/src/utils/index.d.ts +2 -6
  71. package/dist/src/utils/urlParser.d.ts +0 -1
  72. package/dist/src/utils/urlParser.test.d.ts +1 -0
  73. package/dist/tests/fakes/fakeChatServices.d.ts +42 -0
  74. package/dist/tests/fakes/fakeRawWebSocket.d.ts +51 -0
  75. package/dist/tests/fakes/fakeStorage.d.ts +7 -0
  76. package/dist/tests/fakes/makeGateway.d.ts +24 -1
  77. package/dist/{useChatSessions-BQP7DhY1.js → useChatSessions-1AAvAdPW.js} +2 -2
  78. package/dist/{useChatSessions-BQP7DhY1.js.map → useChatSessions-1AAvAdPW.js.map} +1 -1
  79. package/dist/useContainerWidth-B40_i-NW.js +295 -0
  80. package/dist/{useContainerWidth-B3t1ZTlo.js.map → useContainerWidth-B40_i-NW.js.map} +1 -1
  81. package/dist/utils.js +340 -57
  82. package/dist/utils.js.map +1 -1
  83. package/package.json +1 -1
  84. package/dist/Memory-DjLZqgbF.js +0 -84
  85. package/dist/Memory-DjLZqgbF.js.map +0 -1
  86. package/dist/atMentions-C0dza8DD.js +0 -1000
  87. package/dist/atMentions-C0dza8DD.js.map +0 -1
  88. package/dist/auth-lluJZyQO.js +0 -524
  89. package/dist/auth-lluJZyQO.js.map +0 -1
  90. package/dist/environmentUtils-CUVZ6Dq1.js +0 -478
  91. package/dist/environmentUtils-CUVZ6Dq1.js.map +0 -1
  92. package/dist/httpArtifactService-CpbRpTHb.js.map +0 -1
  93. package/dist/httpSessionService-BEQMIKfv.js.map +0 -1
  94. package/dist/serializer-BXSH9aYQ.js +0 -1360
  95. package/dist/serializer-BXSH9aYQ.js.map +0 -1
  96. package/dist/src/components/AiChat/AiChatFloating.d.ts +0 -3
  97. package/dist/src/components/AiChat/ChatPane/LastPrompts.d.ts +0 -9
  98. package/dist/src/components/AiChat/ChatPane/Prompt.d.ts +0 -9
  99. package/dist/src/components/AiChat/ChatPane/SubAgentBox.d.ts +0 -9
  100. package/dist/src/components/AiChat/ChatPane/TaskList.d.ts +0 -6
  101. package/dist/src/components/AiChat/useLiveSession.d.ts +0 -52
  102. package/dist/src/components/v2/AiChatFloatingV2.d.ts +0 -3
  103. package/dist/src/utils/jsonDetector.d.ts +0 -50
  104. package/dist/src/utils/jsonUtils.d.ts +0 -1
  105. package/dist/src/utils/materialIconsSvg.d.ts +0 -51
  106. package/dist/src/utils/objectUtils.d.ts +0 -31
  107. package/dist/src/utils/parseArtifact.d.ts +0 -3
  108. package/dist/src/utils/uriUtils.d.ts +0 -39
  109. package/dist/useContainerWidth-B3t1ZTlo.js +0 -309
@@ -1,309 +0,0 @@
1
- var Qt = Object.defineProperty;
2
- var C = (l, i) => Qt(l, "name", { value: i, configurable: !0 });
3
- import { useState as $, useRef as o, useCallback as x, useEffect as j } from "react";
4
- const mt = /* @__PURE__ */ C(() => ({
5
- maxLocationConfidence: 0,
6
- maxPersonConfidence: 0,
7
- locationGateFired: !1,
8
- suggestionAccepted: !1,
9
- ghostShown: !1,
10
- ghostAccepted: !1,
11
- atOpened: !1,
12
- atAccepted: null,
13
- manualAt: !1
14
- }), "emptyOutcome"), Pt = /* @__PURE__ */ C(() => typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : `s-${Date.now()}-${Math.random()}`, "newSessionId"), Et = /* @__PURE__ */ C((l, i, p) => {
15
- var d;
16
- const s = l.length;
17
- let r = i;
18
- for (let f = 0; f < s; f++)
19
- if (r = (r + p + s) % s, !((d = l[r]) != null && d.disabled)) return r;
20
- return i;
21
- }, "nextEnabledIndex"), Xt = /* @__PURE__ */ C((l) => {
22
- const i = /* @__PURE__ */ new Date();
23
- i.setDate(i.getDate() + l);
24
- const p = String(i.getDate()).padStart(2, "0"), s = String(i.getMonth() + 1).padStart(2, "0");
25
- return `${p}/${s}/${i.getFullYear()}`;
26
- }, "plusDaysBR");
27
- function Vt(l, i, p = {}) {
28
- const [s, r] = $(null), [d, f] = $(null), [F, S] = $(0), [Q, ot] = $(0), [z, ct] = $(!1), [st, H] = $(0), [It, yt] = $([]), [Lt, Rt] = $([]), [Ht, it] = $(""), X = o(""), B = o(null), Y = o(l);
29
- Y.current = l;
30
- const O = o(i);
31
- O.current = i;
32
- const lt = o(p);
33
- lt.current = p;
34
- const U = o(null), W = o(null), $t = o(0), wt = o(0), at = o(null), Z = o(""), K = o(null), ut = o(null), ft = o(Pt()), M = o(null);
35
- M.current = s;
36
- const J = o(null);
37
- J.current = d;
38
- const V = o(0), tt = o(null), et = o(!1), Ot = 8, qt = 0.5, G = o(null), bt = o(""), vt = o(() => {
39
- }), D = o(mt()), L = o(!1), Ft = x(() => r(null), []), zt = x(() => {
40
- yt([]), Rt([]), it(""), X.current = "", K.current = null, ft.current = Pt(), D.current = mt(), L.current = !1, V.current = 0, tt.current = null, et.current = !1, f(null);
41
- }, []), dt = x((t) => {
42
- if (t.disabled) return;
43
- D.current.suggestionAccepted = !0, t.kind === "location" && (L.current = !0), r(null);
44
- const n = Y.current, g = n.getTextarea();
45
- if (!g) return;
46
- const m = g.selectionStart ?? g.value.length, y = g.value.slice(0, m), P = g.value.slice(m), T = t.kind === "namedLocation" || t.kind === "location";
47
- let e;
48
- if (T) {
49
- const u = bt.current, w = y.replace(/\s+$/, "");
50
- e = u && w.endsWith(u) ? w.slice(0, w.length - u.length) : y;
51
- } else {
52
- const u = y.search(/\S+$/);
53
- e = u === -1 ? y : y.slice(0, u);
54
- }
55
- const h = e.length > 0 && !/\s$/.test(e);
56
- if (t.kind === "date") {
57
- const u = `${h ? " " : ""}${t.insert} `, w = `${e}${u}${P}`;
58
- n.setDraft(w), n.focusCaret(e.length + u.length), Z.current = w, K.current = null, vt.current();
59
- return;
60
- }
61
- if (t.kind === "namedLocation" && t.insert) {
62
- const u = `@${t.insert.replace(/ /g, " ")}`, w = `${h ? " " : ""}${u} `;
63
- n.setDraft(`${e}${w}${P}`), n.focusCaret(e.length + w.length);
64
- return;
65
- }
66
- const a = t.kind === "location" ? "@" : "#", k = `${h ? " " : ""}${a}`;
67
- n.setDraft(`${e}${k}${P}`), n.focusCaret(e.length + k.length), requestAnimationFrame(() => {
68
- const u = n.getTextarea();
69
- u && n.syncTrigger(u);
70
- });
71
- }, []), gt = x(async () => {
72
- var y;
73
- const t = O.current.resolveDates;
74
- if (!t) return;
75
- const n = Z.current;
76
- if (n.trim() === "") {
77
- K.current = null;
78
- return;
79
- }
80
- if (n === K.current || n.split(" ").length <= 2) return;
81
- K.current = n, (y = ut.current) == null || y.abort();
82
- const m = new AbortController();
83
- ut.current = m;
84
- try {
85
- const { dates: P, locations: T } = await t(n, ft.current, m.signal);
86
- if (Z.current !== n) return;
87
- const e = P.filter((a) => a.display).map((a) => ({ text: a.text, display: a.display }));
88
- Rt(e), yt(T.map((a) => a.text).filter((a) => a.trim().length > 0));
89
- const h = e.map((a) => `${a.text}=${a.display}`).join("|");
90
- e.length > 0 && h !== X.current && (X.current = h, it(e[e.length - 1].text), B.current != null && window.clearTimeout(B.current), B.current = window.setTimeout(() => it(""), 2e3)), e.length === 0 && (X.current = "");
91
- } catch {
92
- }
93
- }, []);
94
- vt.current = gt;
95
- const Bt = x((t, n, g) => {
96
- if (Z.current = t, J.current !== null && (V.current += 1, V.current >= Ot && (et.current = !0, f(null))), t.split(" ").length <= 2) return;
97
- const y = O.current.analyze;
98
- y && (!g || M.current !== null || J.current !== null) && (U.current != null && window.clearTimeout(U.current), U.current = window.setTimeout(async () => {
99
- var T;
100
- const P = ++$t.current;
101
- try {
102
- const e = await y(t, n);
103
- if (P !== $t.current) return;
104
- const h = Y.current, a = h.getTextarea();
105
- if (!a || a.value !== t) return;
106
- ot(e.personConfidence ?? 0), S(e.locationConfidence ?? 0);
107
- const k = D.current;
108
- k.maxPersonConfidence = Math.max(k.maxPersonConfidence, e.personConfidence ?? 0), k.maxLocationConfidence = Math.max(k.maxLocationConfidence, e.locationConfidence ?? 0), f(null);
109
- const u = (a.selectionStart ?? n) === t.length, w = h.hasAtQuery, Ct = h.isPickerOpen(), kt = e.suggestions ?? [], { enableHashDatePicker: Gt = !1, datePresets: Nt = ["amanhã de manhã", "quarta-feira à noite"] } = lt.current;
110
- let E = e.category === "location" ? "location" : e.category === "date" ? "date" : e.locationExpected ? "location" : e.dateExpected ? "date" : null;
111
- if (E !== "location" && e.locationCount < 2 && O.current.suggest && M.current !== null && G.current === "location" && u && /\s$/.test(t) && (E = "location"), lt.current.promptHint && u && !Ct) {
112
- const c = e.personConfidence ?? 0, A = e.locationConfidence ?? 0, N = E === "location" && !(e.locationCount >= 2 && e.locationPartialEmpty), v = c >= qt && c >= A ? "person" : N ? "location" : null;
113
- if (v) {
114
- et.current || (tt.current = v, f(v), k.ghostShown = !0, v === "location" && (k.locationGateFired = !0)), r(null), G.current = null;
115
- return;
116
- }
117
- tt.current = null;
118
- }
119
- if (E === "location" && e.locationCount >= 2 && e.locationPartialEmpty) {
120
- r(null), G.current = null;
121
- return;
122
- }
123
- if (E === null || !(u && !Ct && (E === "location" ? w : E === "date"))) {
124
- r(null), G.current = null;
125
- return;
126
- }
127
- const b = E;
128
- G.current = b, b === "location" && (k.locationGateFired = !0);
129
- const pt = /* @__PURE__ */ C(() => b === "date" && Gt ? [{ key: "cal", label: `📅 no dia #${Xt(2)}`, kind: "calendar" }] : [], "genericTail"), xt = kt.filter((c) => c.kind === "location"), Tt = kt.filter((c) => c.kind === "date").map((c) => c.value), I = [];
130
- if (b === "location") {
131
- for (const c of xt)
132
- I.push({ key: `loc:${c.value}`, label: `📍 ${c.label}`, kind: "namedLocation", insert: c.value });
133
- I.push(...pt());
134
- } else {
135
- for (const c of Tt.length > 0 ? Tt : Nt)
136
- I.push({ key: `date:${c}`, label: `📅 ${c}`, kind: "date", insert: c });
137
- I.push(...pt());
138
- }
139
- const nt = O.current.suggest, _t = b === "location" ? xt.length > 0 : !0;
140
- if (b === "location" && !_t && !nt) {
141
- if (!g && e.locationExpected && e.locationPartialEmpty && e.locationCount < 2 && w && h.currentTriggerChar() !== "@") {
142
- const c = a.selectionStart ?? t.length, A = t.slice(0, c), N = A.length > 0 && !/\s$/.test(A);
143
- if (!A.endsWith("@")) {
144
- const v = N ? " @" : "@";
145
- L.current = !0, r(null), h.setDraft(`${A}${v}${t.slice(c)}`), h.focusCaret(c + v.length), requestAnimationFrame(() => {
146
- const rt = h.getTextarea();
147
- rt && h.syncTrigger(rt);
148
- });
149
- }
150
- return;
151
- }
152
- r(null);
153
- return;
154
- }
155
- if (nt ? M.current === null && I.length > 0 && (H(0), ct(!0), r(I)) : I.length > 0 ? (H(0), ct(!0), r(I)) : r(null), nt) {
156
- const c = t.slice(0, a.selectionStart ?? t.length), A = c.search(/[ \t\r\n](?=[^ \t\r\n]*$)/), N = A === -1 ? c : c.slice(A + 1), v = b === "location" && e.locationPartial !== void 0 ? e.locationPartial : N;
157
- b === "location" && (bt.current = v);
158
- const rt = b === "location" ? [...t.matchAll(/@\(([A-Za-z]{3})\)/g)].map((_) => _[1].toUpperCase()) : void 0, jt = ++wt.current;
159
- (T = at.current) == null || T.abort();
160
- const At = new AbortController();
161
- at.current = At;
162
- try {
163
- const _ = await nt(v, b, At.signal, rt);
164
- if (jt !== wt.current) return;
165
- const St = h.getTextarea();
166
- if (!St || St.value !== t || b === "location" && _.length === 0) return;
167
- const q = [];
168
- if (b === "location")
169
- for (const R of _)
170
- q.push({
171
- key: `loc:${R.insert}`,
172
- label: `📍 ${R.label}`,
173
- kind: "namedLocation",
174
- insert: R.insert,
175
- hint: [R.iata, R.region, R.country].filter(Boolean).join(" · ") || void 0,
176
- // parity with the `@` picker
177
- disabled: R.disabled
178
- // already in the prompt (same city) — greyed, not pickable
179
- });
180
- else
181
- for (const R of _)
182
- q.push({ key: `date:${R.insert}`, label: `📅 ${R.label}`, kind: "date", insert: R.insert });
183
- if (q.push(...pt()), q.length === 0) {
184
- r(null);
185
- return;
186
- }
187
- const Dt = q.findIndex((R) => !R.disabled);
188
- H(Dt < 0 ? 0 : Dt), ct(v.trim() === ""), r(q);
189
- } catch {
190
- }
191
- }
192
- } catch {
193
- }
194
- }, 200)), W.current != null && window.clearTimeout(W.current), W.current = window.setTimeout(() => {
195
- gt();
196
- }, 300);
197
- }, [gt]), Ut = x((t) => {
198
- var g, m;
199
- const n = t.trim();
200
- n && ((m = (g = O.current).commitIntent) == null || m.call(g, n, ft.current, D.current)), D.current = mt(), L.current = !1;
201
- }, []), Wt = x(() => {
202
- const t = D.current;
203
- t.atOpened = !0, L.current ? L.current = !1 : J.current === null && M.current === null && (t.manualAt = !0);
204
- }, []), Kt = x((t) => {
205
- D.current.atAccepted = t ?? "location";
206
- }, []), ht = x(() => {
207
- D.current.ghostAccepted = !0, L.current = !0, V.current = 0, tt.current = null, f(null);
208
- const t = Y.current, n = t.getTextarea();
209
- if (!n) return;
210
- const g = n.selectionStart ?? n.value.length, m = n.value.slice(0, g), y = n.value.slice(g), T = `${m.length > 0 && !/\s$/.test(m) ? " " : ""}@`;
211
- t.setDraft(`${m}${T}${y}`), t.focusCaret(g + T.length), requestAnimationFrame(() => {
212
- const e = t.getTextarea();
213
- e && t.syncTrigger(e);
214
- });
215
- }, []), Mt = x((t) => {
216
- if (d !== null && (!s || s.length === 0)) {
217
- if (t.key === "Tab" || t.key === "ArrowRight")
218
- return t.preventDefault(), ht(), !0;
219
- if (t.key === "Escape")
220
- return t.preventDefault(), et.current = !0, f(null), !0;
221
- }
222
- if (!s || s.length === 0) return !1;
223
- if (t.key === "ArrowDown")
224
- return t.preventDefault(), H((n) => Et(s, n, 1)), !0;
225
- if (t.key === "ArrowUp")
226
- return t.preventDefault(), H((n) => Et(s, n, -1)), !0;
227
- if (t.key === "Enter" || t.key === "Tab") {
228
- t.preventDefault();
229
- const n = s[st];
230
- return n && !n.disabled && dt(n), !0;
231
- }
232
- return t.key === "Escape" ? (t.preventDefault(), r(null), !0) : !1;
233
- }, [s, st, dt, d, ht]);
234
- return j(() => () => {
235
- var t, n;
236
- U.current != null && window.clearTimeout(U.current), W.current != null && window.clearTimeout(W.current), B.current != null && window.clearTimeout(B.current), (t = ut.current) == null || t.abort(), (n = at.current) == null || n.abort();
237
- }, []), {
238
- predictions: s,
239
- predictionsRecents: z,
240
- predictionHighlight: st,
241
- setPredictionHighlight: H,
242
- applyPrediction: dt,
243
- clearPredictions: Ft,
244
- hint: d,
245
- acceptHint: ht,
246
- resolvedLocations: It,
247
- resolvedDates: Lt,
248
- forceTooltipText: Ht,
249
- personConfidence: Q,
250
- locationConfidence: F,
251
- scheduleAssist: Bt,
252
- commit: Ut,
253
- onKeyDown: Mt,
254
- resetSession: zt,
255
- noteAtOpened: Wt,
256
- noteAtAccepted: Kt
257
- };
258
- }
259
- C(Vt, "usePromptAssist");
260
- function te(l, i) {
261
- const p = o(l), [s, r] = $(null);
262
- return j(() => {
263
- p.current = l;
264
- }, [l]), j(() => {
265
- function d() {
266
- p.current();
267
- }
268
- if (C(d, "tick"), i !== null) {
269
- const f = setInterval(d, i);
270
- return r(f), () => {
271
- clearInterval(f);
272
- };
273
- }
274
- }, [i]), s;
275
- }
276
- C(te, "useInterval");
277
- function ee(l, i, p = 0) {
278
- const [s, r] = $(p);
279
- return j(() => {
280
- const d = l.current;
281
- if (!d) return;
282
- const f = new ResizeObserver((F) => {
283
- const S = F[0];
284
- S && r(S.contentRect.width);
285
- });
286
- return f.observe(d), r(d.getBoundingClientRect().width), () => f.disconnect();
287
- }, [l, i]), s;
288
- }
289
- C(ee, "useContainerWidth");
290
- function ne(l, i, p = 0, s = 0) {
291
- const [r, d] = $(p), [f, F] = $(s);
292
- return j(() => {
293
- const S = l.current;
294
- if (!S) return;
295
- const Q = new ResizeObserver((ot) => {
296
- const z = ot[0];
297
- z && (F(z.contentRect.height), d(z.contentRect.width));
298
- });
299
- return Q.observe(S), d(S.getBoundingClientRect().width), () => Q.disconnect();
300
- }, [l, i]), [r, f];
301
- }
302
- C(ne, "useContainerRectangle");
303
- export {
304
- ee as a,
305
- te as b,
306
- Vt as c,
307
- ne as u
308
- };
309
- //# sourceMappingURL=useContainerWidth-B3t1ZTlo.js.map