@luhtech/site-template 0.3.0 → 0.3.2

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": "@luhtech/site-template",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
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",
@@ -24,8 +24,6 @@
24
24
  // Hero.astro for a page that wants the trigger-flow treatment, not a
25
25
  // different binding rule. A consumer still calls applyBrandDefaults()
26
26
  // and reads heading/lede off the result the same way.
27
- import CtaLink from './CtaLink.astro';
28
-
29
27
  export interface Props {
30
28
  photoSrc: string;
31
29
  photoAlt: string;
@@ -63,7 +61,7 @@ const {
63
61
 
64
62
  const rowPositions = [4, 24, 40, 62, 80, 96];
65
63
  ---
66
- <section class="relative w-full h-[85vh] min-h-[520px] overflow-hidden hero-motion" id="hero">
64
+ <section class="relative w-screen left-1/2 -translate-x-1/2 h-[85vh] min-h-[520px] overflow-hidden hero-motion" id="hero">
67
65
  <img src={photoSrc} alt={photoAlt} width="1376" height="768" class="absolute inset-0 w-full h-full object-cover" />
68
66
  <div class="absolute inset-0 hero-gradient"></div>
69
67
  {dataLines.length > 0 && (
@@ -81,8 +79,17 @@ const rowPositions = [4, 24, 40, 62, 80, 96];
81
79
  </div>
82
80
  <p class="mt-5 text-lg text-canvas/85 max-w-2xl">{lede}</p>
83
81
  {ctas.length > 0 && (
84
- <div class="mt-8 flex gap-4">
85
- {ctas.map((cta, i) => <CtaLink cta={cta} variant={i === 0 ? 'primary' : 'secondary'} />)}
82
+ <div class="mt-8 flex gap-4 flex-wrap">
83
+ {ctas.map((cta, i) => (
84
+ <a
85
+ href={cta.href}
86
+ class={i === 0
87
+ ? 'px-5 py-2.5 rounded-md bg-accent-secondary text-ink font-medium transition-all duration-200 hover:opacity-90 hover:shadow-lg hover:-translate-y-0.5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-secondary focus-visible:rounded'
88
+ : 'px-5 py-2.5 rounded-md border border-canvas/40 text-canvas font-medium transition-all duration-200 hover:border-canvas/70 hover:-translate-y-0.5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-secondary focus-visible:rounded'}
89
+ >
90
+ {cta.label}
91
+ </a>
92
+ ))}
86
93
  </div>
87
94
  )}
88
95
  </div>
@@ -31,7 +31,58 @@ async function buildValidator() {
31
31
  return ajv.compile(pageSchema as object);
32
32
  }
33
33
 
34
+ export interface PageBlock {
35
+ blockType: string;
36
+ text: string;
37
+ label?: string;
38
+ }
39
+
40
+ export interface PageClaim {
41
+ claimId: string;
42
+ kind: string;
43
+ text: string;
44
+ featureRef?: string;
45
+ sourcedStatus?: string;
46
+ }
47
+
48
+ export interface PageCta {
49
+ label: string;
50
+ href: string;
51
+ intent: string;
52
+ }
53
+
54
+ export interface PageCrossLink {
55
+ brandRef: string;
56
+ relationshipLine: string;
57
+ href: string;
58
+ }
59
+
60
+ export interface PageSection {
61
+ sectionId: string;
62
+ sectionKind: string;
63
+ heading?: string;
64
+ subheading?: string;
65
+ eyebrow?: string;
66
+ blocks?: PageBlock[];
67
+ claims?: PageClaim[];
68
+ ctas?: PageCta[];
69
+ crossLinks?: PageCrossLink[];
70
+ figures?: unknown[];
71
+ [key: string]: unknown;
72
+ }
73
+
74
+ /**
75
+ * `sections` is typed as a real array (not the bare index signature's
76
+ * `unknown`) so a consumer's `page.sections.map(...)` typechecks without
77
+ * a local cast -- found live migrating Ectropy/JobsiteControl/Qullqa/
78
+ * Siltana to this package: `astro check` failed ts(18046) on every one
79
+ * of them ("'page.sections' is of type 'unknown'"), each independently
80
+ * patched with its own `(s: any)` workaround before this fix landed.
81
+ * Other top-level fields stay on the index signature -- only the one
82
+ * every consumer actually iterates gets a real type.
83
+ */
34
84
  export interface LoadedPage {
85
+ sections: PageSection[];
35
86
  [key: string]: unknown;
36
87
  }
37
88