@marimo-team/islands 0.22.6-dev1 → 0.22.6-dev12

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.
@@ -7038,6 +7038,7 @@ function resourceExtension(e18) {
7038
7038
  }) }),
7039
7039
  Prec.high(keymap.of([{
7040
7040
  key: "Tab",
7041
+ preventDefault: true,
7041
7042
  run: (e19) => acceptCompletion(e19)
7042
7043
  }])),
7043
7044
  contextCallbacks.of({ addAttachment: (e19) => y == null ? void 0 : y([e19]) }),
package/dist/main.js CHANGED
@@ -37125,7 +37125,7 @@ ${E}`,
37125
37125
  };
37126
37126
  }
37127
37127
  };
37128
- var LazyChatbot = import_react.lazy(() => import("./chat-ui-BXYRQ5MH.js").then((e) => ({
37128
+ var LazyChatbot = import_react.lazy(() => import("./chat-ui-B9oZ19ii.js").then((e) => ({
37129
37129
  default: e.Chatbot
37130
37130
  }))), messageSchema = array(object({
37131
37131
  id: string(),
@@ -57315,8 +57315,14 @@ ${c}
57315
57315
  }
57316
57316
  function hasPureLineTrace(e) {
57317
57317
  return e ? e.some((e2) => {
57318
- let r = e2.type;
57319
- return r === void 0 || LINE_CLICK_TRACE_TYPES.has(String(r)) ? isPureLineMode(e2.mode) : false;
57318
+ let r = e2;
57319
+ return r.type === void 0 || LINE_CLICK_TRACE_TYPES.has(String(r.type)) ? isPureLineMode(r.mode) : false;
57320
+ }) : false;
57321
+ }
57322
+ function hasAreaTrace(e) {
57323
+ return e ? e.some((e2) => {
57324
+ let r = e2;
57325
+ return r.type !== void 0 && !LINE_CLICK_TRACE_TYPES.has(String(r.type)) ? false : typeof r.fill == "string" && r.fill !== "" && r.fill !== "none" || r.stackgroup != null;
57320
57326
  }) : false;
57321
57327
  }
57322
57328
  function createDragmodeButton(e, r, c, d, f) {
@@ -57349,7 +57355,7 @@ ${c}
57349
57355
  function shouldHandleClickSelection(e) {
57350
57356
  return e.some((e2) => {
57351
57357
  let r = getTraceSource(e2).type;
57352
- return r === "bar" || r === "heatmap" || r === "histogram" || r === "waterfall" || isLinePoint(e2);
57358
+ return r === "bar" || r === "heatmap" || r === "histogram" || r === "waterfall" || r === "violin" || isLinePoint(e2);
57353
57359
  });
57354
57360
  }
57355
57361
  function extractIndices(e) {
@@ -57414,10 +57420,22 @@ ${c}
57414
57420
  ...e.layout
57415
57421
  };
57416
57422
  }
57417
- function computeLayoutOnFigureChange(e, r) {
57418
- return {
57419
- ...createInitialLayout(e),
57420
- ...Objects.pick(r, PERSISTED_LAYOUT_KEYS)
57423
+ function hasCompatibleTraces(e, r) {
57424
+ return e.data.length === r.data.length ? e.data.every((e2, c) => {
57425
+ var _a3;
57426
+ return (e2.type ?? "scatter") === (((_a3 = r.data[c]) == null ? void 0 : _a3.type) ?? "scatter");
57427
+ }) : false;
57428
+ }
57429
+ function computeLayoutOnFigureChange(e, r, c) {
57430
+ let d = createInitialLayout(e);
57431
+ return hasCompatibleTraces(r, e) ? {
57432
+ ...d,
57433
+ ...Objects.pick(c, PERSISTED_LAYOUT_KEYS)
57434
+ } : {
57435
+ ...d,
57436
+ ..."dragmode" in c ? {
57437
+ dragmode: c.dragmode
57438
+ } : {}
57421
57439
  };
57422
57440
  }
57423
57441
  function computeOmitKeys(e, r) {
@@ -57435,40 +57453,40 @@ ${c}
57435
57453
  function usePlotlyLayout(e) {
57436
57454
  let r = (0, import_compiler_runtime$32.c)(20), { originalFigure: c, initialValue: d, isScriptLoaded: f } = e, h = f === void 0 ? true : f, _;
57437
57455
  r[0] === c ? _ = r[1] : (_ = () => structuredClone(c), r[0] = c, r[1] = _);
57438
- let [v, y] = (0, import_react.useState)(_), S;
57439
- r[2] !== v || r[3] !== d ? (S = () => ({
57456
+ let [v, y] = (0, import_react.useState)(_), S = (0, import_react.useRef)(v), w;
57457
+ r[2] !== v || r[3] !== d ? (w = () => ({
57440
57458
  ...createInitialLayout(v),
57441
57459
  ...d
57442
- }), r[2] = v, r[3] = d, r[4] = S) : S = r[4];
57443
- let [w, E] = (0, import_react.useState)(S), O;
57444
- r[5] === c ? O = r[6] : (O = () => {
57445
- let e2 = structuredClone(c);
57446
- y(e2), E((r2) => computeLayoutOnFigureChange(e2, r2));
57447
- }, r[5] = c, r[6] = O);
57448
- let M;
57449
- r[7] !== h || r[8] !== c ? (M = [
57460
+ }), r[2] = v, r[3] = d, r[4] = w) : w = r[4];
57461
+ let [E, O] = (0, import_react.useState)(w), M;
57462
+ r[5] === c ? M = r[6] : (M = () => {
57463
+ let e2 = structuredClone(c), r2 = S.current;
57464
+ S.current = e2, y(e2), O((c2) => computeLayoutOnFigureChange(e2, r2, c2));
57465
+ }, r[5] = c, r[6] = M);
57466
+ let I;
57467
+ r[7] !== h || r[8] !== c ? (I = [
57450
57468
  c,
57451
57469
  h
57452
- ], r[7] = h, r[8] = c, r[9] = M) : M = r[9], (0, import_react.useEffect)(O, M);
57453
- let I = usePrevious(v) ?? v, z, G;
57454
- r[10] !== v.layout || r[11] !== I.layout ? (z = () => {
57455
- E((e2) => computeLayoutUpdate(v.layout, I.layout, e2));
57456
- }, G = [
57470
+ ], r[7] = h, r[8] = c, r[9] = I) : I = r[9], (0, import_react.useEffect)(M, I);
57471
+ let z = usePrevious(v) ?? v, G, q;
57472
+ r[10] !== v.layout || r[11] !== z.layout ? (G = () => {
57473
+ O((e2) => computeLayoutUpdate(v.layout, z.layout, e2));
57474
+ }, q = [
57457
57475
  v.layout,
57458
- I.layout
57459
- ], r[10] = v.layout, r[11] = I.layout, r[12] = z, r[13] = G) : (z = r[12], G = r[13]), (0, import_react.useEffect)(z, G);
57460
- let q;
57461
- r[14] === c ? q = r[15] : (q = () => {
57476
+ z.layout
57477
+ ], r[10] = v.layout, r[11] = z.layout, r[12] = G, r[13] = q) : (G = r[12], q = r[13]), (0, import_react.useEffect)(G, q);
57478
+ let Z7;
57479
+ r[14] === c ? Z7 = r[15] : (Z7 = () => {
57462
57480
  let e2 = structuredClone(c);
57463
- y(e2), E(createInitialLayout(e2));
57464
- }, r[14] = c, r[15] = q);
57465
- let Z7 = q, Q7;
57466
- return r[16] !== v || r[17] !== Z7 || r[18] !== w ? (Q7 = {
57481
+ y(e2), O(createInitialLayout(e2));
57482
+ }, r[14] = c, r[15] = Z7);
57483
+ let Q7 = Z7, $7;
57484
+ return r[16] !== v || r[17] !== Q7 || r[18] !== E ? ($7 = {
57467
57485
  figure: v,
57468
- layout: w,
57469
- setLayout: E,
57470
- handleReset: Z7
57471
- }, r[16] = v, r[17] = Z7, r[18] = w, r[19] = Q7) : Q7 = r[19], Q7;
57486
+ layout: E,
57487
+ setLayout: O,
57488
+ handleReset: Q7
57489
+ }, r[16] = v, r[17] = Q7, r[18] = E, r[19] = $7) : $7 = r[19], $7;
57472
57490
  }
57473
57491
  var import_compiler_runtime$31 = require_compiler_runtime(), PlotlyPlugin = class {
57474
57492
  constructor() {
@@ -57511,7 +57529,7 @@ ${c}
57511
57529
  }));
57512
57530
  }, r[7] = w, r[8] = f, r[9] = I) : I = r[9];
57513
57531
  let z = useEvent_default(I), G = useDeepCompareMemoize(h), q;
57514
- r[10] === y.data ? q = r[11] : (q = hasPureLineTrace(y.data), r[10] = y.data, r[11] = q);
57532
+ r[10] === y.data ? q = r[11] : (q = hasPureLineTrace(y.data) || hasAreaTrace(y.data), r[10] = y.data, r[11] = q);
57515
57533
  let Z7 = q, Q7, $7, e9;
57516
57534
  if (r[12] !== G || r[13] !== M || r[14] !== z || r[15] !== Z7) {
57517
57535
  let e2 = [
@@ -65633,7 +65651,7 @@ ${c}
65633
65651
  return Logger.warn("Failed to get version from mount config"), null;
65634
65652
  }
65635
65653
  }
65636
- const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.22.6-dev1"), showCodeInRunModeAtom = atom(true);
65654
+ const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.22.6-dev12"), showCodeInRunModeAtom = atom(true);
65637
65655
  atom(null);
65638
65656
  var VIRTUAL_FILE_REGEX = /\/@file\/([^\s"&'/]+)\.([\dA-Za-z]+)/g, VirtualFileTracker = class e {
65639
65657
  constructor() {