@marimo-team/islands 0.25.3-dev129 → 0.25.3-dev134

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/{ConnectedDataExplorerComponent-q0C1F7Sn.js → ConnectedDataExplorerComponent-BAiSVaHj.js} +3 -1
  2. package/dist/{ErrorBoundary-BwvkPkyC.js → ErrorBoundary-CImYa86e.js} +1 -1
  3. package/dist/{chat-ui-C0nJ84Wf.js → chat-ui-DqcauBr6.js} +21 -20
  4. package/dist/{code-visibility-BI1HUhjs.js → code-visibility-BZoWT5f1.js} +2 -2
  5. package/dist/{common-CMm0Ot4s.js → common-CGmIoGK3.js} +4383 -4327
  6. package/dist/{data-grid-overlay-editor-DMLTMI_S.js → data-grid-overlay-editor-CtOna148.js} +1 -1
  7. package/dist/{error-entries-BL2ZBgVo.js → error-entries-CmFDQ9CA.js} +109 -105
  8. package/dist/{feedback-button-BrpQxIbi.js → feedback-button-7ZbDdjfz.js} +14 -14
  9. package/dist/{glide-data-editor-DBsCdnOC.js → glide-data-editor-D72zmCan.js} +3 -3
  10. package/dist/{globals-BWb8HdpC.js → globals-DE2S2io9.js} +1 -1
  11. package/dist/{html-to-image-D9gz793p.js → html-to-image-CfgsWObF.js} +19 -19
  12. package/dist/main.js +5504 -5477
  13. package/dist/{number-overlay-editor-CUARNHHp.js → number-overlay-editor-Br0lPnFE.js} +1 -1
  14. package/dist/{process-output-761ZoDH1.js → process-output-B64ZYWuI.js} +3 -3
  15. package/dist/{reveal-component-CJjh6lrq.js → reveal-component-DnbPU885.js} +12 -12
  16. package/dist/style.css +1 -1
  17. package/package.json +1 -1
  18. package/src/__tests__/module-entry.test.ts +32 -0
  19. package/src/components/ai/__tests__/ai-model-dropdown.test.tsx +63 -0
  20. package/src/components/ai/ai-model-dropdown.tsx +11 -6
  21. package/src/components/chat/acp/__tests__/session-tabs.test.tsx +43 -0
  22. package/src/components/chat/acp/blocks.tsx +1 -0
  23. package/src/components/chat/acp/session-tabs.tsx +8 -3
  24. package/src/components/data-table/TableTopBar.tsx +2 -0
  25. package/src/components/data-table/__tests__/data-table.test.tsx +1 -0
  26. package/src/components/data-table/__tests__/keyboard-selection.test.tsx +188 -0
  27. package/src/components/data-table/data-table.tsx +6 -0
  28. package/src/components/data-table/range-focus/atoms.ts +4 -6
  29. package/src/components/data-table/range-focus/use-cell-range-selection.ts +65 -38
  30. package/src/components/data-table/range-focus/use-scroll-into-view.ts +21 -2
  31. package/src/components/data-table/renderers.tsx +16 -7
  32. package/src/components/data-table/row-viewer-panel/__tests__/row-viewer.test.tsx +24 -1
  33. package/src/components/data-table/row-viewer-panel/row-viewer.tsx +2 -2
  34. package/src/components/datasources/datasources.tsx +1 -0
  35. package/src/components/editor/__tests__/package-alert.test.tsx +22 -1
  36. package/src/components/editor/cell/collapse.tsx +5 -3
  37. package/src/components/editor/chrome/panels/outline/__tests__/outline-keyboard.test.tsx +84 -0
  38. package/src/components/editor/chrome/panels/outline/floating-outline.tsx +39 -14
  39. package/src/components/editor/chrome/panels/outline/useActiveOutline.tsx +3 -2
  40. package/src/components/editor/chrome/panels/secrets-panel.tsx +1 -0
  41. package/src/components/editor/chrome/panels/snippets-panel.tsx +5 -1
  42. package/src/components/editor/chrome/wrapper/__tests__/attachment-status.test.tsx +4 -4
  43. package/src/components/editor/controls/__tests__/keyboard-shortcuts.test.tsx +61 -0
  44. package/src/components/editor/controls/keyboard-shortcuts.tsx +14 -5
  45. package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +4 -4
  46. package/src/components/editor/file-tree/__tests__/file-explorer-navigation.test.tsx +47 -0
  47. package/src/components/editor/file-tree/file-explorer.tsx +35 -3
  48. package/src/components/editor/file-tree/file-name-input.tsx +1 -0
  49. package/src/components/editor/header/status.tsx +28 -5
  50. package/src/components/editor/links/__tests__/cell-link.test.tsx +146 -0
  51. package/src/components/editor/links/cell-link.tsx +14 -5
  52. package/src/components/editor/navigation/focus-utils.ts +4 -4
  53. package/src/components/editor/notebook-cell.tsx +11 -2
  54. package/src/components/editor/output/MarimoTracebackOutput.tsx +17 -15
  55. package/src/components/editor/output/__tests__/traceback.test.tsx +27 -1
  56. package/src/components/editor/package-alert.tsx +8 -3
  57. package/src/components/scratchpad/scratchpad.test.tsx +95 -0
  58. package/src/components/scratchpad/scratchpad.tsx +14 -1
  59. package/src/components/tracing/tracing-keyboard.test.tsx +85 -0
  60. package/src/components/tracing/tracing.tsx +43 -39
  61. package/src/components/ui/__tests__/draggable-popover.test.tsx +24 -0
  62. package/src/components/ui/draggable-popover.tsx +24 -2
  63. package/src/core/attachments/state.ts +2 -2
  64. package/src/core/document/__tests__/codemirror.test.ts +3 -1
  65. package/src/core/document/__tests__/hooks.test.tsx +7 -7
  66. package/src/core/document/__tests__/model.test.ts +44 -11
  67. package/src/core/document/__tests__/scenario-fixture.ts +2 -1
  68. package/src/core/document/__tests__/test-notebook.ts +19 -9
  69. package/src/core/document/draft.ts +1 -1
  70. package/src/core/document/index.ts +3 -10
  71. package/src/core/document/model.ts +14 -11
  72. package/src/core/document/state.ts +1 -1
  73. package/src/core/document/sync.ts +24 -18
  74. package/src/core/host/AGENTS.md +3 -7
  75. package/src/core/host/__tests__/fixtures.ts +30 -0
  76. package/src/core/host/__tests__/{notebook-client.test.ts → replica.test.ts} +42 -74
  77. package/src/core/host/__tests__/wasm.test.ts +8 -0
  78. package/src/core/host/backend.ts +4 -0
  79. package/src/core/host/index.ts +14 -0
  80. package/src/core/host/{notebook-client.ts → replica.ts} +75 -86
  81. package/src/core/host/static.ts +2 -0
  82. package/src/core/host/wasm.ts +10 -1
  83. package/src/core/wasm/bridge.ts +1 -1
  84. package/src/core/websocket/__tests__/backend.test.ts +111 -22
  85. package/src/core/websocket/__tests__/useNotebookReplica.hook.test.tsx +141 -0
  86. package/src/core/websocket/__tests__/useNotebookSession.hook.test.tsx +4 -4
  87. package/src/core/websocket/backend.ts +43 -5
  88. package/src/core/websocket/connection-state.ts +1 -1
  89. package/src/core/websocket/state.ts +3 -3
  90. package/src/core/websocket/transports/__tests__/notebook.test.ts +11 -21
  91. package/src/core/websocket/types.ts +2 -2
  92. package/src/core/websocket/useNotebookReplica.ts +69 -0
  93. package/src/core/websocket/useNotebookSession.tsx +6 -6
  94. package/src/plugins/impl/chat/chat-ui.tsx +2 -1
  95. package/src/plugins/impl/data-explorer/components/column-summary.tsx +4 -2
  96. package/src/plugins/impl/data-frames/__tests__/sidebar.test.tsx +160 -0
  97. package/src/plugins/impl/data-frames/panel.tsx +43 -16
  98. package/src/core/websocket/__tests__/useNotebookClient.hook.test.tsx +0 -228
  99. package/src/core/websocket/useNotebookClient.ts +0 -89
@@ -5401,7 +5401,9 @@ var kl = /* @__PURE__ */ e(c(), 1), $ = k(), Al = {
5401
5401
  channel: "x",
5402
5402
  field: e
5403
5403
  });
5404
- return /* @__PURE__ */ (0, $.jsxs)("span", {
5404
+ return /* @__PURE__ */ (0, $.jsxs)("button", {
5405
+ type: "button",
5406
+ "aria-pressed": r === e,
5405
5407
  className: o("hover:bg-muted self-start px-2 py-2 rounded flex flex-row gap-1 items-center cursor-pointer lg:justify-center text-sm truncate shrink-0 overflow-hidden", r === e && "bg-muted"),
5406
5408
  onClick: () => {
5407
5409
  if (r === e) {
@@ -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-BrpQxIbi.js").then((e) => ({ default: e.FeedbackModal }))), L = (e) => {
138
+ var I = (0, T.lazy)(() => import("./feedback-button-7ZbDdjfz.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,
@@ -3,13 +3,13 @@ import { c as n, g as r, h as i, t as a } from "./button-BQRdqQi1.js";
3
3
  import { t as o } from "./react-sHtZdjeP.js";
4
4
  import { t as s } from "./compiler-runtime-CldRdSsv.js";
5
5
  import { i as c, t as l } from "./copy-icon-C1trdvVt.js";
6
- import { F as u, H as d, U as f, V as p, X as m, Y as h, Z as g, _, a as v, c as y, d as b, f as x, g as S, h as C, l as w, m as T, n as E, p as D, r as O, t as k, v as A, x as ee, y as te, z as ne } from "./html-to-image-D9gz793p.js";
6
+ import { F as u, H as d, U as f, V as p, X as m, Y as h, Z as g, _, a as v, c as y, d as b, f as x, g as S, h as C, l as w, m as T, n as E, p as D, r as O, t as k, v as A, x as ee, y as te, z as ne } from "./html-to-image-CfgsWObF.js";
7
7
  import { m as j, t as re } from "./tooltip-CJ4Rqasp.js";
8
- import { Ct as ie, Et as ae, Ht as oe, L as se, Lt as ce, Nt as le, St as ue, X as de, cn as fe, ct as pe, dn as me, en as he, et as ge, h as _e, i as ve, ln as ye, mn as be, mt as xe, r as Se, rt as Ce, st as we, t as Te, w as Ee, xt as De } from "./error-entries-BL2ZBgVo.js";
8
+ import { Ct as ie, Dt as ae, Pt as oe, R as se, Rt as ce, St as le, T as ue, Ut as de, Z as fe, ct as pe, fn as me, h as he, hn as ge, ht as _e, i as ve, it as ye, ln as be, lt as xe, r as Se, t as Ce, tn as we, tt as Te, un as Ee, wt as De } from "./error-entries-CmFDQ9CA.js";
9
9
  import { A as Oe, C as ke, M as Ae, b as je } from "./select-CkF_GBxO.js";
10
10
  import { _ as Me, f as Ne, h as Pe, i as Fe, n as Ie, t as Le } from "./dropdown-menu-CgL3fm8P.js";
11
11
  import { C as Re, d as ze } from "./toDate-DGvRHwTk.js";
12
- import { d as Be, f as Ve, i as He, n as Ue, t as We, u as Ge } from "./process-output-761ZoDH1.js";
12
+ import { d as Be, f as Ve, i as He, n as Ue, t as We, u as Ge } from "./process-output-B64ZYWuI.js";
13
13
  import { t as Ke } from "./jsx-runtime-3BD1kT0s.js";
14
14
  import { A as qe, C as Je, D as Ye, E as Xe, F as Ze, L as Qe, M as $e, O as et, P as tt, R as nt, S as rt, T as it, V as at, b as ot, j as st, v as ct, w as lt, x as ut, y as dt, z as ft } from "./use-restore-focus-CmGwRNId.js";
15
15
  import { n as pt } from "./error-banner-D40pmfQQ.js";
@@ -3575,7 +3575,7 @@ var oo = class extends T {
3575
3575
  super(), this.store = e;
3576
3576
  }
3577
3577
  getItems() {
3578
- let e = this.store.get(_e), t = [];
3578
+ let e = this.store.get(he), t = [];
3579
3579
  for (let n of e.cellIds.inOrderIds) {
3580
3580
  let r = lo(n, e), i = r.cellOutput;
3581
3581
  if (!i) continue;
@@ -3653,7 +3653,7 @@ async function so(e, t, n) {
3653
3653
  let i = e.filter((e) => e.shouldDownloadImage && e.outputType === "media");
3654
3654
  if (i.length === 0) return [];
3655
3655
  let a = i.flatMap((e) => {
3656
- let i = document.getElementById(oe.create(t));
3656
+ let i = document.getElementById(de.create(t));
3657
3657
  return i ? {
3658
3658
  cellId: t,
3659
3659
  cellName: n,
@@ -3699,7 +3699,7 @@ function lo(e, t, n) {
3699
3699
  //#region src/core/ai/context/providers/error.ts
3700
3700
  function uo(e, t) {
3701
3701
  let n = [`Code:\n${e.cellCode}`];
3702
- if (e.tracebackHtml && n.push(`Traceback:\n${Ee(e.tracebackHtml)}`), e.errorData.length > 0 && n.push(e.errorData.map((e) => Se(e)).join("\n\n")), e.errorData.some((e) => e.type === "sql-error")) {
3702
+ if (e.tracebackHtml && n.push(`Traceback:\n${ue(e.tracebackHtml)}`), e.errorData.length > 0 && n.push(e.errorData.map((e) => Se(e)).join("\n\n")), e.errorData.some((e) => e.type === "sql-error")) {
3703
3703
  let r = w(e.cellId, t);
3704
3704
  r && n.push(`Database schema:\n${r}`);
3705
3705
  }
@@ -3716,12 +3716,12 @@ function fo(e, t) {
3716
3716
  });
3717
3717
  }
3718
3718
  function po(e) {
3719
- return e.errorData.length === 1 ? Te(e.errorData[0]) : e.errorData.length > 1 ? `${e.errorData.length} errors` : e.tracebackHtml ? Ee(e.tracebackHtml).trim().split("\n").find((e) => e.trim())?.trim() || "traceback" : "error";
3719
+ return e.errorData.length === 1 ? Ce(e.errorData[0]) : e.errorData.length > 1 ? `${e.errorData.length} errors` : e.tracebackHtml ? ue(e.tracebackHtml).trim().split("\n").find((e) => e.trim())?.trim() || "traceback" : "error";
3720
3720
  }
3721
3721
  function mo(e) {
3722
3722
  return `Error: ${e.cellName || `Cell ${e.cellId}`}`;
3723
3723
  }
3724
- var ho = new xe("error", "errors"), go = class extends T {
3724
+ var ho = new _e("error", "errors"), go = class extends T {
3725
3725
  title = "Errors";
3726
3726
  mentionPrefix = "@";
3727
3727
  contextType = "error";
@@ -3795,7 +3795,7 @@ var ho = new xe("error", "errors"), go = class extends T {
3795
3795
  formatContext(e) {
3796
3796
  return (e.data.type === "all-errors" ? e.data.errors : [e.data.error]).map((e) => fo(e, this.store)).join("\n\n");
3797
3797
  }
3798
- }, _o = le(), vo = {
3798
+ }, _o = oe(), vo = {
3799
3799
  maxDepth: 3,
3800
3800
  maxResults: 20,
3801
3801
  defaultResultsLimit: 5,
@@ -3996,10 +3996,10 @@ var ho = new xe("error", "errors"), go = class extends T {
3996
3996
  displayLabel: t,
3997
3997
  detail: n.source === "memory" ? "in-memory" : n.source,
3998
3998
  boost: n.source_type === "local" ? b.LOCAL_TABLE : b.REMOTE_TABLE,
3999
- type: ie(n),
3999
+ type: De(n),
4000
4000
  apply: `@${t}`,
4001
4001
  section: {
4002
- name: ie(n) === "dataframe" ? "Dataframe" : "Table",
4002
+ name: De(n) === "dataframe" ? "Dataframe" : "Table",
4003
4003
  rank: x.TABLE.rank
4004
4004
  },
4005
4005
  info: () => this.createTableInfoElement(t, n)
@@ -4086,7 +4086,7 @@ var ho = new xe("error", "errors"), go = class extends T {
4086
4086
  detail: n.dataType ?? "",
4087
4087
  type: this.contextType,
4088
4088
  section: x.VARIABLE,
4089
- info: () => de(n)
4089
+ info: () => fe(n)
4090
4090
  };
4091
4091
  }
4092
4092
  formatContext(e) {
@@ -4104,7 +4104,7 @@ var ho = new xe("error", "errors"), go = class extends T {
4104
4104
  //#endregion
4105
4105
  //#region src/core/ai/context/context.ts
4106
4106
  function So(e) {
4107
- let t = e.get(ue), n = e.get(De), r = e.get(pe);
4107
+ let t = e.get(ie), n = e.get(le), r = e.get(xe);
4108
4108
  return new C().register(new bo(n)).register(new xo(r, n)).register(new go(e)).register(new oo(e)).register(new y(t.connectionsMap, n));
4109
4109
  }
4110
4110
  function Co() {
@@ -4342,7 +4342,7 @@ var jo = (e) => {
4342
4342
  let m;
4343
4343
  t[5] === Symbol.for("react.memo_cache_sentinel") ? (m = () => l(Po), t[5] = m) : m = t[5];
4344
4344
  let h;
4345
- t[6] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ (0, q.jsx)(be, { className: "h-3.5 w-3.5 shrink-0" }), t[6] = h) : h = t[6];
4345
+ t[6] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ (0, q.jsx)(ge, { className: "h-3.5 w-3.5 shrink-0" }), t[6] = h) : h = t[6];
4346
4346
  let g;
4347
4347
  t[7] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ (0, q.jsx)("span", {
4348
4348
  className: "font-semibold",
@@ -4439,7 +4439,7 @@ var Io = et({
4439
4439
  let m;
4440
4440
  t[10] === c ? m = t[11] : (m = c && /* @__PURE__ */ (0, q.jsxs)("div", {
4441
4441
  className: "flex items-start gap-2",
4442
- children: [/* @__PURE__ */ (0, q.jsx)(fe, { className: "h-3 w-3 text-(--blue-11) mt-0.5 shrink-0" }), /* @__PURE__ */ (0, q.jsx)("div", {
4442
+ children: [/* @__PURE__ */ (0, q.jsx)(be, { className: "h-3 w-3 text-(--blue-11) mt-0.5 shrink-0" }), /* @__PURE__ */ (0, q.jsx)("div", {
4443
4443
  className: "text-xs text-foreground",
4444
4444
  children: c
4445
4445
  })]
@@ -4723,7 +4723,7 @@ var Wo = (e) => {
4723
4723
  isActive: i
4724
4724
  }, s);
4725
4725
  case "source-document": return /* @__PURE__ */ (0, q.jsx)(Oo, {
4726
- icon: /* @__PURE__ */ (0, q.jsx)(ye, { className: "h-3 w-3 shrink-0" }),
4726
+ icon: /* @__PURE__ */ (0, q.jsx)(Ee, { className: "h-3 w-3 shrink-0" }),
4727
4727
  title: o.title,
4728
4728
  subtitle: o.filename
4729
4729
  }, s);
@@ -5303,7 +5303,7 @@ function Is(e) {
5303
5303
  let t = document.createElement("div");
5304
5304
  return t.innerHTML = e, { dom: t };
5305
5305
  }
5306
- he("marimo:ai-language", "python", we);
5306
+ we("marimo:ai-language", "python", pe);
5307
5307
  var Ls = "marimo:ai-prompt-history", Rs = new ce(rt(Ze()), () => []), zs = (e) => {
5308
5308
  let t = (0, M.c)(35), { value: n, placeholder: r, inputRef: a, className: o, onChange: s, onSubmit: c, onKeyDown: l, onClose: u, onAddFiles: d, additionalCompletions: f, maxHeight: p } = e, m = c, h = u, g = _t(), { theme: _ } = vt(), v;
5309
5309
  t[0] === f ? v = t[1] : (v = (e) => f ? wo([f.triggerCompletionRegex], f.completions)(e) : null, t[0] = f, t[1] = v);
@@ -5431,7 +5431,7 @@ var Gs = (e) => {
5431
5431
  let t = i.messages.map((e) => ({
5432
5432
  ...e,
5433
5433
  content: e.parts?.map((e) => "text" in e ? e.text : "").join("\n")
5434
- })), n = Ce();
5434
+ })), n = ye();
5435
5435
  T();
5436
5436
  let s = new ReadableStream({
5437
5437
  start(t) {
@@ -5585,13 +5585,14 @@ var Gs = (e) => {
5585
5585
  addToolApprovalResponse: r ? oe : void 0
5586
5586
  })
5587
5587
  }), /* @__PURE__ */ (0, q.jsxs)("div", {
5588
- className: "flex justify-end text-xs gap-2 invisible group-hover:visible",
5588
+ className: "flex justify-end text-xs gap-2 opacity-0 group-hover:opacity-100 focus-within:opacity-100",
5589
5589
  children: [/* @__PURE__ */ (0, q.jsx)(l, {
5590
5590
  value: n,
5591
5591
  className: "h-3 w-3",
5592
5592
  buttonClassName: "text-xs text-(--slate-9) hover:text-(--slate-11)"
5593
5593
  }), /* @__PURE__ */ (0, q.jsx)("button", {
5594
5594
  type: "button",
5595
+ "aria-label": "Delete message",
5595
5596
  onClick: () => ce(e.id),
5596
5597
  className: "text-xs text-(--slate-9) hover:text-(--slate-11)",
5597
5598
  children: /* @__PURE__ */ (0, q.jsx)(m, { className: "h-3 w-3 text-(--red-9)" })
@@ -5646,7 +5647,7 @@ var Gs = (e) => {
5646
5647
  onSelect: (e) => {
5647
5648
  o(e), requestAnimationFrame(() => {
5648
5649
  let e = _.current?.view;
5649
- e?.focus(), ge(e);
5650
+ e?.focus(), Te(e);
5650
5651
  });
5651
5652
  }
5652
5653
  }),
@@ -1,6 +1,6 @@
1
1
  import { g as e } from "./button-BQRdqQi1.js";
2
2
  import { t } from "./compiler-runtime-CldRdSsv.js";
3
- import { G as n, K as r } from "./error-entries-BL2ZBgVo.js";
3
+ import { K as n, q as r } from "./error-entries-CmFDQ9CA.js";
4
4
  import { C as i } from "./select-CkF_GBxO.js";
5
5
  import { _ as a, c as o, x as s, y as c } from "./toDate-DGvRHwTk.js";
6
6
  import { C as l, E as u, a as d, b as f } from "./useTheme-Bq9pi_vz.js";
@@ -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.3-dev129", C = u(S), w = u(!0);
21
+ var S = x() || "0.25.3-dev134", C = u(S), w = u(!0);
22
22
  u(null);
23
23
  //#endregion
24
24
  //#region src/core/wasm/state.ts