@gjermundgaraba-designs/pixel-paper 0.18.0 → 0.20.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/DESIGN.md +26 -5
- package/dist/src/commandPalette/commandPalette.d.ts +2 -2
- package/dist/src/commandPalette/commandPalette.d.ts.map +1 -1
- package/dist/src/commandPalette/commandPalette.js +66 -42
- package/dist/src/commandPalette/match.d.ts +15 -5
- package/dist/src/commandPalette/match.d.ts.map +1 -1
- package/dist/src/commandPalette/match.js +17 -2
- package/dist/src/drag/drag.d.ts +3 -0
- package/dist/src/drag/drag.d.ts.map +1 -1
- package/dist/src/drag/drag.js +14 -10
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/reel/index.d.ts +4 -0
- package/dist/src/reel/index.d.ts.map +1 -0
- package/dist/src/reel/index.js +2 -0
- package/dist/src/reel/layout.d.ts +180 -0
- package/dist/src/reel/layout.d.ts.map +1 -0
- package/dist/src/reel/layout.js +370 -0
- package/dist/src/reel/reel.d.ts +1158 -0
- package/dist/src/reel/reel.d.ts.map +1 -0
- package/dist/src/reel/reel.js +922 -0
- package/dist/src/sortable/sortable.d.ts +30 -30
- package/dist/src/sortable/sortable.d.ts.map +1 -1
- package/dist/src/sortable/sortable.js +2 -10
- package/dist/src/toast/toast.d.ts +12 -12
- package/dist/src/window/window.d.ts +2 -0
- package/dist/src/window/window.d.ts.map +1 -1
- package/dist/src/window/window.js +2 -1
- package/package.json +1 -1
- package/src/commandPalette/commandPalette.ts +71 -24
- package/src/commandPalette/match.ts +35 -6
- package/src/drag/drag.ts +19 -4
- package/src/index.ts +1 -0
- package/src/pixel-paper.css +236 -2
- package/src/reel/index.ts +20 -0
- package/src/reel/layout.ts +602 -0
- package/src/reel/reel.ts +1597 -0
- package/src/sortable/sortable.ts +8 -16
- package/src/tokens.css +5 -0
- package/src/window/window.ts +4 -0
|
@@ -0,0 +1,1158 @@
|
|
|
1
|
+
import { Effect, Option, Schema } from "effect";
|
|
2
|
+
import * as Command from "foldkit/command";
|
|
3
|
+
import type { Html } from "foldkit/html";
|
|
4
|
+
import * as Mount from "foldkit/mount";
|
|
5
|
+
import * as Subscription from "foldkit/subscription";
|
|
6
|
+
import type * as Update from "foldkit/update";
|
|
7
|
+
import { type Layout, OutMessage, type Pane } from "./layout.ts";
|
|
8
|
+
/** Schema for a reel: its id, the focused pane, what is held and a splitter being dragged. All
|
|
9
|
+
* of it is this client's; the layout is the application's. */
|
|
10
|
+
export declare const Model: Schema.Struct<{
|
|
11
|
+
readonly id: Schema.String;
|
|
12
|
+
readonly maybeFocus: Schema.Option<Schema.Struct<{
|
|
13
|
+
readonly paneId: Schema.String;
|
|
14
|
+
readonly column: Schema.Number;
|
|
15
|
+
readonly row: Schema.Number;
|
|
16
|
+
}>>;
|
|
17
|
+
readonly maybeHeld: Schema.Option<Schema.Struct<{
|
|
18
|
+
readonly subject: import("foldkit/schema").TaggedUnion<{
|
|
19
|
+
readonly Pane: {
|
|
20
|
+
paneId: Schema.String;
|
|
21
|
+
};
|
|
22
|
+
readonly Column: {
|
|
23
|
+
columnId: Schema.String;
|
|
24
|
+
};
|
|
25
|
+
}>;
|
|
26
|
+
readonly by: import("foldkit/schema").TaggedUnion<{
|
|
27
|
+
readonly Pointer: {
|
|
28
|
+
pointerId: Schema.Number;
|
|
29
|
+
pressX: Schema.Number;
|
|
30
|
+
pressY: Schema.Number;
|
|
31
|
+
x: Schema.Number;
|
|
32
|
+
y: Schema.Number;
|
|
33
|
+
isCarrying: Schema.Boolean;
|
|
34
|
+
};
|
|
35
|
+
readonly Keyboard: {};
|
|
36
|
+
}>;
|
|
37
|
+
readonly maybeTarget: Schema.Option<import("foldkit/schema").TaggedUnion<{
|
|
38
|
+
readonly Into: {
|
|
39
|
+
columnId: Schema.String;
|
|
40
|
+
index: Schema.Number;
|
|
41
|
+
};
|
|
42
|
+
readonly Gap: {
|
|
43
|
+
maybeBeforeColumnId: Schema.Option<Schema.String>;
|
|
44
|
+
};
|
|
45
|
+
}>>;
|
|
46
|
+
}>>;
|
|
47
|
+
readonly maybeResizing: Schema.Option<Schema.Struct<{
|
|
48
|
+
readonly splitter: import("foldkit/schema").TaggedUnion<{
|
|
49
|
+
readonly Width: {
|
|
50
|
+
columnId: Schema.String;
|
|
51
|
+
};
|
|
52
|
+
readonly Split: {
|
|
53
|
+
abovePaneId: Schema.String;
|
|
54
|
+
};
|
|
55
|
+
}>;
|
|
56
|
+
readonly pointerId: Schema.Number;
|
|
57
|
+
readonly pressX: Schema.Number;
|
|
58
|
+
readonly pressY: Schema.Number;
|
|
59
|
+
readonly maybeResize: Schema.Option<Schema.Union<readonly [import("foldkit/schema").CallableTaggedStruct<"ResizedColumn", {
|
|
60
|
+
readonly columnId: Schema.String;
|
|
61
|
+
readonly width: Schema.Number;
|
|
62
|
+
}>, import("foldkit/schema").CallableTaggedStruct<"ResizedPanes", {
|
|
63
|
+
readonly columnId: Schema.String;
|
|
64
|
+
readonly weights: Schema.$Record<Schema.String, Schema.Number>;
|
|
65
|
+
}>]>>;
|
|
66
|
+
}>>;
|
|
67
|
+
}>;
|
|
68
|
+
export type Model = typeof Model.Type;
|
|
69
|
+
/** Union of all Messages a reel can produce. */
|
|
70
|
+
export declare const Message: import("foldkit/message").MessageUnion<{
|
|
71
|
+
readonly PressedGrip: {
|
|
72
|
+
subject: import("foldkit/schema").TaggedUnion<{
|
|
73
|
+
readonly Pane: {
|
|
74
|
+
paneId: Schema.String;
|
|
75
|
+
};
|
|
76
|
+
readonly Column: {
|
|
77
|
+
columnId: Schema.String;
|
|
78
|
+
};
|
|
79
|
+
}>;
|
|
80
|
+
pointerId: Schema.Number;
|
|
81
|
+
clientX: Schema.Number;
|
|
82
|
+
clientY: Schema.Number;
|
|
83
|
+
};
|
|
84
|
+
readonly PressedGripKey: {
|
|
85
|
+
subject: import("foldkit/schema").TaggedUnion<{
|
|
86
|
+
readonly Pane: {
|
|
87
|
+
paneId: Schema.String;
|
|
88
|
+
};
|
|
89
|
+
readonly Column: {
|
|
90
|
+
columnId: Schema.String;
|
|
91
|
+
};
|
|
92
|
+
}>;
|
|
93
|
+
};
|
|
94
|
+
readonly MovedPointer: {
|
|
95
|
+
readonly clientX: Schema.Number;
|
|
96
|
+
readonly clientY: Schema.Number;
|
|
97
|
+
readonly maybeTarget: Schema.Option<import("foldkit/schema").TaggedUnion<{
|
|
98
|
+
readonly Into: {
|
|
99
|
+
columnId: Schema.String;
|
|
100
|
+
index: Schema.Number;
|
|
101
|
+
};
|
|
102
|
+
readonly Gap: {
|
|
103
|
+
maybeBeforeColumnId: Schema.Option<Schema.String>;
|
|
104
|
+
};
|
|
105
|
+
}>>;
|
|
106
|
+
};
|
|
107
|
+
readonly ReleasedPointer: {
|
|
108
|
+
readonly clientX: Schema.Number;
|
|
109
|
+
readonly clientY: Schema.Number;
|
|
110
|
+
readonly maybeTarget: Schema.Option<import("foldkit/schema").TaggedUnion<{
|
|
111
|
+
readonly Into: {
|
|
112
|
+
columnId: Schema.String;
|
|
113
|
+
index: Schema.Number;
|
|
114
|
+
};
|
|
115
|
+
readonly Gap: {
|
|
116
|
+
maybeBeforeColumnId: Schema.Option<Schema.String>;
|
|
117
|
+
};
|
|
118
|
+
}>>;
|
|
119
|
+
};
|
|
120
|
+
readonly CancelledPointer: {};
|
|
121
|
+
readonly SteppedHeld: {
|
|
122
|
+
step: Schema.Literals<readonly ["Up", "Down", "Left", "Right"]>;
|
|
123
|
+
};
|
|
124
|
+
readonly DroppedHeld: {};
|
|
125
|
+
readonly LeftGrip: {};
|
|
126
|
+
readonly PressedEscape: {};
|
|
127
|
+
readonly FocusedPane: {
|
|
128
|
+
paneId: Schema.String;
|
|
129
|
+
};
|
|
130
|
+
readonly PressedSplitter: {
|
|
131
|
+
splitter: import("foldkit/schema").TaggedUnion<{
|
|
132
|
+
readonly Width: {
|
|
133
|
+
columnId: Schema.String;
|
|
134
|
+
};
|
|
135
|
+
readonly Split: {
|
|
136
|
+
abovePaneId: Schema.String;
|
|
137
|
+
};
|
|
138
|
+
}>;
|
|
139
|
+
pointerId: Schema.Number;
|
|
140
|
+
clientX: Schema.Number;
|
|
141
|
+
clientY: Schema.Number;
|
|
142
|
+
};
|
|
143
|
+
readonly MovedSplitter: {
|
|
144
|
+
share: Schema.Number;
|
|
145
|
+
};
|
|
146
|
+
readonly ReleasedSplitter: {
|
|
147
|
+
share: Schema.Number;
|
|
148
|
+
};
|
|
149
|
+
readonly CancelledSplitter: {};
|
|
150
|
+
readonly PressedSplitterKey: {
|
|
151
|
+
splitter: import("foldkit/schema").TaggedUnion<{
|
|
152
|
+
readonly Width: {
|
|
153
|
+
columnId: Schema.String;
|
|
154
|
+
};
|
|
155
|
+
readonly Split: {
|
|
156
|
+
abovePaneId: Schema.String;
|
|
157
|
+
};
|
|
158
|
+
}>;
|
|
159
|
+
share: Schema.Number;
|
|
160
|
+
};
|
|
161
|
+
readonly CompletedAnnounceReel: {};
|
|
162
|
+
readonly CompletedFocusPane: {};
|
|
163
|
+
readonly CompletedRestoreFocus: {};
|
|
164
|
+
readonly CompletedFocusGrip: {};
|
|
165
|
+
readonly CompletedScrollIntoView: {};
|
|
166
|
+
readonly CompletedSizeLiftedPane: {};
|
|
167
|
+
}>;
|
|
168
|
+
export type Message = typeof Message.Type;
|
|
169
|
+
/** Configuration for creating a reel with `init`. The `id` must be unique in the document;
|
|
170
|
+
* the reel's DOM hooks are scoped by it. */
|
|
171
|
+
export type InitConfig = Readonly<{
|
|
172
|
+
id: string;
|
|
173
|
+
}>;
|
|
174
|
+
/** Creates a reel focused on its first pane, holding nothing, at rest. */
|
|
175
|
+
export declare const init: (config: InitConfig) => Model;
|
|
176
|
+
/** The pane focus is on: the one last focused, or, when it has gone from `layout`, the pane
|
|
177
|
+
* now nearest its place; the first pane before any is focused. None for an empty layout. */
|
|
178
|
+
export declare const focusedPaneId: (model: Model, layout: Layout) => Option.Option<string>;
|
|
179
|
+
/** Says a focus move, a move or a step of a drag through the page's live region (as
|
|
180
|
+
* `Announcer.Announce` does). */
|
|
181
|
+
export declare const AnnounceReel: Command.CommandDefinitionWithArgs<"AnnounceReel", {
|
|
182
|
+
text: Schema.String;
|
|
183
|
+
}, Effect.Effect<{
|
|
184
|
+
readonly _tag: "CompletedAnnounceReel";
|
|
185
|
+
}, never, never>>;
|
|
186
|
+
/** Focuses the pane `paneHook` names, unless focus is already inside it: the control in it
|
|
187
|
+
* marked `data-reel-focus` (a terminal's input), or the pane itself. It does not scroll;
|
|
188
|
+
* ScrollIntoView does. */
|
|
189
|
+
export declare const FocusPane: Command.CommandDefinitionWithArgs<"FocusPane", {
|
|
190
|
+
paneHook: Schema.String;
|
|
191
|
+
}, Effect.Effect<{
|
|
192
|
+
readonly _tag: "CompletedFocusPane";
|
|
193
|
+
}, never, never>>;
|
|
194
|
+
/** Focuses the pane `paneHook` names only where focus was lost (it left with the pane that
|
|
195
|
+
* held it), so focus the reader put somewhere else stays there. */
|
|
196
|
+
export declare const RestoreFocus: Command.CommandDefinitionWithArgs<"RestoreFocus", {
|
|
197
|
+
paneHook: Schema.String;
|
|
198
|
+
}, Effect.Effect<{
|
|
199
|
+
readonly _tag: "CompletedRestoreFocus";
|
|
200
|
+
}, never, never>>;
|
|
201
|
+
/** Puts focus back on a column's grip once the render that moved its column is in the page:
|
|
202
|
+
* a column's element moves with it, which takes focus off its grip. */
|
|
203
|
+
export declare const FocusGrip: Command.CommandDefinitionWithArgs<"FocusGrip", {
|
|
204
|
+
gripHook: Schema.String;
|
|
205
|
+
}, Effect.Effect<{
|
|
206
|
+
readonly _tag: "CompletedFocusGrip";
|
|
207
|
+
}, never, never>>;
|
|
208
|
+
/** Scrolls the pane or column `hook` names into view, by the least distance either way, its
|
|
209
|
+
* gutter kept by the stylesheet's `scroll-margin`, once the render that placed it is in the
|
|
210
|
+
* page. It jumps: motion is stepped or instant, and a follow is instant. */
|
|
211
|
+
export declare const ScrollIntoView: Command.CommandDefinitionWithArgs<"ScrollIntoView", {
|
|
212
|
+
hook: Schema.String;
|
|
213
|
+
}, Effect.Effect<{
|
|
214
|
+
readonly _tag: "CompletedScrollIntoView";
|
|
215
|
+
}, never, never>>;
|
|
216
|
+
/** What the reel reads from its parent as each Message arrives: the layout as the
|
|
217
|
+
* application holds it now. */
|
|
218
|
+
export type UpdateContext = Readonly<{
|
|
219
|
+
layout: Layout;
|
|
220
|
+
}>;
|
|
221
|
+
type UpdateReturn = Update.ReturnWithOutMessage<Model, Message, OutMessage>;
|
|
222
|
+
/** Processes a reel Message against the layout as the application holds it now, and returns
|
|
223
|
+
* the next Model, Commands and OutMessage. */
|
|
224
|
+
export declare const update: (model: Model, message: Message, context: UpdateContext) => UpdateReturn;
|
|
225
|
+
/**
|
|
226
|
+
* Brings the reel in line with a layout that changed: call it whenever the application changes
|
|
227
|
+
* the layout, by a request it applied, another client's or one of its own (a pane closed). The
|
|
228
|
+
* focused pane's place is read again; when it has gone, focus moves to the pane now nearest
|
|
229
|
+
* where it was, and the keyboard follows where it went with the pane. A drag whose pane or
|
|
230
|
+
* column has gone is cancelled, and one whose target's column has gone aims where it started;
|
|
231
|
+
* a splitter whose column or pane has gone lets go.
|
|
232
|
+
*/
|
|
233
|
+
export declare const reconcile: (model: Model, context: UpdateContext) => UpdateReturn;
|
|
234
|
+
/** What the application's keys ask of the reel. `Focus*`: focus the pane beside the focused
|
|
235
|
+
* one. `MovePane*`: move the focused pane up or down its column, or into the column beside it
|
|
236
|
+
* (past the first or last column, into a column of its own). `MoveColumn*`: move its column.
|
|
237
|
+
* `CycleWidth`: its column's width to the next preset. `PullOut`: the pane into a column of
|
|
238
|
+
* its own, right of its column. */
|
|
239
|
+
export declare const Action: Schema.Literals<readonly ["FocusLeft", "FocusRight", "FocusUp", "FocusDown", "MovePaneLeft", "MovePaneRight", "MovePaneUp", "MovePaneDown", "MoveColumnLeft", "MoveColumnRight", "CycleWidth", "PullOut"]>;
|
|
240
|
+
export type Action = typeof Action.Type;
|
|
241
|
+
/**
|
|
242
|
+
* Does what the application's key for `action` asks, from the focused pane, against the
|
|
243
|
+
* layout as the application holds it: focus moves focus the pane and scroll the reel to it;
|
|
244
|
+
* moves report their request as the OutMessage, which the application applies, with focus
|
|
245
|
+
* kept on the pane. Each is said through the live region. Nothing happens while something is
|
|
246
|
+
* held, or where there is nowhere to go.
|
|
247
|
+
*/
|
|
248
|
+
export declare const perform: (model: Model, action: Action, context: UpdateContext) => UpdateReturn;
|
|
249
|
+
/** A held pane or column follows the pointer (the reel scrolling near its edges), a dragged
|
|
250
|
+
* splitter resizes, and Escape puts either back, before a dialog or the page sees it, from
|
|
251
|
+
* listeners that run only while something is held. Lift them into the application's
|
|
252
|
+
* Subscriptions, once per reel, behind a key prefix of the parent's: `subscriptions("tiles")`
|
|
253
|
+
* is keyed `tilesPointer`, `tilesEdge`, `tilesResize` and `tilesEscape`. */
|
|
254
|
+
export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) => {
|
|
255
|
+
readonly pointer: Subscription.EntryWithoutKeepAlive<{
|
|
256
|
+
readonly id: string;
|
|
257
|
+
readonly maybeFocus: Option.Option<{
|
|
258
|
+
readonly paneId: string;
|
|
259
|
+
readonly column: number;
|
|
260
|
+
readonly row: number;
|
|
261
|
+
}>;
|
|
262
|
+
readonly maybeHeld: Option.Option<{
|
|
263
|
+
readonly subject: {
|
|
264
|
+
readonly _tag: "Column";
|
|
265
|
+
readonly columnId: string;
|
|
266
|
+
} | {
|
|
267
|
+
readonly _tag: "Pane";
|
|
268
|
+
readonly paneId: string;
|
|
269
|
+
};
|
|
270
|
+
readonly by: {
|
|
271
|
+
readonly _tag: "Keyboard";
|
|
272
|
+
} | {
|
|
273
|
+
readonly _tag: "Pointer";
|
|
274
|
+
readonly pointerId: number;
|
|
275
|
+
readonly pressX: number;
|
|
276
|
+
readonly pressY: number;
|
|
277
|
+
readonly x: number;
|
|
278
|
+
readonly y: number;
|
|
279
|
+
readonly isCarrying: boolean;
|
|
280
|
+
};
|
|
281
|
+
readonly maybeTarget: Option.Option<{
|
|
282
|
+
readonly _tag: "Gap";
|
|
283
|
+
readonly maybeBeforeColumnId: Option.Option<string>;
|
|
284
|
+
} | {
|
|
285
|
+
readonly _tag: "Into";
|
|
286
|
+
readonly columnId: string;
|
|
287
|
+
readonly index: number;
|
|
288
|
+
}>;
|
|
289
|
+
}>;
|
|
290
|
+
readonly maybeResizing: Option.Option<{
|
|
291
|
+
readonly splitter: {
|
|
292
|
+
readonly _tag: "Split";
|
|
293
|
+
readonly abovePaneId: string;
|
|
294
|
+
} | {
|
|
295
|
+
readonly _tag: "Width";
|
|
296
|
+
readonly columnId: string;
|
|
297
|
+
};
|
|
298
|
+
readonly pointerId: number;
|
|
299
|
+
readonly pressX: number;
|
|
300
|
+
readonly pressY: number;
|
|
301
|
+
readonly maybeResize: Option.Option<{
|
|
302
|
+
readonly _tag: "ResizedColumn";
|
|
303
|
+
readonly columnId: string;
|
|
304
|
+
readonly width: number;
|
|
305
|
+
} | {
|
|
306
|
+
readonly _tag: "ResizedPanes";
|
|
307
|
+
readonly columnId: string;
|
|
308
|
+
readonly weights: {
|
|
309
|
+
readonly [x: string]: number;
|
|
310
|
+
};
|
|
311
|
+
}>;
|
|
312
|
+
}>;
|
|
313
|
+
}, {
|
|
314
|
+
readonly _tag: "PressedEscape";
|
|
315
|
+
} | {
|
|
316
|
+
readonly _tag: "CancelledPointer";
|
|
317
|
+
} | {
|
|
318
|
+
readonly _tag: "CancelledSplitter";
|
|
319
|
+
} | {
|
|
320
|
+
readonly _tag: "CompletedAnnounceReel";
|
|
321
|
+
} | {
|
|
322
|
+
readonly _tag: "CompletedFocusGrip";
|
|
323
|
+
} | {
|
|
324
|
+
readonly _tag: "CompletedFocusPane";
|
|
325
|
+
} | {
|
|
326
|
+
readonly _tag: "CompletedRestoreFocus";
|
|
327
|
+
} | {
|
|
328
|
+
readonly _tag: "CompletedScrollIntoView";
|
|
329
|
+
} | {
|
|
330
|
+
readonly _tag: "CompletedSizeLiftedPane";
|
|
331
|
+
} | {
|
|
332
|
+
readonly _tag: "DroppedHeld";
|
|
333
|
+
} | {
|
|
334
|
+
readonly _tag: "FocusedPane";
|
|
335
|
+
readonly paneId: string;
|
|
336
|
+
} | {
|
|
337
|
+
readonly _tag: "LeftGrip";
|
|
338
|
+
} | {
|
|
339
|
+
readonly _tag: "MovedPointer";
|
|
340
|
+
readonly clientX: number;
|
|
341
|
+
readonly clientY: number;
|
|
342
|
+
readonly maybeTarget: Option.Option<{
|
|
343
|
+
readonly _tag: "Gap";
|
|
344
|
+
readonly maybeBeforeColumnId: Option.Option<string>;
|
|
345
|
+
} | {
|
|
346
|
+
readonly _tag: "Into";
|
|
347
|
+
readonly columnId: string;
|
|
348
|
+
readonly index: number;
|
|
349
|
+
}>;
|
|
350
|
+
} | {
|
|
351
|
+
readonly _tag: "MovedSplitter";
|
|
352
|
+
readonly share: number;
|
|
353
|
+
} | {
|
|
354
|
+
readonly _tag: "PressedGrip";
|
|
355
|
+
readonly subject: {
|
|
356
|
+
readonly _tag: "Column";
|
|
357
|
+
readonly columnId: string;
|
|
358
|
+
} | {
|
|
359
|
+
readonly _tag: "Pane";
|
|
360
|
+
readonly paneId: string;
|
|
361
|
+
};
|
|
362
|
+
readonly pointerId: number;
|
|
363
|
+
readonly clientX: number;
|
|
364
|
+
readonly clientY: number;
|
|
365
|
+
} | {
|
|
366
|
+
readonly _tag: "PressedGripKey";
|
|
367
|
+
readonly subject: {
|
|
368
|
+
readonly _tag: "Column";
|
|
369
|
+
readonly columnId: string;
|
|
370
|
+
} | {
|
|
371
|
+
readonly _tag: "Pane";
|
|
372
|
+
readonly paneId: string;
|
|
373
|
+
};
|
|
374
|
+
} | {
|
|
375
|
+
readonly _tag: "PressedSplitter";
|
|
376
|
+
readonly splitter: {
|
|
377
|
+
readonly _tag: "Split";
|
|
378
|
+
readonly abovePaneId: string;
|
|
379
|
+
} | {
|
|
380
|
+
readonly _tag: "Width";
|
|
381
|
+
readonly columnId: string;
|
|
382
|
+
};
|
|
383
|
+
readonly pointerId: number;
|
|
384
|
+
readonly clientX: number;
|
|
385
|
+
readonly clientY: number;
|
|
386
|
+
} | {
|
|
387
|
+
readonly _tag: "PressedSplitterKey";
|
|
388
|
+
readonly splitter: {
|
|
389
|
+
readonly _tag: "Split";
|
|
390
|
+
readonly abovePaneId: string;
|
|
391
|
+
} | {
|
|
392
|
+
readonly _tag: "Width";
|
|
393
|
+
readonly columnId: string;
|
|
394
|
+
};
|
|
395
|
+
readonly share: number;
|
|
396
|
+
} | {
|
|
397
|
+
readonly _tag: "ReleasedPointer";
|
|
398
|
+
readonly clientX: number;
|
|
399
|
+
readonly clientY: number;
|
|
400
|
+
readonly maybeTarget: Option.Option<{
|
|
401
|
+
readonly _tag: "Gap";
|
|
402
|
+
readonly maybeBeforeColumnId: Option.Option<string>;
|
|
403
|
+
} | {
|
|
404
|
+
readonly _tag: "Into";
|
|
405
|
+
readonly columnId: string;
|
|
406
|
+
readonly index: number;
|
|
407
|
+
}>;
|
|
408
|
+
} | {
|
|
409
|
+
readonly _tag: "ReleasedSplitter";
|
|
410
|
+
readonly share: number;
|
|
411
|
+
} | {
|
|
412
|
+
readonly _tag: "SteppedHeld";
|
|
413
|
+
readonly step: "Down" | "Left" | "Right" | "Up";
|
|
414
|
+
}, {
|
|
415
|
+
readonly maybeHold: Option.Option<{
|
|
416
|
+
readonly reelHook: string;
|
|
417
|
+
readonly subject: {
|
|
418
|
+
readonly _tag: "Column";
|
|
419
|
+
readonly columnId: string;
|
|
420
|
+
} | {
|
|
421
|
+
readonly _tag: "Pane";
|
|
422
|
+
readonly paneId: string;
|
|
423
|
+
};
|
|
424
|
+
readonly pointerId: number;
|
|
425
|
+
}>;
|
|
426
|
+
}, never> & {
|
|
427
|
+
readonly __subscription: never;
|
|
428
|
+
};
|
|
429
|
+
readonly edge: Subscription.EntryWithoutKeepAlive<{
|
|
430
|
+
readonly id: string;
|
|
431
|
+
readonly maybeFocus: Option.Option<{
|
|
432
|
+
readonly paneId: string;
|
|
433
|
+
readonly column: number;
|
|
434
|
+
readonly row: number;
|
|
435
|
+
}>;
|
|
436
|
+
readonly maybeHeld: Option.Option<{
|
|
437
|
+
readonly subject: {
|
|
438
|
+
readonly _tag: "Column";
|
|
439
|
+
readonly columnId: string;
|
|
440
|
+
} | {
|
|
441
|
+
readonly _tag: "Pane";
|
|
442
|
+
readonly paneId: string;
|
|
443
|
+
};
|
|
444
|
+
readonly by: {
|
|
445
|
+
readonly _tag: "Keyboard";
|
|
446
|
+
} | {
|
|
447
|
+
readonly _tag: "Pointer";
|
|
448
|
+
readonly pointerId: number;
|
|
449
|
+
readonly pressX: number;
|
|
450
|
+
readonly pressY: number;
|
|
451
|
+
readonly x: number;
|
|
452
|
+
readonly y: number;
|
|
453
|
+
readonly isCarrying: boolean;
|
|
454
|
+
};
|
|
455
|
+
readonly maybeTarget: Option.Option<{
|
|
456
|
+
readonly _tag: "Gap";
|
|
457
|
+
readonly maybeBeforeColumnId: Option.Option<string>;
|
|
458
|
+
} | {
|
|
459
|
+
readonly _tag: "Into";
|
|
460
|
+
readonly columnId: string;
|
|
461
|
+
readonly index: number;
|
|
462
|
+
}>;
|
|
463
|
+
}>;
|
|
464
|
+
readonly maybeResizing: Option.Option<{
|
|
465
|
+
readonly splitter: {
|
|
466
|
+
readonly _tag: "Split";
|
|
467
|
+
readonly abovePaneId: string;
|
|
468
|
+
} | {
|
|
469
|
+
readonly _tag: "Width";
|
|
470
|
+
readonly columnId: string;
|
|
471
|
+
};
|
|
472
|
+
readonly pointerId: number;
|
|
473
|
+
readonly pressX: number;
|
|
474
|
+
readonly pressY: number;
|
|
475
|
+
readonly maybeResize: Option.Option<{
|
|
476
|
+
readonly _tag: "ResizedColumn";
|
|
477
|
+
readonly columnId: string;
|
|
478
|
+
readonly width: number;
|
|
479
|
+
} | {
|
|
480
|
+
readonly _tag: "ResizedPanes";
|
|
481
|
+
readonly columnId: string;
|
|
482
|
+
readonly weights: {
|
|
483
|
+
readonly [x: string]: number;
|
|
484
|
+
};
|
|
485
|
+
}>;
|
|
486
|
+
}>;
|
|
487
|
+
}, {
|
|
488
|
+
readonly _tag: "PressedEscape";
|
|
489
|
+
} | {
|
|
490
|
+
readonly _tag: "CancelledPointer";
|
|
491
|
+
} | {
|
|
492
|
+
readonly _tag: "CancelledSplitter";
|
|
493
|
+
} | {
|
|
494
|
+
readonly _tag: "CompletedAnnounceReel";
|
|
495
|
+
} | {
|
|
496
|
+
readonly _tag: "CompletedFocusGrip";
|
|
497
|
+
} | {
|
|
498
|
+
readonly _tag: "CompletedFocusPane";
|
|
499
|
+
} | {
|
|
500
|
+
readonly _tag: "CompletedRestoreFocus";
|
|
501
|
+
} | {
|
|
502
|
+
readonly _tag: "CompletedScrollIntoView";
|
|
503
|
+
} | {
|
|
504
|
+
readonly _tag: "CompletedSizeLiftedPane";
|
|
505
|
+
} | {
|
|
506
|
+
readonly _tag: "DroppedHeld";
|
|
507
|
+
} | {
|
|
508
|
+
readonly _tag: "FocusedPane";
|
|
509
|
+
readonly paneId: string;
|
|
510
|
+
} | {
|
|
511
|
+
readonly _tag: "LeftGrip";
|
|
512
|
+
} | {
|
|
513
|
+
readonly _tag: "MovedPointer";
|
|
514
|
+
readonly clientX: number;
|
|
515
|
+
readonly clientY: number;
|
|
516
|
+
readonly maybeTarget: Option.Option<{
|
|
517
|
+
readonly _tag: "Gap";
|
|
518
|
+
readonly maybeBeforeColumnId: Option.Option<string>;
|
|
519
|
+
} | {
|
|
520
|
+
readonly _tag: "Into";
|
|
521
|
+
readonly columnId: string;
|
|
522
|
+
readonly index: number;
|
|
523
|
+
}>;
|
|
524
|
+
} | {
|
|
525
|
+
readonly _tag: "MovedSplitter";
|
|
526
|
+
readonly share: number;
|
|
527
|
+
} | {
|
|
528
|
+
readonly _tag: "PressedGrip";
|
|
529
|
+
readonly subject: {
|
|
530
|
+
readonly _tag: "Column";
|
|
531
|
+
readonly columnId: string;
|
|
532
|
+
} | {
|
|
533
|
+
readonly _tag: "Pane";
|
|
534
|
+
readonly paneId: string;
|
|
535
|
+
};
|
|
536
|
+
readonly pointerId: number;
|
|
537
|
+
readonly clientX: number;
|
|
538
|
+
readonly clientY: number;
|
|
539
|
+
} | {
|
|
540
|
+
readonly _tag: "PressedGripKey";
|
|
541
|
+
readonly subject: {
|
|
542
|
+
readonly _tag: "Column";
|
|
543
|
+
readonly columnId: string;
|
|
544
|
+
} | {
|
|
545
|
+
readonly _tag: "Pane";
|
|
546
|
+
readonly paneId: string;
|
|
547
|
+
};
|
|
548
|
+
} | {
|
|
549
|
+
readonly _tag: "PressedSplitter";
|
|
550
|
+
readonly splitter: {
|
|
551
|
+
readonly _tag: "Split";
|
|
552
|
+
readonly abovePaneId: string;
|
|
553
|
+
} | {
|
|
554
|
+
readonly _tag: "Width";
|
|
555
|
+
readonly columnId: string;
|
|
556
|
+
};
|
|
557
|
+
readonly pointerId: number;
|
|
558
|
+
readonly clientX: number;
|
|
559
|
+
readonly clientY: number;
|
|
560
|
+
} | {
|
|
561
|
+
readonly _tag: "PressedSplitterKey";
|
|
562
|
+
readonly splitter: {
|
|
563
|
+
readonly _tag: "Split";
|
|
564
|
+
readonly abovePaneId: string;
|
|
565
|
+
} | {
|
|
566
|
+
readonly _tag: "Width";
|
|
567
|
+
readonly columnId: string;
|
|
568
|
+
};
|
|
569
|
+
readonly share: number;
|
|
570
|
+
} | {
|
|
571
|
+
readonly _tag: "ReleasedPointer";
|
|
572
|
+
readonly clientX: number;
|
|
573
|
+
readonly clientY: number;
|
|
574
|
+
readonly maybeTarget: Option.Option<{
|
|
575
|
+
readonly _tag: "Gap";
|
|
576
|
+
readonly maybeBeforeColumnId: Option.Option<string>;
|
|
577
|
+
} | {
|
|
578
|
+
readonly _tag: "Into";
|
|
579
|
+
readonly columnId: string;
|
|
580
|
+
readonly index: number;
|
|
581
|
+
}>;
|
|
582
|
+
} | {
|
|
583
|
+
readonly _tag: "ReleasedSplitter";
|
|
584
|
+
readonly share: number;
|
|
585
|
+
} | {
|
|
586
|
+
readonly _tag: "SteppedHeld";
|
|
587
|
+
readonly step: "Down" | "Left" | "Right" | "Up";
|
|
588
|
+
}, {
|
|
589
|
+
readonly maybeHold: Option.Option<{
|
|
590
|
+
readonly reelHook: string;
|
|
591
|
+
readonly subject: {
|
|
592
|
+
readonly _tag: "Column";
|
|
593
|
+
readonly columnId: string;
|
|
594
|
+
} | {
|
|
595
|
+
readonly _tag: "Pane";
|
|
596
|
+
readonly paneId: string;
|
|
597
|
+
};
|
|
598
|
+
readonly pointerId: number;
|
|
599
|
+
}>;
|
|
600
|
+
}, never> & {
|
|
601
|
+
readonly __subscription: never;
|
|
602
|
+
};
|
|
603
|
+
readonly resize: Subscription.EntryWithoutKeepAlive<{
|
|
604
|
+
readonly id: string;
|
|
605
|
+
readonly maybeFocus: Option.Option<{
|
|
606
|
+
readonly paneId: string;
|
|
607
|
+
readonly column: number;
|
|
608
|
+
readonly row: number;
|
|
609
|
+
}>;
|
|
610
|
+
readonly maybeHeld: Option.Option<{
|
|
611
|
+
readonly subject: {
|
|
612
|
+
readonly _tag: "Column";
|
|
613
|
+
readonly columnId: string;
|
|
614
|
+
} | {
|
|
615
|
+
readonly _tag: "Pane";
|
|
616
|
+
readonly paneId: string;
|
|
617
|
+
};
|
|
618
|
+
readonly by: {
|
|
619
|
+
readonly _tag: "Keyboard";
|
|
620
|
+
} | {
|
|
621
|
+
readonly _tag: "Pointer";
|
|
622
|
+
readonly pointerId: number;
|
|
623
|
+
readonly pressX: number;
|
|
624
|
+
readonly pressY: number;
|
|
625
|
+
readonly x: number;
|
|
626
|
+
readonly y: number;
|
|
627
|
+
readonly isCarrying: boolean;
|
|
628
|
+
};
|
|
629
|
+
readonly maybeTarget: Option.Option<{
|
|
630
|
+
readonly _tag: "Gap";
|
|
631
|
+
readonly maybeBeforeColumnId: Option.Option<string>;
|
|
632
|
+
} | {
|
|
633
|
+
readonly _tag: "Into";
|
|
634
|
+
readonly columnId: string;
|
|
635
|
+
readonly index: number;
|
|
636
|
+
}>;
|
|
637
|
+
}>;
|
|
638
|
+
readonly maybeResizing: Option.Option<{
|
|
639
|
+
readonly splitter: {
|
|
640
|
+
readonly _tag: "Split";
|
|
641
|
+
readonly abovePaneId: string;
|
|
642
|
+
} | {
|
|
643
|
+
readonly _tag: "Width";
|
|
644
|
+
readonly columnId: string;
|
|
645
|
+
};
|
|
646
|
+
readonly pointerId: number;
|
|
647
|
+
readonly pressX: number;
|
|
648
|
+
readonly pressY: number;
|
|
649
|
+
readonly maybeResize: Option.Option<{
|
|
650
|
+
readonly _tag: "ResizedColumn";
|
|
651
|
+
readonly columnId: string;
|
|
652
|
+
readonly width: number;
|
|
653
|
+
} | {
|
|
654
|
+
readonly _tag: "ResizedPanes";
|
|
655
|
+
readonly columnId: string;
|
|
656
|
+
readonly weights: {
|
|
657
|
+
readonly [x: string]: number;
|
|
658
|
+
};
|
|
659
|
+
}>;
|
|
660
|
+
}>;
|
|
661
|
+
}, {
|
|
662
|
+
readonly _tag: "PressedEscape";
|
|
663
|
+
} | {
|
|
664
|
+
readonly _tag: "CancelledPointer";
|
|
665
|
+
} | {
|
|
666
|
+
readonly _tag: "CancelledSplitter";
|
|
667
|
+
} | {
|
|
668
|
+
readonly _tag: "CompletedAnnounceReel";
|
|
669
|
+
} | {
|
|
670
|
+
readonly _tag: "CompletedFocusGrip";
|
|
671
|
+
} | {
|
|
672
|
+
readonly _tag: "CompletedFocusPane";
|
|
673
|
+
} | {
|
|
674
|
+
readonly _tag: "CompletedRestoreFocus";
|
|
675
|
+
} | {
|
|
676
|
+
readonly _tag: "CompletedScrollIntoView";
|
|
677
|
+
} | {
|
|
678
|
+
readonly _tag: "CompletedSizeLiftedPane";
|
|
679
|
+
} | {
|
|
680
|
+
readonly _tag: "DroppedHeld";
|
|
681
|
+
} | {
|
|
682
|
+
readonly _tag: "FocusedPane";
|
|
683
|
+
readonly paneId: string;
|
|
684
|
+
} | {
|
|
685
|
+
readonly _tag: "LeftGrip";
|
|
686
|
+
} | {
|
|
687
|
+
readonly _tag: "MovedPointer";
|
|
688
|
+
readonly clientX: number;
|
|
689
|
+
readonly clientY: number;
|
|
690
|
+
readonly maybeTarget: Option.Option<{
|
|
691
|
+
readonly _tag: "Gap";
|
|
692
|
+
readonly maybeBeforeColumnId: Option.Option<string>;
|
|
693
|
+
} | {
|
|
694
|
+
readonly _tag: "Into";
|
|
695
|
+
readonly columnId: string;
|
|
696
|
+
readonly index: number;
|
|
697
|
+
}>;
|
|
698
|
+
} | {
|
|
699
|
+
readonly _tag: "MovedSplitter";
|
|
700
|
+
readonly share: number;
|
|
701
|
+
} | {
|
|
702
|
+
readonly _tag: "PressedGrip";
|
|
703
|
+
readonly subject: {
|
|
704
|
+
readonly _tag: "Column";
|
|
705
|
+
readonly columnId: string;
|
|
706
|
+
} | {
|
|
707
|
+
readonly _tag: "Pane";
|
|
708
|
+
readonly paneId: string;
|
|
709
|
+
};
|
|
710
|
+
readonly pointerId: number;
|
|
711
|
+
readonly clientX: number;
|
|
712
|
+
readonly clientY: number;
|
|
713
|
+
} | {
|
|
714
|
+
readonly _tag: "PressedGripKey";
|
|
715
|
+
readonly subject: {
|
|
716
|
+
readonly _tag: "Column";
|
|
717
|
+
readonly columnId: string;
|
|
718
|
+
} | {
|
|
719
|
+
readonly _tag: "Pane";
|
|
720
|
+
readonly paneId: string;
|
|
721
|
+
};
|
|
722
|
+
} | {
|
|
723
|
+
readonly _tag: "PressedSplitter";
|
|
724
|
+
readonly splitter: {
|
|
725
|
+
readonly _tag: "Split";
|
|
726
|
+
readonly abovePaneId: string;
|
|
727
|
+
} | {
|
|
728
|
+
readonly _tag: "Width";
|
|
729
|
+
readonly columnId: string;
|
|
730
|
+
};
|
|
731
|
+
readonly pointerId: number;
|
|
732
|
+
readonly clientX: number;
|
|
733
|
+
readonly clientY: number;
|
|
734
|
+
} | {
|
|
735
|
+
readonly _tag: "PressedSplitterKey";
|
|
736
|
+
readonly splitter: {
|
|
737
|
+
readonly _tag: "Split";
|
|
738
|
+
readonly abovePaneId: string;
|
|
739
|
+
} | {
|
|
740
|
+
readonly _tag: "Width";
|
|
741
|
+
readonly columnId: string;
|
|
742
|
+
};
|
|
743
|
+
readonly share: number;
|
|
744
|
+
} | {
|
|
745
|
+
readonly _tag: "ReleasedPointer";
|
|
746
|
+
readonly clientX: number;
|
|
747
|
+
readonly clientY: number;
|
|
748
|
+
readonly maybeTarget: Option.Option<{
|
|
749
|
+
readonly _tag: "Gap";
|
|
750
|
+
readonly maybeBeforeColumnId: Option.Option<string>;
|
|
751
|
+
} | {
|
|
752
|
+
readonly _tag: "Into";
|
|
753
|
+
readonly columnId: string;
|
|
754
|
+
readonly index: number;
|
|
755
|
+
}>;
|
|
756
|
+
} | {
|
|
757
|
+
readonly _tag: "ReleasedSplitter";
|
|
758
|
+
readonly share: number;
|
|
759
|
+
} | {
|
|
760
|
+
readonly _tag: "SteppedHeld";
|
|
761
|
+
readonly step: "Down" | "Left" | "Right" | "Up";
|
|
762
|
+
}, {
|
|
763
|
+
readonly maybeHold: Option.Option<{
|
|
764
|
+
readonly reelHook: string;
|
|
765
|
+
readonly splitter: {
|
|
766
|
+
readonly _tag: "Split";
|
|
767
|
+
readonly abovePaneId: string;
|
|
768
|
+
} | {
|
|
769
|
+
readonly _tag: "Width";
|
|
770
|
+
readonly columnId: string;
|
|
771
|
+
};
|
|
772
|
+
readonly pointerId: number;
|
|
773
|
+
readonly pressX: number;
|
|
774
|
+
readonly pressY: number;
|
|
775
|
+
}>;
|
|
776
|
+
}, never> & {
|
|
777
|
+
readonly __subscription: never;
|
|
778
|
+
};
|
|
779
|
+
readonly escape: Subscription.EntryWithoutKeepAlive<{
|
|
780
|
+
readonly id: string;
|
|
781
|
+
readonly maybeFocus: Option.Option<{
|
|
782
|
+
readonly paneId: string;
|
|
783
|
+
readonly column: number;
|
|
784
|
+
readonly row: number;
|
|
785
|
+
}>;
|
|
786
|
+
readonly maybeHeld: Option.Option<{
|
|
787
|
+
readonly subject: {
|
|
788
|
+
readonly _tag: "Column";
|
|
789
|
+
readonly columnId: string;
|
|
790
|
+
} | {
|
|
791
|
+
readonly _tag: "Pane";
|
|
792
|
+
readonly paneId: string;
|
|
793
|
+
};
|
|
794
|
+
readonly by: {
|
|
795
|
+
readonly _tag: "Keyboard";
|
|
796
|
+
} | {
|
|
797
|
+
readonly _tag: "Pointer";
|
|
798
|
+
readonly pointerId: number;
|
|
799
|
+
readonly pressX: number;
|
|
800
|
+
readonly pressY: number;
|
|
801
|
+
readonly x: number;
|
|
802
|
+
readonly y: number;
|
|
803
|
+
readonly isCarrying: boolean;
|
|
804
|
+
};
|
|
805
|
+
readonly maybeTarget: Option.Option<{
|
|
806
|
+
readonly _tag: "Gap";
|
|
807
|
+
readonly maybeBeforeColumnId: Option.Option<string>;
|
|
808
|
+
} | {
|
|
809
|
+
readonly _tag: "Into";
|
|
810
|
+
readonly columnId: string;
|
|
811
|
+
readonly index: number;
|
|
812
|
+
}>;
|
|
813
|
+
}>;
|
|
814
|
+
readonly maybeResizing: Option.Option<{
|
|
815
|
+
readonly splitter: {
|
|
816
|
+
readonly _tag: "Split";
|
|
817
|
+
readonly abovePaneId: string;
|
|
818
|
+
} | {
|
|
819
|
+
readonly _tag: "Width";
|
|
820
|
+
readonly columnId: string;
|
|
821
|
+
};
|
|
822
|
+
readonly pointerId: number;
|
|
823
|
+
readonly pressX: number;
|
|
824
|
+
readonly pressY: number;
|
|
825
|
+
readonly maybeResize: Option.Option<{
|
|
826
|
+
readonly _tag: "ResizedColumn";
|
|
827
|
+
readonly columnId: string;
|
|
828
|
+
readonly width: number;
|
|
829
|
+
} | {
|
|
830
|
+
readonly _tag: "ResizedPanes";
|
|
831
|
+
readonly columnId: string;
|
|
832
|
+
readonly weights: {
|
|
833
|
+
readonly [x: string]: number;
|
|
834
|
+
};
|
|
835
|
+
}>;
|
|
836
|
+
}>;
|
|
837
|
+
}, {
|
|
838
|
+
readonly _tag: "PressedEscape";
|
|
839
|
+
} | {
|
|
840
|
+
readonly _tag: "CancelledPointer";
|
|
841
|
+
} | {
|
|
842
|
+
readonly _tag: "CancelledSplitter";
|
|
843
|
+
} | {
|
|
844
|
+
readonly _tag: "CompletedAnnounceReel";
|
|
845
|
+
} | {
|
|
846
|
+
readonly _tag: "CompletedFocusGrip";
|
|
847
|
+
} | {
|
|
848
|
+
readonly _tag: "CompletedFocusPane";
|
|
849
|
+
} | {
|
|
850
|
+
readonly _tag: "CompletedRestoreFocus";
|
|
851
|
+
} | {
|
|
852
|
+
readonly _tag: "CompletedScrollIntoView";
|
|
853
|
+
} | {
|
|
854
|
+
readonly _tag: "CompletedSizeLiftedPane";
|
|
855
|
+
} | {
|
|
856
|
+
readonly _tag: "DroppedHeld";
|
|
857
|
+
} | {
|
|
858
|
+
readonly _tag: "FocusedPane";
|
|
859
|
+
readonly paneId: string;
|
|
860
|
+
} | {
|
|
861
|
+
readonly _tag: "LeftGrip";
|
|
862
|
+
} | {
|
|
863
|
+
readonly _tag: "MovedPointer";
|
|
864
|
+
readonly clientX: number;
|
|
865
|
+
readonly clientY: number;
|
|
866
|
+
readonly maybeTarget: Option.Option<{
|
|
867
|
+
readonly _tag: "Gap";
|
|
868
|
+
readonly maybeBeforeColumnId: Option.Option<string>;
|
|
869
|
+
} | {
|
|
870
|
+
readonly _tag: "Into";
|
|
871
|
+
readonly columnId: string;
|
|
872
|
+
readonly index: number;
|
|
873
|
+
}>;
|
|
874
|
+
} | {
|
|
875
|
+
readonly _tag: "MovedSplitter";
|
|
876
|
+
readonly share: number;
|
|
877
|
+
} | {
|
|
878
|
+
readonly _tag: "PressedGrip";
|
|
879
|
+
readonly subject: {
|
|
880
|
+
readonly _tag: "Column";
|
|
881
|
+
readonly columnId: string;
|
|
882
|
+
} | {
|
|
883
|
+
readonly _tag: "Pane";
|
|
884
|
+
readonly paneId: string;
|
|
885
|
+
};
|
|
886
|
+
readonly pointerId: number;
|
|
887
|
+
readonly clientX: number;
|
|
888
|
+
readonly clientY: number;
|
|
889
|
+
} | {
|
|
890
|
+
readonly _tag: "PressedGripKey";
|
|
891
|
+
readonly subject: {
|
|
892
|
+
readonly _tag: "Column";
|
|
893
|
+
readonly columnId: string;
|
|
894
|
+
} | {
|
|
895
|
+
readonly _tag: "Pane";
|
|
896
|
+
readonly paneId: string;
|
|
897
|
+
};
|
|
898
|
+
} | {
|
|
899
|
+
readonly _tag: "PressedSplitter";
|
|
900
|
+
readonly splitter: {
|
|
901
|
+
readonly _tag: "Split";
|
|
902
|
+
readonly abovePaneId: string;
|
|
903
|
+
} | {
|
|
904
|
+
readonly _tag: "Width";
|
|
905
|
+
readonly columnId: string;
|
|
906
|
+
};
|
|
907
|
+
readonly pointerId: number;
|
|
908
|
+
readonly clientX: number;
|
|
909
|
+
readonly clientY: number;
|
|
910
|
+
} | {
|
|
911
|
+
readonly _tag: "PressedSplitterKey";
|
|
912
|
+
readonly splitter: {
|
|
913
|
+
readonly _tag: "Split";
|
|
914
|
+
readonly abovePaneId: string;
|
|
915
|
+
} | {
|
|
916
|
+
readonly _tag: "Width";
|
|
917
|
+
readonly columnId: string;
|
|
918
|
+
};
|
|
919
|
+
readonly share: number;
|
|
920
|
+
} | {
|
|
921
|
+
readonly _tag: "ReleasedPointer";
|
|
922
|
+
readonly clientX: number;
|
|
923
|
+
readonly clientY: number;
|
|
924
|
+
readonly maybeTarget: Option.Option<{
|
|
925
|
+
readonly _tag: "Gap";
|
|
926
|
+
readonly maybeBeforeColumnId: Option.Option<string>;
|
|
927
|
+
} | {
|
|
928
|
+
readonly _tag: "Into";
|
|
929
|
+
readonly columnId: string;
|
|
930
|
+
readonly index: number;
|
|
931
|
+
}>;
|
|
932
|
+
} | {
|
|
933
|
+
readonly _tag: "ReleasedSplitter";
|
|
934
|
+
readonly share: number;
|
|
935
|
+
} | {
|
|
936
|
+
readonly _tag: "SteppedHeld";
|
|
937
|
+
readonly step: "Down" | "Left" | "Right" | "Up";
|
|
938
|
+
}, {
|
|
939
|
+
readonly isHolding: boolean;
|
|
940
|
+
}, never> & {
|
|
941
|
+
readonly __subscription: never;
|
|
942
|
+
};
|
|
943
|
+
} extends infer T ? { readonly [Key in keyof T as `${Prefix}${Capitalize<Key>}`]: T[Key]; } : never;
|
|
944
|
+
/** Sizes the copy that follows the pointer to what it lifts, and keeps the pointer where it
|
|
945
|
+
* pressed. Measures the source once, when the copy appears. */
|
|
946
|
+
export declare const SizeLiftedPane: Mount.MountDefinitionWithArgs<"SizeLiftedPane", {
|
|
947
|
+
sourceSelector: Schema.String;
|
|
948
|
+
pressX: Schema.Number;
|
|
949
|
+
pressY: Schema.Number;
|
|
950
|
+
}, {
|
|
951
|
+
readonly _tag: "CompletedSizeLiftedPane";
|
|
952
|
+
}>;
|
|
953
|
+
/** What the reel hands `toPaneView` for each pane: put `grip` in the Window's `lead` and give
|
|
954
|
+
* it `id`. */
|
|
955
|
+
export type PaneRender = Readonly<{
|
|
956
|
+
/** The pane's grip, for its title bar's `lead`: a quiet glyph button named "Move <label>". */
|
|
957
|
+
grip: Html;
|
|
958
|
+
/** The window's id, unique in the document. */
|
|
959
|
+
id: string;
|
|
960
|
+
}>;
|
|
961
|
+
/** Per-render inputs passed to `view` through `h.submodel`'s `viewInputs`. `toPaneView` is a
|
|
962
|
+
* function because it may carry the parent's handlers. */
|
|
963
|
+
export type ViewInputs = Readonly<{
|
|
964
|
+
/** The columns and their panes, as the application holds them. */
|
|
965
|
+
layout: Layout;
|
|
966
|
+
/** Names the reel for screen readers. */
|
|
967
|
+
label: string;
|
|
968
|
+
/** Renders one pane, a `Window.view` with `render.grip` as its `lead` and `render.id` as its
|
|
969
|
+
* `id`. Mark the control focus should land on in it (a terminal's input) with
|
|
970
|
+
* `data-reel-focus`. */
|
|
971
|
+
toPaneView: (pane: Pane, render: PaneRender) => Html;
|
|
972
|
+
}>;
|
|
973
|
+
/**
|
|
974
|
+
* A row of columns wider than the view when it must be, each a stack of panes, scrolled
|
|
975
|
+
* sideways, and down where a column is taller than the view: `div.reel` holding the scroller
|
|
976
|
+
* `div.reel-view`, whose `div.reel-track` lays out the columns (`div.reel-column`, each a head
|
|
977
|
+
* with its grip and width, then a slot per pane with a splitter between) with a splitter after
|
|
978
|
+
* each, and the panes themselves in `div.reel-panes`, each pinned to its slot by anchor
|
|
979
|
+
* positioning. The reel takes its height from whatever holds it. The layout is the parent's;
|
|
980
|
+
* each pane renders through `toPaneView`.
|
|
981
|
+
*
|
|
982
|
+
* A pane's grip, or a column's, lifts it under a pointer or the keyboard: Space or Enter picks
|
|
983
|
+
* it up, the arrows move it (left and right through the gaps and columns, up and down among a
|
|
984
|
+
* column's panes), Space drops it, and Escape or Tab puts it back. A drop reports what it asks
|
|
985
|
+
* of the layout as the OutMessage. Lift `subscriptions(keyPrefix)` into the application's, or
|
|
986
|
+
* nothing follows the pointer, and call `reconcile` whenever the layout changes.
|
|
987
|
+
*/
|
|
988
|
+
export declare const view: import("foldkit/submodel").View<{
|
|
989
|
+
readonly id: string;
|
|
990
|
+
readonly maybeFocus: Option.Option<{
|
|
991
|
+
readonly paneId: string;
|
|
992
|
+
readonly column: number;
|
|
993
|
+
readonly row: number;
|
|
994
|
+
}>;
|
|
995
|
+
readonly maybeHeld: Option.Option<{
|
|
996
|
+
readonly subject: {
|
|
997
|
+
readonly _tag: "Column";
|
|
998
|
+
readonly columnId: string;
|
|
999
|
+
} | {
|
|
1000
|
+
readonly _tag: "Pane";
|
|
1001
|
+
readonly paneId: string;
|
|
1002
|
+
};
|
|
1003
|
+
readonly by: {
|
|
1004
|
+
readonly _tag: "Keyboard";
|
|
1005
|
+
} | {
|
|
1006
|
+
readonly _tag: "Pointer";
|
|
1007
|
+
readonly pointerId: number;
|
|
1008
|
+
readonly pressX: number;
|
|
1009
|
+
readonly pressY: number;
|
|
1010
|
+
readonly x: number;
|
|
1011
|
+
readonly y: number;
|
|
1012
|
+
readonly isCarrying: boolean;
|
|
1013
|
+
};
|
|
1014
|
+
readonly maybeTarget: Option.Option<{
|
|
1015
|
+
readonly _tag: "Gap";
|
|
1016
|
+
readonly maybeBeforeColumnId: Option.Option<string>;
|
|
1017
|
+
} | {
|
|
1018
|
+
readonly _tag: "Into";
|
|
1019
|
+
readonly columnId: string;
|
|
1020
|
+
readonly index: number;
|
|
1021
|
+
}>;
|
|
1022
|
+
}>;
|
|
1023
|
+
readonly maybeResizing: Option.Option<{
|
|
1024
|
+
readonly splitter: {
|
|
1025
|
+
readonly _tag: "Split";
|
|
1026
|
+
readonly abovePaneId: string;
|
|
1027
|
+
} | {
|
|
1028
|
+
readonly _tag: "Width";
|
|
1029
|
+
readonly columnId: string;
|
|
1030
|
+
};
|
|
1031
|
+
readonly pointerId: number;
|
|
1032
|
+
readonly pressX: number;
|
|
1033
|
+
readonly pressY: number;
|
|
1034
|
+
readonly maybeResize: Option.Option<{
|
|
1035
|
+
readonly _tag: "ResizedColumn";
|
|
1036
|
+
readonly columnId: string;
|
|
1037
|
+
readonly width: number;
|
|
1038
|
+
} | {
|
|
1039
|
+
readonly _tag: "ResizedPanes";
|
|
1040
|
+
readonly columnId: string;
|
|
1041
|
+
readonly weights: {
|
|
1042
|
+
readonly [x: string]: number;
|
|
1043
|
+
};
|
|
1044
|
+
}>;
|
|
1045
|
+
}>;
|
|
1046
|
+
}, {
|
|
1047
|
+
readonly _tag: "PressedEscape";
|
|
1048
|
+
} | {
|
|
1049
|
+
readonly _tag: "CancelledPointer";
|
|
1050
|
+
} | {
|
|
1051
|
+
readonly _tag: "CancelledSplitter";
|
|
1052
|
+
} | {
|
|
1053
|
+
readonly _tag: "CompletedAnnounceReel";
|
|
1054
|
+
} | {
|
|
1055
|
+
readonly _tag: "CompletedFocusGrip";
|
|
1056
|
+
} | {
|
|
1057
|
+
readonly _tag: "CompletedFocusPane";
|
|
1058
|
+
} | {
|
|
1059
|
+
readonly _tag: "CompletedRestoreFocus";
|
|
1060
|
+
} | {
|
|
1061
|
+
readonly _tag: "CompletedScrollIntoView";
|
|
1062
|
+
} | {
|
|
1063
|
+
readonly _tag: "CompletedSizeLiftedPane";
|
|
1064
|
+
} | {
|
|
1065
|
+
readonly _tag: "DroppedHeld";
|
|
1066
|
+
} | {
|
|
1067
|
+
readonly _tag: "FocusedPane";
|
|
1068
|
+
readonly paneId: string;
|
|
1069
|
+
} | {
|
|
1070
|
+
readonly _tag: "LeftGrip";
|
|
1071
|
+
} | {
|
|
1072
|
+
readonly _tag: "MovedPointer";
|
|
1073
|
+
readonly clientX: number;
|
|
1074
|
+
readonly clientY: number;
|
|
1075
|
+
readonly maybeTarget: Option.Option<{
|
|
1076
|
+
readonly _tag: "Gap";
|
|
1077
|
+
readonly maybeBeforeColumnId: Option.Option<string>;
|
|
1078
|
+
} | {
|
|
1079
|
+
readonly _tag: "Into";
|
|
1080
|
+
readonly columnId: string;
|
|
1081
|
+
readonly index: number;
|
|
1082
|
+
}>;
|
|
1083
|
+
} | {
|
|
1084
|
+
readonly _tag: "MovedSplitter";
|
|
1085
|
+
readonly share: number;
|
|
1086
|
+
} | {
|
|
1087
|
+
readonly _tag: "PressedGrip";
|
|
1088
|
+
readonly subject: {
|
|
1089
|
+
readonly _tag: "Column";
|
|
1090
|
+
readonly columnId: string;
|
|
1091
|
+
} | {
|
|
1092
|
+
readonly _tag: "Pane";
|
|
1093
|
+
readonly paneId: string;
|
|
1094
|
+
};
|
|
1095
|
+
readonly pointerId: number;
|
|
1096
|
+
readonly clientX: number;
|
|
1097
|
+
readonly clientY: number;
|
|
1098
|
+
} | {
|
|
1099
|
+
readonly _tag: "PressedGripKey";
|
|
1100
|
+
readonly subject: {
|
|
1101
|
+
readonly _tag: "Column";
|
|
1102
|
+
readonly columnId: string;
|
|
1103
|
+
} | {
|
|
1104
|
+
readonly _tag: "Pane";
|
|
1105
|
+
readonly paneId: string;
|
|
1106
|
+
};
|
|
1107
|
+
} | {
|
|
1108
|
+
readonly _tag: "PressedSplitter";
|
|
1109
|
+
readonly splitter: {
|
|
1110
|
+
readonly _tag: "Split";
|
|
1111
|
+
readonly abovePaneId: string;
|
|
1112
|
+
} | {
|
|
1113
|
+
readonly _tag: "Width";
|
|
1114
|
+
readonly columnId: string;
|
|
1115
|
+
};
|
|
1116
|
+
readonly pointerId: number;
|
|
1117
|
+
readonly clientX: number;
|
|
1118
|
+
readonly clientY: number;
|
|
1119
|
+
} | {
|
|
1120
|
+
readonly _tag: "PressedSplitterKey";
|
|
1121
|
+
readonly splitter: {
|
|
1122
|
+
readonly _tag: "Split";
|
|
1123
|
+
readonly abovePaneId: string;
|
|
1124
|
+
} | {
|
|
1125
|
+
readonly _tag: "Width";
|
|
1126
|
+
readonly columnId: string;
|
|
1127
|
+
};
|
|
1128
|
+
readonly share: number;
|
|
1129
|
+
} | {
|
|
1130
|
+
readonly _tag: "ReleasedPointer";
|
|
1131
|
+
readonly clientX: number;
|
|
1132
|
+
readonly clientY: number;
|
|
1133
|
+
readonly maybeTarget: Option.Option<{
|
|
1134
|
+
readonly _tag: "Gap";
|
|
1135
|
+
readonly maybeBeforeColumnId: Option.Option<string>;
|
|
1136
|
+
} | {
|
|
1137
|
+
readonly _tag: "Into";
|
|
1138
|
+
readonly columnId: string;
|
|
1139
|
+
readonly index: number;
|
|
1140
|
+
}>;
|
|
1141
|
+
} | {
|
|
1142
|
+
readonly _tag: "ReleasedSplitter";
|
|
1143
|
+
readonly share: number;
|
|
1144
|
+
} | {
|
|
1145
|
+
readonly _tag: "SteppedHeld";
|
|
1146
|
+
readonly step: "Down" | "Left" | "Right" | "Up";
|
|
1147
|
+
}, Readonly<{
|
|
1148
|
+
/** The columns and their panes, as the application holds them. */
|
|
1149
|
+
layout: Layout;
|
|
1150
|
+
/** Names the reel for screen readers. */
|
|
1151
|
+
label: string;
|
|
1152
|
+
/** Renders one pane, a `Window.view` with `render.grip` as its `lead` and `render.id` as its
|
|
1153
|
+
* `id`. Mark the control focus should land on in it (a terminal's input) with
|
|
1154
|
+
* `data-reel-focus`. */
|
|
1155
|
+
toPaneView: (pane: Pane, render: PaneRender) => Html;
|
|
1156
|
+
}>>;
|
|
1157
|
+
export {};
|
|
1158
|
+
//# sourceMappingURL=reel.d.ts.map
|