@w6w/ui 0.2.59 → 0.2.62

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.
@@ -84,6 +84,11 @@ export interface StepStartState {
84
84
  foreach?: {
85
85
  item?: unknown;
86
86
  index?: number;
87
+ /** Nested loops: every enclosing For each by id, outermost first (innermost last). */
88
+ loops?: Record<string, {
89
+ item?: unknown;
90
+ index?: number;
91
+ }>;
87
92
  };
88
93
  /**
89
94
  * What upstream writers ("Write to state") put in the run state, folded from their saved tests
@@ -235,6 +240,18 @@ export interface W6WApi {
235
240
  name: string;
236
241
  kind: string;
237
242
  }[]>;
243
+ /**
244
+ * OPTIONAL: the agents the signed-in user can see, for the `agent` step-param
245
+ * picker (`@w6w/model · agent`). Absent, the param renders as a plain text
246
+ * input (an `agt_…` id) and this is never called. Archived agents are not
247
+ * listed by the host. `href`, when given, opens the agent in the Agents
248
+ * dashboard.
249
+ */
250
+ listAgents?(): Promise<{
251
+ id: string;
252
+ name: string;
253
+ href?: string;
254
+ }[]>;
238
255
  /**
239
256
  * OPTIONAL: ONE page of a data store's entries, for the `data-store-key`
240
257
  * step-param picker (`@w6w/store` get/set/delete/increment). Absent, the key
@@ -71,6 +71,10 @@ export interface ResolveScope {
71
71
  foreach?: {
72
72
  item?: unknown;
73
73
  index?: number;
74
+ loops?: Record<string, {
75
+ item?: unknown;
76
+ index?: number;
77
+ }>;
74
78
  };
75
79
  /**
76
80
  * The original flat `sampleValues` map, keyed by full ref string — checked
@@ -200,17 +200,23 @@ export declare function fetchSeedSources(listStepTests: (stepId: string) => Prom
200
200
  * ⚠️ Single-step scope only. A full run (`POST /workflows/:id/run`) builds its
201
201
  * own scope and is not affected by this.
202
202
  */
203
- export declare function startStateFromSeeds(seeds: SeedSource[], loop?: {
204
- item?: unknown;
205
- index?: number;
206
- },
203
+ export declare function startStateFromSeeds(seeds: SeedSource[], loop?: LoopSeedValue,
207
204
  /** Upstream state writes (`StateShape.written`) → the start state's `state`. */
208
205
  written?: Record<string, unknown>): StepStartState | undefined;
209
- /** The default `{ item, index }` a loop-body Test is seeded with: the sample item, index 0. */
210
- export declare function loopSeedFromSource(loop: ExpressionLoopSource | undefined): {
206
+ /**
207
+ * The iteration seed a loop-body Test is sent as `state.foreach`: the innermost `item` / `index`
208
+ * plus, when known, `loops` — every enclosing For each (outermost first, the innermost last).
209
+ */
210
+ export interface LoopSeedValue {
211
211
  item?: unknown;
212
212
  index?: number;
213
- } | undefined;
213
+ loops?: Record<string, {
214
+ item?: unknown;
215
+ index: number;
216
+ }>;
217
+ }
218
+ /** The default `{ item, index }` a loop-body Test is seeded with: the sample item, index 0. */
219
+ export declare function loopSeedFromSource(loop: ExpressionLoopSource | undefined): LoopSeedValue | undefined;
214
220
  /** The editable "Current item" text a loop's sample item starts as (`""` when there is none). */
215
221
  export declare function loopItemText(loop: ExpressionLoopSource | undefined): string;
216
222
  /**
package/dist/types.d.ts CHANGED
@@ -456,6 +456,12 @@ export interface AuthDef {
456
456
  }[];
457
457
  /** Present when `type === "serviceAccount"`: what credential it accepts and how it binds. */
458
458
  serviceAccount?: ServiceAccountConfig;
459
+ /**
460
+ * Credential contract ids a SHARED credential must have to be used for this auth. The server
461
+ * derives it for bearer / apiKey / basic auths; absent when empty (an older server, or an auth
462
+ * no shared contract fits). A `serviceAccount` auth keeps its list in `serviceAccount.accepts`.
463
+ */
464
+ accepts?: string[];
459
465
  /** OAuth2 endpoints (only present when type === "oauth2"). */
460
466
  oauth2?: Record<string, unknown>;
461
467
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w6w/ui",
3
- "version": "0.2.59",
3
+ "version": "0.2.62",
4
4
  "description": "React components for w6w — central API management. Build plugins, apps and integrations on them.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://w6w.io",
@@ -249,12 +249,28 @@
249
249
  flex-wrap: wrap;
250
250
  gap: var(--w6w-sp-1);
251
251
  }
252
+ /* A chip is a button: it picks that iteration for the body steps below (input and output open). */
252
253
  .w6w-execution-log-iteration-chip {
253
254
  padding: var(--w6w-sp-0-5) var(--w6w-sp-2);
254
255
  border: 1px solid var(--w6w-border);
255
256
  border-radius: 999px;
257
+ background: transparent;
258
+ color: inherit;
259
+ font: inherit;
256
260
  font-size: var(--w6w-fs-xs);
257
261
  white-space: nowrap;
262
+ cursor: pointer;
263
+ }
264
+ .w6w-execution-log-iteration-chip:hover {
265
+ background: var(--w6w-panel-2);
266
+ }
267
+ .w6w-execution-log-iteration-chip[aria-pressed="true"] {
268
+ box-shadow: 0 0 0 2px currentColor;
269
+ font-weight: var(--w6w-fw-semibold);
270
+ }
271
+ .w6w-execution-log-iteration-chip:focus-visible {
272
+ outline: 2px solid var(--w6w-accent);
273
+ outline-offset: 2px;
258
274
  }
259
275
  .w6w-execution-log-iteration-chip-succeeded {
260
276
  border-color: var(--w6w-success);
@@ -130,6 +130,14 @@
130
130
  white-space: pre-wrap;
131
131
  word-break: break-word;
132
132
  }
133
+ /* A `{columns, rows}` value shown as a table: the cells keep the viewer's mono
134
+ type, and a `null` cell recedes (`.w6w-muted`) but stays legible. */
135
+ .w6w-result-viewer-table {
136
+ font-family: var(--w6w-font-mono);
137
+ }
138
+ .w6w-result-viewer-null {
139
+ font-style: italic;
140
+ }
133
141
  /* One indent step per nesting level, and no list markers: the `<summary>`
134
142
  triangle already says "this node opens". */
135
143
  .w6w-json-children {
package/src/styles.css CHANGED
@@ -4610,6 +4610,16 @@ input.w6w-stepbuilder-search.w6w-stepbuilder-search:focus {
4610
4610
  word-break: break-word;
4611
4611
  }
4612
4612
 
4613
+ /* A `{columns, rows}` value shown as a table: the cells keep the viewer's mono
4614
+ type, and a `null` cell recedes (`.w6w-muted`) but stays legible. */
4615
+ .w6w-result-viewer-table {
4616
+ font-family: var(--w6w-font-mono);
4617
+ }
4618
+
4619
+ .w6w-result-viewer-null {
4620
+ font-style: italic;
4621
+ }
4622
+
4613
4623
  /* One indent step per nesting level, and no list markers: the `<summary>`
4614
4624
  triangle already says "this node opens". */
4615
4625
  .w6w-json-children {
@@ -5494,12 +5504,31 @@ input.w6w-stepbuilder-search.w6w-stepbuilder-search:focus {
5494
5504
  gap: var(--w6w-sp-1);
5495
5505
  }
5496
5506
 
5507
+ /* A chip is a button: it picks that iteration for the body steps below (input and output open). */
5497
5508
  .w6w-execution-log-iteration-chip {
5498
5509
  padding: var(--w6w-sp-0-5) var(--w6w-sp-2);
5499
5510
  border: 1px solid var(--w6w-border);
5500
5511
  border-radius: 999px;
5512
+ background: transparent;
5513
+ color: inherit;
5514
+ font: inherit;
5501
5515
  font-size: var(--w6w-fs-xs);
5502
5516
  white-space: nowrap;
5517
+ cursor: pointer;
5518
+ }
5519
+
5520
+ .w6w-execution-log-iteration-chip:hover {
5521
+ background: var(--w6w-panel-2);
5522
+ }
5523
+
5524
+ .w6w-execution-log-iteration-chip[aria-pressed=true] {
5525
+ box-shadow: 0 0 0 2px currentColor;
5526
+ font-weight: var(--w6w-fw-semibold);
5527
+ }
5528
+
5529
+ .w6w-execution-log-iteration-chip:focus-visible {
5530
+ outline: 2px solid var(--w6w-accent);
5531
+ outline-offset: 2px;
5503
5532
  }
5504
5533
 
5505
5534
  .w6w-execution-log-iteration-chip-succeeded {