@bridge-ds/core 0.16.0 → 0.18.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.
@@ -2,10 +2,10 @@ import { execFile, execFileSync } from "node:child_process";
2
2
  import { mkdtemp, rm, mkdir, writeFile, lstat, readFile } from "node:fs/promises";
3
3
  import { tmpdir } from "node:os";
4
4
  import { join, resolve, relative, dirname, sep, posix } from "node:path";
5
- import { aZ as assertSafeBranch, c as collectHistory, p as packageDirCandidates, a as parseChangelog, m as mergeReleases, r as releasesFromTags, b as buildReport, cA as prNumberFromSubject, cX as specHash, dk as validateComponentSpec, bT as hashSpec, bU as iconComponentName, C as variantKeyOf, df as tokenCssVar, ao as COMPONENT_SPECS_VERSION, an as COLOR_FIELDS, c_ as suggestionAppliedComment, X as gitBlobSha, cy as planSuggestionApply, ak as normalizeRepoPath } from "../repo-source-73kARDJv.js";
6
- import { K as selectTokenFiles, ag as globToRegExp, N as loadConfig, L as LayeredTokenSet, V as CONFIG_FILE, $ as layoutOptions, a0 as buildTokenSet, b5 as defaultContext, B as resolve$1, ae as slugify, bY as protectedBranchesOf, aO as baseBranchOf } from "../prod-branch-CSM0c2OF.js";
5
+ import { b7 as assertSafeBranch, c as collectHistory, p as packageDirCandidates, a as parseChangelog, m as mergeReleases, r as releasesFromTags, b as buildReport, cJ as prNumberFromSubject, d3 as specHash, dy as validateComponentSpec, c0 as hashSpec, c1 as iconComponentName, C as variantKeyOf, dt as tokenCssVar, av as COMPONENT_SPECS_VERSION, au as COLOR_FIELDS, d8 as suggestionAppliedComment, X as gitBlobSha, cH as planSuggestionApply, ak as normalizeRepoPath } from "../repo-source-CRfhLO87.js";
6
+ import { K as selectTokenFiles, ag as globToRegExp, N as loadConfig, L as LayeredTokenSet, V as CONFIG_FILE, $ as layoutOptions, a0 as buildTokenSet, b7 as defaultContext, B as resolve$1, ae as slugify, b$ as protectedBranchesOf, aQ as baseBranchOf } from "../prod-branch-DenQkr_e.js";
7
7
  import { statSync, readFileSync, existsSync, writeFileSync, readdirSync } from "node:fs";
8
- import { i as isAuditable, Q as planCssFixes, O as parseAllowlist, d as DesignSystemIndex, l as buildAuditReport, o as compareWithBaseline, b as AUDIT_IGNORE_DIRS } from "../report-DbE6yJCw.js";
8
+ import { i as isAuditable, Q as planCssFixes, O as parseAllowlist, d as DesignSystemIndex, l as buildAuditReport, o as compareWithBaseline, b as AUDIT_IGNORE_DIRS } from "../report-DVEmUr0p.js";
9
9
  import ts from "typescript";
10
10
  function git(root, args, opts = {}) {
11
11
  return new Promise((resolve2, reject) => {
@@ -1080,6 +1080,15 @@ function whoCanShipSentence(policy) {
1080
1080
  }
1081
1081
  const DEFAULT_VISUAL_IMPACT = { mode: "auto" };
1082
1082
  const VISUAL_CHECK_LABEL = "visual-check";
1083
+ const VISUAL_WORKFLOW_FILES = ["visual-impact.yml", "visual-impact.yaml"];
1084
+ const VISUAL_CHECKS_DOCS = "https://github.com/peterbono/ai-design-system-demo/blob/main/docs/GOVERNANCE.md#visual-before-and-after";
1085
+ function hasVisualWorkflow(files) {
1086
+ return files.some((f) => VISUAL_WORKFLOW_FILES.includes(f.split("/").pop() ?? ""));
1087
+ }
1088
+ function visualOffer(x) {
1089
+ if (!x.touchesVisuals) return "none";
1090
+ return x.workflow === false ? "set-up" : "run";
1091
+ }
1083
1092
  function visualImpactProblems(raw) {
1084
1093
  if (raw === void 0) return [];
1085
1094
  if (!raw || typeof raw !== "object" || Array.isArray(raw)) return ['"visualImpact" must be { "mode": "auto" | "on-demand" }'];
@@ -2952,7 +2961,7 @@ export {
2952
2961
  previewsSettled as Z,
2953
2962
  DEFAULT_TOKEN_PATHS as _,
2954
2963
  proposedTokenPath as a,
2955
- composePrBody as a$,
2964
+ commitMessage as a$,
2956
2965
  buildTokenSet as a0,
2957
2966
  readPreviewComment as a1,
2958
2967
  linkStatus as a2,
@@ -2970,26 +2979,26 @@ export {
2970
2979
  RISK_TIER as aE,
2971
2980
  TIER_ORDER as aF,
2972
2981
  TeamDirectory as aG,
2973
- VISUAL_CHECK_LABEL as aH,
2974
- affectedContrast as aI,
2975
- aliasOf as aJ,
2976
- appForProject as aK,
2977
- appUrl as aL,
2978
- approverEntries as aM,
2979
- approverLists as aN,
2980
- baseBranchOf as aO,
2981
- branchName as aP,
2982
- branchSlug as aQ,
2983
- canShip as aR,
2984
- changeKind as aS,
2985
- changedModes as aT,
2986
- changesMode as aU,
2987
- clearRawDeep as aV,
2988
- colorToCss as aW,
2989
- colorsEqual as aX,
2990
- comboKey as aY,
2991
- commitMessage as aZ,
2992
- compactJson as a_,
2982
+ VISUAL_CHECKS_DOCS as aH,
2983
+ VISUAL_CHECK_LABEL as aI,
2984
+ VISUAL_WORKFLOW_FILES as aJ,
2985
+ affectedContrast as aK,
2986
+ aliasOf as aL,
2987
+ appForProject as aM,
2988
+ appUrl as aN,
2989
+ approverEntries as aO,
2990
+ approverLists as aP,
2991
+ baseBranchOf as aQ,
2992
+ branchName as aR,
2993
+ branchSlug as aS,
2994
+ canShip as aT,
2995
+ changeKind as aU,
2996
+ changedModes as aV,
2997
+ changesMode as aW,
2998
+ clearRawDeep as aX,
2999
+ colorToCss as aY,
3000
+ colorsEqual as aZ,
3001
+ comboKey as a_,
2993
3002
  productBranchSentence as aa,
2994
3003
  mergePiecesRecord as ab,
2995
3004
  productOfBranch as ac,
@@ -3017,100 +3026,104 @@ export {
3017
3026
  PREVIEW_COMMENT_MARKER as ay,
3018
3027
  PREVIEW_PLACEHOLDERS as az,
3019
3028
  modesOf as b,
3020
- rightsProblems as b$,
3021
- composite as b0,
3022
- contextFor as b1,
3023
- contrastLevel as b2,
3024
- contrastPair as b3,
3025
- contrastRatio as b4,
3026
- defaultContext as b5,
3027
- defaultTitle as b6,
3028
- detectLayout as b7,
3029
- entriesFor as b8,
3030
- entryLabel as b9,
3031
- luminance as bA,
3032
- nearestQuestion as bB,
3033
- neededBySection as bC,
3034
- nodesEqual as bD,
3035
- normalizeRights as bE,
3036
- overrideKey as bF,
3037
- ownerEntryProblems as bG,
3038
- pairKey as bH,
3039
- parseDimension as bI,
3040
- parseJson as bJ,
3041
- parseNeededBy as bK,
3042
- parseOwnerEntry as bL,
3043
- parseVercelComment as bM,
3044
- piecesSection as bN,
3045
- plainEqual as bO,
3046
- previewComment as bP,
3047
- previewLinksOf as bQ,
3048
- previewUrl as bR,
3049
- productForPlace as bS,
3050
- productLabel as bT,
3051
- productMarks as bU,
3052
- productProblems as bV,
3053
- productsOf as bW,
3054
- projectOfLabel as bX,
3055
- protectedBranchesOf as bY,
3056
- renderedColor as bZ,
3057
- rgbaToDtcg as b_,
3058
- expandEntries as ba,
3059
- expandOwners as bb,
3060
- fieldChanges as bc,
3061
- findProduct as bd,
3062
- findToken as be,
3063
- findVercelComment as bf,
3064
- flattenLayerFile as bg,
3065
- formatNumber as bh,
3066
- formatOwnerEntry as bi,
3067
- fromPlain as bj,
3068
- getChild as bk,
3069
- getEntry as bl,
3070
- groupsPhrase as bm,
3071
- hexToRgba as bn,
3072
- holdersOf as bo,
3073
- indexByPath as bp,
3074
- inheritedTypeAt as bq,
3075
- installCommand as br,
3076
- installCommandFromPreviewComment as bs,
3077
- isGuardrail as bt,
3078
- isTeamEntry as bu,
3079
- isTokenFile as bv,
3080
- isVercelComment as bw,
3081
- kindForMin as bx,
3082
- layeredParityIssues as by,
3083
- libraryIsPublic as bz,
3029
+ protectedBranchesOf as b$,
3030
+ compactJson as b0,
3031
+ composePrBody as b1,
3032
+ composite as b2,
3033
+ contextFor as b3,
3034
+ contrastLevel as b4,
3035
+ contrastPair as b5,
3036
+ contrastRatio as b6,
3037
+ defaultContext as b7,
3038
+ defaultTitle as b8,
3039
+ detectLayout as b9,
3040
+ kindForMin as bA,
3041
+ layeredParityIssues as bB,
3042
+ libraryIsPublic as bC,
3043
+ luminance as bD,
3044
+ nearestQuestion as bE,
3045
+ neededBySection as bF,
3046
+ nodesEqual as bG,
3047
+ normalizeRights as bH,
3048
+ overrideKey as bI,
3049
+ ownerEntryProblems as bJ,
3050
+ pairKey as bK,
3051
+ parseDimension as bL,
3052
+ parseJson as bM,
3053
+ parseNeededBy as bN,
3054
+ parseOwnerEntry as bO,
3055
+ parseVercelComment as bP,
3056
+ piecesSection as bQ,
3057
+ plainEqual as bR,
3058
+ previewComment as bS,
3059
+ previewLinksOf as bT,
3060
+ previewUrl as bU,
3061
+ productForPlace as bV,
3062
+ productLabel as bW,
3063
+ productMarks as bX,
3064
+ productProblems as bY,
3065
+ productsOf as bZ,
3066
+ projectOfLabel as b_,
3067
+ entriesFor as ba,
3068
+ entryLabel as bb,
3069
+ expandEntries as bc,
3070
+ expandOwners as bd,
3071
+ fieldChanges as be,
3072
+ findProduct as bf,
3073
+ findToken as bg,
3074
+ findVercelComment as bh,
3075
+ flattenLayerFile as bi,
3076
+ formatNumber as bj,
3077
+ formatOwnerEntry as bk,
3078
+ fromPlain as bl,
3079
+ getChild as bm,
3080
+ getEntry as bn,
3081
+ groupsPhrase as bo,
3082
+ hasVisualWorkflow as bp,
3083
+ hexToRgba as bq,
3084
+ holdersOf as br,
3085
+ indexByPath as bs,
3086
+ inheritedTypeAt as bt,
3087
+ installCommand as bu,
3088
+ installCommandFromPreviewComment as bv,
3089
+ isGuardrail as bw,
3090
+ isTeamEntry as bx,
3091
+ isTokenFile as by,
3092
+ isVercelComment as bz,
3084
3093
  TIER_AXIS as c,
3085
- sameProducts as c0,
3086
- sameToken as c1,
3087
- serializeJson as c2,
3088
- shipPolicy as c3,
3089
- snapshotUrl as c4,
3090
- soloApprover as c5,
3091
- soloOwnerOf as c6,
3092
- soloOwnerSentence as c7,
3093
- storybookUrl as c8,
3094
- suggestNearestComment as c9,
3095
- summarizeTokenChange as ca,
3096
- tarballAssetName as cb,
3097
- tarballUrl as cc,
3098
- teamKey as cd,
3099
- teamKeyOf as ce,
3100
- teamUnreadableMessage as cf,
3101
- teamsIn as cg,
3102
- toAlias as ch,
3103
- toMap as ci,
3104
- toPlain as cj,
3105
- tokenBump as ck,
3106
- tokenNode as cl,
3107
- unreadableShipTeams as cm,
3108
- unreadableTeams as cn,
3109
- valueIn as co,
3110
- valueToCss as cp,
3111
- visualImpactProblems as cq,
3112
- whoCanShipSentence as cr,
3113
- whyItExists as cs,
3094
+ renderedColor as c0,
3095
+ rgbaToDtcg as c1,
3096
+ rightsProblems as c2,
3097
+ sameProducts as c3,
3098
+ sameToken as c4,
3099
+ serializeJson as c5,
3100
+ shipPolicy as c6,
3101
+ snapshotUrl as c7,
3102
+ soloApprover as c8,
3103
+ soloOwnerOf as c9,
3104
+ soloOwnerSentence as ca,
3105
+ storybookUrl as cb,
3106
+ suggestNearestComment as cc,
3107
+ summarizeTokenChange as cd,
3108
+ tarballAssetName as ce,
3109
+ tarballUrl as cf,
3110
+ teamKey as cg,
3111
+ teamKeyOf as ch,
3112
+ teamUnreadableMessage as ci,
3113
+ teamsIn as cj,
3114
+ toAlias as ck,
3115
+ toMap as cl,
3116
+ toPlain as cm,
3117
+ tokenBump as cn,
3118
+ tokenNode as co,
3119
+ unreadableShipTeams as cp,
3120
+ unreadableTeams as cq,
3121
+ valueIn as cr,
3122
+ valueToCss as cs,
3123
+ visualImpactProblems as ct,
3124
+ visualOffer as cu,
3125
+ whoCanShipSentence as cv,
3126
+ whyItExists as cw,
3114
3127
  collectRefs as d,
3115
3128
  evaluatePairs as e,
3116
3129
  findReferenceProblems as f,
@@ -3135,4 +3148,4 @@ export {
3135
3148
  parseColor as y,
3136
3149
  rgbaToHex as z
3137
3150
  };
3138
- //# sourceMappingURL=prod-branch-CSM0c2OF.js.map
3151
+ //# sourceMappingURL=prod-branch-DenQkr_e.js.map