@marimo-team/islands 0.23.15-dev27 → 0.23.15-dev30
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/{ConnectedDataExplorerComponent-CU4fZJzG.js → ConnectedDataExplorerComponent-7p7rt9iw.js} +4 -4
- package/dist/{ErrorBoundary-DE6tzZf-.js → ErrorBoundary-B_CAG7_e.js} +1 -1
- package/dist/{chat-ui-FiwuOgQU.js → chat-ui-CbyDW7Rb.js} +14 -14
- package/dist/{code-visibility-C-WeULC4.js → code-visibility-D1Y9p_ja.js} +9 -10
- package/dist/{constants-T20xxyNf.js → debounce-BOD3DbfP.js} +1 -24
- package/dist/{formats-Dzx4J_z1.js → formats-BX3uDQbB.js} +1 -1
- package/dist/{glide-data-editor-CjTu7ukN.js → glide-data-editor-CwZz71BD.js} +3 -3
- package/dist/{html-to-image-JXL8cvmt.js → html-to-image-CtsZpKdg.js} +2137 -2115
- package/dist/{input-DtsN7xm-.js → input-BGPrFH3g.js} +2 -2
- package/dist/main.js +19 -19
- package/dist/{mermaid-BYqXy_NE.js → mermaid-UdmxG2PZ.js} +2 -2
- package/dist/{process-output-CnDIXtM-.js → process-output-DApSJpc6.js} +1 -1
- package/dist/{reveal-component-DX70xIXW.js → reveal-component-Clfz4vIR.js} +5 -5
- package/dist/{spec-Cz-Bj1JI.js → spec-DSs9v0xx.js} +1 -1
- package/dist/{toDate-CWNNlFEX.js → toDate-CKpRx4TS.js} +3 -4
- package/dist/{useAsyncData-KfHB8wQR.js → useAsyncData-BSOyAbac.js} +1 -1
- package/dist/{useDeepCompareMemoize-nJMtxhm4.js → useDeepCompareMemoize-BTLeWzuR.js} +1 -1
- package/dist/{useLifecycle-DegSo0lV.js → useLifecycle-C6wHjkhW.js} +1 -1
- package/dist/{useTheme-6eZ3GOTS.js → useTheme-Df_vGflw.js} +62 -27
- package/dist/{vega-component-DzyyM9fc.js → vega-component-DNHEV0u0.js} +6 -6
- package/package.json +1 -1
- package/src/components/editor/ai/add-cell-with-ai.tsx +14 -5
- package/src/components/editor/ai/ai-completion-editor.tsx +4 -1
- package/src/components/editor/navigation/__tests__/navigation.test.ts +33 -0
- package/src/components/editor/navigation/navigation.ts +8 -1
- package/src/core/codemirror/completion/__tests__/signature-hint.test.ts +97 -3
- package/src/core/codemirror/completion/signature-hint.ts +78 -11
- package/src/core/constants.ts +6 -0
- package/src/theme/__tests__/useTheme.test.ts +68 -0
- package/src/theme/useTheme.ts +16 -1
|
@@ -13,8 +13,8 @@ import { n as clsx_default } from "./clsx-CIWA5tNO.js";
|
|
|
13
13
|
import { t as require_react_dom } from "./react-dom-BTJzcVJ9.js";
|
|
14
14
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
15
15
|
import { Q as withSmartCollisionBoundary, Y as MAX_HEIGHT_OFFSET, Z as withFullScreenAsRoot, _t as createContextScope, at as Portal, ct as DismissableLayer, dt as useId, et as StyleNamespace, ft as Presence, ht as composeEventHandlers, it as useFocusGuards, nt as Combination_default, ot as FocusScope, pt as useControllableState, tt as hideOthers, ut as useCallbackRef, vt as Primitive, yt as dispatchDiscreteCustomEvent } from "./zod-CijjQh4u.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { t as debounce_default } from "./debounce-BOD3DbfP.js";
|
|
17
|
+
import { A as useEvent_default } from "./useTheme-Df_vGflw.js";
|
|
18
18
|
import { t as memoizeLastValue } from "./once-DPuqGUeo.js";
|
|
19
19
|
var ChevronRight = createLucideIcon("chevron-right", [["path", {
|
|
20
20
|
d: "m9 18 6-6-6-6",
|
package/dist/main.js
CHANGED
|
@@ -22,19 +22,19 @@ import { _ as Logger, c as Objects, g as cn, h as Events, i as NOT_SET, l as use
|
|
|
22
22
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
23
23
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
24
24
|
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-COam1EG7.js";
|
|
25
|
-
import { $ as reducer, $t as isUninstantiated, A as ChevronDownIcon, An as Item$1, Bn as Layers, Bt as MarkdownParser, C as Accordion, Ct as customPythonLanguageSupport, D as BorderAllIcon, Dt as Paths, E as AccordionTrigger, En as selectAtom, Et as PathBuilder, Fn as Table2, Ft as jotaiJsonStorage, G as hasRunAnyCellAtom, Gn as Database, Gt as require_client, H as renderHTML, Hn as FileText, Ht as PluralWords, I as base64ToDataView, In as PaintRoller, J as getCellNames, Jn as CircleAlert, K as createActions, Kn as Columns2, Mn as Trigger2, Mt as generateUUID, Pn as Trash2, Q as numColumnsAtom, Qt as useRequestClient, R as dataViewToBase64, Rt as repl, Sn as jsonParseWithSpecialChar, St as Checkbox, T as AccordionItem, Tn as atomWithStorage, U as getMarimoExportContext, Un as Eye, Ut as DATA_TYPE_ICON, V as safeExtractSetUIElementMessageBuffers, Vn as Info, W as hasTrustedExportContext, X as notebookAtom, Xt as getRequestClient, Y as hasOnlyOneCellAtom, Yn as Braces, Yt as convertStatsName, Z as notebookOutline, Zt as requestClientAtom, a as useCellFocusActions, bn as OBJECT_ID_ATTR, bt as isInternalCellName, ct as initialModeAtom, dt as viewStateAtom, en as publishedCellClasses, et as useCellActions, f as isOutputEmpty, fn as parseAttrValue, ft as outputIsLoading, gn as HTMLCellId, i as LazyAnyLanguageCodeMirror, jn as Root2$1, jt as DeferredRequestRegistry, kn as Content2, ln as NotebookScopedLocalStorage, lt as kioskModeAtom, mn as parseInitialValue, mt as headingToIdentifier, n as Spinner, o as useLastFocusedCellId, p as useExpandedConsoleOutput, pn as parseDataset, pt as outputIsStale, rt as createCell, s as maybeAddAltairImport, st as getInitialAppMode, tn as shouldHidePublishedCell, tt as useCellIds, vn as UIElementId, w as AccordionContent, wn as atomWithReducer, wt as MarkdownLanguageAdapter, xn as RANDOM_ID_ATTR, xt as normalizeName, yn as findCellId, yt as getValidName, zn as LoaderCircle, zt as SQLParser, __tla as __tla_0 } from "./html-to-image-
|
|
25
|
+
import { $ as reducer, $t as isUninstantiated, A as ChevronDownIcon, An as Item$1, Bn as Layers, Bt as MarkdownParser, C as Accordion, Ct as customPythonLanguageSupport, D as BorderAllIcon, Dt as Paths, E as AccordionTrigger, En as selectAtom, Et as PathBuilder, Fn as Table2, Ft as jotaiJsonStorage, G as hasRunAnyCellAtom, Gn as Database, Gt as require_client, H as renderHTML, Hn as FileText, Ht as PluralWords, I as base64ToDataView, In as PaintRoller, J as getCellNames, Jn as CircleAlert, K as createActions, Kn as Columns2, Mn as Trigger2, Mt as generateUUID, Pn as Trash2, Q as numColumnsAtom, Qt as useRequestClient, R as dataViewToBase64, Rt as repl, Sn as jsonParseWithSpecialChar, St as Checkbox, T as AccordionItem, Tn as atomWithStorage, U as getMarimoExportContext, Un as Eye, Ut as DATA_TYPE_ICON, V as safeExtractSetUIElementMessageBuffers, Vn as Info, W as hasTrustedExportContext, X as notebookAtom, Xt as getRequestClient, Y as hasOnlyOneCellAtom, Yn as Braces, Yt as convertStatsName, Z as notebookOutline, Zt as requestClientAtom, a as useCellFocusActions, bn as OBJECT_ID_ATTR, bt as isInternalCellName, ct as initialModeAtom, dt as viewStateAtom, en as publishedCellClasses, et as useCellActions, f as isOutputEmpty, fn as parseAttrValue, ft as outputIsLoading, gn as HTMLCellId, i as LazyAnyLanguageCodeMirror, jn as Root2$1, jt as DeferredRequestRegistry, kn as Content2, ln as NotebookScopedLocalStorage, lt as kioskModeAtom, mn as parseInitialValue, mt as headingToIdentifier, n as Spinner, o as useLastFocusedCellId, p as useExpandedConsoleOutput, pn as parseDataset, pt as outputIsStale, rt as createCell, s as maybeAddAltairImport, st as getInitialAppMode, tn as shouldHidePublishedCell, tt as useCellIds, vn as UIElementId, w as AccordionContent, wn as atomWithReducer, wt as MarkdownLanguageAdapter, xn as RANDOM_ID_ATTR, xt as normalizeName, yn as findCellId, yt as getValidName, zn as LoaderCircle, zt as SQLParser, __tla as __tla_0 } from "./html-to-image-CtsZpKdg.js";
|
|
26
26
|
import { __tla as __tla_1 } from "./chunk-5FQGJX7Z-BbqSm5gU.js";
|
|
27
27
|
import { o as useSize, s as Root$1, u as createLucideIcon } from "./dist--2Bqjvs0.js";
|
|
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-
|
|
29
|
-
import { $ as ContextAwarePanelItem, $t as EmotionCacheProvider, A as prettifyRowColumnCount, At as loadTableData, B as useSelectList, Bt as dateToLocalISOTime, C as Filenames, Ct as ColumnChartContext, D as EmptyState, Dt as usePrevious$1, E as ColumnPreviewContainer, Et as useIntersectionObserver, F as ContextMenuContent, Ft as getMimeValues, G as ComboboxItem, Gt as ChartErrorState, H as DatePicker, Ht as TabsContent, I as ContextMenuItem, It as isNullishFilter, J as CommandInput, Jt as LazyVegaEmbed, K as Command, Kt as ChartInfoState, L as ContextMenuSeparator, Lt as Maps, M as getColumnCountForDisplay, Mt as SELECT_COLUMN_ID, N as getUserColumnVisibilityCounts, Nt as TOO_MANY_ROWS, O as ErrorState, Ot as getPageIndexForRow, P as ContextMenu, Pt as toFieldTypes, Q as smartMatch, Qt as HtmlOutput, R as ContextMenuTrigger, Rt as dateToLocalISODate, S as Progress, St as renderCellValue, T as ColumnName, Tt as DelayMount, U as DateRangePicker, Ut as TabsList, V as CompactChipRow, Vt as Tabs, W as Combobox, Wt as TabsTrigger, X as CommandList, Xt as RenderTextWithLinks, Y as CommandItem, Yt as useOverflowDetection, Z as CommandSeparator, Zt as Kbd, _ as InstallPackageButton, _n as ArrowDownWideNarrow, _t as TableHeader, an as GripHorizontal, at as SlotNames, b as downloadByURL, bt as generateColumns, d as RadioGroup, dn as Code, dt as Fill, en as hasFunctionProperty, et as PANEL_TYPES, f as RadioGroupItem, fn as ChevronsUpDown, ft as Provider$1, g as DataTable, gn as ChevronLeft, gt as TableHead, h as OutputRenderer, hn as ChevronsDownUp, ht as TableCell, in as TextWrap, it as isCellAwareAtom, j as prettifyRowCount, jt as INDEX_COLUMN_NAME, k as LoadingState, kt as loadTableAndRawData, l as Slide, ln as Ellipsis, m as OutputArea, mn as ChevronsLeft, mt as TableBody, n as marimoVersionAtom, nn as $fae977aafc393c5c$export$588937bcd60ade55, nt as contextAwarePanelOwner, on as Funnel, ot as slotsController, p as JsonOutput, pn as ChevronsRight, pt as Table, q as CommandEmpty, qt as ChartLoadingState, r as showCodeInRunModeAtom, rn as $fae977aafc393c5c$export$6b862160d295c8e, rt as contextAwarePanelType, s as SLIDE_TYPE_OPTIONS_BY_VALUE, sn as EyeOff, st as Toggle, t as useNotebookCodeAvailable, tn as isRecord, tt as contextAwarePanelOpen, u as Switch, un as Download, v as ADD_PRINTING_CLASS, vt as TableRow, w as downloadSizeLimitAtom, wt as ColumnChartSpecModel, x as downloadHTMLAsImage, xt as inferFieldTypes, y as downloadBlob, yt as NAMELESS_COLUMN_PREFIX, z as useInternalStateWithSync, zt as dateToLocalISODateTime, __tla as __tla_2 } from "./code-visibility-
|
|
30
|
-
import { c as Calendar, i as createReducerAndAtoms, n as useOnUnmount, o as ToggleLeft, t as useOnMount } from "./useLifecycle-
|
|
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-DSs9v0xx.js";
|
|
29
|
+
import { $ as ContextAwarePanelItem, $t as EmotionCacheProvider, A as prettifyRowColumnCount, At as loadTableData, B as useSelectList, Bt as dateToLocalISOTime, C as Filenames, Ct as ColumnChartContext, D as EmptyState, Dt as usePrevious$1, E as ColumnPreviewContainer, Et as useIntersectionObserver, F as ContextMenuContent, Ft as getMimeValues, G as ComboboxItem, Gt as ChartErrorState, H as DatePicker, Ht as TabsContent, I as ContextMenuItem, It as isNullishFilter, J as CommandInput, Jt as LazyVegaEmbed, K as Command, Kt as ChartInfoState, L as ContextMenuSeparator, Lt as Maps, M as getColumnCountForDisplay, Mt as SELECT_COLUMN_ID, N as getUserColumnVisibilityCounts, Nt as TOO_MANY_ROWS, O as ErrorState, Ot as getPageIndexForRow, P as ContextMenu, Pt as toFieldTypes, Q as smartMatch, Qt as HtmlOutput, R as ContextMenuTrigger, Rt as dateToLocalISODate, S as Progress, St as renderCellValue, T as ColumnName, Tt as DelayMount, U as DateRangePicker, Ut as TabsList, V as CompactChipRow, Vt as Tabs, W as Combobox, Wt as TabsTrigger, X as CommandList, Xt as RenderTextWithLinks, Y as CommandItem, Yt as useOverflowDetection, Z as CommandSeparator, Zt as Kbd, _ as InstallPackageButton, _n as ArrowDownWideNarrow, _t as TableHeader, an as GripHorizontal, at as SlotNames, b as downloadByURL, bt as generateColumns, d as RadioGroup, dn as Code, dt as Fill, en as hasFunctionProperty, et as PANEL_TYPES, f as RadioGroupItem, fn as ChevronsUpDown, ft as Provider$1, g as DataTable, gn as ChevronLeft, gt as TableHead, h as OutputRenderer, hn as ChevronsDownUp, ht as TableCell, in as TextWrap, it as isCellAwareAtom, j as prettifyRowCount, jt as INDEX_COLUMN_NAME, k as LoadingState, kt as loadTableAndRawData, l as Slide, ln as Ellipsis, m as OutputArea, mn as ChevronsLeft, mt as TableBody, n as marimoVersionAtom, nn as $fae977aafc393c5c$export$588937bcd60ade55, nt as contextAwarePanelOwner, on as Funnel, ot as slotsController, p as JsonOutput, pn as ChevronsRight, pt as Table, q as CommandEmpty, qt as ChartLoadingState, r as showCodeInRunModeAtom, rn as $fae977aafc393c5c$export$6b862160d295c8e, rt as contextAwarePanelType, s as SLIDE_TYPE_OPTIONS_BY_VALUE, sn as EyeOff, st as Toggle, t as useNotebookCodeAvailable, tn as isRecord, tt as contextAwarePanelOpen, u as Switch, un as Download, v as ADD_PRINTING_CLASS, vt as TableRow, w as downloadSizeLimitAtom, wt as ColumnChartSpecModel, x as downloadHTMLAsImage, xt as inferFieldTypes, y as downloadBlob, yt as NAMELESS_COLUMN_PREFIX, z as useInternalStateWithSync, zt as dateToLocalISODateTime, __tla as __tla_2 } from "./code-visibility-D1Y9p_ja.js";
|
|
30
|
+
import { c as Calendar, i as createReducerAndAtoms, n as useOnUnmount, o as ToggleLeft, t as useOnMount } from "./useLifecycle-C6wHjkhW.js";
|
|
31
31
|
import { t as Check } from "./check-C9OoNtR4.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-Dq_j3Rxw.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-
|
|
34
|
-
import { _ as isWasm, c as asRemoteURL, d as isStaticNotebook, f as appendQueryParams, g as Deferred, m as require_cuid2, u as getStaticVirtualFiles, v as CircleQuestionMark } from "./toDate-
|
|
35
|
-
import { a as MarimoIncomingMessageEvent, c as MarimoValueUpdateEvent, d as Square, f as File, i as PythonIcon, l as createInputEvent, n as blobToString, o as MarimoValueInputEvent, r as filesToBase64, s as MarimoValueReadyEvent, t as processOutput, u as deserializeBlob } from "./process-output-
|
|
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-BGPrFH3g.js";
|
|
34
|
+
import { _ as isWasm, c as asRemoteURL, d as isStaticNotebook, f as appendQueryParams, g as Deferred, m as require_cuid2, u as getStaticVirtualFiles, v as CircleQuestionMark } from "./toDate-CKpRx4TS.js";
|
|
35
|
+
import { a as MarimoIncomingMessageEvent, c as MarimoValueUpdateEvent, d as Square, f as File, i as PythonIcon, l as createInputEvent, n as blobToString, o as MarimoValueInputEvent, r as filesToBase64, s as MarimoValueReadyEvent, t as processOutput, u as deserializeBlob } from "./process-output-DApSJpc6.js";
|
|
36
36
|
import { n as Trash, r as Pencil, t as BulkEdit } from "./types-C2Ir191_.js";
|
|
37
|
-
import { n as require_prop_types, r as Plus, t as ErrorBoundary } from "./ErrorBoundary-
|
|
37
|
+
import { n as require_prop_types, r as Plus, t as ErrorBoundary } from "./ErrorBoundary-B_CAG7_e.js";
|
|
38
38
|
import { t as require_react_dom } from "./react-dom-BTJzcVJ9.js";
|
|
39
39
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
40
40
|
import { $ as isInVscodeExtension, A as looseObject, B as union, C as any, E as custom, F as optional, G as parse$1, I as record, J as prettifyError, K as parseAsync, N as number, O as lazy$2, P as object, R as string, S as _null, T as boolean, U as ZodError, V as unknown, _ as ZodString, _t as createContextScope, a as ZodIssueCode, b as _enum, c as ZodBoolean, ct as DismissableLayer, d as ZodDiscriminatedUnion, dt as useId$11, et as StyleNamespace, f as ZodEnum, ft as Presence, g as ZodOptional, h as ZodObject, ht as composeEventHandlers$1, i as string$1, j as nan, k as literal, l as ZodDate, m as ZodNumber, mt as useLayoutEffect2, n as date, o as ZodAny, p as ZodLiteral, pt as useControllableState, q as $ZodError, r as number$1, rt as __awaiter, s as ZodArray, t as zod_default, u as ZodDefault, ut as useCallbackRef, v as ZodType, vt as Primitive, w as array, x as _instanceof, y as ZodUnion, yt as dispatchDiscreteCustomEvent, z as tuple } from "./zod-CijjQh4u.js";
|
|
@@ -44,8 +44,8 @@ import { a as TooltipRoot, i as TooltipProvider, n as TooltipContent, o as Toolt
|
|
|
44
44
|
import { f as CopyClipboardIcon } from "./extends-9MVIxxRo.js";
|
|
45
45
|
import { a as get_default } from "./hasIn-Deg7jl_j.js";
|
|
46
46
|
import { n as _baseSet_default, t as pick_default } from "./pick-D1Qo8s2C.js";
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
47
|
+
import { t as debounce_default } from "./debounce-BOD3DbfP.js";
|
|
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-Df_vGflw.js";
|
|
49
49
|
import { $ as EditorView, F as syntaxHighlighting, H as tags, a as HighlightStyle, g as defaultHighlightStyle } from "./dist-U4F-tbMs.js";
|
|
50
50
|
import { t as invariant } from "./invariant-wRzNXIsJ.js";
|
|
51
51
|
import { c as uniqueBy, l as clamp, o as arrayShallowEquals, t as Arrays } from "./arrays-sEtDRoG4.js";
|
|
@@ -59,13 +59,13 @@ import "./dist-M9Vag9Y0.js";
|
|
|
59
59
|
import { r as python } from "./dist-C_Y3oV3C.js";
|
|
60
60
|
import { n as minimalSetup, t as esm_default } from "./esm-M837UxV5.js";
|
|
61
61
|
import "./purify.es-H92eMd9-.js";
|
|
62
|
-
import { i as AlertTitle, n as Alert, r as AlertDescription } from "./formats-
|
|
62
|
+
import { i as AlertTitle, n as Alert, r as AlertDescription } from "./formats-BX3uDQbB.js";
|
|
63
63
|
import "./vega-loader.browser-CZ-J8Py3.js";
|
|
64
64
|
import { a as getContainerWidth, n as vegaLoadData, o as getVegaFieldTypes, s as tooltipHandler } from "./loader-Boph2xIS.js";
|
|
65
65
|
import "./defaultLocale-u-3osm0P.js";
|
|
66
66
|
import "./defaultLocale-BoHTsDG6.js";
|
|
67
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
68
|
-
import { t as useDeepCompareMemoize } from "./useDeepCompareMemoize-
|
|
67
|
+
import { t as useAsyncData } from "./useAsyncData-BSOyAbac.js";
|
|
68
|
+
import { t as useDeepCompareMemoize } from "./useDeepCompareMemoize-BTLeWzuR.js";
|
|
69
69
|
import "./dist-CIYBwstr.js";
|
|
70
70
|
import "./dist-abid3KgM.js";
|
|
71
71
|
import "./dist-A2846XWO.js";
|
|
@@ -8886,7 +8886,7 @@ let __tla = Promise.all([
|
|
|
8886
8886
|
};
|
|
8887
8887
|
}
|
|
8888
8888
|
};
|
|
8889
|
-
var LazyChatbot = import_react.lazy(() => import("./chat-ui-
|
|
8889
|
+
var LazyChatbot = import_react.lazy(() => import("./chat-ui-CbyDW7Rb.js").then((e) => ({
|
|
8890
8890
|
default: e.Chatbot
|
|
8891
8891
|
}))), messageSchema = array(object({
|
|
8892
8892
|
id: string(),
|
|
@@ -9035,7 +9035,7 @@ let __tla = Promise.all([
|
|
|
9035
9035
|
"time",
|
|
9036
9036
|
"unknown"
|
|
9037
9037
|
];
|
|
9038
|
-
var import_compiler_runtime$76 = require_compiler_runtime(), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-
|
|
9038
|
+
var import_compiler_runtime$76 = require_compiler_runtime(), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-CwZz71BD.js").then(async (m) => {
|
|
9039
9039
|
await m.__tla;
|
|
9040
9040
|
return m;
|
|
9041
9041
|
}));
|
|
@@ -16903,7 +16903,7 @@ ${c}
|
|
|
16903
16903
|
fullWidth: m,
|
|
16904
16904
|
children: T
|
|
16905
16905
|
}), r[20] = m, r[21] = g, r[22] = c, r[23] = T, r[24] = E) : E = r[24], E;
|
|
16906
|
-
}, LazyDataExplorerComponent = import_react.lazy(() => import("./ConnectedDataExplorerComponent-
|
|
16906
|
+
}, LazyDataExplorerComponent = import_react.lazy(() => import("./ConnectedDataExplorerComponent-7p7rt9iw.js"));
|
|
16907
16907
|
const DataExplorerPlugin = createPlugin("marimo-data-explorer").withData(object({
|
|
16908
16908
|
label: string().nullish(),
|
|
16909
16909
|
data: string()
|
|
@@ -28251,7 +28251,7 @@ ${c}
|
|
|
28251
28251
|
return true;
|
|
28252
28252
|
}
|
|
28253
28253
|
}
|
|
28254
|
-
var LazyVegaComponent = import_react.lazy(() => import("./vega-component-
|
|
28254
|
+
var LazyVegaComponent = import_react.lazy(() => import("./vega-component-DNHEV0u0.js")), VegaPlugin = class {
|
|
28255
28255
|
constructor() {
|
|
28256
28256
|
__publicField(this, "tagName", "marimo-vega");
|
|
28257
28257
|
__publicField(this, "validator", object({
|
|
@@ -28581,7 +28581,7 @@ ${c}
|
|
|
28581
28581
|
themeVariables: e.data.theme_variables
|
|
28582
28582
|
});
|
|
28583
28583
|
}
|
|
28584
|
-
}, LazyMermaid = (0, import_react.lazy)(() => import("./mermaid-
|
|
28584
|
+
}, LazyMermaid = (0, import_react.lazy)(() => import("./mermaid-UdmxG2PZ.js").then(async (m) => {
|
|
28585
28585
|
await m.__tla;
|
|
28586
28586
|
return m;
|
|
28587
28587
|
})), import_compiler_runtime$22 = require_compiler_runtime();
|
|
@@ -38024,7 +38024,7 @@ ${c}
|
|
|
38024
38024
|
function _temp2$2(e) {
|
|
38025
38025
|
e.target === e.currentTarget && e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), e.currentTarget.click());
|
|
38026
38026
|
}
|
|
38027
|
-
var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-
|
|
38027
|
+
var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-Clfz4vIR.js"));
|
|
38028
38028
|
const SlidesLayoutRenderer = ({ layout: e, setLayout: r, cells: c, mode: l }) => {
|
|
38029
38029
|
var _a5;
|
|
38030
38030
|
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), [
|
|
@@ -7,9 +7,9 @@ import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
|
7
7
|
import "./zod-CijjQh4u.js";
|
|
8
8
|
import { n as ErrorBanner } from "./error-banner-DFPfz_Qf.js";
|
|
9
9
|
import { t as isEmpty_default } from "./isEmpty-CJJMn-QP.js";
|
|
10
|
-
import { n as useTheme } from "./useTheme-
|
|
10
|
+
import { n as useTheme } from "./useTheme-Df_vGflw.js";
|
|
11
11
|
import { t as purify } from "./purify.es-H92eMd9-.js";
|
|
12
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
12
|
+
import { t as useAsyncData } from "./useAsyncData-BSOyAbac.js";
|
|
13
13
|
import { a as decodeEntities, f as isDetailedError, g as utils_default, h as removeDirectives, i as cleanAndMerge, o as encodeEntities } from "./chunk-S3R3BYOJ-oAe3dEbO.js";
|
|
14
14
|
import { a as setLogLevel, i as log, r as __name, t as select_default } from "./src-Bf2iLOlr.js";
|
|
15
15
|
import { t as package_default } from "./chunk-DR5Q36YT-BflwErH1.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
3
|
-
import { at as parseHtmlContent, it as ansiToPlainText } from "./html-to-image-
|
|
3
|
+
import { at as parseHtmlContent, it as ansiToPlainText } from "./html-to-image-CtsZpKdg.js";
|
|
4
4
|
import { u as createLucideIcon } from "./dist--2Bqjvs0.js";
|
|
5
5
|
import { t as Strings } from "./strings-Dq_j3Rxw.js";
|
|
6
6
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
@@ -6,17 +6,17 @@ import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
|
6
6
|
import { _ as Logger, g as cn, h as Events, l as useEventListener, t as Button } from "./button-BacYv-bE.js";
|
|
7
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
|
-
import { lt as kioskModeAtom, pt as outputIsStale } from "./html-to-image-
|
|
9
|
+
import { lt as kioskModeAtom, pt as outputIsStale } from "./html-to-image-CtsZpKdg.js";
|
|
10
10
|
import "./chunk-5FQGJX7Z-BbqSm5gU.js";
|
|
11
11
|
import { u as createLucideIcon } from "./dist--2Bqjvs0.js";
|
|
12
|
-
import { a as DEFAULT_DECK_VERTICAL_ALIGN, c as SlideSidebar, cn as Expand, ct as Panel, dn as Code, i as DEFAULT_DECK_TRANSITION, l as Slide, lt as PanelGroup, o as DEFAULT_SLIDE_TYPE, sn as EyeOff, t as useNotebookCodeAvailable, ut as PanelResizeHandle } from "./code-visibility-
|
|
13
|
-
import { X as useDebouncedCallback } from "./input-
|
|
14
|
-
import "./toDate-
|
|
12
|
+
import { a as DEFAULT_DECK_VERTICAL_ALIGN, c as SlideSidebar, cn as Expand, ct as Panel, dn as Code, i as DEFAULT_DECK_TRANSITION, l as Slide, lt as PanelGroup, o as DEFAULT_SLIDE_TYPE, sn as EyeOff, t as useNotebookCodeAvailable, ut as PanelResizeHandle } from "./code-visibility-D1Y9p_ja.js";
|
|
13
|
+
import { X as useDebouncedCallback } from "./input-BGPrFH3g.js";
|
|
14
|
+
import "./toDate-CKpRx4TS.js";
|
|
15
15
|
import "./react-dom-BTJzcVJ9.js";
|
|
16
16
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
17
17
|
import { X as useFullScreenElement } from "./zod-CijjQh4u.js";
|
|
18
18
|
import { t as Tooltip } from "./tooltip-Czds6Qr8.js";
|
|
19
|
-
import {
|
|
19
|
+
import { A as useEvent_default, S as useAtomValue, y as isIslands } from "./useTheme-Df_vGflw.js";
|
|
20
20
|
import "./dist-U4F-tbMs.js";
|
|
21
21
|
import "./main-Tj_-QTyF.js";
|
|
22
22
|
import "./dist-Dv_Y15yk.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u as createLucideIcon } from "./dist--2Bqjvs0.js";
|
|
2
|
-
import { s as Hash } from "./useLifecycle-
|
|
2
|
+
import { s as Hash } from "./useLifecycle-C6wHjkhW.js";
|
|
3
3
|
import { i as Table, o as ChartPie } from "./useDateFormatter-CMnRuVmN.js";
|
|
4
4
|
import { C as logNever } from "./strings-Dq_j3Rxw.js";
|
|
5
5
|
var AlignCenterVertical = createLucideIcon("align-center-vertical", [
|
|
@@ -5,8 +5,7 @@ import { t as __commonJSMin } from "./chunk-BNovOVIE.js";
|
|
|
5
5
|
import { _ as Logger } from "./button-BacYv-bE.js";
|
|
6
6
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
7
7
|
import { u as createLucideIcon } from "./dist--2Bqjvs0.js";
|
|
8
|
-
import {
|
|
9
|
-
import { S as atom, g as isIslands, h as waitFor, p as store } from "./useTheme-6eZ3GOTS.js";
|
|
8
|
+
import { T as atom, a as KnownQueryParams, g as store, v as waitFor, y as isIslands } from "./useTheme-Df_vGflw.js";
|
|
10
9
|
import { t as invariant } from "./invariant-wRzNXIsJ.js";
|
|
11
10
|
var CircleQuestionMark = createLucideIcon("circle-question-mark", [
|
|
12
11
|
["circle", {
|
|
@@ -516,9 +515,9 @@ var RuntimeManager = class {
|
|
|
516
515
|
return isWasm() || isIslands() || isStaticNotebook();
|
|
517
516
|
}
|
|
518
517
|
formatHttpURL({ path: e = "", searchParams: b, restrictToKnownQueryParams: x = true }) {
|
|
519
|
-
let S = this.httpURL,
|
|
518
|
+
let S = this.httpURL, C = new URLSearchParams(window.location.search);
|
|
520
519
|
if (b) for (let [e2, x2] of b.entries()) S.searchParams.set(e2, x2);
|
|
521
|
-
for (let [e2, b2] of
|
|
520
|
+
for (let [e2, b2] of C.entries()) x && !Object.values(KnownQueryParams).includes(e2) || S.searchParams.set(e2, b2);
|
|
522
521
|
return S.pathname = `${S.pathname.replace(/\/$/, "")}/${e.replace(/^\//, "")}`, S.hash = "", S;
|
|
523
522
|
}
|
|
524
523
|
formatWsURL(e, b) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
4
|
-
import {
|
|
4
|
+
import { A as useEvent_default } from "./useTheme-Df_vGflw.js";
|
|
5
5
|
import { t as invariant } from "./invariant-wRzNXIsJ.js";
|
|
6
6
|
var import_compiler_runtime = require_compiler_runtime(), import_react = /* @__PURE__ */ __toESM(require_react(), 1), Result = {
|
|
7
7
|
error(e, s) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
3
|
-
import {
|
|
3
|
+
import { k as dequal } from "./useTheme-Df_vGflw.js";
|
|
4
4
|
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
5
5
|
function useDeepCompareMemoize(e) {
|
|
6
6
|
let i = import_react.useRef(e);
|
|
@@ -4,7 +4,7 @@ import { t as require_react } from "./react-DA-nE2FX.js";
|
|
|
4
4
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
5
5
|
import { u as createLucideIcon } from "./dist--2Bqjvs0.js";
|
|
6
6
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
7
|
-
import {
|
|
7
|
+
import { C as useSetAtom, T as atom } from "./useTheme-Df_vGflw.js";
|
|
8
8
|
var Calendar = createLucideIcon("calendar", [
|
|
9
9
|
["path", {
|
|
10
10
|
d: "M8 2v4",
|
|
@@ -736,7 +736,39 @@ atom((e) => e(appConfigAtom).width), atom((e) => {
|
|
|
736
736
|
var _a;
|
|
737
737
|
return ((_a = e(resolvedMarimoConfigAtom).server) == null ? void 0 : _a.disable_file_downloads) ?? false;
|
|
738
738
|
});
|
|
739
|
-
|
|
739
|
+
const Constants = {
|
|
740
|
+
githubPage: "https://github.com/marimo-team/marimo",
|
|
741
|
+
releasesPage: "https://github.com/marimo-team/marimo/releases",
|
|
742
|
+
issuesPage: "https://github.com/marimo-team/marimo/issues",
|
|
743
|
+
feedbackForm: "https://marimo.io/feedback",
|
|
744
|
+
discordLink: "https://marimo.io/discord?ref=notebook",
|
|
745
|
+
docsPage: "https://docs.marimo.io",
|
|
746
|
+
youtube: "https://www.youtube.com/@marimo-team",
|
|
747
|
+
molab: "https://molab.marimo.io"
|
|
748
|
+
}, KnownQueryParams = {
|
|
749
|
+
showCode: "show-code",
|
|
750
|
+
includeCode: "include-code",
|
|
751
|
+
sessionId: "session_id",
|
|
752
|
+
kiosk: "kiosk",
|
|
753
|
+
vscode: "vscode",
|
|
754
|
+
filePath: "file",
|
|
755
|
+
accessToken: "access_token",
|
|
756
|
+
viewAs: "view-as",
|
|
757
|
+
showChrome: "show-chrome",
|
|
758
|
+
theme: "theme"
|
|
759
|
+
}, CSSClasses = { outputArea: "output-area" };
|
|
760
|
+
var import_compiler_runtime = require_compiler_runtime();
|
|
761
|
+
const THEMES = [
|
|
762
|
+
"light",
|
|
763
|
+
"dark",
|
|
764
|
+
"system"
|
|
765
|
+
];
|
|
766
|
+
function themeFromQueryParam() {
|
|
767
|
+
if (typeof window > "u") return;
|
|
768
|
+
let e = new URLSearchParams(window.location.search).get(KnownQueryParams.theme);
|
|
769
|
+
return THEMES.includes(e) ? e : void 0;
|
|
770
|
+
}
|
|
771
|
+
var themeAtom = atom((e) => {
|
|
740
772
|
if (isIslands()) {
|
|
741
773
|
if (document.body.classList.contains("dark-mode") || document.body.classList.contains("dark") || document.body.dataset.theme === "dark" || document.body.dataset.mode === "dark" || getVsCodeTheme() === "dark") return "dark";
|
|
742
774
|
let e2 = window.getComputedStyle(document.body), A = e2.getPropertyValue("color-scheme").trim();
|
|
@@ -748,7 +780,7 @@ var import_compiler_runtime = require_compiler_runtime(), themeAtom = atom((e) =
|
|
|
748
780
|
}
|
|
749
781
|
return "light";
|
|
750
782
|
}
|
|
751
|
-
return e(resolvedMarimoConfigAtom).display.theme;
|
|
783
|
+
return themeFromQueryParam() ?? e(resolvedMarimoConfigAtom).display.theme;
|
|
752
784
|
}), prefersDarkModeAtom = atom(false);
|
|
753
785
|
function setupThemeListener() {
|
|
754
786
|
if (typeof window > "u" || !window.matchMedia) return;
|
|
@@ -793,31 +825,34 @@ function useTheme() {
|
|
|
793
825
|
return e[1] === j ? M = e[2] : (M = { theme: j }, e[1] = j, e[2] = M), M;
|
|
794
826
|
}
|
|
795
827
|
export {
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
getBuildingBlocks as
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
828
|
+
useEvent_default as A,
|
|
829
|
+
useSetAtom as C,
|
|
830
|
+
buildStore as D,
|
|
831
|
+
createStore as E,
|
|
832
|
+
getBuildingBlocks as O,
|
|
833
|
+
useAtomValue as S,
|
|
834
|
+
atom as T,
|
|
835
|
+
useJotaiEffect as _,
|
|
836
|
+
KnownQueryParams as a,
|
|
837
|
+
Provider as b,
|
|
838
|
+
autoInstantiateAtom as c,
|
|
839
|
+
resolvedMarimoConfigAtom as d,
|
|
840
|
+
useResolvedMarimoConfig as f,
|
|
841
|
+
store as g,
|
|
842
|
+
createDeepEqualAtom as h,
|
|
843
|
+
Constants as i,
|
|
844
|
+
dequal as k,
|
|
845
|
+
getResolvedMarimoConfig as l,
|
|
846
|
+
AppConfigSchema as m,
|
|
812
847
|
useTheme as n,
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
848
|
+
aiFeaturesEnabledAtom as o,
|
|
849
|
+
userConfigAtom as p,
|
|
850
|
+
CSSClasses as r,
|
|
851
|
+
aiModelConfiguredAtom as s,
|
|
817
852
|
resolvedThemeAtom as t,
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
853
|
+
localeAtom as u,
|
|
854
|
+
waitFor as v,
|
|
855
|
+
useStore as w,
|
|
856
|
+
useAtom as x,
|
|
857
|
+
isIslands as y
|
|
823
858
|
};
|
|
@@ -2,23 +2,23 @@ import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
|
2
2
|
import { _ as Logger, c as Objects, g as cn, h as Events } from "./button-BacYv-bE.js";
|
|
3
3
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
4
4
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
5
|
-
import { c as asRemoteURL, v as CircleQuestionMark } from "./toDate-
|
|
5
|
+
import { c as asRemoteURL, v as CircleQuestionMark } from "./toDate-CKpRx4TS.js";
|
|
6
6
|
import "./react-dom-BTJzcVJ9.js";
|
|
7
7
|
import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
|
|
8
8
|
import "./zod-CijjQh4u.js";
|
|
9
9
|
import { n as ErrorBanner } from "./error-banner-DFPfz_Qf.js";
|
|
10
10
|
import { t as Tooltip } from "./tooltip-Czds6Qr8.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { t as debounce_default } from "./debounce-BOD3DbfP.js";
|
|
12
|
+
import { A as useEvent_default, n as useTheme } from "./useTheme-Df_vGflw.js";
|
|
13
13
|
import { s as uniq } from "./arrays-sEtDRoG4.js";
|
|
14
|
-
import { a as isValid, i as AlertTitle, n as Alert, t as arrow } from "./formats-
|
|
14
|
+
import { a as isValid, i as AlertTitle, n as Alert, t as arrow } from "./formats-BX3uDQbB.js";
|
|
15
15
|
import { n as formats } from "./vega-loader.browser-CZ-J8Py3.js";
|
|
16
16
|
import { a as getContainerWidth, n as vegaLoadData, s as tooltipHandler } from "./loader-Boph2xIS.js";
|
|
17
17
|
import { t as j } from "./react-vega-B0sAlDTL.js";
|
|
18
18
|
import "./defaultLocale-u-3osm0P.js";
|
|
19
19
|
import "./defaultLocale-BoHTsDG6.js";
|
|
20
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
21
|
-
import { t as useDeepCompareMemoize } from "./useDeepCompareMemoize-
|
|
20
|
+
import { t as useAsyncData } from "./useAsyncData-BSOyAbac.js";
|
|
21
|
+
import { t as useDeepCompareMemoize } from "./useDeepCompareMemoize-BTLeWzuR.js";
|
|
22
22
|
import { t as Semaphore } from "./semaphore-CNDGTzkX.js";
|
|
23
23
|
var import_compiler_runtime = require_compiler_runtime(), import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
24
24
|
function fixRelativeUrl(e) {
|
package/package.json
CHANGED
|
@@ -231,6 +231,13 @@ export const AddCellWithAI: React.FC<{
|
|
|
231
231
|
|
|
232
232
|
const handleDeclineCompletion = () => {
|
|
233
233
|
deleteAllStagedCells();
|
|
234
|
+
// Focus the input so the user can refine the prompt.
|
|
235
|
+
inputRef.current?.view?.focus();
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
const handleClose = () => {
|
|
239
|
+
deleteAllStagedCells();
|
|
240
|
+
onClose();
|
|
234
241
|
};
|
|
235
242
|
|
|
236
243
|
const inputComponent = (
|
|
@@ -238,10 +245,7 @@ export const AddCellWithAI: React.FC<{
|
|
|
238
245
|
<SparklesIcon className="size-4 text-(--blue-11) mr-2" />
|
|
239
246
|
<PromptInput
|
|
240
247
|
inputRef={inputRef}
|
|
241
|
-
onClose={
|
|
242
|
-
deleteAllStagedCells();
|
|
243
|
-
onClose();
|
|
244
|
-
}}
|
|
248
|
+
onClose={handleClose}
|
|
245
249
|
value={input}
|
|
246
250
|
onChange={(newValue) => {
|
|
247
251
|
setInput(newValue);
|
|
@@ -254,7 +258,12 @@ export const AddCellWithAI: React.FC<{
|
|
|
254
258
|
hasCompletion,
|
|
255
259
|
})}
|
|
256
260
|
/>
|
|
257
|
-
<Button
|
|
261
|
+
<Button
|
|
262
|
+
variant="text"
|
|
263
|
+
size="sm"
|
|
264
|
+
className="mb-0 px-1"
|
|
265
|
+
onClick={handleClose}
|
|
266
|
+
>
|
|
258
267
|
<XIcon className="size-4" />
|
|
259
268
|
</Button>
|
|
260
269
|
</div>
|
|
@@ -194,9 +194,12 @@ export const AiCompletionEditor: React.FC<Props> = ({
|
|
|
194
194
|
setCompletion("");
|
|
195
195
|
};
|
|
196
196
|
|
|
197
|
+
// Reject discards the suggestion but keeps the prompt open for refinement.
|
|
197
198
|
const handleDeclineCompletion = () => {
|
|
198
|
-
|
|
199
|
+
stop();
|
|
199
200
|
setCompletion("");
|
|
201
|
+
setShowInputPrompt(true);
|
|
202
|
+
inputRef.current?.view?.focus();
|
|
200
203
|
};
|
|
201
204
|
|
|
202
205
|
const showCompletionBanner =
|
|
@@ -12,6 +12,7 @@ import { MockRequestClient } from "@/__mocks__/requests";
|
|
|
12
12
|
import { aiCompletionCellAtom } from "@/core/ai/state";
|
|
13
13
|
import type { CellActions } from "@/core/cells/cells";
|
|
14
14
|
import { notebookAtom } from "@/core/cells/cells";
|
|
15
|
+
import { signatureHintField } from "@/core/codemirror/completion/signature-hint";
|
|
15
16
|
import {
|
|
16
17
|
configOverridesAtom,
|
|
17
18
|
platformAtom,
|
|
@@ -1825,6 +1826,38 @@ describe("useCellEditorNavigationProps", () => {
|
|
|
1825
1826
|
expect(focusCell).not.toHaveBeenCalled();
|
|
1826
1827
|
});
|
|
1827
1828
|
|
|
1829
|
+
it("should dismiss the signature hint when Escape is pressed without exiting to command mode", () => {
|
|
1830
|
+
mockSimplifySelection.mockReturnValue(false);
|
|
1831
|
+
mockCompletionStatus.mockReturnValue(null);
|
|
1832
|
+
|
|
1833
|
+
const dispatch = vi.fn();
|
|
1834
|
+
const mockEditorView = {
|
|
1835
|
+
current: {
|
|
1836
|
+
state: {
|
|
1837
|
+
selection: { main: { from: 9, to: 9, empty: true } },
|
|
1838
|
+
field: vi.fn((field: unknown) =>
|
|
1839
|
+
field === signatureHintField ? { pos: 9 } : false,
|
|
1840
|
+
),
|
|
1841
|
+
},
|
|
1842
|
+
dispatch,
|
|
1843
|
+
} as unknown as EditorView,
|
|
1844
|
+
};
|
|
1845
|
+
|
|
1846
|
+
const { result } = renderWithProvider(() =>
|
|
1847
|
+
useCellEditorNavigationProps(mockCellId, mockEditorView),
|
|
1848
|
+
);
|
|
1849
|
+
|
|
1850
|
+
const mockEvent = Mocks.keyboardEvent({ key: "Escape" });
|
|
1851
|
+
|
|
1852
|
+
act(() => {
|
|
1853
|
+
result.current.onKeyDown?.(mockEvent);
|
|
1854
|
+
});
|
|
1855
|
+
|
|
1856
|
+
// The hint is dismissed (dispatch called) but we stay in edit mode.
|
|
1857
|
+
expect(dispatch).toHaveBeenCalled();
|
|
1858
|
+
expect(focusCell).not.toHaveBeenCalled();
|
|
1859
|
+
});
|
|
1860
|
+
|
|
1828
1861
|
it("should continue propagation for other keys", () => {
|
|
1829
1862
|
const mockEditorView = { current: null };
|
|
1830
1863
|
const { result } = renderWithProvider(() =>
|
|
@@ -22,6 +22,10 @@ import {
|
|
|
22
22
|
} from "@/core/cells/pending-cut-service";
|
|
23
23
|
import { usePendingDeleteService } from "@/core/cells/pending-delete-service";
|
|
24
24
|
import { scrollCellIntoView } from "@/core/cells/scrollCellIntoView";
|
|
25
|
+
import {
|
|
26
|
+
closeSignatureHint,
|
|
27
|
+
signatureHintField,
|
|
28
|
+
} from "@/core/codemirror/completion/signature-hint";
|
|
25
29
|
import {
|
|
26
30
|
hotkeysAtom,
|
|
27
31
|
isAiFeatureEnabled,
|
|
@@ -713,7 +717,9 @@ export function useCellEditorNavigationProps(
|
|
|
713
717
|
return;
|
|
714
718
|
}
|
|
715
719
|
|
|
716
|
-
const hasSignatureHelp =
|
|
720
|
+
const hasSignatureHelp =
|
|
721
|
+
Boolean(state.field(signatureHelpTooltipField, false)) ||
|
|
722
|
+
Boolean(state.field(signatureHintField, false));
|
|
717
723
|
const hasAutocompletePopup = completionStatus(state) !== null;
|
|
718
724
|
if (hasSignatureHelp) {
|
|
719
725
|
closeSignatureHelp(view);
|
|
@@ -784,4 +790,5 @@ export function closeSignatureHelp(view: EditorView) {
|
|
|
784
790
|
if (view.state.field(signatureHelpTooltipField, false)) {
|
|
785
791
|
view.dispatch({ effects: setSignatureHelpTooltip.of(null) });
|
|
786
792
|
}
|
|
793
|
+
closeSignatureHint(view);
|
|
787
794
|
}
|