@ethlete/cli 3.0.0-next.24 → 3.0.0-next.25
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/CHANGELOG.md +37 -0
- package/design/define-call.ts +43 -0
- package/design/define-part.ts +28 -8
- package/design/embed-page.ts +37 -4
- package/design/icon-sheet.ts +151 -0
- package/design/mark-part.ts +79 -2
- package/design/motion-runtime.ts +212 -5
- package/design/spring.ts +53 -0
- package/design/token-sheet.ts +87 -0
- package/design/web/frame.ts +139 -24
- package/package.json +1 -1
- package/src/lib/design/calls-tsconfig.js +1 -2
- package/src/lib/design/calls-tsconfig.js.map +1 -1
- package/src/lib/design/design-command.js +34 -4
- package/src/lib/design/design-command.js.map +1 -1
- package/src/lib/design/force-interactions.d.ts +2 -1
- package/src/lib/design/force-interactions.js +7 -4
- package/src/lib/design/force-interactions.js.map +1 -1
- package/src/lib/design/mcp-command.d.ts +60 -0
- package/src/lib/design/mcp-command.js +327 -0
- package/src/lib/design/mcp-command.js.map +1 -0
- package/src/lib/design/motion-command.d.ts +71 -0
- package/src/lib/design/motion-command.js +314 -0
- package/src/lib/design/motion-command.js.map +1 -0
- package/src/lib/design/motion-endpoint.d.ts +61 -0
- package/src/lib/design/motion-endpoint.js +133 -0
- package/src/lib/design/motion-endpoint.js.map +1 -0
- package/src/lib/design/motion-flow.d.ts +5 -0
- package/src/lib/design/motion-flow.js +29 -0
- package/src/lib/design/motion-flow.js.map +1 -0
- package/src/lib/design/motion-shot.d.ts +43 -0
- package/src/lib/design/motion-shot.js +97 -0
- package/src/lib/design/motion-shot.js.map +1 -0
- package/src/lib/design/ready-shots.d.ts +7 -0
- package/src/lib/design/ready-shots.js +22 -1
- package/src/lib/design/ready-shots.js.map +1 -1
- package/src/lib/design/render-packages.d.ts +9 -0
- package/src/lib/design/render-packages.js +13 -3
- package/src/lib/design/render-packages.js.map +1 -1
- package/src/lib/design/render.js +3 -3
- package/src/lib/design/render.js.map +1 -1
- package/src/lib/design/serve.js +34 -3
- package/src/lib/design/serve.js.map +1 -1
- package/src/lib/design/shot-command.d.ts +8 -2
- package/src/lib/design/shot-command.js +12 -8
- package/src/lib/design/shot-command.js.map +1 -1
- package/src/lib/design/shot.d.ts +16 -0
- package/src/lib/design/shot.js +68 -4
- package/src/lib/design/shot.js.map +1 -1
- package/src/lib/design/sketch-command.js +78 -16
- package/src/lib/design/sketch-command.js.map +1 -1
- package/src/lib/design/studio-api.d.ts +19 -0
- package/src/lib/design/studio-api.js +52 -1
- package/src/lib/design/studio-api.js.map +1 -1
- package/src/lib/design/system/complete-command.d.ts +1 -1
- package/src/lib/design/system/complete-command.js +76 -6
- package/src/lib/design/system/complete-command.js.map +1 -1
- package/src/lib/design/system/complete.d.ts +107 -9
- package/src/lib/design/system/complete.js +592 -141
- package/src/lib/design/system/complete.js.map +1 -1
- package/src/lib/design/system/exceptions.d.ts +59 -0
- package/src/lib/design/system/exceptions.js +132 -0
- package/src/lib/design/system/exceptions.js.map +1 -0
- package/src/lib/design/system/flows/flow.d.ts +3 -0
- package/src/lib/design/system/flows/flow.js +5 -3
- package/src/lib/design/system/flows/flow.js.map +1 -1
- package/src/lib/design/system/handoff.d.ts +11 -0
- package/src/lib/design/system/handoff.js +30 -0
- package/src/lib/design/system/handoff.js.map +1 -0
- package/src/lib/design/system/inventory-approval.d.ts +41 -0
- package/src/lib/design/system/inventory-approval.js +71 -0
- package/src/lib/design/system/inventory-approval.js.map +1 -0
- package/src/lib/design/system/inventory.d.ts +65 -0
- package/src/lib/design/system/inventory.js +168 -0
- package/src/lib/design/system/inventory.js.map +1 -0
- package/src/lib/design/system/list-system.js +9 -2
- package/src/lib/design/system/list-system.js.map +1 -1
- package/src/lib/design/system/render-check.js +19 -1
- package/src/lib/design/system/render-check.js.map +1 -1
- package/src/lib/design/system/resolve-product.d.ts +2 -3
- package/src/lib/design/system/resolve-product.js +4 -6
- package/src/lib/design/system/resolve-product.js.map +1 -1
- package/src/lib/design/system/rules/stale-replace.js +41 -2
- package/src/lib/design/system/rules/stale-replace.js.map +1 -1
- package/src/lib/design/system/rules/token-selectors.js +1 -1
- package/src/lib/design/system/rules/token-selectors.js.map +1 -1
- package/src/lib/design/system/sketch/host-edit.d.ts +4 -0
- package/src/lib/design/system/sketch/host-edit.js +68 -0
- package/src/lib/design/system/sketch/host-edit.js.map +1 -0
- package/src/lib/design/system/sketch/merge.d.ts +3 -2
- package/src/lib/design/system/sketch/merge.js +47 -12
- package/src/lib/design/system/sketch/merge.js.map +1 -1
- package/src/lib/design/system/sketch/merged-parts.d.ts +10 -0
- package/src/lib/design/system/sketch/merged-parts.js +24 -3
- package/src/lib/design/system/sketch/merged-parts.js.map +1 -1
- package/src/lib/design/system/sketch/no-visible-change.d.ts +6 -0
- package/src/lib/design/system/sketch/no-visible-change.js +25 -1
- package/src/lib/design/system/sketch/no-visible-change.js.map +1 -1
- package/src/lib/design/system/sketch/overlay.js +11 -3
- package/src/lib/design/system/sketch/overlay.js.map +1 -1
- package/src/lib/design/system/sketch/sketch.d.ts +32 -0
- package/src/lib/design/system/sketch/sketch.js +73 -18
- package/src/lib/design/system/sketch/sketch.js.map +1 -1
- package/src/lib/design/system/sketch/unused-closure.d.ts +12 -0
- package/src/lib/design/system/sketch/unused-closure.js +185 -0
- package/src/lib/design/system/sketch/unused-closure.js.map +1 -0
- package/src/lib/design/system/system-modules.js +6 -9
- package/src/lib/design/system/system-modules.js.map +1 -1
- package/src/lib/design/system/system-tsconfig.d.ts +2 -1
- package/src/lib/design/system/system-tsconfig.js +9 -5
- package/src/lib/design/system/system-tsconfig.js.map +1 -1
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import { chromiumOf } from '../browser';
|
|
2
2
|
import { DesignConfig } from '../paths';
|
|
3
|
-
import {
|
|
3
|
+
import { Browser } from '../thumb';
|
|
4
|
+
import { ResolvedPart, ResolvedProduct } from './resolve-product';
|
|
5
|
+
import { SketchVariant, SystemModules } from './system-modules';
|
|
6
|
+
import { ListedException } from './exceptions';
|
|
7
|
+
import { InventoryState } from './inventory-approval';
|
|
4
8
|
/** One requirement of a part that `design complete` finds without evidence. `target` is `<part>[.<control>[.<requirement>]]`. */
|
|
5
9
|
export type CompletenessGap = {
|
|
6
10
|
code: string;
|
|
7
11
|
target: string;
|
|
8
12
|
detail: string;
|
|
9
13
|
};
|
|
14
|
+
/** A box in the pixels of a drawn frame, as its `/__design/shot` picture shows it. */
|
|
15
|
+
export type FrameBox = {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
};
|
|
10
21
|
/**
|
|
11
22
|
* An element of a drawn frame that looks interactive. `control` is a native control, an interactive role or a known
|
|
12
23
|
* SDK control; `unclassified` has a pointer cursor or a matched `:hover` rule and sits in no control. `marked` is the
|
|
13
|
-
* `data-et-control` that declares it, `within` every `data-et-control` around it, nearest first.
|
|
24
|
+
* `data-et-control` that declares it, `within` every `data-et-control` around it, nearest first. `owner` is the
|
|
25
|
+
* embedded part whose `data-et-part` root draws it, or `null` for the frame's own part.
|
|
14
26
|
*/
|
|
15
27
|
export type FoundControl = {
|
|
16
28
|
kind: 'control' | 'unclassified';
|
|
@@ -18,6 +30,33 @@ export type FoundControl = {
|
|
|
18
30
|
path: string;
|
|
19
31
|
marked: string | null;
|
|
20
32
|
within: string[];
|
|
33
|
+
owner?: string | null;
|
|
34
|
+
box?: FrameBox | null;
|
|
35
|
+
};
|
|
36
|
+
/** A rule of the part's own stylesheet that sets `properties` on `path`, an element the embedded part `owner` draws. */
|
|
37
|
+
export type FoundOverride = {
|
|
38
|
+
owner: string;
|
|
39
|
+
selector: string;
|
|
40
|
+
path: string;
|
|
41
|
+
properties: string[];
|
|
42
|
+
};
|
|
43
|
+
/** A forced interaction on a drawn element: whether its box differs from rest, and which colours change in one frame. */
|
|
44
|
+
export type SeenForce = {
|
|
45
|
+
interaction: string;
|
|
46
|
+
differs: boolean;
|
|
47
|
+
still?: string[];
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* An option or menu item inside a drawn surface. `selected` is its ARIA selected, checked, pressed or current
|
|
51
|
+
* state, `look` its computed colours, so two options can be told apart without their text. `named` is set when an
|
|
52
|
+
* `aria-activedescendant` in the frame names its id, `keyboard` when it carries `data-active-source="keyboard"`.
|
|
53
|
+
*/
|
|
54
|
+
export type SeenOption = {
|
|
55
|
+
selected: boolean;
|
|
56
|
+
look: string;
|
|
57
|
+
forced: SeenForce[];
|
|
58
|
+
named?: boolean;
|
|
59
|
+
keyboard?: boolean;
|
|
21
60
|
};
|
|
22
61
|
/** What one drawn frame of a state shows of the controls and surfaces its markup marks. */
|
|
23
62
|
export type SeenFrame = {
|
|
@@ -25,20 +64,34 @@ export type SeenFrame = {
|
|
|
25
64
|
interaction: string | null;
|
|
26
65
|
controls: {
|
|
27
66
|
id: string;
|
|
28
|
-
forced:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
67
|
+
forced: SeenForce[];
|
|
68
|
+
selected?: boolean;
|
|
69
|
+
disabled?: boolean;
|
|
70
|
+
look?: string;
|
|
71
|
+
keyboard?: boolean;
|
|
72
|
+
box?: FrameBox | null;
|
|
33
73
|
}[];
|
|
34
74
|
surfaces: {
|
|
35
75
|
id: string;
|
|
36
76
|
shown: boolean;
|
|
77
|
+
options?: SeenOption[];
|
|
37
78
|
}[];
|
|
38
79
|
found?: FoundControl[];
|
|
80
|
+
overrides?: FoundOverride[];
|
|
81
|
+
};
|
|
82
|
+
export type DeclaredControl = {
|
|
83
|
+
kind: string;
|
|
84
|
+
input: string[];
|
|
85
|
+
part: string | null;
|
|
86
|
+
surfaces: Record<string, string>;
|
|
87
|
+
disabled: boolean;
|
|
39
88
|
};
|
|
40
89
|
/** The gaps of each part a control names in `part`, or why it could not be checked. */
|
|
41
90
|
export type ReferencedParts = Record<string, CompletenessGap[] | string>;
|
|
91
|
+
export declare const declaredControlsOf: (value: unknown) => Record<string, DeclaredControl> | null;
|
|
92
|
+
/** Whether a discovered element is an undeclared or unclassified finding of the part, not owned or declared. */
|
|
93
|
+
export declare const isFindingOf: (declared: Record<string, DeclaredControl>) => (found: FoundControl) => boolean;
|
|
94
|
+
export declare const findingKeyOf: (found: FoundControl) => string;
|
|
42
95
|
/**
|
|
43
96
|
* The gaps of one part, from its `controls` declaration, its state names and what each drawn frame showed.
|
|
44
97
|
* A part that is not `reviewed` (its files differ from its merged.json hash) has no reviewed evidence at all.
|
|
@@ -51,21 +104,66 @@ export declare const completenessGapsOf: (options: {
|
|
|
51
104
|
reviewed: boolean;
|
|
52
105
|
grid?: unknown;
|
|
53
106
|
referenced?: ReferencedParts;
|
|
107
|
+
inventory?: InventoryState;
|
|
54
108
|
}) => CompletenessGap[];
|
|
55
109
|
export declare const completenessGapLineOf: (gap: CompletenessGap) => string;
|
|
110
|
+
/** Where a rest frame of a part is drawn: its state at a preset, or at a width, as `/__design/shot` takes it. */
|
|
111
|
+
export type FrameAddress = {
|
|
112
|
+
state: string;
|
|
113
|
+
preset: string | null;
|
|
114
|
+
width: number | null;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Draws every state of one part of the product, at rest and, unless `restOnly`, in each interaction it declares,
|
|
118
|
+
* once at its first preset or width, and answers what each frame showed, or why its module did not load as a string.
|
|
119
|
+
*/
|
|
120
|
+
export declare const seePart: (options: {
|
|
121
|
+
product: ResolvedProduct;
|
|
122
|
+
part: ResolvedPart;
|
|
123
|
+
system: SystemModules;
|
|
124
|
+
base: string;
|
|
125
|
+
load: (id: string) => Promise<unknown>;
|
|
126
|
+
draw: <T>(job: (browser: Browser) => Promise<T>) => Promise<T>;
|
|
127
|
+
restOnly?: boolean;
|
|
128
|
+
sketch?: SketchVariant | null;
|
|
129
|
+
}) => Promise<string | {
|
|
130
|
+
definition: {
|
|
131
|
+
states?: unknown;
|
|
132
|
+
interactions?: unknown;
|
|
133
|
+
widths?: unknown;
|
|
134
|
+
controls?: unknown;
|
|
135
|
+
grid?: unknown;
|
|
136
|
+
} | undefined;
|
|
137
|
+
states: string[];
|
|
138
|
+
seen: SeenFrame[];
|
|
139
|
+
refused: string[];
|
|
140
|
+
addresses: FrameAddress[];
|
|
141
|
+
owner: ResolvedProduct | {
|
|
142
|
+
dir: string;
|
|
143
|
+
base: null;
|
|
144
|
+
};
|
|
145
|
+
hash: string;
|
|
146
|
+
}>;
|
|
147
|
+
/** The control ids a page draws at rest, the set its inventory approval holds. */
|
|
148
|
+
export declare const inventoryIdsOf: (frames: SeenFrame[]) => string[];
|
|
56
149
|
/**
|
|
57
150
|
* Draws every state of one part, at rest and in each interaction it declares, once at its first preset or width,
|
|
58
|
-
* and answers the gaps of its `controls` declaration, or why it could not draw. A part a control names in `part
|
|
59
|
-
* is checked the same way, and its gaps fail
|
|
151
|
+
* and answers the gaps of its `controls` declaration, or why it could not draw. A part a control names in `part`,
|
|
152
|
+
* and an embedded part whose `data-et-part` root draws a control, is checked the same way, and its gaps fail it.
|
|
153
|
+
* A page fails until the user approves its control inventory in Studio. An exception the user approved in Studio
|
|
154
|
+
* drops the gap it names until the part changes; a pending one still fails. With `sketch`, every part is drawn as
|
|
155
|
+
* that variant draws it, and a part the variant changes is not merged yet, so it never fails as unreviewed.
|
|
60
156
|
*/
|
|
61
157
|
export declare const completenessOf: (options: {
|
|
62
158
|
target: string;
|
|
63
159
|
config: DesignConfig;
|
|
64
160
|
product: ResolvedProduct;
|
|
65
161
|
part: string;
|
|
162
|
+
sketch?: SketchVariant | null;
|
|
66
163
|
chromiumOf?: typeof chromiumOf;
|
|
67
164
|
}) => Promise<{
|
|
68
165
|
gaps: CompletenessGap[];
|
|
166
|
+
exceptions?: ListedException[];
|
|
69
167
|
} | {
|
|
70
168
|
unavailable: string;
|
|
71
169
|
} | {
|