@invarn/cibuild 2.2.9 → 2.3.1

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.
@@ -45,6 +45,34 @@ export interface LayoutNode {
45
45
  fillColor?: string;
46
46
  /** Text (foreground) color, hex. */
47
47
  textColor?: string;
48
+ /** AnnotatedString background-span extents (issue 16): each range of the
49
+ * node's text drawn with a specified span background — the highlighted
50
+ * substrings. Offsets index into `text`. Absent in dumps from packages
51
+ * generated before the emitter tracked spans, and on spanless text — no
52
+ * signal, never a divergence. */
53
+ textSpans?: TextSpan[];
54
+ /** Laid-out line extents (issue 18): where the node's text ACTUALLY wrapped,
55
+ * read from the render's TextLayoutResult — one entry per laid-out line,
56
+ * with a VISIBLE end (trailing whitespace and the newline excluded).
57
+ * Offsets index into `text`. Absent in dumps from packages generated
58
+ * before the emitter tracked lines, and on nodes that lay out no text —
59
+ * no signal, never a divergence. */
60
+ textLines?: TextLine[];
61
+ }
62
+ /** One highlighted extent of a text node (an AnnotatedString span style with a
63
+ * specified background). */
64
+ export interface TextSpan {
65
+ start: number;
66
+ end: number;
67
+ text: string;
68
+ /** Span background color, hex. */
69
+ background?: string;
70
+ }
71
+ /** One laid-out line of a text node (issue 18). */
72
+ export interface TextLine {
73
+ start: number;
74
+ end: number;
75
+ text: string;
48
76
  }
49
77
  export interface LayoutDump {
50
78
  /** The captured canvas / root bounds in px. */
@@ -280,6 +308,25 @@ export type AppearanceFact = {
280
308
  elementId: string;
281
309
  reference: string;
282
310
  }
311
+ /** The highlighted extent (an AnnotatedString background span) differs from
312
+ * the declared reference span (issue 16). `rendered` is what the render
313
+ * actually highlighted (all span extents, comma-joined); `reference` the
314
+ * substring the design highlights. */
315
+ | {
316
+ kind: 'span_mismatch';
317
+ elementId: string;
318
+ rendered: string;
319
+ reference: string;
320
+ }
321
+ /** The laid-out line split differs from the declared reference split
322
+ * (issue 18): the text wrapped on the wrong word, or dropped/added a
323
+ * break. `rendered`/`reference` carry the newline-joined line texts. */
324
+ | {
325
+ kind: 'line_break_mismatch';
326
+ elementId: string;
327
+ rendered: string;
328
+ reference: string;
329
+ }
283
330
  /** In the reference, not rendered. */
284
331
  | {
285
332
  kind: 'element_missing';
@@ -328,6 +375,15 @@ export interface AppearanceReference {
328
375
  * baseline; the previous render's colors on `previous_render`). When supplied,
329
376
  * color facts are derived against the render's per-node colors. */
330
377
  color?: ColorSource;
378
+ /** Declared highlight extents per element id (issue 16): the substring the
379
+ * design highlights on that text element (and optionally its background).
380
+ * When supplied, span facts are derived against the render's per-node
381
+ * `textSpans`. */
382
+ spans?: SpanSource;
383
+ /** Declared line splits per element id (issue 18): the exact line texts
384
+ * the design breaks that text element into. When supplied, line facts
385
+ * are derived against the render's per-node `textLines`. */
386
+ lines?: LineSource;
331
387
  }
332
388
  /** The per-screen reference params the runner assembles an `AppearanceReference`
333
389
  * from (the slices of `params.reference_*` for one screen). */
@@ -339,6 +395,10 @@ export interface AppearanceReferenceParams {
339
395
  refText?: TextSource | null;
340
396
  /** Per-screen `reference_color` (fill/text color per element id). */
341
397
  refColor?: ColorSource | null;
398
+ /** Per-screen `reference_spans` (declared highlight extents per element id). */
399
+ refSpans?: SpanSource | null;
400
+ /** Per-screen `reference_lines` (declared line split per element id). */
401
+ refLines?: LineSource | null;
342
402
  baseline: AppearanceBaseline;
343
403
  }
344
404
  /**
@@ -402,6 +462,58 @@ export type TextSource = Record<string, string | undefined>;
402
462
  * separately-wired concern.
403
463
  */
404
464
  export declare function deriveCopyFacts(rendered: TextSource, reference: TextSource): AppearanceFact[];
465
+ /** Declared highlight extent per element id: the substring the design
466
+ * highlights on that text element (an AnnotatedString background span),
467
+ * optionally with its background color. A missing/empty `text` is "no span
468
+ * signal for that element" — never a divergence. */
469
+ export type SpanSource = Record<string, {
470
+ text?: string;
471
+ background?: string;
472
+ } | undefined>;
473
+ /** The rendered highlight extents per element id — each node's `textSpans`
474
+ * from the layout dump. `undefined` for a node that emitted no spans (an
475
+ * old package, or a spanless text): no signal, never a divergence. */
476
+ export type RenderedSpans = Record<string, TextSpan[] | undefined>;
477
+ /**
478
+ * Span facts (issue 16) from the per-element comparison of rendered highlight
479
+ * extents vs the declared reference span, keyed on the stable element id. For
480
+ * each element the REFERENCE declares a span for: a rendered span whose text
481
+ * equals the declared substring → no fact; rendered spans present but none
482
+ * matching → `span_mismatch` (all rendered extents comma-joined vs the declared
483
+ * substring). An element whose node emitted NO spans produces no fact — old
484
+ * committed packages don't emit `textSpans`, and absence of a signal is never
485
+ * reported as a divergence (regenerating the package picks the signal up).
486
+ *
487
+ * Pure and platform-agnostic; order-independent and deterministic (output
488
+ * sorted by element id). The deriver reports facts only; significance is a
489
+ * later, separately-wired concern.
490
+ */
491
+ export declare function deriveSpanFacts(rendered: RenderedSpans, reference: SpanSource): AppearanceFact[];
492
+ /** Declared line split per element id (issue 18): the exact line texts the
493
+ * design breaks that text element into, in order. A missing/empty array (or
494
+ * one with no usable line text) is "no line signal for that element" —
495
+ * never a divergence. */
496
+ export type LineSource = Record<string, string[] | undefined>;
497
+ /** The rendered laid-out lines per element id — each node's `textLines` from
498
+ * the layout dump. `undefined` for a node that emitted no lines (an old
499
+ * package, or a node that lays out no text): no signal, never a divergence. */
500
+ export type RenderedLines = Record<string, TextLine[] | undefined>;
501
+ /**
502
+ * Line facts (issue 18) from the per-element comparison of the rendered
503
+ * laid-out lines vs the declared reference split, keyed on the stable element
504
+ * id. For each element the REFERENCE declares a split for: rendered line
505
+ * texts equal to the declared line texts (same count, same order) → no fact;
506
+ * anything else — the break on a different word, a dropped break (fewer
507
+ * lines), an extra break — is ONE `line_break_mismatch` carrying both splits
508
+ * newline-joined. An element whose node emitted NO lines produces no fact —
509
+ * old committed packages don't emit `textLines`, and absence of a signal is
510
+ * never reported as a divergence (regenerating the package picks it up).
511
+ *
512
+ * Pure and platform-agnostic; order-independent and deterministic (output
513
+ * sorted by element id). The deriver reports facts only; significance is a
514
+ * later, separately-wired concern.
515
+ */
516
+ export declare function deriveLineFacts(rendered: RenderedLines, reference: LineSource): AppearanceFact[];
405
517
  /** CIELAB triple [L, a, b]. */
406
518
  export type Lab = [number, number, number];
407
519
  /** One element's rendered/reference colors, by channel. A missing channel is
@@ -524,6 +636,8 @@ export declare function getGeometryStageInternals(): {
524
636
  }) => ReviewScaffold;
525
637
  derivePresenceFacts: (renderedIds: Iterable<string>, referenceIds: Iterable<string>) => AppearanceFact[];
526
638
  deriveCopyFacts: (rendered: TextSource, reference: TextSource) => AppearanceFact[];
639
+ deriveSpanFacts: (rendered: RenderedSpans, reference: SpanSource) => AppearanceFact[];
640
+ deriveLineFacts: (rendered: RenderedLines, reference: LineSource) => AppearanceFact[];
527
641
  deriveColorFacts: (rendered: ColorSource, reference: ColorSource) => AppearanceFact[];
528
642
  buildAppearanceReferenceFromParams: (params: AppearanceReferenceParams) => AppearanceReference | null;
529
643
  ciede2000: (lab1: Lab, lab2: Lab) => number;
@@ -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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AAE,EACpE,mBAAmB,CAAC,EAAE,mBAAmB,GAAG,IAAI,EAChD,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI,KACnC,eAAe,CAAC;IACrB,mBAAmB,EAAE,CAAC,UAAU,EAAE;QAChC,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;QACzB,QAAQ,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;KACtC,KAAK,cAAc,CAAC;IACrB,mBAAmB,EAAE,CACnB,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,EAC7B,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,KAC3B,cAAc,EAAE,CAAC;IACtB,eAAe,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,KAAK,cAAc,EAAE,CAAC;IACnF,eAAe,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,KAAK,cAAc,EAAE,CAAC;IACtF,eAAe,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,KAAK,cAAc,EAAE,CAAC;IACtF,gBAAgB,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,KAAK,cAAc,EAAE,CAAC;IACtF,kCAAkC,EAAE,CAClC,MAAM,EAAE,yBAAyB,KAC9B,mBAAmB,GAAG,IAAI,CAAC;IAChC,SAAS,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,KAAK,MAAM,CAAC;IAC5C,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,GAAG,CAAC;CAChC,CAOA"}
@@ -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, deriveColorFacts, ciede2000, hexToLab, diffKeyGeometry, buildStructuralBlock, buildReviewScaffold, appearanceReferenceFromPreviousRender, buildAppearanceReferenceFromParams, getStructuralFactsStageInternals, getGeometryStageInternals, } from './structural-facts.js';
11
+ import { deriveStructuralFacts, derivePresenceFacts, deriveCopyFacts, deriveSpanFacts, deriveLineFacts, deriveColorFacts, 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', () => {
@@ -637,6 +637,112 @@ describe('deriveCopyFacts — rendered vs reference text per element', () => {
637
637
  ]);
638
638
  });
639
639
  });
640
+ describe('deriveSpanFacts — declared highlight extents vs rendered background spans', () => {
641
+ test('a rendered span matching the declared extent produces no fact', () => {
642
+ expect(deriveSpanFacts({ discountText: [{ start: 4, end: 13, text: '5 EUR off', background: '#ffe45e' }] }, { discountText: { text: '5 EUR off' } })).toEqual([]);
643
+ });
644
+ test('a rendered span chipping the wrong extent yields span_mismatch with both strings', () => {
645
+ // The motivating case: the design chips the full phrase, the wrapper
646
+ // highlighted only the amount.
647
+ expect(deriveSpanFacts({ discountText: [{ start: 4, end: 9, text: '5 EUR', background: '#ffe45e' }] }, { discountText: { text: '5 EUR off' } })).toEqual([
648
+ { kind: 'span_mismatch', elementId: 'discountText', rendered: '5 EUR', reference: '5 EUR off' },
649
+ ]);
650
+ });
651
+ test('a node that emitted no spans produces no fact (old packages degrade gracefully)', () => {
652
+ // An older committed package's dump has no textSpans field at all — the
653
+ // declared expectation must stay silent, not fire a false missing-span.
654
+ expect(deriveSpanFacts({}, { discountText: { text: '5 EUR off' } })).toEqual([]);
655
+ });
656
+ test('any one of several rendered spans matching the declared extent passes', () => {
657
+ expect(deriveSpanFacts({
658
+ discountText: [
659
+ { start: 0, end: 3, text: 'Get', background: '#eeeeee' },
660
+ { start: 4, end: 13, text: '5 EUR off', background: '#ffe45e' },
661
+ ],
662
+ }, { discountText: { text: '5 EUR off' } })).toEqual([]);
663
+ });
664
+ test('several wrong spans report all their extents in one fact', () => {
665
+ expect(deriveSpanFacts({
666
+ discountText: [
667
+ { start: 0, end: 3, text: 'Get', background: '#eeeeee' },
668
+ { start: 4, end: 9, text: '5 EUR', background: '#ffe45e' },
669
+ ],
670
+ }, { discountText: { text: '5 EUR off' } })).toEqual([
671
+ { kind: 'span_mismatch', elementId: 'discountText', rendered: 'Get, 5 EUR', reference: '5 EUR off' },
672
+ ]);
673
+ });
674
+ test('no declared entry / empty declared text produces no fact (absence of signal is not a divergence)', () => {
675
+ expect(deriveSpanFacts({ discountText: [{ start: 0, end: 3, text: 'Get' }] }, {})).toEqual([]);
676
+ expect(deriveSpanFacts({ discountText: [{ start: 0, end: 3, text: 'Get' }] }, { discountText: { text: '' } })).toEqual([]);
677
+ });
678
+ test('result is order-independent and deterministic (sorted by element id)', () => {
679
+ const rendered = {
680
+ b: [{ start: 0, end: 1, text: 'x' }],
681
+ a: [{ start: 0, end: 1, text: 'y' }],
682
+ };
683
+ const a = deriveSpanFacts(rendered, { a: { text: 'right' }, b: { text: 'x' } });
684
+ const b = deriveSpanFacts(rendered, { b: { text: 'x' }, a: { text: 'right' } });
685
+ expect(a).toEqual(b);
686
+ expect(a).toEqual([
687
+ { kind: 'span_mismatch', elementId: 'a', rendered: 'y', reference: 'right' },
688
+ ]);
689
+ });
690
+ });
691
+ describe('deriveLineFacts — declared line split vs rendered laid-out lines', () => {
692
+ test('rendered lines matching the declared split produce no fact', () => {
693
+ expect(deriveLineFacts({
694
+ promoCopy: [
695
+ { start: 0, end: 28, text: 'Get 5 EUR off your first order' },
696
+ { start: 29, end: 50, text: 'placed by tomorrow.' },
697
+ ],
698
+ }, { promoCopy: ['Get 5 EUR off your first order', 'placed by tomorrow.'] })).toEqual([]);
699
+ });
700
+ test('a break on the wrong word yields line_break_mismatch with both splits', () => {
701
+ expect(deriveLineFacts({
702
+ promoCopy: [
703
+ { start: 0, end: 31, text: 'Get 5 EUR off your first order placed' },
704
+ { start: 32, end: 45, text: 'by tomorrow.' },
705
+ ],
706
+ }, { promoCopy: ['Get 5 EUR off your first order', 'placed by tomorrow.'] })).toEqual([
707
+ {
708
+ kind: 'line_break_mismatch',
709
+ elementId: 'promoCopy',
710
+ rendered: 'Get 5 EUR off your first order placed\nby tomorrow.',
711
+ reference: 'Get 5 EUR off your first order\nplaced by tomorrow.',
712
+ },
713
+ ]);
714
+ });
715
+ test('a dropped break (single rendered line vs a declared two-line split) is a fact', () => {
716
+ expect(deriveLineFacts({ promoCopy: [{ start: 0, end: 50, text: 'Get 5 EUR off your first order placed by tomorrow.' }] }, { promoCopy: ['Get 5 EUR off your first order', 'placed by tomorrow.'] })).toEqual([
717
+ {
718
+ kind: 'line_break_mismatch',
719
+ elementId: 'promoCopy',
720
+ rendered: 'Get 5 EUR off your first order placed by tomorrow.',
721
+ reference: 'Get 5 EUR off your first order\nplaced by tomorrow.',
722
+ },
723
+ ]);
724
+ });
725
+ test('a node that emitted no lines produces no fact (old packages degrade gracefully)', () => {
726
+ expect(deriveLineFacts({}, { promoCopy: ['Get 5 EUR off', 'placed by tomorrow.'] })).toEqual([]);
727
+ });
728
+ test('no declared entry / an empty declared split produces no fact (absence of signal is not a divergence)', () => {
729
+ expect(deriveLineFacts({ promoCopy: [{ start: 0, end: 3, text: 'Get' }] }, {})).toEqual([]);
730
+ expect(deriveLineFacts({ promoCopy: [{ start: 0, end: 3, text: 'Get' }] }, { promoCopy: [] })).toEqual([]);
731
+ expect(deriveLineFacts({ promoCopy: [{ start: 0, end: 3, text: 'Get' }] }, { promoCopy: ['', ''] })).toEqual([]);
732
+ });
733
+ test('result is order-independent and deterministic (sorted by element id)', () => {
734
+ const rendered = {
735
+ b: [{ start: 0, end: 1, text: 'x' }],
736
+ a: [{ start: 0, end: 1, text: 'y' }],
737
+ };
738
+ const one = deriveLineFacts(rendered, { a: ['right'], b: ['x'] });
739
+ const two = deriveLineFacts(rendered, { b: ['x'], a: ['right'] });
740
+ expect(one).toEqual(two);
741
+ expect(one).toEqual([
742
+ { kind: 'line_break_mismatch', elementId: 'a', rendered: 'y', reference: 'right' },
743
+ ]);
744
+ });
745
+ });
640
746
  describe('buildStructuralBlock — appearance container (Signal C, additive)', () => {
641
747
  test('no appearanceReference → no appearance container; facts + geometry unchanged', () => {
642
748
  const withC = buildStructuralBlock(HUB_PROMO_DUMP, HUB_PROMO_REFERENCE, 2);
@@ -1128,9 +1234,138 @@ describe('buildAppearanceReferenceFromParams — union of geometry/text/color id
1128
1234
  color: { banner: { fill: '#fff0ee' } },
1129
1235
  });
1130
1236
  });
1237
+ test('spans only (no geometry/text/color) → a reference carrying spans, ids from the span keys (issue 16)', () => {
1238
+ const ref = buildAppearanceReferenceFromParams({
1239
+ refSpans: { discountText: { text: '5 EUR off', background: '#ffe45e' } },
1240
+ baseline: 'figma',
1241
+ });
1242
+ expect(ref).toEqual({
1243
+ baseline: 'figma',
1244
+ elementIds: ['discountText'],
1245
+ spans: { discountText: { text: '5 EUR off', background: '#ffe45e' } },
1246
+ });
1247
+ });
1248
+ test('lines only (no geometry/text/color/spans) → a reference carrying lines, ids from the line keys (issue 18)', () => {
1249
+ const ref = buildAppearanceReferenceFromParams({
1250
+ refLines: { promoCopy: ['Get 5 EUR off', 'placed by tomorrow.'] },
1251
+ baseline: 'figma',
1252
+ });
1253
+ expect(ref).toEqual({
1254
+ baseline: 'figma',
1255
+ elementIds: ['promoCopy'],
1256
+ lines: { promoCopy: ['Get 5 EUR off', 'placed by tomorrow.'] },
1257
+ });
1258
+ });
1131
1259
  test('none present → null (no appearance container)', () => {
1132
1260
  expect(buildAppearanceReferenceFromParams({ baseline: 'figma' })).toBeNull();
1133
- expect(buildAppearanceReferenceFromParams({ baseline: 'figma', refGeom: {}, refColor: {}, refText: {} })).toBeNull();
1261
+ expect(buildAppearanceReferenceFromParams({ baseline: 'figma', refGeom: {}, refColor: {}, refText: {}, refSpans: {}, refLines: {} })).toBeNull();
1262
+ });
1263
+ test('fed into buildStructuralBlock, a spans-only reference emits exactly one span_mismatch for the wrong extent (issue 16)', () => {
1264
+ const dump = {
1265
+ canvas: { left: 0, top: 0, right: 686, bottom: 282 },
1266
+ nodes: [
1267
+ {
1268
+ id: 'discountText',
1269
+ bounds: { left: 0, top: 0, right: 300, bottom: 40 },
1270
+ parentId: null,
1271
+ clipsChildren: false,
1272
+ text: 'Get 5 EUR off',
1273
+ textSpans: [{ start: 4, end: 9, text: '5 EUR', background: '#ffe45e' }],
1274
+ },
1275
+ // A node that never emitted spans (old package) — the declared
1276
+ // expectation for it must stay silent.
1277
+ { id: 'legacyText', bounds: { left: 0, top: 50, right: 300, bottom: 90 }, parentId: null, clipsChildren: false, text: 'Free delivery' },
1278
+ ],
1279
+ };
1280
+ const ref = buildAppearanceReferenceFromParams({
1281
+ refSpans: {
1282
+ discountText: { text: '5 EUR off', background: '#ffe45e' },
1283
+ legacyText: { text: 'Free' },
1284
+ },
1285
+ baseline: 'figma',
1286
+ });
1287
+ const block = buildStructuralBlock(dump, null, 2, undefined, ref);
1288
+ expect(block.appearance?.facts).toEqual([
1289
+ { kind: 'span_mismatch', elementId: 'discountText', rendered: '5 EUR', reference: '5 EUR off' },
1290
+ ]);
1291
+ });
1292
+ test('a matching extent yields a container with zero facts (the fixed wrapper is clean)', () => {
1293
+ const dump = {
1294
+ canvas: { left: 0, top: 0, right: 686, bottom: 282 },
1295
+ nodes: [
1296
+ {
1297
+ id: 'discountText',
1298
+ bounds: { left: 0, top: 0, right: 300, bottom: 40 },
1299
+ parentId: null,
1300
+ clipsChildren: false,
1301
+ text: 'Get 5 EUR off',
1302
+ textSpans: [{ start: 4, end: 13, text: '5 EUR off', background: '#ffe45e' }],
1303
+ },
1304
+ ],
1305
+ };
1306
+ const ref = buildAppearanceReferenceFromParams({
1307
+ refSpans: { discountText: { text: '5 EUR off' } },
1308
+ baseline: 'figma',
1309
+ });
1310
+ const block = buildStructuralBlock(dump, null, 2, undefined, ref);
1311
+ expect(block.appearance?.facts).toEqual([]);
1312
+ });
1313
+ test('fed into buildStructuralBlock, a lines-only reference emits exactly one line_break_mismatch for a dropped break (issue 18)', () => {
1314
+ const dump = {
1315
+ canvas: { left: 0, top: 0, right: 686, bottom: 282 },
1316
+ nodes: [
1317
+ {
1318
+ id: 'promoCopy',
1319
+ bounds: { left: 0, top: 0, right: 600, bottom: 40 },
1320
+ parentId: null,
1321
+ clipsChildren: false,
1322
+ text: 'Get 5 EUR off placed by tomorrow.',
1323
+ textLines: [{ start: 0, end: 33, text: 'Get 5 EUR off placed by tomorrow.' }],
1324
+ },
1325
+ // Emitted no lines (old package) — the declared split stays silent.
1326
+ { id: 'legacyText', bounds: { left: 0, top: 50, right: 600, bottom: 90 }, parentId: null, clipsChildren: false, text: 'Free delivery' },
1327
+ ],
1328
+ };
1329
+ const ref = buildAppearanceReferenceFromParams({
1330
+ refLines: {
1331
+ promoCopy: ['Get 5 EUR off', 'placed by tomorrow.'],
1332
+ legacyText: ['Free', 'delivery'],
1333
+ },
1334
+ baseline: 'figma',
1335
+ });
1336
+ const block = buildStructuralBlock(dump, null, 2, undefined, ref);
1337
+ expect(block.appearance?.facts).toEqual([
1338
+ {
1339
+ kind: 'line_break_mismatch',
1340
+ elementId: 'promoCopy',
1341
+ rendered: 'Get 5 EUR off placed by tomorrow.',
1342
+ reference: 'Get 5 EUR off\nplaced by tomorrow.',
1343
+ },
1344
+ ]);
1345
+ });
1346
+ test('a matching line split yields a container with zero facts', () => {
1347
+ const dump = {
1348
+ canvas: { left: 0, top: 0, right: 686, bottom: 282 },
1349
+ nodes: [
1350
+ {
1351
+ id: 'promoCopy',
1352
+ bounds: { left: 0, top: 0, right: 600, bottom: 40 },
1353
+ parentId: null,
1354
+ clipsChildren: false,
1355
+ text: 'Get 5 EUR off\nplaced by tomorrow.',
1356
+ textLines: [
1357
+ { start: 0, end: 13, text: 'Get 5 EUR off' },
1358
+ { start: 14, end: 33, text: 'placed by tomorrow.' },
1359
+ ],
1360
+ },
1361
+ ],
1362
+ };
1363
+ const ref = buildAppearanceReferenceFromParams({
1364
+ refLines: { promoCopy: ['Get 5 EUR off', 'placed by tomorrow.'] },
1365
+ baseline: 'figma',
1366
+ });
1367
+ const block = buildStructuralBlock(dump, null, 2, undefined, ref);
1368
+ expect(block.appearance?.facts).toEqual([]);
1134
1369
  });
1135
1370
  test('fed into buildStructuralBlock, a color-only reference still emits the color fact', () => {
1136
1371
  const dump = {
@@ -1316,6 +1551,89 @@ describe('embedded geometry stage parity', () => {
1316
1551
  const appearanceReference = { baseline: 'figma', elementIds: ['banner', 'voucher'] };
1317
1552
  expect(embedded.buildStructuralBlock(HUB_PROMO_DUMP, HUB_PROMO_REFERENCE, 2, undefined, appearanceReference)).toEqual(buildStructuralBlock(HUB_PROMO_DUMP, HUB_PROMO_REFERENCE, 2, undefined, appearanceReference));
1318
1553
  });
1554
+ test('embedded deriveSpanFacts matches the module (Signal C, issue 16)', () => {
1555
+ const cases = [
1556
+ [{ discountText: [{ start: 4, end: 13, text: '5 EUR off' }] }, { discountText: { text: '5 EUR off' } }],
1557
+ [{ discountText: [{ start: 4, end: 9, text: '5 EUR' }] }, { discountText: { text: '5 EUR off' } }],
1558
+ [{}, { discountText: { text: '5 EUR off' } }],
1559
+ [{ discountText: [{ start: 0, end: 3, text: 'Get' }, { start: 4, end: 9, text: '5 EUR' }] }, { discountText: { text: '5 EUR off' } }],
1560
+ [{ b: [{ start: 0, end: 1, text: 'x' }], a: [{ start: 0, end: 1, text: 'y' }] }, { a: { text: 'right' }, b: { text: 'x' } }],
1561
+ [{ discountText: [{ start: 0, end: 3, text: 'Get' }] }, { discountText: { text: '' } }],
1562
+ ];
1563
+ for (const [rendered, reference] of cases) {
1564
+ expect(embedded.deriveSpanFacts(rendered, reference)).toEqual(deriveSpanFacts(rendered, reference));
1565
+ }
1566
+ });
1567
+ test('embedded buildStructuralBlock matches the module with an appearanceReference carrying spans (issue 16)', () => {
1568
+ const dumpWithSpans = {
1569
+ canvas: { left: 0, top: 0, right: 200, bottom: 400 },
1570
+ nodes: [
1571
+ {
1572
+ id: 'discountText',
1573
+ bounds: { left: 0, top: 0, right: 100, bottom: 20 },
1574
+ parentId: null,
1575
+ clipsChildren: false,
1576
+ text: 'Get 5 EUR off',
1577
+ textSpans: [{ start: 4, end: 9, text: '5 EUR', background: '#ffe45e' }],
1578
+ },
1579
+ ],
1580
+ };
1581
+ const appearanceReference = {
1582
+ baseline: 'figma',
1583
+ elementIds: ['discountText'],
1584
+ spans: { discountText: { text: '5 EUR off', background: '#ffe45e' } },
1585
+ };
1586
+ expect(embedded.buildStructuralBlock(dumpWithSpans, null, 2, undefined, appearanceReference)).toEqual(buildStructuralBlock(dumpWithSpans, null, 2, undefined, appearanceReference));
1587
+ });
1588
+ test('embedded buildAppearanceReferenceFromParams matches the module for a spans declaration (issue 16)', () => {
1589
+ const params = {
1590
+ refSpans: { discountText: { text: '5 EUR off', background: '#ffe45e' } },
1591
+ baseline: 'figma',
1592
+ };
1593
+ expect(embedded.buildAppearanceReferenceFromParams(params)).toEqual(buildAppearanceReferenceFromParams(params));
1594
+ });
1595
+ test('embedded deriveLineFacts matches the module (Signal C, issue 18)', () => {
1596
+ const cases = [
1597
+ [
1598
+ { promoCopy: [{ start: 0, end: 13, text: 'Get 5 EUR off' }, { start: 14, end: 33, text: 'placed by tomorrow.' }] },
1599
+ { promoCopy: ['Get 5 EUR off', 'placed by tomorrow.'] },
1600
+ ],
1601
+ [
1602
+ { promoCopy: [{ start: 0, end: 33, text: 'Get 5 EUR off placed by tomorrow.' }] },
1603
+ { promoCopy: ['Get 5 EUR off', 'placed by tomorrow.'] },
1604
+ ],
1605
+ [{}, { promoCopy: ['Get 5 EUR off', 'placed by tomorrow.'] }],
1606
+ [{ promoCopy: [{ start: 0, end: 3, text: 'Get' }] }, { promoCopy: [] }],
1607
+ [
1608
+ { b: [{ start: 0, end: 1, text: 'x' }], a: [{ start: 0, end: 1, text: 'y' }] },
1609
+ { a: ['right'], b: ['x'] },
1610
+ ],
1611
+ ];
1612
+ for (const [rendered, reference] of cases) {
1613
+ expect(embedded.deriveLineFacts(rendered, reference)).toEqual(deriveLineFacts(rendered, reference));
1614
+ }
1615
+ });
1616
+ test('embedded buildStructuralBlock matches the module with an appearanceReference carrying lines (issue 18)', () => {
1617
+ const dumpWithLines = {
1618
+ canvas: { left: 0, top: 0, right: 200, bottom: 400 },
1619
+ nodes: [
1620
+ {
1621
+ id: 'promoCopy',
1622
+ bounds: { left: 0, top: 0, right: 100, bottom: 20 },
1623
+ parentId: null,
1624
+ clipsChildren: false,
1625
+ text: 'Get 5 EUR off placed by tomorrow.',
1626
+ textLines: [{ start: 0, end: 33, text: 'Get 5 EUR off placed by tomorrow.' }],
1627
+ },
1628
+ ],
1629
+ };
1630
+ const appearanceReference = {
1631
+ baseline: 'figma',
1632
+ elementIds: ['promoCopy'],
1633
+ lines: { promoCopy: ['Get 5 EUR off', 'placed by tomorrow.'] },
1634
+ };
1635
+ expect(embedded.buildStructuralBlock(dumpWithLines, null, 2, undefined, appearanceReference)).toEqual(buildStructuralBlock(dumpWithLines, null, 2, undefined, appearanceReference));
1636
+ });
1319
1637
  test('embedded deriveCopyFacts matches the module (Signal C)', () => {
1320
1638
  const cases = [
1321
1639
  [{ 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"],"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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wB,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;AAs9BD;;;;;;;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"}
@@ -119,6 +119,14 @@ var referenceText = null;
119
119
  // { fill, text } hex), set in main() and read by the structural assembler. Null
120
120
  // when none declared → no color facts.
121
121
  var referenceColor = null;
122
+ // params.reference_spans (Signal C span facts, issue 16: the declared highlight
123
+ // extent per element id per screen, as { text, background }), set in main() and
124
+ // read by the structural assembler. Null when none declared → no span facts.
125
+ var referenceSpans = null;
126
+ // params.reference_lines (Signal C line facts, issue 18: the declared line
127
+ // split per element id per screen, as an array of line texts), set in main()
128
+ // and read by the structural assembler. Null when none declared → no line facts.
129
+ var referenceLines = null;
122
130
  // params.reference_baseline (Signal C: 'figma' (default) or 'previous_render').
123
131
  // Marks whether the appearance reference is the design (divergences) or the
124
132
  // previous catalog render (regressions/drift, the no-Figma path).
@@ -665,7 +673,7 @@ function renderScreens(renderable, projectRoot) {
665
673
  // geometry deltas vs reference_geometry) onto the screen entry, so the
666
674
  // judge reads the signals from protocol-result.json without fetching
667
675
  // artifacts. CONFIG.scale is the render density (dp = px / scale).
668
- assembleStructural(entry, layoutSource, referenceGeometry, CONFIG.scale, referenceText, referenceColor, referenceBaseline, referenceFrame, proofKind);
676
+ assembleStructural(entry, layoutSource, referenceGeometry, CONFIG.scale, referenceText, referenceColor, referenceBaseline, referenceFrame, proofKind, referenceSpans, referenceLines);
669
677
  }
670
678
  });
671
679
  } finally {
@@ -747,6 +755,24 @@ function main() {
747
755
  !Array.isArray(params.reference_color)
748
756
  ? params.reference_color
749
757
  : null;
758
+ // Signal-C span reference (issue 16): { "<Screen>": { "<elementId>":
759
+ // { text, background } } } — the substring the design highlights on that
760
+ // text element. Absent → no span facts.
761
+ referenceSpans =
762
+ params.reference_spans &&
763
+ typeof params.reference_spans === 'object' &&
764
+ !Array.isArray(params.reference_spans)
765
+ ? params.reference_spans
766
+ : null;
767
+ // Signal-C line reference (issue 18): { "<Screen>": { "<elementId>":
768
+ // ["line 1", "line 2"] } } — the exact line texts the design breaks that
769
+ // text element into. Absent → no line facts.
770
+ referenceLines =
771
+ params.reference_lines &&
772
+ typeof params.reference_lines === 'object' &&
773
+ !Array.isArray(params.reference_lines)
774
+ ? params.reference_lines
775
+ : null;
750
776
  // Signal-C baseline marker: 'previous_render' when the appearance reference was
751
777
  // sourced from the previous catalog render (no-Figma drift path), else 'figma'.
752
778
  referenceBaseline =
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invarn/cibuild",
3
- "version": "2.2.9",
3
+ "version": "2.3.1",
4
4
  "description": "CI Build CLI — local pipeline orchestration and validation",
5
5
  "type": "module",
6
6
  "main": "dist/cli.cjs",