@marimo-team/islands 0.25.2-dev64 → 0.25.2-dev66

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.
@@ -135,7 +135,7 @@ function F(e) {
135
135
  }
136
136
  //#endregion
137
137
  //#region src/components/editor/boundary/ErrorBoundary.tsx
138
- var I = (0, T.lazy)(() => import("./feedback-button-Ehj96tA4.js").then((e) => ({ default: e.FeedbackModal }))), L = (e) => {
138
+ var I = (0, T.lazy)(() => import("./feedback-button-C_dzhSZo.js").then((e) => ({ default: e.FeedbackModal }))), L = (e) => {
139
139
  let t = (0, w.c)(2), n;
140
140
  return t[0] === e.children ? n = t[1] : (n = /* @__PURE__ */ (0, j.jsx)(O, {
141
141
  FallbackComponent: R,
@@ -18,7 +18,7 @@ function x() {
18
18
  return e.warn("Failed to get version from mount config"), null;
19
19
  }
20
20
  }
21
- var S = x() || "0.25.2-dev64", C = u(S), w = u(!0);
21
+ var S = x() || "0.25.2-dev66", C = u(S), w = u(!0);
22
22
  u(null);
23
23
  //#endregion
24
24
  //#region src/core/wasm/state.ts
@@ -12,7 +12,7 @@ import { t as ct } from "./check-CNP79M3A.js";
12
12
  import { A as lt, C as ut, M as dt, O as ft, S as pt, _ as mt, b as ht, c as gt, d as _t, g as vt, h as yt, i as bt, l as xt, m as St, n as Ct, p as wt, s as Tt, t as Et, u as Dt, v as Ot, y as kt } from "./select-Bs-nmvm6.js";
13
13
  import { $ as At, $t as jt, A as Mt, At as Nt, B as Pt, Bt as Ft, Ct as It, D as Lt, Dt as Rt, E as zt, Et as Bt, F as Vt, Ft as Ht, G as Ut, Gt as Wt, H as Gt, Ht as Kt, I as qt, It as Jt, J as Yt, Jt as Xt, Kt as Zt, L as Qt, Lt as $t, M as en, Mt as tn, N as nn, Nt as rn, O as an, Ot as on, P as sn, Pt as cn, Q as ln, Qt as un, R as dn, Rt as fn, S as pn, St as mn, T as hn, Tt as gn, U as _n, Ut as vn, V as yn, Vt as bn, W as xn, Wt as Sn, X as Cn, Xt as wn, Y as Tn, Yt as En, Z as Dn, Zt as On, _ as kn, _n as An, _t as jn, a as Mn, at as Nn, b as Pn, bt as Fn, cn as In, ct as Ln, d as Rn, dn as zn, dt as Bn, et as Vn, f as Hn, fn as Un, ft as Wn, gn as Gn, gt as Kn, h as qn, hn as Jn, ht as Yn, i as Xn, in as Zn, it as Qn, j as $n, jt as er, k as tr, kt as nr, l as rr, lt as ir, mn as ar, mt as or, n as sr, nn as cr, nt as lr, o as ur, on as dr, ot as fr, pn as pr, pt as mr, qt as hr, rn as gr, rt as _r, s as vr, sn as yr, st as br, t as xr, tn as Sr, tt as Cr, u as wr, un as Tr, vn as Er, vt as Dr, w as Or, wt as kr, x as Ar, xt as jr, y as Mr, yt as Nr, z as Pr, zt as Fr } from "./dropdown-menu-Cz4TdOJh.js";
14
14
  import { C as Ir, a as Lr, b as Rr, c as zr, d as Br, i as Vr, n as Hr, o as Ur, p as Wr, r as Gr, s as Kr, t as qr, x as Jr } from "./toDate-vEi5kTfY.js";
15
- import { n as Yr, t as Xr } from "./ErrorBoundary-mbMvc-EB.js";
15
+ import { n as Yr, t as Xr } from "./ErrorBoundary-BHvUXPtK.js";
16
16
  import { t as Zr } from "./clsx-CoeGtWvn.js";
17
17
  import { t as Qr } from "./react-dom-BUgJ-ab_.js";
18
18
  import { t as $r } from "./jsx-runtime-DgDPJV9S.js";
@@ -2,7 +2,7 @@ import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
2
2
  import { t } from "./react-ofJbxM4x.js";
3
3
  import { t as n } from "./react-dom-BUgJ-ab_.js";
4
4
  import { c as r, l as i, u as a } from "./data-grid-types-BucVmDDp.js";
5
- import { a as o, i as s, n as c, r as l } from "./glide-data-editor-DfRNtZdm.js";
5
+ import { a as o, i as s, n as c, r as l } from "./glide-data-editor-CQKpxgZb.js";
6
6
  //#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.2.8_b9e6aec46d952f631ce71b0585d2a8e5/node_modules/@glideapps/glide-data-grid/dist/esm/internal/data-grid-overlay-editor/data-grid-overlay-editor-style.js
7
7
  var u = /* @__PURE__ */ e(t(), 1), d = /* @__PURE__ */ e(n(), 1), f = /*#__PURE__*/ o("div")({
8
8
  name: "DataGridOverlayEditorStyle",
@@ -5,12 +5,12 @@ import { t as i } from "./compiler-runtime-Cj8ZWiNS.js";
5
5
  import { t as a } from "./copy-icon-BY7jgcaV.js";
6
6
  import { Ct as o, Ft as s, H as c, L as l, Lt as u, V as d, d as f, un as p } from "./cells-DzqPprAQ.js";
7
7
  import { b as m } from "./select-Bs-nmvm6.js";
8
- import { n as h, t as ee } from "./globals-BdFfEsOJ.js";
8
+ import { n as h, t as ee } from "./globals-B0wv8u9V.js";
9
9
  import { t as g } from "./jsx-runtime-DgDPJV9S.js";
10
10
  import { C as _, _ as te, i as v } from "./useTheme-BwSgeAFb.js";
11
11
  import { a as ne, i as re, n as ie, r as ae } from "./dialog-CmExhUDI.js";
12
12
  import { t as oe } from "./useAsyncData-rkAlR_vh.js";
13
- import { t as se } from "./code-visibility-DwRnMyBy.js";
13
+ import { t as se } from "./code-visibility-a6v4Kwtn.js";
14
14
  import { i as ce, n as le } from "./error-entries-CdgPvJVz.js";
15
15
  //#region src/components/ui/skeleton.tsx
16
16
  var y = /* @__PURE__ */ e(r(), 1), b = i(), x = g(), ue = (e) => {
@@ -6,7 +6,7 @@ import { i as s, n as c, r as l } from "./copy-icon-BY7jgcaV.js";
6
6
  import { C as u, c as d, i as f, n as p, s as m, t as h, x as g } from "./select-Bs-nmvm6.js";
7
7
  import { d as _, h as v, i as y, l as b, n as x, o as S, s as C, t as w, u as T } from "./dropdown-menu-Cz4TdOJh.js";
8
8
  import { c as E, d as D, l as O, n as k, o as A, s as ee, t as j, u as te } from "./glide-utils-BVJ4fkxX.js";
9
- import { n as ne, t as re } from "./ErrorBoundary-mbMvc-EB.js";
9
+ import { n as ne, t as re } from "./ErrorBoundary-BHvUXPtK.js";
10
10
  import { t as M } from "./react-dom-BUgJ-ab_.js";
11
11
  import { t as N } from "./jsx-runtime-DgDPJV9S.js";
12
12
  import { t as ie } from "./label-DQO1jFjf.js";
@@ -7062,7 +7062,7 @@ function rs(e, t, n, r, i) {
7062
7062
  }
7063
7063
  //#endregion
7064
7064
  //#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.2.8_b9e6aec46d952f631ce71b0585d2a8e5/node_modules/@glideapps/glide-data-grid/dist/esm/data-editor/data-editor.js
7065
- var is = /* @__PURE__ */ e(_r(), 1), as = /* @__PURE__ */ e(xr(), 1), os = K.lazy(async () => await import("./data-grid-overlay-editor-DXQCTVEU.js")), ss = 0;
7065
+ var is = /* @__PURE__ */ e(_r(), 1), as = /* @__PURE__ */ e(xr(), 1), os = K.lazy(async () => await import("./data-grid-overlay-editor-C7u6VQ9U.js")), ss = 0;
7066
7066
  function cs(e) {
7067
7067
  return (0, is.default)((0, as.default)((0, as.default)(e).filter((e) => e.span !== void 0).map((e) => (0, Za.default)((e.span?.[0] ?? 0) + 1, (e.span?.[1] ?? 0) + 1))));
7068
7068
  }
@@ -9293,7 +9293,7 @@ function Vs(e, t, n, r, i) {
9293
9293
  }
9294
9294
  //#endregion
9295
9295
  //#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.2.8_b9e6aec46d952f631ce71b0585d2a8e5/node_modules/@glideapps/glide-data-grid/dist/esm/cells/number-cell.js
9296
- var Hs = K.lazy(async () => await import("./number-overlay-editor-CbVbYCai.js")), Us = {
9296
+ var Hs = K.lazy(async () => await import("./number-overlay-editor-BfWfXUbU.js")), Us = {
9297
9297
  getAccessibilityString: (e) => e.data?.toString() ?? "",
9298
9298
  kind: W.Number,
9299
9299
  needsHover: (e) => e.hoverEffect === !0,
@@ -1,6 +1,6 @@
1
1
  import { h as e } from "./tooltip-CuNWg2ay.js";
2
2
  import { _ as t } from "./useTheme-BwSgeAFb.js";
3
- import { r as n } from "./code-visibility-DwRnMyBy.js";
3
+ import { r as n } from "./code-visibility-a6v4Kwtn.js";
4
4
  var r = e("triangle-alert", [
5
5
  ["path", {
6
6
  d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
package/dist/main.js CHANGED
@@ -7,7 +7,7 @@ import { C as w, F as T, G as E, I as D, J as O, K as k, L as A, P as j, R as M,
7
7
  import { a as oe, d as se, f as ce, h as V, i as le, n as ue, o as de, r as fe, t as pe } from "./tooltip-CuNWg2ay.js";
8
8
  import { $ as me, $t as he, B as ge, Bt as _e, C as ve, Ct as ye, D as be, Dt as xe, Et as Se, F as Ce, G as we, Gt as Te, Ht as Ee, I as De, J as Oe, Jt as ke, Kt as Ae, L as je, O as Me, Ot as Ne, P as Pe, Pt as Fe, Q as Ie, Qt as Le, Rt as Re, S as ze, St as Be, T as Ve, Tt as He, U as Ue, W as We, Wt as Ge, bt as Ke, c as qe, cn as Je, ct as Ye, d as Xe, dn as Ze, dt as Qe, en as $e, f as et, fn as tt, ft as nt, g as rt, gt as it, h as at, hn as ot, k as st, l as ct, ln as lt, m as ut, mn as dt, n as ft, o as pt, on as mt, ot as ht, p as gt, q as _t, qt as vt, r as yt, rn as bt, rt as xt, sn as St, st as Ct, tn as wt, u as Tt, v as Et, w as Dt, wt as Ot, zt as kt } from "./cells-DzqPprAQ.js";
9
9
  import { D as At, E as jt, O as Mt, S as Nt, T as Pt, _ as Ft, a as It, c as Lt, d as Rt, f as zt, g as Bt, h as Vt, i as Ht, l as Ut, m as Wt, n as Gt, o as Kt, p as qt, r as Jt, s as Yt, t as Xt, u as Zt, v as Qt, w as $t, x as en, y as tn } from "./spec-DVsoMvYT.js";
10
- import { $t as nn, A as rn, At as an, B as on, Bt as sn, C as cn, Ct as ln, D as un, Dt as dn, E as fn, Et as pn, F as mn, Ft as hn, G as gn, Gt as _n, H as vn, Ht as yn, I as bn, It as xn, J as Sn, Jt as Cn, K as wn, Kt as Tn, L as En, Lt as Dn, M as On, Mt as kn, N as An, Nt as jn, O as Mn, Ot as Nn, P as Pn, Pt as Fn, Qt as In, R as Ln, Rt as Rn, S as zn, St as Bn, T as Vn, Tt as Hn, U as Un, Ut as Wn, V as Gn, Vt as Kn, W as qn, Wt as Jn, X as Yn, Xt as Xn, Y as Zn, Yt as Qn, Zt as $n, _ as er, _t as tr, an as nr, at as rr, b as ir, c as ar, cn as or, ct as sr, d as cr, dn as lr, dt as ur, en as dr, et as fr, f as pr, fn as mr, ft as hr, g as gr, gt as _r, h as vr, hn as yr, ht as br, in as xr, it as Sr, j as Cr, jt as wr, k as Tr, kt as Er, ln as Dr, lt as Or, m as kr, mn as Ar, mt as jr, nn as Mr, nt as Nr, ot as Pr, p as Fr, pn as Ir, pt as Lr, q as Rr, qt as zr, r as Br, rn as Vr, rt as Hr, sn as Ur, st as Wr, t as Gr, tn as Kr, tt as qr, u as Jr, un as Yr, ut as Xr, v as Zr, vt as Qr, w as $r, wt as ei, x as ti, y as ni, yt as ri, z as ii, zt as ai } from "./common-D1NEOSXA.js";
10
+ import { $t as nn, A as rn, At as an, B as on, Bt as sn, C as cn, Ct as ln, D as un, Dt as dn, E as fn, Et as pn, F as mn, Ft as hn, G as gn, Gt as _n, H as vn, Ht as yn, I as bn, It as xn, J as Sn, Jt as Cn, K as wn, Kt as Tn, L as En, Lt as Dn, M as On, Mt as kn, N as An, Nt as jn, O as Mn, Ot as Nn, P as Pn, Pt as Fn, Qt as In, R as Ln, Rt as Rn, S as zn, St as Bn, T as Vn, Tt as Hn, U as Un, Ut as Wn, V as Gn, Vt as Kn, W as qn, Wt as Jn, X as Yn, Xt as Xn, Y as Zn, Yt as Qn, Zt as $n, _ as er, _t as tr, an as nr, at as rr, b as ir, c as ar, cn as or, ct as sr, d as cr, dn as lr, dt as ur, en as dr, et as fr, f as pr, fn as mr, ft as hr, g as gr, gt as _r, h as vr, hn as yr, ht as br, in as xr, it as Sr, j as Cr, jt as wr, k as Tr, kt as Er, ln as Dr, lt as Or, m as kr, mn as Ar, mt as jr, nn as Mr, nt as Nr, ot as Pr, p as Fr, pn as Ir, pt as Lr, q as Rr, qt as zr, r as Br, rn as Vr, rt as Hr, sn as Ur, st as Wr, t as Gr, tn as Kr, tt as qr, u as Jr, un as Yr, ut as Xr, v as Zr, vt as Qr, w as $r, wt as ei, x as ti, y as ni, yt as ri, z as ii, zt as ai } from "./common-Lbz4UoEr.js";
11
11
  import { c as oi, i as si, n as ci, o as li, t as ui } from "./useLifecycle-B68iY077.js";
12
12
  import { t as di } from "./check-CNP79M3A.js";
13
13
  import { A as fi, C as pi, D as mi, E as hi, M as gi, O as _i, S as vi, T as yi, a as bi, b as xi, c as Si, i as Ci, k as wi, l as Ti, n as Ei, o as Di, r as Oi, s as ki, t as Ai, w as ji, x as Mi } from "./select-Bs-nmvm6.js";
@@ -15,8 +15,8 @@ import { $ as Ni, C as Pi, Et as Fi, J as Ii, K as Li, R as Ri, S as zi, U as Bi
15
15
  import { C as ua, S as da, T as fa, _ as pa, c as ma, d as ha, f as ga, g as _a, h as va, m as ya, u as ba, x as xa, y as Sa } from "./toDate-vEi5kTfY.js";
16
16
  import { a as Ca, c as wa, d as Ta, f as Ea, i as Da, l as Oa, n as ka, o as Aa, r as ja, s as Ma, t as Na } from "./process-output-CdDN3Pdp.js";
17
17
  import { a as Pa, c as Fa, d as Ia, i as La, l as Ra, r as za, u as Ba } from "./glide-utils-BVJ4fkxX.js";
18
- import { n as Va, t as Ha } from "./ErrorBoundary-mbMvc-EB.js";
19
- import { n as Ua, t as Wa } from "./globals-BdFfEsOJ.js";
18
+ import { n as Va, t as Ha } from "./ErrorBoundary-BHvUXPtK.js";
19
+ import { n as Ua, t as Wa } from "./globals-B0wv8u9V.js";
20
20
  import { t as Ga } from "./react-dom-BUgJ-ab_.js";
21
21
  import { t as Ka } from "./jsx-runtime-DgDPJV9S.js";
22
22
  import { B as qa, C as H, Ct as Ja, D as Ya, E as Xa, F as U, G as Za, H as Qa, I as $a, L as eo, M as W, N as to, O as no, P as ro, Q as io, R as ao, S as G, St as oo, Tt as so, U as co, W as lo, Y as uo, Z as fo, _ as po, _t as mo, a as ho, b as go, bt as _o, c as vo, d as yo, f as bo, g as xo, h as So, ht as Co, i as wo, j as K, k as To, l as Eo, m as Do, n as Oo, o as ko, p as Ao, r as jo, s as Mo, u as No, ut as Po, v as Fo, vt as Io, w as Lo, wt as Ro, x as zo, xt as Bo, y as Vo, yt as Ho } from "./use-restore-focus-kmgwrL8q.js";
@@ -39,7 +39,7 @@ import { t as Ms } from "./useAsyncData-rkAlR_vh.js";
39
39
  import { i as Ns, n as Ps, r as Fs } from "./formats-DhhbdyAH.js";
40
40
  import { M as Is, N as Ls } from "./vega-loader.browser-DNST6uVf.js";
41
41
  import { a as Rs, n as zs } from "./loader-Cm-ATtou.js";
42
- import { c as Bs, d as Vs, i as Hs, l as Us, o as Ws, s as Gs, t as Ks, u as qs } from "./code-visibility-DwRnMyBy.js";
42
+ import { c as Bs, d as Vs, i as Hs, l as Us, o as Ws, s as Gs, t as Ks, u as qs } from "./code-visibility-a6v4Kwtn.js";
43
43
  import { t as Js } from "./useDeepCompareMemoize-BlHFBj5_.js";
44
44
  import { t as Ys } from "./esm-D2gTsXEV.js";
45
45
  //#region ../node_modules/.pnpm/iconify-icon@2.3.0/node_modules/iconify-icon/dist/iconify-icon.mjs
@@ -10514,7 +10514,7 @@ function VC(e, t) {
10514
10514
  }
10515
10515
  //#endregion
10516
10516
  //#region src/plugins/impl/DataEditorPlugin.tsx
10517
- var HC = J.lazy(() => import("./glide-data-editor-DfRNtZdm.js").then((e) => e.t)), UC = wS("marimo-data-editor", { cssStyles: [qS] }).withData(W({
10517
+ var HC = J.lazy(() => import("./glide-data-editor-CQKpxgZb.js").then((e) => e.t)), UC = wS("marimo-data-editor", { cssStyles: [qS] }).withData(W({
10518
10518
  initialValue: W({ edits: G(W({
10519
10519
  rowIdx: K(),
10520
10520
  columnId: U(),
@@ -21572,92 +21572,98 @@ var Jj = class {
21572
21572
  });
21573
21573
  }
21574
21574
  }, Yj = (e) => {
21575
- let t = (0, X.c)(57), n;
21576
- t[0] !== e.maxLength || t[1] !== e.value ? (n = e.maxLength ? /* @__PURE__ */ (0, Y.jsxs)("span", {
21575
+ let t = (0, X.c)(63), n = (0, J.useId)(), r;
21576
+ t[0] !== e.maxLength || t[1] !== e.value ? (r = e.maxLength ? /* @__PURE__ */ (0, Y.jsxs)("span", {
21577
21577
  className: "text-muted-foreground text-xs font-medium",
21578
21578
  children: [
21579
21579
  e.value.length,
21580
21580
  "/",
21581
21581
  e.maxLength
21582
21582
  ]
21583
- }) : null, t[0] = e.maxLength, t[1] = e.value, t[2] = n) : n = t[2];
21584
- let r = n;
21583
+ }) : null, t[0] = e.maxLength, t[1] = e.value, t[2] = r) : r = t[2];
21584
+ let i = r;
21585
21585
  if (e.debounce === !0) {
21586
- let n = e.label, i = e.fullWidth, a;
21587
- t[3] === e.fullWidth ? a = t[4] : (a = c("font-code", { "w-full": e.fullWidth }), t[3] = e.fullWidth, t[4] = a);
21588
- let o = e.minLength != null && e.minLength > 0, s;
21589
- t[5] !== r || t[6] !== e.disabled || t[7] !== e.maxLength || t[8] !== e.minLength || t[9] !== e.placeholder || t[10] !== e.rows || t[11] !== e.setValue || t[12] !== e.value || t[13] !== a || t[14] !== o ? (s = /* @__PURE__ */ (0, Y.jsx)(Ph, {
21590
- className: a,
21586
+ let r = e.label, a = e.fullWidth, o;
21587
+ t[3] === e.fullWidth ? o = t[4] : (o = c("font-code", { "w-full": e.fullWidth }), t[3] = e.fullWidth, t[4] = o);
21588
+ let s = e.minLength != null && e.minLength > 0, l;
21589
+ t[5] !== i || t[6] !== e.disabled || t[7] !== e.maxLength || t[8] !== e.minLength || t[9] !== e.placeholder || t[10] !== e.rows || t[11] !== e.setValue || t[12] !== e.value || t[13] !== o || t[14] !== s || t[15] !== n ? (l = /* @__PURE__ */ (0, Y.jsx)(Ph, {
21590
+ id: n,
21591
+ className: o,
21591
21592
  rows: e.rows,
21592
21593
  cols: 33,
21593
21594
  maxLength: e.maxLength,
21594
21595
  minLength: e.minLength,
21595
- required: o,
21596
+ required: s,
21596
21597
  disabled: e.disabled,
21597
- bottomAdornment: r,
21598
+ bottomAdornment: i,
21598
21599
  value: e.value,
21599
21600
  onValueChange: e.setValue,
21600
21601
  placeholder: e.placeholder
21601
- }), t[5] = r, t[6] = e.disabled, t[7] = e.maxLength, t[8] = e.minLength, t[9] = e.placeholder, t[10] = e.rows, t[11] = e.setValue, t[12] = e.value, t[13] = a, t[14] = o, t[15] = s) : s = t[15];
21602
- let l;
21603
- return t[16] !== e.fullWidth || t[17] !== e.label || t[18] !== s ? (l = /* @__PURE__ */ (0, Y.jsx)(LS, {
21604
- label: n,
21602
+ }), t[5] = i, t[6] = e.disabled, t[7] = e.maxLength, t[8] = e.minLength, t[9] = e.placeholder, t[10] = e.rows, t[11] = e.setValue, t[12] = e.value, t[13] = o, t[14] = s, t[15] = n, t[16] = l) : l = t[16];
21603
+ let u;
21604
+ return t[17] !== e.fullWidth || t[18] !== e.label || t[19] !== l || t[20] !== n ? (u = /* @__PURE__ */ (0, Y.jsx)(LS, {
21605
+ controlId: n,
21606
+ label: r,
21605
21607
  align: "top",
21606
- fullWidth: i,
21607
- children: s
21608
- }), t[16] = e.fullWidth, t[17] = e.label, t[18] = s, t[19] = l) : l = t[19], l;
21608
+ fullWidth: a,
21609
+ children: l
21610
+ }), t[17] = e.fullWidth, t[18] = e.label, t[19] = l, t[20] = n, t[21] = u) : u = t[21], u;
21609
21611
  }
21610
21612
  if (typeof e.debounce == "number") {
21611
- let n = e.label, i = e.fullWidth, a;
21612
- t[20] === e.fullWidth ? a = t[21] : (a = c("font-code", { "w-full": e.fullWidth }), t[20] = e.fullWidth, t[21] = a);
21613
- let o = e.minLength != null && e.minLength > 0, s;
21614
- t[22] !== r || t[23] !== e.debounce || t[24] !== e.disabled || t[25] !== e.maxLength || t[26] !== e.minLength || t[27] !== e.placeholder || t[28] !== e.rows || t[29] !== e.setValue || t[30] !== e.value || t[31] !== a || t[32] !== o ? (s = /* @__PURE__ */ (0, Y.jsx)(Nh, {
21615
- className: a,
21613
+ let r = e.label, a = e.fullWidth, o;
21614
+ t[22] === e.fullWidth ? o = t[23] : (o = c("font-code", { "w-full": e.fullWidth }), t[22] = e.fullWidth, t[23] = o);
21615
+ let s = e.minLength != null && e.minLength > 0, l;
21616
+ t[24] !== i || t[25] !== e.debounce || t[26] !== e.disabled || t[27] !== e.maxLength || t[28] !== e.minLength || t[29] !== e.placeholder || t[30] !== e.rows || t[31] !== e.setValue || t[32] !== e.value || t[33] !== o || t[34] !== s || t[35] !== n ? (l = /* @__PURE__ */ (0, Y.jsx)(Nh, {
21617
+ id: n,
21618
+ className: o,
21616
21619
  rows: e.rows,
21617
21620
  cols: 33,
21618
21621
  maxLength: e.maxLength,
21619
21622
  minLength: e.minLength,
21620
- required: o,
21623
+ required: s,
21621
21624
  disabled: e.disabled,
21622
- bottomAdornment: r,
21625
+ bottomAdornment: i,
21623
21626
  value: e.value,
21624
21627
  onValueChange: e.setValue,
21625
21628
  placeholder: e.placeholder,
21626
21629
  delay: e.debounce
21627
- }), t[22] = r, t[23] = e.debounce, t[24] = e.disabled, t[25] = e.maxLength, t[26] = e.minLength, t[27] = e.placeholder, t[28] = e.rows, t[29] = e.setValue, t[30] = e.value, t[31] = a, t[32] = o, t[33] = s) : s = t[33];
21628
- let l;
21629
- return t[34] !== e.fullWidth || t[35] !== e.label || t[36] !== s ? (l = /* @__PURE__ */ (0, Y.jsx)(LS, {
21630
- label: n,
21630
+ }), t[24] = i, t[25] = e.debounce, t[26] = e.disabled, t[27] = e.maxLength, t[28] = e.minLength, t[29] = e.placeholder, t[30] = e.rows, t[31] = e.setValue, t[32] = e.value, t[33] = o, t[34] = s, t[35] = n, t[36] = l) : l = t[36];
21631
+ let u;
21632
+ return t[37] !== e.fullWidth || t[38] !== e.label || t[39] !== l || t[40] !== n ? (u = /* @__PURE__ */ (0, Y.jsx)(LS, {
21633
+ controlId: n,
21634
+ label: r,
21631
21635
  align: "top",
21632
- fullWidth: i,
21633
- children: s
21634
- }), t[34] = e.fullWidth, t[35] = e.label, t[36] = s, t[37] = l) : l = t[37], l;
21636
+ fullWidth: a,
21637
+ children: l
21638
+ }), t[37] = e.fullWidth, t[38] = e.label, t[39] = l, t[40] = n, t[41] = u) : u = t[41], u;
21635
21639
  }
21636
- let i = e.label, a = e.fullWidth, o;
21637
- t[38] === e.fullWidth ? o = t[39] : (o = c("font-code", { "w-full": e.fullWidth }), t[38] = e.fullWidth, t[39] = o);
21638
- let s = e.minLength != null && e.minLength > 0, l;
21639
- t[40] === e ? l = t[41] : (l = (t) => e.setValue(t.target.value), t[40] = e, t[41] = l);
21640
- let u;
21641
- t[42] !== r || t[43] !== e.disabled || t[44] !== e.maxLength || t[45] !== e.minLength || t[46] !== e.placeholder || t[47] !== e.rows || t[48] !== e.value || t[49] !== o || t[50] !== s || t[51] !== l ? (u = /* @__PURE__ */ (0, Y.jsx)(Mh, {
21642
- className: o,
21640
+ let a = e.label, o = e.fullWidth, s;
21641
+ t[42] === e.fullWidth ? s = t[43] : (s = c("font-code", { "w-full": e.fullWidth }), t[42] = e.fullWidth, t[43] = s);
21642
+ let l = e.minLength != null && e.minLength > 0, u;
21643
+ t[44] === e ? u = t[45] : (u = (t) => e.setValue(t.target.value), t[44] = e, t[45] = u);
21644
+ let d;
21645
+ t[46] !== i || t[47] !== e.disabled || t[48] !== e.maxLength || t[49] !== e.minLength || t[50] !== e.placeholder || t[51] !== e.rows || t[52] !== e.value || t[53] !== s || t[54] !== l || t[55] !== u || t[56] !== n ? (d = /* @__PURE__ */ (0, Y.jsx)(Mh, {
21646
+ id: n,
21647
+ className: s,
21643
21648
  rows: e.rows,
21644
21649
  cols: 33,
21645
21650
  maxLength: e.maxLength,
21646
21651
  minLength: e.minLength,
21647
- required: s,
21652
+ required: l,
21648
21653
  disabled: e.disabled,
21649
- bottomAdornment: r,
21654
+ bottomAdornment: i,
21650
21655
  value: e.value,
21651
- onInput: l,
21656
+ onInput: u,
21652
21657
  placeholder: e.placeholder
21653
- }), t[42] = r, t[43] = e.disabled, t[44] = e.maxLength, t[45] = e.minLength, t[46] = e.placeholder, t[47] = e.rows, t[48] = e.value, t[49] = o, t[50] = s, t[51] = l, t[52] = u) : u = t[52];
21654
- let d;
21655
- return t[53] !== e.fullWidth || t[54] !== e.label || t[55] !== u ? (d = /* @__PURE__ */ (0, Y.jsx)(LS, {
21656
- label: i,
21658
+ }), t[46] = i, t[47] = e.disabled, t[48] = e.maxLength, t[49] = e.minLength, t[50] = e.placeholder, t[51] = e.rows, t[52] = e.value, t[53] = s, t[54] = l, t[55] = u, t[56] = n, t[57] = d) : d = t[57];
21659
+ let f;
21660
+ return t[58] !== e.fullWidth || t[59] !== e.label || t[60] !== d || t[61] !== n ? (f = /* @__PURE__ */ (0, Y.jsx)(LS, {
21661
+ controlId: n,
21662
+ label: a,
21657
21663
  align: "top",
21658
- fullWidth: a,
21659
- children: u
21660
- }), t[53] = e.fullWidth, t[54] = e.label, t[55] = u, t[56] = d) : d = t[56], d;
21664
+ fullWidth: o,
21665
+ children: d
21666
+ }), t[58] = e.fullWidth, t[59] = e.label, t[60] = d, t[61] = n, t[62] = f) : f = t[62], f;
21661
21667
  }, Xj = "••••••••", Zj = class {
21662
21668
  tagName = "marimo-text";
21663
21669
  validator = W({
@@ -21686,105 +21692,109 @@ var Jj = class {
21686
21692
  }, t ?? void 0);
21687
21693
  }
21688
21694
  }, Qj = (e) => {
21689
- let t = (0, X.c)(63), n = e.kind === "password" && e.passwordHasValue === !0, [r, i] = (0, J.useState)(n), a = (0, J.useRef)(!1), o = r ? "" : e.value, s = r ? Xj : e.placeholder, l;
21690
- t[0] !== r || t[1] !== e ? (l = r ? (t) => {
21691
- a.current && (i(!1), e.setValue(t));
21692
- } : e.setValue, t[0] = r, t[1] = e, t[2] = l) : l = t[2];
21693
- let u = l, d;
21694
- t[3] === r ? d = t[4] : (d = r ? () => {
21695
- a.current = !0;
21696
- } : void 0, t[3] = r, t[4] = d);
21697
- let f = d, [p, m] = (0, J.useState)(e.value), h = p ?? o, g;
21698
- t[5] !== e.kind || t[6] !== h ? (g = $j(e.kind, h), t[5] = e.kind, t[6] = h, t[7] = g) : g = t[7];
21699
- let _ = g, v;
21700
- t[8] === Symbol.for("react.memo_cache_sentinel") ? (v = {
21695
+ let t = (0, X.c)(67), n = (0, J.useId)(), r = e.kind === "password" && e.passwordHasValue === !0, [i, a] = (0, J.useState)(r), o = (0, J.useRef)(!1), s = i ? "" : e.value, l = i ? Xj : e.placeholder, u;
21696
+ t[0] !== i || t[1] !== e ? (u = i ? (t) => {
21697
+ o.current && (a(!1), e.setValue(t));
21698
+ } : e.setValue, t[0] = i, t[1] = e, t[2] = u) : u = t[2];
21699
+ let d = u, f;
21700
+ t[3] === i ? f = t[4] : (f = i ? () => {
21701
+ o.current = !0;
21702
+ } : void 0, t[3] = i, t[4] = f);
21703
+ let p = f, [m, h] = (0, J.useState)(e.value), g = m ?? s, _;
21704
+ t[5] !== e.kind || t[6] !== g ? (_ = $j(e.kind, g), t[5] = e.kind, t[6] = g, t[7] = _) : _ = t[7];
21705
+ let v = _, y;
21706
+ t[8] === Symbol.for("react.memo_cache_sentinel") ? (y = {
21701
21707
  text: null,
21702
21708
  password: /* @__PURE__ */ (0, Y.jsx)(qu, { size: 16 }),
21703
21709
  email: /* @__PURE__ */ (0, Y.jsx)(Ou, { size: 16 }),
21704
21710
  url: /* @__PURE__ */ (0, Y.jsx)(Wu, { size: 16 })
21705
- }, t[8] = v) : v = t[8];
21706
- let y = v, b;
21707
- t[9] !== e.maxLength || t[10] !== o ? (b = e.maxLength ? /* @__PURE__ */ (0, Y.jsxs)("span", {
21711
+ }, t[8] = y) : y = t[8];
21712
+ let b = y, x;
21713
+ t[9] !== e.maxLength || t[10] !== s ? (x = e.maxLength ? /* @__PURE__ */ (0, Y.jsxs)("span", {
21708
21714
  className: "text-muted-foreground text-xs font-medium",
21709
21715
  children: [
21710
- o.length,
21716
+ s.length,
21711
21717
  "/",
21712
21718
  e.maxLength
21713
21719
  ]
21714
- }) : null, t[9] = e.maxLength, t[10] = o, t[11] = b) : b = t[11];
21715
- let x = b, S = !_, C;
21716
- t[12] !== e.fullWidth || t[13] !== S ? (C = c({
21717
- "border-destructive": S,
21720
+ }) : null, t[9] = e.maxLength, t[10] = s, t[11] = x) : x = t[11];
21721
+ let S = x, C = !v, w;
21722
+ t[12] !== e.fullWidth || t[13] !== C ? (w = c({
21723
+ "border-destructive": C,
21718
21724
  "w-full": e.fullWidth
21719
- }), t[12] = e.fullWidth, t[13] = S, t[14] = C) : C = t[14];
21720
- let w = C, T;
21725
+ }), t[12] = e.fullWidth, t[13] = C, t[14] = w) : w = t[14];
21726
+ let T = w, E;
21721
21727
  if (e.debounce === !0) {
21722
- let n = y[e.kind], r = e.minLength != null && e.minLength > 0, i;
21723
- t[15] !== x || t[16] !== w || t[17] !== f || t[18] !== s || t[19] !== e.disabled || t[20] !== e.kind || t[21] !== e.maxLength || t[22] !== e.minLength || t[23] !== u || t[24] !== n || t[25] !== r || t[26] !== o ? (i = /* @__PURE__ */ (0, Y.jsx)(qi, {
21728
+ let r = b[e.kind], i = e.minLength != null && e.minLength > 0, a;
21729
+ t[15] !== S || t[16] !== T || t[17] !== n || t[18] !== p || t[19] !== l || t[20] !== e.disabled || t[21] !== e.kind || t[22] !== e.maxLength || t[23] !== e.minLength || t[24] !== d || t[25] !== r || t[26] !== i || t[27] !== s ? (a = /* @__PURE__ */ (0, Y.jsx)(qi, {
21730
+ id: n,
21724
21731
  "data-testid": "marimo-plugin-text-input",
21725
21732
  type: e.kind,
21726
- icon: n,
21727
- placeholder: s,
21733
+ icon: r,
21734
+ placeholder: l,
21728
21735
  maxLength: e.maxLength,
21729
21736
  minLength: e.minLength,
21730
- required: r,
21737
+ required: i,
21731
21738
  disabled: e.disabled,
21732
- className: w,
21733
- endAdornment: x,
21734
- value: o,
21735
- onValueChange: u,
21736
- onInputCapture: f
21737
- }), t[15] = x, t[16] = w, t[17] = f, t[18] = s, t[19] = e.disabled, t[20] = e.kind, t[21] = e.maxLength, t[22] = e.minLength, t[23] = u, t[24] = n, t[25] = r, t[26] = o, t[27] = i) : i = t[27], T = i;
21739
+ className: T,
21740
+ endAdornment: S,
21741
+ value: s,
21742
+ onValueChange: d,
21743
+ onInputCapture: p
21744
+ }), t[15] = S, t[16] = T, t[17] = n, t[18] = p, t[19] = l, t[20] = e.disabled, t[21] = e.kind, t[22] = e.maxLength, t[23] = e.minLength, t[24] = d, t[25] = r, t[26] = i, t[27] = s, t[28] = a) : a = t[28], E = a;
21738
21745
  } else if (typeof e.debounce == "number") {
21739
- let n = y[e.kind], r = e.minLength != null && e.minLength > 0, i;
21740
- t[28] === Symbol.for("react.memo_cache_sentinel") ? (i = (e) => m(e.currentTarget.value), t[28] = i) : i = t[28];
21741
- let a;
21742
- t[29] !== x || t[30] !== w || t[31] !== f || t[32] !== s || t[33] !== e.debounce || t[34] !== e.disabled || t[35] !== e.kind || t[36] !== e.maxLength || t[37] !== e.minLength || t[38] !== u || t[39] !== n || t[40] !== r || t[41] !== o ? (a = /* @__PURE__ */ (0, Y.jsx)(ea, {
21746
+ let r = b[e.kind], i = e.minLength != null && e.minLength > 0, a;
21747
+ t[29] === Symbol.for("react.memo_cache_sentinel") ? (a = (e) => h(e.currentTarget.value), t[29] = a) : a = t[29];
21748
+ let o;
21749
+ t[30] !== S || t[31] !== T || t[32] !== n || t[33] !== p || t[34] !== l || t[35] !== e.debounce || t[36] !== e.disabled || t[37] !== e.kind || t[38] !== e.maxLength || t[39] !== e.minLength || t[40] !== d || t[41] !== r || t[42] !== i || t[43] !== s ? (o = /* @__PURE__ */ (0, Y.jsx)(ea, {
21750
+ id: n,
21743
21751
  "data-testid": "marimo-plugin-text-input",
21744
21752
  type: e.kind,
21745
- icon: n,
21746
- placeholder: s,
21753
+ icon: r,
21754
+ placeholder: l,
21747
21755
  maxLength: e.maxLength,
21748
21756
  minLength: e.minLength,
21749
- required: r,
21757
+ required: i,
21750
21758
  disabled: e.disabled,
21751
- className: w,
21752
- endAdornment: x,
21753
- value: o,
21754
- onValueChange: u,
21755
- onBlur: i,
21759
+ className: T,
21760
+ endAdornment: S,
21761
+ value: s,
21762
+ onValueChange: d,
21763
+ onBlur: a,
21756
21764
  delay: e.debounce,
21757
- onInputCapture: f
21758
- }), t[29] = x, t[30] = w, t[31] = f, t[32] = s, t[33] = e.debounce, t[34] = e.disabled, t[35] = e.kind, t[36] = e.maxLength, t[37] = e.minLength, t[38] = u, t[39] = n, t[40] = r, t[41] = o, t[42] = a) : a = t[42], T = a;
21765
+ onInputCapture: p
21766
+ }), t[30] = S, t[31] = T, t[32] = n, t[33] = p, t[34] = l, t[35] = e.debounce, t[36] = e.disabled, t[37] = e.kind, t[38] = e.maxLength, t[39] = e.minLength, t[40] = d, t[41] = r, t[42] = i, t[43] = s, t[44] = o) : o = t[44], E = o;
21759
21767
  } else {
21760
- let n = y[e.kind], r = e.minLength != null && e.minLength > 0, i;
21761
- t[43] === u ? i = t[44] : (i = (e) => u(e.currentTarget.value), t[43] = u, t[44] = i);
21762
- let a;
21763
- t[45] === Symbol.for("react.memo_cache_sentinel") ? (a = (e) => m(e.currentTarget.value), t[45] = a) : a = t[45];
21768
+ let r = b[e.kind], i = e.minLength != null && e.minLength > 0, a;
21769
+ t[45] === d ? a = t[46] : (a = (e) => d(e.currentTarget.value), t[45] = d, t[46] = a);
21770
+ let o;
21771
+ t[47] === Symbol.for("react.memo_cache_sentinel") ? (o = (e) => h(e.currentTarget.value), t[47] = o) : o = t[47];
21764
21772
  let c;
21765
- t[46] !== x || t[47] !== w || t[48] !== f || t[49] !== s || t[50] !== e.disabled || t[51] !== e.kind || t[52] !== e.maxLength || t[53] !== e.minLength || t[54] !== n || t[55] !== r || t[56] !== i || t[57] !== o ? (c = /* @__PURE__ */ (0, Y.jsx)(Ji, {
21773
+ t[48] !== S || t[49] !== T || t[50] !== n || t[51] !== p || t[52] !== l || t[53] !== e.disabled || t[54] !== e.kind || t[55] !== e.maxLength || t[56] !== e.minLength || t[57] !== r || t[58] !== i || t[59] !== a || t[60] !== s ? (c = /* @__PURE__ */ (0, Y.jsx)(Ji, {
21774
+ id: n,
21766
21775
  "data-testid": "marimo-plugin-text-input",
21767
21776
  type: e.kind,
21768
- icon: n,
21769
- placeholder: s,
21777
+ icon: r,
21778
+ placeholder: l,
21770
21779
  maxLength: e.maxLength,
21771
21780
  minLength: e.minLength,
21772
- required: r,
21781
+ required: i,
21773
21782
  disabled: e.disabled,
21774
- className: w,
21775
- endAdornment: x,
21776
- value: o,
21777
- onInput: i,
21778
- onBlur: a,
21779
- onInputCapture: f
21780
- }), t[46] = x, t[47] = w, t[48] = f, t[49] = s, t[50] = e.disabled, t[51] = e.kind, t[52] = e.maxLength, t[53] = e.minLength, t[54] = n, t[55] = r, t[56] = i, t[57] = o, t[58] = c) : c = t[58], T = c;
21783
+ className: T,
21784
+ endAdornment: S,
21785
+ value: s,
21786
+ onInput: a,
21787
+ onBlur: o,
21788
+ onInputCapture: p
21789
+ }), t[48] = S, t[49] = T, t[50] = n, t[51] = p, t[52] = l, t[53] = e.disabled, t[54] = e.kind, t[55] = e.maxLength, t[56] = e.minLength, t[57] = r, t[58] = i, t[59] = a, t[60] = s, t[61] = c) : c = t[61], E = c;
21781
21790
  }
21782
- let E;
21783
- return t[59] !== T || t[60] !== e.fullWidth || t[61] !== e.label ? (E = /* @__PURE__ */ (0, Y.jsx)(LS, {
21791
+ let D;
21792
+ return t[62] !== E || t[63] !== n || t[64] !== e.fullWidth || t[65] !== e.label ? (D = /* @__PURE__ */ (0, Y.jsx)(LS, {
21793
+ controlId: n,
21784
21794
  label: e.label,
21785
21795
  fullWidth: e.fullWidth,
21786
- children: T
21787
- }), t[59] = T, t[60] = e.fullWidth, t[61] = e.label, t[62] = E) : E = t[62], E;
21796
+ children: E
21797
+ }), t[62] = E, t[63] = n, t[64] = e.fullWidth, t[65] = e.label, t[66] = D) : D = t[66], D;
21788
21798
  };
21789
21799
  function $j(e, t) {
21790
21800
  if (!t) return !0;
@@ -30070,7 +30080,7 @@ function OR(e) {
30070
30080
  }
30071
30081
  //#endregion
30072
30082
  //#region src/components/editor/renderers/slides-layout/slides-layout.tsx
30073
- var kR = J.lazy(() => import("./reveal-component-GZhn88mZ.js")), AR = (e) => {
30083
+ var kR = J.lazy(() => import("./reveal-component-D2i9ey2a.js")), AR = (e) => {
30074
30084
  let t = (0, X.c)(33), { layout: n, setLayout: r, cells: i, mode: a } = e, o = ns(Sa), s = a === "read" || o, c = ns(gt) > 1, [l, u] = (0, J.useState)(null), d;
30075
30085
  t[0] !== i || t[1] !== n ? (d = EP(i, n), t[0] = i, t[1] = n, t[2] = d) : d = t[2];
30076
30086
  let { slideCells: f, skippedIds: p, noOutputIds: m, slideTypes: h, startCellIndex: g } = d, _;
@@ -1,6 +1,6 @@
1
1
  import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
2
2
  import { t } from "./react-ofJbxM4x.js";
3
- import { a as n } from "./glide-data-editor-DfRNtZdm.js";
3
+ import { a as n } from "./glide-data-editor-CQKpxgZb.js";
4
4
  //#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.2.8_b9e6aec46d952f631ce71b0585d2a8e5/node_modules/@glideapps/glide-data-grid/dist/esm/internal/data-grid-overlay-editor/private/number-overlay-editor-style.js
5
5
  var r = /* @__PURE__ */ e(t()), i = /*#__PURE__*/ n("div")({
6
6
  name: "NumberOverlayEditorStyle",
@@ -4,14 +4,14 @@ import { t as o } from "./react-ofJbxM4x.js";
4
4
  import { t as s } from "./compiler-runtime-Cj8ZWiNS.js";
5
5
  import { h as c, t as l } from "./tooltip-CuNWg2ay.js";
6
6
  import { w as u } from "./cells-DzqPprAQ.js";
7
- import { $ as d, Q as f, Z as p, an as m, i as h, l as g, ln as _, n as v, on as y, r as b, t as x, u as S } from "./common-D1NEOSXA.js";
7
+ import { $ as d, Q as f, Z as p, an as m, i as h, l as g, ln as _, n as v, on as y, r as b, t as x, u as S } from "./common-Lbz4UoEr.js";
8
8
  import { M as C } from "./select-Bs-nmvm6.js";
9
9
  import { q as ee } from "./dropdown-menu-Cz4TdOJh.js";
10
10
  import { y as w } from "./toDate-vEi5kTfY.js";
11
11
  import { t as T } from "./jsx-runtime-DgDPJV9S.js";
12
12
  import { q as te } from "./use-restore-focus-kmgwrL8q.js";
13
13
  import { A as E, C as D, b as O } from "./useTheme-BwSgeAFb.js";
14
- import { a as k, n as ne, t as re } from "./code-visibility-DwRnMyBy.js";
14
+ import { a as k, n as ne, t as re } from "./code-visibility-a6v4Kwtn.js";
15
15
  /* empty css */
16
16
  var A = c("sticky-note", [["path", {
17
17
  d: "M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/islands",
3
- "version": "0.25.2-dev64",
3
+ "version": "0.25.2-dev66",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  /* Copyright 2026 Marimo. All rights reserved. */
2
2
 
3
- import type { JSX } from "react";
3
+ import { type JSX, useId } from "react";
4
4
  import { z } from "zod";
5
5
  import { cn } from "@/utils/cn";
6
6
  import {
@@ -56,6 +56,7 @@ interface TextAreaComponentProps extends Data {
56
56
  }
57
57
 
58
58
  const TextAreaComponent = (props: TextAreaComponentProps) => {
59
+ const textareaId = useId();
59
60
  const bottomAdornment = props.maxLength ? (
60
61
  <span className="text-muted-foreground text-xs font-medium">
61
62
  {props.value.length}/{props.maxLength}
@@ -64,8 +65,14 @@ const TextAreaComponent = (props: TextAreaComponentProps) => {
64
65
 
65
66
  if (props.debounce === true) {
66
67
  return (
67
- <Labeled label={props.label} align="top" fullWidth={props.fullWidth}>
68
+ <Labeled
69
+ controlId={textareaId}
70
+ label={props.label}
71
+ align="top"
72
+ fullWidth={props.fullWidth}
73
+ >
68
74
  <OnBlurredTextarea
75
+ id={textareaId}
69
76
  className={cn("font-code", {
70
77
  "w-full": props.fullWidth,
71
78
  })}
@@ -86,8 +93,14 @@ const TextAreaComponent = (props: TextAreaComponentProps) => {
86
93
 
87
94
  if (typeof props.debounce === "number") {
88
95
  return (
89
- <Labeled label={props.label} align="top" fullWidth={props.fullWidth}>
96
+ <Labeled
97
+ controlId={textareaId}
98
+ label={props.label}
99
+ align="top"
100
+ fullWidth={props.fullWidth}
101
+ >
90
102
  <DebouncedTextarea
103
+ id={textareaId}
91
104
  className={cn("font-code", {
92
105
  "w-full": props.fullWidth,
93
106
  })}
@@ -108,8 +121,14 @@ const TextAreaComponent = (props: TextAreaComponentProps) => {
108
121
  }
109
122
 
110
123
  return (
111
- <Labeled label={props.label} align="top" fullWidth={props.fullWidth}>
124
+ <Labeled
125
+ controlId={textareaId}
126
+ label={props.label}
127
+ align="top"
128
+ fullWidth={props.fullWidth}
129
+ >
112
130
  <Textarea
131
+ id={textareaId}
113
132
  className={cn("font-code", {
114
133
  "w-full": props.fullWidth,
115
134
  })}
@@ -1,7 +1,7 @@
1
1
  /* Copyright 2026 Marimo. All rights reserved. */
2
2
 
3
3
  import { AtSignIcon, GlobeIcon, LockIcon } from "lucide-react";
4
- import { type JSX, useRef, useState } from "react";
4
+ import { type JSX, useId, useRef, useState } from "react";
5
5
  import { z } from "zod";
6
6
  import {
7
7
  DebouncedInput,
@@ -73,6 +73,7 @@ interface TextComponentProps extends Data {
73
73
  }
74
74
 
75
75
  const TextComponent = (props: TextComponentProps) => {
76
+ const inputId = useId();
76
77
  // Before first real keystroke: show masked placeholder, suppress setValue.
77
78
  // After first keystroke: normal password field.
78
79
  const initiallyMasked =
@@ -125,6 +126,7 @@ const TextComponent = (props: TextComponentProps) => {
125
126
  if (props.debounce === true) {
126
127
  input = (
127
128
  <OnBlurredInput
129
+ id={inputId}
128
130
  data-testid="marimo-plugin-text-input"
129
131
  type={props.kind}
130
132
  icon={icon[props.kind]}
@@ -143,6 +145,7 @@ const TextComponent = (props: TextComponentProps) => {
143
145
  } else if (typeof props.debounce === "number") {
144
146
  input = (
145
147
  <DebouncedInput
148
+ id={inputId}
146
149
  data-testid="marimo-plugin-text-input"
147
150
  type={props.kind}
148
151
  icon={icon[props.kind]}
@@ -163,6 +166,7 @@ const TextComponent = (props: TextComponentProps) => {
163
166
  } else {
164
167
  input = (
165
168
  <Input
169
+ id={inputId}
166
170
  data-testid="marimo-plugin-text-input"
167
171
  type={props.kind}
168
172
  icon={icon[props.kind]}
@@ -182,7 +186,11 @@ const TextComponent = (props: TextComponentProps) => {
182
186
  }
183
187
 
184
188
  return (
185
- <Labeled label={props.label} fullWidth={props.fullWidth}>
189
+ <Labeled
190
+ controlId={inputId}
191
+ label={props.label}
192
+ fullWidth={props.fullWidth}
193
+ >
186
194
  {input}
187
195
  </Labeled>
188
196
  );
@@ -0,0 +1,141 @@
1
+ /* Copyright 2026 Marimo. All rights reserved. */
2
+ import { act, fireEvent, render, screen } from "@testing-library/react";
3
+ import { expect, test, vi } from "vitest";
4
+ import type { IPlugin } from "../../types";
5
+ import { TextInputPlugin } from "../TextInputPlugin";
6
+ import { TextAreaPlugin } from "../TextAreaPlugin";
7
+
8
+ function testLabelBehavior<D extends { label: string | null }>(
9
+ plugin: IPlugin<string, D>,
10
+ ) {
11
+ for (const debounce of [false, true, 200]) {
12
+ test(`${plugin.tagName} associates formatted label with debounce=${debounce}`, () => {
13
+ const setValue = vi.fn();
14
+ const props = {
15
+ host: document.createElement("div"),
16
+ value: "",
17
+ setValue,
18
+ functions: {},
19
+ data: plugin.validator.parse({
20
+ initialValue: "",
21
+ placeholder: "",
22
+ label: "<strong>Notes &amp; details</strong>",
23
+ debounce,
24
+ }),
25
+ };
26
+ const { rerender } = render(plugin.render(props));
27
+ const control = screen.getByLabelText("Notes & details");
28
+ expect(control).toHaveAccessibleName("Notes & details");
29
+ const id = control.id;
30
+ rerender(
31
+ plugin.render({
32
+ ...props,
33
+ data: { ...props.data, label: "Updated notes" },
34
+ }),
35
+ );
36
+ expect(screen.getByLabelText("Updated notes").id).toBe(id);
37
+ rerender(
38
+ plugin.render({ ...props, data: { ...props.data, label: null } }),
39
+ );
40
+ expect(control).toHaveAccessibleName("");
41
+ });
42
+ test(`${plugin.tagName} preserves commit timing with debounce=${debounce}`, () => {
43
+ vi.useFakeTimers();
44
+ try {
45
+ const setValue = vi.fn();
46
+ const props = {
47
+ host: document.createElement("div"),
48
+ value: "",
49
+ setValue,
50
+ functions: {},
51
+ data: plugin.validator.parse({
52
+ initialValue: "",
53
+ placeholder: "",
54
+ label: "Notes",
55
+ debounce,
56
+ }),
57
+ };
58
+ render(plugin.render(props));
59
+ const control = screen.getByLabelText("Notes");
60
+ if (debounce === false) {
61
+ fireEvent.input(control, { target: { value: "hello" } });
62
+ } else {
63
+ fireEvent.change(control, { target: { value: "hello" } });
64
+ }
65
+ const immediateCalls = debounce === false ? 1 : 0;
66
+ expect(setValue).toHaveBeenCalledTimes(immediateCalls);
67
+ act(() => vi.advanceTimersByTime(199));
68
+ expect(setValue).toHaveBeenCalledTimes(immediateCalls);
69
+ if (debounce === true) {
70
+ fireEvent.blur(control);
71
+ } else if (typeof debounce === "number") {
72
+ act(() => vi.advanceTimersByTime(1));
73
+ }
74
+ expect(setValue).toHaveBeenCalledWith("hello");
75
+ } finally {
76
+ vi.useRealTimers();
77
+ }
78
+ });
79
+ }
80
+ }
81
+
82
+ for (const kind of ["text", "password", "email", "url"] as const) {
83
+ test(`native association preserves ${kind} input attributes`, () => {
84
+ const plugin = new TextInputPlugin();
85
+ render(
86
+ plugin.render({
87
+ host: document.createElement("div"),
88
+ value: "",
89
+ setValue: vi.fn(),
90
+ functions: {},
91
+ data: plugin.validator.parse({
92
+ initialValue: "",
93
+ placeholder: "",
94
+ label: "Account",
95
+ kind,
96
+ disabled: true,
97
+ minLength: 2,
98
+ maxLength: 30,
99
+ }),
100
+ }),
101
+ );
102
+ const control = screen.getByLabelText("Account");
103
+ expect(control).toHaveAttribute("type", kind);
104
+ expect(control).toBeDisabled();
105
+ expect(control).toBeRequired();
106
+ expect(control).toHaveAttribute("minlength", "2");
107
+ expect(control).toHaveAttribute("maxlength", "30");
108
+ });
109
+ }
110
+
111
+ function testMultipleInstances<D>(plugin: IPlugin<string, D>) {
112
+ test(`${plugin.tagName} keeps repeated labels independently associated`, () => {
113
+ const props = {
114
+ host: document.createElement("div"),
115
+ value: "",
116
+ setValue: vi.fn(),
117
+ functions: {},
118
+ data: plugin.validator.parse({
119
+ initialValue: "",
120
+ placeholder: "",
121
+ label: "Notes",
122
+ }),
123
+ };
124
+ render(
125
+ <>
126
+ {plugin.render(props)}
127
+ {plugin.render(props)}
128
+ </>,
129
+ );
130
+ const controls = screen.getAllByLabelText("Notes");
131
+ expect(controls).toHaveLength(2);
132
+ expect(controls[0].id).not.toBe(controls[1].id);
133
+ expect(controls[0]).toHaveAccessibleName("Notes");
134
+ expect(controls[1]).toHaveAccessibleName("Notes");
135
+ });
136
+ }
137
+
138
+ testLabelBehavior(new TextInputPlugin());
139
+ testLabelBehavior(new TextAreaPlugin());
140
+ testMultipleInstances(new TextInputPlugin());
141
+ testMultipleInstances(new TextAreaPlugin());