@uipath/apollo-react 6.72.0 → 6.74.0
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.
- package/dist/canvas/components/JsonTree/JsonTree.cjs +256 -214
- package/dist/canvas/components/JsonTree/JsonTree.d.ts +31 -25
- package/dist/canvas/components/JsonTree/JsonTree.d.ts.map +1 -1
- package/dist/canvas/components/JsonTree/JsonTree.js +238 -217
- package/dist/canvas/components/JsonTree/index.cjs +67 -58
- package/dist/canvas/components/JsonTree/index.d.ts +2 -8
- package/dist/canvas/components/JsonTree/index.d.ts.map +1 -1
- package/dist/canvas/components/JsonTree/index.js +2 -8
- package/dist/canvas/components/NodeIOView/NodeIOView.types.d.ts +1 -1
- package/dist/canvas/components/NodeIOView/NodeIOView.types.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNode.types.d.ts +1 -1
- package/dist/canvas/components/StageNode/StageNode.types.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNodeHeader.cjs +15 -6
- package/dist/canvas/components/StageNode/StageNodeHeader.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNodeHeader.js +15 -6
- package/dist/canvas/stories/templates/LayoutPreviewsPage.cjs +1257 -0
- package/dist/canvas/stories/templates/LayoutPreviewsPage.d.ts +2 -0
- package/dist/canvas/stories/templates/LayoutPreviewsPage.d.ts.map +1 -0
- package/dist/canvas/stories/templates/LayoutPreviewsPage.js +1223 -0
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/package.json +2 -2
- package/dist/canvas/components/JsonTree/DecorationChip.cjs +0 -81
- package/dist/canvas/components/JsonTree/DecorationChip.d.ts +0 -5
- package/dist/canvas/components/JsonTree/DecorationChip.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/DecorationChip.js +0 -47
- package/dist/canvas/components/JsonTree/EditorChrome.cjs +0 -93
- package/dist/canvas/components/JsonTree/EditorChrome.d.ts +0 -18
- package/dist/canvas/components/JsonTree/EditorChrome.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/EditorChrome.js +0 -56
- package/dist/canvas/components/JsonTree/JsonContainerEditor.cjs +0 -103
- package/dist/canvas/components/JsonTree/JsonContainerEditor.d.ts +0 -10
- package/dist/canvas/components/JsonTree/JsonContainerEditor.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/JsonContainerEditor.js +0 -69
- package/dist/canvas/components/JsonTree/JsonLeafValueEditor.cjs +0 -98
- package/dist/canvas/components/JsonTree/JsonLeafValueEditor.d.ts +0 -9
- package/dist/canvas/components/JsonTree/JsonLeafValueEditor.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/JsonLeafValueEditor.js +0 -64
- package/dist/canvas/components/JsonTree/JsonMultilineLeafEditor.cjs +0 -86
- package/dist/canvas/components/JsonTree/JsonMultilineLeafEditor.d.ts +0 -9
- package/dist/canvas/components/JsonTree/JsonMultilineLeafEditor.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/JsonMultilineLeafEditor.js +0 -52
- package/dist/canvas/components/JsonTree/JsonTree.types.cjs +0 -18
- package/dist/canvas/components/JsonTree/JsonTree.types.d.ts +0 -110
- package/dist/canvas/components/JsonTree/JsonTree.types.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/JsonTree.types.js +0 -0
- package/dist/canvas/components/JsonTree/JsonTreeRow.cjs +0 -358
- package/dist/canvas/components/JsonTree/JsonTreeRow.d.ts +0 -36
- package/dist/canvas/components/JsonTree/JsonTreeRow.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/JsonTreeRow.js +0 -318
- package/dist/canvas/components/JsonTree/JsonTreeToolbar.cjs +0 -224
- package/dist/canvas/components/JsonTree/JsonTreeToolbar.d.ts +0 -17
- package/dist/canvas/components/JsonTree/JsonTreeToolbar.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/JsonTreeToolbar.js +0 -190
- package/dist/canvas/components/JsonTree/JsonTypeBadge.cjs +0 -70
- package/dist/canvas/components/JsonTree/JsonTypeBadge.d.ts +0 -10
- package/dist/canvas/components/JsonTree/JsonTypeBadge.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/JsonTypeBadge.js +0 -36
- package/dist/canvas/components/JsonTree/NodeKey.cjs +0 -86
- package/dist/canvas/components/JsonTree/NodeKey.d.ts +0 -10
- package/dist/canvas/components/JsonTree/NodeKey.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/NodeKey.js +0 -52
- package/dist/canvas/components/JsonTree/RowActions.cjs +0 -121
- package/dist/canvas/components/JsonTree/RowActions.d.ts +0 -8
- package/dist/canvas/components/JsonTree/RowActions.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/RowActions.js +0 -87
- package/dist/canvas/components/JsonTree/ScalarValueCell.cjs +0 -132
- package/dist/canvas/components/JsonTree/ScalarValueCell.d.ts +0 -12
- package/dist/canvas/components/JsonTree/ScalarValueCell.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/ScalarValueCell.js +0 -95
- package/dist/canvas/components/JsonTree/buildJsonTree.cjs +0 -321
- package/dist/canvas/components/JsonTree/buildJsonTree.d.ts +0 -39
- package/dist/canvas/components/JsonTree/buildJsonTree.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/buildJsonTree.js +0 -254
- package/dist/canvas/components/JsonTree/clipboard.cjs +0 -63
- package/dist/canvas/components/JsonTree/clipboard.d.ts +0 -2
- package/dist/canvas/components/JsonTree/clipboard.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/clipboard.js +0 -29
- package/dist/canvas/components/JsonTree/leafEditTypes.cjs +0 -74
- package/dist/canvas/components/JsonTree/leafEditTypes.d.ts +0 -6
- package/dist/canvas/components/JsonTree/leafEditTypes.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/leafEditTypes.js +0 -34
|
@@ -0,0 +1,1223 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "@uipath/apollo-wind";
|
|
3
|
+
import { ArrowUpRight, LayoutPanelTop, PanelRight, PanelsTopLeft } from "lucide-react";
|
|
4
|
+
const buildStoryHref = (storyId)=>{
|
|
5
|
+
let extra = '';
|
|
6
|
+
try {
|
|
7
|
+
const params = new URLSearchParams(window.top?.location.search ?? '');
|
|
8
|
+
params.delete('path');
|
|
9
|
+
extra = params.toString();
|
|
10
|
+
} catch {}
|
|
11
|
+
return `./?path=/story/${storyId}${extra ? `&${extra}` : ''}`;
|
|
12
|
+
};
|
|
13
|
+
function Bar({ className, on }) {
|
|
14
|
+
return /*#__PURE__*/ jsx("div", {
|
|
15
|
+
className: cn('h-1.5 shrink-0 rounded-full', on ? 'bg-brand/45' : 'bg-foreground-subtle/25', className)
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function Box({ className, on }) {
|
|
19
|
+
return /*#__PURE__*/ jsx("div", {
|
|
20
|
+
className: cn('shrink-0 rounded-[3px]', on ? 'bg-brand/20' : 'bg-foreground-subtle/15', className)
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function Zone({ on, className, children }) {
|
|
24
|
+
return /*#__PURE__*/ jsx("div", {
|
|
25
|
+
className: cn('overflow-hidden rounded-md border', on ? 'border-brand bg-brand-subtle ring-1 ring-brand/30' : 'border-border-subtle bg-surface-raised', className),
|
|
26
|
+
children: children
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function CanvasGraph() {
|
|
30
|
+
return /*#__PURE__*/ jsx("div", {
|
|
31
|
+
className: "absolute inset-0 bg-[radial-gradient(var(--color-foreground-subtle)_0.5px,transparent_0.5px)] bg-size-[8px_8px] opacity-40",
|
|
32
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
33
|
+
className: "absolute left-[18%] top-[38%] flex items-center",
|
|
34
|
+
children: [
|
|
35
|
+
/*#__PURE__*/ jsx(Box, {
|
|
36
|
+
className: "h-4 w-7 border border-border-subtle bg-surface"
|
|
37
|
+
}),
|
|
38
|
+
/*#__PURE__*/ jsx("div", {
|
|
39
|
+
className: "h-px w-4 bg-foreground-subtle/60"
|
|
40
|
+
}),
|
|
41
|
+
/*#__PURE__*/ jsx(Box, {
|
|
42
|
+
className: "h-4 w-7 border border-brand bg-surface"
|
|
43
|
+
}),
|
|
44
|
+
/*#__PURE__*/ jsx("div", {
|
|
45
|
+
className: "h-px w-4 bg-foreground-subtle/60"
|
|
46
|
+
}),
|
|
47
|
+
/*#__PURE__*/ jsx(Box, {
|
|
48
|
+
className: "h-4 w-7 border border-border-subtle bg-surface"
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function CanvasZone({ on, className }) {
|
|
55
|
+
return /*#__PURE__*/ jsxs(Zone, {
|
|
56
|
+
on: on,
|
|
57
|
+
className: cn('relative min-w-0 flex-1', className),
|
|
58
|
+
children: [
|
|
59
|
+
/*#__PURE__*/ jsx(CanvasGraph, {}),
|
|
60
|
+
/*#__PURE__*/ jsxs("div", {
|
|
61
|
+
className: "absolute right-1.5 top-1.5 flex gap-1",
|
|
62
|
+
children: [
|
|
63
|
+
/*#__PURE__*/ jsx(Box, {
|
|
64
|
+
className: "h-2.5 w-8 bg-surface"
|
|
65
|
+
}),
|
|
66
|
+
/*#__PURE__*/ jsx(Box, {
|
|
67
|
+
className: "size-2.5 bg-surface"
|
|
68
|
+
})
|
|
69
|
+
]
|
|
70
|
+
})
|
|
71
|
+
]
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function SidebarRail({ on }) {
|
|
75
|
+
return /*#__PURE__*/ jsxs(Zone, {
|
|
76
|
+
on: on,
|
|
77
|
+
className: "flex w-6 flex-col items-center gap-1.5 py-1.5",
|
|
78
|
+
children: [
|
|
79
|
+
/*#__PURE__*/ jsx(Box, {
|
|
80
|
+
on: on,
|
|
81
|
+
className: "size-2.5 bg-brand/70"
|
|
82
|
+
}),
|
|
83
|
+
[
|
|
84
|
+
0,
|
|
85
|
+
1,
|
|
86
|
+
2,
|
|
87
|
+
3
|
|
88
|
+
].map((i)=>/*#__PURE__*/ jsx(Box, {
|
|
89
|
+
on: on,
|
|
90
|
+
className: "size-2.5"
|
|
91
|
+
}, i)),
|
|
92
|
+
/*#__PURE__*/ jsx("div", {
|
|
93
|
+
className: "flex-1"
|
|
94
|
+
}),
|
|
95
|
+
/*#__PURE__*/ jsx(Box, {
|
|
96
|
+
on: on,
|
|
97
|
+
className: "size-2.5"
|
|
98
|
+
})
|
|
99
|
+
]
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function SidebarExpanded({ on }) {
|
|
103
|
+
return /*#__PURE__*/ jsxs(Zone, {
|
|
104
|
+
on: on,
|
|
105
|
+
className: "flex w-[26%] flex-col gap-1.5 p-1.5",
|
|
106
|
+
children: [
|
|
107
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
108
|
+
on: on,
|
|
109
|
+
className: "w-3/5"
|
|
110
|
+
}),
|
|
111
|
+
[
|
|
112
|
+
0,
|
|
113
|
+
1,
|
|
114
|
+
2,
|
|
115
|
+
3
|
|
116
|
+
].map((i)=>/*#__PURE__*/ jsxs("div", {
|
|
117
|
+
className: cn('flex items-center gap-1 rounded-sm p-0.5', 0 === i && 'bg-brand/15'),
|
|
118
|
+
children: [
|
|
119
|
+
/*#__PURE__*/ jsx(Box, {
|
|
120
|
+
on: on,
|
|
121
|
+
className: cn('size-2', 0 === i && 'bg-brand/70')
|
|
122
|
+
}),
|
|
123
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
124
|
+
on: on,
|
|
125
|
+
className: i % 2 ? 'w-2/5' : 'w-3/5'
|
|
126
|
+
})
|
|
127
|
+
]
|
|
128
|
+
}, i))
|
|
129
|
+
]
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
function FieldStack({ on, count = 3 }) {
|
|
133
|
+
return /*#__PURE__*/ jsx(Fragment, {
|
|
134
|
+
children: Array.from({
|
|
135
|
+
length: count
|
|
136
|
+
}, (_, i)=>/*#__PURE__*/ jsxs("div", {
|
|
137
|
+
className: "flex flex-col gap-0.5",
|
|
138
|
+
children: [
|
|
139
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
140
|
+
on: on,
|
|
141
|
+
className: "h-1 w-2/5"
|
|
142
|
+
}),
|
|
143
|
+
/*#__PURE__*/ jsx(Box, {
|
|
144
|
+
on: on,
|
|
145
|
+
className: "h-2.5 w-full"
|
|
146
|
+
})
|
|
147
|
+
]
|
|
148
|
+
}, i))
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function PanelBody({ on, children }) {
|
|
152
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
153
|
+
className: "flex h-full flex-col gap-1.5 p-1.5",
|
|
154
|
+
children: [
|
|
155
|
+
/*#__PURE__*/ jsxs("div", {
|
|
156
|
+
className: "flex items-center justify-between",
|
|
157
|
+
children: [
|
|
158
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
159
|
+
on: on,
|
|
160
|
+
className: "w-2/5"
|
|
161
|
+
}),
|
|
162
|
+
/*#__PURE__*/ jsx(Box, {
|
|
163
|
+
on: on,
|
|
164
|
+
className: "size-2"
|
|
165
|
+
})
|
|
166
|
+
]
|
|
167
|
+
}),
|
|
168
|
+
children ?? /*#__PURE__*/ jsx(FieldStack, {
|
|
169
|
+
on: on
|
|
170
|
+
})
|
|
171
|
+
]
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
function BottomPanel({ on, collapsed }) {
|
|
175
|
+
return /*#__PURE__*/ jsxs(Zone, {
|
|
176
|
+
on: on,
|
|
177
|
+
className: cn('absolute inset-x-1.5 bottom-1.5', collapsed ? 'h-4' : 'h-[34%]'),
|
|
178
|
+
children: [
|
|
179
|
+
/*#__PURE__*/ jsxs("div", {
|
|
180
|
+
className: "flex items-center gap-1 p-1",
|
|
181
|
+
children: [
|
|
182
|
+
/*#__PURE__*/ jsx(Box, {
|
|
183
|
+
on: on,
|
|
184
|
+
className: "h-2 w-7 bg-brand/40"
|
|
185
|
+
}),
|
|
186
|
+
/*#__PURE__*/ jsx(Box, {
|
|
187
|
+
on: on,
|
|
188
|
+
className: "h-2 w-6"
|
|
189
|
+
}),
|
|
190
|
+
/*#__PURE__*/ jsx(Box, {
|
|
191
|
+
on: on,
|
|
192
|
+
className: "h-2 w-6"
|
|
193
|
+
})
|
|
194
|
+
]
|
|
195
|
+
}),
|
|
196
|
+
!collapsed && /*#__PURE__*/ jsxs("div", {
|
|
197
|
+
className: "flex flex-col gap-1 px-1.5",
|
|
198
|
+
children: [
|
|
199
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
200
|
+
on: on,
|
|
201
|
+
className: "w-3/4"
|
|
202
|
+
}),
|
|
203
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
204
|
+
on: on,
|
|
205
|
+
className: "w-1/2"
|
|
206
|
+
})
|
|
207
|
+
]
|
|
208
|
+
})
|
|
209
|
+
]
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
function StandaloneShell({ sidebar, right, bottom, takeover, highlight, rightContent }) {
|
|
213
|
+
const on = (region)=>highlight.includes(region);
|
|
214
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
215
|
+
className: "relative flex aspect-[16/10] gap-1.5 bg-surface p-1.5",
|
|
216
|
+
children: [
|
|
217
|
+
'rail' === sidebar && /*#__PURE__*/ jsx(SidebarRail, {
|
|
218
|
+
on: on('sidebar')
|
|
219
|
+
}),
|
|
220
|
+
'expanded' === sidebar && /*#__PURE__*/ jsx(SidebarExpanded, {
|
|
221
|
+
on: on('sidebar')
|
|
222
|
+
}),
|
|
223
|
+
/*#__PURE__*/ jsxs("div", {
|
|
224
|
+
className: "relative min-w-0 flex-1",
|
|
225
|
+
children: [
|
|
226
|
+
/*#__PURE__*/ jsx(CanvasZone, {
|
|
227
|
+
on: on('canvas'),
|
|
228
|
+
className: "absolute inset-0"
|
|
229
|
+
}),
|
|
230
|
+
right && /*#__PURE__*/ jsx(Zone, {
|
|
231
|
+
on: on('right'),
|
|
232
|
+
className: cn('absolute right-1.5 top-1.5 shadow-sm', 'executions' === bottom || 'collapsed' === bottom ? 'bottom-7' : 'bottom-1.5', rightContent ? 'w-[46%]' : 'w-[34%]'),
|
|
233
|
+
children: rightContent ?? /*#__PURE__*/ jsx(PanelBody, {
|
|
234
|
+
on: on('right')
|
|
235
|
+
})
|
|
236
|
+
}),
|
|
237
|
+
'properties' === bottom && /*#__PURE__*/ jsx(Zone, {
|
|
238
|
+
on: on('bottom'),
|
|
239
|
+
className: "absolute inset-x-1.5 bottom-1.5 h-[40%]",
|
|
240
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
241
|
+
className: "grid h-full grid-cols-3 gap-1.5 p-1.5",
|
|
242
|
+
children: [
|
|
243
|
+
/*#__PURE__*/ jsx(FieldStack, {
|
|
244
|
+
on: on('bottom'),
|
|
245
|
+
count: 2
|
|
246
|
+
}),
|
|
247
|
+
/*#__PURE__*/ jsx(FieldStack, {
|
|
248
|
+
on: on('bottom'),
|
|
249
|
+
count: 2
|
|
250
|
+
}),
|
|
251
|
+
/*#__PURE__*/ jsx(FieldStack, {
|
|
252
|
+
on: on('bottom'),
|
|
253
|
+
count: 2
|
|
254
|
+
})
|
|
255
|
+
]
|
|
256
|
+
})
|
|
257
|
+
}),
|
|
258
|
+
('executions' === bottom || 'collapsed' === bottom) && /*#__PURE__*/ jsx("div", {
|
|
259
|
+
className: cn('absolute inset-0', right && 'right-[36%]'),
|
|
260
|
+
children: /*#__PURE__*/ jsx(BottomPanel, {
|
|
261
|
+
on: on('bottom'),
|
|
262
|
+
collapsed: 'collapsed' === bottom
|
|
263
|
+
})
|
|
264
|
+
})
|
|
265
|
+
]
|
|
266
|
+
}),
|
|
267
|
+
takeover && /*#__PURE__*/ jsx("div", {
|
|
268
|
+
className: "absolute inset-0 grid place-items-center bg-foreground/15 p-3",
|
|
269
|
+
children: /*#__PURE__*/ jsxs(Zone, {
|
|
270
|
+
on: on('takeover'),
|
|
271
|
+
className: "flex size-full flex-col shadow-lg",
|
|
272
|
+
children: [
|
|
273
|
+
/*#__PURE__*/ jsxs("div", {
|
|
274
|
+
className: "flex items-center justify-between border-b border-brand/30 p-1.5",
|
|
275
|
+
children: [
|
|
276
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
277
|
+
on: true,
|
|
278
|
+
className: "w-1/4"
|
|
279
|
+
}),
|
|
280
|
+
/*#__PURE__*/ jsx(Box, {
|
|
281
|
+
className: "h-2.5 w-8 bg-brand/60"
|
|
282
|
+
})
|
|
283
|
+
]
|
|
284
|
+
}),
|
|
285
|
+
/*#__PURE__*/ jsxs("div", {
|
|
286
|
+
className: "flex min-h-0 flex-1",
|
|
287
|
+
children: [
|
|
288
|
+
/*#__PURE__*/ jsxs("div", {
|
|
289
|
+
className: "flex w-1/4 flex-col gap-1.5 border-r border-brand/30 p-1.5",
|
|
290
|
+
children: [
|
|
291
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
292
|
+
on: true,
|
|
293
|
+
className: "w-3/4"
|
|
294
|
+
}),
|
|
295
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
296
|
+
on: true,
|
|
297
|
+
className: "w-1/2"
|
|
298
|
+
}),
|
|
299
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
300
|
+
on: true,
|
|
301
|
+
className: "w-2/3"
|
|
302
|
+
})
|
|
303
|
+
]
|
|
304
|
+
}),
|
|
305
|
+
/*#__PURE__*/ jsx("div", {
|
|
306
|
+
className: "flex flex-1 flex-col gap-1.5 p-1.5",
|
|
307
|
+
children: /*#__PURE__*/ jsx(FieldStack, {
|
|
308
|
+
on: true,
|
|
309
|
+
count: 2
|
|
310
|
+
})
|
|
311
|
+
})
|
|
312
|
+
]
|
|
313
|
+
})
|
|
314
|
+
]
|
|
315
|
+
})
|
|
316
|
+
})
|
|
317
|
+
]
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
function DockShell({ panels, highlight }) {
|
|
321
|
+
const on = (region)=>highlight.includes(region);
|
|
322
|
+
const tabbed = (label, isOn, body, className)=>/*#__PURE__*/ jsxs("div", {
|
|
323
|
+
className: cn('flex min-w-0 flex-col border', isOn ? 'border-brand bg-brand-subtle' : 'border-border-subtle bg-surface-raised', className),
|
|
324
|
+
children: [
|
|
325
|
+
/*#__PURE__*/ jsx("div", {
|
|
326
|
+
className: cn('flex h-3.5 shrink-0 items-end gap-0.5 border-b px-0.5', isOn ? 'border-brand/40 bg-brand/10' : 'border-border-subtle bg-surface'),
|
|
327
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
328
|
+
className: cn('flex h-2.5 items-center rounded-t-[2px] border-t-2 px-1', isOn ? 'border-brand bg-brand-subtle' : 'border-foreground-subtle/40 bg-surface-raised'),
|
|
329
|
+
children: label
|
|
330
|
+
})
|
|
331
|
+
}),
|
|
332
|
+
/*#__PURE__*/ jsx("div", {
|
|
333
|
+
className: "relative min-h-0 flex-1",
|
|
334
|
+
children: body
|
|
335
|
+
})
|
|
336
|
+
]
|
|
337
|
+
});
|
|
338
|
+
const hasInput = panels.includes('input');
|
|
339
|
+
const hasProperties = panels.includes('properties');
|
|
340
|
+
const hasOutput = panels.includes('output');
|
|
341
|
+
const multi = panels.length > 1;
|
|
342
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
343
|
+
className: "flex aspect-[16/10] flex-col bg-surface",
|
|
344
|
+
children: [
|
|
345
|
+
/*#__PURE__*/ jsxs("div", {
|
|
346
|
+
className: "flex h-3 shrink-0 items-center gap-1 border-b border-border-subtle px-1.5",
|
|
347
|
+
children: [
|
|
348
|
+
/*#__PURE__*/ jsx(Box, {
|
|
349
|
+
className: "size-1.5 rounded-full"
|
|
350
|
+
}),
|
|
351
|
+
/*#__PURE__*/ jsx(Box, {
|
|
352
|
+
className: "size-1.5 rounded-full"
|
|
353
|
+
}),
|
|
354
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
355
|
+
className: "h-1 w-10"
|
|
356
|
+
})
|
|
357
|
+
]
|
|
358
|
+
}),
|
|
359
|
+
/*#__PURE__*/ jsxs("div", {
|
|
360
|
+
className: "flex min-h-0 flex-1",
|
|
361
|
+
children: [
|
|
362
|
+
/*#__PURE__*/ jsxs("div", {
|
|
363
|
+
className: "flex w-5 shrink-0 flex-col items-center gap-1.5 border-r border-border-subtle py-1.5",
|
|
364
|
+
children: [
|
|
365
|
+
/*#__PURE__*/ jsx(Box, {
|
|
366
|
+
className: "size-2 bg-brand/60"
|
|
367
|
+
}),
|
|
368
|
+
/*#__PURE__*/ jsx(Box, {
|
|
369
|
+
className: "size-2"
|
|
370
|
+
}),
|
|
371
|
+
/*#__PURE__*/ jsx(Box, {
|
|
372
|
+
className: "size-2"
|
|
373
|
+
})
|
|
374
|
+
]
|
|
375
|
+
}),
|
|
376
|
+
/*#__PURE__*/ jsxs("div", {
|
|
377
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
378
|
+
children: [
|
|
379
|
+
/*#__PURE__*/ jsxs("div", {
|
|
380
|
+
className: "flex min-h-0 flex-1",
|
|
381
|
+
children: [
|
|
382
|
+
tabbed(/*#__PURE__*/ jsx(Bar, {
|
|
383
|
+
on: on('canvas'),
|
|
384
|
+
className: "h-1 w-5"
|
|
385
|
+
}), on('canvas'), /*#__PURE__*/ jsx(CanvasGraph, {}), 'flex-1'),
|
|
386
|
+
hasInput && !multi && tabbed(/*#__PURE__*/ jsx(Bar, {
|
|
387
|
+
on: true,
|
|
388
|
+
className: "h-1 w-4"
|
|
389
|
+
}), on('input'), /*#__PURE__*/ jsx(PanelBody, {
|
|
390
|
+
on: on('input')
|
|
391
|
+
}), 'w-[34%]'),
|
|
392
|
+
hasProperties && tabbed(/*#__PURE__*/ jsx(Bar, {
|
|
393
|
+
on: on('right'),
|
|
394
|
+
className: "h-1 w-6"
|
|
395
|
+
}), on('right'), /*#__PURE__*/ jsx(PanelBody, {
|
|
396
|
+
on: on('right')
|
|
397
|
+
}), 'w-[34%]'),
|
|
398
|
+
hasOutput && !multi && tabbed(/*#__PURE__*/ jsx(Bar, {
|
|
399
|
+
on: true,
|
|
400
|
+
className: "h-1 w-5"
|
|
401
|
+
}), on('output'), /*#__PURE__*/ jsx(PanelBody, {
|
|
402
|
+
on: on('output')
|
|
403
|
+
}), 'w-[34%]')
|
|
404
|
+
]
|
|
405
|
+
}),
|
|
406
|
+
multi && /*#__PURE__*/ jsxs("div", {
|
|
407
|
+
className: "flex h-[36%] shrink-0",
|
|
408
|
+
children: [
|
|
409
|
+
hasInput && tabbed(/*#__PURE__*/ jsx(Bar, {
|
|
410
|
+
on: true,
|
|
411
|
+
className: "h-1 w-4"
|
|
412
|
+
}), on('input'), /*#__PURE__*/ jsxs("div", {
|
|
413
|
+
className: "flex flex-col gap-1 p-1.5",
|
|
414
|
+
children: [
|
|
415
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
416
|
+
on: true,
|
|
417
|
+
className: "w-3/4"
|
|
418
|
+
}),
|
|
419
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
420
|
+
on: true,
|
|
421
|
+
className: "w-1/2"
|
|
422
|
+
})
|
|
423
|
+
]
|
|
424
|
+
}), 'flex-1'),
|
|
425
|
+
hasOutput && tabbed(/*#__PURE__*/ jsx(Bar, {
|
|
426
|
+
on: true,
|
|
427
|
+
className: "h-1 w-5"
|
|
428
|
+
}), on('output'), /*#__PURE__*/ jsxs("div", {
|
|
429
|
+
className: "flex flex-col gap-1 p-1.5",
|
|
430
|
+
children: [
|
|
431
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
432
|
+
on: true,
|
|
433
|
+
className: "w-2/3"
|
|
434
|
+
}),
|
|
435
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
436
|
+
on: true,
|
|
437
|
+
className: "w-1/3"
|
|
438
|
+
})
|
|
439
|
+
]
|
|
440
|
+
}), 'flex-1')
|
|
441
|
+
]
|
|
442
|
+
})
|
|
443
|
+
]
|
|
444
|
+
})
|
|
445
|
+
]
|
|
446
|
+
}),
|
|
447
|
+
/*#__PURE__*/ jsx("div", {
|
|
448
|
+
className: "h-2 shrink-0 bg-brand/70"
|
|
449
|
+
})
|
|
450
|
+
]
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
function Tabs3({ active = 0 }) {
|
|
454
|
+
return /*#__PURE__*/ jsx("div", {
|
|
455
|
+
className: "flex gap-1 rounded-sm bg-brand/10 p-0.5",
|
|
456
|
+
children: [
|
|
457
|
+
0,
|
|
458
|
+
1,
|
|
459
|
+
2
|
|
460
|
+
].map((i)=>/*#__PURE__*/ jsx(Box, {
|
|
461
|
+
className: cn('h-2 flex-1', i === active ? 'bg-brand/35' : 'bg-transparent')
|
|
462
|
+
}, i))
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
function TokenInput({ error }) {
|
|
466
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
467
|
+
className: cn('flex h-3 items-center gap-1 rounded-[3px] border px-0.5', error ? 'border-error bg-error-background' : 'border-brand/40 bg-brand/5'),
|
|
468
|
+
children: [
|
|
469
|
+
/*#__PURE__*/ jsx("div", {
|
|
470
|
+
className: "h-1.5 w-7 rounded-full bg-brand/60"
|
|
471
|
+
}),
|
|
472
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
473
|
+
on: true,
|
|
474
|
+
className: "h-1 w-1/3"
|
|
475
|
+
})
|
|
476
|
+
]
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
const contentBodies = {
|
|
480
|
+
properties: /*#__PURE__*/ jsxs(PanelBody, {
|
|
481
|
+
on: true,
|
|
482
|
+
children: [
|
|
483
|
+
/*#__PURE__*/ jsx(Tabs3, {}),
|
|
484
|
+
/*#__PURE__*/ jsx(FieldStack, {
|
|
485
|
+
on: true,
|
|
486
|
+
count: 3
|
|
487
|
+
})
|
|
488
|
+
]
|
|
489
|
+
}),
|
|
490
|
+
forms: /*#__PURE__*/ jsxs(PanelBody, {
|
|
491
|
+
on: true,
|
|
492
|
+
children: [
|
|
493
|
+
[
|
|
494
|
+
0,
|
|
495
|
+
1
|
|
496
|
+
].map((section)=>/*#__PURE__*/ jsxs("div", {
|
|
497
|
+
className: "flex flex-col gap-1 rounded-sm border border-brand/30 p-1",
|
|
498
|
+
children: [
|
|
499
|
+
/*#__PURE__*/ jsxs("div", {
|
|
500
|
+
className: "flex items-center justify-between",
|
|
501
|
+
children: [
|
|
502
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
503
|
+
on: true,
|
|
504
|
+
className: "w-1/2"
|
|
505
|
+
}),
|
|
506
|
+
/*#__PURE__*/ jsx("div", {
|
|
507
|
+
className: "size-1.5 rotate-45 border-b border-r border-brand"
|
|
508
|
+
})
|
|
509
|
+
]
|
|
510
|
+
}),
|
|
511
|
+
/*#__PURE__*/ jsx(FieldStack, {
|
|
512
|
+
on: true,
|
|
513
|
+
count: 0 === section ? 2 : 1
|
|
514
|
+
})
|
|
515
|
+
]
|
|
516
|
+
}, section)),
|
|
517
|
+
/*#__PURE__*/ jsxs("div", {
|
|
518
|
+
className: "flex items-center gap-1",
|
|
519
|
+
children: [
|
|
520
|
+
/*#__PURE__*/ jsx(Box, {
|
|
521
|
+
className: "size-2 border border-brand bg-surface"
|
|
522
|
+
}),
|
|
523
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
524
|
+
on: true,
|
|
525
|
+
className: "w-1/2"
|
|
526
|
+
})
|
|
527
|
+
]
|
|
528
|
+
})
|
|
529
|
+
]
|
|
530
|
+
}),
|
|
531
|
+
rules: /*#__PURE__*/ jsxs(PanelBody, {
|
|
532
|
+
on: true,
|
|
533
|
+
children: [
|
|
534
|
+
[
|
|
535
|
+
0,
|
|
536
|
+
1,
|
|
537
|
+
2
|
|
538
|
+
].map((row)=>/*#__PURE__*/ jsxs("div", {
|
|
539
|
+
className: "flex flex-col gap-1",
|
|
540
|
+
children: [
|
|
541
|
+
row > 0 && /*#__PURE__*/ jsx(Box, {
|
|
542
|
+
className: "h-1.5 w-4 bg-brand/50"
|
|
543
|
+
}),
|
|
544
|
+
/*#__PURE__*/ jsxs("div", {
|
|
545
|
+
className: "flex gap-0.5",
|
|
546
|
+
children: [
|
|
547
|
+
/*#__PURE__*/ jsx(Box, {
|
|
548
|
+
on: true,
|
|
549
|
+
className: "h-2.5 flex-1"
|
|
550
|
+
}),
|
|
551
|
+
/*#__PURE__*/ jsx(Box, {
|
|
552
|
+
on: true,
|
|
553
|
+
className: "h-2.5 w-4"
|
|
554
|
+
}),
|
|
555
|
+
/*#__PURE__*/ jsx(Box, {
|
|
556
|
+
on: true,
|
|
557
|
+
className: "h-2.5 flex-1"
|
|
558
|
+
})
|
|
559
|
+
]
|
|
560
|
+
})
|
|
561
|
+
]
|
|
562
|
+
}, row)),
|
|
563
|
+
/*#__PURE__*/ jsx("div", {
|
|
564
|
+
className: "h-2.5 rounded-[3px] border border-dashed border-brand/60"
|
|
565
|
+
})
|
|
566
|
+
]
|
|
567
|
+
}),
|
|
568
|
+
variables: /*#__PURE__*/ jsxs(PanelBody, {
|
|
569
|
+
on: true,
|
|
570
|
+
children: [
|
|
571
|
+
/*#__PURE__*/ jsx(Tabs3, {
|
|
572
|
+
active: 1
|
|
573
|
+
}),
|
|
574
|
+
[
|
|
575
|
+
0,
|
|
576
|
+
1,
|
|
577
|
+
2,
|
|
578
|
+
3
|
|
579
|
+
].map((row)=>/*#__PURE__*/ jsxs("div", {
|
|
580
|
+
className: "flex items-center justify-between gap-1",
|
|
581
|
+
children: [
|
|
582
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
583
|
+
on: true,
|
|
584
|
+
className: row % 2 ? 'w-2/5' : 'w-1/2'
|
|
585
|
+
}),
|
|
586
|
+
/*#__PURE__*/ jsx(Box, {
|
|
587
|
+
className: "h-2 w-5 rounded-full bg-brand/30"
|
|
588
|
+
})
|
|
589
|
+
]
|
|
590
|
+
}, row))
|
|
591
|
+
]
|
|
592
|
+
}),
|
|
593
|
+
node: /*#__PURE__*/ jsxs(PanelBody, {
|
|
594
|
+
on: true,
|
|
595
|
+
children: [
|
|
596
|
+
/*#__PURE__*/ jsxs("div", {
|
|
597
|
+
className: "flex items-center gap-1",
|
|
598
|
+
children: [
|
|
599
|
+
/*#__PURE__*/ jsx(Box, {
|
|
600
|
+
className: "size-3 bg-brand/60"
|
|
601
|
+
}),
|
|
602
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
603
|
+
on: true,
|
|
604
|
+
className: "w-1/3"
|
|
605
|
+
}),
|
|
606
|
+
/*#__PURE__*/ jsx("div", {
|
|
607
|
+
className: "flex-1"
|
|
608
|
+
}),
|
|
609
|
+
/*#__PURE__*/ jsx(Box, {
|
|
610
|
+
className: "size-2 border border-brand bg-surface"
|
|
611
|
+
})
|
|
612
|
+
]
|
|
613
|
+
}),
|
|
614
|
+
/*#__PURE__*/ jsx(Tabs3, {}),
|
|
615
|
+
/*#__PURE__*/ jsx(FieldStack, {
|
|
616
|
+
on: true,
|
|
617
|
+
count: 2
|
|
618
|
+
})
|
|
619
|
+
]
|
|
620
|
+
}),
|
|
621
|
+
dap: /*#__PURE__*/ jsxs(PanelBody, {
|
|
622
|
+
on: true,
|
|
623
|
+
children: [
|
|
624
|
+
/*#__PURE__*/ jsxs("div", {
|
|
625
|
+
className: "flex flex-col gap-0.5",
|
|
626
|
+
children: [
|
|
627
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
628
|
+
on: true,
|
|
629
|
+
className: "h-1 w-2/5"
|
|
630
|
+
}),
|
|
631
|
+
/*#__PURE__*/ jsx(TokenInput, {})
|
|
632
|
+
]
|
|
633
|
+
}),
|
|
634
|
+
/*#__PURE__*/ jsxs("div", {
|
|
635
|
+
className: "flex flex-col gap-0.5",
|
|
636
|
+
children: [
|
|
637
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
638
|
+
on: true,
|
|
639
|
+
className: "h-1 w-1/3"
|
|
640
|
+
}),
|
|
641
|
+
/*#__PURE__*/ jsxs("div", {
|
|
642
|
+
className: "rounded-[3px] border border-brand/40 bg-brand/5",
|
|
643
|
+
children: [
|
|
644
|
+
/*#__PURE__*/ jsxs("div", {
|
|
645
|
+
className: "flex gap-0.5 border-b border-brand/20 p-0.5",
|
|
646
|
+
children: [
|
|
647
|
+
/*#__PURE__*/ jsx(Box, {
|
|
648
|
+
on: true,
|
|
649
|
+
className: "size-1.5"
|
|
650
|
+
}),
|
|
651
|
+
/*#__PURE__*/ jsx(Box, {
|
|
652
|
+
on: true,
|
|
653
|
+
className: "size-1.5"
|
|
654
|
+
}),
|
|
655
|
+
/*#__PURE__*/ jsx(Box, {
|
|
656
|
+
on: true,
|
|
657
|
+
className: "size-1.5"
|
|
658
|
+
})
|
|
659
|
+
]
|
|
660
|
+
}),
|
|
661
|
+
/*#__PURE__*/ jsxs("div", {
|
|
662
|
+
className: "flex flex-col gap-0.5 p-0.5",
|
|
663
|
+
children: [
|
|
664
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
665
|
+
on: true,
|
|
666
|
+
className: "h-1 w-3/4"
|
|
667
|
+
}),
|
|
668
|
+
/*#__PURE__*/ jsx("div", {
|
|
669
|
+
className: "h-1.5 w-8 rounded-full bg-brand/60"
|
|
670
|
+
})
|
|
671
|
+
]
|
|
672
|
+
})
|
|
673
|
+
]
|
|
674
|
+
})
|
|
675
|
+
]
|
|
676
|
+
}),
|
|
677
|
+
/*#__PURE__*/ jsxs("div", {
|
|
678
|
+
className: "flex flex-col gap-0.5",
|
|
679
|
+
children: [
|
|
680
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
681
|
+
on: true,
|
|
682
|
+
className: "h-1 w-2/5"
|
|
683
|
+
}),
|
|
684
|
+
/*#__PURE__*/ jsx(TokenInput, {})
|
|
685
|
+
]
|
|
686
|
+
})
|
|
687
|
+
]
|
|
688
|
+
}),
|
|
689
|
+
'dap-validation': /*#__PURE__*/ jsxs(PanelBody, {
|
|
690
|
+
on: true,
|
|
691
|
+
children: [
|
|
692
|
+
/*#__PURE__*/ jsxs("div", {
|
|
693
|
+
className: "flex flex-col gap-0.5",
|
|
694
|
+
children: [
|
|
695
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
696
|
+
on: true,
|
|
697
|
+
className: "h-1 w-2/5"
|
|
698
|
+
}),
|
|
699
|
+
/*#__PURE__*/ jsx(TokenInput, {})
|
|
700
|
+
]
|
|
701
|
+
}),
|
|
702
|
+
/*#__PURE__*/ jsxs("div", {
|
|
703
|
+
className: "flex flex-col gap-0.5",
|
|
704
|
+
children: [
|
|
705
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
706
|
+
on: true,
|
|
707
|
+
className: "h-1 w-1/3"
|
|
708
|
+
}),
|
|
709
|
+
/*#__PURE__*/ jsx(TokenInput, {
|
|
710
|
+
error: true
|
|
711
|
+
}),
|
|
712
|
+
/*#__PURE__*/ jsx("div", {
|
|
713
|
+
className: "h-1 w-3/5 rounded-full bg-error/70"
|
|
714
|
+
})
|
|
715
|
+
]
|
|
716
|
+
}),
|
|
717
|
+
/*#__PURE__*/ jsxs("div", {
|
|
718
|
+
className: "flex flex-col gap-0.5",
|
|
719
|
+
children: [
|
|
720
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
721
|
+
on: true,
|
|
722
|
+
className: "h-1 w-2/5"
|
|
723
|
+
}),
|
|
724
|
+
/*#__PURE__*/ jsx(TokenInput, {
|
|
725
|
+
error: true
|
|
726
|
+
}),
|
|
727
|
+
/*#__PURE__*/ jsx("div", {
|
|
728
|
+
className: "h-1 w-1/2 rounded-full bg-error/70"
|
|
729
|
+
})
|
|
730
|
+
]
|
|
731
|
+
})
|
|
732
|
+
]
|
|
733
|
+
}),
|
|
734
|
+
'field-help': /*#__PURE__*/ jsx(PanelBody, {
|
|
735
|
+
on: true,
|
|
736
|
+
children: [
|
|
737
|
+
0,
|
|
738
|
+
1,
|
|
739
|
+
2
|
|
740
|
+
].map((row)=>/*#__PURE__*/ jsxs("div", {
|
|
741
|
+
className: "flex flex-col gap-0.5",
|
|
742
|
+
children: [
|
|
743
|
+
/*#__PURE__*/ jsxs("div", {
|
|
744
|
+
className: "flex items-center gap-0.5",
|
|
745
|
+
children: [
|
|
746
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
747
|
+
on: true,
|
|
748
|
+
className: "h-1 w-2/5"
|
|
749
|
+
}),
|
|
750
|
+
/*#__PURE__*/ jsx("div", {
|
|
751
|
+
className: "size-1.5 rounded-full border border-brand"
|
|
752
|
+
})
|
|
753
|
+
]
|
|
754
|
+
}),
|
|
755
|
+
/*#__PURE__*/ jsx(Box, {
|
|
756
|
+
on: true,
|
|
757
|
+
className: "h-2.5 w-full"
|
|
758
|
+
}),
|
|
759
|
+
/*#__PURE__*/ jsx(Bar, {
|
|
760
|
+
className: "h-1 w-4/5 bg-foreground-subtle/30"
|
|
761
|
+
})
|
|
762
|
+
]
|
|
763
|
+
}, row))
|
|
764
|
+
})
|
|
765
|
+
};
|
|
766
|
+
const standalonePreviews = [
|
|
767
|
+
{
|
|
768
|
+
name: 'Canvas Only',
|
|
769
|
+
description: 'The canvas with no panels open. Start here for read-only or embedded flows.',
|
|
770
|
+
regions: [
|
|
771
|
+
'Canvas'
|
|
772
|
+
],
|
|
773
|
+
storyId: 'apollo-react-canvas-templates-flow-standalone--canvas-only',
|
|
774
|
+
preview: /*#__PURE__*/ jsx(StandaloneShell, {
|
|
775
|
+
highlight: [
|
|
776
|
+
'canvas'
|
|
777
|
+
]
|
|
778
|
+
})
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
name: 'Panel Right',
|
|
782
|
+
description: 'A floating properties panel opens beside the canvas when a node is selected.',
|
|
783
|
+
regions: [
|
|
784
|
+
'Canvas',
|
|
785
|
+
'Right panel'
|
|
786
|
+
],
|
|
787
|
+
storyId: 'apollo-react-canvas-templates-flow-standalone--with-right-properties-panel',
|
|
788
|
+
preview: /*#__PURE__*/ jsx(StandaloneShell, {
|
|
789
|
+
right: true,
|
|
790
|
+
highlight: [
|
|
791
|
+
'right'
|
|
792
|
+
]
|
|
793
|
+
})
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
name: 'Panel Bottom',
|
|
797
|
+
description: 'Properties dock along the bottom edge, keeping the full canvas width visible.',
|
|
798
|
+
regions: [
|
|
799
|
+
'Canvas',
|
|
800
|
+
'Bottom panel'
|
|
801
|
+
],
|
|
802
|
+
storyId: 'apollo-react-canvas-templates-flow-standalone--with-bottom-properties-panel',
|
|
803
|
+
preview: /*#__PURE__*/ jsx(StandaloneShell, {
|
|
804
|
+
bottom: "properties",
|
|
805
|
+
highlight: [
|
|
806
|
+
'bottom'
|
|
807
|
+
]
|
|
808
|
+
})
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
name: 'Bottom Executions',
|
|
812
|
+
description: 'A resizable tabbed panel for executions, datasets, evaluators, and eval runs.',
|
|
813
|
+
regions: [
|
|
814
|
+
'Canvas',
|
|
815
|
+
'Bottom panel'
|
|
816
|
+
],
|
|
817
|
+
storyId: 'apollo-react-canvas-templates-flow-standalone--with-bottom-panel',
|
|
818
|
+
preview: /*#__PURE__*/ jsx(StandaloneShell, {
|
|
819
|
+
bottom: "executions",
|
|
820
|
+
highlight: [
|
|
821
|
+
'bottom'
|
|
822
|
+
]
|
|
823
|
+
})
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
name: 'Sidebar Left',
|
|
827
|
+
description: 'A collapsible sidebar for variables, files, connections, and run history.',
|
|
828
|
+
regions: [
|
|
829
|
+
'Sidebar',
|
|
830
|
+
'Canvas'
|
|
831
|
+
],
|
|
832
|
+
storyId: 'apollo-react-canvas-templates-flow-standalone--with-left-sidebar',
|
|
833
|
+
preview: /*#__PURE__*/ jsx(StandaloneShell, {
|
|
834
|
+
sidebar: "expanded",
|
|
835
|
+
highlight: [
|
|
836
|
+
'sidebar'
|
|
837
|
+
]
|
|
838
|
+
})
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
name: 'Modal Takeover',
|
|
842
|
+
description: 'A full-surface modal for focused tasks such as testing or deep configuration.',
|
|
843
|
+
regions: [
|
|
844
|
+
'Sidebar',
|
|
845
|
+
'Canvas',
|
|
846
|
+
'Right panel',
|
|
847
|
+
'Takeover'
|
|
848
|
+
],
|
|
849
|
+
storyId: 'apollo-react-canvas-templates-flow-standalone--with-takeover-modal',
|
|
850
|
+
preview: /*#__PURE__*/ jsx(StandaloneShell, {
|
|
851
|
+
sidebar: "rail",
|
|
852
|
+
right: true,
|
|
853
|
+
takeover: true,
|
|
854
|
+
highlight: [
|
|
855
|
+
'takeover'
|
|
856
|
+
]
|
|
857
|
+
})
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
name: 'Workbench',
|
|
861
|
+
description: 'The full composition: sidebar rail, canvas, right panel, and a collapsible bottom panel.',
|
|
862
|
+
regions: [
|
|
863
|
+
'Sidebar',
|
|
864
|
+
'Canvas',
|
|
865
|
+
'Right panel',
|
|
866
|
+
'Bottom panel'
|
|
867
|
+
],
|
|
868
|
+
storyId: 'apollo-react-canvas-templates-flow-standalone--full-workbench',
|
|
869
|
+
preview: /*#__PURE__*/ jsx(StandaloneShell, {
|
|
870
|
+
sidebar: "rail",
|
|
871
|
+
right: true,
|
|
872
|
+
bottom: "collapsed",
|
|
873
|
+
highlight: [
|
|
874
|
+
'sidebar',
|
|
875
|
+
'right',
|
|
876
|
+
'bottom'
|
|
877
|
+
]
|
|
878
|
+
})
|
|
879
|
+
}
|
|
880
|
+
];
|
|
881
|
+
const vsCodePreviews = [
|
|
882
|
+
{
|
|
883
|
+
name: 'Canvas Only',
|
|
884
|
+
description: 'The canvas as a single Dockview tab. The host owns the surrounding chrome.',
|
|
885
|
+
regions: [
|
|
886
|
+
'Canvas'
|
|
887
|
+
],
|
|
888
|
+
storyId: 'apollo-react-canvas-templates-flow-vs-code--canvas-only',
|
|
889
|
+
preview: /*#__PURE__*/ jsx(DockShell, {
|
|
890
|
+
panels: [],
|
|
891
|
+
highlight: [
|
|
892
|
+
'canvas'
|
|
893
|
+
]
|
|
894
|
+
})
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
name: 'Right Panel',
|
|
898
|
+
description: 'Properties mount in a docked split that users can drag, tab, or resize.',
|
|
899
|
+
regions: [
|
|
900
|
+
'Canvas',
|
|
901
|
+
'Properties'
|
|
902
|
+
],
|
|
903
|
+
storyId: 'apollo-react-canvas-templates-flow-vs-code--with-right-panel',
|
|
904
|
+
preview: /*#__PURE__*/ jsx(DockShell, {
|
|
905
|
+
panels: [
|
|
906
|
+
'properties'
|
|
907
|
+
],
|
|
908
|
+
highlight: [
|
|
909
|
+
'right'
|
|
910
|
+
]
|
|
911
|
+
})
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
name: 'Input Panel',
|
|
915
|
+
description: 'Shows the node input data next to the canvas in its own docked split.',
|
|
916
|
+
regions: [
|
|
917
|
+
'Canvas',
|
|
918
|
+
'Input'
|
|
919
|
+
],
|
|
920
|
+
storyId: 'apollo-react-canvas-templates-flow-vs-code--with-input-panel',
|
|
921
|
+
preview: /*#__PURE__*/ jsx(DockShell, {
|
|
922
|
+
panels: [
|
|
923
|
+
'input'
|
|
924
|
+
],
|
|
925
|
+
highlight: [
|
|
926
|
+
'input'
|
|
927
|
+
]
|
|
928
|
+
})
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
name: 'Output Panel',
|
|
932
|
+
description: 'Shows the node output data next to the canvas in its own docked split.',
|
|
933
|
+
regions: [
|
|
934
|
+
'Canvas',
|
|
935
|
+
'Output'
|
|
936
|
+
],
|
|
937
|
+
storyId: 'apollo-react-canvas-templates-flow-vs-code--with-output-panel',
|
|
938
|
+
preview: /*#__PURE__*/ jsx(DockShell, {
|
|
939
|
+
panels: [
|
|
940
|
+
'output'
|
|
941
|
+
],
|
|
942
|
+
highlight: [
|
|
943
|
+
'output'
|
|
944
|
+
]
|
|
945
|
+
})
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
name: 'Multi Panel',
|
|
949
|
+
description: 'Input, properties, and output open together. The host persists the arrangement.',
|
|
950
|
+
regions: [
|
|
951
|
+
'Canvas',
|
|
952
|
+
'Input',
|
|
953
|
+
'Properties',
|
|
954
|
+
'Output'
|
|
955
|
+
],
|
|
956
|
+
storyId: 'apollo-react-canvas-templates-flow-vs-code--multi-panel',
|
|
957
|
+
preview: /*#__PURE__*/ jsx(DockShell, {
|
|
958
|
+
panels: [
|
|
959
|
+
'input',
|
|
960
|
+
'properties',
|
|
961
|
+
'output'
|
|
962
|
+
],
|
|
963
|
+
highlight: [
|
|
964
|
+
'input',
|
|
965
|
+
'right',
|
|
966
|
+
'output'
|
|
967
|
+
]
|
|
968
|
+
})
|
|
969
|
+
}
|
|
970
|
+
];
|
|
971
|
+
const contentPreviews = [
|
|
972
|
+
{
|
|
973
|
+
name: 'Properties',
|
|
974
|
+
description: 'The default node panel: tabbed parameters, error handling, and advanced settings.',
|
|
975
|
+
regions: [
|
|
976
|
+
'Tabs',
|
|
977
|
+
'Fields'
|
|
978
|
+
],
|
|
979
|
+
variant: 'properties',
|
|
980
|
+
storyId: 'apollo-react-canvas-templates-flow-standalone--full-workbench'
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
name: 'Quick Form',
|
|
984
|
+
description: 'Schema-driven form sections for configuring a node without leaving the canvas.',
|
|
985
|
+
regions: [
|
|
986
|
+
'Sections',
|
|
987
|
+
'Fields'
|
|
988
|
+
],
|
|
989
|
+
variant: 'forms'
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
name: 'Rule Building',
|
|
993
|
+
description: 'Condition rows joined by AND or OR, with a clear way to add another rule.',
|
|
994
|
+
regions: [
|
|
995
|
+
'Conditions',
|
|
996
|
+
'Operators'
|
|
997
|
+
],
|
|
998
|
+
variant: 'rules'
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
name: 'Variables',
|
|
1002
|
+
description: 'Inputs, outputs, and workflow variables for a node. Expands into a takeover.',
|
|
1003
|
+
regions: [
|
|
1004
|
+
'Tabs',
|
|
1005
|
+
'Variable list',
|
|
1006
|
+
'Takeover'
|
|
1007
|
+
],
|
|
1008
|
+
variant: 'variables'
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
name: 'Node',
|
|
1012
|
+
description: 'A node-specific panel, such as Send Email, that can open a full takeover editor.',
|
|
1013
|
+
regions: [
|
|
1014
|
+
'Header',
|
|
1015
|
+
'Tabs',
|
|
1016
|
+
'Takeover'
|
|
1017
|
+
],
|
|
1018
|
+
variant: 'node'
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
name: 'DAP',
|
|
1022
|
+
description: 'React DAP fields with variable tokens and a rich text body editor.',
|
|
1023
|
+
regions: [
|
|
1024
|
+
'Fields',
|
|
1025
|
+
'Variable tokens',
|
|
1026
|
+
'Rich text'
|
|
1027
|
+
],
|
|
1028
|
+
variant: 'dap',
|
|
1029
|
+
storyId: 'apollo-wind-patterns-layout-patterns--dap-send-email'
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
name: 'DAP Validation',
|
|
1033
|
+
description: 'The DAP panel with validation triggered, showing inline field errors.',
|
|
1034
|
+
regions: [
|
|
1035
|
+
'Fields',
|
|
1036
|
+
'Errors'
|
|
1037
|
+
],
|
|
1038
|
+
variant: 'dap-validation',
|
|
1039
|
+
storyId: 'apollo-wind-forms-guidance-field-validation--example'
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
name: 'Field Help',
|
|
1043
|
+
description: 'Fields with help icons and helper text that explain what each value does.',
|
|
1044
|
+
regions: [
|
|
1045
|
+
'Fields',
|
|
1046
|
+
'Help text'
|
|
1047
|
+
],
|
|
1048
|
+
variant: 'field-help',
|
|
1049
|
+
storyId: 'apollo-wind-forms-guidance-field-help--example'
|
|
1050
|
+
}
|
|
1051
|
+
];
|
|
1052
|
+
function PreviewCard({ name, description, regions, storyId, preview }) {
|
|
1053
|
+
const Wrapper = storyId ? 'a' : 'div';
|
|
1054
|
+
return /*#__PURE__*/ jsxs(Wrapper, {
|
|
1055
|
+
href: storyId ? buildStoryHref(storyId) : void 0,
|
|
1056
|
+
target: storyId ? '_top' : void 0,
|
|
1057
|
+
className: cn('group flex min-w-0 flex-col overflow-hidden rounded-xl border border-border-subtle bg-surface-raised transition-all', storyId && 'hover:border-brand/50 hover:shadow-md focus:outline-none focus-visible:ring-2 focus-visible:ring-brand'),
|
|
1058
|
+
children: [
|
|
1059
|
+
/*#__PURE__*/ jsx("div", {
|
|
1060
|
+
className: "border-b border-border-subtle bg-surface-overlay p-3",
|
|
1061
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
1062
|
+
className: "overflow-hidden rounded-lg border border-border-subtle shadow-sm",
|
|
1063
|
+
children: preview
|
|
1064
|
+
})
|
|
1065
|
+
}),
|
|
1066
|
+
/*#__PURE__*/ jsxs("div", {
|
|
1067
|
+
className: "flex flex-1 flex-col gap-2 p-4",
|
|
1068
|
+
children: [
|
|
1069
|
+
/*#__PURE__*/ jsxs("div", {
|
|
1070
|
+
className: "flex items-start justify-between gap-2",
|
|
1071
|
+
children: [
|
|
1072
|
+
/*#__PURE__*/ jsx("h3", {
|
|
1073
|
+
className: "text-sm font-semibold text-foreground",
|
|
1074
|
+
children: name
|
|
1075
|
+
}),
|
|
1076
|
+
storyId ? /*#__PURE__*/ jsx(ArrowUpRight, {
|
|
1077
|
+
className: "size-4 shrink-0 text-foreground-subtle transition-colors group-hover:text-brand"
|
|
1078
|
+
}) : /*#__PURE__*/ jsx("span", {
|
|
1079
|
+
className: "shrink-0 rounded-full bg-surface-overlay px-2 py-0.5 text-[10px] font-medium text-foreground-subtle",
|
|
1080
|
+
children: "No live story yet"
|
|
1081
|
+
})
|
|
1082
|
+
]
|
|
1083
|
+
}),
|
|
1084
|
+
/*#__PURE__*/ jsx("p", {
|
|
1085
|
+
className: "text-xs leading-5 text-foreground-muted",
|
|
1086
|
+
children: description
|
|
1087
|
+
}),
|
|
1088
|
+
/*#__PURE__*/ jsx("div", {
|
|
1089
|
+
className: "mt-auto flex flex-wrap gap-1 pt-1",
|
|
1090
|
+
children: regions.map((region)=>/*#__PURE__*/ jsx("span", {
|
|
1091
|
+
className: "rounded-full border border-border-subtle px-2 py-0.5 text-[10px] text-foreground-muted",
|
|
1092
|
+
children: region
|
|
1093
|
+
}, region))
|
|
1094
|
+
})
|
|
1095
|
+
]
|
|
1096
|
+
})
|
|
1097
|
+
]
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
function Section({ icon: Icon, eyebrow, title, body, children }) {
|
|
1101
|
+
return /*#__PURE__*/ jsxs("section", {
|
|
1102
|
+
className: "mt-12",
|
|
1103
|
+
children: [
|
|
1104
|
+
/*#__PURE__*/ jsxs("div", {
|
|
1105
|
+
className: "flex items-start gap-3",
|
|
1106
|
+
children: [
|
|
1107
|
+
/*#__PURE__*/ jsx("div", {
|
|
1108
|
+
className: "grid size-10 shrink-0 place-items-center rounded-xl bg-surface-overlay text-brand",
|
|
1109
|
+
children: /*#__PURE__*/ jsx(Icon, {
|
|
1110
|
+
className: "size-5"
|
|
1111
|
+
})
|
|
1112
|
+
}),
|
|
1113
|
+
/*#__PURE__*/ jsxs("div", {
|
|
1114
|
+
children: [
|
|
1115
|
+
/*#__PURE__*/ jsx("p", {
|
|
1116
|
+
className: "text-[10px] font-semibold uppercase tracking-[0.1em] text-foreground-subtle",
|
|
1117
|
+
children: eyebrow
|
|
1118
|
+
}),
|
|
1119
|
+
/*#__PURE__*/ jsx("h2", {
|
|
1120
|
+
className: "text-lg font-semibold text-foreground",
|
|
1121
|
+
children: title
|
|
1122
|
+
}),
|
|
1123
|
+
/*#__PURE__*/ jsx("p", {
|
|
1124
|
+
className: "mt-1 max-w-2xl text-sm leading-6 text-foreground-muted",
|
|
1125
|
+
children: body
|
|
1126
|
+
})
|
|
1127
|
+
]
|
|
1128
|
+
})
|
|
1129
|
+
]
|
|
1130
|
+
}),
|
|
1131
|
+
/*#__PURE__*/ jsx("div", {
|
|
1132
|
+
className: "mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
1133
|
+
children: children
|
|
1134
|
+
})
|
|
1135
|
+
]
|
|
1136
|
+
});
|
|
1137
|
+
}
|
|
1138
|
+
function LayoutPreviewsPage() {
|
|
1139
|
+
return /*#__PURE__*/ jsx("main", {
|
|
1140
|
+
className: "min-h-screen bg-surface text-foreground",
|
|
1141
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
1142
|
+
className: "mx-auto max-w-6xl px-6 py-12 lg:px-10 lg:py-16",
|
|
1143
|
+
children: [
|
|
1144
|
+
/*#__PURE__*/ jsxs("header", {
|
|
1145
|
+
className: "max-w-3xl",
|
|
1146
|
+
children: [
|
|
1147
|
+
/*#__PURE__*/ jsx("p", {
|
|
1148
|
+
className: "text-xs font-semibold uppercase tracking-[0.12em] text-brand",
|
|
1149
|
+
children: "Canvas templates"
|
|
1150
|
+
}),
|
|
1151
|
+
/*#__PURE__*/ jsx("h1", {
|
|
1152
|
+
className: "mt-3 text-3xl font-semibold tracking-[-0.04em] sm:text-4xl",
|
|
1153
|
+
children: "Flow layout previews"
|
|
1154
|
+
}),
|
|
1155
|
+
/*#__PURE__*/ jsx("p", {
|
|
1156
|
+
className: "mt-4 max-w-2xl text-base leading-7 text-foreground-muted",
|
|
1157
|
+
children: "Every layout the Flow Workbench composes, at a glance. The highlighted region is what each layout adds. Select a card to open the live story."
|
|
1158
|
+
}),
|
|
1159
|
+
/*#__PURE__*/ jsxs("div", {
|
|
1160
|
+
className: "mt-6 flex flex-wrap items-center gap-4 text-xs text-foreground-muted",
|
|
1161
|
+
children: [
|
|
1162
|
+
/*#__PURE__*/ jsxs("span", {
|
|
1163
|
+
className: "flex items-center gap-2",
|
|
1164
|
+
children: [
|
|
1165
|
+
/*#__PURE__*/ jsx("span", {
|
|
1166
|
+
className: "size-3 rounded-sm border border-brand bg-brand-subtle"
|
|
1167
|
+
}),
|
|
1168
|
+
"Region this layout adds"
|
|
1169
|
+
]
|
|
1170
|
+
}),
|
|
1171
|
+
/*#__PURE__*/ jsxs("span", {
|
|
1172
|
+
className: "flex items-center gap-2",
|
|
1173
|
+
children: [
|
|
1174
|
+
/*#__PURE__*/ jsx("span", {
|
|
1175
|
+
className: "size-3 rounded-sm border border-border-subtle bg-surface-raised"
|
|
1176
|
+
}),
|
|
1177
|
+
"Shared shell"
|
|
1178
|
+
]
|
|
1179
|
+
})
|
|
1180
|
+
]
|
|
1181
|
+
})
|
|
1182
|
+
]
|
|
1183
|
+
}),
|
|
1184
|
+
/*#__PURE__*/ jsx(Section, {
|
|
1185
|
+
icon: LayoutPanelTop,
|
|
1186
|
+
eyebrow: "Standalone",
|
|
1187
|
+
title: "Apollo owns the composition",
|
|
1188
|
+
body: "Panels float within the canvas and keep Apollo spacing and radius. Use these when the canvas is the primary product surface.",
|
|
1189
|
+
children: standalonePreviews.map((item)=>/*#__PURE__*/ jsx(PreviewCard, {
|
|
1190
|
+
...item
|
|
1191
|
+
}, item.name))
|
|
1192
|
+
}),
|
|
1193
|
+
/*#__PURE__*/ jsx(Section, {
|
|
1194
|
+
icon: PanelsTopLeft,
|
|
1195
|
+
eyebrow: "VS Code",
|
|
1196
|
+
title: "The workbench owns the composition",
|
|
1197
|
+
body: "Dockview owns tabs, splits, drop targets, and resizing. Apollo supplies the same panel content that Standalone uses.",
|
|
1198
|
+
children: vsCodePreviews.map((item)=>/*#__PURE__*/ jsx(PreviewCard, {
|
|
1199
|
+
...item
|
|
1200
|
+
}, item.name))
|
|
1201
|
+
}),
|
|
1202
|
+
/*#__PURE__*/ jsx(Section, {
|
|
1203
|
+
icon: PanelRight,
|
|
1204
|
+
eyebrow: "Right panel content",
|
|
1205
|
+
title: "What fills the right panel",
|
|
1206
|
+
body: "The Workbench right panel accepts different content types. The shell stays the same, only the panel body changes.",
|
|
1207
|
+
children: contentPreviews.map(({ variant, ...item })=>/*#__PURE__*/ jsx(PreviewCard, {
|
|
1208
|
+
...item,
|
|
1209
|
+
preview: /*#__PURE__*/ jsx(StandaloneShell, {
|
|
1210
|
+
sidebar: "rail",
|
|
1211
|
+
right: true,
|
|
1212
|
+
highlight: [
|
|
1213
|
+
'right'
|
|
1214
|
+
],
|
|
1215
|
+
rightContent: contentBodies[variant]
|
|
1216
|
+
})
|
|
1217
|
+
}, item.name))
|
|
1218
|
+
})
|
|
1219
|
+
]
|
|
1220
|
+
})
|
|
1221
|
+
});
|
|
1222
|
+
}
|
|
1223
|
+
export { LayoutPreviewsPage };
|