@marimo-team/islands 0.24.1-dev24 → 0.24.1-dev26

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 (29) hide show
  1. package/dist/arrays-Ct6XviUd.js +59 -0
  2. package/dist/{capabilities-BilXeZ7p.js → capabilities-DNKeBoT5.js} +1 -1
  3. package/dist/{chat-ui-dZ0mdOG3.js → chat-ui-ChbH2I73.js} +3 -3
  4. package/dist/{common-BYsoK_Kj.js → common-FTSHoSr-.js} +6 -6
  5. package/dist/{glide-data-editor-BcvvJTCH.js → glide-data-editor-aimC_hok.js} +1 -1
  6. package/dist/{html-to-image-p-mxZ3_V.js → html-to-image-BzT-fb14.js} +2323 -2313
  7. package/dist/{input-BRE2a7Ay.js → input-CqV2ZPgL.js} +1 -1
  8. package/dist/main.js +11 -11
  9. package/dist/{once-Boutk_9X.js → once-D1_qYl2e.js} +1 -1
  10. package/dist/{process-output-Bh4xztNq.js → process-output-C8Q8G6-g.js} +1 -1
  11. package/dist/{reveal-component-B60AtfO2.js → reveal-component-DaBkVTwb.js} +3 -3
  12. package/dist/{swiper-component-Cx0cRWLk.js → swiper-component-UYicacis.js} +1 -1
  13. package/dist/{useIframeCapabilities-CxuXXwjj.js → useIframeCapabilities-BbnoLKxG.js} +1 -1
  14. package/dist/{vega-component-CTiCS_5w.js → vega-component-xrHju6oo.js} +1 -1
  15. package/package.json +1 -1
  16. package/src/components/datasources/datasources.tsx +2 -40
  17. package/src/components/editor/chrome/panels/components.tsx +35 -0
  18. package/src/components/editor/chrome/panels/file-explorer-panel.tsx +10 -0
  19. package/src/components/editor/chrome/panels/session-panel.tsx +12 -4
  20. package/src/components/editor/connections/__tests__/quick-add-data-sources.test.tsx +2 -0
  21. package/src/components/editor/connections/add-connection-dialog.tsx +5 -1
  22. package/src/components/editor/connections/quick-add-data-sources.tsx +11 -7
  23. package/src/core/datasets/__tests__/data-source-discovery.test.ts +277 -0
  24. package/src/core/datasets/data-source-connections.ts +36 -0
  25. package/src/core/datasets/data-source-discovery.ts +92 -0
  26. package/src/core/websocket/useMarimoKernelConnection.tsx +11 -3
  27. package/src/hooks/useDataSourceDiscovery.ts +50 -9
  28. package/dist/arrays-C56grfjL.js +0 -55
  29. package/src/hooks/__tests__/useDataSourceDiscovery.test.ts +0 -80
@@ -15,7 +15,7 @@ import { t as require_jsx_runtime } from "./jsx-runtime-Dp_oQwaf.js";
15
15
  import { $ as StyleNamespace, J as MAX_HEIGHT_OFFSET, X as withFullScreenAsRoot, Z as withSmartCollisionBoundary, _t as Primitive, at as FocusScope, dt as Presence, et as hideOthers, ft as useControllableState, gt as createContextScope, it as Portal, lt as useCallbackRef, mt as composeEventHandlers, rt as useFocusGuards, st as DismissableLayer, tt as Combination_default, ut as useId, vt as dispatchDiscreteCustomEvent } from "./zod-BFY2SnzC.js";
16
16
  import { t as debounce_default } from "./debounce-D784bpms.js";
17
17
  import { A as useEvent_default } from "./useTheme-BzEXeAR5.js";
18
- import { t as memoizeLastValue } from "./once-Boutk_9X.js";
18
+ import { t as memoizeLastValue } from "./once-D1_qYl2e.js";
19
19
  var ChevronRight = createLucideIcon("chevron-right", [["path", {
20
20
  d: "m9 18 6-6-6-6",
21
21
  key: "mthhwq"
package/dist/main.js CHANGED
@@ -22,17 +22,17 @@ import { _ as Functions, c as useEventListener, f as composeRefs, g as Logger, h
22
22
  import { t as require_react } from "./react-DhGsCS90.js";
23
23
  import { t as require_compiler_runtime } from "./compiler-runtime-DsR6imPN.js";
24
24
  import { n as Copy, r as toast, t as copyToClipboard } from "./copy-C7ZKMKox.js";
25
- import { $ as notebookOutline, $t as isUninstantiated, A as ChevronDownIcon, An as Item$1, At as DeferredRequestRegistry, Bn as Layers, C as Accordion, Ct as MarkdownLanguageAdapter, D as BorderAllIcon, E as AccordionTrigger, En as selectAtom, Et as Paths, Fn as Table2, G as hasRunAnyCellAtom, Gn as Database, Gt as require_client, H as renderHTML, Hn as FileText, Ht as DATA_TYPE_ICON, I as base64ToDataView, In as PaintRoller, Jn as CircleAlert, K as cellIdsAtom, Kn as Columns2, Lt as repl, Mn as Trigger2, Pn as Trash2, Pt as jotaiJsonStorage, Q as notebookAtom, Qt as useRequestClient, R as dataViewToBase64, Rt as SQLParser, Sn as jsonParseWithSpecialChar, St as isRecord, T as AccordionItem, Tn as atomWithStorage, Tt as PathBuilder, U as getMarimoExportContext, Un as Eye, V as safeExtractSetUIElementMessageBuffers, Vn as Info, Vt as PluralWords, W as hasTrustedExportContext, X as hasOnlyOneCellAtom, Xt as getRequestClient, Y as getCellNames, Yn as Braces, Yt as convertStatsName, Z as initialNotebookState, Zt as requestClientAtom, _t as isInternalCellName, a as useCellFocusActions, at as createCell, bn as OBJECT_ID_ATTR, bt as customPythonLanguageSupport, dt as headingToIdentifier, en as publishedCellClasses, et as numColumnsAtom, f as isOutputEmpty, fn as parseAttrValue, gn as HTMLCellId, gt as getValidName, i as LazyAnyLanguageCodeMirror, jn as Root2$1, jt as generateUUID, kn as Content2, ln as NotebookScopedLocalStorage, lt as outputIsLoading, mn as parseInitialValue, n as Spinner, nt as useCellActions, o as useLastFocusedCellId, p as useExpandedConsoleOutput, pn as parseDataset, q as createActions, rt as useCellIds, s as maybeAddAltairImport, tn as shouldHidePublishedCell, tt as reducer, ut as outputIsStale, vn as UIElementId, vt as normalizeName, w as AccordionContent, wn as atomWithReducer, xn as RANDOM_ID_ATTR, xt as hasFunctionProperty, yn as findCellId, yt as Checkbox, zn as LoaderCircle, zt as MarkdownParser, __tla as __tla_0 } from "./html-to-image-p-mxZ3_V.js";
25
+ import { $ as notebookOutline, $t as isUninstantiated, A as ChevronDownIcon, An as Item$1, At as DeferredRequestRegistry, Bn as Layers, C as Accordion, Ct as MarkdownLanguageAdapter, D as BorderAllIcon, E as AccordionTrigger, En as selectAtom, Et as Paths, Fn as Table2, G as hasRunAnyCellAtom, Gn as Database, Gt as require_client, H as renderHTML, Hn as FileText, Ht as DATA_TYPE_ICON, I as base64ToDataView, In as PaintRoller, Jn as CircleAlert, K as cellIdsAtom, Kn as Columns2, Lt as repl, Mn as Trigger2, Pn as Trash2, Pt as jotaiJsonStorage, Q as notebookAtom, Qt as useRequestClient, R as dataViewToBase64, Rt as SQLParser, Sn as jsonParseWithSpecialChar, St as isRecord, T as AccordionItem, Tn as atomWithStorage, Tt as PathBuilder, U as getMarimoExportContext, Un as Eye, V as safeExtractSetUIElementMessageBuffers, Vn as Info, Vt as PluralWords, W as hasTrustedExportContext, X as hasOnlyOneCellAtom, Xt as getRequestClient, Y as getCellNames, Yn as Braces, Yt as convertStatsName, Z as initialNotebookState, Zt as requestClientAtom, _t as isInternalCellName, a as useCellFocusActions, at as createCell, bn as OBJECT_ID_ATTR, bt as customPythonLanguageSupport, dt as headingToIdentifier, en as publishedCellClasses, et as numColumnsAtom, f as isOutputEmpty, fn as parseAttrValue, gn as HTMLCellId, gt as getValidName, i as LazyAnyLanguageCodeMirror, jn as Root2$1, jt as generateUUID, kn as Content2, ln as NotebookScopedLocalStorage, lt as outputIsLoading, mn as parseInitialValue, n as Spinner, nt as useCellActions, o as useLastFocusedCellId, p as useExpandedConsoleOutput, pn as parseDataset, q as createActions, rt as useCellIds, s as maybeAddAltairImport, tn as shouldHidePublishedCell, tt as reducer, ut as outputIsStale, vn as UIElementId, vt as normalizeName, w as AccordionContent, wn as atomWithReducer, xn as RANDOM_ID_ATTR, xt as hasFunctionProperty, yn as findCellId, yt as Checkbox, zn as LoaderCircle, zt as MarkdownParser, __tla as __tla_0 } from "./html-to-image-BzT-fb14.js";
26
26
  import { __tla as __tla_1 } from "./chunk-5FQGJX7Z-BRZ_XYUw.js";
27
27
  import { o as useSize, s as Root$1, u as createLucideIcon } from "./dist-j30bBjjN.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, 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-DR1CyTOo.js";
29
- import { $ as CommandSeparator, $t as Kbd, A as ErrorState, At as getPageIndexForRow, B as ContextMenuTrigger, Bt as dateToLocalISODate, C as downloadHTMLAsImage, Ct as inferFieldTypes, D as ColumnName, Dt as DelayMount, E as downloadSizeLimitAtom, Et as ColumnChartSpecModel, F as getUserColumnVisibilityCounts, Ft as TOO_MANY_ROWS, G as DateRangePicker, Gt as TabsList, H as useSelectList, Ht as dateToLocalISOTime, I as ContextMenu, It as toFieldTypes, J as Command, Jt as ChartInfoState, K as Combobox, Kt as TabsTrigger, L as ContextMenuContent, Lt as getMimeValues, M as prettifyRowColumnCount, Mt as loadTableData, N as prettifyRowCount, Nt as INDEX_COLUMN_NAME, O as ColumnPreviewContainer, Ot as useIntersectionObserver, P as getColumnCountForDisplay, Pt as SELECT_COLUMN_ID, Q as CommandList, Qt as RenderTextWithLinks, R as ContextMenuItem, Rt as isNullishFilter, S as downloadExportedFile, St as generateColumns, T as Filenames, Tt as ColumnChartContext, U as CompactChipRow, Ut as Tabs, V as useInternalStateWithSync, Vt as dateToLocalISODateTime, W as DatePicker, Wt as TabsContent, X as CommandInput, Xt as LazyVegaEmbed, Y as CommandEmpty, Yt as ChartLoadingState, Z as CommandItem, Zt as useOverflowDetection, _ as DataTable, _n as ChevronLeft, _t as TableCell, an as TextWrap, at as contextAwarePanelType, b as downloadBlob, bt as TableRow, c as SLIDE_TYPE_OPTIONS_BY_VALUE, cn as EyeOff, ct as slotsController, d as Switch, dn as Download, en as HtmlOutput, et as smartMatch, f as RadioGroup, fn as Code, g as OutputRenderer, gn as ChevronsDownUp, gt as TableBody, h as OutputArea, hn as ChevronsLeft, ht as Table, i as showCodeInRunModeAtom, in as $fae977aafc393c5c$export$6b862160d295c8e, it as contextAwarePanelOwner, j as LoadingState, jt as loadTableAndRawData, k as EmptyState, kt as usePrevious$1, lt as Toggle, m as JsonOutput, mn as ChevronsRight, mt as Provider$1, n as useNotebookCodeAvailable, nn as safeLocale, nt as PANEL_TYPES, on as GripHorizontal, ot as isCellAwareAtom, p as RadioGroupItem, pn as ChevronsUpDown, pt as Fill, q as ComboboxItem, qt as ChartErrorState, r as marimoVersionAtom, rn as $fae977aafc393c5c$export$588937bcd60ade55, rt as contextAwarePanelOpen, sn as Funnel, st as SlotNames, t as cellDomProps, tn as EmotionCacheProvider, tt as ContextAwarePanelItem, u as Slide, un as Ellipsis, v as InstallPackageButton, vn as ArrowDownWideNarrow, vt as TableHead, w as Progress, wt as renderCellValue, x as downloadByURL, xt as NAMELESS_COLUMN_PREFIX, y as ADD_PRINTING_CLASS, yt as TableHeader, z as ContextMenuSeparator, zt as Maps, __tla as __tla_2 } from "./common-BYsoK_Kj.js";
29
+ import { $ as CommandSeparator, $t as Kbd, A as ErrorState, At as getPageIndexForRow, B as ContextMenuTrigger, Bt as dateToLocalISODate, C as downloadHTMLAsImage, Ct as inferFieldTypes, D as ColumnName, Dt as DelayMount, E as downloadSizeLimitAtom, Et as ColumnChartSpecModel, F as getUserColumnVisibilityCounts, Ft as TOO_MANY_ROWS, G as DateRangePicker, Gt as TabsList, H as useSelectList, Ht as dateToLocalISOTime, I as ContextMenu, It as toFieldTypes, J as Command, Jt as ChartInfoState, K as Combobox, Kt as TabsTrigger, L as ContextMenuContent, Lt as getMimeValues, M as prettifyRowColumnCount, Mt as loadTableData, N as prettifyRowCount, Nt as INDEX_COLUMN_NAME, O as ColumnPreviewContainer, Ot as useIntersectionObserver, P as getColumnCountForDisplay, Pt as SELECT_COLUMN_ID, Q as CommandList, Qt as RenderTextWithLinks, R as ContextMenuItem, Rt as isNullishFilter, S as downloadExportedFile, St as generateColumns, T as Filenames, Tt as ColumnChartContext, U as CompactChipRow, Ut as Tabs, V as useInternalStateWithSync, Vt as dateToLocalISODateTime, W as DatePicker, Wt as TabsContent, X as CommandInput, Xt as LazyVegaEmbed, Y as CommandEmpty, Yt as ChartLoadingState, Z as CommandItem, Zt as useOverflowDetection, _ as DataTable, _n as ChevronLeft, _t as TableCell, an as TextWrap, at as contextAwarePanelType, b as downloadBlob, bt as TableRow, c as SLIDE_TYPE_OPTIONS_BY_VALUE, cn as EyeOff, ct as slotsController, d as Switch, dn as Download, en as HtmlOutput, et as smartMatch, f as RadioGroup, fn as Code, g as OutputRenderer, gn as ChevronsDownUp, gt as TableBody, h as OutputArea, hn as ChevronsLeft, ht as Table, i as showCodeInRunModeAtom, in as $fae977aafc393c5c$export$6b862160d295c8e, it as contextAwarePanelOwner, j as LoadingState, jt as loadTableAndRawData, k as EmptyState, kt as usePrevious$1, lt as Toggle, m as JsonOutput, mn as ChevronsRight, mt as Provider$1, n as useNotebookCodeAvailable, nn as safeLocale, nt as PANEL_TYPES, on as GripHorizontal, ot as isCellAwareAtom, p as RadioGroupItem, pn as ChevronsUpDown, pt as Fill, q as ComboboxItem, qt as ChartErrorState, r as marimoVersionAtom, rn as $fae977aafc393c5c$export$588937bcd60ade55, rt as contextAwarePanelOpen, sn as Funnel, st as SlotNames, t as cellDomProps, tn as EmotionCacheProvider, tt as ContextAwarePanelItem, u as Slide, un as Ellipsis, v as InstallPackageButton, vn as ArrowDownWideNarrow, vt as TableHead, w as Progress, wt as renderCellValue, x as downloadByURL, xt as NAMELESS_COLUMN_PREFIX, y as ADD_PRINTING_CLASS, yt as TableHeader, z as ContextMenuSeparator, zt as Maps, __tla as __tla_2 } from "./common-FTSHoSr-.js";
30
30
  import { c as Calendar, i as createReducerAndAtoms, n as useOnUnmount, o as ToggleLeft, t as useOnMount } from "./useLifecycle-Bw4wRj_O.js";
31
31
  import { t as Check } from "./check-58HHfHKy.js";
32
32
  import { A as Icon, C as logNever, D as $18f2051aff69b9bf$export$a54013f0d02a8f82, E as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, F as createCollection, I as X, M as clamp$2, N as usePrevious$2, P as useDirection, R as ChevronDown, S as assertNever, a as SelectGroup, c as SelectSeparator, d as NativeSelect, i as SelectContent, j as Trigger$1, l as SelectTrigger, n as capitalize, o as SelectItem, r as Select, s as SelectLabel, t as Strings, u as SelectValue, w as $a916eb452884faea$export$b7a616150fdb9f44 } from "./strings-DMLVGXRo.js";
33
- import { B as $64fa3d84918910a7$export$4d86445c2cf5e3, C as DropdownMenuTrigger, Ft as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, It as $3ef42575df84b30b$export$9d1611c77c2fe928, W as $64fa3d84918910a7$export$df3a06d6289f983e, Wt as $ff5963eb1fccf552$export$e08e3b67e392101e, X as useDebouncedCallback, Y as useDebounceControlledState, a as NumberField, d as roundToFractionDigits, f as DropdownMenu, g as DropdownMenuLabel, gn as ChevronRight, h as DropdownMenuItem, hn as Circle, i as OnBlurredInput, l as prettyNumber, m as DropdownMenuGroup, n as DebouncedNumberInput, o as maxFractionDigitsForSteps, ot as $f7dceffc5ad7768b$export$4e328f61c538687f, p as DropdownMenuContent, pt as $6179b936705e76d3$export$ae780daf29e6d456, r as Input, st as $701a24aa0da5b062$export$ea18c227d4417cc3, t as DebouncedInput, u as prettyScientificNumber, v as DropdownMenuSeparator, xt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, y as DropdownMenuShortcut, z as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./input-BRE2a7Ay.js";
33
+ import { B as $64fa3d84918910a7$export$4d86445c2cf5e3, C as DropdownMenuTrigger, Ft as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, It as $3ef42575df84b30b$export$9d1611c77c2fe928, W as $64fa3d84918910a7$export$df3a06d6289f983e, Wt as $ff5963eb1fccf552$export$e08e3b67e392101e, X as useDebouncedCallback, Y as useDebounceControlledState, a as NumberField, d as roundToFractionDigits, f as DropdownMenu, g as DropdownMenuLabel, gn as ChevronRight, h as DropdownMenuItem, hn as Circle, i as OnBlurredInput, l as prettyNumber, m as DropdownMenuGroup, n as DebouncedNumberInput, o as maxFractionDigitsForSteps, ot as $f7dceffc5ad7768b$export$4e328f61c538687f, p as DropdownMenuContent, pt as $6179b936705e76d3$export$ae780daf29e6d456, r as Input, st as $701a24aa0da5b062$export$ea18c227d4417cc3, t as DebouncedInput, u as prettyScientificNumber, v as DropdownMenuSeparator, xt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, y as DropdownMenuShortcut, z as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./input-CqV2ZPgL.js";
34
34
  import { S as isWasm, _ as initialModeAtom, b as viewStateAtom, c as asRemoteURL, d as isStaticNotebook, f as appendQueryParams, g as getInitialAppMode, m as require_cuid2, u as getStaticVirtualFiles, v as kioskModeAtom, w as CircleQuestionMark, x as Deferred } from "./toDate-CjUYDkFI.js";
35
- import { a as MarimoIncomingMessageEvent, c as MarimoValueUpdateEvent, f as Square, i as PythonIcon, l as createInputEvent, n as blobToString, o as MarimoValueInputEvent, p as File, r as filesToBase64, s as MarimoValueReadyEvent, t as processOutput, u as deserializeBlob } from "./process-output-Bh4xztNq.js";
35
+ import { a as MarimoIncomingMessageEvent, c as MarimoValueUpdateEvent, f as Square, i as PythonIcon, l as createInputEvent, n as blobToString, o as MarimoValueInputEvent, p as File, r as filesToBase64, s as MarimoValueReadyEvent, t as processOutput, u as deserializeBlob } from "./process-output-C8Q8G6-g.js";
36
36
  import { n as Trash, r as Pencil, t as BulkEdit } from "./types-DT8UHI5w.js";
37
37
  import { n as require_prop_types, r as Plus, t as ErrorBoundary } from "./ErrorBoundary-BniTEhHn.js";
38
38
  import { t as require_react_dom } from "./react-dom-CmENFV8Q.js";
@@ -48,9 +48,9 @@ import { t as debounce_default } from "./debounce-D784bpms.js";
48
48
  import { A as useEvent_default, S as useAtomValue, T as atom, a as KnownQueryParams, b as Provider, c as autoInstantiateAtom, f as useResolvedMarimoConfig, g as store, k as dequal, m as AppConfigSchema, n as useTheme, r as CSSClasses, u as localeAtom, x as useAtom, y as isIslands } from "./useTheme-BzEXeAR5.js";
49
49
  import { $ as EditorView, F as syntaxHighlighting, H as tags, a as HighlightStyle, g as defaultHighlightStyle } from "./dist-BJ2IUa0l.js";
50
50
  import { t as invariant } from "./invariant-hOqqBz8A.js";
51
- import { c as uniqueBy, l as clamp, o as arrayShallowEquals, t as Arrays } from "./arrays-C56grfjL.js";
51
+ import { l as uniqueBy, o as arrayShallowEquals, t as Arrays, u as clamp } from "./arrays-Ct6XviUd.js";
52
52
  import { t as Objects } from "./objects-UzwQd5gx.js";
53
- import { n as once } from "./once-Boutk_9X.js";
53
+ import { n as once } from "./once-D1_qYl2e.js";
54
54
  import { f as sql } from "./dist-D9-ePb6D.js";
55
55
  import { a as markdown } from "./dist-Awj73yUw.js";
56
56
  import "./dist-72nb8Uag.js";
@@ -9016,7 +9016,7 @@ let __tla = Promise.all([
9016
9016
  };
9017
9017
  }
9018
9018
  };
9019
- var LazyChatbot = import_react.lazy(() => import("./chat-ui-dZ0mdOG3.js").then((e) => ({
9019
+ var LazyChatbot = import_react.lazy(() => import("./chat-ui-ChbH2I73.js").then((e) => ({
9020
9020
  default: e.Chatbot
9021
9021
  }))), messageSchema = array(object({
9022
9022
  id: string(),
@@ -9568,7 +9568,7 @@ let __tla = Promise.all([
9568
9568
  ]), TransformationsSchema = object({
9569
9569
  transforms: array(TransformTypeSchema)
9570
9570
  });
9571
- var import_compiler_runtime$76 = require_compiler_runtime(), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-BcvvJTCH.js").then(async (m) => {
9571
+ var import_compiler_runtime$76 = require_compiler_runtime(), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-aimC_hok.js").then(async (m) => {
9572
9572
  await m.__tla;
9573
9573
  return m;
9574
9574
  }));
@@ -28535,7 +28535,7 @@ ${c}
28535
28535
  return true;
28536
28536
  }
28537
28537
  }
28538
- var LazyVegaComponent = import_react.lazy(() => import("./vega-component-CTiCS_5w.js")), VegaPlugin = class {
28538
+ var LazyVegaComponent = import_react.lazy(() => import("./vega-component-xrHju6oo.js")), VegaPlugin = class {
28539
28539
  constructor() {
28540
28540
  __publicField(this, "tagName", "marimo-vega");
28541
28541
  __publicField(this, "validator", object({
@@ -28674,7 +28674,7 @@ ${c}
28674
28674
  children: e.children
28675
28675
  });
28676
28676
  }
28677
- }, LazySlidesComponent$1 = import_react.lazy(() => import("./swiper-component-Cx0cRWLk.js"));
28677
+ }, LazySlidesComponent$1 = import_react.lazy(() => import("./swiper-component-UYicacis.js"));
28678
28678
  const DownloadPlugin = createPlugin("marimo-download").withData(object({
28679
28679
  data: string(),
28680
28680
  disabled: boolean().default(false),
@@ -38307,7 +38307,7 @@ ${c}
38307
38307
  function _temp2$2(e) {
38308
38308
  e.target === e.currentTarget && e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), e.currentTarget.click());
38309
38309
  }
38310
- var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-B60AtfO2.js"));
38310
+ var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-DaBkVTwb.js"));
38311
38311
  const SlidesLayoutRenderer = ({ layout: e, setLayout: r, cells: c, mode: l }) => {
38312
38312
  var _a5;
38313
38313
  let u = useAtomValue(kioskModeAtom), d = l === "read" || u, f = useAtomValue(numColumnsAtom) > 1, [p, m] = (0, import_react.useState)(null), { slideCells: h, skippedIds: g, noOutputIds: _, slideTypes: v, startCellIndex: y } = (0, import_react.useMemo)(() => computeSlideCellsInfo(c, e), [
@@ -1,4 +1,4 @@
1
- import { o as arrayShallowEquals } from "./arrays-C56grfjL.js";
1
+ import { o as arrayShallowEquals } from "./arrays-Ct6XviUd.js";
2
2
  function once(e) {
3
3
  let t, n = false;
4
4
  return function(...r) {
@@ -1,6 +1,6 @@
1
1
  import { o as __toESM } from "./chunk-Bfp04NdC.js";
2
2
  import { t as require_compiler_runtime } from "./compiler-runtime-DsR6imPN.js";
3
- import { F as base64ToDataURL, ot as ansiToPlainText, st as parseHtmlContent } from "./html-to-image-p-mxZ3_V.js";
3
+ import { F as base64ToDataURL, ot as ansiToPlainText, st as parseHtmlContent } from "./html-to-image-BzT-fb14.js";
4
4
  import { u as createLucideIcon } from "./dist-j30bBjjN.js";
5
5
  import { t as Strings } from "./strings-DMLVGXRo.js";
6
6
  import { t as require_jsx_runtime } from "./jsx-runtime-Dp_oQwaf.js";
@@ -6,12 +6,12 @@ import { o as __toESM } from "./chunk-Bfp04NdC.js";
6
6
  import { c as useEventListener, g as Logger, h as cn, m as Events, t as Button } from "./button-Dr2uAwhT.js";
7
7
  import { t as require_react } from "./react-DhGsCS90.js";
8
8
  import { t as require_compiler_runtime } from "./compiler-runtime-DsR6imPN.js";
9
- import { ut as outputIsStale } from "./html-to-image-p-mxZ3_V.js";
9
+ import { ut as outputIsStale } from "./html-to-image-BzT-fb14.js";
10
10
  import "./chunk-5FQGJX7Z-BRZ_XYUw.js";
11
11
  import { u as createLucideIcon } from "./dist-j30bBjjN.js";
12
- import { a as DEFAULT_DECK_TRANSITION, cn as EyeOff, dt as PanelGroup, fn as Code, ft as PanelResizeHandle, l as SlideSidebar, ln as Expand, n as useNotebookCodeAvailable, o as DEFAULT_DECK_VERTICAL_ALIGN, s as DEFAULT_SLIDE_TYPE, t as cellDomProps, u as Slide, ut as Panel } from "./common-BYsoK_Kj.js";
12
+ import { a as DEFAULT_DECK_TRANSITION, cn as EyeOff, dt as PanelGroup, fn as Code, ft as PanelResizeHandle, l as SlideSidebar, ln as Expand, n as useNotebookCodeAvailable, o as DEFAULT_DECK_VERTICAL_ALIGN, s as DEFAULT_SLIDE_TYPE, t as cellDomProps, u as Slide, ut as Panel } from "./common-FTSHoSr-.js";
13
13
  import { R as ChevronDown } from "./strings-DMLVGXRo.js";
14
- import { X as useDebouncedCallback } from "./input-BRE2a7Ay.js";
14
+ import { X as useDebouncedCallback } from "./input-CqV2ZPgL.js";
15
15
  import { v as kioskModeAtom } from "./toDate-CjUYDkFI.js";
16
16
  import "./react-dom-CmENFV8Q.js";
17
17
  import { t as require_jsx_runtime } from "./jsx-runtime-Dp_oQwaf.js";
@@ -3,7 +3,7 @@ import { c as useEventListener, h as cn, t as Button } from "./button-Dr2uAwhT.j
3
3
  import { t as require_react } from "./react-DhGsCS90.js";
4
4
  import { t as require_compiler_runtime } from "./compiler-runtime-DsR6imPN.js";
5
5
  import { t as require_jsx_runtime } from "./jsx-runtime-Dp_oQwaf.js";
6
- import { t as useIframeCapabilities } from "./useIframeCapabilities-CxuXXwjj.js";
6
+ import { t as useIframeCapabilities } from "./useIframeCapabilities-BbnoLKxG.js";
7
7
  var import_compiler_runtime = require_compiler_runtime(), import_react = /* @__PURE__ */ __toESM(require_react(), 1);
8
8
  function isObject$2(t2) {
9
9
  return typeof t2 == "object" && !!t2 && "constructor" in t2 && t2.constructor === Object;
@@ -1,7 +1,7 @@
1
1
  import { o as __toESM } from "./chunk-Bfp04NdC.js";
2
2
  import { t as require_react } from "./react-DhGsCS90.js";
3
3
  import { t as require_compiler_runtime } from "./compiler-runtime-DsR6imPN.js";
4
- import { t as getIframeCapabilities } from "./capabilities-BilXeZ7p.js";
4
+ import { t as getIframeCapabilities } from "./capabilities-DNKeBoT5.js";
5
5
  var import_compiler_runtime = require_compiler_runtime();
6
6
  require_react();
7
7
  function useIframeCapabilities() {
@@ -10,7 +10,7 @@ import { n as ErrorBanner } from "./error-banner-BwCLtmkH.js";
10
10
  import { t as Tooltip } from "./tooltip-BtUxZT5h.js";
11
11
  import { t as debounce_default } from "./debounce-D784bpms.js";
12
12
  import { A as useEvent_default, n as useTheme } from "./useTheme-BzEXeAR5.js";
13
- import { s as uniq } from "./arrays-C56grfjL.js";
13
+ import { c as uniq } from "./arrays-Ct6XviUd.js";
14
14
  import { t as Objects } from "./objects-UzwQd5gx.js";
15
15
  import { a as isValid, i as AlertTitle, n as Alert, t as arrow } from "./formats-BZtMpeQe.js";
16
16
  import { A as getContainerWidth, n as formats } from "./vega-loader.browser-VFQfHaoV.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/islands",
3
- "version": "0.24.1-dev24",
3
+ "version": "0.24.1-dev26",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -21,15 +21,11 @@ import { cellIdsAtom, useCellActions } from "@/core/cells/cells";
21
21
  import { useLastFocusedCellId } from "@/core/cells/focus";
22
22
  import { autoInstantiateAtom } from "@/core/config/config";
23
23
  import {
24
- dataConnectionsMapAtom,
24
+ connectionsAtom,
25
25
  type SQLTableContext,
26
26
  useDataSourceActions,
27
27
  } from "@/core/datasets/data-source-connections";
28
- import {
29
- DEFAULT_DUCKDB_DATABASE,
30
- DUCKDB_ENGINE,
31
- INTERNAL_SQL_ENGINES,
32
- } from "@/core/datasets/engines";
28
+ import { DUCKDB_ENGINE } from "@/core/datasets/engines";
33
29
  import {
34
30
  PreviewSQLSchemaList,
35
31
  PreviewSQLTable,
@@ -224,40 +220,6 @@ export function filterEmptyDatabases(databases: Database[]): Database[] {
224
220
  return changed ? result : databases;
225
221
  }
226
222
 
227
- /**
228
- * This atom is used to get the data connections that are available to the user.
229
- * It filters out the internal engines if it has no databases or if it has only the in-memory database and no schemas.
230
- */
231
- export const connectionsAtom = atom((get) => {
232
- const dataConnections = new Map(get(dataConnectionsMapAtom));
233
-
234
- // Filter out the internal engines if it has no databases
235
- // Or if it has only the in-memory database and no schemas
236
- for (const engine of INTERNAL_SQL_ENGINES) {
237
- const connection = dataConnections.get(engine);
238
- if (!connection) {
239
- continue;
240
- }
241
-
242
- if (connection.databases.length === 0) {
243
- dataConnections.delete(engine);
244
- }
245
-
246
- if (
247
- connection.databases.length === 1 &&
248
- connection.databases[0].name === DEFAULT_DUCKDB_DATABASE &&
249
- connection.databases[0].schemas.length === 0
250
- ) {
251
- dataConnections.delete(engine);
252
- }
253
- }
254
-
255
- // Put internal engines last to prioritize user-defined connections
256
- return sortBy([...dataConnections.values()], (connection) =>
257
- INTERNAL_SQL_ENGINES.has(connection.name) ? 1 : 0,
258
- );
259
- });
260
-
261
223
  export const DataSources: React.FC = () => {
262
224
  const [searchValue, setSearchValue] = React.useState<string>("");
263
225
  const [hideEmpty, setHideEmpty] = useAtom(hideEmptyDatasourcesAtom);
@@ -8,6 +8,9 @@ import {
8
8
  } from "@/components/ui/accordion";
9
9
  import { Badge } from "@/components/ui/badge";
10
10
  import { cn } from "@/utils/cn";
11
+ import { SparklesIcon } from "lucide-react";
12
+ import { Tooltip } from "@/components/ui/tooltip";
13
+ import type { DataSourceDiscoveryGroup } from "@/core/datasets/data-source-discovery";
11
14
 
12
15
  /**
13
16
  * Styled AccordionItem for sidebar panels.
@@ -80,9 +83,41 @@ const PanelBadge = ({
80
83
  );
81
84
  PanelBadge.displayName = "PanelBadge";
82
85
 
86
+ const DiscoveredSourcesBadge = ({
87
+ count,
88
+ type,
89
+ }: {
90
+ count: number;
91
+ type: DataSourceDiscoveryGroup;
92
+ }) => {
93
+ if (count === 0) {
94
+ return null;
95
+ }
96
+
97
+ let noun: string;
98
+ if (type === "database") {
99
+ noun = count === 1 ? "database" : "databases";
100
+ } else {
101
+ noun = count === 1 ? "remote storage" : "remote storages";
102
+ }
103
+ const content = `${count} ${noun} detected in your environment, ready to quick-add`;
104
+
105
+ return (
106
+ <Tooltip content={content}>
107
+ <span>
108
+ <PanelBadge className="gap-0.5 border-(--blue-6) bg-(--blue-3) text-(--blue-11)">
109
+ <SparklesIcon className="h-2.5 w-2.5" />
110
+ {count}
111
+ </PanelBadge>
112
+ </span>
113
+ </Tooltip>
114
+ );
115
+ };
116
+
83
117
  export {
84
118
  PanelAccordionItem,
85
119
  PanelAccordionTrigger,
86
120
  PanelAccordionContent,
87
121
  PanelBadge,
122
+ DiscoveredSourcesBadge,
88
123
  };
@@ -7,11 +7,13 @@ import useResizeObserver from "use-resize-observer";
7
7
  import { StorageInspector } from "@/components/storage/storage-inspector";
8
8
  import { Accordion } from "@/components/ui/accordion";
9
9
  import { storageNamespacesAtom } from "@/core/storage/state";
10
+ import { useDetectedDataSources } from "@/hooks/useDataSourceDiscovery";
10
11
  import { cn } from "@/utils/cn";
11
12
  import { TreeDndProvider } from "../../file-tree/dnd-wrapper";
12
13
  import { FileExplorer } from "../../file-tree/file-explorer";
13
14
  import { useFileExplorerUpload } from "../../file-tree/upload";
14
15
  import {
16
+ DiscoveredSourcesBadge,
15
17
  PanelAccordionContent,
16
18
  PanelAccordionItem,
17
19
  PanelAccordionTrigger,
@@ -58,6 +60,7 @@ const FileExplorerPanel: React.FC = () => {
58
60
 
59
61
  const storageNamespaces = useAtomValue(storageNamespacesAtom);
60
62
  const remoteStorageConnections = storageNamespaces.length;
63
+ const pendingDataSources = useDetectedDataSources("storage");
61
64
 
62
65
  const openSections = useMemo<FileExplorerPanelSection[]>(() => {
63
66
  if (!state.hasUserInteracted && remoteStorageConnections > 0) {
@@ -81,6 +84,7 @@ const FileExplorerPanel: React.FC = () => {
81
84
 
82
85
  const availableContent = panelHeight - TRIGGER_HEIGHT * 2;
83
86
  const storageIsOpen = openSections.includes("remote-storage");
87
+ const showDiscoveredStorageBadge = pendingDataSources.length > 0;
84
88
  const bothOpen = storageIsOpen && openSections.includes("files");
85
89
 
86
90
  const storageMaxHeight = bothOpen
@@ -104,6 +108,12 @@ const FileExplorerPanel: React.FC = () => {
104
108
  {remoteStorageConnections > 0 && (
105
109
  <PanelBadge>{remoteStorageConnections}</PanelBadge>
106
110
  )}
111
+ {showDiscoveredStorageBadge && (
112
+ <DiscoveredSourcesBadge
113
+ count={pendingDataSources.length}
114
+ type="storage"
115
+ />
116
+ )}
107
117
  </PanelAccordionTrigger>
108
118
  <PanelAccordionContent
109
119
  className="overflow-auto"
@@ -3,16 +3,16 @@
3
3
  import { useAtom, useAtomValue } from "jotai";
4
4
  import { DatabaseIcon, VariableIcon } from "lucide-react";
5
5
  import React, { useCallback } from "react";
6
- import {
7
- connectionsAtom,
8
- DataSources,
9
- } from "@/components/datasources/datasources";
6
+ import { DataSources } from "@/components/datasources/datasources";
10
7
  import { Accordion } from "@/components/ui/accordion";
11
8
  import { VariableTable } from "@/components/variables/variables-table";
12
9
  import { useCellIds } from "@/core/cells/cells";
10
+ import { connectionsAtom } from "@/core/datasets/data-source-connections";
13
11
  import { datasetTablesAtom } from "@/core/datasets/state";
14
12
  import { useVariables } from "@/core/variables/state";
13
+ import { useDetectedDataSources } from "@/hooks/useDataSourceDiscovery";
15
14
  import {
15
+ DiscoveredSourcesBadge,
16
16
  PanelAccordionContent,
17
17
  PanelAccordionItem,
18
18
  PanelAccordionTrigger,
@@ -28,6 +28,7 @@ const SessionPanel: React.FC = () => {
28
28
  const cellIds = useCellIds();
29
29
  const tables = useAtomValue(datasetTablesAtom);
30
30
  const dataConnections = useAtomValue(connectionsAtom);
31
+ const pendingDataSources = useDetectedDataSources("database");
31
32
  const [state, setState] = useAtom(sessionPanelAtom);
32
33
 
33
34
  const datasourcesCount = tables.length + dataConnections.length;
@@ -50,6 +51,7 @@ const SessionPanel: React.FC = () => {
50
51
 
51
52
  const isDatasourcesOpen = openSections.includes("datasources");
52
53
  const showDatasourcesBadge = !isDatasourcesOpen && datasourcesCount > 0;
54
+ const showDiscoveredDataSourcesBadge = pendingDataSources.length > 0;
53
55
 
54
56
  return (
55
57
  <Accordion
@@ -63,6 +65,12 @@ const SessionPanel: React.FC = () => {
63
65
  <DatabaseIcon className="w-4 h-4" />
64
66
  Data sources
65
67
  {showDatasourcesBadge && <PanelBadge>{datasourcesCount}</PanelBadge>}
68
+ {showDiscoveredDataSourcesBadge && (
69
+ <DiscoveredSourcesBadge
70
+ count={pendingDataSources.length}
71
+ type="database"
72
+ />
73
+ )}
66
74
  </PanelAccordionTrigger>
67
75
  <PanelAccordionContent>
68
76
  <DataSources />
@@ -28,6 +28,7 @@ const sources: DetectedDataSource[] = [
28
28
  },
29
29
  ],
30
30
  code: "engine = create_engine()",
31
+ hidesWhen: { kind: "dialect", substrings: ["postgres"] },
31
32
  },
32
33
  {
33
34
  id: "pyiceberg-prod",
@@ -52,6 +53,7 @@ const sources: DetectedDataSource[] = [
52
53
  },
53
54
  ],
54
55
  code: 'catalog = load_catalog("prod")',
56
+ hidesWhen: { kind: "dialect", substrings: ["iceberg"] },
55
57
  },
56
58
  ];
57
59
 
@@ -87,7 +87,11 @@ export const AddConnectionDialogContent: React.FC<{
87
87
  <span className="block">{codeSnippetHint}</span>
88
88
  </DialogDescription>
89
89
  </DialogHeader>
90
- <AutoDiscoveredDataSources onSubmit={onClose} className="-mt-2" />
90
+ <AutoDiscoveredDataSources
91
+ onSubmit={onClose}
92
+ className="-mt-2"
93
+ group={activeTab === "storage" ? "storage" : "database"}
94
+ />
91
95
  <Tabs
92
96
  value={activeTab}
93
97
  onValueChange={(v) => setActiveTab(v as ConnectionTab)}
@@ -2,8 +2,11 @@
2
2
 
3
3
  import { PlusIcon, SparklesIcon } from "lucide-react";
4
4
  import { Tooltip, TooltipProvider } from "@/components/ui/tooltip";
5
- import type { DetectedDataSource } from "@/core/datasets/data-source-discovery";
6
- import { useDataSourceDiscovery } from "@/hooks/useDataSourceDiscovery";
5
+ import type {
6
+ DataSourceDiscoveryGroup,
7
+ DetectedDataSource,
8
+ } from "@/core/datasets/data-source-discovery";
9
+ import { useDetectedDataSources } from "@/hooks/useDataSourceDiscovery";
7
10
  import { useInsertCode } from "./components";
8
11
  import { cn } from "@/utils/cn";
9
12
 
@@ -94,19 +97,20 @@ const DetectedDataSourceDetails: React.FC<{
94
97
  );
95
98
 
96
99
  export const AutoDiscoveredDataSources: React.FC<{
97
- onSubmit: () => void;
100
+ onSubmit?: () => void;
98
101
  className?: string;
99
- }> = ({ onSubmit, className }) => {
102
+ group?: DataSourceDiscoveryGroup;
103
+ }> = ({ onSubmit, className, group }) => {
100
104
  const insertCode = useInsertCode();
101
- const { data } = useDataSourceDiscovery();
105
+ const sources = useDetectedDataSources(group);
102
106
 
103
107
  return (
104
108
  <QuickAddDataSources
105
109
  className={className}
106
- sources={data ?? []}
110
+ sources={sources}
107
111
  onAdd={(source) => {
108
112
  insertCode(source.code);
109
- onSubmit();
113
+ onSubmit?.();
110
114
  }}
111
115
  />
112
116
  );