@adia-ai/web-modules 0.6.12 → 0.6.14

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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog — @adia-ai/web-modules
2
2
 
3
+ ## [0.6.14] — 2026-05-21
4
+
5
+ ### Fixed
6
+ - **`<admin-page-header>` — distinct background + drop-shadow.** Page-header now uses `var(--page-content-header-bg)` (= `--a-canvas-2`, ΔL=0.08 above body canvas) with `var(--a-shadow-sm)` instead of inheriting the body canvas. The previous behavior used `var(--page-content-bg)` (same as body), which left the band visually flush with the page body — a regression observed in dark mode on the claims-ui-v3 cold-start dogfood at 1572px viewport where KPI cards rendered visually attached to the page-header content. Two tokens shift: `--page-content-header-bg: var(--a-canvas-2)` (new, in `admin-shell.tokens.css`) and `box-shadow: var(--a-shadow-sm)` (new, in `admin-shell.bespoke.css` at `admin-page > admin-page-header`). The intent is preserve-not-regress visual hierarchy: page-header band reads as elevated chrome over the body's content surface in both light and dark modes.
7
+
8
+ ### Verification
9
+ - `verify:traits` 56/56 clean.
10
+ - `components.mjs --verify` clean (142 files up-to-date).
11
+ - `smoke:engines` green; `smoke:register-engine` 11/11.
12
+ - `eval:diff --engine zettel` cov=49% / avg=90 (baseline-identical).
13
+ - Browser-verified at `/site/examples/admin-dashboard`: page-header bg measures `oklch(0.23 0.01 225)` (canvas-2) in dark mode, with `var(--a-shadow-sm)` rendering below the band; KPI grid sits 40px below the page-header bottom (no overlap).
14
+
15
+ ## [0.6.13] — 2026-05-20
16
+
17
+ ### Changed
18
+ - **`<admin-shell>` — default `mode` is now `"rounded borderless"` (was flat-bordered).** A bare `<admin-shell>` with no `mode` attribute auto-promotes to `mode="rounded borderless"` in `connectedCallback` — the modern soft-chrome visual baseline becomes opt-out, not opt-in. Any author-supplied `mode` attribute (including the empty string `mode=""` for the flat legacy chrome) is respected verbatim: the default fires only when no `mode` attribute is present on the tag at all. The behavior change is scoped to consumers emitting a bare `<admin-shell>` — every in-repo composition surface and every audited external consumer except claims-ui-v3 already set `mode="rounded borderless"` explicitly. Opt-out matrix: `<admin-shell>` → `rounded borderless`; `<admin-shell mode="">` → `""`; `<admin-shell mode="rounded">` → `rounded`. The `props.mode` schema also drops its (incorrect) `enum: ["", rounded, borderless]` constraint — `mode` is a space-separated token set consumed by CSS `mode~="<token>"` attribute selectors, so the `.d.ts` `mode` type widens from `'' | 'rounded' | 'borderless'` to `string` (TS consumers can now assign `el.mode = "rounded borderless"` without a cast).
19
+
3
20
  ## [0.6.12] — 2026-05-20
4
21
 
5
22
  ### Cleanup (no in-tree or audited external consumer impact)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adia-ai/web-modules",
3
- "version": "0.6.12",
3
+ "version": "0.6.14",
4
4
  "description": "AdiaUI composite custom elements \u2014 shell, chat, editor, runtime clusters built from @adia-ai/web-components primitives. Subpath exports per cluster.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -17,14 +17,9 @@
17
17
  "const": "AppShell"
18
18
  },
19
19
  "mode": {
20
- "description": "Layout variant — default is bordered surface; rounded softens edges; borderless removes the outer chrome.",
20
+ "description": "Layout variant — space-separated token set. Recognized tokens:\n rounded softens content-surface edges (border-radius from --page-content-radius)\n borderless removes outer chrome borders (content dividers persist)\nThe CSS uses `mode~=\"<token>\"` attribute selectors, so multiple\ntokens combine additively (\"rounded borderless\" = both).\n\nDefault since v0.6.13: \"rounded borderless\". A bare `<admin-shell>`\nwith no `mode` attribute auto-promotes to this pair on connect.\nAuthor-supplied `mode` attributes (including the empty string\n`mode=\"\"` for flat bordered chrome) are respected verbatim.\n",
21
21
  "type": "string",
22
- "enum": [
23
- "",
24
- "rounded",
25
- "borderless"
26
- ],
27
- "default": ""
22
+ "default": "rounded borderless"
28
23
  }
29
24
  },
30
25
  "required": [
@@ -35,8 +35,18 @@ export interface AdminShellSidebarToggleEventDetail {
35
35
  export type AdminShellSidebarToggleEvent = CustomEvent<AdminShellSidebarToggleEventDetail>;
36
36
 
37
37
  export class AdminShell extends UIElement {
38
- /** Layout variant — default is bordered surface; rounded softens edges; borderless removes the outer chrome. */
39
- mode: '' | 'rounded' | 'borderless';
38
+ /** Layout variant — space-separated token set. Recognized tokens:
39
+ rounded — softens content-surface edges (border-radius from --page-content-radius)
40
+ borderless — removes outer chrome borders (content dividers persist)
41
+ The CSS uses `mode~="<token>"` attribute selectors, so multiple
42
+ tokens combine additively ("rounded borderless" = both).
43
+
44
+ Default since v0.6.13: "rounded borderless". A bare `<admin-shell>`
45
+ with no `mode` attribute auto-promotes to this pair on connect.
46
+ Author-supplied `mode` attributes (including the empty string
47
+ `mode=""` for flat bordered chrome) are respected verbatim.
48
+ */
49
+ mode: string;
40
50
 
41
51
  addEventListener<K extends keyof HTMLElementEventMap>(
42
52
  type: K,
@@ -17,7 +17,12 @@
17
17
  * compat reads; see git history for the legacy paths.
18
18
  *
19
19
  * Host responsibilities (the only behavior that stays here):
20
- * 1. [mode] reflection — "rounded", "borderless", or both
20
+ * 1. [mode] reflection — "rounded", "borderless", or both. **Default
21
+ * since v0.6.13: "rounded borderless"**. Authors who want the flat
22
+ * legacy chrome opt out via an explicit `mode=""` or `mode="rounded"`
23
+ * (etc.); any author-supplied `mode` attribute (including the empty
24
+ * string) is respected verbatim, so the default only fires when
25
+ * no `mode` attribute is present at all on the tag.
21
26
  * 2. [data-sidebar-toggle="<name>"] click forwarding to the matching
22
27
  * <admin-sidebar>'s .toggle() public method
23
28
  * 3. [data-command-trigger] click forwarding to <admin-command>.show()
@@ -26,6 +31,8 @@
26
31
 
27
32
  import { UIElement } from '../../../web-components/core/element.js';
28
33
 
34
+ const DEFAULT_MODE = 'rounded borderless';
35
+
29
36
  class AdminShell extends UIElement {
30
37
  static properties = {
31
38
  mode: { type: String, default: '', reflect: true },
@@ -34,6 +41,11 @@ class AdminShell extends UIElement {
34
41
  static template = () => null;
35
42
 
36
43
  connected() {
44
+ // Apply the v0.6.13 default mode if (and only if) the author did
45
+ // not supply a `mode` attribute on the tag. `hasAttribute` returns
46
+ // true for `mode=""` so explicit empty-string authoring (the flat
47
+ // legacy chrome opt-out) is preserved.
48
+ if (!this.hasAttribute('mode')) this.mode = DEFAULT_MODE;
37
49
  this.#wireToggleButtons();
38
50
  this.#wireCommandTriggers();
39
51
  }
@@ -13,10 +13,19 @@ description: |
13
13
  props:
14
14
  mode:
15
15
  type: string
16
- default: ""
17
- enum: ["", rounded, borderless]
16
+ default: "rounded borderless"
18
17
  reflect: true
19
- description: Layout variant — default is bordered surface; rounded softens edges; borderless removes the outer chrome.
18
+ description: |
19
+ Layout variant — space-separated token set. Recognized tokens:
20
+ rounded — softens content-surface edges (border-radius from --page-content-radius)
21
+ borderless — removes outer chrome borders (content dividers persist)
22
+ The CSS uses `mode~="<token>"` attribute selectors, so multiple
23
+ tokens combine additively ("rounded borderless" = both).
24
+
25
+ Default since v0.6.13: "rounded borderless". A bare `<admin-shell>`
26
+ with no `mode` attribute auto-promotes to this pair on connect.
27
+ Author-supplied `mode` attributes (including the empty string
28
+ `mode=""` for flat bordered chrome) are respected verbatim.
20
29
 
21
30
  events:
22
31
  sidebar-toggle:
@@ -82,13 +82,21 @@ admin-content > admin-page {
82
82
  container-name: page-content;
83
83
  }
84
84
 
85
- /* ── admin-page-header ≡ <[data-content-header]> sticky band ── */
85
+ /* ── admin-page-header ≡ <[data-content-header]> sticky band ──
86
+ Background uses --page-content-header-bg (defaults to --a-canvas-1, one
87
+ step raised from --page-content-bg / --a-canvas-0) so the sticky band
88
+ visually distinguishes itself from the content surface scrolling under
89
+ it. A subtle drop shadow below the band reinforces "chrome floating
90
+ above content" on both light and dark themes — the canvas-step alone
91
+ reads too quietly in dark mode (ΔL ≈ 0.04 on the OKLCH scale). The
92
+ border-bottom remains for crisp edge separation. */
86
93
  admin-page > admin-page-header {
87
94
  position: sticky;
88
95
  top: 0;
89
96
  z-index: 1;
90
- background: var(--page-content-bg);
97
+ background: var(--page-content-header-bg);
91
98
  border-bottom: var(--page-content-border);
99
+ box-shadow: var(--a-shadow-sm);
92
100
  flex-shrink: 0;
93
101
  }
94
102
 
@@ -38,6 +38,7 @@
38
38
 
39
39
  /* Content area — scroll region inside main */
40
40
  --page-content-bg: var(--a-canvas-0); /* content surface (lighter than chrome) */
41
+ --page-content-header-bg: var(--a-canvas-2); /* sticky page-header band — stronger raised step (ΔL ≈ 0.08 from content) so the band reads clearly on both light and dark themes. Pre-v0.6.14 (--a-canvas-1, ΔL ≈ 0.04) was too subtle in dark mode. */
41
42
  --page-content-radius: var(--a-radius-lg); /* used by "rounded" mode */
42
43
  --page-content-inset: var(--a-space-10); /* padding for header/body/footer */
43
44
  --page-content-max-width: 1540px; /* max-width for content children */