uidex 0.9.0 → 0.11.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/dist/cli/cli.cjs +4117 -2902
- package/dist/cli/cli.cjs.map +1 -1
- package/dist/headless/index.cjs +3 -0
- package/dist/headless/index.cjs.map +1 -1
- package/dist/headless/index.d.cts +55 -16
- package/dist/headless/index.d.ts +55 -16
- package/dist/headless/index.js +3 -0
- package/dist/headless/index.js.map +1 -1
- package/dist/index.cjs +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +55 -16
- package/dist/index.d.ts +55 -16
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/playwright/index.cjs +40 -7
- 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 +39 -7
- package/dist/playwright/index.js.map +1 -1
- package/dist/playwright/states-reporter.cjs +36 -7
- package/dist/playwright/states-reporter.cjs.map +1 -1
- package/dist/playwright/states-reporter.d.cts +15 -0
- package/dist/playwright/states-reporter.d.ts +15 -0
- package/dist/playwright/states-reporter.js +36 -7
- package/dist/playwright/states-reporter.js.map +1 -1
- package/dist/playwright/states.cjs +8 -0
- package/dist/playwright/states.cjs.map +1 -1
- package/dist/playwright/states.d.cts +44 -1
- package/dist/playwright/states.d.ts +44 -1
- package/dist/playwright/states.js +7 -0
- package/dist/playwright/states.js.map +1 -1
- package/dist/react/index.cjs +7 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +55 -16
- package/dist/react/index.d.ts +55 -16
- package/dist/react/index.js +7 -1
- package/dist/react/index.js.map +1 -1
- package/dist/scan/index.cjs +1533 -294
- package/dist/scan/index.cjs.map +1 -1
- package/dist/scan/index.d.cts +459 -112
- package/dist/scan/index.d.ts +459 -112
- package/dist/scan/index.js +1517 -290
- package/dist/scan/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -15,8 +15,8 @@ interface EntityRef {
|
|
|
15
15
|
/**
|
|
16
16
|
* The four kinds every captured route is expected to render — the state-matrix
|
|
17
17
|
* axis. A capture that only shoots the happy path leaves most of the value on
|
|
18
|
-
* the table, so a missing core kind must be captured
|
|
19
|
-
*
|
|
18
|
+
* the table, so a missing core kind must be captured or ACKNOWLEDGED (see
|
|
19
|
+
* `Metadata.acknowledge`).
|
|
20
20
|
*/
|
|
21
21
|
declare const CORE_STATE_KINDS: readonly ["loading", "empty", "populated", "error"];
|
|
22
22
|
type CoreStateKind = (typeof CORE_STATE_KINDS)[number];
|
|
@@ -34,34 +34,60 @@ 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
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
73
|
+
* The ONE way to say "don't complain about this gap": scope → typed reason.
|
|
74
|
+
*
|
|
75
|
+
* - scope `"*"` covers the whole entity (a redirect page that can never be
|
|
76
|
+
* captured, a component whose states are not gated here);
|
|
77
|
+
* - a core-kind scope covers that one cell of this page's route matrix.
|
|
78
|
+
*
|
|
79
|
+
* `type: "impossible"` is a permanent design statement and needs a `reason`;
|
|
80
|
+
* `type: "backlog"` is debt and does not. Keeping both as values of one field
|
|
81
|
+
* is what makes mislabeling debt as impossible a visible, reviewable edit.
|
|
82
|
+
* `captured-elsewhere` is computed by the workspace and never authored here.
|
|
56
83
|
*/
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
waivers?: Partial<Record<CoreStateKind, string>>;
|
|
84
|
+
acknowledge?: Partial<Record<AcknowledgeScope, MetaAcknowledgment>>;
|
|
85
|
+
}
|
|
86
|
+
/** Scope of an acknowledgment: one core kind, or the whole entity. */
|
|
87
|
+
type AcknowledgeScope = CoreStateKind | "*";
|
|
88
|
+
interface MetaAcknowledgment {
|
|
89
|
+
type: "impossible" | "backlog";
|
|
90
|
+
reason?: string;
|
|
65
91
|
}
|
|
66
92
|
interface EntityWithMetaBase {
|
|
67
93
|
id: string;
|
|
@@ -78,12 +104,25 @@ interface FlowStep {
|
|
|
78
104
|
entityId: string;
|
|
79
105
|
action?: string;
|
|
80
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
|
+
}
|
|
81
118
|
interface Flow {
|
|
82
119
|
kind: "flow";
|
|
83
120
|
id: string;
|
|
84
121
|
loc: Location;
|
|
85
122
|
touches: string[];
|
|
86
123
|
steps: FlowStep[];
|
|
124
|
+
/** Acceptance-criterion coverage claims made inside this flow's describe. */
|
|
125
|
+
covers?: FlowCover[];
|
|
87
126
|
}
|
|
88
127
|
interface Page extends EntityWithMetaBase {
|
|
89
128
|
kind: "page";
|
package/dist/headless/index.d.ts
CHANGED
|
@@ -15,8 +15,8 @@ interface EntityRef {
|
|
|
15
15
|
/**
|
|
16
16
|
* The four kinds every captured route is expected to render — the state-matrix
|
|
17
17
|
* axis. A capture that only shoots the happy path leaves most of the value on
|
|
18
|
-
* the table, so a missing core kind must be captured
|
|
19
|
-
*
|
|
18
|
+
* the table, so a missing core kind must be captured or ACKNOWLEDGED (see
|
|
19
|
+
* `Metadata.acknowledge`).
|
|
20
20
|
*/
|
|
21
21
|
declare const CORE_STATE_KINDS: readonly ["loading", "empty", "populated", "error"];
|
|
22
22
|
type CoreStateKind = (typeof CORE_STATE_KINDS)[number];
|
|
@@ -34,34 +34,60 @@ 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
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
73
|
+
* The ONE way to say "don't complain about this gap": scope → typed reason.
|
|
74
|
+
*
|
|
75
|
+
* - scope `"*"` covers the whole entity (a redirect page that can never be
|
|
76
|
+
* captured, a component whose states are not gated here);
|
|
77
|
+
* - a core-kind scope covers that one cell of this page's route matrix.
|
|
78
|
+
*
|
|
79
|
+
* `type: "impossible"` is a permanent design statement and needs a `reason`;
|
|
80
|
+
* `type: "backlog"` is debt and does not. Keeping both as values of one field
|
|
81
|
+
* is what makes mislabeling debt as impossible a visible, reviewable edit.
|
|
82
|
+
* `captured-elsewhere` is computed by the workspace and never authored here.
|
|
56
83
|
*/
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
waivers?: Partial<Record<CoreStateKind, string>>;
|
|
84
|
+
acknowledge?: Partial<Record<AcknowledgeScope, MetaAcknowledgment>>;
|
|
85
|
+
}
|
|
86
|
+
/** Scope of an acknowledgment: one core kind, or the whole entity. */
|
|
87
|
+
type AcknowledgeScope = CoreStateKind | "*";
|
|
88
|
+
interface MetaAcknowledgment {
|
|
89
|
+
type: "impossible" | "backlog";
|
|
90
|
+
reason?: string;
|
|
65
91
|
}
|
|
66
92
|
interface EntityWithMetaBase {
|
|
67
93
|
id: string;
|
|
@@ -78,12 +104,25 @@ interface FlowStep {
|
|
|
78
104
|
entityId: string;
|
|
79
105
|
action?: string;
|
|
80
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
|
+
}
|
|
81
118
|
interface Flow {
|
|
82
119
|
kind: "flow";
|
|
83
120
|
id: string;
|
|
84
121
|
loc: Location;
|
|
85
122
|
touches: string[];
|
|
86
123
|
steps: FlowStep[];
|
|
124
|
+
/** Acceptance-criterion coverage claims made inside this flow's describe. */
|
|
125
|
+
covers?: FlowCover[];
|
|
87
126
|
}
|
|
88
127
|
interface Page extends EntityWithMetaBase {
|
|
89
128
|
kind: "page";
|
package/dist/headless/index.js
CHANGED