@uniweb/runtime 0.12.4 → 0.12.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniweb/runtime",
3
- "version": "0.12.4",
3
+ "version": "0.12.5",
4
4
  "description": "Minimal runtime for loading Uniweb foundations",
5
5
  "type": "module",
6
6
  "exports": {
@@ -27,10 +27,26 @@ function resolveAgainstDocument(url) {
27
27
  }
28
28
 
29
29
  /**
30
- * Load foundation CSS from URL
30
+ * Load foundation CSS from URL.
31
+ *
32
+ * ⭐ **Exported for the test, and the test exists because a HOST builds on this.**
33
+ * The skip below is what lets a shell put the stylesheet in the head itself —
34
+ * so the sheet applies during HTML parse instead of waiting for the runtime to
35
+ * boot, parse `__DATA__` and inject it. Hosting shipped that on the strength of
36
+ * this guard (channel `framework-hosting-ea29`, 2026-08-19); until then nothing
37
+ * asserted it, so a refactor would have produced two `<link>` tags and two
38
+ * fetches on their lane with every test here still green.
39
+ *
40
+ * ⛔ **The guard is an ATTRIBUTE-VALUE match, so the href must be byte-identical
41
+ * to what the caller passes** — and the caller passes the URL *after*
42
+ * `resolveAgainstDocument`. An absolute `https://…` is a pass-through and
43
+ * matches; a root-relative `/foo.css` is rewritten to `origin + /foo.css` and
44
+ * would NOT match a literal `href="/foo.css"` in the head. If a host ever emits
45
+ * a root-relative one, this comparison has to become resolved-to-resolved.
46
+ *
31
47
  * @param {string} url - URL to foundation's CSS file
32
48
  */
33
- async function loadFoundationCSS(url) {
49
+ export async function loadFoundationCSS(url) {
34
50
  if (!url) return
35
51
 
36
52
  // Skip if already present (e.g., injected by SSR into the static HTML)