@gravionlabs/helix-app 0.0.1 → 22.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/LICENSE.md +21 -0
- package/README.md +147 -1
- package/fesm2022/gravionlabs-helix-app-frame.mjs +1633 -0
- package/fesm2022/gravionlabs-helix-app-frame.mjs.map +1 -0
- package/fesm2022/gravionlabs-helix-app-tauri.mjs +493 -0
- package/fesm2022/gravionlabs-helix-app-tauri.mjs.map +1 -0
- package/fesm2022/gravionlabs-helix-app.mjs +1023 -0
- package/fesm2022/gravionlabs-helix-app.mjs.map +1 -0
- package/frame/package.json +5 -0
- package/frame.css +540 -0
- package/package.json +61 -5
- package/styles.css +12 -0
- package/tauri/package.json +5 -0
- package/types/gravionlabs-helix-app-frame.d.ts +636 -0
- package/types/gravionlabs-helix-app-tauri.d.ts +208 -0
- package/types/gravionlabs-helix-app.d.ts +360 -0
|
@@ -0,0 +1,636 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { TemplateRef } from "@angular/core";
|
|
3
|
+
import { HX_BOTTOM_BAR_MAX_ITEMS, HelixView, HxPlatform } from "@gravionlabs/helix-app";
|
|
4
|
+
/** A badge on an item: a count, or a dot when `true`. */
|
|
5
|
+
export type HxActivityBarBadge = number | string | true;
|
|
6
|
+
/**
|
|
7
|
+
* An item of the activity bar. A view (`kind` absent or `'view'`) is a toggle with `aria-pressed`; an
|
|
8
|
+
* action is a plain button.
|
|
9
|
+
*/
|
|
10
|
+
export interface HxActivityBarItem extends Pick<HelixView, 'id' | 'label' | 'icon' | 'position'> {
|
|
11
|
+
readonly kind?: 'view' | 'action';
|
|
12
|
+
readonly badge?: HxActivityBarBadge | null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The narrow icon rail at the far left (or, with `side="right"`, the far right). It selects the sidebar view, opens tab views and holds actions.
|
|
16
|
+
*
|
|
17
|
+
* ```html
|
|
18
|
+
* <hx-activity-bar [items]="items" [activeId]="activeId()" [expanded]="open()" (selected)="select($event)" />
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* The active view is marked only while the sidebar is `expanded`. The rail is one tab stop (roving
|
|
22
|
+
* tabindex); the arrow keys, Home and End move the focus between the items. An icon given as a name is
|
|
23
|
+
* rendered as `<span class="{name}">`, so the app's icon font or registry draws it; a template is drawn as is.
|
|
24
|
+
* Both sit in a box of one size.
|
|
25
|
+
*/
|
|
26
|
+
export declare class HxActivityBar {
|
|
27
|
+
/** The views and actions; `position` puts them at the top or the bottom (settings). */
|
|
28
|
+
readonly items: import("@angular/core").InputSignal<readonly HxActivityBarItem[]>;
|
|
29
|
+
/** The id of the active view. */
|
|
30
|
+
readonly activeId: import("@angular/core").InputSignal<string | null>;
|
|
31
|
+
/** Whether the sidebar is open; the active view is marked only then. */
|
|
32
|
+
readonly expanded: import("@angular/core").InputSignal<boolean>;
|
|
33
|
+
/** The window edge the rail sits at: `right` puts the marker and the border on the other side. */
|
|
34
|
+
readonly side: import("@angular/core").InputSignal<"left" | "right">;
|
|
35
|
+
/** `small` draws a narrower rail with smaller items and icons (sizes: `--hx-activity-bar-*`). */
|
|
36
|
+
readonly size: import("@angular/core").InputSignal<"default" | "small">;
|
|
37
|
+
/** The accessible name of the rail. */
|
|
38
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
39
|
+
/** Emits the id of the selected view or the activated action. */
|
|
40
|
+
readonly selected: import("@angular/core").OutputEmitterRef<string>;
|
|
41
|
+
private readonly buttons;
|
|
42
|
+
protected readonly groups: import("@angular/core").Signal<{
|
|
43
|
+
name: string;
|
|
44
|
+
items: HxActivityBarItem[];
|
|
45
|
+
}[]>;
|
|
46
|
+
private readonly ordered;
|
|
47
|
+
/** The one item in the tab order: the active view when marked, else the first. */
|
|
48
|
+
protected readonly tabStopId: import("@angular/core").Signal<string>;
|
|
49
|
+
protected isView(item: HxActivityBarItem): boolean;
|
|
50
|
+
protected isActive(item: HxActivityBarItem): boolean;
|
|
51
|
+
protected asTemplate(icon: HxActivityBarItem['icon']): TemplateRef<unknown> | null;
|
|
52
|
+
protected select(item: HxActivityBarItem): void;
|
|
53
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
54
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HxActivityBar, never>;
|
|
55
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HxActivityBar, "hx-activity-bar", never, {
|
|
56
|
+
"items": {
|
|
57
|
+
"alias": "items";
|
|
58
|
+
"required": true;
|
|
59
|
+
"isSignal": true;
|
|
60
|
+
};
|
|
61
|
+
"activeId": {
|
|
62
|
+
"alias": "activeId";
|
|
63
|
+
"required": false;
|
|
64
|
+
"isSignal": true;
|
|
65
|
+
};
|
|
66
|
+
"expanded": {
|
|
67
|
+
"alias": "expanded";
|
|
68
|
+
"required": false;
|
|
69
|
+
"isSignal": true;
|
|
70
|
+
};
|
|
71
|
+
"side": {
|
|
72
|
+
"alias": "side";
|
|
73
|
+
"required": false;
|
|
74
|
+
"isSignal": true;
|
|
75
|
+
};
|
|
76
|
+
"size": {
|
|
77
|
+
"alias": "size";
|
|
78
|
+
"required": false;
|
|
79
|
+
"isSignal": true;
|
|
80
|
+
};
|
|
81
|
+
"label": {
|
|
82
|
+
"alias": "label";
|
|
83
|
+
"required": false;
|
|
84
|
+
"isSignal": true;
|
|
85
|
+
};
|
|
86
|
+
}, {
|
|
87
|
+
"selected": "selected";
|
|
88
|
+
}, never, never, true, never>;
|
|
89
|
+
}
|
|
90
|
+
/** The width and the collapsed state of the sidebar, as the app stores them. */
|
|
91
|
+
export interface HxSidebarState {
|
|
92
|
+
readonly width: number;
|
|
93
|
+
readonly collapsed: boolean;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The layout of a desktop app: toolbar, activity bar, one sidebar, content, an optional right panel and a
|
|
97
|
+
* status bar.
|
|
98
|
+
*
|
|
99
|
+
* ```html
|
|
100
|
+
* <hx-app-shell #shell [views]="VIEWS" [(sidebarWidth)]="width" [(collapsed)]="collapsed" [(activeId)]="viewId">
|
|
101
|
+
* <hx-app-toolbar slot="toolbar">...</hx-app-toolbar>
|
|
102
|
+
* <hx-activity-bar slot="activity" [items]="hxViewsFor(VIEWS)" [activeId]="shell.activeId()"
|
|
103
|
+
* [expanded]="!shell.collapsed()" (selected)="shell.selectView($event)" />
|
|
104
|
+
* <nav slot="sidebar">...the view of activeId...</nav>
|
|
105
|
+
* <hx-tab-bar>...</hx-tab-bar>
|
|
106
|
+
* <aside slot="panel">...</aside>
|
|
107
|
+
* <hx-status-bar slot="status">...</hx-status-bar>
|
|
108
|
+
* </hx-app-shell>
|
|
109
|
+
* ```
|
|
110
|
+
*
|
|
111
|
+
* `VIEWS` is one `HelixView[]` for both shells; the app binds `hxViewsFor(VIEWS)` to the activity bar. With
|
|
112
|
+
* `views` (and `platform`, default `getHxPlatform()`) `showView` and `selectView` ignore an id that is not
|
|
113
|
+
* a view of the platform. Without `views` they accept any id.
|
|
114
|
+
*
|
|
115
|
+
* There is one sidebar: the app puts the view of `activeId` into it. `selectView` collapses the sidebar
|
|
116
|
+
* when the active view is selected again and expands it for another one; `showView` only shows a view. The splitter (`hx-splitter`) is a
|
|
117
|
+
* `role="separator"`: drag it, or use the arrow keys (Shift for a larger step), Home and End. The shell
|
|
118
|
+
* has no tab logic: the unslotted content is the app's tab layout.
|
|
119
|
+
*
|
|
120
|
+
* `slot="activity-end"` is a second activity bar at the right window edge, right of `slot="panel"`; give
|
|
121
|
+
* it `side="right"` (and `size="small"` for a narrow rail). It stays visible with or without the panel.
|
|
122
|
+
*
|
|
123
|
+
* `slot="bottom"` is a panel below the content (not under the activity bar), for an output panel or the
|
|
124
|
+
* panel of an editor. It shows when `bottomOpen` is true; its horizontal splitter resizes `bottomHeight`
|
|
125
|
+
* with the pointer or the Up and Down keys (Shift for a larger step), Home and End.
|
|
126
|
+
*/
|
|
127
|
+
export declare class HxAppShell {
|
|
128
|
+
/** The views of the app; with it `showView` and `selectView` ignore an id that does not exist on the platform. */
|
|
129
|
+
readonly views: import("@angular/core").InputSignal<readonly HelixView[] | undefined>;
|
|
130
|
+
/** The platform the views are filtered for. */
|
|
131
|
+
readonly platform: import("@angular/core").InputSignal<HxPlatform>;
|
|
132
|
+
/** The sidebar width in px (two-way); it is kept between `minWidth` and `maxWidth`. */
|
|
133
|
+
readonly sidebarWidth: import("@angular/core").ModelSignal<number>;
|
|
134
|
+
/** Whether the sidebar is collapsed (two-way). */
|
|
135
|
+
readonly collapsed: import("@angular/core").ModelSignal<boolean>;
|
|
136
|
+
/** The id of the active sidebar view (two-way). */
|
|
137
|
+
readonly activeId: import("@angular/core").ModelSignal<string | null>;
|
|
138
|
+
readonly minWidth: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
139
|
+
readonly maxWidth: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
140
|
+
/** The step of an arrow key in px; Shift multiplies it by 4. */
|
|
141
|
+
readonly step: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
142
|
+
readonly resizerLabel: import("@angular/core").InputSignal<string>;
|
|
143
|
+
/** Set to disable the pointer and keyboard resize. */
|
|
144
|
+
readonly fixedWidth: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
145
|
+
/** The height in px of the bottom panel (two-way); it is kept between `minBottomHeight` and `maxBottomHeight`. */
|
|
146
|
+
readonly bottomHeight: import("@angular/core").ModelSignal<number>;
|
|
147
|
+
/** Whether the bottom panel (`slot="bottom"`) is open (two-way); closed hides the slot and its splitter. */
|
|
148
|
+
readonly bottomOpen: import("@angular/core").ModelSignal<boolean>;
|
|
149
|
+
readonly minBottomHeight: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
150
|
+
readonly maxBottomHeight: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
151
|
+
readonly bottomResizerLabel: import("@angular/core").InputSignal<string>;
|
|
152
|
+
/** Emits the width and the collapsed state whenever either changes through the shell. */
|
|
153
|
+
readonly sidebarChange: import("@angular/core").OutputEmitterRef<HxSidebarState>;
|
|
154
|
+
protected readonly width: import("@angular/core").Signal<number>;
|
|
155
|
+
protected readonly height: import("@angular/core").Signal<number>;
|
|
156
|
+
/**
|
|
157
|
+
* Select a sidebar view: the active one collapses the sidebar (when open), any other shows it and
|
|
158
|
+
* expands the sidebar.
|
|
159
|
+
*/
|
|
160
|
+
selectView(id: string): void;
|
|
161
|
+
/**
|
|
162
|
+
* Show a sidebar view without toggling: activates it and expands the sidebar, and never collapses it.
|
|
163
|
+
* For links to a view from outside the activity bar (status bar, notifications, commands).
|
|
164
|
+
*/
|
|
165
|
+
showView(id: string): void;
|
|
166
|
+
/** Set the width, clamped to the minimum and the maximum. */
|
|
167
|
+
resizeTo(width: number): void;
|
|
168
|
+
/** Open the bottom panel when it is closed and close it when it is open. */
|
|
169
|
+
toggleBottom(): void;
|
|
170
|
+
/** Set the height of the bottom panel, clamped to the minimum and the maximum. */
|
|
171
|
+
resizeBottomTo(height: number): void;
|
|
172
|
+
private isKnown;
|
|
173
|
+
private clamp;
|
|
174
|
+
private clampHeight;
|
|
175
|
+
private report;
|
|
176
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HxAppShell, never>;
|
|
177
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HxAppShell, "hx-app-shell", never, {
|
|
178
|
+
"views": {
|
|
179
|
+
"alias": "views";
|
|
180
|
+
"required": false;
|
|
181
|
+
"isSignal": true;
|
|
182
|
+
};
|
|
183
|
+
"platform": {
|
|
184
|
+
"alias": "platform";
|
|
185
|
+
"required": false;
|
|
186
|
+
"isSignal": true;
|
|
187
|
+
};
|
|
188
|
+
"sidebarWidth": {
|
|
189
|
+
"alias": "sidebarWidth";
|
|
190
|
+
"required": false;
|
|
191
|
+
"isSignal": true;
|
|
192
|
+
};
|
|
193
|
+
"collapsed": {
|
|
194
|
+
"alias": "collapsed";
|
|
195
|
+
"required": false;
|
|
196
|
+
"isSignal": true;
|
|
197
|
+
};
|
|
198
|
+
"activeId": {
|
|
199
|
+
"alias": "activeId";
|
|
200
|
+
"required": false;
|
|
201
|
+
"isSignal": true;
|
|
202
|
+
};
|
|
203
|
+
"minWidth": {
|
|
204
|
+
"alias": "minWidth";
|
|
205
|
+
"required": false;
|
|
206
|
+
"isSignal": true;
|
|
207
|
+
};
|
|
208
|
+
"maxWidth": {
|
|
209
|
+
"alias": "maxWidth";
|
|
210
|
+
"required": false;
|
|
211
|
+
"isSignal": true;
|
|
212
|
+
};
|
|
213
|
+
"step": {
|
|
214
|
+
"alias": "step";
|
|
215
|
+
"required": false;
|
|
216
|
+
"isSignal": true;
|
|
217
|
+
};
|
|
218
|
+
"resizerLabel": {
|
|
219
|
+
"alias": "resizerLabel";
|
|
220
|
+
"required": false;
|
|
221
|
+
"isSignal": true;
|
|
222
|
+
};
|
|
223
|
+
"fixedWidth": {
|
|
224
|
+
"alias": "fixedWidth";
|
|
225
|
+
"required": false;
|
|
226
|
+
"isSignal": true;
|
|
227
|
+
};
|
|
228
|
+
"bottomHeight": {
|
|
229
|
+
"alias": "bottomHeight";
|
|
230
|
+
"required": false;
|
|
231
|
+
"isSignal": true;
|
|
232
|
+
};
|
|
233
|
+
"bottomOpen": {
|
|
234
|
+
"alias": "bottomOpen";
|
|
235
|
+
"required": false;
|
|
236
|
+
"isSignal": true;
|
|
237
|
+
};
|
|
238
|
+
"minBottomHeight": {
|
|
239
|
+
"alias": "minBottomHeight";
|
|
240
|
+
"required": false;
|
|
241
|
+
"isSignal": true;
|
|
242
|
+
};
|
|
243
|
+
"maxBottomHeight": {
|
|
244
|
+
"alias": "maxBottomHeight";
|
|
245
|
+
"required": false;
|
|
246
|
+
"isSignal": true;
|
|
247
|
+
};
|
|
248
|
+
"bottomResizerLabel": {
|
|
249
|
+
"alias": "bottomResizerLabel";
|
|
250
|
+
"required": false;
|
|
251
|
+
"isSignal": true;
|
|
252
|
+
};
|
|
253
|
+
}, {
|
|
254
|
+
"sidebarWidth": "sidebarWidthChange";
|
|
255
|
+
"collapsed": "collapsedChange";
|
|
256
|
+
"activeId": "activeIdChange";
|
|
257
|
+
"bottomHeight": "bottomHeightChange";
|
|
258
|
+
"bottomOpen": "bottomOpenChange";
|
|
259
|
+
"sidebarChange": "sidebarChange";
|
|
260
|
+
}, never, ["[slot=toolbar]", "[slot=activity]", "[slot=sidebar]", "*", "[slot=bottom]", "[slot=panel]", "[slot=activity-end]", "[slot=status]"], true, never>;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* The slim bar (26 px) at the top of a desktop app: a start, a centre (title) and an end slot.
|
|
264
|
+
*
|
|
265
|
+
* ```html
|
|
266
|
+
* <hx-app-toolbar slot="toolbar" [windowButtonsInset]="true">
|
|
267
|
+
* <button slot="start">Back</button>
|
|
268
|
+
* <span slot="centre">Project</span>
|
|
269
|
+
* <button slot="end">Share</button>
|
|
270
|
+
* </hx-app-toolbar>
|
|
271
|
+
* ```
|
|
272
|
+
*
|
|
273
|
+
* The bar and its centre carry `data-tauri-drag-region`, so a Tauri window is dragged by them; buttons
|
|
274
|
+
* in the start and end slot are not part of the region. Set `windowButtonsInset` when the title bar is
|
|
275
|
+
* hidden on macOS: the start group then leaves room for the window buttons.
|
|
276
|
+
*/
|
|
277
|
+
export declare class HxAppToolbar {
|
|
278
|
+
/** Reserve room at the start for the macOS window buttons (a hidden title bar). */
|
|
279
|
+
readonly windowButtonsInset: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
280
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HxAppToolbar, never>;
|
|
281
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HxAppToolbar, "hx-app-toolbar", never, {
|
|
282
|
+
"windowButtonsInset": {
|
|
283
|
+
"alias": "windowButtonsInset";
|
|
284
|
+
"required": false;
|
|
285
|
+
"isSignal": true;
|
|
286
|
+
};
|
|
287
|
+
}, {}, never, ["[slot=start]", "[slot=centre]", "[slot=end]"], true, never>;
|
|
288
|
+
}
|
|
289
|
+
/** An item of the bottom bar: the same shape as an activity bar item. */
|
|
290
|
+
export type HxBottomBarItem = HxActivityBarItem;
|
|
291
|
+
/**
|
|
292
|
+
* The tab bar at the bottom of the mobile shell: up to five views or actions, each a touch target of at
|
|
293
|
+
* least 44 pt. It has no tooltips. The bottom safe area (home indicator) is part of its padding.
|
|
294
|
+
*
|
|
295
|
+
* ```html
|
|
296
|
+
* <hx-bottom-bar [items]="items" [activeId]="activeId()" (selected)="select($event)" />
|
|
297
|
+
* ```
|
|
298
|
+
*/
|
|
299
|
+
export declare class HxBottomBar {
|
|
300
|
+
/** The views and actions; only the first five are shown. */
|
|
301
|
+
readonly items: import("@angular/core").InputSignal<readonly HxActivityBarItem[]>;
|
|
302
|
+
readonly activeId: import("@angular/core").InputSignal<string | null>;
|
|
303
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
304
|
+
/** Emits the id of the selected view or the activated action. */
|
|
305
|
+
readonly selected: import("@angular/core").OutputEmitterRef<string>;
|
|
306
|
+
protected readonly visible: import("@angular/core").Signal<HxActivityBarItem[]>;
|
|
307
|
+
protected isActive(item: HxBottomBarItem): boolean;
|
|
308
|
+
protected asTemplate(icon: HxBottomBarItem['icon']): TemplateRef<unknown> | null;
|
|
309
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HxBottomBar, never>;
|
|
310
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HxBottomBar, "hx-bottom-bar", never, {
|
|
311
|
+
"items": {
|
|
312
|
+
"alias": "items";
|
|
313
|
+
"required": true;
|
|
314
|
+
"isSignal": true;
|
|
315
|
+
};
|
|
316
|
+
"activeId": {
|
|
317
|
+
"alias": "activeId";
|
|
318
|
+
"required": false;
|
|
319
|
+
"isSignal": true;
|
|
320
|
+
};
|
|
321
|
+
"label": {
|
|
322
|
+
"alias": "label";
|
|
323
|
+
"required": false;
|
|
324
|
+
"isSignal": true;
|
|
325
|
+
};
|
|
326
|
+
}, {
|
|
327
|
+
"selected": "selected";
|
|
328
|
+
}, never, never, true, never>;
|
|
329
|
+
}
|
|
330
|
+
/** A view of the mobile shell; an app may mark an entry as an action (`kind: 'action'`). */
|
|
331
|
+
export type HxMobileShellView = HelixView & {
|
|
332
|
+
readonly kind?: 'view' | 'action';
|
|
333
|
+
};
|
|
334
|
+
/**
|
|
335
|
+
* The layout of a phone app: a top bar with the menu button, the content, a bottom bar, and a drawer for
|
|
336
|
+
* the sidebar views. It has no status bar and no hover tooltips. The notch, the home indicator and the
|
|
337
|
+
* keyboard are kept clear with `env(safe-area-inset-*)`.
|
|
338
|
+
*
|
|
339
|
+
* ```html
|
|
340
|
+
* <hx-mobile-shell #shell [items]="items" [(activeId)]="viewId" [(drawerOpen)]="drawer" heading="Helix">
|
|
341
|
+
* <nav slot="drawer"><button (click)="shell.chooseView('files')">Files</button></nav>
|
|
342
|
+
* ...the view of activeId...
|
|
343
|
+
* </hx-mobile-shell>
|
|
344
|
+
* ```
|
|
345
|
+
*
|
|
346
|
+
* With `views` (and `platform`, default `getHxPlatform()`) the bottom bar shows the views with
|
|
347
|
+
* `mobilePlacement: 'bar'` in `barOrder` and the drawer lists the others (icon and label, the active one
|
|
348
|
+
* marked) above the `drawer` slot. `showView(id)` activates a view of the platform and closes the drawer;
|
|
349
|
+
* `selected` emits the id of every tap, an entry with `kind: 'action'` never becomes active.
|
|
350
|
+
*
|
|
351
|
+
* Choose it by platform: `@if (platform === 'mobile') { <hx-mobile-shell> } @else { <hx-app-shell> }`
|
|
352
|
+
* (`getHxPlatform()`), never by the window width. The drawer closes on a tap outside, on a swipe toward its
|
|
353
|
+
* edge, on Escape and after `chooseView`. Set `<meta name="viewport" content="..., viewport-fit=cover,
|
|
354
|
+
* interactive-widget=resizes-content">` so the safe-area insets and the keyboard work.
|
|
355
|
+
*/
|
|
356
|
+
export declare class HxMobileShell {
|
|
357
|
+
/** The views and actions of the bottom bar (at most five are shown); `views` wins when both are set. */
|
|
358
|
+
readonly items: import("@angular/core").InputSignal<readonly HxActivityBarItem[]>;
|
|
359
|
+
/**
|
|
360
|
+
* The views of the app. The bottom bar shows `hxMobileViews(views, platform).bar`, the drawer lists the
|
|
361
|
+
* others above the `drawer` slot.
|
|
362
|
+
*/
|
|
363
|
+
readonly views: import("@angular/core").InputSignal<readonly HxMobileShellView[] | undefined>;
|
|
364
|
+
/** The platform the views are filtered for. */
|
|
365
|
+
readonly platform: import("@angular/core").InputSignal<HxPlatform>;
|
|
366
|
+
/** The id of the active view (two-way). */
|
|
367
|
+
readonly activeId: import("@angular/core").ModelSignal<string | null>;
|
|
368
|
+
/** Whether the drawer is open (two-way). */
|
|
369
|
+
readonly drawerOpen: import("@angular/core").ModelSignal<boolean>;
|
|
370
|
+
readonly heading: import("@angular/core").InputSignal<string>;
|
|
371
|
+
readonly menuLabel: import("@angular/core").InputSignal<string>;
|
|
372
|
+
readonly closeLabel: import("@angular/core").InputSignal<string>;
|
|
373
|
+
readonly barLabel: import("@angular/core").InputSignal<string>;
|
|
374
|
+
/** Emits the id of every tap on a bar or drawer entry, an action included. */
|
|
375
|
+
readonly selected: import("@angular/core").OutputEmitterRef<string>;
|
|
376
|
+
private readonly split;
|
|
377
|
+
protected readonly barItems: import("@angular/core").Signal<readonly HxActivityBarItem[]>;
|
|
378
|
+
protected readonly drawerViews: import("@angular/core").Signal<readonly HxMobileShellView[]>;
|
|
379
|
+
private touchX;
|
|
380
|
+
/**
|
|
381
|
+
* Make a view active and close the drawer. With `views` set, an id that does not exist on the platform
|
|
382
|
+
* is ignored.
|
|
383
|
+
*/
|
|
384
|
+
showView(id: string): void;
|
|
385
|
+
/** Make a view active and close the drawer: call it when a sidebar view was chosen. */
|
|
386
|
+
chooseView(id: string): void;
|
|
387
|
+
protected onSelect(id: string): void;
|
|
388
|
+
protected asTemplate(icon: HelixView['icon']): TemplateRef<unknown> | null;
|
|
389
|
+
protected onTouchStart(event: TouchEvent): void;
|
|
390
|
+
protected onTouchEnd(event: TouchEvent): void;
|
|
391
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HxMobileShell, never>;
|
|
392
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HxMobileShell, "hx-mobile-shell", never, {
|
|
393
|
+
"items": {
|
|
394
|
+
"alias": "items";
|
|
395
|
+
"required": false;
|
|
396
|
+
"isSignal": true;
|
|
397
|
+
};
|
|
398
|
+
"views": {
|
|
399
|
+
"alias": "views";
|
|
400
|
+
"required": false;
|
|
401
|
+
"isSignal": true;
|
|
402
|
+
};
|
|
403
|
+
"platform": {
|
|
404
|
+
"alias": "platform";
|
|
405
|
+
"required": false;
|
|
406
|
+
"isSignal": true;
|
|
407
|
+
};
|
|
408
|
+
"activeId": {
|
|
409
|
+
"alias": "activeId";
|
|
410
|
+
"required": false;
|
|
411
|
+
"isSignal": true;
|
|
412
|
+
};
|
|
413
|
+
"drawerOpen": {
|
|
414
|
+
"alias": "drawerOpen";
|
|
415
|
+
"required": false;
|
|
416
|
+
"isSignal": true;
|
|
417
|
+
};
|
|
418
|
+
"heading": {
|
|
419
|
+
"alias": "heading";
|
|
420
|
+
"required": false;
|
|
421
|
+
"isSignal": true;
|
|
422
|
+
};
|
|
423
|
+
"menuLabel": {
|
|
424
|
+
"alias": "menuLabel";
|
|
425
|
+
"required": false;
|
|
426
|
+
"isSignal": true;
|
|
427
|
+
};
|
|
428
|
+
"closeLabel": {
|
|
429
|
+
"alias": "closeLabel";
|
|
430
|
+
"required": false;
|
|
431
|
+
"isSignal": true;
|
|
432
|
+
};
|
|
433
|
+
"barLabel": {
|
|
434
|
+
"alias": "barLabel";
|
|
435
|
+
"required": false;
|
|
436
|
+
"isSignal": true;
|
|
437
|
+
};
|
|
438
|
+
}, {
|
|
439
|
+
"activeId": "activeIdChange";
|
|
440
|
+
"drawerOpen": "drawerOpenChange";
|
|
441
|
+
"selected": "selected";
|
|
442
|
+
}, never, ["[slot=end]", "*", "[slot=drawer]"], true, never>;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* The bottom bar of a desktop app: a start group at the left and an end group at the right.
|
|
446
|
+
*
|
|
447
|
+
* ```html
|
|
448
|
+
* <hx-status-bar>
|
|
449
|
+
* <hx-status-item slot="start">Ready</hx-status-item>
|
|
450
|
+
* <hx-status-version slot="end" version="1.4.0" channel="RC" />
|
|
451
|
+
* </hx-status-bar>
|
|
452
|
+
* ```
|
|
453
|
+
*
|
|
454
|
+
* A conditional group of items needs one root node that carries the slot, because content projection
|
|
455
|
+
* selects by attribute and an `@if` with several root nodes projects nothing (NG8011):
|
|
456
|
+
*
|
|
457
|
+
* ```html
|
|
458
|
+
* @if (active()) {
|
|
459
|
+
* <ng-container ngProjectAs="[slot=end]">
|
|
460
|
+
* <hx-status-item>Input</hx-status-item>
|
|
461
|
+
* <hx-status-item>119×46</hx-status-item>
|
|
462
|
+
* </ng-container>
|
|
463
|
+
* }
|
|
464
|
+
* ```
|
|
465
|
+
*
|
|
466
|
+
* Project items with `slot="start"` or `slot="end"`. The bar has no role of its own: only an item that
|
|
467
|
+
* announces a change sets `role="status"` (see `HxStatusItem`).
|
|
468
|
+
*/
|
|
469
|
+
export declare class HxStatusBar {
|
|
470
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HxStatusBar, never>;
|
|
471
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HxStatusBar, "hx-status-bar", never, {}, {}, never, ["[slot=start]", "[slot=end]"], true, never>;
|
|
472
|
+
}
|
|
473
|
+
/** Marks the content of a status item that opens as a popover above the bar. */
|
|
474
|
+
export declare class HxStatusPopover {
|
|
475
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HxStatusPopover, never>;
|
|
476
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HxStatusPopover, "[hxStatusPopover]", never, {}, {}, never, never, true, never>;
|
|
477
|
+
}
|
|
478
|
+
/** The tone of a status item. */
|
|
479
|
+
export type HxStatusTone = 'neutral' | 'warn' | 'error' | 'accent';
|
|
480
|
+
/**
|
|
481
|
+
* One item of the status bar, as text or as a button.
|
|
482
|
+
*
|
|
483
|
+
* ```html
|
|
484
|
+
* <hx-status-item kind="button" title="Update available" ariaLabel="Update details" tone="accent"
|
|
485
|
+
* [(popoverOpen)]="open">
|
|
486
|
+
* Update 1.5.0
|
|
487
|
+
* <div hxStatusPopover>Release notes ...</div>
|
|
488
|
+
* </hx-status-item>
|
|
489
|
+
* ```
|
|
490
|
+
*
|
|
491
|
+
* - `kind`: `'text'` (default) or `'button'`.
|
|
492
|
+
* - `pressed`: emits when a button item is activated (click, Enter or Space). Not for a disabled item, a text
|
|
493
|
+
* item or a click inside the popover.
|
|
494
|
+
* - `announce`: sets `role="status"` on the item, for a value that changes while the user works (a sync
|
|
495
|
+
* state). The bar itself is not a live region.
|
|
496
|
+
* - An element with `hxStatusPopover` inside the item is a popover above the bar, shown while
|
|
497
|
+
* `popoverOpen` is true. Escape and a click outside close it. Give a popover item `kind="button"`.
|
|
498
|
+
* The popover ends at the end edge of the item and shifts as far as needed to stay inside the window.
|
|
499
|
+
*/
|
|
500
|
+
export declare class HxStatusItem {
|
|
501
|
+
private readonly host;
|
|
502
|
+
/** Text or button. */
|
|
503
|
+
readonly kind: import("@angular/core").InputSignal<"text" | "button">;
|
|
504
|
+
/** The tooltip. */
|
|
505
|
+
readonly title: import("@angular/core").InputSignal<string | null>;
|
|
506
|
+
/** The accessible name, when the visible text is not enough. */
|
|
507
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
|
|
508
|
+
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
509
|
+
readonly tone: import("@angular/core").InputSignal<HxStatusTone>;
|
|
510
|
+
/** Marks the item as a live region (`role="status"`). */
|
|
511
|
+
readonly announce: import("@angular/core").InputSignal<boolean>;
|
|
512
|
+
/** Whether the popover is open. */
|
|
513
|
+
readonly popoverOpen: import("@angular/core").ModelSignal<boolean>;
|
|
514
|
+
/** Emits when a button item is activated by click, Enter or Space. */
|
|
515
|
+
readonly pressed: import("@angular/core").OutputEmitterRef<void>;
|
|
516
|
+
private readonly popover;
|
|
517
|
+
private readonly panel;
|
|
518
|
+
constructor();
|
|
519
|
+
protected get hasPopover(): boolean;
|
|
520
|
+
protected onButtonClick(): void;
|
|
521
|
+
protected close(): void;
|
|
522
|
+
/** Shifts the open popover horizontally so that it stays inside the window. */
|
|
523
|
+
protected placePopover(): void;
|
|
524
|
+
protected onDocumentClick(event: Event): void;
|
|
525
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HxStatusItem, never>;
|
|
526
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HxStatusItem, "hx-status-item", never, {
|
|
527
|
+
"kind": {
|
|
528
|
+
"alias": "kind";
|
|
529
|
+
"required": false;
|
|
530
|
+
"isSignal": true;
|
|
531
|
+
};
|
|
532
|
+
"title": {
|
|
533
|
+
"alias": "title";
|
|
534
|
+
"required": false;
|
|
535
|
+
"isSignal": true;
|
|
536
|
+
};
|
|
537
|
+
"ariaLabel": {
|
|
538
|
+
"alias": "ariaLabel";
|
|
539
|
+
"required": false;
|
|
540
|
+
"isSignal": true;
|
|
541
|
+
};
|
|
542
|
+
"disabled": {
|
|
543
|
+
"alias": "disabled";
|
|
544
|
+
"required": false;
|
|
545
|
+
"isSignal": true;
|
|
546
|
+
};
|
|
547
|
+
"tone": {
|
|
548
|
+
"alias": "tone";
|
|
549
|
+
"required": false;
|
|
550
|
+
"isSignal": true;
|
|
551
|
+
};
|
|
552
|
+
"announce": {
|
|
553
|
+
"alias": "announce";
|
|
554
|
+
"required": false;
|
|
555
|
+
"isSignal": true;
|
|
556
|
+
};
|
|
557
|
+
"popoverOpen": {
|
|
558
|
+
"alias": "popoverOpen";
|
|
559
|
+
"required": false;
|
|
560
|
+
"isSignal": true;
|
|
561
|
+
};
|
|
562
|
+
}, {
|
|
563
|
+
"popoverOpen": "popoverOpenChange";
|
|
564
|
+
"pressed": "pressed";
|
|
565
|
+
}, ["popover"], ["*", "[hxStatusPopover]"], true, never>;
|
|
566
|
+
}
|
|
567
|
+
/** The app version with an optional channel badge (`RC`). */
|
|
568
|
+
export declare class HxStatusVersion {
|
|
569
|
+
readonly version: import("@angular/core").InputSignal<string>;
|
|
570
|
+
/** A channel badge such as `RC` or `beta`; none for a stable release. */
|
|
571
|
+
readonly channel: import("@angular/core").InputSignal<string | null>;
|
|
572
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HxStatusVersion, never>;
|
|
573
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HxStatusVersion, "hx-status-version", never, {
|
|
574
|
+
"version": {
|
|
575
|
+
"alias": "version";
|
|
576
|
+
"required": true;
|
|
577
|
+
"isSignal": true;
|
|
578
|
+
};
|
|
579
|
+
"channel": {
|
|
580
|
+
"alias": "channel";
|
|
581
|
+
"required": false;
|
|
582
|
+
"isSignal": true;
|
|
583
|
+
};
|
|
584
|
+
}, {}, never, never, true, never>;
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* Zoom out, the level in percent (a click resets to `reset`), zoom in.
|
|
588
|
+
*
|
|
589
|
+
* ```html
|
|
590
|
+
* <hx-status-zoom slot="end" [(value)]="zoom" [min]="50" [max]="200" />
|
|
591
|
+
* ```
|
|
592
|
+
*
|
|
593
|
+
* `value` is a percentage and changes in steps of `step`, kept between `min` and `max`.
|
|
594
|
+
*/
|
|
595
|
+
export declare class HxStatusZoom {
|
|
596
|
+
/** The zoom level in percent. */
|
|
597
|
+
readonly value: import("@angular/core").ModelSignal<number>;
|
|
598
|
+
readonly min: import("@angular/core").InputSignal<number>;
|
|
599
|
+
readonly max: import("@angular/core").InputSignal<number>;
|
|
600
|
+
readonly step: import("@angular/core").InputSignal<number>;
|
|
601
|
+
/** The level a click on the percentage resets to. */
|
|
602
|
+
readonly reset: import("@angular/core").InputSignal<number>;
|
|
603
|
+
protected change(delta: number): void;
|
|
604
|
+
protected set(next: number): void;
|
|
605
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HxStatusZoom, never>;
|
|
606
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HxStatusZoom, "hx-status-zoom", never, {
|
|
607
|
+
"value": {
|
|
608
|
+
"alias": "value";
|
|
609
|
+
"required": false;
|
|
610
|
+
"isSignal": true;
|
|
611
|
+
};
|
|
612
|
+
"min": {
|
|
613
|
+
"alias": "min";
|
|
614
|
+
"required": false;
|
|
615
|
+
"isSignal": true;
|
|
616
|
+
};
|
|
617
|
+
"max": {
|
|
618
|
+
"alias": "max";
|
|
619
|
+
"required": false;
|
|
620
|
+
"isSignal": true;
|
|
621
|
+
};
|
|
622
|
+
"step": {
|
|
623
|
+
"alias": "step";
|
|
624
|
+
"required": false;
|
|
625
|
+
"isSignal": true;
|
|
626
|
+
};
|
|
627
|
+
"reset": {
|
|
628
|
+
"alias": "reset";
|
|
629
|
+
"required": false;
|
|
630
|
+
"isSignal": true;
|
|
631
|
+
};
|
|
632
|
+
}, {
|
|
633
|
+
"value": "valueChange";
|
|
634
|
+
}, never, never, true, never>;
|
|
635
|
+
}
|
|
636
|
+
export { HX_BOTTOM_BAR_MAX_ITEMS };
|