@certrev/cert-block 0.5.2 → 0.5.4

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/CHANGELOG.md ADDED
@@ -0,0 +1,53 @@
1
+ # Changelog — @certrev/cert-block
2
+
3
+ The cert card is a **design-locked** component. Semver contract: **patch and minor releases never
4
+ change the rendered cert output and never break a compiling integration** (registration surface,
5
+ exports, types). Anything that would alter what a visitor sees — or require integration changes —
6
+ is announced loudly here first.
7
+
8
+ ## 0.5.3 — 2026-07-22
9
+
10
+ - **New:** `certRevCertComponent` (`./builder`) — the drop-in gen2 registration entry, with the
11
+ mutable `inputs[]` the SDK's `RegisteredComponent` type expects:
12
+ `customComponents={[...yourComponents, certRevCertComponent]}`. One import, no re-wrapping, no
13
+ readonly spread. `BUILDER_REGISTRATION` (the readonly canonical view) is unchanged.
14
+ - **New:** the 19 exporter-populated wire inputs are marked `advanced` — the Builder editor's
15
+ Options tab now leads with the two placement inputs (`mode`, `part`) and tucks the
16
+ system-populated fields under "Advanced". Editor-cosmetic only.
17
+ - **Changed:** `@certrev/cert-contract` moved from a peer dependency (`>=0.5.0`, unbounded) to a
18
+ regular dependency (bounded `^0.5.0`) — a plain `npm i @certrev/cert-block` is a complete
19
+ install regardless of the consumer's peer-install settings, and a future contract 0.6 can no
20
+ longer float in unreviewed.
21
+ - **Docs:** README rewritten for the gen2 SDK (`customComponents` array) — the previous README
22
+ showed the gen1 `Builder.registerComponent` API and pre-publish notes that no longer applied
23
+ (the contract package and the modal bundle both ship for real since 0.5.x). Added in-package
24
+ modal instructions (`?url` import + external script + literal CSP allowances), a known-issues
25
+ note (`@builder.io/sdk-react@5.2.4` types under `moduleResolution: nodenext`), and this
26
+ changelog.
27
+ - Rendered output: **byte-identical to 0.5.2** (changes outside the registration surface are
28
+ comment-only).
29
+
30
+ ## 0.5.2 — 2026-07-21
31
+
32
+ - Republish of 0.5.1 (the 0.5.1 GitHub-Packages tarball was unfetchable). No code changes.
33
+
34
+ ## 0.5.1 — 2026-07
35
+
36
+ - `./modal/placement` subpath exposed (the side-effect-free placement engine).
37
+
38
+ ## 0.5.0 — 2026-07
39
+
40
+ - The certificate-modal Web Component moved **into** the package (POR-10721 W2): prebuilt
41
+ dependency-free IIFE at `./modal/certrev-cert.js` (byte-parity with the deployed theme-extension
42
+ asset) + the `./modal` subpath. Banner memo placement (`part`), font hook, static preview block.
43
+
44
+ ## 0.4.0 — 2026-07
45
+
46
+ - Render strictly from `placedFields` + `renderCustomFace`; v2 brand-ink theming
47
+ (`barInk` / `inkColor`).
48
+
49
+ ## 0.3.0 and earlier
50
+
51
+ - The locked 3-mode `renderCertBlock` faces, re-synced to the final Liquid design; the
52
+ ambient-URL anchor model (`CertRevAnchor`, zero-input); the initial React components, JSON-LD
53
+ projector, fail-closed verify layer, and `<certrev-badge>` Web Component.
package/README.md CHANGED
@@ -52,6 +52,9 @@ import { verifyEnvelope, renderVerdict, verifySignatureOnly } from '@certrev/cer
52
52
 
53
53
  // Web Component (separate subpath — does NOT touch customElements on import)
54
54
  import { defineCertRevBadge, setCertRevKidResolver } from '@certrev/cert-block/webcomponent'
55
+
56
+ // Builder.io registration (separate subpath; no Builder dependency)
57
+ import { certRevCertComponent, BUILDER_REGISTRATION, CERT_COMPONENT_NAME } from '@certrev/cert-block/builder'
55
58
  ```
56
59
 
57
60
  ## Usage — headless React (Hydrogen / Next server component)
@@ -121,32 +124,76 @@ is the editor-placed alternative (W4, POR-10721).
121
124
  ### PUSH — the registered cert block (recommended)
122
125
 
123
126
  CertREV's exporter emits a cert block whose options are the `BuilderCertChromeData` projection.
124
- Register the ready component once, from the `./builder` subpath — no hand-mapped options, no
125
- hand-maintained inputs array:
127
+ Register the ready component once, from the `./builder` subpath — one import, one entry in the
128
+ `customComponents` array your app already passes to the gen2 SDK's `<Content>` (the same array
129
+ your other custom components render from). No hand-mapped options, no hand-maintained inputs:
130
+
131
+ ```tsx
132
+ // gen2 SDKs (@builder.io/sdk-react and friends — Hydrogen/Remix, Next, Gatsby)
133
+ import { certRevCertComponent } from '@certrev/cert-block/builder'
134
+
135
+ <Content
136
+ model="blog-article"
137
+ content={content}
138
+ apiKey={apiKey}
139
+ customComponents={[...yourExistingComponents, certRevCertComponent]}
140
+ />
141
+ ```
142
+
143
+ On `0.5.2` and earlier (before `certRevCertComponent` existed), build the entry from the
144
+ canonical readonly view — the spread sheds the `readonly` typing, which the gen2 SDK's mutable
145
+ `inputs[]` type won't accept directly:
126
146
 
127
147
  ```ts
128
- import { Builder } from '@builder.io/react'
129
148
  import { BUILDER_REGISTRATION } from '@certrev/cert-block/builder'
130
149
 
131
- Builder.registerComponent(BUILDER_REGISTRATION.component, BUILDER_REGISTRATION)
150
+ const certRevComponent = {
151
+ component: BUILDER_REGISTRATION.component,
152
+ name: BUILDER_REGISTRATION.name,
153
+ inputs: [...BUILDER_REGISTRATION.inputs],
154
+ }
132
155
  ```
133
156
 
134
- `CERT_COMPONENT_NAME` is the canonical block name the portal's `certComponent` connection field
135
- defaults to; `BUILDER_REGISTRATION.inputs` are single-sourced from the `BuilderCertChromeData`
136
- wire type (drift-locked — the exporter option keys, the registered inputs, and the type can
137
- never diverge silently). The component enforces the fused-credential rule by construction (a
138
- credential is unrenderable without its dated verification) and themes to the brand's render-def
139
- (accent / surface / corners / font + v2 bar-ink / body-ink).
157
+ Gen1 SDK (`@builder.io/react`) consumers register the same data imperatively:
158
+ `Builder.registerComponent(certRevCertComponent.component, certRevCertComponent)`.
159
+
160
+ `CERT_COMPONENT_NAME` (`"CertREV Cert"`) is the canonical block name the portal's
161
+ `certComponent` connection field defaults to; the inputs are single-sourced from the
162
+ `BuilderCertChromeData` wire type (drift-locked — the exporter option keys, the registered
163
+ inputs, and the type can never diverge silently). The 19 exporter-populated wire inputs are
164
+ marked `advanced`, so the editor's Options tab leads with the two placement choices an editor
165
+ actually makes (`mode`, `part`). The component enforces the fused-credential rule by
166
+ construction (a credential is unrenderable without its dated verification) and themes to the
167
+ brand's render-def (accent / surface / corners / font + v2 bar-ink / body-ink).
140
168
 
141
169
  ### The certificate modal + CSP
142
170
 
143
- The "View certificate" affordance opens an envelope-verified modal. Add the modal element +
144
- its browser bundle. *(Modal-in-package is POR-10721 W2 — until it lands, vendor the IIFE bundle
145
- from the Shopify theme extension's `certrev-cert.js`, exactly as the canary demo does.)*
171
+ The "View certificate" affordance opens an envelope-verified modal. The browser bundle **ships
172
+ in-package**: a prebuilt, dependency-free, minified IIFE at `@certrev/cert-block/modal/certrev-cert.js`.
173
+ Serve it as an external `<script>` — do **not** side-effect-import it into server code (it
174
+ registers `customElements` and touches `window`; keeping it an external script keeps it out of
175
+ the SSR bundle entirely):
176
+
177
+ ```tsx
178
+ // Vite-family stacks (Hydrogen/Remix): resolve the shipped asset to a URL, load it deferred
179
+ import certScriptUrl from '@certrev/cert-block/modal/certrev-cert.js?url'
180
+
181
+ <certrev-cert-modal
182
+ data-delivery-api="https://portal.certrev.com"
183
+ data-platform={platform}
184
+ data-external-id={externalId}
185
+ data-fonts="host"
186
+ />
187
+ <script src={certScriptUrl} defer />
188
+ ```
189
+
190
+ Two CSP allowances for the headless host — the modal is the ONLY part that needs any (the card
191
+ renders zero external assets: no fonts fetched, no images, inline-SVG logo):
146
192
 
147
- Two CSP allowances for the headless host:
148
- - `connect-src` → the CertREV Delivery origin (the modal fetches the signed envelope).
149
- - `img-src` → `cdn.builder.io` + the CertREV asset origin (headshots).
193
+ - `connect-src` → the CertREV Delivery origin the element fetches the signed envelope from
194
+ (production `https://portal.certrev.com`; staging `https://staging.portal.certrev.com`).
195
+ - `img-src` → `https://cdn.builder.io` + whatever origin the envelope's expert-headshot
196
+ `photoUrl` points at (CertREV portal assets in production).
150
197
 
151
198
  `data-delivery-api` is the **origin only** — the element appends
152
199
  `/api/cert/v1/delivery/{platform}/{externalId}`. Preview drafts with `includeUnpublished` on the
@@ -169,21 +216,27 @@ The package never renders an unverified credential. Every error path — bad sig
169
216
  - The React components are render-pure (verified by `react-dom/server` SSR tests) so they work as Server Components and as client components that SSR identically — same crawlable output either way.
170
217
  - Date formatting is deterministic UTC (fixed English month abbreviations, not `toLocaleDateString`) so SSR output is byte-stable and never causes a hydration mismatch.
171
218
 
172
- ## Integration TODOs (wire the real `@certrev/cert-contract`)
219
+ ## The contract dependency
173
220
 
174
- The shared contract types + the `VerdictKernel` live in the published `@certrev/cert-contract` package, which is **not yet on a registry this workspace installs from**. Until it publishes, the SDK binds the contract surface through a **local stub** so everything builds + tests now. To cut over on publish:
221
+ The shared contract types + the fail-closed `VerdictKernel` live in
222
+ [`@certrev/cert-contract`](https://www.npmjs.com/package/@certrev/cert-contract) (published, MIT).
223
+ Since `0.5.3` it is a **regular dependency** — `npm i @certrev/cert-block` brings it along; a
224
+ brand integration never imports it directly. Its one runtime dependency is `canonicalize` (the
225
+ RFC-8785 JCS implementation used for signature verification). To be clear about that word:
226
+ **nothing cryptographic runs at card render** — the cert card draws purely from block options;
227
+ verification enters only with the modal / the `getVerifiedEnvelope` verify layer.
175
228
 
176
- 1. **Delete** `src/contract/kernel-contract.ts` (the type mirror) and `src/contract/kernel-stub.ts` (the faithful kernel impl).
177
- 2. In `src/contract/kernel.ts` (the single binding point), **replace both re-export blocks** with one line: `export * from '@certrev/cert-contract'`. The exported names are deliberately identical, so nothing else in the SDK changes.
178
- 3. In `package.json`, flip the `@certrev/cert-contract` peer dependency back to **`optional: false`** and **remove the root `.npmrc`** `auto-install-peers=false` line (it exists only so the workspace installs against the stub).
179
- 4. Point `src/contract/fixtures.ts` at cert-contract's real `canonicalPayloadBytes` (RFC 8785) so the test fixtures sign bytes the published kernel verifies. (Today the stub + fixtures share a minimal JCS sufficient for the all-string/number/bool envelope shape.)
180
- 5. Confirm `verifyEnvelope` / `renderVerdict` / `verifySignatureOnly` / `toEd25519PublicKey` resolve from the published package, then re-run `pnpm typecheck && pnpm test && pnpm build`.
229
+ ## Known issues (upstream)
181
230
 
182
- A WebCrypto verify path for the Web Component's client-fetch fallback lives in cert-contract; once published, wire it into `certrev-badge.ts` so the universal embed can verify in the browser without a pre-supplied resolver.
231
+ - `@builder.io/sdk-react@5.2.4` ships types that fail to compile under
232
+ `moduleResolution: "nodenext"` (TS2834 cascade inside the SDK's own imports). cert-block's own
233
+ types are clean under both `bundler` and `nodenext` in an ESM consumer. Hydrogen / Remix / Vite
234
+ storefronts use `bundler` resolution and are unaffected.
183
235
 
184
- ## Current consumers
236
+ ## Target surfaces
185
237
 
186
- - _None yet._ Target consumers: brand-owned Hydrogen / Next / Remix storefronts (`headless_react`), Builder.io spaces (`headless_visual_cms`), and any site dropping in `<certrev-badge>` (`universal_embed`). Add each here as it adopts the SDK.
238
+ - Brand-owned Hydrogen / Next / Remix storefronts (`headless_react`), Builder.io spaces
239
+ (`headless_visual_cms`), and any site dropping in `<certrev-badge>` (`universal_embed`).
187
240
 
188
241
  ## Tests
189
242
 
@@ -198,4 +251,7 @@ Facts are mocked via `makeMockPayload` / `makeSignedEnvelope` (`src/contract/fix
198
251
 
199
252
  ## Version
200
253
 
201
- `0.4.0` (this branch, `feat/cert-block-v2-render`) — the locked cert-render faces (`renderCertBlock`, 3 modes + custom), v2 brand-ink theming (`barInk`/`inkColor`), and the Builder.io PUSH kit (`CertReviewCard` + `BUILDER_REGISTRATION` + the single-sourced `BuilderCertChromeData` wire type, POR-10721 W1/W3). npm is at `0.3.0`; `main` trails on `0.1.3` — the version lineage + branch strategy are tracked in the repo `COORDINATION.md`. Publishes **publicly** to npm as `@certrev/cert-block` (`publishConfig.access: public`).
254
+ `0.5.3` — see [CHANGELOG.md](./CHANGELOG.md) for the release history and the semver contract
255
+ (patch/minor never change the rendered cert output or break a compiling integration). Publishes
256
+ **publicly** to npm as `@certrev/cert-block` (`publishConfig.access: public`) via GitHub Actions
257
+ trusted publishing (OIDC); the internal `@certrev` GitHub-Packages channel mirrors it.
@@ -4,7 +4,7 @@
4
4
  * ─────────────────────────────────────────────────────────────────────────────
5
5
  *
6
6
  * The brand-render projection of the cert envelope (portal POR-10091) — the OPTIONS
7
- * of a brand's native cert component (e.g. e.l.f.'s registered `CertReviewCard`) on
7
+ * of a brand's native cert component (the registered `CertReviewCard`) on
8
8
  * a headless blocks-mode entry (Builder.io). CertREV serves the data + the ready-made
9
9
  * strings; the brand renders it within the design-guide ladder (enforced live by the
10
10
  * crawl monitor + the MSA anti-stripping teeth).
@@ -4,7 +4,7 @@
4
4
  * ─────────────────────────────────────────────────────────────────────────────
5
5
  *
6
6
  * The brand-render projection of the cert envelope (portal POR-10091) — the OPTIONS
7
- * of a brand's native cert component (e.g. e.l.f.'s registered `CertReviewCard`) on
7
+ * of a brand's native cert component (the registered `CertReviewCard`) on
8
8
  * a headless blocks-mode entry (Builder.io). CertREV serves the data + the ready-made
9
9
  * strings; the brand renders it within the design-guide ladder (enforced live by the
10
10
  * crawl monitor + the MSA anti-stripping teeth).
@@ -3,7 +3,7 @@
3
3
  * `CertReviewCard` — the ready-to-register Builder.io PUSH cert component (W1)
4
4
  * ─────────────────────────────────────────────────────────────────────────────
5
5
  *
6
- * A headless brand (e.l.f.) registers `BUILDER_REGISTRATION` in its Builder
6
+ * A headless brand registers `certRevCertComponent` in its Builder
7
7
  * `customComponents` and CertREV's exporter emits a block whose options are the
8
8
  * `BuilderCertChromeData` projection — so the visible cert chrome renders itself,
9
9
  * design-identical to the Shopify Liquid + WordPress PHP faces (same `renderCertBlock`
@@ -44,6 +44,8 @@ export interface BuilderInput {
44
44
  readonly type: 'string' | 'longText' | 'object' | 'boolean' | 'number';
45
45
  readonly friendlyName?: string;
46
46
  readonly helperText?: string;
47
+ /** Tucks the input under the editor's "Advanced" reveal (Builder's `Input.advanced`). */
48
+ readonly advanced?: boolean;
47
49
  }
48
50
  /**
49
51
  * The wire-type inputs — DERIVED from `BUILDER_CERT_CHROME_KEYS`, so the 19-field
@@ -60,9 +62,31 @@ export interface CertBlockBuilderRegistration {
60
62
  readonly inputs: readonly BuilderInput[];
61
63
  }
62
64
  /**
63
- * Ready to spread into a brand's Builder `customComponents`:
64
- * `Builder.registerComponent(BUILDER_REGISTRATION.component, BUILDER_REGISTRATION)`.
65
+ * The canonical registration data (readonly view). Most consumers want
66
+ * `certRevCertComponent` below — drop-in ready for the gen2 SDK's `customComponents`
67
+ * array. This readonly view remains for consumers that build their own entry
68
+ * (`inputs` must be spread — `[...BUILDER_REGISTRATION.inputs]` — because the gen2
69
+ * SDK's `RegisteredComponent.inputs` type is mutable).
65
70
  * The exporter-emitted option keys === these `inputs` === the wire type — locked by W3.
66
71
  */
67
72
  export declare const BUILDER_REGISTRATION: CertBlockBuilderRegistration;
73
+ /**
74
+ * Structural shape of the gen2 SDK's `RegisteredComponent` — the subset the PUSH kit
75
+ * populates, with the MUTABLE `inputs` array the SDK's type requires. Declared locally
76
+ * (same pattern as `CertRevBuilderRegistration` on the anchor path) so cert-block needs
77
+ * no Builder dependency; directly assignable at `<Content customComponents={[...]}>`.
78
+ */
79
+ export interface CertReviewCardRegisteredComponent {
80
+ component: typeof CertReviewCard;
81
+ name: string;
82
+ description?: string;
83
+ inputs: BuilderInput[];
84
+ }
85
+ /**
86
+ * Ready-to-register: `customComponents={[...yourComponents, certRevCertComponent]}` —
87
+ * one import, no re-wrapping, no spread. Carries the identical W3-locked input set as
88
+ * `BUILDER_REGISTRATION` in a FRESH mutable array (the two never share an instance, so
89
+ * an SDK-side mutation can never corrupt the canonical readonly view).
90
+ */
91
+ export declare const certRevCertComponent: CertReviewCardRegisteredComponent;
68
92
  //# sourceMappingURL=cert-review-card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cert-review-card.d.ts","sourceRoot":"","sources":["../../src/builder/cert-review-card.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,KAAK,aAAa,EAAmB,MAAM,oCAAoC,CAAA;AAExF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAGlE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,iBAAiB,CAA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A;CACtB;AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,iCAMlC,CAAA"}
@@ -4,7 +4,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
4
4
  * `CertReviewCard` — the ready-to-register Builder.io PUSH cert component (W1)
5
5
  * ─────────────────────────────────────────────────────────────────────────────
6
6
  *
7
- * A headless brand (e.l.f.) registers `BUILDER_REGISTRATION` in its Builder
7
+ * A headless brand registers `certRevCertComponent` in its Builder
8
8
  * `customComponents` and CertREV's exporter emits a block whose options are the
9
9
  * `BuilderCertChromeData` projection — so the visible cert chrome renders itself,
10
10
  * design-identical to the Shopify Liquid + WordPress PHP faces (same `renderCertBlock`
@@ -105,6 +105,9 @@ const WIRE_INPUT_TYPE = {
105
105
  export const WIRE_INPUTS = BUILDER_CERT_CHROME_KEYS.map((name) => ({
106
106
  name,
107
107
  type: WIRE_INPUT_TYPE[name],
108
+ // Exporter-populated wire fields: collapsed under the editor's "Advanced" reveal so the
109
+ // Options tab leads with the two placement choices an editor actually makes (mode/part).
110
+ advanced: true,
108
111
  }));
109
112
  /** Placement inputs — chosen by the entry/editor, NOT emitted by the exporter (not wire-type keys). */
110
113
  export const PLACEMENT_INPUTS = [
@@ -117,8 +120,11 @@ export const PLACEMENT_INPUTS = [
117
120
  { name: 'part', type: 'string', friendlyName: 'Banner part', helperText: 'full (default) · header · memo' },
118
121
  ];
119
122
  /**
120
- * Ready to spread into a brand's Builder `customComponents`:
121
- * `Builder.registerComponent(BUILDER_REGISTRATION.component, BUILDER_REGISTRATION)`.
123
+ * The canonical registration data (readonly view). Most consumers want
124
+ * `certRevCertComponent` below — drop-in ready for the gen2 SDK's `customComponents`
125
+ * array. This readonly view remains for consumers that build their own entry
126
+ * (`inputs` must be spread — `[...BUILDER_REGISTRATION.inputs]` — because the gen2
127
+ * SDK's `RegisteredComponent.inputs` type is mutable).
122
128
  * The exporter-emitted option keys === these `inputs` === the wire type — locked by W3.
123
129
  */
124
130
  export const BUILDER_REGISTRATION = {
@@ -126,4 +132,16 @@ export const BUILDER_REGISTRATION = {
126
132
  component: CertReviewCard,
127
133
  inputs: [...PLACEMENT_INPUTS, ...WIRE_INPUTS],
128
134
  };
135
+ /**
136
+ * Ready-to-register: `customComponents={[...yourComponents, certRevCertComponent]}` —
137
+ * one import, no re-wrapping, no spread. Carries the identical W3-locked input set as
138
+ * `BUILDER_REGISTRATION` in a FRESH mutable array (the two never share an instance, so
139
+ * an SDK-side mutation can never corrupt the canonical readonly view).
140
+ */
141
+ export const certRevCertComponent = {
142
+ name: CERT_COMPONENT_NAME,
143
+ component: CertReviewCard,
144
+ description: 'CertREV expert-review cert card. Options are populated by the CertREV exporter — editors choose placement (mode/part) only.',
145
+ inputs: [...PLACEMENT_INPUTS, ...WIRE_INPUTS],
146
+ };
129
147
  //# sourceMappingURL=cert-review-card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cert-review-card.js","sourceRoot":"","sources":["../../src/builder/cert-review-card.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAsB,eAAe,EAAE,MAAM,oCAAoC,CAAA;AAGxF,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAEhE;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,cAAc,CAAA;AAejD,MAAM,UAAU,cAAc,CAAC,KAA0B;IACxD,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,KAAK,CAAA;IACzC,IAAI,CAAC,YAAY,IAAI,CAAC,SAAS;QAAE,OAAO,IAAI,CAAA,CAAC,qBAAqB;IAElE,kFAAkF;IAClF,oFAAoF;IACpF,mFAAmF;IACnF,MAAM,EAAE,GAAG,KAAK,CAAC,sBAAsB,IAAI,IAAI,CAAA;IAC/C,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,EAAE,eAAe,KAAK,KAAK,CAAA;IACzD,MAAM,QAAQ,GAAG,EAAE,IAAI,QAAQ,CAAC,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AuG;AACvG,MAAM,CAAC,MAAM,gBAAgB,GAA4B;IACxD;QACC,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,WAAW;QACzB,UAAU,EAAE,uCAAuC;KACnD;IACD,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,gCAAgC,EAAE;CAC3G,CAAA;AASD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAiC;IACjE,IAAI,EAAE,mBAAmB;IACzB,SAAS,EAAE,cAAc;IACzB,MAAM,EAAE,CAAC,GAAG,gBAAgB,EAAE,GAAG,WAAW,CAAC;CAC7C,CAAA;AAeD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAsC;IACtE,IAAI,EAAE,mBAAmB;IACzB,SAAS,EAAE,cAAc;IACzB,WAAW,EACV,6HAA6H;IAC9H,MAAM,EAAE,CAAC,GAAG,gBAAgB,EAAE,GAAG,WAAW,CAAC;CAC7C,CAAA"}
@@ -73,5 +73,5 @@ export interface CertRevBuilderRegistration {
73
73
  */
74
74
  export declare const certRevAnchorComponent: CertRevBuilderRegistration;
75
75
  export { BUILDER_CERT_CHROME_KEYS, type BuilderCertChromeData, type BuilderCertChromeKey, type CertChromeRenderDef, } from './cert-chrome-data.js';
76
- export { BUILDER_REGISTRATION, type BuilderInput, CERT_COMPONENT_NAME, type CertBlockBuilderRegistration, CertReviewCard, type CertReviewCardProps, PLACEMENT_INPUTS, WIRE_INPUTS, } from './cert-review-card.js';
76
+ export { BUILDER_REGISTRATION, type BuilderInput, CERT_COMPONENT_NAME, type CertBlockBuilderRegistration, certRevCertComponent, CertReviewCard, type CertReviewCardProps, type CertReviewCardRegisteredComponent, PLACEMENT_INPUTS, WIRE_INPUTS, } from './cert-review-card.js';
77
77
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","s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RevAnchorComponent = {
79
79
  };
80
80
  // ── POR-10721 W1/W3: the Builder.io PUSH kit (CertReviewCard) + single-sourced wire type ──
81
81
  export { BUILDER_CERT_CHROME_KEYS, } from './cert-chrome-data.js';
82
- export { BUILDER_REGISTRATION, CERT_COMPONENT_NAME, CertReviewCard, PLACEMENT_INPUTS, WIRE_INPUTS, } from './cert-review-card.js';
82
+ export { BUILDER_REGISTRATION, CERT_COMPONENT_NAME, certRevCertComponent, CertReviewCard, PLACEMENT_INPUTS, WIRE_INPUTS, } from './cert-review-card.js';
83
83
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/builder/index.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,aAAa,EAAkB,UAAU,EAAE,MAAM,OAAO,CAAA;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAexD,MAAM,cAAc,GAAG,aAAa,CAAsB,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAA;AAE9F;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,EAC/B,OAAO,EACP,SAAS,GAAG,KAAK,EACjB,QAAQ,GAKR;IACA,OAAO,KAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,YAAG,QAAQ,GAA2B,CAAA;AACpG,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB;IACvC,OAAO,CACN,kDACiC,EAAE,EAClC,KAAK,EAAE;YACN,MAAM,EAAE,oBAAoB;YAC5B,YAAY,EAAE,CAAC;YACf,OAAO,EAAE,WAAW;YACpB,IAAI,EAAE,gBAAgB;YACtB,KAAK,EAAE,SAAS;YAChB,UAAU,EAAE,SAAS;SACrB,uCAEgB,8CAA0B,oJAEtC,CACN,CAAA;AACF,CAAC;AAED;;;;;GAK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AE,YAAG,QAAQ,GAA2B,CAAA;AACpG,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB;IACvC,OAAO,CACN,kDACiC,EAAE,EAClC,KAAK,EAAE;YACN,MAAM,EAAE,oBAAoB;YAC5B,YAAY,EAAE,CAAC;YACf,OAAO,EAAE,WAAW;YACpB,IAAI,EAAE,gBAAgB;YACtB,KAAK,EAAE,SAAS;YAChB,UAAU,EAAE,SAAS;SACrB,uCAEgB,8CAA0B,oJAEtC,CACN,CAAA;AACF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa;IAC5B,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IACzD,IAAI,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACtD,OAAO,KAAC,UAAU,IAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,UAAU,SAAG,CAAA;IACrF,CAAC;IACD,IAAI,SAAS;QAAE,OAAO,KAAC,wBAAwB,KAAG,CAAA;IAClD,OAAO,IAAI,CAAA;AACZ,CAAC;AAaD;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAA+B;IACjE,SAAS,EAAE,aAAa;IACxB,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,EAAE;CACV,CAAA;AAED,6FAA6F;AAC7F,OAAO,EACN,wBAAwB,GAIxB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACN,oBAAoB,EAEpB,mBAAmB,EAEnB,oBAAoB,EACpB,cAAc,EAGd,gBAAgB,EAChB,WAAW,GACX,MAAM,uBAAuB,CAAA"}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * `renderPreviewBlock` — a STATIC, NON-DELIVERY preview of the cert block for pre-sales
3
- * look-demos (POR-10743, from the e.l.f. Builder demo).
3
+ * look-demos (POR-10743, from the Builder demo).
4
4
  *
5
5
  * The visual is BYTE-FOR-BYTE `renderCertBlock` (pixel-parity — "see it on your own site
6
6
  * today"), wrapped in a `[data-certrev-preview]` container carrying a REQUIRED expiry.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * `renderPreviewBlock` — a STATIC, NON-DELIVERY preview of the cert block for pre-sales
3
- * look-demos (POR-10743, from the e.l.f. Builder demo).
3
+ * look-demos (POR-10743, from the Builder demo).
4
4
  *
5
5
  * The visual is BYTE-FOR-BYTE `renderCertBlock` (pixel-parity — "see it on your own site
6
6
  * today"), wrapped in a `[data-certrev-preview]` container carrying a REQUIRED expiry.
@@ -41,15 +41,19 @@
41
41
  * entry targets (edge / Workers / server / client).
42
42
  */
43
43
  /** The font ENUM. Resolves to a FIXED slot stack — never a free-form family. */
44
- export declare const FONT_SLOTS: readonly ["sans", "serif", "system"];
44
+ export declare const FONT_SLOTS: readonly ["sans", "serif", "system", "grotesk", "mono"];
45
45
  export type FontSlot = (typeof FONT_SLOTS)[number];
46
46
  /**
47
- * The `fontSlot` → fixed font-stack literal. BYTE-IDENTICAL to the Shopify Liquid
48
- * engine's stacks (`shopify/extensions/certrev-schema/snippets/certrev-badge.liquid`
49
- * — the only font families the twins use), so a themed brand's Builder projection
50
- * paints the same typography as its Shopify face. A raw family string in a
51
- * `font-family` CSS var is a CSS-injection surface AND breaks the "CertREV hosts no
52
- * fonts" invariant, so the enum → stack indirection is the security boundary.
47
+ * The `fontSlot` → fixed font-stack literal — the render-def theme map the webcomponent MODAL
48
+ * (`resolveRenderTheme` → `renderBadgeHtml`) and the legacy `<CertBadge>` resolve. The three original
49
+ * slots (sans/serif/system) stay BYTE-IDENTICAL to the Shopify Liquid engine's stacks
50
+ * (`shopify/extensions/certrev-schema/snippets/certrev-badge.liquid`), so a themed brand's popup modal
51
+ * and its inline Liquid card paint the same typography — the load-bearing card==modal invariant.
52
+ * grotesk (Plus Jakarta Sans) + mono (JetBrains Mono) are ADDED at the shared guide values —
53
+ * byte-identical to portal `FONT_SLOT_STACKS`, this package's `RENDER_BLOCK_FONT_STACKS`, and the
54
+ * Liquid twin's added branches — so card == modal holds for them too. A raw family string in a
55
+ * `font-family` CSS var is a CSS-injection surface AND breaks the "CertREV hosts no fonts" invariant,
56
+ * so the enum → stack indirection is the security boundary.
53
57
  */
54
58
  export declare const FONT_STACKS: Readonly<Record<FontSlot, string>>;
55
59
  /** A fully-resolved themeable token set (a brand overrides a subset of these). */
@@ -160,7 +164,7 @@ export interface ResolvedBlockTheme {
160
164
  readonly fontSlot: RenderBlockFontSlot;
161
165
  readonly accentFg: '#141414' | '#ffffff';
162
166
  /**
163
- * V2 chrome-ink (Phase 1, e.l.f.) — the header/seal bar (and floating-pill) FILL. OPTIONAL:
167
+ * V2 chrome-ink (Phase 1) — the header/seal bar (and floating-pill) FILL. OPTIONAL:
164
168
  * present ONLY when the def themes it, so an un-barInk'd face emits nothing extra and the bar
165
169
  * keeps its locked navy/white base (byte-identical). Mirrors the portal's `ThemeTokens.barInk`.
166
170
  */
@@ -1 +1 @@
1
- {"version":3,"file":"render-def.d.ts","sourceRoot":"","sources":["../../src/components/render-def.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAMH,gFAAgF;AAChF,eAAO,MAAM,UAAU,sCAAuC,CAAA;AAC9D,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;AAElD;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAI1D,CAAA;AAED,kFAAkF;AAClF,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,QAAQ,EAAE,QA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GAOG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAK3D;AAED;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IAClC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAA;IACtC,QAAQ,CAAC,QAAQ,EAAE,SAAS,GAAG,SAAS,CAAA;IACxC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACzC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,kGAAkG;AAClG,eAAO,MAAM,mBAAmB,EAAE,kBAMjC,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,kBAAkB,CAkBzF;AAED;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,mCAAmC,CAAA;AAE/E;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,mBAAmB,GAAG,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAM5G"}
@@ -44,19 +44,25 @@
44
44
  // Themeable token vocabulary (mirrors portal src/lib/design-guide/tokens.ts)
45
45
  // ─────────────────────────────────────────────────────────────────────────────
46
46
  /** The font ENUM. Resolves to a FIXED slot stack — never a free-form family. */
47
- export const FONT_SLOTS = ['sans', 'serif', 'system'];
47
+ export const FONT_SLOTS = ['sans', 'serif', 'system', 'grotesk', 'mono'];
48
48
  /**
49
- * The `fontSlot` → fixed font-stack literal. BYTE-IDENTICAL to the Shopify Liquid
50
- * engine's stacks (`shopify/extensions/certrev-schema/snippets/certrev-badge.liquid`
51
- * — the only font families the twins use), so a themed brand's Builder projection
52
- * paints the same typography as its Shopify face. A raw family string in a
53
- * `font-family` CSS var is a CSS-injection surface AND breaks the "CertREV hosts no
54
- * fonts" invariant, so the enum → stack indirection is the security boundary.
49
+ * The `fontSlot` → fixed font-stack literal — the render-def theme map the webcomponent MODAL
50
+ * (`resolveRenderTheme` → `renderBadgeHtml`) and the legacy `<CertBadge>` resolve. The three original
51
+ * slots (sans/serif/system) stay BYTE-IDENTICAL to the Shopify Liquid engine's stacks
52
+ * (`shopify/extensions/certrev-schema/snippets/certrev-badge.liquid`), so a themed brand's popup modal
53
+ * and its inline Liquid card paint the same typography — the load-bearing card==modal invariant.
54
+ * grotesk (Plus Jakarta Sans) + mono (JetBrains Mono) are ADDED at the shared guide values —
55
+ * byte-identical to portal `FONT_SLOT_STACKS`, this package's `RENDER_BLOCK_FONT_STACKS`, and the
56
+ * Liquid twin's added branches — so card == modal holds for them too. A raw family string in a
57
+ * `font-family` CSS var is a CSS-injection surface AND breaks the "CertREV hosts no fonts" invariant,
58
+ * so the enum → stack indirection is the security boundary.
55
59
  */
56
60
  export const FONT_STACKS = {
57
61
  sans: "'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif",
58
62
  serif: "'Playfair Display', Georgia, 'Times New Roman', serif",
59
63
  system: "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
64
+ grotesk: "'Plus Jakarta Sans', system-ui, Helvetica, Arial, sans-serif",
65
+ mono: "'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace",
60
66
  };
61
67
  /** The badge fields a render-def may SUBTRACTIVELY hide (brand-toggleable, free). */
62
68
  export const HIDEABLE_FIELDS = ['reviewerPhoto', 'memo'];
@@ -128,8 +134,10 @@ export function isFieldHidden(def, id) {
128
134
  // above (which the legacy `<CertBadge>` uses): it mirrors the portal's FULL
129
135
  // five-member `FontSlot` enum + the pre-computed `accentFg` ink, so the block can
130
136
  // reproduce the guide's four-font design (DM Sans body, Playfair memo, JetBrains
131
- // mono labels, Plus Jakarta wordmark). It is kept DISTINCT from `FONT_SLOTS` /
132
- // `FONT_STACKS` above so the legacy badge's three-slot contract stays byte-frozen.
137
+ // mono labels, Plus Jakarta wordmark). Its STACKS stay DISTINCT from `FONT_STACKS`
138
+ // above: both maps now span the same five `FontSlot`s, but `FONT_STACKS` pins
139
+ // sans/serif/system to the legacy Liquid table (the card==modal invariant) while this
140
+ // map pins them to the guide table; grotesk/mono are byte-identical across both.
133
141
  /**
134
142
  * The full portal font-slot enum (mirrors portal `src/lib/design-guide/tokens.ts`
135
143
  * `FONT_SLOTS`). `grotesk` ⇐ the guide's wordmark slot; `mono` ⇐ the label slot.
@@ -1 +1 @@
1
- {"version":3,"file":"render-def.js","sourceRoot":"","sources":["../../src/components/render-def.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,gFAAgF;AAChF,6EAA6E;AAC7E,gFAAgF;AAEhF,gFAAgF;AAChF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAA;AAG9D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAAuC;IAC9D,IAAI,EAAE,qEAAqE;IAC3E,KAAK,EAAE,uDAAuD;IAC9D,MAAM,EAAE,8EAA8E;CACtF,CAAA;AAUD,qFAAqF;AACrF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,eAAe,EAAE,MAAM,CAAU,CAAA;AAoBjE,gFAAgF;AAChF,2EAA2E;AAC3E,gFAAgF;AAEhF,gFAAgF;AAChF,MAAM,UAAU,GAAG,sCAAsC,CAAA;AAEzD,yFAAyF;AACzF,MAAM,MAAM,GAAG,gDAAgD,CAAA;AAE/D,oGAAoG;AACpG,MAAM,UAAU,gBAAgB,CAAC,KA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kBAAkB,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAA;IAC1E,IAAI,KAAK,CAAC,SAAS;QAAE,GAAG,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAA;IAClE,OAAO,GAAG,CAAA;AACX,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@certrev/cert-block",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "Headless / crypto_verify render edge for the CertREV CertDeliveryEnvelope. SSR-safe React components (<CertBadge>/<ExpertBio>/<CertRevBacklink>), a deterministic schema.org JSON-LD projector, a fail-closed verify layer over the shared VerdictKernel, and a framework-agnostic <certrev-badge> Web Component. Sign once (portal), render everywhere (Hydrogen / Next / Builder / universal embed).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -35,7 +35,8 @@
35
35
  "files": [
36
36
  "dist",
37
37
  "src",
38
- "README.md"
38
+ "README.md",
39
+ "CHANGELOG.md"
39
40
  ],
40
41
  "publishConfig": {
41
42
  "registry": "https://registry.npmjs.org",
@@ -51,8 +52,10 @@
51
52
  "typecheck": "tsc --noEmit",
52
53
  "test": "vitest run"
53
54
  },
55
+ "dependencies": {
56
+ "@certrev/cert-contract": "^0.5.0"
57
+ },
54
58
  "peerDependencies": {
55
- "@certrev/cert-contract": ">=0.5.0",
56
59
  "react": ">=18.0.0"
57
60
  },
58
61
  "peerDependenciesMeta": {
@@ -61,7 +64,6 @@
61
64
  }
62
65
  },
63
66
  "devDependencies": {
64
- "@certrev/cert-contract": "workspace:*",
65
67
  "@testing-library/react": "^16.1.0",
66
68
  "@types/node": "^20.0.0",
67
69
  "@types/react": "^18.3.0",
@@ -51,7 +51,7 @@ const THEMED: ResolvedBlockTheme = {
51
51
  }
52
52
 
53
53
  /**
54
- * A v2 brand-ink themed brand (e.l.f.-shaped): a black seal bar + near-black free-content ink on
54
+ * A v2 brand-ink themed brand: a black seal bar + near-black free-content ink on
55
55
  * top of the accent/surface/corner/font theming. `barInkFg` is DERIVED at the edge from `barInk`
56
56
  * (accentFg('#000000') = '#ffffff'), so it need not be supplied here.
57
57
  */
@@ -67,9 +67,9 @@ describe('token validators (mirror portal src/lib/design-guide/tokens.ts)', () =
67
67
  for (const bad of ['12', '12 px', 'calc(1px)', '1px 2px', '', 'px', '-4px']) expect(isCornerRadius(bad)).toBe(false)
68
68
  })
69
69
 
70
- it('isFontSlot admits only the three enum members', () => {
71
- for (const ok of ['sans', 'serif', 'system']) expect(isFontSlot(ok)).toBe(true)
72
- for (const bad of ['mono', 'Arial', '', 'SANS']) expect(isFontSlot(bad)).toBe(false)
70
+ it('isFontSlot admits the five enum members', () => {
71
+ for (const ok of ['sans', 'serif', 'system', 'grotesk', 'mono']) expect(isFontSlot(ok)).toBe(true)
72
+ for (const bad of ['Arial', '', 'SANS', 'wingdings']) expect(isFontSlot(bad)).toBe(false)
73
73
  })
74
74
  })
75
75
 
@@ -78,6 +78,10 @@ describe('FONT_STACKS — byte-identical to the Shopify Liquid engine literals',
78
78
  expect(FONT_STACKS.sans).toBe("'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif")
79
79
  expect(FONT_STACKS.serif).toBe("'Playfair Display', Georgia, 'Times New Roman', serif")
80
80
  expect(FONT_STACKS.system).toBe("system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif")
81
+ // grotesk/mono added at the shared guide values — byte-identical to RENDER_BLOCK_FONT_STACKS
82
+ // and the portal FONT_SLOT_STACKS, so the modal + Liquid card paint the same typography.
83
+ expect(FONT_STACKS.grotesk).toBe("'Plus Jakarta Sans', system-ui, Helvetica, Arial, sans-serif")
84
+ expect(FONT_STACKS.mono).toBe("'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace")
81
85
  })
82
86
  })
83
87
 
@@ -96,13 +100,18 @@ describe('resolveRenderTheme — validates + drops (fail-safe)', () => {
96
100
  })
97
101
  })
98
102
 
103
+ it('resolves the ADDED grotesk/mono slots to their FONT_STACKS families (the modal themes all five)', () => {
104
+ expect(resolveRenderTheme({ tokens: { fontSlot: 'grotesk' } }).fontStack).toBe(FONT_STACKS.grotesk)
105
+ expect(resolveRenderTheme({ tokens: { fontSlot: 'mono' } }).fontStack).toBe(FONT_STACKS.mono)
106
+ })
107
+
99
108
  it('DROPS every invalid token (alpha surface, function accent, calc radius, unknown slot)', () => {
100
109
  const resolved = resolveRenderTheme({
101
110
  tokens: {
102
111
  accentColor: 'rgb(0,0,0)',
103
112
  surface: '#ffffffaa',
104
113
  cornerRadius: 'calc(1px)',
105
- fontSlot: 'mono' as FontSlot,
114
+ fontSlot: 'wingdings' as FontSlot,
106
115
  },
107
116
  version: 2,
108
117
  })
@@ -251,7 +260,7 @@ describe('renderBadgeHtml themed (the crawlable string path)', () => {
251
260
  accentColor: 'rgb(0,0,0)',
252
261
  surface: '#ffffffaa',
253
262
  cornerRadius: 'calc(1px)',
254
- fontSlot: 'mono' as FontSlot,
263
+ fontSlot: 'wingdings' as FontSlot,
255
264
  },
256
265
  },
257
266
  })
@@ -73,6 +73,7 @@ import {
73
73
  BUILDER_REGISTRATION,
74
74
  type BuilderCertChromeData,
75
75
  CERT_COMPONENT_NAME,
76
+ certRevCertComponent,
76
77
  CertReviewCard,
77
78
  WIRE_INPUTS,
78
79
  } from '../index.js'
@@ -89,6 +90,24 @@ describe('POR-10721 W3 — Builder kit contract lock (inputs ⇄ wire-type parit
89
90
  })
90
91
  })
91
92
 
93
+ describe('POR-10721 — certRevCertComponent (the drop-in gen2 registration)', () => {
94
+ it('carries the identical W3-locked registration as BUILDER_REGISTRATION (name/component/inputs)', () => {
95
+ expect(certRevCertComponent.name).toBe(CERT_COMPONENT_NAME)
96
+ expect(certRevCertComponent.component).toBe(CertReviewCard)
97
+ expect(certRevCertComponent.inputs).toEqual([...BUILDER_REGISTRATION.inputs])
98
+ })
99
+ it('inputs is a FRESH mutable array — never the canonical readonly instance', () => {
100
+ expect(certRevCertComponent.inputs).not.toBe(BUILDER_REGISTRATION.inputs)
101
+ expect(Object.isFrozen(certRevCertComponent.inputs)).toBe(false)
102
+ })
103
+ it('wire inputs sit under the editor "Advanced" reveal; placement inputs stay front-and-center', () => {
104
+ const byName = new Map(certRevCertComponent.inputs.map((i) => [i.name, i]))
105
+ for (const k of BUILDER_CERT_CHROME_KEYS) expect(byName.get(k)?.advanced).toBe(true)
106
+ expect(byName.get('mode')?.advanced).toBeUndefined()
107
+ expect(byName.get('part')?.advanced).toBeUndefined()
108
+ })
109
+ })
110
+
92
111
  describe('POR-10721 W1 — CertReviewCard render + the fused-credential R1 gate', () => {
93
112
  const base: Partial<BuilderCertChromeData> = {
94
113
  reviewerName: 'Dr. Jane Doe',
@@ -4,7 +4,7 @@
4
4
  * ─────────────────────────────────────────────────────────────────────────────
5
5
  *
6
6
  * The brand-render projection of the cert envelope (portal POR-10091) — the OPTIONS
7
- * of a brand's native cert component (e.g. e.l.f.'s registered `CertReviewCard`) on
7
+ * of a brand's native cert component (the registered `CertReviewCard`) on
8
8
  * a headless blocks-mode entry (Builder.io). CertREV serves the data + the ready-made
9
9
  * strings; the brand renders it within the design-guide ladder (enforced live by the
10
10
  * crawl monitor + the MSA anti-stripping teeth).
@@ -3,7 +3,7 @@
3
3
  * `CertReviewCard` — the ready-to-register Builder.io PUSH cert component (W1)
4
4
  * ─────────────────────────────────────────────────────────────────────────────
5
5
  *
6
- * A headless brand (e.l.f.) registers `BUILDER_REGISTRATION` in its Builder
6
+ * A headless brand registers `certRevCertComponent` in its Builder
7
7
  * `customComponents` and CertREV's exporter emits a block whose options are the
8
8
  * `BuilderCertChromeData` projection — so the visible cert chrome renders itself,
9
9
  * design-identical to the Shopify Liquid + WordPress PHP faces (same `renderCertBlock`
@@ -112,6 +112,8 @@ export interface BuilderInput {
112
112
  readonly type: 'string' | 'longText' | 'object' | 'boolean' | 'number'
113
113
  readonly friendlyName?: string
114
114
  readonly helperText?: string
115
+ /** Tucks the input under the editor's "Advanced" reveal (Builder's `Input.advanced`). */
116
+ readonly advanced?: boolean
115
117
  }
116
118
 
117
119
  /** Builder input TYPE per wire-type key — the exporter serializes these option values. */
@@ -145,6 +147,9 @@ const WIRE_INPUT_TYPE: Record<(typeof BUILDER_CERT_CHROME_KEYS)[number], Builder
145
147
  export const WIRE_INPUTS: readonly BuilderInput[] = BUILDER_CERT_CHROME_KEYS.map((name) => ({
146
148
  name,
147
149
  type: WIRE_INPUT_TYPE[name],
150
+ // Exporter-populated wire fields: collapsed under the editor's "Advanced" reveal so the
151
+ // Options tab leads with the two placement choices an editor actually makes (mode/part).
152
+ advanced: true,
148
153
  }))
149
154
 
150
155
  /** Placement inputs — chosen by the entry/editor, NOT emitted by the exporter (not wire-type keys). */
@@ -166,8 +171,11 @@ export interface CertBlockBuilderRegistration {
166
171
  }
167
172
 
168
173
  /**
169
- * Ready to spread into a brand's Builder `customComponents`:
170
- * `Builder.registerComponent(BUILDER_REGISTRATION.component, BUILDER_REGISTRATION)`.
174
+ * The canonical registration data (readonly view). Most consumers want
175
+ * `certRevCertComponent` below — drop-in ready for the gen2 SDK's `customComponents`
176
+ * array. This readonly view remains for consumers that build their own entry
177
+ * (`inputs` must be spread — `[...BUILDER_REGISTRATION.inputs]` — because the gen2
178
+ * SDK's `RegisteredComponent.inputs` type is mutable).
171
179
  * The exporter-emitted option keys === these `inputs` === the wire type — locked by W3.
172
180
  */
173
181
  export const BUILDER_REGISTRATION: CertBlockBuilderRegistration = {
@@ -175,3 +183,30 @@ export const BUILDER_REGISTRATION: CertBlockBuilderRegistration = {
175
183
  component: CertReviewCard,
176
184
  inputs: [...PLACEMENT_INPUTS, ...WIRE_INPUTS],
177
185
  }
186
+
187
+ /**
188
+ * Structural shape of the gen2 SDK's `RegisteredComponent` — the subset the PUSH kit
189
+ * populates, with the MUTABLE `inputs` array the SDK's type requires. Declared locally
190
+ * (same pattern as `CertRevBuilderRegistration` on the anchor path) so cert-block needs
191
+ * no Builder dependency; directly assignable at `<Content customComponents={[...]}>`.
192
+ */
193
+ export interface CertReviewCardRegisteredComponent {
194
+ component: typeof CertReviewCard
195
+ name: string
196
+ description?: string
197
+ inputs: BuilderInput[]
198
+ }
199
+
200
+ /**
201
+ * Ready-to-register: `customComponents={[...yourComponents, certRevCertComponent]}` —
202
+ * one import, no re-wrapping, no spread. Carries the identical W3-locked input set as
203
+ * `BUILDER_REGISTRATION` in a FRESH mutable array (the two never share an instance, so
204
+ * an SDK-side mutation can never corrupt the canonical readonly view).
205
+ */
206
+ export const certRevCertComponent: CertReviewCardRegisteredComponent = {
207
+ name: CERT_COMPONENT_NAME,
208
+ component: CertReviewCard,
209
+ description:
210
+ 'CertREV expert-review cert card. Options are populated by the CertREV exporter — editors choose placement (mode/part) only.',
211
+ inputs: [...PLACEMENT_INPUTS, ...WIRE_INPUTS],
212
+ }
@@ -133,8 +133,10 @@ export {
133
133
  type BuilderInput,
134
134
  CERT_COMPONENT_NAME,
135
135
  type CertBlockBuilderRegistration,
136
+ certRevCertComponent,
136
137
  CertReviewCard,
137
138
  type CertReviewCardProps,
139
+ type CertReviewCardRegisteredComponent,
138
140
  PLACEMENT_INPUTS,
139
141
  WIRE_INPUTS,
140
142
  } from './cert-review-card.js'
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * `renderPreviewBlock` — a STATIC, NON-DELIVERY preview of the cert block for pre-sales
3
- * look-demos (POR-10743, from the e.l.f. Builder demo).
3
+ * look-demos (POR-10743, from the Builder demo).
4
4
  *
5
5
  * The visual is BYTE-FOR-BYTE `renderCertBlock` (pixel-parity — "see it on your own site
6
6
  * today"), wrapped in a `[data-certrev-preview]` container carrying a REQUIRED expiry.
@@ -46,21 +46,27 @@
46
46
  // ─────────────────────────────────────────────────────────────────────────────
47
47
 
48
48
  /** The font ENUM. Resolves to a FIXED slot stack — never a free-form family. */
49
- export const FONT_SLOTS = ['sans', 'serif', 'system'] as const
49
+ export const FONT_SLOTS = ['sans', 'serif', 'system', 'grotesk', 'mono'] as const
50
50
  export type FontSlot = (typeof FONT_SLOTS)[number]
51
51
 
52
52
  /**
53
- * The `fontSlot` → fixed font-stack literal. BYTE-IDENTICAL to the Shopify Liquid
54
- * engine's stacks (`shopify/extensions/certrev-schema/snippets/certrev-badge.liquid`
55
- * — the only font families the twins use), so a themed brand's Builder projection
56
- * paints the same typography as its Shopify face. A raw family string in a
57
- * `font-family` CSS var is a CSS-injection surface AND breaks the "CertREV hosts no
58
- * fonts" invariant, so the enum → stack indirection is the security boundary.
53
+ * The `fontSlot` → fixed font-stack literal — the render-def theme map the webcomponent MODAL
54
+ * (`resolveRenderTheme` → `renderBadgeHtml`) and the legacy `<CertBadge>` resolve. The three original
55
+ * slots (sans/serif/system) stay BYTE-IDENTICAL to the Shopify Liquid engine's stacks
56
+ * (`shopify/extensions/certrev-schema/snippets/certrev-badge.liquid`), so a themed brand's popup modal
57
+ * and its inline Liquid card paint the same typography — the load-bearing card==modal invariant.
58
+ * grotesk (Plus Jakarta Sans) + mono (JetBrains Mono) are ADDED at the shared guide values —
59
+ * byte-identical to portal `FONT_SLOT_STACKS`, this package's `RENDER_BLOCK_FONT_STACKS`, and the
60
+ * Liquid twin's added branches — so card == modal holds for them too. A raw family string in a
61
+ * `font-family` CSS var is a CSS-injection surface AND breaks the "CertREV hosts no fonts" invariant,
62
+ * so the enum → stack indirection is the security boundary.
59
63
  */
60
64
  export const FONT_STACKS: Readonly<Record<FontSlot, string>> = {
61
65
  sans: "'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif",
62
66
  serif: "'Playfair Display', Georgia, 'Times New Roman', serif",
63
67
  system: "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
68
+ grotesk: "'Plus Jakarta Sans', system-ui, Helvetica, Arial, sans-serif",
69
+ mono: "'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace",
64
70
  }
65
71
 
66
72
  /** A fully-resolved themeable token set (a brand overrides a subset of these). */
@@ -191,8 +197,10 @@ export function isFieldHidden(def: CertRenderDef | undefined, id: BadgeVisibilit
191
197
  // above (which the legacy `<CertBadge>` uses): it mirrors the portal's FULL
192
198
  // five-member `FontSlot` enum + the pre-computed `accentFg` ink, so the block can
193
199
  // reproduce the guide's four-font design (DM Sans body, Playfair memo, JetBrains
194
- // mono labels, Plus Jakarta wordmark). It is kept DISTINCT from `FONT_SLOTS` /
195
- // `FONT_STACKS` above so the legacy badge's three-slot contract stays byte-frozen.
200
+ // mono labels, Plus Jakarta wordmark). Its STACKS stay DISTINCT from `FONT_STACKS`
201
+ // above: both maps now span the same five `FontSlot`s, but `FONT_STACKS` pins
202
+ // sans/serif/system to the legacy Liquid table (the card==modal invariant) while this
203
+ // map pins them to the guide table; grotesk/mono are byte-identical across both.
196
204
 
197
205
  /**
198
206
  * The full portal font-slot enum (mirrors portal `src/lib/design-guide/tokens.ts`
@@ -263,7 +271,7 @@ export interface ResolvedBlockTheme {
263
271
  readonly fontSlot: RenderBlockFontSlot
264
272
  readonly accentFg: '#141414' | '#ffffff'
265
273
  /**
266
- * V2 chrome-ink (Phase 1, e.l.f.) — the header/seal bar (and floating-pill) FILL. OPTIONAL:
274
+ * V2 chrome-ink (Phase 1) — the header/seal bar (and floating-pill) FILL. OPTIONAL:
267
275
  * present ONLY when the def themes it, so an un-barInk'd face emits nothing extra and the bar
268
276
  * keeps its locked navy/white base (byte-identical). Mirrors the portal's `ThemeTokens.barInk`.
269
277
  */