@marimo-team/islands 0.18.5-dev168 → 0.18.5-dev171
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-CoheOLQf.js → Combination-33P1MEPK.js} +1 -1
- package/dist/{ConnectedDataExplorerComponent-BhnOd8mV.js → ConnectedDataExplorerComponent-BIfUtj_S.js} +9 -9
- package/dist/{any-language-editor-CO_tO4mX.js → any-language-editor-Bda9cY1_.js} +4 -4
- package/dist/{button-BE_o5IpN.js → button-BlF-78eJ.js} +1 -1
- package/dist/{check-Crt1N6cj.js → check-DDykH_Yi.js} +1 -1
- package/dist/{copy-BmWLlwa6.js → copy-B5nooU3m.js} +2 -2
- package/dist/{error-banner-DyX88bLT.js → error-banner-UH0Nxilf.js} +3 -3
- package/dist/{esm-CiSvoGHk.js → esm-D197NGQX.js} +4 -4
- package/dist/{glide-data-editor-tS-A6Szz.js → glide-data-editor-DWlk0mEY.js} +7 -7
- package/dist/{hotkeys-BUVs9ecz.js → hotkeys-C4e3s3sJ.js} +2 -2
- package/dist/{label-C3TPGdQ0.js → label-oKuiQuiM.js} +4 -4
- package/dist/{loader-Cn9P1Cko.js → loader-DH7xXi-E.js} +1 -1
- package/dist/main.js +113 -61
- package/dist/{mermaid-BAHK5egT.js → mermaid-JA6veDHv.js} +3 -3
- package/dist/{slides-component-oQmowhoJ.js → slides-component-BNbVrOMb.js} +2 -2
- package/dist/{spec-D-_Yj0lh.js → spec-hsYzGr6F.js} +5 -5
- package/dist/style.css +1 -1
- package/dist/{types-CJDsYooe.js → types-DEmfj_i8.js} +6 -6
- package/dist/{useAsyncData-CaouoMw5.js → useAsyncData-BGpae_uu.js} +1 -1
- package/dist/{useDeepCompareMemoize-B01JaKw2.js → useDeepCompareMemoize-D3uOrgqD.js} +5 -5
- package/dist/{useIframeCapabilities-oYhPeWtR.js → useIframeCapabilities-BsIPDupA.js} +1 -1
- package/dist/{useTheme-DLCDAdUO.js → useTheme-DdLjooMf.js} +1 -1
- package/dist/{vega-component-D36WQQq8.js → vega-component-C1FaaACt.js} +8 -8
- package/package.json +1 -1
- package/src/components/editor/actions/useNotebookActions.tsx +1 -1
- package/src/components/editor/chrome/panels/panel-context.tsx +34 -0
- package/src/components/editor/chrome/state.ts +30 -15
- package/src/components/editor/chrome/types.ts +67 -77
- package/src/components/editor/chrome/wrapper/app-chrome.tsx +216 -139
- package/src/components/editor/chrome/wrapper/sidebar.tsx +76 -43
- package/src/components/scratchpad/scratchpad.tsx +17 -4
- package/src/components/ui/reorderable-list.tsx +190 -31
- package/src/core/codemirror/cells/extensions.ts +7 -4
- package/src/core/hotkeys/__tests__/shortcuts.test.ts +61 -4
- package/src/core/hotkeys/shortcuts.ts +34 -2
|
@@ -5,15 +5,15 @@ var _a;
|
|
|
5
5
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
6
6
|
import { t as require_react } from "./react-DdA8EBol.js";
|
|
7
7
|
import { t as require_compiler_runtime } from "./compiler-runtime-DHFVbq0b.js";
|
|
8
|
-
import { D as dispatchDiscreteCustomEvent, E as Primitive, M as composeEventHandlers, N as createLucideIcon, O as createSlot, S as useId, T as useCallbackRef, _ as Arrow, b as createPopperScope, c as withSmartCollisionBoundary, g as Anchor, h as Portal, i as useFocusGuards, j as createContextScope, m as Presence, n as hideOthers, o as MAX_HEIGHT_OFFSET, p as useControllableState, r as FocusScope, s as withFullScreenAsRoot, t as Combination_default, u as StyleNamespace, v as Content, w as DismissableLayer, y as Root2$1 } from "./Combination-
|
|
9
|
-
import { t as Check } from "./check-
|
|
10
|
-
import { B as ChevronDown, C as useDirection, L as $b5e257d569688ac6$export$619500959fc48b26, M as $a916eb452884faea$export$b7a616150fdb9f44, N as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5, P as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, R as X, _ as menuItemVariants, b as menuSubTriggerVariants, g as menuControlVariants, h as menuControlCheckVariants, j as upperFirst_default, m as menuContentCommon, v as menuLabelVariants, w as createCollection, y as menuSeparatorVariants, z as ChevronUp } from "./label-
|
|
8
|
+
import { D as dispatchDiscreteCustomEvent, E as Primitive, M as composeEventHandlers, N as createLucideIcon, O as createSlot, S as useId, T as useCallbackRef, _ as Arrow, b as createPopperScope, c as withSmartCollisionBoundary, g as Anchor, h as Portal, i as useFocusGuards, j as createContextScope, m as Presence, n as hideOthers, o as MAX_HEIGHT_OFFSET, p as useControllableState, r as FocusScope, s as withFullScreenAsRoot, t as Combination_default, u as StyleNamespace, v as Content, w as DismissableLayer, y as Root2$1 } from "./Combination-33P1MEPK.js";
|
|
9
|
+
import { t as Check } from "./check-DDykH_Yi.js";
|
|
10
|
+
import { B as ChevronDown, C as useDirection, L as $b5e257d569688ac6$export$619500959fc48b26, M as $a916eb452884faea$export$b7a616150fdb9f44, N as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5, P as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, R as X, _ as menuItemVariants, b as menuSubTriggerVariants, g as menuControlVariants, h as menuControlCheckVariants, j as upperFirst_default, m as menuContentCommon, v as menuLabelVariants, w as createCollection, y as menuSeparatorVariants, z as ChevronUp } from "./label-oKuiQuiM.js";
|
|
11
11
|
import { n as clsx_default } from "./clsx-D2KVTYnW.js";
|
|
12
|
-
import { c as useComposedRefs, l as Events, s as composeRefs, t as Button, u as cn } from "./button-
|
|
13
|
-
import { s as Logger } from "./hotkeys-
|
|
12
|
+
import { c as useComposedRefs, l as Events, s as composeRefs, t as Button, u as cn } from "./button-BlF-78eJ.js";
|
|
13
|
+
import { s as Logger } from "./hotkeys-C4e3s3sJ.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-DJW8xUDg.js";
|
|
16
|
-
import { h as useEvent_default } from "./useTheme-
|
|
16
|
+
import { h as useEvent_default } from "./useTheme-DdLjooMf.js";
|
|
17
17
|
import { t as toString_default } from "./toString-C4TLO6FA.js";
|
|
18
18
|
import { i as debounce_default, n as Constants } from "./constants-DuN_eoAL.js";
|
|
19
19
|
import { t as memoizeLastValue } from "./once-C-NkXwWJ.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-DdA8EBol.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-DHFVbq0b.js";
|
|
4
|
-
import { h as useEvent_default } from "./useTheme-
|
|
4
|
+
import { h as useEvent_default } from "./useTheme-DdLjooMf.js";
|
|
5
5
|
import { t as invariant } from "./invariant-BW72tHBT.js";
|
|
6
6
|
var import_compiler_runtime = require_compiler_runtime(), import_react = /* @__PURE__ */ __toESM(require_react(), 1), Result = {
|
|
7
7
|
error(e, s) {
|
|
@@ -4,13 +4,13 @@ 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-DdA8EBol.js";
|
|
6
6
|
import { t as require_compiler_runtime } from "./compiler-runtime-DHFVbq0b.js";
|
|
7
|
-
import { N as createLucideIcon } from "./Combination-
|
|
8
|
-
import { a as cva, u as cn } from "./button-
|
|
9
|
-
import { s as Logger } from "./hotkeys-
|
|
7
|
+
import { N as createLucideIcon } from "./Combination-33P1MEPK.js";
|
|
8
|
+
import { a as cva, u as cn } from "./button-BlF-78eJ.js";
|
|
9
|
+
import { s as Logger } from "./hotkeys-C4e3s3sJ.js";
|
|
10
10
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
11
|
-
import { f as waitFor, p as isIslands, u as store, x as atom } from "./useTheme-
|
|
11
|
+
import { f as waitFor, p as isIslands, u as store, x as atom } from "./useTheme-DdLjooMf.js";
|
|
12
12
|
import { r as KnownQueryParams } from "./constants-DuN_eoAL.js";
|
|
13
|
-
import { i as tableFromIPC } from "./loader-
|
|
13
|
+
import { i as tableFromIPC } from "./loader-DH7xXi-E.js";
|
|
14
14
|
var CircleQuestionMark = createLucideIcon("circle-question-mark", [
|
|
15
15
|
["circle", {
|
|
16
16
|
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-DdA8EBol.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-DHFVbq0b.js";
|
|
4
|
-
import { s as Logger } from "./hotkeys-
|
|
4
|
+
import { s as Logger } from "./hotkeys-C4e3s3sJ.js";
|
|
5
5
|
import { n as once } from "./once-C-NkXwWJ.js";
|
|
6
6
|
function testStorage(e) {
|
|
7
7
|
try {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-DdA8EBol.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-DHFVbq0b.js";
|
|
4
|
-
import { a as resolvePlatform, n as OverridingHotkeyProvider, s as Logger } from "./hotkeys-
|
|
4
|
+
import { a as resolvePlatform, n as OverridingHotkeyProvider, s as Logger } from "./hotkeys-C4e3s3sJ.js";
|
|
5
5
|
import { t as merge_default } from "./merge-Dl1bfxsj.js";
|
|
6
6
|
import { t as _baseIsEqual_default } from "./_baseIsEqual-BygTGUZ4.js";
|
|
7
7
|
import { A as looseObject, B as union, I as record, N as number, P as object, R as string, T as boolean, b as _enum, w as array } from "./zod-LbXVxiL9.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
2
|
import { t as require_react } from "./react-DdA8EBol.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-DHFVbq0b.js";
|
|
4
|
-
import "./Combination-
|
|
5
|
-
import { S as CircleQuestionMark, a as AlertTitle, m as asRemoteURL, n as arrow, o as isValid, r as Alert, t as useDeepCompareMemoize } from "./useDeepCompareMemoize-
|
|
6
|
-
import { l as Events } from "./button-
|
|
7
|
-
import { o as Objects, s as Logger } from "./hotkeys-
|
|
4
|
+
import "./Combination-33P1MEPK.js";
|
|
5
|
+
import { S as CircleQuestionMark, a as AlertTitle, m as asRemoteURL, n as arrow, o as isValid, r as Alert, t as useDeepCompareMemoize } from "./useDeepCompareMemoize-D3uOrgqD.js";
|
|
6
|
+
import { l as Events } from "./button-BlF-78eJ.js";
|
|
7
|
+
import { o as Objects, s as Logger } from "./hotkeys-C4e3s3sJ.js";
|
|
8
8
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
9
9
|
import "./react-dom-DJW8xUDg.js";
|
|
10
|
-
import { l as Tooltip, n as ErrorBanner } from "./error-banner-
|
|
11
|
-
import { h as useEvent_default, n as useTheme } from "./useTheme-
|
|
10
|
+
import { l as Tooltip, n as ErrorBanner } from "./error-banner-UH0Nxilf.js";
|
|
11
|
+
import { h as useEvent_default, n as useTheme } from "./useTheme-DdLjooMf.js";
|
|
12
12
|
import { t as _baseUniq_default } from "./_baseUniq-BUGws47x.js";
|
|
13
13
|
import { i as debounce_default } from "./constants-DuN_eoAL.js";
|
|
14
|
-
import { a as tooltipHandler, n as vegaLoadData } from "./loader-
|
|
14
|
+
import { a as tooltipHandler, n as vegaLoadData } from "./loader-DH7xXi-E.js";
|
|
15
15
|
import { n as formats } from "./vega-loader.browser-nTy1NZD3.js";
|
|
16
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
16
|
+
import { t as useAsyncData } from "./useAsyncData-BGpae_uu.js";
|
|
17
17
|
import { t as j } from "./react-vega-z40f-dXy.js";
|
|
18
18
|
import "./defaultLocale-DZtxSCkJ.js";
|
|
19
19
|
import "./defaultLocale-DMZFeDB8.js";
|
package/package.json
CHANGED
|
@@ -269,7 +269,7 @@ export function useNotebookActions() {
|
|
|
269
269
|
label: "Helper panel",
|
|
270
270
|
redundant: true,
|
|
271
271
|
handle: NOOP_HANDLER,
|
|
272
|
-
dropdown: PANELS.flatMap(({ id, Icon, hidden }) => {
|
|
272
|
+
dropdown: PANELS.flatMap(({ type: id, Icon, hidden }) => {
|
|
273
273
|
if (hidden) {
|
|
274
274
|
return [];
|
|
275
275
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
import { createContext, useContext } from "react";
|
|
4
|
+
import { invariant } from "@/utils/invariant";
|
|
5
|
+
|
|
6
|
+
export type PanelSection = "sidebar" | "developer-panel";
|
|
7
|
+
|
|
8
|
+
const PanelSectionContext = createContext<PanelSection | null>(null);
|
|
9
|
+
|
|
10
|
+
export const PanelSectionProvider = PanelSectionContext.Provider;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Hook to get the current panel section context.
|
|
14
|
+
* Returns "sidebar" or "developer-panel" depending on where the panel is rendered.
|
|
15
|
+
* Throws if used outside of a panel context.
|
|
16
|
+
*/
|
|
17
|
+
export function usePanelSection(): PanelSection {
|
|
18
|
+
const section = useContext(PanelSectionContext);
|
|
19
|
+
invariant(
|
|
20
|
+
section !== null,
|
|
21
|
+
"usePanelSection must be used within a PanelSectionProvider",
|
|
22
|
+
);
|
|
23
|
+
return section;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Hook to get the preferred orientation based on the panel section.
|
|
28
|
+
* - Sidebar panels should use vertical layouts (stacked)
|
|
29
|
+
* - Developer panel should use horizontal layouts (side-by-side)
|
|
30
|
+
*/
|
|
31
|
+
export function usePanelOrientation(): "horizontal" | "vertical" {
|
|
32
|
+
const section = usePanelSection();
|
|
33
|
+
return section === "sidebar" ? "vertical" : "horizontal";
|
|
34
|
+
}
|
|
@@ -6,16 +6,41 @@ import { z } from "zod";
|
|
|
6
6
|
import { createReducerAndAtoms } from "@/utils/createReducer";
|
|
7
7
|
import { jotaiJsonStorage } from "@/utils/storage/jotai";
|
|
8
8
|
import { ZodLocalStorage } from "@/utils/storage/typed";
|
|
9
|
-
import type {
|
|
9
|
+
import type { PanelType } from "./types";
|
|
10
10
|
import { PANELS } from "./types";
|
|
11
11
|
|
|
12
12
|
export interface ChromeState {
|
|
13
13
|
selectedPanel: PanelType | undefined;
|
|
14
14
|
isSidebarOpen: boolean;
|
|
15
15
|
isDeveloperPanelOpen: boolean;
|
|
16
|
-
selectedDeveloperPanelTab:
|
|
16
|
+
selectedDeveloperPanelTab: PanelType;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Layout configuration for panels in sidebar and developer panel.
|
|
21
|
+
* Each array contains the ordered list of visible panel IDs for that section.
|
|
22
|
+
*/
|
|
23
|
+
export interface PanelLayout {
|
|
24
|
+
sidebar: PanelType[];
|
|
25
|
+
developerPanel: PanelType[];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const DEFAULT_PANEL_LAYOUT: PanelLayout = {
|
|
29
|
+
sidebar: PANELS.filter(
|
|
30
|
+
(p) => !p.hidden && p.defaultSection === "sidebar",
|
|
31
|
+
).map((p) => p.type),
|
|
32
|
+
developerPanel: PANELS.filter(
|
|
33
|
+
(p) => !p.hidden && p.defaultSection === "developer-panel",
|
|
34
|
+
).map((p) => p.type),
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const panelLayoutAtom = atomWithStorage<PanelLayout>(
|
|
38
|
+
"marimo:panel-layout",
|
|
39
|
+
DEFAULT_PANEL_LAYOUT,
|
|
40
|
+
jotaiJsonStorage,
|
|
41
|
+
{ getOnInit: true },
|
|
42
|
+
);
|
|
43
|
+
|
|
19
44
|
const KEY = "marimo:sidebar";
|
|
20
45
|
const storage = new ZodLocalStorage<ChromeState>(
|
|
21
46
|
z.object({
|
|
@@ -29,7 +54,7 @@ const storage = new ZodLocalStorage<ChromeState>(
|
|
|
29
54
|
.string()
|
|
30
55
|
.optional()
|
|
31
56
|
.default("terminal")
|
|
32
|
-
.transform((v) => v as
|
|
57
|
+
.transform((v) => v as PanelType),
|
|
33
58
|
}),
|
|
34
59
|
initialState,
|
|
35
60
|
);
|
|
@@ -81,11 +106,11 @@ const {
|
|
|
81
106
|
...state,
|
|
82
107
|
isDeveloperPanelOpen: isOpen,
|
|
83
108
|
}),
|
|
84
|
-
setSelectedDeveloperPanelTab: (state, tab:
|
|
109
|
+
setSelectedDeveloperPanelTab: (state, tab: PanelType) => ({
|
|
85
110
|
...state,
|
|
86
111
|
selectedDeveloperPanelTab: tab,
|
|
87
112
|
}),
|
|
88
|
-
openDeveloperPanelTab: (state, tab:
|
|
113
|
+
openDeveloperPanelTab: (state, tab: PanelType) => ({
|
|
89
114
|
...state,
|
|
90
115
|
isDeveloperPanelOpen: true,
|
|
91
116
|
selectedDeveloperPanelTab: tab,
|
|
@@ -119,13 +144,3 @@ export const exportedForTesting = {
|
|
|
119
144
|
createActions,
|
|
120
145
|
initialState,
|
|
121
146
|
};
|
|
122
|
-
|
|
123
|
-
// TODO: probably merge this with the chrome state
|
|
124
|
-
export const sidebarOrderAtom = atomWithStorage<PanelType[]>(
|
|
125
|
-
"marimo:sidebar-order",
|
|
126
|
-
PANELS.filter(
|
|
127
|
-
(p) => !p.hidden && !p.defaultHidden && p.position === "sidebar",
|
|
128
|
-
).map((p) => p.id),
|
|
129
|
-
jotaiJsonStorage,
|
|
130
|
-
{ getOnInit: true },
|
|
131
|
-
);
|
|
@@ -21,7 +21,11 @@ import {
|
|
|
21
21
|
import { getFeatureFlag } from "@/core/config/feature-flag";
|
|
22
22
|
import { isWasm } from "@/core/wasm/utils";
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Unified panel ID for all panels in sidebar and developer panel
|
|
26
|
+
*/
|
|
24
27
|
export type PanelType =
|
|
28
|
+
// Sidebar defaults
|
|
25
29
|
| "files"
|
|
26
30
|
| "variables"
|
|
27
31
|
| "outline"
|
|
@@ -30,160 +34,146 @@ export type PanelType =
|
|
|
30
34
|
| "documentation"
|
|
31
35
|
| "snippets"
|
|
32
36
|
| "ai"
|
|
37
|
+
// Developer panel defaults
|
|
38
|
+
| "errors"
|
|
39
|
+
| "scratchpad"
|
|
40
|
+
| "tracing"
|
|
41
|
+
| "secrets"
|
|
42
|
+
| "logs"
|
|
43
|
+
| "terminal"
|
|
33
44
|
| "cache";
|
|
34
45
|
|
|
46
|
+
export type PanelSection = "sidebar" | "developer-panel";
|
|
47
|
+
|
|
35
48
|
export interface PanelDescriptor {
|
|
36
|
-
|
|
49
|
+
type: PanelType;
|
|
37
50
|
Icon: LucideIcon;
|
|
51
|
+
/** Short label for developer panel tabs */
|
|
52
|
+
label: string;
|
|
53
|
+
/** Descriptive tooltip for sidebar icons */
|
|
54
|
+
tooltip: string;
|
|
38
55
|
/** If true, the panel is completely unavailable */
|
|
39
56
|
hidden?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
|
|
42
|
-
tooltip: string;
|
|
43
|
-
position: "sidebar" | "footer";
|
|
57
|
+
/** Which section this panel belongs to by default */
|
|
58
|
+
defaultSection: PanelSection;
|
|
44
59
|
}
|
|
45
60
|
|
|
46
|
-
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* 1. Must-have panels first.
|
|
50
|
-
* 2. Panels that can add cells to the editor.
|
|
51
|
-
* 3. Nice-to-have observability panels.
|
|
61
|
+
/**
|
|
62
|
+
* All panels in the application.
|
|
63
|
+
* Panels can be in either sidebar or developer panel, configurable by user.
|
|
52
64
|
*/
|
|
53
65
|
export const PANELS: PanelDescriptor[] = [
|
|
54
|
-
//
|
|
55
|
-
//
|
|
56
|
-
// The files panel is at the top to orient
|
|
57
|
-
// users within their filesystem and give
|
|
58
|
-
// them a quick glance at their project structure,
|
|
59
|
-
// without having to leave their editor.
|
|
66
|
+
// Sidebar defaults
|
|
60
67
|
{
|
|
61
|
-
|
|
68
|
+
type: "files",
|
|
62
69
|
Icon: FolderTreeIcon,
|
|
70
|
+
label: "Files",
|
|
63
71
|
tooltip: "View files",
|
|
64
|
-
|
|
72
|
+
defaultSection: "sidebar",
|
|
65
73
|
},
|
|
66
|
-
// Because notebooks uniquely have data in RAM,
|
|
67
|
-
// it's important to give humans visibility into
|
|
68
|
-
// what that data is.
|
|
69
74
|
{
|
|
70
|
-
|
|
75
|
+
type: "variables",
|
|
71
76
|
Icon: VariableIcon,
|
|
77
|
+
label: "Variables",
|
|
72
78
|
tooltip: "Explore variables and data sources",
|
|
73
|
-
|
|
79
|
+
defaultSection: "sidebar",
|
|
74
80
|
},
|
|
75
|
-
// Every notebook has a package environment that must
|
|
76
|
-
// be managed.
|
|
77
81
|
{
|
|
78
|
-
|
|
82
|
+
type: "packages",
|
|
79
83
|
Icon: BoxIcon,
|
|
84
|
+
label: "Packages",
|
|
80
85
|
tooltip: "Manage packages",
|
|
81
|
-
|
|
86
|
+
defaultSection: "sidebar",
|
|
82
87
|
},
|
|
83
|
-
// 2. "AI" panel.
|
|
84
|
-
//
|
|
85
|
-
// The AI panel holds both agents and in-editor chat.
|
|
86
88
|
{
|
|
87
|
-
|
|
89
|
+
type: "ai",
|
|
88
90
|
Icon: BotIcon,
|
|
91
|
+
label: "AI",
|
|
89
92
|
tooltip: "Chat & Agents",
|
|
90
|
-
|
|
93
|
+
defaultSection: "sidebar",
|
|
91
94
|
},
|
|
92
95
|
{
|
|
93
|
-
|
|
96
|
+
type: "snippets",
|
|
94
97
|
Icon: SquareDashedBottomCodeIcon,
|
|
98
|
+
label: "Snippets",
|
|
95
99
|
tooltip: "Snippets",
|
|
96
|
-
|
|
97
|
-
defaultHidden: true,
|
|
100
|
+
defaultSection: "developer-panel",
|
|
98
101
|
},
|
|
99
|
-
// 3. Nice-to-have observability panels.
|
|
100
|
-
//
|
|
101
|
-
// Utility panels that provide observability
|
|
102
|
-
// into the state or structure of the notebook. These
|
|
103
|
-
// observability panels are less crucial than variables
|
|
104
|
-
// or datasets, so they are positioned at the end of the
|
|
105
|
-
// sidebar.
|
|
106
102
|
{
|
|
107
|
-
|
|
103
|
+
type: "outline",
|
|
108
104
|
Icon: ScrollTextIcon,
|
|
105
|
+
label: "Outline",
|
|
109
106
|
tooltip: "View outline",
|
|
110
|
-
|
|
107
|
+
defaultSection: "sidebar",
|
|
111
108
|
},
|
|
112
109
|
{
|
|
113
|
-
|
|
110
|
+
type: "documentation",
|
|
114
111
|
Icon: TextSearchIcon,
|
|
112
|
+
label: "Docs",
|
|
115
113
|
tooltip: "View live docs",
|
|
116
|
-
|
|
114
|
+
defaultSection: "sidebar",
|
|
117
115
|
},
|
|
118
116
|
{
|
|
119
|
-
|
|
120
|
-
// default off; the minimap is a more effective
|
|
121
|
-
// overview.
|
|
122
|
-
id: "dependencies",
|
|
117
|
+
type: "dependencies",
|
|
123
118
|
Icon: NetworkIcon,
|
|
119
|
+
label: "Dependencies",
|
|
124
120
|
tooltip: "Explore dependencies",
|
|
125
|
-
|
|
121
|
+
defaultSection: "sidebar",
|
|
126
122
|
},
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
export const PANEL_MAP = new Map<PanelType, PanelDescriptor>(
|
|
130
|
-
PANELS.map((p) => [p.id, p]),
|
|
131
|
-
);
|
|
132
|
-
|
|
133
|
-
export type DeveloperPanelTabType =
|
|
134
|
-
| "errors"
|
|
135
|
-
| "scratchpad"
|
|
136
|
-
| "tracing"
|
|
137
|
-
| "secrets"
|
|
138
|
-
| "logs"
|
|
139
|
-
| "terminal"
|
|
140
|
-
| "cache";
|
|
141
|
-
|
|
142
|
-
export interface DeveloperPanelTabDescriptor {
|
|
143
|
-
type: DeveloperPanelTabType;
|
|
144
|
-
Icon: LucideIcon;
|
|
145
|
-
label: string;
|
|
146
|
-
hidden?: boolean;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export const DEVELOPER_PANEL_TABS: DeveloperPanelTabDescriptor[] = [
|
|
123
|
+
// Developer panel defaults
|
|
150
124
|
{
|
|
151
125
|
type: "errors",
|
|
152
126
|
Icon: XCircleIcon,
|
|
153
127
|
label: "Errors",
|
|
128
|
+
tooltip: "View errors",
|
|
129
|
+
defaultSection: "developer-panel",
|
|
154
130
|
},
|
|
155
131
|
{
|
|
156
132
|
type: "scratchpad",
|
|
157
133
|
Icon: NotebookPenIcon,
|
|
158
134
|
label: "Scratchpad",
|
|
135
|
+
tooltip: "Scratchpad",
|
|
136
|
+
defaultSection: "developer-panel",
|
|
159
137
|
},
|
|
160
138
|
{
|
|
161
139
|
type: "tracing",
|
|
162
140
|
Icon: ActivityIcon,
|
|
163
141
|
label: "Tracing",
|
|
142
|
+
tooltip: "View tracing",
|
|
143
|
+
defaultSection: "developer-panel",
|
|
164
144
|
},
|
|
165
145
|
{
|
|
166
146
|
type: "secrets",
|
|
167
147
|
Icon: KeyRoundIcon,
|
|
168
148
|
label: "Secrets",
|
|
149
|
+
tooltip: "Manage secrets",
|
|
150
|
+
defaultSection: "developer-panel",
|
|
169
151
|
hidden: isWasm(),
|
|
170
152
|
},
|
|
171
153
|
{
|
|
172
154
|
type: "logs",
|
|
173
155
|
Icon: FileTextIcon,
|
|
174
156
|
label: "Logs",
|
|
157
|
+
tooltip: "View logs",
|
|
158
|
+
defaultSection: "developer-panel",
|
|
175
159
|
},
|
|
176
160
|
{
|
|
177
161
|
type: "terminal",
|
|
178
162
|
Icon: TerminalSquareIcon,
|
|
179
163
|
label: "Terminal",
|
|
164
|
+
tooltip: "Terminal",
|
|
165
|
+
defaultSection: "developer-panel",
|
|
180
166
|
},
|
|
181
|
-
// TODO(akshayka): The cache panel should not be default shown,
|
|
182
|
-
// even when it's out of feature flag. (User config to turn it on.)
|
|
183
167
|
{
|
|
184
168
|
type: "cache",
|
|
185
169
|
Icon: DatabaseZapIcon,
|
|
186
170
|
label: "Cache",
|
|
171
|
+
tooltip: "View cache",
|
|
172
|
+
defaultSection: "developer-panel",
|
|
187
173
|
hidden: !getFeatureFlag("cache_panel"),
|
|
188
174
|
},
|
|
189
175
|
];
|
|
176
|
+
|
|
177
|
+
export const PANEL_MAP = new Map<PanelType, PanelDescriptor>(
|
|
178
|
+
PANELS.map((p) => [p.type, p]),
|
|
179
|
+
);
|