@marimo-team/islands 0.23.9-dev9 → 0.23.9

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 (101) hide show
  1. package/dist/{ConnectedDataExplorerComponent-OzrfMM5L.js → ConnectedDataExplorerComponent-CyV83R2m.js} +4 -4
  2. package/dist/assets/__vite-browser-external-Ci2ZQfXU.js +1 -0
  3. package/dist/assets/{worker-CpBbwbQo.js → worker-ip3AI_sN.js} +2 -2
  4. package/dist/{chat-ui-BDI3FMI8.js → chat-ui-ChD4VvCo.js} +3060 -3033
  5. package/dist/{code-visibility-DgHF4q8X.js → code-visibility-BkuwTYAm.js} +1368 -1204
  6. package/dist/{formats-DQ5qjo_Q.js → formats-DHxc-FdY.js} +1 -1
  7. package/dist/{glide-data-editor-DqRY9naW.js → glide-data-editor-BOmK9ETQ.js} +2 -2
  8. package/dist/{html-to-image-CiSinpSR.js → html-to-image-BHv7CEU_.js} +2145 -2153
  9. package/dist/{input-CZD2z6X2.js → input-_2sjvfne.js} +1 -1
  10. package/dist/main.js +680 -705
  11. package/dist/{mermaid-IU93XzmY.js → mermaid-lXOw5Py9.js} +2 -2
  12. package/dist/{process-output-5qJjMRKh.js → process-output-BvySRgli.js} +33 -25
  13. package/dist/{reveal-component-qpHJES_u.js → reveal-component-DeBkkDcg.js} +312 -291
  14. package/dist/{spec-a6DaqW__.js → spec-B96zNUEA.js} +1 -1
  15. package/dist/style.css +1 -1
  16. package/dist/{toDate-ZVVIBmdk.js → toDate-x-WRDCH7.js} +1 -1
  17. package/dist/{useAsyncData-C008zUPi.js → useAsyncData-iRgKDT5s.js} +1 -1
  18. package/dist/{useDeepCompareMemoize-BrA3_n61.js → useDeepCompareMemoize-CkQ57VS2.js} +1 -1
  19. package/dist/{useLifecycle-BNaoJ5a4.js → useLifecycle-BBO9PIph.js} +1 -1
  20. package/dist/{useTheme-7O0YWlE5.js → useTheme-DHIrRQOe.js} +34 -21
  21. package/dist/{vega-component-DJNmOdUj.js → vega-component-Dq-SH463.js} +5 -5
  22. package/package.json +1 -1
  23. package/src/components/ai/__tests__/ai-utils.test.ts +43 -38
  24. package/src/components/ai/ai-model-dropdown.tsx +2 -2
  25. package/src/components/app-config/ai-config.tsx +147 -16
  26. package/src/components/app-config/user-config-form.tsx +37 -1
  27. package/src/components/chat/__tests__/chat-utils.test.ts +269 -0
  28. package/src/components/chat/chat-panel.tsx +38 -5
  29. package/src/components/chat/chat-utils.ts +14 -58
  30. package/src/components/data-table/TableBottomBar.tsx +5 -8
  31. package/src/components/data-table/__tests__/column-explorer.test.tsx +128 -0
  32. package/src/components/data-table/__tests__/header-items.test.tsx +220 -10
  33. package/src/components/data-table/column-explorer-panel/column-explorer.tsx +95 -29
  34. package/src/components/data-table/column-header.tsx +17 -12
  35. package/src/components/data-table/data-table.tsx +4 -0
  36. package/src/components/data-table/export-actions.tsx +19 -12
  37. package/src/components/data-table/header-items.tsx +40 -16
  38. package/src/components/data-table/hooks/use-column-visibility.ts +14 -0
  39. package/src/components/data-table/schemas.ts +2 -2
  40. package/src/components/data-table/table-explorer-panel/table-explorer-panel.tsx +16 -6
  41. package/src/components/databases/display.tsx +2 -0
  42. package/src/components/datasources/__tests__/utils.test.ts +82 -0
  43. package/src/components/datasources/utils.ts +16 -15
  44. package/src/components/editor/Disconnected.tsx +1 -60
  45. package/src/components/editor/__tests__/viewer-banner.test.tsx +89 -0
  46. package/src/components/editor/actions/pair-with-agent-modal.tsx +1 -0
  47. package/src/components/editor/actions/useCellActionButton.tsx +3 -3
  48. package/src/components/editor/actions/useNotebookActions.tsx +5 -2
  49. package/src/components/editor/cell/code/cell-editor.tsx +25 -5
  50. package/src/components/editor/chrome/types.ts +13 -6
  51. package/src/components/editor/chrome/wrapper/app-chrome.tsx +6 -4
  52. package/src/components/editor/chrome/wrapper/footer-items/ai-status.tsx +10 -1
  53. package/src/components/editor/chrome/wrapper/sidebar.tsx +7 -5
  54. package/src/components/editor/errors/auto-fix.tsx +3 -3
  55. package/src/components/editor/header/__tests__/status.test.tsx +0 -15
  56. package/src/components/editor/header/app-header.tsx +1 -4
  57. package/src/components/editor/header/status.tsx +4 -13
  58. package/src/components/editor/navigation/__tests__/navigation.test.ts +15 -0
  59. package/src/components/editor/navigation/navigation.ts +5 -0
  60. package/src/components/editor/output/MarimoErrorOutput.tsx +103 -25
  61. package/src/components/editor/output/MarimoTracebackOutput.tsx +28 -39
  62. package/src/components/editor/renderers/cell-array.tsx +27 -24
  63. package/src/components/editor/renderers/slides-layout/__tests__/compute-slide-cells.test.ts +30 -17
  64. package/src/components/editor/renderers/slides-layout/compute-slide-cells.ts +17 -8
  65. package/src/components/editor/renderers/slides-layout/slides-layout.tsx +10 -12
  66. package/src/components/editor/viewer-banner.tsx +82 -0
  67. package/src/components/slides/minimap.tsx +45 -9
  68. package/src/components/slides/reveal-component.tsx +82 -37
  69. package/src/components/slides/slide-cell-view.tsx +12 -1
  70. package/src/components/slides/slide-form.tsx +11 -3
  71. package/src/components/static-html/static-banner.tsx +28 -22
  72. package/src/core/ai/__tests__/model-registry.test.ts +72 -60
  73. package/src/core/ai/model-registry.ts +33 -28
  74. package/src/core/cells/__tests__/actions.test.ts +48 -0
  75. package/src/core/cells/actions.ts +5 -6
  76. package/src/core/codemirror/__tests__/setup.test.ts +29 -0
  77. package/src/core/codemirror/cells/traceback-decorations.ts +1 -1
  78. package/src/core/codemirror/cm.ts +50 -3
  79. package/src/core/codemirror/completion/hints.ts +4 -1
  80. package/src/core/codemirror/format.ts +1 -0
  81. package/src/core/codemirror/keymaps/vim.ts +63 -0
  82. package/src/core/codemirror/language/languages/sql/sql.ts +1 -0
  83. package/src/core/codemirror/language/languages/sql/utils.ts +2 -0
  84. package/src/core/config/__tests__/config-schema.test.ts +4 -0
  85. package/src/core/config/config-schema.ts +4 -0
  86. package/src/core/config/config.ts +16 -0
  87. package/src/core/edit-app.tsx +3 -0
  88. package/src/core/islands/bootstrap.ts +2 -0
  89. package/src/core/kernel/__tests__/handlers.test.ts +5 -0
  90. package/src/core/websocket/__tests__/useMarimoKernelConnection.test.ts +0 -13
  91. package/src/core/websocket/types.ts +0 -6
  92. package/src/core/websocket/useMarimoKernelConnection.tsx +3 -12
  93. package/src/css/app/Cell.css +0 -1
  94. package/src/plugins/impl/DataTablePlugin.tsx +48 -22
  95. package/src/plugins/impl/chat/ChatPlugin.tsx +7 -1
  96. package/src/plugins/impl/chat/__tests__/chat-ui.test.ts +278 -0
  97. package/src/plugins/impl/chat/chat-ui.tsx +106 -59
  98. package/src/plugins/impl/chat/types.ts +5 -0
  99. package/src/utils/__tests__/json-parser.test.ts +1 -69
  100. package/src/utils/json/json-parser.ts +0 -30
  101. package/dist/assets/__vite-browser-external-CAdMKBac.js +0 -1
@@ -7,9 +7,9 @@ import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
7
7
  import "./zod-CoBiJ5v4.js";
8
8
  import { n as ErrorBanner } from "./error-banner-5bz0L9hS.js";
9
9
  import { t as isEmpty_default } from "./isEmpty-CJJMn-QP.js";
10
- import { n as useTheme } from "./useTheme-7O0YWlE5.js";
10
+ import { n as useTheme } from "./useTheme-DHIrRQOe.js";
11
11
  import { t as purify } from "./purify.es-H92eMd9-.js";
12
- import { t as useAsyncData } from "./useAsyncData-C008zUPi.js";
12
+ import { t as useAsyncData } from "./useAsyncData-iRgKDT5s.js";
13
13
  import { a as decodeEntities, f as isDetailedError, g as utils_default, h as removeDirectives, i as cleanAndMerge, o as encodeEntities } from "./chunk-S3R3BYOJ-oAe3dEbO.js";
14
14
  import { a as setLogLevel, i as log, r as __name, t as select_default } from "./src-Bf2iLOlr.js";
15
15
  import { t as package_default } from "./chunk-DR5Q36YT-BflwErH1.js";
@@ -1,6 +1,6 @@
1
1
  import { s as __toESM } from "./chunk-BNovOVIE.js";
2
2
  import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
3
- import { it as parseHtmlContent, rt as ansiToPlainText } from "./html-to-image-CiSinpSR.js";
3
+ import { it as parseHtmlContent, rt as ansiToPlainText } from "./html-to-image-BHv7CEU_.js";
4
4
  import { u as createLucideIcon } from "./dist-C1BYNeCR.js";
5
5
  import { t as Strings } from "./strings-Bu3vlb6W.js";
6
6
  import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
@@ -11,67 +11,74 @@ var File = createLucideIcon("file", [["path", {
11
11
  }], ["path", {
12
12
  d: "M14 2v5a1 1 0 0 0 1 1h5",
13
13
  key: "wfsgrz"
14
+ }]]), Square = createLucideIcon("square", [["rect", {
15
+ width: "18",
16
+ height: "18",
17
+ x: "3",
18
+ y: "3",
19
+ rx: "2",
20
+ key: "afitv7"
14
21
  }]]);
15
22
  function deserializeBlob(e) {
16
23
  var _a;
17
- let [_, v] = e.split(",", 2), y = (_a = /^data:(.+);base64$/.exec(_)) == null ? void 0 : _a[1], b = atob(v), x = b.length, S = new Uint8Array(x);
18
- for (let e2 = 0; e2 < x; e2++) S[e2] = b.charCodeAt(e2);
19
- return new Blob([S], { type: y });
24
+ let [v, y] = e.split(",", 2), b = (_a = /^data:(.+);base64$/.exec(v)) == null ? void 0 : _a[1], x = atob(y), S = x.length, C = new Uint8Array(S);
25
+ for (let e2 = 0; e2 < S; e2++) C[e2] = x.charCodeAt(e2);
26
+ return new Blob([C], { type: b });
20
27
  }
21
28
  function defineCustomEvent(e) {
22
29
  return () => ({
23
30
  TYPE: e,
24
- is(_) {
25
- return _.type === e;
31
+ is(v) {
32
+ return v.type === e;
26
33
  },
27
- create(_) {
28
- return new CustomEvent(e, _);
34
+ create(v) {
35
+ return new CustomEvent(e, v);
29
36
  }
30
37
  });
31
38
  }
32
39
  const MarimoValueInputEvent = defineCustomEvent("marimo-value-input")(), MarimoValueUpdateEvent = defineCustomEvent("marimo-value-update")(), MarimoValueReadyEvent = defineCustomEvent("marimo-value-ready")(), MarimoIncomingMessageEvent = defineCustomEvent("marimo-incoming-message")();
33
- function createInputEvent(e, _) {
40
+ function createInputEvent(e, v) {
34
41
  return MarimoValueInputEvent.create({
35
42
  bubbles: true,
36
43
  composed: true,
37
44
  detail: {
38
45
  value: e,
39
- element: _
46
+ element: v
40
47
  }
41
48
  });
42
49
  }
43
50
  var import_compiler_runtime = require_compiler_runtime(), import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime(), 1);
44
51
  const PythonIcon = (e) => {
45
- let _ = (0, import_compiler_runtime.c)(4), v, y;
46
- _[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("title", { children: "Python Logo" }), y = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z" }), _[0] = v, _[1] = y) : (v = _[0], y = _[1]);
47
- let b;
48
- return _[2] === e ? b = _[3] : (b = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
52
+ let v = (0, import_compiler_runtime.c)(4), y, b;
53
+ v[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("title", { children: "Python Logo" }), b = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z" }), v[0] = y, v[1] = b) : (y = v[0], b = v[1]);
54
+ let x;
55
+ return v[2] === e ? x = v[3] : (x = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
49
56
  xmlns: "http://www.w3.org/2000/svg",
50
57
  width: "1em",
51
58
  height: "1em",
52
59
  fill: "currentColor",
53
60
  viewBox: "0 0 448 512",
54
61
  ...e,
55
- children: [v, y]
56
- }), _[2] = e, _[3] = b), b;
62
+ children: [y, b]
63
+ }), v[2] = e, v[3] = x), x;
57
64
  };
58
65
  var FILE_READ_CONCURRENCY = 5;
59
- function blobToString(e, _) {
60
- return new Promise((v) => {
61
- let y = new FileReader();
62
- y.readAsDataURL(e), y.onload = (e2) => {
66
+ function blobToString(e, v) {
67
+ return new Promise((y) => {
68
+ let b = new FileReader();
69
+ b.readAsDataURL(e), b.onload = (e2) => {
63
70
  var _a;
64
71
  if ((_a = e2.target) == null ? void 0 : _a.result) {
65
- let y2 = e2.target.result;
66
- v(_ === "base64" ? y2.slice(y2.indexOf(",") + 1) : y2);
72
+ let b2 = e2.target.result;
73
+ y(v === "base64" ? b2.slice(b2.indexOf(",") + 1) : b2);
67
74
  }
68
75
  };
69
76
  });
70
77
  }
71
78
  function filesToBase64(e) {
72
79
  return mapWithConcurrency(e, FILE_READ_CONCURRENCY, async (e2) => {
73
- let _ = await blobToString(e2, "base64");
74
- return [e2.name, _];
80
+ let v = await blobToString(e2, "base64");
81
+ return [e2.name, v];
75
82
  });
76
83
  }
77
84
  function processOutput(e) {
@@ -80,7 +87,8 @@ function processOutput(e) {
80
87
  export {
81
88
  MarimoIncomingMessageEvent as a,
82
89
  MarimoValueUpdateEvent as c,
83
- File as d,
90
+ Square as d,
91
+ File as f,
84
92
  PythonIcon as i,
85
93
  createInputEvent as l,
86
94
  blobToString as n,