@bridge-ds/core 0.15.0 → 0.16.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/bridge.config.schema.json +5 -0
- package/dist/audit/index.js +3 -3
- package/dist/config.d.ts +5 -0
- package/dist/index.js +124 -71
- package/dist/index.js.map +1 -1
- package/dist/node/index.js +3 -3
- package/dist/{prod-branch-BjXFIz74.js → prod-branch-CSM0c2OF.js} +74 -72
- package/dist/prod-branch-CSM0c2OF.js.map +1 -0
- package/dist/repo-model.d.ts +35 -1
- package/dist/{repo-source-CNZLq_xK.js → repo-source-73kARDJv.js} +2 -2
- package/dist/{repo-source-CNZLq_xK.js.map → repo-source-73kARDJv.js.map} +1 -1
- package/dist/{report-DCPfvvoq.js → report-DbE6yJCw.js} +2 -2
- package/dist/{report-DCPfvvoq.js.map → report-DbE6yJCw.js.map} +1 -1
- package/dist/snapshot.d.ts +5 -0
- package/package.json +1 -1
- package/dist/prod-branch-BjXFIz74.js.map +0 -1
|
@@ -286,6 +286,11 @@
|
|
|
286
286
|
"type": "string",
|
|
287
287
|
"description": "Generated component specs (npm run specs) the Figma plugin pulls as component sets, repo-relative.",
|
|
288
288
|
"default": "packages/react/component-specs.json"
|
|
289
|
+
},
|
|
290
|
+
"styles": {
|
|
291
|
+
"type": "array",
|
|
292
|
+
"items": { "type": "string", "minLength": 1 },
|
|
293
|
+
"description": "Global stylesheets that ship with the library (base styles, theme), as repo-relative globs. Their var(--token) reads count as token usage. Default: every .css file under the styles/ and theme/ folders next to dir."
|
|
289
294
|
}
|
|
290
295
|
}
|
|
291
296
|
},
|
package/dist/audit/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as isAuditable, a as auditFile } from "../report-
|
|
2
|
-
import { A, b, c, C, D, d, F, I, L, e, M, N, f, g, h, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, B, E, G, H, J, K, O, P, Q, R, S, T, U, V, W, X, Y, Z } from "../report-
|
|
3
|
-
import { p as pieceId, a as proposedTokenPath, t as tokenLabel } from "../prod-branch-
|
|
1
|
+
import { i as isAuditable, a as auditFile } from "../report-DbE6yJCw.js";
|
|
2
|
+
import { A, b, c, C, D, d, F, I, L, e, M, N, f, g, h, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, B, E, G, H, J, K, O, P, Q, R, S, T, U, V, W, X, Y, Z } from "../report-DbE6yJCw.js";
|
|
3
|
+
import { p as pieceId, a as proposedTokenPath, t as tokenLabel } from "../prod-branch-CSM0c2OF.js";
|
|
4
4
|
const lines = (text) => text.split(/\r?\n/);
|
|
5
5
|
function lineBag(text) {
|
|
6
6
|
const bag = /* @__PURE__ */ new Map();
|
package/dist/config.d.ts
CHANGED
|
@@ -84,6 +84,11 @@ export interface ComponentsConfig {
|
|
|
84
84
|
index?: string | undefined;
|
|
85
85
|
/** Generated component specs the Figma plugin pulls (default packages/react/component-specs.json). */
|
|
86
86
|
specs?: string | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Global stylesheets that ship with the library (base styles, theme), as repo-relative globs. Their `var(--token)`
|
|
89
|
+
* reads count as token usage. Default: every .css file under the styles/ and theme/ folders next to `dir`.
|
|
90
|
+
*/
|
|
91
|
+
styles?: string[] | undefined;
|
|
87
92
|
}
|
|
88
93
|
/**
|
|
89
94
|
* Design and tech owners. Each entry is a person ("peterbono" or "@peterbono") or a GitHub team ("@acme/design"),
|
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$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
|
|
2
|
-
import {
|
|
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-
|
|
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-
|
|
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 globToRegExp, ah as ConfigError, ai as DEFAULT_CHANGES_MODE, aj as DEFAULT_OVERRIDE, ak as DEFAULT_PRODUCTS } from "./prod-branch-CSM0c2OF.js";
|
|
2
|
+
import { 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-CSM0c2OF.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-73kARDJv.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-73kARDJv.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.");
|
|
@@ -3841,6 +3841,8 @@ const REPO_MODEL_DEFAULTS = {
|
|
|
3841
3841
|
componentSpecs: "packages/react/component-specs.json",
|
|
3842
3842
|
/** Optional token usage notes (group -> sentence), relative to tokens.root, when tokens.usage is not set. */
|
|
3843
3843
|
tokensUsage: "usage.json",
|
|
3844
|
+
/** Most global stylesheets read (components.styles): a broad glob never turns into hundreds of reads. */
|
|
3845
|
+
maxStylesheets: 50,
|
|
3844
3846
|
repo: { owner: "peterbono", repo: "ai-design-system-demo", defaultBranch: "main" }
|
|
3845
3847
|
};
|
|
3846
3848
|
function siteRepoFromConfig(config, raw, fallback = REPO_MODEL_DEFAULTS.repo) {
|
|
@@ -3862,6 +3864,42 @@ function siteRepoFromConfig(config, raw, fallback = REPO_MODEL_DEFAULTS.repo) {
|
|
|
3862
3864
|
changes: config.changes ?? DEFAULT_CHANGES_MODE
|
|
3863
3865
|
};
|
|
3864
3866
|
}
|
|
3867
|
+
function styleGlobs(config) {
|
|
3868
|
+
if (config.components?.styles) return [...config.components.styles];
|
|
3869
|
+
const parent = parentDir(config.components?.dir ?? REPO_MODEL_DEFAULTS.componentsDir);
|
|
3870
|
+
const at3 = (dir) => parent ? `${parent}/${dir}/**/*.css` : `${dir}/**/*.css`;
|
|
3871
|
+
return [at3("styles"), at3("theme")];
|
|
3872
|
+
}
|
|
3873
|
+
function globBase(glob) {
|
|
3874
|
+
const segs = glob.split("/");
|
|
3875
|
+
const fixed = [];
|
|
3876
|
+
for (const seg of segs.slice(0, -1)) {
|
|
3877
|
+
if (/[*?[{]/.test(seg)) break;
|
|
3878
|
+
fixed.push(seg);
|
|
3879
|
+
}
|
|
3880
|
+
return fixed.join("/");
|
|
3881
|
+
}
|
|
3882
|
+
async function listStylesheets(source, config) {
|
|
3883
|
+
const globs = styleGlobs(config);
|
|
3884
|
+
const matchers = globs.map(globToRegExp);
|
|
3885
|
+
const compDir = config.components?.dir ?? REPO_MODEL_DEFAULTS.componentsDir;
|
|
3886
|
+
const bases = [...new Set(globs.map(globBase))].filter((b, _, all) => !all.some((o) => o !== b && (o === "" || b.startsWith(`${o}/`))));
|
|
3887
|
+
const listed = (await Promise.all(bases.map((b) => source.list(b)))).flat();
|
|
3888
|
+
const paths = [...new Set(listed)].filter((p2) => matchers.some((re) => re.test(p2)) && !p2.startsWith(`${compDir}/`)).sort();
|
|
3889
|
+
const max = REPO_MODEL_DEFAULTS.maxStylesheets;
|
|
3890
|
+
if (paths.length <= max) return { globs, paths, problems: [] };
|
|
3891
|
+
return { globs, paths: paths.slice(0, max), problems: [`components.styles matches ${paths.length} files: Bridge reads the first ${max}. Narrow the globs to the stylesheets the library ships.`] };
|
|
3892
|
+
}
|
|
3893
|
+
async function readStylesheets(source, config, concurrency = 8) {
|
|
3894
|
+
const { globs, paths, problems } = await listStylesheets(source, config);
|
|
3895
|
+
const bodies = await readRepoTexts(source, paths, concurrency);
|
|
3896
|
+
const vars = {};
|
|
3897
|
+
for (const p2 of paths) {
|
|
3898
|
+
const text = bodies.get(p2);
|
|
3899
|
+
if (typeof text === "string") vars[p2] = cssVarsIn(text);
|
|
3900
|
+
}
|
|
3901
|
+
return { globs, vars, problems };
|
|
3902
|
+
}
|
|
3865
3903
|
function withModelDefaults(raw) {
|
|
3866
3904
|
const tokens = raw.tokens && typeof raw.tokens === "object" ? raw.tokens : {};
|
|
3867
3905
|
return {
|
|
@@ -3926,6 +3964,10 @@ async function loadRepoModel(source, options = {}) {
|
|
|
3926
3964
|
}
|
|
3927
3965
|
codeRead.push(indexPath);
|
|
3928
3966
|
}
|
|
3967
|
+
const listedStyles = await listStylesheets(source, config);
|
|
3968
|
+
problems.push(...listedStyles.problems);
|
|
3969
|
+
const stylePaths = listedStyles.paths;
|
|
3970
|
+
codeRead.push(...stylePaths);
|
|
3929
3971
|
const seen = /* @__PURE__ */ new Set();
|
|
3930
3972
|
const fresh = (paths) => paths.filter((p2) => {
|
|
3931
3973
|
if (seen.has(p2)) return false;
|
|
@@ -3993,6 +4035,11 @@ async function loadRepoModel(source, options = {}) {
|
|
|
3993
4035
|
const list = scanComponents({ dir: comps.dir, files: compFiles, readText: readMore, indexText, indexRel, docsSuffix: comps.docsSuffix, styleSuffix: comps.styleSuffix, describeVar, problems });
|
|
3994
4036
|
components = { dir: comps.dir, index: indexText === void 0 ? void 0 : indexPath, families: indexText === void 0 ? [] : parseComponentFamilies(indexText, indexRel), list };
|
|
3995
4037
|
}
|
|
4038
|
+
const styleVars = {};
|
|
4039
|
+
for (const p2 of stylePaths) {
|
|
4040
|
+
const text = readMore(p2);
|
|
4041
|
+
if (text !== void 0) styleVars[p2] = cssVarsIn(text);
|
|
4042
|
+
}
|
|
3996
4043
|
const specsText = readMore(specsPath);
|
|
3997
4044
|
let specsFile = null;
|
|
3998
4045
|
let coverage = [];
|
|
@@ -4016,6 +4063,7 @@ async function loadRepoModel(source, options = {}) {
|
|
|
4016
4063
|
tokens: { root, files, rows, usage },
|
|
4017
4064
|
contrast: { path: contrastPath, specs, pairs: pairs2 },
|
|
4018
4065
|
components,
|
|
4066
|
+
styles: { globs: listedStyles.globs, vars: styleVars },
|
|
4019
4067
|
specs: { path: specsPath, file: specsFile, coverage }
|
|
4020
4068
|
};
|
|
4021
4069
|
}
|
|
@@ -4274,7 +4322,8 @@ function buildSnapshot(input) {
|
|
|
4274
4322
|
summary: snapshotSummary(model),
|
|
4275
4323
|
contrast: { ...model.contrast.path ? { path: model.contrast.path } : {}, pairs: model.contrast.pairs.map(({ fgToken: _fg, bgToken: _bg, ...rest }) => rest) },
|
|
4276
4324
|
audits: input.audits ?? [],
|
|
4277
|
-
problems: [...model.problems]
|
|
4325
|
+
problems: [...model.problems],
|
|
4326
|
+
styles: [...model.styles.globs]
|
|
4278
4327
|
};
|
|
4279
4328
|
}
|
|
4280
4329
|
const SNAPSHOT_LLMS_FILE = "llms.txt";
|
|
@@ -4334,34 +4383,34 @@ function snapshotLlmsTxt(model, snapshot) {
|
|
|
4334
4383
|
`;
|
|
4335
4384
|
}
|
|
4336
4385
|
export {
|
|
4337
|
-
|
|
4338
|
-
|
|
4386
|
+
al as AAA_MIN,
|
|
4387
|
+
am as AA_MIN,
|
|
4339
4388
|
ADMIN_ROLE_ID,
|
|
4340
4389
|
ANTHROPIC_MESSAGES_URL,
|
|
4341
4390
|
BELL,
|
|
4342
4391
|
BRAND_FONTS,
|
|
4343
4392
|
BRAND_SLUG_RE,
|
|
4344
4393
|
am2 as BULK_LIMIT,
|
|
4345
|
-
|
|
4394
|
+
an as CHANGES_MODES,
|
|
4346
4395
|
an2 as COLOR_FIELDS,
|
|
4347
4396
|
COMBINE_COMPARE_LIMIT,
|
|
4348
4397
|
COMPARE_FILE_LIMIT,
|
|
4349
4398
|
ao2 as COMPONENT_SPECS_VERSION,
|
|
4350
4399
|
CONFIG_FILE,
|
|
4351
4400
|
ap2 as CONFLICT_REASON,
|
|
4352
|
-
|
|
4353
|
-
|
|
4401
|
+
ao as CONTRAST_CELL_MAX,
|
|
4402
|
+
ap as CONTRAST_CHECKS_FILE,
|
|
4354
4403
|
CONTRAST_THRESHOLDS,
|
|
4355
4404
|
ConfigError,
|
|
4356
4405
|
DEFAULT_CHANGES_MODE,
|
|
4357
4406
|
aq2 as DEFAULT_COMPONENT_SPECS_FILE,
|
|
4358
|
-
|
|
4407
|
+
aq as DEFAULT_GOVERNANCE,
|
|
4359
4408
|
DEFAULT_OVERRIDE,
|
|
4360
4409
|
DEFAULT_PRODUCTS,
|
|
4361
4410
|
ar2 as DEFAULT_PROTECTED_BRANCHES,
|
|
4362
|
-
|
|
4411
|
+
ar as DEFAULT_RIGHTS,
|
|
4363
4412
|
DEFAULT_TOKEN_PATHS,
|
|
4364
|
-
|
|
4413
|
+
as as DEFAULT_VISUAL_IMPACT,
|
|
4365
4414
|
DEMO_RELEASES,
|
|
4366
4415
|
as2 as DOCS_CHANGE_BUMP,
|
|
4367
4416
|
DOCS_DRAFT_MODEL,
|
|
@@ -4380,7 +4429,7 @@ export {
|
|
|
4380
4429
|
DRAFT_SUMMARY_SENTENCES,
|
|
4381
4430
|
DRAFT_TITLE_MAX,
|
|
4382
4431
|
DRAFT_VOICE_RULES,
|
|
4383
|
-
|
|
4432
|
+
at as DTCG_TYPES,
|
|
4384
4433
|
DraftPoller,
|
|
4385
4434
|
aw2 as EXPLORATION_CHECK,
|
|
4386
4435
|
EXPLORATION_LABEL,
|
|
@@ -4401,9 +4450,9 @@ export {
|
|
|
4401
4450
|
FROM_FIGMA_LABEL,
|
|
4402
4451
|
aA2 as GitHubClient,
|
|
4403
4452
|
GitHubError,
|
|
4404
|
-
|
|
4453
|
+
au as JsonParseError,
|
|
4405
4454
|
LIGHTNESS,
|
|
4406
|
-
|
|
4455
|
+
av as LINK_STATUS_TONE,
|
|
4407
4456
|
LLMS_MAX_TOKENS,
|
|
4408
4457
|
LayeredTokenSet,
|
|
4409
4458
|
MAX_TOGETHER,
|
|
@@ -4411,15 +4460,15 @@ export {
|
|
|
4411
4460
|
NEEDED_BY_LABEL,
|
|
4412
4461
|
NEUTRAL_ANCHORS,
|
|
4413
4462
|
OVERRIDE_HEADING,
|
|
4414
|
-
|
|
4463
|
+
aw as OWNER_GROUPS,
|
|
4415
4464
|
OverrideMergeError,
|
|
4416
4465
|
PIECES_FILE_LIMIT,
|
|
4417
4466
|
PIN_TOLERANCE,
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4467
|
+
ax as PREVIEW_APP_LABELS,
|
|
4468
|
+
ay as PREVIEW_COMMENT_MARKER,
|
|
4469
|
+
az as PREVIEW_PLACEHOLDERS,
|
|
4470
|
+
aA as PRIMITIVE_MODE,
|
|
4471
|
+
aB as PRODUCT_LABEL_PREFIX,
|
|
4423
4472
|
PROSE_KEYS,
|
|
4424
4473
|
PROTECTION_PARTS,
|
|
4425
4474
|
PROTECTION_PART_PHRASE,
|
|
@@ -4433,10 +4482,10 @@ export {
|
|
|
4433
4482
|
REQUEST_LABEL,
|
|
4434
4483
|
aE2 as REQUEST_STATUS_LABEL,
|
|
4435
4484
|
aF2 as REVIEW_STATUS_ORDER,
|
|
4436
|
-
|
|
4437
|
-
|
|
4485
|
+
aC as RIGHTS,
|
|
4486
|
+
aD as RIGHT_LABEL,
|
|
4438
4487
|
RISK_LABELS,
|
|
4439
|
-
|
|
4488
|
+
aE as RISK_TIER,
|
|
4440
4489
|
SHARE_EXPLAIN,
|
|
4441
4490
|
SIMILARITY_THRESHOLD,
|
|
4442
4491
|
SINGLE_MODE,
|
|
@@ -4463,13 +4512,13 @@ export {
|
|
|
4463
4512
|
aQ2 as SuggestionError,
|
|
4464
4513
|
TIER_AXIS,
|
|
4465
4514
|
TIER_NAMES,
|
|
4466
|
-
|
|
4515
|
+
aF as TIER_ORDER,
|
|
4467
4516
|
aR2 as TOKEN_REJECTED_MESSAGE,
|
|
4468
4517
|
aS2 as TOKEN_SETTINGS_URL,
|
|
4469
4518
|
aT2 as TRIGGER_LABELS,
|
|
4470
|
-
|
|
4519
|
+
aG as TeamDirectory,
|
|
4471
4520
|
aU2 as UNRELEASED,
|
|
4472
|
-
|
|
4521
|
+
aH as VISUAL_CHECK_LABEL,
|
|
4473
4522
|
WAITING_FOR_CLAUDE_LABEL,
|
|
4474
4523
|
aV2 as acceptDocsDraft,
|
|
4475
4524
|
aW2 as acceptDocsText,
|
|
@@ -4477,33 +4526,33 @@ export {
|
|
|
4477
4526
|
accessState,
|
|
4478
4527
|
addBrandToConfigText,
|
|
4479
4528
|
addedComment,
|
|
4480
|
-
|
|
4481
|
-
|
|
4529
|
+
aI as affectedContrast,
|
|
4530
|
+
aJ as aliasOf,
|
|
4482
4531
|
aliasTarget,
|
|
4483
4532
|
aX2 as allowedMergeMethods,
|
|
4484
4533
|
aY2 as anatomyLabel,
|
|
4485
4534
|
anchoredRamp,
|
|
4486
4535
|
anthropicReplyText,
|
|
4487
4536
|
anthropicRequest,
|
|
4488
|
-
|
|
4489
|
-
|
|
4537
|
+
aK as appForProject,
|
|
4538
|
+
aL as appUrl,
|
|
4490
4539
|
applyConfirmedRenames,
|
|
4491
4540
|
applyDocsSections,
|
|
4492
4541
|
applyTokenEdits,
|
|
4493
4542
|
applyTokenMerge,
|
|
4494
|
-
|
|
4495
|
-
|
|
4543
|
+
aM as approverEntries,
|
|
4544
|
+
aN as approverLists,
|
|
4496
4545
|
askOthersToReviewOnGitHub,
|
|
4497
4546
|
aZ2 as assertSafeBranch,
|
|
4498
4547
|
a_2 as assignRequestOnGitHub,
|
|
4499
4548
|
a$2 as assignVersions,
|
|
4500
4549
|
auditId,
|
|
4501
4550
|
b02 as base64ToUtf8,
|
|
4502
|
-
|
|
4551
|
+
aO as baseBranchOf,
|
|
4503
4552
|
bellChroma,
|
|
4504
|
-
|
|
4553
|
+
aP as branchName,
|
|
4505
4554
|
branchPreviewUrls,
|
|
4506
|
-
|
|
4555
|
+
aQ as branchSlug,
|
|
4507
4556
|
branchWithJiraKey,
|
|
4508
4557
|
brandDisplayName,
|
|
4509
4558
|
brandPreviewVariables,
|
|
@@ -4518,14 +4567,14 @@ export {
|
|
|
4518
4567
|
canAddTo,
|
|
4519
4568
|
b22 as canOverride,
|
|
4520
4569
|
canShare,
|
|
4521
|
-
|
|
4570
|
+
aR as canShip,
|
|
4522
4571
|
b32 as canonicalJson,
|
|
4523
4572
|
changeEdits,
|
|
4524
|
-
|
|
4573
|
+
aS as changeKind,
|
|
4525
4574
|
changeList,
|
|
4526
4575
|
b42 as changeTable,
|
|
4527
|
-
|
|
4528
|
-
|
|
4576
|
+
aT as changedModes,
|
|
4577
|
+
aU as changesMode,
|
|
4529
4578
|
b52 as changesetBump,
|
|
4530
4579
|
checkBrandSlug,
|
|
4531
4580
|
checkLayeredPair,
|
|
@@ -4536,7 +4585,7 @@ export {
|
|
|
4536
4585
|
b72 as cleanDocs,
|
|
4537
4586
|
cleanDocsText,
|
|
4538
4587
|
cleanDraftText,
|
|
4539
|
-
|
|
4588
|
+
aV as clearRawDeep,
|
|
4540
4589
|
b82 as clearSharedEtags,
|
|
4541
4590
|
closeExplorationOnGitHub,
|
|
4542
4591
|
closeOnGitHub,
|
|
@@ -4545,16 +4594,16 @@ export {
|
|
|
4545
4594
|
collectHistory,
|
|
4546
4595
|
collectRefs,
|
|
4547
4596
|
colorDelta,
|
|
4548
|
-
|
|
4549
|
-
|
|
4597
|
+
aW as colorToCss,
|
|
4598
|
+
aX as colorsEqual,
|
|
4550
4599
|
combineChanges,
|
|
4551
4600
|
combineConflicts,
|
|
4552
|
-
|
|
4601
|
+
aY as comboKey,
|
|
4553
4602
|
commentOnGitHub,
|
|
4554
4603
|
ba2 as commitFileOnGitHub,
|
|
4555
4604
|
commitLibraryResolution,
|
|
4556
|
-
|
|
4557
|
-
|
|
4605
|
+
aZ as commitMessage,
|
|
4606
|
+
a_ as compactJson,
|
|
4558
4607
|
compareImages,
|
|
4559
4608
|
bb2 as componentContrastPairs,
|
|
4560
4609
|
componentForPath,
|
|
@@ -4566,22 +4615,22 @@ export {
|
|
|
4566
4615
|
composeFiles,
|
|
4567
4616
|
composeNewBrandBody,
|
|
4568
4617
|
composePendingDrafts,
|
|
4569
|
-
|
|
4618
|
+
a$ as composePrBody,
|
|
4570
4619
|
composeProposalBody,
|
|
4571
4620
|
composeRequestIssue,
|
|
4572
4621
|
bf2 as composeSuggestionAppliedComment,
|
|
4573
4622
|
bg2 as composeSuggestionIssue,
|
|
4574
4623
|
bh2 as composeSuggestionReviewComment,
|
|
4575
|
-
|
|
4624
|
+
b0 as composite,
|
|
4576
4625
|
conflictRoute,
|
|
4577
|
-
|
|
4626
|
+
b1 as contextFor,
|
|
4578
4627
|
contextLabel,
|
|
4579
4628
|
bi2 as continueDocsProposalOnGitHub,
|
|
4580
4629
|
contrastDelta,
|
|
4581
4630
|
bj2 as contrastDeltaTable,
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4631
|
+
b2 as contrastLevel,
|
|
4632
|
+
b3 as contrastPair,
|
|
4633
|
+
b4 as contrastRatio,
|
|
4585
4634
|
contrastScope,
|
|
4586
4635
|
bk2 as countChanges,
|
|
4587
4636
|
bl2 as coverageSummary,
|
|
@@ -4598,17 +4647,17 @@ export {
|
|
|
4598
4647
|
bq2 as declineSuggestionOnGitHub,
|
|
4599
4648
|
decodePicks,
|
|
4600
4649
|
defaultChoiceFor,
|
|
4601
|
-
|
|
4650
|
+
b5 as defaultContext,
|
|
4602
4651
|
br2 as defaultDocsFooter,
|
|
4603
4652
|
defaultFile,
|
|
4604
4653
|
defaultModelConfig,
|
|
4605
4654
|
defaultProduct,
|
|
4606
4655
|
defaultScopes,
|
|
4607
|
-
|
|
4656
|
+
b6 as defaultTitle,
|
|
4608
4657
|
defineConfig,
|
|
4609
4658
|
deletePendingDrafts,
|
|
4610
4659
|
demoHistory,
|
|
4611
|
-
|
|
4660
|
+
b7 as detectLayout,
|
|
4612
4661
|
diffLayered,
|
|
4613
4662
|
dismissStaleFrom,
|
|
4614
4663
|
bs2 as docsAuthorLine,
|
|
@@ -4637,12 +4686,12 @@ export {
|
|
|
4637
4686
|
emptyTokenFile,
|
|
4638
4687
|
encodePicks,
|
|
4639
4688
|
ensureRequestsBranch,
|
|
4640
|
-
|
|
4641
|
-
|
|
4689
|
+
b8 as entriesFor,
|
|
4690
|
+
b9 as entryLabel,
|
|
4642
4691
|
evaluateContrastPairs,
|
|
4643
4692
|
evaluatePairs,
|
|
4644
|
-
|
|
4645
|
-
|
|
4693
|
+
ba as expandEntries,
|
|
4694
|
+
bb as expandOwners,
|
|
4646
4695
|
bE2 as explorationBranch,
|
|
4647
4696
|
explorationNote,
|
|
4648
4697
|
explorationNotePath,
|
|
@@ -4661,7 +4710,7 @@ export {
|
|
|
4661
4710
|
fetchStorybookIndex,
|
|
4662
4711
|
fidelityComponentLine,
|
|
4663
4712
|
fidelityVerdict,
|
|
4664
|
-
|
|
4713
|
+
bc as fieldChanges,
|
|
4665
4714
|
figmaBranchTitle,
|
|
4666
4715
|
bI2 as figmaCell,
|
|
4667
4716
|
figmaChangeOnGitHub,
|
|
@@ -4680,32 +4729,33 @@ export {
|
|
|
4680
4729
|
bL2 as findOpenDocsProposal,
|
|
4681
4730
|
bM2 as findOpenDocsProposalOnGitHub,
|
|
4682
4731
|
findPreviewComment,
|
|
4683
|
-
|
|
4732
|
+
bd as findProduct,
|
|
4684
4733
|
findReferenceProblems,
|
|
4685
|
-
|
|
4686
|
-
|
|
4734
|
+
be as findToken,
|
|
4735
|
+
bf as findVercelComment,
|
|
4687
4736
|
bN2 as firstParagraph,
|
|
4688
|
-
|
|
4737
|
+
bg as flattenLayerFile,
|
|
4689
4738
|
flattenTokenFile,
|
|
4690
4739
|
flattenTokens,
|
|
4691
4740
|
formatChangeset,
|
|
4692
4741
|
bO2 as formatDocsJson,
|
|
4693
4742
|
formatFigmaSpec,
|
|
4694
|
-
|
|
4695
|
-
|
|
4743
|
+
bh as formatNumber,
|
|
4744
|
+
bi as formatOwnerEntry,
|
|
4696
4745
|
formatValue,
|
|
4697
4746
|
freshness,
|
|
4698
4747
|
bP2 as friendlyMessage,
|
|
4699
4748
|
fromHex,
|
|
4700
|
-
|
|
4749
|
+
bj as fromPlain,
|
|
4701
4750
|
generateRamp,
|
|
4702
|
-
|
|
4703
|
-
|
|
4751
|
+
bk as getChild,
|
|
4752
|
+
bl as getEntry,
|
|
4704
4753
|
bQ2 as getSuggestionOnGitHub,
|
|
4705
4754
|
gitBlobSha,
|
|
4706
4755
|
gitHubHistoryBackend,
|
|
4707
4756
|
gitHubSource,
|
|
4708
|
-
|
|
4757
|
+
globBase,
|
|
4758
|
+
globToRegExp,
|
|
4709
4759
|
groupStorybookComponents,
|
|
4710
4760
|
bm as groupsPhrase,
|
|
4711
4761
|
bR2 as hasSuggestionBlock,
|
|
@@ -4766,6 +4816,7 @@ export {
|
|
|
4766
4816
|
listExplorationsOnGitHub,
|
|
4767
4817
|
listFigmaChangesOnGitHub,
|
|
4768
4818
|
listPendingDrafts,
|
|
4819
|
+
listStylesheets,
|
|
4769
4820
|
c82 as listSuggestionsOnGitHub,
|
|
4770
4821
|
loadConfig,
|
|
4771
4822
|
loadGitHubHistory,
|
|
@@ -4916,6 +4967,7 @@ export {
|
|
|
4916
4967
|
readPreviewComment,
|
|
4917
4968
|
readProductBranchOnGitHub,
|
|
4918
4969
|
readRepoTexts,
|
|
4970
|
+
readStylesheets,
|
|
4919
4971
|
readTokenAt,
|
|
4920
4972
|
reconcileIds,
|
|
4921
4973
|
recordPiecesOnGitHub,
|
|
@@ -4998,6 +5050,7 @@ export {
|
|
|
4998
5050
|
storybookIndexUrls,
|
|
4999
5051
|
storybookManagerUrl,
|
|
5000
5052
|
c8 as storybookUrl,
|
|
5053
|
+
styleGlobs,
|
|
5001
5054
|
c9 as suggestNearestComment,
|
|
5002
5055
|
suggestTokenProposalOnGitHub,
|
|
5003
5056
|
cZ as suggestionAllowedRoots,
|