@luhtech/site-template 0.22.0 → 0.23.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
|
@@ -3,8 +3,15 @@
|
|
|
3
3
|
One Astro component library renders every LuhTech venture marketing site from
|
|
4
4
|
its own `content/page.schema.json` + `content/site.schema.json` instances.
|
|
5
5
|
Copy is a derived surface -- the instances are the authored source, this
|
|
6
|
-
package is the renderer
|
|
7
|
-
|
|
6
|
+
package is the renderer. Since 0.18.0 the package fetches and carries no
|
|
7
|
+
schema: each site repo validates its instances in its own CI against
|
|
8
|
+
schema-registry (the reusable `content-validate.yml` workflow), so an invalid
|
|
9
|
+
instance fails that site's CI instead of shipping.
|
|
10
|
+
|
|
11
|
+
Current release: **0.23.0** on npmjs.com. Every release is a
|
|
12
|
+
`site-template-v*` tag, published by `.github/workflows/publish.yml`; CI
|
|
13
|
+
(`.github/workflows/ci.yml`) runs `npm install` + `npm test` on every PR and
|
|
14
|
+
push to `main`.
|
|
8
15
|
|
|
9
16
|
```
|
|
10
17
|
npm install @luhtech/site-template
|
|
@@ -45,6 +52,8 @@ site with no way to supply one (GTM-L3 G1.4-R, 2026-09-08).
|
|
|
45
52
|
on `hero`/`proof` sections were silently invisible before this).
|
|
46
53
|
- **`<SplashHero {...} />`** (`@luhtech/site-template/components/SplashHero.astro`)
|
|
47
54
|
-- a trigger-flow hero: full-bleed photo, a one-time splash intro on load
|
|
55
|
+
(optional since 0.20.0: `intro: 'wordmark'` is the default, `intro: 'none'`
|
|
56
|
+
renders the hero with no splash -- Ectropy-Business's `apps/marketing-site` home page uses `'none'`)
|
|
48
57
|
(wireframe wordmark -> white-fill wave -> fly-out into the real nav logo's
|
|
49
58
|
on-screen position, measured at play time), then never repeats for that
|
|
50
59
|
session (`sessionStorage`, keyed by your own `sessionKey` so two on one
|
|
@@ -63,9 +72,9 @@ site with no way to supply one (GTM-L3 G1.4-R, 2026-09-08).
|
|
|
63
72
|
as usual. See `~/dev/luhtech/Ectropy-Business/apps/marketing-site/src/pages/index.astro`
|
|
64
73
|
for the reference consumer.
|
|
65
74
|
- **`loadBrand(path)`** (`@luhtech/site-template/content`) reads a
|
|
66
|
-
`content/brand/<venture>.json`
|
|
67
|
-
|
|
68
|
-
|
|
75
|
+
`content/brand/<venture>.json` (`portfolio/brand-identity.schema.json`)
|
|
76
|
+
instance. Like `loadPage`/`loadSite`, it does not validate (0.18.0); the
|
|
77
|
+
site's CI does.
|
|
69
78
|
- **`applyBrandDefaults(page, brand)`** (`@luhtech/site-template/content`) --
|
|
70
79
|
GTM-L3 G1.1/G1.2: on the page whose `route` is `/`, returns a copy of
|
|
71
80
|
`page` with `sections[hero].heading` replaced by `brand.identity.tagline`,
|
|
@@ -216,9 +225,10 @@ design undershot; the bespoke clickable-diagram/inspector/scenario-ledger
|
|
|
216
225
|
layer those examples also use is deliberately out of scope -- genuinely
|
|
217
226
|
bespoke per-tool illustration work, not schema-parametrizable regardless.
|
|
218
227
|
|
|
219
|
-
`loadTool()` (new, `@luhtech/site-template/content`) reads
|
|
220
|
-
|
|
221
|
-
|
|
228
|
+
`loadTool()` (new, `@luhtech/site-template/content`) reads a
|
|
229
|
+
`content/tool.schema.json` instance from disk, same convention as
|
|
230
|
+
`loadPage`/`loadSite` (it validated with ajv until 0.18.0; the site's CI
|
|
231
|
+
validates it now). `ToolCalculator.astro` renders it: real
|
|
222
232
|
inputs, a live-computed result gated behind a contact-capture form, and
|
|
223
233
|
(when the instance's `presentation` block is present) the hero KPI/chart/
|
|
224
234
|
method-notes/sources described above. `<Section>`/`<Article>` gained
|
|
@@ -290,7 +300,8 @@ this same section's own `diagrams[]` -- the block is a position, `diagrams[]`
|
|
|
290
300
|
stays the data) and `image` (required `src`+`alt`, optional `caption` --
|
|
291
301
|
the first real mechanism for a photo to appear inline in an article body
|
|
292
302
|
at all). Existing instances validate unchanged; `PAGE_PIN` bumped to
|
|
293
|
-
`1.3.0
|
|
303
|
+
`1.3.0` (the pin itself was removed in 0.18.0, when validation moved to
|
|
304
|
+
each site's CI).
|
|
294
305
|
|
|
295
306
|
**`Block.astro`** renders both: `diagram` dispatches to `Diagram.astro`
|
|
296
307
|
after resolving `diagramId` against a new `diagrams` prop -- a dangling
|
|
@@ -327,6 +338,47 @@ A `tsconfig.json` was added (this repo had none) extending
|
|
|
327
338
|
diagnostics across `ToolCalculator.astro` and the diagram components that
|
|
328
339
|
the repo's prior no-tsconfig default resolution wasn't catching.
|
|
329
340
|
|
|
341
|
+
## Marks, the venture directory, forms, papers and figures (0.8.0 - 0.20.1)
|
|
342
|
+
|
|
343
|
+
What landed between 0.7.0 and 0.15.0, and after it, that the sections above
|
|
344
|
+
and below do not cover (versions from this repo's commit history):
|
|
345
|
+
|
|
346
|
+
- **Venture marks.** `VentureMark.astro` renders a venture's mark on a sibling
|
|
347
|
+
site, preferring its animated mark from the generated
|
|
348
|
+
`src/lib/venture-marks.generated.ts` and falling back to the static one.
|
|
349
|
+
Each animated mark is self-contained (its own scoped `<style>` and prefixed
|
|
350
|
+
keyframes) so several can sit on one page (0.8.0, 0.9.0; Ectropy's mark is
|
|
351
|
+
its brand pack's reverse reveal at small format since 0.20.0/0.20.1).
|
|
352
|
+
- **Venture cards.** `VentureCard.astro` renders a `crossLinks[]` entry as a
|
|
353
|
+
card: mark, the venture's display name and one-liner from the generated
|
|
354
|
+
`src/lib/venture-directory.generated.ts`, and the authored
|
|
355
|
+
`relationshipLine` (0.10.0; the holding company shows its name, not its id,
|
|
356
|
+
since 0.18.1).
|
|
357
|
+
- **Sync bins (local, not CI).** `luhtech-sync-marks`,
|
|
358
|
+
`luhtech-sync-animated-marks` and `luhtech-sync-venture-directory` read the
|
|
359
|
+
venture repos as sibling checkouts on disk (`~/dev/luhtech/<Repo>`, listed in
|
|
360
|
+
`bin/lib/ventures.mjs`) and regenerate the files above. They cannot run in
|
|
361
|
+
CI; run them by hand when a venture's mark or brand record changes.
|
|
362
|
+
`bin/lib/ventures.mjs` lists ten entries: Ectropy, Qullqa, Siltana,
|
|
363
|
+
JobsiteControl, Viiva, Ohjaus, Raizal, Replique, Hilja and LuhTech.
|
|
364
|
+
- **Shared layout pieces.** `FullBleedHeroImage.astro` (0.10.2, promoted from
|
|
365
|
+
LuhTech-Business), `SectionHeading.astro` (shared heading standard), a `bio` block
|
|
366
|
+
type (0.11.0), a nav that collapses behind a menu button below `md` (0.13.0),
|
|
367
|
+
and `LoginCard.astro` plus a sign-in nav button (0.14.0).
|
|
368
|
+
- **Gated asset request.** `AssetRequestForm.astro` renders a `cta` section
|
|
369
|
+
that carries `assetRequest`: name, work email, company, role and an unticked
|
|
370
|
+
opt-in, posted to `site.leadCapture.assetRequestEndpoint`. The page only
|
|
371
|
+
shows a confirmation; the capture service emails the link
|
|
372
|
+
(d-2026-10-01-st-asset-request-form).
|
|
373
|
+
- **Paper landing.** `PaperLanding.astro` (`@luhtech/site-template/lib/paperLanding`
|
|
374
|
+
for its helpers) is a paper's one page: its open summary and figures, then
|
|
375
|
+
Download, Feedback and Share, read from the whitepaper record (0.17.0,
|
|
376
|
+
d-2026-10-02-st-paper-landing-three-actions).
|
|
377
|
+
- **Figure records.** A `diagrams[]` entry that names a `figureRef` is drawn by
|
|
378
|
+
`@luhtech/figures` (published from `luh-tech/site-visuals`) in the site's
|
|
379
|
+
brand theme; an entry with `diagramType` + `data` still draws inline (0.19.0).
|
|
380
|
+
`ConnectionGraph.astro` renders the `connection-graph` diagram type.
|
|
381
|
+
|
|
330
382
|
## Browser icons, canonical URLs and search metadata (0.15.0)
|
|
331
383
|
|
|
332
384
|
`SiteLayout` now emits, beyond `page.seo`'s title/description/ogImage:
|
|
@@ -373,6 +425,16 @@ Two bins go with it:
|
|
|
373
425
|
install chromium`. `SiteLayout` emits the web-app meta for an installable
|
|
374
426
|
site.
|
|
375
427
|
|
|
428
|
+
## A figure renders its label (0.23.0)
|
|
429
|
+
|
|
430
|
+
content/page 2.9.0 and whitepaper 1.4.0 give a figure a `label` (what the
|
|
431
|
+
value is) and a `measure` (the value as money, a quantity, a fraction or a
|
|
432
|
+
date, by reference to the open standard's units definitions), and deprecate
|
|
433
|
+
`unit`, which carried both. `Figure` and the `sources` section render
|
|
434
|
+
`label`, and fall back to `unit` for a record not yet moved;
|
|
435
|
+
`paperSections` carries `label` and `measure` onto the proof section.
|
|
436
|
+
`figureLabel` (`@luhtech/site-template/lib/figureLabel`) is the one rule.
|
|
437
|
+
|
|
376
438
|
## An animated mark replays when clicked (0.22.0)
|
|
377
439
|
|
|
378
440
|
Every animated mark ran once on load and then sat on its last frame;
|
|
@@ -444,4 +506,12 @@ in `predev`/`prebuild` as before. Run both check bins in CI against every
|
|
|
444
506
|
|
|
445
507
|
## Peer dependencies
|
|
446
508
|
|
|
447
|
-
`astro ^7.2`, `tailwindcss ^4
|
|
509
|
+
`astro ^7.2`, `tailwindcss ^4`, and `playwright >=1.40` as an optional peer
|
|
510
|
+
(only `luhtech-device-smoke` needs it).
|
|
511
|
+
|
|
512
|
+
Dependencies: `@lucide/astro` (icons), `@resvg/resvg-js` (`luhtech-sync-icons`)
|
|
513
|
+
and `@luhtech/figures` (figure records).
|
|
514
|
+
|
|
515
|
+
Deliverable records for this package's changes (`d-<date>-st-<slug>`) live in
|
|
516
|
+
`luh-tech/Ectropy-Business` `.dlp/deliverables/`; this repo carries no `.roadmap/`
|
|
517
|
+
or `.dlp/`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luhtech/site-template",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.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",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"exports": {
|
|
24
24
|
"./content": "./src/content/index.ts",
|
|
25
25
|
"./lib/paperLanding": "./src/lib/paperLanding.ts",
|
|
26
|
+
"./lib/figureLabel": "./src/lib/figureLabel.ts",
|
|
26
27
|
"./layouts/SiteLayout.astro": "./src/layouts/SiteLayout.astro",
|
|
27
28
|
"./components/*": "./src/components/*",
|
|
28
29
|
"./components/sections/*": "./src/components/sections/*"
|
|
@@ -12,16 +12,21 @@ export interface Props {
|
|
|
12
12
|
figure: {
|
|
13
13
|
figureId: string;
|
|
14
14
|
value: string;
|
|
15
|
+
label?: string;
|
|
16
|
+
measure?: Record<string, unknown>;
|
|
17
|
+
/** Deprecated by content/page 2.9.0; read only when label is absent. */
|
|
15
18
|
unit?: string;
|
|
16
19
|
provenance: { sourceRef: string; observedAt?: string };
|
|
17
20
|
};
|
|
18
21
|
}
|
|
22
|
+
import { figureLabel } from '../lib/figureLabel';
|
|
19
23
|
const { figure } = Astro.props;
|
|
24
|
+
const label = figureLabel(figure);
|
|
20
25
|
---
|
|
21
26
|
<div class="relative rounded-md border border-ink/15 bg-canvas p-5 overflow-hidden" id={figure.figureId}>
|
|
22
27
|
<span class="absolute top-0 left-0 right-0 h-1 bg-accent-primary" aria-hidden="true"></span>
|
|
23
28
|
<span class="font-display text-4xl font-bold leading-none block">{figure.value}</span>
|
|
24
|
-
{
|
|
29
|
+
{label && <span class="text-sm text-ink/70 font-medium mt-2 block">{label}</span>}
|
|
25
30
|
<span class="text-xs text-ink/50 mt-4 pt-3 border-t border-ink/10 block">
|
|
26
31
|
{figure.provenance.sourceRef}
|
|
27
32
|
{figure.provenance.observedAt && ` (${figure.provenance.observedAt})`}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// sectionKind: sources -- citations for every figure used on the page,
|
|
3
3
|
// each figure's provenance.sourceRef rendered as a full citation.
|
|
4
4
|
import SectionHeading from '../SectionHeading.astro';
|
|
5
|
+
import { figureLabel } from '../../lib/figureLabel';
|
|
5
6
|
|
|
6
7
|
export interface Props { section: any }
|
|
7
8
|
const { section } = Astro.props;
|
|
@@ -11,7 +12,7 @@ const { section } = Astro.props;
|
|
|
11
12
|
<ol class="space-y-2 text-sm text-ink/70">
|
|
12
13
|
{section.figures?.map((f: any) => (
|
|
13
14
|
<li>
|
|
14
|
-
<strong>{f.value}{f
|
|
15
|
+
<strong>{f.value}{figureLabel(f) ? ` ${figureLabel(f)}` : ''}</strong> — {f.provenance.sourceRef}
|
|
15
16
|
{f.provenance.observedAt && ` (observed ${f.provenance.observedAt})`}
|
|
16
17
|
</li>
|
|
17
18
|
))}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// A figure's caption under its value: content/page 2.9.0 and whitepaper 1.4.0
|
|
2
|
+
// give a figure a `label` (what the value is) and a structured `measure`
|
|
3
|
+
// (money, quantity, fraction or date by reference to the open standard's
|
|
4
|
+
// units definitions), and deprecate `unit`, a free-text label that carried
|
|
5
|
+
// both meanings. A record that still carries only `unit` renders as before.
|
|
6
|
+
export interface LabelledFigure {
|
|
7
|
+
label?: string;
|
|
8
|
+
unit?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function figureLabel(figure: LabelledFigure): string | undefined {
|
|
12
|
+
return figure.label ?? figure.unit;
|
|
13
|
+
}
|
package/src/lib/paperLanding.ts
CHANGED
|
@@ -111,6 +111,9 @@ export function feedbackMessage(status: number, error?: string): string {
|
|
|
111
111
|
interface PaperFigure {
|
|
112
112
|
figureId: string;
|
|
113
113
|
value: string;
|
|
114
|
+
label?: string;
|
|
115
|
+
measure?: Record<string, unknown>;
|
|
116
|
+
/** Deprecated by whitepaper 1.4.0; read only when label is absent. */
|
|
114
117
|
unit?: string;
|
|
115
118
|
caption?: string;
|
|
116
119
|
estimate?: boolean;
|
|
@@ -173,6 +176,8 @@ export function paperSections(paper: PaperRecord, slug: string) {
|
|
|
173
176
|
figures: open.map((f) => ({
|
|
174
177
|
figureId: f.figureId,
|
|
175
178
|
value: f.estimate && !/estimate/i.test(f.value) ? `${f.value} (estimate)` : f.value,
|
|
179
|
+
...(f.label ? { label: f.label } : {}),
|
|
180
|
+
...(f.measure ? { measure: f.measure } : {}),
|
|
176
181
|
...(f.unit ? { unit: f.unit } : {}),
|
|
177
182
|
provenance: f.provenance,
|
|
178
183
|
})),
|