@adia-ai/web-modules 0.8.25 → 0.8.26

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/index.js CHANGED
@@ -20,3 +20,4 @@ export * from './dashboard/index.js';
20
20
  export * from './feedback/index.js';
21
21
  export * from './billing/index.js';
22
22
  export * from './settings/index.js';
23
+ export * from './agent-admin/index.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adia-ai/web-modules",
3
- "version": "0.8.25",
3
+ "version": "0.8.26",
4
4
  "description": "AdiaUI composite custom elements — shell, chat, editor, runtime clusters built from @adia-ai/web-components primitives. Subpath exports per cluster.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -217,6 +217,20 @@
217
217
  "types": "./css-module.d.ts",
218
218
  "default": "./form/*/*.css"
219
219
  },
220
+ "./agent-admin": {
221
+ "types": "./agent-admin/index.d.ts",
222
+ "import": "./agent-admin/index.js",
223
+ "default": "./agent-admin/index.js"
224
+ },
225
+ "./agent-admin/*": {
226
+ "types": "./agent-admin/*/*.d.ts",
227
+ "import": "./agent-admin/*/*.js",
228
+ "default": "./agent-admin/*/*.js"
229
+ },
230
+ "./agent-admin/*.css": {
231
+ "types": "./css-module.d.ts",
232
+ "default": "./agent-admin/*/*.css"
233
+ },
220
234
  "./package.json": "./package.json"
221
235
  },
222
236
  "files": [
@@ -253,6 +267,10 @@
253
267
  "!form/**/*.examples.html",
254
268
  "!form/**/*.examples.js",
255
269
  "!form/**/*.html",
270
+ "agent-admin/",
271
+ "!agent-admin/**/*.examples.html",
272
+ "!agent-admin/**/*.examples.js",
273
+ "!agent-admin/**/*.html",
256
274
  "!**/*.test.js",
257
275
  "index.js",
258
276
  "css-module.d.ts",
@@ -267,12 +285,15 @@
267
285
  "./chat/**/*.js",
268
286
  "./editor/**/*.js",
269
287
  "./runtime/**/*.js",
270
- "./theme/**/*.js"
288
+ "./theme/**/*.js",
289
+ "./agent-admin/**/*.js"
271
290
  ],
272
291
  "peerDependencies": {
273
- "@adia-ai/web-components": "0.8.25",
274
- "@adia-ai/a2ui-runtime": "0.8.25",
275
- "@adia-ai/llm": "0.8.25"
292
+ "@adia-ai/web-components": "0.8.26",
293
+ "@adia-ai/a2ui-runtime": "0.8.26",
294
+ "@adia-ai/llm": "0.8.26",
295
+ "@adia-ai/agent": "0.8.26",
296
+ "@adia-ai/persona": "0.8.26"
276
297
  },
277
298
  "publishConfig": {
278
299
  "access": "public",
@@ -439,22 +439,19 @@ class ThemePanel extends UIElement {
439
439
  }
440
440
  // Apply the theme (which may write [theme] on target)
441
441
  this.#apply({ theme: slug }, 'theme');
442
- // Then re-read computed values into sliders on next frame, so the
443
- // theme's [theme] block has taken effect.
444
- const sync = () => {
445
- const cs = getComputedStyle(target);
446
- const density = parseFloat(cs.getPropertyValue('--a-density')) || 1;
447
- const radius = parseFloat(cs.getPropertyValue('--a-radius-k')) || 1;
448
- if (this.#densityEl) this.#densityEl.value = density;
449
- if (this.#radiusEl) this.#radiusEl.value = radius;
450
- this.activeDensity = String(density);
451
- this.activeRadius = String(radius);
452
- };
453
- if (typeof requestAnimationFrame === 'function') {
454
- requestAnimationFrame(sync);
455
- } else {
456
- sync();
457
- }
442
+ // The density/radius overrides were just cleared above, so the panel
443
+ // holds no override same "no override" state reset() and the
444
+ // "default" preset represent by showing 1×/1×, regardless of what the
445
+ // theme's own [theme] block declares for --a-density/--a-radius-k.
446
+ // The sliders track the panel's OWN applied state (write-only target,
447
+ // read-only-from-state display), never a getComputedStyle round-trip
448
+ // off the target — that read was timing-sensitive (needed a
449
+ // requestAnimationFrame hedge) and could lag or misread scoped
450
+ // overrides (gh#578).
451
+ if (this.#densityEl) this.#densityEl.value = 1;
452
+ if (this.#radiusEl) this.#radiusEl.value = 1;
453
+ this.activeDensity = '';
454
+ this.activeRadius = '';
458
455
  }
459
456
 
460
457
  #onPresetClick(name) {
@@ -615,9 +612,7 @@ class ThemePanel extends UIElement {
615
612
  this.activeDensity = String(density);
616
613
  if (this.#densityEl) this.#densityEl.value = density;
617
614
  } else if (this.#densityEl) {
618
- // Read computed from target
619
- const cs = getComputedStyle(target);
620
- const d = parseFloat(cs.getPropertyValue('--a-density')) || 1;
615
+ const d = this.#readInitialShape(target, '--a-density');
621
616
  this.#densityEl.value = d;
622
617
  this.activeDensity = String(d);
623
618
  }
@@ -627,8 +622,7 @@ class ThemePanel extends UIElement {
627
622
  this.activeRadius = String(radius);
628
623
  if (this.#radiusEl) this.#radiusEl.value = radius;
629
624
  } else if (this.#radiusEl) {
630
- const cs = getComputedStyle(target);
631
- const r = parseFloat(cs.getPropertyValue('--a-radius-k')) || 1;
625
+ const r = this.#readInitialShape(target, '--a-radius-k');
632
626
  this.#radiusEl.value = r;
633
627
  this.activeRadius = String(r);
634
628
  }
@@ -642,6 +636,22 @@ class ThemePanel extends UIElement {
642
636
  }
643
637
  }
644
638
 
639
+ // Initial-connect ONLY (#initState, no persisted value): the panel has no
640
+ // record of its own yet — [theme] may have been author-set directly in
641
+ // markup, outside any theme-panel write, so there's no this.activeDensity/
642
+ // activeRadius to fall back to. Reading the computed first-paint baseline
643
+ // here is the legitimate exception the framework's write-only-target /
644
+ // read-only-from-state rule allows (site/pages/patterns/appearance-
645
+ // settings.html): unlike #onThemeClick (gh#578), this call happens
646
+ // synchronously during connected(), after the theme attribute this same
647
+ // method just applied above — no requestAnimationFrame hedge needed, and
648
+ // the result becomes this.activeDensity/activeRadius, so every
649
+ // subsequent redraw stays read-only-from-state, never re-derived again.
650
+ #readInitialShape(target, prop) {
651
+ const cs = getComputedStyle(target);
652
+ return parseFloat(cs.getPropertyValue(prop)) || 1;
653
+ }
654
+
645
655
  // ── Internal — prefers-color-scheme ─────────────────────────────────
646
656
 
647
657
  #resolvePrefersScheme() {