@marimo-team/frontend 0.23.16-dev26 → 0.23.16-dev28

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 (82) hide show
  1. package/dist/assets/{CellStatus-DwV4gbV3.js → CellStatus-CmojVYzm.js} +1 -1
  2. package/dist/assets/{JsonOutput-BG5T3DG2.js → JsonOutput-BwwRpByA.js} +12 -12
  3. package/dist/assets/{MarimoErrorOutput-C2HrF0bD.js → MarimoErrorOutput-BWte8vjk.js} +5 -5
  4. package/dist/assets/{RenderHTML-DoCFSir5.js → RenderHTML-DRltV71H.js} +1 -1
  5. package/dist/assets/{RunButton-COtmJuup.js → RunButton-DIegd2mN.js} +1 -1
  6. package/dist/assets/{add-cell-with-ai-BBAhBpT1.js → add-cell-with-ai-BBFD-M9V.js} +12 -12
  7. package/dist/assets/{add-connection-dialog-DFD5BLGa.js → add-connection-dialog-CECJ8507.js} +1 -1
  8. package/dist/assets/{agent-panel-TJGdsxOX.js → agent-panel-YaS0WXP1.js} +5 -5
  9. package/dist/assets/{ai-model-dropdown-BMS30HMu.js → ai-model-dropdown-BpVBUZnz.js} +4 -4
  10. package/dist/assets/{app-config-button-Cankwixh.js → app-config-button-BW-w01aF.js} +1 -1
  11. package/dist/assets/{cell-editor-sBYL591r.js → cell-editor-KWSR-llo.js} +10 -10
  12. package/dist/assets/{cell-link-D1nZ5myN.js → cell-link-C5gpAn3R.js} +1 -1
  13. package/dist/assets/{cells-D9tCNe6o.js → cells-6yd8nOAu.js} +45 -45
  14. package/dist/assets/{chat-display-ZB0n2r4U.js → chat-display-8BbC5B-D.js} +1 -1
  15. package/dist/assets/{chat-panel-BKqRvvhb.js → chat-panel-00V3uFDx.js} +1 -1
  16. package/dist/assets/{chat-ui-B3Pz1Tc4.js → chat-ui-DWhJ2Ozy.js} +1 -1
  17. package/dist/assets/{column-preview-CSVQtCQS.js → column-preview-DeXESYpM.js} +1 -1
  18. package/dist/assets/{command-palette-DiUt8L1K.js → command-palette-BfyjcLEp.js} +1 -1
  19. package/dist/assets/{common-XBd1qRDk.js → common-XVELED_O.js} +1 -1
  20. package/dist/assets/{components-D-aPO6md.js → components-BLHpmhXx.js} +1 -1
  21. package/dist/assets/{datasource-Pl4KKOUa.js → datasource-CTqa8bf-.js} +2 -2
  22. package/dist/assets/{dependency-graph-panel-rRXAafZ4.js → dependency-graph-panel-C4Nzcddp.js} +3 -3
  23. package/dist/assets/documentation-panel-Bym4G7IS.js +1 -0
  24. package/dist/assets/{download-Benw6kUY.js → download-HKgqJX4l.js} +3 -3
  25. package/dist/assets/{edit-page-CxNNXB4Y.js → edit-page-j4gnjFei.js} +6 -6
  26. package/dist/assets/{error-entries-CmfGHGq1.js → error-entries-CxyvaxEM.js} +2 -2
  27. package/dist/assets/{error-panel-BKb_UksO.js → error-panel-CfSy7uUr.js} +1 -1
  28. package/dist/assets/{file-explorer-panel-C9I7XP84.js → file-explorer-panel-Dd5Xn2TK.js} +4 -4
  29. package/dist/assets/{file-icons-Czm7CWoc.js → file-icons-CSjJ3JC6.js} +1 -1
  30. package/dist/assets/{file-name-input-CjWG0FWT.js → file-name-input-CrKtrXMl.js} +1 -1
  31. package/dist/assets/{floating-outline-BWk7h_Uf.js → floating-outline-ByQ8vvif.js} +1 -1
  32. package/dist/assets/{focus-DTmSq3hN.js → focus-CVONl-Dy.js} +1 -1
  33. package/dist/assets/{form-DrCvDcRK.js → form-Ca3yd_Od.js} +1 -1
  34. package/dist/assets/{home-page-DwtZlFRD.js → home-page-FpAawj9s.js} +2 -2
  35. package/dist/assets/{html-to-image-1vflBYah.js → html-to-image-C-4ysbGe.js} +1 -1
  36. package/dist/assets/{index-DK7_phcn.js → index-BYAv-jBF.js} +6 -6
  37. package/dist/assets/{layout-Cdpz2zk4.js → layout-Cyvip7OR.js} +5 -5
  38. package/dist/assets/{logs-panel-BojuPimp.js → logs-panel-5u1wUBn1.js} +1 -1
  39. package/dist/assets/{markdown-renderer-C9vdWclk.js → markdown-renderer-dABDqZDw.js} +1 -1
  40. package/dist/assets/{name-cell-input-BSFsnuTp.js → name-cell-input-Y4knmEIU.js} +1 -1
  41. package/dist/assets/{outline-panel-B1f5a2yI.js → outline-panel-CQ_KWLip.js} +1 -1
  42. package/dist/assets/{packages-panel-kj52vQTZ.js → packages-panel-Ijt7d51P.js} +1 -1
  43. package/dist/assets/{panels-Bs7O_Hac.js → panels-EhYQAy06.js} +2 -2
  44. package/dist/assets/{process-output-Csd6PmBH.js → process-output-Dd11YI04.js} +1 -1
  45. package/dist/assets/{radio-group-CdR34W0K.js → radio-group-22eWJ9fv.js} +1 -1
  46. package/dist/assets/{readonly-code-display-XBAHhCYR.js → readonly-code-display-BjK-TEri.js} +1 -1
  47. package/dist/assets/{readonly-python-code-3UXLXM0g.js → readonly-python-code-n_TrLmsR.js} +1 -1
  48. package/dist/assets/{reveal-component-DTcc6OYd.js → reveal-component-CkFCS99a.js} +2 -2
  49. package/dist/assets/{run-page-BgzVSOZh.js → run-page-ClhbSbzk.js} +1 -1
  50. package/dist/assets/scratchpad-panel-BH7tCYvw.js +1 -0
  51. package/dist/assets/{session-panel-Cs9YKkJc.js → session-panel-BZGNcZmp.js} +1 -1
  52. package/dist/assets/{skeleton-BOtI6k5P.js → skeleton-DiD_znnO.js} +1 -1
  53. package/dist/assets/{snippets-panel-ACMhA8oL.js → snippets-panel-DNaNtkR0.js} +1 -1
  54. package/dist/assets/{state-Dj8qTUAp.js → state-B7LxUcAy.js} +3 -3
  55. package/dist/assets/{state-N0U-K9F6.js → state-jCdh8Dcx.js} +1 -1
  56. package/dist/assets/{textarea-BQE_pb7P.js → textarea-DuEtSOCl.js} +1 -1
  57. package/dist/assets/{tracing-panel-CmMG0R-H.js → tracing-panel-rVAa3En0.js} +2 -2
  58. package/dist/assets/{tracing-CuJfR83E.js → tracing-ttUd3J7U.js} +1 -1
  59. package/dist/assets/{tree-actions-DJTGQWz0.js → tree-actions-UCr1tMHw.js} +1 -1
  60. package/dist/assets/useCellActionButton-CJknR0XY.js +1 -0
  61. package/dist/assets/{useDeleteCell-DsWH8wmn.js → useDeleteCell-PrgejW8A.js} +1 -1
  62. package/dist/assets/{useDependencyPanelTab-DjhiptCs.js → useDependencyPanelTab-5jc-_-hy.js} +1 -1
  63. package/dist/assets/{useNotebookActions-Bj0q_nkr.js → useNotebookActions-C5R8yLEx.js} +3 -3
  64. package/dist/assets/useRunCells-DHsd7HGL.js +1 -0
  65. package/dist/assets/{useSplitCell-CapBPXO1.js → useSplitCell-MZpER0Bh.js} +1 -1
  66. package/dist/index.html +22 -22
  67. package/package.json +1 -1
  68. package/src/components/data-table/__tests__/__snapshots__/chart-spec-model.test.ts.snap +174 -21
  69. package/src/components/data-table/__tests__/chart-spec-model.test.ts +102 -1
  70. package/src/components/data-table/column-summary/chart-spec-model.tsx +163 -103
  71. package/src/components/data-table/column-summary/legacy-chart-spec.ts +15 -7
  72. package/src/components/data-table/column-summary/utils.ts +26 -7
  73. package/src/components/data-table/types.ts +1 -1
  74. package/src/core/codemirror/find-replace/__tests__/navigate.test.ts +42 -30
  75. package/src/core/codemirror/find-replace/navigate.ts +2 -0
  76. package/src/core/codemirror/go-to-definition/__tests__/commands.test.ts +24 -3
  77. package/src/core/codemirror/go-to-definition/commands.ts +3 -0
  78. package/src/core/codemirror/utils.ts +28 -0
  79. package/dist/assets/documentation-panel-DSOMQtKU.js +0 -1
  80. package/dist/assets/scratchpad-panel-XnaU8Prb.js +0 -1
  81. package/dist/assets/useCellActionButton-Bglkc3w8.js +0 -1
  82. package/dist/assets/useRunCells-BpMmDGqa.js +0 -1
@@ -109,9 +109,10 @@ exports[`ColumnChartSpecModel > file URL handling > should handle arrow data 1`]
109
109
  "type": "temporal",
110
110
  },
111
111
  "y": {
112
- "aggregate": "max",
113
- "axis": null,
114
- "type": "quantitative",
112
+ "value": 0,
113
+ },
114
+ "y2": {
115
+ "value": 100,
115
116
  },
116
117
  },
117
118
  "mark": {
@@ -222,9 +223,10 @@ exports[`ColumnChartSpecModel > should expect bin values to be used for number a
222
223
  "field": "bin_end_extended",
223
224
  },
224
225
  "y": {
225
- "aggregate": "max",
226
- "axis": null,
227
- "type": "quantitative",
226
+ "value": 0,
227
+ },
228
+ "y2": {
229
+ "value": 30,
228
230
  },
229
231
  },
230
232
  "mark": {
@@ -486,9 +488,10 @@ exports[`ColumnChartSpecModel > should handle datetime bin values 1`] = `
486
488
  "type": "ordinal",
487
489
  },
488
490
  "y": {
489
- "aggregate": "max",
490
- "axis": null,
491
- "type": "quantitative",
491
+ "value": 0,
492
+ },
493
+ "y2": {
494
+ "value": 30,
492
495
  },
493
496
  },
494
497
  "mark": {
@@ -633,6 +636,152 @@ exports[`ColumnChartSpecModel > should handle string value counts 1`] = `
633
636
  }
634
637
  `;
635
638
 
639
+ exports[`ColumnChartSpecModel > should render a null bar for all-null temporal columns 1`] = `
640
+ {
641
+ "background": "transparent",
642
+ "config": {
643
+ "axis": {
644
+ "domain": false,
645
+ },
646
+ "view": {
647
+ "stroke": "transparent",
648
+ },
649
+ },
650
+ "data": {
651
+ "name": "bin_values",
652
+ "values": [
653
+ {
654
+ "bin_end": null,
655
+ "bin_start": null,
656
+ "count": 12,
657
+ },
658
+ ],
659
+ },
660
+ "height": 30,
661
+ "layer": [
662
+ {
663
+ "encoding": {
664
+ "x": {
665
+ "axis": null,
666
+ "field": "bin_start",
667
+ "type": "nominal",
668
+ },
669
+ "y": {
670
+ "axis": null,
671
+ "field": "count",
672
+ "type": "quantitative",
673
+ },
674
+ },
675
+ "mark": {
676
+ "color": "#cc4e00",
677
+ "type": "bar",
678
+ },
679
+ },
680
+ {
681
+ "encoding": {
682
+ "tooltip": [
683
+ {
684
+ "field": "count",
685
+ "format": ",d",
686
+ "title": "nulls",
687
+ "type": "quantitative",
688
+ },
689
+ ],
690
+ "x": {
691
+ "axis": null,
692
+ "field": "bin_start",
693
+ "type": "nominal",
694
+ },
695
+ "y": {
696
+ "value": 0,
697
+ },
698
+ "y2": {
699
+ "value": 30,
700
+ },
701
+ },
702
+ "mark": {
703
+ "opacity": 0,
704
+ "type": "bar",
705
+ },
706
+ },
707
+ ],
708
+ "width": 70,
709
+ }
710
+ `;
711
+
712
+ exports[`ColumnChartSpecModel > should render only a null bar for all-null numeric columns 1`] = `
713
+ {
714
+ "background": "transparent",
715
+ "config": {
716
+ "axis": {
717
+ "domain": false,
718
+ },
719
+ "view": {
720
+ "stroke": "transparent",
721
+ },
722
+ },
723
+ "data": {
724
+ "name": "bin_values",
725
+ "values": [
726
+ {
727
+ "bin_end": null,
728
+ "bin_start": null,
729
+ "count": 12,
730
+ },
731
+ ],
732
+ },
733
+ "height": 30,
734
+ "layer": [
735
+ {
736
+ "encoding": {
737
+ "x": {
738
+ "axis": null,
739
+ "field": "bin_start",
740
+ "type": "nominal",
741
+ },
742
+ "y": {
743
+ "axis": null,
744
+ "field": "count",
745
+ "type": "quantitative",
746
+ },
747
+ },
748
+ "mark": {
749
+ "color": "#cc4e00",
750
+ "type": "bar",
751
+ },
752
+ },
753
+ {
754
+ "encoding": {
755
+ "tooltip": [
756
+ {
757
+ "field": "count",
758
+ "format": ",d",
759
+ "title": "nulls",
760
+ "type": "quantitative",
761
+ },
762
+ ],
763
+ "x": {
764
+ "axis": null,
765
+ "field": "bin_start",
766
+ "type": "nominal",
767
+ },
768
+ "y": {
769
+ "value": 0,
770
+ },
771
+ "y2": {
772
+ "value": 30,
773
+ },
774
+ },
775
+ "mark": {
776
+ "opacity": 0,
777
+ "type": "bar",
778
+ },
779
+ },
780
+ ],
781
+ "width": 70,
782
+ }
783
+ `;
784
+
636
785
  exports[`ColumnChartSpecModel > snapshot with legacy data spec > array 1`] = `
637
786
  {
638
787
  "background": "transparent",
@@ -700,9 +849,10 @@ exports[`ColumnChartSpecModel > snapshot with legacy data spec > array 1`] = `
700
849
  "type": "quantitative",
701
850
  },
702
851
  "y": {
703
- "aggregate": "max",
704
- "axis": null,
705
- "type": "quantitative",
852
+ "value": 0,
853
+ },
854
+ "y2": {
855
+ "value": 100,
706
856
  },
707
857
  },
708
858
  "mark": {
@@ -788,9 +938,10 @@ exports[`ColumnChartSpecModel > snapshot with legacy data spec > csv data 1`] =
788
938
  "type": "quantitative",
789
939
  },
790
940
  "y": {
791
- "aggregate": "max",
792
- "axis": null,
793
- "type": "quantitative",
941
+ "value": 0,
942
+ },
943
+ "y2": {
944
+ "value": 100,
794
945
  },
795
946
  },
796
947
  "mark": {
@@ -876,9 +1027,10 @@ exports[`ColumnChartSpecModel > snapshot with legacy data spec > csv string 1`]
876
1027
  "type": "quantitative",
877
1028
  },
878
1029
  "y": {
879
- "aggregate": "max",
880
- "axis": null,
881
- "type": "quantitative",
1030
+ "value": 0,
1031
+ },
1032
+ "y2": {
1033
+ "value": 100,
882
1034
  },
883
1035
  },
884
1036
  "mark": {
@@ -988,9 +1140,10 @@ exports[`ColumnChartSpecModel > snapshot with legacy data spec > url data 1`] =
988
1140
  "type": "temporal",
989
1141
  },
990
1142
  "y": {
991
- "aggregate": "max",
992
- "axis": null,
993
- "type": "quantitative",
1143
+ "value": 0,
1144
+ },
1145
+ "y2": {
1146
+ "value": 100,
994
1147
  },
995
1148
  },
996
1149
  "mark": {
@@ -178,6 +178,104 @@ describe("ColumnChartSpecModel", () => {
178
178
  expect(summary2.spec?.data?.values).toEqual(mockBinValues.integer);
179
179
  });
180
180
 
181
+ it("should render only a null bar for all-null numeric columns", () => {
182
+ const allNullStats: Record<ColumnName, Partial<ColumnHeaderStats>> = {
183
+ number: { nulls: 12, total: 12 },
184
+ };
185
+ const allNullBins: Record<ColumnName, BinValues> = {
186
+ number: [],
187
+ };
188
+ const model = new ColumnChartSpecModel(
189
+ [],
190
+ mockFieldTypes,
191
+ allNullStats,
192
+ allNullBins,
193
+ {},
194
+ { includeCharts: true },
195
+ );
196
+ const summary = model.getHeaderSummary("number");
197
+ expect(summary.spec).toBeDefined();
198
+ // @ts-expect-error hconcat should be available
199
+ expect(summary.spec?.hconcat).toBeUndefined();
200
+ // @ts-expect-error data.values should be available
201
+ expect(summary.spec?.data?.values).toEqual([
202
+ { bin_start: null, bin_end: null, count: 12 },
203
+ ]);
204
+ // Full-width null-only chart (not the thin hconcat null strip)
205
+ expect(summary.spec?.width).toBe(70);
206
+ // Full-height tooltip hit area uses pixel y/y2 (no aggregate:max)
207
+ // @ts-expect-error layer should be available
208
+ expect(summary.spec?.layer?.[1]?.encoding?.y).toEqual({ value: 0 });
209
+ // @ts-expect-error layer should be available
210
+ expect(summary.spec?.layer?.[1]?.encoding?.y2).toEqual({ value: 30 });
211
+ expect(summary.spec).toMatchSnapshot();
212
+ });
213
+
214
+ it("should ignore NaN bins and not mutate stored bin values", () => {
215
+ const nanOnlyBins: Record<ColumnName, BinValues> = {
216
+ number: [
217
+ { bin_start: Number.NaN, bin_end: 0.1, count: 0 },
218
+ { bin_start: Number.NaN, bin_end: 1, count: 0 },
219
+ ],
220
+ };
221
+ const stats: Record<ColumnName, Partial<ColumnHeaderStats>> = {
222
+ number: { nulls: 12, total: 12 },
223
+ };
224
+ const model = new ColumnChartSpecModel(
225
+ [],
226
+ mockFieldTypes,
227
+ stats,
228
+ nanOnlyBins,
229
+ {},
230
+ { includeCharts: true },
231
+ );
232
+ const first = model.getHeaderSummary("number");
233
+ const second = model.getHeaderSummary("number");
234
+ // All NaN bins are invalid → null-only chart
235
+ // @ts-expect-error hconcat should be available
236
+ expect(first.spec?.hconcat).toBeUndefined();
237
+ expect(first.spec?.width).toBe(70);
238
+ // Stored bins must not grow across getHeaderSummary calls
239
+ expect(nanOnlyBins.number).toHaveLength(2);
240
+ expect(second.spec).toEqual(first.spec);
241
+ });
242
+
243
+ it("should render a null bar for all-null temporal columns", () => {
244
+ const model = new ColumnChartSpecModel(
245
+ [],
246
+ mockFieldTypes,
247
+ { datetime: { nulls: 12, total: 12 } },
248
+ { datetime: [] },
249
+ {},
250
+ { includeCharts: true },
251
+ );
252
+ const summary = model.getHeaderSummary("datetime");
253
+ expect(summary.spec).toBeDefined();
254
+ // @ts-expect-error data.values
255
+ expect(summary.spec?.data?.values).toEqual([
256
+ { bin_start: null, bin_end: null, count: 12 },
257
+ ]);
258
+ expect(summary.spec?.width).toBe(70);
259
+ // Same full-height hover hit area as numeric all-null charts
260
+ // @ts-expect-error layer should be available
261
+ expect(summary.spec?.layer?.[1]?.encoding?.y).toEqual({ value: 0 });
262
+ // @ts-expect-error layer should be available
263
+ expect(summary.spec?.layer?.[1]?.encoding?.y2).toEqual({ value: 30 });
264
+ expect(summary.spec).toMatchSnapshot();
265
+ });
266
+
267
+ it("should return null when numeric bins are empty and there are no nulls", () => {
268
+ const model = new ColumnChartSpecModel(
269
+ [],
270
+ mockFieldTypes,
271
+ { number: { min: 0, max: 1 } },
272
+ { number: [] },
273
+ {},
274
+ { includeCharts: true },
275
+ );
276
+ expect(model.getHeaderSummary("number").spec).toBeNull();
277
+ });
278
+
181
279
  it("should handle datetime bin values", () => {
182
280
  const model = new ColumnChartSpecModel(
183
281
  [],
@@ -191,7 +289,10 @@ describe("ColumnChartSpecModel", () => {
191
289
  const summary = model.getHeaderSummary("datetime");
192
290
  expect(summary.spec).toBeDefined();
193
291
  // @ts-expect-error data.values should be available
194
- expect(summary.spec?.data?.values).toEqual(mockBinValues.datetime);
292
+ expect(summary.spec?.data?.values).toEqual([
293
+ ...mockBinValues.datetime,
294
+ { bin_start: null, bin_end: null, count: 10 },
295
+ ]);
195
296
 
196
297
  expect(summary.spec).toMatchSnapshot();
197
298