waygraph 0.15.25 → 0.15.26
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/highlights/css.d.ts +14 -0
- package/dist/highlights/css.js +58 -0
- package/dist/highlights/demo-pace.d.ts +56 -0
- package/dist/highlights/demo-pace.js +184 -0
- package/dist/highlights/device.d.ts +29 -0
- package/dist/highlights/device.js +171 -0
- package/dist/highlights/merge.d.ts +8 -0
- package/dist/highlights/merge.js +173 -0
- package/dist/highlights/run-phase.d.ts +43 -0
- package/dist/highlights/run-phase.js +211 -0
- package/dist/highlights/stub-ctx.d.ts +10 -0
- package/dist/highlights/stub-ctx.js +281 -0
- package/dist/highlights/style.d.ts +27 -0
- package/dist/highlights/style.js +84 -0
- package/dist/highlights/todo-dock.d.ts +52 -0
- package/dist/highlights/todo-dock.js +248 -0
- package/dist/highlights/types.d.ts +536 -0
- package/dist/highlights/types.js +1 -0
- package/dist/highlights.d.ts +9 -734
- package/dist/highlights.js +10 -1416
- package/examples/saucedemo/.waygraph-auto/008f4e6e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/22fefa13.log +0 -0
- package/package.json +1 -1
package/dist/highlights.d.ts
CHANGED
|
@@ -1,734 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* slides are multi-step captions with Next between them (long-process explain).
|
|
11
|
-
*
|
|
12
|
-
* All fixture shapes share optional {@link FixtureDurationFields} so demo dwell
|
|
13
|
-
* before advancing is authored the same way on stubs, flow fixtures, and slides.
|
|
14
|
-
*/
|
|
15
|
-
import type { Block, Checkpoint } from "./types.js";
|
|
16
|
-
import type { MemPage } from "./mem-page.js";
|
|
17
|
-
/** Shared dwell fields on stubs, fixtures, and yap slides. */
|
|
18
|
-
export type FixtureDurationFields = {
|
|
19
|
-
/**
|
|
20
|
-
* Min time this fixture stays visible before the demo advances.
|
|
21
|
-
* - `true` - defaults (2000ms normal, {@link FixtureDurationFields.fastMode} or 600ms when --fast)
|
|
22
|
-
* - `number` - override normal dwell ms
|
|
23
|
-
* - omit / false - no authored dwell (caller keeps legacy timing)
|
|
24
|
-
*/
|
|
25
|
-
duration?: boolean | number;
|
|
26
|
-
/**
|
|
27
|
-
* Dwell ms when demo `--fast` / gatesFast (only when {@link duration} is set).
|
|
28
|
-
* Default 600.
|
|
29
|
-
*/
|
|
30
|
-
fastMode?: number;
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* One checklist row for episode planning (demo panel).
|
|
34
|
-
* Set via {@link StubCtx.todos} / {@link StubCtx.todoIndex} inside the lifecycle.
|
|
35
|
-
*/
|
|
36
|
-
export type WaygraphTodoItem = {
|
|
37
|
-
text: string;
|
|
38
|
-
/**
|
|
39
|
-
* Stable id for external asserts / redirects (Mailhog, deep links).
|
|
40
|
-
* Stamped as `data-wg-todo-item` on the row.
|
|
41
|
-
*/
|
|
42
|
-
id?: string;
|
|
43
|
-
/** Alias for {@link WaygraphTodoItem.id}. */
|
|
44
|
-
name?: string;
|
|
45
|
-
/** Explicit done. If omitted, derived from todoIndex (index < todoIndex). */
|
|
46
|
-
done?: boolean;
|
|
47
|
-
/** Explicit current. If omitted, derived from todoIndex (index === todoIndex). */
|
|
48
|
-
current?: boolean;
|
|
49
|
-
};
|
|
50
|
-
export type WaygraphTodoInput = string | WaygraphTodoItem;
|
|
51
|
-
/**
|
|
52
|
-
* Dock list presentation:
|
|
53
|
-
* - `sequential` - arrow on current, strike done (demo walkthrough)
|
|
54
|
-
* - `checklist` - checkbox done/pending only (no current arrow; independent checks)
|
|
55
|
-
* - `bullets` - flat bullet list (no arrow/checkbox; open notes / trimmed dock)
|
|
56
|
-
*/
|
|
57
|
-
export type TodoListStyle = "sequential" | "checklist" | "bullets";
|
|
58
|
-
/** One titled group in the floating todo dock (FR / Scenarios / ACs, etc.). */
|
|
59
|
-
export type WaygraphTodoGroupInput = {
|
|
60
|
-
/** Stable group id -> `data-wg-todo-group`. */
|
|
61
|
-
id?: string;
|
|
62
|
-
/** Alias for {@link WaygraphTodoGroupInput.id}. */
|
|
63
|
-
name?: string;
|
|
64
|
-
/** Group heading shown above the items. */
|
|
65
|
-
title?: string;
|
|
66
|
-
/** Per-group style; falls back to dock default ({@link StubCtx.todoStyle}). */
|
|
67
|
-
style?: TodoListStyle;
|
|
68
|
-
items: readonly WaygraphTodoInput[];
|
|
69
|
-
/** Sequential only: which item is current (0-based). */
|
|
70
|
-
todoIndex?: number;
|
|
71
|
-
};
|
|
72
|
-
export type WaygraphTodoGroup = {
|
|
73
|
-
id?: string;
|
|
74
|
-
title?: string;
|
|
75
|
-
style: TodoListStyle;
|
|
76
|
-
items: WaygraphTodoItem[];
|
|
77
|
-
};
|
|
78
|
-
/** Full floating dock payload passed to the browser. */
|
|
79
|
-
export type TodoDockState = {
|
|
80
|
-
/**
|
|
81
|
-
* Stable dock id for external targeting after redirects
|
|
82
|
-
* (`#wg-todo-dock[data-wg-todo-id="…"]`).
|
|
83
|
-
*/
|
|
84
|
-
id?: string;
|
|
85
|
-
/** Default style for groups that omit their own. */
|
|
86
|
-
style: TodoListStyle;
|
|
87
|
-
/** Single-list title when using {@link StubCtx.todos} + {@link StubCtx.todoTitle}. */
|
|
88
|
-
title?: string;
|
|
89
|
-
groups: WaygraphTodoGroup[];
|
|
90
|
-
pos?: "left" | "right";
|
|
91
|
-
};
|
|
92
|
-
/** Options for compact {@link StubCtx.todos}(`id`, items, opts). */
|
|
93
|
-
export type WaygraphTodosOpts = {
|
|
94
|
-
/** Dock heading. */
|
|
95
|
-
title?: string;
|
|
96
|
-
/** Current item index (0-based). */
|
|
97
|
-
index?: number;
|
|
98
|
-
/** `sequential` | `checklist` | `bullets`. */
|
|
99
|
-
style?: TodoListStyle;
|
|
100
|
-
/** Dock side. */
|
|
101
|
-
pos?: "left" | "right";
|
|
102
|
-
/**
|
|
103
|
-
* Keep other docks with different ids (multi-todo). Default false —
|
|
104
|
-
* one checklist at a time (setting todos replaces the previous dock).
|
|
105
|
-
*/
|
|
106
|
-
parallel?: boolean;
|
|
107
|
-
};
|
|
108
|
-
/**
|
|
109
|
-
* Floating todo-dock UX knobs (0.15.8+). Defaults are **smart on** so long
|
|
110
|
-
* FR/AC checklists do not bury highlight rings. Opt out per phase or globally.
|
|
111
|
-
*
|
|
112
|
-
* Defaults: `compact`, `collision`, `behindRing` = true; `cap` = 5; `expandCap` = 14.
|
|
113
|
-
*
|
|
114
|
-
* Global: `WAYGRAPH_TODO_UI=full` / `waygraph demo --todo-full` turns smart off.
|
|
115
|
-
* Per-knob env: `WAYGRAPH_TODO_COMPACT=0`, `WAYGRAPH_TODO_COLLISION=0`,
|
|
116
|
-
* `WAYGRAPH_TODO_BEHIND=0`, `WAYGRAPH_TODO_CAP`, `WAYGRAPH_TODO_EXPAND_CAP`.
|
|
117
|
-
*/
|
|
118
|
-
export type TodoDockUiOpts = {
|
|
119
|
-
/** Fold long lists around the current row (+N more / hover). Default true. */
|
|
120
|
-
compact?: boolean;
|
|
121
|
-
/** Visible rows when compact. Default 5. */
|
|
122
|
-
cap?: number;
|
|
123
|
-
/** Visible rows on hover / pinned expand. Default 14. */
|
|
124
|
-
expandCap?: number;
|
|
125
|
-
/** Flip dock L/R when an active ring overlaps it. Default true. */
|
|
126
|
-
collision?: boolean;
|
|
127
|
-
/** Dim + lower z-index while a highlight ring is up. Default true. */
|
|
128
|
-
behindRing?: boolean;
|
|
129
|
-
};
|
|
130
|
-
/** Resolved todo-dock UX (all fields present). */
|
|
131
|
-
export type TodoDockUiResolved = {
|
|
132
|
-
compact: boolean;
|
|
133
|
-
cap: number;
|
|
134
|
-
expandCap: number;
|
|
135
|
-
collision: boolean;
|
|
136
|
-
behindRing: boolean;
|
|
137
|
-
};
|
|
138
|
-
/**
|
|
139
|
-
* Resolve todo-dock UX from env + optional author patch.
|
|
140
|
-
* `WAYGRAPH_TODO_UI=full|off|legacy` forces compact/collision/behindRing off.
|
|
141
|
-
*/
|
|
142
|
-
export declare function resolveTodoDockUi(patch?: TodoDockUiOpts | null, env?: NodeJS.ProcessEnv): TodoDockUiResolved;
|
|
143
|
-
/** Episode-level fixtures authored inside stubBefore/After/OnError(ctx). */
|
|
144
|
-
export type StubPhaseFixtures = {
|
|
145
|
-
todos?: readonly WaygraphTodoInput[];
|
|
146
|
-
/** Which todo is current (0-based). Rows before = done, after = pending. */
|
|
147
|
-
todoIndex?: number;
|
|
148
|
-
/** Heading above a single {@link StubCtx.todos} list. */
|
|
149
|
-
todoTitle?: string;
|
|
150
|
-
/**
|
|
151
|
-
* Stable dock id (`data-wg-todo-id`) for external redirect asserts
|
|
152
|
-
* (e.g. Mailhog -> back to app and still find the checklist).
|
|
153
|
-
*/
|
|
154
|
-
todoId?: string;
|
|
155
|
-
/** `sequential` (default), `checklist`, or `bullets`. */
|
|
156
|
-
todoStyle?: TodoListStyle;
|
|
157
|
-
/** Multiple titled lists (FR / Scenarios / ACs). Wins over bare todos when set. */
|
|
158
|
-
todoGroups?: readonly WaygraphTodoGroupInput[];
|
|
159
|
-
/**
|
|
160
|
-
* Camera zoom (Screen Studio style) - scales the page toward the target /
|
|
161
|
-
* cursor. Not element CSS zoom. Typical `1.25` .. `2`.
|
|
162
|
-
*/
|
|
163
|
-
zoom?: number;
|
|
164
|
-
/** Default zoomOut for rings (false = keep camera between rings). */
|
|
165
|
-
zoomOut?: boolean;
|
|
166
|
-
/** Top demo banner title (the purple "waygraph demo" card). */
|
|
167
|
-
title?: string;
|
|
168
|
-
/**
|
|
169
|
-
* Floating checklist dock side. `left` | `right`.
|
|
170
|
-
* Authored control (also click / WAYGRAPH_TODO_POS / --todo-left|right).
|
|
171
|
-
*/
|
|
172
|
-
todoPos?: "left" | "right";
|
|
173
|
-
/**
|
|
174
|
-
* Todo-dock UX (compact / collision / behind-ring). Merged onto env defaults.
|
|
175
|
-
* See {@link TodoDockUiOpts}.
|
|
176
|
-
*/
|
|
177
|
-
todoDockUi?: TodoDockUiOpts;
|
|
178
|
-
/**
|
|
179
|
-
* Viewport preset: `mobile` | `tablet` | `desktop` (default / clear).
|
|
180
|
-
* Omit on later blocks = **keep** (same persist pattern as todos).
|
|
181
|
-
*/
|
|
182
|
-
device?: DevicePreset | DeviceState;
|
|
183
|
-
/** Explicit pixel viewport (wins over preset width/height when both set). */
|
|
184
|
-
viewport?: DeviceViewport;
|
|
185
|
-
/** Touch theater + Playwright touchscreen when true. */
|
|
186
|
-
touch?: boolean;
|
|
187
|
-
/** Portrait / landscape (swaps preset width/height). */
|
|
188
|
-
orientation?: DeviceOrientation;
|
|
189
|
-
};
|
|
190
|
-
/** Named viewport presets (0.13+). */
|
|
191
|
-
export type DevicePreset = "mobile" | "tablet" | "desktop";
|
|
192
|
-
/** Explicit viewport box. */
|
|
193
|
-
export type DeviceViewport = {
|
|
194
|
-
width: number;
|
|
195
|
-
height: number;
|
|
196
|
-
deviceScaleFactor?: number;
|
|
197
|
-
};
|
|
198
|
-
/**
|
|
199
|
-
* Carried device fixture (todo-dock shaped persist).
|
|
200
|
-
* Omit on a later step = keep; hideDevice/clearDevice/desktop = clear to desktop.
|
|
201
|
-
*/
|
|
202
|
-
export type DeviceState = {
|
|
203
|
-
preset: DevicePreset;
|
|
204
|
-
viewport: DeviceViewport;
|
|
205
|
-
/** Playwright-ish: treat as mobile layout. */
|
|
206
|
-
isMobile: boolean;
|
|
207
|
-
/** Context needs hasTouch for touchscreen.tap (demo launches with hasTouch). */
|
|
208
|
-
hasTouch: boolean;
|
|
209
|
-
/** Demo gesture theater: finger cursor, tap/hold timing, prefer touchscreen. */
|
|
210
|
-
touchMode: boolean;
|
|
211
|
-
/** Viewport orientation (0.13.3+). Default derived from width/height. */
|
|
212
|
-
orientation?: DeviceOrientation;
|
|
213
|
-
};
|
|
214
|
-
/** Portrait (tall) or landscape (wide). */
|
|
215
|
-
export type DeviceOrientation = "portrait" | "landscape";
|
|
216
|
-
/** Built-in preset sizes (CSS pixels) — stored in portrait for mobile/tablet. */
|
|
217
|
-
export declare const DEVICE_PRESETS: Record<DevicePreset, Omit<DeviceState, "touchMode"> & {
|
|
218
|
-
touchMode?: boolean;
|
|
219
|
-
}>;
|
|
220
|
-
export declare function normalizeDevicePreset(raw: unknown): DevicePreset | undefined;
|
|
221
|
-
export declare function normalizeDeviceOrientation(raw: unknown): DeviceOrientation | undefined;
|
|
222
|
-
/** Infer orientation from box (square counts as landscape). */
|
|
223
|
-
export declare function orientationFromViewport(vp: DeviceViewport): DeviceOrientation;
|
|
224
|
-
/**
|
|
225
|
-
* Swap width/height so the viewport matches the requested orientation.
|
|
226
|
-
* Preserves deviceScaleFactor. No-op when already oriented.
|
|
227
|
-
*/
|
|
228
|
-
export declare function applyOrientation(state: DeviceState, orientation: DeviceOrientation): DeviceState;
|
|
229
|
-
/** Resolve a preset name or partial state into a full DeviceState. */
|
|
230
|
-
export declare function resolveDeviceState(input: DevicePreset | DeviceState | DeviceViewport | undefined, touchOverride?: boolean, orientationOverride?: DeviceOrientation): DeviceState | undefined;
|
|
231
|
-
/**
|
|
232
|
-
* Carry-forward for device fixtures (mirror {@link applyTodoPhase}).
|
|
233
|
-
* - clear: hideDevice / clearDevice / device("desktop") with clear intent
|
|
234
|
-
* - set: author set device/viewport/touch this phase
|
|
235
|
-
* - keep: omit - preserve previous (whole episode remain)
|
|
236
|
-
*/
|
|
237
|
-
export declare function applyDevicePhase(prev: DeviceState | undefined, phase: {
|
|
238
|
-
deviceSync?: "set" | "clear" | "keep";
|
|
239
|
-
device?: DeviceState;
|
|
240
|
-
}): {
|
|
241
|
-
device: DeviceState | undefined;
|
|
242
|
-
sync: "set" | "clear" | "keep";
|
|
243
|
-
};
|
|
244
|
-
/**
|
|
245
|
-
* The `#wg-ring` / `#wg-ring-label` CSS (tone/size/weight variants) - the
|
|
246
|
-
* actual visual language `cli.ts`'s own demo stepper paints with. Extracted
|
|
247
|
-
* here (not left as a private `cli.ts` constant) so anything else wanting the
|
|
248
|
-
* SAME "waygraph vision" ring can import pure CSS text, not the rendering
|
|
249
|
-
* engine around it - `cli.ts` runs `main().catch(...)` unconditionally at
|
|
250
|
-
* module load with no `import.meta.url` guard, so importing anything from it
|
|
251
|
-
* is unsafe as a library dependency (see `pilot-overlay.ts`'s own doc
|
|
252
|
-
* comment for the same reasoning re: the badge/panel). This file has always
|
|
253
|
-
* been the pure, side-effect-free home for tone/size/weight - the CSS that
|
|
254
|
-
* renders them belongs alongside it for the same reason. `cli.ts` imports
|
|
255
|
-
* this constant instead of keeping its own duplicate copy.
|
|
256
|
-
*/
|
|
257
|
-
export declare const WAYGRAPH_RING_CSS: string;
|
|
258
|
-
/** One named highlight slot on a block (selector + caption). */
|
|
259
|
-
export interface WaygraphHighlightStub extends FixtureDurationFields {
|
|
260
|
-
selector: string;
|
|
261
|
-
/** Primary caption line. */
|
|
262
|
-
label: string;
|
|
263
|
-
/** Extra caption line (ring / slide body). */
|
|
264
|
-
detail?: string;
|
|
265
|
-
/** Short badge, e.g. AC / BUG / GATE / YAP. */
|
|
266
|
-
tag?: string;
|
|
267
|
-
/**
|
|
268
|
-
* Demo ring color + icon:
|
|
269
|
-
* - `planned` purple (authored narration, default)
|
|
270
|
-
* - `auto` gray (engine automation / verify fallback)
|
|
271
|
-
* - `info` blue · `warning` yellow · `danger` red · `success` green
|
|
272
|
-
*/
|
|
273
|
-
tone?: HighlightTone;
|
|
274
|
-
/**
|
|
275
|
-
* Ring padding + label font scale: `sm` | `md` (default) | `lg`.
|
|
276
|
-
* Aliases: small/medium/large, s/m/l.
|
|
277
|
-
*/
|
|
278
|
-
size?: HighlightSize;
|
|
279
|
-
/**
|
|
280
|
-
* Label font weight: `normal` (default) | `bold`.
|
|
281
|
-
* Aliases: regular, strong.
|
|
282
|
-
*/
|
|
283
|
-
weight?: HighlightWeight;
|
|
284
|
-
/**
|
|
285
|
-
* Camera zoom while this ring is up (Screen Studio style - page scales toward
|
|
286
|
-
* the target / cursor). Typical `1.25` .. `2`. Cleared when the ring hides
|
|
287
|
-
* unless `zoomOut: false`. Episode default: {@link StubCtx.zoom}.
|
|
288
|
-
*/
|
|
289
|
-
zoom?: number;
|
|
290
|
-
/**
|
|
291
|
-
* When false, keep the camera zoomed after this ring (pan to the next target
|
|
292
|
-
* instead of zooming out). Default true. Phase default: {@link StubCtx.zoomOut}.
|
|
293
|
-
*/
|
|
294
|
-
zoomOut?: boolean;
|
|
295
|
-
/**
|
|
296
|
-
* Spotlight: dim the rest of the page, keep this target as the focal point.
|
|
297
|
-
*/
|
|
298
|
-
focus?: boolean;
|
|
299
|
-
/**
|
|
300
|
-
* Deprecated no-op. Camera auto-centers on the ring target; host mouse is
|
|
301
|
-
* ignored. Playwright's real mouse is driven to the centered target instead.
|
|
302
|
-
*/
|
|
303
|
-
followMouse?: boolean;
|
|
304
|
-
/** Alias for {@link WaygraphHighlightStub.followMouse} (no-op). */
|
|
305
|
-
follow?: boolean;
|
|
306
|
-
/**
|
|
307
|
-
* Caption text color (CSS color). Overrides tone label color when set.
|
|
308
|
-
* Aliases accepted at runtime: `color`, `labelColor`, `textColor`.
|
|
309
|
-
*/
|
|
310
|
-
color?: string;
|
|
311
|
-
/**
|
|
312
|
-
* Move the demo cursor to the target while this ring is up (default true
|
|
313
|
-
* for authored stub queues; set false to keep cursor hidden).
|
|
314
|
-
*/
|
|
315
|
-
cursor?: boolean;
|
|
316
|
-
/**
|
|
317
|
-
* Optional link to a todo item id. When set, Method fill/click advances that
|
|
318
|
-
* todo row instead of relying on stub array index (avoids password/submit/username
|
|
319
|
-
* alphabetical reorder bugs).
|
|
320
|
-
*/
|
|
321
|
-
todo?: string;
|
|
322
|
-
/** Slot key from stubBefore/After map (e.g. "username") - set by resolver. */
|
|
323
|
-
slotId?: string;
|
|
324
|
-
/**
|
|
325
|
-
* Pointer feel when touchMode is on (0.13+):
|
|
326
|
-
* - `tap` - short press via touchscreen (default in touch mode)
|
|
327
|
-
* - `hold` - long-press (~600ms) then release
|
|
328
|
-
* - `click` - mouse click even in touch mode
|
|
329
|
-
*/
|
|
330
|
-
gesture?: "tap" | "hold" | "click" | "swipe";
|
|
331
|
-
}
|
|
332
|
-
/** Flow fixture patch: label required; selector optional (inherits from stub). */
|
|
333
|
-
export type WaygraphHighlightFixture = Partial<Pick<WaygraphHighlightStub, "selector">> & Required<Pick<WaygraphHighlightStub, "label">> & Pick<WaygraphHighlightStub, "detail" | "tag" | "tone" | "size" | "weight" | "zoom" | "zoomOut" | "focus" | "followMouse" | "follow" | "color" | "cursor" | "todo" | "gesture"> & FixtureDurationFields;
|
|
334
|
-
export type HighlightStubPhase = Record<string, WaygraphHighlightStub>;
|
|
335
|
-
/**
|
|
336
|
-
* Open stub lifecycle context. Authors set rings + episode fixtures freely —
|
|
337
|
-
* not restricted to returning a closed slot object.
|
|
338
|
-
*
|
|
339
|
-
* @example
|
|
340
|
-
* stubBefore: (ctx) => {
|
|
341
|
-
* ctx.todos(["Enter email", "Enter password", "Click Sign in"]);
|
|
342
|
-
* ctx.todoIndex(0);
|
|
343
|
-
* ctx.zoom(1.35);
|
|
344
|
-
* ctx.highlights({
|
|
345
|
-
* email: { selector: "#email", label: "Email" },
|
|
346
|
-
* submit: { selector: "#login-button", label: "Sign in" },
|
|
347
|
-
* });
|
|
348
|
-
* }
|
|
349
|
-
* // Sequential plan: bump todoIndex in a later phase / later block's stubBefore
|
|
350
|
-
* stubAfter: (ctx) => {
|
|
351
|
-
* ctx.todos(["Enter email", "Enter password", "Click Sign in"]);
|
|
352
|
-
* ctx.todoIndex(2);
|
|
353
|
-
* ctx.ring("inventory", { selector: ".inventory_list", label: "Landed" });
|
|
354
|
-
* }
|
|
355
|
-
*/
|
|
356
|
-
export type StubCtx<Out extends Checkpoint<string> = Checkpoint<string>> = {
|
|
357
|
-
/**
|
|
358
|
-
* Live Mem for this run - same store `act`/`observe` read. Prefer this over
|
|
359
|
-
* closing over outer scope or inventing parallel fixture bags.
|
|
360
|
-
* Undefined only if the caller ran a stub phase without passing mem (tests).
|
|
361
|
-
*/
|
|
362
|
-
readonly mem: MemPage | undefined;
|
|
363
|
-
/** Present after resolve (stubAfter). Undefined for stubBefore. */
|
|
364
|
-
readonly out: Out | undefined;
|
|
365
|
-
/** Present on stubOnError when the step threw. */
|
|
366
|
-
readonly error: unknown | undefined;
|
|
367
|
-
/** Replace named highlight rings for this phase. */
|
|
368
|
-
highlights(slots: HighlightStubPhase): void;
|
|
369
|
-
/** Set / overwrite one named ring. */
|
|
370
|
-
ring(id: string, stub: WaygraphHighlightStub): void;
|
|
371
|
-
/**
|
|
372
|
-
* Floating checklist. Prefer the compact form:
|
|
373
|
-
* ctx.todos("login", ["Enter email", "Enter password"], { title: "Sign in", index: 0 })
|
|
374
|
-
* Legacy: ctx.todos([...]); ctx.todoId(...); ctx.todoIndex(...); …
|
|
375
|
-
* Default = one dock (setting todos replaces). Pass `{ parallel: true }` to keep others.
|
|
376
|
-
*/
|
|
377
|
-
todos(items: readonly WaygraphTodoInput[]): void;
|
|
378
|
-
todos(id: string, items: readonly WaygraphTodoInput[], opts?: WaygraphTodosOpts): void;
|
|
379
|
-
/** Current checklist index (bump for sequential plans). */
|
|
380
|
-
todoIndex(n: number): void;
|
|
381
|
-
/** Heading above the single {@link StubCtx.todos} list. */
|
|
382
|
-
todoTitle(text: string): void;
|
|
383
|
-
/**
|
|
384
|
-
* Stable dock id for external selectors after redirects
|
|
385
|
-
* (`#wg-todo-dock[data-wg-todo-id="ep10-coverage"]`).
|
|
386
|
-
*/
|
|
387
|
-
todoId(id: string): void;
|
|
388
|
-
/**
|
|
389
|
-
* Dock presentation: `sequential` (arrow walkthrough), `checklist`
|
|
390
|
-
* (independent checkboxes), or `bullets` (flat • list, no progress marks).
|
|
391
|
-
*/
|
|
392
|
-
todoStyle(style: TodoListStyle): void;
|
|
393
|
-
/**
|
|
394
|
-
* Multiple titled lists (e.g. Functional Requirements / Scenarios / ACs).
|
|
395
|
-
* Replaces a bare {@link StubCtx.todos} list when set.
|
|
396
|
-
*/
|
|
397
|
-
todoGroups(groups: readonly WaygraphTodoGroupInput[]): void;
|
|
398
|
-
/**
|
|
399
|
-
* Hide the floating todo dock. Omit todos on a later block = **keep** the
|
|
400
|
-
* previous dock (carry forward). Only hideTodos / clearTodos / todos([]) clears it.
|
|
401
|
-
*/
|
|
402
|
-
hideTodos(): void;
|
|
403
|
-
/** Alias for {@link StubCtx.hideTodos}. */
|
|
404
|
-
clearTodos(): void;
|
|
405
|
-
/**
|
|
406
|
-
* Viewport / device fixture (0.13+). `mobile` | `tablet` | `desktop`.
|
|
407
|
-
* Omit on later blocks = **keep** (same persist as todos). Use
|
|
408
|
-
* {@link StubCtx.hideDevice} / {@link StubCtx.clearDevice} to return to desktop.
|
|
409
|
-
*/
|
|
410
|
-
device(preset: DevicePreset | DeviceState): void;
|
|
411
|
-
/** Explicit CSS-pixel viewport (implies mobile-ish unless desktop-sized). */
|
|
412
|
-
viewport(box: DeviceViewport): void;
|
|
413
|
-
/** Enable / disable touch theater + touchscreen gestures. */
|
|
414
|
-
touch(on?: boolean): void;
|
|
415
|
-
/**
|
|
416
|
-
* Rotate viewport to portrait or landscape (0.13.3+).
|
|
417
|
-
* Keeps current preset; swaps width/height. Toast + lerp like device().
|
|
418
|
-
*/
|
|
419
|
-
orientation(o: DeviceOrientation): void;
|
|
420
|
-
/** Alias for {@link StubCtx.orientation}("landscape"). */
|
|
421
|
-
landscape(): void;
|
|
422
|
-
/** Alias for {@link StubCtx.orientation}("portrait"). */
|
|
423
|
-
portrait(): void;
|
|
424
|
-
/**
|
|
425
|
-
* Reset to desktop viewport and clear touch mode. Omit device on a later
|
|
426
|
-
* block = **keep**; only hideDevice / clearDevice / device("desktop") clears.
|
|
427
|
-
*/
|
|
428
|
-
hideDevice(): void;
|
|
429
|
-
/** Alias for {@link StubCtx.hideDevice}. */
|
|
430
|
-
clearDevice(): void;
|
|
431
|
-
/** Default camera zoom for rings without their own zoom. */
|
|
432
|
-
zoom(n: number): void;
|
|
433
|
-
/**
|
|
434
|
-
* Default zoomOut for rings in this phase. `false` = keep camera between rings.
|
|
435
|
-
*/
|
|
436
|
-
zoomOut(keep: boolean): void;
|
|
437
|
-
/** Top banner title (waygraph demo card). */
|
|
438
|
-
title(text: string): void;
|
|
439
|
-
/** Alias for {@link StubCtx.title}. */
|
|
440
|
-
banner(text: string): void;
|
|
441
|
-
/**
|
|
442
|
-
* Floating checklist dock side (`left` | `right`). Authors control this in
|
|
443
|
-
* code; click / env / --todo-left|right are fallbacks.
|
|
444
|
-
*/
|
|
445
|
-
todoPos(side: "left" | "right"): void;
|
|
446
|
-
/**
|
|
447
|
-
* Todo-dock UX: compact fold, collision flip, dim-behind-ring.
|
|
448
|
-
* Defaults are smart-on; pass false fields to opt out for this phase.
|
|
449
|
-
* @example
|
|
450
|
-
* ctx.todoDockUi({ compact: false }); // always show full list
|
|
451
|
-
* ctx.todoDockFull(); // shorthand: compact+collision+behindRing off
|
|
452
|
-
*/
|
|
453
|
-
todoDockUi(opts: TodoDockUiOpts): void;
|
|
454
|
-
/** Shorthand: full checklist, no compact/collision/behind-ring for this phase. */
|
|
455
|
-
todoDockFull(): void;
|
|
456
|
-
/** Batch-set rings + episode fixtures. */
|
|
457
|
-
set(partial: {
|
|
458
|
-
highlights?: HighlightStubPhase;
|
|
459
|
-
} & StubPhaseFixtures): void;
|
|
460
|
-
};
|
|
461
|
-
export type StubLifecycleFn<Out extends Checkpoint<string>> = (ctx: StubCtx<Out>) => void | HighlightStubPhase | Promise<void | HighlightStubPhase>;
|
|
462
|
-
/**
|
|
463
|
-
* Block stub authoring:
|
|
464
|
-
* - **preferred:** open lifecycle `stubBefore(ctx) { ctx.todos(...); ctx.ring(...) }`
|
|
465
|
-
* - **shorthand:** static slot map `{ email: { selector, label } }`
|
|
466
|
-
* - **legacy:** `(out) => slotMap` still accepted (treated as highlights only)
|
|
467
|
-
*/
|
|
468
|
-
export type HighlightStubPhaseOrFn<Out extends Checkpoint<string>> = HighlightStubPhase | StubLifecycleFn<Out> | ((out: Out) => HighlightStubPhase);
|
|
469
|
-
/** Result of running a stub phase (rings + episode fixtures). */
|
|
470
|
-
export type StubPhaseResult = {
|
|
471
|
-
highlights: ResolvedHighlight[];
|
|
472
|
-
/** Flattened first-group items (compat). Prefer {@link todoDock}. */
|
|
473
|
-
todos: WaygraphTodoItem[];
|
|
474
|
-
todoIndex?: number;
|
|
475
|
-
todoDock?: TodoDockState;
|
|
476
|
-
/**
|
|
477
|
-
* Todo dock intent for this phase:
|
|
478
|
-
* - `set` - replace dock with {@link todoDock}
|
|
479
|
-
* - `clear` - hide dock (author called hideTodos / empty todos())
|
|
480
|
-
* - `keep` - author omitted todos; demo must leave previous dock alone
|
|
481
|
-
*/
|
|
482
|
-
todoSync?: "set" | "clear" | "keep";
|
|
483
|
-
/** Todo-dock UX for this phase (when author called {@link StubCtx.todoDockUi}). */
|
|
484
|
-
todoDockUi?: TodoDockUiOpts;
|
|
485
|
-
/** Resolved device after this phase (undefined when keep with no prior). */
|
|
486
|
-
device?: DeviceState;
|
|
487
|
-
/**
|
|
488
|
-
* Device intent (mirror todoSync):
|
|
489
|
-
* - `set` - apply {@link device}
|
|
490
|
-
* - `clear` - reset to desktop (hideDevice / clearDevice / device desktop)
|
|
491
|
-
* - `keep` - author omitted device; demo must leave previous alone
|
|
492
|
-
*/
|
|
493
|
-
deviceSync?: "set" | "clear" | "keep";
|
|
494
|
-
zoom?: number;
|
|
495
|
-
zoomOut?: boolean;
|
|
496
|
-
title?: string;
|
|
497
|
-
todoPos?: "left" | "right";
|
|
498
|
-
/** When true, keep other docks (multi-todo). Default false = replace. */
|
|
499
|
-
todoParallel?: boolean;
|
|
500
|
-
};
|
|
501
|
-
/**
|
|
502
|
-
* One yap/slide in a multi-step demo caption sequence.
|
|
503
|
-
* Not block lifecycle - demo pauses (Next / auto-next) between slides.
|
|
504
|
-
*/
|
|
505
|
-
export interface WaygraphSlide extends FixtureDurationFields {
|
|
506
|
-
/** Primary caption (required). */
|
|
507
|
-
caption: string;
|
|
508
|
-
detail?: string;
|
|
509
|
-
tag?: string;
|
|
510
|
-
/** Optional ring while this slide is showing. */
|
|
511
|
-
selector?: string;
|
|
512
|
-
tone?: HighlightTone;
|
|
513
|
-
size?: HighlightSize;
|
|
514
|
-
weight?: HighlightWeight;
|
|
515
|
-
/** Magnify via camera (Screen Studio) while this slide is showing. */
|
|
516
|
-
zoom?: number;
|
|
517
|
-
}
|
|
518
|
-
/**
|
|
519
|
-
* Demo ring tones (iconified).
|
|
520
|
-
* Automation (`auto`) is gray so authored planned/info/warning/danger/success stand out.
|
|
521
|
-
* `orange` added for Blind Pilot's own real, direct user request: a visible
|
|
522
|
-
* color distinction between a real Playwright-driven action (a Block run,
|
|
523
|
-
* or a raw click/type/upload - `auto` gray, already meant exactly this) and
|
|
524
|
-
* a pure DOM inspection (`auto dom` - orange, new) - "gray is waygraph
|
|
525
|
-
* playwright run. orange is dom check."
|
|
526
|
-
*/
|
|
527
|
-
export type HighlightTone = "planned" | "auto" | "info" | "warning" | "danger" | "success" | "orange";
|
|
528
|
-
/** Ring + label scale. */
|
|
529
|
-
export type HighlightSize = "sm" | "md" | "lg";
|
|
530
|
-
/** Label font weight. */
|
|
531
|
-
export type HighlightWeight = "normal" | "bold";
|
|
532
|
-
/** Optional Flow-level defaults for demo rings (episode-wide). Stub/fixture wins. */
|
|
533
|
-
export type HighlightStyleDefaults = {
|
|
534
|
-
tone?: HighlightTone;
|
|
535
|
-
size?: HighlightSize;
|
|
536
|
-
weight?: HighlightWeight;
|
|
537
|
-
};
|
|
538
|
-
/** Apply Flow defaults under per-slot authored values (slot wins when set). */
|
|
539
|
-
export declare function applyHighlightStyleDefaults<T extends {
|
|
540
|
-
tone?: HighlightTone | string;
|
|
541
|
-
size?: HighlightSize | string;
|
|
542
|
-
weight?: HighlightWeight | string;
|
|
543
|
-
}>(slot: T, defaults?: HighlightStyleDefaults | null): T & {
|
|
544
|
-
tone: HighlightTone;
|
|
545
|
-
size: HighlightSize;
|
|
546
|
-
weight: HighlightWeight;
|
|
547
|
-
};
|
|
548
|
-
/** Map author aliases (`error` -> danger) to a canonical tone. */
|
|
549
|
-
export declare function normalizeHighlightTone(raw: unknown): HighlightTone;
|
|
550
|
-
/** Map size aliases to sm/md/lg. */
|
|
551
|
-
export declare function normalizeHighlightSize(raw: unknown): HighlightSize;
|
|
552
|
-
/** Map weight aliases to normal/bold. */
|
|
553
|
-
export declare function normalizeHighlightWeight(raw: unknown): HighlightWeight;
|
|
554
|
-
/** Prefix label with a short ASCII icon for semantic tones. */
|
|
555
|
-
export declare function toneIconPrefix(tone: HighlightTone): string;
|
|
556
|
-
/**
|
|
557
|
-
* Demo pacing for a Flow episode or a Block/compose group.
|
|
558
|
-
* - `blitz` - FF-like: skip theater + short gates (same as fastForwardComposeBlock)
|
|
559
|
-
* - `fast` - shorter gates, keep cursor theater (~0.33x normal)
|
|
560
|
-
* - `normal` - default demo pace (1x)
|
|
561
|
-
* - `slow` - longer autoplay + fixture dwell (~2x)
|
|
562
|
-
* - `number` - scale vs normal when `<= 20` (e.g. `0.5`, `1.5`, `3`);
|
|
563
|
-
* absolute gate/dwell ms when `> 20` (e.g. `4500`)
|
|
564
|
-
*/
|
|
565
|
-
export type DemoPaceName = "blitz" | "fast" | "normal" | "slow";
|
|
566
|
-
export type DemoPace = DemoPaceName | number;
|
|
567
|
-
/** Default fixture dwell when `duration: true`. */
|
|
568
|
-
export declare const FIXTURE_DURATION_MS_DEFAULT = 2000;
|
|
569
|
-
/** Default fixture dwell under `--fast` when duration is enabled. */
|
|
570
|
-
export declare const FIXTURE_DURATION_FAST_MS_DEFAULT = 600;
|
|
571
|
-
/** Default fixture dwell under demo pace `slow` (gaps / wrongs review). */
|
|
572
|
-
export declare const FIXTURE_DURATION_SLOW_MS_DEFAULT = 4000;
|
|
573
|
-
/** @deprecated Prefer FIXTURE_DURATION_MS_DEFAULT */
|
|
574
|
-
export declare const SLIDE_DURATION_MS_DEFAULT = 2000;
|
|
575
|
-
/** @deprecated Prefer FIXTURE_DURATION_FAST_MS_DEFAULT */
|
|
576
|
-
export declare const SLIDE_DURATION_FAST_MS_DEFAULT = 600;
|
|
577
|
-
export declare function normalizeDemoPace(raw: unknown): DemoPace;
|
|
578
|
-
/** Named / numeric pace -> scale vs normal (1 = normal). Absolute ms (>20) maps via default dwell. */
|
|
579
|
-
export declare function demoPaceScale(pace: DemoPace): number;
|
|
580
|
-
export declare function demoPaceIsBlitz(pace: DemoPace): boolean;
|
|
581
|
-
/** True when pace should use the short-gate / fast fixture path (not slow authored). */
|
|
582
|
-
export declare function demoPaceIsFast(pace: DemoPace): boolean;
|
|
583
|
-
export declare function demoPaceIsSlow(pace: DemoPace): boolean;
|
|
584
|
-
/** Autoplay / Next-gate ms for this pace (base is WAYGRAPH_AUTOPLAY_MS or 1800). */
|
|
585
|
-
export declare function demoPaceGateMs(pace: DemoPace, baseAutoplayMs: number): number;
|
|
586
|
-
/**
|
|
587
|
-
* Short chip for the demo panel (e.g. `2.5x`, `4500ms`, `slow`).
|
|
588
|
-
* Always printable - numbers speak in the UI, not only in code.
|
|
589
|
-
*/
|
|
590
|
-
export declare function formatDemoPaceBadge(pace: DemoPace, baseAutoplayMs?: number): string;
|
|
591
|
-
/**
|
|
592
|
-
* Loud one-line pace description for panel + console
|
|
593
|
-
* (e.g. `pace 2.5x (~4500ms gates)` / `pace 4500ms gates (~2.25x)`).
|
|
594
|
-
*/
|
|
595
|
-
export declare function formatDemoPaceLabel(pace: DemoPace, baseAutoplayMs?: number): string;
|
|
596
|
-
/**
|
|
597
|
-
* Resolve min dwell ms for any fixture (stub / flow fixture / yap slide),
|
|
598
|
-
* or `null` when duration is unset (caller keeps legacy timing).
|
|
599
|
-
*
|
|
600
|
-
* Authoring wins: an explicit slow/numeric pace is not crushed by CLI `--fast`
|
|
601
|
-
* (`gatesFast`). `--fast` only shortens when pace is unset/normal.
|
|
602
|
-
*/
|
|
603
|
-
export declare function resolveFixtureDwellMs(fixture: FixtureDurationFields, opts?: {
|
|
604
|
-
gatesFast?: boolean;
|
|
605
|
-
pace?: DemoPace;
|
|
606
|
-
}): number | null;
|
|
607
|
-
/** @deprecated Prefer {@link resolveFixtureDwellMs} */
|
|
608
|
-
export declare function resolveSlideDwellMs(slide: FixtureDurationFields, opts?: {
|
|
609
|
-
gatesFast?: boolean;
|
|
610
|
-
pace?: DemoPace;
|
|
611
|
-
}): number | null;
|
|
612
|
-
/**
|
|
613
|
-
* Effective demo pace for a step: block override > flow episode > normal.
|
|
614
|
-
* Opaque FF / wasFastForward always win as blitz.
|
|
615
|
-
*/
|
|
616
|
-
export declare function resolveStepDemoPace(opts: {
|
|
617
|
-
blockPace?: DemoPace | string | number | null;
|
|
618
|
-
flowPace?: DemoPace | string | number | null;
|
|
619
|
-
fastForward?: boolean;
|
|
620
|
-
wasFastForward?: boolean;
|
|
621
|
-
}): DemoPace;
|
|
622
|
-
export type WaygraphSlidesOrFn<Out extends Checkpoint<string>> = readonly WaygraphSlide[] | ((out: Out) => readonly WaygraphSlide[]);
|
|
623
|
-
/** Demo stub phase names (block instruction + flow fixtures). */
|
|
624
|
-
export type HighlightStubPhaseName = "stubBefore" | "stubAfter" | "stubOnError";
|
|
625
|
-
/** Per-block fixture map attached to a Flow via {@link withHighlightFixtures}. */
|
|
626
|
-
export type HighlightFixtureMap = Record<string, {
|
|
627
|
-
stubBefore?: Record<string, WaygraphHighlightFixture>;
|
|
628
|
-
stubAfter?: Record<string, WaygraphHighlightFixture>;
|
|
629
|
-
/** Fail-path rings (demo step throw) - distinct copy from success stubAfter. */
|
|
630
|
-
stubOnError?: Record<string, WaygraphHighlightFixture>;
|
|
631
|
-
/** Override / supply multi-step yap slides for this block (demo only). */
|
|
632
|
-
slides?: readonly WaygraphSlide[];
|
|
633
|
-
}>;
|
|
634
|
-
/** Legacy array highlight (shimmed to stubAfter keys "0", "1", ...). */
|
|
635
|
-
export interface WaygraphHighlight {
|
|
636
|
-
selector: string;
|
|
637
|
-
label: string;
|
|
638
|
-
tone?: HighlightTone;
|
|
639
|
-
}
|
|
640
|
-
export type ResolvedHighlight = WaygraphHighlightStub;
|
|
641
|
-
/** Normalize checklist dock side. */
|
|
642
|
-
export declare function normalizeTodoPos(raw: unknown): "left" | "right" | undefined;
|
|
643
|
-
/** Normalize dock list style. */
|
|
644
|
-
export declare function normalizeTodoStyle(raw: unknown): TodoListStyle | undefined;
|
|
645
|
-
/**
|
|
646
|
-
* Normalize checklist rows; apply todoIndex for sequential done/current.
|
|
647
|
-
* In checklist / bullets mode, todoIndex is ignored unless items omit explicit done
|
|
648
|
-
* (bullets never auto-mark current).
|
|
649
|
-
*/
|
|
650
|
-
export declare function normalizeTodos(todos: readonly WaygraphTodoInput[] | undefined, todoIndex?: number, style?: TodoListStyle): WaygraphTodoItem[];
|
|
651
|
-
/** Build the floating dock from bag / phase fields. */
|
|
652
|
-
export declare function buildTodoDock(opts: {
|
|
653
|
-
todos?: readonly WaygraphTodoInput[] | undefined;
|
|
654
|
-
todoIndex?: number | undefined;
|
|
655
|
-
todoTitle?: string | undefined;
|
|
656
|
-
todoId?: string | undefined;
|
|
657
|
-
todoStyle?: TodoListStyle | undefined;
|
|
658
|
-
todoGroups?: readonly WaygraphTodoGroupInput[] | undefined;
|
|
659
|
-
todoPos?: "left" | "right" | undefined;
|
|
660
|
-
}): TodoDockState | undefined;
|
|
661
|
-
/**
|
|
662
|
-
* Carry-forward rules for the floating todo dock across demo steps.
|
|
663
|
-
* - clear: author called hideTodos / empty todos()
|
|
664
|
-
* - set: author authored a new dock this phase
|
|
665
|
-
* - keep: author omitted todos — preserve previous dock (do not wipe)
|
|
666
|
-
*/
|
|
667
|
-
export declare function applyTodoPhase(prev: TodoDockState | undefined, phase: {
|
|
668
|
-
todoSync?: "set" | "clear" | "keep";
|
|
669
|
-
todoDock?: TodoDockState;
|
|
670
|
-
todos?: WaygraphTodoItem[];
|
|
671
|
-
todoPos?: "left" | "right";
|
|
672
|
-
todoId?: string;
|
|
673
|
-
}): {
|
|
674
|
-
dock: TodoDockState | undefined;
|
|
675
|
-
sync: "set" | "clear" | "keep";
|
|
676
|
-
};
|
|
677
|
-
/**
|
|
678
|
-
* Advance every sequential group to `index` (capped). Checklist / bullets unchanged.
|
|
679
|
-
* Used while cycling rings / fill/click stubs so the walkthrough moves.
|
|
680
|
-
*/
|
|
681
|
-
export declare function advanceTodoDock(dock: TodoDockState | undefined, index: number): TodoDockState | undefined;
|
|
682
|
-
/**
|
|
683
|
-
* Mark sequential groups complete (all done, none current) - e.g. end of step.
|
|
684
|
-
* Checklist / bullets groups keep explicit done flags.
|
|
685
|
-
*/
|
|
686
|
-
export declare function completeSequentialTodoDock(dock: TodoDockState | undefined): TodoDockState | undefined;
|
|
687
|
-
/**
|
|
688
|
-
* Run an open stub lifecycle (preferred) or resolve a static slot map.
|
|
689
|
-
* Returns rings + episode fixtures (todos / todoIndex / zoom).
|
|
690
|
-
*
|
|
691
|
-
* @example
|
|
692
|
-
* const before = await runStubPhase(block, "stubBefore", { fixtures });
|
|
693
|
-
* // before.todos, before.highlights
|
|
694
|
-
*/
|
|
695
|
-
export declare function runStubPhase(block: Block<any, any>, phase: HighlightStubPhaseName, opts?: {
|
|
696
|
-
out?: Checkpoint<string>;
|
|
697
|
-
error?: unknown;
|
|
698
|
-
mem?: MemPage;
|
|
699
|
-
fixtures?: HighlightFixtureMap;
|
|
700
|
-
}): Promise<StubPhaseResult>;
|
|
701
|
-
/**
|
|
702
|
-
* Sync resolve of highlight slots. Prefer {@link runStubPhase} for open
|
|
703
|
-
* async lifecycles + episode fixtures (todos/zoom).
|
|
704
|
-
*/
|
|
705
|
-
export declare function resolveHighlightSlots(block: Block<any, any>, phase: HighlightStubPhaseName, opts?: {
|
|
706
|
-
out?: Checkpoint<string>;
|
|
707
|
-
fixtures?: HighlightFixtureMap;
|
|
708
|
-
}): ResolvedHighlight[];
|
|
709
|
-
/**
|
|
710
|
-
* Resolve multi-step yap slides: flow fixture `slides` wins when present,
|
|
711
|
-
* else `instruction.slides` (function form allowed).
|
|
712
|
-
*/
|
|
713
|
-
export declare function resolveSlides(block: Block<any, any>, opts?: {
|
|
714
|
-
out?: Checkpoint<string>;
|
|
715
|
-
fixtures?: HighlightFixtureMap;
|
|
716
|
-
}): WaygraphSlide[];
|
|
717
|
-
/** Caption for ring / slide UI (label|caption + optional detail/tag + tone icon). */
|
|
718
|
-
export declare function formatHighlightCaption(h: {
|
|
719
|
-
label?: string;
|
|
720
|
-
caption?: string;
|
|
721
|
-
detail?: string;
|
|
722
|
-
tag?: string;
|
|
723
|
-
tone?: HighlightTone | string;
|
|
724
|
-
}): string;
|
|
725
|
-
/**
|
|
726
|
-
* True when the block authored stubAfter (lifecycle fn, slots, fixtures, or legacy highlights).
|
|
727
|
-
* When true, demo should not use verify-trait fallback.
|
|
728
|
-
*/
|
|
729
|
-
export declare function hasAuthoredStubAfter(block: Block<any, any>, out?: Checkpoint<string>, fixtures?: HighlightFixtureMap): boolean;
|
|
730
|
-
/**
|
|
731
|
-
* True when stubOnError is authored (lifecycle fn and/or rings).
|
|
732
|
-
* Demo fail path only - success never consults this.
|
|
733
|
-
*/
|
|
734
|
-
export declare function hasAuthoredStubOnError(block: Block<any, any>, fixtures?: HighlightFixtureMap): boolean;
|
|
1
|
+
export * from "./highlights/types.js";
|
|
2
|
+
export * from "./highlights/todo-dock.js";
|
|
3
|
+
export * from "./highlights/device.js";
|
|
4
|
+
export * from "./highlights/css.js";
|
|
5
|
+
export * from "./highlights/style.js";
|
|
6
|
+
export * from "./highlights/demo-pace.js";
|
|
7
|
+
export * from "./highlights/merge.js";
|
|
8
|
+
export * from "./highlights/stub-ctx.js";
|
|
9
|
+
export * from "./highlights/run-phase.js";
|