@uipath/apollo-wind 0.9.0 → 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 +4 -4
  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,464 +1,1019 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { useState } from "react";
3
4
  import { Badge } from "../ui/badge.js";
4
5
  import { Card } from "../ui/card.js";
5
6
  import { Tabs, TabsContent, TabsList, TabsTrigger } from "../ui/tabs.js";
6
7
  import { ScrollArea } from "../ui/scroll-area.js";
7
8
  import { AlertCircle, CheckCircle2, Database, Eye, FileEdit, XCircle } from "lucide-react";
8
- function FormStateViewer({ form, title = 'Form State', className = '', compact = false }) {
9
- const [activeTab, setActiveTab] = useState('values');
9
+ function FormStateViewer(t0) {
10
+ const $ = c(192);
11
+ const { form, title: t1, className: t2, compact: t3 } = t0;
12
+ const title = void 0 === t1 ? "Form State" : t1;
13
+ const className = void 0 === t2 ? "" : t2;
14
+ const compact = void 0 === t3 ? false : t3;
15
+ const [activeTab, setActiveTab] = useState("values");
10
16
  const { formState, watch } = form;
11
- const values = watch();
12
- const stats = {
13
- isValid: formState.isValid,
14
- isDirty: formState.isDirty,
15
- isSubmitting: formState.isSubmitting,
16
- isValidating: formState.isValidating,
17
- submitCount: formState.submitCount,
18
- errorCount: Object.keys(formState.errors).length,
19
- dirtyFieldsCount: Object.keys(formState.dirtyFields).length,
20
- touchedFieldsCount: Object.keys(formState.touchedFields).length
21
- };
22
- if (compact) return /*#__PURE__*/ jsx(Card, {
23
- className: `p-4 ${className}`,
24
- children: /*#__PURE__*/ jsxs("div", {
25
- className: "space-y-3",
26
- children: [
27
- /*#__PURE__*/ jsxs("div", {
28
- className: "flex items-center justify-between",
29
- children: [
30
- /*#__PURE__*/ jsx("h3", {
31
- className: "text-sm font-semibold",
32
- children: title
33
- }),
34
- /*#__PURE__*/ jsxs("div", {
35
- className: "flex gap-2",
36
- children: [
37
- stats.isValid ? /*#__PURE__*/ jsxs(Badge, {
38
- variant: "default",
39
- className: "bg-green-600",
40
- children: [
41
- /*#__PURE__*/ jsx(CheckCircle2, {
42
- className: "w-3 h-3 mr-1"
43
- }),
44
- "Valid"
45
- ]
46
- }) : /*#__PURE__*/ jsxs(Badge, {
47
- variant: "destructive",
48
- children: [
49
- /*#__PURE__*/ jsx(XCircle, {
50
- className: "w-3 h-3 mr-1"
51
- }),
52
- "Invalid"
53
- ]
54
- }),
55
- stats.isDirty && /*#__PURE__*/ jsxs(Badge, {
56
- variant: "secondary",
57
- children: [
58
- /*#__PURE__*/ jsx(FileEdit, {
59
- className: "w-3 h-3 mr-1"
60
- }),
61
- "Dirty"
62
- ]
63
- })
64
- ]
65
- })
66
- ]
67
- }),
68
- /*#__PURE__*/ jsx("pre", {
69
- className: "text-xs bg-muted p-3 rounded overflow-auto max-h-40",
70
- children: JSON.stringify(values, null, 2)
71
- })
72
- ]
73
- })
74
- });
75
- return /*#__PURE__*/ jsxs(Card, {
76
- className: `${className}`,
77
- children: [
78
- /*#__PURE__*/ jsxs("div", {
79
- className: "p-4 border-b",
80
- children: [
81
- /*#__PURE__*/ jsxs("div", {
82
- className: "flex items-center justify-between mb-3",
17
+ let T0;
18
+ let T1;
19
+ let T2;
20
+ let T3;
21
+ let stats;
22
+ let t10;
23
+ let t11;
24
+ let t12;
25
+ let t13;
26
+ let t14;
27
+ let t15;
28
+ let t16;
29
+ let t17;
30
+ let t4;
31
+ let t5;
32
+ let t6;
33
+ let t7;
34
+ let t8;
35
+ let t9;
36
+ if ($[0] !== activeTab || $[1] !== className || $[2] !== compact || $[3] !== formState.dirtyFields || $[4] !== formState.errors || $[5] !== formState.isDirty || $[6] !== formState.isSubmitting || $[7] !== formState.isValid || $[8] !== formState.isValidating || $[9] !== formState.submitCount || $[10] !== formState.touchedFields || $[11] !== title || $[12] !== watch) {
37
+ t17 = Symbol.for("react.early_return_sentinel");
38
+ bb0: {
39
+ const values = watch();
40
+ const t18 = formState.isValid;
41
+ const t19 = formState.isDirty;
42
+ const t20 = formState.isSubmitting;
43
+ const t21 = formState.isValidating;
44
+ const t22 = formState.submitCount;
45
+ let t23;
46
+ if ($[32] !== formState.errors) {
47
+ t23 = Object.keys(formState.errors);
48
+ $[32] = formState.errors;
49
+ $[33] = t23;
50
+ } else t23 = $[33];
51
+ const t24 = t23.length;
52
+ let t25;
53
+ if ($[34] !== formState.dirtyFields) {
54
+ t25 = Object.keys(formState.dirtyFields);
55
+ $[34] = formState.dirtyFields;
56
+ $[35] = t25;
57
+ } else t25 = $[35];
58
+ const t26 = t25.length;
59
+ let t27;
60
+ if ($[36] !== formState.touchedFields) {
61
+ t27 = Object.keys(formState.touchedFields);
62
+ $[36] = formState.touchedFields;
63
+ $[37] = t27;
64
+ } else t27 = $[37];
65
+ let t28;
66
+ if ($[38] !== formState.isDirty || $[39] !== formState.isSubmitting || $[40] !== formState.isValid || $[41] !== formState.isValidating || $[42] !== formState.submitCount || $[43] !== t23.length || $[44] !== t25.length || $[45] !== t27.length) {
67
+ t28 = {
68
+ isValid: t18,
69
+ isDirty: t19,
70
+ isSubmitting: t20,
71
+ isValidating: t21,
72
+ submitCount: t22,
73
+ errorCount: t24,
74
+ dirtyFieldsCount: t26,
75
+ touchedFieldsCount: t27.length
76
+ };
77
+ $[38] = formState.isDirty;
78
+ $[39] = formState.isSubmitting;
79
+ $[40] = formState.isValid;
80
+ $[41] = formState.isValidating;
81
+ $[42] = formState.submitCount;
82
+ $[43] = t23.length;
83
+ $[44] = t25.length;
84
+ $[45] = t27.length;
85
+ $[46] = t28;
86
+ } else t28 = $[46];
87
+ stats = t28;
88
+ if (compact) {
89
+ const t29 = `p-4 ${className}`;
90
+ let t30;
91
+ if ($[47] !== title) {
92
+ t30 = /*#__PURE__*/ jsx("h3", {
93
+ className: "text-sm font-semibold",
94
+ children: title
95
+ });
96
+ $[47] = title;
97
+ $[48] = t30;
98
+ } else t30 = $[48];
99
+ let t31;
100
+ if ($[49] !== stats.isValid) {
101
+ t31 = stats.isValid ? /*#__PURE__*/ jsxs(Badge, {
102
+ variant: "default",
103
+ className: "bg-green-600",
83
104
  children: [
84
- /*#__PURE__*/ jsx("h3", {
85
- className: "text-lg font-semibold",
86
- children: title
105
+ /*#__PURE__*/ jsx(CheckCircle2, {
106
+ className: "w-3 h-3 mr-1"
87
107
  }),
88
- /*#__PURE__*/ jsxs("div", {
89
- className: "flex gap-2",
90
- children: [
91
- stats.isValid ? /*#__PURE__*/ jsxs(Badge, {
92
- variant: "default",
93
- className: "bg-green-600",
94
- children: [
95
- /*#__PURE__*/ jsx(CheckCircle2, {
96
- className: "w-3 h-3 mr-1"
97
- }),
98
- "Valid"
99
- ]
100
- }) : /*#__PURE__*/ jsxs(Badge, {
101
- variant: "destructive",
102
- children: [
103
- /*#__PURE__*/ jsx(XCircle, {
104
- className: "w-3 h-3 mr-1"
105
- }),
106
- stats.errorCount,
107
- " Error",
108
- 1 !== stats.errorCount ? 's' : ''
109
- ]
110
- }),
111
- stats.isDirty && /*#__PURE__*/ jsxs(Badge, {
112
- variant: "secondary",
113
- children: [
114
- /*#__PURE__*/ jsx(FileEdit, {
115
- className: "w-3 h-3 mr-1"
116
- }),
117
- stats.dirtyFieldsCount,
118
- " Changed"
119
- ]
120
- })
121
- ]
122
- })
108
+ "Valid"
123
109
  ]
124
- }),
125
- /*#__PURE__*/ jsxs("div", {
126
- className: "grid grid-cols-4 gap-2 text-xs",
110
+ }) : /*#__PURE__*/ jsxs(Badge, {
111
+ variant: "destructive",
127
112
  children: [
128
- /*#__PURE__*/ jsxs("div", {
129
- className: "text-center p-2 bg-muted rounded",
130
- children: [
131
- /*#__PURE__*/ jsx("div", {
132
- className: "font-semibold text-lg",
133
- children: stats.submitCount
134
- }),
135
- /*#__PURE__*/ jsx("div", {
136
- className: "text-muted-foreground",
137
- children: "Submits"
138
- })
139
- ]
140
- }),
141
- /*#__PURE__*/ jsxs("div", {
142
- className: "text-center p-2 bg-muted rounded",
143
- children: [
144
- /*#__PURE__*/ jsx("div", {
145
- className: "font-semibold text-lg",
146
- children: stats.errorCount
147
- }),
148
- /*#__PURE__*/ jsx("div", {
149
- className: "text-muted-foreground",
150
- children: "Errors"
151
- })
152
- ]
113
+ /*#__PURE__*/ jsx(XCircle, {
114
+ className: "w-3 h-3 mr-1"
153
115
  }),
154
- /*#__PURE__*/ jsxs("div", {
155
- className: "text-center p-2 bg-muted rounded",
156
- children: [
157
- /*#__PURE__*/ jsx("div", {
158
- className: "font-semibold text-lg",
159
- children: stats.dirtyFieldsCount
160
- }),
161
- /*#__PURE__*/ jsx("div", {
162
- className: "text-muted-foreground",
163
- children: "Dirty"
164
- })
165
- ]
166
- }),
167
- /*#__PURE__*/ jsxs("div", {
168
- className: "text-center p-2 bg-muted rounded",
169
- children: [
170
- /*#__PURE__*/ jsx("div", {
171
- className: "font-semibold text-lg",
172
- children: stats.touchedFieldsCount
173
- }),
174
- /*#__PURE__*/ jsx("div", {
175
- className: "text-muted-foreground",
176
- children: "Touched"
177
- })
178
- ]
179
- })
116
+ "Invalid"
180
117
  ]
181
- })
182
- ]
183
- }),
184
- /*#__PURE__*/ jsxs(Tabs, {
185
- value: activeTab,
186
- onValueChange: setActiveTab,
187
- className: "w-full",
188
- children: [
189
- /*#__PURE__*/ jsxs(TabsList, {
190
- className: "w-full justify-start rounded-none border-b px-4",
118
+ });
119
+ $[49] = stats.isValid;
120
+ $[50] = t31;
121
+ } else t31 = $[50];
122
+ let t32;
123
+ if ($[51] !== stats.isDirty) {
124
+ t32 = stats.isDirty && /*#__PURE__*/ jsxs(Badge, {
125
+ variant: "secondary",
191
126
  children: [
192
- /*#__PURE__*/ jsxs(TabsTrigger, {
193
- value: "values",
194
- className: "gap-2",
195
- children: [
196
- /*#__PURE__*/ jsx(Database, {
197
- className: "w-4 h-4"
198
- }),
199
- "Values"
200
- ]
201
- }),
202
- /*#__PURE__*/ jsxs(TabsTrigger, {
203
- value: "errors",
204
- className: "gap-2",
205
- children: [
206
- /*#__PURE__*/ jsx(AlertCircle, {
207
- className: "w-4 h-4"
208
- }),
209
- "Errors",
210
- stats.errorCount > 0 && /*#__PURE__*/ jsx(Badge, {
211
- variant: "destructive",
212
- className: "ml-1 h-5",
213
- children: stats.errorCount
214
- })
215
- ]
127
+ /*#__PURE__*/ jsx(FileEdit, {
128
+ className: "w-3 h-3 mr-1"
216
129
  }),
217
- /*#__PURE__*/ jsxs(TabsTrigger, {
218
- value: "state",
219
- className: "gap-2",
220
- children: [
221
- /*#__PURE__*/ jsx(Eye, {
222
- className: "w-4 h-4"
223
- }),
224
- "State"
225
- ]
226
- }),
227
- /*#__PURE__*/ jsxs(TabsTrigger, {
228
- value: "fields",
229
- className: "gap-2",
230
- children: [
231
- /*#__PURE__*/ jsx(FileEdit, {
232
- className: "w-4 h-4"
233
- }),
234
- "Fields"
235
- ]
236
- })
130
+ "Dirty"
237
131
  ]
238
- }),
239
- /*#__PURE__*/ jsxs(ScrollArea, {
240
- className: "h-[400px]",
132
+ });
133
+ $[51] = stats.isDirty;
134
+ $[52] = t32;
135
+ } else t32 = $[52];
136
+ let t33;
137
+ if ($[53] !== t31 || $[54] !== t32) {
138
+ t33 = /*#__PURE__*/ jsxs("div", {
139
+ className: "flex gap-2",
241
140
  children: [
242
- /*#__PURE__*/ jsx(TabsContent, {
243
- value: "values",
244
- className: "p-4 m-0",
245
- children: /*#__PURE__*/ jsxs("div", {
246
- className: "space-y-2",
247
- children: [
248
- /*#__PURE__*/ jsx("p", {
249
- className: "text-sm text-muted-foreground mb-3",
250
- children: "Current form values (updates in real-time)"
251
- }),
252
- /*#__PURE__*/ jsx("pre", {
253
- className: "text-xs bg-muted p-4 rounded overflow-auto",
254
- children: JSON.stringify(values, null, 2)
255
- })
256
- ]
257
- })
258
- }),
259
- /*#__PURE__*/ jsx(TabsContent, {
260
- value: "errors",
261
- className: "p-4 m-0",
262
- children: /*#__PURE__*/ jsxs("div", {
263
- className: "space-y-3",
264
- children: [
265
- /*#__PURE__*/ jsx("p", {
266
- className: "text-sm text-muted-foreground mb-3",
267
- children: "Validation errors from Zod schema"
268
- }),
269
- 0 === Object.keys(formState.errors).length ? /*#__PURE__*/ jsxs("div", {
270
- className: "flex items-center gap-2 p-4 bg-green-50 dark:bg-green-900/10 rounded text-green-700 dark:text-green-400",
271
- children: [
272
- /*#__PURE__*/ jsx(CheckCircle2, {
273
- className: "w-5 h-5"
274
- }),
275
- /*#__PURE__*/ jsx("span", {
276
- className: "text-sm font-medium",
277
- children: "No validation errors"
278
- })
279
- ]
280
- }) : /*#__PURE__*/ jsx("div", {
281
- className: "space-y-2",
282
- children: Object.entries(formState.errors).map(([field, error])=>/*#__PURE__*/ jsx("div", {
283
- className: "p-3 bg-destructive/10 rounded border border-destructive/20",
284
- children: /*#__PURE__*/ jsxs("div", {
285
- className: "flex items-start gap-2",
286
- children: [
287
- /*#__PURE__*/ jsx(XCircle, {
288
- className: "w-4 h-4 text-destructive mt-0.5"
289
- }),
290
- /*#__PURE__*/ jsxs("div", {
291
- className: "flex-1",
292
- children: [
293
- /*#__PURE__*/ jsx("div", {
294
- className: "font-mono text-sm font-semibold",
295
- children: field
296
- }),
297
- /*#__PURE__*/ jsx("div", {
298
- className: "text-sm text-muted-foreground mt-1",
299
- children: error?.message || 'Invalid value'
300
- })
301
- ]
302
- })
303
- ]
304
- })
305
- }, field))
306
- })
307
- ]
308
- })
309
- }),
310
- /*#__PURE__*/ jsx(TabsContent, {
311
- value: "state",
312
- className: "p-4 m-0",
313
- children: /*#__PURE__*/ jsxs("div", {
314
- className: "space-y-3",
315
- children: [
316
- /*#__PURE__*/ jsx("p", {
317
- className: "text-sm text-muted-foreground mb-3",
318
- children: "React Hook Form internal state"
319
- }),
320
- /*#__PURE__*/ jsxs("div", {
321
- className: "space-y-2",
322
- children: [
323
- /*#__PURE__*/ jsx(StateItem, {
324
- label: "Is Valid",
325
- value: stats.isValid
326
- }),
327
- /*#__PURE__*/ jsx(StateItem, {
328
- label: "Is Dirty",
329
- value: stats.isDirty
330
- }),
331
- /*#__PURE__*/ jsx(StateItem, {
332
- label: "Is Submitting",
333
- value: stats.isSubmitting
334
- }),
335
- /*#__PURE__*/ jsx(StateItem, {
336
- label: "Is Validating",
337
- value: stats.isValidating
338
- }),
339
- /*#__PURE__*/ jsx(StateItem, {
340
- label: "Is Submitted",
341
- value: formState.isSubmitted
342
- }),
343
- /*#__PURE__*/ jsx(StateItem, {
344
- label: "Is Submit Successful",
345
- value: formState.isSubmitSuccessful
346
- }),
347
- /*#__PURE__*/ jsx(StateItem, {
348
- label: "Submit Count",
349
- value: stats.submitCount,
350
- type: "number"
351
- })
352
- ]
353
- })
354
- ]
355
- })
141
+ t31,
142
+ t32
143
+ ]
144
+ });
145
+ $[53] = t31;
146
+ $[54] = t32;
147
+ $[55] = t33;
148
+ } else t33 = $[55];
149
+ let t34;
150
+ if ($[56] !== t30 || $[57] !== t33) {
151
+ t34 = /*#__PURE__*/ jsxs("div", {
152
+ className: "flex items-center justify-between",
153
+ children: [
154
+ t30,
155
+ t33
156
+ ]
157
+ });
158
+ $[56] = t30;
159
+ $[57] = t33;
160
+ $[58] = t34;
161
+ } else t34 = $[58];
162
+ const t35 = /*#__PURE__*/ jsxs("div", {
163
+ className: "space-y-3",
164
+ children: [
165
+ t34,
166
+ /*#__PURE__*/ jsx("pre", {
167
+ className: "text-xs bg-muted p-3 rounded overflow-auto max-h-40",
168
+ children: JSON.stringify(values, null, 2)
169
+ })
170
+ ]
171
+ });
172
+ let t36;
173
+ if ($[59] !== t29 || $[60] !== t35) {
174
+ t36 = /*#__PURE__*/ jsx(Card, {
175
+ className: t29,
176
+ children: t35
177
+ });
178
+ $[59] = t29;
179
+ $[60] = t35;
180
+ $[61] = t36;
181
+ } else t36 = $[61];
182
+ t17 = t36;
183
+ break bb0;
184
+ }
185
+ T3 = Card;
186
+ t15 = `${className}`;
187
+ let t29;
188
+ if ($[62] !== title) {
189
+ t29 = /*#__PURE__*/ jsx("h3", {
190
+ className: "text-lg font-semibold",
191
+ children: title
192
+ });
193
+ $[62] = title;
194
+ $[63] = t29;
195
+ } else t29 = $[63];
196
+ let t30;
197
+ if ($[64] !== stats.errorCount || $[65] !== stats.isValid) {
198
+ t30 = stats.isValid ? /*#__PURE__*/ jsxs(Badge, {
199
+ variant: "default",
200
+ className: "bg-green-600",
201
+ children: [
202
+ /*#__PURE__*/ jsx(CheckCircle2, {
203
+ className: "w-3 h-3 mr-1"
204
+ }),
205
+ "Valid"
206
+ ]
207
+ }) : /*#__PURE__*/ jsxs(Badge, {
208
+ variant: "destructive",
209
+ children: [
210
+ /*#__PURE__*/ jsx(XCircle, {
211
+ className: "w-3 h-3 mr-1"
212
+ }),
213
+ stats.errorCount,
214
+ " Error",
215
+ 1 !== stats.errorCount ? "s" : ""
216
+ ]
217
+ });
218
+ $[64] = stats.errorCount;
219
+ $[65] = stats.isValid;
220
+ $[66] = t30;
221
+ } else t30 = $[66];
222
+ let t31;
223
+ if ($[67] !== stats.dirtyFieldsCount || $[68] !== stats.isDirty) {
224
+ t31 = stats.isDirty && /*#__PURE__*/ jsxs(Badge, {
225
+ variant: "secondary",
226
+ children: [
227
+ /*#__PURE__*/ jsx(FileEdit, {
228
+ className: "w-3 h-3 mr-1"
229
+ }),
230
+ stats.dirtyFieldsCount,
231
+ " Changed"
232
+ ]
233
+ });
234
+ $[67] = stats.dirtyFieldsCount;
235
+ $[68] = stats.isDirty;
236
+ $[69] = t31;
237
+ } else t31 = $[69];
238
+ let t32;
239
+ if ($[70] !== t30 || $[71] !== t31) {
240
+ t32 = /*#__PURE__*/ jsxs("div", {
241
+ className: "flex gap-2",
242
+ children: [
243
+ t30,
244
+ t31
245
+ ]
246
+ });
247
+ $[70] = t30;
248
+ $[71] = t31;
249
+ $[72] = t32;
250
+ } else t32 = $[72];
251
+ let t33;
252
+ if ($[73] !== t29 || $[74] !== t32) {
253
+ t33 = /*#__PURE__*/ jsxs("div", {
254
+ className: "flex items-center justify-between mb-3",
255
+ children: [
256
+ t29,
257
+ t32
258
+ ]
259
+ });
260
+ $[73] = t29;
261
+ $[74] = t32;
262
+ $[75] = t33;
263
+ } else t33 = $[75];
264
+ let t34;
265
+ if ($[76] !== stats.submitCount) {
266
+ t34 = /*#__PURE__*/ jsx("div", {
267
+ className: "font-semibold text-lg",
268
+ children: stats.submitCount
269
+ });
270
+ $[76] = stats.submitCount;
271
+ $[77] = t34;
272
+ } else t34 = $[77];
273
+ let t35;
274
+ if ($[78] === Symbol.for("react.memo_cache_sentinel")) {
275
+ t35 = /*#__PURE__*/ jsx("div", {
276
+ className: "text-muted-foreground",
277
+ children: "Submits"
278
+ });
279
+ $[78] = t35;
280
+ } else t35 = $[78];
281
+ let t36;
282
+ if ($[79] !== t34) {
283
+ t36 = /*#__PURE__*/ jsxs("div", {
284
+ className: "text-center p-2 bg-muted rounded",
285
+ children: [
286
+ t34,
287
+ t35
288
+ ]
289
+ });
290
+ $[79] = t34;
291
+ $[80] = t36;
292
+ } else t36 = $[80];
293
+ let t37;
294
+ if ($[81] !== stats.errorCount) {
295
+ t37 = /*#__PURE__*/ jsx("div", {
296
+ className: "font-semibold text-lg",
297
+ children: stats.errorCount
298
+ });
299
+ $[81] = stats.errorCount;
300
+ $[82] = t37;
301
+ } else t37 = $[82];
302
+ let t38;
303
+ if ($[83] === Symbol.for("react.memo_cache_sentinel")) {
304
+ t38 = /*#__PURE__*/ jsx("div", {
305
+ className: "text-muted-foreground",
306
+ children: "Errors"
307
+ });
308
+ $[83] = t38;
309
+ } else t38 = $[83];
310
+ let t39;
311
+ if ($[84] !== t37) {
312
+ t39 = /*#__PURE__*/ jsxs("div", {
313
+ className: "text-center p-2 bg-muted rounded",
314
+ children: [
315
+ t37,
316
+ t38
317
+ ]
318
+ });
319
+ $[84] = t37;
320
+ $[85] = t39;
321
+ } else t39 = $[85];
322
+ let t40;
323
+ if ($[86] !== stats.dirtyFieldsCount) {
324
+ t40 = /*#__PURE__*/ jsx("div", {
325
+ className: "font-semibold text-lg",
326
+ children: stats.dirtyFieldsCount
327
+ });
328
+ $[86] = stats.dirtyFieldsCount;
329
+ $[87] = t40;
330
+ } else t40 = $[87];
331
+ let t41;
332
+ if ($[88] === Symbol.for("react.memo_cache_sentinel")) {
333
+ t41 = /*#__PURE__*/ jsx("div", {
334
+ className: "text-muted-foreground",
335
+ children: "Dirty"
336
+ });
337
+ $[88] = t41;
338
+ } else t41 = $[88];
339
+ let t42;
340
+ if ($[89] !== t40) {
341
+ t42 = /*#__PURE__*/ jsxs("div", {
342
+ className: "text-center p-2 bg-muted rounded",
343
+ children: [
344
+ t40,
345
+ t41
346
+ ]
347
+ });
348
+ $[89] = t40;
349
+ $[90] = t42;
350
+ } else t42 = $[90];
351
+ let t43;
352
+ if ($[91] !== stats.touchedFieldsCount) {
353
+ t43 = /*#__PURE__*/ jsx("div", {
354
+ className: "font-semibold text-lg",
355
+ children: stats.touchedFieldsCount
356
+ });
357
+ $[91] = stats.touchedFieldsCount;
358
+ $[92] = t43;
359
+ } else t43 = $[92];
360
+ let t44;
361
+ if ($[93] === Symbol.for("react.memo_cache_sentinel")) {
362
+ t44 = /*#__PURE__*/ jsx("div", {
363
+ className: "text-muted-foreground",
364
+ children: "Touched"
365
+ });
366
+ $[93] = t44;
367
+ } else t44 = $[93];
368
+ let t45;
369
+ if ($[94] !== t43) {
370
+ t45 = /*#__PURE__*/ jsxs("div", {
371
+ className: "text-center p-2 bg-muted rounded",
372
+ children: [
373
+ t43,
374
+ t44
375
+ ]
376
+ });
377
+ $[94] = t43;
378
+ $[95] = t45;
379
+ } else t45 = $[95];
380
+ let t46;
381
+ if ($[96] !== t36 || $[97] !== t39 || $[98] !== t42 || $[99] !== t45) {
382
+ t46 = /*#__PURE__*/ jsxs("div", {
383
+ className: "grid grid-cols-4 gap-2 text-xs",
384
+ children: [
385
+ t36,
386
+ t39,
387
+ t42,
388
+ t45
389
+ ]
390
+ });
391
+ $[96] = t36;
392
+ $[97] = t39;
393
+ $[98] = t42;
394
+ $[99] = t45;
395
+ $[100] = t46;
396
+ } else t46 = $[100];
397
+ if ($[101] !== t33 || $[102] !== t46) {
398
+ t16 = /*#__PURE__*/ jsxs("div", {
399
+ className: "p-4 border-b",
400
+ children: [
401
+ t33,
402
+ t46
403
+ ]
404
+ });
405
+ $[101] = t33;
406
+ $[102] = t46;
407
+ $[103] = t16;
408
+ } else t16 = $[103];
409
+ T2 = Tabs;
410
+ t11 = activeTab;
411
+ t12 = setActiveTab;
412
+ t13 = "w-full";
413
+ let t47;
414
+ if ($[104] === Symbol.for("react.memo_cache_sentinel")) {
415
+ t47 = /*#__PURE__*/ jsxs(TabsTrigger, {
416
+ value: "values",
417
+ className: "gap-2",
418
+ children: [
419
+ /*#__PURE__*/ jsx(Database, {
420
+ className: "w-4 h-4"
421
+ }),
422
+ "Values"
423
+ ]
424
+ });
425
+ $[104] = t47;
426
+ } else t47 = $[104];
427
+ let t48;
428
+ if ($[105] === Symbol.for("react.memo_cache_sentinel")) {
429
+ t48 = /*#__PURE__*/ jsx(AlertCircle, {
430
+ className: "w-4 h-4"
431
+ });
432
+ $[105] = t48;
433
+ } else t48 = $[105];
434
+ let t49;
435
+ if ($[106] !== stats.errorCount) {
436
+ t49 = stats.errorCount > 0 && /*#__PURE__*/ jsx(Badge, {
437
+ variant: "destructive",
438
+ className: "ml-1 h-5",
439
+ children: stats.errorCount
440
+ });
441
+ $[106] = stats.errorCount;
442
+ $[107] = t49;
443
+ } else t49 = $[107];
444
+ let t50;
445
+ if ($[108] !== t49) {
446
+ t50 = /*#__PURE__*/ jsxs(TabsTrigger, {
447
+ value: "errors",
448
+ className: "gap-2",
449
+ children: [
450
+ t48,
451
+ "Errors",
452
+ t49
453
+ ]
454
+ });
455
+ $[108] = t49;
456
+ $[109] = t50;
457
+ } else t50 = $[109];
458
+ let t51;
459
+ if ($[110] === Symbol.for("react.memo_cache_sentinel")) {
460
+ t51 = /*#__PURE__*/ jsxs(TabsTrigger, {
461
+ value: "state",
462
+ className: "gap-2",
463
+ children: [
464
+ /*#__PURE__*/ jsx(Eye, {
465
+ className: "w-4 h-4"
466
+ }),
467
+ "State"
468
+ ]
469
+ });
470
+ $[110] = t51;
471
+ } else t51 = $[110];
472
+ let t52;
473
+ if ($[111] === Symbol.for("react.memo_cache_sentinel")) {
474
+ t52 = /*#__PURE__*/ jsxs(TabsTrigger, {
475
+ value: "fields",
476
+ className: "gap-2",
477
+ children: [
478
+ /*#__PURE__*/ jsx(FileEdit, {
479
+ className: "w-4 h-4"
480
+ }),
481
+ "Fields"
482
+ ]
483
+ });
484
+ $[111] = t52;
485
+ } else t52 = $[111];
486
+ if ($[112] !== t50) {
487
+ t14 = /*#__PURE__*/ jsxs(TabsList, {
488
+ className: "w-full justify-start rounded-none border-b px-4",
489
+ children: [
490
+ t47,
491
+ t50,
492
+ t51,
493
+ t52
494
+ ]
495
+ });
496
+ $[112] = t50;
497
+ $[113] = t14;
498
+ } else t14 = $[113];
499
+ T1 = ScrollArea;
500
+ t10 = "h-[400px]";
501
+ T0 = TabsContent;
502
+ t8 = "values";
503
+ t9 = "p-4 m-0";
504
+ t6 = "space-y-2";
505
+ if ($[114] === Symbol.for("react.memo_cache_sentinel")) {
506
+ t7 = /*#__PURE__*/ jsx("p", {
507
+ className: "text-sm text-muted-foreground mb-3",
508
+ children: "Current form values (updates in real-time)"
509
+ });
510
+ $[114] = t7;
511
+ } else t7 = $[114];
512
+ t4 = "text-xs bg-muted p-4 rounded overflow-auto";
513
+ t5 = JSON.stringify(values, null, 2);
514
+ }
515
+ $[0] = activeTab;
516
+ $[1] = className;
517
+ $[2] = compact;
518
+ $[3] = formState.dirtyFields;
519
+ $[4] = formState.errors;
520
+ $[5] = formState.isDirty;
521
+ $[6] = formState.isSubmitting;
522
+ $[7] = formState.isValid;
523
+ $[8] = formState.isValidating;
524
+ $[9] = formState.submitCount;
525
+ $[10] = formState.touchedFields;
526
+ $[11] = title;
527
+ $[12] = watch;
528
+ $[13] = T0;
529
+ $[14] = T1;
530
+ $[15] = T2;
531
+ $[16] = T3;
532
+ $[17] = stats;
533
+ $[18] = t10;
534
+ $[19] = t11;
535
+ $[20] = t12;
536
+ $[21] = t13;
537
+ $[22] = t14;
538
+ $[23] = t15;
539
+ $[24] = t16;
540
+ $[25] = t17;
541
+ $[26] = t4;
542
+ $[27] = t5;
543
+ $[28] = t6;
544
+ $[29] = t7;
545
+ $[30] = t8;
546
+ $[31] = t9;
547
+ } else {
548
+ T0 = $[13];
549
+ T1 = $[14];
550
+ T2 = $[15];
551
+ T3 = $[16];
552
+ stats = $[17];
553
+ t10 = $[18];
554
+ t11 = $[19];
555
+ t12 = $[20];
556
+ t13 = $[21];
557
+ t14 = $[22];
558
+ t15 = $[23];
559
+ t16 = $[24];
560
+ t17 = $[25];
561
+ t4 = $[26];
562
+ t5 = $[27];
563
+ t6 = $[28];
564
+ t7 = $[29];
565
+ t8 = $[30];
566
+ t9 = $[31];
567
+ }
568
+ if (t17 !== Symbol.for("react.early_return_sentinel")) return t17;
569
+ let t18;
570
+ if ($[115] !== t4 || $[116] !== t5) {
571
+ t18 = /*#__PURE__*/ jsx("pre", {
572
+ className: t4,
573
+ children: t5
574
+ });
575
+ $[115] = t4;
576
+ $[116] = t5;
577
+ $[117] = t18;
578
+ } else t18 = $[117];
579
+ let t19;
580
+ if ($[118] !== t18 || $[119] !== t6 || $[120] !== t7) {
581
+ t19 = /*#__PURE__*/ jsxs("div", {
582
+ className: t6,
583
+ children: [
584
+ t7,
585
+ t18
586
+ ]
587
+ });
588
+ $[118] = t18;
589
+ $[119] = t6;
590
+ $[120] = t7;
591
+ $[121] = t19;
592
+ } else t19 = $[121];
593
+ let t20;
594
+ if ($[122] !== T0 || $[123] !== t19 || $[124] !== t8 || $[125] !== t9) {
595
+ t20 = /*#__PURE__*/ jsx(T0, {
596
+ value: t8,
597
+ className: t9,
598
+ children: t19
599
+ });
600
+ $[122] = T0;
601
+ $[123] = t19;
602
+ $[124] = t8;
603
+ $[125] = t9;
604
+ $[126] = t20;
605
+ } else t20 = $[126];
606
+ let t21;
607
+ if ($[127] === Symbol.for("react.memo_cache_sentinel")) {
608
+ t21 = /*#__PURE__*/ jsx("p", {
609
+ className: "text-sm text-muted-foreground mb-3",
610
+ children: "Validation errors from Zod schema"
611
+ });
612
+ $[127] = t21;
613
+ } else t21 = $[127];
614
+ let t22;
615
+ if ($[128] !== formState.errors) {
616
+ t22 = /*#__PURE__*/ jsx(TabsContent, {
617
+ value: "errors",
618
+ className: "p-4 m-0",
619
+ children: /*#__PURE__*/ jsxs("div", {
620
+ className: "space-y-3",
621
+ children: [
622
+ t21,
623
+ 0 === Object.keys(formState.errors).length ? /*#__PURE__*/ jsxs("div", {
624
+ className: "flex items-center gap-2 p-4 bg-green-50 dark:bg-green-900/10 rounded text-green-700 dark:text-green-400",
625
+ children: [
626
+ /*#__PURE__*/ jsx(CheckCircle2, {
627
+ className: "w-5 h-5"
356
628
  }),
357
- /*#__PURE__*/ jsx(TabsContent, {
358
- value: "fields",
359
- className: "p-4 m-0",
360
- children: /*#__PURE__*/ jsxs("div", {
361
- className: "space-y-3",
362
- children: [
363
- /*#__PURE__*/ jsx("p", {
364
- className: "text-sm text-muted-foreground mb-3",
365
- children: "Field-level state tracking"
366
- }),
367
- /*#__PURE__*/ jsxs("div", {
368
- className: "space-y-4",
369
- children: [
370
- /*#__PURE__*/ jsxs("div", {
371
- children: [
372
- /*#__PURE__*/ jsxs("h4", {
373
- className: "text-sm font-semibold mb-2 flex items-center gap-2",
374
- children: [
375
- /*#__PURE__*/ jsx(FileEdit, {
376
- className: "w-4 h-4"
377
- }),
378
- "Dirty Fields (",
379
- stats.dirtyFieldsCount,
380
- ")"
381
- ]
382
- }),
383
- 0 === Object.keys(formState.dirtyFields).length ? /*#__PURE__*/ jsx("div", {
384
- className: "text-sm text-muted-foreground italic p-2 bg-muted rounded",
385
- children: "No fields modified yet"
386
- }) : /*#__PURE__*/ jsx("div", {
387
- className: "flex flex-wrap gap-2",
388
- children: Object.keys(formState.dirtyFields).map((field)=>/*#__PURE__*/ jsx(Badge, {
389
- variant: "secondary",
390
- children: field
391
- }, field))
392
- })
393
- ]
394
- }),
395
- /*#__PURE__*/ jsxs("div", {
396
- children: [
397
- /*#__PURE__*/ jsxs("h4", {
398
- className: "text-sm font-semibold mb-2 flex items-center gap-2",
399
- children: [
400
- /*#__PURE__*/ jsx(Eye, {
401
- className: "w-4 h-4"
402
- }),
403
- "Touched Fields (",
404
- stats.touchedFieldsCount,
405
- ")"
406
- ]
407
- }),
408
- 0 === Object.keys(formState.touchedFields).length ? /*#__PURE__*/ jsx("div", {
409
- className: "text-sm text-muted-foreground italic p-2 bg-muted rounded",
410
- children: "No fields touched yet"
411
- }) : /*#__PURE__*/ jsx("div", {
412
- className: "flex flex-wrap gap-2",
413
- children: Object.keys(formState.touchedFields).map((field)=>/*#__PURE__*/ jsx(Badge, {
414
- variant: "outline",
415
- children: field
416
- }, field))
417
- })
418
- ]
419
- })
420
- ]
421
- })
422
- ]
423
- })
629
+ /*#__PURE__*/ jsx("span", {
630
+ className: "text-sm font-medium",
631
+ children: "No validation errors"
424
632
  })
425
633
  ]
634
+ }) : /*#__PURE__*/ jsx("div", {
635
+ className: "space-y-2",
636
+ children: Object.entries(formState.errors).map(_temp)
426
637
  })
427
638
  ]
428
639
  })
429
- ]
430
- });
431
- }
432
- function StateItem({ label, value, type = 'boolean' }) {
433
- return /*#__PURE__*/ jsxs("div", {
434
- className: "flex items-center justify-between p-2 bg-muted rounded",
435
- children: [
436
- /*#__PURE__*/ jsx("span", {
437
- className: "text-sm font-medium",
438
- children: label
439
- }),
440
- 'boolean' === type ? value ? /*#__PURE__*/ jsxs(Badge, {
441
- variant: "default",
442
- className: "bg-green-600",
640
+ });
641
+ $[128] = formState.errors;
642
+ $[129] = t22;
643
+ } else t22 = $[129];
644
+ let t23;
645
+ if ($[130] === Symbol.for("react.memo_cache_sentinel")) {
646
+ t23 = /*#__PURE__*/ jsx("p", {
647
+ className: "text-sm text-muted-foreground mb-3",
648
+ children: "React Hook Form internal state"
649
+ });
650
+ $[130] = t23;
651
+ } else t23 = $[130];
652
+ let t24;
653
+ if ($[131] !== stats.isValid) {
654
+ t24 = /*#__PURE__*/ jsx(StateItem, {
655
+ label: "Is Valid",
656
+ value: stats.isValid
657
+ });
658
+ $[131] = stats.isValid;
659
+ $[132] = t24;
660
+ } else t24 = $[132];
661
+ let t25;
662
+ if ($[133] !== stats.isDirty) {
663
+ t25 = /*#__PURE__*/ jsx(StateItem, {
664
+ label: "Is Dirty",
665
+ value: stats.isDirty
666
+ });
667
+ $[133] = stats.isDirty;
668
+ $[134] = t25;
669
+ } else t25 = $[134];
670
+ let t26;
671
+ if ($[135] !== stats.isSubmitting) {
672
+ t26 = /*#__PURE__*/ jsx(StateItem, {
673
+ label: "Is Submitting",
674
+ value: stats.isSubmitting
675
+ });
676
+ $[135] = stats.isSubmitting;
677
+ $[136] = t26;
678
+ } else t26 = $[136];
679
+ let t27;
680
+ if ($[137] !== stats.isValidating) {
681
+ t27 = /*#__PURE__*/ jsx(StateItem, {
682
+ label: "Is Validating",
683
+ value: stats.isValidating
684
+ });
685
+ $[137] = stats.isValidating;
686
+ $[138] = t27;
687
+ } else t27 = $[138];
688
+ let t28;
689
+ if ($[139] !== formState.isSubmitted) {
690
+ t28 = /*#__PURE__*/ jsx(StateItem, {
691
+ label: "Is Submitted",
692
+ value: formState.isSubmitted
693
+ });
694
+ $[139] = formState.isSubmitted;
695
+ $[140] = t28;
696
+ } else t28 = $[140];
697
+ let t29;
698
+ if ($[141] !== formState.isSubmitSuccessful) {
699
+ t29 = /*#__PURE__*/ jsx(StateItem, {
700
+ label: "Is Submit Successful",
701
+ value: formState.isSubmitSuccessful
702
+ });
703
+ $[141] = formState.isSubmitSuccessful;
704
+ $[142] = t29;
705
+ } else t29 = $[142];
706
+ let t30;
707
+ if ($[143] !== stats.submitCount) {
708
+ t30 = /*#__PURE__*/ jsx(StateItem, {
709
+ label: "Submit Count",
710
+ value: stats.submitCount,
711
+ type: "number"
712
+ });
713
+ $[143] = stats.submitCount;
714
+ $[144] = t30;
715
+ } else t30 = $[144];
716
+ let t31;
717
+ if ($[145] !== t24 || $[146] !== t25 || $[147] !== t26 || $[148] !== t27 || $[149] !== t28 || $[150] !== t29 || $[151] !== t30) {
718
+ t31 = /*#__PURE__*/ jsx(TabsContent, {
719
+ value: "state",
720
+ className: "p-4 m-0",
721
+ children: /*#__PURE__*/ jsxs("div", {
722
+ className: "space-y-3",
443
723
  children: [
444
- /*#__PURE__*/ jsx(CheckCircle2, {
445
- className: "w-3 h-3 mr-1"
446
- }),
447
- "True"
724
+ t23,
725
+ /*#__PURE__*/ jsxs("div", {
726
+ className: "space-y-2",
727
+ children: [
728
+ t24,
729
+ t25,
730
+ t26,
731
+ t27,
732
+ t28,
733
+ t29,
734
+ t30
735
+ ]
736
+ })
448
737
  ]
449
- }) : /*#__PURE__*/ jsxs(Badge, {
450
- variant: "secondary",
738
+ })
739
+ });
740
+ $[145] = t24;
741
+ $[146] = t25;
742
+ $[147] = t26;
743
+ $[148] = t27;
744
+ $[149] = t28;
745
+ $[150] = t29;
746
+ $[151] = t30;
747
+ $[152] = t31;
748
+ } else t31 = $[152];
749
+ let t32;
750
+ if ($[153] === Symbol.for("react.memo_cache_sentinel")) {
751
+ t32 = /*#__PURE__*/ jsx("p", {
752
+ className: "text-sm text-muted-foreground mb-3",
753
+ children: "Field-level state tracking"
754
+ });
755
+ $[153] = t32;
756
+ } else t32 = $[153];
757
+ let t33;
758
+ if ($[154] === Symbol.for("react.memo_cache_sentinel")) {
759
+ t33 = /*#__PURE__*/ jsx(FileEdit, {
760
+ className: "w-4 h-4"
761
+ });
762
+ $[154] = t33;
763
+ } else t33 = $[154];
764
+ let t34;
765
+ if ($[155] !== stats.dirtyFieldsCount) {
766
+ t34 = /*#__PURE__*/ jsxs("h4", {
767
+ className: "text-sm font-semibold mb-2 flex items-center gap-2",
768
+ children: [
769
+ t33,
770
+ "Dirty Fields (",
771
+ stats.dirtyFieldsCount,
772
+ ")"
773
+ ]
774
+ });
775
+ $[155] = stats.dirtyFieldsCount;
776
+ $[156] = t34;
777
+ } else t34 = $[156];
778
+ let t35;
779
+ if ($[157] !== formState.dirtyFields) {
780
+ t35 = 0 === Object.keys(formState.dirtyFields).length ? /*#__PURE__*/ jsx("div", {
781
+ className: "text-sm text-muted-foreground italic p-2 bg-muted rounded",
782
+ children: "No fields modified yet"
783
+ }) : /*#__PURE__*/ jsx("div", {
784
+ className: "flex flex-wrap gap-2",
785
+ children: Object.keys(formState.dirtyFields).map(_temp2)
786
+ });
787
+ $[157] = formState.dirtyFields;
788
+ $[158] = t35;
789
+ } else t35 = $[158];
790
+ let t36;
791
+ if ($[159] !== t34 || $[160] !== t35) {
792
+ t36 = /*#__PURE__*/ jsxs("div", {
793
+ children: [
794
+ t34,
795
+ t35
796
+ ]
797
+ });
798
+ $[159] = t34;
799
+ $[160] = t35;
800
+ $[161] = t36;
801
+ } else t36 = $[161];
802
+ let t37;
803
+ if ($[162] === Symbol.for("react.memo_cache_sentinel")) {
804
+ t37 = /*#__PURE__*/ jsx(Eye, {
805
+ className: "w-4 h-4"
806
+ });
807
+ $[162] = t37;
808
+ } else t37 = $[162];
809
+ let t38;
810
+ if ($[163] !== stats.touchedFieldsCount) {
811
+ t38 = /*#__PURE__*/ jsxs("h4", {
812
+ className: "text-sm font-semibold mb-2 flex items-center gap-2",
813
+ children: [
814
+ t37,
815
+ "Touched Fields (",
816
+ stats.touchedFieldsCount,
817
+ ")"
818
+ ]
819
+ });
820
+ $[163] = stats.touchedFieldsCount;
821
+ $[164] = t38;
822
+ } else t38 = $[164];
823
+ let t39;
824
+ if ($[165] !== formState.touchedFields) {
825
+ t39 = 0 === Object.keys(formState.touchedFields).length ? /*#__PURE__*/ jsx("div", {
826
+ className: "text-sm text-muted-foreground italic p-2 bg-muted rounded",
827
+ children: "No fields touched yet"
828
+ }) : /*#__PURE__*/ jsx("div", {
829
+ className: "flex flex-wrap gap-2",
830
+ children: Object.keys(formState.touchedFields).map(_temp3)
831
+ });
832
+ $[165] = formState.touchedFields;
833
+ $[166] = t39;
834
+ } else t39 = $[166];
835
+ let t40;
836
+ if ($[167] !== t38 || $[168] !== t39) {
837
+ t40 = /*#__PURE__*/ jsxs("div", {
838
+ children: [
839
+ t38,
840
+ t39
841
+ ]
842
+ });
843
+ $[167] = t38;
844
+ $[168] = t39;
845
+ $[169] = t40;
846
+ } else t40 = $[169];
847
+ let t41;
848
+ if ($[170] !== t36 || $[171] !== t40) {
849
+ t41 = /*#__PURE__*/ jsx(TabsContent, {
850
+ value: "fields",
851
+ className: "p-4 m-0",
852
+ children: /*#__PURE__*/ jsxs("div", {
853
+ className: "space-y-3",
451
854
  children: [
452
- /*#__PURE__*/ jsx(XCircle, {
453
- className: "w-3 h-3 mr-1"
454
- }),
455
- "False"
855
+ t32,
856
+ /*#__PURE__*/ jsxs("div", {
857
+ className: "space-y-4",
858
+ children: [
859
+ t36,
860
+ t40
861
+ ]
862
+ })
456
863
  ]
457
- }) : /*#__PURE__*/ jsx(Badge, {
458
- variant: "outline",
459
- children: value
460
864
  })
461
- ]
462
- });
865
+ });
866
+ $[170] = t36;
867
+ $[171] = t40;
868
+ $[172] = t41;
869
+ } else t41 = $[172];
870
+ let t42;
871
+ if ($[173] !== T1 || $[174] !== t10 || $[175] !== t20 || $[176] !== t22 || $[177] !== t31 || $[178] !== t41) {
872
+ t42 = /*#__PURE__*/ jsxs(T1, {
873
+ className: t10,
874
+ children: [
875
+ t20,
876
+ t22,
877
+ t31,
878
+ t41
879
+ ]
880
+ });
881
+ $[173] = T1;
882
+ $[174] = t10;
883
+ $[175] = t20;
884
+ $[176] = t22;
885
+ $[177] = t31;
886
+ $[178] = t41;
887
+ $[179] = t42;
888
+ } else t42 = $[179];
889
+ let t43;
890
+ if ($[180] !== T2 || $[181] !== t11 || $[182] !== t12 || $[183] !== t13 || $[184] !== t14 || $[185] !== t42) {
891
+ t43 = /*#__PURE__*/ jsxs(T2, {
892
+ value: t11,
893
+ onValueChange: t12,
894
+ className: t13,
895
+ children: [
896
+ t14,
897
+ t42
898
+ ]
899
+ });
900
+ $[180] = T2;
901
+ $[181] = t11;
902
+ $[182] = t12;
903
+ $[183] = t13;
904
+ $[184] = t14;
905
+ $[185] = t42;
906
+ $[186] = t43;
907
+ } else t43 = $[186];
908
+ let t44;
909
+ if ($[187] !== T3 || $[188] !== t15 || $[189] !== t16 || $[190] !== t43) {
910
+ t44 = /*#__PURE__*/ jsxs(T3, {
911
+ className: t15,
912
+ children: [
913
+ t16,
914
+ t43
915
+ ]
916
+ });
917
+ $[187] = T3;
918
+ $[188] = t15;
919
+ $[189] = t16;
920
+ $[190] = t43;
921
+ $[191] = t44;
922
+ } else t44 = $[191];
923
+ return t44;
924
+ }
925
+ function _temp3(field_1) {
926
+ return /*#__PURE__*/ jsx(Badge, {
927
+ variant: "outline",
928
+ children: field_1
929
+ }, field_1);
930
+ }
931
+ function _temp2(field_0) {
932
+ return /*#__PURE__*/ jsx(Badge, {
933
+ variant: "secondary",
934
+ children: field_0
935
+ }, field_0);
936
+ }
937
+ function _temp(t0) {
938
+ const [field, error] = t0;
939
+ return /*#__PURE__*/ jsx("div", {
940
+ className: "p-3 bg-destructive/10 rounded border border-destructive/20",
941
+ children: /*#__PURE__*/ jsxs("div", {
942
+ className: "flex items-start gap-2",
943
+ children: [
944
+ /*#__PURE__*/ jsx(XCircle, {
945
+ className: "w-4 h-4 text-destructive mt-0.5"
946
+ }),
947
+ /*#__PURE__*/ jsxs("div", {
948
+ className: "flex-1",
949
+ children: [
950
+ /*#__PURE__*/ jsx("div", {
951
+ className: "font-mono text-sm font-semibold",
952
+ children: field
953
+ }),
954
+ /*#__PURE__*/ jsx("div", {
955
+ className: "text-sm text-muted-foreground mt-1",
956
+ children: error?.message || "Invalid value"
957
+ })
958
+ ]
959
+ })
960
+ ]
961
+ })
962
+ }, field);
963
+ }
964
+ function StateItem(t0) {
965
+ const $ = c(8);
966
+ const { label, value, type: t1 } = t0;
967
+ const type = void 0 === t1 ? "boolean" : t1;
968
+ let t2;
969
+ if ($[0] !== label) {
970
+ t2 = /*#__PURE__*/ jsx("span", {
971
+ className: "text-sm font-medium",
972
+ children: label
973
+ });
974
+ $[0] = label;
975
+ $[1] = t2;
976
+ } else t2 = $[1];
977
+ let t3;
978
+ if ($[2] !== type || $[3] !== value) {
979
+ t3 = "boolean" === type ? value ? /*#__PURE__*/ jsxs(Badge, {
980
+ variant: "default",
981
+ className: "bg-green-600",
982
+ children: [
983
+ /*#__PURE__*/ jsx(CheckCircle2, {
984
+ className: "w-3 h-3 mr-1"
985
+ }),
986
+ "True"
987
+ ]
988
+ }) : /*#__PURE__*/ jsxs(Badge, {
989
+ variant: "secondary",
990
+ children: [
991
+ /*#__PURE__*/ jsx(XCircle, {
992
+ className: "w-3 h-3 mr-1"
993
+ }),
994
+ "False"
995
+ ]
996
+ }) : /*#__PURE__*/ jsx(Badge, {
997
+ variant: "outline",
998
+ children: value
999
+ });
1000
+ $[2] = type;
1001
+ $[3] = value;
1002
+ $[4] = t3;
1003
+ } else t3 = $[4];
1004
+ let t4;
1005
+ if ($[5] !== t2 || $[6] !== t3) {
1006
+ t4 = /*#__PURE__*/ jsxs("div", {
1007
+ className: "flex items-center justify-between p-2 bg-muted rounded",
1008
+ children: [
1009
+ t2,
1010
+ t3
1011
+ ]
1012
+ });
1013
+ $[5] = t2;
1014
+ $[6] = t3;
1015
+ $[7] = t4;
1016
+ } else t4 = $[7];
1017
+ return t4;
463
1018
  }
464
1019
  export { FormStateViewer };