@bridge-ds/core 0.15.0 → 0.17.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.d.ts +1 -0
- package/dist/index.js +412 -341
- package/dist/index.js.map +1 -1
- package/dist/node/index.js +3 -3
- package/dist/{prod-branch-BjXFIz74.js → prod-branch-DenQkr_e.js} +158 -143
- package/dist/prod-branch-DenQkr_e.js.map +1 -0
- package/dist/repo-model.d.ts +35 -1
- package/dist/{repo-source-CNZLq_xK.js → repo-source-B4jNZhyC.js} +676 -534
- package/dist/repo-source-B4jNZhyC.js.map +1 -0
- package/dist/{report-DCPfvvoq.js → report-DVEmUr0p.js} +2 -2
- package/dist/{report-DCPfvvoq.js.map → report-DVEmUr0p.js.map} +1 -1
- package/dist/review-gate.d.ts +17 -6
- package/dist/rights.d.ts +19 -0
- package/dist/snapshot.d.ts +5 -0
- package/dist/suggestions-github.d.ts +52 -4
- package/dist/suggestions.d.ts +25 -1
- package/dist/titles.d.ts +9 -0
- package/package.json +1 -1
- package/dist/prod-branch-BjXFIz74.js.map +0 -1
- package/dist/repo-source-CNZLq_xK.js.map +0 -1
package/dist/repo-model.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export declare const REPO_MODEL_DEFAULTS: {
|
|
|
14
14
|
readonly componentSpecs: "packages/react/component-specs.json";
|
|
15
15
|
/** Optional token usage notes (group -> sentence), relative to tokens.root, when tokens.usage is not set. */
|
|
16
16
|
readonly tokensUsage: "usage.json";
|
|
17
|
+
/** Most global stylesheets read (components.styles): a broad glob never turns into hundreds of reads. */
|
|
18
|
+
readonly maxStylesheets: 50;
|
|
17
19
|
readonly repo: {
|
|
18
20
|
readonly owner: "peterbono";
|
|
19
21
|
readonly repo: "ai-design-system-demo";
|
|
@@ -62,6 +64,30 @@ export declare function siteRepoFromConfig(config: BridgeConfig, raw?: unknown,
|
|
|
62
64
|
repo: string;
|
|
63
65
|
defaultBranch: string;
|
|
64
66
|
}): SiteRepo;
|
|
67
|
+
/**
|
|
68
|
+
* The global stylesheet globs of a config: components.styles, else every .css file under the styles/ and theme/
|
|
69
|
+
* folders next to the components folder (packages/react/src/styles, packages/react/src/theme here).
|
|
70
|
+
*/
|
|
71
|
+
export declare function styleGlobs(config: BridgeConfig): string[];
|
|
72
|
+
/** The folder to list for a glob: its segments before the first wildcard ('' for the whole repository). */
|
|
73
|
+
export declare function globBase(glob: string): string;
|
|
74
|
+
/**
|
|
75
|
+
* The global stylesheets of a repository (styleGlobs): one listing per glob folder, files under the components folder
|
|
76
|
+
* left to the component scan, at most REPO_MODEL_DEFAULTS.maxStylesheets (a problem says when more match).
|
|
77
|
+
*/
|
|
78
|
+
export declare function listStylesheets(source: RepoSource, config: BridgeConfig): Promise<{
|
|
79
|
+
globs: string[];
|
|
80
|
+
paths: string[];
|
|
81
|
+
problems: string[];
|
|
82
|
+
}>;
|
|
83
|
+
/**
|
|
84
|
+
* The global stylesheets of a repository with the CSS custom properties each reads: what RepoModel.styles holds.
|
|
85
|
+
* loadRepoModel reads them with everything else; a model computed without them (an older snapshot) can be completed
|
|
86
|
+
* with this alone.
|
|
87
|
+
*/
|
|
88
|
+
export declare function readStylesheets(source: RepoSource, config: BridgeConfig, concurrency?: number): Promise<RepoModel['styles'] & {
|
|
89
|
+
problems: string[];
|
|
90
|
+
}>;
|
|
65
91
|
/** The config the model uses when the repo has no bridge.config.json (or an invalid one): the defaults above. */
|
|
66
92
|
export declare const defaultModelConfig: () => BridgeConfig;
|
|
67
93
|
/** bridge.config.json text -> config, parsed once. Never throws: problems are returned and the defaults stand in. */
|
|
@@ -104,6 +130,14 @@ export interface RepoModel {
|
|
|
104
130
|
}[];
|
|
105
131
|
list: ScannedComponent[];
|
|
106
132
|
} | null;
|
|
133
|
+
/**
|
|
134
|
+
* Global stylesheets of the library (components.styles): the globs read, and each matching file with the CSS custom
|
|
135
|
+
* properties it reads (`var(--x)`), so a token read only by base styles counts as in use.
|
|
136
|
+
*/
|
|
137
|
+
styles: {
|
|
138
|
+
globs: string[];
|
|
139
|
+
vars: Record<string, string[]>;
|
|
140
|
+
};
|
|
107
141
|
specs: {
|
|
108
142
|
path: string;
|
|
109
143
|
/** Parsed component-specs.json, null when missing or of another version. */
|
|
@@ -122,7 +156,7 @@ export interface RepoModelOptions {
|
|
|
122
156
|
/**
|
|
123
157
|
* Hears how far the read has gone, in real file counts: once with every phase's total before the first body is
|
|
124
158
|
* read, then once per file settled. Phases run in order: tokens (token files, contrast checks, usage notes), then
|
|
125
|
-
* components (code, styles, stories, the index and the Figma specs), then docs (each component's docs file).
|
|
159
|
+
* components (code, styles, stories, the index, the global stylesheets and the Figma specs), then docs (each component's docs file).
|
|
126
160
|
*/
|
|
127
161
|
onProgress?: (progress: RepoModelProgress) => void;
|
|
128
162
|
}
|