deck-plugin-sdk 1.11.1 → 1.12.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.
Files changed (51) hide show
  1. package/package.json +1 -1
  2. package/permissions.json +1 -1
  3. package/shim/p2p.d.ts +1 -1
  4. package/shim/settings.d.ts +1 -1
  5. package/shim/terminals.d.ts +1 -1
  6. package/shim/ui.d.ts +10 -10
  7. package/template/plugin.json +1 -1
  8. package/types/components/FileIcon.d.ts +1 -1
  9. package/types/components/TabStrip.d.ts +5 -2
  10. package/types/core/{settingsstore.d.ts → app/settingsstore.d.ts} +1 -1
  11. package/types/core/bridge.d.ts +6 -6
  12. package/types/core/{bookmarks.d.ts → browser/bookmarks.d.ts} +4 -2
  13. package/types/core/{browser.d.ts → browser/browser.d.ts} +1 -1
  14. package/types/core/{editorsettings.d.ts → editor/editorsettings.d.ts} +1 -1
  15. package/types/core/{icontheme.d.ts → editor/icontheme.d.ts} +1 -1
  16. package/types/core/workspaces/layout.d.ts +168 -0
  17. package/types/core/workspaces/terminals.d.ts +252 -0
  18. package/types/core/workspaces/zones.d.ts +215 -0
  19. package/types/modules/editor/MonacoHosts.d.ts +3 -3
  20. package/types/modules/editor/{DiffPeek.d.ts → git/DiffPeek.d.ts} +1 -1
  21. package/types/modules/editor/models.d.ts +1 -1
  22. package/types/modules/editor/{tree.d.ts → tree/tree.d.ts} +1 -1
  23. package/types/core/terminals.d.ts +0 -573
  24. /package/types/core/{p2p.d.ts → app/p2p.d.ts} +0 -0
  25. /package/types/core/{theme.d.ts → app/theme.d.ts} +0 -0
  26. /package/types/core/{timeFormat.d.ts → app/timeFormat.d.ts} +0 -0
  27. /package/types/core/{browserurl.d.ts → browser/browserurl.d.ts} +0 -0
  28. /package/types/core/{dap.d.ts → editor/dap.d.ts} +0 -0
  29. /package/types/core/{debugtargets.d.ts → editor/debugtargets.d.ts} +0 -0
  30. /package/types/core/{decode.d.ts → editor/decode.d.ts} +0 -0
  31. /package/types/core/{editorsession.d.ts → editor/editorsession.d.ts} +0 -0
  32. /package/types/core/{inlay.d.ts → editor/inlay.d.ts} +0 -0
  33. /package/types/core/{langmap.d.ts → editor/langmap.d.ts} +0 -0
  34. /package/types/core/{lsp.d.ts → editor/lsp.d.ts} +0 -0
  35. /package/types/core/{monaco.d.ts → editor/monaco.d.ts} +0 -0
  36. /package/types/core/{patterntokens.d.ts → editor/patterntokens.d.ts} +0 -0
  37. /package/types/core/{snippets.d.ts → editor/snippets.d.ts} +0 -0
  38. /package/types/core/{treehide.d.ts → editor/treehide.d.ts} +0 -0
  39. /package/types/core/{keys.d.ts → keys/keys.d.ts} +0 -0
  40. /package/types/core/{keystore.d.ts → keys/keystore.d.ts} +0 -0
  41. /package/types/core/{notifications.d.ts → notifications/notifications.d.ts} +0 -0
  42. /package/types/core/{notifyapi.d.ts → notifications/notifyapi.d.ts} +0 -0
  43. /package/types/core/{fileview.d.ts → plugins/fileview.d.ts} +0 -0
  44. /package/types/core/{portal.d.ts → workspaces/portal.d.ts} +0 -0
  45. /package/types/core/{remotepath.d.ts → workspaces/remotepath.d.ts} +0 -0
  46. /package/types/core/{shellpath.d.ts → workspaces/shellpath.d.ts} +0 -0
  47. /package/types/core/{windows.d.ts → workspaces/windows.d.ts} +0 -0
  48. /package/types/modules/editor/{diffline.d.ts → git/diffline.d.ts} +0 -0
  49. /package/types/modules/editor/{hunks.d.ts → git/hunks.d.ts} +0 -0
  50. /package/types/modules/editor/{MarkdownLive.d.ts → viewers/MarkdownLive.d.ts} +0 -0
  51. /package/types/modules/editor/{viewers.d.ts → viewers/viewers.d.ts} +0 -0
@@ -0,0 +1,215 @@
1
+ // GENERATED by sdk/gen-types.mjs from Deck's source — do not edit.
2
+ import { LayoutTab, LayoutWorkspace, Layout } from "./layout";
3
+ /**
4
+ * How many columns the zone board has. Here rather than only in the UI because the fallback
5
+ * placement below has to agree with what the overview can draw.
6
+ */
7
+ export declare const ZONE_BOARD = 3;
8
+ /**
9
+ * Every tab's cell on the canvas.
10
+ *
11
+ * Placed tabs claim their stored coordinates first; unplaced ones then fill the free cells in
12
+ * reading order. Two consequences, both load-bearing:
13
+ *
14
+ * - A layout written before zones existed has no coordinates at all, so tab i lands on cell i —
15
+ * the first row, left to right, then the next — without anything on disk being rewritten.
16
+ * - An unplaced tab never lands on a cell a placed tab already holds. Tabs that share a cell ARE
17
+ * one zone, so a tab created without a position (the pinboard, an agent over MCP) must not
18
+ * silently join whichever zone happens to sit at its list index. Before zones held several
19
+ * tabs that collision only drew two zones on top of each other; now it would merge them.
20
+ */
21
+ export declare function zoneCells(tabs: readonly LayoutTab[], cols: number): Map<string, {
22
+ x: number;
23
+ y: number;
24
+ }>;
25
+ /** Where a tab sits on the canvas — which is to say, which zone it belongs to. */
26
+ export declare function zoneAt(tabs: readonly LayoutTab[], id: string, cols?: number): {
27
+ x: number;
28
+ y: number;
29
+ };
30
+ /** One zone: a cell, the tabs in it in list order, and the one it shows. */
31
+ export interface Zone {
32
+ x: number;
33
+ y: number;
34
+ tabs: LayoutTab[];
35
+ front: LayoutTab;
36
+ }
37
+ /**
38
+ * The tabs grouped into zones, one per occupied cell, in the order each cell first appears.
39
+ *
40
+ * The front tab is the one not marked `hidden` — the last one shown there, which is what makes a
41
+ * zone open on the tab you left it on. A cell whose tabs are ALL hidden (its front was closed
42
+ * from outside, by an agent) shows its first, rather than nothing.
43
+ */
44
+ export declare function zones(tabs: readonly LayoutTab[], cols?: number): Zone[];
45
+ /** The zone holding a tab. */
46
+ export declare function zoneOf(tabs: readonly LayoutTab[], id: string): Zone | undefined;
47
+ /**
48
+ * The zone to move to from `id` going `dir`, as the tab it would show, or null when there is
49
+ * none that way.
50
+ *
51
+ * Nearest in a straight line: same row for left/right, same column for up/down, smallest step.
52
+ * No wrapping — running out of canvas should feel like an edge, not teleport you across it.
53
+ */
54
+ export declare function zoneToward(tabs: readonly LayoutTab[], id: string, dir: "left" | "right" | "up" | "down"): LayoutTab | null;
55
+ /**
56
+ * Every tab with explicit coordinates, at the cell it already appeared in.
57
+ *
58
+ * Needed before writing any coordinate: an unplaced tab's position depends on what else is
59
+ * placed, so placing one tab can move another that was relying on the fallback.
60
+ */
61
+ export declare function placeAll(tabs: readonly LayoutTab[]): LayoutTab[];
62
+ /**
63
+ * Put a zone at a spot on the canvas, swapping with whatever is already there.
64
+ *
65
+ * Every tab in the zone moves, since the zone IS the tabs sharing a cell — moving only the one
66
+ * named would split it in two.
67
+ *
68
+ * Swap rather than push-and-shuffle: a zone you did not touch should not move because another
69
+ * one arrived next to it, and with sparse coordinates there is no row to shuffle along anyway.
70
+ */
71
+ export declare function moveZone(tabs: readonly LayoutTab[], id: string, to: {
72
+ x: number;
73
+ y: number;
74
+ }): LayoutTab[];
75
+ /**
76
+ * Move a tab to just before or after another — the order a zone's strip shows its tabs in, which
77
+ * is their order in the list.
78
+ *
79
+ * Every tab's cell is pinned first (placeAll): a tab with no stored position takes its cell from
80
+ * its index, so reordering the list could otherwise move a zone you never touched.
81
+ */
82
+ export declare function reorderTab(tabs: readonly LayoutTab[], srcId: string, overId: string, after: boolean,
83
+ /** A drag in the strip says which group the tab ends up in: the one of the tab it is held over
84
+ * (null: none, held over a tab outside any group or over a group's chip). Left out, the tabs
85
+ * either side decide (settleGroup). */
86
+ group?: string | null): LayoutTab[];
87
+ /**
88
+ * A tab group's tabs sit together in their zone's row: a tab dropped between two of one group's
89
+ * tabs joins it, and one moved away from every other tab of its own group leaves it. Next to one
90
+ * of its group's tabs (at either end) it stays.
91
+ */
92
+ export declare function settleGroup(tabs: LayoutTab[], id: string): LayoutTab[];
93
+ /** A tab group: its tabs carry its id. Its colour is an index into GROUP_COLORS. */
94
+ export interface TabGroup {
95
+ id: string;
96
+ name: string;
97
+ color: number;
98
+ folded?: boolean;
99
+ }
100
+ /** Chrome's group colours, tuned for Deck's dark surfaces. */
101
+ export declare const GROUP_COLORS: string[];
102
+ /** Move a tab to just after the last other tab of `group` in its zone, if it has any there. */
103
+ export declare function besideGroup(tabs: readonly LayoutTab[], id: string, group: string): LayoutTab[];
104
+ /**
105
+ * Put a tab in a group: `groupId`, or a new one in the next colour not yet used (its id is
106
+ * returned, so its editor can open). The tab moves next to the group's other tabs.
107
+ */
108
+ export declare function addToGroup(w: LayoutWorkspace, tabId: string, groupId?: string): {
109
+ w: LayoutWorkspace;
110
+ groupId: string;
111
+ };
112
+ /** Take a tab out of its group, to just after the group's tabs. */
113
+ export declare function leaveGroup(w: LayoutWorkspace, tabId: string): LayoutWorkspace;
114
+ /**
115
+ * Move a whole group, its tabs in their order, to just before or after `overId`. Over another
116
+ * group's tab it goes before or after that group as a whole, never into the middle of it.
117
+ */
118
+ export declare function moveGroup(tabs: readonly LayoutTab[], groupId: string, overId: string, after: boolean): LayoutTab[];
119
+ /**
120
+ * Fold a group, or open it. A group holding the tab its zone shows is not folded over it: the
121
+ * zone moves to the nearest tab outside the group that is not itself folded away (after the group
122
+ * first, then before it). With none, `makeTab` gives a new tab for the zone to open on; without
123
+ * it, the group stays open.
124
+ */
125
+ export declare function toggleGroupFold(w: LayoutWorkspace, groupId: string, makeTab?: () => LayoutTab): LayoutWorkspace;
126
+ /** The group goes; its tabs stay where they are. */
127
+ export declare function ungroup(w: LayoutWorkspace, groupId: string): LayoutWorkspace;
128
+ /** Change a group's name, colour or fold. */
129
+ export declare function setGroup(w: LayoutWorkspace, groupId: string, patch: Partial<Omit<TabGroup, "id">>): LayoutWorkspace;
130
+ /**
131
+ * The open tab is never folded away: however it came to be open (the tab beside a closed one, the
132
+ * switcher, a shortcut, an agent's notification), a folded group holding it opens.
133
+ */
134
+ export declare function openActiveGroup(w: LayoutWorkspace): LayoutWorkspace;
135
+ /** A group with no tabs left goes (its last tab closed, moved to another zone, taken out). */
136
+ export declare function pruneGroups(w: LayoutWorkspace): LayoutWorkspace;
137
+ /**
138
+ * Move one tab to another zone's cell — joining the zone there as the tab it shows, or making a
139
+ * new zone in an empty cell. The zone it left keeps its other tabs.
140
+ */
141
+ export declare function moveTabToZone(tabs: readonly LayoutTab[], tabId: string, to: {
142
+ x: number;
143
+ y: number;
144
+ }): LayoutTab[];
145
+ /**
146
+ * Add a tab to the zone holding `besideId`, as the tab it shows.
147
+ *
148
+ * The others there are marked hidden here rather than left to the active-tab normaliser, so the
149
+ * result is right even for a zone that is not the active one.
150
+ */
151
+ export declare function addTabToZone(tabs: readonly LayoutTab[], besideId: string, tab: LayoutTab): LayoutTab[];
152
+ /**
153
+ * A closed tab put back in workspace `w` (core/workspaces/closedtabs.ts): in front in the zone you are in,
154
+ * with new ids for the tab and its panes, since the old panes' shells and state are gone. Out of
155
+ * any group and any window it was in. Returns the workspace and each old pane's new id.
156
+ */
157
+ export declare function reopenTab(w: LayoutWorkspace, tab: LayoutTab, fresh?: () => string): {
158
+ w: LayoutWorkspace;
159
+ ids: Record<string, string>;
160
+ };
161
+ /**
162
+ * Make a workspace's active tab the one its zone shows.
163
+ *
164
+ * Run on every layout write (mutateLayout), so whatever made a tab active — a click in the
165
+ * strip, the compass, an agent notification jumping to a pane in a tab behind another — the
166
+ * zone ends up showing it, and remembers it next time. One place rather than every caller that
167
+ * sets activeTab, of which there are many and will be more.
168
+ */
169
+ export declare function showActiveTab(w: LayoutWorkspace): LayoutWorkspace;
170
+ /**
171
+ * Which tab becomes active when `closing` goes: the one beside it in the same zone (the next, or
172
+ * the one before when it was last), as a browser does, so closing a tab neither throws you out of
173
+ * the zone nor back to its first tab; otherwise the first zone left.
174
+ */
175
+ export declare function nextActiveAfterClose(tabs: readonly LayoutTab[], closing: string): string | undefined;
176
+ /**
177
+ * Tear a tab off into window `win`, or (`win` undefined) dock it back. A workspace always keeps
178
+ * one docked tab: floating its last one leaves a fresh terminal behind, as the main window has
179
+ * to show something. Tearing off the active tab makes its neighbour active.
180
+ */
181
+ export declare function setTabWindow(w: LayoutWorkspace, tabId: string, win: string | undefined, keepGroup?: boolean): LayoutWorkspace;
182
+ /**
183
+ * Merge floating window `from`'s tabs into another window: floating window `into`, or (`into`
184
+ * null) the main window, into the active zone of the project it shows. They go in behind the tab
185
+ * that window shows, which stays shown: a tab dropped somewhere does not take you away from the one
186
+ * you were on. The tabs move between projects when the window they land in shows another one's,
187
+ * since a window holds one project's tabs.
188
+ */
189
+ export declare function mergeWindow(l: Layout, from: string, into: string | null): Layout;
190
+ /**
191
+ * Close floating window `id` into the main window: its tabs go back to their zones, each behind the
192
+ * tab its zone shows, so closing a window does not take you away from the tab you are on. With
193
+ * `discard` (its X, Alt+F4), the tabs Deck opened into it (`transient`) close instead; the caller
194
+ * destroys their panes.
195
+ */
196
+ export declare function dockWindow(l: Layout, id: string, discard?: boolean): Layout;
197
+ /** The first free spot on the top row, for a zone created without a position of its own. */
198
+ export declare function nextZoneSpot(tabs: readonly LayoutTab[], cols?: number, rows?: number): {
199
+ x: number;
200
+ y: number;
201
+ };
202
+ /**
203
+ * Is there nowhere left to put a zone?
204
+ *
205
+ * Counts zones, not tabs: a zone can hold several tabs and still take one cell.
206
+ *
207
+ * The board is a fixed 3x3 — deliberately, so the overview and the Ctrl+Alt compass are always
208
+ * the same nine cells. A tenth zone has no spot: it drew off the edge of the overview and the
209
+ * compass could not reach it, so it existed but could not be seen or switched to.
210
+ *
211
+ * Checked by every caller that creates one, rather than inside nextZoneSpot, because refusing
212
+ * and reporting why is the caller's job — the keyboard shortcut says so in a toast, and the
213
+ * layout op tells the agent that asked.
214
+ */
215
+ export declare function zoneBoardFull(tabs: readonly LayoutTab[], cols?: number, rows?: number): boolean;
@@ -1,7 +1,7 @@
1
1
  // GENERATED by sdk/gen-types.mjs from Deck's source — do not edit.
2
- import { monaco } from "../../core/monaco";
3
- import { type EditorSettings } from "../../core/editorsettings";
4
- import type { DirtyRange } from "./hunks";
2
+ import { monaco } from "../../core/editor/monaco";
3
+ import { type EditorSettings } from "../../core/editor/editorsettings";
4
+ import type { DirtyRange } from "./git/hunks";
5
5
  declare function MonacoEditorInner({ path, rel, value, onChange, onSave, gotoLine, gotoCol, gotoNonce, highlight, dirty, settings, onEditor, clean, onStageChange, onUnstageChange, onReadBase }: {
6
6
  path: string;
7
7
  rel?: string | null;
@@ -1,6 +1,6 @@
1
1
  // GENERATED by sdk/gen-types.mjs from Deck's source — do not edit.
2
2
  import { type RefObject } from "react";
3
- import { monaco } from "../../core/monaco";
3
+ import { monaco } from "../../../core/editor/monaco";
4
4
  import { type DirtyRange } from "./hunks";
5
5
  /**
6
6
  * The peek, for the editor in `edRef` showing `path` with the gutter's `ranges`. Returns what to
@@ -1,5 +1,5 @@
1
1
  // GENERATED by sdk/gen-types.mjs from Deck's source — do not edit.
2
- import { monaco } from "../../core/monaco";
2
+ import { monaco } from "../../core/editor/monaco";
3
3
  export declare const viewStates: Map<string, monaco.editor.ICodeEditorViewState | null>;
4
4
  /**
5
5
  * An untitled buffer (Ctrl+N): `untitled:Untitled-N`. It has no file behind it, so its model gets
@@ -1,5 +1,5 @@
1
1
  // GENERATED by sdk/gen-types.mjs from Deck's source — do not edit.
2
- import type { GitStatusRow } from "../../core/bridge";
2
+ import type { GitStatusRow } from "../../../core/bridge";
3
3
  /** Last path segment, trailing separators ignored. */
4
4
  export declare const baseName: (p: string) => string;
5
5
  /** Windows paths use both separators; normalize to "/" for comparison and display. */