@marimo-team/frontend 0.23.4-dev8 → 0.23.4

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 (42) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-DgruBYR5.js → ConnectedDataExplorerComponent-BPVOWDZX.js} +1 -1
  2. package/dist/assets/JsonOutput-CsshJCMI.js +49 -0
  3. package/dist/assets/{add-connection-dialog-gd2yD9Qo.js → add-connection-dialog-BY0poJft.js} +1 -1
  4. package/dist/assets/{agent-panel-TetMUXWP.js → agent-panel-BvH5q5xP.js} +1 -1
  5. package/dist/assets/{cell-editor-87LAVsOR.js → cell-editor-B43gqTef.js} +1 -1
  6. package/dist/assets/{column-preview-_5uYiy74.js → column-preview-DUPpv2dz.js} +1 -1
  7. package/dist/assets/command-CXDOCJwp.js +1 -0
  8. package/dist/assets/{command-palette-DRkgETbF.js → command-palette-B5AX7Cgd.js} +1 -1
  9. package/dist/assets/{dependency-graph-panel-Yk1Ch_Gj.js → dependency-graph-panel-k1WQZ4m-.js} +1 -1
  10. package/dist/assets/{edit-page-DKd3R20z.js → edit-page-Lwy52pkS.js} +3 -3
  11. package/dist/assets/{file-explorer-panel-Dlwspu2Y.js → file-explorer-panel-DSahRBWr.js} +2 -2
  12. package/dist/assets/{form-Dr-_EXr8.js → form-0wZOuqB-.js} +1 -1
  13. package/dist/assets/{hooks-CNPv5U-N.js → hooks-BZOcKMEB.js} +1 -1
  14. package/dist/assets/{index-BruLKdo6.js → index-D48a2kB0.js} +8 -8
  15. package/dist/assets/{layout-DDh3d8oW.js → layout-DXt0aA4F.js} +3 -3
  16. package/dist/assets/{panels-CbRenLjk.js → panels-8fPdoW9_.js} +1 -1
  17. package/dist/assets/react-vega-BQXvtE5G.js +188 -0
  18. package/dist/assets/{react-vega-8VhWN23c.js → react-vega-BVATzlrQ.js} +1 -1
  19. package/dist/assets/{reveal-component-CLjsFHmT.js → reveal-component-CgCn23Mw.js} +1 -1
  20. package/dist/assets/{run-page-C1Wd8dr8.js → run-page-x3v_5tzv.js} +1 -1
  21. package/dist/assets/{scratchpad-panel-B8kRNql6.js → scratchpad-panel-CHFYLvso.js} +1 -1
  22. package/dist/assets/{session-panel-BvCIuxgU.js → session-panel-DMaf7Upn.js} +1 -1
  23. package/dist/assets/{slide-form-CXqvfwGg.js → slide-form-Dmi4fzLs.js} +1 -1
  24. package/dist/assets/{snippets-panel-COBTGJcr.js → snippets-panel-CnN632Ki.js} +1 -1
  25. package/dist/assets/{state-LyvUXW6A.js → state-CikXvgx3.js} +1 -1
  26. package/dist/assets/{tracing-DjZGgWTo.js → tracing-BZPLfSlB.js} +1 -1
  27. package/dist/assets/{tracing-panel-8eFzEjG0.js → tracing-panel-DBaQBraG.js} +2 -2
  28. package/dist/assets/{useDependencyPanelTab-DFZNQ3a8.js → useDependencyPanelTab-8WaMRWbo.js} +1 -1
  29. package/dist/assets/{useNotebookActions-DgOcTnrU.js → useNotebookActions-v4SgyM_0.js} +1 -1
  30. package/dist/assets/{vega-component-DTWLzrN1.js → vega-component-BnaMdpJB.js} +1 -1
  31. package/dist/index.html +6 -6
  32. package/package.json +2 -2
  33. package/src/components/data-table/__tests__/column-header.test.ts +63 -0
  34. package/src/components/data-table/__tests__/columns.test.tsx +40 -10
  35. package/src/components/data-table/column-header.tsx +77 -163
  36. package/src/components/data-table/columns.tsx +12 -1
  37. package/src/components/data-table/filter-by-values-picker.tsx +7 -4
  38. package/src/components/data-table/range-focus/__tests__/use-cell-range-selection.test.ts +135 -54
  39. package/src/components/data-table/range-focus/use-cell-range-selection.ts +36 -4
  40. package/dist/assets/JsonOutput-BVAcY5xS.js +0 -49
  41. package/dist/assets/command-CzIDL1VI.js +0 -1
  42. package/dist/assets/react-vega-Dprex0g5.js +0 -190
@@ -130,14 +130,46 @@ export const useCellRangeSelection = <TData>({
130
130
  const INTERACTIVE_SELECTOR =
131
131
  'input, button, select, textarea, a, label, [role="checkbox"], [role="button"], [contenteditable="true"], marimo-ui-element';
132
132
 
133
+ // `<marimo-ui-element>` wraps every stateful UIElement, but content-wrapper
134
+ // UIElements like `mo.lazy` and `mo.routes` are themselves inert. Clicks on
135
+ // their inner content should still allow cell selection.
136
+ // See https://github.com/marimo-team/marimo/issues/9189.
137
+ const CONTENT_WRAPPER_MARIMO_TAGS: ReadonlySet<string> = new Set([
138
+ "marimo-lazy",
139
+ "marimo-routes",
140
+ ]);
141
+
133
142
  /**
134
143
  * Skip cell selection when the click target is inside an interactive element
135
144
  * (e.g. a checkbox or button rendered as rich cell content).
145
+ *
146
+ * Walks `composedPath()` so we can see through Shadow DOM boundaries used by
147
+ * marimo plugins. Without this, `event.target` is retargeted to the outermost
148
+ * shadow host (e.g. `<marimo-lazy>`), hiding any genuinely interactive
149
+ * descendants rendered inside the shadow tree.
136
150
  */
137
151
  export function isInteractiveTarget(e: React.MouseEvent): boolean {
138
- const target = e.target;
139
- if (target === e.currentTarget || !(target instanceof Element)) {
140
- return false;
152
+ const path: readonly EventTarget[] =
153
+ typeof e.nativeEvent?.composedPath === "function"
154
+ ? e.nativeEvent.composedPath()
155
+ : [e.target];
156
+
157
+ for (const node of path) {
158
+ if (node === e.currentTarget) {
159
+ break;
160
+ }
161
+ if (!(node instanceof Element) || !node.matches(INTERACTIVE_SELECTOR)) {
162
+ continue;
163
+ }
164
+ // A `<marimo-ui-element>` directly wrapping a passive content-wrapper is
165
+ // inert; keep walking to find a real interactive ancestor (if any).
166
+ if (node.localName === "marimo-ui-element") {
167
+ const inner = node.firstElementChild;
168
+ if (inner && CONTENT_WRAPPER_MARIMO_TAGS.has(inner.localName)) {
169
+ continue;
170
+ }
171
+ }
172
+ return true;
141
173
  }
142
- return target.closest(INTERACTIVE_SELECTOR) !== null;
174
+ return false;
143
175
  }