@adia-ai/web-modules 0.8.42 → 0.8.44

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.
@@ -30,9 +30,9 @@
30
30
  * sidebar-resize — bubbles. detail: { name, width }
31
31
  *
32
32
  * The drag handle is conventional: a child `[data-sidebar-resize]` element
33
- * (`[data-resize]` still works deprecated, dual-read compat shim, removed
34
- * in 0.9.0: docs/ops/plan/plan-090-rename-wave.md). Authors may provide a
35
- * custom one, or omit (no resize affordance).
33
+ * (its deprecated pre-0.9.0 name was cut at the rename-wave W3, gh#1562:
34
+ * docs/ops/plan/plan-090-rename-wave.md). Authors may provide a custom one,
35
+ * or omit (no resize affordance).
36
36
  *
37
37
  * Backwards compat: <admin-shell> still recognizes the legacy
38
38
  * `<aside data-sidebar="leading">` shape via :is() selector. New
@@ -57,15 +57,10 @@ class AdminSidebar extends UIElement {
57
57
 
58
58
  static template = () => null;
59
59
 
60
- // FEEDBACK-17: elements already warned about a missing [data-resize]
60
+ // FEEDBACK-17: elements already warned about a missing [data-sidebar-resize]
61
61
  // handle — one-shot per element so re-renders stay quiet. GC-friendly.
62
62
  static #warnedNoHandle = new WeakSet();
63
63
 
64
- // Rename-wave compat (docs/ops/plan/plan-090-rename-wave.md W1): one-shot
65
- // deprecation warn per element when the legacy `[data-resize]` name is the
66
- // one that resolved the handle. Same GC-friendly WeakSet pattern as above.
67
- static #warnedOldResizeName = new WeakSet();
68
-
69
64
  // The width the sidebar had before being collapsed — used for restore.
70
65
  // Map keyed by sidebar name allows multiple sidebars on one host.
71
66
  #previousExpandedWidth = '';
@@ -173,22 +168,10 @@ class AdminSidebar extends UIElement {
173
168
  // ── Resize drag handle ──
174
169
 
175
170
  #setupResizeHandle() {
176
- // Rename-wave compat (plan-090 W1): `[data-sidebar-resize]` is the
177
- // current name; `[data-resize]` still dual-reads until the 0.9.0 cut
178
- // (W3), warning once per element when it's the name that resolved.
179
- let handle = this.querySelector(':scope > [data-sidebar-resize]');
180
- if (!handle) {
181
- handle = this.querySelector(':scope > [data-resize]');
182
- if (handle && !AdminSidebar.#warnedOldResizeName.has(this)) {
183
- AdminSidebar.#warnedOldResizeName.add(this);
184
- // eslint-disable-next-line no-console
185
- console.warn(
186
- '[admin-sidebar] `[data-resize]` is deprecated and removed in ' +
187
- '0.9.0 — rename the drag-handle child to `[data-sidebar-resize]`.',
188
- this,
189
- );
190
- }
191
- }
171
+ // Rename-wave cut (plan-090 W3, gh#1562): `[data-sidebar-resize]` is the
172
+ // only recognized handle name its deprecated pre-0.9.0 dual-read was
173
+ // removed at the cut.
174
+ const handle = this.querySelector(':scope > [data-sidebar-resize]');
192
175
  if (!handle) {
193
176
  // FEEDBACK-17: `resizable` opts in to drag-resize but relies on an
194
177
  // author-supplied `[data-sidebar-resize]` child. A silent return left
@@ -26,4 +26,6 @@ import { UIElement } from '../../../web-components/core/element.js';
26
26
  export class SimpleShell extends UIElement {
27
27
  /** Reflected — vertically centers content in viewport. */
28
28
  centered: boolean;
29
+ /** Reflected — drops the default max-width so content fills full viewport. */
30
+ fullBleed: boolean;
29
31
  }
@@ -40,6 +40,27 @@ export interface ThemePanelThemeChangeEventDetail {
40
40
  export type ThemePanelThemeChangeEvent = CustomEvent<ThemePanelThemeChangeEventDetail>;
41
41
 
42
42
  export class ThemePanel extends UIElement {
43
+ /** Reflected — mirrors the current --a-density value on the target
44
+ element. Stringified number.
45
+ */
46
+ activeDensity: string;
47
+ /** Reflected — mirrors the current --a-radius-k value on the target
48
+ element. Stringified number.
49
+ */
50
+ activeRadius: string;
51
+ /** Reflected — the active [scale] tier on the target element; empty
52
+ for the unscaled default (no [scale] attribute set).
53
+ */
54
+ activeScale: string;
55
+ /** Reflected — the resolved color-scheme (auto collapsed to a
56
+ concrete value). Either "light" or "dark".
57
+ */
58
+ activeScheme: string;
59
+ /** Reflected — the currently selected theme slug. Empty string when
60
+ unset (default theme). Read-only externally; use .apply({theme})
61
+ to change.
62
+ */
63
+ activeTheme: string;
43
64
  /** Renders the density + radius slider block. Sliders bind to
44
65
  --a-density and --a-radius-k on the target element.
45
66
  */
@@ -70,6 +91,16 @@ matchMedia listener; user clicks on the scheme toggle promote to
70
91
  an explicit light or dark choice.
71
92
  */
72
93
  scheme: 'light' | 'dark' | 'auto';
94
+ /** Renders an integrated light/dark <segmented-ui> at the top of the
95
+ panel. When absent, the panel omits scheme entirely — consumers
96
+ can still drive scheme via the .apply({scheme}) public method.
97
+ */
98
+ schemeToggle: boolean;
99
+ /** Namespace for localStorage keys when [persist] is set. Five keys
100
+ are written: {prefix}theme, {prefix}scheme, {prefix}density,
101
+ {prefix}radius, {prefix}scale.
102
+ */
103
+ storagePrefix: string;
73
104
  /** CSS selector for the element that receives [theme] and
74
105
  --a-density / --a-radius-k writes. Defaults to :root (the
75
106
  <html> element). Scoped targets are useful for preview-pane