@bridge-ds/core 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -391,21 +391,23 @@
391
391
  "owners": {
392
392
  "type": "object",
393
393
  "additionalProperties": false,
394
- "description": "GitHub logins that count as design and tech owners for Tier 3 approvals. Empty: two distinct approvers stand in.",
394
+ "description": "People and GitHub teams that count as design and tech owners for Tier 3 approvals. A person is a login (\"peterbono\" or \"@peterbono\"), a team is \"@org/team-slug\": its members are read from GitHub (the token needs read:org). Empty: two distinct approvers stand in.",
395
395
  "properties": {
396
396
  "design": {
397
397
  "type": "array",
398
398
  "items": {
399
- "type": "string"
399
+ "type": "string",
400
+ "pattern": "^@?[A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,38}(?:/[A-Za-z0-9][A-Za-z0-9._-]{0,99})?$"
400
401
  },
401
- "description": "Design owners."
402
+ "description": "Design owners: people (\"peterbono\") or teams (\"@acme/design\")."
402
403
  },
403
404
  "tech": {
404
405
  "type": "array",
405
406
  "items": {
406
- "type": "string"
407
+ "type": "string",
408
+ "pattern": "^@?[A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,38}(?:/[A-Za-z0-9][A-Za-z0-9._-]{0,99})?$"
407
409
  },
408
- "description": "Tech owners."
410
+ "description": "Tech owners: people (\"peterbono\") or teams (\"@acme/tech\")."
409
411
  }
410
412
  }
411
413
  },
@@ -434,6 +436,58 @@
434
436
  "default": 20
435
437
  }
436
438
  }
439
+ },
440
+ "rights": {
441
+ "type": "object",
442
+ "additionalProperties": false,
443
+ "description": "Which owner group holds each right. Studio Settings edits it. Absent: approvals follow owners and anyone with write access to the repo may ship, as before this field existed. A right left out takes its default.",
444
+ "properties": {
445
+ "approveDesign": {
446
+ "type": "array",
447
+ "minItems": 1,
448
+ "uniqueItems": true,
449
+ "items": {
450
+ "enum": [
451
+ "design",
452
+ "tech"
453
+ ]
454
+ },
455
+ "description": "Owner groups whose approval counts as the design approval.",
456
+ "default": [
457
+ "design"
458
+ ]
459
+ },
460
+ "approveTech": {
461
+ "type": "array",
462
+ "minItems": 1,
463
+ "uniqueItems": true,
464
+ "items": {
465
+ "enum": [
466
+ "design",
467
+ "tech"
468
+ ]
469
+ },
470
+ "description": "Owner groups whose approval counts as the tech approval.",
471
+ "default": [
472
+ "tech"
473
+ ]
474
+ },
475
+ "ship": {
476
+ "type": "array",
477
+ "minItems": 1,
478
+ "uniqueItems": true,
479
+ "items": {
480
+ "enum": [
481
+ "design",
482
+ "tech"
483
+ ]
484
+ },
485
+ "description": "Owner groups who may ship: merge the pull request, which publishes the change to the products. They still need write access to the repo. To let design owners ship too: [\"design\", \"tech\"].",
486
+ "default": [
487
+ "tech"
488
+ ]
489
+ }
490
+ }
437
491
  }
438
492
  }
439
493
  },
@@ -595,6 +649,21 @@
595
649
  }
596
650
  }
597
651
  }
652
+ },
653
+ "visualImpact": {
654
+ "type": "object",
655
+ "additionalProperties": false,
656
+ "description": "Visual before and after on pull requests (the visual-impact workflow). auto: on every pull request that touches tokens or components. on-demand: only when the pull request has the visual-check label (Studio adds it) or from a manual run, to save GitHub Actions minutes on private repos.",
657
+ "properties": {
658
+ "mode": {
659
+ "enum": [
660
+ "auto",
661
+ "on-demand"
662
+ ],
663
+ "default": "auto",
664
+ "description": "auto or on-demand."
665
+ }
666
+ }
598
667
  }
599
668
  }
600
669
  }
@@ -1,4 +1,4 @@
1
- import { A, a, b, C, D, c, F, N, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, B, E, G, H, I } from "../report-tNzTriGF.js";
1
+ import { A, a, b, C, D, c, F, N, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, B, E, G, H, I } from "../report-Bf2HEr9t.js";
2
2
  export {
3
3
  A as AUDIT_EXTENSIONS,
4
4
  a as AUDIT_IGNORE_DIRS,
@@ -8,11 +8,40 @@ export interface DraftText {
8
8
  }
9
9
  /** Removes em dashes (U+2014), the punctuation the Bridge voice never uses: " a [em dash] b " becomes "a, b". */
10
10
  export declare function cleanDraftText(text: string): string;
11
+ /** "Size=sm, State=Default, Variant=primary" -> "primary sm": the values a designer says, default states left out. */
12
+ export declare function shortVariant(key: string): string;
13
+ /** "Size=sm, Variant=primary; Size=md, Variant=primary" -> "primary sm and primary md"; empty -> "every variant". */
14
+ export declare const shortVariants: (list: string | undefined) => string;
15
+ export interface StructureRow {
16
+ op: 'added' | 'removed' | 'moved';
17
+ name: string;
18
+ /** "in primary sm" or "in every variant". */
19
+ where: string;
20
+ /** Layer type in words ("instance", "text", "frame"), when known. */
21
+ type?: string | undefined;
22
+ /** Main component of an instance ("Icon/Pencil"). */
23
+ main?: string | undefined;
24
+ /** Where it sits now (added, moved) or sat (removed): `after "Label"`, `before "Label"`, `alone`. */
25
+ at?: string | undefined;
26
+ /** Moved: where it sat before. */
27
+ from?: string | undefined;
28
+ }
29
+ /** A structure row read back, or undefined when the field is not one. */
30
+ export declare function parseStructureChange(c: RequestChange): StructureRow | undefined;
11
31
  /**
12
32
  * The deterministic title and summary of a component change request, from the changes a scan detected. Manual
13
33
  * requests with no detected change (a bug, an idea) get empty text: there is nothing factual to say yet.
14
34
  */
15
35
  export declare function draftRequestText(component: string, kind: RequestKind, changes: RequestChange[]): DraftText;
36
+ /** A change line is one sentence of at most this many characters, with no trailing period. */
37
+ export declare const DRAFT_LINE_MAX = 120;
38
+ /** A change line kept to the contract: one line, no em dash, at most 120 characters, no trailing period. */
39
+ export declare function sanitizeDraftLine(raw: unknown): string;
40
+ /**
41
+ * The deterministic change line of a detected component change: what changed, in one sentence, from the diff only.
42
+ * The first change is spelled out, the others counted ("and 2 more"). Empty when nothing was detected.
43
+ */
44
+ export declare function draftChangeLine(kind: RequestKind, changes: RequestChange[]): string;
16
45
  /** One line per variable edit for a change table: the token, its value before, its value in Figma. */
17
46
  export declare function pushChangeRows(entries: DiffEntry[]): RequestChange[];
18
47
  export interface PushDraftComponent {