@genfeedai/workflow-ui 0.1.3 → 0.1.4

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 (84) hide show
  1. package/dist/canvas.d.mts +16 -2
  2. package/dist/canvas.mjs +10 -8
  3. package/dist/chunk-6PSJTBNV.mjs +638 -0
  4. package/dist/chunk-7H3WJJYS.mjs +52 -0
  5. package/dist/{chunk-HCXI63ME.mjs → chunk-AUQGOJOQ.mjs} +27 -4
  6. package/dist/{chunk-AOTUCJMA.mjs → chunk-GWBGK3KL.mjs} +2 -2
  7. package/dist/chunk-JTPADIUO.mjs +130 -0
  8. package/dist/{chunk-SQK4JDYY.mjs → chunk-LT3ZJJL6.mjs} +9 -2
  9. package/dist/{chunk-7P2JWDC7.mjs → chunk-O5II6BOJ.mjs} +1198 -254
  10. package/dist/{chunk-AUZR6REQ.mjs → chunk-OQREHJXK.mjs} +1 -1
  11. package/dist/chunk-OY7BRSGG.mjs +60 -0
  12. package/dist/{chunk-E3YBVMYZ.mjs → chunk-PANZDSP6.mjs} +274 -305
  13. package/dist/chunk-PCIWWD37.mjs +90 -0
  14. package/dist/{chunk-RIGVIEYB.mjs → chunk-R727OFBR.mjs} +11 -1
  15. package/dist/chunk-ZD2BADZO.mjs +1294 -0
  16. package/dist/contextMenuStore-DMg0hJQ1.d.mts +22 -0
  17. package/dist/hooks.d.mts +53 -244
  18. package/dist/hooks.mjs +6 -6
  19. package/dist/index.d.mts +11 -7
  20. package/dist/index.mjs +13 -11
  21. package/dist/lib.d.mts +250 -4
  22. package/dist/lib.mjs +562 -2
  23. package/dist/nodes.d.mts +3 -1
  24. package/dist/nodes.mjs +6 -6
  25. package/dist/panels.mjs +3 -4
  26. package/dist/{promptLibraryStore-zqb59nsu.d.mts → promptLibraryStore-Bgw5LzvD.d.mts} +33 -5
  27. package/dist/provider.d.mts +2 -2
  28. package/dist/provider.mjs +0 -1
  29. package/dist/stores.d.mts +4 -3
  30. package/dist/stores.mjs +3 -40
  31. package/dist/toolbar.d.mts +3 -1
  32. package/dist/toolbar.mjs +5 -4
  33. package/dist/{types-ipAnBzAJ.d.mts → types-CF6DPx0P.d.mts} +8 -3
  34. package/dist/ui.d.mts +1 -1
  35. package/dist/ui.mjs +0 -1
  36. package/dist/{hooks.d.ts → useCommentNavigation-NzJjkaj2.d.mts} +15 -2
  37. package/dist/workflowStore-UAAKOOIK.mjs +2 -0
  38. package/package.json +30 -24
  39. package/dist/canvas.d.ts +0 -27
  40. package/dist/canvas.js +0 -45
  41. package/dist/chunk-3SPPKCWR.js +0 -458
  42. package/dist/chunk-3TMV3K34.js +0 -534
  43. package/dist/chunk-3YFFDHC5.js +0 -300
  44. package/dist/chunk-4MZ62VMF.js +0 -37
  45. package/dist/chunk-5HJFQVUR.js +0 -61
  46. package/dist/chunk-5LQ4QBR5.js +0 -2
  47. package/dist/chunk-6DOEUDD5.js +0 -254
  48. package/dist/chunk-AXFOCPPP.js +0 -998
  49. package/dist/chunk-BMFRA6GK.js +0 -1546
  50. package/dist/chunk-E323WAZG.mjs +0 -272
  51. package/dist/chunk-ECD5J2BA.js +0 -6022
  52. package/dist/chunk-EMGXUNBL.js +0 -120
  53. package/dist/chunk-EMUMKW5C.js +0 -107
  54. package/dist/chunk-FOMOOERN.js +0 -2
  55. package/dist/chunk-IASLG6IA.mjs +0 -118
  56. package/dist/chunk-IHF35QZD.js +0 -1095
  57. package/dist/chunk-JLWKW3G5.js +0 -2
  58. package/dist/chunk-KDIWRSYV.js +0 -375
  59. package/dist/chunk-L5TF4EHW.mjs +0 -1
  60. package/dist/chunk-RJ262NXS.js +0 -24
  61. package/dist/chunk-RXNEDWK2.js +0 -141
  62. package/dist/chunk-SEV2DWKF.js +0 -744
  63. package/dist/chunk-ZJWP5KGZ.mjs +0 -33
  64. package/dist/hooks.js +0 -56
  65. package/dist/index.d.ts +0 -29
  66. package/dist/index.js +0 -180
  67. package/dist/lib.d.ts +0 -164
  68. package/dist/lib.js +0 -144
  69. package/dist/nodes.d.ts +0 -128
  70. package/dist/nodes.js +0 -151
  71. package/dist/panels.d.ts +0 -22
  72. package/dist/panels.js +0 -21
  73. package/dist/promptLibraryStore-BZnfmEkc.d.ts +0 -464
  74. package/dist/provider.d.ts +0 -29
  75. package/dist/provider.js +0 -17
  76. package/dist/stores.d.ts +0 -96
  77. package/dist/stores.js +0 -113
  78. package/dist/toolbar.d.ts +0 -73
  79. package/dist/toolbar.js +0 -34
  80. package/dist/types-ipAnBzAJ.d.ts +0 -46
  81. package/dist/ui.d.ts +0 -67
  82. package/dist/ui.js +0 -84
  83. package/dist/workflowStore-7SDJC4UR.mjs +0 -3
  84. package/dist/workflowStore-LNJQ5RZG.js +0 -12
@@ -1,458 +0,0 @@
1
- 'use strict';
2
-
3
- var chunk5HJFQVUR_js = require('./chunk-5HJFQVUR.js');
4
- var CheckboxPrimitive = require('@radix-ui/react-checkbox');
5
- var lucideReact = require('lucide-react');
6
- var jsxRuntime = require('react/jsx-runtime');
7
- var SelectPrimitive = require('@radix-ui/react-select');
8
- var React = require('react');
9
- var SliderPrimitive = require('@radix-ui/react-slider');
10
- var LabelPrimitive = require('@radix-ui/react-label');
11
-
12
- function _interopNamespace(e) {
13
- if (e && e.__esModule) return e;
14
- var n = Object.create(null);
15
- if (e) {
16
- Object.keys(e).forEach(function (k) {
17
- if (k !== 'default') {
18
- var d = Object.getOwnPropertyDescriptor(e, k);
19
- Object.defineProperty(n, k, d.get ? d : {
20
- enumerable: true,
21
- get: function () { return e[k]; }
22
- });
23
- }
24
- });
25
- }
26
- n.default = e;
27
- return Object.freeze(n);
28
- }
29
-
30
- var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
31
- var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
32
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
33
- var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
34
- var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
35
-
36
- function Checkbox({ className, ...props }) {
37
- return /* @__PURE__ */ jsxRuntime.jsx(
38
- CheckboxPrimitive__namespace.Root,
39
- {
40
- "data-slot": "checkbox",
41
- className: chunk5HJFQVUR_js.cn(
42
- "peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
43
- className
44
- ),
45
- ...props,
46
- children: /* @__PURE__ */ jsxRuntime.jsx(
47
- CheckboxPrimitive__namespace.Indicator,
48
- {
49
- "data-slot": "checkbox-indicator",
50
- className: "grid place-content-center text-current transition-none",
51
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "size-3.5" })
52
- }
53
- )
54
- }
55
- );
56
- }
57
- function Select({ ...props }) {
58
- return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Root, { "data-slot": "select", ...props });
59
- }
60
- function SelectGroup({ ...props }) {
61
- return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Group, { "data-slot": "select-group", ...props });
62
- }
63
- function SelectValue({ ...props }) {
64
- return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Value, { "data-slot": "select-value", ...props });
65
- }
66
- function SelectTrigger({
67
- className,
68
- size = "default",
69
- children,
70
- ...props
71
- }) {
72
- return /* @__PURE__ */ jsxRuntime.jsxs(
73
- SelectPrimitive__namespace.Trigger,
74
- {
75
- "data-slot": "select-trigger",
76
- "data-size": size,
77
- className: chunk5HJFQVUR_js.cn(
78
- "border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
79
- className
80
- ),
81
- ...props,
82
- children: [
83
- children,
84
- /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4 opacity-50" }) })
85
- ]
86
- }
87
- );
88
- }
89
- function SelectContent({
90
- className,
91
- children,
92
- position = "item-aligned",
93
- align = "center",
94
- ...props
95
- }) {
96
- return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
97
- SelectPrimitive__namespace.Content,
98
- {
99
- "data-slot": "select-content",
100
- className: chunk5HJFQVUR_js.cn(
101
- "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
102
- position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
103
- className
104
- ),
105
- position,
106
- align,
107
- ...props,
108
- children: [
109
- /* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
110
- /* @__PURE__ */ jsxRuntime.jsx(
111
- SelectPrimitive__namespace.Viewport,
112
- {
113
- className: chunk5HJFQVUR_js.cn(
114
- "p-1",
115
- position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
116
- ),
117
- children
118
- }
119
- ),
120
- /* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
121
- ]
122
- }
123
- ) });
124
- }
125
- function SelectLabel({ className, ...props }) {
126
- return /* @__PURE__ */ jsxRuntime.jsx(
127
- SelectPrimitive__namespace.Label,
128
- {
129
- "data-slot": "select-label",
130
- className: chunk5HJFQVUR_js.cn("text-muted-foreground px-2 py-1.5 text-xs", className),
131
- ...props
132
- }
133
- );
134
- }
135
- function SelectItem({
136
- className,
137
- children,
138
- ...props
139
- }) {
140
- return /* @__PURE__ */ jsxRuntime.jsxs(
141
- SelectPrimitive__namespace.Item,
142
- {
143
- "data-slot": "select-item",
144
- className: chunk5HJFQVUR_js.cn(
145
- "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
146
- className
147
- ),
148
- ...props,
149
- children: [
150
- /* @__PURE__ */ jsxRuntime.jsx(
151
- "span",
152
- {
153
- "data-slot": "select-item-indicator",
154
- className: "absolute right-2 flex size-3.5 items-center justify-center",
155
- children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "size-4" }) })
156
- }
157
- ),
158
- /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children })
159
- ]
160
- }
161
- );
162
- }
163
- function SelectSeparator({
164
- className,
165
- ...props
166
- }) {
167
- return /* @__PURE__ */ jsxRuntime.jsx(
168
- SelectPrimitive__namespace.Separator,
169
- {
170
- "data-slot": "select-separator",
171
- className: chunk5HJFQVUR_js.cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
172
- ...props
173
- }
174
- );
175
- }
176
- function SelectScrollUpButton({
177
- className,
178
- ...props
179
- }) {
180
- return /* @__PURE__ */ jsxRuntime.jsx(
181
- SelectPrimitive__namespace.ScrollUpButton,
182
- {
183
- "data-slot": "select-scroll-up-button",
184
- className: chunk5HJFQVUR_js.cn("flex cursor-default items-center justify-center py-1", className),
185
- ...props,
186
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUpIcon, { className: "size-4" })
187
- }
188
- );
189
- }
190
- function SelectScrollDownButton({
191
- className,
192
- ...props
193
- }) {
194
- return /* @__PURE__ */ jsxRuntime.jsx(
195
- SelectPrimitive__namespace.ScrollDownButton,
196
- {
197
- "data-slot": "select-scroll-down-button",
198
- className: chunk5HJFQVUR_js.cn("flex cursor-default items-center justify-center py-1", className),
199
- ...props,
200
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4" })
201
- }
202
- );
203
- }
204
- function Slider({
205
- className,
206
- defaultValue,
207
- value,
208
- min = 0,
209
- max = 100,
210
- ...props
211
- }) {
212
- const _values = React__namespace.useMemo(
213
- () => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
214
- [value, defaultValue, min, max]
215
- );
216
- return /* @__PURE__ */ jsxRuntime.jsxs(
217
- SliderPrimitive__namespace.Root,
218
- {
219
- "data-slot": "slider",
220
- defaultValue,
221
- value,
222
- min,
223
- max,
224
- className: chunk5HJFQVUR_js.cn(
225
- "relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
226
- className
227
- ),
228
- ...props,
229
- children: [
230
- /* @__PURE__ */ jsxRuntime.jsx(
231
- SliderPrimitive__namespace.Track,
232
- {
233
- "data-slot": "slider-track",
234
- className: chunk5HJFQVUR_js.cn(
235
- "bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
236
- ),
237
- children: /* @__PURE__ */ jsxRuntime.jsx(
238
- SliderPrimitive__namespace.Range,
239
- {
240
- "data-slot": "slider-range",
241
- className: chunk5HJFQVUR_js.cn(
242
- "bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
243
- )
244
- }
245
- )
246
- }
247
- ),
248
- Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsxRuntime.jsx(
249
- SliderPrimitive__namespace.Thumb,
250
- {
251
- "data-slot": "slider-thumb",
252
- className: "border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
253
- },
254
- index
255
- ))
256
- ]
257
- }
258
- );
259
- }
260
- function Label2({ className, ...props }) {
261
- return /* @__PURE__ */ jsxRuntime.jsx(
262
- LabelPrimitive__namespace.Root,
263
- {
264
- "data-slot": "label",
265
- className: chunk5HJFQVUR_js.cn(
266
- "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
267
- className
268
- ),
269
- ...props
270
- }
271
- );
272
- }
273
- function Input({ className, type, ...props }) {
274
- return /* @__PURE__ */ jsxRuntime.jsx(
275
- "input",
276
- {
277
- type,
278
- "data-slot": "input",
279
- className: chunk5HJFQVUR_js.cn(
280
- "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
281
- "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
282
- "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
283
- className
284
- ),
285
- ...props
286
- }
287
- );
288
- }
289
- var GRID_POSITIONS = [
290
- { x: 0, y: 0 },
291
- { x: 0.5, y: 0 },
292
- { x: 1, y: 0 },
293
- { x: 0, y: 0.5 },
294
- { x: 0.5, y: 0.5 },
295
- { x: 1, y: 0.5 },
296
- { x: 0, y: 1 },
297
- { x: 0.5, y: 1 },
298
- { x: 1, y: 1 }
299
- ];
300
- var X_LABELS = { 0: "left", 0.5: "center", 1: "right" };
301
- var Y_LABELS = { 0: "top", 0.5: "middle", 1: "bottom" };
302
- function getPositionTitle(pos) {
303
- return `Position: ${X_LABELS[pos.x] ?? "center"}, ${Y_LABELS[pos.y] ?? "middle"}`;
304
- }
305
- function GridPositionSelectorComponent({
306
- position,
307
- onPositionChange,
308
- className
309
- }) {
310
- const isSelected = React.useCallback(
311
- (pos) => Math.abs(pos.x - position.x) < 0.01 && Math.abs(pos.y - position.y) < 0.01,
312
- [position]
313
- );
314
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk5HJFQVUR_js.cn("space-y-1.5", className), children: [
315
- /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-xs text-muted-foreground", children: "Content Position" }),
316
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1 p-2 bg-background border border-input rounded-md", children: GRID_POSITIONS.map((pos, idx) => /* @__PURE__ */ jsxRuntime.jsx(
317
- "button",
318
- {
319
- type: "button",
320
- onClick: () => onPositionChange(pos),
321
- className: chunk5HJFQVUR_js.cn(
322
- "w-5 h-5 rounded-sm border transition-all",
323
- isSelected(pos) ? "bg-primary border-primary" : "bg-secondary border-input hover:border-primary"
324
- ),
325
- title: getPositionTitle(pos)
326
- },
327
- idx
328
- )) }),
329
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground", children: "Where original content appears in the new frame" })
330
- ] });
331
- }
332
- var GridPositionSelector = React.memo(GridPositionSelectorComponent);
333
- function ComparisonSliderComponent({
334
- beforeSrc,
335
- afterSrc,
336
- beforeLabel = "Before",
337
- afterLabel = "After",
338
- position,
339
- onPositionChange,
340
- height = 128,
341
- className
342
- }) {
343
- const containerRef = React.useRef(null);
344
- const [isDragging, setIsDragging] = React.useState(false);
345
- const handleMove = React.useCallback(
346
- (clientX) => {
347
- if (!containerRef.current) return;
348
- const rect = containerRef.current.getBoundingClientRect();
349
- const x = clientX - rect.left;
350
- const newPosition = Math.max(0, Math.min(100, x / rect.width * 100));
351
- onPositionChange(newPosition);
352
- },
353
- [onPositionChange]
354
- );
355
- const handleMouseDown = React.useCallback(
356
- (e) => {
357
- e.preventDefault();
358
- setIsDragging(true);
359
- handleMove(e.clientX);
360
- },
361
- [handleMove]
362
- );
363
- const handleMouseMove = React.useCallback(
364
- (e) => {
365
- if (!isDragging) return;
366
- handleMove(e.clientX);
367
- },
368
- [isDragging, handleMove]
369
- );
370
- const handleMouseUp = React.useCallback(() => {
371
- setIsDragging(false);
372
- }, []);
373
- const handleTouchStart = React.useCallback(
374
- (e) => {
375
- setIsDragging(true);
376
- handleMove(e.touches[0].clientX);
377
- },
378
- [handleMove]
379
- );
380
- const handleTouchMove = React.useCallback(
381
- (e) => {
382
- if (!isDragging) return;
383
- handleMove(e.touches[0].clientX);
384
- },
385
- [isDragging, handleMove]
386
- );
387
- return /* @__PURE__ */ jsxRuntime.jsxs(
388
- "div",
389
- {
390
- ref: containerRef,
391
- className: chunk5HJFQVUR_js.cn("relative overflow-hidden rounded-md cursor-ew-resize select-none", className),
392
- style: { height },
393
- onMouseDown: handleMouseDown,
394
- onMouseMove: handleMouseMove,
395
- onMouseUp: handleMouseUp,
396
- onMouseLeave: handleMouseUp,
397
- onTouchStart: handleTouchStart,
398
- onTouchMove: handleTouchMove,
399
- onTouchEnd: handleMouseUp,
400
- children: [
401
- /* @__PURE__ */ jsxRuntime.jsx(
402
- "img",
403
- {
404
- src: afterSrc,
405
- alt: afterLabel,
406
- className: "absolute inset-0 w-full h-full object-cover pointer-events-none",
407
- draggable: false
408
- }
409
- ),
410
- /* @__PURE__ */ jsxRuntime.jsx(
411
- "div",
412
- {
413
- className: "absolute inset-0 overflow-hidden pointer-events-none",
414
- style: { width: `${position}%` },
415
- children: /* @__PURE__ */ jsxRuntime.jsx(
416
- "img",
417
- {
418
- src: beforeSrc,
419
- alt: beforeLabel,
420
- className: "absolute inset-0 h-full object-cover",
421
- style: { width: containerRef.current?.offsetWidth ?? "100%" },
422
- draggable: false
423
- }
424
- )
425
- }
426
- ),
427
- /* @__PURE__ */ jsxRuntime.jsx(
428
- "div",
429
- {
430
- className: "absolute top-0 bottom-0 w-0.5 bg-white shadow-lg pointer-events-none",
431
- style: { left: `${position}%`, transform: "translateX(-50%)" },
432
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-6 h-6 bg-white rounded-full shadow-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", className: "w-3 h-3 text-gray-600", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "currentColor", d: "M8 5v14l-7-7 7-7m8 0v14l7-7-7-7" }) }) })
433
- }
434
- ),
435
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1.5 left-1.5 px-1 py-0.5 bg-black/60 rounded text-[9px] text-white font-medium pointer-events-none", children: beforeLabel }),
436
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1.5 right-1.5 px-1 py-0.5 bg-black/60 rounded text-[9px] text-white font-medium pointer-events-none", children: afterLabel })
437
- ]
438
- }
439
- );
440
- }
441
- var ComparisonSlider = React.memo(ComparisonSliderComponent);
442
-
443
- exports.Checkbox = Checkbox;
444
- exports.ComparisonSlider = ComparisonSlider;
445
- exports.GridPositionSelector = GridPositionSelector;
446
- exports.Input = Input;
447
- exports.Label = Label2;
448
- exports.Select = Select;
449
- exports.SelectContent = SelectContent;
450
- exports.SelectGroup = SelectGroup;
451
- exports.SelectItem = SelectItem;
452
- exports.SelectLabel = SelectLabel;
453
- exports.SelectScrollDownButton = SelectScrollDownButton;
454
- exports.SelectScrollUpButton = SelectScrollUpButton;
455
- exports.SelectSeparator = SelectSeparator;
456
- exports.SelectTrigger = SelectTrigger;
457
- exports.SelectValue = SelectValue;
458
- exports.Slider = Slider;