@marimo-team/islands 0.23.5-dev6 → 0.23.5-dev7
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.
- package/dist/{code-visibility-C0bQaEHr.js → code-visibility-B8JChlY3.js} +1 -1
- package/dist/main.js +2 -2
- package/dist/{reveal-component-B2cdMcuv.js → reveal-component-DVr24sXs.js} +1 -1
- package/package.json +1 -1
- package/src/components/editor/file-tree/file-explorer.tsx +38 -8
- package/src/components/editor/file-tree/file-operations.tsx +19 -2
|
@@ -25384,7 +25384,7 @@ ${_}`,
|
|
|
25384
25384
|
return Logger.warn("Failed to get version from mount config"), null;
|
|
25385
25385
|
}
|
|
25386
25386
|
}
|
|
25387
|
-
marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.5-
|
|
25387
|
+
marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.5-dev7");
|
|
25388
25388
|
showCodeInRunModeAtom = atom(true);
|
|
25389
25389
|
atom(null);
|
|
25390
25390
|
var import_compiler_runtime = require_compiler_runtime();
|
package/dist/main.js
CHANGED
|
@@ -26,7 +26,7 @@ import { $ as useCellActions, At as DeferredRequestRegistry, B as safeExtractSet
|
|
|
26
26
|
import { __tla as __tla_1 } from "./chunk-5FQGJX7Z-CO1e63h_.js";
|
|
27
27
|
import { o as useSize, s as Root$3, u as createLucideIcon } from "./dist-ESg7xyoD.js";
|
|
28
28
|
import { A as SquareFunction, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE_DESCRIPTIONS, E as EMPTY_VALUE$1, O as TIME_UNIT_DESCRIPTIONS, S as DEFAULT_AGGREGATION, T as DEFAULT_TIME_UNIT, _ as AGGREGATION_TYPE_DESCRIPTIONS, a as AGGREGATION_FNS$1, b as COLOR_SCHEMES, c as COLOR_BY_FIELDS, d as NONE_VALUE, f as SELECTABLE_DATA_TYPES, g as TIME_UNITS, h as STRING_AGGREGATION_FNS, i as convertDataTypeToSelectable, j as ChartColumn, k as escapeFieldName, l as COMBINED_TIME_UNITS, m as SORT_TYPES, n as createSpecWithoutData, o as BIN_AGGREGATION, p as SINGLE_TIME_UNITS, r as isFieldSet, s as CHART_TYPES, t as augmentSpecWithData, u as ChartType, v as AGGREGATION_TYPE_ICON, w as DEFAULT_MAX_BINS_FACET, x as COUNT_FIELD, y as CHART_TYPE_ICON } from "./spec-BKWq0wn2.js";
|
|
29
|
-
import { $ as getPageIndexForRow, A as contextAwarePanelType, At as GripHorizontal, B as TableHead, Bt as ChevronsDownUp, C as useInternalStateWithSync, Ct as RenderTextWithLinks, D as PANEL_TYPES, Dt as getStaticVirtualFiles, E as ContextAwarePanelItem, Et as EmotionCacheProvider, F as Fill, Ft as Download, G as inferFieldTypes, H as TableRow, Ht as ArrowDownWideNarrow, I as Provider$1, It as Code, J as ColumnChartSpecModel, K as renderCellValue, L as Table, Lt as ChevronsUpDown, M as SlotNames, Mt as EyeOff, N as slotsController, O as contextAwarePanelOpen, Ot as isStaticNotebook, P as Toggle, Pt as Ellipsis, Q as filtersToFilterGroup, R as TableBody, Rt as ChevronsRight, S as prettifyRowCount, St as useOverflowDetection, T as ComboboxItem, Tt as HtmlOutput, U as NAMELESS_COLUMN_PREFIX, V as TableHeader, Vt as ChevronLeft, W as generateColumns, X as useIntersectionObserver, Y as DelayMount, Z as usePrevious$1, _ as downloadBlob, _t as TabsTrigger, at as toFieldTypes, b as Filenames, bt as ChartLoadingState, c as Slide, ct as CommandEmpty, d as JsonOutput, dt as CommandList, et as loadTableAndRawData, f as OutputArea, ft as CommandSeparator, g as ADD_PRINTING_CLASS, gt as TabsList, h as InstallPackageButton, ht as TabsContent, it as TOO_MANY_ROWS, j as isCellAwareAtom, jt as Funnel, k as contextAwarePanelOwner, kt as TextWrap, l as RadioGroup, lt as CommandInput, m as DataTable, mt as Tabs, n as marimoVersionAtom, nt as INDEX_COLUMN_NAME, o as SLIDE_TYPE_OPTIONS_BY_VALUE, ot as getMimeValues, p as OutputRenderer, pt as Maps, q as ColumnChartContext, r as showCodeInRunModeAtom, rt as SELECT_COLUMN_ID, st as Command, t as useNotebookCodeAvailable, tt as loadTableData, u as RadioGroupItem, ut as CommandItem, v as downloadByURL, vt as ChartErrorState, w as Combobox, wt as Kbd, x as prettifyRowColumnCount, xt as LazyVegaEmbed, y as downloadHTMLAsImage, yt as ChartInfoState, z as TableCell, zt as ChevronsLeft, __tla as __tla_2 } from "./code-visibility-
|
|
29
|
+
import { $ as getPageIndexForRow, A as contextAwarePanelType, At as GripHorizontal, B as TableHead, Bt as ChevronsDownUp, C as useInternalStateWithSync, Ct as RenderTextWithLinks, D as PANEL_TYPES, Dt as getStaticVirtualFiles, E as ContextAwarePanelItem, Et as EmotionCacheProvider, F as Fill, Ft as Download, G as inferFieldTypes, H as TableRow, Ht as ArrowDownWideNarrow, I as Provider$1, It as Code, J as ColumnChartSpecModel, K as renderCellValue, L as Table, Lt as ChevronsUpDown, M as SlotNames, Mt as EyeOff, N as slotsController, O as contextAwarePanelOpen, Ot as isStaticNotebook, P as Toggle, Pt as Ellipsis, Q as filtersToFilterGroup, R as TableBody, Rt as ChevronsRight, S as prettifyRowCount, St as useOverflowDetection, T as ComboboxItem, Tt as HtmlOutput, U as NAMELESS_COLUMN_PREFIX, V as TableHeader, Vt as ChevronLeft, W as generateColumns, X as useIntersectionObserver, Y as DelayMount, Z as usePrevious$1, _ as downloadBlob, _t as TabsTrigger, at as toFieldTypes, b as Filenames, bt as ChartLoadingState, c as Slide, ct as CommandEmpty, d as JsonOutput, dt as CommandList, et as loadTableAndRawData, f as OutputArea, ft as CommandSeparator, g as ADD_PRINTING_CLASS, gt as TabsList, h as InstallPackageButton, ht as TabsContent, it as TOO_MANY_ROWS, j as isCellAwareAtom, jt as Funnel, k as contextAwarePanelOwner, kt as TextWrap, l as RadioGroup, lt as CommandInput, m as DataTable, mt as Tabs, n as marimoVersionAtom, nt as INDEX_COLUMN_NAME, o as SLIDE_TYPE_OPTIONS_BY_VALUE, ot as getMimeValues, p as OutputRenderer, pt as Maps, q as ColumnChartContext, r as showCodeInRunModeAtom, rt as SELECT_COLUMN_ID, st as Command, t as useNotebookCodeAvailable, tt as loadTableData, u as RadioGroupItem, ut as CommandItem, v as downloadByURL, vt as ChartErrorState, w as Combobox, wt as Kbd, x as prettifyRowColumnCount, xt as LazyVegaEmbed, y as downloadHTMLAsImage, yt as ChartInfoState, z as TableCell, zt as ChevronsLeft, __tla as __tla_2 } from "./code-visibility-B8JChlY3.js";
|
|
30
30
|
import { c as Calendar, i as createReducerAndAtoms, n as useOnUnmount, o as ToggleLeft, t as useOnMount } from "./useLifecycle-smVfjLNI.js";
|
|
31
31
|
import { n as $fb18d541ea1ad717$export$ad991b66133851cf, r as $5a387cc49350e6db$export$722debc0e56fea39, t as $896ba0a80a8f4d36$export$85fd5fdf27bacc79 } from "./useDateFormatter-B3mCQMP3.js";
|
|
32
32
|
import { t as Check } from "./check-CFM2mVDr.js";
|
|
@@ -44649,7 +44649,7 @@ ${c}
|
|
|
44649
44649
|
if (l && l !== "slide") return l;
|
|
44650
44650
|
if (c == null ? void 0 : c.has(e)) return "skip";
|
|
44651
44651
|
}
|
|
44652
|
-
var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-
|
|
44652
|
+
var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-DVr24sXs.js"));
|
|
44653
44653
|
const SlidesLayoutPlugin = {
|
|
44654
44654
|
type: "slides",
|
|
44655
44655
|
name: "Slides",
|
|
@@ -8,7 +8,7 @@ import { t as require_react } from "./react-DA-nE2FX.js";
|
|
|
8
8
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
9
9
|
import "./html-to-image-CzFE0Irw.js";
|
|
10
10
|
import "./chunk-5FQGJX7Z-CO1e63h_.js";
|
|
11
|
-
import { It as Code, Mt as EyeOff, Nt as Expand, a as DEFAULT_SLIDE_TYPE, c as Slide, i as DEFAULT_DECK_TRANSITION, s as SlideSidebar, t as useNotebookCodeAvailable } from "./code-visibility-
|
|
11
|
+
import { It as Code, Mt as EyeOff, Nt as Expand, a as DEFAULT_SLIDE_TYPE, c as Slide, i as DEFAULT_DECK_TRANSITION, s as SlideSidebar, t as useNotebookCodeAvailable } from "./code-visibility-B8JChlY3.js";
|
|
12
12
|
import "./input-Drx1pguW.js";
|
|
13
13
|
import "./toDate-yqOcZ_tY.js";
|
|
14
14
|
import "./react-dom-BWRJ_g_k.js";
|
package/package.json
CHANGED
|
@@ -523,7 +523,10 @@ const Node = ({ node, style, dragHandle }: NodeRendererProps<FileInfo>) => {
|
|
|
523
523
|
iconClassName="w-5 h-5"
|
|
524
524
|
>
|
|
525
525
|
{!node.data.isDirectory && (
|
|
526
|
-
<DropdownMenuItem
|
|
526
|
+
<DropdownMenuItem
|
|
527
|
+
onSelect={() => node.select()}
|
|
528
|
+
data-testid="file-explorer-open-file-menu-item"
|
|
529
|
+
>
|
|
527
530
|
<ViewIcon className={MENU_ITEM_ICON_CLASS} />
|
|
528
531
|
Open file
|
|
529
532
|
</DropdownMenuItem>
|
|
@@ -533,6 +536,7 @@ const Node = ({ node, style, dragHandle }: NodeRendererProps<FileInfo>) => {
|
|
|
533
536
|
onSelect={() => {
|
|
534
537
|
openFile({ path: node.data.path });
|
|
535
538
|
}}
|
|
539
|
+
data-testid="file-explorer-open-external-menu-item"
|
|
536
540
|
>
|
|
537
541
|
<ExternalLinkIcon className={MENU_ITEM_ICON_CLASS} />
|
|
538
542
|
Open file in external editor
|
|
@@ -540,28 +544,44 @@ const Node = ({ node, style, dragHandle }: NodeRendererProps<FileInfo>) => {
|
|
|
540
544
|
)}
|
|
541
545
|
{node.data.isDirectory && (
|
|
542
546
|
<>
|
|
543
|
-
<DropdownMenuItem
|
|
547
|
+
<DropdownMenuItem
|
|
548
|
+
onSelect={() => handleCreateNotebook()}
|
|
549
|
+
data-testid="file-explorer-create-notebook-menu-item"
|
|
550
|
+
>
|
|
544
551
|
<MarimoPlusIcon className={MENU_ITEM_ICON_CLASS} />
|
|
545
552
|
Create notebook
|
|
546
553
|
</DropdownMenuItem>
|
|
547
|
-
<DropdownMenuItem
|
|
554
|
+
<DropdownMenuItem
|
|
555
|
+
onSelect={() => handleCreateFile()}
|
|
556
|
+
data-testid="file-explorer-create-file-menu-item"
|
|
557
|
+
>
|
|
548
558
|
<FilePlus2Icon className={MENU_ITEM_ICON_CLASS} />
|
|
549
559
|
Create file
|
|
550
560
|
</DropdownMenuItem>
|
|
551
|
-
<DropdownMenuItem
|
|
561
|
+
<DropdownMenuItem
|
|
562
|
+
onSelect={() => handleCreateFolder()}
|
|
563
|
+
data-testid="file-explorer-create-folder-menu-item"
|
|
564
|
+
>
|
|
552
565
|
<FolderPlusIcon className={MENU_ITEM_ICON_CLASS} />
|
|
553
566
|
Create folder
|
|
554
567
|
</DropdownMenuItem>
|
|
555
568
|
<DropdownMenuSeparator />
|
|
556
569
|
</>
|
|
557
570
|
)}
|
|
558
|
-
<RenameMenuItem
|
|
559
|
-
|
|
571
|
+
<RenameMenuItem
|
|
572
|
+
onSelect={() => node.edit()}
|
|
573
|
+
testId="file-explorer-rename-menu-item"
|
|
574
|
+
/>
|
|
575
|
+
<DuplicateMenuItem
|
|
576
|
+
onSelect={handleDuplicate}
|
|
577
|
+
testId="file-explorer-duplicate-menu-item"
|
|
578
|
+
/>
|
|
560
579
|
<DropdownMenuItem
|
|
561
580
|
onSelect={async () => {
|
|
562
581
|
await copyToClipboard(node.data.path);
|
|
563
582
|
toast({ title: "Copied to clipboard" });
|
|
564
583
|
}}
|
|
584
|
+
data-testid="file-explorer-copy-path-menu-item"
|
|
565
585
|
>
|
|
566
586
|
<ListTreeIcon className={MENU_ITEM_ICON_CLASS} />
|
|
567
587
|
Copy path
|
|
@@ -574,6 +594,7 @@ const Node = ({ node, style, dragHandle }: NodeRendererProps<FileInfo>) => {
|
|
|
574
594
|
);
|
|
575
595
|
toast({ title: "Copied to clipboard" });
|
|
576
596
|
}}
|
|
597
|
+
data-testid="file-explorer-copy-relative-path-menu-item"
|
|
577
598
|
>
|
|
578
599
|
<ListTreeIcon className={MENU_ITEM_ICON_CLASS} />
|
|
579
600
|
Copy relative path
|
|
@@ -586,6 +607,7 @@ const Node = ({ node, style, dragHandle }: NodeRendererProps<FileInfo>) => {
|
|
|
586
607
|
const pythonCode = PYTHON_CODE_FOR_FILE_TYPE[fileType](path);
|
|
587
608
|
handleInsertCode(pythonCode);
|
|
588
609
|
}}
|
|
610
|
+
data-testid="file-explorer-insert-snippet-menu-item"
|
|
589
611
|
>
|
|
590
612
|
<BetweenHorizontalStartIcon className={MENU_ITEM_ICON_CLASS} />
|
|
591
613
|
Insert snippet for reading file
|
|
@@ -601,6 +623,7 @@ const Node = ({ node, style, dragHandle }: NodeRendererProps<FileInfo>) => {
|
|
|
601
623
|
const pythonCode = PYTHON_CODE_FOR_FILE_TYPE[fileType](path);
|
|
602
624
|
await copyToClipboard(pythonCode);
|
|
603
625
|
}}
|
|
626
|
+
data-testid="file-explorer-copy-snippet-menu-item"
|
|
604
627
|
>
|
|
605
628
|
<BracesIcon className={MENU_ITEM_ICON_CLASS} />
|
|
606
629
|
Copy snippet for reading file
|
|
@@ -608,7 +631,10 @@ const Node = ({ node, style, dragHandle }: NodeRendererProps<FileInfo>) => {
|
|
|
608
631
|
{node.data.isMarimoFile && !isWasm() && (
|
|
609
632
|
<>
|
|
610
633
|
<DropdownMenuSeparator />
|
|
611
|
-
<DropdownMenuItem
|
|
634
|
+
<DropdownMenuItem
|
|
635
|
+
onSelect={handleOpenMarimoFile}
|
|
636
|
+
data-testid="file-explorer-open-notebook-menu-item"
|
|
637
|
+
>
|
|
612
638
|
<PlaySquareIcon className={MENU_ITEM_ICON_CLASS} />
|
|
613
639
|
Open notebook
|
|
614
640
|
</DropdownMenuItem>
|
|
@@ -637,6 +663,7 @@ const Node = ({ node, style, dragHandle }: NodeRendererProps<FileInfo>) => {
|
|
|
637
663
|
);
|
|
638
664
|
}
|
|
639
665
|
}}
|
|
666
|
+
data-testid="file-explorer-download-menu-item"
|
|
640
667
|
>
|
|
641
668
|
<DownloadIcon className={MENU_ITEM_ICON_CLASS} />
|
|
642
669
|
Download
|
|
@@ -644,7 +671,10 @@ const Node = ({ node, style, dragHandle }: NodeRendererProps<FileInfo>) => {
|
|
|
644
671
|
<DropdownMenuSeparator />
|
|
645
672
|
</>
|
|
646
673
|
)}
|
|
647
|
-
<DeleteMenuItem
|
|
674
|
+
<DeleteMenuItem
|
|
675
|
+
onSelect={handleDeleteFile}
|
|
676
|
+
testId="file-explorer-delete-menu-item"
|
|
677
|
+
/>
|
|
648
678
|
</FileActionsDropdown>
|
|
649
679
|
</span>
|
|
650
680
|
</div>
|
|
@@ -219,12 +219,19 @@ export const RenameMenuItem = ({
|
|
|
219
219
|
onSelect,
|
|
220
220
|
disabled,
|
|
221
221
|
title,
|
|
222
|
+
testId,
|
|
222
223
|
}: {
|
|
223
224
|
onSelect: (evt: Event) => void;
|
|
224
225
|
disabled?: boolean;
|
|
225
226
|
title?: string;
|
|
227
|
+
testId?: string;
|
|
226
228
|
}) => (
|
|
227
|
-
<DropdownMenuItem
|
|
229
|
+
<DropdownMenuItem
|
|
230
|
+
onSelect={onSelect}
|
|
231
|
+
disabled={disabled}
|
|
232
|
+
title={title}
|
|
233
|
+
data-testid={testId}
|
|
234
|
+
>
|
|
228
235
|
<Edit3Icon className={MENU_ITEM_ICON_CLASS} />
|
|
229
236
|
Rename
|
|
230
237
|
</DropdownMenuItem>
|
|
@@ -234,12 +241,19 @@ export const DuplicateMenuItem = ({
|
|
|
234
241
|
onSelect,
|
|
235
242
|
disabled,
|
|
236
243
|
title,
|
|
244
|
+
testId,
|
|
237
245
|
}: {
|
|
238
246
|
onSelect: (evt: Event) => void;
|
|
239
247
|
disabled?: boolean;
|
|
240
248
|
title?: string;
|
|
249
|
+
testId?: string;
|
|
241
250
|
}) => (
|
|
242
|
-
<DropdownMenuItem
|
|
251
|
+
<DropdownMenuItem
|
|
252
|
+
onSelect={onSelect}
|
|
253
|
+
disabled={disabled}
|
|
254
|
+
title={title}
|
|
255
|
+
data-testid={testId}
|
|
256
|
+
>
|
|
243
257
|
<CopyIcon className={MENU_ITEM_ICON_CLASS} />
|
|
244
258
|
Duplicate
|
|
245
259
|
</DropdownMenuItem>
|
|
@@ -249,16 +263,19 @@ export const DeleteMenuItem = ({
|
|
|
249
263
|
onSelect,
|
|
250
264
|
disabled,
|
|
251
265
|
title,
|
|
266
|
+
testId,
|
|
252
267
|
}: {
|
|
253
268
|
onSelect: (evt: Event) => void;
|
|
254
269
|
disabled?: boolean;
|
|
255
270
|
title?: string;
|
|
271
|
+
testId?: string;
|
|
256
272
|
}) => (
|
|
257
273
|
<DropdownMenuItem
|
|
258
274
|
onSelect={onSelect}
|
|
259
275
|
variant="danger"
|
|
260
276
|
disabled={disabled}
|
|
261
277
|
title={title}
|
|
278
|
+
data-testid={testId}
|
|
262
279
|
>
|
|
263
280
|
<Trash2Icon className={MENU_ITEM_ICON_CLASS} />
|
|
264
281
|
Delete
|