@bridge-ds/core 0.3.0 → 0.5.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/README.md +16 -5
- package/audit-report.schema.json +135 -1
- package/dist/audit/code.d.ts +50 -0
- package/dist/audit/ignore.d.ts +34 -0
- package/dist/audit/index.d.ts +3 -0
- package/dist/audit/index.js +45 -29
- package/dist/audit/markup.d.ts +21 -0
- package/dist/audit/report.d.ts +5 -7
- package/dist/audit/style.d.ts +25 -0
- package/dist/audit/types.d.ts +39 -1
- package/dist/{component-spec-IRFGJ7XK.js → component-spec-cvrSvIZj.js} +160 -160
- package/dist/{component-spec-IRFGJ7XK.js.map → component-spec-cvrSvIZj.js.map} +1 -1
- package/dist/css-overrides.d.ts +11 -0
- package/dist/explorations-github.d.ts +4 -1
- package/dist/explorations.d.ts +6 -0
- package/dist/github-client.d.ts +19 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +685 -398
- package/dist/index.js.map +1 -1
- package/dist/{layered-DGate4nv.js → layered-BnbmToGs.js} +10 -10
- package/dist/{layered-DGate4nv.js.map → layered-BnbmToGs.js.map} +1 -1
- package/dist/node/audit.d.ts +5 -1
- package/dist/node/index.js +8 -4
- package/dist/node/index.js.map +1 -1
- package/dist/{report-tNzTriGF.js → report-4Z008HSf.js} +599 -144
- package/dist/report-4Z008HSf.js.map +1 -0
- package/dist/token-combine.d.ts +78 -0
- package/dist/token-merge.d.ts +72 -0
- package/package.json +1 -1
- package/dist/report-tNzTriGF.js.map +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ResolveContext } from './resolver';
|
|
2
|
+
import type { TokenSet } from './token-set';
|
|
3
|
+
/** CSS value of a resolved DTCG value, the way tokens.css writes it. */
|
|
4
|
+
export declare function cssOf(type: string, value: unknown): string | undefined;
|
|
5
|
+
export declare const cssVarOf: (path: string) => string;
|
|
6
|
+
/**
|
|
7
|
+
* CSS custom properties to set on a scope so it renders `proposed` instead of `head`: every token whose resolved value
|
|
8
|
+
* differs in that context. Setting resolved values (not var() references) keeps chains correct even when the original
|
|
9
|
+
* variable is declared on an ancestor.
|
|
10
|
+
*/
|
|
11
|
+
export declare function previewOverrides(head: TokenSet, proposed: TokenSet, ctx: ResolveContext): Record<string, string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BridgeConfig } from './config';
|
|
2
|
-
import { type Exploration, type ExplorationStatus, type ExplorationTryIt, type PromotionPlan } from './explorations';
|
|
2
|
+
import { type Exploration, type ExplorationSource, type ExplorationStatus, type ExplorationTryIt, type PromotionPlan } from './explorations';
|
|
3
3
|
import { type GitHubClient, type PullRequestSummary } from './github-client';
|
|
4
4
|
import { type BranchPreview, type PreviewApps } from './previews';
|
|
5
5
|
export interface ExplorationSettings {
|
|
@@ -26,6 +26,9 @@ export interface ExplorationSummary {
|
|
|
26
26
|
status: ExplorationStatus;
|
|
27
27
|
draft: boolean;
|
|
28
28
|
author: string;
|
|
29
|
+
/** Where it was started and the AI agent that started it, when the exploration block says so. */
|
|
30
|
+
source?: ExplorationSource | undefined;
|
|
31
|
+
agent?: string | undefined;
|
|
29
32
|
updatedAt: string;
|
|
30
33
|
/** Head commit of the branch. */
|
|
31
34
|
headSha: string;
|
package/dist/explorations.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ export declare const EXPLORATION_TIER_LABEL = "Exploration (not mergeable)";
|
|
|
13
13
|
export declare const EXPLORATION_CHECK = "Exploration not merged as is";
|
|
14
14
|
export type ExplorationUseCase = 'user-test' | 'stakeholder-demo' | 'ab-idea' | 'terminal' | 'other';
|
|
15
15
|
export type ExplorationStatus = 'active' | 'promoted' | 'closed';
|
|
16
|
+
/** Where an exploration was started: Bridge Studio, the Figma plugin, the CLI or the MCP server (an AI agent). */
|
|
17
|
+
export type ExplorationSource = 'studio' | 'figma' | 'cli' | 'mcp';
|
|
16
18
|
export declare const EXPLORATION_USE_CASES: {
|
|
17
19
|
value: ExplorationUseCase;
|
|
18
20
|
label: string;
|
|
@@ -33,6 +35,10 @@ export interface Exploration {
|
|
|
33
35
|
author?: string | undefined;
|
|
34
36
|
/** ISO date it started. */
|
|
35
37
|
startedAt?: string | undefined;
|
|
38
|
+
/** Where it was started, so Studio says "You" only for what the viewer started there. */
|
|
39
|
+
source?: ExplorationSource | undefined;
|
|
40
|
+
/** The AI agent that started it ("claude"), when one did: the GitHub account alone cannot tell. */
|
|
41
|
+
agent?: string | undefined;
|
|
36
42
|
}
|
|
37
43
|
/** "Denser data tables!" -> "denser-data-tables". Up to 40 characters, cut at a word boundary. Empty when nothing is left. */
|
|
38
44
|
export declare function explorationSlug(name: string): string;
|
package/dist/github-client.d.ts
CHANGED
|
@@ -118,7 +118,21 @@ export interface ClientOptions {
|
|
|
118
118
|
protectedBranches?: string[];
|
|
119
119
|
/** When set, branches this client creates must start with it (agents use "bridge/"). */
|
|
120
120
|
branchPrefix?: string;
|
|
121
|
+
/**
|
|
122
|
+
* How a person adds a token where this client runs, for the rate-limit message without one ("set GITHUB_TOKEN in
|
|
123
|
+
* the MCP server config"). Default: "add a GitHub token".
|
|
124
|
+
*/
|
|
125
|
+
tokenHint?: string;
|
|
121
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* The sentence for GitHub's exhausted hourly limit. With a token, the token's own limit is used up: wait. Without one,
|
|
129
|
+
* the shared limit for anonymous reads is (60 an hour per address): say how to get a higher one.
|
|
130
|
+
*/
|
|
131
|
+
export declare function rateLimitMessage(x: {
|
|
132
|
+
withToken: boolean;
|
|
133
|
+
resetsAt?: Date;
|
|
134
|
+
tokenHint?: string;
|
|
135
|
+
}): string;
|
|
122
136
|
/** A file in a new commit: text content, or null to delete it. */
|
|
123
137
|
export interface CommitFile {
|
|
124
138
|
path: string;
|
|
@@ -272,6 +286,11 @@ export declare class GitHubClient {
|
|
|
272
286
|
* markPullRequestReadyForReview, with the same token (pull requests: write).
|
|
273
287
|
*/
|
|
274
288
|
markReadyForReview(n: number): Promise<void>;
|
|
289
|
+
/**
|
|
290
|
+
* Turns an open pull request back into a draft: the GraphQL mutation convertPullRequestToDraft (REST cannot set
|
|
291
|
+
* `draft` either), same token. No-op when it is already a draft.
|
|
292
|
+
*/
|
|
293
|
+
convertToDraft(n: number): Promise<void>;
|
|
275
294
|
createPullRequest(input: {
|
|
276
295
|
title: string;
|
|
277
296
|
head: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ export * from './wcag';
|
|
|
10
10
|
export * from './validators';
|
|
11
11
|
export * from './id-map';
|
|
12
12
|
export * from './diff-engine';
|
|
13
|
+
export * from './token-merge';
|
|
14
|
+
export * from './token-combine';
|
|
15
|
+
export * from './css-overrides';
|
|
13
16
|
export * from './compose';
|
|
14
17
|
export * from './risk';
|
|
15
18
|
export * from './pr-composer';
|