@marimo-team/islands 0.22.1-dev37 → 0.22.1-dev39

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 (172) hide show
  1. package/dist/{ConnectedDataExplorerComponent-DTOsfq2x.js → ConnectedDataExplorerComponent-DuD8BVl6.js} +2 -2
  2. package/dist/{Plot-WhbJAbBh.js → Plot-BxlSHo0G.js} +47 -38
  3. package/dist/{chat-ui-CJCTr1kq.js → chat-ui-Cel1kBfc.js} +1 -1
  4. package/dist/{glide-data-editor-BQPLhydy.js → glide-data-editor-BqnvTmDo.js} +1712 -1681
  5. package/dist/main.js +360 -354
  6. package/dist/{process-output-D0SEeV3t.js → process-output-DC1TOnIl.js} +1 -1
  7. package/dist/{spec-CiHus5Bb.js → spec-CD7QaCV-.js} +1 -1
  8. package/dist/style.css +1 -1
  9. package/dist/useLifecycle-4fA1pHoh.js +177 -0
  10. package/package.json +1 -1
  11. package/src/__mocks__/common.ts +4 -4
  12. package/src/components/chat/acp/agent-panel.tsx +2 -2
  13. package/src/components/data-table/__tests__/columns.test.tsx +7 -7
  14. package/src/components/data-table/cell-hover-template/types.ts +1 -1
  15. package/src/components/data-table/cell-hover-text/types.ts +1 -1
  16. package/src/components/data-table/cell-selection/__tests__/feature.test.ts +1 -1
  17. package/src/components/data-table/cell-selection/types.ts +1 -1
  18. package/src/components/data-table/cell-styling/types.ts +1 -1
  19. package/src/components/data-table/charts/chart-spec/altair-generator.ts +2 -2
  20. package/src/components/data-table/column-formatting/types.ts +2 -2
  21. package/src/components/data-table/column-summary/legacy-chart-spec.ts +1 -1
  22. package/src/components/data-table/column-wrapping/types.ts +1 -1
  23. package/src/components/data-table/copy-column/types.ts +1 -1
  24. package/src/components/data-table/focus-row/types.ts +1 -1
  25. package/src/components/data-table/loading-table.tsx +1 -1
  26. package/src/components/data-table/range-focus/__tests__/atoms.test.ts +2 -2
  27. package/src/components/data-table/range-focus/atoms.ts +2 -2
  28. package/src/components/dependency-graph/dependency-graph-tree.tsx +1 -1
  29. package/src/components/editor/__tests__/dynamic-favicon.test.tsx +1 -1
  30. package/src/components/editor/actions/pair-with-agent-modal.tsx +142 -0
  31. package/src/components/editor/actions/useNotebookActions.tsx +10 -0
  32. package/src/components/editor/ai/ai-completion-editor.tsx +1 -1
  33. package/src/components/editor/app-container.tsx +1 -1
  34. package/src/components/editor/chrome/panels/empty-state.tsx +1 -0
  35. package/src/components/editor/controls/keyboard-shortcuts.tsx +1 -1
  36. package/src/components/editor/navigation/__tests__/navigation.test.ts +1 -1
  37. package/src/components/editor/navigation/navigation.ts +1 -1
  38. package/src/components/editor/notebook-cell.tsx +1 -1
  39. package/src/components/editor/output/JsonOutput.tsx +4 -4
  40. package/src/components/editor/output/ansi-reduce.ts +2 -2
  41. package/src/components/editor/output/console/ConsoleOutput.tsx +1 -1
  42. package/src/components/editor/renderers/cells-renderer.tsx +1 -1
  43. package/src/components/editor/renderers/grid-layout/grid-layout.tsx +1 -1
  44. package/src/components/editor/renderers/plugins.ts +1 -1
  45. package/src/components/editor/renderers/slides-layout/types.ts +2 -2
  46. package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +2 -2
  47. package/src/components/editor/renderers/vertical-layout/__tests__/vertical-layout.test.ts +1 -1
  48. package/src/components/find-replace/find-replace.tsx +3 -1
  49. package/src/components/forms/form.tsx +1 -1
  50. package/src/components/forms/options.ts +1 -1
  51. package/src/components/static-html/static-banner.tsx +2 -2
  52. package/src/components/terminal/terminal.tsx +4 -4
  53. package/src/components/ui/button.tsx +1 -1
  54. package/src/components/ui/command.tsx +1 -1
  55. package/src/core/ai/context/providers/__tests__/datasource.test.ts +1 -1
  56. package/src/core/ai/context/providers/__tests__/error.test.ts +1 -1
  57. package/src/core/ai/context/providers/__tests__/variable.test.ts +1 -1
  58. package/src/core/ai/context/registry.ts +2 -2
  59. package/src/core/ai/tools/registry.ts +1 -1
  60. package/src/core/cells/__tests__/cells.test.ts +2 -2
  61. package/src/core/cells/__tests__/scrollCellIntoView.test.ts +1 -1
  62. package/src/core/cells/__tests__/session.test.ts +1 -1
  63. package/src/core/cells/__tests__/utils.test.ts +1 -1
  64. package/src/core/cells/cells.ts +1 -1
  65. package/src/core/cells/ids.ts +1 -1
  66. package/src/core/codemirror/ai/request.ts +1 -1
  67. package/src/core/codemirror/copilot/__tests__/language-server.test.ts +1 -1
  68. package/src/core/codemirror/copilot/__tests__/transport.test.ts +1 -1
  69. package/src/core/codemirror/copilot/language-server.ts +1 -1
  70. package/src/core/codemirror/copilot/types.ts +1 -1
  71. package/src/core/codemirror/facet.ts +1 -1
  72. package/src/core/codemirror/language/__tests__/sql.test.ts +4 -4
  73. package/src/core/codemirror/language/languages/sql/completion-builder.ts +1 -1
  74. package/src/core/codemirror/language/metadata.ts +1 -1
  75. package/src/core/codemirror/language/types.ts +1 -1
  76. package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +1 -1
  77. package/src/core/codemirror/lsp/notebook-lsp.ts +1 -1
  78. package/src/core/codemirror/misc/__tests__/dnd.test.ts +1 -1
  79. package/src/core/codemirror/rtc/loro/awareness.ts +1 -1
  80. package/src/core/config/feature-flag.tsx +1 -1
  81. package/src/core/dom/outline.ts +1 -1
  82. package/src/core/export/__tests__/hooks.test.ts +1 -1
  83. package/src/core/hotkeys/__tests__/hotkeys.test.ts +1 -1
  84. package/src/core/hotkeys/shortcuts.ts +1 -1
  85. package/src/core/islands/__tests__/bridge.test.ts +2 -2
  86. package/src/core/islands/bridge.ts +2 -2
  87. package/src/core/islands/components/output-wrapper.tsx +1 -1
  88. package/src/core/islands/parse.ts +1 -1
  89. package/src/core/lsp/__tests__/transport.test.ts +1 -1
  90. package/src/core/network/DeferredRequestRegistry.ts +1 -1
  91. package/src/core/network/__tests__/requests-network.test.ts +1 -1
  92. package/src/core/network/api.ts +2 -2
  93. package/src/core/network/requests-lazy.ts +1 -1
  94. package/src/core/network/requests-toasting.tsx +1 -1
  95. package/src/core/static/files.ts +1 -1
  96. package/src/core/vscode/vscode-bindings.ts +1 -1
  97. package/src/core/wasm/bridge.ts +3 -3
  98. package/src/core/wasm/worker/tracer.ts +1 -1
  99. package/src/core/websocket/useWebSocket.tsx +2 -2
  100. package/src/css/globals.css +37 -61
  101. package/src/custom.d.ts +1 -1
  102. package/src/hooks/__tests__/useDuplicateShortcuts.test.ts +2 -2
  103. package/src/hooks/debug.ts +3 -3
  104. package/src/hooks/useDebounce.ts +1 -1
  105. package/src/hooks/useEventListener.ts +1 -1
  106. package/src/hooks/useHotkey.ts +1 -1
  107. package/src/hooks/useLifecycle.ts +2 -2
  108. package/src/hooks/useNonce.ts +1 -1
  109. package/src/hooks/useResizeObserver.ts +2 -2
  110. package/src/main.tsx +1 -1
  111. package/src/plugins/core/RenderHTML.tsx +3 -3
  112. package/src/plugins/core/__test__/registerReactComponent.test.ts +1 -1
  113. package/src/plugins/core/registerReactComponent.tsx +4 -4
  114. package/src/plugins/core/rpc.ts +1 -1
  115. package/src/plugins/impl/DataTablePlugin.tsx +1 -1
  116. package/src/plugins/impl/FileBrowserPlugin.tsx +1 -1
  117. package/src/plugins/impl/FormPlugin.tsx +1 -1
  118. package/src/plugins/impl/__tests__/MatrixPlugin.test.tsx +1 -1
  119. package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +1 -1
  120. package/src/plugins/impl/anywidget/model.ts +1 -1
  121. package/src/plugins/impl/anywidget/types.ts +2 -2
  122. package/src/plugins/impl/anywidget/widget-binding.ts +1 -1
  123. package/src/plugins/impl/chat/ChatPlugin.tsx +1 -1
  124. package/src/plugins/impl/chat/chat-ui.tsx +1 -1
  125. package/src/plugins/impl/data-editor/glide-data-editor.tsx +1 -1
  126. package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +2 -2
  127. package/src/plugins/impl/data-explorer/components/query-form.tsx +1 -1
  128. package/src/plugins/impl/data-explorer/functions/function.ts +1 -1
  129. package/src/plugins/impl/data-explorer/queries/types.ts +1 -1
  130. package/src/plugins/impl/data-frames/DataFramePlugin.tsx +1 -1
  131. package/src/plugins/impl/data-frames/forms/renderers.tsx +1 -1
  132. package/src/plugins/impl/data-frames/utils/operators.ts +1 -1
  133. package/src/plugins/impl/matplotlib/MatplotlibPlugin.tsx +1 -1
  134. package/src/plugins/impl/mpl-interactive/MplInteractivePlugin.tsx +1 -1
  135. package/src/plugins/impl/panel/PanelPlugin.tsx +2 -2
  136. package/src/plugins/impl/plotly/Plot.tsx +3 -3
  137. package/src/plugins/impl/vega/batched.ts +1 -1
  138. package/src/plugins/impl/vega/make-selectable.ts +1 -1
  139. package/src/plugins/impl/vega/types.ts +1 -1
  140. package/src/plugins/layout/DownloadPlugin.tsx +1 -1
  141. package/src/plugins/layout/LazyPlugin.tsx +1 -1
  142. package/src/plugins/layout/RoutesPlugin.tsx +1 -1
  143. package/src/plugins/layout/mermaid/mermaid.tsx +1 -1
  144. package/src/plugins/plugins.ts +1 -1
  145. package/src/stories/data-explorer.stories.tsx +1 -1
  146. package/src/stories/dataframe.stories.tsx +1 -1
  147. package/src/stories/editor.stories.tsx +1 -1
  148. package/src/stories/select.stories.tsx +1 -1
  149. package/src/stories/switchable-multi-select.stories.tsx +1 -1
  150. package/src/utils/Logger.ts +1 -1
  151. package/src/utils/__tests__/arrays.test.ts +1 -1
  152. package/src/utils/__tests__/blob.test.ts +1 -1
  153. package/src/utils/__tests__/dates.test.ts +1 -1
  154. package/src/utils/__tests__/errors.test.ts +1 -1
  155. package/src/utils/__tests__/objects.test.ts +3 -3
  156. package/src/utils/__tests__/waitForWs.test.ts +1 -1
  157. package/src/utils/arrays.ts +1 -1
  158. package/src/utils/assertNever.ts +1 -1
  159. package/src/utils/batch-requests.ts +2 -2
  160. package/src/utils/createReducer.ts +2 -2
  161. package/src/utils/id-tree.tsx +2 -2
  162. package/src/utils/idle.ts +1 -1
  163. package/src/utils/invariant.ts +1 -2
  164. package/src/utils/maps.ts +1 -1
  165. package/src/utils/math.ts +0 -1
  166. package/src/utils/multi-map.ts +1 -1
  167. package/src/utils/objects.ts +1 -1
  168. package/src/utils/once.ts +2 -2
  169. package/src/utils/staticImplements.ts +1 -1
  170. package/src/utils/storage/jotai.ts +1 -1
  171. package/src/utils/tracer.ts +2 -2
  172. package/dist/useLifecycle-DgDTfOLZ.js +0 -173
@@ -2,8 +2,8 @@ import { a as __toCommonJS, n as __esmMin, r as __export, s as __toESM, t as __c
2
2
  import { t as require_react } from "./react-Bs6Z0kvn.js";
3
3
  import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
4
4
  import { l as createLucideIcon } from "./dist-D_UjpfOY.js";
5
- import { A as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, F as ListFilter, P as SquareFunction, t as augmentSpecWithData } from "./spec-CiHus5Bb.js";
6
- import { a as Type, c as Calendar, i as createReducerAndAtoms, o as ToggleLeft, r as Badge, s as Hash, t as useOnMount } from "./useLifecycle-DgDTfOLZ.js";
5
+ import { A as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, F as ListFilter, P as SquareFunction, t as augmentSpecWithData } from "./spec-CD7QaCV-.js";
6
+ import { a as Type, c as Calendar, i as createReducerAndAtoms, o as ToggleLeft, r as Badge, s as Hash, t as useOnMount } from "./useLifecycle-4fA1pHoh.js";
7
7
  import { a as SelectContent, c as SelectLabel, d as SelectValue, i as Select, l as SelectSeparator, n as Strings, o as SelectGroup, s as SelectItem, t as Label, u as SelectTrigger, w as $a916eb452884faea$export$b7a616150fdb9f44 } from "./label-DbZGAoCH.js";
8
8
  import { c as Objects, g as Logger, t as Button, y as cn } from "./button-DNlNlZY_.js";
9
9
  import "./react-dom-BSUuJjCR.js";
@@ -1,7 +1,8 @@
1
1
  import { s as __toESM, t as __commonJSMin } from "./chunk-BNovOVIE.js";
2
2
  import { t as require_react } from "./react-Bs6Z0kvn.js";
3
+ import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
3
4
  import { t as require_jsx_runtime } from "./jsx-runtime-9hcJiI23.js";
4
- var import_plotly = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((e, t) => {
5
+ var require_plotly = /* @__PURE__ */ __commonJSMin(((e, t) => {
5
6
  (function(e2, n) {
6
7
  typeof t == "object" && t.exports ? t.exports = n() : e2.moduleName = n();
7
8
  })(typeof self < "u" ? self : e, () => {
@@ -172175,7 +172176,7 @@ uniform ${n5} ${r4} u_${i4};
172175
172176
  })();
172176
172177
  return window.Plotly = e2, e2;
172177
172178
  });
172178
- })))(), 1), import_react = /* @__PURE__ */ __toESM(require_react(), 1), import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime(), 1), EVENT_NAMES = [
172179
+ })), import_compiler_runtime = require_compiler_runtime(), import_plotly = /* @__PURE__ */ __toESM(require_plotly(), 1), import_react = /* @__PURE__ */ __toESM(require_react(), 1), import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime(), 1), EVENT_NAMES = [
172179
172180
  "Relayout",
172180
172181
  "Relayouting",
172181
172182
  "Selected",
@@ -172191,58 +172192,66 @@ function plotlyEventName(e) {
172191
172192
  return `plotly_${e.toLowerCase()}`;
172192
172193
  }
172193
172194
  const Plot = (e) => {
172194
- let t = (0, import_react.useRef)(null), { data: n, layout: r, config: u, frames: d, className: f, style: p, useResizeHandler: m, divId: h, onError: g } = e;
172195
- return (0, import_react.useEffect)(() => {
172196
- let e2 = t.current;
172197
- e2 && import_plotly.default.react(e2, n, r, u).then(() => {
172198
- if (d && d.length > 0) return import_plotly.default.addFrames(e2, d);
172195
+ let t = (0, import_compiler_runtime.c)(19), n = (0, import_react.useRef)(null), { data: r, layout: i, config: a, frames: p, className: m, style: h, useResizeHandler: g, divId: _, onError: v } = e, y, b;
172196
+ t[0] !== a || t[1] !== r || t[2] !== p || t[3] !== i || t[4] !== v ? (y = () => {
172197
+ let e2 = n.current;
172198
+ e2 && import_plotly.default.react(e2, r, i, a).then(() => {
172199
+ if (p && p.length > 0) return import_plotly.default.addFrames(e2, p);
172199
172200
  }).catch((e3) => {
172200
- g == null ? void 0 : g(e3);
172201
+ v == null ? void 0 : v(e3);
172201
172202
  });
172202
- }, [
172203
- n,
172203
+ }, b = [
172204
172204
  r,
172205
- u,
172206
- d,
172207
- g
172208
- ]), (0, import_react.useEffect)(() => {
172209
- let n2 = t.current;
172210
- if (!n2) return;
172211
- let r2 = n2, i = [];
172212
- for (let t2 of EVENT_NAMES) {
172213
- let n3 = e[propName(t2)];
172214
- if (typeof n3 == "function") {
172215
- let e2 = plotlyEventName(t2);
172216
- r2.on(e2, n3), i.push({
172205
+ i,
172206
+ a,
172207
+ p,
172208
+ v
172209
+ ], t[0] = a, t[1] = r, t[2] = p, t[3] = i, t[4] = v, t[5] = y, t[6] = b) : (y = t[5], b = t[6]), (0, import_react.useEffect)(y, b);
172210
+ let x, S;
172211
+ t[7] === e ? (x = t[8], S = t[9]) : (x = () => {
172212
+ let t2 = n.current;
172213
+ if (!t2) return;
172214
+ let r2 = t2, i2 = [];
172215
+ for (let t3 of EVENT_NAMES) {
172216
+ let n2 = e[propName(t3)];
172217
+ if (typeof n2 == "function") {
172218
+ let e2 = plotlyEventName(t3);
172219
+ r2.on(e2, n2), i2.push({
172217
172220
  plotlyName: e2,
172218
- handler: n3
172221
+ handler: n2
172219
172222
  });
172220
172223
  }
172221
172224
  }
172222
172225
  return () => {
172223
- for (let { plotlyName: e2, handler: t2 } of i) r2.removeListener(e2, t2);
172226
+ for (let { plotlyName: e2, handler: t3 } of i2) r2.removeListener(e2, t3);
172224
172227
  };
172225
- }, EVENT_NAMES.map((t2) => e[propName(t2)])), (0, import_react.useEffect)(() => {
172226
- if (!m) return;
172227
- let e2 = t.current;
172228
+ }, S = EVENT_NAMES.map((t2) => e[propName(t2)]), t[7] = e, t[8] = x, t[9] = S), (0, import_react.useEffect)(x, S);
172229
+ let C, w;
172230
+ t[10] === g ? (C = t[11], w = t[12]) : (C = () => {
172231
+ if (!g) return;
172232
+ let e2 = n.current;
172228
172233
  if (!e2) return;
172229
- let n2 = () => {
172234
+ let t2 = () => {
172230
172235
  import_plotly.default.Plots.resize(e2);
172231
172236
  };
172232
- return window.addEventListener("resize", n2), () => {
172233
- window.removeEventListener("resize", n2);
172237
+ return window.addEventListener("resize", t2), () => {
172238
+ window.removeEventListener("resize", t2);
172234
172239
  };
172235
- }, [m]), (0, import_react.useEffect)(() => {
172236
- let e2 = t.current;
172240
+ }, w = [g], t[10] = g, t[11] = C, t[12] = w), (0, import_react.useEffect)(C, w);
172241
+ let T, E;
172242
+ t[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = () => {
172243
+ let e2 = n.current;
172237
172244
  return () => {
172238
172245
  e2 && import_plotly.default.purge(e2);
172239
172246
  };
172240
- }, []), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
172241
- id: h,
172242
- className: f,
172243
- style: p,
172244
- ref: t
172245
- });
172247
+ }, E = [], t[13] = T, t[14] = E) : (T = t[13], E = t[14]), (0, import_react.useEffect)(T, E);
172248
+ let D;
172249
+ return t[15] !== m || t[16] !== _ || t[17] !== h ? (D = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
172250
+ id: _,
172251
+ className: m,
172252
+ style: h,
172253
+ ref: n
172254
+ }), t[15] = m, t[16] = _, t[17] = h, t[18] = D) : D = t[18], D;
172246
172255
  };
172247
172256
  export {
172248
172257
  Plot
@@ -5,7 +5,7 @@ import { s as __toESM, t as __commonJSMin } from "./chunk-BNovOVIE.js";
5
5
  import { t as require_react } from "./react-Bs6Z0kvn.js";
6
6
  import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
7
7
  import { r as toast } from "./copy-B7781WJ3.js";
8
- import { A as MarimoIncomingMessageEvent, At as moveToEndOfEditor, Bn as CircleX, C as contextToXml, D as AccordionContent, Dn as Wrench, Dt as createVariableInfoElement, E as Accordion, Fn as File$1, Gt as dataSourceConnectionsAtom, I as ChatBubbleIcon, Jt as getRequestClient, Kt as getTableType, Lt as jotaiJsonStorage, Mn as LoaderCircle, O as AccordionItem, On as Trash2, Pn as Info, Q as cellErrorsAtom, Qt as singleFacet, Rt as variablesAtom, S as Sections, T as AIContextRegistry, U as deserializeBlob, W as base64ToDataURL, Wt as allTablesAtom, Z as renderHTML, a as toPng, bt as displayCellName, cn as CellOutputId, d as Spinner, f as Popover, g as isOutputEmpty, h as PopoverTrigger, k as AccordionTrigger, m as PopoverContent, n as blobToString, nt as notebookAtom, o as MarkdownRenderer, rn as ZodLocalStorage, t as processOutput, w as AIContextProvider, x as Boosts, xn as Anchor2, y as DatasourceContextProvider, yn as atomWithStorage, zt as PluralWord } from "./process-output-D0SEeV3t.js";
8
+ import { A as MarimoIncomingMessageEvent, At as moveToEndOfEditor, Bn as CircleX, C as contextToXml, D as AccordionContent, Dn as Wrench, Dt as createVariableInfoElement, E as Accordion, Fn as File$1, Gt as dataSourceConnectionsAtom, I as ChatBubbleIcon, Jt as getRequestClient, Kt as getTableType, Lt as jotaiJsonStorage, Mn as LoaderCircle, O as AccordionItem, On as Trash2, Pn as Info, Q as cellErrorsAtom, Qt as singleFacet, Rt as variablesAtom, S as Sections, T as AIContextRegistry, U as deserializeBlob, W as base64ToDataURL, Wt as allTablesAtom, Z as renderHTML, a as toPng, bt as displayCellName, cn as CellOutputId, d as Spinner, f as Popover, g as isOutputEmpty, h as PopoverTrigger, k as AccordionTrigger, m as PopoverContent, n as blobToString, nt as notebookAtom, o as MarkdownRenderer, rn as ZodLocalStorage, t as processOutput, w as AIContextProvider, x as Boosts, xn as Anchor2, y as DatasourceContextProvider, yn as atomWithStorage, zt as PluralWord } from "./process-output-DC1TOnIl.js";
9
9
  import "./chunk-5FQGJX7Z-C428iZBW.js";
10
10
  import { l as createLucideIcon } from "./dist-D_UjpfOY.js";
11
11
  import { C as logNever, I as X, n as Strings, t as Label } from "./label-DbZGAoCH.js";