deck-plugin-sdk 1.8.0 → 1.10.0
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/package.json +60 -60
- package/permissions.json +231 -230
- package/shim/bridge.js +232 -231
- package/shim/settings.js +17 -17
- package/shim/terminals.js +106 -97
- package/template/plugin.json +10 -10
- package/types/components/ConfirmDialog.d.ts +3 -1
- package/types/components/ContextMenu.d.ts +1 -1
- package/types/components/NamePrompt.d.ts +1 -1
- package/types/components/dragrow.d.ts +2 -2
- package/types/components/ui.d.ts +4 -1
- package/types/core/bridge.d.ts +65 -5
- package/types/core/browser.d.ts +14 -0
- package/types/core/fileview.d.ts +6 -2
- package/types/core/notifications.d.ts +2 -0
- package/types/core/p2p.d.ts +117 -117
- package/types/core/portal.d.ts +3 -0
- package/types/core/settingsstore.d.ts +26 -26
- package/types/core/shellpath.d.ts +43 -3
- package/types/core/terminals.d.ts +91 -2
- package/types/core/windows.d.ts +52 -0
- package/types/modules/editor/models.d.ts +6 -0
package/shim/terminals.js
CHANGED
|
@@ -1,97 +1,106 @@
|
|
|
1
|
-
// GENERATED by sdk/gen-shim.mjs — do not edit.
|
|
2
|
-
//
|
|
3
|
-
// Deck's terminal panes. Resolved at USE time like the bridge: a plugin module is evaluated
|
|
4
|
-
// during loadPlugins, and a reference copied out at import time would capture a half-built
|
|
5
|
-
// object. The layout store is shared, not copied — a second one would not know about the panes
|
|
6
|
-
// Deck already has open.
|
|
7
|
-
import { pluginId } from "./scope.js";
|
|
8
|
-
const t = () => {
|
|
9
|
-
const x = window.__deck?.forPlugin?.(pluginId)?.terminals ?? window.__deck?.terminals;
|
|
10
|
-
if (!x) throw new Error("window.__deck.terminals is missing — this plugin only runs inside Deck");
|
|
11
|
-
return x;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const GROUP_COLORS = (...a) => t().GROUP_COLORS(...a);
|
|
15
|
-
export const ZONE_BOARD = (...a) => t().ZONE_BOARD(...a);
|
|
16
|
-
export const activeWorkspaceCwd = (...a) => t().activeWorkspaceCwd(...a);
|
|
17
|
-
export const addTabToZone = (...a) => t().addTabToZone(...a);
|
|
18
|
-
export const addToGroup = (...a) => t().addToGroup(...a);
|
|
19
|
-
export const
|
|
20
|
-
export const
|
|
21
|
-
export const
|
|
22
|
-
export const
|
|
23
|
-
export const
|
|
24
|
-
export const
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
27
|
-
export const
|
|
28
|
-
export const
|
|
29
|
-
export const
|
|
30
|
-
export const
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
33
|
-
export const
|
|
34
|
-
export const
|
|
35
|
-
export const
|
|
36
|
-
export const
|
|
37
|
-
export const
|
|
38
|
-
export const
|
|
39
|
-
export const
|
|
40
|
-
export const
|
|
41
|
-
export const
|
|
42
|
-
export const
|
|
43
|
-
export const
|
|
44
|
-
export const
|
|
45
|
-
export const
|
|
46
|
-
export const
|
|
47
|
-
export const
|
|
48
|
-
export const
|
|
49
|
-
export const
|
|
50
|
-
export const
|
|
51
|
-
export const
|
|
52
|
-
export const
|
|
53
|
-
export const
|
|
54
|
-
export const
|
|
55
|
-
export const
|
|
56
|
-
export const
|
|
57
|
-
export const
|
|
58
|
-
export const
|
|
59
|
-
export const
|
|
60
|
-
export const
|
|
61
|
-
export const
|
|
62
|
-
export const
|
|
63
|
-
export const
|
|
64
|
-
export const
|
|
65
|
-
export const
|
|
66
|
-
export const
|
|
67
|
-
export const
|
|
68
|
-
export const
|
|
69
|
-
export const
|
|
70
|
-
export const
|
|
71
|
-
export const
|
|
72
|
-
export const
|
|
73
|
-
export const
|
|
74
|
-
export const
|
|
75
|
-
export const
|
|
76
|
-
export const
|
|
77
|
-
export const
|
|
78
|
-
export const
|
|
79
|
-
export const
|
|
80
|
-
export const
|
|
81
|
-
export const
|
|
82
|
-
export const
|
|
83
|
-
export const
|
|
84
|
-
export const
|
|
85
|
-
export const
|
|
86
|
-
export const
|
|
87
|
-
export const
|
|
88
|
-
export const
|
|
89
|
-
export const
|
|
90
|
-
export const
|
|
91
|
-
export const
|
|
92
|
-
export const
|
|
93
|
-
export const
|
|
94
|
-
export const
|
|
95
|
-
export const
|
|
96
|
-
export const
|
|
97
|
-
export const
|
|
1
|
+
// GENERATED by sdk/gen-shim.mjs — do not edit.
|
|
2
|
+
//
|
|
3
|
+
// Deck's terminal panes. Resolved at USE time like the bridge: a plugin module is evaluated
|
|
4
|
+
// during loadPlugins, and a reference copied out at import time would capture a half-built
|
|
5
|
+
// object. The layout store is shared, not copied — a second one would not know about the panes
|
|
6
|
+
// Deck already has open.
|
|
7
|
+
import { pluginId } from "./scope.js";
|
|
8
|
+
const t = () => {
|
|
9
|
+
const x = window.__deck?.forPlugin?.(pluginId)?.terminals ?? window.__deck?.terminals;
|
|
10
|
+
if (!x) throw new Error("window.__deck.terminals is missing — this plugin only runs inside Deck");
|
|
11
|
+
return x;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const GROUP_COLORS = (...a) => t().GROUP_COLORS(...a);
|
|
15
|
+
export const ZONE_BOARD = (...a) => t().ZONE_BOARD(...a);
|
|
16
|
+
export const activeWorkspaceCwd = (...a) => t().activeWorkspaceCwd(...a);
|
|
17
|
+
export const addTabToZone = (...a) => t().addTabToZone(...a);
|
|
18
|
+
export const addToGroup = (...a) => t().addToGroup(...a);
|
|
19
|
+
export const agentSessions = (...a) => t().agentSessions(...a);
|
|
20
|
+
export const applyDtCommand = (...a) => t().applyDtCommand(...a);
|
|
21
|
+
export const applyTerminalLook = (...a) => t().applyTerminalLook(...a);
|
|
22
|
+
export const attach = (...a) => t().attach(...a);
|
|
23
|
+
export const bracketPaste = (...a) => t().bracketPaste(...a);
|
|
24
|
+
export const clearPane = (...a) => t().clearPane(...a);
|
|
25
|
+
export const closeLeaf = (...a) => t().closeLeaf(...a);
|
|
26
|
+
export const closePaneTab = (...a) => t().closePaneTab(...a);
|
|
27
|
+
export const copyFrom = (...a) => t().copyFrom(...a);
|
|
28
|
+
export const destroy = (...a) => t().destroy(...a);
|
|
29
|
+
export const dockWindow = (...a) => t().dockWindow(...a);
|
|
30
|
+
export const findLeaf = (...a) => t().findLeaf(...a);
|
|
31
|
+
export const focusPane = (...a) => t().focusPane(...a);
|
|
32
|
+
export const getInstance = (...a) => t().getInstance(...a);
|
|
33
|
+
export const getLayout = (...a) => t().getLayout(...a);
|
|
34
|
+
export const hasSelection = (...a) => t().hasSelection(...a);
|
|
35
|
+
export const insertBeside = (...a) => t().insertBeside(...a);
|
|
36
|
+
export const isPinned = (...a) => t().isPinned(...a);
|
|
37
|
+
export const isWorkspaceActive = (...a) => t().isWorkspaceActive(...a);
|
|
38
|
+
export const leafIds = (...a) => t().leafIds(...a);
|
|
39
|
+
export const leaveGroup = (...a) => t().leaveGroup(...a);
|
|
40
|
+
export const loadLayoutOnce = (...a) => t().loadLayoutOnce(...a);
|
|
41
|
+
export const markAgentStarted = (...a) => t().markAgentStarted(...a);
|
|
42
|
+
export const mergeWindow = (...a) => t().mergeWindow(...a);
|
|
43
|
+
export const moveGroup = (...a) => t().moveGroup(...a);
|
|
44
|
+
export const moveLeaf = (...a) => t().moveLeaf(...a);
|
|
45
|
+
export const moveTabToZone = (...a) => t().moveTabToZone(...a);
|
|
46
|
+
export const moveWorkspace = (...a) => t().moveWorkspace(...a);
|
|
47
|
+
export const moveZone = (...a) => t().moveZone(...a);
|
|
48
|
+
export const mutateLayout = (...a) => t().mutateLayout(...a);
|
|
49
|
+
export const nextActiveAfterClose = (...a) => t().nextActiveAfterClose(...a);
|
|
50
|
+
export const nextZoneSpot = (...a) => t().nextZoneSpot(...a);
|
|
51
|
+
export const openActiveGroup = (...a) => t().openActiveGroup(...a);
|
|
52
|
+
export const openFile = (...a) => t().openFile(...a);
|
|
53
|
+
export const openInEditor = (...a) => t().openInEditor(...a);
|
|
54
|
+
export const openTabInWorkspace = (...a) => t().openTabInWorkspace(...a);
|
|
55
|
+
export const paneCwd = (...a) => t().paneCwd(...a);
|
|
56
|
+
export const paneHasAgent = (...a) => t().paneHasAgent(...a);
|
|
57
|
+
export const paneLabel = (...a) => t().paneLabel(...a);
|
|
58
|
+
export const paneLines = (...a) => t().paneLines(...a);
|
|
59
|
+
export const paneLocation = (...a) => t().paneLocation(...a);
|
|
60
|
+
export const pasteInto = (...a) => t().pasteInto(...a);
|
|
61
|
+
export const pasteText = (...a) => t().pasteText(...a);
|
|
62
|
+
export const pasteTextInto = (...a) => t().pasteTextInto(...a);
|
|
63
|
+
export const pruneGroups = (...a) => t().pruneGroups(...a);
|
|
64
|
+
export const publishLayout = (...a) => t().publishLayout(...a);
|
|
65
|
+
export const queueInput = (...a) => t().queueInput(...a);
|
|
66
|
+
export const rebindTerminals = (...a) => t().rebindTerminals(...a);
|
|
67
|
+
export const refit = (...a) => t().refit(...a);
|
|
68
|
+
export const reopenTab = (...a) => t().reopenTab(...a);
|
|
69
|
+
export const reorderTab = (...a) => t().reorderTab(...a);
|
|
70
|
+
export const resetPaneModes = (...a) => t().resetPaneModes(...a);
|
|
71
|
+
export const restartPane = (...a) => t().restartPane(...a);
|
|
72
|
+
export const resumeCommand = (...a) => t().resumeCommand(...a);
|
|
73
|
+
export const revealPane = (...a) => t().revealPane(...a);
|
|
74
|
+
export const runningIn = (...a) => t().runningIn(...a);
|
|
75
|
+
export const runsLines = (...a) => t().runsLines(...a);
|
|
76
|
+
export const sendInput = (...a) => t().sendInput(...a);
|
|
77
|
+
export const setGroup = (...a) => t().setGroup(...a);
|
|
78
|
+
export const setLeafLabel = (...a) => t().setLeafLabel(...a);
|
|
79
|
+
export const setLeafView = (...a) => t().setLeafView(...a);
|
|
80
|
+
export const setTabWindow = (...a) => t().setTabWindow(...a);
|
|
81
|
+
export const showActiveTab = (...a) => t().showActiveTab(...a);
|
|
82
|
+
export const splitLeaf = (...a) => t().splitLeaf(...a);
|
|
83
|
+
export const stopPaneAgent = (...a) => t().stopPaneAgent(...a);
|
|
84
|
+
export const suspendWorkspace = (...a) => t().suspendWorkspace(...a);
|
|
85
|
+
export const switchWorkspace = (...a) => t().switchWorkspace(...a);
|
|
86
|
+
export const termKill = (...a) => t().termKill(...a);
|
|
87
|
+
export const termList = (...a) => t().termList(...a);
|
|
88
|
+
export const termResize = (...a) => t().termResize(...a);
|
|
89
|
+
export const termScrollback = (...a) => t().termScrollback(...a);
|
|
90
|
+
export const termSpawn = (...a) => t().termSpawn(...a);
|
|
91
|
+
export const termSweepScrollback = (...a) => t().termSweepScrollback(...a);
|
|
92
|
+
export const termWrite = (...a) => t().termWrite(...a);
|
|
93
|
+
export const toggleGroupFold = (...a) => t().toggleGroupFold(...a);
|
|
94
|
+
export const togglePin = (...a) => t().togglePin(...a);
|
|
95
|
+
export const ungroup = (...a) => t().ungroup(...a);
|
|
96
|
+
export const useAgentPanesVersion = (...a) => t().useAgentPanesVersion(...a);
|
|
97
|
+
export const useLayout = (...a) => t().useLayout(...a);
|
|
98
|
+
export const usePinnedPanes = (...a) => t().usePinnedPanes(...a);
|
|
99
|
+
export const webglLimit = (...a) => t().webglLimit(...a);
|
|
100
|
+
export const workspaceByCwd = (...a) => t().workspaceByCwd(...a);
|
|
101
|
+
export const workspaceShellCount = (...a) => t().workspaceShellCount(...a);
|
|
102
|
+
export const zoneAt = (...a) => t().zoneAt(...a);
|
|
103
|
+
export const zoneBoardFull = (...a) => t().zoneBoardFull(...a);
|
|
104
|
+
export const zoneOf = (...a) => t().zoneOf(...a);
|
|
105
|
+
export const zoneToward = (...a) => t().zoneToward(...a);
|
|
106
|
+
export const zones = (...a) => t().zones(...a);
|
package/template/plugin.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "__ID__",
|
|
3
|
-
"name": "__NAME__",
|
|
4
|
-
"description": "One line on what this is for, shown under its name in Settings.",
|
|
5
|
-
"icon": "Sparkles",
|
|
6
|
-
"color": "#a78bfa",
|
|
7
|
-
"version": "0.1.0",
|
|
8
|
-
"minDeck": "1.
|
|
9
|
-
"permissions": []
|
|
10
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"id": "__ID__",
|
|
3
|
+
"name": "__NAME__",
|
|
4
|
+
"description": "One line on what this is for, shown under its name in Settings.",
|
|
5
|
+
"icon": "Sparkles",
|
|
6
|
+
"color": "#a78bfa",
|
|
7
|
+
"version": "0.1.0",
|
|
8
|
+
"minDeck": "1.10.0",
|
|
9
|
+
"permissions": []
|
|
10
|
+
}
|
|
@@ -14,9 +14,11 @@ export interface ConfirmState {
|
|
|
14
14
|
* which in a webview is an OS modal — it steals focus, hides the cursor, and cannot be
|
|
15
15
|
* styled or dismissed with Escape. */
|
|
16
16
|
acknowledge?: boolean;
|
|
17
|
+
/** A "Don't ask again" box beside the buttons: called, after onConfirm, when it was ticked. */
|
|
18
|
+
onDontAsk?: () => void;
|
|
17
19
|
onConfirm: () => void;
|
|
18
20
|
}
|
|
19
21
|
export declare function ConfirmDialog({ state, onClose }: {
|
|
20
22
|
state: ConfirmState | null;
|
|
21
23
|
onClose: () => void;
|
|
22
|
-
}): import("react").
|
|
24
|
+
}): import("react").ReactNode;
|
|
@@ -43,4 +43,4 @@ export declare function ContextMenu({ x, y, items, alignRight, onClose, onReorde
|
|
|
43
43
|
up?: boolean;
|
|
44
44
|
/** Called with (draggedId, newIndexAmongDraggableRows) after a drag-sort. */
|
|
45
45
|
onReorder?: (id: string, toIndex: number) => void;
|
|
46
|
-
}): import("react").
|
|
46
|
+
}): import("react").ReactNode;
|
|
@@ -10,8 +10,8 @@ export interface DropTarget {
|
|
|
10
10
|
parentId: string | null;
|
|
11
11
|
kind: string | null;
|
|
12
12
|
}
|
|
13
|
-
/** The row under a point, or null. Exported for the check. */
|
|
14
|
-
export declare function rowAt(x: number, y: number): DropTarget | null;
|
|
13
|
+
/** The row under a point of `doc` (the window the drag is in), or null. Exported for the check. */
|
|
14
|
+
export declare function rowAt(x: number, y: number, doc?: Document): DropTarget | null;
|
|
15
15
|
export interface DragState {
|
|
16
16
|
/** Id of the row being dragged, or null when idle. */
|
|
17
17
|
dragId: string | null;
|
package/types/components/ui.d.ts
CHANGED
|
@@ -33,8 +33,10 @@ export declare function GhostButton({ children, ...p }: React.ButtonHTMLAttribut
|
|
|
33
33
|
* segmented controls sharing one animate the pill between them — pass a distinct id wherever a
|
|
34
34
|
* screen draws more than one (a per-row control, say). The default keeps the single-control case
|
|
35
35
|
* a one-liner.
|
|
36
|
+
*
|
|
37
|
+
* `fill`: as wide as its parent, the options sharing the room, so a column of them lines up.
|
|
36
38
|
*/
|
|
37
|
-
export declare function Segmented<T extends string>({ value, onChange, options, layoutId, }: {
|
|
39
|
+
export declare function Segmented<T extends string>({ value, onChange, options, layoutId, fill, }: {
|
|
38
40
|
value: T;
|
|
39
41
|
onChange: (v: T) => void;
|
|
40
42
|
options: {
|
|
@@ -42,6 +44,7 @@ export declare function Segmented<T extends string>({ value, onChange, options,
|
|
|
42
44
|
label: string;
|
|
43
45
|
}[];
|
|
44
46
|
layoutId?: string;
|
|
47
|
+
fill?: boolean;
|
|
45
48
|
}): import("react").JSX.Element;
|
|
46
49
|
/** Underlined tabs. `layoutId` behaves as in Segmented above. */
|
|
47
50
|
export declare function Tabs<T extends string>({ value, onChange, options, layoutId, }: {
|
package/types/core/bridge.d.ts
CHANGED
|
@@ -13,9 +13,9 @@ export interface PhysRect {
|
|
|
13
13
|
}
|
|
14
14
|
/** Open `url` in the browser pane's own webview (created the first time) at `r`. A private one
|
|
15
15
|
* keeps no cookies, history or cache. */
|
|
16
|
-
export declare const browserOpen: (pane: string, url: string, isPrivate: boolean, r: PhysRect) => Promise<void>;
|
|
16
|
+
export declare const browserOpen: (pane: string, url: string, isPrivate: boolean, r: PhysRect, window?: string) => Promise<void>;
|
|
17
17
|
/** Move the pane's webview, or hide it. */
|
|
18
|
-
export declare const browserBounds: (pane: string, r: PhysRect, visible: boolean) => Promise<void>;
|
|
18
|
+
export declare const browserBounds: (pane: string, r: PhysRect, visible: boolean, window?: string) => Promise<void>;
|
|
19
19
|
export declare const browserNav: (pane: string, action: "back" | "forward" | "reload" | "go" | "focus", url?: string) => Promise<void>;
|
|
20
20
|
/** The chords Rust takes from a focused page: `deck` moves the keyboard back to Deck, `page` does not. */
|
|
21
21
|
export declare const browserSetKeys: (deck: string[], page: string[]) => Promise<void>;
|
|
@@ -37,7 +37,7 @@ export declare const browserNotificationClicked: (pane: string, id: number) => P
|
|
|
37
37
|
/** Reload a page whose process hangs: that process is ended first. */
|
|
38
38
|
export declare const browserReloadHung: (pane: string) => Promise<void>;
|
|
39
39
|
/** The window fullscreen for a page that went fullscreen, or back as it was. */
|
|
40
|
-
export declare const browserWindowFullscreen: (on: boolean) => Promise<void>;
|
|
40
|
+
export declare const browserWindowFullscreen: (on: boolean, window?: string) => Promise<void>;
|
|
41
41
|
/** Put a hidden pane's page to sleep, or wake it. */
|
|
42
42
|
export declare const browserSleep: (pane: string, on: boolean) => Promise<void>;
|
|
43
43
|
/** A JPEG of what the pane's webview shows. */
|
|
@@ -172,7 +172,7 @@ export declare const extensionRemove: (id: string) => Promise<void>;
|
|
|
172
172
|
export declare const extensionPopup: (pane: string, id: string, page: string, right: number, top: number) => Promise<void>;
|
|
173
173
|
export declare const extensionPopupClose: (pane: string) => Promise<void>;
|
|
174
174
|
/** The sites agents may use in the browser without asking. */
|
|
175
|
-
export declare const browserAgentConfig: (sites: string[]) => Promise<void>;
|
|
175
|
+
export declare const browserAgentConfig: (sites: string[], any?: boolean) => Promise<void>;
|
|
176
176
|
/** The user's answer to an agent's question about a site. */
|
|
177
177
|
export declare const browserAgentAnswer: (id: number, site: string, allow: boolean, forGood: boolean) => Promise<void>;
|
|
178
178
|
/** A DevTools protocol call on a browser pane's page, and its answer. */
|
|
@@ -208,6 +208,8 @@ export declare const browserDownload: (id: number, action: "pause" | "resume" |
|
|
|
208
208
|
/** Find in the pane's page: start a search, step through its matches, or stop (clearing them). */
|
|
209
209
|
export declare const browserFind: (pane: string, action: "start" | "next" | "prev" | "stop", term?: string, matchCase?: boolean) => Promise<void>;
|
|
210
210
|
export declare const browserCapture: (pane: string) => Promise<ArrayBuffer>;
|
|
211
|
+
/** Cut these boxes, each [x, y, w, h, corner radius] in physical px from the page's corner, out of a pane's page window, `w`×`h` its size; none gives it back whole. */
|
|
212
|
+
export declare const browserCut: (pane: string, w: number, h: number, cuts: number[][]) => Promise<void>;
|
|
211
213
|
export interface AppProc {
|
|
212
214
|
name: string;
|
|
213
215
|
title: string;
|
|
@@ -263,10 +265,56 @@ export interface Settings {
|
|
|
263
265
|
tabWheelSwitch: boolean;
|
|
264
266
|
/** When the tabs do not fit, every one but the open tab shrinks to its icon. */
|
|
265
267
|
tabSqueeze?: boolean;
|
|
268
|
+
/** A title-bar tab's full width in px (120 to 320, 160 when unset): its width, or with tabSqueeze the most it narrows from. */
|
|
269
|
+
tabWidth?: number;
|
|
270
|
+
/**
|
|
271
|
+
* Where things that arrive from outside open (Settings → Where things open). A floating window
|
|
272
|
+
* leaves the main window's tab as it was; a tab takes its place, as before floating windows.
|
|
273
|
+
* - openLinksIn: a link another program opens with Deck as the default browser ("float" unset).
|
|
274
|
+
* - openAgentPagesIn: a page an agent opens ("float-background" unset).
|
|
275
|
+
* - openFilesIn: a file opened with Deck from Explorer that opens in a plugin or the browser
|
|
276
|
+
* ("float" unset); one for the Editor goes to the Editor either way.
|
|
277
|
+
*/
|
|
278
|
+
openLinksIn?: "float" | "float-background" | "tab";
|
|
279
|
+
openAgentPagesIn?: "float-background" | "tab";
|
|
280
|
+
openFilesIn?: "float" | "tab";
|
|
281
|
+
/**
|
|
282
|
+
* A file for the Editor opened with Deck from Explorer ("tab" unset: the project's Editor, in the
|
|
283
|
+
* main window brought forward). "float": an Editor of its own in a floating window, as a file
|
|
284
|
+
* Ctrl+clicked in a terminal can open.
|
|
285
|
+
*/
|
|
286
|
+
openCodeFilesIn?: "tab" | "float";
|
|
287
|
+
/**
|
|
288
|
+
* More of the same, for what you open yourself but only look at (Settings → Where things open):
|
|
289
|
+
* - openTerminalLinksIn: an address Ctrl+clicked in a terminal, with browserTerminalLinks "deck"
|
|
290
|
+
* ("float" unset: the "links" window).
|
|
291
|
+
* - openDocsIn: a Docs page opened from Settings ("float" unset; Settings stays open).
|
|
292
|
+
* - openCommitsIn: a commit opened from the Editor's blame ("float" unset).
|
|
293
|
+
* - agentTerminals: a terminal tab or project an agent makes ("background" unset: added without
|
|
294
|
+
* switching to it, its shell started anyway so the agent can use it; "switch" goes to it).
|
|
295
|
+
*/
|
|
296
|
+
openTerminalLinksIn?: "float" | "tab";
|
|
297
|
+
/**
|
|
298
|
+
* A file path Ctrl+clicked in a terminal ("tab" unset: the Editor's tab, or the tab its type
|
|
299
|
+
* opens in). "float": an Editor of its own in a floating window, the project's left where it is;
|
|
300
|
+
* a type that opens elsewhere (a .pdf) in the "links" window.
|
|
301
|
+
*/
|
|
302
|
+
openTerminalFilesIn?: "tab" | "float";
|
|
303
|
+
/** The same, per extension (".md"), over `openTerminalFilesIn`. */
|
|
304
|
+
openTerminalFilesByExt?: Record<string, "tab" | "float">;
|
|
305
|
+
openDocsIn?: "float" | "tab";
|
|
306
|
+
openCommitsIn?: "float" | "tab";
|
|
307
|
+
agentTerminals?: "background" | "switch";
|
|
266
308
|
/** Each project's own colour on the sidebar's collapsed rail. Off, they are all one grey. */
|
|
267
309
|
projectColours?: boolean;
|
|
268
310
|
/** Agents listed under their workspace in the sidebar: under every one (default), only the open one, or none. */
|
|
269
311
|
sidebarAgents?: "all" | "open" | "off";
|
|
312
|
+
/**
|
|
313
|
+
* Closing a tab, a group's tabs or a terminal pane (or restarting or replacing one) asks first:
|
|
314
|
+
* only when something is running in it besides the shell ("running", unset), every time, or
|
|
315
|
+
* never ("Don't ask again" in the question sets this).
|
|
316
|
+
*/
|
|
317
|
+
askBeforeClose?: "running" | "always" | "never";
|
|
270
318
|
/** The workspace sidebar is a button in the title bar that opens it over the panes, rather than a column. */
|
|
271
319
|
sidebarMenu?: boolean;
|
|
272
320
|
/** Pane controls float over the pane's top-right corner on hover, instead of a header row. */
|
|
@@ -381,6 +429,11 @@ export interface Settings {
|
|
|
381
429
|
/** Sleeping tabs: a browser tab out of sight this many minutes stops running until it is shown. */
|
|
382
430
|
browserSleep: boolean;
|
|
383
431
|
browserSleepAfter: number;
|
|
432
|
+
/**
|
|
433
|
+
* A page stays live under Deck's menus and cards, which are cut out of its window (unset: on).
|
|
434
|
+
* Off, a covered page is a blurred picture of itself, for a machine where the cut does not show.
|
|
435
|
+
*/
|
|
436
|
+
browserLiveCovers?: boolean;
|
|
384
437
|
/** Whether pages are asked for light or dark to match Deck's theme ("deck") or Windows'. */
|
|
385
438
|
browserPageTheme?: "deck" | "windows";
|
|
386
439
|
/** App links opened without asking, as "<site origin> <scheme>" ("https://zoom.us zoommtg"). */
|
|
@@ -389,6 +442,8 @@ export interface Settings {
|
|
|
389
442
|
browserDefaultAsk?: boolean;
|
|
390
443
|
/** Sites (by host) an agent may use in the browser without asking; localhost and files always. */
|
|
391
444
|
browserAgentSites: string[];
|
|
445
|
+
/** Agents may use any site without being asked (signing in still asks). Off by default. */
|
|
446
|
+
browserAgentAnySite: boolean;
|
|
392
447
|
/**
|
|
393
448
|
* Where a file type opens, by extension (".pdf"): "editor", "browser" or "plugin:<id>". A type
|
|
394
449
|
* not listed is Automatic (see `openerFor` in fileview.ts).
|
|
@@ -407,7 +462,12 @@ export declare const remoteSudoPassword: (host: string, password: string) => Pro
|
|
|
407
462
|
/** Ask for the sudo password of `host` (SudoPasswordPrompt, mounted in App). True once it has
|
|
408
463
|
* been accepted, false if the prompt was cancelled. */
|
|
409
464
|
export declare function askSudoPassword(host: string): Promise<boolean>;
|
|
410
|
-
|
|
465
|
+
/**
|
|
466
|
+
* Watch `paths` for changes made outside Deck (`fs-changed` events, a path each). `owner` names
|
|
467
|
+
* the caller: each owner sets only its own list and the watcher follows every owner's together, so
|
|
468
|
+
* one caller cannot replace or end another's watch. An empty list takes the owner out.
|
|
469
|
+
*/
|
|
470
|
+
export declare const watchFiles: (paths: string[], owner?: string) => Promise<void>;
|
|
411
471
|
/** RAM in bytes: Deck and its WebView2 children, plus every claude.exe. */
|
|
412
472
|
export interface MemServer {
|
|
413
473
|
id: string;
|
package/types/core/browser.d.ts
CHANGED
|
@@ -136,10 +136,22 @@ export declare const takeWaitingUrl: () => {
|
|
|
136
136
|
} | undefined;
|
|
137
137
|
/** A new browser tab, on `url` or on the start page. */
|
|
138
138
|
export declare const newBrowserTab: (url?: string, isPrivate?: boolean) => boolean | void;
|
|
139
|
+
/**
|
|
140
|
+
* A browser tab on `url` in a floating window, so the main window's view stays (Terminals'
|
|
141
|
+
* deck-open-float, core/floatwin.ts openInFloat): `name` the window that collects them ("links"
|
|
142
|
+
* from other programs, "agent" for an agent's pages), `beside` the window a pane is in.
|
|
143
|
+
*/
|
|
144
|
+
export declare function browserInFloat(url: string, where: {
|
|
145
|
+
name?: string;
|
|
146
|
+
beside?: string;
|
|
147
|
+
focus?: boolean;
|
|
148
|
+
}, isPrivate?: boolean): void;
|
|
139
149
|
/** Read once, before the first browser pane asks. */
|
|
140
150
|
export declare const loadPanes: () => Promise<void>;
|
|
141
151
|
/** The page a pane was on when Deck last closed. */
|
|
142
152
|
export declare const savedPage: (pane: string) => string | undefined;
|
|
153
|
+
/** The page a pane should open on, as a restarted Deck reopens one: a closed tab reopened. */
|
|
154
|
+
export declare function seedPage(pane: string, url: string): void;
|
|
143
155
|
/** How Ctrl+Shift+B shows or hides the bookmarks bar: set by the browser pane, which holds the settings. */
|
|
144
156
|
export declare const setBarToggle: (f: () => void) => void;
|
|
145
157
|
/** Bookmark the pane's page, as its star does: Ctrl+D, and the browser menu. */
|
|
@@ -217,6 +229,8 @@ export declare function noteTermOutput(pane: string, chunk: string): void;
|
|
|
217
229
|
export declare function forgetTermPane(pane: string): void;
|
|
218
230
|
/** Where a pane's page is on screen, in Deck's CSS pixels, while it shows one. */
|
|
219
231
|
export declare const pageBox: (pane: string) => DOMRect | null;
|
|
232
|
+
/** The Deck window a pane's page is drawn in: the main one, or a floating tab window's. */
|
|
233
|
+
export declare const paneWindow: (pane: string) => Window;
|
|
220
234
|
/** Close the pane's webview to give back its memory, keeping the tab and its address. */
|
|
221
235
|
export declare function discardBrowserPane(pane: string): Promise<void>;
|
|
222
236
|
export declare function trackBrowser(pane: string, el: HTMLElement, url: string): () => void;
|
package/types/core/fileview.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export declare const fileUrl: (path: string) => string;
|
|
|
52
52
|
* Open `path` where its type opens (`openerFor`), as a tab of its own. False when that is the
|
|
53
53
|
* Editor, which the caller opens it in. Every way Deck opens a file asks this first.
|
|
54
54
|
*/
|
|
55
|
-
export declare function openByType(path: string, hint?: Opener): boolean;
|
|
55
|
+
export declare function openByType(path: string, hint?: Opener, float?: string): boolean;
|
|
56
56
|
/**
|
|
57
57
|
* Everywhere `path` can open in Deck, for an Open with menu: the Editor, the browser (its types,
|
|
58
58
|
* on this PC), and each plugin that opens its type, named for the menu.
|
|
@@ -65,4 +65,8 @@ export declare function openersFor(path: string): {
|
|
|
65
65
|
* Open `path` in `to` whatever the Files tab says, for an Open with menu. False for the Editor,
|
|
66
66
|
* which the caller opens it in (terminals' openInEditor).
|
|
67
67
|
*/
|
|
68
|
-
|
|
68
|
+
/**
|
|
69
|
+
* `float`: in the floating window of that name (Terminals' deck-open-float) rather than as a tab
|
|
70
|
+
* of the main window, for a file another program handed Deck.
|
|
71
|
+
*/
|
|
72
|
+
export declare function openIn(path: string, to: Opener, float?: string): boolean;
|
|
@@ -26,6 +26,8 @@ export interface Notif {
|
|
|
26
26
|
key?: string;
|
|
27
27
|
/** The workspace an agent notification is about: a click goes there. */
|
|
28
28
|
wsId?: string;
|
|
29
|
+
/** The agent's pane: a click goes to it (its tab, and its window if that is a float), else wsId. */
|
|
30
|
+
pane?: string;
|
|
29
31
|
/** Where a click on the card itself goes, when it is not about a workspace. */
|
|
30
32
|
nav?: string;
|
|
31
33
|
/** Who posted it, shown beside the time: a plugin's name. */
|