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/react/index.d.cts
CHANGED
|
@@ -37,19 +37,39 @@ interface StateDecl {
|
|
|
37
37
|
name: string;
|
|
38
38
|
/** Canonical kind for the state-matrix axis (defaults to `variant`). */
|
|
39
39
|
kind?: StateKind;
|
|
40
|
-
/**
|
|
41
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Acceptance criteria that only this state can evidence. Normalized into the
|
|
42
|
+
* same `{ id, rev, text }` regime as entity-level `acceptance` (one
|
|
43
|
+
* criterion-id namespace per entity), so per-state criteria are claimable by
|
|
44
|
+
* `uidexCovers` and visible to every acceptance gate.
|
|
45
|
+
*/
|
|
46
|
+
acceptance?: AcceptanceCriterion[];
|
|
42
47
|
description?: string;
|
|
43
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* A normalized acceptance criterion. Authored either as a bare string (sugar:
|
|
51
|
+
* `id` is a deterministic kebab slug of the text, `rev` is 1) or as an object
|
|
52
|
+
* `{ id, rev?, text }`; parse-time normalization means everything downstream —
|
|
53
|
+
* audit, scaffold, the devtools — always sees this object shape. `rev` is the
|
|
54
|
+
* pin flows cover against (`uidexCovers("entity", "id@rev")`): bumping it when
|
|
55
|
+
* the criterion's meaning changes is what makes outdated-coverage detectable.
|
|
56
|
+
*/
|
|
57
|
+
interface AcceptanceCriterion {
|
|
58
|
+
id: string;
|
|
59
|
+
rev: number;
|
|
60
|
+
text: string;
|
|
61
|
+
}
|
|
44
62
|
interface Metadata {
|
|
45
63
|
name?: string;
|
|
46
64
|
description?: string;
|
|
47
|
-
acceptance?:
|
|
65
|
+
acceptance?: AcceptanceCriterion[];
|
|
48
66
|
notes?: string;
|
|
49
67
|
composes?: EntityRef[];
|
|
50
68
|
flows?: readonly string[];
|
|
51
69
|
features?: string[];
|
|
52
70
|
widgets?: string[];
|
|
71
|
+
/** Page ids a feature declares it must be mounted on (feature kind only). */
|
|
72
|
+
surfaces?: string[];
|
|
53
73
|
/** Declared render states (see StateDecl); the capture-completeness gate. */
|
|
54
74
|
states?: StateDecl[];
|
|
55
75
|
/**
|
|
@@ -87,12 +107,25 @@ interface FlowStep {
|
|
|
87
107
|
entityId: string;
|
|
88
108
|
action?: string;
|
|
89
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* A per-criterion coverage claim a flow makes via
|
|
112
|
+
* `uidexCovers("<entityId>", "<criterionId>@<rev>")`. The rev is REQUIRED at
|
|
113
|
+
* the claim site — a rev-less claim could never go stale, which would defeat
|
|
114
|
+
* the outdated-detection the pin exists for.
|
|
115
|
+
*/
|
|
116
|
+
interface FlowCover {
|
|
117
|
+
entity: string;
|
|
118
|
+
criterion: string;
|
|
119
|
+
rev: number;
|
|
120
|
+
}
|
|
90
121
|
interface Flow {
|
|
91
122
|
kind: "flow";
|
|
92
123
|
id: string;
|
|
93
124
|
loc: Location;
|
|
94
125
|
touches: string[];
|
|
95
126
|
steps: FlowStep[];
|
|
127
|
+
/** Acceptance-criterion coverage claims made inside this flow's describe. */
|
|
128
|
+
covers?: FlowCover[];
|
|
96
129
|
}
|
|
97
130
|
interface Page extends EntityWithMetaBase {
|
|
98
131
|
kind: "page";
|
package/dist/react/index.d.ts
CHANGED
|
@@ -37,19 +37,39 @@ interface StateDecl {
|
|
|
37
37
|
name: string;
|
|
38
38
|
/** Canonical kind for the state-matrix axis (defaults to `variant`). */
|
|
39
39
|
kind?: StateKind;
|
|
40
|
-
/**
|
|
41
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Acceptance criteria that only this state can evidence. Normalized into the
|
|
42
|
+
* same `{ id, rev, text }` regime as entity-level `acceptance` (one
|
|
43
|
+
* criterion-id namespace per entity), so per-state criteria are claimable by
|
|
44
|
+
* `uidexCovers` and visible to every acceptance gate.
|
|
45
|
+
*/
|
|
46
|
+
acceptance?: AcceptanceCriterion[];
|
|
42
47
|
description?: string;
|
|
43
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* A normalized acceptance criterion. Authored either as a bare string (sugar:
|
|
51
|
+
* `id` is a deterministic kebab slug of the text, `rev` is 1) or as an object
|
|
52
|
+
* `{ id, rev?, text }`; parse-time normalization means everything downstream —
|
|
53
|
+
* audit, scaffold, the devtools — always sees this object shape. `rev` is the
|
|
54
|
+
* pin flows cover against (`uidexCovers("entity", "id@rev")`): bumping it when
|
|
55
|
+
* the criterion's meaning changes is what makes outdated-coverage detectable.
|
|
56
|
+
*/
|
|
57
|
+
interface AcceptanceCriterion {
|
|
58
|
+
id: string;
|
|
59
|
+
rev: number;
|
|
60
|
+
text: string;
|
|
61
|
+
}
|
|
44
62
|
interface Metadata {
|
|
45
63
|
name?: string;
|
|
46
64
|
description?: string;
|
|
47
|
-
acceptance?:
|
|
65
|
+
acceptance?: AcceptanceCriterion[];
|
|
48
66
|
notes?: string;
|
|
49
67
|
composes?: EntityRef[];
|
|
50
68
|
flows?: readonly string[];
|
|
51
69
|
features?: string[];
|
|
52
70
|
widgets?: string[];
|
|
71
|
+
/** Page ids a feature declares it must be mounted on (feature kind only). */
|
|
72
|
+
surfaces?: string[];
|
|
53
73
|
/** Declared render states (see StateDecl); the capture-completeness gate. */
|
|
54
74
|
states?: StateDecl[];
|
|
55
75
|
/**
|
|
@@ -87,12 +107,25 @@ interface FlowStep {
|
|
|
87
107
|
entityId: string;
|
|
88
108
|
action?: string;
|
|
89
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* A per-criterion coverage claim a flow makes via
|
|
112
|
+
* `uidexCovers("<entityId>", "<criterionId>@<rev>")`. The rev is REQUIRED at
|
|
113
|
+
* the claim site — a rev-less claim could never go stale, which would defeat
|
|
114
|
+
* the outdated-detection the pin exists for.
|
|
115
|
+
*/
|
|
116
|
+
interface FlowCover {
|
|
117
|
+
entity: string;
|
|
118
|
+
criterion: string;
|
|
119
|
+
rev: number;
|
|
120
|
+
}
|
|
90
121
|
interface Flow {
|
|
91
122
|
kind: "flow";
|
|
92
123
|
id: string;
|
|
93
124
|
loc: Location;
|
|
94
125
|
touches: string[];
|
|
95
126
|
steps: FlowStep[];
|
|
127
|
+
/** Acceptance-criterion coverage claims made inside this flow's describe. */
|
|
128
|
+
covers?: FlowCover[];
|
|
96
129
|
}
|
|
97
130
|
interface Page extends EntityWithMetaBase {
|
|
98
131
|
kind: "page";
|
package/dist/react/index.js
CHANGED
|
@@ -7335,7 +7335,10 @@ function createEntityDetailView(config) {
|
|
|
7335
7335
|
sections.push({ id: "description", text: meta.description });
|
|
7336
7336
|
}
|
|
7337
7337
|
if (offerAcceptance && meta?.acceptance?.length) {
|
|
7338
|
-
sections.push({
|
|
7338
|
+
sections.push({
|
|
7339
|
+
id: "acceptance",
|
|
7340
|
+
items: meta.acceptance.map((c) => c.text)
|
|
7341
|
+
});
|
|
7339
7342
|
}
|
|
7340
7343
|
if (entity) {
|
|
7341
7344
|
for (const s of config.extraSections?.(ctx, entity) ?? []) {
|