@w6w/ui 0.2.54 → 0.2.56

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.
@@ -262,6 +262,8 @@ export interface W6WApi {
262
262
  * instead) and hosts should not offer an Edit action. It never throws for the absence.
263
263
  */
264
264
  updateConnection?(id: string, body: {
265
+ /** Switch to a key/token auth method with a full replacement credential. */
266
+ authKey?: string;
265
267
  displayName?: string;
266
268
  binding?: ConnectionBinding;
267
269
  credentialId?: string;
@@ -1,11 +1,59 @@
1
1
  import { FlowStep, FlowWorkflow } from './flow-types.ts';
2
- import { AuthDef, ConnectionSummary } from './types.ts';
2
+ import { AppSummary, AuthDef, ConnectionSummary } from './types.ts';
3
3
  export type FlowConnections = Record<string, {
4
4
  app: string;
5
5
  connection: string | null;
6
6
  }>;
7
+ export type ConnectionResourceEdit = {
8
+ type: "add";
9
+ name: string;
10
+ app: string;
11
+ connection: string;
12
+ } | {
13
+ type: "update";
14
+ ref: string;
15
+ name: string;
16
+ connection: string;
17
+ nodeIds?: string[];
18
+ } | {
19
+ type: "replace";
20
+ ref: string;
21
+ connection: string;
22
+ } | {
23
+ type: "rename";
24
+ ref: string;
25
+ name: string;
26
+ } | {
27
+ type: "remove";
28
+ ref: string;
29
+ } | {
30
+ type: "assign";
31
+ ref: string;
32
+ nodeIds: string[];
33
+ };
34
+ export interface WorkflowConnectionResources {
35
+ workflowId: string;
36
+ nodes: Pick<FlowStep, "id" | "uses">[];
37
+ connections: FlowConnections;
38
+ /** App identity already resolved for the canvas; reuse it in the connections rail. */
39
+ apps?: ReadonlyMap<string, AppSummary>;
40
+ readOnly?: boolean;
41
+ /** Select and reveal a consuming node on the canvas. Available in read-only views too. */
42
+ focusNode?: (nodeId: string) => void;
43
+ /** Temporary canvas emphasis, without changing selection or the saved workflow. */
44
+ highlightNode?: (nodeId: string | null) => void;
45
+ /** Stable callback against the current canvas, including edits made since the panel opened. */
46
+ edit: (edit: ConnectionResourceEdit) => void;
47
+ }
48
+ /** Edit references and their consumers together, so one undo restores the whole change. */
49
+ export declare function editConnectionResources(nodes: FlowStep[], connections: FlowConnections, edit: ConnectionResourceEdit): {
50
+ nodes: FlowStep[];
51
+ connections: FlowConnections;
52
+ };
7
53
  /** Missing/foreign bindings stay unresolved in the editor; the server rejects invalid references. */
8
54
  export declare function connectionIdFor(step: FlowStep, connections?: FlowConnections): string | undefined;
55
+ /** A workflow-owned name, independent of the first node or the account's display name. */
56
+ export declare function nextWorkflowConnectionName(appId: string, connections: FlowConnections): string;
9
57
  /** Lift old inline IDs on the next editor save. Independent bindings remain independent. */
10
58
  export declare function centralizeConnections<T extends Pick<FlowWorkflow, "connections" | "nodes">>(workflow: T): T;
11
59
  /** Drop only unreferenced aliases when serializing the complete workflow. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w6w/ui",
3
- "version": "0.2.54",
3
+ "version": "0.2.56",
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",
@@ -86,3 +86,67 @@
86
86
  .w6w-connection-id-copy:focus-within .w6w-copyable-btn {
87
87
  opacity: 1;
88
88
  }
89
+
90
+ /* Identify workflow connections and their consuming canvas nodes. */
91
+ .w6w-connection-app-heading {
92
+ display: flex;
93
+ align-items: center;
94
+ gap: var(--w6w-sp-2);
95
+ }
96
+ .w6w-connection-node-list {
97
+ display: flex;
98
+ flex-direction: column;
99
+ gap: var(--w6w-sp-2);
100
+ list-style: none;
101
+ margin: 0;
102
+ padding: 0;
103
+ }
104
+ .w6w-connection-node-list .w6w-btn {
105
+ display: flex;
106
+ align-items: center;
107
+ gap: var(--w6w-sp-2);
108
+ text-align: left;
109
+ width: 100%;
110
+ overflow-wrap: anywhere;
111
+ white-space: normal;
112
+ }
113
+
114
+ .w6w-connection-node-label {
115
+ display: flex;
116
+ flex-direction: column;
117
+ min-width: 0;
118
+ }
119
+
120
+ .w6w-workflow-connections-heading {
121
+ display: flex;
122
+ align-items: center;
123
+ justify-content: space-between;
124
+ gap: var(--w6w-sp-2);
125
+ }
126
+ .w6w-workflow-connections-heading h3 { margin: 0; font-size: inherit; }
127
+ .w6w-workflow-connection {
128
+ display: flex;
129
+ flex-direction: column;
130
+ gap: var(--w6w-sp-2);
131
+ padding-bottom: var(--w6w-sp-3);
132
+ border-bottom: 1px solid var(--w6w-border);
133
+ }
134
+ .w6w-connection-summary {
135
+ display: flex;
136
+ flex-direction: column;
137
+ flex: 1;
138
+ min-width: 0;
139
+ overflow-wrap: anywhere;
140
+ }
141
+ .w6w-connection-consumers summary { cursor: pointer; }
142
+ .w6w-connection-consumers[open] summary { margin-bottom: var(--w6w-sp-2); }
143
+ .w6w-connection-scope { display: flex; align-items: flex-start; gap: var(--w6w-sp-2); }
144
+ .w6w-connection-remove { border-top: 1px solid var(--w6w-border); padding-top: var(--w6w-sp-3); }
145
+
146
+ .w6w-connection-node-kind {
147
+ display: inline-flex;
148
+ align-items: center;
149
+ justify-content: center;
150
+ flex-shrink: 0;
151
+ color: var(--w6w-accent);
152
+ }
@@ -386,3 +386,9 @@
386
386
  .w6w-state-map-add {
387
387
  align-self: flex-start;
388
388
  }
389
+
390
+ /* Hover/focus in the connections rail: ephemeral emphasis, separate from selection/run status. */
391
+ .w6w-flow .react-flow__node.w6w-connection-highlight [data-run-status] {
392
+ outline: 3px solid var(--w6w-accent);
393
+ outline-offset: 4px;
394
+ }
@@ -54,11 +54,10 @@
54
54
  min-height: 0;
55
55
  overflow: auto;
56
56
  }
57
- /* The action bar as a pinned footer: kept out of the scroll region and separated
58
- with a top border so Run / Save / Delete stay visible however long the params. */
57
+ /* Keep the action bar outside the scroll region so Run / Save / Delete stay
58
+ visible however long the params. */
59
59
  .w6w-tester-actions-footer {
60
60
  margin-top: auto;
61
- border-top: 1px solid var(--w6w-border);
62
61
  padding-top: var(--w6w-sp-3);
63
62
  }
64
63
 
package/src/styles.css CHANGED
@@ -4260,6 +4260,12 @@ dialog.w6w-modal.w6w-modal-fullscreen .w6w-modal-header {
4260
4260
  align-self: flex-start;
4261
4261
  }
4262
4262
 
4263
+ /* Hover/focus in the connections rail: ephemeral emphasis, separate from selection/run status. */
4264
+ .w6w-flow .react-flow__node.w6w-connection-highlight [data-run-status] {
4265
+ outline: 3px solid var(--w6w-accent);
4266
+ outline-offset: 4px;
4267
+ }
4268
+
4263
4269
  .w6w-section {
4264
4270
  border: 1px solid var(--w6w-border);
4265
4271
  border-radius: 8px;
@@ -4402,11 +4408,10 @@ dialog.w6w-modal.w6w-modal-fullscreen .w6w-modal-header {
4402
4408
  overflow: auto;
4403
4409
  }
4404
4410
 
4405
- /* The action bar as a pinned footer: kept out of the scroll region and separated
4406
- with a top border so Run / Save / Delete stay visible however long the params. */
4411
+ /* Keep the action bar outside the scroll region so Run / Save / Delete stay
4412
+ visible however long the params. */
4407
4413
  .w6w-tester-actions-footer {
4408
4414
  margin-top: auto;
4409
- border-top: 1px solid var(--w6w-border);
4410
4415
  padding-top: var(--w6w-sp-3);
4411
4416
  }
4412
4417
 
@@ -6592,6 +6597,93 @@ button.w6w-rel-open:focus-visible strong {
6592
6597
  opacity: 1;
6593
6598
  }
6594
6599
 
6600
+ /* Identify workflow connections and their consuming canvas nodes. */
6601
+ .w6w-connection-app-heading {
6602
+ display: flex;
6603
+ align-items: center;
6604
+ gap: var(--w6w-sp-2);
6605
+ }
6606
+
6607
+ .w6w-connection-node-list {
6608
+ display: flex;
6609
+ flex-direction: column;
6610
+ gap: var(--w6w-sp-2);
6611
+ list-style: none;
6612
+ margin: 0;
6613
+ padding: 0;
6614
+ }
6615
+
6616
+ .w6w-connection-node-list .w6w-btn {
6617
+ display: flex;
6618
+ align-items: center;
6619
+ gap: var(--w6w-sp-2);
6620
+ text-align: left;
6621
+ width: 100%;
6622
+ overflow-wrap: anywhere;
6623
+ white-space: normal;
6624
+ }
6625
+
6626
+ .w6w-connection-node-label {
6627
+ display: flex;
6628
+ flex-direction: column;
6629
+ min-width: 0;
6630
+ }
6631
+
6632
+ .w6w-workflow-connections-heading {
6633
+ display: flex;
6634
+ align-items: center;
6635
+ justify-content: space-between;
6636
+ gap: var(--w6w-sp-2);
6637
+ }
6638
+
6639
+ .w6w-workflow-connections-heading h3 {
6640
+ margin: 0;
6641
+ font-size: inherit;
6642
+ }
6643
+
6644
+ .w6w-workflow-connection {
6645
+ display: flex;
6646
+ flex-direction: column;
6647
+ gap: var(--w6w-sp-2);
6648
+ padding-bottom: var(--w6w-sp-3);
6649
+ border-bottom: 1px solid var(--w6w-border);
6650
+ }
6651
+
6652
+ .w6w-connection-summary {
6653
+ display: flex;
6654
+ flex-direction: column;
6655
+ flex: 1;
6656
+ min-width: 0;
6657
+ overflow-wrap: anywhere;
6658
+ }
6659
+
6660
+ .w6w-connection-consumers summary {
6661
+ cursor: pointer;
6662
+ }
6663
+
6664
+ .w6w-connection-consumers[open] summary {
6665
+ margin-bottom: var(--w6w-sp-2);
6666
+ }
6667
+
6668
+ .w6w-connection-scope {
6669
+ display: flex;
6670
+ align-items: flex-start;
6671
+ gap: var(--w6w-sp-2);
6672
+ }
6673
+
6674
+ .w6w-connection-remove {
6675
+ border-top: 1px solid var(--w6w-border);
6676
+ padding-top: var(--w6w-sp-3);
6677
+ }
6678
+
6679
+ .w6w-connection-node-kind {
6680
+ display: inline-flex;
6681
+ align-items: center;
6682
+ justify-content: center;
6683
+ flex-shrink: 0;
6684
+ color: var(--w6w-accent);
6685
+ }
6686
+
6595
6687
  /* Data stores (F-2): DataStoreList, ColumnsEditor, CsvPanel and the data-grid/entry rules ported from Studio's Data store detail page. */
6596
6688
  .w6w-data-store-list {
6597
6689
  display: flex;