@warpgogol/werkstatt-shared 0.2.1 → 0.3.0

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": "@warpgogol/werkstatt-shared",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Stack-agnostic shared infrastructure extracted from werkstatt-site (RFC-0868).",
@@ -57,9 +57,13 @@ export async function runStandardLayoutOrchestration(
57
57
  }
58
58
  }
59
59
 
60
- // 2. LordIcon hydration (mandatory on demand)
60
+ // 2. LordIcon hydration (deferred to load event to avoid blocking LCP)
61
61
  if (has("lord-icon")) {
62
- initLordIconOnDemand();
62
+ if (document.readyState === "complete") {
63
+ initLordIconOnDemand();
64
+ } else {
65
+ window.addEventListener("load", () => initLordIconOnDemand(), { once: true });
66
+ }
63
67
  }
64
68
 
65
69
  // 3. Lenis smooth scroll (opt-in via smoothScroll: true)
@@ -331,6 +331,14 @@ export type SemanticPageModel = {
331
331
  * Image Provider Port run in the render layer), so it ships the raw token.
332
332
  */
333
333
  leadImageToken?: { src: string; alt: string };
334
+ /**
335
+ * Unresolved token for the page's actual LCP element, carried from the
336
+ * framework-free page handler to the asset-aware render layer. Set to the
337
+ * hero block's `backgroundImage` when present (full-viewport, fetchpriority
338
+ * high), falling back to `leadImage` when visible. Used for `<link
339
+ * rel="preload" as="image">` in `<head>`.
340
+ */
341
+ lcpImageToken?: { src: string; alt: string };
334
342
  /** RFC-0162: Open Graph type. Defaults to "website" when unset. */
335
343
  ogType?: OgType;
336
344
  /** RFC-0162: Open Graph locale in `xx_XX` form (from system.md i18n hreflang). */