@uipath/apollo-wind 0.9.1 → 0.10.0-pr257.2a4b17b

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 (145) hide show
  1. package/dist/components/forms/field-renderer.cjs +120 -69
  2. package/dist/components/forms/field-renderer.js +120 -69
  3. package/dist/components/forms/form-designer.cjs +2352 -1488
  4. package/dist/components/forms/form-designer.js +2353 -1489
  5. package/dist/components/forms/form-examples.cjs +10 -10
  6. package/dist/components/forms/form-examples.js +10 -10
  7. package/dist/components/forms/form-state-viewer.cjs +988 -433
  8. package/dist/components/forms/form-state-viewer.js +988 -433
  9. package/dist/components/forms/metadata-form.cjs +446 -170
  10. package/dist/components/forms/metadata-form.js +446 -170
  11. package/dist/components/forms/schema-viewer.cjs +173 -80
  12. package/dist/components/forms/schema-viewer.js +173 -80
  13. package/dist/components/ui/accordion.cjs +131 -27
  14. package/dist/components/ui/accordion.js +131 -27
  15. package/dist/components/ui/alert-dialog.cjs +273 -45
  16. package/dist/components/ui/alert-dialog.js +273 -45
  17. package/dist/components/ui/alert.cjs +106 -17
  18. package/dist/components/ui/alert.js +106 -17
  19. package/dist/components/ui/avatar.cjs +100 -15
  20. package/dist/components/ui/avatar.js +100 -15
  21. package/dist/components/ui/badge.cjs +36 -6
  22. package/dist/components/ui/badge.js +36 -6
  23. package/dist/components/ui/breadcrumb.cjs +258 -52
  24. package/dist/components/ui/breadcrumb.js +258 -52
  25. package/dist/components/ui/button-group.cjs +119 -19
  26. package/dist/components/ui/button-group.js +119 -19
  27. package/dist/components/ui/button.cjs +48 -8
  28. package/dist/components/ui/button.js +48 -8
  29. package/dist/components/ui/calendar.cjs +88 -30
  30. package/dist/components/ui/calendar.js +88 -30
  31. package/dist/components/ui/card.cjs +199 -30
  32. package/dist/components/ui/card.js +199 -30
  33. package/dist/components/ui/checkbox.cjs +42 -8
  34. package/dist/components/ui/checkbox.js +42 -8
  35. package/dist/components/ui/combobox.cjs +150 -53
  36. package/dist/components/ui/combobox.js +150 -53
  37. package/dist/components/ui/command.cjs +291 -53
  38. package/dist/components/ui/command.js +291 -53
  39. package/dist/components/ui/context-menu.cjs +370 -72
  40. package/dist/components/ui/context-menu.js +370 -72
  41. package/dist/components/ui/data-table.cjs +76 -39
  42. package/dist/components/ui/data-table.js +76 -39
  43. package/dist/components/ui/date-picker.cjs +179 -68
  44. package/dist/components/ui/date-picker.js +179 -68
  45. package/dist/components/ui/datetime-picker.cjs +225 -104
  46. package/dist/components/ui/datetime-picker.js +225 -104
  47. package/dist/components/ui/dialog.cjs +290 -78
  48. package/dist/components/ui/dialog.js +290 -78
  49. package/dist/components/ui/drawer.cjs +220 -39
  50. package/dist/components/ui/drawer.js +220 -39
  51. package/dist/components/ui/dropdown-menu.cjs +376 -73
  52. package/dist/components/ui/dropdown-menu.js +376 -73
  53. package/dist/components/ui/editable-cell.cjs +106 -42
  54. package/dist/components/ui/editable-cell.js +106 -42
  55. package/dist/components/ui/empty-state.cjs +106 -33
  56. package/dist/components/ui/empty-state.js +106 -33
  57. package/dist/components/ui/file-upload.cjs +405 -187
  58. package/dist/components/ui/file-upload.d.ts +3 -1
  59. package/dist/components/ui/file-upload.js +405 -187
  60. package/dist/components/ui/hover-card.cjs +46 -7
  61. package/dist/components/ui/hover-card.js +46 -7
  62. package/dist/components/ui/index.cjs +22 -22
  63. package/dist/components/ui/input.cjs +39 -6
  64. package/dist/components/ui/input.js +39 -6
  65. package/dist/components/ui/label.cjs +34 -5
  66. package/dist/components/ui/label.js +34 -5
  67. package/dist/components/ui/layout/column.cjs +209 -41
  68. package/dist/components/ui/layout/column.js +209 -41
  69. package/dist/components/ui/layout/grid.cjs +275 -60
  70. package/dist/components/ui/layout/grid.js +275 -60
  71. package/dist/components/ui/layout/row.cjs +209 -41
  72. package/dist/components/ui/layout/row.js +209 -41
  73. package/dist/components/ui/menubar.cjs +540 -106
  74. package/dist/components/ui/menubar.js +540 -106
  75. package/dist/components/ui/multi-select.cjs +289 -135
  76. package/dist/components/ui/multi-select.js +289 -135
  77. package/dist/components/ui/navigation-menu.cjs +244 -47
  78. package/dist/components/ui/navigation-menu.js +244 -47
  79. package/dist/components/ui/pagination.cjs +301 -65
  80. package/dist/components/ui/pagination.js +301 -65
  81. package/dist/components/ui/popover.cjs +48 -9
  82. package/dist/components/ui/popover.js +48 -9
  83. package/dist/components/ui/progress.cjs +48 -8
  84. package/dist/components/ui/progress.js +48 -8
  85. package/dist/components/ui/radio-group.cjs +74 -12
  86. package/dist/components/ui/radio-group.js +74 -12
  87. package/dist/components/ui/resizable.cjs +75 -10
  88. package/dist/components/ui/resizable.js +75 -10
  89. package/dist/components/ui/scroll-area.cjs +113 -21
  90. package/dist/components/ui/scroll-area.js +113 -21
  91. package/dist/components/ui/search.cjs +280 -98
  92. package/dist/components/ui/search.js +280 -98
  93. package/dist/components/ui/select.cjs +334 -68
  94. package/dist/components/ui/select.js +334 -68
  95. package/dist/components/ui/separator.cjs +48 -7
  96. package/dist/components/ui/separator.js +48 -7
  97. package/dist/components/ui/sheet.cjs +236 -50
  98. package/dist/components/ui/sheet.js +236 -50
  99. package/dist/components/ui/skeleton.cjs +31 -5
  100. package/dist/components/ui/skeleton.js +31 -5
  101. package/dist/components/ui/slider.cjs +71 -21
  102. package/dist/components/ui/slider.js +71 -21
  103. package/dist/components/ui/sonner.cjs +43 -15
  104. package/dist/components/ui/sonner.js +43 -15
  105. package/dist/components/ui/spinner.cjs +83 -21
  106. package/dist/components/ui/spinner.js +83 -21
  107. package/dist/components/ui/stats-card.cjs +169 -60
  108. package/dist/components/ui/stats-card.js +169 -60
  109. package/dist/components/ui/stepper.cjs +126 -57
  110. package/dist/components/ui/stepper.js +126 -57
  111. package/dist/components/ui/switch.cjs +42 -8
  112. package/dist/components/ui/switch.js +42 -8
  113. package/dist/components/ui/table.cjs +267 -42
  114. package/dist/components/ui/table.js +267 -42
  115. package/dist/components/ui/tabs.cjs +100 -15
  116. package/dist/components/ui/tabs.js +100 -15
  117. package/dist/components/ui/textarea.cjs +34 -5
  118. package/dist/components/ui/textarea.js +34 -5
  119. package/dist/components/ui/toggle-group.cjs +112 -19
  120. package/dist/components/ui/toggle-group.js +112 -19
  121. package/dist/components/ui/toggle.cjs +43 -6
  122. package/dist/components/ui/toggle.js +43 -6
  123. package/dist/components/ui/tooltip.cjs +40 -6
  124. package/dist/components/ui/tooltip.js +40 -6
  125. package/dist/examples/admin-layout-example.cjs +879 -347
  126. package/dist/examples/admin-layout-example.js +879 -347
  127. package/dist/examples/app-shell-example.cjs +14 -14
  128. package/dist/examples/app-shell-example.js +14 -14
  129. package/dist/examples/dashboard-example.cjs +495 -334
  130. package/dist/examples/dashboard-example.js +495 -334
  131. package/dist/examples/data-management-example.cjs +501 -303
  132. package/dist/examples/data-management-example.js +502 -304
  133. package/dist/examples/flow-editor-layout-example.cjs +435 -231
  134. package/dist/examples/flow-editor-layout-example.js +436 -232
  135. package/dist/examples/flow-start-example.cjs +508 -251
  136. package/dist/examples/flow-start-example.js +509 -252
  137. package/dist/examples/form-builder-example.cjs +1006 -602
  138. package/dist/examples/form-builder-example.js +1007 -603
  139. package/dist/examples/new-project-example.cjs +806 -474
  140. package/dist/examples/new-project-example.js +807 -475
  141. package/dist/examples/settings-example.cjs +792 -704
  142. package/dist/examples/settings-example.js +792 -704
  143. package/dist/examples/vscode-example.cjs +731 -236
  144. package/dist/examples/vscode-example.js +731 -236
  145. package/package.json +4 -1
@@ -1,270 +1,765 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { useState } from "react";
3
4
  import { cn } from "../lib/index.js";
4
5
  import { ChevronDown, ChevronRight, File, Folder, FolderOpen, PanelLeftClose, X } from "lucide-react";
5
6
  import { Button } from "../components/ui/button.js";
6
7
  import { ScrollArea } from "../components/ui/scroll-area.js";
7
8
  import { Column, Row } from "../components/ui/layout/index.js";
8
- function Shell({ className, children, ...props }) {
9
- return /*#__PURE__*/ jsx(Column, {
10
- overflow: "hidden",
11
- className: cn('h-[600px] w-full rounded-lg border bg-background', className),
12
- ...props,
13
- children: children
14
- });
9
+ function Shell(t0) {
10
+ const $ = c(10);
11
+ let children;
12
+ let className;
13
+ let props;
14
+ if ($[0] !== t0) {
15
+ ({ className, children, ...props } = t0);
16
+ $[0] = t0;
17
+ $[1] = children;
18
+ $[2] = className;
19
+ $[3] = props;
20
+ } else {
21
+ children = $[1];
22
+ className = $[2];
23
+ props = $[3];
24
+ }
25
+ let t1;
26
+ if ($[4] !== className) {
27
+ t1 = cn("h-[600px] w-full rounded-lg border bg-background", className);
28
+ $[4] = className;
29
+ $[5] = t1;
30
+ } else t1 = $[5];
31
+ let t2;
32
+ if ($[6] !== children || $[7] !== props || $[8] !== t1) {
33
+ t2 = /*#__PURE__*/ jsx(Column, {
34
+ overflow: "hidden",
35
+ className: t1,
36
+ ...props,
37
+ children: children
38
+ });
39
+ $[6] = children;
40
+ $[7] = props;
41
+ $[8] = t1;
42
+ $[9] = t2;
43
+ } else t2 = $[9];
44
+ return t2;
15
45
  }
16
- function ShellTitleBar({ className, title, children, ...props }) {
17
- return /*#__PURE__*/ jsxs(Row, {
18
- h: 9,
19
- justify: "between",
20
- align: "center",
21
- className: cn('border-b bg-muted/50 px-3', className),
22
- ...props,
23
- children: [
24
- /*#__PURE__*/ jsxs(Row, {
25
- gap: 2,
26
- align: "center",
27
- children: [
28
- /*#__PURE__*/ jsxs(Row, {
29
- gap: 1.5,
30
- children: [
31
- /*#__PURE__*/ jsx("div", {
32
- className: "h-3 w-3 rounded-full bg-red-500"
33
- }),
34
- /*#__PURE__*/ jsx("div", {
35
- className: "h-3 w-3 rounded-full bg-yellow-500"
36
- }),
37
- /*#__PURE__*/ jsx("div", {
38
- className: "h-3 w-3 rounded-full bg-green-500"
39
- })
40
- ]
41
- }),
42
- title && /*#__PURE__*/ jsx("span", {
43
- className: "ml-3 text-xs text-muted-foreground",
44
- children: title
45
- })
46
- ]
47
- }),
48
- children
49
- ]
50
- });
46
+ function ShellTitleBar(t0) {
47
+ const $ = c(17);
48
+ let children;
49
+ let className;
50
+ let props;
51
+ let title;
52
+ if ($[0] !== t0) {
53
+ ({ className, title, children, ...props } = t0);
54
+ $[0] = t0;
55
+ $[1] = children;
56
+ $[2] = className;
57
+ $[3] = props;
58
+ $[4] = title;
59
+ } else {
60
+ children = $[1];
61
+ className = $[2];
62
+ props = $[3];
63
+ title = $[4];
64
+ }
65
+ let t1;
66
+ if ($[5] !== className) {
67
+ t1 = cn("border-b bg-muted/50 px-3", className);
68
+ $[5] = className;
69
+ $[6] = t1;
70
+ } else t1 = $[6];
71
+ let t2;
72
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
73
+ t2 = /*#__PURE__*/ jsxs(Row, {
74
+ gap: 1.5,
75
+ children: [
76
+ /*#__PURE__*/ jsx("div", {
77
+ className: "h-3 w-3 rounded-full bg-red-500"
78
+ }),
79
+ /*#__PURE__*/ jsx("div", {
80
+ className: "h-3 w-3 rounded-full bg-yellow-500"
81
+ }),
82
+ /*#__PURE__*/ jsx("div", {
83
+ className: "h-3 w-3 rounded-full bg-green-500"
84
+ })
85
+ ]
86
+ });
87
+ $[7] = t2;
88
+ } else t2 = $[7];
89
+ let t3;
90
+ if ($[8] !== title) {
91
+ t3 = title && /*#__PURE__*/ jsx("span", {
92
+ className: "ml-3 text-xs text-muted-foreground",
93
+ children: title
94
+ });
95
+ $[8] = title;
96
+ $[9] = t3;
97
+ } else t3 = $[9];
98
+ let t4;
99
+ if ($[10] !== t3) {
100
+ t4 = /*#__PURE__*/ jsxs(Row, {
101
+ gap: 2,
102
+ align: "center",
103
+ children: [
104
+ t2,
105
+ t3
106
+ ]
107
+ });
108
+ $[10] = t3;
109
+ $[11] = t4;
110
+ } else t4 = $[11];
111
+ let t5;
112
+ if ($[12] !== children || $[13] !== props || $[14] !== t1 || $[15] !== t4) {
113
+ t5 = /*#__PURE__*/ jsxs(Row, {
114
+ h: 9,
115
+ justify: "between",
116
+ align: "center",
117
+ className: t1,
118
+ ...props,
119
+ children: [
120
+ t4,
121
+ children
122
+ ]
123
+ });
124
+ $[12] = children;
125
+ $[13] = props;
126
+ $[14] = t1;
127
+ $[15] = t4;
128
+ $[16] = t5;
129
+ } else t5 = $[16];
130
+ return t5;
51
131
  }
52
- function ShellContent({ className, children, ...props }) {
53
- return /*#__PURE__*/ jsx(Row, {
54
- flex: 1,
55
- overflow: "hidden",
56
- className: className,
57
- ...props,
58
- children: children
59
- });
132
+ function ShellContent(t0) {
133
+ const $ = c(8);
134
+ let children;
135
+ let className;
136
+ let props;
137
+ if ($[0] !== t0) {
138
+ ({ className, children, ...props } = t0);
139
+ $[0] = t0;
140
+ $[1] = children;
141
+ $[2] = className;
142
+ $[3] = props;
143
+ } else {
144
+ children = $[1];
145
+ className = $[2];
146
+ props = $[3];
147
+ }
148
+ let t1;
149
+ if ($[4] !== children || $[5] !== className || $[6] !== props) {
150
+ t1 = /*#__PURE__*/ jsx(Row, {
151
+ flex: 1,
152
+ overflow: "hidden",
153
+ className: className,
154
+ ...props,
155
+ children: children
156
+ });
157
+ $[4] = children;
158
+ $[5] = className;
159
+ $[6] = props;
160
+ $[7] = t1;
161
+ } else t1 = $[7];
162
+ return t1;
60
163
  }
61
- function ShellSidebar({ className, children, collapsed = false, onCollapsedChange, width = 240, ...props }) {
62
- return /*#__PURE__*/ jsx(Column, {
63
- className: cn('border-r bg-muted/30 transition-all duration-200', collapsed ? 'w-0 overflow-hidden' : '', className),
64
- style: {
65
- width: collapsed ? 0 : width
66
- },
67
- ...props,
68
- children: children
69
- });
164
+ function ShellSidebar(t0) {
165
+ const $ = c(16);
166
+ let children;
167
+ let className;
168
+ let props;
169
+ let t1;
170
+ let t2;
171
+ if ($[0] !== t0) {
172
+ const { className: t3, children: t4, collapsed: t5, onCollapsedChange, width: t6, ...t7 } = t0;
173
+ className = t3;
174
+ children = t4;
175
+ t1 = t5;
176
+ t2 = t6;
177
+ props = t7;
178
+ $[0] = t0;
179
+ $[1] = children;
180
+ $[2] = className;
181
+ $[3] = props;
182
+ $[4] = t1;
183
+ $[5] = t2;
184
+ } else {
185
+ children = $[1];
186
+ className = $[2];
187
+ props = $[3];
188
+ t1 = $[4];
189
+ t2 = $[5];
190
+ }
191
+ const collapsed = void 0 === t1 ? false : t1;
192
+ const width = void 0 === t2 ? 240 : t2;
193
+ const t3 = collapsed ? "w-0 overflow-hidden" : "";
194
+ let t4;
195
+ if ($[6] !== className || $[7] !== t3) {
196
+ t4 = cn("border-r bg-muted/30 transition-all duration-200", t3, className);
197
+ $[6] = className;
198
+ $[7] = t3;
199
+ $[8] = t4;
200
+ } else t4 = $[8];
201
+ const t5 = collapsed ? 0 : width;
202
+ let t6;
203
+ if ($[9] !== t5) {
204
+ t6 = {
205
+ width: t5
206
+ };
207
+ $[9] = t5;
208
+ $[10] = t6;
209
+ } else t6 = $[10];
210
+ let t7;
211
+ if ($[11] !== children || $[12] !== props || $[13] !== t4 || $[14] !== t6) {
212
+ t7 = /*#__PURE__*/ jsx(Column, {
213
+ className: t4,
214
+ style: t6,
215
+ ...props,
216
+ children: children
217
+ });
218
+ $[11] = children;
219
+ $[12] = props;
220
+ $[13] = t4;
221
+ $[14] = t6;
222
+ $[15] = t7;
223
+ } else t7 = $[15];
224
+ return t7;
70
225
  }
71
- function ShellSidebarHeader({ className, title, collapsed, onCollapsedChange, ...props }) {
72
- return /*#__PURE__*/ jsxs(Row, {
73
- h: 8,
74
- justify: "between",
75
- align: "center",
76
- className: cn('px-3 text-xs font-medium uppercase text-muted-foreground', className),
77
- ...props,
78
- children: [
79
- /*#__PURE__*/ jsx("span", {
80
- children: title
81
- }),
82
- onCollapsedChange && /*#__PURE__*/ jsx(Button, {
83
- variant: "ghost",
84
- size: "icon",
85
- className: "h-5 w-5",
86
- onClick: ()=>onCollapsedChange(!collapsed),
87
- children: /*#__PURE__*/ jsx(PanelLeftClose, {
88
- className: "h-3.5 w-3.5"
89
- })
226
+ function ShellSidebarHeader(t0) {
227
+ const $ = c(18);
228
+ let className;
229
+ let collapsed;
230
+ let onCollapsedChange;
231
+ let props;
232
+ let title;
233
+ if ($[0] !== t0) {
234
+ ({ className, title, collapsed, onCollapsedChange, ...props } = t0);
235
+ $[0] = t0;
236
+ $[1] = className;
237
+ $[2] = collapsed;
238
+ $[3] = onCollapsedChange;
239
+ $[4] = props;
240
+ $[5] = title;
241
+ } else {
242
+ className = $[1];
243
+ collapsed = $[2];
244
+ onCollapsedChange = $[3];
245
+ props = $[4];
246
+ title = $[5];
247
+ }
248
+ let t1;
249
+ if ($[6] !== className) {
250
+ t1 = cn("px-3 text-xs font-medium uppercase text-muted-foreground", className);
251
+ $[6] = className;
252
+ $[7] = t1;
253
+ } else t1 = $[7];
254
+ let t2;
255
+ if ($[8] !== title) {
256
+ t2 = /*#__PURE__*/ jsx("span", {
257
+ children: title
258
+ });
259
+ $[8] = title;
260
+ $[9] = t2;
261
+ } else t2 = $[9];
262
+ let t3;
263
+ if ($[10] !== collapsed || $[11] !== onCollapsedChange) {
264
+ t3 = onCollapsedChange && /*#__PURE__*/ jsx(Button, {
265
+ variant: "ghost",
266
+ size: "icon",
267
+ className: "h-5 w-5",
268
+ onClick: ()=>onCollapsedChange(!collapsed),
269
+ children: /*#__PURE__*/ jsx(PanelLeftClose, {
270
+ className: "h-3.5 w-3.5"
90
271
  })
91
- ]
92
- });
272
+ });
273
+ $[10] = collapsed;
274
+ $[11] = onCollapsedChange;
275
+ $[12] = t3;
276
+ } else t3 = $[12];
277
+ let t4;
278
+ if ($[13] !== props || $[14] !== t1 || $[15] !== t2 || $[16] !== t3) {
279
+ t4 = /*#__PURE__*/ jsxs(Row, {
280
+ h: 8,
281
+ justify: "between",
282
+ align: "center",
283
+ className: t1,
284
+ ...props,
285
+ children: [
286
+ t2,
287
+ t3
288
+ ]
289
+ });
290
+ $[13] = props;
291
+ $[14] = t1;
292
+ $[15] = t2;
293
+ $[16] = t3;
294
+ $[17] = t4;
295
+ } else t4 = $[17];
296
+ return t4;
93
297
  }
94
- function ShellFileTree({ items, selectedFile, onSelectFile }) {
95
- return /*#__PURE__*/ jsx(ScrollArea, {
96
- className: "flex-1",
97
- children: /*#__PURE__*/ jsx("div", {
98
- className: "p-2",
99
- children: items.map((item)=>/*#__PURE__*/ jsx(FileTreeNode, {
298
+ function ShellFileTree(t0) {
299
+ const $ = c(9);
300
+ const { items, selectedFile, onSelectFile } = t0;
301
+ let t1;
302
+ if ($[0] !== items || $[1] !== onSelectFile || $[2] !== selectedFile) {
303
+ let t2;
304
+ if ($[4] !== onSelectFile || $[5] !== selectedFile) {
305
+ t2 = (item)=>/*#__PURE__*/ jsx(FileTreeNode, {
100
306
  item: item,
101
307
  depth: 0,
102
308
  selectedFile: selectedFile,
103
309
  onSelectFile: onSelectFile
104
- }, item.name))
105
- })
106
- });
310
+ }, item.name);
311
+ $[4] = onSelectFile;
312
+ $[5] = selectedFile;
313
+ $[6] = t2;
314
+ } else t2 = $[6];
315
+ t1 = items.map(t2);
316
+ $[0] = items;
317
+ $[1] = onSelectFile;
318
+ $[2] = selectedFile;
319
+ $[3] = t1;
320
+ } else t1 = $[3];
321
+ let t2;
322
+ if ($[7] !== t1) {
323
+ t2 = /*#__PURE__*/ jsx(ScrollArea, {
324
+ className: "flex-1",
325
+ children: /*#__PURE__*/ jsx("div", {
326
+ className: "p-2",
327
+ children: t1
328
+ })
329
+ });
330
+ $[7] = t1;
331
+ $[8] = t2;
332
+ } else t2 = $[8];
333
+ return t2;
107
334
  }
108
- function FileTreeNode({ item, depth, selectedFile, onSelectFile }) {
335
+ function FileTreeNode(t0) {
336
+ const $ = c(31);
337
+ const { item, depth, selectedFile, onSelectFile } = t0;
109
338
  const [expanded, setExpanded] = useState(true);
110
- const isFolder = 'folder' === item.type;
339
+ const isFolder = "folder" === item.type;
111
340
  const isSelected = selectedFile === item.name;
112
- return /*#__PURE__*/ jsxs("div", {
113
- children: [
114
- /*#__PURE__*/ jsxs(Row, {
115
- gap: 1,
116
- align: "center",
117
- className: cn('cursor-pointer rounded px-2 py-0.5 text-sm hover:bg-muted', isSelected && 'bg-primary/10 text-primary'),
118
- style: {
119
- paddingLeft: 12 * depth + 8
120
- },
121
- onClick: ()=>{
122
- if (isFolder) setExpanded(!expanded);
123
- else onSelectFile?.(item.name);
124
- },
125
- children: [
126
- isFolder ? /*#__PURE__*/ jsxs(Fragment, {
127
- children: [
128
- expanded ? /*#__PURE__*/ jsx(ChevronDown, {
129
- className: "h-3.5 w-3.5 shrink-0 text-muted-foreground"
130
- }) : /*#__PURE__*/ jsx(ChevronRight, {
131
- className: "h-3.5 w-3.5 shrink-0 text-muted-foreground"
132
- }),
133
- expanded ? /*#__PURE__*/ jsx(FolderOpen, {
134
- className: "h-4 w-4 shrink-0 text-yellow-600"
135
- }) : /*#__PURE__*/ jsx(Folder, {
136
- className: "h-4 w-4 shrink-0 text-yellow-600"
137
- })
138
- ]
139
- }) : /*#__PURE__*/ jsxs(Fragment, {
140
- children: [
141
- /*#__PURE__*/ jsx("span", {
142
- className: "w-3.5"
143
- }),
144
- item.icon || /*#__PURE__*/ jsx(File, {
145
- className: "h-4 w-4 shrink-0 text-muted-foreground"
146
- })
147
- ]
148
- }),
149
- /*#__PURE__*/ jsx("span", {
150
- className: "truncate",
151
- children: item.name
152
- })
153
- ]
154
- }),
155
- isFolder && expanded && item.children && /*#__PURE__*/ jsx("div", {
156
- children: item.children.map((child)=>/*#__PURE__*/ jsx(FileTreeNode, {
157
- item: child,
158
- depth: depth + 1,
159
- selectedFile: selectedFile,
160
- onSelectFile: onSelectFile
161
- }, child.name))
162
- })
163
- ]
164
- });
341
+ const t1 = isSelected && "bg-primary/10 text-primary";
342
+ let t2;
343
+ if ($[0] !== t1) {
344
+ t2 = cn("cursor-pointer rounded px-2 py-0.5 text-sm hover:bg-muted", t1);
345
+ $[0] = t1;
346
+ $[1] = t2;
347
+ } else t2 = $[1];
348
+ const t3 = 12 * depth + 8;
349
+ let t4;
350
+ if ($[2] !== t3) {
351
+ t4 = {
352
+ paddingLeft: t3
353
+ };
354
+ $[2] = t3;
355
+ $[3] = t4;
356
+ } else t4 = $[3];
357
+ let t5;
358
+ if ($[4] !== expanded || $[5] !== isFolder || $[6] !== item.name || $[7] !== onSelectFile) {
359
+ t5 = ()=>{
360
+ if (isFolder) setExpanded(!expanded);
361
+ else onSelectFile?.(item.name);
362
+ };
363
+ $[4] = expanded;
364
+ $[5] = isFolder;
365
+ $[6] = item.name;
366
+ $[7] = onSelectFile;
367
+ $[8] = t5;
368
+ } else t5 = $[8];
369
+ let t6;
370
+ if ($[9] !== expanded || $[10] !== isFolder || $[11] !== item.icon) {
371
+ t6 = isFolder ? /*#__PURE__*/ jsxs(Fragment, {
372
+ children: [
373
+ expanded ? /*#__PURE__*/ jsx(ChevronDown, {
374
+ className: "h-3.5 w-3.5 shrink-0 text-muted-foreground"
375
+ }) : /*#__PURE__*/ jsx(ChevronRight, {
376
+ className: "h-3.5 w-3.5 shrink-0 text-muted-foreground"
377
+ }),
378
+ expanded ? /*#__PURE__*/ jsx(FolderOpen, {
379
+ className: "h-4 w-4 shrink-0 text-yellow-600"
380
+ }) : /*#__PURE__*/ jsx(Folder, {
381
+ className: "h-4 w-4 shrink-0 text-yellow-600"
382
+ })
383
+ ]
384
+ }) : /*#__PURE__*/ jsxs(Fragment, {
385
+ children: [
386
+ /*#__PURE__*/ jsx("span", {
387
+ className: "w-3.5"
388
+ }),
389
+ item.icon || /*#__PURE__*/ jsx(File, {
390
+ className: "h-4 w-4 shrink-0 text-muted-foreground"
391
+ })
392
+ ]
393
+ });
394
+ $[9] = expanded;
395
+ $[10] = isFolder;
396
+ $[11] = item.icon;
397
+ $[12] = t6;
398
+ } else t6 = $[12];
399
+ let t7;
400
+ if ($[13] !== item.name) {
401
+ t7 = /*#__PURE__*/ jsx("span", {
402
+ className: "truncate",
403
+ children: item.name
404
+ });
405
+ $[13] = item.name;
406
+ $[14] = t7;
407
+ } else t7 = $[14];
408
+ let t8;
409
+ if ($[15] !== t2 || $[16] !== t4 || $[17] !== t5 || $[18] !== t6 || $[19] !== t7) {
410
+ t8 = /*#__PURE__*/ jsxs(Row, {
411
+ gap: 1,
412
+ align: "center",
413
+ className: t2,
414
+ style: t4,
415
+ onClick: t5,
416
+ children: [
417
+ t6,
418
+ t7
419
+ ]
420
+ });
421
+ $[15] = t2;
422
+ $[16] = t4;
423
+ $[17] = t5;
424
+ $[18] = t6;
425
+ $[19] = t7;
426
+ $[20] = t8;
427
+ } else t8 = $[20];
428
+ let t9;
429
+ if ($[21] !== depth || $[22] !== expanded || $[23] !== isFolder || $[24] !== item.children || $[25] !== onSelectFile || $[26] !== selectedFile) {
430
+ t9 = isFolder && expanded && item.children && /*#__PURE__*/ jsx("div", {
431
+ children: item.children.map((child)=>/*#__PURE__*/ jsx(FileTreeNode, {
432
+ item: child,
433
+ depth: depth + 1,
434
+ selectedFile: selectedFile,
435
+ onSelectFile: onSelectFile
436
+ }, child.name))
437
+ });
438
+ $[21] = depth;
439
+ $[22] = expanded;
440
+ $[23] = isFolder;
441
+ $[24] = item.children;
442
+ $[25] = onSelectFile;
443
+ $[26] = selectedFile;
444
+ $[27] = t9;
445
+ } else t9 = $[27];
446
+ let t10;
447
+ if ($[28] !== t8 || $[29] !== t9) {
448
+ t10 = /*#__PURE__*/ jsxs("div", {
449
+ children: [
450
+ t8,
451
+ t9
452
+ ]
453
+ });
454
+ $[28] = t8;
455
+ $[29] = t9;
456
+ $[30] = t10;
457
+ } else t10 = $[30];
458
+ return t10;
165
459
  }
166
- function ShellMain({ className, children, ...props }) {
167
- return /*#__PURE__*/ jsx(Column, {
168
- flex: 1,
169
- overflow: "hidden",
170
- className: className,
171
- ...props,
172
- children: children
173
- });
460
+ function ShellMain(t0) {
461
+ const $ = c(8);
462
+ let children;
463
+ let className;
464
+ let props;
465
+ if ($[0] !== t0) {
466
+ ({ className, children, ...props } = t0);
467
+ $[0] = t0;
468
+ $[1] = children;
469
+ $[2] = className;
470
+ $[3] = props;
471
+ } else {
472
+ children = $[1];
473
+ className = $[2];
474
+ props = $[3];
475
+ }
476
+ let t1;
477
+ if ($[4] !== children || $[5] !== className || $[6] !== props) {
478
+ t1 = /*#__PURE__*/ jsx(Column, {
479
+ flex: 1,
480
+ overflow: "hidden",
481
+ className: className,
482
+ ...props,
483
+ children: children
484
+ });
485
+ $[4] = children;
486
+ $[5] = className;
487
+ $[6] = props;
488
+ $[7] = t1;
489
+ } else t1 = $[7];
490
+ return t1;
174
491
  }
175
- function ShellTabBar({ tabs, activeTab, onTabChange, onTabClose }) {
176
- return /*#__PURE__*/ jsx(Row, {
177
- h: 9,
178
- align: "center",
179
- className: "border-b bg-muted/30",
180
- children: tabs.map((tab)=>/*#__PURE__*/ jsxs(Row, {
181
- gap: 2,
182
- align: "center",
183
- className: cn('group h-full cursor-pointer border-r px-3 text-sm', activeTab === tab.id ? 'bg-background text-foreground' : 'text-muted-foreground hover:bg-muted/50'),
184
- onClick: ()=>onTabChange?.(tab.id),
185
- children: [
186
- tab.icon,
187
- /*#__PURE__*/ jsx("span", {
188
- className: "max-w-[120px] truncate",
189
- children: tab.title
190
- }),
191
- onTabClose && /*#__PURE__*/ jsx(Button, {
192
- variant: "ghost",
193
- size: "icon",
194
- className: "h-4 w-4 opacity-0 group-hover:opacity-100",
195
- onClick: (e)=>{
196
- e.stopPropagation();
197
- onTabClose(tab.id);
198
- },
199
- children: /*#__PURE__*/ jsx(X, {
200
- className: "h-3 w-3"
492
+ function ShellTabBar(t0) {
493
+ const $ = c(11);
494
+ const { tabs, activeTab, onTabChange, onTabClose } = t0;
495
+ let t1;
496
+ if ($[0] !== activeTab || $[1] !== onTabChange || $[2] !== onTabClose || $[3] !== tabs) {
497
+ let t2;
498
+ if ($[5] !== activeTab || $[6] !== onTabChange || $[7] !== onTabClose) {
499
+ t2 = (tab)=>/*#__PURE__*/ jsxs(Row, {
500
+ gap: 2,
501
+ align: "center",
502
+ className: cn("group h-full cursor-pointer border-r px-3 text-sm", activeTab === tab.id ? "bg-background text-foreground" : "text-muted-foreground hover:bg-muted/50"),
503
+ onClick: ()=>onTabChange?.(tab.id),
504
+ children: [
505
+ tab.icon,
506
+ /*#__PURE__*/ jsx("span", {
507
+ className: "max-w-[120px] truncate",
508
+ children: tab.title
509
+ }),
510
+ onTabClose && /*#__PURE__*/ jsx(Button, {
511
+ variant: "ghost",
512
+ size: "icon",
513
+ className: "h-4 w-4 opacity-0 group-hover:opacity-100",
514
+ onClick: (e)=>{
515
+ e.stopPropagation();
516
+ onTabClose(tab.id);
517
+ },
518
+ children: /*#__PURE__*/ jsx(X, {
519
+ className: "h-3 w-3"
520
+ })
201
521
  })
202
- })
203
- ]
204
- }, tab.id))
205
- });
522
+ ]
523
+ }, tab.id);
524
+ $[5] = activeTab;
525
+ $[6] = onTabChange;
526
+ $[7] = onTabClose;
527
+ $[8] = t2;
528
+ } else t2 = $[8];
529
+ t1 = tabs.map(t2);
530
+ $[0] = activeTab;
531
+ $[1] = onTabChange;
532
+ $[2] = onTabClose;
533
+ $[3] = tabs;
534
+ $[4] = t1;
535
+ } else t1 = $[4];
536
+ let t2;
537
+ if ($[9] !== t1) {
538
+ t2 = /*#__PURE__*/ jsx(Row, {
539
+ h: 9,
540
+ align: "center",
541
+ className: "border-b bg-muted/30",
542
+ children: t1
543
+ });
544
+ $[9] = t1;
545
+ $[10] = t2;
546
+ } else t2 = $[10];
547
+ return t2;
206
548
  }
207
- function ShellPane({ className, children }) {
208
- return /*#__PURE__*/ jsx(ScrollArea, {
209
- className: cn('flex-1', className),
210
- children: /*#__PURE__*/ jsx("div", {
549
+ function ShellPane(t0) {
550
+ const $ = c(7);
551
+ const { className, children } = t0;
552
+ let t1;
553
+ if ($[0] !== className) {
554
+ t1 = cn("flex-1", className);
555
+ $[0] = className;
556
+ $[1] = t1;
557
+ } else t1 = $[1];
558
+ let t2;
559
+ if ($[2] !== children) {
560
+ t2 = /*#__PURE__*/ jsx("div", {
211
561
  className: "p-4",
212
562
  children: children
213
- })
214
- });
563
+ });
564
+ $[2] = children;
565
+ $[3] = t2;
566
+ } else t2 = $[3];
567
+ let t3;
568
+ if ($[4] !== t1 || $[5] !== t2) {
569
+ t3 = /*#__PURE__*/ jsx(ScrollArea, {
570
+ className: t1,
571
+ children: t2
572
+ });
573
+ $[4] = t1;
574
+ $[5] = t2;
575
+ $[6] = t3;
576
+ } else t3 = $[6];
577
+ return t3;
215
578
  }
216
- function ShellStatusBar({ className, children, ...props }) {
217
- return /*#__PURE__*/ jsx(Row, {
218
- h: 6,
219
- justify: "between",
220
- align: "center",
221
- className: cn('border-t bg-primary px-2 text-xs text-primary-foreground', className),
222
- ...props,
223
- children: children
224
- });
579
+ function ShellStatusBar(t0) {
580
+ const $ = c(10);
581
+ let children;
582
+ let className;
583
+ let props;
584
+ if ($[0] !== t0) {
585
+ ({ className, children, ...props } = t0);
586
+ $[0] = t0;
587
+ $[1] = children;
588
+ $[2] = className;
589
+ $[3] = props;
590
+ } else {
591
+ children = $[1];
592
+ className = $[2];
593
+ props = $[3];
594
+ }
595
+ let t1;
596
+ if ($[4] !== className) {
597
+ t1 = cn("border-t bg-primary px-2 text-xs text-primary-foreground", className);
598
+ $[4] = className;
599
+ $[5] = t1;
600
+ } else t1 = $[5];
601
+ let t2;
602
+ if ($[6] !== children || $[7] !== props || $[8] !== t1) {
603
+ t2 = /*#__PURE__*/ jsx(Row, {
604
+ h: 6,
605
+ justify: "between",
606
+ align: "center",
607
+ className: t1,
608
+ ...props,
609
+ children: children
610
+ });
611
+ $[6] = children;
612
+ $[7] = props;
613
+ $[8] = t1;
614
+ $[9] = t2;
615
+ } else t2 = $[9];
616
+ return t2;
225
617
  }
226
- function ShellActivityBar({ className, children, ...props }) {
227
- return /*#__PURE__*/ jsx(Column, {
228
- w: 12,
229
- gap: 2,
230
- align: "center",
231
- className: cn('border-r bg-muted/50 py-2', className),
232
- ...props,
233
- children: children
234
- });
618
+ function ShellActivityBar(t0) {
619
+ const $ = c(10);
620
+ let children;
621
+ let className;
622
+ let props;
623
+ if ($[0] !== t0) {
624
+ ({ className, children, ...props } = t0);
625
+ $[0] = t0;
626
+ $[1] = children;
627
+ $[2] = className;
628
+ $[3] = props;
629
+ } else {
630
+ children = $[1];
631
+ className = $[2];
632
+ props = $[3];
633
+ }
634
+ let t1;
635
+ if ($[4] !== className) {
636
+ t1 = cn("border-r bg-muted/50 py-2", className);
637
+ $[4] = className;
638
+ $[5] = t1;
639
+ } else t1 = $[5];
640
+ let t2;
641
+ if ($[6] !== children || $[7] !== props || $[8] !== t1) {
642
+ t2 = /*#__PURE__*/ jsx(Column, {
643
+ w: 12,
644
+ gap: 2,
645
+ align: "center",
646
+ className: t1,
647
+ ...props,
648
+ children: children
649
+ });
650
+ $[6] = children;
651
+ $[7] = props;
652
+ $[8] = t1;
653
+ $[9] = t2;
654
+ } else t2 = $[9];
655
+ return t2;
235
656
  }
236
- function ShellActivityBarItem({ icon, active, onClick, tooltip }) {
237
- return /*#__PURE__*/ jsx(Button, {
238
- variant: "ghost",
239
- size: "icon",
240
- className: cn('h-10 w-10 rounded-none border-l-2 border-transparent', active && 'border-primary bg-muted'),
241
- onClick: onClick,
242
- title: tooltip,
243
- children: icon
244
- });
657
+ function ShellActivityBarItem(t0) {
658
+ const $ = c(7);
659
+ const { icon, active, onClick, tooltip } = t0;
660
+ const t1 = active && "border-primary bg-muted";
661
+ let t2;
662
+ if ($[0] !== t1) {
663
+ t2 = cn("h-10 w-10 rounded-none border-l-2 border-transparent", t1);
664
+ $[0] = t1;
665
+ $[1] = t2;
666
+ } else t2 = $[1];
667
+ let t3;
668
+ if ($[2] !== icon || $[3] !== onClick || $[4] !== t2 || $[5] !== tooltip) {
669
+ t3 = /*#__PURE__*/ jsx(Button, {
670
+ variant: "ghost",
671
+ size: "icon",
672
+ className: t2,
673
+ onClick: onClick,
674
+ title: tooltip,
675
+ children: icon
676
+ });
677
+ $[2] = icon;
678
+ $[3] = onClick;
679
+ $[4] = t2;
680
+ $[5] = tooltip;
681
+ $[6] = t3;
682
+ } else t3 = $[6];
683
+ return t3;
245
684
  }
246
- function ShellPanel({ className, title, height = 200, children, ...props }) {
247
- return /*#__PURE__*/ jsxs("div", {
248
- className: cn('border-t', className),
249
- style: {
685
+ function ShellPanel(t0) {
686
+ const $ = c(20);
687
+ let children;
688
+ let className;
689
+ let props;
690
+ let t1;
691
+ let title;
692
+ if ($[0] !== t0) {
693
+ ({ className, title, height: t1, children, ...props } = t0);
694
+ $[0] = t0;
695
+ $[1] = children;
696
+ $[2] = className;
697
+ $[3] = props;
698
+ $[4] = t1;
699
+ $[5] = title;
700
+ } else {
701
+ children = $[1];
702
+ className = $[2];
703
+ props = $[3];
704
+ t1 = $[4];
705
+ title = $[5];
706
+ }
707
+ const height = void 0 === t1 ? 200 : t1;
708
+ let t2;
709
+ if ($[6] !== className) {
710
+ t2 = cn("border-t", className);
711
+ $[6] = className;
712
+ $[7] = t2;
713
+ } else t2 = $[7];
714
+ let t3;
715
+ if ($[8] !== height) {
716
+ t3 = {
250
717
  height
251
- },
252
- ...props,
253
- children: [
254
- title && /*#__PURE__*/ jsx(Row, {
255
- h: 8,
256
- align: "center",
257
- className: "border-b bg-muted/30 px-3 text-xs font-medium uppercase text-muted-foreground",
258
- children: title
259
- }),
260
- /*#__PURE__*/ jsx(ScrollArea, {
261
- className: "h-full",
262
- children: /*#__PURE__*/ jsx("div", {
263
- className: "p-2 font-mono text-sm",
264
- children: children
265
- })
718
+ };
719
+ $[8] = height;
720
+ $[9] = t3;
721
+ } else t3 = $[9];
722
+ let t4;
723
+ if ($[10] !== title) {
724
+ t4 = title && /*#__PURE__*/ jsx(Row, {
725
+ h: 8,
726
+ align: "center",
727
+ className: "border-b bg-muted/30 px-3 text-xs font-medium uppercase text-muted-foreground",
728
+ children: title
729
+ });
730
+ $[10] = title;
731
+ $[11] = t4;
732
+ } else t4 = $[11];
733
+ let t5;
734
+ if ($[12] !== children) {
735
+ t5 = /*#__PURE__*/ jsx(ScrollArea, {
736
+ className: "h-full",
737
+ children: /*#__PURE__*/ jsx("div", {
738
+ className: "p-2 font-mono text-sm",
739
+ children: children
266
740
  })
267
- ]
268
- });
741
+ });
742
+ $[12] = children;
743
+ $[13] = t5;
744
+ } else t5 = $[13];
745
+ let t6;
746
+ if ($[14] !== props || $[15] !== t2 || $[16] !== t3 || $[17] !== t4 || $[18] !== t5) {
747
+ t6 = /*#__PURE__*/ jsxs("div", {
748
+ className: t2,
749
+ style: t3,
750
+ ...props,
751
+ children: [
752
+ t4,
753
+ t5
754
+ ]
755
+ });
756
+ $[14] = props;
757
+ $[15] = t2;
758
+ $[16] = t3;
759
+ $[17] = t4;
760
+ $[18] = t5;
761
+ $[19] = t6;
762
+ } else t6 = $[19];
763
+ return t6;
269
764
  }
270
765
  export { Shell, ShellActivityBar, ShellActivityBarItem, ShellContent, ShellFileTree, ShellMain, ShellPane, ShellPanel, ShellSidebar, ShellSidebarHeader, ShellStatusBar, ShellTabBar, ShellTitleBar };