@luhtech/site-template 0.6.1 → 0.7.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/README.md CHANGED
@@ -262,6 +262,80 @@ switches to a red dashed stroke with an explicit "at a loss" label --
262
262
  computed from the same real props, not a second data path to keep in
263
263
  sync.
264
264
 
265
+ ## data-reveal: on-screen content never waits on a scroll (0.6.2)
266
+
267
+ Real user report: a page's `/insights/` index looked genuinely blank on
268
+ first load at common laptop viewport heights. Root cause: `[data-reveal]`
269
+ sections default to `opacity:0` and only reveal once
270
+ `SiteLayout.astro`'s `IntersectionObserver` fires -- but that callback is
271
+ async (next frame, not synchronous with paint), and any section whose top
272
+ sits close to the fold could read as "just never revealed" rather than
273
+ "will reveal in a moment." `fullPage` Playwright screenshots (used during
274
+ this session's own local review) scroll through the whole page and
275
+ mask this exact failure mode -- a real gap in that verification, not
276
+ just the bug itself.
277
+
278
+ The reveal script now checks each `[data-reveal]` element's real bounding
279
+ rect at setup time: anything already on screen (or within 10% of the
280
+ viewport height below it) reveals immediately, synchronously, no observer
281
+ round-trip. Only genuinely below-the-fold sections keep the scroll-
282
+ triggered fade-in. Same visual result for content that was always meant
283
+ to animate in on scroll; content already visible at load is now
284
+ guaranteed visible at load.
285
+
286
+ ## One real icon family, and diagrams that sit where they're authored (0.7.0)
287
+
288
+ Two real, related gaps found in live local review, fixed together
289
+ (d-2026-09-09-sr-inline-diagram-image-blocks): a section's `diagrams[]`
290
+ always rendered as one group after every body block, never next to the
291
+ paragraph each one actually illustrates; and `Icon.astro` was 26
292
+ hand-drawn inline SVGs, forked verbatim into LuhTech-Business as its own
293
+ duplicate copy, with only 2 of 11 `sectionKind` components wiring icon
294
+ support in at all.
295
+
296
+ **`content/page.schema.json` v1.3.0** (additive) gives `block` two new
297
+ `blockType` values: `diagram` (required `diagramId`, resolved against
298
+ this same section's own `diagrams[]` -- the block is a position, `diagrams[]`
299
+ stays the data) and `image` (required `src`+`alt`, optional `caption` --
300
+ the first real mechanism for a photo to appear inline in an article body
301
+ at all). Existing instances validate unchanged; `PAGE_PIN` bumped to
302
+ `1.3.0`.
303
+
304
+ **`Block.astro`** renders both: `diagram` dispatches to `Diagram.astro`
305
+ after resolving `diagramId` against a new `diagrams` prop -- a dangling
306
+ id throws at build time rather than silently rendering nothing, the same
307
+ "raised loudly, never silently dropped" discipline business-tools' own
308
+ chunk parser already applies to a stray `::figure`. `image` renders a
309
+ real `<figure>`/`<img>`/`<figcaption>`. `sections/Article.astro` no
310
+ longer renders `diagrams[]` as one trailing block after the prose --
311
+ every block (including `diagram`) renders in a single ordered pass, and
312
+ any diagram genuinely *not* referenced by a block still renders in a
313
+ fallback strip at the end, so authored data is never silently dropped.
314
+ The `href`-wrap mechanism `Block.astro` already had gets real link
315
+ styling: hover underline-offset, and an `https://` href (always a link
316
+ leaving this venture's own site, per the schema's own href pattern)
317
+ opens in a new tab with a small external-link marker.
318
+
319
+ **`Icon.astro`** is now a thin wrapper over `@lucide/astro` (new
320
+ dependency, ~1,800 real maintained icons, ISC, official Astro package)
321
+ instead of a hand-rolled `Record<string,string>` of raw SVG path data.
322
+ All 26 existing keys map to their real, confirmed Lucide equivalents
323
+ (verified against the installed package's own icon files, not guessed);
324
+ `crane` has no literal match in Lucide's catalog, so `hammer` is used as
325
+ a disclosed, closest-real substitute. The public `name: string` prop
326
+ contract is unchanged -- an unknown name still renders nothing rather
327
+ than failing the build. `sections/Proof.astro` (the one `sectionKind`
328
+ that visibly wanted a heading icon and had none wired) now reads
329
+ `icons.section[section.sectionId]`, same convention `Open.astro` already
330
+ used.
331
+
332
+ A `tsconfig.json` was added (this repo had none) extending
333
+ `astro/tsconfigs/base` -- required so TypeScript can resolve
334
+ `@lucide/astro`'s extensionless, `.ts`-native exports via `moduleResolution:
335
+ "Bundler"`; incidentally also cleared 24 pre-existing implicit-`any`
336
+ diagnostics across `ToolCalculator.astro` and the diagram components that
337
+ the repo's prior no-tsconfig default resolution wasn't catching.
338
+
265
339
  ## Migrating a venture site
266
340
 
267
341
  A migration is: author `content/site.<venture>.json` + `content/pages/*.json`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luhtech/site-template",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "Shared Astro component library + content-instance contract for LuhTech venture marketing sites -- one template renders every site from content/page.schema.json + content/site.schema.json instances.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -36,12 +36,13 @@
36
36
  "tailwindcss": "^4"
37
37
  },
38
38
  "dependencies": {
39
+ "@lucide/astro": "^1.42.0",
39
40
  "ajv": "^8.17.1",
40
41
  "ajv-formats": "^3.0.1"
41
42
  },
42
43
  "luhtech": {
43
44
  "schemaPins": {
44
- "content/page.schema.json": "1.0.0",
45
+ "content/page.schema.json": "1.3.0",
45
46
  "content/site.schema.json": "1.0.0",
46
47
  "content/capability-claim.schema.json": "0.2.0",
47
48
  "content/tool.schema.json": "1.1.0",
@@ -12,20 +12,51 @@
12
12
  // concluding paragraph, same semantics as paragraph, styled with a top
13
13
  // rule to read as the piece's final beat.
14
14
  //
15
- // href (also v1.1.0) makes the whole rendered block a real link -- an
15
+ // diagram/image added v1.3.0 (d-2026-09-09-sr-inline-diagram-image-blocks):
16
+ // diagram is a positioned reference into this same section's own
17
+ // diagrams[] -- a dangling diagramId is a real authoring error, surfaced
18
+ // as a build failure rather than silently skipped (same discipline
19
+ // business-tools' own chunk parser already applies to a stray ::figure).
20
+ // image is the first real mechanism for a photo/asset to appear inline
21
+ // in an article body at all.
22
+ //
23
+ // href (v1.1.0) makes the whole rendered block a real link -- an
16
24
  // audiences-section card pointing at a market-specific page, or an
17
25
  // article-list entry pointing at that article's own page. Wraps
18
26
  // whatever the blockType already renders in an outer <a>, so link
19
27
  // behavior is uniform across every blockType without each needing its
20
- // own href-aware markup.
28
+ // own href-aware markup. An https:// href is always a link leaving this
29
+ // venture's own site (the schema's own href pattern reserves bare "/"
30
+ // and "#" paths for same-site) -- it opens in a new tab and gets a
31
+ // small external-link marker, the "nice links" treatment.
32
+ import Diagram from './Diagram.astro';
33
+ import Icon from './Icon.astro';
34
+
21
35
  export interface Props {
22
- block: { blockType: string; text: string; label?: string; href?: string };
36
+ block: { blockType: string; text?: string; label?: string; href?: string; diagramId?: string; src?: string; alt?: string; caption?: string };
37
+ // This section's own diagrams[] array, only needed when block.blockType
38
+ // is "diagram" -- the block is a position, diagrams[] stays the data.
39
+ diagrams?: { diagramId: string; diagramType: string; caption?: string; data: any }[];
23
40
  class?: string;
24
41
  }
25
- const { block, class: className = '' } = Astro.props;
26
- const items = block.blockType === 'list' ? block.text.split('\n').filter(Boolean) : [];
42
+ const { block, diagrams = [], class: className = '' } = Astro.props;
43
+ const items = block.blockType === 'list' ? (block.text ?? '').split('\n').filter(Boolean) : [];
44
+ const isExternalLink = typeof block.href === 'string' && block.href.startsWith('https://');
27
45
  const Wrapper = block.href ? 'a' : Fragment;
28
- const wrapperProps = block.href ? { href: block.href, class: 'block no-underline' } : {};
46
+ const wrapperProps = block.href
47
+ ? {
48
+ href: block.href,
49
+ class: 'block no-underline hover:underline hover:underline-offset-4 decoration-accent-primary/50 transition-colors',
50
+ ...(isExternalLink ? { target: '_blank', rel: 'noopener noreferrer' } : {}),
51
+ }
52
+ : {};
53
+ let resolvedDiagram;
54
+ if (block.blockType === 'diagram') {
55
+ resolvedDiagram = diagrams.find((d) => d.diagramId === block.diagramId);
56
+ if (!resolvedDiagram) {
57
+ throw new Error(`Block references diagramId "${block.diagramId}" not present in this section's diagrams[]`);
58
+ }
59
+ }
29
60
  ---
30
61
  <Wrapper {...wrapperProps}>
31
62
  {block.blockType === 'paragraph' && (
@@ -59,4 +90,14 @@ const wrapperProps = block.href ? { href: block.href, class: 'block no-underline
59
90
  {block.blockType === 'close' && (
60
91
  <p class={`leading-relaxed border-t border-ink/10 pt-6 ${className}`}>{block.text}</p>
61
92
  )}
93
+ {block.blockType === 'diagram' && resolvedDiagram && <Diagram diagram={resolvedDiagram} class={`my-8 ${className}`} />}
94
+ {block.blockType === 'image' && (
95
+ <figure class={`my-8 ${className}`}>
96
+ <img src={block.src} alt={block.alt} class="w-full rounded-md" loading="lazy" />
97
+ {block.caption && <figcaption class="text-sm text-ink/60 mt-2 text-center">{block.caption}</figcaption>}
98
+ </figure>
99
+ )}
100
+ {isExternalLink && (
101
+ <Icon name="external-link" class="inline-block w-3.5 h-3.5 ml-1 align-text-top text-accent-primary/70" />
102
+ )}
62
103
  </Wrapper>
@@ -1,11 +1,13 @@
1
1
  ---
2
- // ARC-GTM-SURFACE D2.2: shared line-icon grammar (24x24, stroke-based, rounded
3
- // caps/joins). Registered brand-side as iconSetRef.iconSetId =
4
- // "gtm-surface-line-icons-v1" -- a shared-set identifier (brand-identity
5
- // schema's own alternative to a per-brand asset-bank upload), since this set
6
- // is common across the portfolio rather than brand-specific. Copied verbatim
7
- // from luh-tech/LuhTech-Business's own Icon.astro -- keep this file in sync
8
- // if the shared set grows.
2
+ // ARC-GTM-SURFACE D2.2: shared line-icon grammar, backed by @lucide/astro
3
+ // (d-2026-09-09-sr-inline-diagram-image-blocks: replaced 26 hand-drawn inline
4
+ // SVGs with real Lucide components -- one real, maintained icon family behind
5
+ // the portfolio's whole icon surface instead of a hand-rolled set forked
6
+ // verbatim between this repo and LuhTech-Business). Registered brand-side as
7
+ // iconSetRef.iconSetId = "gtm-surface-line-icons-v1" -- a shared-set
8
+ // identifier (brand-identity schema's own alternative to a per-brand
9
+ // asset-bank upload), since this set is common across the portfolio rather
10
+ // than brand-specific.
9
11
  //
10
12
  // d-2026-09-09-sr-article-venture-routing-content-cells (LuhTech-Business
11
13
  // build-out): this one file mixes truly portfolio-generic icons with
@@ -23,33 +25,39 @@
23
25
  // CONSTRUCTION-SPECIFIC (Ectropy and other construction-venture sites
24
26
  // only): voxel-grid, field-inspection, hard-hat, building, field-team,
25
27
  // zone-map, change-order, crane.
26
- const ICONS: Record<string, string> = {
27
- 'voxel-grid': `<rect x="3" y="3" width="8" height="8" rx="1.5"/><rect x="13" y="3" width="8" height="8" rx="1.5"/><rect x="3" y="13" width="8" height="8" rx="1.5"/><rect x="13" y="13" width="8" height="8" rx="1.5"/>`,
28
- 'location-pin': `<path d="M12 21s7-6.5 7-12a7 7 0 1 0-14 0c0 5.5 7 12 7 12z"/><circle cx="12" cy="9" r="2.25"/>`,
29
- 'decision-chain': `<circle cx="7" cy="7" r="4"/><path d="M5.5 7l1.25 1.25L9.5 5.5"/><circle cx="17" cy="17" r="4"/><path d="M15.5 17l1.25 1.25 2.75-2.75"/><path d="M10.5 9.5l3 3"/>`,
30
- 'cost-tag': `<path d="M3 12l8.5-8.5a2 2 0 0 1 1.5-.5H19a2 2 0 0 1 2 2v6a2 2 0 0 1-.5 1.5L12 21a2 2 0 0 1-3 0l-6-6a2 2 0 0 1 0-3z"/><circle cx="16" cy="8" r="1.25" fill="currentColor" stroke="none"/>`,
31
- 'field-inspection': `<rect x="5" y="4" width="14" height="17" rx="2"/><rect x="9" y="2.5" width="6" height="3" rx="1"/><path d="M9 12.5l2 2 4-4.5"/><line x1="8" y1="17" x2="16" y2="17"/>`,
32
- 'schema-doc': `<path d="M6 3h9l4 4v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"/><path d="M15 3v4h4"/><path d="M9.5 13l-1.5 1.5 1.5 1.5"/><path d="M14.5 13l1.5 1.5-1.5 1.5"/>`,
33
- 'integration-plug': `<rect x="3" y="9" width="7" height="6" rx="1.5"/><rect x="14" y="9" width="7" height="6" rx="1.5"/><line x1="10" y1="12" x2="14" y2="12"/><line x1="6" y1="7" x2="6" y2="9"/><line x1="6" y1="15" x2="6" y2="17"/>`,
34
- 'sync-loop': `<path d="M4 12a8 8 0 0 1 14-5.3L21 9"/><path d="M21 4v5h-5"/><path d="M20 12a8 8 0 0 1-14 5.3L3 15"/><path d="M3 20v-5h5"/>`,
35
- 'hard-hat': `<path d="M4 16a8 8 0 0 1 16 0"/><rect x="2.5" y="16" width="19" height="3" rx="1.5"/><line x1="12" y1="6" x2="12" y2="8"/>`,
36
- 'building': `<rect x="5" y="3" width="14" height="18" rx="1"/><circle cx="9" cy="7" r="0.9" fill="currentColor" stroke="none"/><circle cx="15" cy="7" r="0.9" fill="currentColor" stroke="none"/><circle cx="9" cy="11" r="0.9" fill="currentColor" stroke="none"/><circle cx="15" cy="11" r="0.9" fill="currentColor" stroke="none"/><circle cx="9" cy="15" r="0.9" fill="currentColor" stroke="none"/><circle cx="15" cy="15" r="0.9" fill="currentColor" stroke="none"/>`,
37
- 'field-team': `<circle cx="10" cy="8" r="3.25"/><path d="M4 20.5c0-3.6 2.7-6.2 6-6.2s6 2.6 6 6.2"/><path d="M18.5 4.5a2.5 2.5 0 0 0-2.5 2.5c0 2.1 2.5 4.3 2.5 4.3s2.5-2.2 2.5-4.3a2.5 2.5 0 0 0-2.5-2.5z"/>`,
38
- 'zone-map': `<rect x="3" y="3" width="18" height="18" rx="1.5"/><line x1="3" y1="9" x2="21" y2="9"/><line x1="3" y1="15" x2="21" y2="15"/><line x1="9" y1="3" x2="9" y2="21"/><line x1="15" y1="3" x2="15" y2="21"/><rect x="9.5" y="9.5" width="5" height="5" rx="0.75" fill="currentColor" stroke="none" opacity="0.35"/>`,
39
- 'audit-trail': `<line x1="5" y1="4" x2="5" y2="20"/><circle cx="5" cy="4" r="1.5" fill="currentColor" stroke="none"/><circle cx="5" cy="12" r="1.5" fill="currentColor" stroke="none"/><circle cx="5" cy="20" r="1.5" fill="currentColor" stroke="none"/><line x1="10" y1="4" x2="20" y2="4"/><line x1="10" y1="12" x2="20" y2="12"/><line x1="10" y1="20" x2="20" y2="20"/>`,
40
- 'change-order': `<path d="M6 3h8l4 4v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"/><path d="M14 3v4h4"/><path d="M8 14h8"/><path d="M13 11l3 3-3 3"/>`,
41
- 'studio-compass': `<circle cx="12" cy="12" r="9"/><path d="M12 12l4-7"/><path d="M12 12l-2 8"/><circle cx="12" cy="12" r="1.25" fill="currentColor" stroke="none"/>`,
42
- 'portfolio-grid': `<circle cx="7" cy="7" r="4"/><circle cx="17" cy="7" r="4"/><circle cx="7" cy="17" r="4"/><circle cx="17" cy="17" r="4"/>`,
43
- 'code-bracket': `<path d="M8 5L3 12l5 7"/><path d="M16 5l5 7-5 7"/>`,
44
- 'team-people': `<circle cx="9" cy="8" r="3.25"/><path d="M3.5 20c0-3.6 2.5-6 5.5-6s5.5 2.4 5.5 6"/><circle cx="17" cy="9" r="2.5"/><path d="M14.5 20c0-2.8 1.7-5 4-5"/>`,
45
- 'crane': `<line x1="5" y1="21" x2="5" y2="6"/><line x1="5" y1="6" x2="19" y2="6"/><line x1="16" y1="6" x2="16" y2="3"/><line x1="16" y1="10" x2="19" y2="6"/><line x1="16" y1="10" x2="13" y2="6"/><line x1="16" y1="10" x2="16" y2="15"/><line x1="2" y1="21" x2="9" y2="21"/>`,
46
- 'handshake': `<path d="M2 11l5-3 3 1.5"/><path d="M22 11l-5-3-3 1.5"/><path d="M10 9.5l2 1.2 2-1.2"/><path d="M7 14.5l2.5 2.5a1.7 1.7 0 0 0 2.4 0"/><path d="M17 14.5l-2.5 2.5a1.7 1.7 0 0 1-2.4 0"/>`,
47
- 'rocket': `<path d="M12 2c3 2 4.5 5.5 4.5 9.5 0 2-.5 4-1.5 5.5h-6c-1-1.5-1.5-3.5-1.5-5.5C7.5 7.5 9 4 12 2z"/><circle cx="12" cy="10" r="1.5"/><path d="M9 16l-2.5 4.5"/><path d="M15 16l2.5 4.5"/><path d="M10.5 17.5h3l-1.5 3.5z"/>`,
48
- 'data-flow': `<circle cx="5" cy="6" r="2"/><circle cx="19" cy="6" r="2"/><circle cx="12" cy="14" r="2"/><circle cx="5" cy="20" r="2"/><circle cx="19" cy="20" r="2"/><line x1="6.5" y1="7.5" x2="10.5" y2="12.5"/><line x1="17.5" y1="7.5" x2="13.5" y2="12.5"/><line x1="10.5" y1="15.5" x2="6.5" y2="18.5"/><line x1="13.5" y1="15.5" x2="17.5" y2="18.5"/>`,
49
- 'mail-envelope': `<rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3.5 6.5L12 13l8.5-6.5"/>`,
50
- 'message-bubble': `<path d="M4 5h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H9l-5 4v-4H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1z"/><line x1="7" y1="9" x2="17" y2="9"/><line x1="7" y1="12.5" x2="14" y2="12.5"/>`,
51
- 'external-link': `<path d="M7 17L17 7"/><path d="M8 7h9v9"/>`,
52
- 'lock': `<rect x="5" y="11" width="14" height="10" rx="2"/><path d="M8 11V7a4 4 0 1 1 8 0v4"/><circle cx="12" cy="16" r="1.25" fill="currentColor" stroke="none"/>`,
28
+ //
29
+ // crane has no literal equivalent in Lucide's real catalog (confirmed
30
+ // against node_modules/@lucide/astro/src/icons -- no crane/tower-crane icon
31
+ // exists); hammer is the closest real, disclosed substitute, not a guess.
32
+ import { icons } from '@lucide/astro';
33
+
34
+ const ICONS: Record<string, keyof typeof icons> = {
35
+ 'voxel-grid': 'Boxes',
36
+ 'location-pin': 'MapPin',
37
+ 'decision-chain': 'GitBranch',
38
+ 'cost-tag': 'Tag',
39
+ 'field-inspection': 'ClipboardCheck',
40
+ 'schema-doc': 'FileCode',
41
+ 'integration-plug': 'Plug',
42
+ 'sync-loop': 'RefreshCw',
43
+ 'hard-hat': 'HardHat',
44
+ 'building': 'Building2',
45
+ 'field-team': 'Construction',
46
+ 'zone-map': 'Map',
47
+ 'audit-trail': 'ClipboardList',
48
+ 'change-order': 'FilePenLine',
49
+ 'studio-compass': 'Compass',
50
+ 'portfolio-grid': 'LayoutGrid',
51
+ 'code-bracket': 'Code',
52
+ 'team-people': 'Users',
53
+ 'crane': 'Hammer',
54
+ 'handshake': 'Handshake',
55
+ 'rocket': 'Rocket',
56
+ 'data-flow': 'Network',
57
+ 'mail-envelope': 'Mail',
58
+ 'message-bubble': 'MessageCircle',
59
+ 'external-link': 'ExternalLink',
60
+ 'lock': 'Lock',
53
61
  };
54
62
 
55
63
  export interface Props {
@@ -64,17 +72,13 @@ export interface Props {
64
72
  class?: string;
65
73
  }
66
74
  const { name, class: className = 'w-6 h-6' } = Astro.props;
67
- const inner = ICONS[name as keyof typeof ICONS] ?? '';
75
+ const lucideName = ICONS[name as keyof typeof ICONS];
76
+ const LucideIcon = lucideName ? icons[lucideName] : null;
68
77
  ---
69
- <svg
70
- xmlns="http://www.w3.org/2000/svg"
71
- viewBox="0 0 24 24"
72
- fill="none"
73
- stroke="currentColor"
74
- stroke-width="1.75"
75
- stroke-linecap="round"
76
- stroke-linejoin="round"
77
- class={className}
78
- aria-hidden="true"
79
- set:html={inner}
80
- />
78
+ {LucideIcon && (
79
+ <LucideIcon
80
+ class={className}
81
+ stroke-width="1.75"
82
+ aria-hidden="true"
83
+ />
84
+ )}
@@ -6,12 +6,15 @@
6
6
  // then paragraph/pullquote/stat blocks in the article's own order, closing
7
7
  // with a `close` block if the source article ended with one.
8
8
  // diagrams[]/toolRef added v1.2.0 (d-2026-09-09-sr-page-diagrams-and-
9
- // tool-schema): rendered after the body blocks, not interleaved within
10
- // them -- the chunk vocabulary (lede/section/pullquote/stat/close) has
11
- // no per-block diagram-anchor mechanism yet, so a section's real
12
- // diagrams appear together as supporting visualization following the
13
- // prose, honest about where they actually sit today rather than
14
- // pretending precise inline placement exists.
9
+ // tool-schema).
10
+ //
11
+ // v1.3.0 (d-2026-09-09-sr-inline-diagram-image-blocks): a section's
12
+ // diagrams now render inline, exactly where a `diagram` block places
13
+ // them, in this same single-pass blocks loop -- fixing the real gap
14
+ // where every diagram rendered as one group after all the prose,
15
+ // disconnected from the paragraph it illustrates. Any diagram in
16
+ // section.diagrams[] NOT referenced by a block still renders in the
17
+ // fallback strip below, so authored data is never silently dropped.
15
18
  import Block from '../Block.astro';
16
19
  import Diagram from '../Diagram.astro';
17
20
  import ToolCalculator from '../ToolCalculator.astro';
@@ -28,17 +31,19 @@ export interface Props {
28
31
  ventureRef?: string;
29
32
  }
30
33
  const { section, tool, toolSubmitEndpoint, route, ventureRef } = Astro.props;
34
+ const referencedDiagramIds = new Set((section.blocks ?? []).filter((b: any) => b.blockType === 'diagram').map((b: any) => b.diagramId));
35
+ const unreferencedDiagrams = (section.diagrams ?? []).filter((d: any) => !referencedDiagramIds.has(d.diagramId));
31
36
  ---
32
37
  <section id={section.sectionId} class="py-8" data-reveal>
33
38
  {section.eyebrow && <p class="text-sm font-mono uppercase tracking-wide text-accent-primary mb-3">{section.eyebrow}</p>}
34
39
  {section.heading && <h1 class="font-display text-3xl sm:text-4xl font-bold mb-3 max-w-2xl">{section.heading}</h1>}
35
40
  {section.subheading && <p class="text-lg text-ink/80 max-w-2xl mb-6">{section.subheading}</p>}
36
41
  <div class="max-w-2xl space-y-5">
37
- {section.blocks?.map((b: any) => <Block block={b} />)}
42
+ {section.blocks?.map((b: any) => <Block block={b} diagrams={section.diagrams} />)}
38
43
  </div>
39
- {section.diagrams?.length > 0 && (
44
+ {unreferencedDiagrams.length > 0 && (
40
45
  <div class="max-w-2xl space-y-8 mt-8">
41
- {section.diagrams.map((d: any) => <Diagram diagram={d} />)}
46
+ {unreferencedDiagrams.map((d: any) => <Diagram diagram={d} />)}
42
47
  </div>
43
48
  )}
44
49
  {section.toolRef && tool && toolSubmitEndpoint && (
@@ -6,12 +6,16 @@
6
6
  // are cited, provenance.public numbers, never customer-use statements.
7
7
  import Block from '../Block.astro';
8
8
  import Figure from '../Figure.astro';
9
+ import Icon from '../Icon.astro';
10
+ import type { SectionIcons } from '../Section.astro';
9
11
 
10
- export interface Props { section: any }
11
- const { section } = Astro.props;
12
+ export interface Props { section: any; icons?: SectionIcons }
13
+ const { section, icons } = Astro.props;
14
+ const sectionIcon = icons?.section?.[section.sectionId];
12
15
  ---
13
16
  <section id={section.sectionId} class="py-8" data-reveal>
14
17
  {section.eyebrow && <p class="text-sm font-mono uppercase tracking-wide text-accent-primary mb-3">{section.eyebrow}</p>}
18
+ {sectionIcon && <Icon name={sectionIcon} class="w-8 h-8 text-accent-primary mb-3" />}
15
19
  {section.heading && <h2 class="font-display text-2xl font-bold mb-3">{section.heading}</h2>}
16
20
  {section.subheading && <p class="text-ink/80 max-w-2xl mb-4">{section.subheading}</p>}
17
21
  {section.blocks?.map((b: any) => <Block block={b} class="mb-3" />)}
@@ -3,7 +3,7 @@ import Ajv from 'ajv';
3
3
  import addFormats from 'ajv-formats';
4
4
  import { fetchSchema, fetchSupportSchema } from './schemaFetch.js';
5
5
 
6
- const PAGE_PIN = '1.2.0';
6
+ const PAGE_PIN = '1.3.0';
7
7
  const CAPABILITY_CLAIM_PIN = '0.2.0';
8
8
 
9
9
  let validatorPromise: ReturnType<typeof buildValidator> | null = null;
@@ -33,9 +33,17 @@ async function buildValidator() {
33
33
 
34
34
  export interface PageBlock {
35
35
  blockType: string;
36
- text: string;
36
+ // Required for the text kinds (paragraph/lede/pullquote/list/definition/
37
+ // caption/stat/close); not used by diagram/image, same conditional
38
+ // requirement as the schema's own allOf/if/then -- typed optional here so
39
+ // a real diagram/image block literal (no text) isn't a type error.
40
+ text?: string;
37
41
  label?: string;
38
42
  href?: string;
43
+ diagramId?: string;
44
+ src?: string;
45
+ alt?: string;
46
+ caption?: string;
39
47
  }
40
48
 
41
49
  export interface PageClaim {
@@ -86,6 +86,19 @@ const nav =
86
86
  </div>
87
87
  </footer>
88
88
  <script>
89
+ // Content already on screen at load must never depend on a scroll
90
+ // event or an async observer callback to become visible -- real
91
+ // user report (2026-09-09): the insights index's card grid sits
92
+ // close enough to the fold on common viewport heights that it
93
+ // read as a genuinely blank page until scrolled, because
94
+ // IntersectionObserver's own first callback is asynchronous
95
+ // (next frame/microtask), not synchronous with page paint, and a
96
+ // slow first frame or a borderline-in-view element could leave
97
+ // data-reveal's default opacity:0 as the visible, unrevealed
98
+ // state. Elements already in (or near) the viewport at setup
99
+ // time reveal immediately, synchronously, no observer round-trip
100
+ // required; only genuinely below-the-fold elements keep the
101
+ // scroll-triggered animation.
89
102
  const revealTargets = document.querySelectorAll('[data-reveal]');
90
103
  if ('IntersectionObserver' in window && revealTargets.length) {
91
104
  const observer = new IntersectionObserver(
@@ -99,7 +112,15 @@ const nav =
99
112
  },
100
113
  { threshold: 0.2, rootMargin: '0px 0px -10% 0px' }
101
114
  );
102
- revealTargets.forEach((el) => observer.observe(el));
115
+ revealTargets.forEach((el) => {
116
+ const rect = el.getBoundingClientRect();
117
+ const nearViewport = rect.top < window.innerHeight * 1.1 && rect.bottom > 0;
118
+ if (nearViewport) {
119
+ el.classList.add('is-visible');
120
+ } else {
121
+ observer.observe(el);
122
+ }
123
+ });
103
124
  } else {
104
125
  revealTargets.forEach((el) => el.classList.add('is-visible'));
105
126
  }