@adia-ai/web-components 0.0.8 → 0.0.9

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.
Files changed (2) hide show
  1. package/core/icons.js +12 -0
  2. package/package.json +1 -1
package/core/icons.js CHANGED
@@ -102,6 +102,18 @@ if (!hasViteGlob) {
102
102
  });
103
103
  return [weight, Object.fromEntries(entries)];
104
104
  }));
105
+ // icon-ui elements that asked for an icon before the manifest loaded
106
+ // gave up silently (resolveLoader returned null on EMPTY_WEIGHTS).
107
+ // Re-request every <icon-ui name> now that a real loader map is in
108
+ // place. Idempotent — already-loaded icons short-circuit on
109
+ // registry.has() inside loadIcon.
110
+ if (typeof document !== 'undefined') {
111
+ for (const el of document.querySelectorAll('icon-ui[name]')) {
112
+ const name = el.getAttribute('name');
113
+ const weight = el.getAttribute('weight') || DEFAULT_WEIGHT;
114
+ if (name) loadIcon(name, weight);
115
+ }
116
+ }
105
117
  }).catch(() => { /* keep EMPTY_WEIGHTS */ });
106
118
  }
107
119
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adia-ai/web-components",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "AdiaUI web components — vanilla custom elements. A2UI runtime (renderer, registry, streams, wiring) lives in @adia-ai/a2ui-utils.",
5
5
  "type": "module",
6
6
  "exports": {