@w6w/ui 0.2.56 → 0.2.58

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 (61) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/CallTargetForm.d.ts +10 -0
  3. package/dist/{CodeBlock-CymlfyeA.cjs → CodeBlock-BSX1pi6W.cjs} +2 -2
  4. package/dist/{CodeBlock-CymlfyeA.cjs.map → CodeBlock-BSX1pi6W.cjs.map} +1 -1
  5. package/dist/{CodeBlock-C-oIIYfC.js → CodeBlock-CPKXSNEs.js} +7 -3
  6. package/dist/{CodeBlock-C-oIIYfC.js.map → CodeBlock-CPKXSNEs.js.map} +1 -1
  7. package/dist/CodeEditor.d.ts +2 -0
  8. package/dist/JsonEditor.d.ts +1 -3
  9. package/dist/Markdown.d.ts +3 -1
  10. package/dist/StepBuilderModal.d.ts +11 -5
  11. package/dist/TriggerFillForm.d.ts +4 -3
  12. package/dist/TriggerSampleButton.d.ts +11 -0
  13. package/dist/WorkflowFlowEditor.d.ts +54 -0
  14. package/dist/YamlEditor.d.ts +1 -2
  15. package/dist/callable-fields.d.ts +4 -0
  16. package/dist/code.cjs +1 -1
  17. package/dist/code.mjs +1 -1
  18. package/dist/components/ConfirmModal.d.ts +7 -1
  19. package/dist/components/DataEntryList.d.ts +2 -0
  20. package/dist/components/ExpressionOptions.d.ts +2 -0
  21. package/dist/components/ResultViewer.d.ts +1 -2
  22. package/dist/condition-editor.d.ts +3 -1
  23. package/dist/connection-app-meta-CKTmUX08.cjs +24 -0
  24. package/dist/connection-app-meta-CKTmUX08.cjs.map +1 -0
  25. package/dist/{connection-app-meta-ZCPakGjD.js → connection-app-meta-D5hNbJB5.js} +7531 -6994
  26. package/dist/connection-app-meta-D5hNbJB5.js.map +1 -0
  27. package/dist/flow-history.d.ts +8 -0
  28. package/dist/flow.cjs +5 -4
  29. package/dist/flow.cjs.map +1 -1
  30. package/dist/flow.mjs +2216 -2103
  31. package/dist/flow.mjs.map +1 -1
  32. package/dist/index.cjs +2 -2
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.mjs +313 -305
  35. package/dist/index.mjs.map +1 -1
  36. package/dist/provider.d.ts +9 -0
  37. package/dist/state-shape.d.ts +13 -0
  38. package/dist/step-preview-state.d.ts +10 -1
  39. package/dist/types.d.ts +8 -0
  40. package/package.json +4 -1
  41. package/src/code.css +26 -1
  42. package/src/styles/_box-reset.scss +22 -0
  43. package/src/styles/_canvas.scss +1 -4
  44. package/src/styles/_chips.scss +0 -1
  45. package/src/styles/_code-editor.scss +16 -0
  46. package/src/styles/_copyable.scss +25 -1
  47. package/src/styles/_data-stores.scss +15 -5
  48. package/src/styles/_data-table.scss +6 -0
  49. package/src/styles/_data-vars.scss +21 -0
  50. package/src/styles/_execution-log.scss +3 -4
  51. package/src/styles/_fields.scss +57 -25
  52. package/src/styles/_flow.scss +11 -0
  53. package/src/styles/_fx.scss +14 -47
  54. package/src/styles/_host-guard.scss +100 -0
  55. package/src/styles/_step-builder.scss +4 -2
  56. package/src/styles/_step-config.scss +4 -5
  57. package/src/styles.css +226 -95
  58. package/src/styles.scss +2 -0
  59. package/dist/connection-app-meta-BEXlKBgV.cjs +0 -22
  60. package/dist/connection-app-meta-BEXlKBgV.cjs.map +0 -1
  61. package/dist/connection-app-meta-ZCPakGjD.js.map +0 -1
@@ -85,6 +85,12 @@ export interface StepStartState {
85
85
  item?: unknown;
86
86
  index?: number;
87
87
  };
88
+ /**
89
+ * What upstream writers ("Write to state") put in the run state, folded from their saved tests
90
+ * (`computeStateShape`'s `written`) → `state.*`, laid over the project vars and the saved
91
+ * starting data. Never `var.*`: project variables stay host-owned.
92
+ */
93
+ state?: Record<string, unknown>;
88
94
  }
89
95
  /**
90
96
  * A caller-supplied override merged into an app action's outbound request at
@@ -164,6 +170,8 @@ export interface DataStoreEntryOptions {
164
170
  more?: boolean;
165
171
  }
166
172
  export interface W6WApi {
173
+ /** Host route for opening a callable in a new tab. */
174
+ callableHref?(kind: "function" | "workflow", id: string): string;
167
175
  /**
168
176
  * List registered apps to pick from in the connection modal.
169
177
  *
@@ -477,6 +485,7 @@ export interface W6WApi {
477
485
  runWorkflow(id: string, opts?: {
478
486
  variables?: Record<string, unknown>;
479
487
  input?: Record<string, unknown>;
488
+ entry?: string;
480
489
  }): Promise<{
481
490
  runId: string;
482
491
  status: string;
@@ -12,6 +12,13 @@ export interface StateShape {
12
12
  * (test outputs, the app's `sample`, starting data, variable defaults) — never a skeleton.
13
13
  */
14
14
  sampleValues: Record<string, unknown>;
15
+ /**
16
+ * Only what the upstream writers put in state, from REAL outputs (their saved or fresh tests),
17
+ * folded in run order over an empty tree — the starting data and variables are the server's to
18
+ * seed. A step Test sends it as its start state's `state`, so `{{ state.* }}` resolves the way
19
+ * the run will. `undefined` when no writer on a path into the node has a real output yet.
20
+ */
21
+ written?: Record<string, unknown>;
15
22
  }
16
23
  export interface StateShapeInput {
17
24
  /** The node whose incoming state this is (`null` → empty shape). */
@@ -24,6 +31,12 @@ export interface StateShapeInput {
24
31
  shapes?: StepShapeContext;
25
32
  /** Each node's REAL output (fresh test, else persisted), for preview values. */
26
33
  previewOutputs?: Record<string, unknown>;
34
+ /**
35
+ * The anchor is a draft not wired in yet (the add-step builder before its incoming edge):
36
+ * every other node counts as upstream, the same rule the picker's step list follows
37
+ * (`upstreamStateSources`), so the State section is not empty while the node floats.
38
+ */
39
+ floating?: boolean;
27
40
  }
28
41
  /**
29
42
  * The engine's run order over `nodes`/`edges`: Kahn's, the ready queue seeded in declared node
@@ -125,6 +125,13 @@ export declare function foreachTestSample(test: StepTest | null | undefined): un
125
125
  *
126
126
  * With no specific step (shouldn't happen for a field edit) every node is offered.
127
127
  */
128
+ /**
129
+ * True when the add-step builder's draft has no place in the graph yet — no incoming edge and
130
+ * not inside a loop body — so nothing is its ancestor and every node counts as upstream. The one
131
+ * rule both {@link upstreamStateSources} (the step list) and the State section
132
+ * (`computeStateShape`'s `floating`) follow.
133
+ */
134
+ export declare function isFloatingDraft(editingId: string | null, draftId: string | null | undefined, nodes: StepNode[], edges: Edge[]): boolean;
128
135
  export declare function upstreamStateSources(editingId: string | null, nodes: StepNode[], edges: Edge[], shapes?: StepShapeContext, draftId?: string | null): {
129
136
  steps: ExpressionStepSource[];
130
137
  hasTrigger: boolean;
@@ -196,7 +203,9 @@ export declare function fetchSeedSources(listStepTests: (stepId: string) => Prom
196
203
  export declare function startStateFromSeeds(seeds: SeedSource[], loop?: {
197
204
  item?: unknown;
198
205
  index?: number;
199
- }): StepStartState | undefined;
206
+ },
207
+ /** Upstream state writes (`StateShape.written`) → the start state's `state`. */
208
+ written?: Record<string, unknown>): StepStartState | undefined;
200
209
  /** The default `{ item, index }` a loop-body Test is seeded with: the sample item, index 0. */
201
210
  export declare function loopSeedFromSource(loop: ExpressionLoopSource | undefined): {
202
211
  item?: unknown;
package/dist/types.d.ts CHANGED
@@ -283,6 +283,14 @@ export interface ParamConfig {
283
283
  allowCustom?: boolean;
284
284
  /** Multiselect storage format. Defaults to an array; CSV preserves string-based API inputs. */
285
285
  valueFormat?: "array" | "csv";
286
+ /**
287
+ * Object-item array cells only: render this cell as the widget for the type held by the
288
+ * sibling field with this key in the same row (`boolean` → empty/true/false dropdown,
289
+ * `json` → JSON editor with a full-size view, `number` → number input, else text). The
290
+ * stored value stays text either way; a value the new type cannot hold is cleared when
291
+ * the sibling changes. E.g. a trigger field's `default` follows its `type`.
292
+ */
293
+ valueTypeFrom?: string;
286
294
  }
287
295
  /** Summary of an action an app exposes, as returned by GET /apps/:id. */
288
296
  export interface ActionDef {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w6w/ui",
3
- "version": "0.2.56",
3
+ "version": "0.2.58",
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",
@@ -100,6 +100,7 @@
100
100
  "build": "pnpm build:css && tsc -b && vite build",
101
101
  "build:css": "node scripts/build-css.mjs",
102
102
  "check:css": "node scripts/build-css.mjs --check",
103
+ "check:guard": "node scripts/check-guard.mjs",
103
104
  "typecheck": "tsc -b --noEmit",
104
105
  "test": "node --max-old-space-size=2048 --conditions=w6w-source --import ./src/test-jsx-loader.mjs --test --test-concurrency=4 --test-timeout=120000 src/__tests__/*.test.ts src/components/__tests__/*.test.ts",
105
106
  "test:picker-layout": "bash test/picker-layout/run.sh",
@@ -110,6 +111,7 @@
110
111
  "test:action-test-form": "bash test/action-test-form/run.sh",
111
112
  "test:host-isolation": "bash test/host-isolation/run.sh",
112
113
  "test:copyable": "bash test/copyable/run.sh",
114
+ "test:host-cascade": "bash test/host-cascade/run.sh",
113
115
  "test:code-editor-fill": "bash test/code-editor-fill/run.sh",
114
116
  "test:pack-smoke": "bash test/pack-smoke/run.sh",
115
117
  "storybook": "storybook dev -p 6006 --no-open",
@@ -121,6 +123,7 @@
121
123
  "test:workflow-connections": "node test/workflow-connections/run.mjs",
122
124
  "test:workflow-undo": "node test/workflow-connections/undo.mjs",
123
125
  "test:workflow-context-menu": "node test/workflow-connections/context-menu.mjs",
126
+ "test:workflow-delete-confirm": "node test/workflow-connections/delete-confirm.mjs",
124
127
  "test:script-completion": "node test/script-completion/run.mjs"
125
128
  }
126
129
  }
package/src/code.css CHANGED
@@ -327,7 +327,8 @@
327
327
  .w6w-copyable input[type=password],
328
328
  .w6w-copyable input[type=number],
329
329
  .w6w-copyable select,
330
- .w6w-copyable textarea {
330
+ .w6w-copyable textarea,
331
+ .w6w-copyable.w6w-copyable textarea {
331
332
  border: none;
332
333
  background: transparent;
333
334
  border-radius: 0;
@@ -457,6 +458,30 @@
457
458
  opacity: 1;
458
459
  }
459
460
  }
461
+ /* Keep copy discoverable on results and rendered documents. */
462
+ .w6w-copyable--overlay,
463
+ .w6w-copyable--document {
464
+ position: relative;
465
+ align-items: flex-start;
466
+ }
467
+
468
+ .w6w-copyable--overlay > .w6w-copyable-btn,
469
+ .w6w-copyable--document > .w6w-copyable-btn {
470
+ position: absolute;
471
+ top: var(--w6w-sp-1);
472
+ right: var(--w6w-sp-1);
473
+ background: var(--w6w-panel);
474
+ border-color: var(--w6w-border);
475
+ }
476
+
477
+ .w6w-copyable--document {
478
+ display: block;
479
+ background: transparent;
480
+ border: none;
481
+ padding: 0;
482
+ padding-right: var(--w6w-sp-10);
483
+ }
484
+
460
485
  .w6w-code-block {
461
486
  background: var(--w6w-panel-2);
462
487
  border: 1px solid var(--w6w-border);
@@ -0,0 +1,22 @@
1
+ // Box-model reset, scoped to the library: every element that carries a `w6w-`
2
+ // class token, and everything inside one, is `border-box` whatever the host
3
+ // page's `box-sizing` is (a bare content-box host made every boxed field 10px
4
+ // taller than the library drew it). It replaces seven per-component
5
+ // `box-sizing: border-box` declarations. Each selector is (0,1,0): ABOVE a host
6
+ // `*` (0,0,0) and tied with — so, by source order, below — any host class rule that
7
+ // sets box-sizing on purpose. No `:where()` here: that would drop to (0,0,0) and
8
+ // TIE a host `*`, which loads later and wins.
9
+ //
10
+ // A separate partial from the host guard so the guard-off A/B in the harness
11
+ // strips only the guard.
12
+ //
13
+ // `scripts/check-guard.mjs` parses the literal begin/end comments below.
14
+
15
+ /* w6w-box-reset:begin */
16
+ [class^="w6w-"],
17
+ [class*=" w6w-"],
18
+ [class^="w6w-"] *,
19
+ [class*=" w6w-"] * {
20
+ box-sizing: border-box;
21
+ }
22
+ /* w6w-box-reset:end */
@@ -10,7 +10,6 @@
10
10
  .w6w-canvas-section,
11
11
  .w6w-canvas-note {
12
12
  position: absolute;
13
- box-sizing: border-box;
14
13
  border: 1px solid var(--w6w-canvas-color, var(--w6w-border));
15
14
  border-radius: var(--w6w-radius, 6px);
16
15
  background: color-mix(in srgb, var(--w6w-canvas-color, var(--w6w-panel)) 14%, transparent);
@@ -54,7 +53,6 @@
54
53
  background: color-mix(in srgb, var(--w6w-canvas-color, var(--w6w-panel)) 18%, transparent);
55
54
  }
56
55
  .w6w-canvas-note-body {
57
- box-sizing: border-box;
58
56
  height: 100%;
59
57
  overflow: auto;
60
58
  padding: var(--w6w-sp-3) var(--w6w-sp-3);
@@ -242,7 +240,7 @@
242
240
  .w6w-note-swatch-custom {
243
241
  overflow: hidden;
244
242
  background: conic-gradient(#f87171, #facc15, #4ade80, #60a5fa, #a78bfa, #f87171);
245
- input {
243
+ input[type="color"] {
246
244
  position: absolute;
247
245
  inset: 0;
248
246
  width: 100%;
@@ -345,7 +343,6 @@
345
343
  }
346
344
  .w6w-section-draw-rect {
347
345
  position: absolute;
348
- box-sizing: border-box;
349
346
  border: 2px dashed var(--w6w-accent);
350
347
  border-radius: var(--w6w-radius, 6px);
351
348
  background: color-mix(in srgb, var(--w6w-accent) 10%, transparent);
@@ -5,7 +5,6 @@
5
5
  align-items: center;
6
6
  gap: var(--w6w-sp-1);
7
7
  vertical-align: baseline;
8
- box-sizing: border-box;
9
8
  /* Never exceed the field's content box; the label truncates before the chip
10
9
  can overrun the adjacent ƒx button. */
11
10
  max-width: 100%;
@@ -33,3 +33,19 @@
33
33
  :where(.w6w-json-editor, .w6w-code-editor, .w6w-yaml-editor) .cm-gutters {
34
34
  min-height: 100%;
35
35
  }
36
+
37
+ /* Pin copy outside the scroll area for all editor languages. */
38
+ :where(.w6w-json-editor, .w6w-code-editor, .w6w-yaml-editor) {
39
+ position: relative;
40
+ }
41
+ :where(.w6w-json-editor, .w6w-code-editor, .w6w-yaml-editor) > .w6w-copyable-btn {
42
+ position: absolute;
43
+ top: var(--w6w-sp-1);
44
+ right: var(--w6w-sp-1);
45
+ background: var(--w6w-panel);
46
+ border-color: var(--w6w-border);
47
+ z-index: 1;
48
+ }
49
+ :where(.w6w-json-editor, .w6w-code-editor, .w6w-yaml-editor):has(> .w6w-copyable-btn) .cm-content {
50
+ padding-right: var(--w6w-sp-10);
51
+ }
@@ -49,7 +49,9 @@
49
49
  .w6w-copyable input[type="password"],
50
50
  .w6w-copyable input[type="number"],
51
51
  .w6w-copyable select,
52
- .w6w-copyable textarea {
52
+ .w6w-copyable textarea,
53
+ /* (0,2,1): see _fx.scss — the guard would out-rank a bare (0,1,1) textarea rule. */
54
+ .w6w-copyable.w6w-copyable textarea {
53
55
  border: none;
54
56
  background: transparent;
55
57
  border-radius: 0;
@@ -169,3 +171,25 @@
169
171
  opacity: 1;
170
172
  }
171
173
  }
174
+
175
+ /* Keep copy discoverable on results and rendered documents. */
176
+ .w6w-copyable--overlay,
177
+ .w6w-copyable--document {
178
+ position: relative;
179
+ align-items: flex-start;
180
+ }
181
+ .w6w-copyable--overlay > .w6w-copyable-btn,
182
+ .w6w-copyable--document > .w6w-copyable-btn {
183
+ position: absolute;
184
+ top: var(--w6w-sp-1);
185
+ right: var(--w6w-sp-1);
186
+ background: var(--w6w-panel);
187
+ border-color: var(--w6w-border);
188
+ }
189
+ .w6w-copyable--document {
190
+ display: block;
191
+ background: transparent;
192
+ border: none;
193
+ padding: 0;
194
+ padding-right: var(--w6w-sp-10);
195
+ }
@@ -31,20 +31,30 @@
31
31
  flex-direction: column;
32
32
  gap: var(--w6w-sp-2);
33
33
  }
34
+ /* A grid, not a wrapping flex row, so the header row's labels sit over their
35
+ columns: name | type | required | default | remove. */
34
36
  .w6w-data-columns-row {
35
- display: flex;
36
- flex-wrap: wrap;
37
+ display: grid;
38
+ grid-template-columns: minmax(0, 1fr) minmax(0, 7rem) auto minmax(0, 1fr) auto;
37
39
  align-items: center;
38
40
  gap: var(--w6w-sp-2);
39
41
  }
42
+ .w6w-data-columns-row > * {
43
+ min-width: 0;
44
+ }
45
+ .w6w-data-columns-colhead {
46
+ font-size: var(--w6w-fs-xs);
47
+ font-weight: 500;
48
+ color: var(--w6w-muted);
49
+ }
50
+ .w6w-data-columns-error {
51
+ grid-column: 1 / -1;
52
+ }
40
53
  .w6w-data-columns-required {
41
54
  display: flex;
42
55
  align-items: center;
43
56
  gap: var(--w6w-sp-1);
44
57
  }
45
- .w6w-data-columns-error {
46
- flex-basis: 100%;
47
- }
48
58
  .w6w-data-entries-toolbar {
49
59
  display: flex;
50
60
  align-items: center;
@@ -29,6 +29,12 @@
29
29
  .w6w-data-table td:last-child {
30
30
  border-right: 0;
31
31
  }
32
+ /* Row separators only (`className="w6w-data-table-rows"`): a list whose second column is just a
33
+ row's controls (Variables, Secrets, Constants) reads as one item per row, not a grid. */
34
+ .w6w-data-table.w6w-data-table-rows th,
35
+ .w6w-data-table.w6w-data-table-rows td {
36
+ border-right: 0;
37
+ }
32
38
  .w6w-data-table tbody tr:last-child > td {
33
39
  border-bottom: 0;
34
40
  }
@@ -8,6 +8,16 @@
8
8
  .w6w-datavar-row > * {
9
9
  min-width: 0;
10
10
  }
11
+ /* Column headers: same grid as the rows, so each label sits over its column. */
12
+ .w6w-datavar-head {
13
+ display: grid;
14
+ grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr) auto;
15
+ gap: var(--w6w-sp-1-5);
16
+ align-items: end;
17
+ font-size: var(--w6w-fs-xs);
18
+ font-weight: 500;
19
+ color: var(--w6w-muted);
20
+ }
11
21
  .w6w-datavar-row input,
12
22
  .w6w-datavar-row select {
13
23
  background: var(--w6w-panel-2);
@@ -47,3 +57,14 @@
47
57
  .w6w-datavar-error {
48
58
  color: var(--w6w-danger);
49
59
  }
60
+
61
+ /* A JSON value is a one-line preview; its full content lives in the expanded editor. */
62
+ .w6w-datavar-row > .w6w-fx-wrap {
63
+ min-width: 0;
64
+ }
65
+ .w6w-datavar-row .w6w-datavar-json-preview {
66
+ overflow: hidden;
67
+ text-overflow: ellipsis;
68
+ white-space: nowrap;
69
+ cursor: pointer;
70
+ }
@@ -105,11 +105,10 @@
105
105
  width: 100%;
106
106
  }
107
107
 
108
- /* `width: 100%` plus padding and a border overflows the parent under the
109
- default content-box sizing; this package has no global box-sizing reset, so
110
- it opts in per element (as `_chips.scss` and `_step-config.scss` do). */
108
+ /* `width: 100%` plus padding and a border overflows the parent under content-box
109
+ sizing; `_box-reset.scss` makes every `w6w-` element border-box, so it needs no
110
+ declaration of its own. */
111
111
  .w6w-execution-log-empty {
112
- box-sizing: border-box;
113
112
  width: 100%;
114
113
  padding: var(--w6w-sp-4);
115
114
  border: 1px dashed var(--w6w-border);
@@ -85,46 +85,32 @@ select optgroup {
85
85
  flex: 1 1 120px;
86
86
  }
87
87
  /* An object-item array row's boolean cell: `<label><checkbox><span>`. It is a
88
- `<label>`, so `margin: 0` is load-bearing for the same reason it is on
89
- `.w6w-fx-inline-label` further down — a host page layers an unscoped
90
- `label { margin-bottom: 10px }` after this file (studio's does, at
91
- `studio/src/styles.css:499`) and owns any property this block leaves
92
- undeclared. `.w6w-array-cells` is a flex row at the default `align-items:
93
- stretch`, so a bottom margin does not translate this cell, it SHORTENS its
94
- stretched box — and because this block centres its own contents, the checkbox
95
- and its caption then ride upward off the row's centre line. Measured before
96
- this declaration existed, in [ui+studio]: checkbox cy 792 against the sibling
97
- text cell's 799 — 7.0px out, while a ui-only render showed 0.0px. */
88
+ `<label>`, so a host page's unscoped `label { margin-bottom }` would shorten
89
+ its stretched box inside the `align-items: stretch` `.w6w-array-cells` row and
90
+ ride the checkbox off the row's centre line; `_host-guard.scss` reverts that
91
+ margin for every `w6w-` label, so this block declares none. */
98
92
  .w6w-array-check {
99
93
  display: inline-flex;
100
94
  align-items: center;
101
95
  gap: var(--w6w-sp-1-5);
102
96
  flex: 0 0 auto;
103
- margin: 0;
104
97
  font-size: 13px;
105
98
  color: var(--w6w-text);
106
99
  white-space: nowrap;
107
100
  cursor: pointer;
108
101
  }
109
- /* `> input[type="checkbox"]`, not `input`: a bare `.w6w-array-check input` is
110
- (0,1,1), which TIES with a host `input[type="checkbox"] { margin-right: 6px }`
111
- (studio/src/styles.css:785) and then loses on source order — measured
112
- `margin-right: 6px` reaching this checkbox with the `margin: 0` below already
113
- present. The compound form is (0,2,1) and wins outright. Same shape as
114
- `.w6w-fx-inline > input[type="checkbox"]`, which is why that one was never
115
- affected. */
102
+ /* The checkbox's own `margin: 0` (a library choice: the UA's 3px/4px would
103
+ misalign it). `> input[type="checkbox"]` is (0,2,1): it TIES the guard's checkbox arm
104
+ (0,2,1, `margin-right: revert`) and wins only by loading later — do not
105
+ simplify it to `.w6w-array-check input` (0,1,1), which the guard would
106
+ silently out-rank. A host `input[type="checkbox"] { margin-right }` is only
107
+ (0,1,1). */
116
108
  .w6w-array-check > input[type="checkbox"] {
117
109
  margin: 0;
118
110
  }
119
111
  .w6w-field .w6w-array-input {
120
112
  flex: 1;
121
113
  min-width: 0;
122
- /* Load-bearing, same class as `.w6w-array-check` above: a host
123
- `input[type="text"] { margin-top: 4px }` otherwise lands here and drops this
124
- cell 2px below its own row's checkbox cell. Measured in [ui+studio]:
125
- checkbox cy 797 against this input's 799. This selector is (0,2,0) and beats
126
- the host's (0,1,1). */
127
- margin: 0;
128
114
  background: var(--w6w-panel-2);
129
115
  border: 1px solid var(--w6w-border);
130
116
  border-radius: 8px;
@@ -133,6 +119,14 @@ select optgroup {
133
119
  font-size: var(--w6w-fs-sm);
134
120
  font-family: inherit;
135
121
  }
122
+ /* A JSON cell: the one-line preview takes the cell, the open-editor button sits after it. */
123
+ .w6w-array-json {
124
+ display: flex;
125
+ align-items: center;
126
+ gap: var(--w6w-sp-1);
127
+ flex: 1;
128
+ min-width: 0;
129
+ }
136
130
  .w6w-field .w6w-array-input:focus {
137
131
  outline: none;
138
132
  border-color: var(--w6w-accent);
@@ -159,6 +153,45 @@ select optgroup {
159
153
  .w6w-array-add {
160
154
  margin-top: var(--w6w-sp-0-5);
161
155
  }
156
+ /* Column headers over an object-item array. Each header cell takes the same
157
+ flex as the input below it (`.w6w-field .w6w-array-input` → `flex: 1`), and
158
+ checkbox / × columns are invisible copies of the real cells, so headers line
159
+ up with their columns without a fixed grid. */
160
+ .w6w-array-head {
161
+ display: flex;
162
+ align-items: center;
163
+ gap: var(--w6w-sp-1-5);
164
+ width: 100%;
165
+ margin-bottom: calc(-1 * var(--w6w-sp-1));
166
+ }
167
+ .w6w-array-head-cells {
168
+ display: flex;
169
+ flex-wrap: wrap;
170
+ gap: var(--w6w-sp-1-5);
171
+ flex: 1;
172
+ min-width: 0;
173
+ }
174
+ /* Stands in for the checkbox (13px in every engine's default form controls). */
175
+ .w6w-array-head-box {
176
+ display: inline-block;
177
+ width: 13px;
178
+ }
179
+ .w6w-array-head-cell {
180
+ flex: 1;
181
+ min-width: 0;
182
+ overflow: hidden;
183
+ text-overflow: ellipsis;
184
+ white-space: nowrap;
185
+ font-size: var(--w6w-fs-xs);
186
+ font-weight: 500;
187
+ color: var(--w6w-muted);
188
+ }
189
+ .w6w-array-head-ghost {
190
+ visibility: hidden;
191
+ height: 0;
192
+ border-top-width: 0;
193
+ border-bottom-width: 0;
194
+ }
162
195
 
163
196
  /* Combobox (`components/Combobox.tsx`): its <input> sits inside the component's
164
197
  own positioned root, so it is not a direct flex child of `.w6w-field` and would
@@ -168,5 +201,4 @@ select optgroup {
168
201
  }
169
202
  .w6w-combobox > input[type="text"] {
170
203
  width: 100%;
171
- box-sizing: border-box;
172
204
  }
@@ -359,6 +359,17 @@
359
359
  color: var(--w6w-muted);
360
360
  }
361
361
 
362
+ // An If's True label: outside the card, just above its right-edge handle, so an edge
363
+ // leaving that handle rightward never crosses it (False mirrors it under the bottom handle).
364
+ .w6w-flow .w6w-if-true-label {
365
+ position: absolute;
366
+ left: calc(100% + 6px);
367
+ bottom: calc(50% + 4px);
368
+ white-space: nowrap;
369
+ pointer-events: none;
370
+ color: var(--w6w-muted);
371
+ }
372
+
362
373
  /* "Write to state" (step settings): the `validateStateConfig` messages for the current config. */
363
374
  .w6w-state-write-issues {
364
375
  color: var(--w6w-danger);
@@ -46,46 +46,22 @@
46
46
  .w6w-fx-wrap input[type="password"],
47
47
  .w6w-fx-wrap input[type="number"],
48
48
  .w6w-fx-wrap select,
49
- .w6w-fx-wrap textarea {
49
+ .w6w-fx-wrap textarea,
50
+ /* (0,2,1): the host guard's textarea arm is (0,2,1) and would out-rank a bare
51
+ (0,1,1) `.w6w-fx-wrap textarea` for min-height outside .w6w-field/.w6w-datavar-row. */
52
+ .w6w-fx-wrap.w6w-fx-wrap textarea {
50
53
  border: none;
51
54
  background: transparent;
52
55
  border-radius: 0;
53
56
  padding: var(--w6w-sp-1) var(--w6w-sp-0-5);
54
57
  outline: none;
55
- /* EVERY property in this block is load-bearing, for the same reason
56
- `.w6w-fx-inline-label`'s `margin: 0` is (see below): a host page layers its
57
- own unscoped `input[type="text"], textarea { … }` rule AFTER this file
58
- (studio's does, at `studio/src/styles.css:513-533`, `:759-771` and `:788`),
59
- so every property this block leaves undeclared is the host's — including
60
- inside a box this library draws. The two below were measured leaking, in
61
- [ui+studio], before they were declared — and they fix DIFFERENT things:
62
-
63
- margin — ALIGNMENT. A host `margin-top: 4px` in an `align-items:
64
- center` row drops the control 2px below the ƒx it shares the
65
- row with (string, number and the bare vars cell; select and
66
- multiselect escaped only because the host rule does not list
67
- them). Rendered: control cy 67 vs ƒx cy 65. On the textarea
68
- row — `align-items: flex-start` — the same 4px showed up as
69
- the ƒx sitting 4px off the control's first line. `margin: 0`
70
- is the whole of that fix.
71
-
72
- min-height — SIZE, and nothing else. Do not re-justify this one as
73
- alignment: the counterfactual was rendered (this `margin: 0`
74
- kept, `min-height: 0` removed) and the row measures a 0.0px
75
- top delta with the host's 80px floor fully in effect. What it
76
- fixes is that a host `textarea { min-height: 80px }`, written
77
- for that host's own bare textareas, was sizing the INSIDE of
78
- a box it cannot see — 80px/94px against the 62px/72px the
79
- same markup renders elsewhere, i.e. one of five control types
80
- 29% taller than the library drew it. The box is the library's
81
- to size; how many lines it holds is `rows` on the control.
82
- If a taller body field is ever wanted, it belongs HERE, not
83
- in a host element selector.
84
-
85
- Declared, not fought for: this stays at the block's existing specificity and
86
- uses no `!important`. A component that is only aligned while the host
87
- cooperates is broken. */
88
- margin: 0;
58
+ /* The control is inside a box this library draws, so it carries no margin or
59
+ host floor of its own. A host `input[type="text"], textarea { margin-top;
60
+ width; min-height: 80px }` (studio's does) is reverted by `_host-guard.scss`
61
+ for every `w6w-` form element, so this block declares no margin. `min-height:
62
+ 0` stays: it is the library's own value for a control inside a flex row (the
63
+ UA's `auto` is a different computed value on inputs/selects), not only a
64
+ counter to the host's textarea floor. */
89
65
  min-height: 0;
90
66
  }
91
67
  /* …and the two widgets that own an input-like box themselves are flattened too,
@@ -114,19 +90,10 @@
114
90
  margin: 0;
115
91
  }
116
92
  /* The label reads as the control's own text, next to it (mirrors
117
- `.w6w-array-check` above, the existing inline-checkbox idiom).
118
- `margin: 0` is LOAD-BEARING, not tidiness: a host page may carry an unscoped
119
- top-level `label { … margin-bottom: 10px }` (studio's own sheet does, at
120
- `studio/src/styles.css:499`), and since it is layered AFTER this file any
121
- property this block leaves undeclared is the host's. A bottom margin inside an
122
- `align-items: center` row lifts the text off the row's centre line — measured
123
- 5px above the checkbox and the ƒx before this declaration existed. Every other
124
- element of the row is defended the same way: the checkbox's `margin: 0` above
125
- out-specifies a host `input[type="checkbox"] { margin-right: … }` (0,2,1 vs
126
- 0,1,1), and the ƒx's chrome is pinned by `.w6w-fx-inline .w6w-expr-fx` below.
127
- A component that only lines up when the host sheet cooperates is broken. */
93
+ `.w6w-array-check` above, the existing inline-checkbox idiom). Its host
94
+ `label { margin-bottom }` is reverted by `_host-guard.scss`, and the ƒx's chrome
95
+ is pinned by `.w6w-fx-inline .w6w-expr-fx` below. */
128
96
  .w6w-fx-inline-label {
129
- margin: 0;
130
97
  color: var(--w6w-text);
131
98
  font-size: 13px;
132
99
  cursor: pointer;