@marimo-team/islands 0.26.1-dev27 → 0.26.1-dev29

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 (76) hide show
  1. package/dist/{ErrorBoundary-zpe6C93k.js → ErrorBoundary-CPcZlpvU.js} +1 -1
  2. package/dist/{chat-ui-DOvIzlMA.js → chat-ui-CWmSnBs8.js} +899 -899
  3. package/dist/{code-visibility-BtvMUvQ6.js → code-visibility-CHvnQsso.js} +2 -2
  4. package/dist/{common-B46KECgx.js → common-9OlCmjdr.js} +6565 -6565
  5. package/dist/{config-DL9e-OWE.js → config-1ku0tAiU.js} +27 -28
  6. package/dist/{data-grid-overlay-editor-CLCJ44fs.js → data-grid-overlay-editor-D6x_MBSD.js} +1 -1
  7. package/dist/{dropdown-menu-DYN2RV5d.js → dropdown-menu-D65ZUqka.js} +1983 -1983
  8. package/dist/{error-entries-CncQR572.js → error-entries-DFHEq_SO.js} +515 -519
  9. package/dist/{feedback-button-CnyHlwaY.js → feedback-button-CodkZ3hF.js} +19 -19
  10. package/dist/{glide-data-editor-C3znsea0.js → glide-data-editor-BZxvtSp-.js} +35 -35
  11. package/dist/{globals-DHoGn4Qt.js → globals-DFf-tSyE.js} +1 -1
  12. package/dist/{html-to-image-BU7H-AM1.js → html-to-image-D6Gtk5ik.js} +24005 -23992
  13. package/dist/main.js +864 -864
  14. package/dist/{number-overlay-editor-DwK5S3_f.js → number-overlay-editor-CfwFMv_U.js} +1 -1
  15. package/dist/{process-output-xJm8T5-E.js → process-output-ZBdibqlG.js} +2 -2
  16. package/dist/{reveal-component-Dsp5kSt3.js → reveal-component-CDfNuSFv.js} +3 -3
  17. package/dist/style.css +1 -1
  18. package/dist/{vega-component-DpTyTrz3.js → vega-component-D61CTW1X.js} +1 -1
  19. package/package.json +1 -1
  20. package/src/__mocks__/intersection-observer.ts +45 -0
  21. package/src/components/databases/engine-variable.tsx +2 -2
  22. package/src/components/dependency-graph/panels.tsx +2 -2
  23. package/src/components/editor/actions/useCellActionButton.tsx +2 -8
  24. package/src/components/editor/cell/code/__tests__/code-placeholder.test.tsx +40 -0
  25. package/src/components/editor/cell/code/cell-editor.tsx +41 -104
  26. package/src/components/editor/cell/code/code-placeholder.css +61 -11
  27. package/src/components/editor/cell/code/code-placeholder.tsx +52 -29
  28. package/src/components/editor/cell/useSplitCell.tsx +2 -2
  29. package/src/components/editor/chrome/wrapper/__tests__/pending-ai-cells.test.tsx +6 -10
  30. package/src/components/editor/errors/auto-fix.tsx +8 -7
  31. package/src/components/editor/navigation/__tests__/navigation.test.ts +3 -12
  32. package/src/components/editor/navigation/focus-utils.ts +20 -8
  33. package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +3 -11
  34. package/src/components/editor/navigation/navigation.ts +2 -2
  35. package/src/components/editor/notebook-cell.tsx +15 -24
  36. package/src/components/editor/output/MarimoTracebackOutput.tsx +2 -2
  37. package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +6 -9
  38. package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +2 -5
  39. package/src/components/find-replace/find-replace.tsx +3 -7
  40. package/src/components/variables/__tests__/variables-table.test.tsx +1 -2
  41. package/src/core/ai/__tests__/staged-cells.test.ts +6 -39
  42. package/src/core/ai/staged-cells.ts +2 -20
  43. package/src/core/ai/tools/__tests__/edit-notebook-tool.test.ts +15 -13
  44. package/src/core/ai/tools/edit-notebook-tool.ts +13 -8
  45. package/src/core/cells/__tests__/cell-editor-view.test.ts +44 -0
  46. package/src/core/cells/__tests__/cells.test.ts +0 -1
  47. package/src/core/cells/__tests__/focus.test.ts +1 -7
  48. package/src/core/cells/__tests__/harness.ts +0 -1
  49. package/src/core/cells/cells.ts +15 -10
  50. package/src/core/cells/focus.ts +1 -1
  51. package/src/core/cells/scrollCellIntoView.ts +4 -14
  52. package/src/core/cells/utils.ts +0 -13
  53. package/src/core/codemirror/__tests__/cell-documents.test.ts +79 -0
  54. package/src/core/codemirror/__tests__/editor-mount-scheduler.test.ts +75 -105
  55. package/src/core/codemirror/__tests__/format.test.ts +85 -63
  56. package/src/core/codemirror/__tests__/use-lazy-editor-mount.test.tsx +193 -0
  57. package/src/core/codemirror/cell-documents.ts +132 -0
  58. package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +0 -1
  59. package/src/core/codemirror/copilot/getCodes.ts +3 -14
  60. package/src/core/codemirror/editor-mount-scheduler.ts +41 -48
  61. package/src/core/codemirror/extensions.ts +2 -2
  62. package/src/core/codemirror/find-replace/__tests__/navigate.test.ts +42 -16
  63. package/src/core/codemirror/find-replace/__tests__/search-highlight.test.ts +30 -0
  64. package/src/core/codemirror/find-replace/__tests__/unmounted-cells.test.ts +145 -0
  65. package/src/core/codemirror/find-replace/navigate.ts +88 -129
  66. package/src/core/codemirror/find-replace/search-highlight.ts +3 -1
  67. package/src/core/codemirror/find-replace/state.ts +7 -2
  68. package/src/core/codemirror/format.ts +25 -31
  69. package/src/core/codemirror/go-to-definition/__tests__/utils.test.ts +8 -9
  70. package/src/core/codemirror/language/cell-code.ts +7 -0
  71. package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +25 -0
  72. package/src/core/codemirror/lsp/notebook-lsp.ts +6 -16
  73. package/src/core/codemirror/use-lazy-editor-mount.ts +67 -0
  74. package/src/core/codemirror/utils.ts +2 -6
  75. package/src/utils/__tests__/shared-intersection-observer.test.ts +49 -0
  76. package/src/utils/shared-intersection-observer.ts +53 -0
@@ -406,16 +406,34 @@ var p = /* @__PURE__ */ e(((e) => {
406
406
  })), v = /* @__PURE__ */ e(((e, t) => {
407
407
  var { createId: n, init: r, getConstants: i, isCuid: a } = _();
408
408
  t.exports.createId = n, t.exports.init = r, t.exports.getConstants = i, t.exports.isCuid = a;
409
- })), y = v();
410
- function b(e) {
409
+ })), y = v(), b = i(null), x = (0, y.init)({ length: 6 });
410
+ function S() {
411
+ return `s_${x()}`;
412
+ }
413
+ function C(e) {
414
+ return e ? /^s_[\da-z]{6}$/.test(e) : !1;
415
+ }
416
+ var w = null;
417
+ function T() {
418
+ let e = r.get(s) === "edit", n = new URL(window.location.href).searchParams.get(o.sessionId), i = C(n) ? n : null;
419
+ return D((t) => {
420
+ e ? t.has(o.kiosk) || t.delete(o.sessionId) : (t.delete(o.sessionId), t.delete(o.kiosk));
421
+ }), i === null ? (t.debug("Starting a new session", { sessionId: n }), S()) : e ? (t.debug("Connecting to existing session", { sessionId: i }), i) : (t.debug("Ignoring session_id from URL outside the editor", { sessionId: i }), S());
422
+ }
423
+ function E() {
424
+ return w === null && (w = T()), w;
425
+ }
426
+ //#endregion
427
+ //#region src/utils/urls.ts
428
+ function D(e) {
411
429
  let t = new URL(window.location.href);
412
430
  e(t.searchParams), window.history.replaceState({}, "", t.toString());
413
431
  }
414
- var x = /^(https?:\/\/\S+)$/;
415
- function S(e) {
416
- return typeof e == "string" && x.test(e);
432
+ var O = /^(https?:\/\/\S+)$/;
433
+ function k(e) {
434
+ return typeof e == "string" && O.test(e);
417
435
  }
418
- function C({ href: e, queryParams: t, keys: n }) {
436
+ function A({ href: e, queryParams: t, keys: n }) {
419
437
  let r = typeof t == "string" ? new URLSearchParams(t) : t;
420
438
  if (r.size === 0 || e.startsWith("http://") || e.startsWith("https://")) return e;
421
439
  let i = e.startsWith("#"), a = i && e.includes("?");
@@ -435,25 +453,6 @@ function C({ href: e, queryParams: t, keys: n }) {
435
453
  return m ? `${o}?${m}${s}` : e;
436
454
  }
437
455
  //#endregion
438
- //#region src/core/kernel/session.ts
439
- var w = i(null), T = (0, y.init)({ length: 6 });
440
- function E() {
441
- return `s_${T()}`;
442
- }
443
- function D(e) {
444
- return e ? /^s_[\da-z]{6}$/.test(e) : !1;
445
- }
446
- var O = null;
447
- function k() {
448
- let e = r.get(s) === "edit", n = new URL(window.location.href).searchParams.get(o.sessionId), i = D(n) ? n : null;
449
- return b((t) => {
450
- e ? t.has(o.kiosk) || t.delete(o.sessionId) : (t.delete(o.sessionId), t.delete(o.kiosk));
451
- }), i === null ? (t.debug("Starting a new session", { sessionId: n }), E()) : e ? (t.debug("Connecting to existing session", { sessionId: i }), i) : (t.debug("Ignoring session_id from URL outside the editor", { sessionId: i }), E());
452
- }
453
- function A() {
454
- return O === null && (O = k()), O;
455
- }
456
- //#endregion
457
456
  //#region src/core/runtime/runtime.ts
458
457
  var j = new Set(Object.values(o)), M = class {
459
458
  initialHealthyCheck = new d();
@@ -581,14 +580,14 @@ var j = new Set(Object.values(o)), M = class {
581
580
  }
582
581
  headers() {
583
582
  let e = {
584
- "Marimo-Session-Id": A(),
583
+ "Marimo-Session-Id": E(),
585
584
  "Marimo-Server-Token": this.config.serverToken ?? "",
586
585
  "x-runtime-url": this.httpURL.toString()
587
586
  };
588
587
  return this.config.authToken && (e.Authorization = `Bearer ${this.config.authToken}`), e;
589
588
  }
590
589
  sessionHeaders() {
591
- return { "Marimo-Session-Id": A() };
590
+ return { "Marimo-Session-Id": E() };
592
591
  }
593
592
  };
594
593
  function N(e) {
@@ -615,4 +614,4 @@ function z(e) {
615
614
  return t.startsWith("blob:") && (t = t.replace("blob:", "")), new URL(e, t);
616
615
  }
617
616
  //#endregion
618
- export { S as a, d as c, C as i, u as l, R as n, b as o, w as r, v as s, z as t };
617
+ export { D as a, d as c, k as i, u as l, R as n, b as o, A as r, v as s, z as t };
@@ -2,7 +2,7 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
2
2
  import { t } from "./react-Bgs_wQh3.js";
3
3
  import { t as n } from "./react-dom-DdqGVp5N.js";
4
4
  import { c as r, l as i, u as a } from "./data-grid-types-DBNnjiYJ.js";
5
- import { a as o, i as s, n as c, r as l } from "./glide-data-editor-C3znsea0.js";
5
+ import { a as o, i as s, n as c, r as l } from "./glide-data-editor-BZxvtSp-.js";
6
6
  //#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.18.1_marked@15.0.12_react-dom@19.3.1__a94b4518d090e84da26f3a68e82f2953/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",