@marimo-team/islands 0.22.1-dev24 → 0.22.1-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 (128) hide show
  1. package/dist/_basePickBy-Sow3pJjS.js +41 -0
  2. package/dist/{_baseUniq--7il0Js0.js → _baseUniq-C87CckHL.js} +14 -53
  3. package/dist/{architecture-7HQA4BMR-CSK94-xM.js → architecture-7HQA4BMR-BHdkAMvZ.js} +2 -2
  4. package/dist/{architectureDiagram-VXUJARFQ-Cw5_EP5P.js → architectureDiagram-VXUJARFQ-B3YQo9At.js} +9 -9
  5. package/dist/{blockDiagram-VD42YOAC-BiuOHEQv.js → blockDiagram-VD42YOAC-CpQ3TKEN.js} +2 -2
  6. package/dist/{chat-ui-MFxd7AGf.js → chat-ui-Wi1Lm6y4.js} +3 -3
  7. package/dist/{chunk-4F5CHEZ2-B0Jbisw2.js → chunk-4F5CHEZ2-D5mClyDv.js} +1 -1
  8. package/dist/{chunk-B2363JML-mJ3Q9WfR.js → chunk-B2363JML-Br0eA2T3.js} +1 -1
  9. package/dist/{chunk-B4BG7PRW-C4MiRcFI.js → chunk-B4BG7PRW-4BjV11Br.js} +1 -1
  10. package/dist/{chunk-DI55MBZ5-CMx27S12.js → chunk-DI55MBZ5-DITY3EyP.js} +1 -1
  11. package/dist/{chunk-FRFDVMJY-IPSTV3Ua.js → chunk-FRFDVMJY-DnEvEFRR.js} +1 -1
  12. package/dist/{chunk-N4CR4FBY-DYub3dan.js → chunk-N4CR4FBY-CpZSuGSU.js} +1 -1
  13. package/dist/{chunk-PL6DKKU2-DZiAP4HM.js → chunk-PL6DKKU2-DnId6G-x.js} +1 -1
  14. package/dist/{chunk-SJTYNZTY-s-hMTFeC.js → chunk-SJTYNZTY-BsBZnJUj.js} +1 -1
  15. package/dist/{chunk-TCCFYFTB-D7iQP6Bp.js → chunk-TCCFYFTB-Clbl-fTg.js} +5 -4
  16. package/dist/{chunk-TQ3KTPDO-BmFTqg51.js → chunk-TQ3KTPDO-CFkSQ30e.js} +1 -1
  17. package/dist/{chunk-UMXZTB3W-AUirFhbD.js → chunk-UMXZTB3W-D-A834Bq.js} +1 -1
  18. package/dist/{classDiagram-2ON5EDUG-BJCfK6hn.js → classDiagram-2ON5EDUG-C8-zE3Zv.js} +2 -2
  19. package/dist/{classDiagram-v2-WZHVMYZB-aaIrLBHp.js → classDiagram-v2-WZHVMYZB-DrmbGANl.js} +2 -2
  20. package/dist/{clone-BsAy1q8B.js → clone-DZFQCtFJ.js} +1 -1
  21. package/dist/{constants-CMDkKrpC.js → constants-CvyfaCvs.js} +1 -1
  22. package/dist/{dagre-6UL2VRFP-CLYtUWgC.js → dagre-6UL2VRFP-OMItEBnY.js} +5 -5
  23. package/dist/{dagre-oeMGMQA0.js → dagre-QVd-lCXU.js} +10 -20
  24. package/dist/{diagram-PSM6KHXK-D_6t-W86.js → diagram-PSM6KHXK-CkKbohWI.js} +9 -9
  25. package/dist/{diagram-QEK2KX5R-DyPwbpot.js → diagram-QEK2KX5R-DjUMpVcx.js} +9 -9
  26. package/dist/{diagram-S2PKOQOG-nwsLe-2u.js → diagram-S2PKOQOG-b-c0d-wZ.js} +9 -9
  27. package/dist/{erDiagram-Q2GNP2WA-C3PXcCCI.js → erDiagram-Q2GNP2WA-CDhLaOZ1.js} +1 -1
  28. package/dist/{flowDiagram-NV44I4VS-DFDCBPb3.js → flowDiagram-NV44I4VS-BDi4O4CL.js} +1 -1
  29. package/dist/{gitGraph-G5XIXVHT-CuhmzmB1.js → gitGraph-G5XIXVHT-B_c6xFJv.js} +2 -2
  30. package/dist/{gitGraphDiagram-V2S2FVAM-B3inBgCa.js → gitGraphDiagram-V2S2FVAM-iQnXzbPM.js} +9 -9
  31. package/dist/{glide-data-editor-kjT1twjd.js → glide-data-editor-D8O9AS1C.js} +2 -2
  32. package/dist/{graphlib-B05vp8B3.js → graphlib-BV1_gi0C.js} +2 -1
  33. package/dist/hasIn-DnfJcYpY.js +108 -0
  34. package/dist/{info-VBDWY6EO-CHQo46SB.js → info-VBDWY6EO-BTyzxmhr.js} +2 -2
  35. package/dist/{infoDiagram-HS3SLOUP-WHNM1sDJ.js → infoDiagram-HS3SLOUP-OYrX6uO3.js} +9 -9
  36. package/dist/{input-DONWC1s4.js → input-BeQSGpld.js} +1 -1
  37. package/dist/main.js +97 -75
  38. package/dist/{mermaid-BdEvqBXn.js → mermaid-808LPVim.js} +19 -19
  39. package/dist/{mermaid-parser.core-C2Dti_2f.js → mermaid-parser.core-ntCgyx0x.js} +8 -8
  40. package/dist/min-Ds3gG0Ff.js +96 -0
  41. package/dist/{mindmap-definition-VGOIOE7T-B02Y_l4r.js → mindmap-definition-VGOIOE7T-CxEUZZvY.js} +1 -1
  42. package/dist/{packet-DYOGHKS2-DjPkocnd.js → packet-DYOGHKS2-BhvnpoGi.js} +2 -2
  43. package/dist/{pie-VRWISCQL-B9pA8cOD.js → pie-VRWISCQL-dILuA3iG.js} +2 -2
  44. package/dist/{pieDiagram-ADFJNKIX-Bzhvjry9.js → pieDiagram-ADFJNKIX-U3LrUqAS.js} +9 -9
  45. package/dist/{process-output-LVENbROu.js → process-output-BvZAAk1w.js} +3 -3
  46. package/dist/{radar-ZZBFDIW7-C2obWVPx.js → radar-ZZBFDIW7-DwFrOJDj.js} +2 -2
  47. package/dist/range-fJeId9Ri.js +30 -0
  48. package/dist/{requirementDiagram-UZGBJVZJ-B7RuV-90.js → requirementDiagram-UZGBJVZJ-D0zpQnKC.js} +1 -1
  49. package/dist/{stateDiagram-FKZM4ZOC-QeUJrF7u.js → stateDiagram-FKZM4ZOC-B1S8jGMn.js} +4 -4
  50. package/dist/{stateDiagram-v2-4FDKWEC3-eOW_mDCq.js → stateDiagram-v2-4FDKWEC3-BH5ozUbc.js} +2 -2
  51. package/dist/{toDate-CamIA0ND.js → toDate-O4H9dZVC.js} +1 -1
  52. package/dist/{treemap-GDKQZRPO-DWMsd3D8.js → treemap-GDKQZRPO-bx2ngsgN.js} +2 -2
  53. package/dist/{types-IIG7e4M2.js → types-D_ntCXg0.js} +1 -1
  54. package/dist/{useDeepCompareMemoize-DAfQftmI.js → useDeepCompareMemoize-B8DwRVrX.js} +1 -1
  55. package/dist/{vega-component-CuWVhTG9.js → vega-component-C-fsM9rL.js} +3 -3
  56. package/package.json +4 -5
  57. package/src/__tests__/main.test.tsx +12 -14
  58. package/src/components/ai/ai-provider-icon.tsx +1 -2
  59. package/src/components/data-table/cell-selection/types.ts +3 -2
  60. package/src/components/data-table/charts/charts.tsx +2 -2
  61. package/src/components/data-table/column-formatting/types.ts +3 -2
  62. package/src/components/data-table/column-header.tsx +4 -2
  63. package/src/components/data-table/column-wrapping/types.ts +3 -2
  64. package/src/components/data-table/copy-column/types.ts +3 -2
  65. package/src/components/data-table/focus-row/types.ts +3 -2
  66. package/src/components/data-table/range-focus/__tests__/atoms.test.ts +11 -11
  67. package/src/components/data-table/range-focus/__tests__/use-cell-range-selection.test.ts +9 -11
  68. package/src/components/editor/__tests__/data-attributes.test.tsx +93 -94
  69. package/src/components/editor/actions/name-cell-input.tsx +4 -2
  70. package/src/components/editor/actions/useCellActionButton.tsx +4 -2
  71. package/src/components/editor/cell/CellStatus.tsx +4 -5
  72. package/src/components/editor/cell/cell-context-menu.tsx +4 -2
  73. package/src/components/editor/cell/code/cell-editor.tsx +2 -1
  74. package/src/components/editor/cell/toolbar.tsx +2 -1
  75. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +11 -12
  76. package/src/components/storage/__tests__/storage-snippets.test.ts +4 -6
  77. package/src/components/tracing/tracing.test.tsx +30 -30
  78. package/src/components/ui/badge.tsx +2 -1
  79. package/src/components/ui/button.tsx +2 -1
  80. package/src/components/ui/calendar.tsx +3 -2
  81. package/src/components/ui/combobox.tsx +2 -1
  82. package/src/components/ui/date-input.tsx +7 -6
  83. package/src/components/ui/date-picker.tsx +6 -4
  84. package/src/components/ui/field.tsx +1 -2
  85. package/src/components/ui/progress.tsx +3 -2
  86. package/src/components/ui/query-param-preserving-link.tsx +4 -2
  87. package/src/components/ui/sheet.tsx +2 -1
  88. package/src/components/ui/textarea.tsx +1 -2
  89. package/src/core/ai/context/providers/cell-output.ts +1 -2
  90. package/src/core/ai/tools/edit-notebook-tool.ts +4 -3
  91. package/src/core/ai/tools/run-cells-tool.ts +4 -3
  92. package/src/core/cells/__tests__/add-missing-import.test.ts +23 -22
  93. package/src/core/cells/__tests__/cell.test.ts +14 -13
  94. package/src/core/codemirror/cells/__tests__/extensions.test.ts +15 -17
  95. package/src/core/codemirror/language/languages/markdown.ts +1 -3
  96. package/src/core/codemirror/language/languages/python.ts +1 -1
  97. package/src/core/codemirror/language/languages/sql/completion-sources.tsx +4 -6
  98. package/src/core/codemirror/language/languages/sql/sql.ts +1 -3
  99. package/src/core/codemirror/reactive-references/__tests__/analyzer.test.ts +28 -42
  100. package/src/core/datasets/data-source-connections.ts +4 -2
  101. package/src/core/dom/__tests__/htmlUtils.test.ts +8 -14
  102. package/src/core/dom/__tests__/outline.test.ts +2 -3
  103. package/src/core/islands/__tests__/parse.test.ts +8 -7
  104. package/src/core/saving/__tests__/filename.test.ts +7 -6
  105. package/src/core/static/__tests__/download-html.test.ts +16 -15
  106. package/src/core/static/__tests__/files.test.ts +30 -28
  107. package/src/css/app/Cell.css +5 -2
  108. package/src/css/globals.css +40 -14
  109. package/src/plugins/impl/DataEditorPlugin.tsx +4 -2
  110. package/src/plugins/impl/FormPlugin.tsx +1 -2
  111. package/src/plugins/impl/__tests__/SliderPlugin.test.tsx +43 -15
  112. package/src/plugins/impl/data-frames/forms/__tests__/form.test.tsx +7 -9
  113. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +12 -68
  114. package/src/plugins/impl/plotly/__tests__/selection.test.ts +237 -0
  115. package/src/plugins/impl/plotly/selection.ts +118 -0
  116. package/src/plugins/impl/vega/__tests__/make-selectable.test.ts +13 -14
  117. package/src/plugins/layout/ImageComparisonPlugin.tsx +1 -3
  118. package/src/plugins/stateless-plugin.ts +4 -2
  119. package/src/utils/__tests__/cell-urls.test.ts +24 -21
  120. package/src/utils/__tests__/filenames.test.ts +15 -14
  121. package/src/utils/__tests__/json-parser.test.ts +14 -21
  122. package/src/utils/__tests__/path.test.ts +34 -31
  123. package/src/utils/__tests__/urls.test.ts +19 -18
  124. package/dist/_basePickBy-CsPbmRlg.js +0 -110
  125. package/dist/_baseSet-Cs7YTRXk.js +0 -27
  126. package/dist/get-Wu1vTRhN.js +0 -68
  127. package/dist/range-CNXr10o1.js +0 -17
  128. /package/dist/{now-Dh_IQA36.js → now-nrrrOr01.js} +0 -0
@@ -257,7 +257,7 @@ export const TablePanel: React.FC<TablePanelProps> = ({
257
257
  saveTabChartType(tab.tabName, chartType);
258
258
  };
259
259
  return (
260
- <TabsContent key={idx} value={tab.tabName} className="h-[400px] mt-1">
260
+ <TabsContent key={idx} value={tab.tabName} className="h-[400px] mt-0">
261
261
  <ChartPanel
262
262
  tableData={data}
263
263
  chartConfig={tab.config}
@@ -475,7 +475,7 @@ export const ChartPanel: React.FC<{
475
475
  );
476
476
 
477
477
  return (
478
- <div className="flex flex-row gap-2 h-full rounded-md border pr-2">
478
+ <div className="flex flex-row gap-2 h-full rounded-md border-t pr-2">
479
479
  <div
480
480
  className={`relative flex flex-col gap-2 overflow-auto px-2 py-3 scrollbar-thin transition-width duration-200 ${formCollapsed ? "w-8" : "w-[300px]"}`}
481
481
  >
@@ -48,8 +48,9 @@ declare module "@tanstack/react-table" {
48
48
  //merge column formatting's state with the existing table state
49
49
  interface TableState extends ColumnFormattingTableState {}
50
50
  //merge column formatting's options with the existing table options
51
- interface TableOptionsResolved<TData extends RowData>
52
- extends ColumnFormattingOptions {}
51
+ interface TableOptionsResolved<
52
+ TData extends RowData,
53
+ > extends ColumnFormattingOptions {}
53
54
  //merge column formatting's instance APIs with the existing table instance APIs
54
55
  interface Column<TData extends RowData> extends ColumnFormattingInstance {}
55
56
  }
@@ -63,8 +63,10 @@ import { stringifyUnknownValue } from "./utils";
63
63
 
64
64
  const TOP_K_ROWS = 30;
65
65
 
66
- interface DataTableColumnHeaderProps<TData, TValue>
67
- extends React.HTMLAttributes<HTMLDivElement> {
66
+ interface DataTableColumnHeaderProps<
67
+ TData,
68
+ TValue,
69
+ > extends React.HTMLAttributes<HTMLDivElement> {
68
70
  column: Column<TData, TValue>;
69
71
  header: React.ReactNode;
70
72
  justify?: "left" | "center" | "right";
@@ -22,8 +22,9 @@ export interface ColumnWrappingInstance {
22
22
  declare module "@tanstack/react-table" {
23
23
  interface TableState extends ColumnWrappingTableState {}
24
24
 
25
- interface TableOptionsResolved<TData extends RowData>
26
- extends ColumnWrappingOptions {}
25
+ interface TableOptionsResolved<
26
+ TData extends RowData,
27
+ > extends ColumnWrappingOptions {}
27
28
 
28
29
  interface Column<TData extends RowData> extends ColumnWrappingInstance {}
29
30
  }
@@ -12,8 +12,9 @@ export interface CopyColumnInstance {
12
12
 
13
13
  // Use declaration merging to add our new feature APIs
14
14
  declare module "@tanstack/react-table" {
15
- interface TableOptionsResolved<TData extends RowData>
16
- extends CopyColumnOptions {}
15
+ interface TableOptionsResolved<
16
+ TData extends RowData,
17
+ > extends CopyColumnOptions {}
17
18
 
18
19
  interface Column<TData extends RowData> extends CopyColumnInstance {}
19
20
  }
@@ -25,8 +25,9 @@ export interface FocusRowInstance {
25
25
  declare module "@tanstack/react-table" {
26
26
  interface TableState extends FocusRowTableState {}
27
27
 
28
- interface TableOptionsResolved<TData extends RowData>
29
- extends FocusRowOptions {}
28
+ interface TableOptionsResolved<
29
+ TData extends RowData,
30
+ > extends FocusRowOptions {}
30
31
 
31
32
  interface Row<TData extends RowData> extends FocusRowInstance {}
32
33
  }
@@ -56,18 +56,18 @@ function createMockCell(
56
56
  }
57
57
 
58
58
  function createMockTable(): Table<T> {
59
- const mockToggleSelected = vi.fn().mockImplementation(function (this: {
60
- isSelected: boolean;
61
- }) {
62
- this.isSelected = !this.isSelected;
63
- return { isSelected: this.isSelected };
64
- });
59
+ const mockToggleSelected = vi
60
+ .fn()
61
+ .mockImplementation(function (this: { isSelected: boolean }) {
62
+ this.isSelected = !this.isSelected;
63
+ return { isSelected: this.isSelected };
64
+ });
65
65
 
66
- const mockGetIsSelected = vi.fn().mockImplementation(function (this: {
67
- isSelected: boolean;
68
- }) {
69
- return this.isSelected;
70
- });
66
+ const mockGetIsSelected = vi
67
+ .fn()
68
+ .mockImplementation(function (this: { isSelected: boolean }) {
69
+ return this.isSelected;
70
+ });
71
71
 
72
72
  const rows = [
73
73
  {
@@ -23,17 +23,15 @@ describe("isInteractiveTarget", () => {
23
23
  expect(isInteractiveTarget(createMouseEvent(span, cell))).toBe(false);
24
24
  });
25
25
 
26
- it.each([
27
- "input",
28
- "button",
29
- "select",
30
- "textarea",
31
- ])("returns true when clicking a <%s>", (tag) => {
32
- const cell = document.createElement("td");
33
- const el = document.createElement(tag);
34
- cell.append(el);
35
- expect(isInteractiveTarget(createMouseEvent(el, cell))).toBe(true);
36
- });
26
+ it.each(["input", "button", "select", "textarea"])(
27
+ "returns true when clicking a <%s>",
28
+ (tag) => {
29
+ const cell = document.createElement("td");
30
+ const el = document.createElement(tag);
31
+ cell.append(el);
32
+ expect(isInteractiveTarget(createMouseEvent(el, cell))).toBe(true);
33
+ },
34
+ );
37
35
 
38
36
  it("returns true when clicking an <a> link", () => {
39
37
  const cell = document.createElement("td");
@@ -33,108 +33,107 @@ beforeAll(() => {
33
33
  });
34
34
 
35
35
  describe("Cell data attributes", () => {
36
- it.each([
37
- "edit",
38
- "read",
39
- "present",
40
- ])("should render cell with data-cell-id and data-cell-name in %s mode", (mode) => {
41
- const { store, wrapper } = createTestWrapper();
42
- const cid = cellId("test");
43
- const cellName = "test_cell";
36
+ it.each(["edit", "read", "present"])(
37
+ "should render cell with data-cell-id and data-cell-name in %s mode",
38
+ (mode) => {
39
+ const { store, wrapper } = createTestWrapper();
40
+ const cid = cellId("test");
41
+ const cellName = "test_cell";
44
42
 
45
- const userConfig: UserConfig = {
46
- display: {
47
- cell_output: "below",
48
- code_editor_font_size: 14,
49
- dataframes: "rich",
50
- default_table_page_size: 10,
51
- default_table_max_columns: 10,
52
- default_width: "normal",
53
- theme: "light",
54
- reference_highlighting: false,
55
- },
56
- keymap: { preset: "default" },
57
- completion: {
58
- activate_on_typing: true,
59
- signature_hint_on_typing: false,
60
- copilot: false,
61
- },
62
- formatting: { line_length: 88 },
63
- package_management: { manager: "pip" },
64
- runtime: {
65
- auto_instantiate: false,
66
- default_sql_output: "native",
67
- auto_reload: "off",
68
- on_cell_change: "lazy",
69
- watcher_on_save: "lazy",
70
- reactive_tests: true,
71
- output_max_bytes: 1_000_000,
72
- std_stream_max_bytes: 1_000_000,
73
- pythonpath: [],
74
- dotenv: [".env"],
75
- },
76
- server: {
77
- browser: "default",
78
- follow_symlink: false,
79
- },
80
- save: { autosave: "off", autosave_delay: 1000, format_on_save: false },
81
- ai: {},
82
- } as UserConfig;
43
+ const userConfig: UserConfig = {
44
+ display: {
45
+ cell_output: "below",
46
+ code_editor_font_size: 14,
47
+ dataframes: "rich",
48
+ default_table_page_size: 10,
49
+ default_table_max_columns: 10,
50
+ default_width: "normal",
51
+ theme: "light",
52
+ reference_highlighting: false,
53
+ },
54
+ keymap: { preset: "default" },
55
+ completion: {
56
+ activate_on_typing: true,
57
+ signature_hint_on_typing: false,
58
+ copilot: false,
59
+ },
60
+ formatting: { line_length: 88 },
61
+ package_management: { manager: "pip" },
62
+ runtime: {
63
+ auto_instantiate: false,
64
+ default_sql_output: "native",
65
+ auto_reload: "off",
66
+ on_cell_change: "lazy",
67
+ watcher_on_save: "lazy",
68
+ reactive_tests: true,
69
+ output_max_bytes: 1_000_000,
70
+ std_stream_max_bytes: 1_000_000,
71
+ pythonpath: [],
72
+ dotenv: [".env"],
73
+ },
74
+ server: {
75
+ browser: "default",
76
+ follow_symlink: false,
77
+ },
78
+ save: { autosave: "off", autosave_delay: 1000, format_on_save: false },
79
+ ai: {},
80
+ } as UserConfig;
83
81
 
84
- const notebook = MockNotebook.notebookState({
85
- cellData: {
86
- [cid]: {
87
- code: "",
88
- name: cellName,
89
- edited: false,
90
- serializedEditorState: null,
91
- config: {
92
- disabled: false,
93
- hide_code: false,
94
- column: null,
82
+ const notebook = MockNotebook.notebookState({
83
+ cellData: {
84
+ [cid]: {
85
+ code: "",
86
+ name: cellName,
87
+ edited: false,
88
+ serializedEditorState: null,
89
+ config: {
90
+ disabled: false,
91
+ hide_code: false,
92
+ column: null,
93
+ },
95
94
  },
96
95
  },
97
- },
98
- });
96
+ });
99
97
 
100
- notebook.cellRuntime[cid] = createCellRuntimeState({
101
- status: "idle",
102
- output: null,
103
- consoleOutputs: [],
104
- interrupted: false,
105
- errored: false,
106
- stopped: false,
107
- staleInputs: false,
108
- runStartTimestamp: null,
109
- lastRunStartTimestamp: null,
110
- runElapsedTimeMs: null,
111
- debuggerActive: false,
112
- outline: null,
113
- });
98
+ notebook.cellRuntime[cid] = createCellRuntimeState({
99
+ status: "idle",
100
+ output: null,
101
+ consoleOutputs: [],
102
+ interrupted: false,
103
+ errored: false,
104
+ stopped: false,
105
+ staleInputs: false,
106
+ runStartTimestamp: null,
107
+ lastRunStartTimestamp: null,
108
+ runElapsedTimeMs: null,
109
+ debuggerActive: false,
110
+ outline: null,
111
+ });
114
112
 
115
- store.set(notebookAtom, notebook);
113
+ store.set(notebookAtom, notebook);
116
114
 
117
- const { container } = render(
118
- <TooltipProvider>
119
- <Cell
120
- cellId={cid}
121
- mode={mode as AppMode}
122
- canDelete={true}
123
- userConfig={userConfig}
124
- isCollapsed={false}
125
- collapseCount={0}
126
- canMoveX={false}
127
- theme="light"
128
- showPlaceholder={false}
129
- />
130
- </TooltipProvider>,
131
- { wrapper },
132
- );
115
+ const { container } = render(
116
+ <TooltipProvider>
117
+ <Cell
118
+ cellId={cid}
119
+ mode={mode as AppMode}
120
+ canDelete={true}
121
+ userConfig={userConfig}
122
+ isCollapsed={false}
123
+ collapseCount={0}
124
+ canMoveX={false}
125
+ theme="light"
126
+ showPlaceholder={false}
127
+ />
128
+ </TooltipProvider>,
129
+ { wrapper },
130
+ );
133
131
 
134
- const cellElement = container.querySelector(`[data-cell-id="${cid}"]`);
135
- expect(cellElement).toBeTruthy();
136
- expect(cellElement?.getAttribute("data-cell-name")).toBe(cellName);
137
- });
132
+ const cellElement = container.querySelector(`[data-cell-id="${cid}"]`);
133
+ expect(cellElement).toBeTruthy();
134
+ expect(cellElement?.getAttribute("data-cell-name")).toBe(cellName);
135
+ },
136
+ );
138
137
  });
139
138
 
140
139
  describe("Output data attributes", () => {
@@ -14,8 +14,10 @@ import { useOnMount } from "@/hooks/useLifecycle";
14
14
  import { cn } from "@/utils/cn";
15
15
  import { Events } from "@/utils/events";
16
16
 
17
- interface Props
18
- extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> {
17
+ interface Props extends Omit<
18
+ React.InputHTMLAttributes<HTMLInputElement>,
19
+ "onChange"
20
+ > {
19
21
  value: string;
20
22
  onChange: (newName: string) => void;
21
23
  placeholder?: string;
@@ -65,8 +65,10 @@ import { useSplitCellCallback } from "../cell/useSplitCell";
65
65
  import { NameCellInput } from "./name-cell-input";
66
66
  import type { ActionButton } from "./types";
67
67
 
68
- export interface CellActionButtonProps
69
- extends Pick<CellData, "name" | "config"> {
68
+ export interface CellActionButtonProps extends Pick<
69
+ CellData,
70
+ "name" | "config"
71
+ > {
70
72
  cellId: CellId;
71
73
  status: RuntimeState;
72
74
  hasOutput: boolean;
@@ -16,11 +16,10 @@ import "./cell-status.css";
16
16
  import { formatDistanceToNow } from "date-fns";
17
17
  import { Time } from "@/utils/time";
18
18
 
19
- export interface CellStatusComponentProps
20
- extends Pick<
21
- CellRuntimeState,
22
- "status" | "runStartTimestamp" | "interrupted" | "lastRunStartTimestamp"
23
- > {
19
+ export interface CellStatusComponentProps extends Pick<
20
+ CellRuntimeState,
21
+ "status" | "runStartTimestamp" | "interrupted" | "lastRunStartTimestamp"
22
+ > {
24
23
  editing: boolean;
25
24
  edited: boolean;
26
25
  disabled: boolean;
@@ -34,8 +34,10 @@ import {
34
34
  useCellActionButtons,
35
35
  } from "../actions/useCellActionButton";
36
36
 
37
- interface Props
38
- extends Pick<CellActionButtonProps, "cellId" | "getEditorView"> {
37
+ interface Props extends Pick<
38
+ CellActionButtonProps,
39
+ "cellId" | "getEditorView"
40
+ > {
39
41
  children: React.ReactNode;
40
42
  }
41
43
 
@@ -47,7 +47,8 @@ import { useSplitCellCallback } from "../useSplitCell";
47
47
  import { LanguageToggles } from "./language-toggle";
48
48
 
49
49
  export interface CellEditorProps
50
- extends Pick<CellRuntimeState, "status">,
50
+ extends
51
+ Pick<CellRuntimeState, "status">,
51
52
  Pick<CellData, "id" | "code" | "serializedEditorState" | "config"> {
52
53
  runCell: () => void;
53
54
  theme: Theme;
@@ -27,7 +27,8 @@ const toolbarItemVariants = cva(
27
27
  );
28
28
 
29
29
  interface ToolbarItemProps
30
- extends VariantProps<typeof toolbarItemVariants>,
30
+ extends
31
+ VariantProps<typeof toolbarItemVariants>,
31
32
  React.HTMLAttributes<HTMLButtonElement> {
32
33
  tooltip: React.ReactNode;
33
34
  disabled?: boolean;
@@ -311,18 +311,17 @@ const ActionButtons: React.FC<{
311
311
  );
312
312
  };
313
313
 
314
- interface VerticalCellProps
315
- extends Pick<
316
- CellRuntimeState,
317
- | "output"
318
- | "consoleOutputs"
319
- | "status"
320
- | "stopped"
321
- | "errored"
322
- | "interrupted"
323
- | "staleInputs"
324
- | "runStartTimestamp"
325
- > {
314
+ interface VerticalCellProps extends Pick<
315
+ CellRuntimeState,
316
+ | "output"
317
+ | "consoleOutputs"
318
+ | "status"
319
+ | "stopped"
320
+ | "errored"
321
+ | "interrupted"
322
+ | "staleInputs"
323
+ | "runStartTimestamp"
324
+ > {
326
325
  cellOutputArea: "above" | "below";
327
326
  cellId: CellId;
328
327
  config: CellConfig;
@@ -147,9 +147,8 @@ describe("download-file snippet", () => {
147
147
  });
148
148
 
149
149
  it("obstore gcs backend", () => {
150
- expect(
151
- downloadSnippet.getCode(makeCtx({ protocol: "gcs" })),
152
- ).toMatchInlineSnapshot(`
150
+ expect(downloadSnippet.getCode(makeCtx({ protocol: "gcs" })))
151
+ .toMatchInlineSnapshot(`
153
152
  "from datetime import timedelta
154
153
  from obstore import sign
155
154
 
@@ -162,9 +161,8 @@ describe("download-file snippet", () => {
162
161
  });
163
162
 
164
163
  it("obstore cloudflare backend", () => {
165
- expect(
166
- downloadSnippet.getCode(makeCtx({ protocol: "cloudflare" })),
167
- ).toMatchInlineSnapshot(`
164
+ expect(downloadSnippet.getCode(makeCtx({ protocol: "cloudflare" })))
165
+ .toMatchInlineSnapshot(`
168
166
  "from datetime import timedelta
169
167
  from obstore import sign
170
168
 
@@ -5,36 +5,36 @@ import { formatChartTime } from "./utils";
5
5
  describe("formatChartTime", () => {
6
6
  beforeAll(() => {
7
7
  // Mock Date to always use UTC
8
- vi.spyOn(global.Date.prototype, "getFullYear").mockImplementation(function (
9
- this: Date,
10
- ) {
11
- return this.getUTCFullYear();
12
- });
13
- vi.spyOn(global.Date.prototype, "getMonth").mockImplementation(function (
14
- this: Date,
15
- ) {
16
- return this.getUTCMonth();
17
- });
18
- vi.spyOn(global.Date.prototype, "getDate").mockImplementation(function (
19
- this: Date,
20
- ) {
21
- return this.getUTCDate();
22
- });
23
- vi.spyOn(global.Date.prototype, "getHours").mockImplementation(function (
24
- this: Date,
25
- ) {
26
- return this.getUTCHours();
27
- });
28
- vi.spyOn(global.Date.prototype, "getMinutes").mockImplementation(function (
29
- this: Date,
30
- ) {
31
- return this.getUTCMinutes();
32
- });
33
- vi.spyOn(global.Date.prototype, "getSeconds").mockImplementation(function (
34
- this: Date,
35
- ) {
36
- return this.getUTCSeconds();
37
- });
8
+ vi.spyOn(global.Date.prototype, "getFullYear").mockImplementation(
9
+ function (this: Date) {
10
+ return this.getUTCFullYear();
11
+ },
12
+ );
13
+ vi.spyOn(global.Date.prototype, "getMonth").mockImplementation(
14
+ function (this: Date) {
15
+ return this.getUTCMonth();
16
+ },
17
+ );
18
+ vi.spyOn(global.Date.prototype, "getDate").mockImplementation(
19
+ function (this: Date) {
20
+ return this.getUTCDate();
21
+ },
22
+ );
23
+ vi.spyOn(global.Date.prototype, "getHours").mockImplementation(
24
+ function (this: Date) {
25
+ return this.getUTCHours();
26
+ },
27
+ );
28
+ vi.spyOn(global.Date.prototype, "getMinutes").mockImplementation(
29
+ function (this: Date) {
30
+ return this.getUTCMinutes();
31
+ },
32
+ );
33
+ vi.spyOn(global.Date.prototype, "getSeconds").mockImplementation(
34
+ function (this: Date) {
35
+ return this.getUTCSeconds();
36
+ },
37
+ );
38
38
  vi.spyOn(global.Date.prototype, "getMilliseconds").mockImplementation(
39
39
  function (this: Date) {
40
40
  return this.getUTCMilliseconds();
@@ -29,7 +29,8 @@ const badgeVariants = cva(
29
29
  );
30
30
 
31
31
  export interface BadgeProps
32
- extends React.HTMLAttributes<HTMLDivElement>,
32
+ extends
33
+ React.HTMLAttributes<HTMLDivElement>,
33
34
  VariantProps<typeof badgeVariants> {}
34
35
 
35
36
  const Badge = ({ className, variant, ...props }: BadgeProps) => {
@@ -92,7 +92,8 @@ const buttonVariants = cva(
92
92
  );
93
93
 
94
94
  export interface ButtonProps
95
- extends React.ButtonHTMLAttributes<HTMLButtonElement>,
95
+ extends
96
+ React.ButtonHTMLAttributes<HTMLButtonElement>,
96
97
  Omit<VariantProps<typeof buttonVariants>, "disabled"> {
97
98
  asChild?: boolean;
98
99
  keyboardShortcut?: string;
@@ -183,8 +183,9 @@ const Calendar = <T extends AriaDateValue>({
183
183
  );
184
184
  };
185
185
 
186
- interface RangeCalendarProps<T extends AriaDateValue>
187
- extends AriaRangeCalendarProps<T> {
186
+ interface RangeCalendarProps<
187
+ T extends AriaDateValue,
188
+ > extends AriaRangeCalendarProps<T> {
188
189
  errorMessage?: string;
189
190
  }
190
191
 
@@ -230,7 +230,8 @@ interface ComboboxItemOptions<TValue> {
230
230
  }
231
231
 
232
232
  export interface ComboboxItemProps<TValue>
233
- extends ComboboxItemOptions<TValue>,
233
+ extends
234
+ ComboboxItemOptions<TValue>,
234
235
  Omit<
235
236
  React.ComponentProps<typeof CommandItem>,
236
237
  keyof ComboboxItemOptions<TValue> | "onSelect" | "role"
@@ -41,8 +41,7 @@ const DateSegment = ({ className, ...props }: AriaDateSegmentProps) => {
41
41
  };
42
42
 
43
43
  interface DateInputProps
44
- extends AriaDateInputProps,
45
- VariantProps<typeof fieldGroupVariants> {}
44
+ extends AriaDateInputProps, VariantProps<typeof fieldGroupVariants> {}
46
45
 
47
46
  const DateInput = ({
48
47
  className,
@@ -61,8 +60,9 @@ const DateInput = ({
61
60
  );
62
61
  };
63
62
 
64
- interface DateFieldProps<T extends AriaDateValue>
65
- extends AriaDateFieldProps<T> {
63
+ interface DateFieldProps<
64
+ T extends AriaDateValue,
65
+ > extends AriaDateFieldProps<T> {
66
66
  label?: string;
67
67
  description?: string;
68
68
  errorMessage?: string | ((validation: AriaValidationResult) => string);
@@ -94,8 +94,9 @@ const DateField = <T extends AriaDateValue>({
94
94
  );
95
95
  };
96
96
 
97
- interface TimeFieldProps<T extends AriaTimeValue>
98
- extends AriaTimeFieldProps<T> {
97
+ interface TimeFieldProps<
98
+ T extends AriaTimeValue,
99
+ > extends AriaTimeFieldProps<T> {
99
100
  label?: string;
100
101
  description?: string;
101
102
  errorMessage?: string | ((validation: AriaValidationResult) => string);