@w6w/ui 0.2.0 → 0.2.54

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 (160) hide show
  1. package/CHANGELOG.md +146 -2
  2. package/README.md +28 -10
  3. package/dist/AppPicker.d.ts +58 -2
  4. package/dist/CanvasContextMenu.d.ts +19 -0
  5. package/dist/CanvasLayer.d.ts +38 -0
  6. package/dist/{CodeBlock-Dot3Pd7P.js → CodeBlock-C-oIIYfC.js} +1436 -555
  7. package/dist/CodeBlock-C-oIIYfC.js.map +1 -0
  8. package/dist/CodeBlock-CymlfyeA.cjs +15 -0
  9. package/dist/CodeBlock-CymlfyeA.cjs.map +1 -0
  10. package/dist/CodeEditor.d.ts +4 -1
  11. package/dist/ConditionEditor.d.ts +11 -0
  12. package/dist/EditConnectionModal.d.ts +6 -1
  13. package/dist/JsonEditor.d.ts +20 -0
  14. package/dist/Markdown.d.ts +25 -0
  15. package/dist/ParamCustomization.d.ts +5 -0
  16. package/dist/ParamsForm.d.ts +18 -4
  17. package/dist/RouterEditor.d.ts +5 -0
  18. package/dist/StepBuilderModal.d.ts +103 -15
  19. package/dist/StepNameEditor.d.ts +11 -0
  20. package/dist/StopEditor.d.ts +5 -0
  21. package/dist/TriggerFillForm.d.ts +14 -1
  22. package/dist/WebhookListenPanel.d.ts +28 -0
  23. package/dist/WorkflowConnections.d.ts +29 -0
  24. package/dist/WorkflowFlowEditor.d.ts +74 -7
  25. package/dist/app-pages.d.ts +2 -0
  26. package/dist/assets/script-completion.worker-DDJKkj5M.js +8290 -0
  27. package/dist/assets/script-completion.worker-DDJKkj5M.js.map +1 -0
  28. package/dist/canvas-context-menu.d.ts +27 -0
  29. package/dist/canvas-types.d.ts +36 -0
  30. package/dist/canvas-utils.d.ts +44 -0
  31. package/dist/code.cjs +1 -1
  32. package/dist/code.mjs +3 -4
  33. package/dist/code.mjs.map +1 -1
  34. package/dist/components/AnchoredFlyout.d.ts +7 -0
  35. package/dist/components/AuthFieldsForm.d.ts +11 -0
  36. package/dist/components/BudgetMeter.d.ts +15 -0
  37. package/dist/components/CallableList.d.ts +3 -2
  38. package/dist/components/ColumnsEditor.d.ts +27 -0
  39. package/dist/components/Combobox.d.ts +19 -1
  40. package/dist/components/ConnectionList.d.ts +2 -3
  41. package/dist/components/CredentialPicker.d.ts +35 -0
  42. package/dist/components/CsvPanel.d.ts +21 -0
  43. package/dist/components/DataEntryEditor.d.ts +38 -0
  44. package/dist/components/DataEntryList.d.ts +33 -0
  45. package/dist/components/DataStoreList.d.ts +33 -0
  46. package/dist/components/DataTable.d.ts +27 -0
  47. package/dist/components/DataTableGrid.d.ts +46 -0
  48. package/dist/components/EmptyState.d.ts +9 -0
  49. package/dist/components/EventbriteTriggerPicker.d.ts +7 -0
  50. package/dist/components/ExecutionDetail.d.ts +17 -1
  51. package/dist/components/ExecutionList.d.ts +19 -1
  52. package/dist/components/ExecutionLogPanel.d.ts +61 -3
  53. package/dist/components/ExpressionEditorModal.d.ts +33 -10
  54. package/dist/components/ExpressionOptions.d.ts +101 -15
  55. package/dist/components/HtmlPreview.d.ts +7 -0
  56. package/dist/components/JsonTree.d.ts +32 -0
  57. package/dist/components/ResolvedParams.d.ts +6 -1
  58. package/dist/components/ResultViewer.d.ts +46 -0
  59. package/dist/components/ScriptBindingsNotice.d.ts +31 -0
  60. package/dist/components/ScriptCodeField.d.ts +13 -0
  61. package/dist/components/StepStatusPill.d.ts +7 -0
  62. package/dist/components/expression-authoring.d.ts +13 -0
  63. package/dist/components/expression-dom.d.ts +17 -2
  64. package/dist/components/expression-template.d.ts +25 -3
  65. package/dist/components/icons.d.ts +1 -1
  66. package/dist/components/json-compose.d.ts +53 -0
  67. package/dist/components/result-format.d.ts +13 -0
  68. package/dist/condition-editor.d.ts +44 -0
  69. package/dist/data-stores/data-store-view.d.ts +371 -0
  70. package/dist/dynamic-fields.d.ts +60 -0
  71. package/dist/editor-theme.d.ts +24 -0
  72. package/dist/eventbrite-trigger-selection.d.ts +13 -0
  73. package/dist/flow-connect.d.ts +22 -16
  74. package/dist/flow-delete.d.ts +16 -0
  75. package/dist/flow-fanout.d.ts +2 -2
  76. package/dist/flow-history.d.ts +75 -0
  77. package/dist/flow-layout.d.ts +13 -0
  78. package/dist/flow-loop-colors.d.ts +39 -0
  79. package/dist/flow-loop.d.ts +98 -0
  80. package/dist/flow-node-flags.d.ts +14 -0
  81. package/dist/flow-problems.d.ts +69 -0
  82. package/dist/flow-state.d.ts +20 -0
  83. package/dist/flow-types.d.ts +155 -10
  84. package/dist/flow-utils.d.ts +33 -12
  85. package/dist/flow.cjs +4 -2
  86. package/dist/flow.cjs.map +1 -1
  87. package/dist/flow.d.ts +15 -2
  88. package/dist/flow.mjs +3737 -1350
  89. package/dist/flow.mjs.map +1 -1
  90. package/dist/index.cjs +2 -1
  91. package/dist/index.cjs.map +1 -1
  92. package/dist/index.d.ts +43 -5
  93. package/dist/index.mjs +2855 -1333
  94. package/dist/index.mjs.map +1 -1
  95. package/dist/node-samples-ChdyMBnJ.cjs +22 -0
  96. package/dist/node-samples-ChdyMBnJ.cjs.map +1 -0
  97. package/dist/node-samples-DkJL07EX.js +12302 -0
  98. package/dist/node-samples-DkJL07EX.js.map +1 -0
  99. package/dist/node-samples.d.ts +80 -0
  100. package/dist/note-markdown.d.ts +22 -0
  101. package/dist/output-shape.d.ts +30 -14
  102. package/dist/param-customization.d.ts +7 -0
  103. package/dist/provider.d.ts +174 -13
  104. package/dist/resolve-params.d.ts +50 -11
  105. package/dist/run-visuals.d.ts +18 -22
  106. package/dist/script-bindings.d.ts +63 -0
  107. package/dist/script-completion-service.d.ts +9 -0
  108. package/dist/script-completion.worker.d.ts +1 -0
  109. package/dist/script-completions.d.ts +2 -0
  110. package/dist/state-shape.d.ts +38 -0
  111. package/dist/step-preview-state.d.ts +155 -6
  112. package/dist/step-problems.d.ts +64 -0
  113. package/dist/test-inputs.d.ts +25 -0
  114. package/dist/trigger-registration.d.ts +28 -0
  115. package/dist/types.d.ts +179 -11
  116. package/dist/use-app-action-defs.d.ts +9 -1
  117. package/dist/use-dynamic-fields.d.ts +23 -0
  118. package/dist/use-test-input.d.ts +18 -0
  119. package/dist/workflow-connections.d.ts +30 -0
  120. package/package.json +18 -7
  121. package/src/code.css +60 -6
  122. package/src/styles/_budget-meter.scss +46 -0
  123. package/src/styles/_callable-list.scss +15 -6
  124. package/src/styles/_canvas.scss +353 -0
  125. package/src/styles/_code-editor.scss +35 -0
  126. package/src/styles/_code.scss +6 -5
  127. package/src/styles/_connections.scss +2 -14
  128. package/src/styles/_copyable.scss +24 -0
  129. package/src/styles/_data-stores.scss +138 -0
  130. package/src/styles/_data-table.scss +55 -0
  131. package/src/styles/_data-vars.scss +17 -6
  132. package/src/styles/_empty-state.scss +21 -0
  133. package/src/styles/_execution-history.scss +73 -0
  134. package/src/styles/_execution-log.scss +145 -1
  135. package/src/styles/_expression-modal.scss +106 -16
  136. package/src/styles/_fields.scss +11 -0
  137. package/src/styles/_flow.scss +171 -0
  138. package/src/styles/_fx.scss +26 -1
  139. package/src/styles/_incoming-state.scss +33 -0
  140. package/src/styles/_layout.scss +10 -0
  141. package/src/styles/_markdown.scss +20 -0
  142. package/src/styles/_modal.scss +12 -0
  143. package/src/styles/_multiselect.scss +35 -0
  144. package/src/styles/_sections.scss +36 -0
  145. package/src/styles/_step-builder.scss +145 -0
  146. package/src/styles/_tester.scss +57 -14
  147. package/src/styles/_tokens.scss +27 -1
  148. package/src/styles.css +1861 -115
  149. package/src/styles.scss +7 -0
  150. package/dist/CodeBlock-CZu4TFSi.cjs +0 -15
  151. package/dist/CodeBlock-CZu4TFSi.cjs.map +0 -1
  152. package/dist/CodeBlock-Dot3Pd7P.js.map +0 -1
  153. package/dist/ConfirmModal-ChoiGy2K.cjs +0 -11
  154. package/dist/ConfirmModal-ChoiGy2K.cjs.map +0 -1
  155. package/dist/ConfirmModal-Wx3i8F1n.js +0 -6359
  156. package/dist/ConfirmModal-Wx3i8F1n.js.map +0 -1
  157. package/dist/Copyable-1niV9gUa.js +0 -771
  158. package/dist/Copyable-1niV9gUa.js.map +0 -1
  159. package/dist/Copyable-CYZU1o4X.cjs +0 -2
  160. package/dist/Copyable-CYZU1o4X.cjs.map +0 -1
@@ -0,0 +1,27 @@
1
+ /** A right-click's flow-space drop point plus the nodes its node actions apply to. */
2
+ export interface CanvasMenuTarget {
3
+ /** Where an added node lands — the click converted to flow coordinates. */
4
+ flow: {
5
+ x: number;
6
+ y: number;
7
+ };
8
+ /** Node ids Duplicate / Delete act on. Empty on a bare-canvas right-click. */
9
+ nodeIds: string[];
10
+ }
11
+ export type CanvasMenuAction = "duplicate" | "delete" | "add-node" | "add-trigger";
12
+ export interface CanvasMenuItem {
13
+ action: CanvasMenuAction;
14
+ label: string;
15
+ disabled: boolean;
16
+ danger?: boolean;
17
+ /** A divider is drawn above this item. */
18
+ separated?: boolean;
19
+ }
20
+ /**
21
+ * The nodes a right-click acts on. A node that is part of the current selection acts on
22
+ * the whole selection; any other node acts on itself alone (and becomes the selection).
23
+ * The bare canvas acts on whatever is selected.
24
+ */
25
+ export declare function contextMenuTargets(selectedIds: readonly string[], nodeId?: string): string[];
26
+ /** Duplicate + Delete when nodes are targeted, then Add node + Add trigger. All greyed when read-only. */
27
+ export declare function canvasMenuItems(nodeIds: readonly string[], readOnly: boolean): CanvasMenuItem[];
@@ -0,0 +1,36 @@
1
+ /** Workflow canvas (notes + sections); hand-mirror of core's `Workflow.canvas`. */
2
+ export interface CanvasNote {
3
+ id: string;
4
+ color: string;
5
+ position: {
6
+ x: number;
7
+ y: number;
8
+ };
9
+ size: {
10
+ width: number;
11
+ height: number;
12
+ };
13
+ content: string;
14
+ }
15
+ export interface CanvasSection {
16
+ id: string;
17
+ title: string;
18
+ color: string;
19
+ position: {
20
+ x: number;
21
+ y: number;
22
+ };
23
+ size: {
24
+ width: number;
25
+ height: number;
26
+ };
27
+ /** Member node ids; a node belongs to at most one section. */
28
+ nodes: string[];
29
+ }
30
+ export interface FlowCanvas {
31
+ notes?: CanvasNote[];
32
+ sections?: CanvasSection[];
33
+ }
34
+ export declare const MAX_NOTES = 200;
35
+ export declare const MAX_SECTIONS = 200;
36
+ export declare const MAX_NOTE_BYTES = 10240;
@@ -0,0 +1,44 @@
1
+ import { FlowCanvas } from './canvas-types.ts';
2
+ /** Live geometry keyed by note/section id. */
3
+ export interface LiveGeometry {
4
+ [id: string]: {
5
+ position?: {
6
+ x: number;
7
+ y: number;
8
+ };
9
+ size?: {
10
+ width: number;
11
+ height: number;
12
+ };
13
+ };
14
+ }
15
+ /** Round every stored number to an integer. */
16
+ export declare function roundGeometry<T extends {
17
+ x: number;
18
+ y: number;
19
+ } | {
20
+ width: number;
21
+ height: number;
22
+ }>(g: T): T;
23
+ /**
24
+ * Stamp live geometry onto the stored canvas, rounded to integers. When
25
+ * `savePosition === false` the stored canvas is returned untouched (mirrors
26
+ * `flowToWorkflow`'s `withPosition`): not written is not erased.
27
+ */
28
+ export declare function withCanvasGeometry(canvas: FlowCanvas, savePosition: boolean, live?: LiveGeometry): FlowCanvas;
29
+ /** Remove a deleted node id from every section. */
30
+ export declare function pruneSectionMembers(canvas: FlowCanvas, deletedNodeId: string): FlowCanvas;
31
+ /** Map a renamed node id in every section. */
32
+ export declare function renameSectionMember(canvas: FlowCanvas, from: string, to: string): FlowCanvas;
33
+ /** Put `nodeIds` into `sectionId`, removing them from any other section (at most one each). */
34
+ export declare function assignMembership(canvas: FlowCanvas, sectionId: string, nodeIds: string[]): FlowCanvas;
35
+ /** Ids of every section containing the node. */
36
+ export declare function sectionsContaining(canvas: FlowCanvas, nodeId: string): string[];
37
+ /** Enforce the caps: 200 notes, 200 sections, 10240 UTF-8 bytes per note content. */
38
+ export declare function clampCanvas(canvas: FlowCanvas): FlowCanvas;
39
+ /**
40
+ * The canvas to emit. Geometry is stamped (rounded) from the live canvas when `savePosition` is
41
+ * on; when off, every item already in `stored` keeps its STORED position/size (live edits render
42
+ * but are not written — mirrors node positions). Items new this session keep their live geometry.
43
+ */
44
+ export declare function persistCanvas(canvas: FlowCanvas, stored: FlowCanvas | undefined, savePosition: boolean): FlowCanvas;
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-CZu4TFSi.cjs"),o=require("./Copyable-CYZU1o4X.cjs");exports.CodeBlock=e.CodeBlock;exports.Copyable=o.Copyable;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CodeBlock-CymlfyeA.cjs");exports.CodeBlock=e.CodeBlock;exports.Copyable=e.Copyable;
2
2
  //# sourceMappingURL=code.cjs.map
package/dist/code.mjs CHANGED
@@ -1,8 +1,7 @@
1
1
  "use client";
2
- import { C as r } from "./CodeBlock-Dot3Pd7P.js";
3
- import { C as a } from "./Copyable-1niV9gUa.js";
2
+ import { C as a, a as l } from "./CodeBlock-C-oIIYfC.js";
4
3
  export {
5
- r as CodeBlock,
6
- a as Copyable
4
+ a as CodeBlock,
5
+ l as Copyable
7
6
  };
8
7
  //# sourceMappingURL=code.mjs.map
package/dist/code.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"code.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
1
+ {"version":3,"file":"code.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1,7 @@
1
+ import { ReactNode, RefObject } from 'react';
2
+ /** Full-row flyout anchored inside the nearest dialog’s top layer. */
3
+ export declare function AnchoredFlyout({ anchorRef, onClose, children, }: {
4
+ anchorRef: RefObject<HTMLElement | null>;
5
+ onClose: () => void;
6
+ children: ReactNode;
7
+ }): import('react').ReactPortal | null;
@@ -21,6 +21,17 @@ interface Props {
21
21
  */
22
22
  mode?: "create" | "edit";
23
23
  }
24
+ /**
25
+ * Parses every filled `json` field of `values` (they are held as raw text while typing). Returns
26
+ * the values with those fields parsed, or an `error` naming the offending field by label. The
27
+ * error NEVER contains the typed text or the parser's message (which can quote it): a pasted key
28
+ * file that is almost valid must not be echoed back into the page.
29
+ */
30
+ export declare function parseJsonFields(fields: AuthField[], values: Record<string, unknown>): {
31
+ values: Record<string, unknown>;
32
+ } | {
33
+ error: string;
34
+ };
24
35
  /**
25
36
  * Renders the form for an Auth method's `fields` declaration. Field shape
26
37
  * comes from the app's manifest so no app-specific knowledge is needed here.
@@ -0,0 +1,15 @@
1
+ export interface BudgetMeterProps {
2
+ /** Accessible name and the visible caption. */
3
+ label: string;
4
+ /** Amount already consumed. */
5
+ used: number;
6
+ /** Upper bound `used` is measured against. */
7
+ limit: number;
8
+ /** Amount held back but not yet spent. The segment renders only when > 0. */
9
+ reserved?: number;
10
+ /** Formats every number the meter prints (visible text and aria-valuetext). */
11
+ format?: (n: number) => string;
12
+ className?: string;
13
+ testId?: string;
14
+ }
15
+ export declare function BudgetMeter({ label, used, limit, reserved, format, className, testId, }: BudgetMeterProps): import("react").JSX.Element;
@@ -14,7 +14,7 @@ export interface CallableListProps {
14
14
  rows: readonly CallableListRow[];
15
15
  title: ReactNode;
16
16
  description?: ReactNode;
17
- /** Shown when `rows` is empty (total, not the visible subset) and not `loading`. */
17
+ /** Shown (inside an EmptyState) when no rows exist at all and not `loading`. */
18
18
  emptyCopy?: ReactNode;
19
19
  /** Label of the New button. Defaults to "New". */
20
20
  newLabel?: string;
@@ -52,6 +52,7 @@ export interface CallableListProps {
52
52
  /**
53
53
  * A presentational list of callables (Functions, Endpoints, Workflows): rows in, callbacks out.
54
54
  * Owns only the archived filter and its toggle; it knows no router, query, modal or kind.
55
- * Rows render through {@link ListItem}: a button with `onOpen`, an anchor with `getHref`.
55
+ * Rows render through {@link DataTable}: a click handler with `onOpen`, anchors with `getHref`.
56
+ * No visible rows renders an {@link EmptyState}; when only archived rows exist it offers "Show archived".
56
57
  */
57
58
  export declare function CallableList({ rows, title, description, emptyCopy, newLabel, openRowTitle, testIds, loading, error, onCreate, creating, onImport, onOpen, getHref, showArchived: showArchivedProp, onShowArchivedChange, slots, }: CallableListProps): import("react").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { TableColumn } from '../data-stores/data-store-view.ts';
2
+ /**
3
+ * The `table` kind's column list: a controlled row editor (rows + `onChange(next)`; the column
4
+ * list itself is never copied).
5
+ *
6
+ * The **key column** select is the one piece of the schema a row cannot decide for itself: only a
7
+ * column that is `required` and typed `string` or `integer` may be a row's key, so the select
8
+ * offers only those rows. A column renamed, retyped or un-required out of that set resets the
9
+ * selection to `""` ("generated keys") rather than holding a key the server would reject.
10
+ *
11
+ * `columnErrors` is keyed by column NAME (what the host's error envelope names in
12
+ * `error.column`), so a 400 lands under the row that caused it.
13
+ *
14
+ * Each row also takes a **default**, typed as text and parsed with the column's type: empty or
15
+ * refused text leaves the column with no `default` key at all, a valid one stores the typed value
16
+ * (`7`, `true`), never the text.
17
+ */
18
+ export interface ColumnsEditorProps {
19
+ columns: TableColumn[];
20
+ onChange: (next: TableColumn[]) => void;
21
+ /** The selected key column's name, or `""` for "generated keys". */
22
+ keyColumn: string;
23
+ onKeyColumnChange: (k: string) => void;
24
+ /** One message per column name, from the server's `error.column`. */
25
+ columnErrors: Record<string, string>;
26
+ }
27
+ export declare function ColumnsEditor(props: ColumnsEditorProps): import("react").JSX.Element;
@@ -1,6 +1,8 @@
1
1
  export interface ComboboxOption {
2
2
  value: string;
3
3
  label: string;
4
+ /** A muted second line under the label (e.g. a value preview); never matched by the filter. */
5
+ detail?: string;
4
6
  }
5
7
  export interface ComboboxProps {
6
8
  options: ComboboxOption[];
@@ -15,10 +17,26 @@ export interface ComboboxProps {
15
17
  forceSelection?: boolean;
16
18
  /** Estimated option height in px, used by `auto` mode. Default 32. */
17
19
  optionHeight?: number;
20
+ /**
21
+ * Cap for the open list, in px — the list scrolls past it instead of growing.
22
+ * Default 240 (the shared value). A host inside an already-scrolling container
23
+ * (a modal body) passes a smaller one so the popup cannot add a second scroller.
24
+ */
25
+ listMaxHeight?: number;
18
26
  className?: string;
27
+ /**
28
+ * Called with the typed text on every edit — for a host that searches server-side and
29
+ * passes the results back as `options`. The local filter still narrows what is shown.
30
+ */
31
+ onInputChange?: (text: string) => void;
32
+ /** Shown in the open list when no option matches. Default "No matches". */
33
+ emptyText?: string;
34
+ /** A muted line at the foot of the open list (e.g. "More entries — type to narrow"). */
35
+ footer?: string;
19
36
  }
20
37
  /** Combobox is chosen when the list would take more than 60% of the viewport. */
21
38
  export declare function shouldUseCombobox(count: number, optionHeight: number, viewportHeight: number): boolean;
22
39
  /** Case-insensitive substring match on label and value. */
23
40
  export declare function filterOptions(options: ComboboxOption[], query: string): ComboboxOption[];
24
- export declare function Combobox({ options, value, onChange, placeholder, disabled, "aria-label": ariaLabel, mode, forceSelection, optionHeight, className, }: ComboboxProps): import("react").JSX.Element;
41
+ export declare const DEFAULT_LIST_MAX_HEIGHT = 240;
42
+ export declare function Combobox({ options, value, onChange, placeholder, disabled, "aria-label": ariaLabel, mode, forceSelection, optionHeight, listMaxHeight, className, onInputChange, emptyText, footer, }: ComboboxProps): import("react").JSX.Element;
@@ -33,9 +33,8 @@ export interface ConnectionListProps {
33
33
  };
34
34
  }
35
35
  /**
36
- * A presentational list of connections: rows in, callbacks out; it needs no provider. Each row is
37
- * a {@link ListItem} (app icon, name, auth key, state, an `invalid` tag after a failed test) with
38
- * Edit and Delete buttons as SIBLINGS of its link, never inside it.
36
+ * A presentational list of connections: rows in, callbacks out; it needs no provider. Rows render
37
+ * through {@link DataTable} (name/app, status, and an Edit/Delete column that is never a link).
39
38
  *
40
39
  * A `builtIn` row (the server's synthetic "no credential" entry) is a plain non-interactive item:
41
40
  * no link, no `onOpen`, no Edit, no Delete, because the server 404s get/test/delete on its id.
@@ -0,0 +1,35 @@
1
+ import { AuthField, ConnectionBinding, CredentialSummary, ServiceAccountConfig } from '../types.ts';
2
+ export interface CredentialPickerProps {
3
+ /** Credentials to offer. Pass them already filtered; this component renders them as given. */
4
+ credentials: CredentialSummary[];
5
+ /** `"existing"` picks one of `credentials`; `"new"` is for the caller's create form. */
6
+ mode: "existing" | "new";
7
+ onModeChange: (mode: "existing" | "new") => void;
8
+ /** The chosen credential id (`""` for none). Only used in `"existing"` mode. */
9
+ selectedId: string;
10
+ onSelect: (id: string) => void;
11
+ /** False hides the "Use existing" choice (nothing to choose from). Default true. */
12
+ canUseExisting?: boolean;
13
+ /** The contract the credential must satisfy, shown as a hint. */
14
+ contract?: string;
15
+ }
16
+ /**
17
+ * The Use existing / Create new switch of a connection's Credential step, plus the list of stored
18
+ * credentials. Presentational: no API access, no state of its own. Each option shows the
19
+ * credential's name and its non-secret `display` values, never a payload. The "Create new" form
20
+ * itself (name + fields) is the caller's, rendered beneath this.
21
+ */
22
+ export declare function CredentialPicker({ credentials, mode, onModeChange, selectedId, onSelect, canUseExisting, contract, }: CredentialPickerProps): import("react").JSX.Element;
23
+ /**
24
+ * The binding fields a `serviceAccount` auth asks for on a connection. `delegatedUser` is always
25
+ * labelled "Impersonated user" (the person the credential acts as, never the connection's owner),
26
+ * is absent when impersonation is `"none"` even if declared, and is synthesised when impersonation
27
+ * is allowed but the auth declares no such field.
28
+ */
29
+ export declare function bindingFieldsFor(sa: ServiceAccountConfig): AuthField[];
30
+ /**
31
+ * Maps typed binding values to the wire `binding`: `delegatedUser` stays top-level, every other key
32
+ * goes under `settings`, blank values are dropped, and an empty result is `undefined`. `scopes` is
33
+ * never sent (the server applies the auth's declared scopes).
34
+ */
35
+ export declare function buildBinding(fields: AuthField[], values: Record<string, unknown>): ConnectionBinding | undefined;
@@ -0,0 +1,21 @@
1
+ export interface CsvPanelProps {
2
+ /** What the panel is telling the operator, and whether it failed. `null` renders nothing. */
3
+ result: {
4
+ ok: boolean;
5
+ message: string;
6
+ } | null;
7
+ /** Disables Export while a request is in flight. */
8
+ busy?: boolean;
9
+ /** A file within {@link CSV_MAX_BYTES}. Reading and sending it are the host's. */
10
+ onImport: (file: File) => void;
11
+ /** A file the panel refused before handing it over (too large). */
12
+ onRefuse: (message: string) => void;
13
+ onExport: () => void;
14
+ }
15
+ /**
16
+ * CSV import and export for one table store: one file input, one Export button, one result line.
17
+ * Props-only. The panel owns the size check (a file over {@link CSV_MAX_BYTES} is refused here and
18
+ * never reaches `onImport`); it never parses the CSV, because the host is the authority on line
19
+ * and column.
20
+ */
21
+ export declare function CsvPanel({ result, busy, onImport, onRefuse, onExport }: CsvPanelProps): import("react").JSX.Element;
@@ -0,0 +1,38 @@
1
+ export interface DataEntryEditorProps {
2
+ /** `kv` edits one input; `doc` edits JSON in a {@link JsonEditor}. */
3
+ kind: "kv" | "doc";
4
+ /** True for a not-yet-created entry: opens directly in edit mode with a key input. */
5
+ isNew: boolean;
6
+ /** The entry's key (existing mode heading). */
7
+ entryKey?: string;
8
+ /** The new entry's key (controlled). */
9
+ newKey?: string;
10
+ /** Concurrency token supplied by the host; never presented as document history. */
11
+ version?: number | null;
12
+ /** Existing mode: ISO expiry, shown when set. */
13
+ expiresAt?: string | null;
14
+ /** The value text (controlled). */
15
+ text: string;
16
+ /** A host-supplied value/save error. */
17
+ error?: string | null;
18
+ /** True after a stale `ifVersion`: shows the conflict copy and Reload, and disables Save. */
19
+ conflict?: boolean;
20
+ /** True while a save is in flight: disables Save. */
21
+ saving?: boolean;
22
+ /** Fired per edit of the value, with the new text. */
23
+ onTextChange: (text: string) => void;
24
+ /** Fired per edit of the new-entry key, with the new text. */
25
+ onKeyChange: (key: string) => void;
26
+ /** Opens the host's delete confirmation for an existing entry. */
27
+ onDelete?: () => void;
28
+ onSave: () => void;
29
+ onCancel: () => void;
30
+ /** Fired by the conflict prompt's Reload. */
31
+ onReload: () => void;
32
+ }
33
+ /**
34
+ * Existing entries open for viewing, then Edit enables changes inside the same modal.
35
+ * New entries start in edit mode. Drafts, `ifVersion` and mutations live in the host.
36
+ * Document validity is derived from the controlled text, including initial values and reloads.
37
+ */
38
+ export declare function DataEntryEditor({ kind, isNew, entryKey, newKey, expiresAt, text, error, conflict, saving, onTextChange, onKeyChange, onDelete, onSave, onCancel, onReload, }: DataEntryEditorProps): import("react").JSX.Element;
@@ -0,0 +1,33 @@
1
+ import { ReactNode } from 'react';
2
+ /** One row of a kv/doc store's entry list, as the host has already prepared it. */
3
+ export interface DataEntryListRow {
4
+ key: string;
5
+ version: number;
6
+ /** The short text shown in the Value column. */
7
+ preview: string;
8
+ }
9
+ export interface DataEntryListProps {
10
+ rows: readonly DataEntryListRow[];
11
+ /** Shown instead of the table when there are no rows and the list is not `loading`. */
12
+ empty?: ReactNode;
13
+ /** When there are no rows, shows the loading text instead of `empty`. */
14
+ loading?: boolean;
15
+ /** Initial text of the key-prefix box. */
16
+ searchValue?: string;
17
+ /** Renders "Load more" when true. */
18
+ hasMore?: boolean;
19
+ /** Fired when a row is opened by mouse or its key button by keyboard. */
20
+ onOpen: (key: string) => void;
21
+ /** Fired with the prefix text when the search form is SUBMITTED (never per keystroke). */
22
+ onSearch: (text: string) => void;
23
+ /** Fired by the "New entry" button. */
24
+ onNew: () => void;
25
+ /** Fired by "Load more". */
26
+ onLoadMore: () => void;
27
+ }
28
+ /**
29
+ * A presentational list of a kv/doc store's entries: view-model rows in, callbacks out. It owns
30
+ * only the text of the search box; the query, the editor and the delete confirmation are the
31
+ * host's. Rows render through {@link DataTable}.
32
+ */
33
+ export declare function DataEntryList({ rows, empty, loading, searchValue, hasMore, onOpen, onSearch, onNew, onLoadMore, }: DataEntryListProps): import("react").JSX.Element;
@@ -0,0 +1,33 @@
1
+ import { MouseEvent, ReactNode } from 'react';
2
+ import { DataStore } from '../data-stores/data-store-view.ts';
3
+ export interface DataStoreListProps {
4
+ stores: readonly DataStore[];
5
+ loading?: boolean;
6
+ error?: string | null;
7
+ /** Row click. The event is passed through untouched; the host may `preventDefault`. */
8
+ onOpen?: (id: string, event: MouseEvent<Element>) => void;
9
+ /** When set, each row is a real `<a href>`. */
10
+ getHref?: (id: string) => string;
11
+ /** Renders an Edit button per row. */
12
+ onEdit?: (store: DataStore) => void;
13
+ /** Renders an Archive button per row. Confirmation and the archive call are the host's. */
14
+ onArchive?: (store: DataStore) => void;
15
+ /** Disables every Archive button while an archive is in flight. */
16
+ busy?: boolean;
17
+ /** Size formatter; defaults to the package's `formatBytes` (`2.0 KiB`). */
18
+ formatSize?: (bytes: number) => string;
19
+ slots?: {
20
+ /** Heading block above the rows. */
21
+ header?: ReactNode;
22
+ /** Trailing action(s) next to the header (e.g. a "New store" button). */
23
+ actions?: ReactNode;
24
+ /** Shown when there are no stores and the list is not `loading`. */
25
+ empty?: ReactNode;
26
+ };
27
+ }
28
+ /**
29
+ * A presentational list of Data stores: rows in, callbacks out; it needs no provider. Rows render
30
+ * through {@link DataTable} (name, kind, entry count, size, last update, and an Edit/Archive column
31
+ * that is never a link).
32
+ */
33
+ export declare function DataStoreList({ stores, loading, error, onOpen, getHref, onEdit, onArchive, busy, formatSize, slots, }: DataStoreListProps): import("react").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { MouseEvent, ReactNode } from 'react';
2
+ export interface DataTableColumn<Row> {
3
+ key: string;
4
+ header: ReactNode;
5
+ /** Omitted ⇒ the cell shows `String(row[key] ?? "")`. */
6
+ render?: (row: Row) => ReactNode;
7
+ width?: string;
8
+ align?: "left" | "right" | "center";
9
+ /** With `getRowHref`, wrap this column's cells in an anchor. Default true. */
10
+ link?: boolean;
11
+ }
12
+ export interface DataTableProps<Row> {
13
+ columns: readonly DataTableColumn<Row>[];
14
+ rows: readonly Row[];
15
+ rowKey: (row: Row) => string;
16
+ /** Row click. The event is passed through untouched; the host may `preventDefault`. */
17
+ onRowClick?: (row: Row, e: MouseEvent<Element>) => void;
18
+ /** When set, every cell of a `link !== false` column wraps its content in `<a href>`. */
19
+ getRowHref?: (row: Row) => string | undefined;
20
+ /** Rendered in place of the body when there are no rows and not `loading`. */
21
+ empty?: ReactNode;
22
+ loading?: boolean;
23
+ className?: string;
24
+ testId?: string;
25
+ rowTestId?: (row: Row) => string | undefined;
26
+ }
27
+ export declare function DataTable<Row>(props: DataTableProps<Row>): import("react").JSX.Element;
@@ -0,0 +1,46 @@
1
+ import { ReactNode } from 'react';
2
+ import { TableColumn } from '../data-stores/data-store-view.ts';
3
+ /** One grid row as the host has prepared it. `id` is the entry key; the new row is `isNew`. */
4
+ export interface DataTableGridRow {
5
+ id: string;
6
+ /** True for the unsaved row: its key cell is editable and its `data-row` is `"new"`. */
7
+ isNew?: boolean;
8
+ /** Draft cell text by column name. */
9
+ cells: Record<string, string>;
10
+ /** The version the row was loaded at; `null` for a new row. */
11
+ version: number | null;
12
+ /** True when the draft differs from the loaded entry. */
13
+ dirty: boolean;
14
+ /** True after a stale `ifVersion`: shows the conflict copy and Reload, and disables Save. */
15
+ conflict?: boolean;
16
+ /** Per-cell error messages by column name, shown under their own cell. */
17
+ cellErrors?: Record<string, string>;
18
+ }
19
+ export interface DataTableGridProps {
20
+ columns: readonly TableColumn[];
21
+ /** The column whose cell is the row key (read-only on an existing row). */
22
+ keyColumn: string;
23
+ rows: readonly DataTableGridRow[];
24
+ /** A grid-level (not cell) error. */
25
+ error?: string | null;
26
+ loading?: boolean;
27
+ empty?: ReactNode;
28
+ /** Initial text of the key-prefix box. */
29
+ searchValue?: string;
30
+ hasMore?: boolean;
31
+ onCellChange: (rowId: string, column: string, text: string) => void;
32
+ onSave: (rowId: string) => void;
33
+ /** Fired immediately; confirmation is the host's. */
34
+ onDelete: (rowId: string) => void;
35
+ onReload: (rowId: string) => void;
36
+ onAddRow: () => void;
37
+ onLoadMore: () => void;
38
+ /** Fired with the prefix text when the search form is SUBMITTED (never per keystroke). */
39
+ onSearch: (text: string) => void;
40
+ }
41
+ /**
42
+ * A presentational editable grid for a table store: row view-models in, callbacks out. Drafts,
43
+ * dirty tracking, version handling and the delete confirmation are the host's. Rows render through
44
+ * {@link DataTable}.
45
+ */
46
+ export declare function DataTableGrid({ columns, keyColumn, rows, error, loading, empty, searchValue, hasMore, onCellChange, onSave, onDelete, onReload, onAddRow, onLoadMore, onSearch, }: DataTableGridProps): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ export interface EmptyStateProps {
3
+ title?: ReactNode;
4
+ children?: ReactNode;
5
+ action?: ReactNode;
6
+ className?: string;
7
+ testId?: string;
8
+ }
9
+ export declare function EmptyState({ title, children, action, className, testId }: EmptyStateProps): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { EventbriteTriggerChoices } from '../eventbrite-trigger-selection.ts';
2
+ /** The same event list the app's webhook registration uses, saved as activity/actions. */
3
+ export declare function EventbriteTriggerPicker({ choices, onChange, readOnly, }: {
4
+ choices: EventbriteTriggerChoices;
5
+ onChange: (actions: string[]) => void;
6
+ readOnly?: boolean;
7
+ }): import("react").JSX.Element;
@@ -36,6 +36,9 @@ export interface ExecutionDetailValue {
36
36
  /** A workflow run's steps. `undefined` = not a step-bearing run (no section);
37
37
  * `[]` = it ran and no step did (the panel's own empty state). */
38
38
  steps?: ExecutionLogStep[];
39
+ /** The execution this one is a re-run of — shown as "Re-run of <id>".
40
+ * `null`/omitted ⇒ an ordinary execution, no line. */
41
+ rerunOf?: string | null;
39
42
  }
40
43
  export interface ExecutionDetailProps {
41
44
  /** The execution to show, or `null` when there is nothing to show yet. */
@@ -54,6 +57,19 @@ export interface ExecutionDetailProps {
54
57
  /** Supplied ⇒ the "Open in visual editor" button renders and calls this.
55
58
  * Omitted ⇒ no button (a function/endpoint run has no visual editor to open). */
56
59
  onOpenInEditor?: () => void;
60
+ /** Supplied ⇒ a "Back" control renders above everything else and calls this
61
+ * — for a host that shows this detail IN PLACE of the list it was opened
62
+ * from. Omitted ⇒ no control. Rendered in every branch, so a view whose
63
+ * fetch failed can still be left. */
64
+ onBack?: () => void;
65
+ /** Supplied ⇒ the "Re-run" button renders and calls this. Omitted ⇒ no button. */
66
+ onRerun?: () => void;
67
+ /** `true` while the host's re-run is in flight — the button is disabled and
68
+ * says so. */
69
+ rerunning?: boolean;
70
+ /** Supplied ⇒ the "Re-run of <id>" id is a link that calls this with that
71
+ * id, to open the original. Omitted ⇒ plain text. */
72
+ onOpenExecution?: (id: string) => void;
57
73
  }
58
74
  /**
59
75
  * Everything known about one past execution: which callable it was and how it
@@ -67,4 +83,4 @@ export interface ExecutionDetailProps {
67
83
  *
68
84
  * A pure display leaf — no fetching, no polling, no live-ticking timer.
69
85
  */
70
- export declare function ExecutionDetail({ execution, loading, errorMessage, onClose, onOpenInEditor, }: ExecutionDetailProps): import("react").JSX.Element;
86
+ export declare function ExecutionDetail({ execution, loading, errorMessage, onClose, onOpenInEditor, onBack, onRerun, rerunning, onOpenExecution, }: ExecutionDetailProps): import("react").JSX.Element;
@@ -19,6 +19,17 @@ export interface ExecutionListItem {
19
19
  /** Wall-clock duration once the run has finished; `null` while it is still
20
20
  * queued/running (rendered as `—`). */
21
21
  durationMs: number | null;
22
+ /** The execution this one is a re-run of — the row then carries a "Re-run"
23
+ * tag. `null`/omitted ⇒ an ordinary execution. */
24
+ rerunOf?: string | null;
25
+ /** How the run was started (`manual`, `schedule`, `webhook`, `event`, `replay`, or any other
26
+ * value the host passes through). `null`/omitted ⇒ no trigger segment. */
27
+ trigger?: string | null;
28
+ /** The trigger node the run entered through, shown beside the trigger. */
29
+ triggerNodeId?: string | null;
30
+ /** The start of the run's input as JSON text, shown as a one-line snippet. `null`/omitted ⇒
31
+ * no snippet. */
32
+ inputPreview?: string | null;
22
33
  }
23
34
  export interface ExecutionListProps {
24
35
  /** The page of past executions, rendered in exactly this order — never re-sorted. */
@@ -47,6 +58,13 @@ export interface ExecutionListProps {
47
58
  onPrev?: () => void;
48
59
  /** Supplied ⇒ the pager renders and `Next` calls this. */
49
60
  onNext?: () => void;
61
+ /** Supplied ⇒ every row gets a "Re-run" control beside it that reports the
62
+ * row's id here. Omitted ⇒ no control. */
63
+ onRerun?: (id: string) => void;
64
+ /** The row whose re-run is in flight — its control is disabled. While any
65
+ * re-run is in flight every row's control is disabled, so two can never
66
+ * overlap. `null`/omitted ⇒ none. */
67
+ rerunningId?: string | null;
50
68
  }
51
69
  /**
52
70
  * A paged list of past executions: one row per run, click-to-select, with a
@@ -57,4 +75,4 @@ export interface ExecutionListProps {
57
75
  * reports a page request; the host owns which page is loaded and which row is
58
76
  * selected.
59
77
  */
60
- export declare function ExecutionList({ items, selectedId, onSelect, showCallable, loading, emptyLabel, hasPrev, hasNext, onPrev, onNext, }: ExecutionListProps): import("react").JSX.Element;
78
+ export declare function ExecutionList({ items, selectedId, onSelect, showCallable, loading, emptyLabel, hasPrev, hasNext, onPrev, onNext, onRerun, rerunningId, }: ExecutionListProps): import("react").JSX.Element;