@marimo-team/islands 0.21.2-dev20 → 0.21.2-dev21

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.
package/dist/main.js CHANGED
@@ -70800,7 +70800,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
70800
70800
  return Logger.warn("Failed to get version from mount config"), null;
70801
70801
  }
70802
70802
  }
70803
- const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.21.2-dev20"), showCodeInRunModeAtom = atom(true);
70803
+ const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.21.2-dev21"), showCodeInRunModeAtom = atom(true);
70804
70804
  atom(null);
70805
70805
  var import_compiler_runtime$89 = require_compiler_runtime();
70806
70806
  function useKeydownOnElement(e, r) {
@@ -92708,21 +92708,75 @@ ${c}
92708
92708
  }), r[13] = c, r[14] = e.label, r[15] = f, r[16] = O, r[17] = M) : M = r[17], M;
92709
92709
  };
92710
92710
  var import_compiler_runtime$28 = require_compiler_runtime(), RangeSlider = import_react.forwardRef((e, r) => {
92711
- let c = (0, import_compiler_runtime$28.c)(35), { className: d, valueMap: f, ..._ } = e, [v, y] = useBoolean(false), { locale: S } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), w = dist_exports, E;
92712
- c[0] === d ? E = c[1] : (E = cn("relative flex touch-none select-none hover:cursor-pointer", "data-[orientation=horizontal]:w-full data-[orientation=horizontal]:items-center", "data-[orientation=vertical]:h-full data-[orientation=vertical]:justify-center", "data-disabled:cursor-not-allowed", d), c[0] = d, c[1] = E);
92713
- let O;
92714
- c[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O = cn("relative grow overflow-hidden rounded-full bg-slate-200 dark:bg-accent/60", "data-[orientation=horizontal]:h-2 data-[orientation=horizontal]:w-full", "data-[orientation=vertical]:h-full data-[orientation=vertical]:w-2"), c[2] = O) : O = c[2];
92715
- let M;
92716
- c[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = (0, import_jsx_runtime.jsx)(Track, {
92711
+ let c = (0, import_compiler_runtime$28.c)(56), d, f, _;
92712
+ c[0] === e ? (d = c[1], f = c[2], _ = c[3]) : ({ className: d, valueMap: _, ...f } = e, c[0] = e, c[1] = d, c[2] = f, c[3] = _);
92713
+ let [v, y] = useBoolean(false), { locale: S } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), w = import_react.useRef(false), E = import_react.useRef(0), O = import_react.useRef(0), M;
92714
+ c[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = [], c[4] = M) : M = c[4];
92715
+ let I = import_react.useRef(M), z;
92716
+ c[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = [], c[5] = z) : z = c[5];
92717
+ let G = import_react.useRef(z), q = import_react.useRef(null), IY = import_react.useRef(null), LY = import_react.useRef(null), RY;
92718
+ c[6] === r ? RY = c[7] : (RY = (e2) => {
92719
+ q.current = e2, typeof r == "function" ? r(e2) : r && (r.current = e2);
92720
+ }, c[6] = r, c[7] = RY);
92721
+ let zY = RY, BY;
92722
+ c[8] !== f.disabled || c[9] !== f.value ? (BY = (e2) => {
92723
+ var _a3;
92724
+ !f.value || f.value.length !== 2 || f.disabled || (e2.preventDefault(), e2.stopPropagation(), w.current = true, E.current = e2.clientX, O.current = e2.clientY, I.current = [
92725
+ ...f.value
92726
+ ], G.current = [
92727
+ ...f.value
92728
+ ], LY.current = ((_a3 = IY.current) == null ? void 0 : _a3.getBoundingClientRect()) ?? null, e2.currentTarget.setPointerCapture(e2.pointerId));
92729
+ }, c[8] = f.disabled, c[9] = f.value, c[10] = BY) : BY = c[10];
92730
+ let VY = BY, HY;
92731
+ c[11] === f ? HY = c[12] : (HY = (e2) => {
92732
+ var _a3;
92733
+ if (!w.current) return;
92734
+ e2.stopPropagation();
92735
+ let r2 = LY.current;
92736
+ if (!r2) return;
92737
+ let c2 = f.orientation === "vertical", d2 = f.min ?? 0, _2 = f.max ?? 100, v2 = _2 - d2, y2;
92738
+ if (c2) {
92739
+ let c3 = r2.height;
92740
+ y2 = -((e2.clientY - O.current) / c3) * v2;
92741
+ } else {
92742
+ let c3 = r2.width;
92743
+ y2 = (e2.clientX - E.current) / c3 * v2;
92744
+ }
92745
+ let [S2, M2] = I.current, z2 = M2 - S2, q2 = f.steps, IY2 = q2 && q2.length > 1 ? Math.min(...q2.slice(1).map((e3, r3) => e3 - q2[r3])) : f.step ?? 1, RY2 = Math.round(y2 / IY2) * IY2, zY2 = S2 + Math.max(d2 - S2, Math.min(_2 - M2, RY2)), BY2 = zY2 + z2;
92746
+ G.current = [
92747
+ zY2,
92748
+ BY2
92749
+ ], (_a3 = f.onValueChange) == null ? void 0 : _a3.call(f, [
92750
+ zY2,
92751
+ BY2
92752
+ ]);
92753
+ }, c[11] = f, c[12] = HY);
92754
+ let UY = HY, WY;
92755
+ c[13] === f ? WY = c[14] : (WY = (e2) => {
92756
+ var _a3;
92757
+ w.current && (e2.currentTarget.releasePointerCapture(e2.pointerId), w.current = false, G.current.length === 2 && ((_a3 = f.onValueCommit) == null ? void 0 : _a3.call(f, G.current)));
92758
+ }, c[13] = f, c[14] = WY);
92759
+ let GY = WY, KY;
92760
+ c[15] === d ? KY = c[16] : (KY = cn("relative flex touch-none select-none hover:cursor-pointer", "data-[orientation=horizontal]:w-full data-[orientation=horizontal]:items-center", "data-[orientation=vertical]:h-full data-[orientation=vertical]:justify-center", "data-disabled:cursor-not-allowed", d), c[15] = d, c[16] = KY);
92761
+ let qY;
92762
+ c[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (qY = cn("relative grow overflow-hidden rounded-full bg-slate-200 dark:bg-accent/60", "data-[orientation=horizontal]:h-2 data-[orientation=horizontal]:w-full", "data-[orientation=vertical]:h-full data-[orientation=vertical]:w-2"), c[17] = qY) : qY = c[17];
92763
+ let JY;
92764
+ c[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (JY = cn("absolute bg-blue-500 dark:bg-primary", "data-[orientation=horizontal]:h-full", "data-[orientation=vertical]:w-full", "data-disabled:opacity-50", "hover:cursor-grab active:cursor-grabbing"), c[18] = JY) : JY = c[18];
92765
+ let YY;
92766
+ c[19] !== VY || c[20] !== UY || c[21] !== GY ? (YY = (0, import_jsx_runtime.jsx)(Track, {
92767
+ ref: IY,
92717
92768
  "data-testid": "track",
92718
- className: O,
92769
+ className: qY,
92719
92770
  children: (0, import_jsx_runtime.jsx)(Range, {
92720
92771
  "data-testid": "range",
92721
- className: cn("absolute bg-blue-500 dark:bg-primary", "data-[orientation=horizontal]:h-full", "data-[orientation=vertical]:w-full", "data-disabled:opacity-50")
92772
+ className: JY,
92773
+ onPointerDown: VY,
92774
+ onPointerMove: UY,
92775
+ onPointerUp: GY
92722
92776
  })
92723
- }), c[3] = M) : M = c[3];
92724
- let I;
92725
- c[4] !== y.setFalse || c[5] !== y.setTrue ? (I = (0, import_jsx_runtime.jsx)(TooltipTrigger, {
92777
+ }), c[19] = VY, c[20] = UY, c[21] = GY, c[22] = YY) : YY = c[22];
92778
+ let XY;
92779
+ c[23] !== y.setFalse || c[24] !== y.setTrue ? (XY = (0, import_jsx_runtime.jsx)(TooltipTrigger, {
92726
92780
  asChild: true,
92727
92781
  children: (0, import_jsx_runtime.jsx)(Thumb, {
92728
92782
  "data-testid": "thumb",
@@ -92732,28 +92786,30 @@ ${c}
92732
92786
  onMouseEnter: y.setTrue,
92733
92787
  onMouseLeave: y.setFalse
92734
92788
  })
92735
- }), c[4] = y.setFalse, c[5] = y.setTrue, c[6] = I) : I = c[6];
92736
- let z = _.value != null && _.value.length === 2 && (0, import_jsx_runtime.jsx)(TooltipContent, {
92737
- children: prettyScientificNumber(f(_.value[0]), {
92789
+ }), c[23] = y.setFalse, c[24] = y.setTrue, c[25] = XY) : XY = c[25];
92790
+ let ZY;
92791
+ c[26] !== S || c[27] !== f.value || c[28] !== _ ? (ZY = f.value != null && f.value.length === 2 && (0, import_jsx_runtime.jsx)(TooltipContent, {
92792
+ children: prettyScientificNumber(_(f.value[0]), {
92738
92793
  locale: S
92739
92794
  })
92740
- }, _.value[0]), G;
92741
- c[7] === z ? G = c[8] : (G = (0, import_jsx_runtime.jsx)(TooltipPortal, {
92742
- children: z
92743
- }), c[7] = z, c[8] = G);
92744
- let q;
92745
- c[9] !== v || c[10] !== I || c[11] !== G ? (q = (0, import_jsx_runtime.jsx)(TooltipProvider, {
92795
+ }, f.value[0]), c[26] = S, c[27] = f.value, c[28] = _, c[29] = ZY) : ZY = c[29];
92796
+ let QY;
92797
+ c[30] === ZY ? QY = c[31] : (QY = (0, import_jsx_runtime.jsx)(TooltipPortal, {
92798
+ children: ZY
92799
+ }), c[30] = ZY, c[31] = QY);
92800
+ let $Y;
92801
+ c[32] !== v || c[33] !== XY || c[34] !== QY ? ($Y = (0, import_jsx_runtime.jsx)(TooltipProvider, {
92746
92802
  children: (0, import_jsx_runtime.jsxs)(TooltipRoot, {
92747
92803
  delayDuration: 0,
92748
92804
  open: v,
92749
92805
  children: [
92750
- I,
92751
- G
92806
+ XY,
92807
+ QY
92752
92808
  ]
92753
92809
  })
92754
- }), c[9] = v, c[10] = I, c[11] = G, c[12] = q) : q = c[12];
92755
- let IY = TooltipProvider, LY = TooltipRoot, RY;
92756
- c[13] !== y.setFalse || c[14] !== y.setTrue ? (RY = (0, import_jsx_runtime.jsx)(TooltipTrigger, {
92810
+ }), c[32] = v, c[33] = XY, c[34] = QY, c[35] = $Y) : $Y = c[35];
92811
+ let eX;
92812
+ c[36] !== y.setFalse || c[37] !== y.setTrue ? (eX = (0, import_jsx_runtime.jsx)(TooltipTrigger, {
92757
92813
  asChild: true,
92758
92814
  children: (0, import_jsx_runtime.jsx)(Thumb, {
92759
92815
  "data-testid": "thumb",
@@ -92763,39 +92819,39 @@ ${c}
92763
92819
  onMouseEnter: y.setTrue,
92764
92820
  onMouseLeave: y.setFalse
92765
92821
  })
92766
- }), c[13] = y.setFalse, c[14] = y.setTrue, c[15] = RY) : RY = c[15];
92767
- let zY = TooltipPortal, BY = _.value != null && _.value.length === 2 && (0, import_jsx_runtime.jsx)(TooltipContent, {
92768
- children: prettyScientificNumber(f(_.value[1]), {
92822
+ }), c[36] = y.setFalse, c[37] = y.setTrue, c[38] = eX) : eX = c[38];
92823
+ let tX;
92824
+ c[39] !== S || c[40] !== f.value || c[41] !== _ ? (tX = f.value != null && f.value.length === 2 && (0, import_jsx_runtime.jsx)(TooltipContent, {
92825
+ children: prettyScientificNumber(_(f.value[1]), {
92769
92826
  locale: S
92770
92827
  })
92771
- }, _.value[1]), VY;
92772
- c[16] !== zY || c[17] !== BY ? (VY = (0, import_jsx_runtime.jsx)(zY, {
92773
- children: BY
92774
- }), c[16] = zY, c[17] = BY, c[18] = VY) : VY = c[18];
92775
- let HY;
92776
- c[19] !== LY || c[20] !== v || c[21] !== RY || c[22] !== VY ? (HY = (0, import_jsx_runtime.jsxs)(LY, {
92777
- delayDuration: 0,
92778
- open: v,
92779
- children: [
92780
- RY,
92781
- VY
92782
- ]
92783
- }), c[19] = LY, c[20] = v, c[21] = RY, c[22] = VY, c[23] = HY) : HY = c[23];
92784
- let UY;
92785
- c[24] !== IY || c[25] !== HY ? (UY = (0, import_jsx_runtime.jsx)(IY, {
92786
- children: HY
92787
- }), c[24] = IY, c[25] = HY, c[26] = UY) : UY = c[26];
92788
- let WY;
92789
- return c[27] !== _ || c[28] !== r || c[29] !== w.Root || c[30] !== UY || c[31] !== E || c[32] !== M || c[33] !== q ? (WY = (0, import_jsx_runtime.jsxs)(w.Root, {
92790
- ref: r,
92791
- className: E,
92792
- ..._,
92828
+ }, f.value[1]), c[39] = S, c[40] = f.value, c[41] = _, c[42] = tX) : tX = c[42];
92829
+ let nX;
92830
+ c[43] === tX ? nX = c[44] : (nX = (0, import_jsx_runtime.jsx)(TooltipPortal, {
92831
+ children: tX
92832
+ }), c[43] = tX, c[44] = nX);
92833
+ let rX;
92834
+ c[45] !== v || c[46] !== eX || c[47] !== nX ? (rX = (0, import_jsx_runtime.jsx)(TooltipProvider, {
92835
+ children: (0, import_jsx_runtime.jsxs)(TooltipRoot, {
92836
+ delayDuration: 0,
92837
+ open: v,
92838
+ children: [
92839
+ eX,
92840
+ nX
92841
+ ]
92842
+ })
92843
+ }), c[45] = v, c[46] = eX, c[47] = nX, c[48] = rX) : rX = c[48];
92844
+ let iX;
92845
+ return c[49] !== zY || c[50] !== f || c[51] !== YY || c[52] !== $Y || c[53] !== rX || c[54] !== KY ? (iX = (0, import_jsx_runtime.jsxs)(Root$1, {
92846
+ ref: zY,
92847
+ className: KY,
92848
+ ...f,
92793
92849
  children: [
92794
- M,
92795
- q,
92796
- UY
92850
+ YY,
92851
+ $Y,
92852
+ rX
92797
92853
  ]
92798
- }), c[27] = _, c[28] = r, c[29] = w.Root, c[30] = UY, c[31] = E, c[32] = M, c[33] = q, c[34] = WY) : WY = c[34], WY;
92854
+ }), c[49] = zY, c[50] = f, c[51] = YY, c[52] = $Y, c[53] = rX, c[54] = KY, c[55] = iX) : iX = c[55], iX;
92799
92855
  });
92800
92856
  RangeSlider.displayName = Root$1.displayName;
92801
92857
  var import_compiler_runtime$27 = require_compiler_runtime(), RangeSliderPlugin = class {