@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
|
@@ -160,6 +160,34 @@
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
/* ---- Typed condition value controls (conditions-only mode) ---- */
|
|
164
|
+
|
|
165
|
+
/* Enum values reuse the select chrome but keep the value input's wider flex-basis. */
|
|
166
|
+
.cinder-invocation-rule-builder__condition-value-select {
|
|
167
|
+
flex: 2 1 10rem;
|
|
168
|
+
min-inline-size: 6rem;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.cinder-invocation-rule-builder__condition-value-checkbox {
|
|
172
|
+
flex: 0 0 auto;
|
|
173
|
+
inline-size: 1.125rem;
|
|
174
|
+
block-size: 1.125rem;
|
|
175
|
+
margin: 0;
|
|
176
|
+
accent-color: var(--cinder-accent);
|
|
177
|
+
cursor: pointer;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.cinder-invocation-rule-builder__condition-value-checkbox:focus-visible {
|
|
181
|
+
outline: var(--cinder-ring-width) solid transparent;
|
|
182
|
+
box-shadow: var(--_cinder-focus-ring-shadow);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@media (forced-colors: active) {
|
|
186
|
+
.cinder-invocation-rule-builder__condition-value-checkbox:focus-visible {
|
|
187
|
+
outline: var(--cinder-ring-width) solid ButtonText;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
163
191
|
/* ---- Action rows ---- */
|
|
164
192
|
|
|
165
193
|
.cinder-invocation-rule-builder__actions {
|
|
@@ -133,6 +133,32 @@ var schema = {
|
|
|
133
133
|
label: {
|
|
134
134
|
type: "string",
|
|
135
135
|
description: "The human-readable label shown in the select."
|
|
136
|
+
},
|
|
137
|
+
type: {
|
|
138
|
+
enum: ["string", "number", "boolean", "enum"],
|
|
139
|
+
description: `The value type this option represents when used as a field option in
|
|
140
|
+
conditions-only mode (\`mode="conditions"\`). Defaults to \`'string'\` when
|
|
141
|
+
omitted. Ignored for operator and action-target options, and ignored
|
|
142
|
+
entirely in full mode.`
|
|
143
|
+
},
|
|
144
|
+
options: {
|
|
145
|
+
type: "array",
|
|
146
|
+
items: {
|
|
147
|
+
type: "object",
|
|
148
|
+
properties: {
|
|
149
|
+
value: {
|
|
150
|
+
type: "string",
|
|
151
|
+
description: "The value stored on the condition."
|
|
152
|
+
},
|
|
153
|
+
label: {
|
|
154
|
+
type: "string",
|
|
155
|
+
description: "The human-readable label shown in the select."
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
additionalProperties: false,
|
|
159
|
+
required: ["label", "value"]
|
|
160
|
+
},
|
|
161
|
+
description: "Enum choices for this field's value, rendered as a select in\nconditions-only mode when `type` is `'enum'`. Provide these for an enum\nfield; if omitted or empty, the value select renders with no choices.\nIgnored for non-enum field types."
|
|
136
162
|
}
|
|
137
163
|
},
|
|
138
164
|
additionalProperties: false,
|
|
@@ -141,6 +167,10 @@ var schema = {
|
|
|
141
167
|
description: `Options for the condition field selector. Consumer-provided list of
|
|
142
168
|
fields that a condition can test, e.g. "path", "label", "author".`
|
|
143
169
|
},
|
|
170
|
+
mode: {
|
|
171
|
+
enum: ["full", "conditions"],
|
|
172
|
+
description: "Rendering mode. Omit or pass `'full'` for the original conditions +\nactions behavior; pass `'conditions'` to render conditions only. Not\nexpressible as a schema-driven discriminant here because JSON Schema\nvalidation of this component is documented, not enforced at runtime\nagainst `operatorOptions`/`actionOptions` presence; see the component\ntypes for the full mode-discriminated prop shape."
|
|
173
|
+
},
|
|
144
174
|
operatorOptions: {
|
|
145
175
|
type: "array",
|
|
146
176
|
items: {
|
|
@@ -153,13 +183,42 @@ fields that a condition can test, e.g. "path", "label", "author".`
|
|
|
153
183
|
label: {
|
|
154
184
|
type: "string",
|
|
155
185
|
description: "The human-readable label shown in the select."
|
|
186
|
+
},
|
|
187
|
+
type: {
|
|
188
|
+
enum: ["string", "number", "boolean", "enum"],
|
|
189
|
+
description: `The value type this option represents when used as a field option in
|
|
190
|
+
conditions-only mode (\`mode="conditions"\`). Defaults to \`'string'\` when
|
|
191
|
+
omitted. Ignored for operator and action-target options, and ignored
|
|
192
|
+
entirely in full mode.`
|
|
193
|
+
},
|
|
194
|
+
options: {
|
|
195
|
+
type: "array",
|
|
196
|
+
items: {
|
|
197
|
+
type: "object",
|
|
198
|
+
properties: {
|
|
199
|
+
value: {
|
|
200
|
+
type: "string",
|
|
201
|
+
description: "The value stored on the condition."
|
|
202
|
+
},
|
|
203
|
+
label: {
|
|
204
|
+
type: "string",
|
|
205
|
+
description: "The human-readable label shown in the select."
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
additionalProperties: false,
|
|
209
|
+
required: ["label", "value"]
|
|
210
|
+
},
|
|
211
|
+
description: "Enum choices for this field's value, rendered as a select in\nconditions-only mode when `type` is `'enum'`. Provide these for an enum\nfield; if omitted or empty, the value select renders with no choices.\nIgnored for non-enum field types."
|
|
156
212
|
}
|
|
157
213
|
},
|
|
158
214
|
additionalProperties: false,
|
|
159
215
|
required: ["label", "value"]
|
|
160
216
|
},
|
|
161
217
|
description: `Options for the condition operator selector. Consumer-provided list
|
|
162
|
-
of operators, e.g. "matches", "is", "is-not", "contains"
|
|
218
|
+
of operators, e.g. "matches", "is", "is-not", "contains". Required in
|
|
219
|
+
full mode; optional (and ignored) when \`mode\` is \`'conditions'\`, since
|
|
220
|
+
cinder supplies a fixed operator set in that mode — so a conditions-only
|
|
221
|
+
configuration validates without it.`
|
|
163
222
|
},
|
|
164
223
|
actionOptions: {
|
|
165
224
|
type: "array",
|
|
@@ -173,13 +232,38 @@ of operators, e.g. "matches", "is", "is-not", "contains".`
|
|
|
173
232
|
label: {
|
|
174
233
|
type: "string",
|
|
175
234
|
description: "The human-readable label shown in the select."
|
|
235
|
+
},
|
|
236
|
+
type: {
|
|
237
|
+
enum: ["string", "number", "boolean", "enum"],
|
|
238
|
+
description: `The value type this option represents when used as a field option in
|
|
239
|
+
conditions-only mode (\`mode="conditions"\`). Defaults to \`'string'\` when
|
|
240
|
+
omitted. Ignored for operator and action-target options, and ignored
|
|
241
|
+
entirely in full mode.`
|
|
242
|
+
},
|
|
243
|
+
options: {
|
|
244
|
+
type: "array",
|
|
245
|
+
items: {
|
|
246
|
+
type: "object",
|
|
247
|
+
properties: {
|
|
248
|
+
value: {
|
|
249
|
+
type: "string",
|
|
250
|
+
description: "The value stored on the condition."
|
|
251
|
+
},
|
|
252
|
+
label: {
|
|
253
|
+
type: "string",
|
|
254
|
+
description: "The human-readable label shown in the select."
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
additionalProperties: false,
|
|
258
|
+
required: ["label", "value"]
|
|
259
|
+
},
|
|
260
|
+
description: "Enum choices for this field's value, rendered as a select in\nconditions-only mode when `type` is `'enum'`. Provide these for an enum\nfield; if omitted or empty, the value select renders with no choices.\nIgnored for non-enum field types."
|
|
176
261
|
}
|
|
177
262
|
},
|
|
178
263
|
additionalProperties: false,
|
|
179
264
|
required: ["label", "value"]
|
|
180
265
|
},
|
|
181
|
-
description:
|
|
182
|
-
targets, e.g. review-agent slugs or step identifiers.`
|
|
266
|
+
description: "Options for the action target selector. Consumer-provided list of\ntargets, e.g. review-agent slugs or step identifiers. Required in full\nmode; optional (and ignored) when `mode` is `'conditions'`, since actions\nare not rendered — so a conditions-only configuration validates without it."
|
|
183
267
|
},
|
|
184
268
|
readonly: {
|
|
185
269
|
const: true,
|
|
@@ -207,7 +291,7 @@ targets, e.g. review-agent slugs or step identifiers.`
|
|
|
207
291
|
}
|
|
208
292
|
},
|
|
209
293
|
additionalProperties: false,
|
|
210
|
-
required: ["
|
|
294
|
+
required: ["fieldOptions", "readonly", "rules"],
|
|
211
295
|
metadata: {
|
|
212
296
|
unsupportedProps: [
|
|
213
297
|
{
|
|
@@ -226,4 +310,4 @@ export {
|
|
|
226
310
|
invocation_rule_builder_schema_default as default
|
|
227
311
|
};
|
|
228
312
|
|
|
229
|
-
//# debugId=
|
|
313
|
+
//# debugId=460ECA6757B9EF0964756E2164756E21
|
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
* @tag automation
|
|
7
7
|
* @tag rules
|
|
8
8
|
* @useWhen Building a UI for configuring which agents or services run based on event conditions.
|
|
9
|
+
* @useWhen You only need conditions (no actions) — pass mode="conditions" for a constrained operator set and typed value inputs.
|
|
9
10
|
* @avoidWhen You need to execute, validate, or persist rules — cinder owns none of that logic.
|
|
10
11
|
* @related capability-gate, steps, review-editor
|
|
11
12
|
*/
|
|
12
|
-
export type { InvocationRule, InvocationRuleAction, InvocationRuleBuilderProps, InvocationRuleBuilderSchemaProps, InvocationRuleChange, InvocationRuleCondition, InvocationRuleOption, } from './invocation-rule-builder.types.ts';
|
|
13
|
+
export type { InvocationRule, InvocationRuleAction, InvocationRuleBuilderMode, InvocationRuleBuilderProps, InvocationRuleBuilderSchemaProps, InvocationRuleChange, InvocationRuleCondition, InvocationRuleConditionsOnlyOperator, InvocationRuleFieldType, InvocationRuleOption, } from './invocation-rule-builder.types.ts';
|
|
13
14
|
import type { InvocationRuleBuilderProps } from './invocation-rule-builder.types.ts';
|
|
14
15
|
declare const InvocationRuleBuilder: import("svelte").Component<InvocationRuleBuilderProps, {}, "">;
|
|
15
16
|
type InvocationRuleBuilder = ReturnType<typeof InvocationRuleBuilder>;
|
|
@@ -44,6 +44,25 @@ export type InvocationRule = {
|
|
|
44
44
|
/** Zero or more actions to invoke when conditions match. */
|
|
45
45
|
actions: InvocationRuleAction[];
|
|
46
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* The value type a condition field represents. Determines which typed value
|
|
49
|
+
* control renders for that field in conditions-only mode (`mode="conditions"`).
|
|
50
|
+
* Ignored in full mode, where the condition value is always a free-text input.
|
|
51
|
+
*/
|
|
52
|
+
export type InvocationRuleFieldType = 'string' | 'number' | 'boolean' | 'enum';
|
|
53
|
+
/**
|
|
54
|
+
* A single selectable choice for an `'enum'`-typed field's value, rendered as
|
|
55
|
+
* a select in conditions-only mode. A flat value/label pair — enum choices do
|
|
56
|
+
* not nest further.
|
|
57
|
+
*
|
|
58
|
+
* @schemaObject
|
|
59
|
+
*/
|
|
60
|
+
export type InvocationRuleValueChoice = {
|
|
61
|
+
/** The value stored on the condition. */
|
|
62
|
+
value: string;
|
|
63
|
+
/** The human-readable label shown in the select. */
|
|
64
|
+
label: string;
|
|
65
|
+
};
|
|
47
66
|
/**
|
|
48
67
|
* An option in a field, operator, or action-target select list.
|
|
49
68
|
*
|
|
@@ -54,7 +73,38 @@ export type InvocationRuleOption = {
|
|
|
54
73
|
value: string;
|
|
55
74
|
/** The human-readable label shown in the select. */
|
|
56
75
|
label: string;
|
|
76
|
+
/**
|
|
77
|
+
* The value type this option represents when used as a field option in
|
|
78
|
+
* conditions-only mode (`mode="conditions"`). Defaults to `'string'` when
|
|
79
|
+
* omitted. Ignored for operator and action-target options, and ignored
|
|
80
|
+
* entirely in full mode.
|
|
81
|
+
*/
|
|
82
|
+
type?: InvocationRuleFieldType;
|
|
83
|
+
/**
|
|
84
|
+
* Enum choices for this field's value, rendered as a select in
|
|
85
|
+
* conditions-only mode when `type` is `'enum'`. Provide these for an enum
|
|
86
|
+
* field; if omitted or empty, the value select renders with no choices.
|
|
87
|
+
* Ignored for non-enum field types.
|
|
88
|
+
*/
|
|
89
|
+
options?: InvocationRuleValueChoice[];
|
|
57
90
|
};
|
|
91
|
+
/**
|
|
92
|
+
* Rendering mode for InvocationRuleBuilder.
|
|
93
|
+
*
|
|
94
|
+
* - `'full'` (default) renders both conditions and actions, matching the
|
|
95
|
+
* component's original behavior exactly.
|
|
96
|
+
* - `'conditions'` renders conditions only: action controls are hidden
|
|
97
|
+
* entirely, rules never emit action descriptors, the operator set is
|
|
98
|
+
* fixed to {@link InvocationRuleConditionsOnlyOperator}, and condition
|
|
99
|
+
* value controls are inferred from each field option's `type`.
|
|
100
|
+
*/
|
|
101
|
+
export type InvocationRuleBuilderMode = 'full' | 'conditions';
|
|
102
|
+
/**
|
|
103
|
+
* The fixed operator vocabulary used in conditions-only mode
|
|
104
|
+
* (`mode="conditions"`). Cinder supplies these five operators with default
|
|
105
|
+
* labels; the `operatorOptions` prop is not accepted in this mode.
|
|
106
|
+
*/
|
|
107
|
+
export type InvocationRuleConditionsOnlyOperator = 'eq' | 'gt' | 'lt' | 'gte' | 'lte';
|
|
58
108
|
/**
|
|
59
109
|
* Describes the change that caused an `onchange` call.
|
|
60
110
|
* Consumers use the type to determine what to persist.
|
|
@@ -118,6 +168,29 @@ type InvocationRuleBuilderBaseProps = Omit<HTMLAttributes<HTMLElement>, 'class'
|
|
|
118
168
|
* fields that a condition can test, e.g. "path", "label", "author".
|
|
119
169
|
*/
|
|
120
170
|
fieldOptions: InvocationRuleOption[];
|
|
171
|
+
/**
|
|
172
|
+
* Label for the "Add rule" button. Defaults to "Add rule".
|
|
173
|
+
*/
|
|
174
|
+
addRuleLabel?: string;
|
|
175
|
+
/**
|
|
176
|
+
* Label for the "Add condition" button. Defaults to "Add condition".
|
|
177
|
+
*/
|
|
178
|
+
addConditionLabel?: string;
|
|
179
|
+
/** Accessible label for the entire rule builder region. */
|
|
180
|
+
label?: string;
|
|
181
|
+
/** Additional CSS classes applied to the root element. */
|
|
182
|
+
class?: string;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Mode-specific props for `mode="full"` (the default). Behavior and prop
|
|
186
|
+
* shape are unchanged from before conditions-only mode existed.
|
|
187
|
+
*/
|
|
188
|
+
type InvocationRuleBuilderFullModeProps = {
|
|
189
|
+
/**
|
|
190
|
+
* Rendering mode. Omit or pass `'full'` to render both conditions and
|
|
191
|
+
* actions — the component's original, unchanged behavior.
|
|
192
|
+
*/
|
|
193
|
+
mode?: 'full';
|
|
121
194
|
/**
|
|
122
195
|
* Options for the condition operator selector. Consumer-provided list
|
|
123
196
|
* of operators, e.g. "matches", "is", "is-not", "contains".
|
|
@@ -129,24 +202,35 @@ type InvocationRuleBuilderBaseProps = Omit<HTMLAttributes<HTMLElement>, 'class'
|
|
|
129
202
|
*/
|
|
130
203
|
actionOptions: InvocationRuleOption[];
|
|
131
204
|
/**
|
|
132
|
-
* Label for the "Add
|
|
205
|
+
* Label for the "Add action" button. Defaults to "Add action".
|
|
133
206
|
*/
|
|
134
|
-
|
|
207
|
+
addActionLabel?: string;
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Mode-specific props for `mode="conditions"`. Actions are not rendered, so
|
|
211
|
+
* action-related props are not accepted — cinder owns the operator
|
|
212
|
+
* vocabulary and there is nothing to configure for actions.
|
|
213
|
+
*/
|
|
214
|
+
type InvocationRuleBuilderConditionsOnlyModeProps = {
|
|
135
215
|
/**
|
|
136
|
-
*
|
|
216
|
+
* Renders conditions only: action controls are hidden entirely and rules
|
|
217
|
+
* never emit action descriptors.
|
|
137
218
|
*/
|
|
138
|
-
|
|
219
|
+
mode: 'conditions';
|
|
139
220
|
/**
|
|
140
|
-
*
|
|
221
|
+
* Not accepted in conditions-only mode. Cinder supplies the fixed
|
|
222
|
+
* eq/gt/lt/gte/lte operator set internally; see
|
|
223
|
+
* {@link InvocationRuleConditionsOnlyOperator}.
|
|
141
224
|
*/
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
|
|
225
|
+
operatorOptions?: never;
|
|
226
|
+
/** Not accepted in conditions-only mode — action controls are not rendered. */
|
|
227
|
+
actionOptions?: never;
|
|
228
|
+
/** Not accepted in conditions-only mode — action controls are not rendered. */
|
|
229
|
+
addActionLabel?: never;
|
|
147
230
|
};
|
|
231
|
+
type InvocationRuleBuilderModeProps = InvocationRuleBuilderFullModeProps | InvocationRuleBuilderConditionsOnlyModeProps;
|
|
148
232
|
type InvocationRuleBuilderChangeHandler = (nextRules: InvocationRule[], change: InvocationRuleChange) => void;
|
|
149
|
-
export type InvocationRuleBuilderProps =
|
|
233
|
+
export type InvocationRuleBuilderProps = InvocationRuleBuilderBaseProps & InvocationRuleBuilderModeProps & ({
|
|
150
234
|
/**
|
|
151
235
|
* Called whenever the user makes any edit. Required for editable runtime
|
|
152
236
|
* usage because editable controls must commit controlled state changes.
|
|
@@ -159,7 +243,7 @@ export type InvocationRuleBuilderProps = (InvocationRuleBuilderBaseProps & {
|
|
|
159
243
|
* `onchange` so controls cannot become interactive-but-no-op.
|
|
160
244
|
*/
|
|
161
245
|
readonly?: false;
|
|
162
|
-
}
|
|
246
|
+
} | {
|
|
163
247
|
/**
|
|
164
248
|
* Optional in readonly usage because no edit controls are rendered.
|
|
165
249
|
* Runtime consumers may still pass it when sharing props between modes.
|
|
@@ -188,16 +272,30 @@ export type InvocationRuleBuilderSchemaProps = {
|
|
|
188
272
|
* fields that a condition can test, e.g. "path", "label", "author".
|
|
189
273
|
*/
|
|
190
274
|
fieldOptions: InvocationRuleOption[];
|
|
275
|
+
/**
|
|
276
|
+
* Rendering mode. Omit or pass `'full'` for the original conditions +
|
|
277
|
+
* actions behavior; pass `'conditions'` to render conditions only. Not
|
|
278
|
+
* expressible as a schema-driven discriminant here because JSON Schema
|
|
279
|
+
* validation of this component is documented, not enforced at runtime
|
|
280
|
+
* against `operatorOptions`/`actionOptions` presence; see the component
|
|
281
|
+
* types for the full mode-discriminated prop shape.
|
|
282
|
+
*/
|
|
283
|
+
mode?: InvocationRuleBuilderMode;
|
|
191
284
|
/**
|
|
192
285
|
* Options for the condition operator selector. Consumer-provided list
|
|
193
|
-
* of operators, e.g. "matches", "is", "is-not", "contains".
|
|
286
|
+
* of operators, e.g. "matches", "is", "is-not", "contains". Required in
|
|
287
|
+
* full mode; optional (and ignored) when `mode` is `'conditions'`, since
|
|
288
|
+
* cinder supplies a fixed operator set in that mode — so a conditions-only
|
|
289
|
+
* configuration validates without it.
|
|
194
290
|
*/
|
|
195
|
-
operatorOptions
|
|
291
|
+
operatorOptions?: InvocationRuleOption[];
|
|
196
292
|
/**
|
|
197
293
|
* Options for the action target selector. Consumer-provided list of
|
|
198
|
-
* targets, e.g. review-agent slugs or step identifiers.
|
|
294
|
+
* targets, e.g. review-agent slugs or step identifiers. Required in full
|
|
295
|
+
* mode; optional (and ignored) when `mode` is `'conditions'`, since actions
|
|
296
|
+
* are not rendered — so a conditions-only configuration validates without it.
|
|
199
297
|
*/
|
|
200
|
-
actionOptions
|
|
298
|
+
actionOptions?: InvocationRuleOption[];
|
|
201
299
|
/**
|
|
202
300
|
* Must be true for schema-driven usage because editable mode requires
|
|
203
301
|
* the unsupported `onchange` callback. Runtime consumers may omit this
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './run-step-timeline.css';
|
|
2
2
|
import RunStepTimeline from './run-step-timeline.svelte';
|
|
3
3
|
export default RunStepTimeline;
|
|
4
|
-
export type { RunStep, RunStepDetail, RunStepLink, RunStepStatus, RunStepTimelineProps, RunStepTimelineSchemaChildStep, RunStepTimelineSchemaGrandchildStep, RunStepTimelineSchemaGreatGrandchildStep, RunStepTimelineSchemaProps, RunStepTimelineSchemaStep, } from './run-step-timeline.types.ts';
|
|
4
|
+
export type { RunStep, RunStepBranchGroup, RunStepBranchLane, RunStepBranchLaneOutcome, RunStepDetail, RunStepLink, RunStepStatus, RunStepTimelineEntry, RunStepTimelineProps, RunStepTimelineSchemaBranchGroup, RunStepTimelineSchemaBranchLane, RunStepTimelineSchemaChildStep, RunStepTimelineSchemaEntry, RunStepTimelineSchemaGrandchildStep, RunStepTimelineSchemaGreatGrandchildStep, RunStepTimelineSchemaLaneStep, RunStepTimelineSchemaProps, RunStepTimelineSchemaStep, } from './run-step-timeline.types.ts';
|
|
5
5
|
export { RunStepTimeline };
|