@gjermundgaraba-designs/pixel-paper 0.24.0 → 0.25.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 +3 -1
- package/dist/src/reel/index.d.ts +1 -1
- package/dist/src/reel/index.d.ts.map +1 -1
- package/dist/src/reel/index.js +1 -1
- package/dist/src/reel/reel.d.ts +85 -7
- package/dist/src/reel/reel.d.ts.map +1 -1
- package/dist/src/reel/reel.js +232 -115
- package/package.json +1 -1
- package/src/pixel-paper.css +48 -0
- package/src/reel/index.ts +2 -0
- package/src/reel/reel.ts +221 -31
package/DESIGN.md
CHANGED
|
@@ -1120,7 +1120,7 @@ One keyboard for the page, Vim first, with the arrows beside the letters. The ke
|
|
|
1120
1120
|
|
|
1121
1121
|
### Reel
|
|
1122
1122
|
|
|
1123
|
-
**Reel** (Submodel, holding its own drag state rather than `@foldkit/ui`'s DragAndDrop, whose targets are positions in a list and whose pointer reads the items under it; for a workspace of windows side by side: terminals, an editor, a browser, a canvas, in columns the reader arranges) → `div.reel[role="group"][aria-label][data-reel]` holding the scroller `div.reel-view`, whose `div.reel-track` holds, in order, `div.reel-gap` (the gap before the first column), then per column `div.reel-column[data-reel-column]` (the column's id; its share in `--reel-width`) with a `div.reel-slot` per pane (`--reel-weight`, `--reel-anchor`) and between two slots `div.reel-split[role="separator"][aria-orientation="horizontal"]` ("Height of <pane>", `data-reel-split` the id of the pane above it), and after each column `div.reel-gap.reel-resize[role="separator"][aria-orientation="vertical"]` ("Width of column 2", its share as `aria-valuenow` and in words as `aria-valuetext`, `data-reel-resize` its column's id), then `div.reel-panes` with a `div.reel-pane[data-reel-pane][tabindex="-1"]` per pane, each the parent's Window with the pane's grip as its `lead
|
|
1123
|
+
**Reel** (Submodel, holding its own drag state rather than `@foldkit/ui`'s DragAndDrop, whose targets are positions in a list and whose pointer reads the items under it; for a workspace of windows side by side: terminals, an editor, a browser, a canvas, in columns the reader arranges) → `div.reel[role="group"][aria-label][data-reel]` holding the scroller `div.reel-view`, whose `div.reel-track` holds, in order, `div.reel-gap` (the gap before the first column), then per column `div.reel-column[data-reel-column]` (the column's id; its share in `--reel-width`) with a `div.reel-slot` per pane (`--reel-weight`, `--reel-anchor`) and between two slots `div.reel-split[role="separator"][aria-orientation="horizontal"]` ("Height of <pane>", `data-reel-split` the id of the pane above it), and after each column `div.reel-gap.reel-resize[role="separator"][aria-orientation="vertical"]` ("Width of column 2", its share as `aria-valuenow` and in words as `aria-valuetext`, `data-reel-resize` its column's id), then `div.reel-panes` with a `div.reel-pane[data-reel-pane][tabindex="-1"]` per pane, each the parent's Window with the pane's grip as its `lead` (under tabs, see below, the panes have no grip and the track a stage in place of its columns); after the scroller, the grips' keyboard help in a `p.sr-only` and, while a pointer carries a pane, `div.reel-lift` with its copy. The reel takes its height from whatever holds it. The layout is the parent's (`Reel.Layout`: columns, each an id, a width and its panes, each an id, a label and a weight), passed to the view and, as `{ layout }`, to `update`, so the reel never holds a copy that could go stale. Whenever the parent changes the layout (a request it applied, another client's, a pane it closed), it calls `Reel.reconcile` with the layout as it is now.
|
|
1124
1124
|
|
|
1125
1125
|
**A column has no head.** It is its panes and nothing else, so the only title bars in a reel are its windows'. That was chosen over a head above each column, which read as a second title bar over its panes and printed what the width splitter already says.
|
|
1126
1126
|
|
|
@@ -1136,6 +1136,8 @@ The reel binds no page keys: the application binds its own and calls `Reel.perfo
|
|
|
1136
1136
|
|
|
1137
1137
|
Focus is the reel's: one pane is focused (`.focused`, its window on the 8px card shadow), the one that last took focus or that a key moved to; `reconcile` reads its place again from each changed layout, so when it goes, focus finds the pane now nearest where it was, whoever moved it. A focus key puts the keyboard in the pane's control marked `data-reel-focus` (a terminal's input), else on the pane itself (ringed outside its window), and the browser scrolls the pane into view by the least distance either way, its gutter kept by `scroll-margin` (motion is stepped or instant, and a follow is instant); a pointer focusing a pane does not scroll the reel. When the focused pane leaves the layout with the keyboard in it, `reconcile` puts the keyboard in the pane now nearest where it was; focus the reader put elsewhere stays there. Each focus and move is said ("Diff, column 2 of 3.", "Shell moved to 1 of 2 in column 2 of 3.", "Column 1 takes two thirds of the width."). Every move and resize reports what it asks (`MovedPane`, `PulledOutPane`, `MovedColumn`, `ResizedColumn`, `ResizedPanes`), which `Reel.apply` applies to a layout, so the parent can apply it at once and keep or replace it when its source answers; a pane that joins a column takes that column's mean weight and an emptied column is dropped. An application that draws something of its own over a pane (a native view) measures the pane's bounds itself, which follows the reel's scroll, moves and resizes alike.
|
|
1138
1138
|
|
|
1139
|
+
**Tabs.** The same reel prints its panes one at a time when the parent passes `arrangement: "Tabs"` to the view and to `perform`, for a reader who works in one pane at a time or a window too narrow for columns: `div.reel.tabbed` holds a `div.nav.tabs.reel-tabs[role="tablist"]` (named by the reel's label, a gutter in from the reel's edges) over the scroller, whose track holds one `div.reel-slot.reel-stage`, the view less a gutter at every edge, where the columns were. There is a `button[role="tab"]` per pane in reading order (column by column, down each column), saying the pane's label in a `span.reel-tab-words`, which ends in an ellipsis when the list runs out of width, after what the parent's `toTabLeadView` gives (a kind glyph), `aria-controls` its window; the focused pane is the selected tab, so the arrangement adds no state, and a pane closed under its tab hands the tab to the pane focus finds. A press shows the pane and puts the keyboard in it; the side arrows (wrapping), Home and End select as they move and keep the keyboard on the tabs, only the selected tab in the Tab order, a modified arrow being the application's. `perform` steps the focus keys from tab to tab (left and up back, right and down on, past neither end) and says "Notes, tab 2 of 4."; it moves and sizes nothing, and no grip or splitter prints, since a tab has no column. The layout is untouched, so the columns come back as they were. **The panes stay in their layer:** every pane is pinned to the stage, the focused one drawn and the others `.behind` (`visibility: hidden`, `inert`), so changing the arrangement or the tab takes no pane out of the page, and a pane behind keeps its size: a terminal sized by its box is not resized to nothing as the tabs change, as it would be under `display: none`. A pane behind its tab is not on top at any point, so an application that draws over a pane (a native view) sees it hidden, as it sees a pane scrolled out of the reel.
|
|
1140
|
+
|
|
1139
1141
|
### Inputs / Fields
|
|
1140
1142
|
|
|
1141
1143
|
- **Field** (a View over `@foldkit/ui`'s Input) → `div.field (.boxed, .mono) > label + input + p.field-error + p.field-help`, the label naming the input and the help describing it; a failed field prints why in `p.field-error` (sans, Urgent Red) under the control, which is `aria-invalid` and described by it before its help, and the ErrorSummary above the fields says it again; a required field's control is `aria-required`; the input's `type` the platform's (`"date"` for the browser's date control) when given. A field whose place says what it is (a browser's address bar) hides its label (`label.sr-only`), which still names the input. **SelectField** (over `@foldkit/ui`'s Select) → `div.field > label + select + p.field-error + p.field-help`, its options in order and a group's under an `optgroup` heading, an option that is listed but not choosable `disabled`; **TextareaField** (over `@foldkit/ui`'s Textarea) → `div.field (.mono) > label + textarea + p.field-error + p.field-help`, opening at `rows` lines. Both name, describe and mark their control as a Field does. **Fieldset** → `fieldset.field > legend.field-label`, then the controls, `p.field-error` and `p.field-help`, its error and its help linked with `aria-describedby`; **FieldGrid** → `div.field-grid` (auto-fit, 160px minimum); **Fields** → `fieldset.stack.gap-m`: a form's fields as one column `--space-m` (14px) apart, a body's gap, on the layout primitives with no rule of its own. `isBusy` (a save in flight) sets `disabled` and `aria-busy` on it, so every control holds at once and nothing changes under the save; the submit Button stays outside it, `isBusy`, so it keeps focus. A disabled control prints its value in Muted Ink; a boxless one also drops its dotted baseline (the mark of a place to type), a boxed one or a select mutes its box and caret.
|
package/dist/src/reel/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Layout, OutMessage, Pane, apply } from "./layout.ts";
|
|
2
|
-
export { Action, AnnounceReel, FocusPane, Message, Model, RestoreFocus, ScrollIntoView, SizeLiftedPane, focusedPaneId, init, perform, reconcile, subscriptions, update, view, } from "./reel.ts";
|
|
2
|
+
export { Action, AnnounceReel, Arrangement, FocusPane, FocusTab, Message, Model, RestoreFocus, ScrollIntoView, SizeLiftedPane, focusedPaneId, init, perform, reconcile, subscriptions, update, view, } from "./reel.ts";
|
|
3
3
|
export type { InitConfig, PaneRender, UpdateContext, ViewInputs } from "./reel.ts";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/reel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EACT,OAAO,EACP,KAAK,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,aAAa,EACb,IAAI,EACJ,OAAO,EACP,SAAS,EACT,aAAa,EACb,MAAM,EACN,IAAI,GACL,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/reel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EACL,MAAM,EACN,YAAY,EACZ,WAAW,EACX,SAAS,EACT,QAAQ,EACR,OAAO,EACP,KAAK,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,aAAa,EACb,IAAI,EACJ,OAAO,EACP,SAAS,EACT,aAAa,EACb,MAAM,EACN,IAAI,GACL,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/src/reel/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Layout, OutMessage, Pane, apply } from "./layout.js";
|
|
2
|
-
export { Action, AnnounceReel, FocusPane, Message, Model, RestoreFocus, ScrollIntoView, SizeLiftedPane, focusedPaneId, init, perform, reconcile, subscriptions, update, view, } from "./reel.js";
|
|
2
|
+
export { Action, AnnounceReel, Arrangement, FocusPane, FocusTab, Message, Model, RestoreFocus, ScrollIntoView, SizeLiftedPane, focusedPaneId, init, perform, reconcile, subscriptions, update, view, } from "./reel.js";
|
package/dist/src/reel/reel.d.ts
CHANGED
|
@@ -59,6 +59,11 @@ export declare const Model: Schema.Struct<{
|
|
|
59
59
|
}>>;
|
|
60
60
|
}>;
|
|
61
61
|
export type Model = typeof Model.Type;
|
|
62
|
+
/** How a reel shows its panes: side by side in their columns (`Strip`), or one at a time at
|
|
63
|
+
* the reel's full size under a tab per pane (`Tabs`). The application holds it and passes it
|
|
64
|
+
* in; the layout is the same in both. */
|
|
65
|
+
export declare const Arrangement: Schema.Literals<readonly ["Strip", "Tabs"]>;
|
|
66
|
+
export type Arrangement = typeof Arrangement.Type;
|
|
62
67
|
/** Union of all Messages a reel can produce. */
|
|
63
68
|
export declare const Message: import("foldkit/message").MessageUnion<{
|
|
64
69
|
readonly PressedGrip: {
|
|
@@ -106,6 +111,12 @@ export declare const Message: import("foldkit/message").MessageUnion<{
|
|
|
106
111
|
readonly FocusedPane: {
|
|
107
112
|
paneId: Schema.String;
|
|
108
113
|
};
|
|
114
|
+
readonly PressedTab: {
|
|
115
|
+
paneId: Schema.String;
|
|
116
|
+
};
|
|
117
|
+
readonly SteppedTab: {
|
|
118
|
+
paneId: Schema.String;
|
|
119
|
+
};
|
|
109
120
|
readonly PressedSplitter: {
|
|
110
121
|
splitter: import("foldkit/schema").TaggedUnion<{
|
|
111
122
|
readonly Width: {
|
|
@@ -139,6 +150,7 @@ export declare const Message: import("foldkit/message").MessageUnion<{
|
|
|
139
150
|
};
|
|
140
151
|
readonly CompletedAnnounceReel: {};
|
|
141
152
|
readonly CompletedFocusPane: {};
|
|
153
|
+
readonly CompletedFocusTab: {};
|
|
142
154
|
readonly CompletedRestoreFocus: {};
|
|
143
155
|
readonly CompletedScrollIntoView: {};
|
|
144
156
|
readonly CompletedSizeLiftedPane: {};
|
|
@@ -169,6 +181,13 @@ export declare const FocusPane: Command.CommandDefinitionWithArgs<"FocusPane", {
|
|
|
169
181
|
}, Effect.Effect<{
|
|
170
182
|
readonly _tag: "CompletedFocusPane";
|
|
171
183
|
}, never, never>>;
|
|
184
|
+
/** Focuses the tab `tabHook` names, for a tab the arrows step to: the keyboard stays in the
|
|
185
|
+
* tab list until the reader goes into the pane. */
|
|
186
|
+
export declare const FocusTab: Command.CommandDefinitionWithArgs<"FocusTab", {
|
|
187
|
+
tabHook: Schema.String;
|
|
188
|
+
}, Effect.Effect<{
|
|
189
|
+
readonly _tag: "CompletedFocusTab";
|
|
190
|
+
}, never, never>>;
|
|
172
191
|
/** Focuses the pane `paneHook` names only where focus was lost (it left with the pane that
|
|
173
192
|
* held it), so focus the reader put somewhere else stays there. */
|
|
174
193
|
export declare const RestoreFocus: Command.CommandDefinitionWithArgs<"RestoreFocus", {
|
|
@@ -185,9 +204,11 @@ export declare const ScrollIntoView: Command.CommandDefinitionWithArgs<"ScrollIn
|
|
|
185
204
|
readonly _tag: "CompletedScrollIntoView";
|
|
186
205
|
}, never, never>>;
|
|
187
206
|
/** What the reel reads from its parent as each Message arrives: the layout as the
|
|
188
|
-
* application holds it now
|
|
207
|
+
* application holds it now, and how the view shows it (`Strip` when not given), which
|
|
208
|
+
* `perform` reads. */
|
|
189
209
|
export type UpdateContext = Readonly<{
|
|
190
210
|
layout: Layout;
|
|
211
|
+
arrangement?: Arrangement;
|
|
191
212
|
}>;
|
|
192
213
|
type UpdateReturn = Update.ReturnWithOutMessage<Model, Message, OutMessage>;
|
|
193
214
|
/** Processes a reel Message against the layout as the application holds it now, and returns
|
|
@@ -214,7 +235,8 @@ export type Action = typeof Action.Type;
|
|
|
214
235
|
* layout as the application holds it: focus moves focus the pane and scroll the reel to it;
|
|
215
236
|
* moves report their request as the OutMessage, which the application applies, with focus
|
|
216
237
|
* kept on the pane. Each is said through the live region. Nothing happens while something is
|
|
217
|
-
* held, or where there is nowhere to go.
|
|
238
|
+
* held, or where there is nowhere to go. Under tabs, only the focus keys act, stepping from tab
|
|
239
|
+
* to tab.
|
|
218
240
|
*/
|
|
219
241
|
export declare const perform: (model: Model, action: Action, context: UpdateContext) => UpdateReturn;
|
|
220
242
|
/** A held pane follows the pointer (the reel scrolling near its edges), a dragged
|
|
@@ -285,6 +307,8 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
285
307
|
readonly _tag: "CompletedAnnounceReel";
|
|
286
308
|
} | {
|
|
287
309
|
readonly _tag: "CompletedFocusPane";
|
|
310
|
+
} | {
|
|
311
|
+
readonly _tag: "CompletedFocusTab";
|
|
288
312
|
} | {
|
|
289
313
|
readonly _tag: "CompletedRestoreFocus";
|
|
290
314
|
} | {
|
|
@@ -344,6 +368,9 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
344
368
|
readonly columnId: string;
|
|
345
369
|
};
|
|
346
370
|
readonly share: number;
|
|
371
|
+
} | {
|
|
372
|
+
readonly _tag: "PressedTab";
|
|
373
|
+
readonly paneId: string;
|
|
347
374
|
} | {
|
|
348
375
|
readonly _tag: "ReleasedPointer";
|
|
349
376
|
readonly clientX: number;
|
|
@@ -362,6 +389,9 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
362
389
|
} | {
|
|
363
390
|
readonly _tag: "SteppedHeld";
|
|
364
391
|
readonly step: "Down" | "Left" | "Right" | "Up";
|
|
392
|
+
} | {
|
|
393
|
+
readonly _tag: "SteppedTab";
|
|
394
|
+
readonly paneId: string;
|
|
365
395
|
}, {
|
|
366
396
|
readonly maybeHold: Option.Option<{
|
|
367
397
|
readonly reelHook: string;
|
|
@@ -433,6 +463,8 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
433
463
|
readonly _tag: "CompletedAnnounceReel";
|
|
434
464
|
} | {
|
|
435
465
|
readonly _tag: "CompletedFocusPane";
|
|
466
|
+
} | {
|
|
467
|
+
readonly _tag: "CompletedFocusTab";
|
|
436
468
|
} | {
|
|
437
469
|
readonly _tag: "CompletedRestoreFocus";
|
|
438
470
|
} | {
|
|
@@ -492,6 +524,9 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
492
524
|
readonly columnId: string;
|
|
493
525
|
};
|
|
494
526
|
readonly share: number;
|
|
527
|
+
} | {
|
|
528
|
+
readonly _tag: "PressedTab";
|
|
529
|
+
readonly paneId: string;
|
|
495
530
|
} | {
|
|
496
531
|
readonly _tag: "ReleasedPointer";
|
|
497
532
|
readonly clientX: number;
|
|
@@ -510,6 +545,9 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
510
545
|
} | {
|
|
511
546
|
readonly _tag: "SteppedHeld";
|
|
512
547
|
readonly step: "Down" | "Left" | "Right" | "Up";
|
|
548
|
+
} | {
|
|
549
|
+
readonly _tag: "SteppedTab";
|
|
550
|
+
readonly paneId: string;
|
|
513
551
|
}, {
|
|
514
552
|
readonly maybeHold: Option.Option<{
|
|
515
553
|
readonly reelHook: string;
|
|
@@ -581,6 +619,8 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
581
619
|
readonly _tag: "CompletedAnnounceReel";
|
|
582
620
|
} | {
|
|
583
621
|
readonly _tag: "CompletedFocusPane";
|
|
622
|
+
} | {
|
|
623
|
+
readonly _tag: "CompletedFocusTab";
|
|
584
624
|
} | {
|
|
585
625
|
readonly _tag: "CompletedRestoreFocus";
|
|
586
626
|
} | {
|
|
@@ -640,6 +680,9 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
640
680
|
readonly columnId: string;
|
|
641
681
|
};
|
|
642
682
|
readonly share: number;
|
|
683
|
+
} | {
|
|
684
|
+
readonly _tag: "PressedTab";
|
|
685
|
+
readonly paneId: string;
|
|
643
686
|
} | {
|
|
644
687
|
readonly _tag: "ReleasedPointer";
|
|
645
688
|
readonly clientX: number;
|
|
@@ -658,6 +701,9 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
658
701
|
} | {
|
|
659
702
|
readonly _tag: "SteppedHeld";
|
|
660
703
|
readonly step: "Down" | "Left" | "Right" | "Up";
|
|
704
|
+
} | {
|
|
705
|
+
readonly _tag: "SteppedTab";
|
|
706
|
+
readonly paneId: string;
|
|
661
707
|
}, {
|
|
662
708
|
readonly maybeHold: Option.Option<{
|
|
663
709
|
readonly reelHook: string;
|
|
@@ -737,6 +783,8 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
737
783
|
readonly _tag: "CompletedAnnounceReel";
|
|
738
784
|
} | {
|
|
739
785
|
readonly _tag: "CompletedFocusPane";
|
|
786
|
+
} | {
|
|
787
|
+
readonly _tag: "CompletedFocusTab";
|
|
740
788
|
} | {
|
|
741
789
|
readonly _tag: "CompletedRestoreFocus";
|
|
742
790
|
} | {
|
|
@@ -796,6 +844,9 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
796
844
|
readonly columnId: string;
|
|
797
845
|
};
|
|
798
846
|
readonly share: number;
|
|
847
|
+
} | {
|
|
848
|
+
readonly _tag: "PressedTab";
|
|
849
|
+
readonly paneId: string;
|
|
799
850
|
} | {
|
|
800
851
|
readonly _tag: "ReleasedPointer";
|
|
801
852
|
readonly clientX: number;
|
|
@@ -814,6 +865,9 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
814
865
|
} | {
|
|
815
866
|
readonly _tag: "SteppedHeld";
|
|
816
867
|
readonly step: "Down" | "Left" | "Right" | "Up";
|
|
868
|
+
} | {
|
|
869
|
+
readonly _tag: "SteppedTab";
|
|
870
|
+
readonly paneId: string;
|
|
817
871
|
}, {
|
|
818
872
|
readonly isHolding: boolean;
|
|
819
873
|
}, never> & {
|
|
@@ -829,11 +883,12 @@ export declare const SizeLiftedPane: Mount.MountDefinitionWithArgs<"SizeLiftedPa
|
|
|
829
883
|
}, {
|
|
830
884
|
readonly _tag: "CompletedSizeLiftedPane";
|
|
831
885
|
}>;
|
|
832
|
-
/** What the reel hands `toPaneView` for each pane: put `
|
|
886
|
+
/** What the reel hands `toPaneView` for each pane: put `lead` in the Window's `lead` and give
|
|
833
887
|
* it `id`. */
|
|
834
888
|
export type PaneRender = Readonly<{
|
|
835
|
-
/** The
|
|
836
|
-
|
|
889
|
+
/** The title bar's `lead`: the pane's grip, a quiet glyph button named "Move <label>", or
|
|
890
|
+
* nothing under tabs, where a pane does not move. */
|
|
891
|
+
lead: ReadonlyArray<Html>;
|
|
837
892
|
/** The window's id, unique in the document. */
|
|
838
893
|
id: string;
|
|
839
894
|
}>;
|
|
@@ -844,10 +899,15 @@ export type ViewInputs = Readonly<{
|
|
|
844
899
|
layout: Layout;
|
|
845
900
|
/** Names the reel for screen readers. */
|
|
846
901
|
label: string;
|
|
847
|
-
/** Renders one pane, a `Window.view` with `render.
|
|
902
|
+
/** Renders one pane, a `Window.view` with `render.lead` as its `lead` and `render.id` as its
|
|
848
903
|
* `id`. Mark the control focus should land on in it (a terminal's input) with
|
|
849
904
|
* `data-reel-focus`. */
|
|
850
905
|
toPaneView: (pane: Pane, render: PaneRender) => Html;
|
|
906
|
+
/** How the panes print: in their columns (`Strip`, when not given), or one at a time under
|
|
907
|
+
* their tabs (`Tabs`). Pass the same to `perform`. */
|
|
908
|
+
arrangement?: Arrangement;
|
|
909
|
+
/** What a pane's tab prints before its label: a kind glyph. Nothing when not given. */
|
|
910
|
+
toTabLeadView?: (pane: Pane) => ReadonlyArray<Html>;
|
|
851
911
|
}>;
|
|
852
912
|
/**
|
|
853
913
|
* A row of columns wider than the view when it must be, each a stack of panes, scrolled
|
|
@@ -862,6 +922,11 @@ export type ViewInputs = Readonly<{
|
|
|
862
922
|
* panes), Space drops it, and Escape or Tab puts it back. A drop reports what it asks
|
|
863
923
|
* of the layout as the OutMessage. Lift `subscriptions(keyPrefix)` into the application's, or
|
|
864
924
|
* nothing follows the pointer, and call `reconcile` whenever the layout changes.
|
|
925
|
+
*
|
|
926
|
+
* Under tabs (`arrangement: "Tabs"`) the reel is `div.reel.tabbed`: a `div.nav.tabs.reel-tabs`
|
|
927
|
+
* tab list over the scroller, whose track holds one `div.reel-slot.reel-stage` at the reel's
|
|
928
|
+
* full size where the columns were. Every pane is pinned to it, the focused one shown and the
|
|
929
|
+
* others `.behind`, hidden and inert; there are no grips and no splitters.
|
|
865
930
|
*/
|
|
866
931
|
export declare const view: import("foldkit/submodel").View<{
|
|
867
932
|
readonly id: string;
|
|
@@ -925,6 +990,8 @@ export declare const view: import("foldkit/submodel").View<{
|
|
|
925
990
|
readonly _tag: "CompletedAnnounceReel";
|
|
926
991
|
} | {
|
|
927
992
|
readonly _tag: "CompletedFocusPane";
|
|
993
|
+
} | {
|
|
994
|
+
readonly _tag: "CompletedFocusTab";
|
|
928
995
|
} | {
|
|
929
996
|
readonly _tag: "CompletedRestoreFocus";
|
|
930
997
|
} | {
|
|
@@ -984,6 +1051,9 @@ export declare const view: import("foldkit/submodel").View<{
|
|
|
984
1051
|
readonly columnId: string;
|
|
985
1052
|
};
|
|
986
1053
|
readonly share: number;
|
|
1054
|
+
} | {
|
|
1055
|
+
readonly _tag: "PressedTab";
|
|
1056
|
+
readonly paneId: string;
|
|
987
1057
|
} | {
|
|
988
1058
|
readonly _tag: "ReleasedPointer";
|
|
989
1059
|
readonly clientX: number;
|
|
@@ -1002,15 +1072,23 @@ export declare const view: import("foldkit/submodel").View<{
|
|
|
1002
1072
|
} | {
|
|
1003
1073
|
readonly _tag: "SteppedHeld";
|
|
1004
1074
|
readonly step: "Down" | "Left" | "Right" | "Up";
|
|
1075
|
+
} | {
|
|
1076
|
+
readonly _tag: "SteppedTab";
|
|
1077
|
+
readonly paneId: string;
|
|
1005
1078
|
}, Readonly<{
|
|
1006
1079
|
/** The columns and their panes, as the application holds them. */
|
|
1007
1080
|
layout: Layout;
|
|
1008
1081
|
/** Names the reel for screen readers. */
|
|
1009
1082
|
label: string;
|
|
1010
|
-
/** Renders one pane, a `Window.view` with `render.
|
|
1083
|
+
/** Renders one pane, a `Window.view` with `render.lead` as its `lead` and `render.id` as its
|
|
1011
1084
|
* `id`. Mark the control focus should land on in it (a terminal's input) with
|
|
1012
1085
|
* `data-reel-focus`. */
|
|
1013
1086
|
toPaneView: (pane: Pane, render: PaneRender) => Html;
|
|
1087
|
+
/** How the panes print: in their columns (`Strip`, when not given), or one at a time under
|
|
1088
|
+
* their tabs (`Tabs`). Pass the same to `perform`. */
|
|
1089
|
+
arrangement?: Arrangement;
|
|
1090
|
+
/** What a pane's tab prints before its label: a kind glyph. Nothing when not given. */
|
|
1091
|
+
toTabLeadView?: (pane: Pane) => ReadonlyArray<Html>;
|
|
1014
1092
|
}>>;
|
|
1015
1093
|
export {};
|
|
1016
1094
|
//# sourceMappingURL=reel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reel.d.ts","sourceRoot":"","sources":["../../../src/reel/reel.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAIN,MAAM,EAGN,MAAM,EAGP,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,EAAa,IAAI,EAAe,MAAM,cAAc,CAAC;AAEjE,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AAKvC,OAAO,KAAK,YAAY,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAiB9C,OAAO,EAGL,KAAK,MAAM,EACX,UAAU,EACV,KAAK,IAAI,EA4BV,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"reel.d.ts","sourceRoot":"","sources":["../../../src/reel/reel.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAIN,MAAM,EAGN,MAAM,EAGP,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,EAAa,IAAI,EAAe,MAAM,cAAc,CA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