@marimo-team/islands 0.21.1-dev17 → 0.21.1-dev21
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/{Combination-Dk6JxauT.js → Combination-BBPQRrDo.js} +1 -1
- package/dist/{ConnectedDataExplorerComponent-Bgr96_Mw.js → ConnectedDataExplorerComponent-D0GoOd_c.js} +10 -10
- package/dist/{any-language-editor-BIj11a2e.js → any-language-editor-DlsjUw_l.js} +4 -4
- package/dist/{button-DQpBib29.js → button-BKkuUpZh.js} +8 -0
- package/dist/{check-DpqPQmzz.js → check-Diwc5emq.js} +1 -1
- package/dist/{copy-BkBF0Xgk.js → copy-DIK6DiIA.js} +2 -2
- package/dist/{dist-WIWVvdBh.js → dist-C0Rnbr-_.js} +2 -2
- package/dist/{error-banner-BctofTCP.js → error-banner-Dmi5ujan.js} +2 -2
- package/dist/{esm-BBkPJL8N.js → esm-BLobyqMs.js} +8 -7
- package/dist/{glide-data-editor-DqxJOnJk.js → glide-data-editor-pZyd9UJ_.js} +6 -6
- package/dist/{label-BLDcDYdI.js → label-BbpGrh4j.js} +4 -4
- package/dist/{loader-V1UqqlAy.js → loader-CABJs6GU.js} +1 -1
- package/dist/main.js +88 -35
- package/dist/{mermaid-DkdSmFY8.js → mermaid-CrKqsE2j.js} +5 -5
- package/dist/{slides-component-DwvL_HJi.js → slides-component-GkilRW21.js} +2 -2
- package/dist/{spec-CbYkiXG3.js → spec-Bfvf9Hre.js} +4 -4
- package/dist/{tooltip-SPkubVH3.js → tooltip-CKG75XQa.js} +3 -3
- package/dist/{types-0FB-N7AA.js → types-CGc7peZV.js} +6 -6
- package/dist/{useAsyncData-D7-oahg5.js → useAsyncData-CEjJxwFB.js} +1 -1
- package/dist/{useDeepCompareMemoize-CJr2MRe6.js → useDeepCompareMemoize-BWUwfh37.js} +4 -4
- package/dist/{useIframeCapabilities-DFGZKWkO.js → useIframeCapabilities-OQaMKgZl.js} +1 -1
- package/dist/{useTheme-D0rdoMBF.js → useTheme-CPybHVFN.js} +2 -2
- package/dist/{vega-component-Cq-KtS_2.js → vega-component-CuPTCRp5.js} +8 -8
- package/package.json +1 -1
- package/src/components/editor/actions/useCellActionButton.tsx +38 -29
- package/src/components/editor/cell/code/cell-editor.tsx +9 -0
- package/src/components/editor/header/status.tsx +19 -11
- package/src/core/cells/cells.ts +6 -0
- package/src/core/cells/utils.ts +1 -0
- package/src/core/codemirror/__tests__/setup.test.ts +1 -0
- package/src/core/codemirror/cells/state.ts +1 -0
- package/src/core/codemirror/extensions.ts +20 -0
- package/src/core/codemirror/language/utils.ts +16 -1
- package/src/core/hotkeys/hotkeys.ts +8 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as __export, s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { f as useEventListener, m as useComposedRefs, p as composeRefs } from "./button-
|
|
4
|
+
import { f as useEventListener, m as useComposedRefs, p as composeRefs } from "./button-BKkuUpZh.js";
|
|
5
5
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
6
6
|
import { t as require_react_dom } from "./react-dom-CqtLRVZP.js";
|
|
7
7
|
typeof window < "u" && window.document && window.document.createElement;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { a as __toCommonJS, n as __esmMin, r as __export, s as __toESM, t as __commonJSMin } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { l as createLucideIcon } from "./dist-
|
|
5
|
-
import { A as useOnMount, F as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, H as ListFilter, K as Calendar, M as Badge, N as createReducerAndAtoms, P as startCase_default, R as Type, U as Hash, V as SquareFunction, t as augmentSpecWithData, z as ToggleLeft } from "./spec-
|
|
6
|
-
import { A as $a916eb452884faea$export$b7a616150fdb9f44, a as SelectGroup, c as SelectSeparator, i as SelectContent, l as SelectTrigger, o as SelectItem, r as Select, s as SelectLabel, t as Label, u as SelectValue } from "./label-
|
|
7
|
-
import { d as Objects, g as Logger, t as Button, y as cn } from "./button-
|
|
8
|
-
import "./Combination-
|
|
4
|
+
import { l as createLucideIcon } from "./dist-C0Rnbr-_.js";
|
|
5
|
+
import { A as useOnMount, F as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, H as ListFilter, K as Calendar, M as Badge, N as createReducerAndAtoms, P as startCase_default, R as Type, U as Hash, V as SquareFunction, t as augmentSpecWithData, z as ToggleLeft } from "./spec-Bfvf9Hre.js";
|
|
6
|
+
import { A as $a916eb452884faea$export$b7a616150fdb9f44, a as SelectGroup, c as SelectSeparator, i as SelectContent, l as SelectTrigger, o as SelectItem, r as Select, s as SelectLabel, t as Label, u as SelectValue } from "./label-BbpGrh4j.js";
|
|
7
|
+
import { d as Objects, g as Logger, t as Button, y as cn } from "./button-BKkuUpZh.js";
|
|
8
|
+
import "./Combination-BBPQRrDo.js";
|
|
9
9
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
10
10
|
import "./react-dom-CqtLRVZP.js";
|
|
11
|
-
import { t as Tooltip } from "./tooltip-
|
|
11
|
+
import { t as Tooltip } from "./tooltip-CKG75XQa.js";
|
|
12
12
|
import { t as isString_default } from "./isString-D-vNYDBA.js";
|
|
13
|
-
import { b as createStore, g as useAtomValue, m as Provider, n as useTheme, y as atom } from "./useTheme-
|
|
14
|
-
import { a as getContainerWidth, n as vegaLoadData, s as tooltipHandler } from "./loader-
|
|
13
|
+
import { b as createStore, g as useAtomValue, m as Provider, n as useTheme, y as atom } from "./useTheme-CPybHVFN.js";
|
|
14
|
+
import { a as getContainerWidth, n as vegaLoadData, s as tooltipHandler } from "./loader-CABJs6GU.js";
|
|
15
15
|
import { t as invariant } from "./invariant-D9QLJ4SZ.js";
|
|
16
|
-
import { n as ErrorBanner } from "./error-banner-
|
|
16
|
+
import { n as ErrorBanner } from "./error-banner-Dmi5ujan.js";
|
|
17
17
|
import "./vega-loader.browser-CQ-lnUkI.js";
|
|
18
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
18
|
+
import { t as useAsyncData } from "./useAsyncData-CEjJxwFB.js";
|
|
19
19
|
import { n as q, r as contains } from "./react-vega-C6kwcd86.js";
|
|
20
20
|
import "./defaultLocale-Bklbu-Tp.js";
|
|
21
21
|
import "./defaultLocale-CfQ4kBaV.js";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { g as Logger } from "./button-
|
|
5
|
-
import "./Combination-
|
|
4
|
+
import { g as Logger } from "./button-BKkuUpZh.js";
|
|
5
|
+
import "./Combination-BBPQRrDo.js";
|
|
6
6
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
7
7
|
import "./react-dom-CqtLRVZP.js";
|
|
8
|
-
import {
|
|
8
|
+
import { f as CopyClipboardIcon, n as loadLanguage, r as esm_default, t as langs } from "./esm-BLobyqMs.js";
|
|
9
9
|
import "./dist-DOoqn-VL.js";
|
|
10
10
|
import "./dist-BGZ7TWS9.js";
|
|
11
11
|
import "./dist-BpMlUdNO.js";
|
|
12
12
|
import "./dist-Ux6dL_VB.js";
|
|
13
13
|
import "./dist-D4gcY469.js";
|
|
14
14
|
import "./dist-C4K7pumm.js";
|
|
15
|
-
import { n as ErrorBanner } from "./error-banner-
|
|
15
|
+
import { n as ErrorBanner } from "./error-banner-Dmi5ujan.js";
|
|
16
16
|
import "./dist-lNe4i1Nm.js";
|
|
17
17
|
import "./dist-D5NMgbbv.js";
|
|
18
18
|
import "./dist-B9EjSb9T.js";
|
|
@@ -1538,6 +1538,14 @@ var DEFAULT_HOT_KEY = {
|
|
|
1538
1538
|
group: "Editing",
|
|
1539
1539
|
key: "Mod-Shift-m"
|
|
1540
1540
|
},
|
|
1541
|
+
"cell.viewAsSQL": {
|
|
1542
|
+
name: "Toggle SQL",
|
|
1543
|
+
group: "Editing",
|
|
1544
|
+
key: {
|
|
1545
|
+
windows: "Alt-Shift-l",
|
|
1546
|
+
main: "Mod-Shift-l"
|
|
1547
|
+
}
|
|
1548
|
+
},
|
|
1541
1549
|
"cell.complete": {
|
|
1542
1550
|
name: "Code completion",
|
|
1543
1551
|
group: "Editing",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { l as createLucideIcon } from "./dist-
|
|
5
|
-
import { g as Logger } from "./button-
|
|
4
|
+
import { l as createLucideIcon } from "./dist-C0Rnbr-_.js";
|
|
5
|
+
import { g as Logger } from "./button-BKkuUpZh.js";
|
|
6
6
|
require_compiler_runtime(), require_react();
|
|
7
7
|
var TOAST_LIMIT = 1, TOAST_REMOVE_DELAY = 1e4, count = 0;
|
|
8
8
|
function genId() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
|
-
import { m as useComposedRefs } from "./button-
|
|
4
|
-
import { _t as createContextScope, dt as useCallbackRef, ft as Primitive, lt as useLayoutEffect2 } from "./Combination-
|
|
3
|
+
import { m as useComposedRefs } from "./button-BKkuUpZh.js";
|
|
4
|
+
import { _t as createContextScope, dt as useCallbackRef, ft as Primitive, lt as useLayoutEffect2 } from "./Combination-BBPQRrDo.js";
|
|
5
5
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
6
6
|
import { t as require_react_dom } from "./react-dom-CqtLRVZP.js";
|
|
7
7
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { a as cva, g as Logger, m as useComposedRefs, n as buttonVariants, y as cn } from "./button-
|
|
5
|
-
import { H as string, R as object, _t as createContextScope, at as useControllableState, ct as useId, ft as Primitive, gt as createContext2, ht as createSlottable, i as useFocusGuards, it as StyleNamespace, mt as createSlot, n as hideOthers, ot as Presence, r as FocusScope, st as Portal, t as Combination_default, tt as withFullScreenAsRoot, ut as DismissableLayer, vt as composeEventHandlers } from "./Combination-
|
|
4
|
+
import { a as cva, g as Logger, m as useComposedRefs, n as buttonVariants, y as cn } from "./button-BKkuUpZh.js";
|
|
5
|
+
import { H as string, R as object, _t as createContextScope, at as useControllableState, ct as useId, ft as Primitive, gt as createContext2, ht as createSlottable, i as useFocusGuards, it as StyleNamespace, mt as createSlot, n as hideOthers, ot as Presence, r as FocusScope, st as Portal, t as Combination_default, tt as withFullScreenAsRoot, ut as DismissableLayer, vt as composeEventHandlers } from "./Combination-BBPQRrDo.js";
|
|
6
6
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
7
7
|
var DetailsSchema = object({ detail: string() }), ErrorSchema = object({ error: string() });
|
|
8
8
|
function prettyError(t) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-
|
|
5
|
-
import { t as Check } from "./check-
|
|
6
|
-
import { h as Events, y as cn } from "./button-
|
|
4
|
+
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-DIK6DiIA.js";
|
|
5
|
+
import { t as Check } from "./check-Diwc5emq.js";
|
|
6
|
+
import { h as Events, y as cn } from "./button-BKkuUpZh.js";
|
|
7
7
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
8
|
-
import { t as Tooltip } from "./tooltip-
|
|
8
|
+
import { t as Tooltip } from "./tooltip-CKG75XQa.js";
|
|
9
9
|
import { $ as ViewPlugin, A as indentString, At as Prec, B as tags, Bt as combineConfig, C as foldKeymap, Ct as ChangeSet, D as getIndentation, Dt as EditorState, E as getIndentUnit, Et as EditorSelection, F as syntaxHighlighting, Ft as StateField, H as NodeProp, Ht as findClusterBreak, I as syntaxTree, It as Text, J as parseMixed, Lt as Transaction, Mt as RangeSetBuilder, N as matchBrackets, O as indentNodeProp, Ot as Facet, Pt as StateEffect, R as Tag, Rt as codePointAt, S as foldInside, St as ChangeDesc, Ut as fromCodePoint, Vt as countColumn, X as Direction, Y as Decoration, Z as EditorView, _t as showDialog, a as HighlightStyle, bt as crelt, ct as highlightActiveLineGutter, dt as keymap, et as WidgetType, f as StreamLanguage, ft as lineNumbers, g as defaultHighlightStyle, gt as runScopeHandlers, h as continuedIndent, ht as rectangularSelection, it as getPanel, j as indentUnit, jt as RangeSet, k as indentOnInput, lt as highlightSpecialChars, mt as placeholder, n as ExternalTokenizer, nt as drawSelection, o as IndentContext, p as bracketMatching, pt as logException, r as LRParser, rt as dropCursor, s as LRLanguage, st as highlightActiveLine, t as ContextTracker, tt as crosshairCursor, u as LanguageSupport, ut as hoverTooltip, v as delimitedIndent, vt as showPanel, w as foldNodeProp, wt as CharCategory, x as foldGutter, xt as Annotation, z as styleTags, zt as codePointSize } from "./dist-DOoqn-VL.js";
|
|
10
10
|
import { a as closeBracketsKeymap, c as completionKeymap, f as snippetCompletion, i as closeBrackets, l as ifNotIn, r as autocompletion, s as completeFromList } from "./dist-CSEWGuDq.js";
|
|
11
11
|
import { a as PLSQL, f as sql, l as StandardSQL, t as Cassandra } from "./dist-Bq5eYK43.js";
|
|
@@ -4374,13 +4374,14 @@ function loadLanguage(e6) {
|
|
|
4374
4374
|
export {
|
|
4375
4375
|
_extends as a,
|
|
4376
4376
|
setDiagnostics as c,
|
|
4377
|
-
|
|
4377
|
+
insertTab as d,
|
|
4378
|
+
CopyClipboardIcon as f,
|
|
4378
4379
|
minimalSetup as i,
|
|
4379
|
-
|
|
4380
|
+
history as l,
|
|
4380
4381
|
loadLanguage as n,
|
|
4381
4382
|
forEachDiagnostic as o,
|
|
4382
4383
|
esm_default as r,
|
|
4383
4384
|
linter as s,
|
|
4384
4385
|
langs as t,
|
|
4385
|
-
|
|
4386
|
+
historyField as u
|
|
4386
4387
|
};
|
|
@@ -4,14 +4,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4
4
|
import { s as __toESM, t as __commonJSMin } from "./chunk-BNovOVIE.js";
|
|
5
5
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
6
6
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
7
|
-
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-
|
|
8
|
-
import { O as logNever, i as SelectContent, l as SelectTrigger, o as SelectItem, r as Select, t as Label, u as SelectValue } from "./label-
|
|
9
|
-
import { H as ErrorBoundary, U as require_prop_types, _ as DropdownMenuSeparator, _n as Plus, _t as capitalize_default, b as DropdownMenuSubTrigger, d as DropdownMenu, f as DropdownMenuContent, g as DropdownMenuPortal, hn as Trash, i as Input, m as DropdownMenuItem, mt as marked, pt as useNonce, t as BulkEdit, v as DropdownMenuSub, vn as Pencil, y as DropdownMenuSubContent } from "./types-
|
|
10
|
-
import { g as Logger, h as Events, t as Button } from "./button-
|
|
11
|
-
import "./Combination-
|
|
7
|
+
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-DIK6DiIA.js";
|
|
8
|
+
import { O as logNever, i as SelectContent, l as SelectTrigger, o as SelectItem, r as Select, t as Label, u as SelectValue } from "./label-BbpGrh4j.js";
|
|
9
|
+
import { H as ErrorBoundary, U as require_prop_types, _ as DropdownMenuSeparator, _n as Plus, _t as capitalize_default, b as DropdownMenuSubTrigger, d as DropdownMenu, f as DropdownMenuContent, g as DropdownMenuPortal, hn as Trash, i as Input, m as DropdownMenuItem, mt as marked, pt as useNonce, t as BulkEdit, v as DropdownMenuSub, vn as Pencil, y as DropdownMenuSubContent } from "./types-CGc7peZV.js";
|
|
10
|
+
import { g as Logger, h as Events, t as Button } from "./button-BKkuUpZh.js";
|
|
11
|
+
import "./Combination-BBPQRrDo.js";
|
|
12
12
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
13
13
|
import "./react-dom-CqtLRVZP.js";
|
|
14
|
-
import { C as useEvent_default, n as useTheme } from "./useTheme-
|
|
14
|
+
import { C as useEvent_default, n as useTheme } from "./useTheme-CPybHVFN.js";
|
|
15
15
|
import { A as require__Map, B as require__baseGetTag, C as require__hasPath, D as require_isArguments, E as require__isIndex, F as require_isFunction, G as assert, H as require__root, I as require_isObject, J as maybe, K as assertNever, L as require__isKey, M as require_eq, N as require__getNative, O as require__castPath, P as require__toSource, R as require_isSymbol, S as resolveCellsThunk, T as require_isLength, U as require__freeGlobal, V as require__Symbol, W as require_isArray, _ as isEditableGridCell, a as mergeAndRealizeTheme, b as isReadWriteCell, c as withAlpha, d as CompactSelection, f as GridCellKind, g as booleanCellIsEditable, h as InnerGridCellKind, i as makeCSSStyle, j as require__ListCache, k as require__MapCache, l as BooleanEmpty, m as GridColumnMenuIcon, n as ThemeContext, o as blend, p as GridColumnIcon, q as deepEqual, r as getDataEditorTheme, s as blendCache, t as ClickOutsideContainer, u as BooleanIndeterminate, v as isInnerOnlyCell, w as require__toKey, x as isSizedGridColumn, y as isObjectEditorCallbackResult, z as require_isObjectLike } from "./click-outside-container-CKfwEZqH.js";
|
|
16
16
|
import { t as styled_default } from "./dist-COpDrwi-.js";
|
|
17
17
|
let GlideDataEditor, glide_data_editor_default;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { a as Content, i as Arrow, l as createLucideIcon, n as VISUALLY_HIDDEN_STYLES, o as Root2$1, r as Anchor, s as createPopperScope } from "./dist-
|
|
5
|
-
import { t as Check } from "./check-
|
|
6
|
-
import { a as cva, g as Logger, h as Events, i as createSlot, m as useComposedRefs, y as cn } from "./button-
|
|
7
|
-
import { _t as createContextScope, at as useControllableState, ct as useId, dt as useCallbackRef, ft as Primitive$1, i as useFocusGuards, it as StyleNamespace, lt as useLayoutEffect2, mt as createSlot$1, n as hideOthers, nt as withSmartCollisionBoundary, r as FocusScope, st as Portal, t as Combination_default, tt as withFullScreenAsRoot, ut as DismissableLayer, vt as composeEventHandlers } from "./Combination-
|
|
4
|
+
import { a as Content, i as Arrow, l as createLucideIcon, n as VISUALLY_HIDDEN_STYLES, o as Root2$1, r as Anchor, s as createPopperScope } from "./dist-C0Rnbr-_.js";
|
|
5
|
+
import { t as Check } from "./check-Diwc5emq.js";
|
|
6
|
+
import { a as cva, g as Logger, h as Events, i as createSlot, m as useComposedRefs, y as cn } from "./button-BKkuUpZh.js";
|
|
7
|
+
import { _t as createContextScope, at as useControllableState, ct as useId, dt as useCallbackRef, ft as Primitive$1, i as useFocusGuards, it as StyleNamespace, lt as useLayoutEffect2, mt as createSlot$1, n as hideOthers, nt as withSmartCollisionBoundary, r as FocusScope, st as Portal, t as Combination_default, tt as withFullScreenAsRoot, ut as DismissableLayer, vt as composeEventHandlers } from "./Combination-BBPQRrDo.js";
|
|
8
8
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
9
9
|
import { t as require_react_dom } from "./react-dom-CqtLRVZP.js";
|
|
10
10
|
import { t as toString_default } from "./toString-DbIAWQpF.js";
|
|
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
var _a, _b, _c, _d, _e;
|
|
5
|
-
import { d as Objects, g as Logger } from "./button-
|
|
5
|
+
import { d as Objects, g as Logger } from "./button-BKkuUpZh.js";
|
|
6
6
|
import { H as _baseGetTag_default, V as isObjectLike_default } from "./isArrayLikeObject-BrYl-ETg.js";
|
|
7
7
|
import { St as isObject, a as loader, c as typeParsers$1, gt as isArray, o as read$1, wt as isString } from "./vega-loader.browser-CQ-lnUkI.js";
|
|
8
8
|
var numberTag = "[object Number]";
|
package/dist/main.js
CHANGED
|
@@ -20,32 +20,32 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
20
20
|
import { a as __toCommonJS, n as __esmMin, o as __toDynamicImportESM, r as __export$1, s as __toESM, t as __commonJSMin } from "./chunk-BNovOVIE.js";
|
|
21
21
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
22
22
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
23
|
-
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-
|
|
23
|
+
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-DIK6DiIA.js";
|
|
24
24
|
import { _ as require_cjs$1, c as markdownLineEnding, d as SKIP, f as visitParents, g as s$2, h as h$1, l as longestStreak, m as webNamespaces, o as xn$1, p as convert$1, s as factorySpace, u as ok, __tla as __tla_0 } from "./chunk-5FQGJX7Z-BkzUmppO.js";
|
|
25
|
-
import { a as Content$3, c as useSize, i as Arrow, l as createLucideIcon, o as Root2$6, r as Anchor, s as createPopperScope, t as Root$5 } from "./dist-
|
|
26
|
-
import { A as useOnMount, B as Table$1, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE_DESCRIPTIONS, E as EMPTY_VALUE$1, F as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, G as ChartColumn, H as ListFilter, I as $fb18d541ea1ad717$export$ad991b66133851cf, K as Calendar, L as $5a387cc49350e6db$export$722debc0e56fea39, M as Badge, N as createReducerAndAtoms, O as TIME_UNIT_DESCRIPTIONS, P as startCase_default, R as Type, S as DEFAULT_AGGREGATION, T as DEFAULT_TIME_UNIT, U as Hash, V as SquareFunction, W as ChartPie, _ 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 useOnUnmount, 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, z as ToggleLeft } from "./spec-
|
|
27
|
-
import { t as Check } from "./check-
|
|
28
|
-
import { A as $a916eb452884faea$export$b7a616150fdb9f44, C as useDirection, D as assertNever, E as usePrevious$1, I as X, M as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, N as $18f2051aff69b9bf$export$a54013f0d02a8f82, O as logNever, P as $b5e257d569688ac6$export$535bd6ca7f90a273, R as ChevronDown, S as Trigger$5, T as clamp$2, _ as menuItemVariants, a as SelectGroup, b as menuSubTriggerVariants, c as SelectSeparator, d as NativeSelect, f as selectStyles, g as menuControlVariants, h as menuControlCheckVariants, i as SelectContent, j as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5, l as SelectTrigger, m as menuContentCommon, n as Primitive$1, o as SelectItem, p as MENU_ITEM_DISABLED, r as Select, s as SelectLabel, t as Label, u as SelectValue, v as menuLabelVariants, w as createCollection, x as Icon, y as menuSeparatorVariants } from "./label-
|
|
29
|
-
import { $ as $d2b4bc8c273e7be6$export$24d547caef80ccd1, $t as $c87311424ea30a05$export$a11b0059900ceec8, A as Portal$2, At as $fca6afa0e843324b$export$87b761675e8eaa10, B as Root$6, Bt as $ae1eeba8b9eafd08$export$5165eccb35aaadb5, C as Arrow2, Ct as $e5be200c675c3b3a$export$aca958c65c314e6c, D as Item2$2, Dt as $f7dceffc5ad7768b$export$4e328f61c538687f, E as Group$1, Et as $319e236875307eab$export$a9b970dcc4ae71a9, F as Sub, Ft as $9ab94262bd0047c7$export$420e68273165f4ec, G as $3985021b0ad6602f$export$f5b8910cec6cf069, Gt as $99facab73266f662$export$5add1d006293d136, H as ErrorBoundary, Ht as $458b0a5536c1a7cf$export$40bfa8c7b0832715, I as SubContent, It as $3ad3f6e1647bc98d$export$80f3e147d781571c, J as $d3e0e05bdfcf66bd$export$c24727297075ec6a, Jt as $df56164dff5785e2$export$4338b53315abf666, K as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, Kt as $e9faafb641e167db$export$90fc3a17d93f704c, L as SubTrigger, Lt as $507fabe10e71c6fb$export$630ff653c5ada6a9, M as RadioItem, Mt as $6db58dc88e78b024$export$2f817fcdc4b89ae0, N as Root3, Nt as $5b160d28a433310d$export$c17fa47878dc55b6, O as ItemIndicator, Ot as $701a24aa0da5b062$export$ea18c227d4417cc3, P as Separator, Pt as $6179b936705e76d3$export$ae780daf29e6d456, Q as $514c0188e459b4c0$export$9afb8bc826b033ea, Qt as $c87311424ea30a05$export$9ac100e40613ea10, R as createMenuScope, Rt as $f6c31cce2adf654f$export$45712eceda6fad21, S as Anchor2, St as $e5be200c675c3b3a$export$a763b9476acd3eb, T as Content2$3, Tt as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, U as require_prop_types, Ut as $b4b717babfbb907b$export$4c063cf1350e6fed, V as createRovingFocusGroupScope, Vt as $9446cca9a3875146$export$7d15b64cf5a3a4c4, W as $3985021b0ad6602f$export$37fb8590cf2c088c, Wt as $b4b717babfbb907b$export$bebd5a1431fec25d, X as $ee014567cb39d3f0$export$ff05c3ac10437e03, Xt as $c87311424ea30a05$export$6446a186d09e379e, Y as $ee014567cb39d3f0$export$f551688fc98f2e09, Yt as $313b98861ee5dd6c$export$d6875122194c7b44, Z as $514c0188e459b4c0$export$5f1af8db9871e1d6, Zt as $c87311424ea30a05$export$78551043582a6a98, _ as DropdownMenuSeparator, _n as Plus, _t as capitalize_default, a as OnBlurredInput, an as $d4ee10de306f2510$export$b4f377a2b6254582, at as $64fa3d84918910a7$export$29f1550f4b0d4415, b as DropdownMenuSubTrigger, bn as ChevronRight, bt as $e93e671b31057976$export$b8473d3665f3a75a, c as prettyEngineeringNumber, cn as $f4e2df6bd15f8569$export$98658e8c59125e6a, ct as $64fa3d84918910a7$export$c245e6201fed2f75, d as DropdownMenu, dn as $ff5963eb1fccf552$export$e08e3b67e392101e, dt as $64fa3d84918910a7$export$ef03459518577ad4, en as $c87311424ea30a05$export$fedb369cb70207f1, et as $d2b4bc8c273e7be6$export$353f5b6fc5456de1, f as DropdownMenuContent, fn as $bdb11010cef70236$export$b4cc09c592e8fdb8, ft as $64fa3d84918910a7$export$fabf2dc03a41866e, g as DropdownMenuPortal, gn as Search, gt as useDebouncedCallback, h as DropdownMenuLabel, hn as Trash, ht as useDebounceControlledState, i as Input, in as $d4ee10de306f2510$export$4282f70798064fe0, it as $64fa3d84918910a7$export$2881499e37b75b9a, j as RadioGroup$2, jt as $fca6afa0e843324b$export$f12b703ca79dfbb1, k as Label$2, kt as $6c7bd7858deea686$export$cd11ab140839f11d, l as prettyNumber, ln as $431fbd86ca7dc216$export$b204af158042fbac, lt as $64fa3d84918910a7$export$c62b8e45d58ddad9, m as DropdownMenuItem, mn as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, mt as marked, n as DebouncedInput, nn as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, nt as $01b77f81d0f07f68$export$b04be29aa201d4f5, o as NumberField, on as $d4ee10de306f2510$export$cd4e5573fbe2b576, ot as $64fa3d84918910a7$export$4d86445c2cf5e3, p as DropdownMenuGroup, pn as $bdb11010cef70236$export$f680877a34711e37, pt as useNonce, q as $a049562f99e7db0e$export$f9c6924e160136d1, qt as $8ae05eaa5c114e9c$export$7f54fc3180508a52, r as DebouncedNumberInput, rn as $3ef42575df84b30b$export$9d1611c77c2fe928, rt as $f39a9eba43920ace$export$b5d7cc18bb8d2b59, s as maxFractionalDigits, sn as $d4ee10de306f2510$export$e58f029f0fbfdb29, st as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, t as BulkEdit, tn as $7215afc6de606d6b$export$de79e2c695e052f3, tt as $01b77f81d0f07f68$export$75b6ee27786ba447, u as prettyScientificNumber, un as $431fbd86ca7dc216$export$f21a1ffae260145a, ut as $64fa3d84918910a7$export$df3a06d6289f983e, v as DropdownMenuSub, vn as Pencil, vt as $d2e8511e6f209edf$export$e908e06f4b8e3402, w as CheckboxItem, wt as $e5be200c675c3b3a$export$dad6ae84456c676a, x as DropdownMenuTrigger, xt as $e5be200c675c3b3a$export$75ee7c75d68f5b0e, y as DropdownMenuSubContent, yn as Circle, yt as $2baaea4c71418dea$export$294aa081a6c6f55d, z as Item$2, zt as _class_private_field_init } from "./types-
|
|
30
|
-
import { S as CircleQuestionMark, _ as isUrl, a as AlertTitle, b as Deferred, c as constructFrom, d as millisecondsInMinute, f as millisecondsInSecond, g as appendQueryParams, h as getRuntimeManager, i as AlertDescription, l as millisecondsInDay, m as asRemoteURL, n as arrow, o as isValid$1, p as millisecondsInWeek, r as Alert, s as toDate, t as useDeepCompareMemoize, u as millisecondsInHour, v as require_cuid2, x as isWasm, y as waitForConnectionOpen } from "./useDeepCompareMemoize-
|
|
25
|
+
import { a as Content$3, c as useSize, i as Arrow, l as createLucideIcon, o as Root2$6, r as Anchor, s as createPopperScope, t as Root$5 } from "./dist-C0Rnbr-_.js";
|
|
26
|
+
import { A as useOnMount, B as Table$1, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE_DESCRIPTIONS, E as EMPTY_VALUE$1, F as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, G as ChartColumn, H as ListFilter, I as $fb18d541ea1ad717$export$ad991b66133851cf, K as Calendar, L as $5a387cc49350e6db$export$722debc0e56fea39, M as Badge, N as createReducerAndAtoms, O as TIME_UNIT_DESCRIPTIONS, P as startCase_default, R as Type, S as DEFAULT_AGGREGATION, T as DEFAULT_TIME_UNIT, U as Hash, V as SquareFunction, W as ChartPie, _ 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 useOnUnmount, 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, z as ToggleLeft } from "./spec-Bfvf9Hre.js";
|
|
27
|
+
import { t as Check } from "./check-Diwc5emq.js";
|
|
28
|
+
import { A as $a916eb452884faea$export$b7a616150fdb9f44, C as useDirection, D as assertNever, E as usePrevious$1, I as X, M as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, N as $18f2051aff69b9bf$export$a54013f0d02a8f82, O as logNever, P as $b5e257d569688ac6$export$535bd6ca7f90a273, R as ChevronDown, S as Trigger$5, T as clamp$2, _ as menuItemVariants, a as SelectGroup, b as menuSubTriggerVariants, c as SelectSeparator, d as NativeSelect, f as selectStyles, g as menuControlVariants, h as menuControlCheckVariants, i as SelectContent, j as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5, l as SelectTrigger, m as menuContentCommon, n as Primitive$1, o as SelectItem, p as MENU_ITEM_DISABLED, r as Select, s as SelectLabel, t as Label, u as SelectValue, v as menuLabelVariants, w as createCollection, x as Icon, y as menuSeparatorVariants } from "./label-BbpGrh4j.js";
|
|
29
|
+
import { $ as $d2b4bc8c273e7be6$export$24d547caef80ccd1, $t as $c87311424ea30a05$export$a11b0059900ceec8, A as Portal$2, At as $fca6afa0e843324b$export$87b761675e8eaa10, B as Root$6, Bt as $ae1eeba8b9eafd08$export$5165eccb35aaadb5, C as Arrow2, Ct as $e5be200c675c3b3a$export$aca958c65c314e6c, D as Item2$2, Dt as $f7dceffc5ad7768b$export$4e328f61c538687f, E as Group$1, Et as $319e236875307eab$export$a9b970dcc4ae71a9, F as Sub, Ft as $9ab94262bd0047c7$export$420e68273165f4ec, G as $3985021b0ad6602f$export$f5b8910cec6cf069, Gt as $99facab73266f662$export$5add1d006293d136, H as ErrorBoundary, Ht as $458b0a5536c1a7cf$export$40bfa8c7b0832715, I as SubContent, It as $3ad3f6e1647bc98d$export$80f3e147d781571c, J as $d3e0e05bdfcf66bd$export$c24727297075ec6a, Jt as $df56164dff5785e2$export$4338b53315abf666, K as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, Kt as $e9faafb641e167db$export$90fc3a17d93f704c, L as SubTrigger, Lt as $507fabe10e71c6fb$export$630ff653c5ada6a9, M as RadioItem, Mt as $6db58dc88e78b024$export$2f817fcdc4b89ae0, N as Root3, Nt as $5b160d28a433310d$export$c17fa47878dc55b6, O as ItemIndicator, Ot as $701a24aa0da5b062$export$ea18c227d4417cc3, P as Separator, Pt as $6179b936705e76d3$export$ae780daf29e6d456, Q as $514c0188e459b4c0$export$9afb8bc826b033ea, Qt as $c87311424ea30a05$export$9ac100e40613ea10, R as createMenuScope, Rt as $f6c31cce2adf654f$export$45712eceda6fad21, S as Anchor2, St as $e5be200c675c3b3a$export$a763b9476acd3eb, T as Content2$3, Tt as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, U as require_prop_types, Ut as $b4b717babfbb907b$export$4c063cf1350e6fed, V as createRovingFocusGroupScope, Vt as $9446cca9a3875146$export$7d15b64cf5a3a4c4, W as $3985021b0ad6602f$export$37fb8590cf2c088c, Wt as $b4b717babfbb907b$export$bebd5a1431fec25d, X as $ee014567cb39d3f0$export$ff05c3ac10437e03, Xt as $c87311424ea30a05$export$6446a186d09e379e, Y as $ee014567cb39d3f0$export$f551688fc98f2e09, Yt as $313b98861ee5dd6c$export$d6875122194c7b44, Z as $514c0188e459b4c0$export$5f1af8db9871e1d6, Zt as $c87311424ea30a05$export$78551043582a6a98, _ as DropdownMenuSeparator, _n as Plus, _t as capitalize_default, a as OnBlurredInput, an as $d4ee10de306f2510$export$b4f377a2b6254582, at as $64fa3d84918910a7$export$29f1550f4b0d4415, b as DropdownMenuSubTrigger, bn as ChevronRight, bt as $e93e671b31057976$export$b8473d3665f3a75a, c as prettyEngineeringNumber, cn as $f4e2df6bd15f8569$export$98658e8c59125e6a, ct as $64fa3d84918910a7$export$c245e6201fed2f75, d as DropdownMenu, dn as $ff5963eb1fccf552$export$e08e3b67e392101e, dt as $64fa3d84918910a7$export$ef03459518577ad4, en as $c87311424ea30a05$export$fedb369cb70207f1, et as $d2b4bc8c273e7be6$export$353f5b6fc5456de1, f as DropdownMenuContent, fn as $bdb11010cef70236$export$b4cc09c592e8fdb8, ft as $64fa3d84918910a7$export$fabf2dc03a41866e, g as DropdownMenuPortal, gn as Search, gt as useDebouncedCallback, h as DropdownMenuLabel, hn as Trash, ht as useDebounceControlledState, i as Input, in as $d4ee10de306f2510$export$4282f70798064fe0, it as $64fa3d84918910a7$export$2881499e37b75b9a, j as RadioGroup$2, jt as $fca6afa0e843324b$export$f12b703ca79dfbb1, k as Label$2, kt as $6c7bd7858deea686$export$cd11ab140839f11d, l as prettyNumber, ln as $431fbd86ca7dc216$export$b204af158042fbac, lt as $64fa3d84918910a7$export$c62b8e45d58ddad9, m as DropdownMenuItem, mn as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, mt as marked, n as DebouncedInput, nn as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, nt as $01b77f81d0f07f68$export$b04be29aa201d4f5, o as NumberField, on as $d4ee10de306f2510$export$cd4e5573fbe2b576, ot as $64fa3d84918910a7$export$4d86445c2cf5e3, p as DropdownMenuGroup, pn as $bdb11010cef70236$export$f680877a34711e37, pt as useNonce, q as $a049562f99e7db0e$export$f9c6924e160136d1, qt as $8ae05eaa5c114e9c$export$7f54fc3180508a52, r as DebouncedNumberInput, rn as $3ef42575df84b30b$export$9d1611c77c2fe928, rt as $f39a9eba43920ace$export$b5d7cc18bb8d2b59, s as maxFractionalDigits, sn as $d4ee10de306f2510$export$e58f029f0fbfdb29, st as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, t as BulkEdit, tn as $7215afc6de606d6b$export$de79e2c695e052f3, tt as $01b77f81d0f07f68$export$75b6ee27786ba447, u as prettyScientificNumber, un as $431fbd86ca7dc216$export$f21a1ffae260145a, ut as $64fa3d84918910a7$export$df3a06d6289f983e, v as DropdownMenuSub, vn as Pencil, vt as $d2e8511e6f209edf$export$e908e06f4b8e3402, w as CheckboxItem, wt as $e5be200c675c3b3a$export$dad6ae84456c676a, x as DropdownMenuTrigger, xt as $e5be200c675c3b3a$export$75ee7c75d68f5b0e, y as DropdownMenuSubContent, yn as Circle, yt as $2baaea4c71418dea$export$294aa081a6c6f55d, z as Item$2, zt as _class_private_field_init } from "./types-CGc7peZV.js";
|
|
30
|
+
import { S as CircleQuestionMark, _ as isUrl, a as AlertTitle, b as Deferred, c as constructFrom, d as millisecondsInMinute, f as millisecondsInSecond, g as appendQueryParams, h as getRuntimeManager, i as AlertDescription, l as millisecondsInDay, m as asRemoteURL, n as arrow, o as isValid$1, p as millisecondsInWeek, r as Alert, s as toDate, t as useDeepCompareMemoize, u as millisecondsInHour, v as require_cuid2, x as isWasm, y as waitForConnectionOpen } from "./useDeepCompareMemoize-BWUwfh37.js";
|
|
31
31
|
import { n as clsx_default } from "./clsx-D2KVTYnW.js";
|
|
32
|
-
import { _ as Functions, a as cva, c as isPlatformMac, d as Objects, f as useEventListener, g as Logger, h as Events, l as parseShortcut, m as useComposedRefs, n as buttonVariants, o as NOT_SET, p as composeRefs, r as Slot$1, t as Button, v as throwNotImplemented, y as cn } from "./button-
|
|
33
|
-
import { $ as __awaiter, A as custom, B as record, C as ZodUnion$1, D as any, E as _null, F as nan, G as unknown, H as string, I as never, J as toJSONSchema, K as safeParseAsync, L as number, M as lazy$4, N as literal, O as array, P as looseObject, Q as prettifyError, R as object$1, S as ZodType$1, T as _instanceof, U as tuple, V as strictObject, W as union, X as parseAsync, Y as parse$3, Z as $ZodError, _ as ZodLiteral$1, _t as createContextScope, a as zod_default, at as useControllableState, b as ZodOptional$1, c as string$1, ct as useId$12, d as ZodArray$1, dt as useCallbackRef, et as MAX_HEIGHT_OFFSET, f as ZodBoolean$1, ft as Primitive, g as ZodEnum$1, h as ZodDiscriminatedUnion$1, i as useFocusGuards, it as StyleNamespace, j as discriminatedUnion, k as boolean, l as ZodIssueCode$1, lt as useLayoutEffect2, m as ZodDefault$1, mt as createSlot, n as hideOthers, nt as withSmartCollisionBoundary, o as date, ot as Presence, p as ZodDate$1, pt as dispatchDiscreteCustomEvent, q as ZodError$1, r as FocusScope, rt as isInVscodeExtension, s as number$1, st as Portal, t as Combination_default, tt as withFullScreenAsRoot, u as ZodAny$1, ut as DismissableLayer, v as ZodNumber$1, vt as composeEventHandlers$1, w as _enum, x as ZodString$1, y as ZodObject$1, z as optional } from "./Combination-
|
|
32
|
+
import { _ as Functions, a as cva, c as isPlatformMac, d as Objects, f as useEventListener, g as Logger, h as Events, l as parseShortcut, m as useComposedRefs, n as buttonVariants, o as NOT_SET, p as composeRefs, r as Slot$1, t as Button, v as throwNotImplemented, y as cn } from "./button-BKkuUpZh.js";
|
|
33
|
+
import { $ as __awaiter, A as custom, B as record, C as ZodUnion$1, D as any, E as _null, F as nan, G as unknown, H as string, I as never, J as toJSONSchema, K as safeParseAsync, L as number, M as lazy$4, N as literal, O as array, P as looseObject, Q as prettifyError, R as object$1, S as ZodType$1, T as _instanceof, U as tuple, V as strictObject, W as union, X as parseAsync, Y as parse$3, Z as $ZodError, _ as ZodLiteral$1, _t as createContextScope, a as zod_default, at as useControllableState, b as ZodOptional$1, c as string$1, ct as useId$12, d as ZodArray$1, dt as useCallbackRef, et as MAX_HEIGHT_OFFSET, f as ZodBoolean$1, ft as Primitive, g as ZodEnum$1, h as ZodDiscriminatedUnion$1, i as useFocusGuards, it as StyleNamespace, j as discriminatedUnion, k as boolean, l as ZodIssueCode$1, lt as useLayoutEffect2, m as ZodDefault$1, mt as createSlot, n as hideOthers, nt as withSmartCollisionBoundary, o as date, ot as Presence, p as ZodDate$1, pt as dispatchDiscreteCustomEvent, q as ZodError$1, r as FocusScope, rt as isInVscodeExtension, s as number$1, st as Portal, t as Combination_default, tt as withFullScreenAsRoot, u as ZodAny$1, ut as DismissableLayer, v as ZodNumber$1, vt as composeEventHandlers$1, w as _enum, x as ZodString$1, y as ZodObject$1, z as optional } from "./Combination-BBPQRrDo.js";
|
|
34
34
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
35
35
|
import { t as require_react_dom } from "./react-dom-CqtLRVZP.js";
|
|
36
|
-
import { a as TooltipRoot, i as TooltipProvider, n as TooltipContent, o as TooltipTrigger, r as TooltipPortal, s as TooltipProvider$1, t as Tooltip } from "./tooltip-
|
|
37
|
-
import { a as _extends$5, c as setDiagnostics, d as CopyClipboardIcon, i as minimalSetup, l as
|
|
36
|
+
import { a as TooltipRoot, i as TooltipProvider, n as TooltipContent, o as TooltipTrigger, r as TooltipPortal, s as TooltipProvider$1, t as Tooltip } from "./tooltip-CKG75XQa.js";
|
|
37
|
+
import { a as _extends$5, c as setDiagnostics, d as insertTab, f as CopyClipboardIcon, i as minimalSetup, l as history, o as forEachDiagnostic, r as esm_default, s as linter, t as langs, u as historyField } from "./esm-BLobyqMs.js";
|
|
38
38
|
import { i as toInteger_default, n as _baseSet_default } from "./_basePickBy-pTDW2_2A.js";
|
|
39
39
|
import { i as get_default } from "./hasIn-B9AbGLj3.js";
|
|
40
40
|
import { n as pick_default, t as range_default } from "./range-BKaWvVUE.js";
|
|
41
41
|
import { i as debounce_default, r as KnownQueryParams, t as CSSClasses } from "./constants-CytQ_3LM.js";
|
|
42
42
|
import { t as isEmpty_default } from "./isEmpty-C-xMag79.js";
|
|
43
|
-
import { C as useEvent_default, S as getBuildingBlocks, _ as useSetAtom, a as getResolvedMarimoConfig, c as AppConfigSchema, d as useJotaiEffect, g as useAtomValue, h as useAtom, i as autoInstantiateAtom, l as createDeepEqualAtom, m as Provider, n as useTheme, o as localeAtom, p as isIslands, r as aiEnabledAtom, s as useResolvedMarimoConfig, t as resolvedThemeAtom, u as store, v as useStore, w as isEqual_default, x as buildStore, y as atom } from "./useTheme-
|
|
44
|
-
import { a as getContainerWidth, n as vegaLoadData, o as getVegaFieldTypes, r as createBatchedLoader, s as tooltipHandler, t as parseCsvData } from "./loader-
|
|
43
|
+
import { C as useEvent_default, S as getBuildingBlocks, _ as useSetAtom, a as getResolvedMarimoConfig, c as AppConfigSchema, d as useJotaiEffect, g as useAtomValue, h as useAtom, i as autoInstantiateAtom, l as createDeepEqualAtom, m as Provider, n as useTheme, o as localeAtom, p as isIslands, r as aiEnabledAtom, s as useResolvedMarimoConfig, t as resolvedThemeAtom, u as store, v as useStore, w as isEqual_default, x as buildStore, y as atom } from "./useTheme-CPybHVFN.js";
|
|
44
|
+
import { a as getContainerWidth, n as vegaLoadData, o as getVegaFieldTypes, r as createBatchedLoader, s as tooltipHandler, t as parseCsvData } from "./loader-CABJs6GU.js";
|
|
45
45
|
import { $ as ViewPlugin, At as Prec, B as tags$1, Dt as EditorState, E as getIndentUnit, Et as EditorSelection, Ft as StateField, I as syntaxTree, It as Text$2, J as parseMixed, L as unfoldAll, Lt as Transaction, Ot as Facet$1, Pt as StateEffect, Q as GutterMarker, S as foldInside, Tt as Compartment, Y as Decoration, Z as EditorView, b as foldAll, dt as keymap, et as WidgetType, f as StreamLanguage, jt as RangeSet, l as LanguageDescription, mt as placeholder, ot as gutter, u as LanguageSupport, ut as hoverTooltip, vt as showPanel, w as foldNodeProp, xt as Annotation, yt as showTooltip } from "./dist-DOoqn-VL.js";
|
|
46
46
|
import { t as invariant } from "./invariant-D9QLJ4SZ.js";
|
|
47
47
|
import { a as arrayInsert, c as arrayShallowEquals, i as arrayDelete, l as uniqueBy, n as once, o as arrayInsertMany, r as Arrays, s as arrayMove, t as memoizeLastValue, u as clamp } from "./once-BqS42WgZ.js";
|
|
48
|
-
import { n as getIframeCapabilities, t as useIframeCapabilities } from "./useIframeCapabilities-
|
|
48
|
+
import { n as getIframeCapabilities, t as useIframeCapabilities } from "./useIframeCapabilities-OQaMKgZl.js";
|
|
49
49
|
import { d as snippet, n as acceptCompletion, o as closeCompletion, r as autocompletion, u as insertCompletionText } from "./dist-CSEWGuDq.js";
|
|
50
50
|
import { t as require_main } from "./main-Tj_-QTyF.js";
|
|
51
51
|
import { a as PLSQL, c as SQLite, d as schemaCompletionSource, f as sql, i as MySQL, l as StandardSQL, n as MSSQL, o as PostgreSQL, r as MariaSQL, s as SQLDialect, t as Cassandra, u as keywordCompletionSource } from "./dist-Bq5eYK43.js";
|
|
@@ -56,10 +56,10 @@ import "./dist-D4gcY469.js";
|
|
|
56
56
|
import { a as parser$1, i as pythonLanguage, n as localCompletionSource, r as python, t as globalCompletion } from "./dist-C4K7pumm.js";
|
|
57
57
|
import { n as stexMath } from "./stex-BIsgBmK4.js";
|
|
58
58
|
import { t as purify } from "./purify.es-DGenX2XH.js";
|
|
59
|
-
import { a as Portal$3, c as prettyError, i as Overlay, n as ErrorBanner, o as Root$7, r as Content$4, s as CellNotInitializedError, t as Banner } from "./error-banner-
|
|
59
|
+
import { a as Portal$3, c as prettyError, i as Overlay, n as ErrorBanner, o as Root$7, r as Content$4, s as CellNotInitializedError, t as Banner } from "./error-banner-Dmi5ujan.js";
|
|
60
60
|
import { n as memoize$1, t as isPropValid } from "./emotion-is-prop-valid.esm-DtW2o230.js";
|
|
61
61
|
import { n as formats } from "./vega-loader.browser-CQ-lnUkI.js";
|
|
62
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
62
|
+
import { t as useAsyncData } from "./useAsyncData-CEjJxwFB.js";
|
|
63
63
|
import "./defaultLocale-Bklbu-Tp.js";
|
|
64
64
|
import "./defaultLocale-CfQ4kBaV.js";
|
|
65
65
|
import { c as katex } from "./katex-Bk_FvVSR.js";
|
|
@@ -15378,9 +15378,7 @@ ${d.join("\n")}`;
|
|
|
15378
15378
|
combine: (e) => e.find((e2) => e2 !== void 0)
|
|
15379
15379
|
});
|
|
15380
15380
|
}
|
|
15381
|
-
singleFacet(), singleFacet(), singleFacet();
|
|
15382
|
-
const cellIdState$1 = singleFacet();
|
|
15383
|
-
singleFacet();
|
|
15381
|
+
const completionConfigState = singleFacet(), hotkeysProviderState = singleFacet(), placeholderState = singleFacet(), cellIdState = singleFacet(), lspConfigState = singleFacet(), historyCompartment = new Compartment();
|
|
15384
15382
|
function notebookIsRunning(e) {
|
|
15385
15383
|
return Object.values(e.cellRuntime).some((e2) => e2.status === "running");
|
|
15386
15384
|
}
|
|
@@ -15427,7 +15425,7 @@ ${d.join("\n")}`;
|
|
|
15427
15425
|
}
|
|
15428
15426
|
const cellActionsState = Facet$1.define({
|
|
15429
15427
|
combine: (e) => e[0]
|
|
15430
|
-
}), cellIdState = Facet$1.define({
|
|
15428
|
+
}), cellIdState$1 = Facet$1.define({
|
|
15431
15429
|
combine: (e) => e[0]
|
|
15432
15430
|
});
|
|
15433
15431
|
var BigQuery = {
|
|
@@ -24938,7 +24936,7 @@ ${d.join("\n")}`;
|
|
|
24938
24936
|
});
|
|
24939
24937
|
return;
|
|
24940
24938
|
}
|
|
24941
|
-
let S = f.transformIn(y)[0], w = e.state.facet(cellActionsState), E = e.state.facet(cellIdState
|
|
24939
|
+
let S = f.transformIn(y)[0], w = e.state.facet(cellActionsState), E = e.state.facet(cellIdState);
|
|
24942
24940
|
w.updateCellCode({
|
|
24943
24941
|
cellId: E,
|
|
24944
24942
|
code: S,
|
|
@@ -31242,6 +31240,10 @@ ${c.sqlString}
|
|
|
31242
31240
|
function updateSQLDialectFromConnection(e, r) {
|
|
31243
31241
|
updateSQLDialect(e, SCHEMA_CACHE.getDialect(r));
|
|
31244
31242
|
}
|
|
31243
|
+
function initializeSQLDialect(e) {
|
|
31244
|
+
let r = getSQLMetadata(e.state).engine;
|
|
31245
|
+
updateSQLDialect(e, SCHEMA_CACHE.getDialect(r));
|
|
31246
|
+
}
|
|
31245
31247
|
function getSQLMetadata(e) {
|
|
31246
31248
|
return e.field(languageMetadataField);
|
|
31247
31249
|
}
|
|
@@ -31314,7 +31316,7 @@ ${c.sqlString}
|
|
|
31314
31316
|
var SQL_VALIDATION_DEBOUNCE_MS = 300;
|
|
31315
31317
|
function sqlValidationExtension() {
|
|
31316
31318
|
return ViewPlugin.define((e) => {
|
|
31317
|
-
let r, c = null, d = e.state.facet(cellIdState);
|
|
31319
|
+
let r, c = null, d = e.state.facet(cellIdState$1);
|
|
31318
31320
|
return {
|
|
31319
31321
|
update(e2) {
|
|
31320
31322
|
if (!e2.docChanged) return;
|
|
@@ -31956,7 +31958,7 @@ ${c.sqlString}
|
|
|
31956
31958
|
let { spanProps: f, inputProps: _ } = useAutoGrowInputProps(d), v;
|
|
31957
31959
|
r[1] === c.state ? v = r[2] : (v = c.state.field(languageAdapterState), r[1] = c.state, r[2] = v);
|
|
31958
31960
|
let y = v, S;
|
|
31959
|
-
r[3] === c.state ? S = r[4] : (S = c.state.facet(cellIdState), r[3] = c.state, r[4] = S);
|
|
31961
|
+
r[3] === c.state ? S = r[4] : (S = c.state.facet(cellIdState$1), r[3] = c.state, r[4] = S);
|
|
31960
31962
|
let w = S, E;
|
|
31961
31963
|
r[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = (0, import_jsx_runtime.jsx)("div", {}), r[5] = E) : E = r[5];
|
|
31962
31964
|
let O = E, M = false, I;
|
|
@@ -32188,7 +32190,7 @@ ${c.sqlString}
|
|
|
32188
32190
|
})
|
|
32189
32191
|
}), r[98] = O, r[99] = y.type, r[100] = G, r[101] = q) : q = r[101], q;
|
|
32190
32192
|
};
|
|
32191
|
-
new Compartment();
|
|
32193
|
+
var languageCompartment = new Compartment();
|
|
32192
32194
|
const setLanguageAdapter = StateEffect.define(), languageAdapterState = StateField.define({
|
|
32193
32195
|
create() {
|
|
32194
32196
|
return LanguageAdapters.python;
|
|
@@ -32199,13 +32201,61 @@ ${c.sqlString}
|
|
|
32199
32201
|
},
|
|
32200
32202
|
provide: (e) => showPanel.from(e, (e2) => e2.type === "python" ? null : (e3) => createPanel(e3, LanguagePanelComponent))
|
|
32201
32203
|
});
|
|
32204
|
+
function updateLanguageAdapterAndCode({ view: e, nextLanguage: r, opts: c }) {
|
|
32205
|
+
let d = e.state.field(languageAdapterState), f = e.state.doc.toString(), _ = e.state.facet(completionConfigState), v = e.state.facet(hotkeysProviderState), y = e.state.facet(placeholderState), S = e.state.facet(cellIdState), w = e.state.facet(lspConfigState), E = e.state.field(languageMetadataField), O = e.state.selection.main.head, M;
|
|
32206
|
+
if (c.keepCodeAsIs) M = f, d.type !== r.type && (E = {
|
|
32207
|
+
...r.defaultMetadata
|
|
32208
|
+
});
|
|
32209
|
+
else {
|
|
32210
|
+
let [e2, c2] = d.transformOut(f, E), [_2, v2, y2] = r.transformIn(e2);
|
|
32211
|
+
O += c2, O -= v2, O = clamp(O, 0, _2.length), M = _2, E = y2;
|
|
32212
|
+
}
|
|
32213
|
+
e.dispatch({
|
|
32214
|
+
effects: [
|
|
32215
|
+
setLanguageAdapter.of(r),
|
|
32216
|
+
setLanguageMetadata.of(E),
|
|
32217
|
+
languageCompartment.reconfigure(r.getExtension(S, _, v, y, w)),
|
|
32218
|
+
historyCompartment.reconfigure([]),
|
|
32219
|
+
formattingChangeEffect.of(true)
|
|
32220
|
+
],
|
|
32221
|
+
changes: c.keepCodeAsIs ? void 0 : {
|
|
32222
|
+
from: 0,
|
|
32223
|
+
to: e.state.doc.length,
|
|
32224
|
+
insert: M
|
|
32225
|
+
},
|
|
32226
|
+
selection: c.keepCodeAsIs ? void 0 : EditorSelection.cursor(O)
|
|
32227
|
+
}), e.dispatch({
|
|
32228
|
+
effects: [
|
|
32229
|
+
historyCompartment.reconfigure([
|
|
32230
|
+
history()
|
|
32231
|
+
])
|
|
32232
|
+
]
|
|
32233
|
+
}), r.type === "sql" && initializeSQLDialect(e);
|
|
32234
|
+
}
|
|
32235
|
+
function languageAdapterFromCode(e) {
|
|
32236
|
+
return e ? LanguageAdapters.markdown.isSupported(e) ? LanguageAdapters.markdown : LanguageAdapters.sql.isSupported(e) ? LanguageAdapters.sql : LanguageAdapters.python : LanguageAdapters.python;
|
|
32237
|
+
}
|
|
32238
|
+
function switchLanguage(e, r) {
|
|
32239
|
+
e.state.field(languageAdapterState).type !== r.language && updateLanguageAdapterAndCode({
|
|
32240
|
+
view: e,
|
|
32241
|
+
nextLanguage: LanguageAdapters[r.language],
|
|
32242
|
+
opts: {
|
|
32243
|
+
keepCodeAsIs: r.keepCodeAsIs ?? false
|
|
32244
|
+
}
|
|
32245
|
+
});
|
|
32246
|
+
}
|
|
32202
32247
|
function getEditorCodeAsPython(e, r, c) {
|
|
32203
32248
|
let d = e.state.field(languageAdapterState), f = e.state.field(languageMetadataField), _ = e.state.doc.toString();
|
|
32204
32249
|
return r === void 0 ? d.transformOut(_, f)[0] : d.transformOut(_.slice(r, c), f)[0];
|
|
32205
32250
|
}
|
|
32206
32251
|
function updateEditorCodeFromPython(e, r) {
|
|
32207
|
-
let
|
|
32208
|
-
|
|
32252
|
+
let c = e.state.field(languageAdapterState), d = languageAdapterFromCode(r);
|
|
32253
|
+
d.type !== c.type && switchLanguage(e, {
|
|
32254
|
+
language: d.type,
|
|
32255
|
+
keepCodeAsIs: true
|
|
32256
|
+
});
|
|
32257
|
+
let [f] = e.state.field(languageAdapterState).transformIn(r);
|
|
32258
|
+
return replaceEditorContent(e, f), f;
|
|
32209
32259
|
}
|
|
32210
32260
|
function splitEditor(e) {
|
|
32211
32261
|
let r = e.state.selection.main.head, c = e.state.doc.toString(), d = c.length > 0 && c[r - 1] === "\n", f = c.length > 0 && c[r] === "\n", _ = d ? r - 1 : r, v = f ? r + 1 : r;
|
|
@@ -37063,7 +37113,10 @@ ${c.sqlString}
|
|
|
37063
37113
|
return (_a3 = r[e2]) == null ? void 0 : _a3.name;
|
|
37064
37114
|
}).filter(Boolean);
|
|
37065
37115
|
};
|
|
37066
|
-
splitAtom(selectAtom(notebookAtom, (e) => e.cellIds.inOrderIds.map((r) => e.cellData[r]))), atom((e) => e(notebookAtom).cellRuntime), atom((e) => notebookIsRunning(e(notebookAtom))), atom((e) =>
|
|
37116
|
+
splitAtom(selectAtom(notebookAtom, (e) => e.cellIds.inOrderIds.map((r) => e.cellData[r]))), atom((e) => e(notebookAtom).cellRuntime), atom((e) => notebookIsRunning(e(notebookAtom))), atom((e) => {
|
|
37117
|
+
let { cellRuntime: r } = e(notebookAtom);
|
|
37118
|
+
return Object.entries(r).every(([e2, r2]) => r2.status !== "running" || e2 === "__scratch__");
|
|
37119
|
+
}), atom((e) => notebookQueueOrRunningCount(e(notebookAtom))), atom((e) => e(notebookAtom).cellIds.colLength), atom((e) => e(notebookAtom).cellIds.idLength > 0), atom((e) => e(notebookAtom).cellIds.getColumnIds());
|
|
37067
37120
|
const cellDataAtom = atomFamily((e) => atom((r) => r(notebookAtom).cellData[e]));
|
|
37068
37121
|
var cellRuntimeAtom = atomFamily((e) => atom((r) => r(notebookAtom).cellRuntime[e]));
|
|
37069
37122
|
const cellHandleAtom = atomFamily((e) => atom((r) => r(notebookAtom).cellHandles[e]));
|
|
@@ -56358,7 +56411,7 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
|
|
|
56358
56411
|
hasConsoleOutput: (v == null ? void 0 : v.consoleOutputs) != null
|
|
56359
56412
|
};
|
|
56360
56413
|
}
|
|
56361
|
-
const LazyAnyLanguageCodeMirror = (0, import_react.lazy)(() => import("./any-language-editor-
|
|
56414
|
+
const LazyAnyLanguageCodeMirror = (0, import_react.lazy)(() => import("./any-language-editor-DlsjUw_l.js"));
|
|
56362
56415
|
var import_compiler_runtime$117 = require_compiler_runtime(), extensions = [
|
|
56363
56416
|
EditorView.lineWrapping
|
|
56364
56417
|
];
|
|
@@ -70724,7 +70777,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
|
|
|
70724
70777
|
return Logger.warn("Failed to get version from mount config"), null;
|
|
70725
70778
|
}
|
|
70726
70779
|
}
|
|
70727
|
-
const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.21.1-
|
|
70780
|
+
const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.21.1-dev21"), showCodeInRunModeAtom = atom(true);
|
|
70728
70781
|
atom(null);
|
|
70729
70782
|
var import_compiler_runtime$89 = require_compiler_runtime();
|
|
70730
70783
|
function useKeydownOnElement(e, r) {
|
|
@@ -72283,7 +72336,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
|
|
|
72283
72336
|
"time",
|
|
72284
72337
|
"unknown"
|
|
72285
72338
|
];
|
|
72286
|
-
var import_compiler_runtime$82 = require_compiler_runtime(), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-
|
|
72339
|
+
var import_compiler_runtime$82 = require_compiler_runtime(), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-pZyd9UJ_.js").then(async (m2) => {
|
|
72287
72340
|
await m2.__tla;
|
|
72288
72341
|
return m2;
|
|
72289
72342
|
}));
|
|
@@ -82379,7 +82432,7 @@ ${c}
|
|
|
82379
82432
|
fullWidth: y,
|
|
82380
82433
|
children: G
|
|
82381
82434
|
}), r[19] = y, r[20] = S, r[21] = c, r[22] = G, r[23] = q) : q = r[23], q;
|
|
82382
|
-
}, LazyDataExplorerComponent = import_react.lazy(() => import("./ConnectedDataExplorerComponent-
|
|
82435
|
+
}, LazyDataExplorerComponent = import_react.lazy(() => import("./ConnectedDataExplorerComponent-D0GoOd_c.js"));
|
|
82383
82436
|
const DataExplorerPlugin = createPlugin("marimo-data-explorer").withData(object$1({
|
|
82384
82437
|
label: string().nullish(),
|
|
82385
82438
|
data: string()
|
|
@@ -93466,7 +93519,7 @@ ${c}
|
|
|
93466
93519
|
return true;
|
|
93467
93520
|
}
|
|
93468
93521
|
}
|
|
93469
|
-
var LazyVegaComponent = import_react.lazy(() => import("./vega-component-
|
|
93522
|
+
var LazyVegaComponent = import_react.lazy(() => import("./vega-component-CuPTCRp5.js")), VegaPlugin = class {
|
|
93470
93523
|
constructor() {
|
|
93471
93524
|
__publicField(this, "tagName", "marimo-vega");
|
|
93472
93525
|
__publicField(this, "validator", object$1({
|
|
@@ -93607,7 +93660,7 @@ ${c}
|
|
|
93607
93660
|
children: e.children
|
|
93608
93661
|
});
|
|
93609
93662
|
}
|
|
93610
|
-
}, LazySlidesComponent$1 = import_react.lazy(() => import("./slides-component-
|
|
93663
|
+
}, LazySlidesComponent$1 = import_react.lazy(() => import("./slides-component-GkilRW21.js"));
|
|
93611
93664
|
const DownloadPlugin = createPlugin("marimo-download").withData(object$1({
|
|
93612
93665
|
data: string(),
|
|
93613
93666
|
disabled: boolean().default(false),
|
|
@@ -93789,7 +93842,7 @@ ${c}
|
|
|
93789
93842
|
diagram: e.data.diagram
|
|
93790
93843
|
});
|
|
93791
93844
|
}
|
|
93792
|
-
}, LazyMermaid = (0, import_react.lazy)(() => import("./mermaid-
|
|
93845
|
+
}, LazyMermaid = (0, import_react.lazy)(() => import("./mermaid-CrKqsE2j.js").then(async (m2) => {
|
|
93793
93846
|
await m2.__tla;
|
|
93794
93847
|
return m2;
|
|
93795
93848
|
})), import_compiler_runtime$18 = require_compiler_runtime();
|
|
@@ -99909,7 +99962,7 @@ ${c}
|
|
|
99909
99962
|
cells: []
|
|
99910
99963
|
})
|
|
99911
99964
|
};
|
|
99912
|
-
var import_compiler_runtime$8 = require_compiler_runtime(), LazySlidesComponent = import_react.lazy(() => import("./slides-component-
|
|
99965
|
+
var import_compiler_runtime$8 = require_compiler_runtime(), LazySlidesComponent = import_react.lazy(() => import("./slides-component-GkilRW21.js"));
|
|
99913
99966
|
const SlidesLayoutRenderer = (e) => {
|
|
99914
99967
|
let r = (0, import_compiler_runtime$8.c)(11), { cells: c, mode: d } = e, f = d === "read", _;
|
|
99915
99968
|
if (r[0] !== c || r[1] !== d) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { g as Logger } from "./button-
|
|
5
|
-
import "./Combination-
|
|
4
|
+
import { g as Logger } from "./button-BKkuUpZh.js";
|
|
5
|
+
import "./Combination-BBPQRrDo.js";
|
|
6
6
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
7
7
|
import "./react-dom-CqtLRVZP.js";
|
|
8
8
|
import { t as isEmpty_default } from "./isEmpty-C-xMag79.js";
|
|
9
|
-
import { n as useTheme } from "./useTheme-
|
|
9
|
+
import { n as useTheme } from "./useTheme-CPybHVFN.js";
|
|
10
10
|
import { t as purify } from "./purify.es-DGenX2XH.js";
|
|
11
|
-
import { n as ErrorBanner } from "./error-banner-
|
|
12
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
11
|
+
import { n as ErrorBanner } from "./error-banner-Dmi5ujan.js";
|
|
12
|
+
import { t as useAsyncData } from "./useAsyncData-CEjJxwFB.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-BRT9vd1R.js";
|
|
14
14
|
import { a as setLogLevel, i as log, r as __name, t as select_default } from "./src-CHUphWwL.js";
|
|
15
15
|
import { t as package_default } from "./chunk-DR5Q36YT-D4q96vNV.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { f as useEventListener, t as Button, y as cn } from "./button-
|
|
4
|
+
import { f as useEventListener, t as Button, y as cn } from "./button-BKkuUpZh.js";
|
|
5
5
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
6
|
-
import { t as useIframeCapabilities } from "./useIframeCapabilities-
|
|
6
|
+
import { t as useIframeCapabilities } from "./useIframeCapabilities-OQaMKgZl.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,13 +1,13 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { l as createLucideIcon } from "./dist-
|
|
5
|
-
import { M as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, O as logNever, k as upperFirst_default } from "./label-
|
|
6
|
-
import { a as cva, g as Logger, y as cn } from "./button-
|
|
4
|
+
import { l as createLucideIcon } from "./dist-C0Rnbr-_.js";
|
|
5
|
+
import { M as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, O as logNever, k as upperFirst_default } from "./label-BbpGrh4j.js";
|
|
6
|
+
import { a as cva, g as Logger, y as cn } from "./button-BKkuUpZh.js";
|
|
7
7
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
8
8
|
import { t as toString_default } from "./toString-DbIAWQpF.js";
|
|
9
9
|
import { t as _arrayReduce_default } from "./_arrayReduce-BfFy684W.js";
|
|
10
|
-
import { _ as useSetAtom, y as atom } from "./useTheme-
|
|
10
|
+
import { _ as useSetAtom, y as atom } from "./useTheme-CPybHVFN.js";
|
|
11
11
|
var AlignCenterVertical = createLucideIcon("align-center-vertical", [
|
|
12
12
|
["path", {
|
|
13
13
|
d: "M12 2v20",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { a as Content, i as Arrow, o as Root2, r as Anchor, s as createPopperScope, t as Root } from "./dist-
|
|
5
|
-
import { m as useComposedRefs, y as cn } from "./button-
|
|
6
|
-
import { _t as createContextScope, at as useControllableState, ct as useId, ft as Primitive, ht as createSlottable, it as StyleNamespace, nt as withSmartCollisionBoundary, ot as Presence, st as Portal, tt as withFullScreenAsRoot, ut as DismissableLayer, vt as composeEventHandlers } from "./Combination-
|
|
4
|
+
import { a as Content, i as Arrow, o as Root2, r as Anchor, s as createPopperScope, t as Root } from "./dist-C0Rnbr-_.js";
|
|
5
|
+
import { m as useComposedRefs, y as cn } from "./button-BKkuUpZh.js";
|
|
6
|
+
import { _t as createContextScope, at as useControllableState, ct as useId, ft as Primitive, ht as createSlottable, it as StyleNamespace, nt as withSmartCollisionBoundary, ot as Presence, st as Portal, tt as withFullScreenAsRoot, ut as DismissableLayer, vt as composeEventHandlers } from "./Combination-BBPQRrDo.js";
|
|
7
7
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
8
8
|
var import_react = /* @__PURE__ */ __toESM(require_react(), 1), import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime(), 1), [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [createPopperScope]), usePopperScope = createPopperScope(), PROVIDER_NAME = "TooltipProvider", DEFAULT_DELAY_DURATION = 700, TOOLTIP_OPEN = "tooltip.open", [TooltipProviderContextProvider, useTooltipProviderContext] = createTooltipContext(PROVIDER_NAME), TooltipProvider$1 = (t) => {
|
|
9
9
|
let { __scopeTooltip: k, delayDuration: A = DEFAULT_DELAY_DURATION, skipDelayDuration: j = 300, disableHoverableContent: M = false, children: N } = t, P = import_react.useRef(true), F = import_react.useRef(false), I = import_react.useRef(0);
|
|
@@ -5,17 +5,17 @@ var _a;
|
|
|
5
5
|
import { s as __toESM, t as __commonJSMin } from "./chunk-BNovOVIE.js";
|
|
6
6
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
7
7
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
8
|
-
import { a as Content, i as Arrow, l as createLucideIcon, o as Root2$1, r as Anchor, s as createPopperScope } from "./dist-
|
|
9
|
-
import { t as Check } from "./check-
|
|
10
|
-
import { A as $a916eb452884faea$export$b7a616150fdb9f44, C as useDirection, F as $b5e257d569688ac6$export$619500959fc48b26, I as X, L as ChevronUp, M as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, R as ChevronDown, _ as menuItemVariants, b as menuSubTriggerVariants, g as menuControlVariants, h as menuControlCheckVariants, j as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5, k as upperFirst_default, m as menuContentCommon, v as menuLabelVariants, w as createCollection, y as menuSeparatorVariants } from "./label-
|
|
8
|
+
import { a as Content, i as Arrow, l as createLucideIcon, o as Root2$1, r as Anchor, s as createPopperScope } from "./dist-C0Rnbr-_.js";
|
|
9
|
+
import { t as Check } from "./check-Diwc5emq.js";
|
|
10
|
+
import { A as $a916eb452884faea$export$b7a616150fdb9f44, C as useDirection, F as $b5e257d569688ac6$export$619500959fc48b26, I as X, L as ChevronUp, M as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, R as ChevronDown, _ as menuItemVariants, b as menuSubTriggerVariants, g as menuControlVariants, h as menuControlCheckVariants, j as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5, k as upperFirst_default, m as menuContentCommon, v as menuLabelVariants, w as createCollection, y as menuSeparatorVariants } from "./label-BbpGrh4j.js";
|
|
11
11
|
import { n as clsx_default } from "./clsx-D2KVTYnW.js";
|
|
12
|
-
import { g as Logger, h as Events, m as useComposedRefs, p as composeRefs, t as Button, y as cn } from "./button-
|
|
13
|
-
import { _t as createContextScope, at as useControllableState, ct as useId, dt as useCallbackRef, et as MAX_HEIGHT_OFFSET, ft as Primitive, i as useFocusGuards, it as StyleNamespace, mt as createSlot, n as hideOthers, nt as withSmartCollisionBoundary, ot as Presence, pt as dispatchDiscreteCustomEvent, r as FocusScope, st as Portal, t as Combination_default, tt as withFullScreenAsRoot, ut as DismissableLayer, vt as composeEventHandlers } from "./Combination-
|
|
12
|
+
import { g as Logger, h as Events, m as useComposedRefs, p as composeRefs, t as Button, y as cn } from "./button-BKkuUpZh.js";
|
|
13
|
+
import { _t as createContextScope, at as useControllableState, ct as useId, dt as useCallbackRef, et as MAX_HEIGHT_OFFSET, ft as Primitive, i as useFocusGuards, it as StyleNamespace, mt as createSlot, n as hideOthers, nt as withSmartCollisionBoundary, ot as Presence, pt as dispatchDiscreteCustomEvent, r as FocusScope, st as Portal, t as Combination_default, tt as withFullScreenAsRoot, ut as DismissableLayer, vt as composeEventHandlers } from "./Combination-BBPQRrDo.js";
|
|
14
14
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
15
15
|
import { t as require_react_dom } from "./react-dom-CqtLRVZP.js";
|
|
16
16
|
import { t as toString_default } from "./toString-DbIAWQpF.js";
|
|
17
17
|
import { i as debounce_default, n as Constants } from "./constants-CytQ_3LM.js";
|
|
18
|
-
import { C as useEvent_default } from "./useTheme-
|
|
18
|
+
import { C as useEvent_default } from "./useTheme-CPybHVFN.js";
|
|
19
19
|
import { t as memoizeLastValue } from "./once-BqS42WgZ.js";
|
|
20
20
|
var ChevronRight = createLucideIcon("chevron-right", [["path", {
|
|
21
21
|
d: "m9 18 6-6-6-6",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { C as useEvent_default } from "./useTheme-
|
|
4
|
+
import { C as useEvent_default } from "./useTheme-CPybHVFN.js";
|
|
5
5
|
import { t as invariant } from "./invariant-D9QLJ4SZ.js";
|
|
6
6
|
var import_compiler_runtime = require_compiler_runtime(), import_react = /* @__PURE__ */ __toESM(require_react(), 1), Result = {
|
|
7
7
|
error(e, s) {
|
|
@@ -4,12 +4,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4
4
|
import { s as __toESM, t as __commonJSMin } from "./chunk-BNovOVIE.js";
|
|
5
5
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
6
6
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
7
|
-
import { l as createLucideIcon } from "./dist-
|
|
8
|
-
import { a as cva, g as Logger, y as cn } from "./button-
|
|
7
|
+
import { l as createLucideIcon } from "./dist-C0Rnbr-_.js";
|
|
8
|
+
import { a as cva, g as Logger, y as cn } from "./button-BKkuUpZh.js";
|
|
9
9
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
10
10
|
import { r as KnownQueryParams } from "./constants-CytQ_3LM.js";
|
|
11
|
-
import { f as waitFor, p as isIslands, u as store, y as atom } from "./useTheme-
|
|
12
|
-
import { i as tableFromIPC } from "./loader-
|
|
11
|
+
import { f as waitFor, p as isIslands, u as store, y as atom } from "./useTheme-CPybHVFN.js";
|
|
12
|
+
import { i as tableFromIPC } from "./loader-CABJs6GU.js";
|
|
13
13
|
var CircleQuestionMark = createLucideIcon("circle-question-mark", [
|
|
14
14
|
["circle", {
|
|
15
15
|
cx: "12",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { g as Logger } from "./button-
|
|
4
|
+
import { g as Logger } from "./button-BKkuUpZh.js";
|
|
5
5
|
import { n as once } from "./once-BqS42WgZ.js";
|
|
6
6
|
function testStorage(e) {
|
|
7
7
|
try {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { g as Logger, s as OverridingHotkeyProvider, u as resolvePlatform } from "./button-
|
|
5
|
-
import { B as record, H as string, L as number, O as array, P as looseObject, R as object, W as union, k as boolean, w as _enum } from "./Combination-
|
|
4
|
+
import { g as Logger, s as OverridingHotkeyProvider, u as resolvePlatform } from "./button-BKkuUpZh.js";
|
|
5
|
+
import { B as record, H as string, L as number, O as array, P as looseObject, R as object, W as union, k as boolean, w as _enum } from "./Combination-BBPQRrDo.js";
|
|
6
6
|
import { t as _baseIsEqual_default } from "./_baseIsEqual-CvgsjYoW.js";
|
|
7
7
|
import { t as merge_default } from "./merge-NuyC7LN7.js";
|
|
8
8
|
function isEqual(e, A) {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { S as CircleQuestionMark, a as AlertTitle, m as asRemoteURL, n as arrow, o as isValid, r as Alert, t as useDeepCompareMemoize } from "./useDeepCompareMemoize-
|
|
5
|
-
import { d as Objects, g as Logger, h as Events, y as cn } from "./button-
|
|
6
|
-
import "./Combination-
|
|
4
|
+
import { S as CircleQuestionMark, a as AlertTitle, m as asRemoteURL, n as arrow, o as isValid, r as Alert, t as useDeepCompareMemoize } from "./useDeepCompareMemoize-BWUwfh37.js";
|
|
5
|
+
import { d as Objects, g as Logger, h as Events, y as cn } from "./button-BKkuUpZh.js";
|
|
6
|
+
import "./Combination-BBPQRrDo.js";
|
|
7
7
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
8
8
|
import "./react-dom-CqtLRVZP.js";
|
|
9
|
-
import { t as Tooltip } from "./tooltip-
|
|
9
|
+
import { t as Tooltip } from "./tooltip-CKG75XQa.js";
|
|
10
10
|
import { i as debounce_default } from "./constants-CytQ_3LM.js";
|
|
11
|
-
import { C as useEvent_default, n as useTheme } from "./useTheme-
|
|
12
|
-
import { a as getContainerWidth, n as vegaLoadData, s as tooltipHandler } from "./loader-
|
|
11
|
+
import { C as useEvent_default, n as useTheme } from "./useTheme-CPybHVFN.js";
|
|
12
|
+
import { a as getContainerWidth, n as vegaLoadData, s as tooltipHandler } from "./loader-CABJs6GU.js";
|
|
13
13
|
import { t as uniq_default } from "./uniq-H2E5nMLq.js";
|
|
14
|
-
import { n as ErrorBanner } from "./error-banner-
|
|
14
|
+
import { n as ErrorBanner } from "./error-banner-Dmi5ujan.js";
|
|
15
15
|
import { n as formats } from "./vega-loader.browser-CQ-lnUkI.js";
|
|
16
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
16
|
+
import { t as useAsyncData } from "./useAsyncData-CEjJxwFB.js";
|
|
17
17
|
import { t as j } from "./react-vega-C6kwcd86.js";
|
|
18
18
|
import "./defaultLocale-Bklbu-Tp.js";
|
|
19
19
|
import "./defaultLocale-CfQ4kBaV.js";
|
package/package.json
CHANGED
|
@@ -41,7 +41,10 @@ import { hasOnlyOneCellAtom, useCellActions } from "@/core/cells/cells";
|
|
|
41
41
|
import { type CellId, SETUP_CELL_ID } from "@/core/cells/ids";
|
|
42
42
|
import type { CellData } from "@/core/cells/types";
|
|
43
43
|
import { formatEditorViews } from "@/core/codemirror/format";
|
|
44
|
-
import {
|
|
44
|
+
import {
|
|
45
|
+
getCurrentLanguageAdapter,
|
|
46
|
+
toggleToLanguage,
|
|
47
|
+
} from "@/core/codemirror/language/commands";
|
|
45
48
|
import { switchLanguage } from "@/core/codemirror/language/extension";
|
|
46
49
|
import { MARKDOWN_INITIAL_HIDE_CODE } from "@/core/codemirror/language/languages/markdown";
|
|
47
50
|
import {
|
|
@@ -235,35 +238,41 @@ export function useCellActionButtons({ cell, closePopover }: Props) {
|
|
|
235
238
|
},
|
|
236
239
|
hidden: isSetupCell,
|
|
237
240
|
},
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
241
|
+
// We need to check this here because the user may have toggled the language
|
|
242
|
+
getCurrentLanguageAdapter(getEditorView()) === "sql"
|
|
243
|
+
? {
|
|
244
|
+
icon: <PythonIcon />,
|
|
245
|
+
label: "View as Python",
|
|
246
|
+
hotkey: "cell.viewAsSQL",
|
|
247
|
+
handle: () => {
|
|
248
|
+
const editorView = getEditorView();
|
|
249
|
+
if (!editorView) {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
toggleToLanguage(editorView, "python", { force: true });
|
|
253
|
+
},
|
|
254
|
+
hidden: isSetupCell,
|
|
245
255
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
},
|
|
256
|
+
: {
|
|
257
|
+
icon: <DatabaseIcon size={13} strokeWidth={1.5} />,
|
|
258
|
+
label: "Convert to SQL",
|
|
259
|
+
hotkey: "cell.viewAsSQL",
|
|
260
|
+
handle: () => {
|
|
261
|
+
const editorView = getEditorView();
|
|
262
|
+
if (!editorView) {
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
maybeAddMarimoImport({
|
|
266
|
+
autoInstantiate,
|
|
267
|
+
createNewCell: createCell,
|
|
268
|
+
});
|
|
269
|
+
switchLanguage(editorView, {
|
|
270
|
+
language: "sql",
|
|
271
|
+
keepCodeAsIs: false,
|
|
272
|
+
});
|
|
273
|
+
},
|
|
274
|
+
hidden: isSetupCell,
|
|
275
|
+
},
|
|
267
276
|
],
|
|
268
277
|
|
|
269
278
|
// Movement
|
|
@@ -163,6 +163,13 @@ const CellEditorInternal = ({
|
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
165
|
|
|
166
|
+
const afterToggleSQL = useEvent(() => {
|
|
167
|
+
maybeAddMarimoImport({
|
|
168
|
+
autoInstantiate,
|
|
169
|
+
createNewCell: cellActions.createNewCell,
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
|
|
166
173
|
const aiEnabled = isAiEnabled(userConfig);
|
|
167
174
|
|
|
168
175
|
const extensions = useMemo(() => {
|
|
@@ -173,6 +180,7 @@ const CellEditorInternal = ({
|
|
|
173
180
|
cellActions: {
|
|
174
181
|
...cellActions,
|
|
175
182
|
afterToggleMarkdown,
|
|
183
|
+
afterToggleSQL,
|
|
176
184
|
onRun: handleRunCell,
|
|
177
185
|
deleteCell: handleDelete,
|
|
178
186
|
saveNotebook: saveOrNameNotebook,
|
|
@@ -267,6 +275,7 @@ const CellEditorInternal = ({
|
|
|
267
275
|
handleRunCell,
|
|
268
276
|
setAiCompletionCell,
|
|
269
277
|
afterToggleMarkdown,
|
|
278
|
+
afterToggleSQL,
|
|
270
279
|
setLanguageAdapter,
|
|
271
280
|
showHiddenCode,
|
|
272
281
|
saveOrNameNotebook,
|
|
@@ -5,6 +5,7 @@ import { HourglassIcon, LockIcon, UnlinkIcon } from "lucide-react";
|
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { Tooltip } from "@/components/ui/tooltip";
|
|
7
7
|
import { notebookScrollToRunning } from "@/core/cells/actions";
|
|
8
|
+
import { onlyScratchpadIsRunningAtom } from "@/core/cells/cells";
|
|
8
9
|
import { viewStateAtom } from "@/core/mode";
|
|
9
10
|
import { type ConnectionStatus, WebSocketState } from "@/core/websocket/types";
|
|
10
11
|
import { cn } from "@/utils/cn";
|
|
@@ -52,17 +53,24 @@ const LockedIcon = () => (
|
|
|
52
53
|
</Tooltip>
|
|
53
54
|
);
|
|
54
55
|
|
|
55
|
-
const RunningIcon = () =>
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
56
|
+
const RunningIcon = () => {
|
|
57
|
+
const scratchpadOnly = useAtomValue(onlyScratchpadIsRunningAtom);
|
|
58
|
+
const tooltip = scratchpadOnly
|
|
59
|
+
? "Scratchpad is running"
|
|
60
|
+
: "Jump to running cell";
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<Tooltip content={tooltip} side="right">
|
|
64
|
+
<div
|
|
65
|
+
className={topLeftStatus}
|
|
66
|
+
data-testid="loading-indicator"
|
|
67
|
+
onClick={scratchpadOnly ? undefined : notebookScrollToRunning}
|
|
68
|
+
>
|
|
69
|
+
<HourglassIcon className="running-app-icon" size={30} strokeWidth={1} />
|
|
70
|
+
</div>
|
|
71
|
+
</Tooltip>
|
|
72
|
+
);
|
|
73
|
+
};
|
|
66
74
|
|
|
67
75
|
const NoiseBackground = () => (
|
|
68
76
|
<>
|
package/src/core/cells/cells.ts
CHANGED
|
@@ -1640,6 +1640,12 @@ export const cellsRuntimeAtom = atom((get) => get(notebookAtom).cellRuntime);
|
|
|
1640
1640
|
export const notebookIsRunningAtom = atom((get) =>
|
|
1641
1641
|
notebookIsRunning(get(notebookAtom)),
|
|
1642
1642
|
);
|
|
1643
|
+
export const onlyScratchpadIsRunningAtom = atom((get) => {
|
|
1644
|
+
const { cellRuntime } = get(notebookAtom);
|
|
1645
|
+
return Object.entries(cellRuntime).every(
|
|
1646
|
+
([id, rt]) => rt.status !== "running" || id === SCRATCH_CELL_ID,
|
|
1647
|
+
);
|
|
1648
|
+
});
|
|
1643
1649
|
export const notebookQueuedOrRunningCountAtom = atom((get) =>
|
|
1644
1650
|
notebookQueueOrRunningCount(get(notebookAtom)),
|
|
1645
1651
|
);
|
package/src/core/cells/utils.ts
CHANGED
|
@@ -11,6 +11,7 @@ export function notebookIsRunning(state: NotebookState) {
|
|
|
11
11
|
(cell) => cell.status === "running",
|
|
12
12
|
);
|
|
13
13
|
}
|
|
14
|
+
|
|
14
15
|
export function notebookQueueOrRunningCount(state: NotebookState) {
|
|
15
16
|
return Object.values(state.cellRuntime).filter(
|
|
16
17
|
(cell) => cell.status === "running" || cell.status === "queued",
|
|
@@ -45,6 +45,7 @@ function getOpts() {
|
|
|
45
45
|
onRun: namedFunction("onRun"),
|
|
46
46
|
deleteCell: namedFunction("deleteCell"),
|
|
47
47
|
afterToggleMarkdown: namedFunction("afterToggleMarkdown"),
|
|
48
|
+
afterToggleSQL: namedFunction("afterToggleSQL"),
|
|
48
49
|
} as unknown as CodemirrorCellActions,
|
|
49
50
|
completionConfig: {
|
|
50
51
|
activate_on_typing: false,
|
|
@@ -42,6 +42,26 @@ export function formatKeymapExtension(hotkeys: HotkeyProvider) {
|
|
|
42
42
|
actions.afterToggleMarkdown();
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
return response !== false;
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: hotkeys.getHotkey("cell.viewAsSQL").key,
|
|
50
|
+
preventDefault: true,
|
|
51
|
+
run: (ev) => {
|
|
52
|
+
const currentLanguage = getCurrentLanguageAdapter(ev);
|
|
53
|
+
const destinationLanguage =
|
|
54
|
+
currentLanguage === "sql" ? "python" : "sql";
|
|
55
|
+
|
|
56
|
+
const response = toggleToLanguage(ev, destinationLanguage, {
|
|
57
|
+
force: true,
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
if (response === "sql") {
|
|
61
|
+
const actions = ev.state.facet(cellActionsState);
|
|
62
|
+
actions.afterToggleSQL();
|
|
63
|
+
}
|
|
64
|
+
|
|
45
65
|
return response !== false;
|
|
46
66
|
},
|
|
47
67
|
},
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
import type { EditorState } from "@codemirror/state";
|
|
4
4
|
import type { EditorView } from "@codemirror/view";
|
|
5
5
|
import { replaceEditorContent } from "../replace-editor-content";
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
languageAdapterFromCode,
|
|
8
|
+
languageAdapterState,
|
|
9
|
+
switchLanguage,
|
|
10
|
+
} from "./extension";
|
|
7
11
|
import { languageMetadataField } from "./metadata";
|
|
8
12
|
|
|
9
13
|
/**
|
|
@@ -35,6 +39,17 @@ export function updateEditorCodeFromPython(
|
|
|
35
39
|
editor: EditorView,
|
|
36
40
|
pythonCode: string,
|
|
37
41
|
): string {
|
|
42
|
+
const currentAdapter = editor.state.field(languageAdapterState);
|
|
43
|
+
const correctAdapter = languageAdapterFromCode(pythonCode);
|
|
44
|
+
|
|
45
|
+
// If the language type changed (e.g., markdown → python), switch adapters
|
|
46
|
+
if (correctAdapter.type !== currentAdapter.type) {
|
|
47
|
+
switchLanguage(editor, {
|
|
48
|
+
language: correctAdapter.type,
|
|
49
|
+
keepCodeAsIs: true,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
38
53
|
const languageAdapter = editor.state.field(languageAdapterState);
|
|
39
54
|
const [code] = languageAdapter.transformIn(pythonCode);
|
|
40
55
|
// Use replaceEditorContent which preserves cursor position when focused
|
|
@@ -142,6 +142,14 @@ const DEFAULT_HOT_KEY = {
|
|
|
142
142
|
group: "Editing",
|
|
143
143
|
key: "Mod-Shift-m",
|
|
144
144
|
},
|
|
145
|
+
"cell.viewAsSQL": {
|
|
146
|
+
name: "Toggle SQL",
|
|
147
|
+
group: "Editing",
|
|
148
|
+
key: {
|
|
149
|
+
windows: "Alt-Shift-l",
|
|
150
|
+
main: "Mod-Shift-l",
|
|
151
|
+
},
|
|
152
|
+
},
|
|
145
153
|
"cell.complete": {
|
|
146
154
|
name: "Code completion",
|
|
147
155
|
group: "Editing",
|