@lostgradient/cinder 0.9.0 → 0.12.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.
Files changed (169) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/components.json +82 -4
  3. package/dist/components/access-gate/index.js +381 -239
  4. package/dist/components/chat/builders.d.ts +17 -8
  5. package/dist/components/chat/conversation-model.d.ts +1 -1
  6. package/dist/components/chat/index.d.ts +1 -1
  7. package/dist/components/chat/index.js +300 -17
  8. package/dist/components/chat/utilities/conversation.d.ts +6 -6
  9. package/dist/components/chat-conversation-header/index.js +19 -6
  10. package/dist/components/chat-conversation-list/index.js +19 -6
  11. package/dist/components/code-block/code-block.css +15 -9
  12. package/dist/components/code-block/code-block.variables.js +8 -2
  13. package/dist/components/confirm-dialog/confirm-dialog.css +2 -0
  14. package/dist/components/confirm-dialog/confirm-dialog.schema.js +10 -1
  15. package/dist/components/confirm-dialog/confirm-dialog.types.d.ts +7 -0
  16. package/dist/components/confirm-dialog/index.js +478 -106
  17. package/dist/components/connection-indicator/connection-indicator.css +136 -0
  18. package/dist/components/connection-indicator/connection-indicator.css.d.ts +1 -0
  19. package/dist/components/connection-indicator/connection-indicator.schema.d.ts +3 -0
  20. package/dist/components/connection-indicator/connection-indicator.schema.js +89 -0
  21. package/dist/components/connection-indicator/connection-indicator.svelte.d.ts +21 -0
  22. package/dist/components/connection-indicator/connection-indicator.types.d.ts +46 -0
  23. package/dist/components/connection-indicator/connection-indicator.variables.d.ts +2 -0
  24. package/dist/components/connection-indicator/connection-indicator.variables.js +61 -0
  25. package/dist/components/connection-indicator/index.d.ts +5 -0
  26. package/dist/components/connection-indicator/index.js +409 -0
  27. package/dist/components/container/container.schema.js +4 -4
  28. package/dist/components/faceted-filter-bar/faceted-filter-bar.schema.js +5 -1
  29. package/dist/components/faceted-filter-bar/faceted-filter-bar.types.d.ts +2 -0
  30. package/dist/components/faceted-filter-bar/index.js +40 -31
  31. package/dist/components/invocation-rule-builder/index.d.ts +1 -1
  32. package/dist/components/invocation-rule-builder/index.js +305 -150
  33. package/dist/components/invocation-rule-builder/invocation-rule-builder.css +28 -0
  34. package/dist/components/invocation-rule-builder/invocation-rule-builder.schema.js +89 -5
  35. package/dist/components/invocation-rule-builder/invocation-rule-builder.svelte.d.ts +2 -1
  36. package/dist/components/invocation-rule-builder/invocation-rule-builder.types.d.ts +114 -16
  37. package/dist/components/navigation-bar/index.js +11 -17
  38. package/dist/components/run-step-timeline/index.d.ts +1 -1
  39. package/dist/components/run-step-timeline/index.js +1052 -560
  40. package/dist/components/run-step-timeline/run-step-branch-disclosure.svelte.d.ts +17 -0
  41. package/dist/components/run-step-timeline/run-step-timeline.css +124 -0
  42. package/dist/components/run-step-timeline/run-step-timeline.schema.js +873 -350
  43. package/dist/components/run-step-timeline/run-step-timeline.svelte.d.ts +1 -15
  44. package/dist/components/run-step-timeline/run-step-timeline.types.d.ts +182 -5
  45. package/dist/components/run-step-timeline/run-step-timeline.utilities.d.ts +60 -0
  46. package/dist/components/schedule-builder/index.d.ts +5 -0
  47. package/dist/components/schedule-builder/index.js +3176 -0
  48. package/dist/components/schedule-builder/schedule-builder.css +121 -0
  49. package/dist/components/schedule-builder/schedule-builder.css.d.ts +1 -0
  50. package/dist/components/schedule-builder/schedule-builder.schema.d.ts +3 -0
  51. package/dist/components/schedule-builder/schedule-builder.schema.js +141 -0
  52. package/dist/components/schedule-builder/schedule-builder.svelte.d.ts +22 -0
  53. package/dist/components/schedule-builder/schedule-builder.types.d.ts +130 -0
  54. package/dist/components/schedule-builder/schedule-builder.utilities.d.ts +78 -0
  55. package/dist/components/schedule-builder/schedule-builder.variables.d.ts +2 -0
  56. package/dist/components/schedule-builder/schedule-builder.variables.js +61 -0
  57. package/dist/components/tag-input/index.js +22 -4
  58. package/dist/components/tag-input/tag-input.schema.js +5 -1
  59. package/dist/components/tag-input/tag-input.types.d.ts +4 -0
  60. package/dist/index.d.ts +6 -2
  61. package/dist/index.js +23069 -20833
  62. package/dist/server/components/access-gate/index.js +2 -1
  63. package/dist/server/components/chat/index.js +4 -4
  64. package/dist/server/components/chat-conversation-header/index.js +5 -5
  65. package/dist/server/components/chat-conversation-list/index.js +3 -3
  66. package/dist/server/components/color-field/index.js +2 -2
  67. package/dist/server/components/confirm-dialog/index.js +7 -2
  68. package/dist/server/components/connection-indicator/index.js +16 -0
  69. package/dist/server/components/data-table/index.js +3 -3
  70. package/dist/server/components/diff-viewer/index.js +4 -3
  71. package/dist/server/components/faceted-filter-bar/index.js +1 -1
  72. package/dist/server/components/invocation-rule-builder/index.js +1 -1
  73. package/dist/server/components/json-schema-editor/index.js +4 -3
  74. package/dist/server/components/navigation-bar/index.js +1 -1
  75. package/dist/server/components/review-editor/index.js +4 -3
  76. package/dist/server/components/run-step-timeline/index.js +1 -1
  77. package/dist/server/components/schedule-builder/index.js +30 -0
  78. package/dist/server/components/side-navigation/index.js +2 -2
  79. package/dist/server/components/table/index.js +3 -3
  80. package/dist/server/components/tag-input/index.js +1 -1
  81. package/dist/server/components/time-field/index.js +5 -3
  82. package/dist/server/index.js +105 -92
  83. package/dist/server/index.server-0sx92swg.js +9 -0
  84. package/dist/server/{index.server-mzzb7dnm.js → index.server-2bbwajb2.js} +1 -1
  85. package/dist/server/{index.server-q7w4jw89.js → index.server-2s5h1d05.js} +2 -2
  86. package/dist/server/{index.server-dg83ke3k.js → index.server-2zdbz3rj.js} +1 -1
  87. package/dist/server/{index.server-0jhra85x.js → index.server-3w72dxz7.js} +4 -4
  88. package/dist/server/{index.server-5tf22d6e.js → index.server-4wx0qven.js} +3 -3
  89. package/dist/server/{index.server-qh9qzd5t.js → index.server-4x4hgvqe.js} +283 -13
  90. package/dist/server/{index.server-c6pe4kaf.js → index.server-5gzyqv78.js} +1 -1
  91. package/dist/server/{index.server-mqt1ngqw.js → index.server-6hnfzc7f.js} +19 -6
  92. package/dist/server/{index.server-894t97kv.js → index.server-7yvpb6z7.js} +4 -4
  93. package/dist/server/index.server-be9bpqeh.js +93 -0
  94. package/dist/server/{index.server-f3z7tpxr.js → index.server-c42b462p.js} +2 -4
  95. package/dist/server/{index.server-7vyzen5x.js → index.server-c5qv3p61.js} +171 -63
  96. package/dist/server/index.server-cch0eed5.js +144 -0
  97. package/dist/server/{index.server-btgb3d56.js → index.server-d5a5ccz7.js} +18 -12
  98. package/dist/server/index.server-g5jgq3jp.js +793 -0
  99. package/dist/server/index.server-gmh5ar16.js +2 -0
  100. package/dist/server/{index.server-0atyznp7.js → index.server-h89zk5ev.js} +7 -7
  101. package/dist/server/{index.server-jxg42jpz.js → index.server-jdcq5zza.js} +7 -7
  102. package/dist/server/{index.server-2dga5yzr.js → index.server-jfrssta6.js} +1 -1
  103. package/dist/server/{index.server-fy068yne.js → index.server-jj76374p.js} +1 -1
  104. package/dist/server/{index.server-39ne5cd1.js → index.server-pxq277t5.js} +32 -1
  105. package/dist/server/index.server-qbkxz7r2.js +750 -0
  106. package/dist/server/{index.server-marjz8ps.js → index.server-tcay903b.js} +3 -2
  107. package/dist/server/{index.server-yz4k36cw.js → index.server-z7hxtqs1.js} +1 -1
  108. package/package.json +87 -97
  109. package/src/components/chat/builders.ts +445 -14
  110. package/src/components/chat/conversation-model.ts +1 -0
  111. package/src/components/chat/index.ts +1 -0
  112. package/src/components/chat/utilities/conversation.ts +33 -15
  113. package/src/components/code-block/code-block.css +15 -9
  114. package/src/components/code-block/code-block.variables.json +7 -1
  115. package/src/components/code-block/code-block.variables.ts +7 -1
  116. package/src/components/confirm-dialog/confirm-dialog.css +2 -0
  117. package/src/components/confirm-dialog/confirm-dialog.schema.json +8 -0
  118. package/src/components/confirm-dialog/confirm-dialog.schema.ts +10 -0
  119. package/src/components/confirm-dialog/confirm-dialog.svelte +31 -3
  120. package/src/components/confirm-dialog/confirm-dialog.types.ts +7 -0
  121. package/src/components/connection-indicator/connection-indicator.css +136 -0
  122. package/src/components/connection-indicator/connection-indicator.examples.json +31 -0
  123. package/src/components/connection-indicator/connection-indicator.schema.json +29 -0
  124. package/src/components/connection-indicator/connection-indicator.schema.ts +36 -0
  125. package/src/components/connection-indicator/connection-indicator.svelte +63 -0
  126. package/src/components/connection-indicator/connection-indicator.types.ts +58 -0
  127. package/src/components/connection-indicator/connection-indicator.variables.json +1 -0
  128. package/src/components/connection-indicator/connection-indicator.variables.ts +3 -0
  129. package/src/components/connection-indicator/index.ts +10 -0
  130. package/src/components/container/container.schema.json +3 -3
  131. package/src/components/container/container.schema.ts +3 -3
  132. package/src/components/faceted-filter-bar/faceted-filter-bar.schema.json +4 -0
  133. package/src/components/faceted-filter-bar/faceted-filter-bar.schema.ts +4 -0
  134. package/src/components/faceted-filter-bar/faceted-filter-bar.svelte +13 -11
  135. package/src/components/faceted-filter-bar/faceted-filter-bar.types.ts +2 -0
  136. package/src/components/invocation-rule-builder/index.ts +4 -0
  137. package/src/components/invocation-rule-builder/invocation-rule-builder.css +28 -0
  138. package/src/components/invocation-rule-builder/invocation-rule-builder.examples.json +6 -0
  139. package/src/components/invocation-rule-builder/invocation-rule-builder.schema.json +76 -3
  140. package/src/components/invocation-rule-builder/invocation-rule-builder.schema.ts +83 -3
  141. package/src/components/invocation-rule-builder/invocation-rule-builder.svelte +326 -113
  142. package/src/components/invocation-rule-builder/invocation-rule-builder.types.ts +157 -43
  143. package/src/components/navigation-bar/navigation-bar.svelte +2 -2
  144. package/src/components/run-step-timeline/index.ts +8 -0
  145. package/src/components/run-step-timeline/run-step-branch-disclosure.svelte +16 -0
  146. package/src/components/run-step-timeline/run-step-timeline.css +124 -0
  147. package/src/components/run-step-timeline/run-step-timeline.examples.json +18 -0
  148. package/src/components/run-step-timeline/run-step-timeline.schema.json +872 -349
  149. package/src/components/run-step-timeline/run-step-timeline.schema.ts +931 -349
  150. package/src/components/run-step-timeline/run-step-timeline.svelte +388 -269
  151. package/src/components/run-step-timeline/run-step-timeline.types.ts +192 -5
  152. package/src/components/run-step-timeline/run-step-timeline.utilities.ts +310 -0
  153. package/src/components/schedule-builder/index.ts +14 -0
  154. package/src/components/schedule-builder/schedule-builder.css +121 -0
  155. package/src/components/schedule-builder/schedule-builder.examples.json +31 -0
  156. package/src/components/schedule-builder/schedule-builder.schema.json +78 -0
  157. package/src/components/schedule-builder/schedule-builder.schema.ts +86 -0
  158. package/src/components/schedule-builder/schedule-builder.svelte +629 -0
  159. package/src/components/schedule-builder/schedule-builder.types.ts +137 -0
  160. package/src/components/schedule-builder/schedule-builder.utilities.ts +344 -0
  161. package/src/components/schedule-builder/schedule-builder.variables.json +1 -0
  162. package/src/components/schedule-builder/schedule-builder.variables.ts +3 -0
  163. package/src/components/tag-input/tag-input.schema.json +4 -0
  164. package/src/components/tag-input/tag-input.schema.ts +4 -0
  165. package/src/components/tag-input/tag-input.svelte +20 -3
  166. package/src/components/tag-input/tag-input.types.ts +4 -0
  167. package/src/index.ts +23 -0
  168. package/src/styles/components.css +2 -0
  169. 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 steps to render.
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: RunStep[];
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 steps to render.
285
- * @schemaObject
462
+ * Ordered list of timeline entries to render — either steps or branch groups.
286
463
  */
287
- steps: RunStepTimelineSchemaStep[];
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,60 @@
1
+ import type { StatusDotStatus } from '../status-dot/status-dot.types.ts';
2
+ import type { RunStep, RunStepBranchGroup, RunStepBranchLane, RunStepBranchLaneOutcome, RunStepStatus, RunStepTimelineEntry } from './run-step-timeline.types.ts';
3
+ /**
4
+ * Relocate resolved compensation steps immediately after the subtree of the
5
+ * sibling they reverse. Unresolved, self-referential, and cyclic links retain
6
+ * consumer order. Multiple compensations retain their relative input order.
7
+ */
8
+ export declare function relocateCompensationSteps(steps: RunStep[]): RunStep[];
9
+ /** Relocate top-level compensations while preserving branch rows as rail entries. */
10
+ export declare function relocateCompensationEntries(entries: RunStepTimelineEntry[]): RunStepTimelineEntry[];
11
+ /** Badge variants used for the per-step status chip. */
12
+ export type RunStepBadgeVariant = 'neutral' | 'success' | 'warning' | 'danger' | 'info' | 'accent';
13
+ /** Map a generic {@link RunStepStatus} onto a StatusDot status token. */
14
+ export declare function statusDotStatus(status: RunStepStatus): StatusDotStatus;
15
+ /** Human-readable label for the StatusDot accessible name. */
16
+ export declare function statusLabel(status: RunStepStatus): string;
17
+ /** Map a {@link RunStepStatus} to a Badge variant for the status chip. */
18
+ export declare function badgeVariant(status: RunStepStatus): RunStepBadgeVariant;
19
+ /** Whether this status is a terminal state (no further changes expected). */
20
+ export declare function isTerminal(status: RunStepStatus): boolean;
21
+ /** Whether this status represents an in-flight ("current") step. */
22
+ export declare function isCurrent(status: RunStepStatus): boolean;
23
+ /** Whether this step should render a progress bar. */
24
+ export declare function hasProgress(step: RunStep): boolean;
25
+ /** Metadata items for a step, as term/definition pairs. */
26
+ export declare function metadataItems(step: RunStep): {
27
+ term: string;
28
+ definition: string;
29
+ }[];
30
+ /** Pluralized "N action(s)" label. */
31
+ export declare function actionsCountLabel(actionsCount: number): string;
32
+ /** Pluralized "N nested step(s) hidden" label for the depth-cap row. */
33
+ export declare function hiddenNestedStepLabel(hiddenStepCount: number): string;
34
+ /** Human-readable label for a branch-lane outcome, used in badges and announcements. */
35
+ export declare function laneOutcomeLabel(outcome: RunStepBranchLaneOutcome): string;
36
+ /** Badge variant for a branch-lane outcome. */
37
+ export declare function laneOutcomeBadgeVariant(outcome: RunStepBranchLaneOutcome): RunStepBadgeVariant;
38
+ /**
39
+ * One-line accessible summary of a branch group's lane outcomes, e.g.
40
+ * "1 won, 2 lost" or "3 lanes racing" while outcomes are still pending.
41
+ */
42
+ export declare function branchOutcomeSummary(lanes: RunStepBranchLane[]): string;
43
+ /**
44
+ * Whether any step in any lane of a branch group is currently in-flight.
45
+ * Iterative (explicit stack) so a deeply-nested lane can't overflow the call
46
+ * stack — this runs before the render path's depth cap.
47
+ */
48
+ export declare function branchGroupHasCurrentStep(group: RunStepBranchGroup): boolean;
49
+ /**
50
+ * Resolve whether a branch group starts collapsed. An explicit `collapsed`
51
+ * wins; otherwise the group collapses once its lane count reaches the
52
+ * threshold (default 3).
53
+ */
54
+ export declare function branchStartsCollapsed(laneCount: number, collapseThreshold: number | undefined, collapsed: boolean | undefined): boolean;
55
+ /**
56
+ * Normalize a step link href to a safe value, or `undefined` when the href is
57
+ * empty, control-character-laden, backslash-bearing, protocol-relative, or a
58
+ * non-http(s) scheme.
59
+ */
60
+ 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 };