@gravionlabs/helix-desktop 22.5.1 → 22.7.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.
@@ -110,9 +110,13 @@ export interface HxSidebarState {
110
110
  * ```
111
111
  *
112
112
  * There is one sidebar: the app puts the view of `activeId` into it. `selectView` collapses the sidebar
113
- * when the active view is selected again and expands it for another one. The splitter is a
113
+ * when the active view is selected again and expands it for another one; `showView` only shows a view. The splitter is a
114
114
  * `role="separator"`: drag it, or use the arrow keys (Shift for a larger step), Home and End. The shell
115
115
  * has no tab logic: the unslotted content is the app's tab layout.
116
+ *
117
+ * `slot="bottom"` is a panel below the content (not under the activity bar), for an output panel or the
118
+ * panel of an editor. It shows when `bottomOpen` is true; its horizontal splitter resizes `bottomHeight`
119
+ * with the pointer or the Up and Down keys (Shift for a larger step), Home and End.
116
120
  */
117
121
  export declare class HxAppShell {
118
122
  /** The sidebar width in px (two-way); it is kept between `minWidth` and `maxWidth`. */
@@ -128,24 +132,49 @@ export declare class HxAppShell {
128
132
  readonly resizerLabel: import("@angular/core").InputSignal<string>;
129
133
  /** Set to disable the pointer and keyboard resize. */
130
134
  readonly fixedWidth: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
135
+ /** The height in px of the bottom panel (two-way); it is kept between `minBottomHeight` and `maxBottomHeight`. */
136
+ readonly bottomHeight: import("@angular/core").ModelSignal<number>;
137
+ /** Whether the bottom panel (`slot="bottom"`) is open (two-way); closed hides the slot and its splitter. */
138
+ readonly bottomOpen: import("@angular/core").ModelSignal<boolean>;
139
+ readonly minBottomHeight: import("@angular/core").InputSignalWithTransform<number, unknown>;
140
+ readonly maxBottomHeight: import("@angular/core").InputSignalWithTransform<number, unknown>;
141
+ readonly bottomResizerLabel: import("@angular/core").InputSignal<string>;
131
142
  /** Emits the width and the collapsed state whenever either changes through the shell. */
132
143
  readonly sidebarChange: import("@angular/core").OutputEmitterRef<HxSidebarState>;
133
144
  protected readonly width: import("@angular/core").Signal<number>;
145
+ protected readonly height: import("@angular/core").Signal<number>;
134
146
  private dragStartX;
135
147
  private dragStartWidth;
136
148
  private dragging;
149
+ private dragStartY;
150
+ private dragStartHeight;
151
+ private draggingBottom;
137
152
  /**
138
153
  * Select a sidebar view: the active one collapses the sidebar (when open), any other shows it and
139
154
  * expands the sidebar.
140
155
  */
141
156
  selectView(id: string): void;
157
+ /**
158
+ * Show a sidebar view without toggling: activates it and expands the sidebar, and never collapses it.
159
+ * For links to a view from outside the activity bar (status bar, notifications, commands).
160
+ */
161
+ showView(id: string): void;
142
162
  /** Set the width, clamped to the minimum and the maximum. */
143
163
  resizeTo(width: number): void;
164
+ /** Open the bottom panel when it is closed and close it when it is open. */
165
+ toggleBottom(): void;
166
+ /** Set the height of the bottom panel, clamped to the minimum and the maximum. */
167
+ resizeBottomTo(height: number): void;
168
+ protected onBottomPointerDown(event: PointerEvent): void;
169
+ protected onBottomPointerMove(event: PointerEvent): void;
170
+ protected onBottomPointerEnd(event: PointerEvent): void;
171
+ protected onBottomKeydown(event: KeyboardEvent): void;
144
172
  protected onPointerDown(event: PointerEvent): void;
145
173
  protected onPointerMove(event: PointerEvent): void;
146
174
  protected onPointerEnd(event: PointerEvent): void;
147
175
  protected onKeydown(event: KeyboardEvent): void;
148
176
  private clamp;
177
+ private clampHeight;
149
178
  private report;
150
179
  static ɵfac: i0.ɵɵFactoryDeclaration<HxAppShell, never>;
151
180
  static ɵcmp: i0.ɵɵComponentDeclaration<HxAppShell, "hx-app-shell", never, {
@@ -189,12 +218,39 @@ export declare class HxAppShell {
189
218
  "required": false;
190
219
  "isSignal": true;
191
220
  };
221
+ "bottomHeight": {
222
+ "alias": "bottomHeight";
223
+ "required": false;
224
+ "isSignal": true;
225
+ };
226
+ "bottomOpen": {
227
+ "alias": "bottomOpen";
228
+ "required": false;
229
+ "isSignal": true;
230
+ };
231
+ "minBottomHeight": {
232
+ "alias": "minBottomHeight";
233
+ "required": false;
234
+ "isSignal": true;
235
+ };
236
+ "maxBottomHeight": {
237
+ "alias": "maxBottomHeight";
238
+ "required": false;
239
+ "isSignal": true;
240
+ };
241
+ "bottomResizerLabel": {
242
+ "alias": "bottomResizerLabel";
243
+ "required": false;
244
+ "isSignal": true;
245
+ };
192
246
  }, {
193
247
  "sidebarWidth": "sidebarWidthChange";
194
248
  "collapsed": "collapsedChange";
195
249
  "activeId": "activeIdChange";
250
+ "bottomHeight": "bottomHeightChange";
251
+ "bottomOpen": "bottomOpenChange";
196
252
  "sidebarChange": "sidebarChange";
197
- }, never, ["[slot=toolbar]", "[slot=activity]", "[slot=sidebar]", "*", "[slot=panel]", "[slot=status]"], true, never>;
253
+ }, never, ["[slot=toolbar]", "[slot=activity]", "[slot=sidebar]", "*", "[slot=bottom]", "[slot=panel]", "[slot=status]"], true, never>;
198
254
  }
199
255
  /**
200
256
  * The slim bar (26 px) at the top of a desktop app: a start, a centre (title) and an end slot.
@@ -365,6 +421,18 @@ export declare function setHxPlatform(platform: HxPlatform, root?: HTMLElement):
365
421
  * </hx-status-bar>
366
422
  * ```
367
423
  *
424
+ * A conditional group of items needs one root node that carries the slot, because content projection
425
+ * selects by attribute and an `@if` with several root nodes projects nothing (NG8011):
426
+ *
427
+ * ```html
428
+ * @if (active()) {
429
+ * <ng-container ngProjectAs="[slot=end]">
430
+ * <hx-status-item>Input</hx-status-item>
431
+ * <hx-status-item>119×46</hx-status-item>
432
+ * </ng-container>
433
+ * }
434
+ * ```
435
+ *
368
436
  * Project items with `slot="start"` or `slot="end"`. The bar has no role of its own: only an item that
369
437
  * announces a change sets `role="status"` (see `HxStatusItem`).
370
438
  */
@@ -391,6 +459,8 @@ export type HxStatusTone = 'neutral' | 'warn' | 'error' | 'accent';
391
459
  * ```
392
460
  *
393
461
  * - `kind`: `'text'` (default) or `'button'`.
462
+ * - `pressed`: emits when a button item is activated (click, Enter or Space). Not for a disabled item, a text
463
+ * item or a click inside the popover.
394
464
  * - `announce`: sets `role="status"` on the item, for a value that changes while the user works (a sync
395
465
  * state). The bar itself is not a live region.
396
466
  * - An element with `hxStatusPopover` inside the item is a popover above the bar, shown while
@@ -410,6 +480,8 @@ export declare class HxStatusItem {
410
480
  readonly announce: import("@angular/core").InputSignal<boolean>;
411
481
  /** Whether the popover is open. */
412
482
  readonly popoverOpen: import("@angular/core").ModelSignal<boolean>;
483
+ /** Emits when a button item is activated by click, Enter or Space. */
484
+ readonly pressed: import("@angular/core").OutputEmitterRef<void>;
413
485
  private readonly popover;
414
486
  protected get hasPopover(): boolean;
415
487
  protected onButtonClick(): void;
@@ -454,6 +526,7 @@ export declare class HxStatusItem {
454
526
  };
455
527
  }, {
456
528
  "popoverOpen": "popoverOpenChange";
529
+ "pressed": "pressed";
457
530
  }, ["popover"], ["*", "[hxStatusPopover]"], true, never>;
458
531
  }
459
532
  /** The app version with an optional channel badge (`RC`). */