@marimo-team/islands 0.23.12-dev9 → 0.23.13-dev0

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 (36) hide show
  1. package/dist/{chat-ui-BEOvjkmJ.js → chat-ui-CsPewo4h.js} +2 -2
  2. package/dist/{code-visibility-w2yZTVwB.js → code-visibility-D9IipVFG.js} +714 -707
  3. package/dist/{html-to-image-Di0mtt6O.js → html-to-image-DXwLcQ6l.js} +22 -15
  4. package/dist/main.js +1160 -1027
  5. package/dist/{process-output-BLd4KuwX.js → process-output-C6_e1pT_.js} +1 -1
  6. package/dist/{reveal-component-CuqTvwmg.js → reveal-component-Dk32fyu2.js} +13 -13
  7. package/dist/style.css +1 -1
  8. package/package.json +1 -1
  9. package/src/components/data-table/TableBottomBar.tsx +4 -1
  10. package/src/components/data-table/data-table.tsx +26 -17
  11. package/src/components/data-table/utils.ts +1 -4
  12. package/src/components/editor/ai/__tests__/completion-utils.test.ts +48 -2
  13. package/src/components/editor/ai/completion-utils.ts +54 -36
  14. package/src/components/editor/app-container.tsx +3 -1
  15. package/src/components/editor/output/ImageOutput.tsx +12 -3
  16. package/src/components/editor/renderers/vertical-layout/vertical-layout-wrapper.tsx +2 -2
  17. package/src/core/codemirror/go-to-definition/__tests__/commands.test.ts +67 -0
  18. package/src/core/codemirror/go-to-definition/__tests__/utils.test.ts +47 -0
  19. package/src/core/codemirror/go-to-definition/commands.ts +47 -30
  20. package/src/core/codemirror/go-to-definition/utils.ts +0 -1
  21. package/src/core/codemirror/reactive-references/__tests__/analyzer.test.ts +54 -0
  22. package/src/core/codemirror/reactive-references/analyzer.ts +44 -35
  23. package/src/core/islands/__tests__/bridge.test.ts +25 -0
  24. package/src/core/islands/__tests__/parse.test.ts +585 -1
  25. package/src/core/islands/__tests__/test-utils.tsx +10 -1
  26. package/src/core/islands/bridge.ts +6 -1
  27. package/src/core/islands/constants.ts +2 -0
  28. package/src/core/islands/parse.ts +290 -13
  29. package/src/plugins/impl/DataTablePlugin.tsx +20 -1
  30. package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +141 -1
  31. package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +54 -4
  32. package/src/plugins/impl/anywidget/__tests__/AnyWidgetPlugin.test.tsx +104 -1
  33. package/src/plugins/impl/anywidget/__tests__/model.test.ts +19 -0
  34. package/src/plugins/impl/anywidget/model.ts +15 -0
  35. package/src/utils/__tests__/records.test.ts +27 -0
  36. package/src/utils/records.ts +12 -0
@@ -20006,18 +20006,25 @@ ${n.sqlString}
20006
20006
  case "ImportStatement": {
20007
20007
  let r2 = e.cursor();
20008
20008
  r2.firstChild();
20009
- do
20010
- r2.name === "VariableName" && t.doc.sliceString(r2.from, r2.to) === n && addDeclaration(i, l, r2.from);
20011
- while (r2.nextSibling());
20012
- break;
20013
- }
20014
- case "ImportFromStatement": {
20015
- let r2 = e.cursor();
20016
- r2.firstChild();
20017
- let a2 = false;
20018
- do
20019
- r2.name === "import" ? a2 = true : a2 && r2.name === "VariableName" && t.doc.sliceString(r2.from, r2.to) === n && addDeclaration(i, l, r2.from);
20020
- while (r2.nextSibling());
20009
+ let a2 = false, o2 = null, s2 = () => {
20010
+ (o2 == null ? void 0 : o2.matches) && addDeclaration(i, l, o2.from), o2 = null;
20011
+ };
20012
+ do {
20013
+ if (r2.name === "import") {
20014
+ a2 = true;
20015
+ continue;
20016
+ }
20017
+ if (!a2) continue;
20018
+ if (r2.name === "as") {
20019
+ o2 = null;
20020
+ continue;
20021
+ }
20022
+ r2.name === "VariableName" ? (s2(), o2 = {
20023
+ from: r2.from,
20024
+ matches: t.doc.sliceString(r2.from, r2.to) === n
20025
+ }) : r2.name === "," && s2();
20026
+ } while (r2.nextSibling());
20027
+ s2();
20021
20028
  break;
20022
20029
  }
20023
20030
  case "TryStatement":
@@ -20047,9 +20054,9 @@ ${n.sqlString}
20047
20054
  }
20048
20055
  return null;
20049
20056
  }
20050
- function goToVariableDefinition(e, t, n, r = true) {
20051
- let { state: i } = e, a = null;
20052
- return n !== void 0 && (a = findScopedDefinitionPosition(i, t, n)), a === null && r && (a = findFirstMatchingVariable(i, t)), a === null ? false : (goToPosition(e, a), true);
20057
+ function goToVariableDefinition(e, t, n) {
20058
+ let { state: r } = e, i = n === void 0 ? findFirstMatchingVariable(r, t) : findScopedDefinitionPosition(r, t, n);
20059
+ return i === null ? false : (goToPosition(e, i), true);
20053
20060
  }
20054
20061
  function goToLine(e, t) {
20055
20062
  return goToPosition(e, e.state.doc.line(t).from), true;