@flyingrobots/bijou-tui 0.9.0 → 1.0.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/dist/accordion.d.ts +46 -5
- package/dist/accordion.d.ts.map +1 -1
- package/dist/accordion.js +41 -5
- package/dist/accordion.js.map +1 -1
- package/dist/animate.d.ts +30 -0
- package/dist/animate.d.ts.map +1 -1
- package/dist/animate.js +33 -0
- package/dist/animate.js.map +1 -1
- package/dist/browsable-list.d.ts +67 -4
- package/dist/browsable-list.d.ts.map +1 -1
- package/dist/browsable-list.js +49 -4
- package/dist/browsable-list.js.map +1 -1
- package/dist/canvas.d.ts +42 -0
- package/dist/canvas.d.ts.map +1 -0
- package/dist/canvas.js +41 -0
- package/dist/canvas.js.map +1 -0
- package/dist/command-palette.d.ts +67 -6
- package/dist/command-palette.d.ts.map +1 -1
- package/dist/command-palette.js +67 -6
- package/dist/command-palette.js.map +1 -1
- package/dist/commands.d.ts +32 -3
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +32 -3
- package/dist/commands.js.map +1 -1
- package/dist/driver.d.ts +14 -0
- package/dist/driver.d.ts.map +1 -1
- package/dist/driver.js +7 -0
- package/dist/driver.js.map +1 -1
- package/dist/eventbus.d.ts +49 -9
- package/dist/eventbus.d.ts.map +1 -1
- package/dist/eventbus.js +22 -4
- package/dist/eventbus.js.map +1 -1
- package/dist/file-picker.d.ts +56 -4
- package/dist/file-picker.d.ts.map +1 -1
- package/dist/file-picker.js +52 -4
- package/dist/file-picker.js.map +1 -1
- package/dist/flex.d.ts +17 -0
- package/dist/flex.d.ts.map +1 -1
- package/dist/flex.js +106 -12
- package/dist/flex.js.map +1 -1
- package/dist/help.d.ts +16 -1
- package/dist/help.d.ts.map +1 -1
- package/dist/help.js +13 -0
- package/dist/help.js.map +1 -1
- package/dist/index.d.ts +12 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/inputstack.d.ts +32 -4
- package/dist/inputstack.d.ts.map +1 -1
- package/dist/inputstack.js +11 -0
- package/dist/inputstack.js.map +1 -1
- package/dist/keybindings.d.ts +106 -14
- package/dist/keybindings.d.ts.map +1 -1
- package/dist/keybindings.js +28 -2
- package/dist/keybindings.js.map +1 -1
- package/dist/keys.d.ts +29 -3
- package/dist/keys.d.ts.map +1 -1
- package/dist/keys.js +73 -2
- package/dist/keys.js.map +1 -1
- package/dist/layout.d.ts +26 -0
- package/dist/layout.d.ts.map +1 -1
- package/dist/layout.js +25 -1
- package/dist/layout.js.map +1 -1
- package/dist/navigable-table.d.ts +48 -4
- package/dist/navigable-table.d.ts.map +1 -1
- package/dist/navigable-table.js +44 -4
- package/dist/navigable-table.js.map +1 -1
- package/dist/overlay.d.ts +110 -3
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +87 -7
- package/dist/overlay.js.map +1 -1
- package/dist/pager.d.ts +66 -7
- package/dist/pager.d.ts.map +1 -1
- package/dist/pager.js +56 -7
- package/dist/pager.js.map +1 -1
- package/dist/panels.d.ts +55 -0
- package/dist/panels.d.ts.map +1 -1
- package/dist/panels.js +11 -0
- package/dist/panels.js.map +1 -1
- package/dist/runtime.d.ts +6 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +24 -3
- package/dist/runtime.js.map +1 -1
- package/dist/screen.d.ts +37 -3
- package/dist/screen.d.ts.map +1 -1
- package/dist/screen.js +37 -3
- package/dist/screen.js.map +1 -1
- package/dist/spring.d.ts +56 -7
- package/dist/spring.d.ts.map +1 -1
- package/dist/spring.js +44 -7
- package/dist/spring.js.map +1 -1
- package/dist/status-bar.d.ts +15 -2
- package/dist/status-bar.d.ts.map +1 -1
- package/dist/status-bar.js +9 -0
- package/dist/status-bar.js.map +1 -1
- package/dist/timeline.d.ts +68 -5
- package/dist/timeline.d.ts.map +1 -1
- package/dist/timeline.js +33 -0
- package/dist/timeline.js.map +1 -1
- package/dist/types.d.ts +102 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +30 -2
- package/dist/types.js.map +1 -1
- package/dist/viewport.d.ts +74 -14
- package/dist/viewport.d.ts.map +1 -1
- package/dist/viewport.js +82 -60
- package/dist/viewport.js.map +1 -1
- package/package.json +2 -2
package/dist/accordion.d.ts
CHANGED
|
@@ -21,10 +21,14 @@
|
|
|
21
21
|
import { type AccordionSection, type AccordionOptions, type BijouContext } from '@flyingrobots/bijou';
|
|
22
22
|
import { type KeyMap } from './keybindings.js';
|
|
23
23
|
export type { AccordionSection } from '@flyingrobots/bijou';
|
|
24
|
+
/** Immutable state for the interactive accordion widget. */
|
|
24
25
|
export interface AccordionState {
|
|
26
|
+
/** All accordion sections with their expand/collapse state. */
|
|
25
27
|
readonly sections: readonly AccordionSection[];
|
|
28
|
+
/** Index of the currently focused section. */
|
|
26
29
|
readonly focusIndex: number;
|
|
27
30
|
}
|
|
31
|
+
/** Options for rendering the interactive accordion view. */
|
|
28
32
|
export interface InteractiveAccordionOptions {
|
|
29
33
|
/** Token for the expand/collapse indicator. */
|
|
30
34
|
readonly indicatorToken?: AccordionOptions['indicatorToken'];
|
|
@@ -32,22 +36,51 @@ export interface InteractiveAccordionOptions {
|
|
|
32
36
|
readonly titleToken?: AccordionOptions['titleToken'];
|
|
33
37
|
/** Character for the focus indicator. Default: '>' */
|
|
34
38
|
readonly focusChar?: string;
|
|
39
|
+
/** Bijou context for theming and styling. */
|
|
35
40
|
readonly ctx?: BijouContext;
|
|
36
41
|
}
|
|
37
42
|
/**
|
|
38
43
|
* Create initial accordion state from sections.
|
|
39
44
|
* Preserves existing `expanded` flags; focus starts at index 0.
|
|
45
|
+
*
|
|
46
|
+
* @param sections - Accordion sections to populate the widget.
|
|
47
|
+
* @returns Fresh accordion state with focus on the first section.
|
|
40
48
|
*/
|
|
41
49
|
export declare function createAccordionState(sections: AccordionSection[]): AccordionState;
|
|
42
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Move focus to the next section (wraps around).
|
|
52
|
+
*
|
|
53
|
+
* @param state - Current accordion state.
|
|
54
|
+
* @returns Updated accordion state with focus on the next section.
|
|
55
|
+
*/
|
|
43
56
|
export declare function focusNext(state: AccordionState): AccordionState;
|
|
44
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* Move focus to the previous section (wraps around).
|
|
59
|
+
*
|
|
60
|
+
* @param state - Current accordion state.
|
|
61
|
+
* @returns Updated accordion state with focus on the previous section.
|
|
62
|
+
*/
|
|
45
63
|
export declare function focusPrev(state: AccordionState): AccordionState;
|
|
46
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Toggle the expanded state of the focused section.
|
|
66
|
+
*
|
|
67
|
+
* @param state - Current accordion state.
|
|
68
|
+
* @returns Updated accordion state with the focused section toggled.
|
|
69
|
+
*/
|
|
47
70
|
export declare function toggleFocused(state: AccordionState): AccordionState;
|
|
48
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* Expand all sections.
|
|
73
|
+
*
|
|
74
|
+
* @param state - Current accordion state.
|
|
75
|
+
* @returns Updated accordion state with all sections expanded.
|
|
76
|
+
*/
|
|
49
77
|
export declare function expandAll(state: AccordionState): AccordionState;
|
|
50
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* Collapse all sections.
|
|
80
|
+
*
|
|
81
|
+
* @param state - Current accordion state.
|
|
82
|
+
* @returns Updated accordion state with all sections collapsed.
|
|
83
|
+
*/
|
|
51
84
|
export declare function collapseAll(state: AccordionState): AccordionState;
|
|
52
85
|
/**
|
|
53
86
|
* Render the interactive accordion with a focus indicator on the
|
|
@@ -55,10 +88,18 @@ export declare function collapseAll(state: AccordionState): AccordionState;
|
|
|
55
88
|
*
|
|
56
89
|
* Delegates to the static `accordion()` for the actual rendering,
|
|
57
90
|
* then prepends a focus indicator to the focused section's line.
|
|
91
|
+
*
|
|
92
|
+
* @param state - Current accordion state.
|
|
93
|
+
* @param options - Rendering options (indicators, focus char, context).
|
|
94
|
+
* @returns Rendered accordion string with focus indicator on the active section.
|
|
58
95
|
*/
|
|
59
96
|
export declare function interactiveAccordion(state: AccordionState, options?: InteractiveAccordionOptions): string;
|
|
60
97
|
/**
|
|
61
98
|
* Create a preconfigured KeyMap for accordion navigation.
|
|
99
|
+
*
|
|
100
|
+
* @template Msg - Application message type dispatched by key bindings.
|
|
101
|
+
* @param actions - Map of navigation and toggle actions to message values.
|
|
102
|
+
* @returns Preconfigured key map with vim-style accordion bindings.
|
|
62
103
|
*/
|
|
63
104
|
export declare function accordionKeyMap<Msg>(actions: {
|
|
64
105
|
focusNext: Msg;
|
package/dist/accordion.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../src/accordion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG7D,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAM5D,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC/C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,2BAA2B;IAC1C,+CAA+C;IAC/C,QAAQ,CAAC,cAAc,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAC7D,gCAAgC;IAChC,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAC;IACrD,sDAAsD;IACtD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,GAAG,CAAC,EAAE,YAAY,CAAC;CAC7B;AAMD
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":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GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,GAAG,cAAc,CAEjE;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,cAAc,EACrB,OAAO,CAAC,EAAE,2BAA2B,GACpC,MAAM,CA4BR;AAMD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE;IAC5C,SAAS,EAAE,GAAG,CAAC;IACf,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,GAAG,CAAC;IACZ,IAAI,EAAE,GAAG,CAAC;CACX,GAAG,MAAM,CAAC,GAAG,CAAC,CAcd"}
|
package/dist/accordion.js
CHANGED
|
@@ -26,6 +26,9 @@ import { createKeyMap } from './keybindings.js';
|
|
|
26
26
|
/**
|
|
27
27
|
* Create initial accordion state from sections.
|
|
28
28
|
* Preserves existing `expanded` flags; focus starts at index 0.
|
|
29
|
+
*
|
|
30
|
+
* @param sections - Accordion sections to populate the widget.
|
|
31
|
+
* @returns Fresh accordion state with focus on the first section.
|
|
29
32
|
*/
|
|
30
33
|
export function createAccordionState(sections) {
|
|
31
34
|
return {
|
|
@@ -36,7 +39,12 @@ export function createAccordionState(sections) {
|
|
|
36
39
|
// ---------------------------------------------------------------------------
|
|
37
40
|
// State transformers
|
|
38
41
|
// ---------------------------------------------------------------------------
|
|
39
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Move focus to the next section (wraps around).
|
|
44
|
+
*
|
|
45
|
+
* @param state - Current accordion state.
|
|
46
|
+
* @returns Updated accordion state with focus on the next section.
|
|
47
|
+
*/
|
|
40
48
|
export function focusNext(state) {
|
|
41
49
|
if (state.sections.length === 0)
|
|
42
50
|
return state;
|
|
@@ -45,7 +53,12 @@ export function focusNext(state) {
|
|
|
45
53
|
focusIndex: (state.focusIndex + 1) % state.sections.length,
|
|
46
54
|
};
|
|
47
55
|
}
|
|
48
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Move focus to the previous section (wraps around).
|
|
58
|
+
*
|
|
59
|
+
* @param state - Current accordion state.
|
|
60
|
+
* @returns Updated accordion state with focus on the previous section.
|
|
61
|
+
*/
|
|
49
62
|
export function focusPrev(state) {
|
|
50
63
|
if (state.sections.length === 0)
|
|
51
64
|
return state;
|
|
@@ -54,18 +67,33 @@ export function focusPrev(state) {
|
|
|
54
67
|
focusIndex: (state.focusIndex - 1 + state.sections.length) % state.sections.length,
|
|
55
68
|
};
|
|
56
69
|
}
|
|
57
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Toggle the expanded state of the focused section.
|
|
72
|
+
*
|
|
73
|
+
* @param state - Current accordion state.
|
|
74
|
+
* @returns Updated accordion state with the focused section toggled.
|
|
75
|
+
*/
|
|
58
76
|
export function toggleFocused(state) {
|
|
59
77
|
if (state.sections.length === 0)
|
|
60
78
|
return state;
|
|
61
79
|
const sections = state.sections.map((s, i) => i === state.focusIndex ? { ...s, expanded: !s.expanded } : s);
|
|
62
80
|
return { ...state, sections };
|
|
63
81
|
}
|
|
64
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* Expand all sections.
|
|
84
|
+
*
|
|
85
|
+
* @param state - Current accordion state.
|
|
86
|
+
* @returns Updated accordion state with all sections expanded.
|
|
87
|
+
*/
|
|
65
88
|
export function expandAll(state) {
|
|
66
89
|
return { ...state, sections: state.sections.map((s) => ({ ...s, expanded: true })) };
|
|
67
90
|
}
|
|
68
|
-
/**
|
|
91
|
+
/**
|
|
92
|
+
* Collapse all sections.
|
|
93
|
+
*
|
|
94
|
+
* @param state - Current accordion state.
|
|
95
|
+
* @returns Updated accordion state with all sections collapsed.
|
|
96
|
+
*/
|
|
69
97
|
export function collapseAll(state) {
|
|
70
98
|
return { ...state, sections: state.sections.map((s) => ({ ...s, expanded: false })) };
|
|
71
99
|
}
|
|
@@ -78,6 +106,10 @@ export function collapseAll(state) {
|
|
|
78
106
|
*
|
|
79
107
|
* Delegates to the static `accordion()` for the actual rendering,
|
|
80
108
|
* then prepends a focus indicator to the focused section's line.
|
|
109
|
+
*
|
|
110
|
+
* @param state - Current accordion state.
|
|
111
|
+
* @param options - Rendering options (indicators, focus char, context).
|
|
112
|
+
* @returns Rendered accordion string with focus indicator on the active section.
|
|
81
113
|
*/
|
|
82
114
|
export function interactiveAccordion(state, options) {
|
|
83
115
|
if (state.sections.length === 0)
|
|
@@ -109,6 +141,10 @@ export function interactiveAccordion(state, options) {
|
|
|
109
141
|
// ---------------------------------------------------------------------------
|
|
110
142
|
/**
|
|
111
143
|
* Create a preconfigured KeyMap for accordion navigation.
|
|
144
|
+
*
|
|
145
|
+
* @template Msg - Application message type dispatched by key bindings.
|
|
146
|
+
* @param actions - Map of navigation and toggle actions to message values.
|
|
147
|
+
* @returns Preconfigured key map with vim-style accordion bindings.
|
|
112
148
|
*/
|
|
113
149
|
export function accordionKeyMap(actions) {
|
|
114
150
|
return createKeyMap()
|
package/dist/accordion.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.js","sourceRoot":"","sources":["../src/accordion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,SAAS,GAIV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAe,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"accordion.js","sourceRoot":"","sources":["../src/accordion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,SAAS,GAIV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAe,MAAM,kBAAkB,CAAC;AA6B7D,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAA4B;IAC/D,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,E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,CAAC;SAC/C,IAAI,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,CAAC,MAAM,CAAC,CACjD;SACA,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC;SAC/B,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;AAC1C,CAAC"}
|
package/dist/animate.d.ts
CHANGED
|
@@ -16,6 +16,11 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import type { Cmd } from './types.js';
|
|
18
18
|
import { type SpringConfig, type SpringPreset, type EasingFn } from './spring.js';
|
|
19
|
+
/**
|
|
20
|
+
* Shared options for both spring and tween animations.
|
|
21
|
+
*
|
|
22
|
+
* @template M - The message type emitted into the TEA update cycle.
|
|
23
|
+
*/
|
|
19
24
|
interface AnimateBase<M> {
|
|
20
25
|
/** Starting value. */
|
|
21
26
|
readonly from: number;
|
|
@@ -30,18 +35,35 @@ interface AnimateBase<M> {
|
|
|
30
35
|
/** Optional message to emit when the animation is fully complete. */
|
|
31
36
|
readonly onComplete?: () => M;
|
|
32
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Options for a spring-based animation (the default mode).
|
|
40
|
+
*
|
|
41
|
+
* @template M - The message type emitted into the TEA update cycle.
|
|
42
|
+
*/
|
|
33
43
|
export interface SpringAnimateOptions<M> extends AnimateBase<M> {
|
|
44
|
+
/** Animation mode discriminator. Omit or set to `'spring'` for spring physics. */
|
|
34
45
|
readonly type?: 'spring';
|
|
35
46
|
/** Spring config — preset name or custom values. */
|
|
36
47
|
readonly spring?: Partial<SpringConfig> | SpringPreset;
|
|
37
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Options for a duration-based tween animation.
|
|
51
|
+
*
|
|
52
|
+
* @template M - The message type emitted into the TEA update cycle.
|
|
53
|
+
*/
|
|
38
54
|
export interface TweenAnimateOptions<M> extends AnimateBase<M> {
|
|
55
|
+
/** Animation mode discriminator. Must be `'tween'` for tween mode. */
|
|
39
56
|
readonly type: 'tween';
|
|
40
57
|
/** Duration in milliseconds. */
|
|
41
58
|
readonly duration: number;
|
|
42
59
|
/** Easing function. Default: easeOutCubic. */
|
|
43
60
|
readonly ease?: EasingFn;
|
|
44
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Discriminated union of spring and tween animation options.
|
|
64
|
+
*
|
|
65
|
+
* @template M - The message type emitted into the TEA update cycle.
|
|
66
|
+
*/
|
|
45
67
|
export type AnimateOptions<M> = SpringAnimateOptions<M> | TweenAnimateOptions<M>;
|
|
46
68
|
/**
|
|
47
69
|
* Create a TEA command that drives an animation.
|
|
@@ -50,10 +72,18 @@ export type AnimateOptions<M> = SpringAnimateOptions<M> | TweenAnimateOptions<M>
|
|
|
50
72
|
* ```ts
|
|
51
73
|
* animate({ from: 0, to: 100, spring: 'wobbly', onFrame: (v) => ({ type: 'scroll', y: v }) })
|
|
52
74
|
* ```
|
|
75
|
+
*
|
|
76
|
+
* @template M - The message type emitted into the TEA update cycle.
|
|
77
|
+
* @param options - Animation configuration (spring or tween).
|
|
78
|
+
* @returns A TEA command that emits `onFrame` messages as the animation progresses.
|
|
53
79
|
*/
|
|
54
80
|
export declare function animate<M>(options: AnimateOptions<M>): Cmd<M>;
|
|
55
81
|
/**
|
|
56
82
|
* Run animations in sequence. Each animation completes before the next starts.
|
|
83
|
+
*
|
|
84
|
+
* @template M - The message type emitted into the TEA update cycle.
|
|
85
|
+
* @param cmds - Ordered TEA commands (typically from {@link animate}) to chain.
|
|
86
|
+
* @returns A single TEA command that runs all commands serially.
|
|
57
87
|
*/
|
|
58
88
|
export declare function sequence<M>(...cmds: Cmd<M>[]): Cmd<M>;
|
|
59
89
|
export {};
|
package/dist/animate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animate.d.ts","sourceRoot":"","sources":["../src/animate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,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CAAC,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC;AAMjF;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAiB7D;AA+FD;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,CAMrD"}
|
package/dist/animate.js
CHANGED
|
@@ -25,6 +25,10 @@ import { springStep, createSpringState, resolveSpringConfig, tweenStep, createTw
|
|
|
25
25
|
* ```ts
|
|
26
26
|
* animate({ from: 0, to: 100, spring: 'wobbly', onFrame: (v) => ({ type: 'scroll', y: v }) })
|
|
27
27
|
* ```
|
|
28
|
+
*
|
|
29
|
+
* @template M - The message type emitted into the TEA update cycle.
|
|
30
|
+
* @param options - Animation configuration (spring or tween).
|
|
31
|
+
* @returns A TEA command that emits `onFrame` messages as the animation progresses.
|
|
28
32
|
*/
|
|
29
33
|
export function animate(options) {
|
|
30
34
|
const { from, to, fps = 60, immediate = false, onFrame, onComplete } = options;
|
|
@@ -45,6 +49,18 @@ export function animate(options) {
|
|
|
45
49
|
// ---------------------------------------------------------------------------
|
|
46
50
|
// Internal: spring command
|
|
47
51
|
// ---------------------------------------------------------------------------
|
|
52
|
+
/**
|
|
53
|
+
* Build a TEA command that runs a spring animation via `setInterval`.
|
|
54
|
+
*
|
|
55
|
+
* @template M - The message type emitted into the TEA update cycle.
|
|
56
|
+
* @param from - Starting value.
|
|
57
|
+
* @param to - Target value.
|
|
58
|
+
* @param config - Resolved spring physics parameters.
|
|
59
|
+
* @param fps - Frames per second for the interval timer.
|
|
60
|
+
* @param onFrame - Callback invoked each frame with the interpolated value.
|
|
61
|
+
* @param onComplete - Optional callback invoked when the spring settles.
|
|
62
|
+
* @returns A TEA command that resolves when the spring is done.
|
|
63
|
+
*/
|
|
48
64
|
function createSpringCmd(from, to, config, fps, onFrame, onComplete) {
|
|
49
65
|
return (emit) => new Promise((resolve) => {
|
|
50
66
|
let state = createSpringState(from);
|
|
@@ -65,6 +81,19 @@ function createSpringCmd(from, to, config, fps, onFrame, onComplete) {
|
|
|
65
81
|
// ---------------------------------------------------------------------------
|
|
66
82
|
// Internal: tween command
|
|
67
83
|
// ---------------------------------------------------------------------------
|
|
84
|
+
/**
|
|
85
|
+
* Build a TEA command that runs a tween animation via `setInterval`.
|
|
86
|
+
*
|
|
87
|
+
* @template M - The message type emitted into the TEA update cycle.
|
|
88
|
+
* @param from - Starting value.
|
|
89
|
+
* @param to - Target value.
|
|
90
|
+
* @param duration - Total animation duration in milliseconds.
|
|
91
|
+
* @param ease - Easing function applied to normalized progress.
|
|
92
|
+
* @param fps - Frames per second for the interval timer.
|
|
93
|
+
* @param onFrame - Callback invoked each frame with the interpolated value.
|
|
94
|
+
* @param onComplete - Optional callback invoked when the tween completes.
|
|
95
|
+
* @returns A TEA command that resolves when the tween is done.
|
|
96
|
+
*/
|
|
68
97
|
function createTweenCmd(from, to, duration, ease, fps, onFrame, onComplete) {
|
|
69
98
|
const config = resolveTweenConfig({ from, to, duration, ease });
|
|
70
99
|
return (emit) => new Promise((resolve) => {
|
|
@@ -87,6 +116,10 @@ function createTweenCmd(from, to, duration, ease, fps, onFrame, onComplete) {
|
|
|
87
116
|
// ---------------------------------------------------------------------------
|
|
88
117
|
/**
|
|
89
118
|
* Run animations in sequence. Each animation completes before the next starts.
|
|
119
|
+
*
|
|
120
|
+
* @template M - The message type emitted into the TEA update cycle.
|
|
121
|
+
* @param cmds - Ordered TEA commands (typically from {@link animate}) to chain.
|
|
122
|
+
* @returns A single TEA command that runs all commands serially.
|
|
90
123
|
*/
|
|
91
124
|
export function sequence(...cmds) {
|
|
92
125
|
return async (emit) => {
|
package/dist/animate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animate.js","sourceRoot":"","sources":["../src/animate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAIL,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,OAAO,GACR,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"animate.js","sourceRoot":"","sources":["../src/animate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAIL,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,OAAO,GACR,MAAM,aAAa,CAAC;AA2DrB,8EAA8E;AAC9E,2BAA2B;AAC3B,8EAA8E;AAE9E;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,OAAO,CAAI,OAA0B;IACnD,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,GAAG,EAAE,EAAE,SAAS,GAAG,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IAE/E,4CAA4C;IAC5C,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE;YACpB,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;YAClB,IAAI,UAAU;gBAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QACrC,CAAC,CAAC;IACJ,CAAC;IAED,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QAC7B,OAAO,cAAc,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IACpH,CAAC;IAED,MAAM,MAAM,GAAG,mBAAmB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,OAAO,eAAe,CAAC,IAAI,EAAE,E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CAAC;IAEhE,OAAO,CAAC,IAAI,EAAE,EAAE,CACd,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;QAC5B,IAAI,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACnC,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC;QAE1C,MAAM,EAAE,GAAG,WAAW,CAAC,GAAG,EAAE;YAC1B,KAAK,GAAG,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;YAC7C,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;YAE3B,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;gBACf,aAAa,CAAC,EAAE,CAAC,CAAC;gBAClB,IAAI,UAAU;oBAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;gBACnC,OAAO,EAAE,CAAC;YACZ,CAAC;QACH,CAAC,EAAE,UAAU,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC;AAED,8EAA8E;AAC9E,qDAAqD;AACrD,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAI,GAAG,IAAc;IAC3C,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE;QACpB,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/browsable-list.d.ts
CHANGED
|
@@ -22,43 +22,102 @@
|
|
|
22
22
|
*/
|
|
23
23
|
import type { BijouContext } from '@flyingrobots/bijou';
|
|
24
24
|
import { type KeyMap } from './keybindings.js';
|
|
25
|
+
/**
|
|
26
|
+
* A single item in a browsable list.
|
|
27
|
+
*
|
|
28
|
+
* @template T - Type of the item's value payload.
|
|
29
|
+
*/
|
|
25
30
|
export interface BrowsableListItem<T = string> {
|
|
31
|
+
/** Display label shown in the list. */
|
|
26
32
|
label: string;
|
|
33
|
+
/** Value payload returned when this item is selected. */
|
|
27
34
|
value: T;
|
|
35
|
+
/** Optional description displayed after the label, rendered as `label — description`. */
|
|
28
36
|
description?: string;
|
|
29
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Readonly state for the browsable list widget.
|
|
40
|
+
*
|
|
41
|
+
* @template T - Type of each item's value payload.
|
|
42
|
+
*/
|
|
30
43
|
export interface BrowsableListState<T = string> {
|
|
44
|
+
/** All items in the list. */
|
|
31
45
|
readonly items: readonly BrowsableListItem<T>[];
|
|
46
|
+
/** Index of the currently focused item. */
|
|
32
47
|
readonly focusIndex: number;
|
|
48
|
+
/** Vertical scroll offset (first visible item index). */
|
|
33
49
|
readonly scrollY: number;
|
|
50
|
+
/** Maximum number of visible items. */
|
|
34
51
|
readonly height: number;
|
|
35
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Options for creating a new browsable list state.
|
|
55
|
+
*
|
|
56
|
+
* @template T - Type of each item's value payload.
|
|
57
|
+
*/
|
|
36
58
|
export interface BrowsableListOptions<T = string> {
|
|
59
|
+
/** Items to populate the list. */
|
|
37
60
|
readonly items: readonly BrowsableListItem<T>[];
|
|
61
|
+
/** Maximum number of visible items (default: 10). */
|
|
38
62
|
readonly height?: number;
|
|
39
63
|
}
|
|
64
|
+
/** Options for rendering the browsable list view. */
|
|
40
65
|
export interface BrowsableListRenderOptions {
|
|
66
|
+
/** Character(s) shown next to the focused item (default: `"\u25b8"`). */
|
|
41
67
|
readonly focusIndicator?: string;
|
|
68
|
+
/** Bijou context for theming and styling. */
|
|
42
69
|
readonly ctx?: BijouContext;
|
|
43
70
|
}
|
|
44
71
|
/**
|
|
45
72
|
* Create initial browsable list state from items and optional height.
|
|
46
73
|
* Focus starts at index 0 with scroll at the top.
|
|
74
|
+
* @template T - Type of each item's value payload.
|
|
75
|
+
* @param options - Items and optional viewport height.
|
|
76
|
+
* @returns Fresh browsable list state with focus at the top.
|
|
47
77
|
*/
|
|
48
78
|
export declare function createBrowsableListState<T = string>(options: BrowsableListOptions<T>): BrowsableListState<T>;
|
|
49
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Move focus to the next item (wraps around).
|
|
81
|
+
*
|
|
82
|
+
* @template T - Type of each item's value payload.
|
|
83
|
+
* @param state - Current list state.
|
|
84
|
+
* @returns Updated list state with focus on the next item.
|
|
85
|
+
*/
|
|
50
86
|
export declare function listFocusNext<T>(state: BrowsableListState<T>): BrowsableListState<T>;
|
|
51
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* Move focus to the previous item (wraps around).
|
|
89
|
+
*
|
|
90
|
+
* @template T - Type of each item's value payload.
|
|
91
|
+
* @param state - Current list state.
|
|
92
|
+
* @returns Updated list state with focus on the previous item.
|
|
93
|
+
*/
|
|
52
94
|
export declare function listFocusPrev<T>(state: BrowsableListState<T>): BrowsableListState<T>;
|
|
53
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* Move focus down by one page (clamps to last item).
|
|
97
|
+
*
|
|
98
|
+
* @template T - Type of each item's value payload.
|
|
99
|
+
* @param state - Current list state.
|
|
100
|
+
* @returns Updated list state with focus advanced by one page.
|
|
101
|
+
*/
|
|
54
102
|
export declare function listPageDown<T>(state: BrowsableListState<T>): BrowsableListState<T>;
|
|
55
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* Move focus up by one page (clamps to first item).
|
|
105
|
+
*
|
|
106
|
+
* @template T - Type of each item's value payload.
|
|
107
|
+
* @param state - Current list state.
|
|
108
|
+
* @returns Updated list state with focus moved back by one page.
|
|
109
|
+
*/
|
|
56
110
|
export declare function listPageUp<T>(state: BrowsableListState<T>): BrowsableListState<T>;
|
|
57
111
|
/**
|
|
58
112
|
* Render the browsable list — visible items within the viewport with a
|
|
59
113
|
* focus indicator on the currently focused item.
|
|
60
114
|
*
|
|
61
115
|
* Items with a `description` field render as `label — description`.
|
|
116
|
+
*
|
|
117
|
+
* @template T - Type of each item's value payload.
|
|
118
|
+
* @param state - Current list state.
|
|
119
|
+
* @param options - Rendering options (focus indicator, context).
|
|
120
|
+
* @returns Rendered list string with focus indicator on the active item.
|
|
62
121
|
*/
|
|
63
122
|
export declare function browsableList<T>(state: BrowsableListState<T>, options?: BrowsableListRenderOptions): string;
|
|
64
123
|
/**
|
|
@@ -75,6 +134,10 @@ export declare function browsableList<T>(state: BrowsableListState<T>, options?:
|
|
|
75
134
|
* quit: { type: 'quit' },
|
|
76
135
|
* });
|
|
77
136
|
* ```
|
|
137
|
+
*
|
|
138
|
+
* @template Msg - Application message type dispatched by key bindings.
|
|
139
|
+
* @param actions - Map of navigation actions to message values.
|
|
140
|
+
* @returns Preconfigured key map with vim-style list bindings.
|
|
78
141
|
*/
|
|
79
142
|
export declare function browsableListKeyMap<Msg>(actions: {
|
|
80
143
|
focusNext: Msg;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browsable-list.d.ts","sourceRoot":"","sources":["../src/browsable-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAM7D,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,MAAM;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,CAAC;IACT,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,MAAM;IAC5C,QAAQ,CAAC,KAAK,EAAE,SAAS,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;IAChD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB,C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,EAAE,GAAG,CAAC;IACd,MAAM,EAAE,GAAG,CAAC;IACZ,MAAM,EAAE,GAAG,CAAC;IACZ,IAAI,EAAE,GAAG,CAAC;CACX,GAAG,MAAM,CAAC,GAAG,CAAC,CAed"}
|
package/dist/browsable-list.js
CHANGED
|
@@ -27,6 +27,9 @@ import { createKeyMap } from './keybindings.js';
|
|
|
27
27
|
/**
|
|
28
28
|
* Create initial browsable list state from items and optional height.
|
|
29
29
|
* Focus starts at index 0 with scroll at the top.
|
|
30
|
+
* @template T - Type of each item's value payload.
|
|
31
|
+
* @param options - Items and optional viewport height.
|
|
32
|
+
* @returns Fresh browsable list state with focus at the top.
|
|
30
33
|
*/
|
|
31
34
|
export function createBrowsableListState(options) {
|
|
32
35
|
const height = Math.max(1, options.height ?? 10);
|
|
@@ -40,28 +43,52 @@ export function createBrowsableListState(options) {
|
|
|
40
43
|
// ---------------------------------------------------------------------------
|
|
41
44
|
// State transformers
|
|
42
45
|
// ---------------------------------------------------------------------------
|
|
43
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Move focus to the next item (wraps around).
|
|
48
|
+
*
|
|
49
|
+
* @template T - Type of each item's value payload.
|
|
50
|
+
* @param state - Current list state.
|
|
51
|
+
* @returns Updated list state with focus on the next item.
|
|
52
|
+
*/
|
|
44
53
|
export function listFocusNext(state) {
|
|
45
54
|
if (state.items.length === 0)
|
|
46
55
|
return state;
|
|
47
56
|
const focusIndex = (state.focusIndex + 1) % state.items.length;
|
|
48
57
|
return { ...state, focusIndex, scrollY: adjustScroll(focusIndex, state.scrollY, state.height, state.items.length) };
|
|
49
58
|
}
|
|
50
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Move focus to the previous item (wraps around).
|
|
61
|
+
*
|
|
62
|
+
* @template T - Type of each item's value payload.
|
|
63
|
+
* @param state - Current list state.
|
|
64
|
+
* @returns Updated list state with focus on the previous item.
|
|
65
|
+
*/
|
|
51
66
|
export function listFocusPrev(state) {
|
|
52
67
|
if (state.items.length === 0)
|
|
53
68
|
return state;
|
|
54
69
|
const focusIndex = (state.focusIndex - 1 + state.items.length) % state.items.length;
|
|
55
70
|
return { ...state, focusIndex, scrollY: adjustScroll(focusIndex, state.scrollY, state.height, state.items.length) };
|
|
56
71
|
}
|
|
57
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* Move focus down by one page (clamps to last item).
|
|
74
|
+
*
|
|
75
|
+
* @template T - Type of each item's value payload.
|
|
76
|
+
* @param state - Current list state.
|
|
77
|
+
* @returns Updated list state with focus advanced by one page.
|
|
78
|
+
*/
|
|
58
79
|
export function listPageDown(state) {
|
|
59
80
|
if (state.items.length === 0)
|
|
60
81
|
return state;
|
|
61
82
|
const focusIndex = Math.min(state.focusIndex + state.height, state.items.length - 1);
|
|
62
83
|
return { ...state, focusIndex, scrollY: adjustScroll(focusIndex, state.scrollY, state.height, state.items.length) };
|
|
63
84
|
}
|
|
64
|
-
/**
|
|
85
|
+
/**
|
|
86
|
+
* Move focus up by one page (clamps to first item).
|
|
87
|
+
*
|
|
88
|
+
* @template T - Type of each item's value payload.
|
|
89
|
+
* @param state - Current list state.
|
|
90
|
+
* @returns Updated list state with focus moved back by one page.
|
|
91
|
+
*/
|
|
65
92
|
export function listPageUp(state) {
|
|
66
93
|
if (state.items.length === 0)
|
|
67
94
|
return state;
|
|
@@ -71,6 +98,15 @@ export function listPageUp(state) {
|
|
|
71
98
|
// ---------------------------------------------------------------------------
|
|
72
99
|
// Scroll helper
|
|
73
100
|
// ---------------------------------------------------------------------------
|
|
101
|
+
/**
|
|
102
|
+
* Clamp scroll position so the focused item stays within the visible window.
|
|
103
|
+
*
|
|
104
|
+
* @param focusIndex - Index of the focused item.
|
|
105
|
+
* @param scrollY - Current scroll offset.
|
|
106
|
+
* @param height - Viewport height in items.
|
|
107
|
+
* @param totalItems - Total number of items.
|
|
108
|
+
* @returns Adjusted scroll offset.
|
|
109
|
+
*/
|
|
74
110
|
function adjustScroll(focusIndex, scrollY, height, totalItems) {
|
|
75
111
|
let newScrollY = scrollY;
|
|
76
112
|
if (focusIndex < newScrollY) {
|
|
@@ -90,6 +126,11 @@ function adjustScroll(focusIndex, scrollY, height, totalItems) {
|
|
|
90
126
|
* focus indicator on the currently focused item.
|
|
91
127
|
*
|
|
92
128
|
* Items with a `description` field render as `label — description`.
|
|
129
|
+
*
|
|
130
|
+
* @template T - Type of each item's value payload.
|
|
131
|
+
* @param state - Current list state.
|
|
132
|
+
* @param options - Rendering options (focus indicator, context).
|
|
133
|
+
* @returns Rendered list string with focus indicator on the active item.
|
|
93
134
|
*/
|
|
94
135
|
export function browsableList(state, options) {
|
|
95
136
|
if (state.items.length === 0)
|
|
@@ -124,6 +165,10 @@ export function browsableList(state, options) {
|
|
|
124
165
|
* quit: { type: 'quit' },
|
|
125
166
|
* });
|
|
126
167
|
* ```
|
|
168
|
+
*
|
|
169
|
+
* @template Msg - Application message type dispatched by key bindings.
|
|
170
|
+
* @param actions - Map of navigation actions to message values.
|
|
171
|
+
* @returns Preconfigured key map with vim-style list bindings.
|
|
127
172
|
*/
|
|
128
173
|
export function browsableListKeyMap(actions) {
|
|
129
174
|
return createKeyMap()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browsable-list.js","sourceRoot":"","sources":["../src/browsable-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,YAAY,EAAe,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"browsable-list.js","sourceRoot":"","sources":["../src/browsable-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,YAAY,EAAe,MAAM,kBAAkB,CAAC;AAwD7D,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CACtC,OAAgC;IAEhC,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAA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