@w6w/ui 0.2.67 → 0.2.68

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 (37) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{CodeBlock-C1IC5_6O.cjs → CodeBlock-85y9qvE3.cjs} +4 -4
  3. package/dist/{CodeBlock-C1IC5_6O.cjs.map → CodeBlock-85y9qvE3.cjs.map} +1 -1
  4. package/dist/{CodeBlock-CsdRXzb0.js → CodeBlock-a5QVaIGk.js} +158 -131
  5. package/dist/{CodeBlock-CsdRXzb0.js.map → CodeBlock-a5QVaIGk.js.map} +1 -1
  6. package/dist/NodeConfigForm.d.ts +8 -2
  7. package/dist/StepBuilderModal.d.ts +2 -0
  8. package/dist/code.cjs +1 -1
  9. package/dist/code.mjs +1 -1
  10. package/dist/components/ExecutionLogDock.d.ts +44 -0
  11. package/dist/components/ExecutionLogPanel.d.ts +66 -0
  12. package/dist/components/ExecutionLogView.d.ts +30 -0
  13. package/dist/components/icons.d.ts +1 -1
  14. package/dist/connection-app-meta-DID4zDg-.cjs +29 -0
  15. package/dist/connection-app-meta-DID4zDg-.cjs.map +1 -0
  16. package/dist/{connection-app-meta-DEC0n4PA.js → connection-app-meta-mmyKM3H9.js} +4606 -3725
  17. package/dist/connection-app-meta-mmyKM3H9.js.map +1 -0
  18. package/dist/flow-types.d.ts +25 -1
  19. package/dist/flow.cjs +7 -5
  20. package/dist/flow.cjs.map +1 -1
  21. package/dist/flow.mjs +1119 -980
  22. package/dist/flow.mjs.map +1 -1
  23. package/dist/form-schema.d.ts +34 -0
  24. package/dist/index.cjs +3 -2
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.ts +4 -0
  27. package/dist/index.mjs +1683 -1313
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/provider.d.ts +2 -0
  30. package/package.json +2 -2
  31. package/src/styles/_execution-log-view.scss +322 -0
  32. package/src/styles/_form-builder.scss +13 -0
  33. package/src/styles.css +335 -0
  34. package/src/styles.scss +1 -0
  35. package/dist/connection-app-meta-DEC0n4PA.js.map +0 -1
  36. package/dist/connection-app-meta-Dk6F3KEH.cjs +0 -29
  37. package/dist/connection-app-meta-Dk6F3KEH.cjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { FlowStep } from './flow-types.ts';
3
3
  /** The base, always-available node settings — independent of the action's params. */
4
- export type NodeConfig = Pick<FlowStep, "retry" | "onError" | "notes">;
4
+ export type NodeConfig = Pick<FlowStep, "retry" | "onError" | "notes" | "timeoutMs">;
5
5
  /**
6
6
  * A stable reference over a Function or a Workflow (core rfcs/endpoint.md ·
7
7
  * CallableRef). Declared **locally** — structurally identical to
@@ -27,7 +27,7 @@ export type CallableRef = {
27
27
  * existing caller, so `NodeConfig` itself and every pre-existing render path
28
28
  * are unchanged.
29
29
  */
30
- export declare function NodeConfigForm({ config, onChange, readOnly, hasGraph, failureHandling, retryControls, reroute, }: {
30
+ export declare function NodeConfigForm({ config, onChange, readOnly, hasGraph, failureHandling, retryControls, timeoutControl, reroute, }: {
31
31
  config: NodeConfig;
32
32
  onChange: (next: NodeConfig) => void;
33
33
  readOnly?: boolean;
@@ -55,6 +55,12 @@ export declare function NodeConfigForm({ config, onChange, readOnly, hasGraph, f
55
55
  * first"). Default `true` reproduces today's markup byte-identically.
56
56
  */
57
57
  retryControls?: boolean;
58
+ /**
59
+ * `false` omits the "Timeout" field. Defaults to `retryControls`: the steps
60
+ * that cannot retry (`@w6w/call`/`@w6w/control`) make no vendor call to time
61
+ * out either, and a trigger is already hidden by `failureHandling`.
62
+ */
63
+ timeoutControl?: boolean;
58
64
  /**
59
65
  * Failure re-dispatch — a `CallableRef`, rendered only when supplied. `value`/
60
66
  * `onChange` are the host's own state (so it can offer a "clear" affordance);
@@ -326,6 +326,8 @@ export declare const StepTestRun: import('react').ForwardRefExoticComponent<{
326
326
  action: string;
327
327
  connectionId?: string;
328
328
  values: Record<string, unknown>;
329
+ /** The step's own time limit (ms), sent with the test invoke when set. */
330
+ timeoutMs?: number;
329
331
  canRun: boolean;
330
332
  hideRunButton?: boolean;
331
333
  persist?: StepTestPersist;
package/dist/code.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CodeBlock-C1IC5_6O.cjs");exports.CodeBlock=e.CodeBlock;exports.Copyable=e.Copyable;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CodeBlock-85y9qvE3.cjs");exports.CodeBlock=e.CodeBlock;exports.Copyable=e.Copyable;
2
2
  //# sourceMappingURL=code.cjs.map
package/dist/code.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { C as a, a as l } from "./CodeBlock-CsdRXzb0.js";
2
+ import { C as a, a as l } from "./CodeBlock-a5QVaIGk.js";
3
3
  export {
4
4
  a as CodeBlock,
5
5
  l as Copyable
@@ -0,0 +1,44 @@
1
+ import { ReactNode } from 'react';
2
+ /** Where the log body is shown: under the host's content, in an in-page window, or in its own browser window. */
3
+ export type ExecutionLogDockMode = "docked" | "floating" | "window";
4
+ export interface ExecutionLogDockProps {
5
+ /** The log body, typically an `ExecutionLogView`. It stays mounted while the dock is collapsed. */
6
+ children: ReactNode;
7
+ /** Whether the body is showing. The bar is always showing. */
8
+ open: boolean;
9
+ onOpenChange: (open: boolean) => void;
10
+ /** Text on the bar's toggle. Default "Logs". */
11
+ title?: ReactNode;
12
+ /** Status shown on the bar beside the title (a run's status pill, step count, duration). */
13
+ summary?: ReactNode;
14
+ /**
15
+ * Clears what the log shows (e.g. "I'm done looking at this run"). Omitted ⇒ no Clear control.
16
+ * The control carries `data-testid="execution-log-dismiss"`, the same lever `ExecutionLogPanel`'s
17
+ * dismiss button is.
18
+ */
19
+ onClear?: () => void;
20
+ /** Docked body height in px. Default 320. The user can drag it between 120px and 85% of the viewport. */
21
+ defaultHeight?: number;
22
+ /**
23
+ * Class names for the wrapper the body is rendered in once it is popped out to its own browser
24
+ * window — a host that scopes its stylesheet under a root class (e.g. `w6w-embed-root`) passes
25
+ * that class here so the copied styles still match.
26
+ */
27
+ windowClassName?: string;
28
+ /** Title of the popped-out browser window. Default "Logs". */
29
+ windowTitle?: string;
30
+ /** Extra content at the end of the bar, before the dock controls. */
31
+ barActions?: ReactNode;
32
+ "data-testid"?: string;
33
+ }
34
+ /**
35
+ * A bottom dock for a log: an always-visible bar that slides the log up from the bottom of its
36
+ * host (splitting the space with whatever sits above it), with a drag handle for the split, and
37
+ * a pop-out that moves the log into its own browser window — or, where popups are blocked (an
38
+ * embed inside an iframe), into a floating in-page window — with a control to dock it back.
39
+ *
40
+ * Layout contract: render it as the last child of a flex column whose first child takes the
41
+ * remaining space (`flex: 1; min-height: 0`). Docked, the dock's own height is the bar plus the
42
+ * body's height; collapsed or popped out, it is just the bar.
43
+ */
44
+ export declare function ExecutionLogDock({ children, open, onOpenChange, title, summary, onClear, defaultHeight, windowClassName, windowTitle, barActions, "data-testid": testId, }: ExecutionLogDockProps): import("react").JSX.Element;
@@ -9,6 +9,12 @@ export interface ExecutionLogNode {
9
9
  appName?: string;
10
10
  actionName?: string;
11
11
  }
12
+ /** A node's kind and display names, a built-in `@w6w/*` node resolved from its own definition. */
13
+ export declare function describeNode(node: ExecutionLogNode): {
14
+ trigger: boolean;
15
+ appName: string;
16
+ actionName: string;
17
+ };
12
18
  /**
13
19
  * A step's or run's failure, already normalised by the HOST from the workflow
14
20
  * spec's `StepError` (`code`/`message`/`phase`/`retryable`). The panel never
@@ -121,6 +127,8 @@ export interface ExecutionLogIteration {
121
127
  failedNodeId?: string;
122
128
  steps: ExecutionLogStep[];
123
129
  }
130
+ /** Server record key order is not execution order. Keep ties stable and never mutate props. */
131
+ export declare function chronologicalSteps(steps: readonly ExecutionLogStep[]): ExecutionLogStep[];
124
132
  export interface ExecutionLogPanelProps {
125
133
  /** Rendered earliest first by start time (finish time as fallback), then untimed steps. */
126
134
  steps: ExecutionLogStep[];
@@ -154,3 +162,61 @@ export interface ExecutionLogPanelProps {
154
162
  * docstring). Fills whatever box its host gives it.
155
163
  */
156
164
  export declare function ExecutionLogPanel({ steps, emptyLabel, onDismiss, runError, stepErrors, }: ExecutionLogPanelProps): import("react").JSX.Element;
165
+ export declare const isOffPath: (step: ExecutionLogStep) => boolean;
166
+ /** The short reason shown beside a real skip's pill. */
167
+ export declare const SKIP_REASON_LABELS: Record<Exclude<SkipReason, "not_on_path">, string>;
168
+ /** "N steps on other paths, not part of this run" — collapsed; expands to their names. */
169
+ export declare function ExecutionLogOffPath({ steps }: {
170
+ steps: ExecutionLogStep[];
171
+ }): import("react").JSX.Element;
172
+ /**
173
+ * A For each row's per-iteration view: a summary (count, failures, pointer at the
174
+ * failing body step), one chip per served iteration, and one sub-row per body
175
+ * step showing the SELECTED iteration's record (failed iteration preselected,
176
+ * else the last served one). Clicking a chip selects that iteration for every
177
+ * body step and opens their rows, so its input and output read at once; each
178
+ * sub-row's `<select>` picks the same shared iteration. Pure props -> DOM.
179
+ */
180
+ export declare function ExecutionLogIterations({ step }: {
181
+ step: ExecutionLogStep;
182
+ }): import("react").JSX.Element;
183
+ /**
184
+ * `TriggerFillForm`'s StepError visual, reused rather than re-invented: the
185
+ * `.w6w-result.w6w-error` box, an optional muted `<code>` line, then the
186
+ * message. `label` (recorded step errors only) names the step on a line above.
187
+ * The code line's spacing lives in `_execution-log.scss` as tokens instead of
188
+ * `TriggerFillForm`'s inline style — same values (`0.75` opacity, a 4px gap).
189
+ */
190
+ export declare function ExecutionLogErrorBlock({ error, label, }: {
191
+ error: ExecutionLogError;
192
+ label?: string;
193
+ }): import("react").JSX.Element;
194
+ export declare function formatElapsed(startedAt: string, finishedAt: string): string | null;
195
+ /** Each payload starts collapsed and mounts its read-only JSON tree on demand.
196
+ * The shared viewer provides key folding, Expand/Collapse all and full-value copy.
197
+ * Force JSON so an output string stays a string, even when it contains HTML or JSON text. */
198
+ export declare function ExecutionLogJson({ title, value, defaultOpen, }: {
199
+ title: string;
200
+ value: unknown;
201
+ /** Start expanded (an iteration picked from a For each chip shows its data at once). */
202
+ defaultOpen?: boolean;
203
+ }): import("react").JSX.Element;
204
+ /**
205
+ * An If / Stop workflow / Router input's resolved comparisons as a left | operator | right |
206
+ * result table — what was compared, not only `condition: true`. The engine records them
207
+ * beside the boolean (`{ conditions: [{ left, op, right, result }], combinator? }`; a Router
208
+ * per route); a record without that trace renders nothing, and the raw Input below still
209
+ * shows everything.
210
+ */
211
+ export declare function ExecutionLogConditions({ input }: {
212
+ input: unknown;
213
+ }): import("react").JSX.Element | null;
214
+ export declare function hasStateBlock(step: ExecutionLogStep): boolean;
215
+ /**
216
+ * The State block: one row per state write in the order the run recorded them
217
+ * (`state.<path>: old → new`, or the warning that stopped it), then the run's
218
+ * state tree after this step. Rendered only when there is something to show.
219
+ */
220
+ export declare function ExecutionLogState({ step }: {
221
+ step: ExecutionLogStep;
222
+ }): import("react").JSX.Element;
@@ -0,0 +1,30 @@
1
+ import { ReactNode } from 'react';
2
+ import { ExecutionLogError, ExecutionLogRecordedError, ExecutionLogStep } from './ExecutionLogPanel.tsx';
3
+ export interface ExecutionLogViewProps {
4
+ /** The run's steps, the same already-mapped rows `ExecutionLogPanel` takes. */
5
+ steps: ExecutionLogStep[];
6
+ /** Shown instead of the two columns when no step of the run has a row yet. */
7
+ emptyLabel?: ReactNode;
8
+ /** The run's own failure (`RunState.error`), shown above both columns. */
9
+ runError?: ExecutionLogError;
10
+ /** Step failures the run recorded and moved past (`RunState.stepErrors`), after `runError`. */
11
+ stepErrors?: ExecutionLogRecordedError[];
12
+ /**
13
+ * The step shown in the right column. Omitted ⇒ the view keeps its own selection: it follows
14
+ * the run (the failed step, else the one still running, else the latest) until the user picks
15
+ * a row, and keeps that row from then on.
16
+ */
17
+ selectedStepId?: string | null;
18
+ /** Called with the row the user picked. */
19
+ onSelectStep?: (stepId: string) => void;
20
+ }
21
+ /**
22
+ * A workflow run's log as two columns: the steps in execution order on the left, and the picked
23
+ * step on the right — its status, start and finish timestamps, elapsed time, error, input and
24
+ * output side by side, console, metadata and state.
25
+ *
26
+ * Same "host owns the data" contract as `ExecutionLogPanel`: it takes already-mapped rows and
27
+ * never fetches or polls. It fills the box its host gives it (a docked panel, a floating window,
28
+ * a page), scrolling each column on its own.
29
+ */
30
+ export declare function ExecutionLogView({ steps, emptyLabel, runError, stepErrors, selectedStepId, onSelectStep, }: ExecutionLogViewProps): import("react").JSX.Element;
@@ -4,7 +4,7 @@ import { ReactNode } from 'react';
4
4
  * never for the studio component that happened to draw it, so a caller asks for
5
5
  * `icon="history"` rather than `icon="history-icon-tsx"`.
6
6
  */
7
- export type IconName = "edit" | "edit-2" | "delete" | "copy" | "check" | "close" | "history" | "info" | "clock" | "json" | "code" | "sync" | "cloud-download" | "eye" | "play" | "stop" | "warning" | "file-text" | "settings" | "github" | "user" | "bot" | "users" | "logout" | "id-card" | "dashboard" | "pulse" | "workflow" | "globe" | "lambda" | "sliders" | "file" | "plug" | "grid" | "folder" | "git-branch" | "coin" | "building" | "server" | "price-tag" | "lang-node" | "terminal" | "lang-python" | "lang-curl" | "sun" | "moon" | "circle-half" | "layout" | "run" | "pause" | "ban" | "trash" | "maximize" | "form" | "braces" | "settings-2" | "sticky-note" | "frame" | "bold" | "grip" | "chevron-down" | "database" | "archive" | "key" | "eye-off" | "more-horizontal";
7
+ export type IconName = "edit" | "edit-2" | "delete" | "copy" | "check" | "close" | "history" | "info" | "clock" | "json" | "code" | "sync" | "cloud-download" | "eye" | "play" | "stop" | "warning" | "file-text" | "settings" | "github" | "user" | "bot" | "users" | "logout" | "id-card" | "dashboard" | "pulse" | "workflow" | "globe" | "lambda" | "sliders" | "file" | "plug" | "grid" | "folder" | "git-branch" | "coin" | "building" | "server" | "price-tag" | "lang-node" | "terminal" | "lang-python" | "lang-curl" | "sun" | "moon" | "circle-half" | "layout" | "run" | "pause" | "ban" | "trash" | "maximize" | "form" | "braces" | "settings-2" | "sticky-note" | "frame" | "bold" | "grip" | "chevron-down" | "chevron-up" | "external-link" | "panel-bottom" | "database" | "archive" | "key" | "eye-off" | "more-horizontal";
8
8
  /**
9
9
  * Which attributes the shared `<svg>` root carries — i.e. how the glyph is
10
10
  * painted. The sources are not uniform, and forcing them into one shape would