uidex 0.10.0 → 0.11.1
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/cli/cli.cjs +3561 -3201
- package/dist/cli/cli.cjs.map +1 -1
- package/dist/headless/index.cjs.map +1 -1
- package/dist/headless/index.d.cts +36 -3
- package/dist/headless/index.d.ts +36 -3
- package/dist/headless/index.js.map +1 -1
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -3
- package/dist/index.d.ts +36 -3
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/playwright/index.cjs +23 -0
- package/dist/playwright/index.cjs.map +1 -1
- package/dist/playwright/index.d.cts +15 -1
- package/dist/playwright/index.d.ts +15 -1
- package/dist/playwright/index.js +22 -0
- package/dist/playwright/index.js.map +1 -1
- package/dist/playwright/reporter.cjs +19 -0
- package/dist/playwright/reporter.cjs.map +1 -1
- package/dist/playwright/reporter.js +19 -0
- package/dist/playwright/reporter.js.map +1 -1
- package/dist/react/index.cjs +4 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +36 -3
- package/dist/react/index.d.ts +36 -3
- package/dist/react/index.js +4 -1
- package/dist/react/index.js.map +1 -1
- package/dist/scan/index.cjs +666 -312
- package/dist/scan/index.cjs.map +1 -1
- package/dist/scan/index.d.cts +131 -63
- package/dist/scan/index.d.ts +131 -63
- package/dist/scan/index.js +666 -308
- package/dist/scan/index.js.map +1 -1
- package/package.json +3 -3
package/dist/scan/index.d.ts
CHANGED
|
@@ -34,19 +34,39 @@ interface StateDecl {
|
|
|
34
34
|
name: string;
|
|
35
35
|
/** Canonical kind for the state-matrix axis (defaults to `variant`). */
|
|
36
36
|
kind?: StateKind;
|
|
37
|
-
/**
|
|
38
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Acceptance criteria that only this state can evidence. Normalized into the
|
|
39
|
+
* same `{ id, rev, text }` regime as entity-level `acceptance` (one
|
|
40
|
+
* criterion-id namespace per entity), so per-state criteria are claimable by
|
|
41
|
+
* `uidexCovers` and visible to every acceptance gate.
|
|
42
|
+
*/
|
|
43
|
+
acceptance?: AcceptanceCriterion[];
|
|
39
44
|
description?: string;
|
|
40
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* A normalized acceptance criterion. Authored either as a bare string (sugar:
|
|
48
|
+
* `id` is a deterministic kebab slug of the text, `rev` is 1) or as an object
|
|
49
|
+
* `{ id, rev?, text }`; parse-time normalization means everything downstream —
|
|
50
|
+
* audit, scaffold, the devtools — always sees this object shape. `rev` is the
|
|
51
|
+
* pin flows cover against (`uidexCovers("entity", "id@rev")`): bumping it when
|
|
52
|
+
* the criterion's meaning changes is what makes outdated-coverage detectable.
|
|
53
|
+
*/
|
|
54
|
+
interface AcceptanceCriterion {
|
|
55
|
+
id: string;
|
|
56
|
+
rev: number;
|
|
57
|
+
text: string;
|
|
58
|
+
}
|
|
41
59
|
interface Metadata {
|
|
42
60
|
name?: string;
|
|
43
61
|
description?: string;
|
|
44
|
-
acceptance?:
|
|
62
|
+
acceptance?: AcceptanceCriterion[];
|
|
45
63
|
notes?: string;
|
|
46
64
|
composes?: EntityRef[];
|
|
47
65
|
flows?: readonly string[];
|
|
48
66
|
features?: string[];
|
|
49
67
|
widgets?: string[];
|
|
68
|
+
/** Page ids a feature declares it must be mounted on (feature kind only). */
|
|
69
|
+
surfaces?: string[];
|
|
50
70
|
/** Declared render states (see StateDecl); the capture-completeness gate. */
|
|
51
71
|
states?: StateDecl[];
|
|
52
72
|
/**
|
|
@@ -84,12 +104,25 @@ interface FlowStep {
|
|
|
84
104
|
entityId: string;
|
|
85
105
|
action?: string;
|
|
86
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* A per-criterion coverage claim a flow makes via
|
|
109
|
+
* `uidexCovers("<entityId>", "<criterionId>@<rev>")`. The rev is REQUIRED at
|
|
110
|
+
* the claim site — a rev-less claim could never go stale, which would defeat
|
|
111
|
+
* the outdated-detection the pin exists for.
|
|
112
|
+
*/
|
|
113
|
+
interface FlowCover {
|
|
114
|
+
entity: string;
|
|
115
|
+
criterion: string;
|
|
116
|
+
rev: number;
|
|
117
|
+
}
|
|
87
118
|
interface Flow {
|
|
88
119
|
kind: "flow";
|
|
89
120
|
id: string;
|
|
90
121
|
loc: Location;
|
|
91
122
|
touches: string[];
|
|
92
123
|
steps: FlowStep[];
|
|
124
|
+
/** Acceptance-criterion coverage claims made inside this flow's describe. */
|
|
125
|
+
covers?: FlowCover[];
|
|
93
126
|
}
|
|
94
127
|
interface Page extends EntityWithMetaBase {
|
|
95
128
|
kind: "page";
|
|
@@ -178,6 +211,14 @@ interface AuditConfig {
|
|
|
178
211
|
scopeLeak?: boolean;
|
|
179
212
|
coverage?: boolean;
|
|
180
213
|
acceptance?: boolean;
|
|
214
|
+
/** Feature `surfaces` mount verification (default on; only fires when a feature declares `surfaces`). */
|
|
215
|
+
surfaces?: boolean;
|
|
216
|
+
/**
|
|
217
|
+
* Require every feature to declare at least one acceptance criterion
|
|
218
|
+
* (default ON — a bare `uidex.feature.ts` is a warning, escalatable to
|
|
219
|
+
* error via `severity` or disabled with `requireAcceptance: false`).
|
|
220
|
+
*/
|
|
221
|
+
requireAcceptance?: boolean;
|
|
181
222
|
/** State-capture completeness gate (default on when a manifest is present). */
|
|
182
223
|
states?: boolean;
|
|
183
224
|
/** Page-capture coverage gate (default on when a manifest is present). */
|
|
@@ -194,12 +235,22 @@ interface AuditConfig {
|
|
|
194
235
|
*/
|
|
195
236
|
severity?: Record<string, DiagnosticSeverity | "off">;
|
|
196
237
|
}
|
|
238
|
+
/** Declared module-resolution hints for the import-graph checks. */
|
|
239
|
+
interface ResolveConfig {
|
|
240
|
+
/**
|
|
241
|
+
* Specifier-prefix → config-dir-relative path-prefix aliases
|
|
242
|
+
* (e.g. `{ "@/": "src/" }`). Longest matching prefix wins. When declared,
|
|
243
|
+
* these replace the scanner's zero-config `@/` / `~/` → `src/` fallback.
|
|
244
|
+
*/
|
|
245
|
+
aliases: Record<string, string>;
|
|
246
|
+
}
|
|
197
247
|
interface UidexConfig {
|
|
198
248
|
$schema?: string;
|
|
199
249
|
sources: SourceConfig[];
|
|
200
250
|
exclude?: string[];
|
|
201
251
|
output: string;
|
|
202
252
|
flows?: string[];
|
|
253
|
+
resolve?: ResolveConfig;
|
|
203
254
|
audit?: AuditConfig;
|
|
204
255
|
conventions?: ConventionsConfig;
|
|
205
256
|
/**
|
|
@@ -263,7 +314,8 @@ interface MetadataExport {
|
|
|
263
314
|
kind: MetadataExportKind;
|
|
264
315
|
id: string | false;
|
|
265
316
|
name?: string;
|
|
266
|
-
|
|
317
|
+
/** Entity-level criteria, normalized at parse time (string sugar → object). */
|
|
318
|
+
acceptance?: AcceptanceCriterion[];
|
|
267
319
|
description?: string;
|
|
268
320
|
features?: string[];
|
|
269
321
|
widgets?: string[];
|
|
@@ -288,17 +340,14 @@ interface MetadataExport {
|
|
|
288
340
|
featureSpans?: Span[];
|
|
289
341
|
/** Spans of the string-literal items in `widgets`, parallel to `widgets`. */
|
|
290
342
|
widgetSpans?: Span[];
|
|
343
|
+
/** Declared surface page ids (feature kind only). */
|
|
344
|
+
surfaces?: string[];
|
|
345
|
+
/** Spans of the string-literal items in `surfaces`, parallel to `surfaces`. */
|
|
346
|
+
surfaceSpans?: Span[];
|
|
291
347
|
/** Declared render states (page/feature/widget); see ParsedState. */
|
|
292
348
|
states?: ParsedState[];
|
|
293
349
|
/** Scope (`"*"` | core kind) → typed acknowledgment. See `acknowledge.ts`. */
|
|
294
350
|
acknowledge?: Record<string, ParsedAcknowledgment>;
|
|
295
|
-
/**
|
|
296
|
-
* REMOVED fields, parsed only so the `acknowledge` codemod can rewrite them.
|
|
297
|
-
* No gate reads these — an unmigrated declaration is an error with a fix
|
|
298
|
-
* attached, never a silently different meaning.
|
|
299
|
-
*/
|
|
300
|
-
legacyCapture?: boolean;
|
|
301
|
-
legacyWaivers?: Record<string, string>;
|
|
302
351
|
}
|
|
303
352
|
/** A parsed `acknowledge` entry from `export const uidex`. */
|
|
304
353
|
interface ParsedAcknowledgment {
|
|
@@ -314,7 +363,8 @@ interface ParsedState {
|
|
|
314
363
|
name: string;
|
|
315
364
|
/** Canonical kind: loading | empty | populated | error | variant. */
|
|
316
365
|
kind?: string;
|
|
317
|
-
acceptance
|
|
366
|
+
/** Per-state criteria, normalized like entity-level `acceptance`. */
|
|
367
|
+
acceptance?: AcceptanceCriterion[];
|
|
318
368
|
description?: string;
|
|
319
369
|
/** Span of the state's name string literal. */
|
|
320
370
|
nameSpan?: Span;
|
|
@@ -331,16 +381,23 @@ interface LandmarkFact {
|
|
|
331
381
|
tag: string;
|
|
332
382
|
line: number;
|
|
333
383
|
}
|
|
334
|
-
/**
|
|
384
|
+
/** An import binding (import / export-from / dynamic `import()`). */
|
|
335
385
|
interface ImportFact {
|
|
336
386
|
specifier: string;
|
|
337
387
|
line: number;
|
|
338
|
-
/** span of the whole import/export statement */
|
|
388
|
+
/** span of the whole import/export statement (or the import() expression) */
|
|
339
389
|
span: Span;
|
|
340
390
|
/** `import type` or an export-from with type-only kind */
|
|
341
391
|
isTypeOnly: boolean;
|
|
342
392
|
/** imported local binding names (default + named + namespace) */
|
|
343
393
|
names: string[];
|
|
394
|
+
/**
|
|
395
|
+
* A dynamic `import("literal")` expression. Dynamic facts are real runtime
|
|
396
|
+
* edges (React.lazy is a mount edge) so the surfaces reach-check uses them,
|
|
397
|
+
* but the scope-leak check skips them — it is about static module
|
|
398
|
+
* dependency structure, which a dynamic import doesn't declare.
|
|
399
|
+
*/
|
|
400
|
+
dynamic?: true;
|
|
344
401
|
}
|
|
345
402
|
/** An interactive host element (`button`, `a`, …) with no data-uidex* attribute. */
|
|
346
403
|
interface InteractiveElementFact {
|
|
@@ -367,6 +424,18 @@ interface FlowCallFact {
|
|
|
367
424
|
interface DynamicFlowCallFact {
|
|
368
425
|
line: number;
|
|
369
426
|
}
|
|
427
|
+
/**
|
|
428
|
+
* A parsed `uidexCovers("<entityId>", "<criterionId>@<rev>")` claim inside a
|
|
429
|
+
* tagged flow describe. The rev is REQUIRED at the claim site (parse
|
|
430
|
+
* diagnostic `covers-missing-rev` otherwise) — rev-pinning is what makes
|
|
431
|
+
* outdated-coverage detection possible.
|
|
432
|
+
*/
|
|
433
|
+
interface FlowCoverFact {
|
|
434
|
+
entity: string;
|
|
435
|
+
criterion: string;
|
|
436
|
+
rev: number;
|
|
437
|
+
line: number;
|
|
438
|
+
}
|
|
370
439
|
/** A tagged `test.describe(..., { tag: "@uidex:flow" }, ...)` occurrence. */
|
|
371
440
|
interface FlowFact {
|
|
372
441
|
title: string;
|
|
@@ -374,6 +443,8 @@ interface FlowFact {
|
|
|
374
443
|
calls: FlowCallFact[];
|
|
375
444
|
/** uidex() calls inside this describe whose ids could not be resolved */
|
|
376
445
|
dynamicCalls?: DynamicFlowCallFact[];
|
|
446
|
+
/** uidexCovers() acceptance-coverage claims inside this describe */
|
|
447
|
+
covers?: FlowCoverFact[];
|
|
377
448
|
}
|
|
378
449
|
interface ExtractedFile {
|
|
379
450
|
file: ScannedFile;
|
|
@@ -381,6 +452,8 @@ interface ExtractedFile {
|
|
|
381
452
|
metadata?: MetadataExport[];
|
|
382
453
|
diagnostics?: Diagnostic[];
|
|
383
454
|
flows?: FlowFact[];
|
|
455
|
+
/** true when the file contains any JSX element or fragment */
|
|
456
|
+
hasJsx?: boolean;
|
|
384
457
|
dynamicAttrs?: DynamicAttrFact[];
|
|
385
458
|
unannotatedInteractive?: InteractiveElementFact[];
|
|
386
459
|
landmarks?: LandmarkFact[];
|
|
@@ -589,11 +662,6 @@ interface CoverageBaseline {
|
|
|
589
662
|
/** route pattern → scope → acknowledgment (always `type: "backlog"`). */
|
|
590
663
|
acknowledge: Record<string, AcknowledgeMap>;
|
|
591
664
|
}
|
|
592
|
-
/** The pre-`acknowledge` baseline shape, recognized only to migrate it. */
|
|
593
|
-
interface LegacyCoverageBaseline {
|
|
594
|
-
uncapturedPages?: string[];
|
|
595
|
-
missingKinds?: Record<string, string[]>;
|
|
596
|
-
}
|
|
597
665
|
/**
|
|
598
666
|
* The acknowledgments in force for one ROUTE: the baseline's entry for the route
|
|
599
667
|
* layered UNDER the page's own `acknowledge`. Source wins — a human statement
|
|
@@ -614,10 +682,6 @@ declare function entityAcknowledge(meta: Metadata | undefined, capturedElsewhere
|
|
|
614
682
|
* re-appears as an unacknowledged gap the gate reports.
|
|
615
683
|
*/
|
|
616
684
|
declare function parseCoverageBaseline(raw: unknown): CoverageBaseline | null;
|
|
617
|
-
/** Whether a parsed baseline JSON is the pre-`acknowledge` shape. */
|
|
618
|
-
declare function isLegacyBaseline(raw: unknown): raw is LegacyCoverageBaseline;
|
|
619
|
-
/** Convert the pre-`acknowledge` baseline shape to v2. Pure; no I/O. */
|
|
620
|
-
declare function migrateBaseline(legacy: LegacyCoverageBaseline): CoverageBaseline;
|
|
621
685
|
/** Serialize a baseline with stable key order, so its diff is reviewable. */
|
|
622
686
|
declare function serializeCoverageBaseline(baseline: CoverageBaseline): string;
|
|
623
687
|
|
|
@@ -757,8 +821,6 @@ interface AuditOptions {
|
|
|
757
821
|
capturedStates?: CapturedStatesManifest;
|
|
758
822
|
/** Coverage baseline (the shrink-only `acknowledge` backlog). */
|
|
759
823
|
coverageBaseline?: CoverageBaseline;
|
|
760
|
-
/** Migration diagnostic when the baseline on disk is the removed shape. */
|
|
761
|
-
baselineDiagnostic?: Diagnostic;
|
|
762
824
|
/** The resolved workspace; enables `captured-elsewhere`. */
|
|
763
825
|
workspace?: Workspace;
|
|
764
826
|
}
|
|
@@ -871,17 +933,8 @@ interface RunScanOptions {
|
|
|
871
933
|
/** Workspace override; skips auto-detection (used by tests). */
|
|
872
934
|
workspace?: Workspace;
|
|
873
935
|
}
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
/** Present when the file on disk is the pre-`acknowledge` shape. */
|
|
877
|
-
legacy?: Diagnostic;
|
|
878
|
-
}
|
|
879
|
-
/**
|
|
880
|
-
* Load the coverage baseline from disk. A file in the REMOVED shape does not
|
|
881
|
-
* silently read as "no baseline" — that would turn every acknowledged-backlog
|
|
882
|
-
* route into a hard error — it comes back as a migration diagnostic with a fix.
|
|
883
|
-
*/
|
|
884
|
-
declare function loadCoverageBaseline(configDir: string, config: UidexConfig): LoadedBaseline;
|
|
936
|
+
/** Load the coverage baseline from disk, if present + well-formed. */
|
|
937
|
+
declare function loadCoverageBaseline(configDir: string, config: UidexConfig): CoverageBaseline | undefined;
|
|
885
938
|
/** One generated artifact: its bytes plus where it lands (abs + repo-relative). */
|
|
886
939
|
interface ScanArtifact {
|
|
887
940
|
generated: string;
|
|
@@ -963,24 +1016,6 @@ declare function computeMatrixBacklog(registry: Registry, manifest: CapturedStat
|
|
|
963
1016
|
|
|
964
1017
|
declare function checkComponentCoverage(registry: Registry, manifest: CapturedStatesManifest): Diagnostic[];
|
|
965
1018
|
|
|
966
|
-
/**
|
|
967
|
-
* Migration diagnostics for one file's `export const uidex` blocks. Emitted as
|
|
968
|
-
* errors: the fields are gone, so the declaration means nothing until rewritten.
|
|
969
|
-
*/
|
|
970
|
-
declare function migrateLegacyFields(ef: ExtractedFile): Diagnostic[];
|
|
971
|
-
/**
|
|
972
|
-
* Migration diagnostic for a pre-`acknowledge` coverage baseline. The whole file
|
|
973
|
-
* is replaced, which is safe because the baseline is a generated artifact: the
|
|
974
|
-
* same content `--update-baseline` would produce, just without needing a capture
|
|
975
|
-
* run to regenerate it.
|
|
976
|
-
*/
|
|
977
|
-
declare function migrateLegacyBaseline(opts: {
|
|
978
|
-
path: string;
|
|
979
|
-
raw: string;
|
|
980
|
-
parsed: unknown;
|
|
981
|
-
displayPath: string;
|
|
982
|
-
}): Diagnostic | undefined;
|
|
983
|
-
|
|
984
1019
|
/**
|
|
985
1020
|
* Fold a PARTIAL capture manifest into the committed one.
|
|
986
1021
|
*
|
|
@@ -1013,10 +1048,12 @@ declare class ConfigError extends Error {
|
|
|
1013
1048
|
* validates against, so a typo'd key fails loudly instead of silently leaving
|
|
1014
1049
|
* the gate it was meant to govern at its default severity.
|
|
1015
1050
|
*
|
|
1016
|
-
* Keep in sync when adding a diagnostic; `severity-codes.test.ts`
|
|
1017
|
-
* set matches the codes actually emitted by the source
|
|
1051
|
+
* Keep in sync when adding a diagnostic; `tests/scan/severity-codes.test.ts`
|
|
1052
|
+
* asserts this set matches the codes actually emitted by the source — a code
|
|
1053
|
+
* missing here cannot be softened/disabled by any repo (validateConfig
|
|
1054
|
+
* rejects unknown `audit.severity` keys).
|
|
1018
1055
|
*/
|
|
1019
|
-
declare const DIAGNOSTIC_CODES: readonly ["acceptance-uncovered", "acknowledged-elsewhere", "competing-uidex-export", "component-state-uncaptured", "core-kind", "duplicate-id", "dynamic-attr", "dynamic-flow-reference", "
|
|
1056
|
+
declare const DIAGNOSTIC_CODES: readonly ["acceptance-ambiguous", "acceptance-duplicate-id", "acceptance-orphaned", "acceptance-outdated", "acceptance-uncovered", "acknowledged-elsewhere", "competing-uidex-export", "component-state-uncaptured", "core-kind", "covers-missing-rev", "duplicate-id", "dynamic-attr", "dynamic-flow-reference", "feature-missing-acceptance", "feature-surface-uncaptured", "feature-surface-unreferenced", "gen-missing", "gen-stale", "matrix-backlog", "missing-element-annotation", "missing-state-capture", "orphan-state-capture", "page-backlog", "page-captured", "page-no-capture", "parse-error", "placeholder-reason", "prefer-well-known-file", "rename", "scope-leak", "spread-attr", "stale-acknowledgment", "stale-page-baseline", "uidex-export-ambiguous-kind", "uidex-export-duplicate-field", "uidex-export-duplicate-state", "uidex-export-empty-name", "uidex-export-invalid-field", "uidex-export-invalid-literal", "uidex-export-missing-kind", "uidex-export-satisfies-mismatch", "uidex-export-unknown-field", "unknown-reference", "widget-id-mismatch", "widget-missing-acceptance", "widget-missing-dom"];
|
|
1020
1057
|
declare function validateConfig(raw: unknown): UidexConfig;
|
|
1021
1058
|
declare function parseConfig(json: string): UidexConfig;
|
|
1022
1059
|
declare const DEFAULT_CONVENTIONS: Required<Pick<NonNullable<UidexConfig["conventions"]>, "primitives" | "features" | "pages" | "flows" | "regions">>;
|
|
@@ -1104,11 +1141,25 @@ declare function run(opts: CliOptions): Promise<CliResult>;
|
|
|
1104
1141
|
declare namespace Uidex {
|
|
1105
1142
|
type CoreStateKind = "loading" | "empty" | "populated" | "error";
|
|
1106
1143
|
type StateKind = CoreStateKind | "variant";
|
|
1144
|
+
/**
|
|
1145
|
+
* An acceptance criterion as authored. A bare string is sugar: its `id`
|
|
1146
|
+
* becomes a deterministic kebab slug of the text and `rev` defaults to 1.
|
|
1147
|
+
* The object form pins an explicit `id` (stable across copy edits) and an
|
|
1148
|
+
* optional `rev` (bump it when the criterion's meaning changes so flow
|
|
1149
|
+
* coverage pinned to the old rev surfaces as outdated).
|
|
1150
|
+
*/
|
|
1151
|
+
interface AcceptanceCriterion {
|
|
1152
|
+
id: string;
|
|
1153
|
+
rev?: number;
|
|
1154
|
+
text: string;
|
|
1155
|
+
}
|
|
1156
|
+
type Acceptance = readonly (string | AcceptanceCriterion)[];
|
|
1107
1157
|
/** A declared render state, as authored in `states: [{ name, ... }]`. */
|
|
1108
1158
|
interface State {
|
|
1109
1159
|
name: string;
|
|
1110
1160
|
kind?: StateKind;
|
|
1111
|
-
|
|
1161
|
+
/** Per-state criteria; same authoring sugar as entity-level `acceptance`. */
|
|
1162
|
+
acceptance?: Acceptance;
|
|
1112
1163
|
description?: string;
|
|
1113
1164
|
}
|
|
1114
1165
|
/** Scope of an acknowledgment: one core kind, or the whole entity. */
|
|
@@ -1134,16 +1185,28 @@ declare namespace Uidex {
|
|
|
1134
1185
|
name?: string;
|
|
1135
1186
|
features?: readonly FeatureIds[];
|
|
1136
1187
|
widgets?: readonly WidgetIds[];
|
|
1137
|
-
acceptance?:
|
|
1188
|
+
acceptance?: Acceptance;
|
|
1138
1189
|
states?: readonly (string | State)[];
|
|
1139
1190
|
acknowledge?: Acknowledge;
|
|
1140
1191
|
description?: string;
|
|
1141
1192
|
}
|
|
1142
|
-
interface Feature<FeatureIds extends string = string> {
|
|
1193
|
+
interface Feature<FeatureIds extends string = string, PageIds extends string = string> {
|
|
1143
1194
|
feature: FeatureIds | false;
|
|
1144
1195
|
name?: string;
|
|
1145
1196
|
features?: readonly FeatureIds[];
|
|
1146
|
-
|
|
1197
|
+
/**
|
|
1198
|
+
* Pages this feature MUST be mounted on. Each id is verified by the audit
|
|
1199
|
+
* in two halves: the page must exist and its import closure must reference
|
|
1200
|
+
* a component file in the feature's directory (the static
|
|
1201
|
+
* `feature-surface-unreferenced` tripwire), and — when a captured-states
|
|
1202
|
+
* manifest is present — a capture must have rendered the feature on the
|
|
1203
|
+
* page's route (`feature-surface-uncaptured`, the runtime evidence). This
|
|
1204
|
+
* is how a cross-cutting feature (a gate editor, a share panel) states
|
|
1205
|
+
* "every one of these editors owes me a mount" and a forgotten mount fails
|
|
1206
|
+
* the scan instead of shipping.
|
|
1207
|
+
*/
|
|
1208
|
+
surfaces?: readonly PageIds[];
|
|
1209
|
+
acceptance?: Acceptance;
|
|
1147
1210
|
states?: readonly (string | State)[];
|
|
1148
1211
|
acknowledge?: ComponentAcknowledge;
|
|
1149
1212
|
description?: string;
|
|
@@ -1156,11 +1219,16 @@ declare namespace Uidex {
|
|
|
1156
1219
|
interface Widget<WidgetIds extends string = string> {
|
|
1157
1220
|
widget: WidgetIds;
|
|
1158
1221
|
name?: string;
|
|
1159
|
-
acceptance?:
|
|
1222
|
+
acceptance?: Acceptance;
|
|
1160
1223
|
states?: readonly (string | State)[];
|
|
1161
1224
|
acknowledge?: ComponentAcknowledge;
|
|
1162
1225
|
description?: string;
|
|
1163
1226
|
}
|
|
1227
|
+
interface Region<RegionIds extends string = string> {
|
|
1228
|
+
region: RegionIds | false;
|
|
1229
|
+
name?: string;
|
|
1230
|
+
description?: string;
|
|
1231
|
+
}
|
|
1164
1232
|
interface Flow<FlowIds extends string = string> {
|
|
1165
1233
|
flow: FlowIds;
|
|
1166
1234
|
name?: string;
|
|
@@ -1171,4 +1239,4 @@ declare namespace Uidex {
|
|
|
1171
1239
|
}
|
|
1172
1240
|
}
|
|
1173
1241
|
|
|
1174
|
-
export { ACK_ALL, ACK_SCOPES, type AcknowledgeMap, type AcknowledgeOrigin, type AcknowledgeType, type Acknowledgment, type Annotation, type AnnotationKind, type AppliedFix, type ApplyFixesResult, type AuditConfig, type AuditSummary, CONFIG_FILENAME, type CapturedState, type CapturedStatesManifest, type CliOptions, type CliResult, ConfigError, type ConventionsConfig, type CoverageBaseline, DEFAULT_CONVENTIONS, DIAGNOSTIC_CODES, type DetectedRoute, type Diagnostic, type DiagnosticFix, type DiagnosticSeverity, type DiscoveredConfig, type ExtractedFile, type FixEdit, type GitContext, type ImportFact, type LandmarkFact, type MergeResult, type MetadataExport, type MetadataExportKind, type ParsedAcknowledgment, type ParsedState, type RenameKind, type RenameOptions, type RenameResult, type ResolvedAcknowledgment, type RunScanOptions, type ScaffoldKind, type ScaffoldOptions, type ScaffoldResult, type ScaffoldSpecOptions, type ScanResult, type ScannedFile, type SourceConfig, type Span, type StateCoverageOptions, Uidex, type UidexConfig, type Workspace, type WorkspaceApp, applyFixes, audit, capturedElsewhere, checkComponentCoverage, checkPageCoverage, checkStateCoverage, checkStateMatrix, compileRoute, computeMatrixBacklog, computePageBacklog, coverageBaselinePath, detectRoutes, discover, emit, entityAcknowledge, extract, extractUidexExports, findWorkspaceRoot, globToRegExp,
|
|
1242
|
+
export { ACK_ALL, ACK_SCOPES, type AcknowledgeMap, type AcknowledgeOrigin, type AcknowledgeType, type Acknowledgment, type Annotation, type AnnotationKind, type AppliedFix, type ApplyFixesResult, type AuditConfig, type AuditSummary, CONFIG_FILENAME, type CapturedState, type CapturedStatesManifest, type CliOptions, type CliResult, ConfigError, type ConventionsConfig, type CoverageBaseline, DEFAULT_CONVENTIONS, DIAGNOSTIC_CODES, type DetectedRoute, type Diagnostic, type DiagnosticFix, type DiagnosticSeverity, type DiscoveredConfig, type ExtractedFile, type FixEdit, type GitContext, type ImportFact, type LandmarkFact, type MergeResult, type MetadataExport, type MetadataExportKind, type ParsedAcknowledgment, type ParsedState, type RenameKind, type RenameOptions, type RenameResult, type ResolvedAcknowledgment, type RunScanOptions, type ScaffoldKind, type ScaffoldOptions, type ScaffoldResult, type ScaffoldSpecOptions, type ScanResult, type ScannedFile, type SourceConfig, type Span, type StateCoverageOptions, Uidex, type UidexConfig, type Workspace, type WorkspaceApp, applyFixes, audit, capturedElsewhere, checkComponentCoverage, checkPageCoverage, checkStateCoverage, checkStateMatrix, compileRoute, computeMatrixBacklog, computePageBacklog, coverageBaselinePath, detectRoutes, discover, emit, entityAcknowledge, extract, extractUidexExports, findWorkspaceRoot, globToRegExp, loadCoverageBaseline, matchUrlToRoute, mergeStates, parseConfig, parseCoverageBaseline, pathToId, renameEntity, resolve, resolveGitContext, resolveWorkspace, routeAcknowledge, run as runCli, runScan, scaffoldSpec, scaffoldWidgetSpec, serializeCoverageBaseline, validateConfig, walk, writeScanResult };
|