@adia-ai/web-modules 0.6.20 → 0.6.21

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,19 @@
1
1
  # Changelog — @adia-ai/web-modules
2
2
 
3
+ ## [0.6.21] — 2026-05-21
4
+
5
+ ### Changed — `<admin-entity-item>` row insets aligned to shared select / nav-item-ui row convention
6
+
7
+ - **`--entity-item-gap`: `--a-space-2` → `--a-space-1`** (matches `--select-trigger-gap` + `--nav-item-row-gap`) and **NEW `--entity-item-px: --a-ui-px` token** with `padding: 0 var(--entity-item-px)` on the host rule (matches `--select-px` + `--nav-item-row-px`). Identity rows now read as the same shared row vocabulary used inside `<select-ui>` triggers and `<nav-item-ui>` rows — visibly tighter gap between icon / label / badge, plus consistent inline padding. Both tunable: a consumer who finds the inset double-pads inside a particular parent context can set `--entity-item-px: 0` on a per-use basis. Files: `css/admin-shell.entity-item.css`.
8
+
9
+ ### Fixed — `admin-shell` no longer emits a spurious slot-contract `console.warn`
10
+
11
+ - **The one-shot `console.warn` for `<admin-topbar>` / `<admin-statusbar>` missing `slot="header"` / `slot="footer"` (shipped in 0.6.20, FEEDBACK-37) is reverted — it was a false positive.** `<admin-content>` and `<admin-sidebar>` are CSS-only light-DOM elements with no shadow root, so a `slot=` attribute is inert (no projection), and no CSS selector targets `[slot="header"]` / `[slot="footer"]` for them — the topbar/statusbar are positioned purely by tag + DOM order (`admin-content > admin-topbar { … }`). The bars render identically with or without the slot; the warn fired on correct markup with a message that was factually wrong ("renders in the default body slot"). FEEDBACK-37's premise — that the slot is load-bearing — did not hold. Removed: `admin-shell.js` `#checkSlotContracts()` + the `MUST carry slot` `a2ui.rules` in `admin-topbar.yaml` / `admin-statusbar.yaml`.
12
+
13
+ ### Fixed — page-header title row no longer stacks under the `?chunks` dev overlay
14
+
15
+ - **The `<admin-page-header>` title row (`h1` left, actions right) used a `:first-child` selector that broke when the `?chunks=1` dev overlay was active.** `site/dev-chunks.js` prepends a `<span data-chunk-marker>` into every `[data-chunk]` element; on a page-header `<header data-chunk="…">` that span displaced the title `<div>` from `:first-child`, so the flex-row rule (`display: flex; justify-content: space-between`) stopped matching — the title and the action buttons stacked vertically instead of sharing a row. The selector is now `div:first-of-type`, which a prepended non-`<div>` sibling cannot displace. Production (overlay off) was unaffected; this fixes the chunks-on dev view. Files: `css/admin-shell.templates.css`.
16
+
3
17
  ## [0.6.20] — 2026-05-21
4
18
 
5
19
  ### Added — `<admin-entity-item>` shell identity-row primitive (FEEDBACK-38)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adia-ai/web-modules",
3
- "version": "0.6.20",
3
+ "version": "0.6.21",
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": {
@@ -40,10 +40,6 @@ class AdminShell extends UIElement {
40
40
 
41
41
  static template = () => null;
42
42
 
43
- // FEEDBACK-37: one-shot per-element warn for <admin-topbar>/<admin-statusbar>
44
- // mounted without their slot. WeakSet so it never pins the element from GC.
45
- static #warnedSlots = new WeakSet();
46
-
47
43
  connected() {
48
44
  // Apply the v0.6.13 default mode if (and only if) the author did
49
45
  // not supply a `mode` attribute on the tag. `hasAttribute` returns
@@ -52,7 +48,6 @@ class AdminShell extends UIElement {
52
48
  if (!this.hasAttribute('mode')) this.mode = DEFAULT_MODE;
53
49
  this.#wireToggleButtons();
54
50
  this.#wireCommandTriggers();
55
- this.#checkSlotContracts();
56
51
  }
57
52
 
58
53
  // No #disconnected — children own their own cleanup; the host registers
@@ -100,33 +95,6 @@ class AdminShell extends UIElement {
100
95
  if (item) nav.select(item);
101
96
  });
102
97
  }
103
-
104
- // ── 3. Slot-contract diagnostics (FEEDBACK-37) ──
105
- // <admin-topbar>/<admin-statusbar> are CSS-only — placed inside
106
- // <admin-sidebar>/<admin-content> without slot="header"/"footer" they
107
- // land in the default slot and render in the body column instead of the
108
- // chrome band, with no diagnostic. One-shot warn per misused element.
109
- // (admin-statusbar folded in — identical failure mode to admin-topbar.)
110
- #checkSlotContracts() {
111
- const want = { 'admin-topbar': 'header', 'admin-statusbar': 'footer' };
112
- for (const parent of this.querySelectorAll('admin-sidebar, admin-content')) {
113
- for (const child of parent.children) {
114
- const slot = want[child.localName];
115
- if (slot
116
- && child.getAttribute('slot') !== slot
117
- && !AdminShell.#warnedSlots.has(child)) {
118
- AdminShell.#warnedSlots.add(child);
119
- // eslint-disable-next-line no-console
120
- console.warn(
121
- `[admin-shell] <${child.localName}> inside <${parent.localName}> is missing ` +
122
- `slot="${slot}" — it renders in the default body slot instead of the chrome ` +
123
- `band. Add slot="${slot}". See ${child.localName}.yaml.`,
124
- child,
125
- );
126
- }
127
- }
128
- }
129
- }
130
98
  }
131
99
 
132
100
  customElements.define('admin-shell', AdminShell);
@@ -22,8 +22,13 @@
22
22
  ═══════════════════════════════════════════════════════════════ */
23
23
 
24
24
  admin-entity-item {
25
- /* ── tunable tokens ── */
26
- --entity-item-gap: var(--a-space-2);
25
+ /* ── tunable tokens ──
26
+ Gap + horizontal padding match <select-ui>'s trigger row and
27
+ <nav-item-ui>'s row (shared convention: --a-space-1 between
28
+ slots, --a-ui-px on each inline edge). Consumers can opt out
29
+ by setting --entity-item-px: 0 on a per-use basis. */
30
+ --entity-item-gap: var(--a-space-1);
31
+ --entity-item-px: var(--a-ui-px);
27
32
  --entity-item-icon-size: 1rem;
28
33
  --entity-item-icon-color: var(--a-fg-muted);
29
34
  --entity-item-avatar-size: 1.5rem;
@@ -31,6 +36,7 @@ admin-entity-item {
31
36
  display: inline-flex;
32
37
  align-items: center;
33
38
  gap: var(--entity-item-gap);
39
+ padding: 0 var(--entity-item-px);
34
40
  min-width: 0;
35
41
  overflow: hidden;
36
42
  }
@@ -83,8 +83,14 @@ admin-page-header > :is(header, header-ui)[data-compact] {
83
83
  padding-block: var(--page-header-px);
84
84
  }
85
85
 
86
- /* Title row: h1 left, actions right */
87
- admin-page-header > :is(header, header-ui) > div:first-child {
86
+ /* Title row: h1 left, actions right.
87
+ `:first-of-type` (not `:first-child`) so the row still matches when a
88
+ non-<div> element is prepended ahead of it — e.g. the
89
+ `<span data-chunk-marker>` the `?chunks` dev overlay (site/dev-chunks.js)
90
+ injects as the first child of every `[data-chunk]` element. With
91
+ `:first-child` the prepended span won the match and the title + actions
92
+ stacked instead of sitting on one row. */
93
+ admin-page-header > :is(header, header-ui) > div:first-of-type {
88
94
  display: flex;
89
95
  align-items: center;
90
96
  justify-content: space-between;
@@ -50,12 +50,6 @@ a2ui:
50
50
  admin-statusbar replaces <footer-ui> at shell-tier. Same slot
51
51
  vocabulary as <admin-topbar>; visual treatment differs (the
52
52
  shell css applies a top-border instead of bottom).
53
- - >-
54
- When placed inside <admin-sidebar> or <admin-content>, admin-statusbar
55
- MUST carry slot="footer". Without it the statusbar lands in the
56
- default body slot instead of the chrome footer band. Canonical:
57
- <admin-statusbar slot="footer">…</admin-statusbar>. admin-shell logs
58
- a one-shot console.warn when the slot is missing.
59
53
  - >-
60
54
  For a user-identity row (avatar + name + role badge), slot a single
61
55
  <admin-entity-item slot="heading"> rather than separate slot="icon" +
@@ -56,12 +56,6 @@ a2ui:
56
56
  admin-topbar replaces <header-ui> at shell-tier — use it for
57
57
  chrome bars inside admin-shell, admin-content, admin-sidebar.
58
58
  Use <header-ui> for primitive containers (Card / Drawer / Modal).
59
- - >-
60
- When placed inside <admin-sidebar> or <admin-content>, admin-topbar
61
- MUST carry slot="header". Without it the topbar lands in the default
62
- body slot and renders below the content instead of as the chrome
63
- header band. Canonical: <admin-topbar slot="header">…</admin-topbar>.
64
- admin-shell logs a one-shot console.warn when the slot is missing.
65
59
  - >-
66
60
  For an icon + label (+ optional badge) identity row — workspace or
67
61
  product identity — slot a single <admin-entity-item slot="heading">