@invarn/cibuild 2.3.1 → 2.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/dist/cli.cjs +110 -13
- package/dist/src/yaml/steps/structural-facts.d.ts +69 -0
- package/dist/src/yaml/steps/structural-facts.d.ts.map +1 -1
- package/dist/src/yaml/steps/structural-facts.js +0 -0
- package/dist/src/yaml/steps/structural-facts.test.js +314 -2
- package/dist/src/yaml/steps/ui-fidelity-render-android.d.ts.map +1 -1
- package/dist/src/yaml/steps/ui-fidelity-render-android.js +16 -1
- package/dist/src/yaml/steps/ui-fidelity-render-android.test.js +49 -1
- package/package.json +1 -1
|
@@ -58,6 +58,14 @@ export interface LayoutNode {
|
|
|
58
58
|
* before the emitter tracked lines, and on nodes that lay out no text —
|
|
59
59
|
* no signal, never a divergence. */
|
|
60
60
|
textLines?: TextLine[];
|
|
61
|
+
/** The RESOLVED typeface (typeface facts, issue 03): the font that ACTUALLY
|
|
62
|
+
* painted this node's text, post-fallback — NOT the requested
|
|
63
|
+
* TextStyle.fontFamily, which still reads "correct" during a runtime
|
|
64
|
+
* fallback (the incident class the typeface fact exists to catch). Captured
|
|
65
|
+
* via per-glyph shaping (TextRunShaper, API 31+). Absent in dumps from
|
|
66
|
+
* packages generated before the emitter tracked it, on non-text nodes, and
|
|
67
|
+
* whenever the capture could not resolve — no signal, never a divergence. */
|
|
68
|
+
resolvedTypeface?: TypefaceSpec;
|
|
61
69
|
}
|
|
62
70
|
/** One highlighted extent of a text node (an AnnotatedString span style with a
|
|
63
71
|
* specified background). */
|
|
@@ -78,6 +86,12 @@ export interface LayoutDump {
|
|
|
78
86
|
/** The captured canvas / root bounds in px. */
|
|
79
87
|
canvas: LayoutBounds;
|
|
80
88
|
nodes: LayoutNode[];
|
|
89
|
+
/** The Android SDK the proof rendered at (Robolectric testOptions.targetSdk),
|
|
90
|
+
* declared by the emitter. The typeface capture seam (TextRunShaper) is API
|
|
91
|
+
* 31+, so a dump from an older render SDK cannot carry `resolvedTypeface` —
|
|
92
|
+
* consumers use this to advise "typeface not checked" instead of silently
|
|
93
|
+
* passing. Absent in dumps emitted before the field existed. */
|
|
94
|
+
renderSdk?: number;
|
|
81
95
|
}
|
|
82
96
|
export type Edge = 'left' | 'top' | 'right' | 'bottom';
|
|
83
97
|
export type StructuralFact = {
|
|
@@ -327,6 +341,18 @@ export type AppearanceFact = {
|
|
|
327
341
|
rendered: string;
|
|
328
342
|
reference: string;
|
|
329
343
|
}
|
|
344
|
+
/** The RESOLVED typeface (what actually painted, post-fallback) diverges from the
|
|
345
|
+
* design typeface in family or weight. `rendered` is the font that resolved on
|
|
346
|
+
* the render (e.g. a Roboto fallback); `reference` is the design font. The crux
|
|
347
|
+
* is "resolved, not requested": a runtime fallback reads correct at the
|
|
348
|
+
* TextStyle.fontFamily layer, so the requested family can never be the signal. */
|
|
349
|
+
| {
|
|
350
|
+
kind: 'typeface';
|
|
351
|
+
elementId: string;
|
|
352
|
+
channel: 'text';
|
|
353
|
+
rendered: TypefaceSpec;
|
|
354
|
+
reference: TypefaceSpec;
|
|
355
|
+
}
|
|
330
356
|
/** In the reference, not rendered. */
|
|
331
357
|
| {
|
|
332
358
|
kind: 'element_missing';
|
|
@@ -337,6 +363,14 @@ export type AppearanceFact = {
|
|
|
337
363
|
kind: 'element_extra';
|
|
338
364
|
elementId: string;
|
|
339
365
|
};
|
|
366
|
+
/** A resolved or design typeface: a font `family` plus a numeric `weight`
|
|
367
|
+
* (100–900, CSS/OpenType scale). `weight` is optional because a design
|
|
368
|
+
* annotation may name only a family (the weight is then derived from a
|
|
369
|
+
* weight-suffix token on the family, or defaults to 400 Regular). */
|
|
370
|
+
export interface TypefaceSpec {
|
|
371
|
+
family: string;
|
|
372
|
+
weight?: number;
|
|
373
|
+
}
|
|
340
374
|
/**
|
|
341
375
|
* A reference-shaped snapshot of the render's OWN appearance — the element-id
|
|
342
376
|
* set plus per-element text/colors it produced. Persisted in the structural
|
|
@@ -349,6 +383,10 @@ export interface AppearanceRendered {
|
|
|
349
383
|
elementIds: string[];
|
|
350
384
|
text?: TextSource;
|
|
351
385
|
color?: ColorSource;
|
|
386
|
+
/** The resolved typeface per element (issue 03) — what actually painted,
|
|
387
|
+
* post-fallback. Persisted so it serves as the previous-render typeface
|
|
388
|
+
* drift baseline. */
|
|
389
|
+
typeface?: TypefaceSource;
|
|
352
390
|
}
|
|
353
391
|
export interface StructuralAppearance {
|
|
354
392
|
baseline: AppearanceBaseline;
|
|
@@ -356,6 +394,11 @@ export interface StructuralAppearance {
|
|
|
356
394
|
/** The render's own appearance, persisted as the baseline source for the next
|
|
357
395
|
* no-Figma render. Present whenever Signal C ran. */
|
|
358
396
|
rendered?: AppearanceRendered;
|
|
397
|
+
/** Signals a check that could NOT run (never a silent pass): e.g. a typeface
|
|
398
|
+
* reference was supplied but the proof rendered below SDK 31, where the
|
|
399
|
+
* resolved-typeface capture seam does not exist. Standard CI vocabulary
|
|
400
|
+
* (LLM-facing). Absent when every requested check ran. */
|
|
401
|
+
advisories?: string[];
|
|
359
402
|
}
|
|
360
403
|
/**
|
|
361
404
|
* The reference side of the appearance diff, passed into `buildStructuralBlock`.
|
|
@@ -384,6 +427,11 @@ export interface AppearanceReference {
|
|
|
384
427
|
* the design breaks that text element into. When supplied, line facts
|
|
385
428
|
* are derived against the render's per-node `textLines`. */
|
|
386
429
|
lines?: LineSource;
|
|
430
|
+
/** Reference typeface per element id (the DESIGN font from Figma node
|
|
431
|
+
* metadata on the figma baseline; the previous render's resolved font on
|
|
432
|
+
* `previous_render`). When supplied, typeface facts are derived against the
|
|
433
|
+
* render's per-node `resolvedTypeface`. */
|
|
434
|
+
typeface?: TypefaceSource;
|
|
387
435
|
}
|
|
388
436
|
/** The per-screen reference params the runner assembles an `AppearanceReference`
|
|
389
437
|
* from (the slices of `params.reference_*` for one screen). */
|
|
@@ -399,6 +447,9 @@ export interface AppearanceReferenceParams {
|
|
|
399
447
|
refSpans?: SpanSource | null;
|
|
400
448
|
/** Per-screen `reference_lines` (declared line split per element id). */
|
|
401
449
|
refLines?: LineSource | null;
|
|
450
|
+
/** Per-screen `reference_typeface` (the DESIGN font per element id, built by
|
|
451
|
+
* the caller from Figma node metadata — typeface issue 04). */
|
|
452
|
+
refTypeface?: TypefaceSource | null;
|
|
402
453
|
baseline: AppearanceBaseline;
|
|
403
454
|
}
|
|
404
455
|
/**
|
|
@@ -550,6 +601,23 @@ export declare function ciede2000(lab1: Lab, lab2: Lab): number;
|
|
|
550
601
|
* is a later, separately-wired concern.
|
|
551
602
|
*/
|
|
552
603
|
export declare function deriveColorFacts(rendered: ColorSource, reference: ColorSource): AppearanceFact[];
|
|
604
|
+
/** One element's resolved/design typeface, by the (single) text channel. */
|
|
605
|
+
export type TypefaceSource = Record<string, TypefaceSpec | undefined>;
|
|
606
|
+
/**
|
|
607
|
+
* Typeface facts from the per-element comparison of the RESOLVED render font vs the
|
|
608
|
+
* DESIGN reference font, keyed on the stable element id shared with Signal B. For
|
|
609
|
+
* each element the reference declares a typeface for and the render also resolved
|
|
610
|
+
* one: normalize both (family-name + weight-encoding) and emit a `typeface` fact
|
|
611
|
+
* when the normalized family OR weight differs. A normalization-equivalent pair
|
|
612
|
+
* ("Poppins-SemiBold" vs "Poppins" + 600) yields no fact. A missing rendered or
|
|
613
|
+
* reference font for an element is no signal → no fact (graceful, no false
|
|
614
|
+
* positive). The fact carries the raw `rendered`/`reference` specs as given, so the
|
|
615
|
+
* finding names the actual fonts.
|
|
616
|
+
*
|
|
617
|
+
* Pure and platform-agnostic; order-independent and deterministic (output sorted by
|
|
618
|
+
* element id). Measurement only — significance is a later, separately-wired concern.
|
|
619
|
+
*/
|
|
620
|
+
export declare function deriveTypefaceFacts(rendered: TypefaceSource, reference: TypefaceSource): AppearanceFact[];
|
|
553
621
|
/**
|
|
554
622
|
* Assemble the inline `structural` block (ADR-0004): Signal-A facts always, plus
|
|
555
623
|
* the Signal-B geometry block when `referenceGeometry` is supplied. Size (w/h)
|
|
@@ -639,6 +707,7 @@ export declare function getGeometryStageInternals(): {
|
|
|
639
707
|
deriveSpanFacts: (rendered: RenderedSpans, reference: SpanSource) => AppearanceFact[];
|
|
640
708
|
deriveLineFacts: (rendered: RenderedLines, reference: LineSource) => AppearanceFact[];
|
|
641
709
|
deriveColorFacts: (rendered: ColorSource, reference: ColorSource) => AppearanceFact[];
|
|
710
|
+
deriveTypefaceFacts: (rendered: TypefaceSource, reference: TypefaceSource) => AppearanceFact[];
|
|
642
711
|
buildAppearanceReferenceFromParams: (params: AppearanceReferenceParams) => AppearanceReference | null;
|
|
643
712
|
ciede2000: (lab1: Lab, lab2: Lab) => number;
|
|
644
713
|
hexToLab: (hex: string) => Lab;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structural-facts.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/structural-facts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,oDAAoD;IACpD,EAAE,EAAE,MAAM,CAAC;IACX;6CACyC;IACzC,MAAM,EAAE,YAAY,CAAC;IACrB;;;+EAG2E;IAC3E,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;oFACgF;IAChF,aAAa,EAAE,OAAO,CAAC;IAKvB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;sCAIkC;IAClC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB;;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C5C,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,GAAG,CAAC;CAChC,CAOA"}
|
|
Binary file
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* overflowing voucher tag; the deriver must surface the bottom clip as a
|
|
9
9
|
* fact so it is never again skipped by eye.
|
|
10
10
|
*/
|
|
11
|
-
import { deriveStructuralFacts, derivePresenceFacts, deriveCopyFacts, deriveSpanFacts, deriveLineFacts, deriveColorFacts, ciede2000, hexToLab, diffKeyGeometry, buildStructuralBlock, buildReviewScaffold, appearanceReferenceFromPreviousRender, buildAppearanceReferenceFromParams, getStructuralFactsStageInternals, getGeometryStageInternals, } from './structural-facts.js';
|
|
11
|
+
import { deriveStructuralFacts, derivePresenceFacts, deriveCopyFacts, deriveSpanFacts, deriveLineFacts, deriveColorFacts, deriveTypefaceFacts, ciede2000, hexToLab, diffKeyGeometry, buildStructuralBlock, buildReviewScaffold, appearanceReferenceFromPreviousRender, buildAppearanceReferenceFromParams, getStructuralFactsStageInternals, getGeometryStageInternals, } from './structural-facts.js';
|
|
12
12
|
// 200x400 canvas in px for all fixtures unless noted.
|
|
13
13
|
const CANVAS = { left: 0, top: 0, right: 200, bottom: 400 };
|
|
14
14
|
describe('deriveStructuralFacts — containment', () => {
|
|
@@ -743,6 +743,57 @@ describe('deriveLineFacts — declared line split vs rendered laid-out lines', (
|
|
|
743
743
|
]);
|
|
744
744
|
});
|
|
745
745
|
});
|
|
746
|
+
describe('deriveTypefaceFacts — resolved vs design typeface per element', () => {
|
|
747
|
+
test('a family mismatch yields one typeface fact carrying both fonts', () => {
|
|
748
|
+
const facts = deriveTypefaceFacts({ code: { family: 'Roboto', weight: 400 } }, { code: { family: 'Poppins', weight: 600 } });
|
|
749
|
+
expect(facts).toEqual([
|
|
750
|
+
{
|
|
751
|
+
kind: 'typeface',
|
|
752
|
+
elementId: 'code',
|
|
753
|
+
channel: 'text',
|
|
754
|
+
rendered: { family: 'Roboto', weight: 400 },
|
|
755
|
+
reference: { family: 'Poppins', weight: 600 },
|
|
756
|
+
},
|
|
757
|
+
]);
|
|
758
|
+
});
|
|
759
|
+
test('a weight mismatch on the same family yields a typeface fact', () => {
|
|
760
|
+
const facts = deriveTypefaceFacts({ code: { family: 'Poppins', weight: 400 } }, { code: { family: 'Poppins', weight: 600 } });
|
|
761
|
+
expect(facts).toHaveLength(1);
|
|
762
|
+
expect(facts[0]).toMatchObject({ kind: 'typeface', elementId: 'code', channel: 'text' });
|
|
763
|
+
});
|
|
764
|
+
test('an exact family+weight match produces no fact', () => {
|
|
765
|
+
expect(deriveTypefaceFacts({ code: { family: 'Poppins', weight: 600 } }, { code: { family: 'Poppins', weight: 600 } })).toEqual([]);
|
|
766
|
+
});
|
|
767
|
+
test('a normalization-equivalent pair produces no fact (suffix-encoded weight vs numeric, case, separators)', () => {
|
|
768
|
+
// design names "Poppins-SemiBold"; render resolved "Poppins" weight 600 — same font.
|
|
769
|
+
expect(deriveTypefaceFacts({ code: { family: 'Poppins', weight: 600 } }, { code: { family: 'Poppins-SemiBold' } })).toEqual([]);
|
|
770
|
+
// resource-name encoding "fira_sans_medium" vs design "Fira Sans" weight 500.
|
|
771
|
+
expect(deriveTypefaceFacts({ code: { family: 'fira_sans_medium' } }, { code: { family: 'Fira Sans', weight: 500 } })).toEqual([]);
|
|
772
|
+
// pure case difference on the family.
|
|
773
|
+
expect(deriveTypefaceFacts({ code: { family: 'POPPINS', weight: 600 } }, { code: { family: 'poppins', weight: 600 } })).toEqual([]);
|
|
774
|
+
});
|
|
775
|
+
test('a suffix-encoded family that disagrees on weight still flags', () => {
|
|
776
|
+
// design "Poppins-SemiBold" (→600) vs resolved "Poppins" Regular (400) — a real
|
|
777
|
+
// weight fallback the suffix normalization must NOT mask.
|
|
778
|
+
const facts = deriveTypefaceFacts({ code: { family: 'Poppins', weight: 400 } }, { code: { family: 'Poppins-SemiBold' } });
|
|
779
|
+
expect(facts).toHaveLength(1);
|
|
780
|
+
expect(facts[0]).toMatchObject({ kind: 'typeface', elementId: 'code' });
|
|
781
|
+
});
|
|
782
|
+
test('a missing rendered or reference font produces no fact (graceful, no false positive)', () => {
|
|
783
|
+
// reference declares a font the render never resolved → no signal → no fact
|
|
784
|
+
expect(deriveTypefaceFacts({ code: undefined }, { code: { family: 'Poppins', weight: 600 } })).toEqual([]);
|
|
785
|
+
expect(deriveTypefaceFacts({ code: { family: '' } }, { code: { family: 'Poppins', weight: 600 } })).toEqual([]);
|
|
786
|
+
// render resolved a font the reference never declared → no reference signal → no fact
|
|
787
|
+
expect(deriveTypefaceFacts({ code: { family: 'Roboto', weight: 400 } }, {})).toEqual([]);
|
|
788
|
+
expect(deriveTypefaceFacts({ code: { family: 'Roboto', weight: 400 } }, { code: { family: '' } })).toEqual([]);
|
|
789
|
+
});
|
|
790
|
+
test('result is order-independent and deterministic (sorted by element id)', () => {
|
|
791
|
+
const a = deriveTypefaceFacts({ b: { family: 'Roboto', weight: 400 }, a: { family: 'Arial', weight: 400 } }, { a: { family: 'Poppins', weight: 600 }, b: { family: 'Roboto', weight: 400 } });
|
|
792
|
+
const b = deriveTypefaceFacts({ a: { family: 'Arial', weight: 400 }, b: { family: 'Roboto', weight: 400 } }, { b: { family: 'Roboto', weight: 400 }, a: { family: 'Poppins', weight: 600 } });
|
|
793
|
+
expect(a).toEqual(b);
|
|
794
|
+
expect(a.map((f) => f.elementId)).toEqual(['a']);
|
|
795
|
+
});
|
|
796
|
+
});
|
|
746
797
|
describe('buildStructuralBlock — appearance container (Signal C, additive)', () => {
|
|
747
798
|
test('no appearanceReference → no appearance container; facts + geometry unchanged', () => {
|
|
748
799
|
const withC = buildStructuralBlock(HUB_PROMO_DUMP, HUB_PROMO_REFERENCE, 2);
|
|
@@ -960,6 +1011,117 @@ describe('buildStructuralBlock — appearance container (Signal C, additive)', (
|
|
|
960
1011
|
const block = buildStructuralBlock(COLOR_DUMP, null, 2);
|
|
961
1012
|
expect(block.appearance).toBeUndefined();
|
|
962
1013
|
});
|
|
1014
|
+
// ---- Signal C typeface facts (resolved vs design font, issue 03) ----
|
|
1015
|
+
// A dump whose text node carries the resolved-typeface enrichment (issue 03):
|
|
1016
|
+
// the font that ACTUALLY painted, post-fallback — here a Roboto fallback where
|
|
1017
|
+
// the design wants Poppins SemiBold. The dump also declares the render SDK the
|
|
1018
|
+
// proof ran at (TextRunShaper, the capture seam, is API 31+).
|
|
1019
|
+
const TYPEFACE_DUMP = {
|
|
1020
|
+
canvas: { left: 0, top: 0, right: 200, bottom: 400 },
|
|
1021
|
+
renderSdk: 34,
|
|
1022
|
+
nodes: [
|
|
1023
|
+
{
|
|
1024
|
+
id: 'code',
|
|
1025
|
+
bounds: { left: 0, top: 0, right: 100, bottom: 20 },
|
|
1026
|
+
parentId: null,
|
|
1027
|
+
clipsChildren: false,
|
|
1028
|
+
text: 'INV-50',
|
|
1029
|
+
resolvedTypeface: { family: 'Roboto', weight: 400 },
|
|
1030
|
+
},
|
|
1031
|
+
],
|
|
1032
|
+
};
|
|
1033
|
+
test('with a reference typeface → a typeface fact fires on divergence and the resolved font is persisted (issue 03)', () => {
|
|
1034
|
+
const block = buildStructuralBlock(TYPEFACE_DUMP, null, 2, undefined, {
|
|
1035
|
+
baseline: 'figma',
|
|
1036
|
+
elementIds: ['code'],
|
|
1037
|
+
typeface: { code: { family: 'Poppins', weight: 600 } },
|
|
1038
|
+
});
|
|
1039
|
+
expect(block.appearance?.facts).toEqual([
|
|
1040
|
+
{
|
|
1041
|
+
kind: 'typeface',
|
|
1042
|
+
elementId: 'code',
|
|
1043
|
+
channel: 'text',
|
|
1044
|
+
rendered: { family: 'Roboto', weight: 400 },
|
|
1045
|
+
reference: { family: 'Poppins', weight: 600 },
|
|
1046
|
+
},
|
|
1047
|
+
]);
|
|
1048
|
+
expect(block.appearance?.rendered?.typeface).toEqual({ code: { family: 'Roboto', weight: 400 } });
|
|
1049
|
+
});
|
|
1050
|
+
test('a matching resolved typeface → no fact; the snapshot still persists the resolved font (issue 03)', () => {
|
|
1051
|
+
const block = buildStructuralBlock(TYPEFACE_DUMP, null, 2, undefined, {
|
|
1052
|
+
baseline: 'figma',
|
|
1053
|
+
elementIds: ['code'],
|
|
1054
|
+
typeface: { code: { family: 'Roboto', weight: 400 } },
|
|
1055
|
+
});
|
|
1056
|
+
expect(block.appearance?.facts).toEqual([]);
|
|
1057
|
+
expect(block.appearance?.rendered?.typeface).toEqual({ code: { family: 'Roboto', weight: 400 } });
|
|
1058
|
+
});
|
|
1059
|
+
test('a node without the enrichment yields no typeface signal and no snapshot entry (old packages degrade gracefully)', () => {
|
|
1060
|
+
const block = buildStructuralBlock(COPY_DUMP, null, 2, undefined, {
|
|
1061
|
+
baseline: 'figma',
|
|
1062
|
+
elementIds: ['title'],
|
|
1063
|
+
typeface: { title: { family: 'Poppins', weight: 600 } },
|
|
1064
|
+
});
|
|
1065
|
+
expect(block.appearance?.facts).toEqual([]);
|
|
1066
|
+
expect(block.appearance?.rendered?.typeface).toBeUndefined();
|
|
1067
|
+
});
|
|
1068
|
+
test('a render SDK below 31 omits typeface facts AND carries the advisory — never a silent pass (issue 03)', () => {
|
|
1069
|
+
const oldSdkDump = {
|
|
1070
|
+
canvas: { left: 0, top: 0, right: 200, bottom: 400 },
|
|
1071
|
+
renderSdk: 28,
|
|
1072
|
+
nodes: [
|
|
1073
|
+
{ id: 'code', bounds: { left: 0, top: 0, right: 100, bottom: 20 }, parentId: null, clipsChildren: false, text: 'INV-50' },
|
|
1074
|
+
],
|
|
1075
|
+
};
|
|
1076
|
+
const block = buildStructuralBlock(oldSdkDump, null, 2, undefined, {
|
|
1077
|
+
baseline: 'figma',
|
|
1078
|
+
elementIds: ['code'],
|
|
1079
|
+
typeface: { code: { family: 'Poppins', weight: 600 } },
|
|
1080
|
+
});
|
|
1081
|
+
expect(block.appearance?.facts).toEqual([]);
|
|
1082
|
+
expect(block.appearance?.advisories).toEqual([
|
|
1083
|
+
'typeface check requires render SDK >= 31; this proof rendered at SDK 28 — typeface facts were not derived (not checked, not passing)',
|
|
1084
|
+
]);
|
|
1085
|
+
});
|
|
1086
|
+
test('a render SDK below 31 without a typeface reference carries no advisory (nothing was checkable)', () => {
|
|
1087
|
+
const oldSdkDump = {
|
|
1088
|
+
canvas: { left: 0, top: 0, right: 200, bottom: 400 },
|
|
1089
|
+
renderSdk: 28,
|
|
1090
|
+
nodes: [
|
|
1091
|
+
{ id: 'code', bounds: { left: 0, top: 0, right: 100, bottom: 20 }, parentId: null, clipsChildren: false },
|
|
1092
|
+
],
|
|
1093
|
+
};
|
|
1094
|
+
const block = buildStructuralBlock(oldSdkDump, null, 2, undefined, {
|
|
1095
|
+
baseline: 'figma',
|
|
1096
|
+
elementIds: ['code'],
|
|
1097
|
+
});
|
|
1098
|
+
expect(block.appearance?.advisories).toBeUndefined();
|
|
1099
|
+
});
|
|
1100
|
+
test('a render SDK >= 31 or an undeclared one carries no advisory; facts derive normally', () => {
|
|
1101
|
+
// Declared modern SDK → facts derive, no advisory.
|
|
1102
|
+
const modern = buildStructuralBlock(TYPEFACE_DUMP, null, 2, undefined, {
|
|
1103
|
+
baseline: 'figma',
|
|
1104
|
+
elementIds: ['code'],
|
|
1105
|
+
typeface: { code: { family: 'Poppins', weight: 600 } },
|
|
1106
|
+
});
|
|
1107
|
+
expect(modern.appearance?.advisories).toBeUndefined();
|
|
1108
|
+
expect(modern.appearance?.facts).toHaveLength(1);
|
|
1109
|
+
// Undeclared SDK (an old package's dump): no advisory, derivation still runs
|
|
1110
|
+
// (it just finds no rendered typefaces → no facts, the graceful path).
|
|
1111
|
+
const undeclared = {
|
|
1112
|
+
canvas: { left: 0, top: 0, right: 200, bottom: 400 },
|
|
1113
|
+
nodes: [
|
|
1114
|
+
{ id: 'code', bounds: { left: 0, top: 0, right: 100, bottom: 20 }, parentId: null, clipsChildren: false },
|
|
1115
|
+
],
|
|
1116
|
+
};
|
|
1117
|
+
const block = buildStructuralBlock(undeclared, null, 2, undefined, {
|
|
1118
|
+
baseline: 'figma',
|
|
1119
|
+
elementIds: ['code'],
|
|
1120
|
+
typeface: { code: { family: 'Poppins', weight: 600 } },
|
|
1121
|
+
});
|
|
1122
|
+
expect(block.appearance?.advisories).toBeUndefined();
|
|
1123
|
+
expect(block.appearance?.facts).toEqual([]);
|
|
1124
|
+
});
|
|
963
1125
|
});
|
|
964
1126
|
// ---- Signal C: previous-render → AppearanceReference mapper (issue 01) ----
|
|
965
1127
|
//
|
|
@@ -1008,6 +1170,47 @@ describe('appearanceReferenceFromPreviousRender — previous render snapshot →
|
|
|
1008
1170
|
text: { copy: 'Get 5 € off your first order placed by 1 lug 2026.' },
|
|
1009
1171
|
});
|
|
1010
1172
|
});
|
|
1173
|
+
test('a previous render with per-element resolved typefaces → the mapper carries typeface into the reference (typeface issue 05)', () => {
|
|
1174
|
+
// The previous render's RESOLVED font becomes the drift reference: a
|
|
1175
|
+
// previously-correct element that silently falls back on a later build then
|
|
1176
|
+
// diverges from its own prior snapshot and is flagged.
|
|
1177
|
+
const previous = {
|
|
1178
|
+
elementIds: ['banner', 'code'],
|
|
1179
|
+
typeface: { code: { family: 'poppins_semibold', weight: 600 } },
|
|
1180
|
+
};
|
|
1181
|
+
expect(appearanceReferenceFromPreviousRender(previous)).toEqual({
|
|
1182
|
+
baseline: 'previous_render',
|
|
1183
|
+
elementIds: ['banner', 'code'],
|
|
1184
|
+
typeface: { code: { family: 'poppins_semibold', weight: 600 } },
|
|
1185
|
+
});
|
|
1186
|
+
// An empty typeface map is no signal on that axis — not carried.
|
|
1187
|
+
expect(appearanceReferenceFromPreviousRender({ elementIds: ['banner'], typeface: {} })).toEqual({ baseline: 'previous_render', elementIds: ['banner'] });
|
|
1188
|
+
});
|
|
1189
|
+
test('fed into buildStructuralBlock, a typeface that drifts from the previous render yields a previous_render typeface fact (typeface issue 05)', () => {
|
|
1190
|
+
const dump = {
|
|
1191
|
+
canvas: { left: 0, top: 0, right: 343, bottom: 72 },
|
|
1192
|
+
renderSdk: 34,
|
|
1193
|
+
nodes: [
|
|
1194
|
+
{ id: 'code', bounds: { left: 0, top: 0, right: 343, bottom: 40 }, parentId: null, clipsChildren: false, text: 'INV-50', resolvedTypeface: { family: 'Roboto-Regular', weight: 400 } },
|
|
1195
|
+
],
|
|
1196
|
+
};
|
|
1197
|
+
const previous = {
|
|
1198
|
+
elementIds: ['code'],
|
|
1199
|
+
typeface: { code: { family: 'poppins_semibold' } },
|
|
1200
|
+
};
|
|
1201
|
+
const block = buildStructuralBlock(dump, null, 2, undefined, appearanceReferenceFromPreviousRender(previous));
|
|
1202
|
+
expect(block.appearance?.baseline).toBe('previous_render');
|
|
1203
|
+
const typefaceFacts = (block.appearance?.facts ?? []).filter((f) => f.kind === 'typeface');
|
|
1204
|
+
expect(typefaceFacts).toEqual([
|
|
1205
|
+
{
|
|
1206
|
+
kind: 'typeface',
|
|
1207
|
+
elementId: 'code',
|
|
1208
|
+
channel: 'text',
|
|
1209
|
+
rendered: { family: 'Roboto-Regular', weight: 400 },
|
|
1210
|
+
reference: { family: 'poppins_semibold' },
|
|
1211
|
+
},
|
|
1212
|
+
]);
|
|
1213
|
+
});
|
|
1011
1214
|
test('a previous render with both color and text → the reference carries both maps (issue 03)', () => {
|
|
1012
1215
|
const previous = {
|
|
1013
1216
|
elementIds: ['banner', 'copy'],
|
|
@@ -1256,9 +1459,54 @@ describe('buildAppearanceReferenceFromParams — union of geometry/text/color id
|
|
|
1256
1459
|
lines: { promoCopy: ['Get 5 EUR off', 'placed by tomorrow.'] },
|
|
1257
1460
|
});
|
|
1258
1461
|
});
|
|
1462
|
+
test('typeface only (no geometry/text/color) → a reference carrying typeface, ids from the typeface keys (typeface issue 04)', () => {
|
|
1463
|
+
const ref = buildAppearanceReferenceFromParams({
|
|
1464
|
+
refTypeface: { code: { family: 'Poppins', weight: 600 } },
|
|
1465
|
+
baseline: 'figma',
|
|
1466
|
+
});
|
|
1467
|
+
expect(ref).toEqual({
|
|
1468
|
+
baseline: 'figma',
|
|
1469
|
+
elementIds: ['code'],
|
|
1470
|
+
typeface: { code: { family: 'Poppins', weight: 600 } },
|
|
1471
|
+
});
|
|
1472
|
+
});
|
|
1259
1473
|
test('none present → null (no appearance container)', () => {
|
|
1260
1474
|
expect(buildAppearanceReferenceFromParams({ baseline: 'figma' })).toBeNull();
|
|
1261
|
-
expect(buildAppearanceReferenceFromParams({ baseline: 'figma', refGeom: {}, refColor: {}, refText: {}, refSpans: {}, refLines: {} })).toBeNull();
|
|
1475
|
+
expect(buildAppearanceReferenceFromParams({ baseline: 'figma', refGeom: {}, refColor: {}, refText: {}, refSpans: {}, refLines: {}, refTypeface: {} })).toBeNull();
|
|
1476
|
+
});
|
|
1477
|
+
test('fed into buildStructuralBlock, a typeface reference flags a diverging resolved font and stays silent on a matching or unresolvable one (typeface issue 04)', () => {
|
|
1478
|
+
// The design (Figma) declares Poppins 600 on `code` and Fira Sans 500 on
|
|
1479
|
+
// `label`. The render resolved a Roboto fallback on `code` (→ one fact) and
|
|
1480
|
+
// the correct font on `label` (→ none); `legacyText` has a declared font but
|
|
1481
|
+
// no resolved enrichment (old package) → no signal, no fact.
|
|
1482
|
+
const dump = {
|
|
1483
|
+
canvas: { left: 0, top: 0, right: 686, bottom: 282 },
|
|
1484
|
+
renderSdk: 34,
|
|
1485
|
+
nodes: [
|
|
1486
|
+
{ id: 'code', bounds: { left: 0, top: 0, right: 300, bottom: 40 }, parentId: null, clipsChildren: false, text: 'INV-50', resolvedTypeface: { family: 'Roboto-Regular', weight: 400 } },
|
|
1487
|
+
{ id: 'label', bounds: { left: 0, top: 50, right: 300, bottom: 90 }, parentId: null, clipsChildren: false, text: 'Your code', resolvedTypeface: { family: 'fira_sans_medium' } },
|
|
1488
|
+
{ id: 'legacyText', bounds: { left: 0, top: 100, right: 300, bottom: 140 }, parentId: null, clipsChildren: false, text: 'Old' },
|
|
1489
|
+
],
|
|
1490
|
+
};
|
|
1491
|
+
const ref = buildAppearanceReferenceFromParams({
|
|
1492
|
+
refTypeface: {
|
|
1493
|
+
code: { family: 'Poppins', weight: 600 },
|
|
1494
|
+
label: { family: 'Fira Sans', weight: 500 },
|
|
1495
|
+
legacyText: { family: 'Poppins', weight: 400 },
|
|
1496
|
+
},
|
|
1497
|
+
baseline: 'figma',
|
|
1498
|
+
});
|
|
1499
|
+
const block = buildStructuralBlock(dump, null, 2, undefined, ref);
|
|
1500
|
+
const typefaceFacts = (block.appearance?.facts ?? []).filter((f) => f.kind === 'typeface');
|
|
1501
|
+
expect(typefaceFacts).toEqual([
|
|
1502
|
+
{
|
|
1503
|
+
kind: 'typeface',
|
|
1504
|
+
elementId: 'code',
|
|
1505
|
+
channel: 'text',
|
|
1506
|
+
rendered: { family: 'Roboto-Regular', weight: 400 },
|
|
1507
|
+
reference: { family: 'Poppins', weight: 600 },
|
|
1508
|
+
},
|
|
1509
|
+
]);
|
|
1262
1510
|
});
|
|
1263
1511
|
test('fed into buildStructuralBlock, a spans-only reference emits exactly one span_mismatch for the wrong extent (issue 16)', () => {
|
|
1264
1512
|
const dump = {
|
|
@@ -1592,6 +1840,20 @@ describe('embedded geometry stage parity', () => {
|
|
|
1592
1840
|
};
|
|
1593
1841
|
expect(embedded.buildAppearanceReferenceFromParams(params)).toEqual(buildAppearanceReferenceFromParams(params));
|
|
1594
1842
|
});
|
|
1843
|
+
test('embedded buildAppearanceReferenceFromParams matches the module for a typeface declaration (typeface issue 04)', () => {
|
|
1844
|
+
const cases = [
|
|
1845
|
+
{ refTypeface: { code: { family: 'Poppins', weight: 600 } }, baseline: 'figma' },
|
|
1846
|
+
{
|
|
1847
|
+
refGeom: { code: { w: 100, h: 20 } },
|
|
1848
|
+
refTypeface: { code: { family: 'Poppins', weight: 600 }, label: { family: 'Fira Sans' } },
|
|
1849
|
+
baseline: 'figma',
|
|
1850
|
+
},
|
|
1851
|
+
{ refTypeface: {}, baseline: 'figma' },
|
|
1852
|
+
];
|
|
1853
|
+
for (const params of cases) {
|
|
1854
|
+
expect(embedded.buildAppearanceReferenceFromParams(params)).toEqual(buildAppearanceReferenceFromParams(params));
|
|
1855
|
+
}
|
|
1856
|
+
});
|
|
1595
1857
|
test('embedded deriveLineFacts matches the module (Signal C, issue 18)', () => {
|
|
1596
1858
|
const cases = [
|
|
1597
1859
|
[
|
|
@@ -1634,6 +1896,56 @@ describe('embedded geometry stage parity', () => {
|
|
|
1634
1896
|
};
|
|
1635
1897
|
expect(embedded.buildStructuralBlock(dumpWithLines, null, 2, undefined, appearanceReference)).toEqual(buildStructuralBlock(dumpWithLines, null, 2, undefined, appearanceReference));
|
|
1636
1898
|
});
|
|
1899
|
+
test('embedded deriveTypefaceFacts matches the module (Signal C, issue 03)', () => {
|
|
1900
|
+
const cases = [
|
|
1901
|
+
[{ code: { family: 'Roboto', weight: 400 } }, { code: { family: 'Poppins', weight: 600 } }],
|
|
1902
|
+
[{ code: { family: 'Poppins', weight: 600 } }, { code: { family: 'Poppins', weight: 600 } }],
|
|
1903
|
+
[{ code: { family: 'Poppins', weight: 600 } }, { code: { family: 'Poppins-SemiBold' } }],
|
|
1904
|
+
[{ code: { family: 'fira_sans_medium' } }, { code: { family: 'Fira Sans', weight: 500 } }],
|
|
1905
|
+
[{ code: { family: 'Poppins', weight: 400 } }, { code: { family: 'Poppins-SemiBold' } }],
|
|
1906
|
+
[{}, { code: { family: 'Poppins', weight: 600 } }],
|
|
1907
|
+
[{ code: { family: 'Roboto', weight: 400 } }, {}],
|
|
1908
|
+
[
|
|
1909
|
+
{ b: { family: 'Roboto', weight: 400 }, a: { family: 'Arial', weight: 400 } },
|
|
1910
|
+
{ a: { family: 'Poppins', weight: 600 }, b: { family: 'Roboto', weight: 400 } },
|
|
1911
|
+
],
|
|
1912
|
+
];
|
|
1913
|
+
for (const [rendered, reference] of cases) {
|
|
1914
|
+
expect(embedded.deriveTypefaceFacts(rendered, reference)).toEqual(deriveTypefaceFacts(rendered, reference));
|
|
1915
|
+
}
|
|
1916
|
+
});
|
|
1917
|
+
test('embedded buildStructuralBlock matches the module with a typeface reference + the render-SDK gate (issue 03)', () => {
|
|
1918
|
+
const dumps = [
|
|
1919
|
+
{
|
|
1920
|
+
canvas: { left: 0, top: 0, right: 200, bottom: 400 },
|
|
1921
|
+
renderSdk: 34,
|
|
1922
|
+
nodes: [
|
|
1923
|
+
{ id: 'code', bounds: { left: 0, top: 0, right: 100, bottom: 20 }, parentId: null, clipsChildren: false, text: 'INV-50', resolvedTypeface: { family: 'Roboto', weight: 400 } },
|
|
1924
|
+
],
|
|
1925
|
+
},
|
|
1926
|
+
{
|
|
1927
|
+
canvas: { left: 0, top: 0, right: 200, bottom: 400 },
|
|
1928
|
+
renderSdk: 28,
|
|
1929
|
+
nodes: [
|
|
1930
|
+
{ id: 'code', bounds: { left: 0, top: 0, right: 100, bottom: 20 }, parentId: null, clipsChildren: false, text: 'INV-50' },
|
|
1931
|
+
],
|
|
1932
|
+
},
|
|
1933
|
+
{
|
|
1934
|
+
canvas: { left: 0, top: 0, right: 200, bottom: 400 },
|
|
1935
|
+
nodes: [
|
|
1936
|
+
{ id: 'code', bounds: { left: 0, top: 0, right: 100, bottom: 20 }, parentId: null, clipsChildren: false },
|
|
1937
|
+
],
|
|
1938
|
+
},
|
|
1939
|
+
];
|
|
1940
|
+
const appearanceReference = {
|
|
1941
|
+
baseline: 'figma',
|
|
1942
|
+
elementIds: ['code'],
|
|
1943
|
+
typeface: { code: { family: 'Poppins', weight: 600 } },
|
|
1944
|
+
};
|
|
1945
|
+
for (const dump of dumps) {
|
|
1946
|
+
expect(embedded.buildStructuralBlock(dump, null, 2, undefined, appearanceReference)).toEqual(buildStructuralBlock(dump, null, 2, undefined, appearanceReference));
|
|
1947
|
+
}
|
|
1948
|
+
});
|
|
1637
1949
|
test('embedded deriveCopyFacts matches the module (Signal C)', () => {
|
|
1638
1950
|
const cases = [
|
|
1639
1951
|
[{ title: 'a' }, { title: 'a' }],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-fidelity-render-android.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/ui-fidelity-render-android.ts"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;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC;
|
|
1
|
+
{"version":3,"file":"ui-fidelity-render-android.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/ui-fidelity-render-android.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAMpE,sDAAsD;AACtD,MAAM,WAAW,6BAA6B;IAC5C;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAE1D,iDAAiD;AACjD,eAAO,MAAM,eAAe,6BAA8B,CAAC;AAC3D,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,aAAwB,CAAC;AAE9D,mDAAmD;AACnD,eAAO,MAAM,iBAAiB,6BAA8B,CAAC;AAC7D,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,eAA0B,CAAC;AAElE,gFAAgF;AAChF,eAAO,MAAM,wBAAwB,mBAAmB,CAAC;AAEzD,4DAA4D;AAC5D,eAAO,MAAM,gBAAgB,0BAA0B,CAAC;AAExD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,8EAA8E;AAC9E,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC;AAq+BD;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,yBAAyB,GAAG,MAAM,CAqBrF;AAED;;;GAGG;AACH,qBAAa,mCAAoC,SAAQ,gBAAgB;IACvE,yBAAyB,CACvB,OAAO,EAAE,6BAA6B,EACtC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,OAAO,EAAE,QAAQ,GAChB,qBAAqB,EAAE;IAepB,OAAO,CACX,MAAM,EAAE,6BAA6B,EACrC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,OAAO,EAAE,QAAQ,GAChB,OAAO,CAAC,OAAO,CAAC;CA0EpB"}
|
|
@@ -127,6 +127,11 @@ var referenceSpans = null;
|
|
|
127
127
|
// split per element id per screen, as an array of line texts), set in main()
|
|
128
128
|
// and read by the structural assembler. Null when none declared → no line facts.
|
|
129
129
|
var referenceLines = null;
|
|
130
|
+
// params.reference_typeface (Signal C typeface facts, typeface issue 04: the
|
|
131
|
+
// DESIGN font per element id per screen, as { family, weight }, built by the
|
|
132
|
+
// caller from Figma node metadata), set in main() and read by the structural
|
|
133
|
+
// assembler. Null when none declared → no typeface facts.
|
|
134
|
+
var referenceTypeface = null;
|
|
130
135
|
// params.reference_baseline (Signal C: 'figma' (default) or 'previous_render').
|
|
131
136
|
// Marks whether the appearance reference is the design (divergences) or the
|
|
132
137
|
// previous catalog render (regressions/drift, the no-Figma path).
|
|
@@ -673,7 +678,7 @@ function renderScreens(renderable, projectRoot) {
|
|
|
673
678
|
// geometry deltas vs reference_geometry) onto the screen entry, so the
|
|
674
679
|
// judge reads the signals from protocol-result.json without fetching
|
|
675
680
|
// artifacts. CONFIG.scale is the render density (dp = px / scale).
|
|
676
|
-
assembleStructural(entry, layoutSource, referenceGeometry, CONFIG.scale, referenceText, referenceColor, referenceBaseline, referenceFrame, proofKind, referenceSpans, referenceLines);
|
|
681
|
+
assembleStructural(entry, layoutSource, referenceGeometry, CONFIG.scale, referenceText, referenceColor, referenceBaseline, referenceFrame, proofKind, referenceSpans, referenceLines, referenceTypeface);
|
|
677
682
|
}
|
|
678
683
|
});
|
|
679
684
|
} finally {
|
|
@@ -773,6 +778,16 @@ function main() {
|
|
|
773
778
|
!Array.isArray(params.reference_lines)
|
|
774
779
|
? params.reference_lines
|
|
775
780
|
: null;
|
|
781
|
+
// Signal-C typeface reference (typeface issue 04): { "<Screen>":
|
|
782
|
+
// { "<elementId>": { family, weight } } } — the DESIGN font per element, from
|
|
783
|
+
// Figma node metadata. Diffed against the RESOLVED (painted) font the dump
|
|
784
|
+
// captured. Absent → no typeface facts.
|
|
785
|
+
referenceTypeface =
|
|
786
|
+
params.reference_typeface &&
|
|
787
|
+
typeof params.reference_typeface === 'object' &&
|
|
788
|
+
!Array.isArray(params.reference_typeface)
|
|
789
|
+
? params.reference_typeface
|
|
790
|
+
: null;
|
|
776
791
|
// Signal-C baseline marker: 'previous_render' when the appearance reference was
|
|
777
792
|
// sourced from the previous catalog render (no-Figma drift path), else 'figma'.
|
|
778
793
|
referenceBaseline =
|