@akcelik/strct 5.0.0 → 5.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akcelik/strct",
3
- "version": "5.0.0",
3
+ "version": "5.0.2",
4
4
  "description": "UIStruct — a standalone Angular component library with a tokenised, multi-palette theme system, built for datacenter / infrastructure management UIs.",
5
5
  "author": "Serkan Akcelik <serkan.akcelik@gmail.com>",
6
6
  "license": "MIT",
package/styles/_base.scss CHANGED
@@ -170,3 +170,40 @@ kbd,
170
170
  outline: 2px solid var(--acc50);
171
171
  outline-offset: -1px;
172
172
  }
173
+
174
+ // Drag states for `[strctReorderItem]`. The classes were bound from the start
175
+ // and nothing drew them, so a drag showed no feedback at all. Tokens only, and
176
+ // the lifted item uses the raised shadow the rest of the library uses.
177
+ /* The affordance itself: a row that can be dragged says so, and a row that
178
+ delegates to a handle points at the handle instead. A display-only list
179
+ (reorderDisabled -> draggable="false") gets neither. */
180
+ .strct-reorder__handle {
181
+ cursor: grab;
182
+ }
183
+ [strctReorderItem][draggable='true']:not(:has(.strct-reorder__handle)) {
184
+ cursor: grab;
185
+ }
186
+ /* Both states are scoped through the item's own attribute, so a consumer's
187
+ base rule for the row (.ro-item { cursor: grab }) does not swallow a state
188
+ that lasts only while the pointer is down. A consumer who styles the state
189
+ itself still wins: their .row.strct-reorder--dragging has the same weight
190
+ and comes later. */
191
+ [strctReorderItem][draggable='true'].strct-reorder--dragging {
192
+ opacity: 0.6;
193
+ box-shadow: var(--shh);
194
+ cursor: grabbing;
195
+ }
196
+ [strctReorderItem][draggable='true'].strct-reorder--over {
197
+ box-shadow: inset 0 0 0 2px var(--acc50);
198
+ }
199
+ @media (prefers-reduced-motion: no-preference) {
200
+ .strct-reorder--over {
201
+ transition: box-shadow 0.12s ease;
202
+ }
203
+ }
204
+
205
+ // A long id in a narrow card wraps instead of overflowing it.
206
+ .strct-code-inline--wrap {
207
+ white-space: normal;
208
+ overflow-wrap: anywhere;
209
+ }
@@ -2440,11 +2440,25 @@ declare class StrctCode {
2440
2440
  declare class StrctCodeInline {
2441
2441
  /** Append a copy button that copies this element's text. */
2442
2442
  readonly copyable: _angular_core.InputSignalWithTransform<boolean, unknown>;
2443
+ /**
2444
+ * What the copy button puts on the clipboard, when that is not simply what
2445
+ * the element says — a span showing a shortened thumbprint copies the whole
2446
+ * one. Empty follows the element's own text, including later changes.
2447
+ */
2448
+ readonly value: _angular_core.InputSignal<string>;
2449
+ /** Long ids wrap instead of overflowing a narrow card. */
2450
+ readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
2443
2451
  private readonly host;
2444
2452
  private readonly vcr;
2453
+ private readonly destroyRef;
2454
+ /** The button, once it exists; and a counter the observer bumps. */
2455
+ private readonly copyRef;
2456
+ private readonly revision;
2445
2457
  constructor();
2458
+ /** What the element says, without the copy button's own content. */
2459
+ private ownText;
2446
2460
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctCodeInline, never>;
2447
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<StrctCodeInline, "[strctCode]", never, { "copyable": { "alias": "copyable"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
2461
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<StrctCodeInline, "[strctCode]", never, { "copyable": { "alias": "copyable"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
2448
2462
  }
2449
2463
 
2450
2464
  /** One active filter chip in a {@link StrctFilterBar}. */
@@ -3611,6 +3625,11 @@ declare class StrctDescriptionList {
3611
3625
  /**
3612
3626
  * One projected `label → value` row inside a `<strct-description-list>`. The
3613
3627
  * value is whatever you project, so it can host a badge, icon or formatted text.
3628
+ *
3629
+ * Use **`<div strctDesc>`** inside a list: `<dl>` allows only `dt` / `dd` pairs
3630
+ * or `<div>` wrappers as children, so a `<strct-desc>` element between them is
3631
+ * invalid and assistive tech loses the pairing. `<strct-desc>` still works for a
3632
+ * row rendered outside a list.
3614
3633
  */
3615
3634
  declare class StrctDesc {
3616
3635
  /** The row's label. */
@@ -3628,7 +3647,7 @@ declare class StrctDesc {
3628
3647
  /** A quiet second line under the value — "last seen 12 s ago". */
3629
3648
  readonly note: _angular_core.InputSignal<string>;
3630
3649
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctDesc, never>;
3631
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctDesc, "strct-desc", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "mono": { "alias": "mono"; "required": false; "isSignal": true; }; "muted": { "alias": "muted"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "statusLabel": { "alias": "statusLabel"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "note": { "alias": "note"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
3650
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctDesc, "strct-desc, div[strctDesc]", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "mono": { "alias": "mono"; "required": false; "isSignal": true; }; "muted": { "alias": "muted"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "statusLabel": { "alias": "statusLabel"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "note": { "alias": "note"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
3632
3651
  }
3633
3652
 
3634
3653
  /** Column definition for the table. */
@@ -6472,6 +6491,7 @@ declare class StrctWindow {
6472
6491
  protected readonly L: _angular_core.Signal<StrctWindowLabels>;
6473
6492
  private readonly service;
6474
6493
  private readonly doc;
6494
+ private readonly zone;
6475
6495
  private readonly host;
6476
6496
  private readonly zOffset;
6477
6497
  protected readonly zIndex: _angular_core.Signal<string>;
@@ -6481,6 +6501,8 @@ declare class StrctWindow {
6481
6501
  private readonly fallback;
6482
6502
  protected readonly rect: _angular_core.Signal<StrctWindowBounds>;
6483
6503
  private restoreTo;
6504
+ /** A click beside the window, when `closeOnOutside` asks for one. */
6505
+ private readonly onOutside;
6484
6506
  constructor();
6485
6507
  /** Raise this window above the others when it is clicked. */
6486
6508
  protected focusWindow(): void;
@@ -6558,6 +6580,7 @@ declare class StrctChatThread {
6558
6580
  private readonly host;
6559
6581
  /** False once the reader scrolls away from the end; true again at the end. */
6560
6582
  private readonly atEnd;
6583
+ private readonly destroyRef;
6561
6584
  constructor();
6562
6585
  protected onScroll(): void;
6563
6586
  /** Jump to the newest message. */