@lostgradient/cinder 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/CHANGELOG.md +16 -0
- package/components.json +82 -4
- package/dist/components/access-gate/index.js +381 -239
- package/dist/components/chat/builders.d.ts +17 -8
- package/dist/components/chat/conversation-model.d.ts +1 -1
- package/dist/components/chat/index.d.ts +1 -1
- package/dist/components/chat/index.js +300 -17
- package/dist/components/chat/utilities/conversation.d.ts +6 -6
- package/dist/components/chat-conversation-header/index.js +19 -6
- package/dist/components/chat-conversation-list/index.js +19 -6
- package/dist/components/connection-indicator/connection-indicator.css +136 -0
- package/dist/components/connection-indicator/connection-indicator.css.d.ts +1 -0
- package/dist/components/connection-indicator/connection-indicator.schema.d.ts +3 -0
- package/dist/components/connection-indicator/connection-indicator.schema.js +89 -0
- package/dist/components/connection-indicator/connection-indicator.svelte.d.ts +21 -0
- package/dist/components/connection-indicator/connection-indicator.types.d.ts +46 -0
- package/dist/components/connection-indicator/connection-indicator.variables.d.ts +2 -0
- package/dist/components/connection-indicator/connection-indicator.variables.js +61 -0
- package/dist/components/connection-indicator/index.d.ts +5 -0
- package/dist/components/connection-indicator/index.js +409 -0
- package/dist/components/container/container.schema.js +4 -4
- package/dist/components/invocation-rule-builder/index.d.ts +1 -1
- package/dist/components/invocation-rule-builder/index.js +305 -150
- package/dist/components/invocation-rule-builder/invocation-rule-builder.css +28 -0
- package/dist/components/invocation-rule-builder/invocation-rule-builder.schema.js +89 -5
- package/dist/components/invocation-rule-builder/invocation-rule-builder.svelte.d.ts +2 -1
- package/dist/components/invocation-rule-builder/invocation-rule-builder.types.d.ts +114 -16
- package/dist/components/run-step-timeline/index.d.ts +1 -1
- package/dist/components/run-step-timeline/index.js +992 -559
- package/dist/components/run-step-timeline/run-step-branch-disclosure.svelte.d.ts +17 -0
- package/dist/components/run-step-timeline/run-step-timeline.css +124 -0
- package/dist/components/run-step-timeline/run-step-timeline.schema.js +873 -350
- package/dist/components/run-step-timeline/run-step-timeline.svelte.d.ts +1 -15
- package/dist/components/run-step-timeline/run-step-timeline.types.d.ts +182 -5
- package/dist/components/run-step-timeline/run-step-timeline.utilities.d.ts +52 -0
- package/dist/components/schedule-builder/index.d.ts +5 -0
- package/dist/components/schedule-builder/index.js +3176 -0
- package/dist/components/schedule-builder/schedule-builder.css +121 -0
- package/dist/components/schedule-builder/schedule-builder.css.d.ts +1 -0
- package/dist/components/schedule-builder/schedule-builder.schema.d.ts +3 -0
- package/dist/components/schedule-builder/schedule-builder.schema.js +141 -0
- package/dist/components/schedule-builder/schedule-builder.svelte.d.ts +22 -0
- package/dist/components/schedule-builder/schedule-builder.types.d.ts +130 -0
- package/dist/components/schedule-builder/schedule-builder.utilities.d.ts +78 -0
- package/dist/components/schedule-builder/schedule-builder.variables.d.ts +2 -0
- package/dist/components/schedule-builder/schedule-builder.variables.js +61 -0
- package/dist/components/tag-input/index.js +22 -4
- package/dist/components/tag-input/tag-input.schema.js +5 -1
- package/dist/components/tag-input/tag-input.types.d.ts +4 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +22704 -20574
- package/dist/server/components/access-gate/index.js +2 -1
- package/dist/server/components/chat/index.js +4 -4
- package/dist/server/components/chat-conversation-header/index.js +5 -5
- package/dist/server/components/chat-conversation-list/index.js +3 -3
- package/dist/server/components/connection-indicator/index.js +16 -0
- package/dist/server/components/data-table/index.js +3 -3
- package/dist/server/components/diff-viewer/index.js +4 -3
- package/dist/server/components/invocation-rule-builder/index.js +1 -1
- package/dist/server/components/json-schema-editor/index.js +4 -3
- package/dist/server/components/review-editor/index.js +4 -3
- package/dist/server/components/run-step-timeline/index.js +1 -1
- package/dist/server/components/schedule-builder/index.js +30 -0
- package/dist/server/components/side-navigation/index.js +2 -2
- package/dist/server/components/table/index.js +3 -3
- package/dist/server/components/tag-input/index.js +1 -1
- package/dist/server/components/time-field/index.js +5 -3
- package/dist/server/index.js +100 -87
- package/dist/server/index.server-0sx92swg.js +9 -0
- package/dist/server/{index.server-mzzb7dnm.js → index.server-2bbwajb2.js} +1 -1
- package/dist/server/{index.server-q7w4jw89.js → index.server-2s5h1d05.js} +2 -2
- package/dist/server/{index.server-dg83ke3k.js → index.server-2zdbz3rj.js} +1 -1
- package/dist/server/{index.server-0jhra85x.js → index.server-3w72dxz7.js} +4 -4
- package/dist/server/{index.server-qh9qzd5t.js → index.server-4x4hgvqe.js} +283 -13
- package/dist/server/{index.server-c6pe4kaf.js → index.server-5gzyqv78.js} +1 -1
- package/dist/server/{index.server-mqt1ngqw.js → index.server-6hnfzc7f.js} +19 -6
- package/dist/server/index.server-be9bpqeh.js +93 -0
- package/dist/server/{index.server-f3z7tpxr.js → index.server-c42b462p.js} +2 -4
- package/dist/server/{index.server-7vyzen5x.js → index.server-c5qv3p61.js} +171 -63
- package/dist/server/index.server-cch0eed5.js +144 -0
- package/dist/server/index.server-gmh5ar16.js +2 -0
- package/dist/server/{index.server-0atyznp7.js → index.server-h89zk5ev.js} +7 -7
- package/dist/server/{index.server-jxg42jpz.js → index.server-jdcq5zza.js} +7 -7
- package/dist/server/{index.server-2dga5yzr.js → index.server-jfrssta6.js} +1 -1
- package/dist/server/{index.server-fy068yne.js → index.server-jj76374p.js} +1 -1
- package/dist/server/index.server-qbkxz7r2.js +750 -0
- package/dist/server/{index.server-marjz8ps.js → index.server-tcay903b.js} +3 -2
- package/dist/server/index.server-z38bxms8.js +734 -0
- package/dist/server/{index.server-yz4k36cw.js → index.server-z7hxtqs1.js} +1 -1
- package/package.json +66 -3
- package/src/components/chat/builders.ts +445 -14
- package/src/components/chat/conversation-model.ts +1 -0
- package/src/components/chat/index.ts +1 -0
- package/src/components/chat/utilities/conversation.ts +33 -15
- package/src/components/connection-indicator/connection-indicator.css +136 -0
- package/src/components/connection-indicator/connection-indicator.examples.json +31 -0
- package/src/components/connection-indicator/connection-indicator.schema.json +29 -0
- package/src/components/connection-indicator/connection-indicator.schema.ts +36 -0
- package/src/components/connection-indicator/connection-indicator.svelte +63 -0
- package/src/components/connection-indicator/connection-indicator.types.ts +58 -0
- package/src/components/connection-indicator/connection-indicator.variables.json +1 -0
- package/src/components/connection-indicator/connection-indicator.variables.ts +3 -0
- package/src/components/connection-indicator/index.ts +10 -0
- package/src/components/container/container.schema.json +3 -3
- package/src/components/container/container.schema.ts +3 -3
- package/src/components/invocation-rule-builder/index.ts +4 -0
- package/src/components/invocation-rule-builder/invocation-rule-builder.css +28 -0
- package/src/components/invocation-rule-builder/invocation-rule-builder.examples.json +6 -0
- package/src/components/invocation-rule-builder/invocation-rule-builder.schema.json +76 -3
- package/src/components/invocation-rule-builder/invocation-rule-builder.schema.ts +83 -3
- package/src/components/invocation-rule-builder/invocation-rule-builder.svelte +326 -113
- package/src/components/invocation-rule-builder/invocation-rule-builder.types.ts +157 -43
- package/src/components/run-step-timeline/index.ts +8 -0
- package/src/components/run-step-timeline/run-step-branch-disclosure.svelte +16 -0
- package/src/components/run-step-timeline/run-step-timeline.css +124 -0
- package/src/components/run-step-timeline/run-step-timeline.examples.json +18 -0
- package/src/components/run-step-timeline/run-step-timeline.schema.json +872 -349
- package/src/components/run-step-timeline/run-step-timeline.schema.ts +931 -349
- package/src/components/run-step-timeline/run-step-timeline.svelte +387 -268
- package/src/components/run-step-timeline/run-step-timeline.types.ts +192 -5
- package/src/components/run-step-timeline/run-step-timeline.utilities.ts +242 -0
- package/src/components/schedule-builder/index.ts +14 -0
- package/src/components/schedule-builder/schedule-builder.css +121 -0
- package/src/components/schedule-builder/schedule-builder.examples.json +31 -0
- package/src/components/schedule-builder/schedule-builder.schema.json +78 -0
- package/src/components/schedule-builder/schedule-builder.schema.ts +86 -0
- package/src/components/schedule-builder/schedule-builder.svelte +629 -0
- package/src/components/schedule-builder/schedule-builder.types.ts +137 -0
- package/src/components/schedule-builder/schedule-builder.utilities.ts +344 -0
- package/src/components/schedule-builder/schedule-builder.variables.json +1 -0
- package/src/components/schedule-builder/schedule-builder.variables.ts +3 -0
- package/src/components/tag-input/tag-input.schema.json +4 -0
- package/src/components/tag-input/tag-input.schema.ts +4 -0
- package/src/components/tag-input/tag-input.svelte +20 -3
- package/src/components/tag-input/tag-input.types.ts +4 -0
- package/src/index.ts +23 -0
- package/src/styles/components.css +2 -0
- package/dist/server/index.server-qk1h0n02.js +0 -393
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @cinder
|
|
3
|
-
* @category data-display
|
|
4
|
-
* @status stable
|
|
5
|
-
* @purpose Ordered step-by-step execution rail that visualizes async run state with per-step status, durations, retries, optional progress, and expandable detail panels.
|
|
6
|
-
* @tag timeline
|
|
7
|
-
* @tag progress
|
|
8
|
-
* @tag execution
|
|
9
|
-
* @useWhen Displaying the live or completed state of a multi-step async operation: CI jobs, workflow runs, import pipelines, or deployments.
|
|
10
|
-
* @useWhen Showing a sequence where one step is currently active and prior steps have streamed in over time.
|
|
11
|
-
* @avoidWhen Guiding users through an interactive wizard where they choose what to do next — use steps instead.
|
|
12
|
-
* @avoidWhen Showing a flat timestamp-first event log without structured step state — use timeline instead.
|
|
13
|
-
* @related timeline, steps, status-dot, progress, badge, collapsible
|
|
14
|
-
*/
|
|
15
|
-
export type { RunStep, RunStepDetail, RunStepLink, RunStepStatus, RunStepTimelineProps, } from './run-step-timeline.types.ts';
|
|
1
|
+
export type { RunStep, RunStepBranchGroup, RunStepBranchLane, RunStepBranchLaneOutcome, RunStepDetail, RunStepLink, RunStepStatus, RunStepTimelineEntry, RunStepTimelineProps, } from './run-step-timeline.types.ts';
|
|
16
2
|
import type { RunStepTimelineProps } from './run-step-timeline.types.ts';
|
|
17
3
|
declare const RunStepTimeline: import("svelte").Component<RunStepTimelineProps, {}, "">;
|
|
18
4
|
type RunStepTimeline = ReturnType<typeof RunStepTimeline>;
|
|
@@ -91,11 +91,91 @@ export type RunStep = {
|
|
|
91
91
|
* Optional link to logs, traces, or a step detail route.
|
|
92
92
|
*/
|
|
93
93
|
link?: RunStepLink | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Marks a step that was speculatively executed and then unwound (rolled
|
|
96
|
+
* back). Orthogonal to `status`: the step keeps its real terminal status
|
|
97
|
+
* underneath, but renders struck-through and de-emphasized while staying
|
|
98
|
+
* inspectable. A rewound step announces its unwound state to assistive
|
|
99
|
+
* technology in addition to its status.
|
|
100
|
+
*/
|
|
101
|
+
rewound?: boolean | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* Id of the forward step that this step compensates (reverses), as in a
|
|
104
|
+
* saga rollback. When set, the step renders inset beneath its forward step
|
|
105
|
+
* with a dashed reversal connector. The referenced id should be a sibling
|
|
106
|
+
* step's `id`; an unmatched id renders the step in place without inset.
|
|
107
|
+
*/
|
|
108
|
+
compensates?: string | undefined;
|
|
94
109
|
/**
|
|
95
110
|
* Nested child-workflow steps rendered as indented lanes.
|
|
96
111
|
*/
|
|
97
112
|
children?: RunStep[] | undefined;
|
|
98
113
|
};
|
|
114
|
+
/**
|
|
115
|
+
* Outcome of a single sub-lane within a {@link RunStepBranchGroup}.
|
|
116
|
+
*
|
|
117
|
+
* - `won` — this lane produced the committed result; emphasized.
|
|
118
|
+
* - `lost` — this lane was superseded by the winner; muted.
|
|
119
|
+
* - `settled` — this lane completed without a competitive winner/loser
|
|
120
|
+
* distinction (e.g. all lanes were kept). Neutral emphasis.
|
|
121
|
+
*
|
|
122
|
+
* Omit the outcome entirely while a race is still in flight.
|
|
123
|
+
*/
|
|
124
|
+
export type RunStepBranchLaneOutcome = 'won' | 'lost' | 'settled';
|
|
125
|
+
/**
|
|
126
|
+
* One parallel sub-lane inside a {@link RunStepBranchGroup}. Each lane is an
|
|
127
|
+
* ordered sequence of steps that executed concurrently with its siblings.
|
|
128
|
+
*/
|
|
129
|
+
export type RunStepBranchLane = {
|
|
130
|
+
/** Stable identity; used as the keyed list identity within the group. */
|
|
131
|
+
id: string;
|
|
132
|
+
/** Optional display label for the lane (e.g. the candidate or strategy name). */
|
|
133
|
+
label?: string | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* Competitive outcome for the lane. Drives winner emphasis / loser muting.
|
|
136
|
+
* Omit while the branch is still racing.
|
|
137
|
+
*/
|
|
138
|
+
outcome?: RunStepBranchLaneOutcome | undefined;
|
|
139
|
+
/** Ordered steps that ran within this lane. */
|
|
140
|
+
steps: RunStep[];
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* A branch/coordination group: a single timeline entry that fans out into N
|
|
144
|
+
* parallel sub-lanes (e.g. a speculative race or a scatter/gather). Rendered
|
|
145
|
+
* with the lanes side by side conceptually — the winning lane emphasized and
|
|
146
|
+
* the losers muted — and collapsible. Distinguished from a plain {@link RunStep}
|
|
147
|
+
* by its `kind` discriminator, mirroring the additive-entry pattern used by
|
|
148
|
+
* other cinder timelines.
|
|
149
|
+
*
|
|
150
|
+
* @schemaObject
|
|
151
|
+
*/
|
|
152
|
+
export type RunStepBranchGroup = {
|
|
153
|
+
/** Discriminator identifying a branch-group entry. */
|
|
154
|
+
kind: 'branch';
|
|
155
|
+
/** Stable identity; used as the keyed list identity. */
|
|
156
|
+
id: string;
|
|
157
|
+
/** Display label for the branch group (e.g. "Race deploy candidates"). */
|
|
158
|
+
label: string;
|
|
159
|
+
/** The parallel sub-lanes. Order is presentational only. */
|
|
160
|
+
lanes: RunStepBranchLane[];
|
|
161
|
+
/**
|
|
162
|
+
* Collapse the group by default once the lane count reaches this threshold.
|
|
163
|
+
* Defaults to 3. Set to a large number to effectively disable auto-collapse.
|
|
164
|
+
*/
|
|
165
|
+
collapseThreshold?: number | undefined;
|
|
166
|
+
/**
|
|
167
|
+
* Force the initial collapsed (`true`) or expanded (`false`) state,
|
|
168
|
+
* overriding `collapseThreshold`. The group remains user-togglable.
|
|
169
|
+
*/
|
|
170
|
+
collapsed?: boolean | undefined;
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* A single top-level entry in a RunStepTimeline: either a normal step or a
|
|
174
|
+
* branch/coordination group. Existing `RunStep[]` arrays remain valid because
|
|
175
|
+
* the union is additive and branch groups are opt-in via the `kind`
|
|
176
|
+
* discriminator.
|
|
177
|
+
*/
|
|
178
|
+
export type RunStepTimelineEntry = RunStep | RunStepBranchGroup;
|
|
99
179
|
/**
|
|
100
180
|
* Schema generator surface for one top-level step.
|
|
101
181
|
* Public `RunStep` stays recursive; this finite shape keeps JSON Schema generation bounded.
|
|
@@ -150,6 +230,10 @@ export type RunStepTimelineSchemaStep = {
|
|
|
150
230
|
* Optional link to logs, traces, or a step detail route.
|
|
151
231
|
*/
|
|
152
232
|
link?: RunStepLink | undefined;
|
|
233
|
+
/** Marks a step that was speculatively executed and then unwound (rolled back). */
|
|
234
|
+
rewound?: boolean | undefined;
|
|
235
|
+
/** Id of the forward step that this step compensates (reverses). */
|
|
236
|
+
compensates?: string | undefined;
|
|
153
237
|
/**
|
|
154
238
|
* Schema-bounded nested child-workflow steps.
|
|
155
239
|
*/
|
|
@@ -184,6 +268,10 @@ export type RunStepTimelineSchemaChildStep = {
|
|
|
184
268
|
details?: RunStepDetail[] | undefined;
|
|
185
269
|
/** Optional link to logs, traces, or a step detail route. */
|
|
186
270
|
link?: RunStepLink | undefined;
|
|
271
|
+
/** Marks a step that was speculatively executed and then unwound (rolled back). */
|
|
272
|
+
rewound?: boolean | undefined;
|
|
273
|
+
/** Id of the forward step that this step compensates (reverses). */
|
|
274
|
+
compensates?: string | undefined;
|
|
187
275
|
/**
|
|
188
276
|
* Nested child-workflow steps rendered at depth 2.
|
|
189
277
|
*/
|
|
@@ -218,6 +306,10 @@ export type RunStepTimelineSchemaGrandchildStep = {
|
|
|
218
306
|
details?: RunStepDetail[] | undefined;
|
|
219
307
|
/** Optional link to logs, traces, or a step detail route. */
|
|
220
308
|
link?: RunStepLink | undefined;
|
|
309
|
+
/** Marks a step that was speculatively executed and then unwound (rolled back). */
|
|
310
|
+
rewound?: boolean | undefined;
|
|
311
|
+
/** Id of the forward step that this step compensates (reverses). */
|
|
312
|
+
compensates?: string | undefined;
|
|
221
313
|
/**
|
|
222
314
|
* Nested child-workflow steps rendered at depth 3.
|
|
223
315
|
*/
|
|
@@ -252,7 +344,91 @@ export type RunStepTimelineSchemaGreatGrandchildStep = {
|
|
|
252
344
|
details?: RunStepDetail[] | undefined;
|
|
253
345
|
/** Optional link to logs, traces, or a step detail route. */
|
|
254
346
|
link?: RunStepLink | undefined;
|
|
347
|
+
/** Marks a step that was speculatively executed and then unwound (rolled back). */
|
|
348
|
+
rewound?: boolean | undefined;
|
|
349
|
+
/** Id of the forward step that this step compensates (reverses). */
|
|
350
|
+
compensates?: string | undefined;
|
|
255
351
|
};
|
|
352
|
+
/**
|
|
353
|
+
* Schema-facing step used for branch-lane sequences. Lane steps are
|
|
354
|
+
* `RunStep[]` at runtime and can nest, so this type carries an optional
|
|
355
|
+
* `children` array of the same shape (recursive at the type level, for
|
|
356
|
+
* consumer-typing convenience) that validates lane-step children as steps.
|
|
357
|
+
* The generated JSON Schema depth-caps this nesting to the same rendered depth
|
|
358
|
+
* as the main rail; the recursive TYPE is the ergonomic mirror of that
|
|
359
|
+
* depth-capped schema, not an assertion that arbitrary depth is rendered.
|
|
360
|
+
* @schemaObject
|
|
361
|
+
*/
|
|
362
|
+
export type RunStepTimelineSchemaLaneStep = {
|
|
363
|
+
/** Stable identity; used as the keyed list identity. */
|
|
364
|
+
id: string;
|
|
365
|
+
/** Display label for this step. */
|
|
366
|
+
label: string;
|
|
367
|
+
/** Generic execution state. */
|
|
368
|
+
status: RunStepStatus;
|
|
369
|
+
/** ISO datetime string for when this step started. */
|
|
370
|
+
startTime?: string | undefined;
|
|
371
|
+
/** ISO datetime string for when this step ended. */
|
|
372
|
+
endTime?: string | undefined;
|
|
373
|
+
/** Human-readable duration string, e.g. "1m 23s". */
|
|
374
|
+
duration?: string | undefined;
|
|
375
|
+
/** Number of attempts made so far, including any retries. */
|
|
376
|
+
attemptCount?: number | undefined;
|
|
377
|
+
/** Number of actions associated with this step. */
|
|
378
|
+
actionsCount?: number | undefined;
|
|
379
|
+
/** Optional determinate progress value between 0 and `progressMax`. */
|
|
380
|
+
progress?: number | undefined;
|
|
381
|
+
/** Maximum value for the progress bar. Defaults to 100. */
|
|
382
|
+
progressMax?: number | undefined;
|
|
383
|
+
/** Expandable detail panels (logs, payloads, errors) shown inline. */
|
|
384
|
+
details?: RunStepDetail[] | undefined;
|
|
385
|
+
/** Optional link to logs, traces, or a step detail route. */
|
|
386
|
+
link?: RunStepLink | undefined;
|
|
387
|
+
/** Marks a step that was speculatively executed and then unwound (rolled back). */
|
|
388
|
+
rewound?: boolean | undefined;
|
|
389
|
+
/** Id of the forward step that this step compensates (reverses). */
|
|
390
|
+
compensates?: string | undefined;
|
|
391
|
+
/** Nested steps within a branch lane. */
|
|
392
|
+
children?: RunStepTimelineSchemaLaneStep[] | undefined;
|
|
393
|
+
};
|
|
394
|
+
/**
|
|
395
|
+
* Schema-bounded sub-lane inside a {@link RunStepTimelineSchemaBranchGroup}.
|
|
396
|
+
* Lane steps are bounded to a leaf surface so JSON Schema generation stays
|
|
397
|
+
* finite.
|
|
398
|
+
* @schemaObject
|
|
399
|
+
*/
|
|
400
|
+
export type RunStepTimelineSchemaBranchLane = {
|
|
401
|
+
/** Stable identity; used as the keyed list identity within the group. */
|
|
402
|
+
id: string;
|
|
403
|
+
/** Optional display label for the lane. */
|
|
404
|
+
label?: string | undefined;
|
|
405
|
+
/** Competitive outcome for the lane. Omit while the branch is still racing. */
|
|
406
|
+
outcome?: RunStepBranchLaneOutcome | undefined;
|
|
407
|
+
/** Ordered steps that ran within this lane. */
|
|
408
|
+
steps: RunStepTimelineSchemaLaneStep[];
|
|
409
|
+
};
|
|
410
|
+
/**
|
|
411
|
+
* Schema generator surface for one top-level branch/coordination group.
|
|
412
|
+
* @schemaObject
|
|
413
|
+
*/
|
|
414
|
+
export type RunStepTimelineSchemaBranchGroup = {
|
|
415
|
+
/** Discriminator identifying a branch-group entry. */
|
|
416
|
+
kind: 'branch';
|
|
417
|
+
/** Stable identity; used as the keyed list identity. */
|
|
418
|
+
id: string;
|
|
419
|
+
/** Display label for the branch group. */
|
|
420
|
+
label: string;
|
|
421
|
+
/** The parallel sub-lanes. */
|
|
422
|
+
lanes: RunStepTimelineSchemaBranchLane[];
|
|
423
|
+
/** Collapse the group by default once the lane count reaches this threshold. Defaults to 3. */
|
|
424
|
+
collapseThreshold?: number | undefined;
|
|
425
|
+
/** Force the initial collapsed (`true`) or expanded (`false`) state. */
|
|
426
|
+
collapsed?: boolean | undefined;
|
|
427
|
+
};
|
|
428
|
+
/**
|
|
429
|
+
* A single schema-bounded top-level entry: either a step or a branch group.
|
|
430
|
+
*/
|
|
431
|
+
export type RunStepTimelineSchemaEntry = RunStepTimelineSchemaStep | RunStepTimelineSchemaBranchGroup;
|
|
256
432
|
/**
|
|
257
433
|
* Props for the RunStepTimeline component.
|
|
258
434
|
*
|
|
@@ -262,10 +438,12 @@ export type RunStepTimelineSchemaGreatGrandchildStep = {
|
|
|
262
438
|
*/
|
|
263
439
|
export type RunStepTimelineProps = Omit<HTMLAttributes<HTMLOListElement>, 'class' | 'children'> & {
|
|
264
440
|
/**
|
|
265
|
-
* Ordered list of
|
|
441
|
+
* Ordered list of timeline entries to render. Each entry is either a
|
|
442
|
+
* {@link RunStep} or a {@link RunStepBranchGroup}. Plain `RunStep[]` arrays
|
|
443
|
+
* remain valid — branch groups are opt-in via the `kind` discriminator.
|
|
266
444
|
* @schemaObject
|
|
267
445
|
*/
|
|
268
|
-
steps:
|
|
446
|
+
steps: RunStepTimelineEntry[];
|
|
269
447
|
/**
|
|
270
448
|
* Accessible label for the timeline list.
|
|
271
449
|
* Used as `aria-label` when `aria-labelledby` is absent.
|
|
@@ -281,10 +459,9 @@ export type RunStepTimelineProps = Omit<HTMLAttributes<HTMLOListElement>, 'class
|
|
|
281
459
|
/** Schema generator surface for RunStepTimeline — excludes snippet props. */
|
|
282
460
|
export interface RunStepTimelineSchemaProps {
|
|
283
461
|
/**
|
|
284
|
-
* Ordered list of
|
|
285
|
-
* @schemaObject
|
|
462
|
+
* Ordered list of timeline entries to render — either steps or branch groups.
|
|
286
463
|
*/
|
|
287
|
-
steps:
|
|
464
|
+
steps: RunStepTimelineSchemaEntry[];
|
|
288
465
|
/** Accessible label for the timeline list. */
|
|
289
466
|
label?: string | undefined;
|
|
290
467
|
/** Additional CSS classes applied to the root element. */
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { StatusDotStatus } from '../status-dot/status-dot.types.ts';
|
|
2
|
+
import type { RunStep, RunStepBranchGroup, RunStepBranchLane, RunStepBranchLaneOutcome, RunStepStatus } from './run-step-timeline.types.ts';
|
|
3
|
+
/** Badge variants used for the per-step status chip. */
|
|
4
|
+
export type RunStepBadgeVariant = 'neutral' | 'success' | 'warning' | 'danger' | 'info' | 'accent';
|
|
5
|
+
/** Map a generic {@link RunStepStatus} onto a StatusDot status token. */
|
|
6
|
+
export declare function statusDotStatus(status: RunStepStatus): StatusDotStatus;
|
|
7
|
+
/** Human-readable label for the StatusDot accessible name. */
|
|
8
|
+
export declare function statusLabel(status: RunStepStatus): string;
|
|
9
|
+
/** Map a {@link RunStepStatus} to a Badge variant for the status chip. */
|
|
10
|
+
export declare function badgeVariant(status: RunStepStatus): RunStepBadgeVariant;
|
|
11
|
+
/** Whether this status is a terminal state (no further changes expected). */
|
|
12
|
+
export declare function isTerminal(status: RunStepStatus): boolean;
|
|
13
|
+
/** Whether this status represents an in-flight ("current") step. */
|
|
14
|
+
export declare function isCurrent(status: RunStepStatus): boolean;
|
|
15
|
+
/** Whether this step should render a progress bar. */
|
|
16
|
+
export declare function hasProgress(step: RunStep): boolean;
|
|
17
|
+
/** Metadata items for a step, as term/definition pairs. */
|
|
18
|
+
export declare function metadataItems(step: RunStep): {
|
|
19
|
+
term: string;
|
|
20
|
+
definition: string;
|
|
21
|
+
}[];
|
|
22
|
+
/** Pluralized "N action(s)" label. */
|
|
23
|
+
export declare function actionsCountLabel(actionsCount: number): string;
|
|
24
|
+
/** Pluralized "N nested step(s) hidden" label for the depth-cap row. */
|
|
25
|
+
export declare function hiddenNestedStepLabel(hiddenStepCount: number): string;
|
|
26
|
+
/** Human-readable label for a branch-lane outcome, used in badges and announcements. */
|
|
27
|
+
export declare function laneOutcomeLabel(outcome: RunStepBranchLaneOutcome): string;
|
|
28
|
+
/** Badge variant for a branch-lane outcome. */
|
|
29
|
+
export declare function laneOutcomeBadgeVariant(outcome: RunStepBranchLaneOutcome): RunStepBadgeVariant;
|
|
30
|
+
/**
|
|
31
|
+
* One-line accessible summary of a branch group's lane outcomes, e.g.
|
|
32
|
+
* "1 won, 2 lost" or "3 lanes racing" while outcomes are still pending.
|
|
33
|
+
*/
|
|
34
|
+
export declare function branchOutcomeSummary(lanes: RunStepBranchLane[]): string;
|
|
35
|
+
/**
|
|
36
|
+
* Whether any step in any lane of a branch group is currently in-flight.
|
|
37
|
+
* Iterative (explicit stack) so a deeply-nested lane can't overflow the call
|
|
38
|
+
* stack — this runs before the render path's depth cap.
|
|
39
|
+
*/
|
|
40
|
+
export declare function branchGroupHasCurrentStep(group: RunStepBranchGroup): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Resolve whether a branch group starts collapsed. An explicit `collapsed`
|
|
43
|
+
* wins; otherwise the group collapses once its lane count reaches the
|
|
44
|
+
* threshold (default 3).
|
|
45
|
+
*/
|
|
46
|
+
export declare function branchStartsCollapsed(laneCount: number, collapseThreshold: number | undefined, collapsed: boolean | undefined): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Normalize a step link href to a safe value, or `undefined` when the href is
|
|
49
|
+
* empty, control-character-laden, backslash-bearing, protocol-relative, or a
|
|
50
|
+
* non-http(s) scheme.
|
|
51
|
+
*/
|
|
52
|
+
export declare function safeStepLinkHref(href: string): string | undefined;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './schedule-builder.css';
|
|
2
|
+
import ScheduleBuilder from './schedule-builder.svelte';
|
|
3
|
+
export default ScheduleBuilder;
|
|
4
|
+
export type { ScheduleAuthoringMode, ScheduleBuilderProps, ScheduleBuilderSchemaProps, ScheduleFire, ScheduleIntervalUnit, ScheduleValue, ScheduleValueSchema, } from './schedule-builder.types.ts';
|
|
5
|
+
export { ScheduleBuilder };
|