@marimo-team/islands 0.24.3-dev2 → 0.24.3-dev4

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.
@@ -27,23 +27,23 @@ var S = /* @__PURE__ */ e(c(), 1), C = u(), w = "Dialog", [oe, se] = x(w), [ce,
27
27
  });
28
28
  };
29
29
  le.displayName = w;
30
- var ue = "DialogTrigger", E = S.forwardRef((e, t) => {
30
+ var ue = "DialogTrigger", de = S.forwardRef((e, t) => {
31
31
  let { __scopeDialog: n, ...r } = e, i = T(ue, n), o = a(t, i.triggerRef);
32
32
  return /* @__PURE__ */ (0, C.jsx)(y.button, {
33
33
  type: "button",
34
34
  "aria-haspopup": "dialog",
35
35
  "aria-expanded": i.open,
36
36
  "aria-controls": i.contentId,
37
- "data-state": V(i.open),
37
+ "data-state": L(i.open),
38
38
  ...r,
39
39
  ref: o,
40
40
  onClick: h(e.onClick, i.onOpenToggle)
41
41
  });
42
42
  });
43
- E.displayName = ue;
44
- var D = "DialogPortal", [de, O] = oe(D, { forceMount: void 0 }), k = (e) => {
45
- let { __scopeDialog: t, forceMount: n, children: r, container: i } = e, a = T(D, t);
46
- return /* @__PURE__ */ (0, C.jsx)(de, {
43
+ de.displayName = ue;
44
+ var E = "DialogPortal", [fe, pe] = oe(E, { forceMount: void 0 }), me = (e) => {
45
+ let { __scopeDialog: t, forceMount: n, children: r, container: i } = e, a = T(E, t);
46
+ return /* @__PURE__ */ (0, C.jsx)(fe, {
47
47
  scope: t,
48
48
  forceMount: n,
49
49
  children: S.Children.map(r, (e) => /* @__PURE__ */ (0, C.jsx)(g, {
@@ -56,26 +56,26 @@ var D = "DialogPortal", [de, O] = oe(D, { forceMount: void 0 }), k = (e) => {
56
56
  }))
57
57
  });
58
58
  };
59
- k.displayName = D;
60
- var A = "DialogOverlay", j = S.forwardRef((e, t) => {
61
- let n = O(A, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = T(A, e.__scopeDialog);
59
+ me.displayName = E;
60
+ var D = "DialogOverlay", O = S.forwardRef((e, t) => {
61
+ let n = pe(D, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = T(D, e.__scopeDialog);
62
62
  return a.modal ? /* @__PURE__ */ (0, C.jsx)(g, {
63
63
  present: r || a.open,
64
- children: /* @__PURE__ */ (0, C.jsx)(pe, {
64
+ children: /* @__PURE__ */ (0, C.jsx)(ge, {
65
65
  ...i,
66
66
  ref: t
67
67
  })
68
68
  }) : null;
69
69
  });
70
- j.displayName = A;
71
- var fe = s("DialogOverlay.RemoveScroll"), pe = S.forwardRef((e, t) => {
72
- let { __scopeDialog: n, ...r } = e, i = T(A, n);
70
+ O.displayName = D;
71
+ var he = s("DialogOverlay.RemoveScroll"), ge = S.forwardRef((e, t) => {
72
+ let { __scopeDialog: n, ...r } = e, i = T(D, n);
73
73
  return /* @__PURE__ */ (0, C.jsx)(te, {
74
- as: fe,
74
+ as: he,
75
75
  allowPinchZoom: !0,
76
76
  shards: [i.contentRef],
77
77
  children: /* @__PURE__ */ (0, C.jsx)(y.div, {
78
- "data-state": V(i.open),
78
+ "data-state": L(i.open),
79
79
  ...r,
80
80
  ref: t,
81
81
  style: {
@@ -84,26 +84,26 @@ var fe = s("DialogOverlay.RemoveScroll"), pe = S.forwardRef((e, t) => {
84
84
  }
85
85
  })
86
86
  });
87
- }), M = "DialogContent", N = S.forwardRef((e, t) => {
88
- let n = O(M, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = T(M, e.__scopeDialog);
87
+ }), k = "DialogContent", _e = S.forwardRef((e, t) => {
88
+ let n = pe(k, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = T(k, e.__scopeDialog);
89
89
  return /* @__PURE__ */ (0, C.jsx)(g, {
90
90
  present: r || a.open,
91
- children: a.modal ? /* @__PURE__ */ (0, C.jsx)(me, {
91
+ children: a.modal ? /* @__PURE__ */ (0, C.jsx)(ve, {
92
92
  ...i,
93
93
  ref: t
94
- }) : /* @__PURE__ */ (0, C.jsx)(he, {
94
+ }) : /* @__PURE__ */ (0, C.jsx)(ye, {
95
95
  ...i,
96
96
  ref: t
97
97
  })
98
98
  });
99
99
  });
100
- N.displayName = M;
101
- var me = S.forwardRef((e, t) => {
102
- let n = T(M, e.__scopeDialog), r = S.useRef(null), i = a(t, n.contentRef, r);
100
+ _e.displayName = k;
101
+ var ve = S.forwardRef((e, t) => {
102
+ let n = T(k, e.__scopeDialog), r = S.useRef(null), i = a(t, n.contentRef, r);
103
103
  return S.useEffect(() => {
104
104
  let e = r.current;
105
105
  if (e) return ae(e);
106
- }, []), /* @__PURE__ */ (0, C.jsx)(P, {
106
+ }, []), /* @__PURE__ */ (0, C.jsx)(A, {
107
107
  ...e,
108
108
  ref: i,
109
109
  trapFocus: n.open,
@@ -117,9 +117,9 @@ var me = S.forwardRef((e, t) => {
117
117
  }),
118
118
  onFocusOutside: h(e.onFocusOutside, (e) => e.preventDefault())
119
119
  });
120
- }), he = S.forwardRef((e, t) => {
121
- let n = T(M, e.__scopeDialog), r = S.useRef(!1), i = S.useRef(!1);
122
- return /* @__PURE__ */ (0, C.jsx)(P, {
120
+ }), ye = S.forwardRef((e, t) => {
121
+ let n = T(k, e.__scopeDialog), r = S.useRef(!1), i = S.useRef(!1);
122
+ return /* @__PURE__ */ (0, C.jsx)(A, {
123
123
  ...e,
124
124
  ref: t,
125
125
  trapFocus: !1,
@@ -133,8 +133,8 @@ var me = S.forwardRef((e, t) => {
133
133
  n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
134
134
  }
135
135
  });
136
- }), P = S.forwardRef((e, t) => {
137
- let { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: i, onCloseAutoFocus: o, ...s } = e, c = T(M, n), l = S.useRef(null), u = a(t, l);
136
+ }), A = S.forwardRef((e, t) => {
137
+ let { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: i, onCloseAutoFocus: o, ...s } = e, c = T(k, n), l = S.useRef(null), u = a(t, l);
138
138
  return ne(), /* @__PURE__ */ (0, C.jsxs)(C.Fragment, { children: [/* @__PURE__ */ (0, C.jsx)(_, {
139
139
  asChild: !0,
140
140
  loop: !0,
@@ -146,35 +146,35 @@ var me = S.forwardRef((e, t) => {
146
146
  id: c.contentId,
147
147
  "aria-describedby": c.descriptionId,
148
148
  "aria-labelledby": c.titleId,
149
- "data-state": V(c.open),
149
+ "data-state": L(c.open),
150
150
  ...s,
151
151
  ref: u,
152
152
  onDismiss: () => c.onOpenChange(!1)
153
153
  })
154
- }), /* @__PURE__ */ (0, C.jsxs)(C.Fragment, { children: [/* @__PURE__ */ (0, C.jsx)(_e, { titleId: c.titleId }), /* @__PURE__ */ (0, C.jsx)(ye, {
154
+ }), /* @__PURE__ */ (0, C.jsxs)(C.Fragment, { children: [/* @__PURE__ */ (0, C.jsx)(xe, { titleId: c.titleId }), /* @__PURE__ */ (0, C.jsx)(Ce, {
155
155
  contentRef: l,
156
156
  descriptionId: c.descriptionId
157
157
  })] })] });
158
- }), F = "DialogTitle", I = S.forwardRef((e, t) => {
159
- let { __scopeDialog: n, ...r } = e, i = T(F, n);
158
+ }), j = "DialogTitle", M = S.forwardRef((e, t) => {
159
+ let { __scopeDialog: n, ...r } = e, i = T(j, n);
160
160
  return /* @__PURE__ */ (0, C.jsx)(y.h2, {
161
161
  id: i.titleId,
162
162
  ...r,
163
163
  ref: t
164
164
  });
165
165
  });
166
- I.displayName = F;
167
- var L = "DialogDescription", R = S.forwardRef((e, t) => {
168
- let { __scopeDialog: n, ...r } = e, i = T(L, n);
166
+ M.displayName = j;
167
+ var N = "DialogDescription", P = S.forwardRef((e, t) => {
168
+ let { __scopeDialog: n, ...r } = e, i = T(N, n);
169
169
  return /* @__PURE__ */ (0, C.jsx)(y.p, {
170
170
  id: i.descriptionId,
171
171
  ...r,
172
172
  ref: t
173
173
  });
174
174
  });
175
- R.displayName = L;
176
- var z = "DialogClose", B = S.forwardRef((e, t) => {
177
- let { __scopeDialog: n, ...r } = e, i = T(z, n);
175
+ P.displayName = N;
176
+ var F = "DialogClose", I = S.forwardRef((e, t) => {
177
+ let { __scopeDialog: n, ...r } = e, i = T(F, n);
178
178
  return /* @__PURE__ */ (0, C.jsx)(y.button, {
179
179
  type: "button",
180
180
  ...r,
@@ -182,16 +182,16 @@ var z = "DialogClose", B = S.forwardRef((e, t) => {
182
182
  onClick: h(e.onClick, () => i.onOpenChange(!1))
183
183
  });
184
184
  });
185
- B.displayName = z;
186
- function V(e) {
185
+ I.displayName = F;
186
+ function L(e) {
187
187
  return e ? "open" : "closed";
188
188
  }
189
- var H = "DialogTitleWarning", [ge, U] = ee(H, {
190
- contentName: M,
191
- titleName: F,
189
+ var R = "DialogTitleWarning", [be, z] = ee(R, {
190
+ contentName: k,
191
+ titleName: j,
192
192
  docsSlug: "dialog"
193
- }), _e = ({ titleId: e }) => {
194
- let t = U(H), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
193
+ }), xe = ({ titleId: e }) => {
194
+ let t = z(R), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
195
195
 
196
196
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
197
197
 
@@ -199,8 +199,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
199
199
  return S.useEffect(() => {
200
200
  e && (document.getElementById(e) || console.error(n));
201
201
  }, [n, e]), null;
202
- }, ve = "DialogDescriptionWarning", ye = ({ contentRef: e, descriptionId: t }) => {
203
- let n = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${U(ve).contentName}}.`;
202
+ }, Se = "DialogDescriptionWarning", Ce = ({ contentRef: e, descriptionId: t }) => {
203
+ let n = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${z(Se).contentName}}.`;
204
204
  return S.useEffect(() => {
205
205
  let r = e.current?.getAttribute("aria-describedby");
206
206
  t && r && (document.getElementById(t) || console.warn(n));
@@ -209,51 +209,51 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
209
209
  e,
210
210
  t
211
211
  ]), null;
212
- }, W = le, be = E, G = k, K = j, q = N, xe = I, Se = R, Ce = B, we = "AlertDialog", [Te, Ee] = x(we, [se]), J = se(), De = (e) => {
213
- let { __scopeAlertDialog: t, ...n } = e, r = J(t);
214
- return /* @__PURE__ */ (0, C.jsx)(W, {
212
+ }, we = le, Te = de, Ee = me, De = O, Oe = _e, ke = M, Ae = P, B = I, je = "AlertDialog", [Me, Ne] = x(je, [se]), V = se(), Pe = (e) => {
213
+ let { __scopeAlertDialog: t, ...n } = e, r = V(t);
214
+ return /* @__PURE__ */ (0, C.jsx)(we, {
215
215
  ...r,
216
216
  ...n,
217
217
  modal: !0
218
218
  });
219
219
  };
220
- De.displayName = we;
221
- var Oe = "AlertDialogTrigger", ke = S.forwardRef((e, t) => {
222
- let { __scopeAlertDialog: n, ...r } = e, i = J(n);
223
- return /* @__PURE__ */ (0, C.jsx)(be, {
220
+ Pe.displayName = je;
221
+ var Fe = "AlertDialogTrigger", Ie = S.forwardRef((e, t) => {
222
+ let { __scopeAlertDialog: n, ...r } = e, i = V(n);
223
+ return /* @__PURE__ */ (0, C.jsx)(Te, {
224
224
  ...i,
225
225
  ...r,
226
226
  ref: t
227
227
  });
228
228
  });
229
- ke.displayName = Oe;
230
- var Ae = "AlertDialogPortal", je = (e) => {
231
- let { __scopeAlertDialog: t, ...n } = e, r = J(t);
232
- return /* @__PURE__ */ (0, C.jsx)(G, {
229
+ Ie.displayName = Fe;
230
+ var Le = "AlertDialogPortal", Re = (e) => {
231
+ let { __scopeAlertDialog: t, ...n } = e, r = V(t);
232
+ return /* @__PURE__ */ (0, C.jsx)(Ee, {
233
233
  ...r,
234
234
  ...n
235
235
  });
236
236
  };
237
- je.displayName = Ae;
238
- var Me = "AlertDialogOverlay", Ne = S.forwardRef((e, t) => {
239
- let { __scopeAlertDialog: n, ...r } = e, i = J(n);
240
- return /* @__PURE__ */ (0, C.jsx)(K, {
237
+ Re.displayName = Le;
238
+ var ze = "AlertDialogOverlay", Be = S.forwardRef((e, t) => {
239
+ let { __scopeAlertDialog: n, ...r } = e, i = V(n);
240
+ return /* @__PURE__ */ (0, C.jsx)(De, {
241
241
  ...i,
242
242
  ...r,
243
243
  ref: t
244
244
  });
245
245
  });
246
- Ne.displayName = Me;
247
- var Y = "AlertDialogContent", [Pe, Fe] = Te(Y), Ie = t("AlertDialogContent"), Le = S.forwardRef((e, t) => {
248
- let { __scopeAlertDialog: n, children: r, ...i } = e, o = J(n), s = S.useRef(null), c = a(t, s), l = S.useRef(null);
249
- return /* @__PURE__ */ (0, C.jsx)(ge, {
250
- contentName: Y,
251
- titleName: Re,
246
+ Be.displayName = ze;
247
+ var H = "AlertDialogContent", [Ve, He] = Me(H), Ue = t("AlertDialogContent"), We = S.forwardRef((e, t) => {
248
+ let { __scopeAlertDialog: n, children: r, ...i } = e, o = V(n), s = S.useRef(null), c = a(t, s), l = S.useRef(null);
249
+ return /* @__PURE__ */ (0, C.jsx)(be, {
250
+ contentName: H,
251
+ titleName: Ge,
252
252
  docsSlug: "alert-dialog",
253
- children: /* @__PURE__ */ (0, C.jsx)(Pe, {
253
+ children: /* @__PURE__ */ (0, C.jsx)(Ve, {
254
254
  scope: n,
255
255
  cancelRef: l,
256
- children: /* @__PURE__ */ (0, C.jsxs)(q, {
256
+ children: /* @__PURE__ */ (0, C.jsxs)(Oe, {
257
257
  role: "alertdialog",
258
258
  ...o,
259
259
  ...i,
@@ -263,62 +263,62 @@ var Y = "AlertDialogContent", [Pe, Fe] = Te(Y), Ie = t("AlertDialogContent"), Le
263
263
  }),
264
264
  onPointerDownOutside: (e) => e.preventDefault(),
265
265
  onInteractOutside: (e) => e.preventDefault(),
266
- children: [/* @__PURE__ */ (0, C.jsx)(Ie, { children: r }), /* @__PURE__ */ (0, C.jsx)(Ke, { contentRef: s })]
266
+ children: [/* @__PURE__ */ (0, C.jsx)(Ue, { children: r }), /* @__PURE__ */ (0, C.jsx)($e, { contentRef: s })]
267
267
  })
268
268
  })
269
269
  });
270
270
  });
271
- Le.displayName = Y;
272
- var Re = "AlertDialogTitle", ze = S.forwardRef((e, t) => {
273
- let { __scopeAlertDialog: n, ...r } = e, i = J(n);
274
- return /* @__PURE__ */ (0, C.jsx)(xe, {
271
+ We.displayName = H;
272
+ var Ge = "AlertDialogTitle", Ke = S.forwardRef((e, t) => {
273
+ let { __scopeAlertDialog: n, ...r } = e, i = V(n);
274
+ return /* @__PURE__ */ (0, C.jsx)(ke, {
275
275
  ...i,
276
276
  ...r,
277
277
  ref: t
278
278
  });
279
279
  });
280
- ze.displayName = Re;
281
- var Be = "AlertDialogDescription", Ve = S.forwardRef((e, t) => {
282
- let { __scopeAlertDialog: n, ...r } = e, i = J(n);
283
- return /* @__PURE__ */ (0, C.jsx)(Se, {
280
+ Ke.displayName = Ge;
281
+ var qe = "AlertDialogDescription", Je = S.forwardRef((e, t) => {
282
+ let { __scopeAlertDialog: n, ...r } = e, i = V(n);
283
+ return /* @__PURE__ */ (0, C.jsx)(Ae, {
284
284
  ...i,
285
285
  ...r,
286
286
  ref: t
287
287
  });
288
288
  });
289
- Ve.displayName = Be;
290
- var He = "AlertDialogAction", Ue = S.forwardRef((e, t) => {
291
- let { __scopeAlertDialog: n, ...r } = e, i = J(n);
292
- return /* @__PURE__ */ (0, C.jsx)(Ce, {
289
+ Je.displayName = qe;
290
+ var Ye = "AlertDialogAction", Xe = S.forwardRef((e, t) => {
291
+ let { __scopeAlertDialog: n, ...r } = e, i = V(n);
292
+ return /* @__PURE__ */ (0, C.jsx)(B, {
293
293
  ...i,
294
294
  ...r,
295
295
  ref: t
296
296
  });
297
297
  });
298
- Ue.displayName = He;
299
- var We = "AlertDialogCancel", Ge = S.forwardRef((e, t) => {
300
- let { __scopeAlertDialog: n, ...r } = e, { cancelRef: i } = Fe(We, n), o = J(n), s = a(t, i);
301
- return /* @__PURE__ */ (0, C.jsx)(Ce, {
298
+ Xe.displayName = Ye;
299
+ var Ze = "AlertDialogCancel", Qe = S.forwardRef((e, t) => {
300
+ let { __scopeAlertDialog: n, ...r } = e, { cancelRef: i } = He(Ze, n), o = V(n), s = a(t, i);
301
+ return /* @__PURE__ */ (0, C.jsx)(B, {
302
302
  ...o,
303
303
  ...r,
304
304
  ref: s
305
305
  });
306
306
  });
307
- Ge.displayName = We;
308
- var Ke = ({ contentRef: e }) => {
309
- let t = `\`${Y}\` requires a description for the component to be accessible for screen reader users.
307
+ Qe.displayName = Ze;
308
+ var $e = ({ contentRef: e }) => {
309
+ let t = `\`${H}\` requires a description for the component to be accessible for screen reader users.
310
310
 
311
- You can add a description to the \`${Y}\` by passing a \`${Be}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
311
+ You can add a description to the \`${H}\` by passing a \`${qe}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
312
312
 
313
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Y}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
313
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${H}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
314
314
 
315
315
  For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
316
316
  return S.useEffect(() => {
317
317
  document.getElementById(e.current?.getAttribute("aria-describedby")) || console.warn(t);
318
318
  }, [t, e]), null;
319
- }, qe = De, Je = je, Ye = Ne, Xe = Le, X = Ue, Ze = Ge, Qe = ze, $e = Ve, Z = l();
320
- function et() {
321
- let e = (0, Z.c)(3), [t, n] = (0, S.useState)(null), r;
319
+ }, et = Pe, tt = Re, nt = Be, rt = We, U = Xe, it = Qe, at = Ke, ot = Je, W = l();
320
+ function st() {
321
+ let e = (0, W.c)(3), [t, n] = (0, S.useState)(null), r;
322
322
  e[0] === Symbol.for("react.memo_cache_sentinel") ? (r = () => {
323
323
  n(document.activeElement);
324
324
  }, e[0] = r) : r = e[0];
@@ -332,16 +332,16 @@ function et() {
332
332
  }
333
333
  //#endregion
334
334
  //#region src/components/ui/alert-dialog.tsx
335
- var tt = qe, nt = p(({ children: e, ...t }) => /* @__PURE__ */ (0, C.jsx)(Je, {
335
+ var ct = et, lt = p(({ children: e, ...t }) => /* @__PURE__ */ (0, C.jsx)(tt, {
336
336
  ...t,
337
337
  children: /* @__PURE__ */ (0, C.jsx)(d, { children: /* @__PURE__ */ (0, C.jsx)("div", {
338
338
  className: "fixed inset-0 z-50 flex items-end justify-center sm:items-start sm:top-[15%]",
339
339
  children: e
340
340
  }) })
341
341
  }));
342
- nt.displayName = Je.displayName;
343
- var rt = S.forwardRef((e, t) => {
344
- let n = (0, Z.c)(9), i, a;
342
+ lt.displayName = tt.displayName;
343
+ var ut = S.forwardRef((e, t) => {
344
+ let n = (0, W.c)(9), i, a;
345
345
  if (n[0] !== e) {
346
346
  let { className: t, children: r, ...o } = e;
347
347
  i = t, a = o, n[0] = e, n[1] = i, n[2] = a;
@@ -349,31 +349,31 @@ var rt = S.forwardRef((e, t) => {
349
349
  let o;
350
350
  n[3] === i ? o = n[4] : (o = r("fixed inset-0 z-50 bg-background/80 backdrop-blur-xs transition-opacity animate-in fade-in", i), n[3] = i, n[4] = o);
351
351
  let s;
352
- return n[5] !== a || n[6] !== t || n[7] !== o ? (s = /* @__PURE__ */ (0, C.jsx)(Ye, {
352
+ return n[5] !== a || n[6] !== t || n[7] !== o ? (s = /* @__PURE__ */ (0, C.jsx)(nt, {
353
353
  className: o,
354
354
  ...a,
355
355
  ref: t
356
356
  }), n[5] = a, n[6] = t, n[7] = o, n[8] = s) : s = n[8], s;
357
357
  });
358
- rt.displayName = Ye.displayName;
359
- var it = S.forwardRef((e, t) => {
360
- let n = (0, Z.c)(11), i, a;
358
+ ut.displayName = nt.displayName;
359
+ var G = S.forwardRef((e, t) => {
360
+ let n = (0, W.c)(11), i, a;
361
361
  n[0] === e ? (i = n[1], a = n[2]) : ({className: i, ...a} = e, n[0] = e, n[1] = i, n[2] = a);
362
- let o = et(), s;
363
- n[3] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ (0, C.jsx)(rt, {}), n[3] = s) : s = n[3];
362
+ let o = st(), s;
363
+ n[3] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ (0, C.jsx)(ut, {}), n[3] = s) : s = n[3];
364
364
  let c;
365
365
  n[4] === i ? c = n[5] : (c = r("fixed z-50 grid w-full max-w-2xl scale-100 gap-4 border bg-background p-6 opacity-100 shadow-sm animate-in fade-in-90 slide-in-from-bottom-10 sm:rounded-lg sm:zoom-in-90 sm:slide-in-from-bottom-0 md:w-full", i), n[4] = i, n[5] = c);
366
366
  let l;
367
- return n[6] !== a || n[7] !== t || n[8] !== o || n[9] !== c ? (l = /* @__PURE__ */ (0, C.jsxs)(nt, { children: [s, /* @__PURE__ */ (0, C.jsx)(Xe, {
367
+ return n[6] !== a || n[7] !== t || n[8] !== o || n[9] !== c ? (l = /* @__PURE__ */ (0, C.jsxs)(lt, { children: [s, /* @__PURE__ */ (0, C.jsx)(rt, {
368
368
  ref: t,
369
369
  className: c,
370
370
  ...o,
371
371
  ...a
372
372
  })] }), n[6] = a, n[7] = t, n[8] = o, n[9] = c, n[10] = l) : l = n[10], l;
373
373
  });
374
- it.displayName = Xe.displayName;
375
- var at = (e) => {
376
- let t = (0, Z.c)(8), n, i;
374
+ G.displayName = rt.displayName;
375
+ var K = (e) => {
376
+ let t = (0, W.c)(8), n, i;
377
377
  t[0] === e ? (n = t[1], i = t[2]) : ({className: n, ...i} = e, t[0] = e, t[1] = n, t[2] = i);
378
378
  let a;
379
379
  t[3] === n ? a = t[4] : (a = r("flex flex-col space-y-2 text-center sm:text-left", n), t[3] = n, t[4] = a);
@@ -383,9 +383,9 @@ var at = (e) => {
383
383
  ...i
384
384
  }), t[5] = i, t[6] = a, t[7] = o) : o = t[7], o;
385
385
  };
386
- at.displayName = "AlertDialogHeader";
387
- var Q = (e) => {
388
- let t = (0, Z.c)(8), n, i;
386
+ K.displayName = "AlertDialogHeader";
387
+ var q = (e) => {
388
+ let t = (0, W.c)(8), n, i;
389
389
  t[0] === e ? (n = t[1], i = t[2]) : ({className: n, ...i} = e, t[0] = e, t[1] = n, t[2] = i);
390
390
  let a;
391
391
  t[3] === n ? a = t[4] : (a = r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", n), t[3] = n, t[4] = a);
@@ -395,85 +395,85 @@ var Q = (e) => {
395
395
  ...i
396
396
  }), t[5] = i, t[6] = a, t[7] = o) : o = t[7], o;
397
397
  };
398
- Q.displayName = "AlertDialogFooter";
399
- var ot = S.forwardRef((e, t) => {
400
- let n = (0, Z.c)(9), i, a;
398
+ q.displayName = "AlertDialogFooter";
399
+ var J = S.forwardRef((e, t) => {
400
+ let n = (0, W.c)(9), i, a;
401
401
  n[0] === e ? (i = n[1], a = n[2]) : ({className: i, ...a} = e, n[0] = e, n[1] = i, n[2] = a);
402
402
  let o;
403
403
  n[3] === i ? o = n[4] : (o = r("text-lg font-semibold", i), n[3] = i, n[4] = o);
404
404
  let s;
405
- return n[5] !== a || n[6] !== t || n[7] !== o ? (s = /* @__PURE__ */ (0, C.jsx)(Qe, {
405
+ return n[5] !== a || n[6] !== t || n[7] !== o ? (s = /* @__PURE__ */ (0, C.jsx)(at, {
406
406
  ref: t,
407
407
  className: o,
408
408
  ...a
409
409
  }), n[5] = a, n[6] = t, n[7] = o, n[8] = s) : s = n[8], s;
410
410
  });
411
- ot.displayName = Qe.displayName;
412
- var st = S.forwardRef((e, t) => {
413
- let n = (0, Z.c)(9), i, a;
411
+ J.displayName = at.displayName;
412
+ var Y = S.forwardRef((e, t) => {
413
+ let n = (0, W.c)(9), i, a;
414
414
  n[0] === e ? (i = n[1], a = n[2]) : ({className: i, ...a} = e, n[0] = e, n[1] = i, n[2] = a);
415
415
  let o;
416
416
  n[3] === i ? o = n[4] : (o = r("text-muted-foreground", i), n[3] = i, n[4] = o);
417
417
  let s;
418
- return n[5] !== a || n[6] !== t || n[7] !== o ? (s = /* @__PURE__ */ (0, C.jsx)($e, {
418
+ return n[5] !== a || n[6] !== t || n[7] !== o ? (s = /* @__PURE__ */ (0, C.jsx)(ot, {
419
419
  ref: t,
420
420
  className: o,
421
421
  ...a
422
422
  }), n[5] = a, n[6] = t, n[7] = o, n[8] = s) : s = n[8], s;
423
423
  });
424
- st.displayName = $e.displayName;
425
- var ct = S.forwardRef((e, t) => {
426
- let n = (0, Z.c)(9), a, o;
424
+ Y.displayName = ot.displayName;
425
+ var X = S.forwardRef((e, t) => {
426
+ let n = (0, W.c)(9), a, o;
427
427
  n[0] === e ? (a = n[1], o = n[2]) : ({className: a, ...o} = e, n[0] = e, n[1] = a, n[2] = o);
428
428
  let s;
429
429
  n[3] === a ? s = n[4] : (s = r(i(), a), n[3] = a, n[4] = s);
430
430
  let c;
431
- return n[5] !== o || n[6] !== t || n[7] !== s ? (c = /* @__PURE__ */ (0, C.jsx)(X, {
431
+ return n[5] !== o || n[6] !== t || n[7] !== s ? (c = /* @__PURE__ */ (0, C.jsx)(U, {
432
432
  ref: t,
433
433
  className: s,
434
434
  ...o
435
435
  }), n[5] = o, n[6] = t, n[7] = s, n[8] = c) : c = n[8], c;
436
436
  });
437
- ct.displayName = X.displayName;
438
- var lt = S.forwardRef((e, t) => {
439
- let n = (0, Z.c)(9), a, o;
437
+ X.displayName = U.displayName;
438
+ var dt = S.forwardRef((e, t) => {
439
+ let n = (0, W.c)(9), a, o;
440
440
  n[0] === e ? (a = n[1], o = n[2]) : ({className: a, ...o} = e, n[0] = e, n[1] = a, n[2] = o);
441
441
  let s;
442
442
  n[3] === a ? s = n[4] : (s = r(i({ variant: "destructive" }), a), n[3] = a, n[4] = s);
443
443
  let c;
444
- return n[5] !== o || n[6] !== t || n[7] !== s ? (c = /* @__PURE__ */ (0, C.jsx)(X, {
444
+ return n[5] !== o || n[6] !== t || n[7] !== s ? (c = /* @__PURE__ */ (0, C.jsx)(U, {
445
445
  ref: t,
446
446
  className: s,
447
447
  ...o
448
448
  }), n[5] = o, n[6] = t, n[7] = s, n[8] = c) : c = n[8], c;
449
449
  });
450
- lt.displayName = "AlertDialogDestructiveAction";
451
- var ut = S.forwardRef((e, t) => {
452
- let n = (0, Z.c)(9), a, o;
450
+ dt.displayName = "AlertDialogDestructiveAction";
451
+ var ft = S.forwardRef((e, t) => {
452
+ let n = (0, W.c)(9), a, o;
453
453
  n[0] === e ? (a = n[1], o = n[2]) : ({className: a, ...o} = e, n[0] = e, n[1] = a, n[2] = o);
454
454
  let s;
455
455
  n[3] === a ? s = n[4] : (s = r(i({ variant: "secondary" }), "mt-2 sm:mt-0", a), n[3] = a, n[4] = s);
456
456
  let c;
457
- return n[5] !== o || n[6] !== t || n[7] !== s ? (c = /* @__PURE__ */ (0, C.jsx)(Ze, {
457
+ return n[5] !== o || n[6] !== t || n[7] !== s ? (c = /* @__PURE__ */ (0, C.jsx)(it, {
458
458
  ref: t,
459
459
  className: s,
460
460
  ...o
461
461
  }), n[5] = o, n[6] = t, n[7] = s, n[8] = c) : c = n[8], c;
462
462
  });
463
- ut.displayName = Ze.displayName;
463
+ ft.displayName = it.displayName;
464
464
  //#endregion
465
465
  //#region src/utils/errors.ts
466
- var $ = f({ detail: v() }), dt = f({ error: v() });
467
- function ft(e) {
466
+ var Z = f({ detail: v() }), pt = f({ error: v() });
467
+ function Q(e) {
468
468
  if (!e) return "Unknown error";
469
469
  if (e instanceof Error) {
470
- let t = $.safeParse(e.cause);
471
- return t.success ? t.data.detail : pt(e.message);
470
+ let t = Z.safeParse(e.cause);
471
+ return t.success ? t.data.detail : mt(e.message);
472
472
  }
473
473
  if (typeof e == "object") {
474
- let t = $.safeParse(e);
474
+ let t = Z.safeParse(e);
475
475
  if (t.success) return t.data.detail;
476
- let n = dt.safeParse(e);
476
+ let n = pt.safeParse(e);
477
477
  if (n.success) return n.data.error;
478
478
  }
479
479
  try {
@@ -482,35 +482,35 @@ function ft(e) {
482
482
  return String(e);
483
483
  }
484
484
  }
485
- function pt(e) {
486
- let t = mt(e);
485
+ function mt(e) {
486
+ let t = ht(e);
487
487
  if (!t) return e;
488
- let n = $.safeParse(t);
488
+ let n = Z.safeParse(t);
489
489
  if (n.success) return n.data.detail;
490
- let r = dt.safeParse(t);
490
+ let r = pt.safeParse(t);
491
491
  return r.success ? r.data.error : e;
492
492
  }
493
- function mt(e) {
493
+ function ht(e) {
494
494
  try {
495
495
  return JSON.parse(e);
496
496
  } catch {
497
497
  return e;
498
498
  }
499
499
  }
500
- var ht = class extends Error {
500
+ var gt = class extends Error {
501
501
  constructor(e = "The cell containing this UI element has not been run yet. Please run the cell first.") {
502
502
  super(e), this.name = "CellNotInitializedError";
503
503
  }
504
- }, gt = class extends Error {
504
+ }, _t = class extends Error {
505
505
  constructor(e = "This UI element could not reach its function on the kernel. Try re-running the cell.") {
506
506
  super(e), this.name = "FunctionNotFoundError";
507
507
  }
508
- }, _t = (e) => {
509
- let t = (0, Z.c)(23), { error: r, className: i, action: a } = e, [o, s] = (0, S.useState)(!1);
508
+ }, vt = (e) => {
509
+ let t = (0, W.c)(23), { error: r, className: i, action: a } = e, [o, s] = (0, S.useState)(!1);
510
510
  if (!r) return null;
511
511
  n.error(r);
512
512
  let c;
513
- t[0] === r ? c = t[1] : (c = ft(r), t[0] = r, t[1] = c);
513
+ t[0] === r ? c = t[1] : (c = Q(r), t[0] = r, t[1] = c);
514
514
  let l = c, u;
515
515
  t[2] === Symbol.for("react.memo_cache_sentinel") ? (u = () => s(!0), t[2] = u) : u = t[2];
516
516
  let d;
@@ -524,7 +524,7 @@ var ht = class extends Error {
524
524
  children: a
525
525
  }), t[5] = a, t[6] = f);
526
526
  let p;
527
- t[7] !== i || t[8] !== d || t[9] !== f ? (p = /* @__PURE__ */ (0, C.jsxs)(yt, {
527
+ t[7] !== i || t[8] !== d || t[9] !== f ? (p = /* @__PURE__ */ (0, C.jsxs)($, {
528
528
  kind: "danger",
529
529
  className: i,
530
530
  clickable: !0,
@@ -532,24 +532,24 @@ var ht = class extends Error {
532
532
  children: [d, f]
533
533
  }), t[7] = i, t[8] = d, t[9] = f, t[10] = p) : p = t[10];
534
534
  let m;
535
- t[11] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ (0, C.jsx)(at, { children: /* @__PURE__ */ (0, C.jsx)(ot, {
535
+ t[11] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ (0, C.jsx)(K, { children: /* @__PURE__ */ (0, C.jsx)(J, {
536
536
  className: "text-error",
537
537
  children: "Error"
538
538
  }) }), t[11] = m) : m = t[11];
539
539
  let h;
540
- t[12] === l ? h = t[13] : (h = /* @__PURE__ */ (0, C.jsx)(st, {
540
+ t[12] === l ? h = t[13] : (h = /* @__PURE__ */ (0, C.jsx)(Y, {
541
541
  asChild: !0,
542
542
  className: "text-error text-sm p-2 font-mono overflow-auto whitespace-pre-wrap",
543
543
  children: /* @__PURE__ */ (0, C.jsx)("pre", { children: l })
544
544
  }), t[12] = l, t[13] = h);
545
545
  let g;
546
- t[14] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ (0, C.jsx)(Q, { children: /* @__PURE__ */ (0, C.jsx)(ct, {
546
+ t[14] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ (0, C.jsx)(q, { children: /* @__PURE__ */ (0, C.jsx)(X, {
547
547
  autoFocus: !0,
548
548
  onClick: () => s(!1),
549
549
  children: "Ok"
550
550
  }) }), t[14] = g) : g = t[14];
551
551
  let _;
552
- t[15] === h ? _ = t[16] : (_ = /* @__PURE__ */ (0, C.jsxs)(it, {
552
+ t[15] === h ? _ = t[16] : (_ = /* @__PURE__ */ (0, C.jsxs)(G, {
553
553
  className: "max-w-[80%] max-h-[80%] overflow-hidden flex flex-col",
554
554
  children: [
555
555
  m,
@@ -558,14 +558,14 @@ var ht = class extends Error {
558
558
  ]
559
559
  }), t[15] = h, t[16] = _);
560
560
  let v;
561
- t[17] !== o || t[18] !== _ ? (v = /* @__PURE__ */ (0, C.jsx)(tt, {
561
+ t[17] !== o || t[18] !== _ ? (v = /* @__PURE__ */ (0, C.jsx)(ct, {
562
562
  open: o,
563
563
  onOpenChange: s,
564
564
  children: _
565
565
  }), t[17] = o, t[18] = _, t[19] = v) : v = t[19];
566
566
  let y;
567
567
  return t[20] !== v || t[21] !== p ? (y = /* @__PURE__ */ (0, C.jsxs)(C.Fragment, { children: [p, v] }), t[20] = v, t[21] = p, t[22] = y) : y = t[22], y;
568
- }, vt = o("text-sm p-2 border whitespace-pre-wrap overflow-hidden", {
568
+ }, yt = o("text-sm p-2 border whitespace-pre-wrap overflow-hidden", {
569
569
  variants: {
570
570
  kind: {
571
571
  danger: "text-error border-(--red-6) shadow-md-solid shadow-error bg-(--red-1)",
@@ -592,11 +592,11 @@ var ht = class extends Error {
592
592
  }
593
593
  ],
594
594
  defaultVariants: { kind: "info" }
595
- }), yt = (e) => {
596
- let t = (0, Z.c)(14), n, i, a, o, s;
595
+ }), $ = (e) => {
596
+ let t = (0, W.c)(14), n, i, a, o, s;
597
597
  t[0] === e ? (n = t[1], i = t[2], a = t[3], o = t[4], s = t[5]) : ({kind: o, clickable: a, className: i, children: n, ...s} = e, t[0] = e, t[1] = n, t[2] = i, t[3] = a, t[4] = o, t[5] = s);
598
598
  let c;
599
- t[6] !== i || t[7] !== a || t[8] !== o ? (c = r(vt({
599
+ t[6] !== i || t[7] !== a || t[8] !== o ? (c = r(yt({
600
600
  kind: o,
601
601
  clickable: a
602
602
  }), i), t[6] = i, t[7] = a, t[8] = o, t[9] = c) : c = t[9];
@@ -608,4 +608,4 @@ var ht = class extends Error {
608
608
  }), t[10] = n, t[11] = s, t[12] = c, t[13] = l) : l = t[13], l;
609
609
  };
610
610
  //#endregion
611
- export { ft as a, G as c, gt as i, W as l, _t as n, q as o, ht as r, K as s, yt as t };
611
+ export { Te as C, ke as S, Oe as _, Q as a, Ee as b, ft as c, dt as d, q as f, B as g, st as h, _t as i, G as l, J as m, vt as n, ct as o, K as p, gt as r, X as s, $ as t, Y as u, Ae as v, we as x, De as y };