@marimo-team/islands 0.24.1-dev95 → 0.24.1-dev97

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.
@@ -83,6 +83,8 @@ import { useChromeActions, useChromeState } from "../chrome/state";
83
83
  import { isPanelHidden, PANELS } from "../chrome/types";
84
84
  import { AddConnectionDialogContent } from "../connections/add-connection-dialog";
85
85
  import { useAddDetectedDataSource } from "../connections/components";
86
+ import { DATABASE_CONNECTION_KEYWORDS } from "../connections/database/add-database-form";
87
+ import { STORAGE_CONNECTION_KEYWORDS } from "../connections/storage/add-storage-form";
86
88
  import { keyboardShortcutsAtom } from "../controls/keyboard-shortcuts";
87
89
  import { commandPaletteAtom } from "../controls/state";
88
90
  import { displayLayoutName, getLayoutIcon } from "../renderers/layout-select";
@@ -152,6 +154,16 @@ export function useNotebookActions({
152
154
  const sharingWasmEnabled = resolvedConfig.sharing?.wasm ?? true;
153
155
  const sharingMolabEnabled = resolvedConfig.sharing?.molab ?? true;
154
156
  const isSlidesLayout = selectedLayout === "slides";
157
+ const databaseConnectionKeywords = [
158
+ "db",
159
+ "sql",
160
+ ...DATABASE_CONNECTION_KEYWORDS,
161
+ ];
162
+ const storageConnectionKeywords = [
163
+ "bucket",
164
+ "object storage",
165
+ ...STORAGE_CONNECTION_KEYWORDS,
166
+ ];
155
167
 
156
168
  const renderCheckboxElement = (checked: boolean) => (
157
169
  <div className="w-8 flex justify-end">
@@ -458,6 +470,7 @@ export function useNotebookActions({
458
470
  {
459
471
  icon: <DatabaseIcon size={14} strokeWidth={1.5} />,
460
472
  label: "Add database connection",
473
+ additionalKeywords: databaseConnectionKeywords,
461
474
  handle: () => {
462
475
  openModal(<AddConnectionDialogContent onClose={closeModal} />);
463
476
  },
@@ -475,6 +488,7 @@ export function useNotebookActions({
475
488
  divider: true,
476
489
  icon: <DatabaseIcon size={14} strokeWidth={1.5} />,
477
490
  label: "Browse all connections",
491
+ additionalKeywords: databaseConnectionKeywords,
478
492
  handle: () => {
479
493
  openModal(
480
494
  <AddConnectionDialogContent onClose={closeModal} />,
@@ -486,6 +500,7 @@ export function useNotebookActions({
486
500
  {
487
501
  icon: <HardDrive size={14} strokeWidth={1.5} />,
488
502
  label: "Add remote storage",
503
+ additionalKeywords: storageConnectionKeywords,
489
504
  handle: () => {
490
505
  openModal(
491
506
  <AddConnectionDialogContent
@@ -508,6 +523,7 @@ export function useNotebookActions({
508
523
  divider: true,
509
524
  icon: <HardDrive size={14} strokeWidth={1.5} />,
510
525
  label: "Browse all connections",
526
+ additionalKeywords: storageConnectionKeywords,
511
527
  handle: () => {
512
528
  openModal(
513
529
  <AddConnectionDialogContent
@@ -73,7 +73,7 @@ export const PANELS: PanelDescriptor[] = [
73
73
  type: "files",
74
74
  Icon: FolderTreeIcon,
75
75
  label: "Files",
76
- tooltip: "View files",
76
+ tooltip: "View files and remote storage",
77
77
  defaultSection: "sidebar",
78
78
  additionalKeywords: ["explorer", "browser", "directory"],
79
79
  },
@@ -220,6 +220,10 @@ const DATA_CATALOGS = [
220
220
 
221
221
  const ALL_ENTRIES = [...DATABASES, ...DATA_CATALOGS];
222
222
 
223
+ export const DATABASE_CONNECTION_KEYWORDS = [
224
+ ...new Set(ALL_ENTRIES.flatMap(({ name, logo }) => [name, logo])),
225
+ ];
226
+
223
227
  const DatabaseSchemaSelector: React.FC<{
224
228
  onSelect: (schema: z.ZodType<DatabaseConnection, FieldValues>) => void;
225
229
  }> = ({ onSelect }) => {
@@ -101,6 +101,12 @@ const STORAGE_PROVIDERS = [
101
101
  },
102
102
  ] satisfies StorageProviderSchema[];
103
103
 
104
+ export const STORAGE_CONNECTION_KEYWORDS = [
105
+ ...new Set(
106
+ STORAGE_PROVIDERS.flatMap(({ name, protocol }) => [name, protocol]),
107
+ ),
108
+ ];
109
+
104
110
  const StorageProviderSelector: React.FC<{
105
111
  onSelect: (schema: z.ZodType<StorageConnection, FieldValues>) => void;
106
112
  }> = ({ onSelect }) => {