@bridge-ds/core 0.13.0 → 0.15.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.
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { m as modeDisplayName, b as modesOf$1, i as isMultiMode, T as TIER_NAMES, c as TIER_AXIS, d as collectRefs, f as findReferenceProblems, e as evaluatePairs, g as contrastScope, h as contextLabel, S as SINGLE_MODE, j as isAlias, k as aliasTarget, l as pathId, v as valuesEqual, n as flattenTokens, s as serializeTokenFile, r as removeToken, u as upsertToken, o as threeWayDiff, q as emptyTokenFile, w as parseTokenFile, E as EXT_ID, x as EXT_SCOPES, y as parseColor, z as rgbaToHex, A as formatValue, B as resolve, C as moveToken, D as effectiveScopes, F as sameScopes, G as defaultScopes, H as readTokenAt, I as modeFile, J as defaultFile, K as selectTokenFiles, L as LayeredTokenSet, M as resolveBranchPreviews, N as loadConfig, O as tokensPath, P as toConfigJson, Q as validateLayered, R as parseContrastChecks, U as classifyRisk, V as CONFIG_FILE, W as RISK_LABELS, X as previewLinks, Y as findPreviewComment, Z as previewsSettled, _ as DEFAULT_TOKEN_PATHS, $ as layoutOptions, a0 as buildTokenSet, a1 as readPreviewComment, a2 as linkStatus, a3 as libraryPreviewState, a4 as parsePiecesRecord, a5 as libraryBranchPlan, a6 as NEEDED_BY_LABEL, a7 as withNeededBy, a8 as withLink, a9 as withPiecesRecord, aa as productBranchSentence, ab as mergePiecesRecord, ac as productOfBranch, ad as defaultProduct, ae as slugify } from "./prod-branch-6ftQWwdu.js";
2
- import { af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, a_, a$, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI, bJ, bK, bL, p, bM, bN, bO, bP, bQ, bR, bS, bT, bU, bV, bW, a, bX, bY, bZ, b_, b$, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, cd, ce, cf, cg, ch, ci, cj, t, ck, cl, cm, cn, co, cp, cq, cr } from "./prod-branch-6ftQWwdu.js";
3
- import { G as GitHubError, c as collectHistory, p as packageDirCandidates, a as parseChangelog, r as releasesFromTags, m as mergeReleases, b as buildReport, d as applyTokenEdits, e as buildHistoryEntry, f as coerceValue, g as checkLayeredPair, h as formatChangeset, P as PROSE_KEYS, i as markClaudeDraft, j as cleanDraftText, k as docsPrompt, D as DRAFT_LINE_MAX, R as REQUESTS_BRANCH, l as REQUEST_KINDS, s as sanitizeDraftLine, n as parseExplorationBody, E as EXPLORATION_PREFIX, o as explorationSlug, q as explorationStatus, t as explorationTryIt, u as isExplorationPull, v as promotionPlan, w as EXPLORATION_LABEL, x as explorationProblems, y as explorationNote, z as explorationNotePath, A as explorationPrTitle, B as explorationPrBody, C as variantKeyOf, F as overrideComment, O as OVERRIDE_HEADING, H as overrideRefusedComment, I as suggestionStateFromLabels, J as suggestionStatus, K as composeRequestIssue, L as EXPLORATION_NOTES_DIR, M as isExplorationBranch, N as diffLayered, Q as contrastDelta, S as runLayeredContrast, T as layeredImpact, U as classifyLayered, V as composeProposalBody, W as createSuggestionOnGitHub, X as gitBlobSha, Y as SUGGESTION_SCHEMA, Z as branchWithJiraKey, _ as titleWithJiraKey, $ as figmaSpecPath, a0 as formatFigmaSpec, a1 as figmaDraftBrief, a2 as parseFigmaOrigin, a3 as figmaPushStatus, a4 as parseFigmaSpec, a5 as FIGMA_SPEC_DIR, a6 as FROM_FIGMA_LABEL, a7 as withFigmaOrigin, a8 as WAITING_FOR_CLAUDE_LABEL, a9 as DRAFTED_BY_CLAUDE_LABEL, aa as planComponentPush, ab as figmaOriginSection, ac as figmaBranchTitle, ad as figmaSpecSlug, ae as figmaDraftBody, af as REQUEST_LABEL, ag as figmaNodeUrl } from "./suggestion-apply-bH6-gZrE.js";
4
- import { ah as ah2, ai as ai2, aj as aj2, ak as ak2, al as al2, am as am2, an as an2, ao as ao2, ap as ap2, aq as aq2, ar as ar2, as as as2, at as at2, au as au2, av as av2, aw as aw2, ax as ax2, ay as ay2, az as az2, aA as aA2, aB as aB2, aC as aC2, aD as aD2, aE as aE2, aF as aF2, aG as aG2, aH as aH2, aI as aI2, aJ as aJ2, aK as aK2, aL as aL2, aM as aM2, aN as aN2, aO as aO2, aP as aP2, aQ as aQ2, aR as aR2, aS as aS2, aT as aT2, aU as aU2, aV as aV2, aW as aW2, aX as aX2, aY as aY2, aZ as aZ2, a_ as a_2, a$ as a$2, b0 as b02, b1 as b12, b2 as b22, b3 as b32, b4 as b42, b5 as b52, b6 as b62, b7 as b72, b8 as b82, b9 as b92, ba as ba2, bb as bb2, bc as bc2, bd as bd2, be as be2, bf as bf2, bg as bg2, bh as bh2, bi as bi2, bj as bj2, bk as bk2, bl as bl2, bm as bm2, bn as bn2, bo as bo2, bp as bp2, bq as bq2, br as br2, bs as bs2, bt as bt2, bu as bu2, bv as bv2, bw as bw2, bx as bx2, by as by2, bz as bz2, bA as bA2, bB as bB2, bC as bC2, bD as bD2, bE as bE2, bF as bF2, bG as bG2, bH as bH2, bI as bI2, bJ as bJ2, bK as bK2, bL as bL2, bM as bM2, bN as bN2, bO as bO2, bP as bP2, bQ as bQ2, bR as bR2, bS as bS2, bT as bT2, bU as bU2, bV as bV2, bW as bW2, bX as bX2, bY as bY2, bZ as bZ2, b_ as b_2, b$ as b$2, c0 as c02, c1 as c12, c2 as c22, c3 as c32, c4 as c42, c5 as c52, c6 as c62, c7 as c72, c8 as c82, c9 as c92, ca as ca2, cb as cb2, cc as cc2, cd as cd2, ce as ce2, cf as cf2, cg as cg2, ch as ch2, ci as ci2, cj as cj2, ck as ck2, cl as cl2, cm as cm2, cn as cn2, co as co2, cp as cp2, cq as cq2, cr as cr2, cs, ct, cu, cv, cw, cx, cy, cz, cA, cB, cC, cD, cE, cF, cG, cH, cI, cJ, cK, cL, cM, cN, cO, cP, cQ, cR, cS, cT, cU, cV, cW, cX, cY, cZ, c_, c$, d0, d1, d2, d3, d4, d5, d6, d7, d8, d9, da, db, dc, dd, de, df, dg, dh } from "./suggestion-apply-bH6-gZrE.js";
1
+ import { m as modeDisplayName, b as modesOf$1, i as isMultiMode, T as TIER_NAMES, c as TIER_AXIS, d as collectRefs, f as findReferenceProblems, e as evaluatePairs, g as contrastScope, h as contextLabel, S as SINGLE_MODE, j as isAlias$1, k as aliasTarget, l as pathId, v as valuesEqual, n as flattenTokens, s as serializeTokenFile, r as removeToken, u as upsertToken, o as threeWayDiff, q as emptyTokenFile, w as parseTokenFile, E as EXT_ID, x as EXT_SCOPES, y as parseColor, z as rgbaToHex, A as formatValue, B as resolve, C as moveToken, D as effectiveScopes, F as sameScopes, G as defaultScopes, H as readTokenAt, I as modeFile, J as defaultFile, K as selectTokenFiles, L as LayeredTokenSet, M as resolveBranchPreviews, N as loadConfig, O as tokensPath, P as toConfigJson, Q as validateLayered, R as parseContrastChecks, U as classifyRisk, V as CONFIG_FILE, W as RISK_LABELS, X as previewLinks, Y as findPreviewComment, Z as previewsSettled, _ as DEFAULT_TOKEN_PATHS, $ as layoutOptions, a0 as buildTokenSet, a1 as readPreviewComment, a2 as linkStatus, a3 as libraryPreviewState, a4 as parsePiecesRecord, a5 as libraryBranchPlan, a6 as NEEDED_BY_LABEL, a7 as withNeededBy, a8 as withLink, a9 as withPiecesRecord, aa as productBranchSentence, ab as mergePiecesRecord, ac as productOfBranch, ad as defaultProduct, ae as slugify, af as defineConfig, ag as ConfigError, ah as DEFAULT_CHANGES_MODE, ai as DEFAULT_OVERRIDE, aj as DEFAULT_PRODUCTS } from "./prod-branch-BjXFIz74.js";
2
+ import { ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, a_, a$, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI, bJ, bK, bL, bM, p, bN, bO, bP, bQ, bR, bS, bT, bU, bV, bW, bX, a, bY, bZ, b_, b$, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, cd, ce, cf, cg, ch, ci, cj, ck, t, cl, cm, cn, co, cp, cq, cr, cs } from "./prod-branch-BjXFIz74.js";
3
+ import { G as GitHubError, c as collectHistory, p as packageDirCandidates, a as parseChangelog, r as releasesFromTags, m as mergeReleases, b as buildReport, d as applyTokenEdits, e as buildHistoryEntry, f as coerceValue, g as checkLayeredPair, h as formatChangeset, P as PROSE_KEYS, i as markClaudeDraft, j as cleanDraftText, k as docsPrompt, D as DRAFT_LINE_MAX, R as REQUESTS_BRANCH, l as REQUEST_KINDS, s as sanitizeDraftLine, n as parseExplorationBody, E as EXPLORATION_PREFIX, o as explorationSlug, q as explorationStatus, t as explorationTryIt, u as isExplorationPull, v as promotionPlan, w as EXPLORATION_LABEL, x as explorationProblems, y as explorationNote, z as explorationNotePath, A as explorationPrTitle, B as explorationPrBody, C as variantKeyOf, F as overrideComment, O as OVERRIDE_HEADING, H as overrideRefusedComment, I as suggestionStateFromLabels, J as suggestionStatus, K as composeRequestIssue, L as EXPLORATION_NOTES_DIR, M as isExplorationBranch, N as diffLayered, Q as contrastDelta, S as runLayeredContrast, T as layeredImpact, U as classifyLayered, V as composeProposalBody, W as createSuggestionOnGitHub, X as gitBlobSha, Y as SUGGESTION_SCHEMA, Z as branchWithJiraKey, _ as titleWithJiraKey, $ as figmaSpecPath, a0 as formatFigmaSpec, a1 as figmaDraftBrief, a2 as parseFigmaOrigin, a3 as figmaPushStatus, a4 as parseFigmaSpec, a5 as FIGMA_SPEC_DIR, a6 as FROM_FIGMA_LABEL, a7 as withFigmaOrigin, a8 as WAITING_FOR_CLAUDE_LABEL, a9 as DRAFTED_BY_CLAUDE_LABEL, aa as planComponentPush, ab as figmaOriginSection, ac as figmaBranchTitle, ad as figmaSpecSlug, ae as figmaDraftBody, af as REQUEST_LABEL, ag as figmaNodeUrl, ah as parentDir, ai as parseComponentSpecs, aj as readRepoTexts, ak as normalizeRepoPath, al as isUnder } from "./repo-source-CNZLq_xK.js";
4
+ import { am as am2, an as an2, ao as ao2, ap as ap2, aq as aq2, ar as ar2, as as as2, at as at2, au as au2, av as av2, aw as aw2, ax as ax2, ay as ay2, az as az2, aA as aA2, aB as aB2, aC as aC2, aD as aD2, aE as aE2, aF as aF2, aG as aG2, aH as aH2, aI as aI2, aJ as aJ2, aK as aK2, aL as aL2, aM as aM2, aN as aN2, aO as aO2, aP as aP2, aQ as aQ2, aR as aR2, aS as aS2, aT as aT2, aU as aU2, aV as aV2, aW as aW2, aX as aX2, aY as aY2, aZ as aZ2, a_ as a_2, a$ as a$2, b0 as b02, b1 as b12, b2 as b22, b3 as b32, b4 as b42, b5 as b52, b6 as b62, b7 as b72, b8 as b82, b9 as b92, ba as ba2, bb as bb2, bc as bc2, bd as bd2, be as be2, bf as bf2, bg as bg2, bh as bh2, bi as bi2, bj as bj2, bk as bk2, bl as bl2, bm as bm2, bn as bn2, bo as bo2, bp as bp2, bq as bq2, br as br2, bs as bs2, bt as bt2, bu as bu2, bv as bv2, bw as bw2, bx as bx2, by as by2, bz as bz2, bA as bA2, bB as bB2, bC as bC2, bD as bD2, bE as bE2, bF as bF2, bG as bG2, bH as bH2, bI as bI2, bJ as bJ2, bK as bK2, bL as bL2, bM as bM2, bN as bN2, bO as bO2, bP as bP2, bQ as bQ2, bR as bR2, bS as bS2, bT as bT2, bU as bU2, bV as bV2, bW as bW2, bX as bX2, bY as bY2, bZ as bZ2, b_ as b_2, b$ as b$2, c0 as c02, c1 as c12, c2 as c22, c3 as c32, c4 as c42, c5 as c52, c6 as c62, c7 as c72, c8 as c82, c9 as c92, ca as ca2, cb as cb2, cc as cc2, cd as cd2, ce as ce2, cf as cf2, cg as cg2, ch as ch2, ci as ci2, cj as cj2, ck as ck2, cl as cl2, cm as cm2, cn as cn2, co as co2, cp as cp2, cq as cq2, cr as cr2, cs as cs2, ct, cu, cv, cw, cx, cy, cz, cA, cB, cC, cD, cE, cF, cG, cH, cI, cJ, cK, cL, cM, cN, cO, cP, cQ, cR, cS, cT, cU, cV, cW, cX, cY, cZ, c_, c$, d0, d1, d2, d3, d4, d5, d6, d7, d8, d9, da, db, dc, dd, de, df, dg, dh, di, dj, dk, dl, dm, dn, dp, dq, dr, ds, dt } from "./repo-source-CNZLq_xK.js";
5
5
  const issueKey$1 = (i) => `${i.code}|${i.path ?? ""}|${i.mode ?? ""}|${i.code === "file-problem" ? i.message : ""}`;
6
6
  const modeName = (mode) => mode === SINGLE_MODE ? "all modes" : modeDisplayName(mode);
7
7
  const isPalette = (t2) => t2.tier === "brand" && t2.path.startsWith("palette.");
@@ -27,7 +27,7 @@ function aliasRule(owner, target) {
27
27
  }
28
28
  const MUST_ALIAS = ["brand", "semantic", "density", "component"];
29
29
  function checkValue(set, owner, value, mode, where, issues) {
30
- if (!isAlias(value)) {
30
+ if (!isAlias$1(value)) {
31
31
  if (MUST_ALIAS.includes(owner.tier) && value !== void 0) {
32
32
  issues.push({
33
33
  code: "raw-value",
@@ -1112,7 +1112,7 @@ const RADIUS_ROLES = ["inset", "control", "container", "overlay"];
1112
1112
  const RESERVED = /* @__PURE__ */ new Set(["default", "base", "all", "none", "new", "blank", "primitives", "semantic", "components", "density"]);
1113
1113
  const BRAND_SLUG_RE = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/;
1114
1114
  const DEFAULT_PRIMARY_CHROMA = 0.14;
1115
- const isObj$1 = (x) => !!x && typeof x === "object" && !Array.isArray(x);
1115
+ const isObj$2 = (x) => !!x && typeof x === "object" && !Array.isArray(x);
1116
1116
  const fileMap = (f) => f instanceof Map ? new Map(f) : new Map(Object.entries(f));
1117
1117
  const brandDisplayName = (slug) => slug.split("-").filter(Boolean).map((w) => w[0].toUpperCase() + w.slice(1)).join(" ");
1118
1118
  function brandLayers(config) {
@@ -1133,27 +1133,27 @@ function setAt(doc, path, node) {
1133
1133
  const keys = path.split(".");
1134
1134
  let cur = doc;
1135
1135
  for (const k of keys.slice(0, -1)) {
1136
- if (!isObj$1(cur[k])) cur[k] = {};
1136
+ if (!isObj$2(cur[k])) cur[k] = {};
1137
1137
  cur = cur[k];
1138
1138
  }
1139
1139
  const last = keys[keys.length - 1];
1140
- const prev = isObj$1(cur[last]) ? cur[last] : {};
1140
+ const prev = isObj$2(cur[last]) ? cur[last] : {};
1141
1141
  cur[last] = { ...prev, ...node };
1142
1142
  }
1143
1143
  function getAt(doc, path) {
1144
1144
  let cur = doc;
1145
- for (const k of path.split(".")) cur = isObj$1(cur) ? cur[k] : void 0;
1146
- return isObj$1(cur) ? cur : void 0;
1145
+ for (const k of path.split(".")) cur = isObj$2(cur) ? cur[k] : void 0;
1146
+ return isObj$2(cur) ? cur : void 0;
1147
1147
  }
1148
1148
  function typeAt(doc, path) {
1149
1149
  let cur = doc;
1150
1150
  let type;
1151
1151
  for (const k of path.split(".")) {
1152
- if (!isObj$1(cur)) return type;
1152
+ if (!isObj$2(cur)) return type;
1153
1153
  if (typeof cur.$type === "string") type = cur.$type;
1154
1154
  cur = cur[k];
1155
1155
  }
1156
- return isObj$1(cur) && typeof cur.$type === "string" ? cur.$type : type;
1156
+ return isObj$2(cur) && typeof cur.$type === "string" ? cur.$type : type;
1157
1157
  }
1158
1158
  function rampFor(input, pinStep, kind) {
1159
1159
  if (typeof input === "number" || typeof input === "string" && /^\d+(\.\d+)?$/.test(input.trim())) {
@@ -1210,7 +1210,7 @@ function listBrands(source) {
1210
1210
  doc = JSON.parse(files.get(file) ?? "{}");
1211
1211
  } catch {
1212
1212
  }
1213
- const meta = isObj$1(doc.$extensions) && isObj$1(doc.$extensions["dev.bridge.brand"]) ? doc.$extensions["dev.bridge.brand"] : {};
1213
+ const meta = isObj$2(doc.$extensions) && isObj$2(doc.$extensions["dev.bridge.brand"]) ? doc.$extensions["dev.bridge.brand"] : {};
1214
1214
  const combo = set.normalizeCombo({ brand: slug });
1215
1215
  const primary = set.resolve("color.action.primary.bg", combo);
1216
1216
  const overrides = layers.override ? (config.axes[layers.overrideAxis]?.values ?? []).map((v) => fill(layers.override, { brand: slug, [layers.overrideAxis]: v })).filter((f) => files.has(f)) : [];
@@ -1300,7 +1300,7 @@ function planNewBrand(source, input) {
1300
1300
  for (const [path, defs] of before.view(before.defaultCombo)) {
1301
1301
  const m = /^radius\.([\w-]+)$/.exec(path);
1302
1302
  const v = defs[defs.length - 1].value;
1303
- if (m && isObj$1(v) && typeof v.value === "number" && v.unit === "px" && !getAt(doc, path)) scale.set(v.value, m[1]);
1303
+ if (m && isObj$2(v) && typeof v.value === "number" && v.unit === "px" && !getAt(doc, path)) scale.set(v.value, m[1]);
1304
1304
  }
1305
1305
  const radius = input.radius ?? (blank ? RADIUS_PRESETS[0].radius : void 0);
1306
1306
  if (radius) {
@@ -1339,9 +1339,9 @@ function planNewBrand(source, input) {
1339
1339
  }
1340
1340
  const palette = getAt(doc, "palette");
1341
1341
  for (const [role, group] of Object.entries(palette ?? {})) {
1342
- if (role.startsWith("$") || !isObj$1(group)) continue;
1342
+ if (role.startsWith("$") || !isObj$2(group)) continue;
1343
1343
  for (const [step, node] of Object.entries(group)) {
1344
- if (step.startsWith("$") || !isObj$1(node) || !("$value" in node) || typeof node.$value === "string") continue;
1344
+ if (step.startsWith("$") || !isObj$2(node) || !("$value" in node) || typeof node.$value === "string") continue;
1345
1345
  const ramp = `${slug}-${role}`;
1346
1346
  const entry = prims.get(ramp) ?? { description: `${name} ${role}. Exact values set when the brand was created.`, steps: /* @__PURE__ */ new Map() };
1347
1347
  entry.steps.set(Number(step), node.$value);
@@ -1354,7 +1354,7 @@ function planNewBrand(source, input) {
1354
1354
  if (prims.size && files.has(primFile)) issues.push({ level: "error", code: "slug-file-exists", message: `${tokensPath(config, primFile)} already exists. Pick another name.` });
1355
1355
  for (const r of prims.keys()) if (before.allPaths().some((p2) => p2.startsWith(`color.${r}.`))) issues.push({ level: "error", code: "ramp-exists", message: `A primitive ramp color.${r} already exists. Pick another name.` });
1356
1356
  doc.$description = `${name}: created with Bridge, started from ${blank ? "a blank brand" : brandDisplayName(from)}.`;
1357
- doc.$extensions = { ...isObj$1(doc.$extensions) ? doc.$extensions : {}, "dev.bridge.brand": { name, from, ...Object.keys(anchors).length ? { anchors } : {} } };
1357
+ doc.$extensions = { ...isObj$2(doc.$extensions) ? doc.$extensions : {}, "dev.bridge.brand": { name, from, ...Object.keys(anchors).length ? { anchors } : {} } };
1358
1358
  const { $description, $extensions, ...rest } = doc;
1359
1359
  const brandFile = fill(layers.brand, { brand: slug });
1360
1360
  const nextFiles = new Map(files);
@@ -1429,10 +1429,10 @@ function planNewBrand(source, input) {
1429
1429
  ...created.map((f) => ({ path: tokensPath(config, f), action: "create", content: nextFiles.get(f) })),
1430
1430
  { path: CONFIG_FILE, action: "modify", content: configText }
1431
1431
  ];
1432
- const cs2 = config.changesets ?? (config.changeset ? { dir: ".changeset", package: config.changeset.package } : void 0);
1433
- const changeset = cs2 ? {
1434
- path: `${cs2.dir}/bridge-brand-${slug}.md`,
1435
- content: formatChangeset(cs2.package, "minor", `Add the ${name} brand (\`${slug}\`), started from ${blank ? "a blank brand" : brandDisplayName(from)}.`, `- ${created.map((f) => `\`${tokensPath(config, f)}\``).join("\n- ")}
1432
+ const cs3 = config.changesets ?? (config.changeset ? { dir: ".changeset", package: config.changeset.package } : void 0);
1433
+ const changeset = cs3 ? {
1434
+ path: `${cs3.dir}/bridge-brand-${slug}.md`,
1435
+ content: formatChangeset(cs3.package, "minor", `Add the ${name} brand (\`${slug}\`), started from ${blank ? "a blank brand" : brandDisplayName(from)}.`, `- ${created.map((f) => `\`${tokensPath(config, f)}\``).join("\n- ")}
1436
1436
  - \`${CONFIG_FILE}\`: modes.brand gains "${slug}", so the token build and the contrast gate cover it.`)
1437
1437
  } : void 0;
1438
1438
  if (changeset) planned.push({ path: changeset.path, action: "create", content: changeset.content });
@@ -1885,9 +1885,9 @@ function sanitizeResultLines(item, raw) {
1885
1885
  for (const l of raw) {
1886
1886
  const id = typeof l?.id === "string" ? l.id : "";
1887
1887
  if (!known.has(id)) throw new Error(`Item "${item.id}" has no change line "${id}".${known.size ? ` Use the line ids from bridge_pending_drafts: ${[...known].join(", ")}.` : " It lists no lines: leave lines out."}`);
1888
- const line = sanitizeDraftLine(l.line);
1888
+ const line2 = sanitizeDraftLine(l.line);
1889
1889
  const title = sanitizeDraftTitle(l.title);
1890
- if (line || title) out.set(id, { id, line, ...title ? { title } : {} });
1890
+ if (line2 || title) out.set(id, { id, line: line2, ...title ? { title } : {} });
1891
1891
  }
1892
1892
  return [...out.values()];
1893
1893
  }
@@ -2215,12 +2215,12 @@ function rgbAt(img, x, y) {
2215
2215
  return [255 + (img.data[i] - 255) * a2, 255 + (img.data[i + 1] - 255) * a2, 255 + (img.data[i + 2] - 255) * a2];
2216
2216
  }
2217
2217
  function colorDelta(a2, b) {
2218
- const dr = a2[0] - b[0];
2218
+ const dr2 = a2[0] - b[0];
2219
2219
  const dg2 = a2[1] - b[1];
2220
2220
  const db2 = a2[2] - b[2];
2221
- const y = dr * 0.29889531 + dg2 * 0.58662247 + db2 * 0.11448223;
2222
- const i = dr * 0.59597799 - dg2 * 0.2741761 - db2 * 0.32180189;
2223
- const q = dr * 0.21147017 - dg2 * 0.52261711 + db2 * 0.31114694;
2221
+ const y = dr2 * 0.29889531 + dg2 * 0.58662247 + db2 * 0.11448223;
2222
+ const i = dr2 * 0.59597799 - dg2 * 0.2741761 - db2 * 0.32180189;
2223
+ const q = dr2 * 0.21147017 - dg2 * 0.52261711 + db2 * 0.31114694;
2224
2224
  return 0.5053 * y * y + 0.299 * i * i + 0.1957 * q * q;
2225
2225
  }
2226
2226
  function foundNear(img, x, y, c, radius, max) {
@@ -2762,6 +2762,7 @@ function productPreview(apps, ctx, sources) {
2762
2762
  }
2763
2763
  function tryInProductUrl(preview, pr, screen) {
2764
2764
  const url = new URL(preview);
2765
+ if (url.protocol !== "https:" && url.protocol !== "http:") return "";
2765
2766
  url.pathname = "/";
2766
2767
  url.search = "";
2767
2768
  url.searchParams.set("bridge", String(pr));
@@ -3220,15 +3221,15 @@ class StorybookIndexError extends Error {
3220
3221
  code;
3221
3222
  status;
3222
3223
  }
3223
- const isObj = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
3224
+ const isObj$1 = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
3224
3225
  const str = (v) => typeof v === "string" && v.trim() ? v : void 0;
3225
3226
  function entryFrom(key, raw, v3) {
3226
- if (!isObj(raw)) return null;
3227
+ if (!isObj$1(raw)) return null;
3227
3228
  const id = str(raw.id) ?? key;
3228
3229
  const title = str(raw.title) ?? str(raw.kind);
3229
3230
  const name = str(raw.name) ?? str(raw.story);
3230
3231
  if (!id || !title || !name) return null;
3231
- const params = isObj(raw.parameters) ? raw.parameters : {};
3232
+ const params = isObj$1(raw.parameters) ? raw.parameters : {};
3232
3233
  const type = raw.type === "docs" || raw.type === "story" ? raw.type : v3 && params.docsOnly === true ? "docs" : "story";
3233
3234
  const e = {
3234
3235
  id,
@@ -3264,13 +3265,13 @@ function groupStorybookComponents(entries) {
3264
3265
  return out.sort((a2, b) => a2.title.localeCompare(b.title));
3265
3266
  }
3266
3267
  function parseStorybookIndex(json, source) {
3267
- if (!isObj(json)) throw new StorybookIndexError("not-json", "The Storybook index is not a JSON object.");
3268
+ if (!isObj$1(json)) throw new StorybookIndexError("not-json", "The Storybook index is not a JSON object.");
3268
3269
  if (typeof json.loginUrl === "string" && !("entries" in json) && !("stories" in json)) {
3269
3270
  throw new StorybookIndexError("private", "This Storybook is private: it asks for a sign-in before showing its index.");
3270
3271
  }
3271
- const map = isObj(json.entries) ? json.entries : isObj(json.stories) ? json.stories : null;
3272
+ const map = isObj$1(json.entries) ? json.entries : isObj$1(json.stories) ? json.stories : null;
3272
3273
  if (!map) throw new StorybookIndexError("empty", "This file has no Storybook entries.");
3273
- const v3 = !isObj(json.entries);
3274
+ const v3 = !isObj$1(json.entries);
3274
3275
  const entries = Object.entries(map).map(([k, raw]) => entryFrom(k, raw, v3)).filter((e) => e !== null);
3275
3276
  if (!entries.length) throw new StorybookIndexError("empty", "This Storybook index lists no stories or docs.");
3276
3277
  const version = typeof json.v === "number" ? json.v : v3 ? 3 : 4;
@@ -3353,40 +3354,1020 @@ async function fetchStorybookIndex(base, o = {}) {
3353
3354
  }
3354
3355
  throw worst ?? new StorybookIndexError("not-found", `No Storybook index at ${base}.`);
3355
3356
  }
3357
+ const FALLBACK_BRANDS = ["bridge", "ocean"];
3358
+ const FALLBACK_THEMES = ["light", "dark"];
3359
+ const FALLBACK_DENSITIES = ["comfortable", "compact"];
3360
+ function tokenRowAxes(config, readText = () => void 0) {
3361
+ const brandAxis = config.axes.brand;
3362
+ const brands = brandAxis?.values.length ? [...brandAxis.values] : [...FALLBACK_BRANDS];
3363
+ const defaultBrand = brandAxis?.default ?? brands[0];
3364
+ const themes = config.modes.themes.length ? [...config.modes.themes] : [...FALLBACK_THEMES];
3365
+ const densities = config.modes.densities.length ? [...config.modes.densities] : [...FALLBACK_DENSITIES];
3366
+ const files = tokenRowFiles(config);
3367
+ const brandName = (b) => {
3368
+ try {
3369
+ const text = readText(files.brandFile(b));
3370
+ const name = text ? JSON.parse(text).$extensions?.["dev.bridge.brand"]?.name : void 0;
3371
+ if (typeof name === "string" && name) return name;
3372
+ } catch {
3373
+ }
3374
+ return b.split("-").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
3375
+ };
3376
+ return {
3377
+ brands,
3378
+ defaultBrand,
3379
+ brandLabels: Object.fromEntries(brands.map((b) => [b, brandName(b)])),
3380
+ themes,
3381
+ densities,
3382
+ defaultDensity: config.modes.defaults.density ?? densities[0]
3383
+ };
3384
+ }
3385
+ function tokenRowFiles(config) {
3386
+ const t2 = config.tokens;
3387
+ const at3 = (rel) => tokensPath(config, rel);
3388
+ return {
3389
+ primitivesDir: at3(t2.primitives),
3390
+ semanticDir: at3(t2.semantic),
3391
+ brandsDir: at3(t2.brands),
3392
+ densityDir: at3(t2.density),
3393
+ componentsDir: at3(t2.components),
3394
+ baseFile: at3(`${t2.semantic}/${t2.base}.tokens.json`),
3395
+ semanticFile: (theme) => at3(`${t2.semantic}/${theme}.tokens.json`),
3396
+ brandFile: (brand) => at3(`${t2.brands}/${brand}.tokens.json`),
3397
+ overrideFile: (brand, theme) => at3(`${t2.brands}/${brand}.${theme}.tokens.json`),
3398
+ densityFile: (density) => at3(`${t2.density}/${density}.tokens.json`)
3399
+ };
3400
+ }
3401
+ function flattenTokenFile(node, file, path = [], inheritedType = "") {
3402
+ const type = node.$type ?? inheritedType;
3403
+ if ("$value" in node) {
3404
+ return [
3405
+ {
3406
+ path,
3407
+ type,
3408
+ value: node.$value,
3409
+ description: node.$description,
3410
+ deprecated: node.$deprecated,
3411
+ file
3412
+ }
3413
+ ];
3414
+ }
3415
+ const out = [];
3416
+ for (const [key, child] of Object.entries(node)) {
3417
+ if (key.startsWith("$") || typeof child !== "object" || child === null) continue;
3418
+ out.push(...flattenTokenFile(child, file, [...path, key], type));
3419
+ }
3420
+ return out;
3421
+ }
3422
+ const toHex2 = (n) => Math.round(n * 255).toString(16).padStart(2, "0");
3423
+ function colorCss(c) {
3424
+ if (typeof c === "string") return { css: c, hex: /^#[0-9a-f]{6}$/i.test(c) ? c.toLowerCase() : void 0 };
3425
+ const v = c;
3426
+ const [r = 0, g = 0, b = 0] = v.components;
3427
+ const hex = (v.hex ?? `#${[r, g, b].map(toHex2).join("")}`).toLowerCase();
3428
+ const alpha = v.alpha ?? 1;
3429
+ if (alpha < 1) return { css: `rgb(${[r, g, b].map((x) => Math.round(x * 255)).join(" ")} / ${alpha})`, hex };
3430
+ return { css: hex, hex };
3431
+ }
3432
+ const dimCss = (d) => typeof d === "object" && d !== null ? `${d.value}${d.unit}` : String(d);
3433
+ function shadowCss(s) {
3434
+ if (typeof s === "string") return s;
3435
+ const layers = Array.isArray(s) ? s : [s];
3436
+ return layers.map((l) => [l.inset ? "inset" : "", dimCss(l.offsetX), dimCss(l.offsetY), dimCss(l.blur), dimCss(l.spread), colorCss(l.color).css].filter(Boolean).join(" ")).join(", ");
3437
+ }
3438
+ function tokenValueCss(type, value) {
3439
+ switch (type) {
3440
+ case "color":
3441
+ return colorCss(value);
3442
+ case "dimension":
3443
+ case "duration":
3444
+ return { css: dimCss(value) };
3445
+ case "shadow":
3446
+ return { css: shadowCss(value) };
3447
+ case "cubicBezier":
3448
+ return { css: Array.isArray(value) ? `cubic-bezier(${value.join(", ")})` : String(value) };
3449
+ case "fontFamily":
3450
+ return { css: Array.isArray(value) ? value.map((n) => /\s/.test(n) ? `"${n}"` : n).join(", ") : String(value) };
3451
+ default:
3452
+ return { css: String(value) };
3453
+ }
3454
+ }
3455
+ const tokenRowCssVar = (segments) => `--${segments.join("-")}`;
3456
+ const tokenRowFigmaName = (segments) => segments.join("/");
3457
+ const isAlias = (v) => typeof v === "string" && /^\{[^}]+\}$/.test(v);
3458
+ function buildTokenRows(config, readText, listFiles) {
3459
+ const axes = tokenRowAxes(config, readText);
3460
+ const { brands: BRANDS, defaultBrand: DEFAULT_BRAND, themes: MODES, densities: DENSITIES, defaultDensity: DEFAULT_DENSITY } = axes;
3461
+ const files = tokenRowFiles(config);
3462
+ const REF_THEME = MODES[0];
3463
+ const jsonFiles = (dir) => listFiles(dir).filter((f) => f.endsWith(".tokens.json")).sort();
3464
+ const flatCache = /* @__PURE__ */ new Map();
3465
+ const flatFile = (f) => {
3466
+ if (!flatCache.has(f)) {
3467
+ const text = readText(f);
3468
+ flatCache.set(f, text === void 0 ? [] : flattenTokenFile(JSON.parse(text), f));
3469
+ }
3470
+ return flatCache.get(f);
3471
+ };
3472
+ const byPathOf = (tokens) => new Map(tokens.map((t2) => [t2.path.join("."), t2]));
3473
+ const primitiveFiles = jsonFiles(files.primitivesDir);
3474
+ const componentFiles = jsonFiles(files.componentsDir);
3475
+ const sources = [
3476
+ ...primitiveFiles,
3477
+ ...jsonFiles(files.brandsDir),
3478
+ ...MODES.map(files.semanticFile),
3479
+ files.baseFile,
3480
+ ...jsonFiles(files.densityDir),
3481
+ ...componentFiles
3482
+ ];
3483
+ const primitives = primitiveFiles.flatMap((f) => flatFile(f)).map((t2) => {
3484
+ const { css, hex } = tokenValueCss(t2.type, t2.value);
3485
+ return {
3486
+ path: t2.path.join("."),
3487
+ segments: t2.path,
3488
+ type: t2.type,
3489
+ css,
3490
+ hex,
3491
+ cssVar: tokenRowCssVar(t2.path),
3492
+ figma: tokenRowFigmaName(t2.path),
3493
+ description: t2.description,
3494
+ deprecated: t2.deprecated,
3495
+ raw: t2.value,
3496
+ file: t2.file
3497
+ };
3498
+ });
3499
+ const primByPath = new Map(primitives.map((p2) => [p2.path, p2]));
3500
+ const brandRaw = Object.fromEntries(BRANDS.map((b) => [b, flatFile(files.brandFile(b))]));
3501
+ const themeRaw = Object.fromEntries(MODES.map((m) => [m, flatFile(files.semanticFile(m))]));
3502
+ const baseRaw = flatFile(files.baseFile);
3503
+ const densityRaw = Object.fromEntries(DENSITIES.map((d) => [d, flatFile(files.densityFile(d))]));
3504
+ const componentRaw = componentFiles.flatMap((f) => flatFile(f));
3505
+ const layerCache = /* @__PURE__ */ new Map();
3506
+ const layers = (b, m, d) => {
3507
+ const k = `${b}.${m}.${d}`;
3508
+ if (!layerCache.has(k))
3509
+ layerCache.set(k, [
3510
+ byPathOf(flatFile(files.overrideFile(b, m))),
3511
+ byPathOf(themeRaw[m] ?? []),
3512
+ byPathOf(baseRaw),
3513
+ byPathOf(densityRaw[d] ?? []),
3514
+ byPathOf(componentRaw),
3515
+ byPathOf(brandRaw[b] ?? [])
3516
+ ]);
3517
+ return layerCache.get(k);
3518
+ };
3519
+ const resolve2 = (b, m, d, value, type) => {
3520
+ const chain = [];
3521
+ let current = value;
3522
+ let currentType = type;
3523
+ let guard = 0;
3524
+ while (isAlias(current) && guard++ < 30) {
3525
+ const target = current.slice(1, -1);
3526
+ chain.push(target);
3527
+ const prim = primByPath.get(target);
3528
+ if (prim) return { alias: chain[0] ?? null, chain, css: prim.css, hex: prim.hex };
3529
+ const hit = layers(b, m, d).map((l) => l.get(target)).find(Boolean);
3530
+ if (!hit) throw new Error(`tokens: alias {${target}} does not resolve in ${b} ${m} ${d}`);
3531
+ current = hit.value;
3532
+ currentType = hit.type || currentType;
3533
+ }
3534
+ const { css, hex } = tokenValueCss(currentType, current);
3535
+ return { alias: chain[0] ?? null, chain, css, hex };
3536
+ };
3537
+ const same = (a2, c) => a2.css === c.css && a2.chain.join() === c.chain.join();
3538
+ const build = (t2, tier, valueFor) => {
3539
+ const at3 = (b, m, d = DEFAULT_DENSITY) => {
3540
+ const raw = valueFor(b, m, d) ?? t2;
3541
+ return resolve2(b, m, d, raw.value, raw.type || t2.type);
3542
+ };
3543
+ const brands = Object.fromEntries(BRANDS.map((b) => [b, Object.fromEntries(MODES.map((m) => [m, at3(b, m)]))]));
3544
+ return {
3545
+ path: t2.path.join("."),
3546
+ segments: t2.path,
3547
+ type: t2.type,
3548
+ cssVar: tokenRowCssVar(t2.path),
3549
+ figma: tokenRowFigmaName(t2.path),
3550
+ description: t2.description,
3551
+ group: t2.path[0] === "color" ? t2.path.slice(0, 2).join(".") : t2.path[0],
3552
+ deprecated: t2.deprecated,
3553
+ tier,
3554
+ file: t2.file,
3555
+ modes: brands[DEFAULT_BRAND],
3556
+ brands,
3557
+ densities: tier === "density" ? Object.fromEntries(DENSITIES.map((d) => [d, at3(DEFAULT_BRAND, REF_THEME, d)])) : void 0,
3558
+ brandSpecific: BRANDS.some((b) => MODES.some((m) => !same(brands[b][m], brands[DEFAULT_BRAND][m])))
3559
+ };
3560
+ };
3561
+ const brand = (brandRaw[DEFAULT_BRAND] ?? []).map((t2) => build(t2, "brand", (b) => byPathOf(brandRaw[b] ?? []).get(t2.path.join("."))));
3562
+ const themedBy = Object.fromEntries(MODES.map((m) => [m, byPathOf(themeRaw[m] ?? [])]));
3563
+ const themed = (themeRaw[REF_THEME] ?? []).map((t2) => {
3564
+ const path = t2.path.join(".");
3565
+ const others = MODES.slice(1).map((m) => {
3566
+ const hit = themedBy[m].get(path);
3567
+ if (!hit) throw new Error(`tokens: semantic token ${path} is missing in ${files.semanticFile(m)}`);
3568
+ return hit;
3569
+ });
3570
+ const s = build(t2, "semantic", (b, m) => byPathOf(flatFile(files.overrideFile(b, m))).get(path) ?? (m === REF_THEME ? t2 : themedBy[m].get(path)));
3571
+ s.description = [t2, ...others].map((x) => x.description).find((x) => x !== void 0);
3572
+ s.deprecated = [t2, ...others].map((x) => x.deprecated).find((x) => x !== void 0);
3573
+ s.file = MODES.map(files.semanticFile).join(", ");
3574
+ return s;
3575
+ });
3576
+ const base = baseRaw.map((t2) => build(t2, "semantic", () => t2));
3577
+ const semantic = [...themed, ...base];
3578
+ const density = (densityRaw[DEFAULT_DENSITY] ?? []).map((t2) => build(t2, "density", (_b, _m, d) => byPathOf(densityRaw[d] ?? []).get(t2.path.join("."))));
3579
+ const component = componentRaw.map((t2) => build(t2, "component", () => t2));
3580
+ return { ...axes, primitives, semantic, brand, density, component, all: [...brand, ...semantic, ...density, ...component], sources };
3581
+ }
3582
+ function tokenRowIndex(rows) {
3583
+ const map = /* @__PURE__ */ new Map();
3584
+ for (const p2 of rows.primitives) map.set(p2.cssVar, { path: p2.path, kind: "primitive", type: p2.type });
3585
+ for (const s of rows.all) map.set(s.cssVar, { path: s.path, kind: s.tier, type: s.type });
3586
+ return map;
3587
+ }
3588
+ const CONTRAST_THRESHOLDS = { text: { aa: 4.5, aaa: 7 }, ui: { aa: 3, aaa: null } };
3589
+ const channel = (c) => {
3590
+ const s = c / 255;
3591
+ return s <= 0.04045 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;
3592
+ };
3593
+ function hexLuminance(hex) {
3594
+ const n = parseInt(hex.slice(1), 16);
3595
+ return 0.2126 * channel(n >> 16 & 255) + 0.7152 * channel(n >> 8 & 255) + 0.0722 * channel(n & 255);
3596
+ }
3597
+ function hexContrastRatio(a2, b) {
3598
+ const [hi, lo] = [hexLuminance(a2), hexLuminance(b)].sort((x, y) => y - x);
3599
+ return (hi + 0.05) / (lo + 0.05);
3600
+ }
3601
+ function parseContrastSpecs(text) {
3602
+ if (!text) return [];
3603
+ const data = JSON.parse(text);
3604
+ return (data.pairs ?? []).map((p2) => {
3605
+ const [fg, bg3, min] = Array.isArray(p2) ? p2 : [p2.fg, p2.bg, p2.min];
3606
+ return { fg, bg: bg3, min, usage: min >= CONTRAST_THRESHOLDS.text.aa ? "text" : "ui" };
3607
+ });
3608
+ }
3609
+ function evaluateContrastPairs(specs, rows) {
3610
+ const byPath = new Map(rows.all.map((s) => [s.path, s]));
3611
+ return specs.map((spec) => {
3612
+ const fgToken = byPath.get(spec.fg);
3613
+ const bgToken = byPath.get(spec.bg);
3614
+ if (!fgToken || !bgToken) throw new Error(`contrast: pair ${spec.fg} on ${spec.bg} references a token that does not exist`);
3615
+ const t2 = CONTRAST_THRESHOLDS[spec.usage];
3616
+ const result = (b, m) => {
3617
+ const fgHex = fgToken.brands[b][m].hex;
3618
+ const bgHex = bgToken.brands[b][m].hex;
3619
+ const r = hexContrastRatio(fgHex, bgHex);
3620
+ return { fgHex, bgHex, ratio: Math.floor(r * 100) / 100, aa: r >= spec.min, aaa: t2.aaa === null ? null : r >= t2.aaa };
3621
+ };
3622
+ const brands = Object.fromEntries(rows.brands.map((b) => [b, Object.fromEntries(rows.themes.map((m) => [m, result(b, m)]))]));
3623
+ return { ...spec, fgToken, bgToken, modes: brands[rows.defaultBrand], brands };
3624
+ });
3625
+ }
3626
+ const componentSlug = (s) => s.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").toLowerCase();
3627
+ const escapeRe = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
3628
+ function parseComponentFamilies(indexSrc, componentsRel = "components") {
3629
+ const out = [];
3630
+ const exportRe = new RegExp(`export \\* from '\\./${escapeRe(componentsRel)}/(\\w+)'`);
3631
+ for (const line2 of indexSrc.split("\n")) {
3632
+ const head = line2.match(/^\/\/\s*([A-Z][\w ]+)$/);
3633
+ if (head) out.push({ name: head[1].trim(), members: [] });
3634
+ const exp = line2.match(exportRe);
3635
+ if (exp && out.length) out[out.length - 1].members.push(exp[1]);
3636
+ }
3637
+ return out.filter((f) => f.members.length);
3638
+ }
3639
+ const NATIVE = {
3640
+ HTMLButtonElement: "button",
3641
+ HTMLInputElement: "input",
3642
+ HTMLSpanElement: "span",
3643
+ HTMLDivElement: "div",
3644
+ HTMLAnchorElement: "a"
3645
+ };
3646
+ function parseExtends(clause) {
3647
+ const el = clause.match(/<(HTML\w+Element)>/)?.[1];
3648
+ const omitted = [...(clause.match(/Omit<[^,]+,\s*([^>]+)>/)?.[1] ?? "").matchAll(/'([^']+)'/g)].map((m) => m[1]);
3649
+ return { inherits: el ? NATIVE[el] ?? el : void 0, omitted };
3650
+ }
3651
+ function parseComponentTsx(name, src) {
3652
+ const aliases = /* @__PURE__ */ new Map();
3653
+ for (const m of src.matchAll(/export type (\w+)\s*=\s*([^;]+);/g)) aliases.set(m[1], m[2].trim());
3654
+ let props = [];
3655
+ let inherits;
3656
+ let omitted = [];
3657
+ const iface = src.match(new RegExp(`export interface ${name}Props(?:\\s+extends\\s+([^{]+))?\\s*\\{([\\s\\S]*?)\\n\\}`));
3658
+ if (iface) {
3659
+ ({ inherits, omitted } = parseExtends(iface[1] ?? ""));
3660
+ for (const m of iface[2].matchAll(/(?:\/\*\*([\s\S]*?)\*\/\s*)?(\w+)(\?)?:\s*([^;]+);/g)) {
3661
+ const rawType = m[4].trim();
3662
+ props.push({
3663
+ name: m[2],
3664
+ type: aliases.get(rawType) ?? rawType,
3665
+ required: !m[3],
3666
+ description: m[1]?.replace(/^\s*\*\s?/gm, "").replace(/\s+/g, " ").trim() || void 0
3667
+ });
3668
+ }
3669
+ } else {
3670
+ const alias = aliases.get(`${name}Props`);
3671
+ if (alias) ({ inherits, omitted } = parseExtends(alias));
3672
+ }
3673
+ const sig = src.match(new RegExp(`function ${name}\\(\\s*\\{([^}]*)\\}`));
3674
+ if (sig) {
3675
+ for (const m of sig[1].matchAll(/(\w+)\s*=\s*('[^']*'|[\w.]+)/g)) {
3676
+ const p2 = props.find((x) => x.name === m[1]);
3677
+ if (p2) p2.defaultValue = m[2];
3678
+ }
3679
+ }
3680
+ const docBefore = (re) => {
3681
+ const idx = src.search(re);
3682
+ if (idx < 0) return void 0;
3683
+ const before = src.slice(0, idx).trimEnd();
3684
+ if (!before.endsWith("*/")) return void 0;
3685
+ const start = before.lastIndexOf("/*", before.length - 2);
3686
+ if (start < 0 || before[start + 2] !== "*") return void 0;
3687
+ return before.slice(start + 3, -2).replace(/^\s*\*\s?/gm, "").replace(/\s+/g, " ").trim();
3688
+ };
3689
+ const description = docBefore(new RegExp(`export (?:function|const) ${name}\\b`));
3690
+ const subcomponents = [...src.matchAll(/export function (\w+)/g)].map((m) => m[1]).filter((n) => n !== name);
3691
+ props = props.sort((a2, b) => Number(b.required) - Number(a2.required));
3692
+ return { props, inherits, omitted, description, subcomponents };
3693
+ }
3694
+ const stateOf = (selector) => {
3695
+ const states = [
3696
+ [/:focus-visible/, "focus"],
3697
+ [/:hover/, "hover"],
3698
+ [/:disabled(?!,)|^[^(]*:disabled/, "disabled"],
3699
+ [/\[data-loading\]/, "loading"],
3700
+ [/::placeholder/, "placeholder"]
3701
+ ];
3702
+ const hit = states.filter(([re]) => re.test(selector)).map(([, s]) => s);
3703
+ return hit.length ? `, ${hit.join(" + ")}` : "";
3704
+ };
3705
+ const BASE_UI_RUNTIME = /^--(_|accordion-panel-|collapsible-panel-|active-tab-|anchor-|available-|drawer-swipe-|toast-(frontmost-height|height|index|offset-y|swipe-)|transform-origin)/;
3706
+ function parseComponentCss(src, labels, describe) {
3707
+ const clean = src.replace(/\/\*[\s\S]*?\*\//g, "");
3708
+ const rules = [];
3709
+ const walk = (text, prefix = "") => {
3710
+ let i = 0;
3711
+ let buf = "";
3712
+ while (i < text.length) {
3713
+ const ch3 = text[i];
3714
+ if (ch3 === "{") {
3715
+ const head = buf.trim();
3716
+ buf = "";
3717
+ let depth = 1;
3718
+ const start = ++i;
3719
+ while (i < text.length && depth > 0) {
3720
+ if (text[i] === "{") depth++;
3721
+ else if (text[i] === "}") depth--;
3722
+ i++;
3723
+ }
3724
+ const inner = text.slice(start, i - 1);
3725
+ if (head.startsWith("@keyframes")) continue;
3726
+ if (head.startsWith("@")) {
3727
+ walk(inner, `${head} `);
3728
+ continue;
3729
+ }
3730
+ const names2 = [...new Set([...inner.matchAll(/var\((--[\w-]+)/g)].map((m) => m[1]))].filter((n) => !BASE_UI_RUNTIME.test(n));
3731
+ if (!names2.length) continue;
3732
+ const className = head.match(/\.([\w-]+)/)?.[1] ?? head;
3733
+ rules.push({
3734
+ selector: prefix + head.replace(/\s+/g, " "),
3735
+ className,
3736
+ label: (labels[className] ?? className) + stateOf(head),
3737
+ vars: names2.map((n) => {
3738
+ const d = describe(n);
3739
+ return { name: n, href: d?.href, known: !!d, path: d?.path, kind: d?.kind };
3740
+ })
3741
+ });
3742
+ } else {
3743
+ buf += ch3;
3744
+ i++;
3745
+ }
3746
+ }
3747
+ };
3748
+ walk(clean);
3749
+ return rules;
3750
+ }
3751
+ function parseComponentStories(src) {
3752
+ const title = src.match(/title:\s*'([^']+)'/)?.[1];
3753
+ if (!title) return [];
3754
+ const base = title.split("/").map((s) => componentSlug(s.trim()).replace(/\s+/g, "-")).join("-");
3755
+ return [...src.matchAll(/export const (\w+):\s*Story/g)].map((m) => ({ name: m[1], id: `${base}--${componentSlug(m[1])}` }));
3756
+ }
3757
+ function resolveInheritedTokens(list) {
3758
+ const byName = new Map(list.map((c) => [c.name, c]));
3759
+ for (const c of list) {
3760
+ const seen = /* @__PURE__ */ new Set([c.name]);
3761
+ const queue = [...c.reuses ?? []];
3762
+ const inherited = [];
3763
+ const taken = new Set(c.tokenPaths);
3764
+ while (queue.length) {
3765
+ const from = byName.get(queue.shift());
3766
+ if (!from || seen.has(from.name)) continue;
3767
+ seen.add(from.name);
3768
+ const paths = from.tokenPaths.filter((p2) => !taken.has(p2));
3769
+ paths.forEach((p2) => taken.add(p2));
3770
+ inherited.push({ from: from.name, slug: from.slug, paths });
3771
+ queue.push(...from.reuses ?? []);
3772
+ }
3773
+ c.inherited = inherited;
3774
+ c.allTokenPaths = [...taken].sort();
3775
+ }
3776
+ for (const c of list) delete c.reuses;
3777
+ }
3778
+ function scanComponents(input) {
3779
+ const { dir, readText, describeVar } = input;
3780
+ const docsSuffix = input.docsSuffix ?? ".docs.json";
3781
+ const styleSuffix = input.styleSuffix ?? ".module.css";
3782
+ const fileSet = new Set(input.files);
3783
+ const has = (p2) => fileSet.has(p2);
3784
+ const fam = input.indexText === void 0 ? [] : parseComponentFamilies(input.indexText, input.indexRel ?? "components");
3785
+ const familyOf = (name) => fam.find((f) => f.members.includes(name))?.name;
3786
+ const names2 = [
3787
+ ...new Set(
3788
+ input.files.map((f) => f.startsWith(`${dir}/`) ? f.slice(dir.length + 1).split("/") : []).filter((parts) => parts.length === 2 && parts[1] === `${parts[0]}.tsx`).map((parts) => parts[0])
3789
+ )
3790
+ ].sort();
3791
+ const reuseRe = new RegExp(`from\\s+'\\.\\.\\/(\\w+)\\/(\\w+)${escapeRe(styleSuffix)}'`, "g");
3792
+ const result = names2.map((name) => {
3793
+ const folder = `${dir}/${name}`;
3794
+ const files = { tsx: `${folder}/${name}.tsx`, css: `${folder}/${name}${styleSuffix}`, stories: `${folder}/${name}.stories.tsx`, docs: `${folder}/${name}${docsSuffix}` };
3795
+ let docs = null;
3796
+ if (has(files.docs)) {
3797
+ try {
3798
+ docs = JSON.parse(readText(files.docs) ?? "");
3799
+ } catch (err) {
3800
+ input.problems?.push(`${files.docs}: ${err.message}`);
3801
+ }
3802
+ }
3803
+ const tsxSrc = readText(files.tsx) ?? "";
3804
+ const tsx = parseComponentTsx(name, tsxSrc);
3805
+ const reuses = [...tsxSrc.matchAll(reuseRe)].filter((m) => m[1] === m[2] && m[1] !== name).map((m) => m[1]);
3806
+ const cssText = has(files.css) ? readText(files.css) : void 0;
3807
+ const rules = cssText === void 0 ? [] : parseComponentCss(cssText, docs?.anatomy ?? {}, describeVar);
3808
+ const used = [...new Set(rules.flatMap((r) => r.vars.map((v) => v.name)))].sort();
3809
+ const storiesText = has(files.stories) ? readText(files.stories) : void 0;
3810
+ return {
3811
+ name,
3812
+ slug: componentSlug(name),
3813
+ dir: folder,
3814
+ files,
3815
+ ...tsx,
3816
+ rules,
3817
+ tokensUsed: used.map((n) => {
3818
+ const d = describeVar(n);
3819
+ return { name: n, href: d?.href, known: !!d, kind: d?.kind };
3820
+ }),
3821
+ tokenPaths: [...new Set(used.flatMap((n) => describeVar(n)?.path ?? []))].sort(),
3822
+ inherited: [],
3823
+ allTokenPaths: [],
3824
+ reuses,
3825
+ stories: storiesText === void 0 ? [] : parseComponentStories(storiesText),
3826
+ docs,
3827
+ category: docs?.category ?? familyOf(name) ?? "Core"
3828
+ };
3829
+ });
3830
+ const order = (c) => {
3831
+ const i = fam.findIndex((f) => f.name === c.category);
3832
+ return i < 0 ? fam.length : i;
3833
+ };
3834
+ result.sort((a2, b) => order(a2) - order(b) || a2.name.localeCompare(b.name));
3835
+ resolveInheritedTokens(result);
3836
+ return result;
3837
+ }
3838
+ const REPO_MODEL_DEFAULTS = {
3839
+ tokensRoot: "packages/tokens/src",
3840
+ componentsDir: "packages/react/src/components",
3841
+ componentSpecs: "packages/react/component-specs.json",
3842
+ /** Optional token usage notes (group -> sentence), relative to tokens.root, when tokens.usage is not set. */
3843
+ tokensUsage: "usage.json",
3844
+ repo: { owner: "peterbono", repo: "ai-design-system-demo", defaultBranch: "main" }
3845
+ };
3846
+ function siteRepoFromConfig(config, raw, fallback = REPO_MODEL_DEFAULTS.repo) {
3847
+ const legacy = raw && typeof raw === "object" ? raw : void 0;
3848
+ const g = config.governance;
3849
+ const legacyOwners = legacy?.governance?.owners === void 0 ? legacy?.owners : void 0;
3850
+ return {
3851
+ owner: typeof legacy?.owner === "string" && legacy.owner ? legacy.owner : config.repo?.owner ?? fallback.owner,
3852
+ repo: config.repo?.name ?? fallback.repo,
3853
+ defaultBranch: typeof legacy?.defaultBranch === "string" && legacy.defaultBranch ? legacy.defaultBranch : config.repo?.defaultBranch ?? fallback.defaultBranch,
3854
+ owners: legacyOwners ? { design: legacyOwners.design ?? [], tech: legacyOwners.tech ?? [] } : { design: [...g.owners.design], tech: [...g.owners.tech] },
3855
+ override: g.override ? { ...g.override } : { ...DEFAULT_OVERRIDE },
3856
+ rights: g.rights ?? null,
3857
+ soloOwnerCanApproveBoth: g.soloOwnerCanApproveBoth === true,
3858
+ visualImpact: { mode: config.visualImpact?.mode === "on-demand" ? "on-demand" : "auto" },
3859
+ tokensRoot: config.tokens.root,
3860
+ integrations: config.integrations ?? {},
3861
+ products: config.products.length ? config.products : DEFAULT_PRODUCTS.map((p2) => ({ ...p2 })),
3862
+ changes: config.changes ?? DEFAULT_CHANGES_MODE
3863
+ };
3864
+ }
3865
+ function withModelDefaults(raw) {
3866
+ const tokens = raw.tokens && typeof raw.tokens === "object" ? raw.tokens : {};
3867
+ return {
3868
+ ...raw,
3869
+ tokens: { ...tokens, root: tokens.root ?? REPO_MODEL_DEFAULTS.tokensRoot },
3870
+ components: raw.components ?? { dir: REPO_MODEL_DEFAULTS.componentsDir }
3871
+ };
3872
+ }
3873
+ const defaultModelConfig = () => defineConfig(withModelDefaults({}));
3874
+ function parseModelConfig(text) {
3875
+ if (text === null) return { config: defaultModelConfig(), raw: void 0, problems: [] };
3876
+ let raw;
3877
+ try {
3878
+ raw = JSON.parse(text);
3879
+ } catch (err) {
3880
+ return { config: defaultModelConfig(), raw: void 0, problems: [`${CONFIG_FILE} is not valid JSON (${err.message})`] };
3881
+ }
3882
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) return { config: defaultModelConfig(), raw, problems: [`${CONFIG_FILE}: top level must be an object`] };
3883
+ try {
3884
+ return { config: loadConfig(withModelDefaults(raw)), raw, problems: [] };
3885
+ } catch (err) {
3886
+ const problems = err instanceof ConfigError ? err.problems.map((p2) => `${CONFIG_FILE}: ${p2}`) : [`${CONFIG_FILE}: ${err.message}`];
3887
+ return { config: defaultModelConfig(), raw, problems };
3888
+ }
3889
+ }
3890
+ const emptyRows = (config) => ({ ...tokenRowAxes(config), primitives: [], semantic: [], brand: [], density: [], component: [], all: [], sources: [] });
3891
+ async function loadRepoModel(source, options = {}) {
3892
+ const concurrency = options.concurrency ?? 8;
3893
+ const problems = [];
3894
+ const tooLarge = (path, err) => {
3895
+ if (err?.status !== 413) throw err;
3896
+ problems.push(`${path}: ${err.message}`);
3897
+ return null;
3898
+ };
3899
+ const configText = await source.text(CONFIG_FILE);
3900
+ const parsed = parseModelConfig(configText);
3901
+ const { config } = parsed;
3902
+ problems.push(...parsed.problems);
3903
+ const fallbackRepo = source.ref.owner && source.ref.repo ? { owner: source.ref.owner, repo: source.ref.repo, defaultBranch: REPO_MODEL_DEFAULTS.repo.defaultBranch } : REPO_MODEL_DEFAULTS.repo;
3904
+ const site = siteRepoFromConfig(config, parsed.raw, fallbackRepo);
3905
+ const root = config.tokens.root;
3906
+ const underRoot = await source.list(root === "." ? "" : root);
3907
+ const tokenRel = selectTokenFiles(config, underRoot);
3908
+ const contrastPath = config.contrast?.path;
3909
+ const usagePath = tokensPath(config, config.tokens.usage ?? REPO_MODEL_DEFAULTS.tokensUsage);
3910
+ const tokenPaths = tokenRel.map((f) => tokensPath(config, f));
3911
+ const tokenRead = [.../* @__PURE__ */ new Set([...tokenPaths, ...contrastPath ? [contrastPath] : [], usagePath])];
3912
+ const comps = config.components ?? { dir: REPO_MODEL_DEFAULTS.componentsDir, docsSuffix: ".docs.json", styleSuffix: ".module.css" };
3913
+ const specsPath = comps.specs ?? REPO_MODEL_DEFAULTS.componentSpecs;
3914
+ const indexPath = comps.index ?? (parentDir(comps.dir) ? `${parentDir(comps.dir)}/index.ts` : "index.ts");
3915
+ let compFiles = [];
3916
+ const codeRead = [specsPath];
3917
+ const docsRead = [];
3918
+ if (options.components !== false) {
3919
+ compFiles = await source.list(comps.dir);
3920
+ for (const f of compFiles) {
3921
+ const parts = f.slice(comps.dir.length + 1).split("/");
3922
+ if (parts.length !== 2) continue;
3923
+ const [n, file] = parts;
3924
+ if (file === `${n}${comps.docsSuffix}`) docsRead.push(f);
3925
+ else if ([`${n}.tsx`, `${n}${comps.styleSuffix}`, `${n}.stories.tsx`].includes(file)) codeRead.push(f);
3926
+ }
3927
+ codeRead.push(indexPath);
3928
+ }
3929
+ const seen = /* @__PURE__ */ new Set();
3930
+ const fresh = (paths) => paths.filter((p2) => {
3931
+ if (seen.has(p2)) return false;
3932
+ seen.add(p2);
3933
+ return true;
3934
+ });
3935
+ const phases = [
3936
+ ["tokens", fresh(tokenRead)],
3937
+ ["components", fresh(codeRead)],
3938
+ ["docs", fresh(docsRead)]
3939
+ ];
3940
+ const filesTotal = phases.reduce((n, [, paths]) => n + paths.length, 0);
3941
+ let before = 0;
3942
+ const readPhase = async (phase, paths) => {
3943
+ const offset = before;
3944
+ const out = await readRepoTexts(source, paths, concurrency, tooLarge, (done, total) => options.onProgress?.({ phase, done, total, filesDone: offset + done, filesTotal }));
3945
+ before += paths.length;
3946
+ return out;
3947
+ };
3948
+ const bodies = await readPhase("tokens", phases[0][1]);
3949
+ const read = (p2) => bodies.get(p2) ?? void 0;
3950
+ const files = {};
3951
+ tokenRel.forEach((rel, i) => {
3952
+ const body = read(tokenPaths[i]);
3953
+ if (body !== void 0) files[rel] = body;
3954
+ });
3955
+ const listFiles = (dir) => underRoot.filter((p2) => parentDir(p2) === dir);
3956
+ let rows;
3957
+ try {
3958
+ rows = buildTokenRows(config, read, listFiles);
3959
+ } catch (err) {
3960
+ problems.push(err.message);
3961
+ rows = emptyRows(config);
3962
+ }
3963
+ let usage = null;
3964
+ const usageText = read(usagePath);
3965
+ if (usageText !== void 0) {
3966
+ try {
3967
+ usage = JSON.parse(usageText);
3968
+ } catch (err) {
3969
+ problems.push(`${usagePath}: ${err.message}`);
3970
+ }
3971
+ }
3972
+ let specs = [];
3973
+ let pairs2 = [];
3974
+ try {
3975
+ specs = parseContrastSpecs(contrastPath ? read(contrastPath) : void 0);
3976
+ pairs2 = evaluateContrastPairs(specs, rows);
3977
+ } catch (err) {
3978
+ problems.push(err.message);
3979
+ }
3980
+ const index = tokenRowIndex(rows);
3981
+ const describeVar = (cssVar) => {
3982
+ const hit = index.get(cssVar);
3983
+ return hit ? { path: hit.path, kind: hit.kind, href: options.href?.(cssVar, hit.type, hit.kind, hit.path) } : void 0;
3984
+ };
3985
+ let components = null;
3986
+ const code2 = await readPhase("components", phases[1][1]);
3987
+ const docs = await readPhase("docs", phases[2][1]);
3988
+ const readMore = (p2) => code2.get(p2) ?? docs.get(p2) ?? bodies.get(p2) ?? void 0;
3989
+ if (options.components !== false) {
3990
+ const indexText = readMore(indexPath);
3991
+ const indexDir = parentDir(indexPath);
3992
+ const indexRel = indexDir && comps.dir.startsWith(`${indexDir}/`) ? comps.dir.slice(indexDir.length + 1) : comps.dir;
3993
+ const list = scanComponents({ dir: comps.dir, files: compFiles, readText: readMore, indexText, indexRel, docsSuffix: comps.docsSuffix, styleSuffix: comps.styleSuffix, describeVar, problems });
3994
+ components = { dir: comps.dir, index: indexText === void 0 ? void 0 : indexPath, families: indexText === void 0 ? [] : parseComponentFamilies(indexText, indexRel), list };
3995
+ }
3996
+ const specsText = readMore(specsPath);
3997
+ let specsFile = null;
3998
+ let coverage = [];
3999
+ if (specsText !== void 0) {
4000
+ try {
4001
+ specsFile = parseComponentSpecs(specsText);
4002
+ } catch {
4003
+ }
4004
+ try {
4005
+ coverage = JSON.parse(specsText).coverage ?? [];
4006
+ } catch (err) {
4007
+ problems.push(`${specsPath}: ${err.message}`);
4008
+ }
4009
+ }
4010
+ return {
4011
+ ref: source.ref,
4012
+ configText,
4013
+ config,
4014
+ site,
4015
+ problems,
4016
+ tokens: { root, files, rows, usage },
4017
+ contrast: { path: contrastPath, specs, pairs: pairs2 },
4018
+ components,
4019
+ specs: { path: specsPath, file: specsFile, coverage }
4020
+ };
4021
+ }
4022
+ const FULL_SHA = /^[0-9a-f]{40}$/i;
4023
+ function limiter(n) {
4024
+ let active = 0;
4025
+ const waiting = [];
4026
+ return async (task) => {
4027
+ if (active >= n) await new Promise((resolve2) => waiting.push(resolve2));
4028
+ active++;
4029
+ try {
4030
+ return await task();
4031
+ } finally {
4032
+ active--;
4033
+ waiting.shift()?.();
4034
+ }
4035
+ };
4036
+ }
4037
+ function gitHubSource(client, sha, opts = {}) {
4038
+ if (!FULL_SHA.test(sha)) throw new Error(`gitHubSource needs a full commit sha, got "${sha}". Resolve the branch head first.`);
4039
+ const maxBytes = opts.maxFileBytes ?? 1e6;
4040
+ const run = limiter(Math.max(1, opts.concurrency ?? 4));
4041
+ const mode = client.canWrite ? "api" : "raw";
4042
+ let tree;
4043
+ const readTree = () => {
4044
+ tree ??= client.getTree(sha, true).then(
4045
+ ({ entries, truncated }) => {
4046
+ if (truncated) throw new GitHubError(413, "The repository tree is too large to read in one request.");
4047
+ const files = /* @__PURE__ */ new Map();
4048
+ for (const e of entries) if (e.type === "blob") files.set(e.path, { sha: e.sha, size: e.size });
4049
+ opts.onProgress?.({ kind: "tree", files: files.size });
4050
+ return files;
4051
+ },
4052
+ (err) => {
4053
+ tree = void 0;
4054
+ throw err;
4055
+ }
4056
+ );
4057
+ return tree;
4058
+ };
4059
+ const bodies = /* @__PURE__ */ new Map();
4060
+ const readBody = async (path, blobSha) => {
4061
+ const kept = await opts.blobCache?.get(blobSha);
4062
+ if (kept !== void 0) {
4063
+ opts.onProgress?.({ kind: "file", path, cached: true });
4064
+ return kept;
4065
+ }
4066
+ const text = mode === "api" ? await client.getBlobRaw(blobSha) : await client.readRawFile(path, sha);
4067
+ if (text === void 0) {
4068
+ const hint = mode === "raw" ? " Sign in with GitHub to read a private repository." : "";
4069
+ throw new GitHubError(404, `${path} is listed at ${sha.slice(0, 7)} but GitHub did not return it.${hint}`);
4070
+ }
4071
+ try {
4072
+ await opts.blobCache?.set(blobSha, text);
4073
+ } catch {
4074
+ }
4075
+ opts.onProgress?.({ kind: "file", path, cached: false });
4076
+ return text;
4077
+ };
4078
+ return {
4079
+ ref: { owner: client.owner, repo: client.name, sha },
4080
+ mode,
4081
+ async list(prefix) {
4082
+ return [...(await readTree()).keys()].filter((f) => isUnder(f, prefix)).sort();
4083
+ },
4084
+ async text(path) {
4085
+ const p2 = normalizeRepoPath(path);
4086
+ const entry = (await readTree()).get(p2);
4087
+ if (!entry) return null;
4088
+ if (entry.size !== void 0 && entry.size > maxBytes) {
4089
+ throw new GitHubError(413, `${p2} is ${Math.round(entry.size / 1e3)} KB; Bridge reads files up to ${Math.round(maxBytes / 1e3)} KB.`);
4090
+ }
4091
+ let body = bodies.get(entry.sha);
4092
+ if (!body) {
4093
+ body = run(() => readBody(p2, entry.sha));
4094
+ bodies.set(entry.sha, body);
4095
+ body.catch(() => bodies.delete(entry.sha));
4096
+ }
4097
+ return body;
4098
+ }
4099
+ };
4100
+ }
4101
+ function accessState(f) {
4102
+ if (!f.visible) return f.signedIn ? "no-access" : "anonymous-unknown";
4103
+ if (!f.signedIn) return "anonymous-public";
4104
+ const p2 = f.permissions ?? {};
4105
+ if (f.installed === false && !f.private) return p2.admin || p2.maintain || p2.push || p2.triage ? "not-installed" : "outside-contributor";
4106
+ if (p2.admin) return "admin";
4107
+ if (p2.push || p2.maintain) return "writer";
4108
+ return "reader";
4109
+ }
4110
+ const RANK = {
4111
+ "anonymous-unknown": 0,
4112
+ "no-access": 0,
4113
+ "anonymous-public": 1,
4114
+ "not-installed": 1,
4115
+ "outside-contributor": 1,
4116
+ reader: 2,
4117
+ writer: 3,
4118
+ admin: 4
4119
+ };
4120
+ function accessAtLeast(state, min) {
4121
+ return RANK[state] >= RANK[min];
4122
+ }
4123
+ async function installed(client, owner, repo) {
4124
+ try {
4125
+ const found = await client.findInstallation(owner, repo);
4126
+ return found ? { installed: true, id: found.id } : { installed: false };
4127
+ } catch (err) {
4128
+ if (err instanceof GitHubError && (err.status === 401 || err.status === 429)) throw err;
4129
+ return { installed: null };
4130
+ }
4131
+ }
4132
+ async function resolveRepoAccess(client, opts = {}) {
4133
+ const signedIn = client.canWrite;
4134
+ const base = { owner: client.owner, repo: client.name };
4135
+ let info;
4136
+ try {
4137
+ info = await client.getRepo();
4138
+ } catch (err) {
4139
+ if (err instanceof GitHubError && err.status === 404) {
4140
+ return { ...base, state: accessState({ signedIn, visible: false }), private: void 0, defaultBranch: void 0, permissions: void 0 };
4141
+ }
4142
+ throw err;
4143
+ }
4144
+ const inst = signedIn && opts.app ? await installed(client, client.owner, client.name) : { installed: null };
4145
+ const direct = signedIn && opts.direct ? (await installed(opts.direct, client.owner, client.name)).installed : void 0;
4146
+ return {
4147
+ ...base,
4148
+ state: accessState({ signedIn, visible: true, installed: inst.installed, private: info.private, permissions: info.permissions }),
4149
+ private: info.private,
4150
+ defaultBranch: info.defaultBranch,
4151
+ permissions: info.permissions,
4152
+ ...inst.id !== void 0 ? { installationId: inst.id } : {},
4153
+ ...direct !== void 0 ? { directInstalled: direct } : {}
4154
+ };
4155
+ }
4156
+ const SNAPSHOT_SCHEMA_VERSION = 1;
4157
+ const SNAPSHOT_BRANCH = "bridge-data";
4158
+ const SNAPSHOT_FILE = "snapshot.json";
4159
+ const SNAPSHOT_AUDITS_DIR = "audits";
4160
+ const SNAPSHOT_MAX_BYTES = 5e6;
4161
+ class SnapshotError extends Error {
4162
+ }
4163
+ const isObj = (x) => !!x && typeof x === "object" && !Array.isArray(x);
4164
+ const isStr = (x) => typeof x === "string";
4165
+ function parseSnapshot(input) {
4166
+ let data = input;
4167
+ if (typeof input === "string") {
4168
+ try {
4169
+ data = JSON.parse(input);
4170
+ } catch (err) {
4171
+ throw new SnapshotError(`${SNAPSHOT_FILE} is not valid JSON (${err.message})`);
4172
+ }
4173
+ }
4174
+ if (!isObj(data) || data.kind !== "bridge-snapshot") throw new SnapshotError(`${SNAPSHOT_FILE} is not a Bridge snapshot`);
4175
+ if (data.schemaVersion !== SNAPSHOT_SCHEMA_VERSION) throw new SnapshotError(`${SNAPSHOT_FILE} is schema version ${String(data.schemaVersion)}; this version of Bridge reads ${SNAPSHOT_SCHEMA_VERSION}`);
4176
+ const repo = data.repo;
4177
+ if (!isObj(repo) || !isStr(repo.owner) || !isStr(repo.name) || !isStr(repo.branch)) throw new SnapshotError(`${SNAPSHOT_FILE}: repo needs owner, name and branch`);
4178
+ if (!isStr(data.sourceSha) || !data.sourceSha) throw new SnapshotError(`${SNAPSHOT_FILE}: sourceSha is missing`);
4179
+ if (!isStr(data.generatedAt)) throw new SnapshotError(`${SNAPSHOT_FILE}: generatedAt is missing`);
4180
+ if (!Array.isArray(data.paths) || !data.paths.every(isStr)) throw new SnapshotError(`${SNAPSHOT_FILE}: paths must be a list of strings`);
4181
+ if (!isObj(data.files) || !Object.values(data.files).every(isStr)) throw new SnapshotError(`${SNAPSHOT_FILE}: files must map paths to text`);
4182
+ if (data.figma !== null && (!isObj(data.figma) || !isStr(data.figma.path) || !Array.isArray(data.figma.coverage))) throw new SnapshotError(`${SNAPSHOT_FILE}: figma must be null or { path, coverage }`);
4183
+ if (!isObj(data.summary) || typeof data.summary.tokens !== "number") throw new SnapshotError(`${SNAPSHOT_FILE}: summary is missing`);
4184
+ if (!isObj(data.contrast) || !Array.isArray(data.contrast.pairs)) throw new SnapshotError(`${SNAPSHOT_FILE}: contrast needs pairs`);
4185
+ if (!Array.isArray(data.audits) || !data.audits.every((a2) => isObj(a2) && isStr(a2.id) && isStr(a2.path) && isObj(a2.metrics))) throw new SnapshotError(`${SNAPSHOT_FILE}: audits must be a list of { id, path, metrics }`);
4186
+ if (!Array.isArray(data.problems)) throw new SnapshotError(`${SNAPSHOT_FILE}: problems must be a list`);
4187
+ return data;
4188
+ }
4189
+ const snapshotIsFresh = (snapshot, headSha) => !!headSha && snapshot.sourceSha === headSha;
4190
+ function snapshotSource(snapshot) {
4191
+ const files = new Map(Object.entries(snapshot.files).map(([k, v]) => [normalizeRepoPath(k), v]));
4192
+ const figmaPath = snapshot.figma ? normalizeRepoPath(snapshot.figma.path) : void 0;
4193
+ if (snapshot.figma && figmaPath && !files.has(figmaPath)) {
4194
+ files.set(figmaPath, JSON.stringify({ ...snapshot.figma.generated ? { generated: snapshot.figma.generated } : {}, coverage: snapshot.figma.coverage }));
4195
+ }
4196
+ const paths = [.../* @__PURE__ */ new Set([...snapshot.paths.map(normalizeRepoPath), ...files.keys()])].sort();
4197
+ return {
4198
+ ref: { owner: snapshot.repo.owner, repo: snapshot.repo.name, sha: snapshot.sourceSha },
4199
+ list: async (prefix) => paths.filter((p2) => isUnder(p2, prefix)),
4200
+ text: async (path) => files.get(normalizeRepoPath(path)) ?? null
4201
+ };
4202
+ }
4203
+ function recordingSource(source) {
4204
+ const paths = /* @__PURE__ */ new Set();
4205
+ const files = /* @__PURE__ */ new Map();
4206
+ return {
4207
+ paths,
4208
+ files,
4209
+ source: {
4210
+ get ref() {
4211
+ return source.ref;
4212
+ },
4213
+ async list(prefix) {
4214
+ const out = await source.list(prefix);
4215
+ for (const p2 of out) paths.add(p2);
4216
+ return out;
4217
+ },
4218
+ async text(path) {
4219
+ const body = await source.text(path);
4220
+ if (body !== null) files.set(normalizeRepoPath(path), body);
4221
+ return body;
4222
+ }
4223
+ }
4224
+ };
4225
+ }
4226
+ function snapshotAudit(id, report) {
4227
+ return {
4228
+ id,
4229
+ path: `${SNAPSHOT_AUDITS_DIR}/${id}.json`,
4230
+ ...report.label ? { label: report.label } : {},
4231
+ generatedAt: report.generatedAt,
4232
+ target: { path: report.target.path, files: report.target.files },
4233
+ metrics: report.metrics
4234
+ };
4235
+ }
4236
+ const auditId = (s) => s.toLowerCase().replace(/\.json$/, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "audit";
4237
+ const pairResults = (p2) => {
4238
+ const brands = Object.values(p2.brands);
4239
+ return brands.length ? brands.flatMap((b) => Object.values(b)) : Object.values(p2.modes);
4240
+ };
4241
+ function snapshotSummary(model) {
4242
+ const results = model.contrast.pairs.flatMap((p2) => pairResults(p2).map((r) => r.ratio >= p2.min));
4243
+ const coverage = model.specs.coverage;
4244
+ const visual = coverage.filter((c) => c.status !== "layout").length;
4245
+ const inFigma = coverage.filter((c) => c.status === "generated" || c.status === "drafted").length;
4246
+ return {
4247
+ tokens: model.tokens.rows.all.length + model.tokens.rows.primitives.length,
4248
+ components: model.components ? model.components.list.length : null,
4249
+ contrast: { pairs: model.contrast.pairs.length, checks: results.length, failing: results.filter((ok) => !ok).length },
4250
+ figma: coverage.length ? { inFigma, visual } : null
4251
+ };
4252
+ }
4253
+ function buildSnapshot(input) {
4254
+ const { model } = input;
4255
+ const files = {};
4256
+ const entries = input.files instanceof Map ? [...input.files] : Object.entries(input.files);
4257
+ const specsPath = normalizeRepoPath(model.specs.path);
4258
+ for (const [k, v] of entries.sort(([a2], [b]) => a2 < b ? -1 : a2 > b ? 1 : 0)) {
4259
+ const p2 = normalizeRepoPath(k);
4260
+ if (p2 !== specsPath) files[p2] = v;
4261
+ }
4262
+ const hasSpecs = entries.some(([k]) => normalizeRepoPath(k) === specsPath);
4263
+ return {
4264
+ kind: "bridge-snapshot",
4265
+ schemaVersion: SNAPSHOT_SCHEMA_VERSION,
4266
+ tool: { name: "bridge", version: input.version },
4267
+ generatedAt: input.generatedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
4268
+ repo: { owner: model.ref.owner || model.site.owner, name: model.ref.repo || model.site.repo, branch: input.branch ?? model.site.defaultBranch },
4269
+ sourceSha: model.ref.sha,
4270
+ ...input.committedAt ? { committedAt: input.committedAt } : {},
4271
+ paths: [...new Set([...input.paths].map(normalizeRepoPath))].filter((p2) => p2 !== specsPath).sort(),
4272
+ files,
4273
+ figma: hasSpecs ? { path: specsPath, ...model.specs.file?.generated ? { generated: model.specs.file.generated } : {}, coverage: model.specs.coverage } : null,
4274
+ summary: snapshotSummary(model),
4275
+ contrast: { ...model.contrast.path ? { path: model.contrast.path } : {}, pairs: model.contrast.pairs.map(({ fgToken: _fg, bgToken: _bg, ...rest }) => rest) },
4276
+ audits: input.audits ?? [],
4277
+ problems: [...model.problems]
4278
+ };
4279
+ }
4280
+ const SNAPSHOT_LLMS_FILE = "llms.txt";
4281
+ const LLMS_MAX_TOKENS = 600;
4282
+ const line = (text) => typeof text === "string" ? text.replace(/\s+/g, " ").trim() : "";
4283
+ const strings = (list) => Array.isArray(list) ? list.map(line).filter(Boolean) : [];
4284
+ function snapshotLlmsTxt(model, snapshot) {
4285
+ const { owner, name, branch } = snapshot.repo;
4286
+ const date = (snapshot.committedAt ?? snapshot.generatedAt).slice(0, 10);
4287
+ const rows = model.tokens.rows;
4288
+ const tokens = rows.all.filter((t2) => !t2.deprecated);
4289
+ const shown = tokens.slice(0, LLMS_MAX_TOKENS);
4290
+ const comps = model.components?.list ?? [];
4291
+ const out = [
4292
+ `# ${owner}/${name} design system`,
4293
+ "",
4294
+ `> Tokens, components and usage guidance of the design system in github.com/${owner}/${name}, read at ${snapshot.sourceSha.slice(0, 7)} on ${branch} (${date}). Published by Bridge for AI agents and people.`,
4295
+ "",
4296
+ `- Source: https://github.com/${owner}/${name}/tree/${snapshot.sourceSha}`,
4297
+ `- Every file Bridge read, as JSON: ${SNAPSHOT_FILE}, next to this file on the ${SNAPSHOT_BRANCH} branch.`,
4298
+ `- Themes: ${rows.themes.join(", ") || "none"}. Brands: ${rows.brands.join(", ") || "none"}. Densities: ${rows.densities.join(", ") || "none"}.`,
4299
+ "",
4300
+ "## Tokens",
4301
+ "",
4302
+ `${tokens.length} tokens (brand, semantic, density and component tiers) on top of ${rows.primitives.length} primitives. Use the semantic tokens in product code, never the primitives. Values are for the default brand${rows.defaultBrand ? ` (${rows.defaultBrand})` : ""}.`,
4303
+ ""
4304
+ ];
4305
+ for (const t2 of shown) {
4306
+ const values = Object.entries(t2.modes).map(([theme, v]) => `${theme} ${line(v.css)}`).join(", ");
4307
+ const note = line(t2.description);
4308
+ out.push(`- \`${t2.path}\` (\`${t2.cssVar}\`, ${t2.tier} ${t2.type}): ${values || "no value"}${note ? `. ${note}` : ""}`);
4309
+ }
4310
+ if (tokens.length > shown.length) out.push("", `${tokens.length - shown.length} more tokens are in ${SNAPSHOT_FILE}.`);
4311
+ out.push("", "## Components", "");
4312
+ if (!comps.length) out.push("No components were read (components.dir in bridge.config.json names the folder).");
4313
+ for (const c of comps) {
4314
+ const d = c.docs;
4315
+ out.push(`### ${line(c.name)}`, "");
4316
+ const summary = line(d?.summary) || line(c.description);
4317
+ if (summary) out.push(summary, "");
4318
+ out.push(`- Family: ${line(c.category)}${c.docs?.status && c.docs.status !== "stable" ? `, ${c.docs.status}` : ""}`);
4319
+ if (c.allTokenPaths.length) out.push(`- Tokens: ${c.allTokenPaths.slice(0, 40).join(", ")}${c.allTokenPaths.length > 40 ? ", ..." : ""}`);
4320
+ for (const [label, list] of [
4321
+ ["Use it for", strings(d?.whenToUse)],
4322
+ ["Not for", strings(d?.whenNotToUse)],
4323
+ ["Accessibility", strings(d?.accessibility)]
4324
+ ]) {
4325
+ if (list.length) out.push(`- ${label}:`, ...list.map((x) => ` - ${x}`));
4326
+ }
4327
+ const dos = Array.isArray(d?.dos) ? d.dos : [];
4328
+ const donts = Array.isArray(d?.donts) ? d.donts : [];
4329
+ for (const g of dos) if (line(g?.title)) out.push(`- Do: ${line(g.title)}${line(g.text) ? `. ${line(g.text)}` : ""}`);
4330
+ for (const g of donts) if (line(g?.title)) out.push(`- Don't: ${line(g.title)}${line(g.text) ? `. ${line(g.text)}` : ""}`);
4331
+ out.push("");
4332
+ }
4333
+ return `${out.join("\n").replace(/\n{3,}/g, "\n\n").trim()}
4334
+ `;
4335
+ }
3356
4336
  export {
3357
- af as AAA_MIN,
3358
- ag as AA_MIN,
4337
+ ak as AAA_MIN,
4338
+ al as AA_MIN,
3359
4339
  ADMIN_ROLE_ID,
3360
4340
  ANTHROPIC_MESSAGES_URL,
3361
4341
  BELL,
3362
4342
  BRAND_FONTS,
3363
4343
  BRAND_SLUG_RE,
3364
- ah2 as BULK_LIMIT,
3365
- ah as CHANGES_MODES,
3366
- ai2 as COLOR_FIELDS,
4344
+ am2 as BULK_LIMIT,
4345
+ am as CHANGES_MODES,
4346
+ an2 as COLOR_FIELDS,
3367
4347
  COMBINE_COMPARE_LIMIT,
3368
4348
  COMPARE_FILE_LIMIT,
3369
- aj2 as COMPONENT_SPECS_VERSION,
4349
+ ao2 as COMPONENT_SPECS_VERSION,
3370
4350
  CONFIG_FILE,
3371
- ak2 as CONFLICT_REASON,
3372
- ai as CONTRAST_CELL_MAX,
3373
- aj as CONTRAST_CHECKS_FILE,
3374
- ak as ConfigError,
3375
- al as DEFAULT_CHANGES_MODE,
3376
- al2 as DEFAULT_COMPONENT_SPECS_FILE,
3377
- am as DEFAULT_GOVERNANCE,
3378
- an as DEFAULT_OVERRIDE,
3379
- ao as DEFAULT_PRODUCTS,
3380
- am2 as DEFAULT_PROTECTED_BRANCHES,
3381
- ap as DEFAULT_RIGHTS,
4351
+ ap2 as CONFLICT_REASON,
4352
+ an as CONTRAST_CELL_MAX,
4353
+ ao as CONTRAST_CHECKS_FILE,
4354
+ CONTRAST_THRESHOLDS,
4355
+ ConfigError,
4356
+ DEFAULT_CHANGES_MODE,
4357
+ aq2 as DEFAULT_COMPONENT_SPECS_FILE,
4358
+ ap as DEFAULT_GOVERNANCE,
4359
+ DEFAULT_OVERRIDE,
4360
+ DEFAULT_PRODUCTS,
4361
+ ar2 as DEFAULT_PROTECTED_BRANCHES,
4362
+ aq as DEFAULT_RIGHTS,
3382
4363
  DEFAULT_TOKEN_PATHS,
3383
- aq as DEFAULT_VISUAL_IMPACT,
4364
+ ar as DEFAULT_VISUAL_IMPACT,
3384
4365
  DEMO_RELEASES,
3385
- an2 as DOCS_CHANGE_BUMP,
4366
+ as2 as DOCS_CHANGE_BUMP,
3386
4367
  DOCS_DRAFT_MODEL,
3387
- ao2 as DOCS_EDITOR_ORIGIN,
3388
- ap2 as DOCS_KEYS,
3389
- aq2 as DOCS_MCP_ORIGIN,
4368
+ at2 as DOCS_EDITOR_ORIGIN,
4369
+ au2 as DOCS_KEYS,
4370
+ av2 as DOCS_MCP_ORIGIN,
3390
4371
  DOCS_SELECTION_MODES,
3391
4372
  DRAFTED_BY_CLAUDE_LABEL,
3392
4373
  DRAFTS_DIR,
@@ -3399,15 +4380,15 @@ export {
3399
4380
  DRAFT_SUMMARY_SENTENCES,
3400
4381
  DRAFT_TITLE_MAX,
3401
4382
  DRAFT_VOICE_RULES,
3402
- ar as DTCG_TYPES,
4383
+ as as DTCG_TYPES,
3403
4384
  DraftPoller,
3404
- ar2 as EXPLORATION_CHECK,
4385
+ aw2 as EXPLORATION_CHECK,
3405
4386
  EXPLORATION_LABEL,
3406
4387
  EXPLORATION_NOTES_DIR,
3407
4388
  EXPLORATION_PREFIX,
3408
- as2 as EXPLORATION_STATUS_LABEL,
3409
- at2 as EXPLORATION_TIER_LABEL,
3410
- au2 as EXPLORATION_USE_CASES,
4389
+ ax2 as EXPLORATION_STATUS_LABEL,
4390
+ ay2 as EXPLORATION_TIER_LABEL,
4391
+ az2 as EXPLORATION_USE_CASES,
3411
4392
  EXT_ID,
3412
4393
  EXT_SCOPES,
3413
4394
  FIDELITY_DEFAULTS,
@@ -3418,242 +4399,260 @@ export {
3418
4399
  FIGMA_REFERENCE_STORY,
3419
4400
  FIGMA_SPEC_DIR,
3420
4401
  FROM_FIGMA_LABEL,
3421
- av2 as GitHubClient,
4402
+ aA2 as GitHubClient,
3422
4403
  GitHubError,
3423
- as as JsonParseError,
4404
+ at as JsonParseError,
3424
4405
  LIGHTNESS,
3425
- at as LINK_STATUS_TONE,
4406
+ au as LINK_STATUS_TONE,
4407
+ LLMS_MAX_TOKENS,
3426
4408
  LayeredTokenSet,
3427
4409
  MAX_TOGETHER,
3428
4410
  MIN_TOGETHER,
3429
4411
  NEEDED_BY_LABEL,
3430
4412
  NEUTRAL_ANCHORS,
3431
4413
  OVERRIDE_HEADING,
3432
- au as OWNER_GROUPS,
4414
+ av as OWNER_GROUPS,
3433
4415
  OverrideMergeError,
3434
4416
  PIECES_FILE_LIMIT,
3435
4417
  PIN_TOLERANCE,
3436
- av as PREVIEW_APP_LABELS,
3437
- aw as PREVIEW_COMMENT_MARKER,
3438
- ax as PREVIEW_PLACEHOLDERS,
3439
- ay as PRIMITIVE_MODE,
3440
- az as PRODUCT_LABEL_PREFIX,
4418
+ aw as PREVIEW_APP_LABELS,
4419
+ ax as PREVIEW_COMMENT_MARKER,
4420
+ ay as PREVIEW_PLACEHOLDERS,
4421
+ az as PRIMITIVE_MODE,
4422
+ aA as PRODUCT_LABEL_PREFIX,
3441
4423
  PROSE_KEYS,
3442
4424
  PROTECTION_PARTS,
3443
4425
  PROTECTION_PART_PHRASE,
3444
- aw2 as PULL_STATE_PILL,
3445
- ax2 as ProtectedBranchError,
4426
+ aB2 as PULL_STATE_PILL,
4427
+ aC2 as ProtectedBranchError,
3446
4428
  RADIUS_PRESETS,
3447
- ay2 as REDUCED_MOTION_NOTE,
4429
+ aD2 as REDUCED_MOTION_NOTE,
4430
+ REPO_MODEL_DEFAULTS,
3448
4431
  REQUESTS_BRANCH,
3449
4432
  REQUEST_KINDS,
3450
4433
  REQUEST_LABEL,
3451
- az2 as REQUEST_STATUS_LABEL,
3452
- aA2 as REVIEW_STATUS_ORDER,
3453
- aA as RIGHTS,
3454
- aB as RIGHT_LABEL,
4434
+ aE2 as REQUEST_STATUS_LABEL,
4435
+ aF2 as REVIEW_STATUS_ORDER,
4436
+ aB as RIGHTS,
4437
+ aC as RIGHT_LABEL,
3455
4438
  RISK_LABELS,
3456
- aC as RISK_TIER,
4439
+ aD as RISK_TIER,
3457
4440
  SHARE_EXPLAIN,
3458
4441
  SIMILARITY_THRESHOLD,
3459
4442
  SINGLE_MODE,
3460
- aB2 as SPEC_FIELDS,
4443
+ SNAPSHOT_AUDITS_DIR,
4444
+ SNAPSHOT_BRANCH,
4445
+ SNAPSHOT_FILE,
4446
+ SNAPSHOT_LLMS_FILE,
4447
+ SNAPSHOT_MAX_BYTES,
4448
+ SNAPSHOT_SCHEMA_VERSION,
4449
+ aG2 as SPEC_FIELDS,
3461
4450
  STEPS,
3462
- aC2 as SUGGESTION_APPLIED_MARK,
3463
- aD2 as SUGGESTION_APPLY_EXIT,
3464
- aE2 as SUGGESTION_KINDS,
3465
- aF2 as SUGGESTION_LABEL,
3466
- aG2 as SUGGESTION_LIMITS,
3467
- aH2 as SUGGESTION_REVIEW_MARK,
4451
+ aH2 as SUGGESTION_APPLIED_MARK,
4452
+ aI2 as SUGGESTION_APPLY_EXIT,
4453
+ aJ2 as SUGGESTION_KINDS,
4454
+ aK2 as SUGGESTION_LABEL,
4455
+ aL2 as SUGGESTION_LIMITS,
4456
+ aM2 as SUGGESTION_REVIEW_MARK,
3468
4457
  SUGGESTION_SCHEMA,
3469
- aI2 as SUGGESTION_STATE_LABELS,
3470
- aJ2 as SUGGESTION_STATUS_LABEL,
3471
- aK2 as SUGGESTION_TOO_LARGE,
4458
+ aN2 as SUGGESTION_STATE_LABELS,
4459
+ aO2 as SUGGESTION_STATUS_LABEL,
4460
+ aP2 as SUGGESTION_TOO_LARGE,
4461
+ SnapshotError,
3472
4462
  StorybookIndexError,
3473
- aL2 as SuggestionError,
4463
+ aQ2 as SuggestionError,
3474
4464
  TIER_AXIS,
3475
4465
  TIER_NAMES,
3476
- aD as TIER_ORDER,
3477
- aM2 as TOKEN_REJECTED_MESSAGE,
3478
- aN2 as TOKEN_SETTINGS_URL,
3479
- aO2 as TRIGGER_LABELS,
3480
- aE as TeamDirectory,
3481
- aP2 as UNRELEASED,
3482
- aF as VISUAL_CHECK_LABEL,
4466
+ aE as TIER_ORDER,
4467
+ aR2 as TOKEN_REJECTED_MESSAGE,
4468
+ aS2 as TOKEN_SETTINGS_URL,
4469
+ aT2 as TRIGGER_LABELS,
4470
+ aF as TeamDirectory,
4471
+ aU2 as UNRELEASED,
4472
+ aG as VISUAL_CHECK_LABEL,
3483
4473
  WAITING_FOR_CLAUDE_LABEL,
3484
- aQ2 as acceptDocsDraft,
3485
- aR2 as acceptDocsText,
4474
+ aV2 as acceptDocsDraft,
4475
+ aW2 as acceptDocsText,
4476
+ accessAtLeast,
4477
+ accessState,
3486
4478
  addBrandToConfigText,
3487
4479
  addedComment,
3488
- aG as affectedContrast,
3489
- aH as aliasOf,
4480
+ aH as affectedContrast,
4481
+ aI as aliasOf,
3490
4482
  aliasTarget,
3491
- aS2 as allowedMergeMethods,
3492
- aT2 as anatomyLabel,
4483
+ aX2 as allowedMergeMethods,
4484
+ aY2 as anatomyLabel,
3493
4485
  anchoredRamp,
3494
4486
  anthropicReplyText,
3495
4487
  anthropicRequest,
3496
- aI as appForProject,
3497
- aJ as appUrl,
4488
+ aJ as appForProject,
4489
+ aK as appUrl,
3498
4490
  applyConfirmedRenames,
3499
4491
  applyDocsSections,
3500
4492
  applyTokenEdits,
3501
4493
  applyTokenMerge,
3502
- aK as approverEntries,
3503
- aL as approverLists,
4494
+ aL as approverEntries,
4495
+ aM as approverLists,
3504
4496
  askOthersToReviewOnGitHub,
3505
- aU2 as assertSafeBranch,
3506
- aV2 as assignRequestOnGitHub,
3507
- aW2 as assignVersions,
3508
- aX2 as base64ToUtf8,
3509
- aM as baseBranchOf,
4497
+ aZ2 as assertSafeBranch,
4498
+ a_2 as assignRequestOnGitHub,
4499
+ a$2 as assignVersions,
4500
+ auditId,
4501
+ b02 as base64ToUtf8,
4502
+ aN as baseBranchOf,
3510
4503
  bellChroma,
3511
- aN as branchName,
4504
+ aO as branchName,
3512
4505
  branchPreviewUrls,
3513
- aO as branchSlug,
4506
+ aP as branchSlug,
3514
4507
  branchWithJiraKey,
3515
4508
  brandDisplayName,
3516
4509
  brandPreviewVariables,
3517
- aY2 as bridgeMcpInstallCommand,
4510
+ b12 as bridgeMcpInstallCommand,
3518
4511
  buildFidelityReport,
3519
4512
  buildHistoryEntry,
3520
4513
  buildReport,
4514
+ buildSnapshot,
4515
+ buildTokenRows,
3521
4516
  buildTokenSet,
3522
4517
  buildUsageIndex,
3523
4518
  canAddTo,
3524
- aZ2 as canOverride,
4519
+ b22 as canOverride,
3525
4520
  canShare,
3526
- aP as canShip,
3527
- a_2 as canonicalJson,
4521
+ aQ as canShip,
4522
+ b32 as canonicalJson,
3528
4523
  changeEdits,
3529
- aQ as changeKind,
4524
+ aR as changeKind,
3530
4525
  changeList,
3531
- a$2 as changeTable,
3532
- aR as changedModes,
3533
- aS as changesMode,
3534
- b02 as changesetBump,
4526
+ b42 as changeTable,
4527
+ aS as changedModes,
4528
+ aT as changesMode,
4529
+ b52 as changesetBump,
3535
4530
  checkBrandSlug,
3536
4531
  checkLayeredPair,
3537
4532
  choiceFor,
3538
- b12 as classifyAuth,
4533
+ b62 as classifyAuth,
3539
4534
  classifyLayered,
3540
4535
  classifyRisk,
3541
- b22 as cleanDocs,
4536
+ b72 as cleanDocs,
3542
4537
  cleanDocsText,
3543
4538
  cleanDraftText,
3544
- aT as clearRawDeep,
4539
+ aU as clearRawDeep,
4540
+ b82 as clearSharedEtags,
3545
4541
  closeExplorationOnGitHub,
3546
4542
  closeOnGitHub,
3547
- b32 as closingIssueNumbers,
4543
+ b92 as closingIssueNumbers,
3548
4544
  coerceValue,
3549
4545
  collectHistory,
3550
4546
  collectRefs,
3551
4547
  colorDelta,
3552
- aU as colorToCss,
3553
- aV as colorsEqual,
4548
+ aV as colorToCss,
4549
+ aW as colorsEqual,
3554
4550
  combineChanges,
3555
4551
  combineConflicts,
3556
- aW as comboKey,
4552
+ aX as comboKey,
3557
4553
  commentOnGitHub,
3558
- b42 as commitFileOnGitHub,
4554
+ ba2 as commitFileOnGitHub,
3559
4555
  commitLibraryResolution,
3560
- aX as commitMessage,
3561
- aY as compactJson,
4556
+ aY as commitMessage,
4557
+ aZ as compactJson,
3562
4558
  compareImages,
3563
- b52 as componentContrastPairs,
4559
+ bb2 as componentContrastPairs,
3564
4560
  componentForPath,
3565
- b62 as componentMotion,
4561
+ bc2 as componentMotion,
4562
+ componentSlug,
3566
4563
  componentSpecSuggestionPayload,
3567
- b72 as componentsUsingMotionToken,
3568
- b82 as composeChangeset,
4564
+ bd2 as componentsUsingMotionToken,
4565
+ be2 as composeChangeset,
3569
4566
  composeFiles,
3570
4567
  composeNewBrandBody,
3571
4568
  composePendingDrafts,
3572
- aZ as composePrBody,
4569
+ a_ as composePrBody,
3573
4570
  composeProposalBody,
3574
4571
  composeRequestIssue,
3575
- b92 as composeSuggestionAppliedComment,
3576
- ba2 as composeSuggestionIssue,
3577
- bb2 as composeSuggestionReviewComment,
3578
- a_ as composite,
4572
+ bf2 as composeSuggestionAppliedComment,
4573
+ bg2 as composeSuggestionIssue,
4574
+ bh2 as composeSuggestionReviewComment,
4575
+ a$ as composite,
3579
4576
  conflictRoute,
3580
- a$ as contextFor,
4577
+ b0 as contextFor,
3581
4578
  contextLabel,
3582
- bc2 as continueDocsProposalOnGitHub,
4579
+ bi2 as continueDocsProposalOnGitHub,
3583
4580
  contrastDelta,
3584
- bd2 as contrastDeltaTable,
3585
- b0 as contrastLevel,
3586
- b1 as contrastPair,
3587
- b2 as contrastRatio,
4581
+ bj2 as contrastDeltaTable,
4582
+ b1 as contrastLevel,
4583
+ b2 as contrastPair,
4584
+ b3 as contrastRatio,
3588
4585
  contrastScope,
3589
- be2 as countChanges,
3590
- bf2 as coverageSummary,
4586
+ bk2 as countChanges,
4587
+ bl2 as coverageSummary,
3591
4588
  createDocsDraftSession,
3592
4589
  createPendingDrafts,
3593
4590
  createSuggestionOnGitHub,
3594
- bg2 as cssModuleClasses,
4591
+ bm2 as cssModuleClasses,
3595
4592
  cssOf,
3596
4593
  cssVarOf,
3597
4594
  cssVarsIn,
3598
- bh2 as declineComment,
3599
- bi2 as declineReasonProblems,
3600
- bj2 as declineRequestOnGitHub,
3601
- bk2 as declineSuggestionOnGitHub,
4595
+ bn2 as declineComment,
4596
+ bo2 as declineReasonProblems,
4597
+ bp2 as declineRequestOnGitHub,
4598
+ bq2 as declineSuggestionOnGitHub,
3602
4599
  decodePicks,
3603
4600
  defaultChoiceFor,
3604
- b3 as defaultContext,
3605
- bl2 as defaultDocsFooter,
4601
+ b4 as defaultContext,
4602
+ br2 as defaultDocsFooter,
3606
4603
  defaultFile,
4604
+ defaultModelConfig,
3607
4605
  defaultProduct,
3608
4606
  defaultScopes,
3609
- b4 as defaultTitle,
3610
- b5 as defineConfig,
4607
+ b5 as defaultTitle,
4608
+ defineConfig,
3611
4609
  deletePendingDrafts,
3612
4610
  demoHistory,
3613
4611
  b6 as detectLayout,
3614
4612
  diffLayered,
3615
4613
  dismissStaleFrom,
3616
- bm2 as docsAuthorLine,
3617
- bn2 as docsFileText,
4614
+ bs2 as docsAuthorLine,
4615
+ bt2 as docsFileText,
3618
4616
  docsPrompt,
3619
- bo2 as docsProposal,
3620
- bp2 as docsSectionShapes,
4617
+ bu2 as docsProposal,
4618
+ bv2 as docsSectionShapes,
3621
4619
  docsSectionsAnswer,
3622
4620
  docsSectionsResult,
3623
4621
  docsSelectionPrompt,
3624
- bq2 as docsSlug,
3625
- br2 as docsSuggestionPayload,
4622
+ bw2 as docsSlug,
4623
+ bx2 as docsSuggestionPayload,
3626
4624
  docsTaskKeys,
3627
4625
  docsTaskPrompt,
3628
- bs2 as docsText,
3629
- bt2 as draftChangeLine,
4626
+ by2 as docsText,
4627
+ bz2 as draftChangeLine,
3630
4628
  draftImagePath,
3631
4629
  draftItemBrief,
3632
- bu2 as draftPushDescription,
3633
- bv2 as draftRequestText,
4630
+ bA2 as draftPushDescription,
4631
+ bB2 as draftRequestText,
3634
4632
  draftSessionPath,
3635
4633
  dtcgColor,
3636
4634
  effectiveScopes,
3637
- bw2 as effectiveTier,
3638
- bx2 as eligibleReviewers,
4635
+ bC2 as effectiveTier,
4636
+ bD2 as eligibleReviewers,
3639
4637
  emptyTokenFile,
3640
4638
  encodePicks,
3641
4639
  ensureRequestsBranch,
3642
4640
  b7 as entriesFor,
3643
4641
  b8 as entryLabel,
4642
+ evaluateContrastPairs,
3644
4643
  evaluatePairs,
3645
4644
  b9 as expandEntries,
3646
4645
  ba as expandOwners,
3647
- by2 as explorationBranch,
4646
+ bE2 as explorationBranch,
3648
4647
  explorationNote,
3649
4648
  explorationNotePath,
3650
4649
  explorationPrBody,
3651
4650
  explorationPrTitle,
3652
4651
  explorationProblems,
3653
- bz2 as explorationRules,
3654
- bA2 as explorationShareMessage,
4652
+ bF2 as explorationRules,
4653
+ bG2 as explorationShareMessage,
3655
4654
  explorationSlug,
3656
- bB2 as explorationSlugFromBranch,
4655
+ bH2 as explorationSlugFromBranch,
3657
4656
  explorationStatus,
3658
4657
  explorationSummary,
3659
4658
  explorationTestBuildOnGitHub,
@@ -3664,7 +4663,7 @@ export {
3664
4663
  fidelityVerdict,
3665
4664
  bb as fieldChanges,
3666
4665
  figmaBranchTitle,
3667
- bC2 as figmaCell,
4666
+ bI2 as figmaCell,
3668
4667
  figmaChangeOnGitHub,
3669
4668
  figmaDraftBody,
3670
4669
  figmaDraftBrief,
@@ -3675,44 +4674,48 @@ export {
3675
4674
  figmaPushStatusesOnGitHub,
3676
4675
  figmaSpecPath,
3677
4676
  figmaSpecSlug,
3678
- bD2 as fileModes,
3679
- bE2 as filterHistory,
4677
+ bJ2 as fileModes,
4678
+ bK2 as filterHistory,
3680
4679
  findExplorationOnGitHub,
3681
- bF2 as findOpenDocsProposal,
3682
- bG2 as findOpenDocsProposalOnGitHub,
4680
+ bL2 as findOpenDocsProposal,
4681
+ bM2 as findOpenDocsProposalOnGitHub,
3683
4682
  findPreviewComment,
3684
4683
  bc as findProduct,
3685
4684
  findReferenceProblems,
3686
4685
  bd as findToken,
3687
4686
  be as findVercelComment,
3688
- bH2 as firstParagraph,
4687
+ bN2 as firstParagraph,
3689
4688
  bf as flattenLayerFile,
4689
+ flattenTokenFile,
3690
4690
  flattenTokens,
3691
4691
  formatChangeset,
3692
- bI2 as formatDocsJson,
4692
+ bO2 as formatDocsJson,
3693
4693
  formatFigmaSpec,
3694
4694
  bg as formatNumber,
3695
4695
  bh as formatOwnerEntry,
3696
4696
  formatValue,
3697
4697
  freshness,
3698
- bJ2 as friendlyMessage,
4698
+ bP2 as friendlyMessage,
3699
4699
  fromHex,
3700
4700
  bi as fromPlain,
3701
4701
  generateRamp,
3702
4702
  bj as getChild,
3703
4703
  bk as getEntry,
3704
- bK2 as getSuggestionOnGitHub,
4704
+ bQ2 as getSuggestionOnGitHub,
3705
4705
  gitBlobSha,
3706
4706
  gitHubHistoryBackend,
4707
+ gitHubSource,
3707
4708
  bl as globToRegExp,
3708
4709
  groupStorybookComponents,
3709
4710
  bm as groupsPhrase,
3710
- bL2 as hasSuggestionBlock,
3711
- bM2 as hasWriteAccess,
3712
- bN2 as hashSpec,
4711
+ bR2 as hasSuggestionBlock,
4712
+ bS2 as hasWriteAccess,
4713
+ bT2 as hashSpec,
4714
+ hexContrastRatio,
4715
+ hexLuminance,
3713
4716
  bn as hexToRgba,
3714
4717
  bo as holdersOf,
3715
- bO2 as iconComponentName,
4718
+ bU2 as iconComponentName,
3716
4719
  idExtensionFor,
3717
4720
  impactedModules,
3718
4721
  importsIn,
@@ -3720,219 +4723,239 @@ export {
3720
4723
  bq as inheritedTypeAt,
3721
4724
  br as installCommand,
3722
4725
  bs as installCommandFromPreviewComment,
3723
- bP2 as isActiveExploration,
3724
- isAlias,
3725
- bQ2 as isAutomationPull,
3726
- bR2 as isDocsProposalBranch,
4726
+ bV2 as installationFor,
4727
+ bW2 as isActiveExploration,
4728
+ isAlias$1 as isAlias,
4729
+ bX2 as isAutomationPull,
4730
+ bY2 as isDocsProposalBranch,
3727
4731
  isDocsSelectionMode,
3728
4732
  isDraftSessionId,
3729
4733
  isExplorationBranch,
3730
4734
  isExplorationPull,
3731
4735
  bt as isGuardrail,
3732
- bS2 as isGuardrailPath,
4736
+ bZ2 as isGuardrailPath,
3733
4737
  isHex,
3734
- bT2 as isJiraKey,
3735
- bU2 as isMissingPermission,
4738
+ b_2 as isJiraKey,
4739
+ b$2 as isMissingPermission,
3736
4740
  isMultiMode,
3737
4741
  isPlanRefusal,
3738
4742
  isProseKey,
3739
- bV2 as isReleasePull,
4743
+ c02 as isReleasePull,
3740
4744
  bu as isTeamEntry,
3741
4745
  bv as isTokenFile,
3742
- bW2 as isTokenRejected,
4746
+ c12 as isTokenRejected,
4747
+ isUnder,
3743
4748
  bw as isVercelComment,
3744
- bX2 as jiraIssueFields,
3745
- bY2 as jiraKeyOf,
4749
+ c22 as jiraIssueFields,
4750
+ c32 as jiraKeyOf,
4751
+ c42 as joinRepoPath,
3746
4752
  bx as kindForMin,
3747
4753
  layeredImpact,
3748
4754
  by as layeredParityIssues,
3749
4755
  layoutOptions,
3750
4756
  levenshtein,
3751
4757
  libraryBranchPlan,
4758
+ bz as libraryIsPublic,
3752
4759
  libraryPreviewState,
3753
- bZ2 as linkRequestToExplorationOnGitHub,
4760
+ c52 as linkRequestToExplorationOnGitHub,
3754
4761
  linkStatus,
3755
- b_2 as linkSuggestionPrOnGitHub,
4762
+ c62 as linkSuggestionPrOnGitHub,
3756
4763
  linkedLibraryBranchOnGitHub,
3757
- b$2 as linkedPullsOf,
4764
+ c72 as linkedPullsOf,
3758
4765
  listBrands,
3759
4766
  listExplorationsOnGitHub,
3760
4767
  listFigmaChangesOnGitHub,
3761
4768
  listPendingDrafts,
3762
- c02 as listSuggestionsOnGitHub,
4769
+ c82 as listSuggestionsOnGitHub,
3763
4770
  loadConfig,
3764
4771
  loadGitHubHistory,
3765
4772
  loadProtection,
3766
- c12 as loadRepoFiles,
4773
+ c92 as loadRepoFiles,
4774
+ loadRepoModel,
3767
4775
  loadRequiredChecks,
3768
- bz as luminance,
4776
+ bA as luminance,
3769
4777
  mailtoHref,
3770
4778
  markClaudeDraft,
3771
4779
  markFigmaChangeDraftedOnGitHub,
4780
+ ca2 as memoryEtagStore,
4781
+ cb2 as memorySource,
3772
4782
  mergeDocsDraft,
3773
4783
  mergeDraftResults,
3774
- c22 as mergeGate,
4784
+ cc2 as mergeGate,
3775
4785
  mergeOnGitHub,
3776
4786
  mergePiecesRecord,
3777
4787
  mergeReleases,
3778
4788
  missingChoices,
3779
- c32 as missingPermissionMessage,
3780
- c42 as missingProse,
4789
+ cd2 as missingPermissionMessage,
4790
+ ce2 as missingProse,
3781
4791
  modeDisplayName,
3782
4792
  modeFile,
3783
- c52 as modeLabel,
4793
+ cf2 as modeLabel,
3784
4794
  modesOf$1 as modesOf,
3785
4795
  moveToken,
3786
- bA as nearestQuestion,
4796
+ bB as nearestQuestion,
3787
4797
  nearestStep,
3788
- bB as neededBySection,
3789
- c62 as needsDocsReview,
4798
+ bC as neededBySection,
4799
+ cg2 as needsDocsReview,
3790
4800
  neutralChroma,
3791
4801
  neutralOffset,
3792
4802
  newBrandSection,
3793
4803
  newDraftSessionId,
3794
- bC as nodesEqual,
3795
- bD as normalizeRights,
4804
+ bD as nodesEqual,
4805
+ normalizeRepoPath,
4806
+ bE as normalizeRights,
3796
4807
  normalizeStorybookUrl,
3797
4808
  oklch,
3798
4809
  oklchToLinear,
3799
4810
  onlyTokens,
3800
4811
  openComponentPushOnGitHub,
3801
4812
  openLibraryBranchOnGitHub,
3802
- c72 as openPulls,
4813
+ ch2 as openPulls,
3803
4814
  overlap,
3804
4815
  overrideComment,
3805
- bE as overrideKey,
4816
+ bF as overrideKey,
3806
4817
  overrideMergeOnGitHub,
3807
- c82 as overrideReasonProblem,
4818
+ ci2 as overrideReasonProblem,
3808
4819
  overrideRefusedComment,
3809
- bF as ownerEntryProblems,
4820
+ bG as ownerEntryProblems,
3810
4821
  packageDir,
3811
4822
  packageDirCandidates,
3812
- bG as pairKey,
4823
+ bH as pairKey,
4824
+ parentDir,
3813
4825
  parseChangelog,
3814
- c92 as parseChangesetText,
4826
+ cj2 as parseChangesetText,
3815
4827
  parseColor,
3816
- ca2 as parseComponentSpecs,
4828
+ parseComponentCss,
4829
+ parseComponentFamilies,
4830
+ parseComponentSpecs,
4831
+ parseComponentStories,
4832
+ parseComponentTsx,
3817
4833
  parseContrastChecks,
3818
- bH as parseDimension,
4834
+ parseContrastSpecs,
4835
+ bI as parseDimension,
3819
4836
  parseDocsReply,
3820
4837
  parseDocsTaskAnswer,
3821
4838
  parseExplorationBody,
3822
4839
  parseFigmaOrigin,
3823
4840
  parseFigmaSpec,
3824
- cb2 as parseJiraKey,
3825
- bI as parseJson,
3826
- bJ as parseNeededBy,
3827
- cc2 as parseOverrideComment,
3828
- bK as parseOwnerEntry,
4841
+ ck2 as parseJiraKey,
4842
+ bJ as parseJson,
4843
+ parseModelConfig,
4844
+ bK as parseNeededBy,
4845
+ cl2 as parseOverrideComment,
4846
+ bL as parseOwnerEntry,
3829
4847
  parsePendingDrafts,
3830
4848
  parsePiecesRecord,
3831
- cd2 as parseRepo,
3832
- ce2 as parseRequestIssue,
4849
+ cm2 as parseRepo,
4850
+ cn2 as parseRequestIssue,
4851
+ parseSnapshot,
3833
4852
  parseStorybookIndex,
3834
- cf2 as parseStructureChange,
3835
- cg2 as parseSuggestionAppliedComment,
3836
- ch2 as parseSuggestionIssue,
3837
- ci2 as parseSuggestionReviewComment,
3838
- cj2 as parseTier,
4853
+ co2 as parseStructureChange,
4854
+ cp2 as parseSuggestionAppliedComment,
4855
+ cq2 as parseSuggestionIssue,
4856
+ cr2 as parseSuggestionReviewComment,
4857
+ cs2 as parseTier,
3839
4858
  parseTokenFile,
3840
- bL as parseVercelComment,
3841
- ck2 as patchDocsJson,
4859
+ bM as parseVercelComment,
4860
+ ct as patchDocsJson,
3842
4861
  pathId,
3843
4862
  pathSimilarity,
3844
- cl2 as pendingApprovals,
3845
- cm2 as permissionLabel,
4863
+ cu as pendingApprovals,
4864
+ cv as permissionLabel,
3846
4865
  pickedOption,
3847
4866
  p as pieceId,
3848
- bM as piecesSection,
3849
- bN as plainEqual,
4867
+ bN as piecesSection,
4868
+ bO as plainEqual,
3850
4869
  planComponentPush,
3851
4870
  planNewBrand,
3852
4871
  planReference,
3853
4872
  planReferences,
3854
- cn2 as planRestore,
3855
- co2 as planRevert,
3856
- cp2 as planSuggestionApply,
3857
- cq2 as planToJson,
4873
+ cw as planRestore,
4874
+ cx as planRevert,
4875
+ cy as planSuggestionApply,
4876
+ cz as planToJson,
3858
4877
  planTokenMerge,
3859
4878
  planTokenProposal,
3860
- cr2 as prNumberFromSubject,
3861
- cs as prefillDocs,
3862
- bO as previewComment,
4879
+ cA as prNumberFromSubject,
4880
+ cB as prefillDocs,
4881
+ bP as previewComment,
3863
4882
  previewLinks,
3864
- bP as previewLinksOf,
4883
+ bQ as previewLinksOf,
3865
4884
  previewOverrides,
3866
- bQ as previewUrl,
4885
+ bR as previewUrl,
3867
4886
  previewsSettled,
3868
4887
  productBranchRef,
3869
4888
  productBranchSentence,
3870
4889
  productBranchViewOnGitHub,
3871
- bR as productForPlace,
3872
- bS as productLabel,
3873
- bT as productMarks,
4890
+ bS as productForPlace,
4891
+ bT as productLabel,
4892
+ bU as productMarks,
3874
4893
  productOfBranch,
3875
4894
  productPreview,
3876
- bU as productProblems,
3877
- bV as productsOf,
3878
- bW as projectOfLabel,
4895
+ bV as productProblems,
4896
+ bW as productsOf,
4897
+ bX as projectOfLabel,
3879
4898
  promoteExplorationOnGitHub,
3880
4899
  promotionPlan,
3881
- ct as proposeDocsOnGitHub,
4900
+ cC as proposeDocsOnGitHub,
3882
4901
  a as proposedTokenPath,
3883
- cu as propsTable,
4902
+ cD as propsTable,
3884
4903
  protectLibrary,
3885
4904
  protectRefusal,
3886
- bX as protectedBranchesOf,
4905
+ bY as protectedBranchesOf,
3887
4906
  protectionRuleset,
3888
4907
  protectionRulesetName,
3889
4908
  protectionSentence,
3890
4909
  protectionState,
3891
- cv as pullState,
3892
- cw as pushChangeRows,
3893
- cx as rateLimitMessage,
4910
+ cE as pullState,
4911
+ cF as pushChangeRows,
4912
+ cG as rateLimitMessage,
3894
4913
  readCombineBranch,
3895
4914
  readLibraryConflicts,
3896
4915
  readPendingDrafts,
3897
4916
  readPreviewComment,
3898
4917
  readProductBranchOnGitHub,
4918
+ readRepoTexts,
3899
4919
  readTokenAt,
3900
4920
  reconcileIds,
3901
4921
  recordPiecesOnGitHub,
4922
+ recordingSource,
3902
4923
  referenceImagePath,
3903
- cy as releasePull,
4924
+ cH as releasePull,
3904
4925
  releasesFromTags,
3905
4926
  removeToken,
3906
4927
  removedSide,
3907
- bY as renderedColor,
3908
- cz as reopenEligibility,
4928
+ bZ as renderedColor,
4929
+ cI as reopenEligibility,
3909
4930
  reopenOnGitHub,
3910
- cA as requestBrief,
3911
- cB as requestImagePath,
3912
- cC as requestIssueTitle,
3913
- cD as requestStatus,
3914
- cE as requiredApprovals,
4931
+ cJ as requestBrief,
4932
+ cK as requestImagePath,
4933
+ cL as requestIssueTitle,
4934
+ cM as requestStatus,
4935
+ cN as requiredApprovals,
3915
4936
  requiredCheckNames,
3916
- cF as requiredPermission,
4937
+ cO as requiredPermission,
3917
4938
  resolutionMessage,
3918
4939
  resolve,
3919
4940
  resolveBranchPreviews,
4941
+ resolveInheritedTokens,
4942
+ resolveRepoAccess,
3920
4943
  resolvedTokenFiles,
3921
4944
  reviewOnGitHub,
3922
- cG as reviewQueue,
3923
- cH as reviewStatusKind,
3924
- cI as reviewSuggestionOnGitHub,
3925
- cJ as reviewersToAsk,
3926
- bZ as rgbaToDtcg,
4945
+ cP as reviewQueue,
4946
+ cQ as reviewStatusKind,
4947
+ cR as reviewSuggestionOnGitHub,
4948
+ cS as reviewersToAsk,
4949
+ b_ as rgbaToDtcg,
3927
4950
  rgbaToHex,
3928
- b_ as rightsProblems,
4951
+ b$ as rightsProblems,
3929
4952
  round3,
3930
4953
  rulesSettingsUrl,
3931
4954
  rulesetTargetsDefault,
3932
4955
  runLayeredContrast,
3933
- b$ as sameProducts,
4956
+ c0 as sameProducts,
3934
4957
  sameScopes,
3935
- c0 as sameToken,
4958
+ c1 as sameToken,
3936
4959
  sanitizeDocsReplacement,
3937
4960
  sanitizeDocsResult,
3938
4961
  sanitizeDocsSections,
@@ -3940,119 +4963,134 @@ export {
3940
4963
  sanitizeDraftText,
3941
4964
  sanitizeDraftTitle,
3942
4965
  sanitizeResultLines,
3943
- cK as sectionsNeedingReview,
4966
+ scanComponents,
4967
+ cT as sectionsNeedingReview,
3944
4968
  selectTokenFiles,
3945
- c1 as serializeJson,
4969
+ c2 as serializeJson,
3946
4970
  serializePendingDrafts,
3947
4971
  serializeTokenFile,
3948
- cL as sha256Hex,
4972
+ cU as sha256Hex,
3949
4973
  shadowedEdits,
3950
4974
  shareDescription,
3951
4975
  shareMessage,
3952
4976
  shareState,
3953
- c2 as shipPolicy,
3954
- cM as shortVariant,
3955
- cN as shortVariants,
4977
+ c3 as shipPolicy,
4978
+ cV as shortVariant,
4979
+ cW as shortVariants,
3956
4980
  showShare,
4981
+ siteRepoFromConfig,
3957
4982
  slugify,
3958
- c3 as snapshotUrl,
3959
- c4 as soloApprover,
3960
- c5 as soloOwnerOf,
3961
- c6 as soloOwnerSentence,
3962
- cO as specHash,
3963
- cP as specsUsage,
4983
+ snapshotAudit,
4984
+ snapshotIsFresh,
4985
+ snapshotLlmsTxt,
4986
+ snapshotSource,
4987
+ snapshotSummary,
4988
+ c4 as snapshotUrl,
4989
+ c5 as soloApprover,
4990
+ c6 as soloOwnerOf,
4991
+ c7 as soloOwnerSentence,
4992
+ cX as specHash,
4993
+ cY as specsUsage,
3964
4994
  stableCommand,
3965
4995
  startExplorationOnGitHub,
3966
4996
  stateSentence,
3967
4997
  storybookIframeUrl,
3968
4998
  storybookIndexUrls,
3969
4999
  storybookManagerUrl,
3970
- c7 as storybookUrl,
3971
- c8 as suggestNearestComment,
5000
+ c8 as storybookUrl,
5001
+ c9 as suggestNearestComment,
3972
5002
  suggestTokenProposalOnGitHub,
3973
- cQ as suggestionAllowedRoots,
3974
- cR as suggestionAppliedComment,
3975
- cS as suggestionApplyTable,
3976
- cT as suggestionIssueTitle,
3977
- cU as suggestionKindFromLabels,
3978
- cV as suggestionLabels,
3979
- cW as suggestionPathProblems,
3980
- cX as suggestionPayloadSha,
3981
- cY as suggestionReviewState,
3982
- cZ as suggestionShapeProblems,
5003
+ cZ as suggestionAllowedRoots,
5004
+ c_ as suggestionAppliedComment,
5005
+ c$ as suggestionApplyTable,
5006
+ d0 as suggestionIssueTitle,
5007
+ d1 as suggestionKindFromLabels,
5008
+ d2 as suggestionLabels,
5009
+ d3 as suggestionPathProblems,
5010
+ d4 as suggestionPayloadSha,
5011
+ d5 as suggestionReviewState,
5012
+ d6 as suggestionShapeProblems,
3983
5013
  suggestionStateFromLabels,
3984
- c_ as suggestionStateLabel,
5014
+ d7 as suggestionStateLabel,
3985
5015
  suggestionStatus,
3986
- c$ as suggestionSubject,
3987
- d0 as summarizeApprovals,
3988
- d1 as summarizeCi,
5016
+ d8 as suggestionSubject,
5017
+ d9 as summarizeApprovals,
5018
+ da as summarizeCi,
3989
5019
  summarizeComponent,
3990
- d2 as summarizeSuggestionApprovals,
3991
- c9 as summarizeTokenChange,
5020
+ db as summarizeSuggestionApprovals,
5021
+ ca as summarizeTokenChange,
3992
5022
  switchToPublishedOnGitHub,
3993
- d3 as syncSuggestionStateLabel,
5023
+ dc as syncSuggestionStateLabel,
3994
5024
  takeMine,
3995
- ca as tarballAssetName,
3996
- cb as tarballUrl,
3997
- cc as teamKey,
3998
- cd as teamKeyOf,
3999
- ce as teamUnreadableMessage,
4000
- cf as teamsIn,
5025
+ cb as tarballAssetName,
5026
+ cc as tarballUrl,
5027
+ cd as teamKey,
5028
+ ce as teamKeyOf,
5029
+ cf as teamUnreadableMessage,
5030
+ cg as teamsIn,
4001
5031
  threeWayDiff,
4002
5032
  tintedNeutral,
4003
- d4 as titleOf,
5033
+ dd as titleOf,
4004
5034
  titleWithJiraKey,
4005
- cg as toAlias,
4006
- d5 as toChangeSummary,
5035
+ ch as toAlias,
5036
+ de as toChangeSummary,
4007
5037
  toConfigJson,
4008
5038
  toHex,
4009
- ch as toMap,
5039
+ ci as toMap,
4010
5040
  toOklch,
4011
- ci as toPlain,
4012
- cj as tokenBump,
4013
- d6 as tokenCssVar,
5041
+ cj as toPlain,
5042
+ ck as tokenBump,
5043
+ df as tokenCssVar,
4014
5044
  tokenFilesOf,
4015
- d7 as tokenHistory,
5045
+ dg as tokenFingerprint,
5046
+ dh as tokenHistory,
4016
5047
  t as tokenLabel,
4017
- ck as tokenNode,
5048
+ cl as tokenNode,
5049
+ tokenRowAxes,
5050
+ tokenRowCssVar,
5051
+ tokenRowFigmaName,
5052
+ tokenRowFiles,
5053
+ tokenRowIndex,
4018
5054
  tokenSuggestionPayload,
4019
5055
  tokenUsage,
5056
+ tokenValueCss,
4020
5057
  tokensPath,
4021
5058
  touchesPackages,
4022
5059
  tryInProductUrl,
4023
5060
  tryTogetherUrl,
4024
5061
  unpicked,
4025
- cl as unreadableShipTeams,
4026
- cm as unreadableTeams,
4027
- d8 as unsafePathProblem,
5062
+ cm as unreadableShipTeams,
5063
+ cn as unreadableTeams,
5064
+ di as unsafePathProblem,
4028
5065
  updatePendingDrafts,
4029
5066
  upsertToken,
4030
5067
  useLibraryPreviewOnGitHub,
4031
- d9 as utf8ToBase64,
4032
- da as validateComponentSpec,
4033
- db as validateDocs,
5068
+ dj as utf8ToBase64,
5069
+ dk as validateComponentSpec,
5070
+ dl as validateDocs,
4034
5071
  validateDocsTask,
4035
- dc as validateIntegrations,
5072
+ dm as validateIntegrations,
4036
5073
  validateLayered,
4037
5074
  validatePendingDrafts,
4038
5075
  validateProposal,
4039
5076
  validateSet,
4040
- cn as valueIn,
4041
- co as valueToCss,
5077
+ co as valueIn,
5078
+ cp as valueToCss,
4042
5079
  valuesEqual,
4043
5080
  variantKeyOf,
4044
- dd as variantName,
4045
- de as versionTimeline,
4046
- cp as visualImpactProblems,
4047
- cq as whoCanShipSentence,
4048
- cr as whyItExists,
4049
- df as withAuthorLine,
5081
+ dn as variantName,
5082
+ dp as versionTimeline,
5083
+ cq as visualImpactProblems,
5084
+ dq as webStorageEtagStore,
5085
+ cr as whoCanShipSentence,
5086
+ cs as whyItExists,
5087
+ dr as withAuthorLine,
4050
5088
  withFigmaOrigin,
4051
5089
  withLink,
4052
5090
  withNeededBy,
4053
5091
  withPiecesRecord,
4054
- dg as withRequestExploration,
4055
- dh as withoutJiraKey,
5092
+ ds as withRequestExploration,
5093
+ dt as withoutJiraKey,
4056
5094
  writeDraftResults,
4057
5095
  writeTokenProposalOnGitHub
4058
5096
  };