@warpgogol/werkstatt-shared 0.2.1 → 0.4.1

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,9 +1,13 @@
1
1
  {
2
2
  "name": "@warpgogol/werkstatt-shared",
3
- "version": "0.2.1",
3
+ "version": "0.4.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Stack-agnostic shared infrastructure extracted from werkstatt-site (RFC-0868).",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/syrokomskyi/werkstatt-shared.git"
10
+ },
7
11
  "main": "./src/index.ts",
8
12
  "types": "./src/index.ts",
9
13
  "exports": {
@@ -1334,7 +1338,10 @@
1334
1338
  "publishConfig": {
1335
1339
  "access": "public"
1336
1340
  },
1337
- "files": ["src", "tsconfig.json"],
1341
+ "files": [
1342
+ "src",
1343
+ "tsconfig.json"
1344
+ ],
1338
1345
  "dependencies": {
1339
1346
  "@lordicon/element": "^2.3.1",
1340
1347
  "@noble/ed25519": "^3.1.0",
@@ -1357,5 +1364,6 @@
1357
1364
  "astro": "^7.2.0",
1358
1365
  "fast-check": "^4.9.0",
1359
1366
  "vitest": "^4.1.10"
1360
- }
1367
+ },
1368
+ "packageManager": "pnpm@11.10.0"
1361
1369
  }
@@ -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). */
package/tsconfig.json CHANGED
@@ -1,12 +1,20 @@
1
1
  {
2
- "extends": "../../tsconfig/node-lib.json",
3
2
  "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "preserve",
5
+ "noEmit": true,
6
+ "declaration": true,
7
+ "rewriteRelativeImportExtensions": true,
8
+ "types": [
9
+ "node"
10
+ ],
4
11
  "rootDir": ".",
5
12
  "outDir": "dist",
6
- "noEmit": true,
7
13
  "allowImportingTsExtensions": true
8
14
  },
9
- "include": ["src/**/*.ts"],
15
+ "include": [
16
+ "src/**/*.ts"
17
+ ],
10
18
  "exclude": [
11
19
  "src/**/*.template.*",
12
20
  "src/**/*.test.ts",