@pactor-app/ui 1.46.0 → 1.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,12 @@
1
1
  import {
2
+ DropdownMenu as DropdownMenu2,
2
3
  Icon,
3
4
  Menu,
4
- Sidebar
5
- } from "./chunk-FU4P7CAM.js";
5
+ Sidebar,
6
+ Tooltip as Tooltip2,
7
+ renderDropdownItems,
8
+ triggerWrapper
9
+ } from "./chunk-B2Y6JC36.js";
6
10
  import {
7
11
  Alert,
8
12
  AlertDescription,
@@ -51,14 +55,6 @@ import {
51
55
  ContextMenuContent,
52
56
  ContextMenuItem,
53
57
  ContextMenuTrigger,
54
- DropdownMenu,
55
- DropdownMenuContent,
56
- DropdownMenuItem,
57
- DropdownMenuSeparator,
58
- DropdownMenuSub,
59
- DropdownMenuSubContent,
60
- DropdownMenuSubTrigger,
61
- DropdownMenuTrigger,
62
58
  Empty,
63
59
  EmptyContent,
64
60
  EmptyDescription,
@@ -138,7 +134,7 @@ import {
138
134
  Typography,
139
135
  navigationMenuTriggerStyle,
140
136
  toast
141
- } from "./chunk-XA7J5SGA.js";
137
+ } from "./chunk-5FQ5SDIZ.js";
142
138
  import {
143
139
  Dialog,
144
140
  DialogContent,
@@ -161,6 +157,14 @@ import {
161
157
  CardContent,
162
158
  CardHeader,
163
159
  CardTitle,
160
+ DropdownMenu,
161
+ DropdownMenuContent,
162
+ DropdownMenuItem,
163
+ DropdownMenuSeparator,
164
+ DropdownMenuSub,
165
+ DropdownMenuSubContent,
166
+ DropdownMenuSubTrigger,
167
+ DropdownMenuTrigger,
164
168
  Input,
165
169
  Popover,
166
170
  PopoverContent,
@@ -174,7 +178,7 @@ import {
174
178
  Tooltip,
175
179
  TooltipContent,
176
180
  TooltipTrigger
177
- } from "./chunk-7OBUSV5S.js";
181
+ } from "./chunk-YHTRCBKF.js";
178
182
  import {
179
183
  Button,
180
184
  buttonVariants,
@@ -256,15 +260,7 @@ function Alert2({
256
260
  // src/components/components/AlertDialog/index.tsx
257
261
  import { useI18n, useRenderer as useRenderer2 } from "@pactor-app/runtime";
258
262
  import { useState } from "react";
259
-
260
- // src/components/components/trigger-render.tsx
261
- import { jsx as jsx4 } from "react/jsx-runtime";
262
- function triggerWrapper(slot) {
263
- return /* @__PURE__ */ jsx4("span", { "data-slot": slot });
264
- }
265
-
266
- // src/components/components/AlertDialog/index.tsx
267
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
263
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
268
264
  function AlertDialog2({
269
265
  title,
270
266
  description,
@@ -292,7 +288,7 @@ function AlertDialog2({
292
288
  }
293
289
  },
294
290
  children: [
295
- trigger ? /* @__PURE__ */ jsx5(
291
+ trigger ? /* @__PURE__ */ jsx4(
296
292
  AlertDialogTrigger,
297
293
  {
298
294
  nativeButton: false,
@@ -302,12 +298,12 @@ function AlertDialog2({
302
298
  ) : null,
303
299
  /* @__PURE__ */ jsxs3(AlertDialogContent, { className, style, children: [
304
300
  /* @__PURE__ */ jsxs3(AlertDialogHeader, { children: [
305
- /* @__PURE__ */ jsx5(AlertDialogTitle, { children: title ?? "" }),
306
- description ? /* @__PURE__ */ jsx5(AlertDialogDescription, { children: description }) : null
301
+ /* @__PURE__ */ jsx4(AlertDialogTitle, { children: title ?? "" }),
302
+ description ? /* @__PURE__ */ jsx4(AlertDialogDescription, { children: description }) : null
307
303
  ] }),
308
304
  /* @__PURE__ */ jsxs3(AlertDialogFooter, { children: [
309
- /* @__PURE__ */ jsx5(AlertDialogCancel, { onClick: () => onCancel?.(), children: cancelText ?? t("pactor.alertDialog.cancel") }),
310
- /* @__PURE__ */ jsx5(AlertDialogAction, { onClick: () => onConfirm?.(), children: confirmText ?? t("pactor.alertDialog.confirm") })
305
+ /* @__PURE__ */ jsx4(AlertDialogCancel, { onClick: () => onCancel?.(), children: cancelText ?? t("pactor.alertDialog.cancel") }),
306
+ /* @__PURE__ */ jsx4(AlertDialogAction, { onClick: () => onConfirm?.(), children: confirmText ?? t("pactor.alertDialog.confirm") })
311
307
  ] })
312
308
  ] })
313
309
  ]
@@ -317,7 +313,7 @@ function AlertDialog2({
317
313
 
318
314
  // src/components/components/Anchor/index.tsx
319
315
  import { useEffect, useRef, useState as useState2 } from "react";
320
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
316
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
321
317
  function flatten(items) {
322
318
  return items.flatMap((item) => [item, ...flatten(item.children ?? [])]);
323
319
  }
@@ -371,8 +367,8 @@ function Anchor({ items = [], activeKey, onChange, offsetTop = 0, className, sty
371
367
  onChangeRef.current?.(href);
372
368
  }
373
369
  };
374
- const renderItems = (list, depth) => /* @__PURE__ */ jsx6("ul", { "data-slot": "anchor-list", className: cn(depth > 0 && "mt-1 flex flex-col gap-1"), children: list.map((item) => /* @__PURE__ */ jsxs4("li", { className: cn(depth > 0 && "pl-4"), children: [
375
- /* @__PURE__ */ jsx6(
370
+ const renderItems = (list, depth) => /* @__PURE__ */ jsx5("ul", { "data-slot": "anchor-list", className: cn(depth > 0 && "mt-1 flex flex-col gap-1"), children: list.map((item) => /* @__PURE__ */ jsxs4("li", { className: cn(depth > 0 && "pl-4"), children: [
371
+ /* @__PURE__ */ jsx5(
376
372
  "a",
377
373
  {
378
374
  "data-slot": "anchor-link",
@@ -388,7 +384,7 @@ function Anchor({ items = [], activeKey, onChange, offsetTop = 0, className, sty
388
384
  ),
389
385
  item.children?.length ? renderItems(item.children, depth + 1) : null
390
386
  ] }, item.href)) });
391
- return /* @__PURE__ */ jsx6(
387
+ return /* @__PURE__ */ jsx5(
392
388
  "nav",
393
389
  {
394
390
  "data-slot": "anchor",
@@ -400,13 +396,13 @@ function Anchor({ items = [], activeKey, onChange, offsetTop = 0, className, sty
400
396
  }
401
397
 
402
398
  // src/components/components/AspectRatio/index.tsx
403
- import { jsx as jsx7 } from "react/jsx-runtime";
399
+ import { jsx as jsx6 } from "react/jsx-runtime";
404
400
  function AspectRatio2({ ratio = 1, children, className, style }) {
405
- return /* @__PURE__ */ jsx7(AspectRatio, { ratio, className, style, children });
401
+ return /* @__PURE__ */ jsx6(AspectRatio, { ratio, className, style, children });
406
402
  }
407
403
 
408
404
  // src/components/components/Audio/index.tsx
409
- import { jsx as jsx8 } from "react/jsx-runtime";
405
+ import { jsx as jsx7 } from "react/jsx-runtime";
410
406
  function Audio({
411
407
  src,
412
408
  controls = true,
@@ -416,7 +412,7 @@ function Audio({
416
412
  className,
417
413
  style
418
414
  }) {
419
- return /* @__PURE__ */ jsx8(
415
+ return /* @__PURE__ */ jsx7(
420
416
  "audio",
421
417
  {
422
418
  "data-slot": "audio",
@@ -432,18 +428,18 @@ function Audio({
432
428
  }
433
429
 
434
430
  // src/components/components/Avatar/index.tsx
435
- import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
431
+ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
436
432
  function Avatar2({ src, alt, fallback, className, style }) {
437
433
  return /* @__PURE__ */ jsxs5(Avatar, { className, style, children: [
438
- src ? /* @__PURE__ */ jsx9(AvatarImage, { src, alt: alt ?? "" }) : null,
439
- fallback ? /* @__PURE__ */ jsx9(AvatarFallback, { children: fallback }) : null
434
+ src ? /* @__PURE__ */ jsx8(AvatarImage, { src, alt: alt ?? "" }) : null,
435
+ fallback ? /* @__PURE__ */ jsx8(AvatarFallback, { children: fallback }) : null
440
436
  ] });
441
437
  }
442
438
 
443
439
  // src/components/components/BackTop/index.tsx
444
440
  import { useI18n as useI18n2 } from "@pactor-app/runtime";
445
441
  import { useEffect as useEffect2, useState as useState3 } from "react";
446
- import { jsx as jsx10 } from "react/jsx-runtime";
442
+ import { jsx as jsx9 } from "react/jsx-runtime";
447
443
  function BackTop({ visibilityHeight = 400, children, className, style }) {
448
444
  const [visible, setVisible] = useState3(false);
449
445
  const { t } = useI18n2();
@@ -454,7 +450,7 @@ function BackTop({ visibilityHeight = 400, children, className, style }) {
454
450
  return () => window.removeEventListener("scroll", update);
455
451
  }, [visibilityHeight]);
456
452
  if (!visible) return null;
457
- return /* @__PURE__ */ jsx10(
453
+ return /* @__PURE__ */ jsx9(
458
454
  "button",
459
455
  {
460
456
  type: "button",
@@ -466,15 +462,15 @@ function BackTop({ visibilityHeight = 400, children, className, style }) {
466
462
  ),
467
463
  style,
468
464
  onClick: () => window.scrollTo({ top: 0, behavior: "smooth" }),
469
- children: children ?? /* @__PURE__ */ jsx10(Icon, { name: "arrow-up", size: "sm" })
465
+ children: children ?? /* @__PURE__ */ jsx9(Icon, { name: "arrow-up", size: "sm" })
470
466
  }
471
467
  );
472
468
  }
473
469
 
474
470
  // src/components/components/Badge/index.tsx
475
- import { jsx as jsx11 } from "react/jsx-runtime";
471
+ import { jsx as jsx10 } from "react/jsx-runtime";
476
472
  function Badge2({ text, variant = "default", className, style }) {
477
- return /* @__PURE__ */ jsx11(Badge, { variant, className, style, children: text });
473
+ return /* @__PURE__ */ jsx10(Badge, { variant, className, style, children: text });
478
474
  }
479
475
 
480
476
  // src/components/components/Breadcrumb/index.tsx
@@ -496,14 +492,14 @@ function useSpaLinkClick() {
496
492
  }
497
493
 
498
494
  // src/components/components/Breadcrumb/index.tsx
499
- import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
495
+ import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
500
496
  function Breadcrumb2({ items = [], className, style }) {
501
497
  const handleSpaClick = useSpaLinkClick();
502
- return /* @__PURE__ */ jsx12(Breadcrumb, { className, style, children: /* @__PURE__ */ jsx12(BreadcrumbList, { children: items.map((item, index) => {
498
+ return /* @__PURE__ */ jsx11(Breadcrumb, { className, style, children: /* @__PURE__ */ jsx11(BreadcrumbList, { children: items.map((item, index) => {
503
499
  const isLast = index === items.length - 1;
504
500
  return /* @__PURE__ */ jsxs6(Fragment, { children: [
505
- index > 0 ? /* @__PURE__ */ jsx12(BreadcrumbSeparator, {}) : null,
506
- /* @__PURE__ */ jsx12(BreadcrumbItem, { children: isLast || !item.href ? /* @__PURE__ */ jsx12(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsx12(
501
+ index > 0 ? /* @__PURE__ */ jsx11(BreadcrumbSeparator, {}) : null,
502
+ /* @__PURE__ */ jsx11(BreadcrumbItem, { children: isLast || !item.href ? /* @__PURE__ */ jsx11(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsx11(
507
503
  BreadcrumbLink,
508
504
  {
509
505
  href: item.href,
@@ -517,7 +513,7 @@ function Breadcrumb2({ items = [], className, style }) {
517
513
 
518
514
  // src/components/components/Button/index.tsx
519
515
  import { Loader2 } from "lucide-react";
520
- import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
516
+ import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
521
517
  var variantMap2 = {
522
518
  default: "outline",
523
519
  primary: "default",
@@ -562,24 +558,24 @@ function Button2({
562
558
  className
563
559
  ),
564
560
  children: [
565
- loading ? /* @__PURE__ */ jsx13(Loader2, { "aria-hidden": true, className: "animate-spin" }) : icon ? /* @__PURE__ */ jsx13(Icon, { name: icon, size: "sm" }) : null,
561
+ loading ? /* @__PURE__ */ jsx12(Loader2, { "aria-hidden": true, className: "animate-spin" }) : icon ? /* @__PURE__ */ jsx12(Icon, { name: icon, size: "sm" }) : null,
566
562
  text ?? children
567
563
  ]
568
564
  }
569
565
  );
570
566
  if (tooltip) {
571
567
  return /* @__PURE__ */ jsxs7(Tooltip, { children: [
572
- /* @__PURE__ */ jsx13(TooltipTrigger, { render: button }),
573
- /* @__PURE__ */ jsx13(TooltipContent, { children: tooltip })
568
+ /* @__PURE__ */ jsx12(TooltipTrigger, { render: button }),
569
+ /* @__PURE__ */ jsx12(TooltipContent, { children: tooltip })
574
570
  ] });
575
571
  }
576
572
  return button;
577
573
  }
578
574
 
579
575
  // src/components/components/ButtonGroup/index.tsx
580
- import { jsx as jsx14 } from "react/jsx-runtime";
576
+ import { jsx as jsx13 } from "react/jsx-runtime";
581
577
  function ButtonGroup2({ className, style, children }) {
582
- return /* @__PURE__ */ jsx14(ButtonGroup, { className, style, children });
578
+ return /* @__PURE__ */ jsx13(ButtonGroup, { className, style, children });
583
579
  }
584
580
 
585
581
  // src/components/components/Calendar/index.tsx
@@ -605,7 +601,7 @@ function formItemClass(layout) {
605
601
  }
606
602
 
607
603
  // src/components/components/Calendar/index.tsx
608
- import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
604
+ import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
609
605
  function parseValue(value) {
610
606
  if (typeof value !== "string" || value === "") return void 0;
611
607
  const date = parseISO(value);
@@ -639,7 +635,7 @@ function Calendar2({
639
635
  }
640
636
  onChange?.(next);
641
637
  };
642
- const calendar = /* @__PURE__ */ jsx15(
638
+ const calendar = /* @__PURE__ */ jsx14(
643
639
  Calendar,
644
640
  {
645
641
  mode,
@@ -659,9 +655,9 @@ function Calendar2({
659
655
  className: cn(formItemClass(form.layout), className),
660
656
  style,
661
657
  children: [
662
- label ? /* @__PURE__ */ jsx15("label", { className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: label }) : null,
658
+ label ? /* @__PURE__ */ jsx14("label", { className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: label }) : null,
663
659
  calendar,
664
- error ? /* @__PURE__ */ jsx15("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
660
+ error ? /* @__PURE__ */ jsx14("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
665
661
  ]
666
662
  }
667
663
  );
@@ -671,10 +667,10 @@ function Calendar2({
671
667
 
672
668
  // src/components/components/Card/index.tsx
673
669
  import { useRenderer as useRenderer4 } from "@pactor-app/runtime";
674
- import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
670
+ import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
675
671
  function ExtraSlot({ extra }) {
676
672
  const { renderChildren } = useRenderer4();
677
- return /* @__PURE__ */ jsx16("div", { "data-slot": "card-action", className: "flex items-center justify-end gap-2", children: renderChildren(extra) });
673
+ return /* @__PURE__ */ jsx15("div", { "data-slot": "card-action", className: "flex items-center justify-end gap-2", children: renderChildren(extra) });
678
674
  }
679
675
  function Card2({
680
676
  title,
@@ -705,14 +701,14 @@ function Card2({
705
701
  onClick,
706
702
  children: [
707
703
  title || extra ? /* @__PURE__ */ jsxs9(CardHeader, { className: "px-4", children: [
708
- title ? /* @__PURE__ */ jsx16(CardTitle, { children: title }) : null,
709
- extra ? /* @__PURE__ */ jsx16(ExtraSlot, { extra }) : null
704
+ title ? /* @__PURE__ */ jsx15(CardTitle, { children: title }) : null,
705
+ extra ? /* @__PURE__ */ jsx15(ExtraSlot, { extra }) : null
710
706
  ] }) : null,
711
- loading ? /* @__PURE__ */ jsx16(CardContent, { className: cn("px-4", contentClassName), children: /* @__PURE__ */ jsxs9("div", { "data-slot": "card-loading", className: "flex flex-col gap-3", children: [
712
- /* @__PURE__ */ jsx16(Skeleton, { className: "h-4 w-full" }),
713
- /* @__PURE__ */ jsx16(Skeleton, { className: "h-4 w-3/4" }),
714
- /* @__PURE__ */ jsx16(Skeleton, { className: "h-24 w-full" })
715
- ] }) }) : /* @__PURE__ */ jsx16(CardContent, { className: cn("px-4", contentClassName), children })
707
+ loading ? /* @__PURE__ */ jsx15(CardContent, { className: cn("px-4", contentClassName), children: /* @__PURE__ */ jsxs9("div", { "data-slot": "card-loading", className: "flex flex-col gap-3", children: [
708
+ /* @__PURE__ */ jsx15(Skeleton, { className: "h-4 w-full" }),
709
+ /* @__PURE__ */ jsx15(Skeleton, { className: "h-4 w-3/4" }),
710
+ /* @__PURE__ */ jsx15(Skeleton, { className: "h-24 w-full" })
711
+ ] }) }) : /* @__PURE__ */ jsx15(CardContent, { className: cn("px-4", contentClassName), children })
716
712
  ]
717
713
  }
718
714
  );
@@ -721,7 +717,7 @@ function Card2({
721
717
  // src/components/components/Carousel/index.tsx
722
718
  import { useRenderer as useRenderer5 } from "@pactor-app/runtime";
723
719
  import { useEffect as useEffect4, useState as useState4 } from "react";
724
- import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
720
+ import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
725
721
  function isDslNode(item) {
726
722
  return typeof item.type === "string";
727
723
  }
@@ -754,7 +750,7 @@ function Carousel2({
754
750
  className,
755
751
  style,
756
752
  children: [
757
- /* @__PURE__ */ jsx17(CarouselContent, { children: items.map((item, index) => /* @__PURE__ */ jsx17(CarouselItem, { children: isDslNode(item) ? renderChildren([item]) : /* @__PURE__ */ jsx17(
753
+ /* @__PURE__ */ jsx16(CarouselContent, { children: items.map((item, index) => /* @__PURE__ */ jsx16(CarouselItem, { children: isDslNode(item) ? renderChildren([item]) : /* @__PURE__ */ jsx16(
758
754
  "img",
759
755
  {
760
756
  src: item.src,
@@ -762,8 +758,8 @@ function Carousel2({
762
758
  className: "w-full rounded-md object-cover"
763
759
  }
764
760
  ) }, index)) }),
765
- /* @__PURE__ */ jsx17(CarouselPrevious, {}),
766
- /* @__PURE__ */ jsx17(CarouselNext, {})
761
+ /* @__PURE__ */ jsx16(CarouselPrevious, {}),
762
+ /* @__PURE__ */ jsx16(CarouselNext, {})
767
763
  ]
768
764
  }
769
765
  );
@@ -776,17 +772,18 @@ import { useEffect as useEffect5, useId, useState as useState5 } from "react";
776
772
 
777
773
  // src/components/clearable.tsx
778
774
  import { X } from "lucide-react";
779
- import { jsx as jsx18 } from "react/jsx-runtime";
775
+ import { jsx as jsx17 } from "react/jsx-runtime";
780
776
  var CLEARABLE_GROUP = "group";
781
777
  var CLEARABLE_ICON_HIDE = "group-hover:hidden";
778
+ var CLEARABLE_OVERLAY_HIDE = "pactor-clearable-ghost";
782
779
  function ClearHoverButton({ label, onClear, className }) {
783
- return /* @__PURE__ */ jsx18(
780
+ return /* @__PURE__ */ jsx17(
784
781
  "span",
785
782
  {
786
783
  role: "button",
787
784
  "aria-label": label,
788
785
  className: cn(
789
- "hidden shrink-0 cursor-pointer items-center justify-center text-muted-foreground group-hover:inline-flex hover:text-foreground",
786
+ "pactor-clearable shrink-0 cursor-pointer items-center justify-center text-muted-foreground hover:text-foreground",
790
787
  className
791
788
  ),
792
789
  onClick: (event) => {
@@ -798,7 +795,7 @@ function ClearHoverButton({ label, onClear, className }) {
798
795
  event.preventDefault();
799
796
  event.stopPropagation();
800
797
  },
801
- children: /* @__PURE__ */ jsx18(X, { className: "size-4" })
798
+ children: /* @__PURE__ */ jsx17(X, { className: "size-4" })
802
799
  }
803
800
  );
804
801
  }
@@ -831,30 +828,138 @@ var CONTROL_SIZE_TRIGGER_TEXT = {
831
828
  };
832
829
 
833
830
  // src/components/components/Form/form-item.tsx
834
- import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
831
+ import { useContext as useContext2 } from "react";
832
+
833
+ // src/components/components/Field/index.tsx
834
+ import { createContext as createContext2 } from "react";
835
+ import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
836
+ var FieldNestContext = createContext2(false);
837
+ function Field2({
838
+ label,
839
+ required,
840
+ labelHint,
841
+ description,
842
+ error,
843
+ children,
844
+ className,
845
+ style,
846
+ labelClassName,
847
+ labelStyle,
848
+ labelHintClassName,
849
+ labelHintStyle,
850
+ controlClassName,
851
+ controlStyle,
852
+ descriptionClassName,
853
+ descriptionStyle,
854
+ errorClassName,
855
+ errorStyle
856
+ }) {
857
+ const form = useFormContext();
858
+ const inline = form?.layout === "inline";
859
+ return /* @__PURE__ */ jsx18(
860
+ Field,
861
+ {
862
+ className: cn(
863
+ form?.layout === "vertical" && "mb-2",
864
+ // inline Form:label 与控件同一行(覆盖默认 flex-col)
865
+ inline && "flex-row items-center",
866
+ className
867
+ ),
868
+ style,
869
+ children: /* @__PURE__ */ jsxs11(FieldNestContext.Provider, { value: true, children: [
870
+ label || labelHint ? /* @__PURE__ */ jsxs11(
871
+ "div",
872
+ {
873
+ className: cn(
874
+ "flex min-h-3.5 items-center gap-2",
875
+ inline ? "shrink-0" : "w-full justify-between"
876
+ ),
877
+ children: [
878
+ label ? /* @__PURE__ */ jsxs11(FieldLabel, { className: labelClassName, style: labelStyle, children: [
879
+ required ? /* @__PURE__ */ jsxs11("span", { "aria-hidden": true, className: "text-destructive", children: [
880
+ "*",
881
+ " "
882
+ ] }) : null,
883
+ label
884
+ ] }) : /* @__PURE__ */ jsx18("span", {}),
885
+ labelHint ? /* @__PURE__ */ jsx18(
886
+ "span",
887
+ {
888
+ "data-slot": "field-label-hint",
889
+ className: cn(
890
+ "shrink-0 text-xs leading-none text-muted-foreground",
891
+ labelHintClassName
892
+ ),
893
+ style: labelHintStyle,
894
+ children: labelHint
895
+ }
896
+ ) : null
897
+ ]
898
+ }
899
+ ) : null,
900
+ /* @__PURE__ */ jsx18(
901
+ "div",
902
+ {
903
+ "data-slot": "field-control",
904
+ className: cn("[&>button+button]:ml-2", controlClassName),
905
+ style: controlStyle,
906
+ children
907
+ }
908
+ ),
909
+ description ? /* @__PURE__ */ jsx18(
910
+ FieldDescription,
911
+ {
912
+ className: descriptionClassName,
913
+ style: descriptionStyle,
914
+ children: description
915
+ }
916
+ ) : null,
917
+ error ? /* @__PURE__ */ jsx18(FieldError, { match: true, className: errorClassName, style: errorStyle, children: error }) : null
918
+ ] })
919
+ }
920
+ );
921
+ }
922
+
923
+ // src/components/components/Form/form-item.tsx
924
+ import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
835
925
  function FieldShell({
836
926
  layout,
837
927
  label,
838
928
  htmlFor,
929
+ rules,
839
930
  error,
840
931
  className,
841
932
  style,
842
933
  children
843
934
  }) {
844
- return /* @__PURE__ */ jsxs11(
845
- "div",
935
+ const required = rules?.some((rule) => rule.required) === true;
936
+ const inField = useContext2(FieldNestContext);
937
+ return /* @__PURE__ */ jsxs12(
938
+ Field,
846
939
  {
847
940
  "data-slot": "form-item",
848
- className: cn(formItemClass(layout), className),
941
+ className: cn(
942
+ // ShadcnField 基础为 flex-col:horizontal / inline 需显式回正为行向
943
+ layout !== "vertical" && "flex-row",
944
+ inField ? layout === "vertical" ? "flex flex-col gap-2" : "flex items-center gap-2" : formItemClass(layout),
945
+ className
946
+ ),
849
947
  style,
850
948
  children: [
851
- label ? /* @__PURE__ */ jsx19(
852
- "label",
853
- {
854
- htmlFor,
855
- className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap",
856
- children: label
857
- }
949
+ label ? (
950
+ // 星号为 label 的同级 aria-hidden 兄弟(而非伪元素 / label 子节点):
951
+ // 不占 label 文本内容与可访问名,视觉仍在 label 前
952
+ /* @__PURE__ */ jsxs12("span", { className: "flex items-center", children: [
953
+ required ? /* @__PURE__ */ jsx19("span", { "aria-hidden": true, className: "mr-0.5 text-sm leading-normal text-destructive", children: "*" }) : null,
954
+ /* @__PURE__ */ jsx19(
955
+ "label",
956
+ {
957
+ htmlFor,
958
+ className: "shrink-0 text-sm leading-normal font-medium whitespace-nowrap",
959
+ children: label
960
+ }
961
+ )
962
+ ] })
858
963
  ) : null,
859
964
  children,
860
965
  error ? /* @__PURE__ */ jsx19("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
@@ -864,7 +969,7 @@ function FieldShell({
864
969
  }
865
970
 
866
971
  // src/components/components/Cascader/index.tsx
867
- import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
972
+ import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
868
973
  function resolvePath(options, path) {
869
974
  const nodes = [];
870
975
  let level = options;
@@ -947,8 +1052,8 @@ function Cascader({
947
1052
  if ((node.children?.length ?? 0) > 0) columns.push(node.children ?? []);
948
1053
  else break;
949
1054
  }
950
- const control = /* @__PURE__ */ jsxs12(Popover, { open, onOpenChange: openPanel, children: [
951
- /* @__PURE__ */ jsxs12(
1055
+ const control = /* @__PURE__ */ jsxs13(Popover, { open, onOpenChange: openPanel, children: [
1056
+ /* @__PURE__ */ jsxs13(
952
1057
  PopoverTrigger,
953
1058
  {
954
1059
  id: controlId,
@@ -986,7 +1091,7 @@ function Cascader({
986
1091
  children: column.map((option) => {
987
1092
  const hasChildren = (option.children?.length ?? 0) > 0;
988
1093
  const active = activePath[depth] === option.value;
989
- return /* @__PURE__ */ jsxs12(
1094
+ return /* @__PURE__ */ jsxs13(
990
1095
  "button",
991
1096
  {
992
1097
  type: "button",
@@ -1013,6 +1118,7 @@ function Cascader({
1013
1118
  {
1014
1119
  layout: form.layout,
1015
1120
  label,
1121
+ rules,
1016
1122
  htmlFor: controlId,
1017
1123
  error: form.errors[name],
1018
1124
  className,
@@ -1026,7 +1132,7 @@ function Cascader({
1026
1132
 
1027
1133
  // src/components/components/Checkbox/index.tsx
1028
1134
  import { useEffect as useEffect6, useId as useId2 } from "react";
1029
- import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
1135
+ import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
1030
1136
  function Checkbox2({
1031
1137
  name,
1032
1138
  label,
@@ -1055,7 +1161,7 @@ function Checkbox2({
1055
1161
  }
1056
1162
  onChange?.(next);
1057
1163
  };
1058
- const control = /* @__PURE__ */ jsxs13(
1164
+ const control = /* @__PURE__ */ jsxs14(
1059
1165
  "span",
1060
1166
  {
1061
1167
  className: cn("inline-flex items-center gap-2", !inForm && className),
@@ -1076,7 +1182,7 @@ function Checkbox2({
1076
1182
  }
1077
1183
  );
1078
1184
  if (inForm && form && name) {
1079
- return /* @__PURE__ */ jsxs13(
1185
+ return /* @__PURE__ */ jsxs14(
1080
1186
  "div",
1081
1187
  {
1082
1188
  "data-slot": "form-item",
@@ -1093,9 +1199,9 @@ function Checkbox2({
1093
1199
  }
1094
1200
 
1095
1201
  // src/components/components/ChipNode/index.tsx
1096
- import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
1202
+ import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
1097
1203
  function ChipNode({ text, selected, dot, onClick, className, style }) {
1098
- return /* @__PURE__ */ jsxs14(
1204
+ return /* @__PURE__ */ jsxs15(
1099
1205
  "button",
1100
1206
  {
1101
1207
  type: "button",
@@ -1168,7 +1274,7 @@ function ChipFilter({
1168
1274
  import { useI18n as useI18n4 } from "@pactor-app/runtime";
1169
1275
  import { useState as useState6 } from "react";
1170
1276
  import { CodeBlock as HighlightedCodeBlock, registerCodeLanguages } from "@pactor-app/markdown";
1171
- import { jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
1277
+ import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
1172
1278
  registerCodeLanguages();
1173
1279
  function CodeBlock({ code = "", language = "text", copyable = true, className, style }) {
1174
1280
  const [copied, setCopied] = useState6(false);
@@ -1181,7 +1287,7 @@ function CodeBlock({ code = "", language = "text", copyable = true, className, s
1181
1287
  } catch {
1182
1288
  }
1183
1289
  };
1184
- return /* @__PURE__ */ jsxs15(
1290
+ return /* @__PURE__ */ jsxs16(
1185
1291
  "div",
1186
1292
  {
1187
1293
  "data-slot": "code-block",
@@ -1207,7 +1313,7 @@ function CodeBlock({ code = "", language = "text", copyable = true, className, s
1207
1313
 
1208
1314
  // src/components/components/Collapsible/index.tsx
1209
1315
  import { useState as useState7 } from "react";
1210
- import { jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
1316
+ import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
1211
1317
  function Collapsible2({
1212
1318
  title,
1213
1319
  open,
@@ -1217,7 +1323,7 @@ function Collapsible2({
1217
1323
  }) {
1218
1324
  const [innerOpen, setInnerOpen] = useState7(false);
1219
1325
  const controlled = open !== void 0;
1220
- return /* @__PURE__ */ jsxs16(
1326
+ return /* @__PURE__ */ jsxs17(
1221
1327
  Collapsible,
1222
1328
  {
1223
1329
  open: controlled ? open : innerOpen,
@@ -1244,7 +1350,7 @@ import {
1244
1350
  useRef as useRef2,
1245
1351
  useState as useState8
1246
1352
  } from "react";
1247
- import { jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
1353
+ import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
1248
1354
  var HEX_RE = /^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;
1249
1355
  function normalizeHex(value) {
1250
1356
  const trimmed = value.trim();
@@ -1473,8 +1579,8 @@ function ColorPicker({
1473
1579
  { key: "b", label: "B", text: String(channelB) },
1474
1580
  { key: "a", label: "A", text: String(hsva.a) }
1475
1581
  ];
1476
- const control = /* @__PURE__ */ jsxs17(Popover, { open, onOpenChange: openPanel, children: [
1477
- /* @__PURE__ */ jsxs17(
1582
+ const control = /* @__PURE__ */ jsxs18(Popover, { open, onOpenChange: openPanel, children: [
1583
+ /* @__PURE__ */ jsxs18(
1478
1584
  PopoverTrigger,
1479
1585
  {
1480
1586
  id: controlId,
@@ -1503,7 +1609,7 @@ function ColorPicker({
1503
1609
  ]
1504
1610
  }
1505
1611
  ),
1506
- /* @__PURE__ */ jsx26(PopoverContent, { className: "w-64", children: /* @__PURE__ */ jsxs17("div", { "data-slot": "colorpicker-panel", className: "flex flex-col gap-3", children: [
1612
+ /* @__PURE__ */ jsx26(PopoverContent, { className: "w-64", children: /* @__PURE__ */ jsxs18("div", { "data-slot": "colorpicker-panel", className: "flex flex-col gap-3", children: [
1507
1613
  /* @__PURE__ */ jsx26(
1508
1614
  "div",
1509
1615
  {
@@ -1528,8 +1634,8 @@ function ColorPicker({
1528
1634
  )
1529
1635
  }
1530
1636
  ),
1531
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
1532
- /* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
1637
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
1638
+ /* @__PURE__ */ jsxs18("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
1533
1639
  /* @__PURE__ */ jsx26(
1534
1640
  "div",
1535
1641
  {
@@ -1591,7 +1697,7 @@ function ColorPicker({
1591
1697
  }
1592
1698
  )
1593
1699
  ] }),
1594
- /* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-1.5", children: [
1700
+ /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-1.5", children: [
1595
1701
  /* @__PURE__ */ jsx26(
1596
1702
  Input,
1597
1703
  {
@@ -1608,7 +1714,7 @@ function ColorPicker({
1608
1714
  }
1609
1715
  }
1610
1716
  ),
1611
- /* @__PURE__ */ jsx26("div", { className: "flex items-start gap-1", children: channels.map((channel) => /* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 flex-1 flex-col items-center gap-0.5", children: [
1717
+ /* @__PURE__ */ jsx26("div", { className: "flex items-start gap-1", children: channels.map((channel) => /* @__PURE__ */ jsxs18("div", { className: "flex min-w-0 flex-1 flex-col items-center gap-0.5", children: [
1612
1718
  /* @__PURE__ */ jsx26(
1613
1719
  Input,
1614
1720
  {
@@ -1651,6 +1757,7 @@ function ColorPicker({
1651
1757
  {
1652
1758
  layout: form.layout,
1653
1759
  label,
1760
+ rules,
1654
1761
  htmlFor: controlId,
1655
1762
  error: form.errors[name],
1656
1763
  className,
@@ -1665,7 +1772,7 @@ function ColorPicker({
1665
1772
  // src/components/components/Combobox/index.tsx
1666
1773
  import { useI18n as useI18n6 } from "@pactor-app/runtime";
1667
1774
  import { useEffect as useEffect8, useId as useId4, useState as useState9 } from "react";
1668
- import { jsx as jsx27, jsxs as jsxs18 } from "react/jsx-runtime";
1775
+ import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
1669
1776
  function Combobox2({
1670
1777
  name,
1671
1778
  label,
@@ -1718,7 +1825,7 @@ function Combobox2({
1718
1825
  onChange?.(option.value);
1719
1826
  setOpen(false);
1720
1827
  };
1721
- const control = /* @__PURE__ */ jsxs18(Combobox, { open, onOpenChange: setOpen, children: [
1828
+ const control = /* @__PURE__ */ jsxs19(Combobox, { open, onOpenChange: setOpen, children: [
1722
1829
  /* @__PURE__ */ jsx27(
1723
1830
  ComboboxTrigger,
1724
1831
  {
@@ -1737,9 +1844,9 @@ function Combobox2({
1737
1844
  children: selected ? selected.label : placeholder ?? ""
1738
1845
  }
1739
1846
  ),
1740
- /* @__PURE__ */ jsx27(ComboboxContent, { children: /* @__PURE__ */ jsxs18(Command, { children: [
1847
+ /* @__PURE__ */ jsx27(ComboboxContent, { children: /* @__PURE__ */ jsxs19(Command, { children: [
1741
1848
  searchable ? /* @__PURE__ */ jsx27(CommandInput, { placeholder }) : null,
1742
- /* @__PURE__ */ jsxs18(CommandList, { children: [
1849
+ /* @__PURE__ */ jsxs19(CommandList, { children: [
1743
1850
  /* @__PURE__ */ jsx27(CommandEmpty, { children: t("pactor.command.empty") }),
1744
1851
  /* @__PURE__ */ jsx27(CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsx27(
1745
1852
  CommandItem,
@@ -1758,7 +1865,7 @@ function Combobox2({
1758
1865
  ] });
1759
1866
  if (inForm && form && name) {
1760
1867
  const error = form.errors[name];
1761
- return /* @__PURE__ */ jsxs18(
1868
+ return /* @__PURE__ */ jsxs19(
1762
1869
  "div",
1763
1870
  {
1764
1871
  "data-slot": "form-item",
@@ -1784,7 +1891,7 @@ function Combobox2({
1784
1891
 
1785
1892
  // src/components/components/Command/index.tsx
1786
1893
  import { useI18n as useI18n7 } from "@pactor-app/runtime";
1787
- import { jsx as jsx28, jsxs as jsxs19 } from "react/jsx-runtime";
1894
+ import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
1788
1895
  function Command2({
1789
1896
  groups = [],
1790
1897
  placeholder,
@@ -1794,11 +1901,11 @@ function Command2({
1794
1901
  style
1795
1902
  }) {
1796
1903
  const { t } = useI18n7();
1797
- return /* @__PURE__ */ jsxs19(Command, { className, style, children: [
1904
+ return /* @__PURE__ */ jsxs20(Command, { className, style, children: [
1798
1905
  /* @__PURE__ */ jsx28(CommandInput, { placeholder }),
1799
- /* @__PURE__ */ jsxs19(CommandList, { children: [
1906
+ /* @__PURE__ */ jsxs20(CommandList, { children: [
1800
1907
  /* @__PURE__ */ jsx28(CommandEmpty, { children: emptyText ?? t("pactor.command.empty") }),
1801
- groups.map((group, index) => /* @__PURE__ */ jsx28(CommandGroup, { heading: group.heading, children: group.items.map((item) => /* @__PURE__ */ jsxs19(
1908
+ groups.map((group, index) => /* @__PURE__ */ jsx28(CommandGroup, { heading: group.heading, children: group.items.map((item) => /* @__PURE__ */ jsxs20(
1802
1909
  CommandItem,
1803
1910
  {
1804
1911
  value: item.value,
@@ -1825,7 +1932,7 @@ import {
1825
1932
  useRef as useRef3,
1826
1933
  useState as useState10
1827
1934
  } from "react";
1828
- import { jsx as jsx29, jsxs as jsxs20 } from "react/jsx-runtime";
1935
+ import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
1829
1936
  function useOptionalRenderer() {
1830
1937
  try {
1831
1938
  return useRenderer6();
@@ -1884,7 +1991,7 @@ function ChatInput({
1884
1991
  const handleComposition = (event) => {
1885
1992
  composingRef.current = event.type === "compositionstart";
1886
1993
  };
1887
- return /* @__PURE__ */ jsxs20(
1994
+ return /* @__PURE__ */ jsxs21(
1888
1995
  "div",
1889
1996
  {
1890
1997
  "data-slot": "chat-input",
@@ -1909,7 +2016,7 @@ function ChatInput({
1909
2016
  className: "min-h-[60px] resize-none border-0 px-4 pt-3 pb-1 shadow-none focus-visible:border-transparent focus-visible:ring-0"
1910
2017
  }
1911
2018
  ),
1912
- toolbarStart || toolbarEnd || !hideSend ? /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-1 px-2 pb-2", children: [
2019
+ toolbarStart || toolbarEnd || !hideSend ? /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-1 px-2 pb-2", children: [
1913
2020
  toolbarStart ? renderSlot(toolbarStart) : null,
1914
2021
  /* @__PURE__ */ jsx29("span", { className: "flex-1" }),
1915
2022
  toolbarEnd ? renderSlot(toolbarEnd) : null,
@@ -1982,7 +2089,7 @@ function Content({ className, style, children }) {
1982
2089
  }
1983
2090
 
1984
2091
  // src/components/components/ContextMenu/index.tsx
1985
- import { jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
2092
+ import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
1986
2093
  function ContextMenu2({
1987
2094
  items = [],
1988
2095
  onSelect,
@@ -1990,9 +2097,9 @@ function ContextMenu2({
1990
2097
  className,
1991
2098
  style
1992
2099
  }) {
1993
- return /* @__PURE__ */ jsxs21(ContextMenu, { children: [
2100
+ return /* @__PURE__ */ jsxs22(ContextMenu, { children: [
1994
2101
  /* @__PURE__ */ jsx32(ContextMenuTrigger, { children }),
1995
- /* @__PURE__ */ jsx32(ContextMenuContent, { className, style, children: items.map((item) => /* @__PURE__ */ jsxs21(
2102
+ /* @__PURE__ */ jsx32(ContextMenuContent, { className, style, children: items.map((item) => /* @__PURE__ */ jsxs22(
1996
2103
  ContextMenuItem,
1997
2104
  {
1998
2105
  variant: item.danger ? "destructive" : "default",
@@ -2012,7 +2119,7 @@ function ContextMenu2({
2012
2119
  import { useI18n as useI18n9, useRenderer as useRenderer7 } from "@pactor-app/runtime";
2013
2120
  import { ArrowDown, ArrowUp as ArrowUp2, ArrowUpDown } from "lucide-react";
2014
2121
  import { useMemo, useState as useState11 } from "react";
2015
- import { jsx as jsx33, jsxs as jsxs22 } from "react/jsx-runtime";
2122
+ import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
2016
2123
  function renderCellValue(value) {
2017
2124
  if (value === void 0 || value === null) {
2018
2125
  return "";
@@ -2081,12 +2188,12 @@ function DataTable({
2081
2188
  setCurrent(page);
2082
2189
  onPageChange?.(page);
2083
2190
  };
2084
- return /* @__PURE__ */ jsxs22("div", { "data-slot": "data-table", className: cn("relative", className), style, children: [
2085
- /* @__PURE__ */ jsxs22(Table, { children: [
2191
+ return /* @__PURE__ */ jsxs23("div", { "data-slot": "data-table", className: cn("relative", className), style, children: [
2192
+ /* @__PURE__ */ jsxs23(Table, { children: [
2086
2193
  /* @__PURE__ */ jsx33(TableHeader, { children: /* @__PURE__ */ jsx33(TableRow, { className: "hover:bg-transparent", children: columns.map((column, index) => {
2087
2194
  const sorted = sortState?.key === column.key;
2088
- return /* @__PURE__ */ jsx33(TableHead, { children: /* @__PURE__ */ jsxs22("div", { className: "flex flex-col gap-1", children: [
2089
- column.sortable ? /* @__PURE__ */ jsxs22(
2195
+ return /* @__PURE__ */ jsx33(TableHead, { children: /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-1", children: [
2196
+ column.sortable ? /* @__PURE__ */ jsxs23(
2090
2197
  "button",
2091
2198
  {
2092
2199
  type: "button",
@@ -2177,7 +2284,7 @@ import {
2177
2284
  import { enUS, zhCN } from "date-fns/locale";
2178
2285
  import { Calendar as CalendarIcon } from "lucide-react";
2179
2286
  import { useEffect as useEffect9, useId as useId5, useState as useState12 } from "react";
2180
- import { jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
2287
+ import { jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
2181
2288
  function toDateFnsLocale(locale) {
2182
2289
  switch (locale) {
2183
2290
  case "zh-CN":
@@ -2352,7 +2459,7 @@ function DatePicker(props) {
2352
2459
  const displayText = isRange ? typeof current === "object" && current !== null ? `${current.start} ~ ${current.end}` : "" : typeof current === "string" ? current : "";
2353
2460
  const showClear = allowClear !== false && disabled !== true && displayText !== "";
2354
2461
  const placeholderText = placeholder ?? t(isRange ? "pactor.datePicker.placeholderRange" : "pactor.datePicker.placeholder");
2355
- const calendar = isRange ? /* @__PURE__ */ jsxs23("div", { className: "flex", children: [
2462
+ const calendar = isRange ? /* @__PURE__ */ jsxs24("div", { className: "flex", children: [
2356
2463
  /* @__PURE__ */ jsx34(
2357
2464
  "div",
2358
2465
  {
@@ -2395,8 +2502,8 @@ function DatePicker(props) {
2395
2502
  locale: dfLocale
2396
2503
  }
2397
2504
  );
2398
- const control = /* @__PURE__ */ jsxs23(Popover, { open, onOpenChange: setOpen, children: [
2399
- /* @__PURE__ */ jsxs23(
2505
+ const control = /* @__PURE__ */ jsxs24(Popover, { open, onOpenChange: setOpen, children: [
2506
+ /* @__PURE__ */ jsxs24(
2400
2507
  PopoverTrigger,
2401
2508
  {
2402
2509
  id: controlId,
@@ -2429,7 +2536,7 @@ function DatePicker(props) {
2429
2536
  ]
2430
2537
  }
2431
2538
  ),
2432
- /* @__PURE__ */ jsx34(PopoverContent, { className: "w-auto p-0", children: presetList.length > 0 ? /* @__PURE__ */ jsxs23("div", { className: "flex", children: [
2539
+ /* @__PURE__ */ jsx34(PopoverContent, { className: "w-auto p-0", children: presetList.length > 0 ? /* @__PURE__ */ jsxs24("div", { className: "flex", children: [
2433
2540
  /* @__PURE__ */ jsx34(
2434
2541
  "div",
2435
2542
  {
@@ -2455,7 +2562,7 @@ function DatePicker(props) {
2455
2562
  ] });
2456
2563
  if (inForm && form && name) {
2457
2564
  const error = form.errors[name];
2458
- return /* @__PURE__ */ jsxs23(
2565
+ return /* @__PURE__ */ jsxs24(
2459
2566
  "div",
2460
2567
  {
2461
2568
  "data-slot": "form-item",
@@ -2480,7 +2587,7 @@ function DatePicker(props) {
2480
2587
  }
2481
2588
 
2482
2589
  // src/components/components/Descriptions/index.tsx
2483
- import { jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
2590
+ import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
2484
2591
  function Descriptions({
2485
2592
  title,
2486
2593
  items = [],
@@ -2489,7 +2596,7 @@ function Descriptions({
2489
2596
  className,
2490
2597
  style
2491
2598
  }) {
2492
- return /* @__PURE__ */ jsxs24("div", { "data-slot": "descriptions", className: cn("w-full", className), style, children: [
2599
+ return /* @__PURE__ */ jsxs25("div", { "data-slot": "descriptions", className: cn("w-full", className), style, children: [
2493
2600
  title ? /* @__PURE__ */ jsx35("div", { "data-slot": "descriptions-title", className: "mb-3 text-base font-medium", children: title }) : null,
2494
2601
  /* @__PURE__ */ jsx35(
2495
2602
  "div",
@@ -2501,7 +2608,7 @@ function Descriptions({
2501
2608
  ),
2502
2609
  style: { gridTemplateColumns: `repeat(${column}, minmax(0, 1fr))` },
2503
2610
  children: items.map(
2504
- (item, index) => bordered ? /* @__PURE__ */ jsxs24(
2611
+ (item, index) => bordered ? /* @__PURE__ */ jsxs25(
2505
2612
  "div",
2506
2613
  {
2507
2614
  "data-slot": "descriptions-item",
@@ -2519,7 +2626,7 @@ function Descriptions({
2519
2626
  ]
2520
2627
  },
2521
2628
  index
2522
- ) : /* @__PURE__ */ jsxs24("div", { "data-slot": "descriptions-item", className: "flex gap-2 text-sm", children: [
2629
+ ) : /* @__PURE__ */ jsxs25("div", { "data-slot": "descriptions-item", className: "flex gap-2 text-sm", children: [
2523
2630
  /* @__PURE__ */ jsx35(
2524
2631
  "span",
2525
2632
  {
@@ -2539,7 +2646,7 @@ function Descriptions({
2539
2646
  // src/components/components/Dialog/index.tsx
2540
2647
  import { useRenderer as useRenderer8 } from "@pactor-app/runtime";
2541
2648
  import { useState as useState13 } from "react";
2542
- import { jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
2649
+ import { jsx as jsx36, jsxs as jsxs26 } from "react/jsx-runtime";
2543
2650
  function Dialog2({
2544
2651
  title,
2545
2652
  description,
@@ -2554,7 +2661,7 @@ function Dialog2({
2554
2661
  const [innerOpen, setInnerOpen] = useState13(false);
2555
2662
  const controlled = open !== void 0;
2556
2663
  const visible = controlled ? open : innerOpen;
2557
- return /* @__PURE__ */ jsxs25(
2664
+ return /* @__PURE__ */ jsxs26(
2558
2665
  Dialog,
2559
2666
  {
2560
2667
  open: visible,
@@ -2575,8 +2682,8 @@ function Dialog2({
2575
2682
  children: renderChildren([trigger])
2576
2683
  }
2577
2684
  ) : null,
2578
- /* @__PURE__ */ jsxs25(DialogContent, { className, style, children: [
2579
- title || description ? /* @__PURE__ */ jsxs25(DialogHeader, { children: [
2685
+ /* @__PURE__ */ jsxs26(DialogContent, { className, style, children: [
2686
+ title || description ? /* @__PURE__ */ jsxs26(DialogHeader, { children: [
2580
2687
  title ? /* @__PURE__ */ jsx36(DialogTitle, { children: title }) : null,
2581
2688
  description ? /* @__PURE__ */ jsx36(DialogDescription, { children: description }) : null
2582
2689
  ] }) : null,
@@ -2589,7 +2696,7 @@ function Dialog2({
2589
2696
 
2590
2697
  // src/components/components/DiffViewer/index.tsx
2591
2698
  import { useMemo as useMemo2 } from "react";
2592
- import { jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
2699
+ import { jsx as jsx37, jsxs as jsxs27 } from "react/jsx-runtime";
2593
2700
  function diffLines(oldText, newText) {
2594
2701
  const a = oldText === "" ? [] : oldText.split("\n");
2595
2702
  const b = newText === "" ? [] : newText.split("\n");
@@ -2639,13 +2746,13 @@ var signClass = {
2639
2746
  del: "text-destructive"
2640
2747
  };
2641
2748
  function UnifiedView({ ops }) {
2642
- return /* @__PURE__ */ jsx37("div", { "data-slot": "diff-viewer-unified", children: ops.map((op, index) => /* @__PURE__ */ jsxs26("div", { "data-slot": "diff-row", "data-type": op.type, className: cn("flex", rowClass[op.type]), children: [
2749
+ return /* @__PURE__ */ jsx37("div", { "data-slot": "diff-viewer-unified", children: ops.map((op, index) => /* @__PURE__ */ jsxs27("div", { "data-slot": "diff-row", "data-type": op.type, className: cn("flex", rowClass[op.type]), children: [
2643
2750
  /* @__PURE__ */ jsx37("span", { className: cn("w-6 shrink-0 text-center select-none", signClass[op.type]), children: signMap[op.type] }),
2644
2751
  /* @__PURE__ */ jsx37("span", { className: "flex-1 whitespace-pre-wrap break-all", children: op.text || " " })
2645
2752
  ] }, index)) });
2646
2753
  }
2647
2754
  function SplitView({ ops }) {
2648
- const rows = ops.map((op, index) => /* @__PURE__ */ jsxs26("div", { className: "flex", children: [
2755
+ const rows = ops.map((op, index) => /* @__PURE__ */ jsxs27("div", { className: "flex", children: [
2649
2756
  /* @__PURE__ */ jsx37(
2650
2757
  "div",
2651
2758
  {
@@ -2677,14 +2784,14 @@ function SplitView({ ops }) {
2677
2784
  }
2678
2785
  function DiffViewer({ oldText = "", newText = "", split, oldTitle, newTitle, className, style }) {
2679
2786
  const ops = useMemo2(() => diffLines(oldText, newText), [oldText, newText]);
2680
- return /* @__PURE__ */ jsxs26(
2787
+ return /* @__PURE__ */ jsxs27(
2681
2788
  "div",
2682
2789
  {
2683
2790
  "data-slot": "diff-viewer",
2684
2791
  className: cn("w-full overflow-hidden rounded-md border border-border font-mono text-xs", className),
2685
2792
  style,
2686
2793
  children: [
2687
- split && (oldTitle || newTitle) ? /* @__PURE__ */ jsxs26("div", { "data-slot": "diff-viewer-header", className: "flex border-b border-border bg-muted font-sans", children: [
2794
+ split && (oldTitle || newTitle) ? /* @__PURE__ */ jsxs27("div", { "data-slot": "diff-viewer-header", className: "flex border-b border-border bg-muted font-sans", children: [
2688
2795
  /* @__PURE__ */ jsx37("div", { className: "w-1/2 border-r border-border px-2 py-1.5 font-medium", children: oldTitle ?? "" }),
2689
2796
  /* @__PURE__ */ jsx37("div", { className: "w-1/2 px-2 py-1.5 font-medium", children: newTitle ?? "" })
2690
2797
  ] }) : null,
@@ -2697,7 +2804,7 @@ function DiffViewer({ oldText = "", newText = "", split, oldTitle, newTitle, cla
2697
2804
  // src/components/components/DocumentPreview/index.tsx
2698
2805
  import { useI18n as useI18n11 } from "@pactor-app/runtime";
2699
2806
  import { useState as useState14 } from "react";
2700
- import { jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
2807
+ import { jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
2701
2808
  var MIN_SCALE = 0.5;
2702
2809
  var MAX_SCALE = 2;
2703
2810
  var toolButtonClass = "flex size-8 items-center justify-center rounded-md hover:bg-accent disabled:pointer-events-none disabled:opacity-50";
@@ -2717,14 +2824,14 @@ function DocumentPreview({ pages = [], currentPage, onChange, className, style }
2717
2824
  onChange?.(next);
2718
2825
  }
2719
2826
  };
2720
- return /* @__PURE__ */ jsxs27(
2827
+ return /* @__PURE__ */ jsxs28(
2721
2828
  "div",
2722
2829
  {
2723
2830
  "data-slot": "document-preview",
2724
2831
  className: cn("flex w-full flex-col overflow-hidden rounded-md border border-border", className),
2725
2832
  style,
2726
2833
  children: [
2727
- /* @__PURE__ */ jsxs27(
2834
+ /* @__PURE__ */ jsxs28(
2728
2835
  "div",
2729
2836
  {
2730
2837
  "data-slot": "document-preview-toolbar",
@@ -2810,7 +2917,7 @@ function DocumentPreview({ pages = [], currentPage, onChange, className, style }
2810
2917
  import { useI18n as useI18n12, useRenderer as useRenderer9 } from "@pactor-app/runtime";
2811
2918
  import { XIcon } from "lucide-react";
2812
2919
  import { useEffect as useEffect10, useState as useState15 } from "react";
2813
- import { Fragment as Fragment2, jsx as jsx39, jsxs as jsxs28 } from "react/jsx-runtime";
2920
+ import { Fragment as Fragment2, jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
2814
2921
  function Drawer2({
2815
2922
  title,
2816
2923
  open,
@@ -2850,7 +2957,7 @@ function Drawer2({
2850
2957
  handleClose();
2851
2958
  }
2852
2959
  },
2853
- children: /* @__PURE__ */ jsxs28(
2960
+ children: /* @__PURE__ */ jsxs29(
2854
2961
  DrawerContent,
2855
2962
  {
2856
2963
  className,
@@ -2870,7 +2977,7 @@ function Drawer2({
2870
2977
  ) : null,
2871
2978
  title ? /* @__PURE__ */ jsx39(DrawerHeader, { children: /* @__PURE__ */ jsx39(DrawerTitle, { children: title }) }) : null,
2872
2979
  /* @__PURE__ */ jsx39("div", { className: "flex-1 overflow-auto p-4", children }),
2873
- footer !== false ? /* @__PURE__ */ jsx39(DrawerFooter, { className: "shrink-0 flex-row justify-end gap-2 border-t border-border px-4 py-3", children: footer !== void 0 ? renderChildren([footer]) : /* @__PURE__ */ jsxs28(Fragment2, { children: [
2980
+ footer !== false ? /* @__PURE__ */ jsx39(DrawerFooter, { className: "shrink-0 flex-row justify-end gap-2 border-t border-border px-4 py-3", children: footer !== void 0 ? renderChildren([footer]) : /* @__PURE__ */ jsxs29(Fragment2, { children: [
2874
2981
  /* @__PURE__ */ jsx39(Button, { type: "button", variant: "outline", onClick: handleClose, children: cancelText ?? t("pactor.alertDialog.cancel") }),
2875
2982
  /* @__PURE__ */ jsx39(Button, { type: "button", onClick: () => onOk?.(), children: okText ?? t("pactor.alertDialog.confirm") })
2876
2983
  ] }) }) : null
@@ -2881,167 +2988,21 @@ function Drawer2({
2881
2988
  );
2882
2989
  }
2883
2990
 
2884
- // src/components/components/DropdownMenu/index.tsx
2885
- import { jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
2886
- function renderDropdownItems(items, onSelect) {
2887
- const checkable = items.some((i) => i.selected);
2888
- return items.map((item, index) => {
2889
- const key = item.value ?? `item-${index}`;
2890
- if (item.separator) {
2891
- return /* @__PURE__ */ jsx40(DropdownMenuSeparator, {}, `separator-${index}`);
2892
- }
2893
- const leading = item.selected ? /* @__PURE__ */ jsx40(Icon, { name: "check", size: "sm" }) : item.icon ? /* @__PURE__ */ jsx40(Icon, { name: item.icon, size: "sm" }) : checkable ? /* @__PURE__ */ jsx40("span", { className: "size-4 shrink-0" }) : null;
2894
- if (item.children && item.children.length > 0) {
2895
- return /* @__PURE__ */ jsxs29(DropdownMenuSub, { children: [
2896
- /* @__PURE__ */ jsxs29(DropdownMenuSubTrigger, { disabled: item.disabled, children: [
2897
- leading,
2898
- item.label,
2899
- item.trailing ? /* @__PURE__ */ jsx40("span", { className: "ml-auto pl-4 text-xs text-muted-foreground", children: item.trailing }) : null
2900
- ] }),
2901
- /* @__PURE__ */ jsx40(DropdownMenuSubContent, { children: renderDropdownItems(item.children, onSelect) })
2902
- ] }, key);
2903
- }
2904
- return /* @__PURE__ */ jsxs29(
2905
- DropdownMenuItem,
2906
- {
2907
- variant: item.danger ? "destructive" : "default",
2908
- disabled: item.disabled,
2909
- onClick: () => item.value !== void 0 && onSelect?.(item.value),
2910
- children: [
2911
- leading,
2912
- item.label,
2913
- item.trailing ? /* @__PURE__ */ jsx40("span", { className: "ml-auto pl-4 text-xs text-muted-foreground", children: item.trailing }) : null
2914
- ]
2915
- },
2916
- key
2917
- );
2918
- });
2919
- }
2920
- function DropdownMenu2({
2921
- items = [],
2922
- onSelect,
2923
- children,
2924
- side,
2925
- align,
2926
- className,
2927
- style
2928
- }) {
2929
- return /* @__PURE__ */ jsxs29(DropdownMenu, { children: [
2930
- /* @__PURE__ */ jsx40(
2931
- DropdownMenuTrigger,
2932
- {
2933
- nativeButton: false,
2934
- render: triggerWrapper("dropdown-menu-trigger-wrap"),
2935
- children
2936
- }
2937
- ),
2938
- /* @__PURE__ */ jsx40(DropdownMenuContent, { className, style, side, align, children: renderDropdownItems(items, onSelect) })
2939
- ] });
2940
- }
2941
-
2942
2991
  // src/components/components/Empty/index.tsx
2943
- import { jsx as jsx41, jsxs as jsxs30 } from "react/jsx-runtime";
2992
+ import { jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
2944
2993
  function Empty2({ title, description, children, className, style }) {
2945
2994
  return /* @__PURE__ */ jsxs30(Empty, { className, style, children: [
2946
2995
  /* @__PURE__ */ jsxs30(EmptyHeader, { children: [
2947
- title ? /* @__PURE__ */ jsx41(EmptyTitle, { children: title }) : null,
2948
- description ? /* @__PURE__ */ jsx41(EmptyDescription, { children: description }) : null
2996
+ title ? /* @__PURE__ */ jsx40(EmptyTitle, { children: title }) : null,
2997
+ description ? /* @__PURE__ */ jsx40(EmptyDescription, { children: description }) : null
2949
2998
  ] }),
2950
- children ? /* @__PURE__ */ jsx41(EmptyContent, { children }) : null
2999
+ children ? /* @__PURE__ */ jsx40(EmptyContent, { children }) : null
2951
3000
  ] });
2952
3001
  }
2953
3002
 
2954
- // src/components/components/Field/index.tsx
2955
- import { jsx as jsx42, jsxs as jsxs31 } from "react/jsx-runtime";
2956
- function Field2({
2957
- label,
2958
- required,
2959
- labelHint,
2960
- description,
2961
- error,
2962
- children,
2963
- className,
2964
- style,
2965
- labelClassName,
2966
- labelStyle,
2967
- labelHintClassName,
2968
- labelHintStyle,
2969
- controlClassName,
2970
- controlStyle,
2971
- descriptionClassName,
2972
- descriptionStyle,
2973
- errorClassName,
2974
- errorStyle
2975
- }) {
2976
- const form = useFormContext();
2977
- const inline = form?.layout === "inline";
2978
- return /* @__PURE__ */ jsxs31(
2979
- Field,
2980
- {
2981
- className: cn(
2982
- form?.layout === "vertical" && "mb-2",
2983
- // inline Form:label 与控件同一行(覆盖默认 flex-col)
2984
- inline && "flex-row items-center",
2985
- className
2986
- ),
2987
- style,
2988
- children: [
2989
- label || labelHint ? /* @__PURE__ */ jsxs31(
2990
- "div",
2991
- {
2992
- className: cn(
2993
- "flex min-h-3.5 items-center gap-2",
2994
- inline ? "shrink-0" : "w-full justify-between"
2995
- ),
2996
- children: [
2997
- label ? /* @__PURE__ */ jsxs31(FieldLabel, { className: labelClassName, style: labelStyle, children: [
2998
- required ? /* @__PURE__ */ jsxs31("span", { "aria-hidden": true, className: "text-destructive", children: [
2999
- "*",
3000
- " "
3001
- ] }) : null,
3002
- label
3003
- ] }) : /* @__PURE__ */ jsx42("span", {}),
3004
- labelHint ? /* @__PURE__ */ jsx42(
3005
- "span",
3006
- {
3007
- "data-slot": "field-label-hint",
3008
- className: cn(
3009
- "shrink-0 text-xs leading-none text-muted-foreground",
3010
- labelHintClassName
3011
- ),
3012
- style: labelHintStyle,
3013
- children: labelHint
3014
- }
3015
- ) : null
3016
- ]
3017
- }
3018
- ) : null,
3019
- /* @__PURE__ */ jsx42(
3020
- "div",
3021
- {
3022
- "data-slot": "field-control",
3023
- className: cn("[&>button+button]:ml-2", controlClassName),
3024
- style: controlStyle,
3025
- children
3026
- }
3027
- ),
3028
- description ? /* @__PURE__ */ jsx42(
3029
- FieldDescription,
3030
- {
3031
- className: descriptionClassName,
3032
- style: descriptionStyle,
3033
- children: description
3034
- }
3035
- ) : null,
3036
- error ? /* @__PURE__ */ jsx42(FieldError, { match: true, className: errorClassName, style: errorStyle, children: error }) : null
3037
- ]
3038
- }
3039
- );
3040
- }
3041
-
3042
3003
  // src/components/components/FilePreview/index.tsx
3043
3004
  import { useI18n as useI18n13 } from "@pactor-app/runtime";
3044
- import { jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
3005
+ import { jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
3045
3006
  var kindIcon = {
3046
3007
  image: "image",
3047
3008
  text: "file-text",
@@ -3074,7 +3035,7 @@ function FilePreview({
3074
3035
  }) {
3075
3036
  const resolvedKind = kind ?? inferKind(name, fileType);
3076
3037
  const { t } = useI18n13();
3077
- return /* @__PURE__ */ jsxs32(
3038
+ return /* @__PURE__ */ jsxs31(
3078
3039
  "div",
3079
3040
  {
3080
3041
  "data-slot": "file-preview",
@@ -3082,19 +3043,19 @@ function FilePreview({
3082
3043
  className: cn("w-full overflow-hidden rounded-md border border-border", className),
3083
3044
  style,
3084
3045
  children: [
3085
- /* @__PURE__ */ jsxs32("div", { "data-slot": "file-preview-body", className: "bg-muted", children: [
3086
- resolvedKind === "image" && src ? /* @__PURE__ */ jsx43("img", { src, alt: name ?? "", className: "max-h-72 w-full object-contain" }) : null,
3087
- resolvedKind === "video" && src ? /* @__PURE__ */ jsx43("video", { src, controls: true, playsInline: true, className: "max-h-72 w-full" }) : null,
3088
- resolvedKind === "audio" && src ? /* @__PURE__ */ jsx43("div", { className: "p-3", children: /* @__PURE__ */ jsx43("audio", { src, controls: true, className: "w-full" }) }) : null,
3089
- resolvedKind === "text" ? /* @__PURE__ */ jsx43("pre", { className: "max-h-72 overflow-auto p-3 text-xs whitespace-pre-wrap", children: content ?? "" }) : null,
3090
- resolvedKind === "other" || resolvedKind !== "text" && !src ? /* @__PURE__ */ jsx43("div", { className: "flex items-center justify-center p-6 text-muted-foreground", children: /* @__PURE__ */ jsx43(Icon, { name: kindIcon[resolvedKind], size: "lg" }) }) : null
3046
+ /* @__PURE__ */ jsxs31("div", { "data-slot": "file-preview-body", className: "bg-muted", children: [
3047
+ resolvedKind === "image" && src ? /* @__PURE__ */ jsx41("img", { src, alt: name ?? "", className: "max-h-72 w-full object-contain" }) : null,
3048
+ resolvedKind === "video" && src ? /* @__PURE__ */ jsx41("video", { src, controls: true, playsInline: true, className: "max-h-72 w-full" }) : null,
3049
+ resolvedKind === "audio" && src ? /* @__PURE__ */ jsx41("div", { className: "p-3", children: /* @__PURE__ */ jsx41("audio", { src, controls: true, className: "w-full" }) }) : null,
3050
+ resolvedKind === "text" ? /* @__PURE__ */ jsx41("pre", { className: "max-h-72 overflow-auto p-3 text-xs whitespace-pre-wrap", children: content ?? "" }) : null,
3051
+ resolvedKind === "other" || resolvedKind !== "text" && !src ? /* @__PURE__ */ jsx41("div", { className: "flex items-center justify-center p-6 text-muted-foreground", children: /* @__PURE__ */ jsx41(Icon, { name: kindIcon[resolvedKind], size: "lg" }) }) : null
3091
3052
  ] }),
3092
- /* @__PURE__ */ jsxs32("div", { "data-slot": "file-preview-meta", className: "flex items-center gap-2 px-3 py-2 text-sm", children: [
3093
- /* @__PURE__ */ jsx43(Icon, { name: kindIcon[resolvedKind], size: "sm" }),
3094
- /* @__PURE__ */ jsx43("span", { className: "min-w-0 flex-1 truncate font-medium", children: name ?? t("pactor.filePreview.unnamed") }),
3095
- fileSize !== void 0 ? /* @__PURE__ */ jsx43("span", { className: "shrink-0 text-xs text-muted-foreground", children: formatSize(fileSize) }) : null,
3096
- fileType ? /* @__PURE__ */ jsx43("span", { className: "shrink-0 text-xs text-muted-foreground", children: fileType }) : null,
3097
- src ? /* @__PURE__ */ jsx43(
3053
+ /* @__PURE__ */ jsxs31("div", { "data-slot": "file-preview-meta", className: "flex items-center gap-2 px-3 py-2 text-sm", children: [
3054
+ /* @__PURE__ */ jsx41(Icon, { name: kindIcon[resolvedKind], size: "sm" }),
3055
+ /* @__PURE__ */ jsx41("span", { className: "min-w-0 flex-1 truncate font-medium", children: name ?? t("pactor.filePreview.unnamed") }),
3056
+ fileSize !== void 0 ? /* @__PURE__ */ jsx41("span", { className: "shrink-0 text-xs text-muted-foreground", children: formatSize(fileSize) }) : null,
3057
+ fileType ? /* @__PURE__ */ jsx41("span", { className: "shrink-0 text-xs text-muted-foreground", children: fileType }) : null,
3058
+ src ? /* @__PURE__ */ jsx41(
3098
3059
  "a",
3099
3060
  {
3100
3061
  "data-slot": "file-preview-download",
@@ -3102,7 +3063,7 @@ function FilePreview({
3102
3063
  download: name ?? true,
3103
3064
  className: "shrink-0 text-primary hover:underline",
3104
3065
  "aria-label": t("pactor.filePreview.download"),
3105
- children: /* @__PURE__ */ jsx43(Icon, { name: "download", size: "sm" })
3066
+ children: /* @__PURE__ */ jsx41(Icon, { name: "download", size: "sm" })
3106
3067
  }
3107
3068
  ) : null
3108
3069
  ] })
@@ -3112,7 +3073,7 @@ function FilePreview({
3112
3073
  }
3113
3074
 
3114
3075
  // src/components/components/Flex/index.tsx
3115
- import { jsx as jsx44 } from "react/jsx-runtime";
3076
+ import { jsx as jsx42 } from "react/jsx-runtime";
3116
3077
  var gapClass = {
3117
3078
  small: "gap-(--flex-gap-sm)",
3118
3079
  middle: "gap-(--flex-gap-md)",
@@ -3142,7 +3103,7 @@ function Flex({
3142
3103
  style,
3143
3104
  children
3144
3105
  }) {
3145
- return /* @__PURE__ */ jsx44(
3106
+ return /* @__PURE__ */ jsx42(
3146
3107
  "div",
3147
3108
  {
3148
3109
  "data-slot": "flex",
@@ -3162,9 +3123,9 @@ function Flex({
3162
3123
  }
3163
3124
 
3164
3125
  // src/components/components/Footer/index.tsx
3165
- import { jsx as jsx45 } from "react/jsx-runtime";
3126
+ import { jsx as jsx43 } from "react/jsx-runtime";
3166
3127
  function Footer({ className, style, children }) {
3167
- return /* @__PURE__ */ jsx45(
3128
+ return /* @__PURE__ */ jsx43(
3168
3129
  "footer",
3169
3130
  {
3170
3131
  "data-slot": "layout-footer",
@@ -3184,7 +3145,7 @@ import { useCallback as useCallback2, useState as useState17 } from "react";
3184
3145
  // src/components/components/ImageViewer/index.tsx
3185
3146
  import { useI18n as useI18n14 } from "@pactor-app/runtime";
3186
3147
  import { useCallback, useEffect as useEffect11, useState as useState16 } from "react";
3187
- import { jsx as jsx46, jsxs as jsxs33 } from "react/jsx-runtime";
3148
+ import { jsx as jsx44, jsxs as jsxs32 } from "react/jsx-runtime";
3188
3149
  var MIN_SCALE2 = 0.5;
3189
3150
  var MAX_SCALE2 = 4;
3190
3151
  var toolButtonClass2 = "flex size-9 items-center justify-center rounded-md text-foreground hover:bg-accent disabled:pointer-events-none disabled:opacity-50";
@@ -3206,7 +3167,7 @@ function ImageLightbox({ src, alt, index, count, onPrev, onNext, onClose }) {
3206
3167
  useEffect11(() => {
3207
3168
  reset();
3208
3169
  }, [src, reset]);
3209
- return /* @__PURE__ */ jsxs33(
3170
+ return /* @__PURE__ */ jsxs32(
3210
3171
  "div",
3211
3172
  {
3212
3173
  "data-slot": "image-lightbox",
@@ -3215,7 +3176,7 @@ function ImageLightbox({ src, alt, index, count, onPrev, onNext, onClose }) {
3215
3176
  "aria-modal": "true",
3216
3177
  "aria-label": t("pactor.imageViewer.open"),
3217
3178
  children: [
3218
- /* @__PURE__ */ jsx46(
3179
+ /* @__PURE__ */ jsx44(
3219
3180
  "button",
3220
3181
  {
3221
3182
  type: "button",
@@ -3224,7 +3185,7 @@ function ImageLightbox({ src, alt, index, count, onPrev, onNext, onClose }) {
3224
3185
  onClick: onClose
3225
3186
  }
3226
3187
  ),
3227
- count !== void 0 && count > 1 && index !== void 0 ? /* @__PURE__ */ jsxs33(
3188
+ count !== void 0 && count > 1 && index !== void 0 ? /* @__PURE__ */ jsxs32(
3228
3189
  "div",
3229
3190
  {
3230
3191
  "data-slot": "image-lightbox-indicator",
@@ -3236,7 +3197,7 @@ function ImageLightbox({ src, alt, index, count, onPrev, onNext, onClose }) {
3236
3197
  ]
3237
3198
  }
3238
3199
  ) : null,
3239
- /* @__PURE__ */ jsx46("div", { className: "pointer-events-none relative flex min-h-0 flex-1 items-center justify-center overflow-hidden", children: src ? /* @__PURE__ */ jsx46(
3200
+ /* @__PURE__ */ jsx44("div", { className: "pointer-events-none relative flex min-h-0 flex-1 items-center justify-center overflow-hidden", children: src ? /* @__PURE__ */ jsx44(
3240
3201
  "img",
3241
3202
  {
3242
3203
  "data-slot": "image-lightbox-img",
@@ -3246,7 +3207,7 @@ function ImageLightbox({ src, alt, index, count, onPrev, onNext, onClose }) {
3246
3207
  style: { transform: `scale(${scale}) rotate(${rotate}deg)` }
3247
3208
  }
3248
3209
  ) : null }),
3249
- onPrev ? /* @__PURE__ */ jsx46(
3210
+ onPrev ? /* @__PURE__ */ jsx44(
3250
3211
  "button",
3251
3212
  {
3252
3213
  type: "button",
@@ -3254,10 +3215,10 @@ function ImageLightbox({ src, alt, index, count, onPrev, onNext, onClose }) {
3254
3215
  "aria-label": t("pactor.imageViewer.prev"),
3255
3216
  className: cn(toolButtonClass2, "absolute top-1/2 left-4 z-10 -translate-y-1/2 bg-background/80"),
3256
3217
  onClick: onPrev,
3257
- children: /* @__PURE__ */ jsx46(Icon, { name: "chevron-left" })
3218
+ children: /* @__PURE__ */ jsx44(Icon, { name: "chevron-left" })
3258
3219
  }
3259
3220
  ) : null,
3260
- onNext ? /* @__PURE__ */ jsx46(
3221
+ onNext ? /* @__PURE__ */ jsx44(
3261
3222
  "button",
3262
3223
  {
3263
3224
  type: "button",
@@ -3265,16 +3226,16 @@ function ImageLightbox({ src, alt, index, count, onPrev, onNext, onClose }) {
3265
3226
  "aria-label": t("pactor.imageViewer.next"),
3266
3227
  className: cn(toolButtonClass2, "absolute top-1/2 right-4 z-10 -translate-y-1/2 bg-background/80"),
3267
3228
  onClick: onNext,
3268
- children: /* @__PURE__ */ jsx46(Icon, { name: "chevron-right" })
3229
+ children: /* @__PURE__ */ jsx44(Icon, { name: "chevron-right" })
3269
3230
  }
3270
3231
  ) : null,
3271
- /* @__PURE__ */ jsxs33(
3232
+ /* @__PURE__ */ jsxs32(
3272
3233
  "div",
3273
3234
  {
3274
3235
  "data-slot": "image-lightbox-toolbar",
3275
3236
  className: "absolute bottom-4 left-1/2 z-10 flex -translate-x-1/2 items-center gap-1 rounded-md bg-background/80 p-1 shadow-md",
3276
3237
  children: [
3277
- /* @__PURE__ */ jsx46(
3238
+ /* @__PURE__ */ jsx44(
3278
3239
  "button",
3279
3240
  {
3280
3241
  type: "button",
@@ -3283,10 +3244,10 @@ function ImageLightbox({ src, alt, index, count, onPrev, onNext, onClose }) {
3283
3244
  className: toolButtonClass2,
3284
3245
  disabled: scale <= MIN_SCALE2,
3285
3246
  onClick: () => setScale((value) => Math.max(MIN_SCALE2, value - 0.5)),
3286
- children: /* @__PURE__ */ jsx46(Icon, { name: "zoom-out", size: "sm" })
3247
+ children: /* @__PURE__ */ jsx44(Icon, { name: "zoom-out", size: "sm" })
3287
3248
  }
3288
3249
  ),
3289
- /* @__PURE__ */ jsx46(
3250
+ /* @__PURE__ */ jsx44(
3290
3251
  "button",
3291
3252
  {
3292
3253
  type: "button",
@@ -3295,10 +3256,10 @@ function ImageLightbox({ src, alt, index, count, onPrev, onNext, onClose }) {
3295
3256
  className: toolButtonClass2,
3296
3257
  disabled: scale >= MAX_SCALE2,
3297
3258
  onClick: () => setScale((value) => Math.min(MAX_SCALE2, value + 0.5)),
3298
- children: /* @__PURE__ */ jsx46(Icon, { name: "zoom-in", size: "sm" })
3259
+ children: /* @__PURE__ */ jsx44(Icon, { name: "zoom-in", size: "sm" })
3299
3260
  }
3300
3261
  ),
3301
- /* @__PURE__ */ jsx46(
3262
+ /* @__PURE__ */ jsx44(
3302
3263
  "button",
3303
3264
  {
3304
3265
  type: "button",
@@ -3306,10 +3267,10 @@ function ImageLightbox({ src, alt, index, count, onPrev, onNext, onClose }) {
3306
3267
  "aria-label": t("pactor.imageViewer.rotate"),
3307
3268
  className: toolButtonClass2,
3308
3269
  onClick: () => setRotate((value) => value - 90),
3309
- children: /* @__PURE__ */ jsx46(Icon, { name: "rotate-ccw", size: "sm" })
3270
+ children: /* @__PURE__ */ jsx44(Icon, { name: "rotate-ccw", size: "sm" })
3310
3271
  }
3311
3272
  ),
3312
- /* @__PURE__ */ jsx46(
3273
+ /* @__PURE__ */ jsx44(
3313
3274
  "button",
3314
3275
  {
3315
3276
  type: "button",
@@ -3317,10 +3278,10 @@ function ImageLightbox({ src, alt, index, count, onPrev, onNext, onClose }) {
3317
3278
  "aria-label": t("pactor.imageViewer.reset"),
3318
3279
  className: toolButtonClass2,
3319
3280
  onClick: reset,
3320
- children: /* @__PURE__ */ jsx46(Icon, { name: "refresh-ccw", size: "sm" })
3281
+ children: /* @__PURE__ */ jsx44(Icon, { name: "refresh-ccw", size: "sm" })
3321
3282
  }
3322
3283
  ),
3323
- /* @__PURE__ */ jsx46(
3284
+ /* @__PURE__ */ jsx44(
3324
3285
  "button",
3325
3286
  {
3326
3287
  type: "button",
@@ -3328,7 +3289,7 @@ function ImageLightbox({ src, alt, index, count, onPrev, onNext, onClose }) {
3328
3289
  "aria-label": t("pactor.imageViewer.close"),
3329
3290
  className: toolButtonClass2,
3330
3291
  onClick: onClose,
3331
- children: /* @__PURE__ */ jsx46(Icon, { name: "x", size: "sm" })
3292
+ children: /* @__PURE__ */ jsx44(Icon, { name: "x", size: "sm" })
3332
3293
  }
3333
3294
  )
3334
3295
  ]
@@ -3344,8 +3305,8 @@ function ImageViewer({ src, alt, preview = true, onClose, className, style }) {
3344
3305
  setOpen(false);
3345
3306
  onClose?.();
3346
3307
  }, [onClose]);
3347
- return /* @__PURE__ */ jsxs33("span", { "data-slot": "image-viewer", className: cn("inline-block", className), style, children: [
3348
- src ? /* @__PURE__ */ jsx46(
3308
+ return /* @__PURE__ */ jsxs32("span", { "data-slot": "image-viewer", className: cn("inline-block", className), style, children: [
3309
+ src ? /* @__PURE__ */ jsx44(
3349
3310
  "img",
3350
3311
  {
3351
3312
  "data-slot": "image-viewer-img",
@@ -3355,12 +3316,12 @@ function ImageViewer({ src, alt, preview = true, onClose, className, style }) {
3355
3316
  onClick: preview ? () => setOpen(true) : void 0
3356
3317
  }
3357
3318
  ) : null,
3358
- open && src ? /* @__PURE__ */ jsx46(ImageLightbox, { src, alt, onClose: close }) : null
3319
+ open && src ? /* @__PURE__ */ jsx44(ImageLightbox, { src, alt, onClose: close }) : null
3359
3320
  ] });
3360
3321
  }
3361
3322
 
3362
3323
  // src/components/components/Gallery/index.tsx
3363
- import { jsx as jsx47, jsxs as jsxs34 } from "react/jsx-runtime";
3324
+ import { jsx as jsx45, jsxs as jsxs33 } from "react/jsx-runtime";
3364
3325
  var columnsClass = {
3365
3326
  2: "grid-cols-2",
3366
3327
  3: "grid-cols-3",
@@ -3373,9 +3334,9 @@ function Gallery({ items = [], columns = 3, onClose, className, style }) {
3373
3334
  onClose?.();
3374
3335
  }, [onClose]);
3375
3336
  const active = current !== null ? items[current] : void 0;
3376
- return /* @__PURE__ */ jsxs34("div", { "data-slot": "gallery", className: cn("w-full", className), style, children: [
3377
- /* @__PURE__ */ jsx47("div", { className: cn("grid gap-3", columnsClass[columns] ?? columnsClass[3]), children: items.map((item, index) => /* @__PURE__ */ jsxs34("figure", { "data-slot": "gallery-item", className: "m-0", children: [
3378
- /* @__PURE__ */ jsx47(
3337
+ return /* @__PURE__ */ jsxs33("div", { "data-slot": "gallery", className: cn("w-full", className), style, children: [
3338
+ /* @__PURE__ */ jsx45("div", { className: cn("grid gap-3", columnsClass[columns] ?? columnsClass[3]), children: items.map((item, index) => /* @__PURE__ */ jsxs33("figure", { "data-slot": "gallery-item", className: "m-0", children: [
3339
+ /* @__PURE__ */ jsx45(
3379
3340
  "img",
3380
3341
  {
3381
3342
  src: item.src,
@@ -3384,9 +3345,9 @@ function Gallery({ items = [], columns = 3, onClose, className, style }) {
3384
3345
  onClick: () => setCurrent(index)
3385
3346
  }
3386
3347
  ),
3387
- item.caption ? /* @__PURE__ */ jsx47("figcaption", { className: "mt-1 truncate text-xs text-muted-foreground", children: item.caption }) : null
3348
+ item.caption ? /* @__PURE__ */ jsx45("figcaption", { className: "mt-1 truncate text-xs text-muted-foreground", children: item.caption }) : null
3388
3349
  ] }, index)) }),
3389
- active ? /* @__PURE__ */ jsx47(
3350
+ active ? /* @__PURE__ */ jsx45(
3390
3351
  ImageLightbox,
3391
3352
  {
3392
3353
  src: active.src,
@@ -3410,7 +3371,7 @@ import {
3410
3371
  useRef as useRef4,
3411
3372
  useState as useState18
3412
3373
  } from "react";
3413
- import { jsx as jsx48 } from "react/jsx-runtime";
3374
+ import { jsx as jsx46 } from "react/jsx-runtime";
3414
3375
  function isEmpty(value) {
3415
3376
  return value === void 0 || value === null || value === "";
3416
3377
  }
@@ -3495,7 +3456,7 @@ function Form({
3495
3456
  context.state.set("form", values);
3496
3457
  onSubmit?.(values);
3497
3458
  };
3498
- return /* @__PURE__ */ jsx48(FormContextProvider, { value: formContext, children: /* @__PURE__ */ jsx48(
3459
+ return /* @__PURE__ */ jsx46(FormContextProvider, { value: formContext, children: /* @__PURE__ */ jsx46(
3499
3460
  "form",
3500
3461
  {
3501
3462
  ref: formElRef,
@@ -3511,7 +3472,7 @@ function Form({
3511
3472
  // src/components/components/For/index.tsx
3512
3473
  import { Fragment as Fragment3 } from "react";
3513
3474
  import { useRenderer as useRenderer11 } from "@pactor-app/runtime";
3514
- import { Fragment as Fragment4, jsx as jsx49, jsxs as jsxs35 } from "react/jsx-runtime";
3475
+ import { Fragment as Fragment4, jsx as jsx47, jsxs as jsxs34 } from "react/jsx-runtime";
3515
3476
  function For({
3516
3477
  items,
3517
3478
  keyField,
@@ -3531,7 +3492,7 @@ function For({
3531
3492
  const renderRow = (item, index) => renderChildren(dslChildren, { row: item, rowIndex: index });
3532
3493
  if (columns !== void 0) {
3533
3494
  const cols = Math.max(1, columns);
3534
- return /* @__PURE__ */ jsxs35(
3495
+ return /* @__PURE__ */ jsxs34(
3535
3496
  "div",
3536
3497
  {
3537
3498
  "data-slot": "grid",
@@ -3543,21 +3504,21 @@ function For({
3543
3504
  ...style
3544
3505
  },
3545
3506
  children: [
3546
- before ? /* @__PURE__ */ jsx49("div", { "data-slot": "grid-item", children: renderChildren(before) }) : null,
3547
- rows.map((item, index) => /* @__PURE__ */ jsx49("div", { "data-slot": "grid-item", children: renderRow(item, index) }, keyOf(item, index)))
3507
+ before ? /* @__PURE__ */ jsx47("div", { "data-slot": "grid-item", children: renderChildren(before) }) : null,
3508
+ rows.map((item, index) => /* @__PURE__ */ jsx47("div", { "data-slot": "grid-item", children: renderRow(item, index) }, keyOf(item, index)))
3548
3509
  ]
3549
3510
  }
3550
3511
  );
3551
3512
  }
3552
- return /* @__PURE__ */ jsx49(Fragment4, { children: rows.map((item, index) => /* @__PURE__ */ jsx49(Fragment3, { children: renderRow(item, index) }, keyOf(item, index))) });
3513
+ return /* @__PURE__ */ jsx47(Fragment4, { children: rows.map((item, index) => /* @__PURE__ */ jsx47(Fragment3, { children: renderRow(item, index) }, keyOf(item, index))) });
3553
3514
  }
3554
3515
 
3555
3516
  // src/components/components/Grid/index.tsx
3556
3517
  import { Children, isValidElement as isValidElement2 } from "react";
3557
- import { jsx as jsx50 } from "react/jsx-runtime";
3518
+ import { jsx as jsx48 } from "react/jsx-runtime";
3558
3519
  function Grid({ columns = 1, gap, className, style, children }) {
3559
3520
  const cols = Math.max(1, columns);
3560
- return /* @__PURE__ */ jsx50(
3521
+ return /* @__PURE__ */ jsx48(
3561
3522
  "div",
3562
3523
  {
3563
3524
  "data-slot": "grid",
@@ -3571,18 +3532,18 @@ function Grid({ columns = 1, gap, className, style, children }) {
3571
3532
  children: Children.map(children, (child, index) => {
3572
3533
  const childStyle = isValidElement2(child) ? child.props.style : void 0;
3573
3534
  const spanStyle = childStyle && (childStyle.gridColumn !== void 0 || childStyle.gridRow !== void 0) ? { gridColumn: childStyle.gridColumn, gridRow: childStyle.gridRow } : void 0;
3574
- return /* @__PURE__ */ jsx50("div", { "data-slot": "grid-item", style: spanStyle, children: child }, index);
3535
+ return /* @__PURE__ */ jsx48("div", { "data-slot": "grid-item", style: spanStyle, children: child }, index);
3575
3536
  })
3576
3537
  }
3577
3538
  );
3578
3539
  }
3579
3540
 
3580
3541
  // src/components/components/Row/index.tsx
3581
- import { createContext as createContext2, useContext as useContext2 } from "react";
3582
- import { jsx as jsx51 } from "react/jsx-runtime";
3583
- var RowContext = createContext2([0, 0]);
3542
+ import { createContext as createContext3, useContext as useContext3 } from "react";
3543
+ import { jsx as jsx49 } from "react/jsx-runtime";
3544
+ var RowContext = createContext3([0, 0]);
3584
3545
  function useRowGutter() {
3585
- return useContext2(RowContext);
3546
+ return useContext3(RowContext);
3586
3547
  }
3587
3548
  var justifyMap = {
3588
3549
  start: "flex-start",
@@ -3608,7 +3569,7 @@ function Row({
3608
3569
  children
3609
3570
  }) {
3610
3571
  const [h, v] = Array.isArray(gutter) ? gutter : [gutter ?? 0, gutter ?? 0];
3611
- return /* @__PURE__ */ jsx51(RowContext.Provider, { value: [h, v], children: /* @__PURE__ */ jsx51(
3572
+ return /* @__PURE__ */ jsx49(RowContext.Provider, { value: [h, v], children: /* @__PURE__ */ jsx49(
3612
3573
  "div",
3613
3574
  {
3614
3575
  "data-slot": "row",
@@ -3626,7 +3587,7 @@ function Row({
3626
3587
  }
3627
3588
 
3628
3589
  // src/components/components/Col/index.tsx
3629
- import { jsx as jsx52 } from "react/jsx-runtime";
3590
+ import { jsx as jsx50 } from "react/jsx-runtime";
3630
3591
  var BREAKPOINTS = {
3631
3592
  xs: "(max-width: 575.98px)",
3632
3593
  sm: "(min-width: 576px)",
@@ -3726,14 +3687,14 @@ function Col({
3726
3687
  ...responsiveClasses("xl", xl),
3727
3688
  ...responsiveClasses("xxl", xxl)
3728
3689
  ];
3729
- return /* @__PURE__ */ jsx52("div", { "data-slot": "col", className: cn("min-w-0", className, responsive), style: base, children });
3690
+ return /* @__PURE__ */ jsx50("div", { "data-slot": "col", className: cn("min-w-0", className, responsive), style: base, children });
3730
3691
  }
3731
3692
 
3732
3693
  // src/components/components/Header/index.tsx
3733
3694
  import { useI18n as useI18n15 } from "@pactor-app/runtime";
3734
3695
  import { ChevronDownIcon } from "lucide-react";
3735
3696
  import { useState as useState19 } from "react";
3736
- import { Fragment as Fragment5, jsx as jsx53, jsxs as jsxs36 } from "react/jsx-runtime";
3697
+ import { Fragment as Fragment5, jsx as jsx51, jsxs as jsxs35 } from "react/jsx-runtime";
3737
3698
  var menuItemClass = "flex items-center gap-1 rounded-md px-3 py-2 text-sm transition-colors text-muted-foreground hover:bg-accent/50 hover:text-foreground";
3738
3699
  function Header({
3739
3700
  logo,
@@ -3766,10 +3727,10 @@ function Header({
3766
3727
  className
3767
3728
  );
3768
3729
  if (!hasBrand && !dropdown && !hasMenu && !hasUser && !hasLocales && !themeToggle) {
3769
- return /* @__PURE__ */ jsx53("header", { "data-slot": "layout-header", className: rootClass, style, children });
3730
+ return /* @__PURE__ */ jsx51("header", { "data-slot": "layout-header", className: rootClass, style, children });
3770
3731
  }
3771
- const brandNode = hasBrand && /* @__PURE__ */ jsxs36("div", { "data-slot": "header-brand", className: "flex items-center gap-2", children: [
3772
- logo !== void 0 && /* @__PURE__ */ jsx53(
3732
+ const brandNode = hasBrand && /* @__PURE__ */ jsxs35("div", { "data-slot": "header-brand", className: "flex items-center gap-2", children: [
3733
+ logo !== void 0 && /* @__PURE__ */ jsx51(
3773
3734
  "img",
3774
3735
  {
3775
3736
  "data-slot": "header-brand-logo",
@@ -3778,24 +3739,24 @@ function Header({
3778
3739
  className: "size-6 shrink-0 object-contain"
3779
3740
  }
3780
3741
  ),
3781
- title !== void 0 && /* @__PURE__ */ jsx53("span", { "data-slot": "header-brand-title", className: "text-base font-semibold", children: title })
3742
+ title !== void 0 && /* @__PURE__ */ jsx51("span", { "data-slot": "header-brand-title", className: "text-base font-semibold", children: title })
3782
3743
  ] });
3783
- const dropdownNode = dropdown !== void 0 && /* @__PURE__ */ jsx53(HeaderDropdownArea, { dropdown, onSelect: onDropdownSelect });
3744
+ const dropdownNode = dropdown !== void 0 && /* @__PURE__ */ jsx51(HeaderDropdownArea, { dropdown, onSelect: onDropdownSelect });
3784
3745
  const showLeft = brandLeft || dropdownLeft || hasMenu;
3785
3746
  const showRight = dropdownRight || brandRight || hasLocales || hasUser || themeToggle;
3786
- return /* @__PURE__ */ jsxs36("header", { "data-slot": "layout-header", className: rootClass, style, children: [
3787
- showLeft && /* @__PURE__ */ jsxs36("div", { "data-slot": "header-left", className: "flex items-center gap-4", children: [
3747
+ return /* @__PURE__ */ jsxs35("header", { "data-slot": "layout-header", className: rootClass, style, children: [
3748
+ showLeft && /* @__PURE__ */ jsxs35("div", { "data-slot": "header-left", className: "flex items-center gap-4", children: [
3788
3749
  brandLeft && brandNode,
3789
3750
  dropdownLeft && dropdownNode,
3790
- hasMenu && /* @__PURE__ */ jsx53(HeaderMenuArea, { items: menu, onSelect: onMenuSelect })
3751
+ hasMenu && /* @__PURE__ */ jsx51(HeaderMenuArea, { items: menu, onSelect: onMenuSelect })
3791
3752
  ] }),
3792
- /* @__PURE__ */ jsx53("div", { "data-slot": "header-center", className: "flex flex-1 items-center gap-4", children }),
3793
- showRight && /* @__PURE__ */ jsxs36("div", { "data-slot": "header-right", className: "flex items-center gap-4", children: [
3753
+ /* @__PURE__ */ jsx51("div", { "data-slot": "header-center", className: "flex flex-1 items-center gap-4", children }),
3754
+ showRight && /* @__PURE__ */ jsxs35("div", { "data-slot": "header-right", className: "flex items-center gap-4", children: [
3794
3755
  dropdownRight && dropdownNode,
3795
3756
  brandRight && brandNode,
3796
- themeToggle && /* @__PURE__ */ jsx53(HeaderThemeToggle, { onSelect: onThemeChange }),
3797
- hasLocales && /* @__PURE__ */ jsx53(HeaderLocalesArea, { locales, onSelect: onLocaleChange }),
3798
- hasUser && /* @__PURE__ */ jsx53(HeaderUserArea, { user, onSelect: onUserSelect })
3757
+ themeToggle && /* @__PURE__ */ jsx51(HeaderThemeToggle, { onSelect: onThemeChange }),
3758
+ hasLocales && /* @__PURE__ */ jsx51(HeaderLocalesArea, { locales, onSelect: onLocaleChange }),
3759
+ hasUser && /* @__PURE__ */ jsx51(HeaderUserArea, { user, onSelect: onUserSelect })
3799
3760
  ] })
3800
3761
  ] });
3801
3762
  }
@@ -3803,42 +3764,42 @@ function HeaderDropdownArea({
3803
3764
  dropdown,
3804
3765
  onSelect
3805
3766
  }) {
3806
- return /* @__PURE__ */ jsxs36(DropdownMenu, { children: [
3807
- /* @__PURE__ */ jsxs36(
3767
+ return /* @__PURE__ */ jsxs35(DropdownMenu, { children: [
3768
+ /* @__PURE__ */ jsxs35(
3808
3769
  DropdownMenuTrigger,
3809
3770
  {
3810
3771
  "data-slot": "header-dropdown",
3811
3772
  className: cn(menuItemClass, "outline-hidden cursor-pointer"),
3812
3773
  children: [
3813
3774
  dropdown.label,
3814
- /* @__PURE__ */ jsx53(ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
3775
+ /* @__PURE__ */ jsx51(ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
3815
3776
  ]
3816
3777
  }
3817
3778
  ),
3818
- /* @__PURE__ */ jsx53(DropdownMenuContent, { children: renderDropdownItems(dropdown.items, onSelect) })
3779
+ /* @__PURE__ */ jsx51(DropdownMenuContent, { children: renderDropdownItems(dropdown.items, onSelect) })
3819
3780
  ] });
3820
3781
  }
3821
3782
  function HeaderMenuArea({
3822
3783
  items,
3823
3784
  onSelect
3824
3785
  }) {
3825
- return /* @__PURE__ */ jsx53("nav", { "data-slot": "header-menu", className: "flex items-center gap-1", children: items.map(
3826
- (item) => item.children !== void 0 && item.children.length > 0 ? /* @__PURE__ */ jsxs36(DropdownMenu, { children: [
3827
- /* @__PURE__ */ jsxs36(
3786
+ return /* @__PURE__ */ jsx51("nav", { "data-slot": "header-menu", className: "flex items-center gap-1", children: items.map(
3787
+ (item) => item.children !== void 0 && item.children.length > 0 ? /* @__PURE__ */ jsxs35(DropdownMenu, { children: [
3788
+ /* @__PURE__ */ jsxs35(
3828
3789
  DropdownMenuTrigger,
3829
3790
  {
3830
3791
  "data-slot": "header-menu-item",
3831
3792
  "data-key": item.key,
3832
3793
  className: cn(menuItemClass, "outline-hidden cursor-pointer"),
3833
3794
  children: [
3834
- item.icon ? /* @__PURE__ */ jsx53(Icon, { name: item.icon, size: "sm" }) : null,
3795
+ item.icon ? /* @__PURE__ */ jsx51(Icon, { name: item.icon, size: "sm" }) : null,
3835
3796
  item.label,
3836
- /* @__PURE__ */ jsx53(ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
3797
+ /* @__PURE__ */ jsx51(ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
3837
3798
  ]
3838
3799
  }
3839
3800
  ),
3840
- /* @__PURE__ */ jsx53(DropdownMenuContent, { children: item.children.map((child) => /* @__PURE__ */ jsx53(HeaderMenuEntry, { item: child, onSelect }, child.key)) })
3841
- ] }, item.key) : /* @__PURE__ */ jsxs36(
3801
+ /* @__PURE__ */ jsx51(DropdownMenuContent, { children: item.children.map((child) => /* @__PURE__ */ jsx51(HeaderMenuEntry, { item: child, onSelect }, child.key)) })
3802
+ ] }, item.key) : /* @__PURE__ */ jsxs35(
3842
3803
  "button",
3843
3804
  {
3844
3805
  type: "button",
@@ -3847,7 +3808,7 @@ function HeaderMenuArea({
3847
3808
  className: menuItemClass,
3848
3809
  onClick: () => onSelect?.(item.key),
3849
3810
  children: [
3850
- item.icon ? /* @__PURE__ */ jsx53(Icon, { name: item.icon, size: "sm" }) : null,
3811
+ item.icon ? /* @__PURE__ */ jsx51(Icon, { name: item.icon, size: "sm" }) : null,
3851
3812
  item.label
3852
3813
  ]
3853
3814
  },
@@ -3860,16 +3821,16 @@ function HeaderMenuEntry({
3860
3821
  onSelect
3861
3822
  }) {
3862
3823
  if (item.children !== void 0 && item.children.length > 0) {
3863
- return /* @__PURE__ */ jsxs36(DropdownMenuSub, { children: [
3864
- /* @__PURE__ */ jsxs36(DropdownMenuSubTrigger, { "data-key": item.key, className: "cursor-pointer", children: [
3865
- item.icon ? /* @__PURE__ */ jsx53(Icon, { name: item.icon, size: "sm" }) : null,
3824
+ return /* @__PURE__ */ jsxs35(DropdownMenuSub, { children: [
3825
+ /* @__PURE__ */ jsxs35(DropdownMenuSubTrigger, { "data-key": item.key, className: "cursor-pointer", children: [
3826
+ item.icon ? /* @__PURE__ */ jsx51(Icon, { name: item.icon, size: "sm" }) : null,
3866
3827
  item.label
3867
3828
  ] }),
3868
- /* @__PURE__ */ jsx53(DropdownMenuSubContent, { children: item.children.map((child) => /* @__PURE__ */ jsx53(HeaderMenuEntry, { item: child, onSelect }, child.key)) })
3829
+ /* @__PURE__ */ jsx51(DropdownMenuSubContent, { children: item.children.map((child) => /* @__PURE__ */ jsx51(HeaderMenuEntry, { item: child, onSelect }, child.key)) })
3869
3830
  ] });
3870
3831
  }
3871
- return /* @__PURE__ */ jsxs36(DropdownMenuItem, { "data-key": item.key, onClick: () => onSelect?.(item.key), children: [
3872
- item.icon ? /* @__PURE__ */ jsx53(Icon, { name: item.icon, size: "sm" }) : null,
3832
+ return /* @__PURE__ */ jsxs35(DropdownMenuItem, { "data-key": item.key, onClick: () => onSelect?.(item.key), children: [
3833
+ item.icon ? /* @__PURE__ */ jsx51(Icon, { name: item.icon, size: "sm" }) : null,
3873
3834
  item.label
3874
3835
  ] });
3875
3836
  }
@@ -3877,18 +3838,18 @@ function HeaderUserArea({
3877
3838
  user,
3878
3839
  onSelect
3879
3840
  }) {
3880
- const identity = /* @__PURE__ */ jsxs36(Fragment5, { children: [
3881
- /* @__PURE__ */ jsxs36(Avatar, { className: "size-7", children: [
3882
- user.avatar !== void 0 && /* @__PURE__ */ jsx53(AvatarImage, { src: user.avatar, alt: user.name }),
3883
- /* @__PURE__ */ jsx53(AvatarFallback, { children: user.name.charAt(0) })
3841
+ const identity = /* @__PURE__ */ jsxs35(Fragment5, { children: [
3842
+ /* @__PURE__ */ jsxs35(Avatar, { className: "size-7", children: [
3843
+ user.avatar !== void 0 && /* @__PURE__ */ jsx51(AvatarImage, { src: user.avatar, alt: user.name }),
3844
+ /* @__PURE__ */ jsx51(AvatarFallback, { children: user.name.charAt(0) })
3884
3845
  ] }),
3885
- /* @__PURE__ */ jsx53("span", { className: "text-sm", children: user.name })
3846
+ /* @__PURE__ */ jsx51("span", { className: "text-sm", children: user.name })
3886
3847
  ] });
3887
3848
  if (user.items === void 0 || user.items.length === 0) {
3888
- return /* @__PURE__ */ jsx53("div", { "data-slot": "header-user", className: "flex items-center gap-2", children: identity });
3849
+ return /* @__PURE__ */ jsx51("div", { "data-slot": "header-user", className: "flex items-center gap-2", children: identity });
3889
3850
  }
3890
- return /* @__PURE__ */ jsxs36(DropdownMenu, { children: [
3891
- /* @__PURE__ */ jsx53(
3851
+ return /* @__PURE__ */ jsxs35(DropdownMenu, { children: [
3852
+ /* @__PURE__ */ jsx51(
3892
3853
  DropdownMenuTrigger,
3893
3854
  {
3894
3855
  "data-slot": "header-user",
@@ -3896,7 +3857,7 @@ function HeaderUserArea({
3896
3857
  children: identity
3897
3858
  }
3898
3859
  ),
3899
- /* @__PURE__ */ jsx53(DropdownMenuContent, { align: "end", children: renderDropdownItems(user.items, onSelect) })
3860
+ /* @__PURE__ */ jsx51(DropdownMenuContent, { align: "end", children: renderDropdownItems(user.items, onSelect) })
3900
3861
  ] });
3901
3862
  }
3902
3863
  function HeaderLocalesArea({
@@ -3905,19 +3866,19 @@ function HeaderLocalesArea({
3905
3866
  }) {
3906
3867
  const { locale } = useI18n15();
3907
3868
  const current = locales.find((option) => option.value === locale);
3908
- return /* @__PURE__ */ jsxs36(DropdownMenu, { children: [
3909
- /* @__PURE__ */ jsxs36(
3869
+ return /* @__PURE__ */ jsxs35(DropdownMenu, { children: [
3870
+ /* @__PURE__ */ jsxs35(
3910
3871
  DropdownMenuTrigger,
3911
3872
  {
3912
3873
  "data-slot": "header-locales",
3913
3874
  className: cn(menuItemClass, "outline-hidden cursor-pointer"),
3914
3875
  children: [
3915
3876
  current?.label ?? locale,
3916
- /* @__PURE__ */ jsx53(ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
3877
+ /* @__PURE__ */ jsx51(ChevronDownIcon, { className: "size-3.5", "aria-hidden": "true" })
3917
3878
  ]
3918
3879
  }
3919
3880
  ),
3920
- /* @__PURE__ */ jsx53(DropdownMenuContent, { align: "end", children: locales.map((option) => /* @__PURE__ */ jsx53(
3881
+ /* @__PURE__ */ jsx51(DropdownMenuContent, { align: "end", children: locales.map((option) => /* @__PURE__ */ jsx51(
3921
3882
  DropdownMenuItem,
3922
3883
  {
3923
3884
  onClick: () => onSelect?.(option.value),
@@ -3948,7 +3909,7 @@ function HeaderThemeToggle({
3948
3909
  setTheme(next);
3949
3910
  onSelect?.(next);
3950
3911
  };
3951
- return /* @__PURE__ */ jsx53(
3912
+ return /* @__PURE__ */ jsx51(
3952
3913
  "button",
3953
3914
  {
3954
3915
  type: "button",
@@ -3957,29 +3918,29 @@ function HeaderThemeToggle({
3957
3918
  title: theme === "dark" ? t("pactor.header.themeToLight") : t("pactor.header.themeToDark"),
3958
3919
  "aria-label": t("pactor.header.themeToggle"),
3959
3920
  onClick: handleToggle,
3960
- children: theme === "dark" ? /* @__PURE__ */ jsx53(Icon, { name: "sun", size: "sm" }) : /* @__PURE__ */ jsx53(Icon, { name: "moon", size: "sm" })
3921
+ children: theme === "dark" ? /* @__PURE__ */ jsx51(Icon, { name: "sun", size: "sm" }) : /* @__PURE__ */ jsx51(Icon, { name: "moon", size: "sm" })
3961
3922
  }
3962
3923
  );
3963
3924
  }
3964
3925
 
3965
3926
  // src/components/components/HoverCard/index.tsx
3966
3927
  import { useRenderer as useRenderer12 } from "@pactor-app/runtime";
3967
- import { jsx as jsx54, jsxs as jsxs37 } from "react/jsx-runtime";
3928
+ import { jsx as jsx52, jsxs as jsxs36 } from "react/jsx-runtime";
3968
3929
  function isDslNode2(value) {
3969
3930
  return typeof value === "object" && value !== null && typeof value.type === "string";
3970
3931
  }
3971
3932
  function HoverCard2({ content, children, className, style }) {
3972
3933
  const { renderChildren } = useRenderer12();
3973
- return /* @__PURE__ */ jsxs37(HoverCard, { children: [
3974
- /* @__PURE__ */ jsx54(HoverCardTrigger, { render: triggerWrapper("hover-card-trigger-wrap"), children }),
3975
- /* @__PURE__ */ jsx54(HoverCardContent, { className, style, children: isDslNode2(content) ? renderChildren([content]) : content })
3934
+ return /* @__PURE__ */ jsxs36(HoverCard, { children: [
3935
+ /* @__PURE__ */ jsx52(HoverCardTrigger, { render: triggerWrapper("hover-card-trigger-wrap"), children }),
3936
+ /* @__PURE__ */ jsx52(HoverCardContent, { className, style, children: isDslNode2(content) ? renderChildren([content]) : content })
3976
3937
  ] });
3977
3938
  }
3978
3939
 
3979
3940
  // src/components/components/Image/index.tsx
3980
3941
  import { useI18n as useI18n16 } from "@pactor-app/runtime";
3981
3942
  import { useState as useState20 } from "react";
3982
- import { Fragment as Fragment6, jsx as jsx55, jsxs as jsxs38 } from "react/jsx-runtime";
3943
+ import { Fragment as Fragment6, jsx as jsx53, jsxs as jsxs37 } from "react/jsx-runtime";
3983
3944
  function Image({
3984
3945
  src,
3985
3946
  alt = "",
@@ -3999,7 +3960,7 @@ function Image({
3999
3960
  ...style
4000
3961
  };
4001
3962
  if (failed || !src) {
4002
- return /* @__PURE__ */ jsx55(
3963
+ return /* @__PURE__ */ jsx53(
4003
3964
  "div",
4004
3965
  {
4005
3966
  "data-slot": "image-fallback",
@@ -4008,12 +3969,12 @@ function Image({
4008
3969
  className
4009
3970
  ),
4010
3971
  style: sizeStyle,
4011
- children: fallback ?? /* @__PURE__ */ jsx55(Icon, { name: "image", size: "lg" })
3972
+ children: fallback ?? /* @__PURE__ */ jsx53(Icon, { name: "image", size: "lg" })
4012
3973
  }
4013
3974
  );
4014
3975
  }
4015
- return /* @__PURE__ */ jsxs38(Fragment6, { children: [
4016
- /* @__PURE__ */ jsx55(
3976
+ return /* @__PURE__ */ jsxs37(Fragment6, { children: [
3977
+ /* @__PURE__ */ jsx53(
4017
3978
  "img",
4018
3979
  {
4019
3980
  "data-slot": "image",
@@ -4027,9 +3988,9 @@ function Image({
4027
3988
  style: sizeStyle
4028
3989
  }
4029
3990
  ),
4030
- preview ? /* @__PURE__ */ jsx55(Dialog, { open: previewOpen, onOpenChange: setPreviewOpen, children: /* @__PURE__ */ jsxs38(DialogContent, { className: "sm:max-w-3xl", "aria-label": alt || t("pactor.image.preview"), children: [
4031
- /* @__PURE__ */ jsx55(DialogTitle, { className: "sr-only", children: alt || t("pactor.image.preview") }),
4032
- /* @__PURE__ */ jsx55(
3991
+ preview ? /* @__PURE__ */ jsx53(Dialog, { open: previewOpen, onOpenChange: setPreviewOpen, children: /* @__PURE__ */ jsxs37(DialogContent, { className: "sm:max-w-3xl", "aria-label": alt || t("pactor.image.preview"), children: [
3992
+ /* @__PURE__ */ jsx53(DialogTitle, { className: "sr-only", children: alt || t("pactor.image.preview") }),
3993
+ /* @__PURE__ */ jsx53(
4033
3994
  "img",
4034
3995
  {
4035
3996
  "data-slot": "image-preview",
@@ -4045,7 +4006,7 @@ function Image({
4045
4006
  // src/components/components/Input/index.tsx
4046
4007
  import { useI18n as useI18n17 } from "@pactor-app/runtime";
4047
4008
  import { useEffect as useEffect13, useId as useId6 } from "react";
4048
- import { jsx as jsx56, jsxs as jsxs39 } from "react/jsx-runtime";
4009
+ import { jsx as jsx54, jsxs as jsxs38 } from "react/jsx-runtime";
4049
4010
  function Input2({
4050
4011
  name,
4051
4012
  label,
@@ -4082,7 +4043,7 @@ function Input2({
4082
4043
  onChange?.("");
4083
4044
  };
4084
4045
  const inFormRoot = inForm === true;
4085
- const input = /* @__PURE__ */ jsx56(
4046
+ const input = /* @__PURE__ */ jsx54(
4086
4047
  Input,
4087
4048
  {
4088
4049
  id: controlId,
@@ -4104,7 +4065,7 @@ function Input2({
4104
4065
  }
4105
4066
  }
4106
4067
  );
4107
- const clearButton = showClear ? /* @__PURE__ */ jsx56(
4068
+ const clearButton = showClear ? /* @__PURE__ */ jsx54(
4108
4069
  ClearHoverButton,
4109
4070
  {
4110
4071
  label: t("pactor.input.clear"),
@@ -4112,7 +4073,7 @@ function Input2({
4112
4073
  onClear: handleClear
4113
4074
  }
4114
4075
  ) : null;
4115
- const control = allowClear !== false ? /* @__PURE__ */ jsxs39(
4076
+ const control = allowClear !== false ? /* @__PURE__ */ jsxs38(
4116
4077
  "span",
4117
4078
  {
4118
4079
  className: cn("group relative flex items-center", !inFormRoot && className),
@@ -4124,25 +4085,17 @@ function Input2({
4124
4085
  }
4125
4086
  ) : input;
4126
4087
  if (inForm && form && name) {
4127
- const error = form.errors[name];
4128
- return /* @__PURE__ */ jsxs39(
4129
- "div",
4088
+ return /* @__PURE__ */ jsx54(
4089
+ FieldShell,
4130
4090
  {
4131
- "data-slot": "form-item",
4132
- className: cn(formItemClass(form.layout), className),
4091
+ layout: form.layout,
4092
+ label,
4093
+ htmlFor: controlId,
4094
+ rules,
4095
+ error: form.errors[name],
4096
+ className,
4133
4097
  style,
4134
- children: [
4135
- label ? /* @__PURE__ */ jsx56(
4136
- "label",
4137
- {
4138
- htmlFor: controlId,
4139
- className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap",
4140
- children: label
4141
- }
4142
- ) : null,
4143
- control,
4144
- error ? /* @__PURE__ */ jsx56("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
4145
- ]
4098
+ children: control
4146
4099
  }
4147
4100
  );
4148
4101
  }
@@ -4150,14 +4103,14 @@ function Input2({
4150
4103
  }
4151
4104
 
4152
4105
  // src/components/components/InputGroup/index.tsx
4153
- import { jsx as jsx57 } from "react/jsx-runtime";
4106
+ import { jsx as jsx55 } from "react/jsx-runtime";
4154
4107
  function InputGroup2({ className, style, children }) {
4155
- return /* @__PURE__ */ jsx57(InputGroup, { className, style, children });
4108
+ return /* @__PURE__ */ jsx55(InputGroup, { className, style, children });
4156
4109
  }
4157
4110
 
4158
4111
  // src/components/components/InputOTP/index.tsx
4159
4112
  import { useEffect as useEffect14, useState as useState21 } from "react";
4160
- import { jsx as jsx58, jsxs as jsxs40 } from "react/jsx-runtime";
4113
+ import { jsx as jsx56, jsxs as jsxs39 } from "react/jsx-runtime";
4161
4114
  function InputOTP2({
4162
4115
  name,
4163
4116
  label,
@@ -4195,38 +4148,38 @@ function InputOTP2({
4195
4148
  onComplete?.(next);
4196
4149
  }
4197
4150
  };
4198
- const control = /* @__PURE__ */ jsx58(
4151
+ const control = /* @__PURE__ */ jsx56(
4199
4152
  InputOTP,
4200
4153
  {
4201
4154
  maxLength: length,
4202
4155
  value: current,
4203
4156
  onChange: handleChange,
4204
4157
  disabled,
4205
- children: /* @__PURE__ */ jsx58(InputOTPGroup, { children: Array.from({ length }, (_, index) => /* @__PURE__ */ jsx58(InputOTPSlot, { index }, index)) })
4158
+ children: /* @__PURE__ */ jsx56(InputOTPGroup, { children: Array.from({ length }, (_, index) => /* @__PURE__ */ jsx56(InputOTPSlot, { index }, index)) })
4206
4159
  }
4207
4160
  );
4208
4161
  if (inForm && form && name) {
4209
4162
  const error = form.errors[name];
4210
- return /* @__PURE__ */ jsxs40(
4163
+ return /* @__PURE__ */ jsxs39(
4211
4164
  "div",
4212
4165
  {
4213
4166
  "data-slot": "form-item",
4214
4167
  className: cn(formItemClass(form.layout), className),
4215
4168
  style,
4216
4169
  children: [
4217
- label ? /* @__PURE__ */ jsx58("label", { className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: label }) : null,
4170
+ label ? /* @__PURE__ */ jsx56("label", { className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: label }) : null,
4218
4171
  control,
4219
- error ? /* @__PURE__ */ jsx58("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
4172
+ error ? /* @__PURE__ */ jsx56("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
4220
4173
  ]
4221
4174
  }
4222
4175
  );
4223
4176
  }
4224
- return /* @__PURE__ */ jsx58("div", { "data-slot": "input-otp-field", className: cn("inline-block", className), style, children: control });
4177
+ return /* @__PURE__ */ jsx56("div", { "data-slot": "input-otp-field", className: cn("inline-block", className), style, children: control });
4225
4178
  }
4226
4179
 
4227
4180
  // src/components/components/Item/index.tsx
4228
4181
  import { useRenderer as useRenderer13 } from "@pactor-app/runtime";
4229
- import { jsx as jsx59, jsxs as jsxs41 } from "react/jsx-runtime";
4182
+ import { jsx as jsx57, jsxs as jsxs40 } from "react/jsx-runtime";
4230
4183
  function Item2({
4231
4184
  title,
4232
4185
  description,
@@ -4237,20 +4190,20 @@ function Item2({
4237
4190
  }) {
4238
4191
  const { renderChildren } = useRenderer13();
4239
4192
  const mediaNodes = media === void 0 ? [] : Array.isArray(media) ? media : [media];
4240
- return /* @__PURE__ */ jsxs41(Item, { className, style, children: [
4241
- mediaNodes.length > 0 ? /* @__PURE__ */ jsx59(ItemMedia, { children: renderChildren(mediaNodes) }) : null,
4242
- /* @__PURE__ */ jsxs41(ItemContent, { children: [
4243
- title ? /* @__PURE__ */ jsx59(ItemTitle, { children: title }) : null,
4244
- description ? /* @__PURE__ */ jsx59(ItemDescription, { children: description }) : null
4193
+ return /* @__PURE__ */ jsxs40(Item, { className, style, children: [
4194
+ mediaNodes.length > 0 ? /* @__PURE__ */ jsx57(ItemMedia, { children: renderChildren(mediaNodes) }) : null,
4195
+ /* @__PURE__ */ jsxs40(ItemContent, { children: [
4196
+ title ? /* @__PURE__ */ jsx57(ItemTitle, { children: title }) : null,
4197
+ description ? /* @__PURE__ */ jsx57(ItemDescription, { children: description }) : null
4245
4198
  ] }),
4246
- actions && actions.length > 0 ? /* @__PURE__ */ jsx59(ItemActions, { children: renderChildren(actions) }) : null
4199
+ actions && actions.length > 0 ? /* @__PURE__ */ jsx57(ItemActions, { children: renderChildren(actions) }) : null
4247
4200
  ] });
4248
4201
  }
4249
4202
 
4250
4203
  // src/components/components/JSONViewer/index.tsx
4251
4204
  import { useI18n as useI18n18 } from "@pactor-app/runtime";
4252
4205
  import { useState as useState22 } from "react";
4253
- import { jsx as jsx60, jsxs as jsxs42 } from "react/jsx-runtime";
4206
+ import { jsx as jsx58, jsxs as jsxs41 } from "react/jsx-runtime";
4254
4207
  function isObject(value) {
4255
4208
  return typeof value === "object" && value !== null && !Array.isArray(value);
4256
4209
  }
@@ -4264,39 +4217,39 @@ function summarize(value, t) {
4264
4217
  }
4265
4218
  function PrimitiveValue({ value }) {
4266
4219
  if (value === null || value === void 0) {
4267
- return /* @__PURE__ */ jsx60("span", { "data-slot": "json-value", "data-type": "null", className: "text-muted-foreground", children: "null" });
4220
+ return /* @__PURE__ */ jsx58("span", { "data-slot": "json-value", "data-type": "null", className: "text-muted-foreground", children: "null" });
4268
4221
  }
4269
4222
  if (typeof value === "string") {
4270
- return /* @__PURE__ */ jsxs42("span", { "data-slot": "json-value", "data-type": "string", className: "text-success", children: [
4223
+ return /* @__PURE__ */ jsxs41("span", { "data-slot": "json-value", "data-type": "string", className: "text-success", children: [
4271
4224
  '"',
4272
4225
  value,
4273
4226
  '"'
4274
4227
  ] });
4275
4228
  }
4276
4229
  if (typeof value === "number") {
4277
- return /* @__PURE__ */ jsx60("span", { "data-slot": "json-value", "data-type": "number", className: "text-info", children: String(value) });
4230
+ return /* @__PURE__ */ jsx58("span", { "data-slot": "json-value", "data-type": "number", className: "text-info", children: String(value) });
4278
4231
  }
4279
4232
  if (typeof value === "boolean") {
4280
- return /* @__PURE__ */ jsx60("span", { "data-slot": "json-value", "data-type": "boolean", className: "text-warning", children: String(value) });
4233
+ return /* @__PURE__ */ jsx58("span", { "data-slot": "json-value", "data-type": "boolean", className: "text-warning", children: String(value) });
4281
4234
  }
4282
- return /* @__PURE__ */ jsx60("span", { "data-slot": "json-value", children: String(value) });
4235
+ return /* @__PURE__ */ jsx58("span", { "data-slot": "json-value", children: String(value) });
4283
4236
  }
4284
4237
  function JsonNode({ keyName, value, depth, expandedDepth }) {
4285
4238
  const [expanded, setExpanded] = useState22(depth < expandedDepth);
4286
4239
  const { t } = useI18n18();
4287
4240
  const composite = isObject(value) || Array.isArray(value);
4288
4241
  if (!composite) {
4289
- return /* @__PURE__ */ jsxs42("div", { "data-slot": "json-leaf", className: "flex gap-1.5", children: [
4290
- keyName !== void 0 ? /* @__PURE__ */ jsxs42("span", { className: "shrink-0 text-foreground", children: [
4242
+ return /* @__PURE__ */ jsxs41("div", { "data-slot": "json-leaf", className: "flex gap-1.5", children: [
4243
+ keyName !== void 0 ? /* @__PURE__ */ jsxs41("span", { className: "shrink-0 text-foreground", children: [
4291
4244
  keyName,
4292
4245
  ":"
4293
4246
  ] }) : null,
4294
- /* @__PURE__ */ jsx60(PrimitiveValue, { value })
4247
+ /* @__PURE__ */ jsx58(PrimitiveValue, { value })
4295
4248
  ] });
4296
4249
  }
4297
4250
  const entries = Array.isArray(value) ? value.map((item, index) => [String(index), item]) : Object.entries(value);
4298
- return /* @__PURE__ */ jsxs42("div", { "data-slot": "json-node", children: [
4299
- /* @__PURE__ */ jsxs42(
4251
+ return /* @__PURE__ */ jsxs41("div", { "data-slot": "json-node", children: [
4252
+ /* @__PURE__ */ jsxs41(
4300
4253
  "button",
4301
4254
  {
4302
4255
  type: "button",
@@ -4305,17 +4258,17 @@ function JsonNode({ keyName, value, depth, expandedDepth }) {
4305
4258
  className: "flex items-center gap-1 text-left hover:bg-accent/50 rounded-sm",
4306
4259
  onClick: () => setExpanded((value_) => !value_),
4307
4260
  children: [
4308
- /* @__PURE__ */ jsx60(Icon, { name: expanded ? "chevron-down" : "chevron-right", size: "sm" }),
4309
- keyName !== void 0 ? /* @__PURE__ */ jsxs42("span", { className: "text-foreground", children: [
4261
+ /* @__PURE__ */ jsx58(Icon, { name: expanded ? "chevron-down" : "chevron-right", size: "sm" }),
4262
+ keyName !== void 0 ? /* @__PURE__ */ jsxs41("span", { className: "text-foreground", children: [
4310
4263
  keyName,
4311
4264
  ":"
4312
4265
  ] }) : null,
4313
- !expanded ? /* @__PURE__ */ jsx60("span", { className: "text-muted-foreground", children: summarize(value, t) }) : /* @__PURE__ */ jsx60("span", { className: "text-muted-foreground", children: Array.isArray(value) ? "[" : "{" })
4266
+ !expanded ? /* @__PURE__ */ jsx58("span", { className: "text-muted-foreground", children: summarize(value, t) }) : /* @__PURE__ */ jsx58("span", { className: "text-muted-foreground", children: Array.isArray(value) ? "[" : "{" })
4314
4267
  ]
4315
4268
  }
4316
4269
  ),
4317
- expanded ? /* @__PURE__ */ jsx60("div", { className: "ml-4 border-l border-border pl-2", children: entries.map(([key, item]) => /* @__PURE__ */ jsx60(JsonNode, { keyName: key, value: item, depth: depth + 1, expandedDepth }, key)) }) : null,
4318
- expanded ? /* @__PURE__ */ jsx60("span", { className: "ml-1 text-muted-foreground", children: Array.isArray(value) ? "]" : "}" }) : null
4270
+ expanded ? /* @__PURE__ */ jsx58("div", { className: "ml-4 border-l border-border pl-2", children: entries.map(([key, item]) => /* @__PURE__ */ jsx58(JsonNode, { keyName: key, value: item, depth: depth + 1, expandedDepth }, key)) }) : null,
4271
+ expanded ? /* @__PURE__ */ jsx58("span", { className: "ml-1 text-muted-foreground", children: Array.isArray(value) ? "]" : "}" }) : null
4319
4272
  ] });
4320
4273
  }
4321
4274
  function JSONViewer({ data, expandedDepth = 1, copyable = true, className, style }) {
@@ -4329,14 +4282,14 @@ function JSONViewer({ data, expandedDepth = 1, copyable = true, className, style
4329
4282
  } catch {
4330
4283
  }
4331
4284
  };
4332
- return /* @__PURE__ */ jsxs42(
4285
+ return /* @__PURE__ */ jsxs41(
4333
4286
  "div",
4334
4287
  {
4335
4288
  "data-slot": "json-viewer",
4336
4289
  className: cn("relative w-full rounded-md border border-border bg-muted p-3 font-mono text-xs leading-5", className),
4337
4290
  style,
4338
4291
  children: [
4339
- copyable ? /* @__PURE__ */ jsx60(
4292
+ copyable ? /* @__PURE__ */ jsx58(
4340
4293
  "button",
4341
4294
  {
4342
4295
  type: "button",
@@ -4344,38 +4297,38 @@ function JSONViewer({ data, expandedDepth = 1, copyable = true, className, style
4344
4297
  "aria-label": t("pactor.jsonViewer.copy"),
4345
4298
  className: "absolute top-2 right-2 flex size-7 items-center justify-center rounded-md bg-background/80 text-muted-foreground hover:text-foreground",
4346
4299
  onClick: handleCopy,
4347
- children: /* @__PURE__ */ jsx60(Icon, { name: copied ? "check" : "copy", size: "sm" })
4300
+ children: /* @__PURE__ */ jsx58(Icon, { name: copied ? "check" : "copy", size: "sm" })
4348
4301
  }
4349
4302
  ) : null,
4350
- /* @__PURE__ */ jsx60(JsonNode, { value: data, depth: 0, expandedDepth })
4303
+ /* @__PURE__ */ jsx58(JsonNode, { value: data, depth: 0, expandedDepth })
4351
4304
  ]
4352
4305
  }
4353
4306
  );
4354
4307
  }
4355
4308
 
4356
4309
  // src/components/components/Kbd/index.tsx
4357
- import { jsx as jsx61 } from "react/jsx-runtime";
4310
+ import { jsx as jsx59 } from "react/jsx-runtime";
4358
4311
  function Kbd2({ text, className, style }) {
4359
- return /* @__PURE__ */ jsx61(Kbd, { className, style, children: text });
4312
+ return /* @__PURE__ */ jsx59(Kbd, { className, style, children: text });
4360
4313
  }
4361
4314
 
4362
4315
  // src/components/components/Label/index.tsx
4363
- import { jsx as jsx62 } from "react/jsx-runtime";
4316
+ import { jsx as jsx60 } from "react/jsx-runtime";
4364
4317
  function Label2({ text, htmlFor, className, style }) {
4365
- return /* @__PURE__ */ jsx62(Label, { htmlFor, className, style, children: text });
4318
+ return /* @__PURE__ */ jsx60(Label, { htmlFor, className, style, children: text });
4366
4319
  }
4367
4320
 
4368
4321
  // src/components/components/Layout/index.tsx
4369
4322
  import { isDslSourceRef } from "@pactor-app/core";
4370
4323
  import { useRenderer as useRenderer14 } from "@pactor-app/runtime";
4371
- import { jsx as jsx63 } from "react/jsx-runtime";
4324
+ import { jsx as jsx61 } from "react/jsx-runtime";
4372
4325
  function Layout({ direction, className, style, dslChildren }) {
4373
4326
  const { renderChildren, context } = useRenderer14();
4374
4327
  const hasSider = Array.isArray(dslChildren) ? dslChildren.some(
4375
4328
  (child) => !isDslSourceRef(child) && resolveRootType(child, context) === "Sider"
4376
4329
  ) : false;
4377
4330
  const dir = direction ?? (hasSider ? "horizontal" : "vertical");
4378
- return /* @__PURE__ */ jsx63(
4331
+ return /* @__PURE__ */ jsx61(
4379
4332
  "div",
4380
4333
  {
4381
4334
  "data-slot": "layout",
@@ -4399,10 +4352,10 @@ function resolveRootType(node, context) {
4399
4352
  }
4400
4353
 
4401
4354
  // src/components/components/Link/index.tsx
4402
- import { jsx as jsx64 } from "react/jsx-runtime";
4355
+ import { jsx as jsx62 } from "react/jsx-runtime";
4403
4356
  function Link({ href, text, target, className, style, children }) {
4404
4357
  const handleSpaClick = useSpaLinkClick();
4405
- return /* @__PURE__ */ jsx64(
4358
+ return /* @__PURE__ */ jsx62(
4406
4359
  "a",
4407
4360
  {
4408
4361
  "data-slot": "link",
@@ -4419,7 +4372,7 @@ function Link({ href, text, target, className, style, children }) {
4419
4372
 
4420
4373
  // src/components/components/List/index.tsx
4421
4374
  import { useI18n as useI18n19 } from "@pactor-app/runtime";
4422
- import { jsx as jsx65, jsxs as jsxs43 } from "react/jsx-runtime";
4375
+ import { jsx as jsx63, jsxs as jsxs42 } from "react/jsx-runtime";
4423
4376
  function isImageSrc(avatar) {
4424
4377
  return /^(https?:|data:|\/|\.)/.test(avatar);
4425
4378
  }
@@ -4432,17 +4385,17 @@ function List({
4432
4385
  }) {
4433
4386
  const { t } = useI18n19();
4434
4387
  if (items.length === 0) {
4435
- return /* @__PURE__ */ jsx65(
4388
+ return /* @__PURE__ */ jsx63(
4436
4389
  Empty,
4437
4390
  {
4438
4391
  "data-slot": "list",
4439
4392
  className: cn(bordered && "border border-border", className),
4440
4393
  style,
4441
- children: /* @__PURE__ */ jsx65(EmptyHeader, { children: /* @__PURE__ */ jsx65(EmptyTitle, { children: t("pactor.table.empty") }) })
4394
+ children: /* @__PURE__ */ jsx63(EmptyHeader, { children: /* @__PURE__ */ jsx63(EmptyTitle, { children: t("pactor.table.empty") }) })
4442
4395
  }
4443
4396
  );
4444
4397
  }
4445
- return /* @__PURE__ */ jsx65(
4398
+ return /* @__PURE__ */ jsx63(
4446
4399
  "ul",
4447
4400
  {
4448
4401
  "data-slot": "list",
@@ -4453,13 +4406,13 @@ function List({
4453
4406
  className
4454
4407
  ),
4455
4408
  style,
4456
- children: items.map((item, index) => /* @__PURE__ */ jsxs43(
4409
+ children: items.map((item, index) => /* @__PURE__ */ jsxs42(
4457
4410
  "li",
4458
4411
  {
4459
4412
  "data-slot": "list-item",
4460
4413
  className: "flex items-center gap-3 px-4 py-3",
4461
4414
  children: [
4462
- item.avatar ? isImageSrc(item.avatar) ? /* @__PURE__ */ jsx65(
4415
+ item.avatar ? isImageSrc(item.avatar) ? /* @__PURE__ */ jsx63(
4463
4416
  "img",
4464
4417
  {
4465
4418
  "data-slot": "list-item-avatar",
@@ -4467,7 +4420,7 @@ function List({
4467
4420
  alt: "",
4468
4421
  className: "size-9 shrink-0 rounded-full object-cover"
4469
4422
  }
4470
- ) : /* @__PURE__ */ jsx65(
4423
+ ) : /* @__PURE__ */ jsx63(
4471
4424
  "span",
4472
4425
  {
4473
4426
  "data-slot": "list-item-avatar",
@@ -4475,9 +4428,9 @@ function List({
4475
4428
  children: item.avatar
4476
4429
  }
4477
4430
  ) : null,
4478
- /* @__PURE__ */ jsxs43("div", { className: "min-w-0 flex-1", children: [
4479
- /* @__PURE__ */ jsx65("div", { "data-slot": "list-item-title", className: "truncate text-sm font-medium", children: item.title }),
4480
- item.description ? /* @__PURE__ */ jsx65(
4431
+ /* @__PURE__ */ jsxs42("div", { className: "min-w-0 flex-1", children: [
4432
+ /* @__PURE__ */ jsx63("div", { "data-slot": "list-item-title", className: "truncate text-sm font-medium", children: item.title }),
4433
+ item.description ? /* @__PURE__ */ jsx63(
4481
4434
  "div",
4482
4435
  {
4483
4436
  "data-slot": "list-item-description",
@@ -4486,7 +4439,7 @@ function List({
4486
4439
  }
4487
4440
  ) : null
4488
4441
  ] }),
4489
- item.extra ? /* @__PURE__ */ jsx65(
4442
+ item.extra ? /* @__PURE__ */ jsx63(
4490
4443
  "div",
4491
4444
  {
4492
4445
  "data-slot": "list-item-extra",
@@ -4503,7 +4456,7 @@ function List({
4503
4456
  }
4504
4457
 
4505
4458
  // src/components/components/LoadingOverlay/index.tsx
4506
- import { jsx as jsx66, jsxs as jsxs44 } from "react/jsx-runtime";
4459
+ import { jsx as jsx64, jsxs as jsxs43 } from "react/jsx-runtime";
4507
4460
  function LoadingOverlay({
4508
4461
  loading = false,
4509
4462
  text,
@@ -4515,20 +4468,20 @@ function LoadingOverlay({
4515
4468
  if (!loading) {
4516
4469
  return null;
4517
4470
  }
4518
- return /* @__PURE__ */ jsxs44(
4471
+ return /* @__PURE__ */ jsxs43(
4519
4472
  "div",
4520
4473
  {
4521
4474
  "data-slot": "loading-overlay",
4522
4475
  className: cn("inline-flex items-center gap-2", className),
4523
4476
  style,
4524
4477
  children: [
4525
- /* @__PURE__ */ jsx66(Spinner, { className: "size-4" }),
4526
- text ? /* @__PURE__ */ jsx66("span", { className: "text-sm text-muted-foreground", children: text }) : null
4478
+ /* @__PURE__ */ jsx64(Spinner, { className: "size-4" }),
4479
+ text ? /* @__PURE__ */ jsx64("span", { className: "text-sm text-muted-foreground", children: text }) : null
4527
4480
  ]
4528
4481
  }
4529
4482
  );
4530
4483
  }
4531
- return /* @__PURE__ */ jsxs44(
4484
+ return /* @__PURE__ */ jsxs43(
4532
4485
  "div",
4533
4486
  {
4534
4487
  "data-slot": "loading-overlay",
@@ -4536,14 +4489,14 @@ function LoadingOverlay({
4536
4489
  style,
4537
4490
  children: [
4538
4491
  children,
4539
- loading ? /* @__PURE__ */ jsxs44(
4492
+ loading ? /* @__PURE__ */ jsxs43(
4540
4493
  "div",
4541
4494
  {
4542
4495
  "data-slot": "loading-overlay-mask",
4543
4496
  className: "absolute inset-0 z-10 flex flex-col items-center justify-center gap-2 bg-background/70",
4544
4497
  children: [
4545
- /* @__PURE__ */ jsx66(Spinner, { className: "size-6" }),
4546
- text ? /* @__PURE__ */ jsx66("div", { className: "text-sm text-muted-foreground", children: text }) : null
4498
+ /* @__PURE__ */ jsx64(Spinner, { className: "size-6" }),
4499
+ text ? /* @__PURE__ */ jsx64("div", { className: "text-sm text-muted-foreground", children: text }) : null
4547
4500
  ]
4548
4501
  }
4549
4502
  ) : null
@@ -4562,7 +4515,7 @@ import {
4562
4515
  useRef as useRef5,
4563
4516
  useState as useState23
4564
4517
  } from "react";
4565
- import { jsx as jsx67, jsxs as jsxs45 } from "react/jsx-runtime";
4518
+ import { jsx as jsx65, jsxs as jsxs44 } from "react/jsx-runtime";
4566
4519
  function detectMention(text, caret, trigger) {
4567
4520
  const before = text.slice(0, caret);
4568
4521
  const start = before.lastIndexOf(trigger);
@@ -4652,13 +4605,13 @@ function Mentions({
4652
4605
  setMention(void 0);
4653
4606
  }
4654
4607
  };
4655
- const control = /* @__PURE__ */ jsxs45(
4608
+ const control = /* @__PURE__ */ jsxs44(
4656
4609
  "div",
4657
4610
  {
4658
4611
  className: cn("relative", !inForm && className),
4659
4612
  style: inForm ? void 0 : style,
4660
4613
  children: [
4661
- /* @__PURE__ */ jsx67(
4614
+ /* @__PURE__ */ jsx65(
4662
4615
  Textarea,
4663
4616
  {
4664
4617
  ref: textareaRef,
@@ -4674,12 +4627,12 @@ function Mentions({
4674
4627
  onBlur: () => setMention(void 0)
4675
4628
  }
4676
4629
  ),
4677
- open ? /* @__PURE__ */ jsx67(
4630
+ open ? /* @__PURE__ */ jsx65(
4678
4631
  "div",
4679
4632
  {
4680
4633
  "data-slot": "mentions-popup",
4681
4634
  className: "absolute z-50 mt-1 flex max-h-48 w-56 flex-col gap-0.5 overflow-y-auto rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md",
4682
- children: filtered.map((option, index) => /* @__PURE__ */ jsx67(
4635
+ children: filtered.map((option, index) => /* @__PURE__ */ jsx65(
4683
4636
  "button",
4684
4637
  {
4685
4638
  type: "button",
@@ -4701,11 +4654,12 @@ function Mentions({
4701
4654
  }
4702
4655
  );
4703
4656
  if (inForm && form && name) {
4704
- return /* @__PURE__ */ jsx67(
4657
+ return /* @__PURE__ */ jsx65(
4705
4658
  FieldShell,
4706
4659
  {
4707
4660
  layout: form.layout,
4708
4661
  label,
4662
+ rules,
4709
4663
  htmlFor: controlId,
4710
4664
  error: form.errors[name],
4711
4665
  className,
@@ -4718,17 +4672,17 @@ function Mentions({
4718
4672
  }
4719
4673
 
4720
4674
  // src/components/components/Menubar/index.tsx
4721
- import { jsx as jsx68, jsxs as jsxs46 } from "react/jsx-runtime";
4675
+ import { jsx as jsx66, jsxs as jsxs45 } from "react/jsx-runtime";
4722
4676
  function Menubar2({ menus = [], onSelect, className, style }) {
4723
- return /* @__PURE__ */ jsx68(Menubar, { className, style, children: menus.map((menu) => /* @__PURE__ */ jsxs46(MenubarMenu, { children: [
4724
- /* @__PURE__ */ jsx68(MenubarTrigger, { children: menu.label }),
4725
- /* @__PURE__ */ jsx68(MenubarContent, { children: menu.items.map((item) => /* @__PURE__ */ jsxs46(
4677
+ return /* @__PURE__ */ jsx66(Menubar, { className, style, children: menus.map((menu) => /* @__PURE__ */ jsxs45(MenubarMenu, { children: [
4678
+ /* @__PURE__ */ jsx66(MenubarTrigger, { children: menu.label }),
4679
+ /* @__PURE__ */ jsx66(MenubarContent, { children: menu.items.map((item) => /* @__PURE__ */ jsxs45(
4726
4680
  MenubarItem,
4727
4681
  {
4728
4682
  disabled: item.disabled,
4729
4683
  onClick: () => onSelect?.(item.value),
4730
4684
  children: [
4731
- item.icon ? /* @__PURE__ */ jsx68(Icon, { name: item.icon, size: "sm" }) : null,
4685
+ item.icon ? /* @__PURE__ */ jsx66(Icon, { name: item.icon, size: "sm" }) : null,
4732
4686
  item.label
4733
4687
  ]
4734
4688
  },
@@ -4739,44 +4693,44 @@ function Menubar2({ menus = [], onSelect, className, style }) {
4739
4693
 
4740
4694
  // src/components/components/Message/index.tsx
4741
4695
  import { useEffect as useEffect16 } from "react";
4742
- import { jsx as jsx69 } from "react/jsx-runtime";
4696
+ import { jsx as jsx67 } from "react/jsx-runtime";
4743
4697
  function Message({ content, variant, duration, className, style }) {
4744
4698
  useEffect16(() => {
4745
4699
  if (typeof content === "string" && content !== "") {
4746
4700
  toast(content, { variant, duration });
4747
4701
  }
4748
4702
  }, [content]);
4749
- return /* @__PURE__ */ jsx69("div", { "data-slot": "message", hidden: true, className, style });
4703
+ return /* @__PURE__ */ jsx67("div", { "data-slot": "message", hidden: true, className, style });
4750
4704
  }
4751
4705
 
4752
4706
  // src/components/components/NavigationMenu/index.tsx
4753
- import { Fragment as Fragment7, jsx as jsx70, jsxs as jsxs47 } from "react/jsx-runtime";
4707
+ import { Fragment as Fragment7, jsx as jsx68, jsxs as jsxs46 } from "react/jsx-runtime";
4754
4708
  function NavigationMenu2({ items = [], className, style }) {
4755
- return /* @__PURE__ */ jsx70(NavigationMenu, { className, style, children: /* @__PURE__ */ jsx70(NavigationMenuList, { children: items.map((item, index) => /* @__PURE__ */ jsx70(NavigationMenuItem, { value: `item-${index}`, children: item.children && item.children.length > 0 ? /* @__PURE__ */ jsxs47(Fragment7, { children: [
4756
- /* @__PURE__ */ jsxs47(
4709
+ return /* @__PURE__ */ jsx68(NavigationMenu, { className, style, children: /* @__PURE__ */ jsx68(NavigationMenuList, { children: items.map((item, index) => /* @__PURE__ */ jsx68(NavigationMenuItem, { value: `item-${index}`, children: item.children && item.children.length > 0 ? /* @__PURE__ */ jsxs46(Fragment7, { children: [
4710
+ /* @__PURE__ */ jsxs46(
4757
4711
  NavigationMenuTrigger,
4758
4712
  {
4759
4713
  className: item.icon !== void 0 ? "gap-2" : void 0,
4760
4714
  children: [
4761
- item.icon ? /* @__PURE__ */ jsx70(Icon, { name: item.icon, size: "sm" }) : null,
4715
+ item.icon ? /* @__PURE__ */ jsx68(Icon, { name: item.icon, size: "sm" }) : null,
4762
4716
  item.label
4763
4717
  ]
4764
4718
  }
4765
4719
  ),
4766
- /* @__PURE__ */ jsx70(NavigationMenuContent, { children: /* @__PURE__ */ jsx70("ul", { className: "grid w-64 gap-1", children: item.children.map((child) => /* @__PURE__ */ jsx70("li", { children: /* @__PURE__ */ jsxs47(NavigationMenuLink, { href: child.href, children: [
4767
- /* @__PURE__ */ jsxs47(
4720
+ /* @__PURE__ */ jsx68(NavigationMenuContent, { children: /* @__PURE__ */ jsx68("ul", { className: "grid w-64 gap-1", children: item.children.map((child) => /* @__PURE__ */ jsx68("li", { children: /* @__PURE__ */ jsxs46(NavigationMenuLink, { href: child.href, children: [
4721
+ /* @__PURE__ */ jsxs46(
4768
4722
  "span",
4769
4723
  {
4770
4724
  className: child.icon !== void 0 ? "flex items-center gap-2 font-medium" : "font-medium",
4771
4725
  children: [
4772
- child.icon ? /* @__PURE__ */ jsx70(Icon, { name: child.icon, size: "sm" }) : null,
4726
+ child.icon ? /* @__PURE__ */ jsx68(Icon, { name: child.icon, size: "sm" }) : null,
4773
4727
  child.label
4774
4728
  ]
4775
4729
  }
4776
4730
  ),
4777
- child.description ? /* @__PURE__ */ jsx70("span", { className: "text-muted-foreground", children: child.description }) : null
4731
+ child.description ? /* @__PURE__ */ jsx68("span", { className: "text-muted-foreground", children: child.description }) : null
4778
4732
  ] }) }, child.href)) }) })
4779
- ] }) : /* @__PURE__ */ jsxs47(
4733
+ ] }) : /* @__PURE__ */ jsxs46(
4780
4734
  NavigationMenuLink,
4781
4735
  {
4782
4736
  href: item.href,
@@ -4787,7 +4741,7 @@ function NavigationMenu2({ items = [], className, style }) {
4787
4741
  item.icon !== void 0 && "gap-2"
4788
4742
  ),
4789
4743
  children: [
4790
- item.icon ? /* @__PURE__ */ jsx70(Icon, { name: item.icon, size: "sm" }) : null,
4744
+ item.icon ? /* @__PURE__ */ jsx68(Icon, { name: item.icon, size: "sm" }) : null,
4791
4745
  item.label
4792
4746
  ]
4793
4747
  }
@@ -4796,7 +4750,7 @@ function NavigationMenu2({ items = [], className, style }) {
4796
4750
 
4797
4751
  // src/components/components/Notification/index.tsx
4798
4752
  import { useEffect as useEffect17 } from "react";
4799
- import { jsx as jsx71 } from "react/jsx-runtime";
4753
+ import { jsx as jsx69 } from "react/jsx-runtime";
4800
4754
  function Notification({
4801
4755
  title,
4802
4756
  description,
@@ -4810,14 +4764,14 @@ function Notification({
4810
4764
  toast(title, { description, variant, duration });
4811
4765
  }
4812
4766
  }, [title]);
4813
- return /* @__PURE__ */ jsx71("div", { "data-slot": "notification", hidden: true, className, style });
4767
+ return /* @__PURE__ */ jsx69("div", { "data-slot": "notification", hidden: true, className, style });
4814
4768
  }
4815
4769
 
4816
4770
  // src/components/components/NumberInput/index.tsx
4817
4771
  import { useI18n as useI18n20 } from "@pactor-app/runtime";
4818
4772
  import { ChevronDownIcon as ChevronDownIcon2, ChevronUpIcon } from "lucide-react";
4819
4773
  import { useEffect as useEffect18, useId as useId8, useState as useState24 } from "react";
4820
- import { jsx as jsx72, jsxs as jsxs48 } from "react/jsx-runtime";
4774
+ import { jsx as jsx70, jsxs as jsxs47 } from "react/jsx-runtime";
4821
4775
  function clamp2(value, min, max) {
4822
4776
  let next = value;
4823
4777
  if (typeof min === "number" && next < min) next = min;
@@ -4900,14 +4854,14 @@ function NumberInput({
4900
4854
  setText("");
4901
4855
  commit(void 0);
4902
4856
  };
4903
- const control = /* @__PURE__ */ jsxs48(
4857
+ const control = /* @__PURE__ */ jsxs47(
4904
4858
  "span",
4905
4859
  {
4906
4860
  "data-slot": "number-input",
4907
4861
  className: cn("group relative block", !inForm && className),
4908
4862
  style: !inForm ? style : void 0,
4909
4863
  children: [
4910
- /* @__PURE__ */ jsx72(
4864
+ /* @__PURE__ */ jsx70(
4911
4865
  Input,
4912
4866
  {
4913
4867
  id: controlId,
@@ -4936,15 +4890,15 @@ function NumberInput({
4936
4890
  }
4937
4891
  }
4938
4892
  ),
4939
- /* @__PURE__ */ jsxs48(
4893
+ /* @__PURE__ */ jsxs47(
4940
4894
  "span",
4941
4895
  {
4942
4896
  className: cn(
4943
4897
  "absolute inset-y-0 right-0 flex w-7 flex-col divide-y divide-input border-l border-input",
4944
- showClear && CLEARABLE_ICON_HIDE
4898
+ showClear && CLEARABLE_OVERLAY_HIDE
4945
4899
  ),
4946
4900
  children: [
4947
- /* @__PURE__ */ jsx72(
4901
+ /* @__PURE__ */ jsx70(
4948
4902
  "button",
4949
4903
  {
4950
4904
  type: "button",
@@ -4953,10 +4907,10 @@ function NumberInput({
4953
4907
  disabled: disabled === true || atMax,
4954
4908
  className: stepperClass,
4955
4909
  onClick: () => stepBy(1),
4956
- children: /* @__PURE__ */ jsx72(ChevronUpIcon, { className: "size-3" })
4910
+ children: /* @__PURE__ */ jsx70(ChevronUpIcon, { className: "size-3" })
4957
4911
  }
4958
4912
  ),
4959
- /* @__PURE__ */ jsx72(
4913
+ /* @__PURE__ */ jsx70(
4960
4914
  "button",
4961
4915
  {
4962
4916
  type: "button",
@@ -4965,13 +4919,13 @@ function NumberInput({
4965
4919
  disabled: disabled === true || atMin,
4966
4920
  className: stepperClass,
4967
4921
  onClick: () => stepBy(-1),
4968
- children: /* @__PURE__ */ jsx72(ChevronDownIcon2, { className: "size-3" })
4922
+ children: /* @__PURE__ */ jsx70(ChevronDownIcon2, { className: "size-3" })
4969
4923
  }
4970
4924
  )
4971
4925
  ]
4972
4926
  }
4973
4927
  ),
4974
- showClear ? /* @__PURE__ */ jsx72(
4928
+ showClear ? /* @__PURE__ */ jsx70(
4975
4929
  ClearHoverButton,
4976
4930
  {
4977
4931
  label: t("pactor.control.clear"),
@@ -4983,11 +4937,12 @@ function NumberInput({
4983
4937
  }
4984
4938
  );
4985
4939
  if (inForm && form && name) {
4986
- return /* @__PURE__ */ jsx72(
4940
+ return /* @__PURE__ */ jsx70(
4987
4941
  FieldShell,
4988
4942
  {
4989
4943
  layout: form.layout,
4990
4944
  label,
4945
+ rules,
4991
4946
  htmlFor: controlId,
4992
4947
  error: form.errors[name],
4993
4948
  className,
@@ -5000,11 +4955,11 @@ function NumberInput({
5000
4955
  }
5001
4956
 
5002
4957
  // src/components/components/Page/index.tsx
5003
- import { jsx as jsx73, jsxs as jsxs49 } from "react/jsx-runtime";
4958
+ import { jsx as jsx71, jsxs as jsxs48 } from "react/jsx-runtime";
5004
4959
  function Page({ title, className, style, children }) {
5005
- return /* @__PURE__ */ jsxs49("div", { "data-slot": "page", className: cn("p-6", className), style, children: [
5006
- title ? /* @__PURE__ */ jsx73("h2", { "data-slot": "page-title", className: "mb-5 text-xl font-semibold", children: title }) : null,
5007
- /* @__PURE__ */ jsx73("div", { "data-slot": "page-content", className: "space-y-5", children })
4960
+ return /* @__PURE__ */ jsxs48("div", { "data-slot": "page", className: cn("p-6", className), style, children: [
4961
+ title ? /* @__PURE__ */ jsx71("h2", { "data-slot": "page-title", className: "mb-5 text-xl font-semibold", children: title }) : null,
4962
+ /* @__PURE__ */ jsx71("div", { "data-slot": "page-content", className: "space-y-5", children })
5008
4963
  ] });
5009
4964
  }
5010
4965
 
@@ -5012,7 +4967,7 @@ function Page({ title, className, style, children }) {
5012
4967
  import { useI18n as useI18n21 } from "@pactor-app/runtime";
5013
4968
  import { ChevronDownIcon as ChevronDownIcon3, ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
5014
4969
  import { useState as useState25 } from "react";
5015
- import { jsx as jsx74, jsxs as jsxs50 } from "react/jsx-runtime";
4970
+ import { jsx as jsx72, jsxs as jsxs49 } from "react/jsx-runtime";
5016
4971
  function pageItems(current, count) {
5017
4972
  if (count <= 7) {
5018
4973
  return Array.from({ length: count }, (_, i) => i + 1);
@@ -5065,7 +5020,7 @@ function Pagination2({
5065
5020
  onChange?.(1);
5066
5021
  };
5067
5022
  const sizes = (pageSizeOptions ?? []).map(Number).filter((n) => Number.isFinite(n) && n > 0);
5068
- return /* @__PURE__ */ jsx74(
5023
+ return /* @__PURE__ */ jsx72(
5069
5024
  Pagination,
5070
5025
  {
5071
5026
  className: cn(
@@ -5074,8 +5029,8 @@ function Pagination2({
5074
5029
  className
5075
5030
  ),
5076
5031
  style,
5077
- children: /* @__PURE__ */ jsxs50(PaginationContent, { children: [
5078
- showTotal && /* @__PURE__ */ jsx74(PaginationItem, { children: /* @__PURE__ */ jsx74(
5032
+ children: /* @__PURE__ */ jsxs49(PaginationContent, { children: [
5033
+ showTotal && /* @__PURE__ */ jsx72(PaginationItem, { children: /* @__PURE__ */ jsx72(
5079
5034
  "span",
5080
5035
  {
5081
5036
  "data-slot": "pagination-total",
@@ -5083,8 +5038,8 @@ function Pagination2({
5083
5038
  children: t("pactor.pagination.total", { count: total })
5084
5039
  }
5085
5040
  ) }),
5086
- sizes.length > 0 && /* @__PURE__ */ jsx74(PaginationItem, { children: /* @__PURE__ */ jsxs50(DropdownMenu, { children: [
5087
- /* @__PURE__ */ jsxs50(
5041
+ sizes.length > 0 && /* @__PURE__ */ jsx72(PaginationItem, { children: /* @__PURE__ */ jsxs49(DropdownMenu, { children: [
5042
+ /* @__PURE__ */ jsxs49(
5088
5043
  DropdownMenuTrigger,
5089
5044
  {
5090
5045
  "data-slot": "pagination-page-size",
@@ -5094,11 +5049,11 @@ function Pagination2({
5094
5049
  ),
5095
5050
  children: [
5096
5051
  t("pactor.pagination.pageSize", { size: effectivePageSize }),
5097
- /* @__PURE__ */ jsx74(ChevronDownIcon3, { className: "size-3.5", "aria-hidden": "true" })
5052
+ /* @__PURE__ */ jsx72(ChevronDownIcon3, { className: "size-3.5", "aria-hidden": "true" })
5098
5053
  ]
5099
5054
  }
5100
5055
  ),
5101
- /* @__PURE__ */ jsx74(DropdownMenuContent, { align: "start", children: renderDropdownItems(
5056
+ /* @__PURE__ */ jsx72(DropdownMenuContent, { align: "start", children: renderDropdownItems(
5102
5057
  sizes.map((s) => ({
5103
5058
  label: t("pactor.pagination.itemsPerPage", { size: s }),
5104
5059
  value: String(s),
@@ -5107,7 +5062,7 @@ function Pagination2({
5107
5062
  (v) => changePageSize(Number(v))
5108
5063
  ) })
5109
5064
  ] }) }),
5110
- /* @__PURE__ */ jsx74(PaginationItem, { children: /* @__PURE__ */ jsxs50(
5065
+ /* @__PURE__ */ jsx72(PaginationItem, { children: /* @__PURE__ */ jsxs49(
5111
5066
  PaginationLink,
5112
5067
  {
5113
5068
  href: "#",
@@ -5119,12 +5074,12 @@ function Pagination2({
5119
5074
  goTo(current - 1);
5120
5075
  },
5121
5076
  children: [
5122
- /* @__PURE__ */ jsx74(ChevronLeftIcon, {}),
5123
- /* @__PURE__ */ jsx74("span", { className: "hidden sm:block", children: t("pactor.pagination.prev") })
5077
+ /* @__PURE__ */ jsx72(ChevronLeftIcon, {}),
5078
+ /* @__PURE__ */ jsx72("span", { className: "hidden sm:block", children: t("pactor.pagination.prev") })
5124
5079
  ]
5125
5080
  }
5126
5081
  ) }),
5127
- pageItems(current, pageCount).map((item, index) => /* @__PURE__ */ jsx74(PaginationItem, { children: item === "ellipsis" ? /* @__PURE__ */ jsx74(PaginationEllipsis, {}) : /* @__PURE__ */ jsx74(
5082
+ pageItems(current, pageCount).map((item, index) => /* @__PURE__ */ jsx72(PaginationItem, { children: item === "ellipsis" ? /* @__PURE__ */ jsx72(PaginationEllipsis, {}) : /* @__PURE__ */ jsx72(
5128
5083
  PaginationLink,
5129
5084
  {
5130
5085
  href: "#",
@@ -5136,7 +5091,7 @@ function Pagination2({
5136
5091
  children: item
5137
5092
  }
5138
5093
  ) }, item === "ellipsis" ? `ellipsis-${index}` : item)),
5139
- /* @__PURE__ */ jsx74(PaginationItem, { children: /* @__PURE__ */ jsxs50(
5094
+ /* @__PURE__ */ jsx72(PaginationItem, { children: /* @__PURE__ */ jsxs49(
5140
5095
  PaginationLink,
5141
5096
  {
5142
5097
  href: "#",
@@ -5148,8 +5103,8 @@ function Pagination2({
5148
5103
  goTo(current + 1);
5149
5104
  },
5150
5105
  children: [
5151
- /* @__PURE__ */ jsx74("span", { className: "hidden sm:block", children: t("pactor.pagination.next") }),
5152
- /* @__PURE__ */ jsx74(ChevronRightIcon, {})
5106
+ /* @__PURE__ */ jsx72("span", { className: "hidden sm:block", children: t("pactor.pagination.next") }),
5107
+ /* @__PURE__ */ jsx72(ChevronRightIcon, {})
5153
5108
  ]
5154
5109
  }
5155
5110
  ) })
@@ -5161,7 +5116,7 @@ function Pagination2({
5161
5116
  // src/components/components/Popconfirm/index.tsx
5162
5117
  import { useI18n as useI18n22 } from "@pactor-app/runtime";
5163
5118
  import { useState as useState26 } from "react";
5164
- import { jsx as jsx75, jsxs as jsxs51 } from "react/jsx-runtime";
5119
+ import { jsx as jsx73, jsxs as jsxs50 } from "react/jsx-runtime";
5165
5120
  function Popconfirm({
5166
5121
  title,
5167
5122
  description,
@@ -5176,8 +5131,8 @@ function Popconfirm({
5176
5131
  }) {
5177
5132
  const { t } = useI18n22();
5178
5133
  const [open, setOpen] = useState26(false);
5179
- return /* @__PURE__ */ jsxs51(Popover, { open, onOpenChange: setOpen, children: [
5180
- /* @__PURE__ */ jsx75(
5134
+ return /* @__PURE__ */ jsxs50(Popover, { open, onOpenChange: setOpen, children: [
5135
+ /* @__PURE__ */ jsx73(
5181
5136
  PopoverTrigger,
5182
5137
  {
5183
5138
  nativeButton: false,
@@ -5185,10 +5140,10 @@ function Popconfirm({
5185
5140
  children
5186
5141
  }
5187
5142
  ),
5188
- /* @__PURE__ */ jsx75(PopoverContent, { className, style, children: /* @__PURE__ */ jsxs51("div", { className: "grid gap-3", children: [
5189
- /* @__PURE__ */ jsxs51("div", { className: "grid gap-1", children: [
5190
- title ? /* @__PURE__ */ jsx75("div", { "data-slot": "popconfirm-title", className: "font-medium", children: title }) : null,
5191
- description ? /* @__PURE__ */ jsx75(
5143
+ /* @__PURE__ */ jsx73(PopoverContent, { className, style, children: /* @__PURE__ */ jsxs50("div", { className: "grid gap-3", children: [
5144
+ /* @__PURE__ */ jsxs50("div", { className: "grid gap-1", children: [
5145
+ title ? /* @__PURE__ */ jsx73("div", { "data-slot": "popconfirm-title", className: "font-medium", children: title }) : null,
5146
+ description ? /* @__PURE__ */ jsx73(
5192
5147
  "div",
5193
5148
  {
5194
5149
  "data-slot": "popconfirm-description",
@@ -5197,8 +5152,8 @@ function Popconfirm({
5197
5152
  }
5198
5153
  ) : null
5199
5154
  ] }),
5200
- /* @__PURE__ */ jsxs51("div", { className: "flex justify-end gap-2", children: [
5201
- /* @__PURE__ */ jsx75(
5155
+ /* @__PURE__ */ jsxs50("div", { className: "flex justify-end gap-2", children: [
5156
+ /* @__PURE__ */ jsx73(
5202
5157
  Button,
5203
5158
  {
5204
5159
  variant: "outline",
@@ -5210,7 +5165,7 @@ function Popconfirm({
5210
5165
  children: cancelText ?? t("pactor.alertDialog.cancel")
5211
5166
  }
5212
5167
  ),
5213
- /* @__PURE__ */ jsx75(
5168
+ /* @__PURE__ */ jsx73(
5214
5169
  Button,
5215
5170
  {
5216
5171
  variant: danger ? "destructive" : "default",
@@ -5229,14 +5184,14 @@ function Popconfirm({
5229
5184
 
5230
5185
  // src/components/components/Popover/index.tsx
5231
5186
  import { useRenderer as useRenderer15 } from "@pactor-app/runtime";
5232
- import { jsx as jsx76, jsxs as jsxs52 } from "react/jsx-runtime";
5187
+ import { jsx as jsx74, jsxs as jsxs51 } from "react/jsx-runtime";
5233
5188
  function isDslNode3(value) {
5234
5189
  return typeof value === "object" && value !== null && typeof value.type === "string";
5235
5190
  }
5236
5191
  function Popover2({ content, children, side, align, className, style }) {
5237
5192
  const { renderChildren } = useRenderer15();
5238
- return /* @__PURE__ */ jsxs52(Popover, { children: [
5239
- /* @__PURE__ */ jsx76(
5193
+ return /* @__PURE__ */ jsxs51(Popover, { children: [
5194
+ /* @__PURE__ */ jsx74(
5240
5195
  PopoverTrigger,
5241
5196
  {
5242
5197
  nativeButton: false,
@@ -5244,21 +5199,21 @@ function Popover2({ content, children, side, align, className, style }) {
5244
5199
  children
5245
5200
  }
5246
5201
  ),
5247
- /* @__PURE__ */ jsx76(PopoverContent, { className, style, side, align, children: isDslNode3(content) ? renderChildren([content]) : content })
5202
+ /* @__PURE__ */ jsx74(PopoverContent, { className, style, side, align, children: isDslNode3(content) ? renderChildren([content]) : content })
5248
5203
  ] });
5249
5204
  }
5250
5205
 
5251
5206
  // src/components/components/Progress/index.tsx
5252
- import { jsx as jsx77 } from "react/jsx-runtime";
5207
+ import { jsx as jsx75 } from "react/jsx-runtime";
5253
5208
  function Progress2({ value, className, style }) {
5254
5209
  const resolved = typeof value === "number" && Number.isFinite(value) ? Math.min(100, Math.max(0, value)) : null;
5255
- return /* @__PURE__ */ jsx77(Progress, { value: resolved, className, style, children: /* @__PURE__ */ jsx77(ProgressTrack, { children: /* @__PURE__ */ jsx77(ProgressIndicator, {}) }) });
5210
+ return /* @__PURE__ */ jsx75(Progress, { value: resolved, className, style, children: /* @__PURE__ */ jsx75(ProgressTrack, { children: /* @__PURE__ */ jsx75(ProgressIndicator, {}) }) });
5256
5211
  }
5257
5212
 
5258
5213
  // src/components/components/QRCode/index.tsx
5259
5214
  import { toString } from "qrcode";
5260
5215
  import { useEffect as useEffect19, useState as useState27 } from "react";
5261
- import { jsx as jsx78 } from "react/jsx-runtime";
5216
+ import { jsx as jsx76 } from "react/jsx-runtime";
5262
5217
  var HEX_RE2 = /^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}(?:[0-9a-fA-F]{2})?)$/;
5263
5218
  function validHex(value) {
5264
5219
  return value && HEX_RE2.test(value.trim()) ? value.trim() : void 0;
@@ -5292,7 +5247,7 @@ function QRCode({
5292
5247
  cancelled = true;
5293
5248
  };
5294
5249
  }, [value, color, bgColor]);
5295
- return /* @__PURE__ */ jsx78(
5250
+ return /* @__PURE__ */ jsx76(
5296
5251
  "div",
5297
5252
  {
5298
5253
  "data-slot": "qrcode",
@@ -5302,7 +5257,7 @@ function QRCode({
5302
5257
  className
5303
5258
  ),
5304
5259
  style,
5305
- children: svg ? /* @__PURE__ */ jsx78(
5260
+ children: svg ? /* @__PURE__ */ jsx76(
5306
5261
  "div",
5307
5262
  {
5308
5263
  "data-slot": "qrcode-svg",
@@ -5310,13 +5265,13 @@ function QRCode({
5310
5265
  style: { width: size, height: size },
5311
5266
  dangerouslySetInnerHTML: { __html: svg }
5312
5267
  }
5313
- ) : /* @__PURE__ */ jsx78(
5268
+ ) : /* @__PURE__ */ jsx76(
5314
5269
  "div",
5315
5270
  {
5316
5271
  "data-slot": "qrcode-placeholder",
5317
5272
  className: "flex items-center justify-center rounded-md bg-muted text-muted-foreground",
5318
5273
  style: { width: size, height: size },
5319
- children: /* @__PURE__ */ jsx78(Icon, { name: "image", size: "lg" })
5274
+ children: /* @__PURE__ */ jsx76(Icon, { name: "image", size: "lg" })
5320
5275
  }
5321
5276
  )
5322
5277
  }
@@ -5325,7 +5280,7 @@ function QRCode({
5325
5280
 
5326
5281
  // src/components/components/RadioGroup/index.tsx
5327
5282
  import { useEffect as useEffect20, useId as useId9 } from "react";
5328
- import { jsx as jsx79, jsxs as jsxs53 } from "react/jsx-runtime";
5283
+ import { jsx as jsx77, jsxs as jsxs52 } from "react/jsx-runtime";
5329
5284
  function RadioGroup2({
5330
5285
  name,
5331
5286
  label,
@@ -5356,7 +5311,7 @@ function RadioGroup2({
5356
5311
  onChange?.(next);
5357
5312
  };
5358
5313
  const groupValue = current ?? "";
5359
- const group = /* @__PURE__ */ jsx79(
5314
+ const group = /* @__PURE__ */ jsx77(
5360
5315
  RadioGroup,
5361
5316
  {
5362
5317
  value: groupValue,
@@ -5371,8 +5326,8 @@ function RadioGroup2({
5371
5326
  children: options.map((option, index) => {
5372
5327
  const textId = `${controlId}-${index}`;
5373
5328
  const optionDisabled = disabled === true || option.disabled === true;
5374
- return /* @__PURE__ */ jsxs53("span", { className: "inline-flex items-center gap-2", children: [
5375
- /* @__PURE__ */ jsx79(
5329
+ return /* @__PURE__ */ jsxs52("span", { className: "inline-flex items-center gap-2", children: [
5330
+ /* @__PURE__ */ jsx77(
5376
5331
  RadioGroupItem,
5377
5332
  {
5378
5333
  value: option.value,
@@ -5380,7 +5335,7 @@ function RadioGroup2({
5380
5335
  "aria-labelledby": textId
5381
5336
  }
5382
5337
  ),
5383
- /* @__PURE__ */ jsx79(
5338
+ /* @__PURE__ */ jsx77(
5384
5339
  "span",
5385
5340
  {
5386
5341
  id: textId,
@@ -5401,11 +5356,12 @@ function RadioGroup2({
5401
5356
  }
5402
5357
  );
5403
5358
  if (inForm && form && name) {
5404
- return /* @__PURE__ */ jsx79(
5359
+ return /* @__PURE__ */ jsx77(
5405
5360
  FieldShell,
5406
5361
  {
5407
5362
  layout: form.layout,
5408
5363
  label,
5364
+ rules,
5409
5365
  error: form.errors[name],
5410
5366
  className,
5411
5367
  style,
@@ -5420,7 +5376,7 @@ function RadioGroup2({
5420
5376
  import { useI18n as useI18n23 } from "@pactor-app/runtime";
5421
5377
  import { Star } from "lucide-react";
5422
5378
  import { useEffect as useEffect21, useState as useState28 } from "react";
5423
- import { Fragment as Fragment8, jsx as jsx80, jsxs as jsxs54 } from "react/jsx-runtime";
5379
+ import { Fragment as Fragment8, jsx as jsx78, jsxs as jsxs53 } from "react/jsx-runtime";
5424
5380
  function Rate({
5425
5381
  name,
5426
5382
  label,
@@ -5463,8 +5419,8 @@ function Rate({
5463
5419
  const full = rating >= i;
5464
5420
  const half = !full && rating >= i - 0.5;
5465
5421
  stars.push(
5466
- /* @__PURE__ */ jsxs54("span", { className: "relative inline-flex", "data-slot": "rate-star", children: [
5467
- /* @__PURE__ */ jsx80(
5422
+ /* @__PURE__ */ jsxs53("span", { className: "relative inline-flex", "data-slot": "rate-star", children: [
5423
+ /* @__PURE__ */ jsx78(
5468
5424
  Star,
5469
5425
  {
5470
5426
  className: cn(
@@ -5473,9 +5429,9 @@ function Rate({
5473
5429
  )
5474
5430
  }
5475
5431
  ),
5476
- half ? /* @__PURE__ */ jsx80("span", { className: "absolute inset-0 w-1/2 overflow-hidden", "aria-hidden": true, children: /* @__PURE__ */ jsx80(Star, { className: "size-5 fill-warning text-warning" }) }) : null,
5477
- allowHalf ? /* @__PURE__ */ jsxs54(Fragment8, { children: [
5478
- /* @__PURE__ */ jsx80(
5432
+ half ? /* @__PURE__ */ jsx78("span", { className: "absolute inset-0 w-1/2 overflow-hidden", "aria-hidden": true, children: /* @__PURE__ */ jsx78(Star, { className: "size-5 fill-warning text-warning" }) }) : null,
5433
+ allowHalf ? /* @__PURE__ */ jsxs53(Fragment8, { children: [
5434
+ /* @__PURE__ */ jsx78(
5479
5435
  "button",
5480
5436
  {
5481
5437
  type: "button",
@@ -5485,7 +5441,7 @@ function Rate({
5485
5441
  onClick: () => handleSelect(i - 0.5)
5486
5442
  }
5487
5443
  ),
5488
- /* @__PURE__ */ jsx80(
5444
+ /* @__PURE__ */ jsx78(
5489
5445
  "button",
5490
5446
  {
5491
5447
  type: "button",
@@ -5495,7 +5451,7 @@ function Rate({
5495
5451
  onClick: () => handleSelect(i)
5496
5452
  }
5497
5453
  )
5498
- ] }) : /* @__PURE__ */ jsx80(
5454
+ ] }) : /* @__PURE__ */ jsx78(
5499
5455
  "button",
5500
5456
  {
5501
5457
  type: "button",
@@ -5508,7 +5464,7 @@ function Rate({
5508
5464
  ] }, i)
5509
5465
  );
5510
5466
  }
5511
- const control = /* @__PURE__ */ jsx80(
5467
+ const control = /* @__PURE__ */ jsx78(
5512
5468
  "div",
5513
5469
  {
5514
5470
  "data-slot": "rate",
@@ -5523,11 +5479,12 @@ function Rate({
5523
5479
  }
5524
5480
  );
5525
5481
  if (inForm && form && name) {
5526
- return /* @__PURE__ */ jsx80(
5482
+ return /* @__PURE__ */ jsx78(
5527
5483
  FieldShell,
5528
5484
  {
5529
5485
  layout: form.layout,
5530
5486
  label,
5487
+ rules,
5531
5488
  error: form.errors[name],
5532
5489
  className,
5533
5490
  style,
@@ -5541,7 +5498,7 @@ function Rate({
5541
5498
  // src/components/components/Resizable/index.tsx
5542
5499
  import { useRenderer as useRenderer16 } from "@pactor-app/runtime";
5543
5500
  import { Fragment as Fragment9 } from "react";
5544
- import { jsx as jsx81, jsxs as jsxs55 } from "react/jsx-runtime";
5501
+ import { jsx as jsx79, jsxs as jsxs54 } from "react/jsx-runtime";
5545
5502
  function Resizable({
5546
5503
  panels = [],
5547
5504
  direction = "horizontal",
@@ -5549,9 +5506,9 @@ function Resizable({
5549
5506
  style
5550
5507
  }) {
5551
5508
  const { renderChildren } = useRenderer16();
5552
- return /* @__PURE__ */ jsx81(PanelGroup, { orientation: direction, className, style, children: panels.map((panel, index) => /* @__PURE__ */ jsxs55(Fragment9, { children: [
5553
- index > 0 ? /* @__PURE__ */ jsx81(ResizableHandle, { withHandle: true }) : null,
5554
- /* @__PURE__ */ jsx81(
5509
+ return /* @__PURE__ */ jsx79(PanelGroup, { orientation: direction, className, style, children: panels.map((panel, index) => /* @__PURE__ */ jsxs54(Fragment9, { children: [
5510
+ index > 0 ? /* @__PURE__ */ jsx79(ResizableHandle, { withHandle: true }) : null,
5511
+ /* @__PURE__ */ jsx79(
5555
5512
  Panel,
5556
5513
  {
5557
5514
  defaultSize: typeof panel.defaultSizePx === "number" ? `${panel.defaultSizePx}px` : typeof panel.defaultSize === "number" ? `${panel.defaultSize}%` : void 0,
@@ -5565,7 +5522,7 @@ function Resizable({
5565
5522
 
5566
5523
  // src/components/components/Result/index.tsx
5567
5524
  import { CircleCheck, CircleX, Info, TriangleAlert } from "lucide-react";
5568
- import { jsx as jsx82, jsxs as jsxs56 } from "react/jsx-runtime";
5525
+ import { jsx as jsx80, jsxs as jsxs55 } from "react/jsx-runtime";
5569
5526
  var statusIcon = {
5570
5527
  success: { icon: CircleCheck, className: "text-success" },
5571
5528
  error: { icon: CircleX, className: "text-destructive" },
@@ -5582,7 +5539,7 @@ function Result({
5582
5539
  }) {
5583
5540
  const entry = statusIcon[status];
5584
5541
  const StatusIcon = entry?.icon;
5585
- return /* @__PURE__ */ jsxs56(
5542
+ return /* @__PURE__ */ jsxs55(
5586
5543
  "div",
5587
5544
  {
5588
5545
  "data-slot": "result",
@@ -5593,9 +5550,9 @@ function Result({
5593
5550
  ),
5594
5551
  style,
5595
5552
  children: [
5596
- /* @__PURE__ */ jsx82("div", { "data-slot": "result-icon", children: StatusIcon ? /* @__PURE__ */ jsx82(StatusIcon, { className: cn("size-12", entry.className) }) : /* @__PURE__ */ jsx82("span", { className: "text-5xl font-semibold text-muted-foreground", children: status }) }),
5597
- title ? /* @__PURE__ */ jsx82("div", { "data-slot": "result-title", className: "text-lg font-medium", children: title }) : null,
5598
- subTitle ? /* @__PURE__ */ jsx82(
5553
+ /* @__PURE__ */ jsx80("div", { "data-slot": "result-icon", children: StatusIcon ? /* @__PURE__ */ jsx80(StatusIcon, { className: cn("size-12", entry.className) }) : /* @__PURE__ */ jsx80("span", { className: "text-5xl font-semibold text-muted-foreground", children: status }) }),
5554
+ title ? /* @__PURE__ */ jsx80("div", { "data-slot": "result-title", className: "text-lg font-medium", children: title }) : null,
5555
+ subTitle ? /* @__PURE__ */ jsx80(
5599
5556
  "div",
5600
5557
  {
5601
5558
  "data-slot": "result-subtitle",
@@ -5603,7 +5560,7 @@ function Result({
5603
5560
  children: subTitle
5604
5561
  }
5605
5562
  ) : null,
5606
- children ? /* @__PURE__ */ jsx82("div", { "data-slot": "result-extra", className: "mt-2", children }) : null
5563
+ children ? /* @__PURE__ */ jsx80("div", { "data-slot": "result-extra", className: "mt-2", children }) : null
5607
5564
  ]
5608
5565
  }
5609
5566
  );
@@ -5612,10 +5569,10 @@ function Result({
5612
5569
  // src/components/components/RichText/index.tsx
5613
5570
  import DOMPurify from "dompurify";
5614
5571
  import { useMemo as useMemo4 } from "react";
5615
- import { jsx as jsx83 } from "react/jsx-runtime";
5572
+ import { jsx as jsx81 } from "react/jsx-runtime";
5616
5573
  function RichText({ html, className, style }) {
5617
5574
  const sanitized = useMemo4(() => DOMPurify.sanitize(html ?? ""), [html]);
5618
- return /* @__PURE__ */ jsx83(
5575
+ return /* @__PURE__ */ jsx81(
5619
5576
  "div",
5620
5577
  {
5621
5578
  "data-slot": "rich-text",
@@ -5627,7 +5584,7 @@ function RichText({ html, className, style }) {
5627
5584
  }
5628
5585
 
5629
5586
  // src/components/components/ScrollArea/index.tsx
5630
- import { jsx as jsx84 } from "react/jsx-runtime";
5587
+ import { jsx as jsx82 } from "react/jsx-runtime";
5631
5588
  function ScrollArea2({
5632
5589
  maxHeight,
5633
5590
  maxWidth,
@@ -5635,7 +5592,7 @@ function ScrollArea2({
5635
5592
  style,
5636
5593
  children
5637
5594
  }) {
5638
- return /* @__PURE__ */ jsx84(
5595
+ return /* @__PURE__ */ jsx82(
5639
5596
  ScrollArea,
5640
5597
  {
5641
5598
  className,
@@ -5647,7 +5604,7 @@ function ScrollArea2({
5647
5604
 
5648
5605
  // src/components/components/Segmented/index.tsx
5649
5606
  import { useEffect as useEffect22, useLayoutEffect, useRef as useRef6, useState as useState29 } from "react";
5650
- import { jsx as jsx85, jsxs as jsxs57 } from "react/jsx-runtime";
5607
+ import { jsx as jsx83, jsxs as jsxs56 } from "react/jsx-runtime";
5651
5608
  function Segmented({
5652
5609
  name,
5653
5610
  label,
@@ -5691,7 +5648,7 @@ function Segmented({
5691
5648
  window.addEventListener("resize", measure);
5692
5649
  return () => window.removeEventListener("resize", measure);
5693
5650
  }, [activeIndex, options]);
5694
- const control = /* @__PURE__ */ jsxs57(
5651
+ const control = /* @__PURE__ */ jsxs56(
5695
5652
  "div",
5696
5653
  {
5697
5654
  "data-slot": "segmented",
@@ -5703,7 +5660,7 @@ function Segmented({
5703
5660
  ),
5704
5661
  style: inForm ? void 0 : style,
5705
5662
  children: [
5706
- indicator ? /* @__PURE__ */ jsx85(
5663
+ indicator ? /* @__PURE__ */ jsx83(
5707
5664
  "span",
5708
5665
  {
5709
5666
  "data-slot": "segmented-indicator",
@@ -5714,7 +5671,7 @@ function Segmented({
5714
5671
  ) : null,
5715
5672
  options.map((option, index) => {
5716
5673
  const active = current === option.value;
5717
- return /* @__PURE__ */ jsxs57(
5674
+ return /* @__PURE__ */ jsxs56(
5718
5675
  "button",
5719
5676
  {
5720
5677
  ref: (el) => {
@@ -5733,7 +5690,7 @@ function Segmented({
5733
5690
  "disabled:cursor-not-allowed disabled:opacity-50"
5734
5691
  ),
5735
5692
  children: [
5736
- option.icon ? /* @__PURE__ */ jsx85(Icon, { name: option.icon, size: "sm" }) : null,
5693
+ option.icon ? /* @__PURE__ */ jsx83(Icon, { name: option.icon, size: "sm" }) : null,
5737
5694
  option.label
5738
5695
  ]
5739
5696
  },
@@ -5744,11 +5701,12 @@ function Segmented({
5744
5701
  }
5745
5702
  );
5746
5703
  if (inForm && form && name) {
5747
- return /* @__PURE__ */ jsx85(
5704
+ return /* @__PURE__ */ jsx83(
5748
5705
  FieldShell,
5749
5706
  {
5750
5707
  layout: form.layout,
5751
5708
  label,
5709
+ rules,
5752
5710
  error: form.errors[name],
5753
5711
  className,
5754
5712
  style,
@@ -5762,7 +5720,7 @@ function Segmented({
5762
5720
  // src/components/components/Select/index.tsx
5763
5721
  import { useI18n as useI18n24 } from "@pactor-app/runtime";
5764
5722
  import { useEffect as useEffect23, useId as useId10, useRef as useRef7, useState as useState30 } from "react";
5765
- import { jsx as jsx86, jsxs as jsxs58 } from "react/jsx-runtime";
5723
+ import { jsx as jsx84, jsxs as jsxs57 } from "react/jsx-runtime";
5766
5724
  function Select2({
5767
5725
  name,
5768
5726
  label,
@@ -5805,7 +5763,7 @@ function Select2({
5805
5763
  onChange?.(next ?? void 0);
5806
5764
  };
5807
5765
  const inFormRoot = inForm === true;
5808
- const select = /* @__PURE__ */ jsx86(
5766
+ const select = /* @__PURE__ */ jsx84(
5809
5767
  "span",
5810
5768
  {
5811
5769
  className: cn(
@@ -5815,7 +5773,7 @@ function Select2({
5815
5773
  controlClassName
5816
5774
  ),
5817
5775
  style: inFormRoot ? void 0 : style,
5818
- children: /* @__PURE__ */ jsxs58(
5776
+ children: /* @__PURE__ */ jsxs57(
5819
5777
  Select,
5820
5778
  {
5821
5779
  items: options,
@@ -5831,7 +5789,7 @@ function Select2({
5831
5789
  }
5832
5790
  },
5833
5791
  children: [
5834
- /* @__PURE__ */ jsxs58(
5792
+ /* @__PURE__ */ jsxs57(
5835
5793
  SelectTrigger,
5836
5794
  {
5837
5795
  id: controlId,
@@ -5843,8 +5801,8 @@ function Select2({
5843
5801
  CLEARABLE_GROUP
5844
5802
  ),
5845
5803
  children: [
5846
- /* @__PURE__ */ jsx86(SelectValue, { placeholder }),
5847
- showClear ? /* @__PURE__ */ jsx86(
5804
+ /* @__PURE__ */ jsx84(SelectValue, { placeholder }),
5805
+ showClear ? /* @__PURE__ */ jsx84(
5848
5806
  ClearHoverButton,
5849
5807
  {
5850
5808
  label: t("pactor.select.clear"),
@@ -5854,13 +5812,13 @@ function Select2({
5854
5812
  ]
5855
5813
  }
5856
5814
  ),
5857
- /* @__PURE__ */ jsxs58(SelectContent, { children: [
5858
- searchEnabled ? /* @__PURE__ */ jsx86(
5815
+ /* @__PURE__ */ jsxs57(SelectContent, { children: [
5816
+ searchEnabled ? /* @__PURE__ */ jsx84(
5859
5817
  "div",
5860
5818
  {
5861
5819
  "data-slot": "select-search",
5862
5820
  className: "sticky top-0 z-10 -mx-1 -mt-1 bg-popover px-1 pt-1 pb-1",
5863
- children: /* @__PURE__ */ jsx86(
5821
+ children: /* @__PURE__ */ jsx84(
5864
5822
  "input",
5865
5823
  {
5866
5824
  ref: searchInputRef,
@@ -5878,7 +5836,7 @@ function Select2({
5878
5836
  )
5879
5837
  }
5880
5838
  ) : null,
5881
- visibleOptions.map((option) => /* @__PURE__ */ jsx86(
5839
+ visibleOptions.map((option) => /* @__PURE__ */ jsx84(
5882
5840
  SelectItem,
5883
5841
  {
5884
5842
  value: option.value,
@@ -5887,7 +5845,7 @@ function Select2({
5887
5845
  },
5888
5846
  String(option.value)
5889
5847
  )),
5890
- visibleOptions.length === 0 ? /* @__PURE__ */ jsx86("div", { className: "px-2 py-3 text-center text-sm text-muted-foreground", children: t("pactor.command.empty") }) : null
5848
+ visibleOptions.length === 0 ? /* @__PURE__ */ jsx84("div", { className: "px-2 py-3 text-center text-sm text-muted-foreground", children: t("pactor.command.empty") }) : null
5891
5849
  ] })
5892
5850
  ]
5893
5851
  }
@@ -5895,25 +5853,17 @@ function Select2({
5895
5853
  }
5896
5854
  );
5897
5855
  if (inForm && form && name) {
5898
- const error = form.errors[name];
5899
- return /* @__PURE__ */ jsxs58(
5900
- "div",
5856
+ return /* @__PURE__ */ jsx84(
5857
+ FieldShell,
5901
5858
  {
5902
- "data-slot": "form-item",
5903
- className: cn(formItemClass(form.layout), className),
5859
+ layout: form.layout,
5860
+ label,
5861
+ htmlFor: controlId,
5862
+ rules,
5863
+ error: form.errors[name],
5864
+ className,
5904
5865
  style,
5905
- children: [
5906
- label ? /* @__PURE__ */ jsx86(
5907
- "label",
5908
- {
5909
- htmlFor: controlId,
5910
- className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap",
5911
- children: label
5912
- }
5913
- ) : null,
5914
- select,
5915
- error ? /* @__PURE__ */ jsx86("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
5916
- ]
5866
+ children: select
5917
5867
  }
5918
5868
  );
5919
5869
  }
@@ -5921,9 +5871,9 @@ function Select2({
5921
5871
  }
5922
5872
 
5923
5873
  // src/components/components/Separator/index.tsx
5924
- import { jsx as jsx87 } from "react/jsx-runtime";
5874
+ import { jsx as jsx85 } from "react/jsx-runtime";
5925
5875
  function Separator2({ orientation = "horizontal", className, style }) {
5926
- return /* @__PURE__ */ jsx87(
5876
+ return /* @__PURE__ */ jsx85(
5927
5877
  Separator,
5928
5878
  {
5929
5879
  orientation,
@@ -5937,7 +5887,7 @@ function Separator2({ orientation = "horizontal", className, style }) {
5937
5887
  }
5938
5888
 
5939
5889
  // src/components/components/Sheet/index.tsx
5940
- import { jsx as jsx88, jsxs as jsxs59 } from "react/jsx-runtime";
5890
+ import { jsx as jsx86, jsxs as jsxs58 } from "react/jsx-runtime";
5941
5891
  function Sheet2({
5942
5892
  title,
5943
5893
  open,
@@ -5947,7 +5897,7 @@ function Sheet2({
5947
5897
  className,
5948
5898
  style
5949
5899
  }) {
5950
- return /* @__PURE__ */ jsx88(
5900
+ return /* @__PURE__ */ jsx86(
5951
5901
  Sheet,
5952
5902
  {
5953
5903
  open: open ?? false,
@@ -5956,9 +5906,9 @@ function Sheet2({
5956
5906
  onClose?.();
5957
5907
  }
5958
5908
  },
5959
- children: /* @__PURE__ */ jsxs59(SheetContent, { side, className, style, children: [
5960
- title ? /* @__PURE__ */ jsx88(SheetHeader, { children: /* @__PURE__ */ jsx88(SheetTitle, { children: title }) }) : null,
5961
- /* @__PURE__ */ jsx88("div", { className: "flex-1 overflow-auto px-4", children })
5909
+ children: /* @__PURE__ */ jsxs58(SheetContent, { side, className, style, children: [
5910
+ title ? /* @__PURE__ */ jsx86(SheetHeader, { children: /* @__PURE__ */ jsx86(SheetTitle, { children: title }) }) : null,
5911
+ /* @__PURE__ */ jsx86("div", { className: "flex-1 overflow-auto px-4", children })
5962
5912
  ] })
5963
5913
  }
5964
5914
  );
@@ -5966,7 +5916,7 @@ function Sheet2({
5966
5916
 
5967
5917
  // src/components/components/Sider/index.tsx
5968
5918
  import { ChevronLeft, ChevronRight as ChevronRight2 } from "lucide-react";
5969
- import { jsx as jsx89, jsxs as jsxs60 } from "react/jsx-runtime";
5919
+ import { jsx as jsx87, jsxs as jsxs59 } from "react/jsx-runtime";
5970
5920
  function Sider({
5971
5921
  width = 200,
5972
5922
  collapsible,
@@ -5978,7 +5928,7 @@ function Sider({
5978
5928
  children
5979
5929
  }) {
5980
5930
  const current = collapsed ? collapsedWidth : width;
5981
- return /* @__PURE__ */ jsxs60(
5931
+ return /* @__PURE__ */ jsxs59(
5982
5932
  "aside",
5983
5933
  {
5984
5934
  "data-slot": "layout-sider",
@@ -5989,15 +5939,15 @@ function Sider({
5989
5939
  ),
5990
5940
  style: { width: current, ...style },
5991
5941
  children: [
5992
- /* @__PURE__ */ jsx89("div", { className: "min-h-0 flex-1 overflow-auto", children }),
5993
- collapsible ? /* @__PURE__ */ jsx89(
5942
+ /* @__PURE__ */ jsx87("div", { className: "min-h-0 flex-1 overflow-auto", children }),
5943
+ collapsible ? /* @__PURE__ */ jsx87(
5994
5944
  "button",
5995
5945
  {
5996
5946
  type: "button",
5997
5947
  "aria-label": collapsed ? "expand sider" : "collapse sider",
5998
5948
  className: "flex h-10 shrink-0 items-center justify-center border-t text-muted-foreground hover:text-foreground",
5999
5949
  onClick: () => onCollapse?.(!collapsed),
6000
- children: collapsed ? /* @__PURE__ */ jsx89(ChevronRight2, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ jsx89(ChevronLeft, { "aria-hidden": true, className: "size-4" })
5950
+ children: collapsed ? /* @__PURE__ */ jsx87(ChevronRight2, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ jsx87(ChevronLeft, { "aria-hidden": true, className: "size-4" })
6001
5951
  }
6002
5952
  ) : null
6003
5953
  ]
@@ -6006,7 +5956,7 @@ function Sider({
6006
5956
  }
6007
5957
 
6008
5958
  // src/components/components/Skeleton/index.tsx
6009
- import { jsx as jsx90 } from "react/jsx-runtime";
5959
+ import { jsx as jsx88 } from "react/jsx-runtime";
6010
5960
  var shapeDefaults = {
6011
5961
  line: { className: "h-4 w-full", style: {} },
6012
5962
  circle: { className: "rounded-full", style: { width: 40, height: 40 } },
@@ -6017,7 +5967,7 @@ function toSize(value) {
6017
5967
  }
6018
5968
  function Skeleton2({ shape = "line", width, height, className, style }) {
6019
5969
  const defaults = shapeDefaults[shape];
6020
- return /* @__PURE__ */ jsx90(
5970
+ return /* @__PURE__ */ jsx88(
6021
5971
  Skeleton,
6022
5972
  {
6023
5973
  className: cn(defaults.className, className),
@@ -6033,7 +5983,7 @@ function Skeleton2({ shape = "line", width, height, className, style }) {
6033
5983
 
6034
5984
  // src/components/components/Slider/index.tsx
6035
5985
  import { useEffect as useEffect24 } from "react";
6036
- import { jsx as jsx91, jsxs as jsxs61 } from "react/jsx-runtime";
5986
+ import { jsx as jsx89, jsxs as jsxs60 } from "react/jsx-runtime";
6037
5987
  function Slider2({
6038
5988
  name,
6039
5989
  label,
@@ -6064,7 +6014,7 @@ function Slider2({
6064
6014
  }
6065
6015
  onChange?.(next);
6066
6016
  };
6067
- const slider = /* @__PURE__ */ jsx91(
6017
+ const slider = /* @__PURE__ */ jsx89(
6068
6018
  Slider,
6069
6019
  {
6070
6020
  value: numberValue,
@@ -6076,18 +6026,19 @@ function Slider2({
6076
6026
  onValueChange: handleChange,
6077
6027
  className: inForm ? void 0 : className,
6078
6028
  style: inForm ? void 0 : style,
6079
- children: /* @__PURE__ */ jsxs61(SliderControl, { children: [
6080
- /* @__PURE__ */ jsx91(SliderTrack, { children: /* @__PURE__ */ jsx91(SliderIndicator, {}) }),
6081
- /* @__PURE__ */ jsx91(SliderThumb, {})
6029
+ children: /* @__PURE__ */ jsxs60(SliderControl, { children: [
6030
+ /* @__PURE__ */ jsx89(SliderTrack, { children: /* @__PURE__ */ jsx89(SliderIndicator, {}) }),
6031
+ /* @__PURE__ */ jsx89(SliderThumb, {})
6082
6032
  ] })
6083
6033
  }
6084
6034
  );
6085
6035
  if (inForm && form && name) {
6086
- return /* @__PURE__ */ jsx91(
6036
+ return /* @__PURE__ */ jsx89(
6087
6037
  FieldShell,
6088
6038
  {
6089
6039
  layout: form.layout,
6090
6040
  label,
6041
+ rules,
6091
6042
  error: form.errors[name],
6092
6043
  className,
6093
6044
  style,
@@ -6101,7 +6052,7 @@ function Slider2({
6101
6052
  // src/components/components/Sonner/index.tsx
6102
6053
  import { useRenderer as useRenderer17 } from "@pactor-app/runtime";
6103
6054
  import { useEffect as useEffect25 } from "react";
6104
- import { jsx as jsx92 } from "react/jsx-runtime";
6055
+ import { jsx as jsx90 } from "react/jsx-runtime";
6105
6056
  function Sonner({ className, style }) {
6106
6057
  const { context } = useRenderer17();
6107
6058
  useEffect25(() => {
@@ -6118,11 +6069,11 @@ function Sonner({ className, style }) {
6118
6069
  return { ok: true };
6119
6070
  });
6120
6071
  }, [context]);
6121
- return /* @__PURE__ */ jsx92("div", { "data-slot": "sonner", className, style, children: /* @__PURE__ */ jsx92(Toaster, {}) });
6072
+ return /* @__PURE__ */ jsx90("div", { "data-slot": "sonner", className, style, children: /* @__PURE__ */ jsx90(Toaster, {}) });
6122
6073
  }
6123
6074
 
6124
6075
  // src/components/components/Space/index.tsx
6125
- import { jsx as jsx93 } from "react/jsx-runtime";
6076
+ import { jsx as jsx91 } from "react/jsx-runtime";
6126
6077
  var sizeClass2 = {
6127
6078
  small: "gap-2",
6128
6079
  middle: "gap-4",
@@ -6143,7 +6094,7 @@ function Space({
6143
6094
  style,
6144
6095
  children
6145
6096
  }) {
6146
- return /* @__PURE__ */ jsx93(
6097
+ return /* @__PURE__ */ jsx91(
6147
6098
  "div",
6148
6099
  {
6149
6100
  "data-slot": "space",
@@ -6162,31 +6113,31 @@ function Space({
6162
6113
  }
6163
6114
 
6164
6115
  // src/components/components/Spinner/index.tsx
6165
- import { jsx as jsx94 } from "react/jsx-runtime";
6116
+ import { jsx as jsx92 } from "react/jsx-runtime";
6166
6117
  var sizeClass3 = {
6167
6118
  sm: "size-3",
6168
6119
  default: "size-4",
6169
6120
  lg: "size-6"
6170
6121
  };
6171
6122
  function Spinner2({ size = "default", className, style }) {
6172
- return /* @__PURE__ */ jsx94(Spinner, { className: cn(sizeClass3[size], className), style });
6123
+ return /* @__PURE__ */ jsx92(Spinner, { className: cn(sizeClass3[size], className), style });
6173
6124
  }
6174
6125
 
6175
6126
  // src/components/components/Statistic/index.tsx
6176
- import { jsx as jsx95, jsxs as jsxs62 } from "react/jsx-runtime";
6127
+ import { jsx as jsx93, jsxs as jsxs61 } from "react/jsx-runtime";
6177
6128
  function Statistic({ title, value, precision, suffix, className, style }) {
6178
6129
  const display = typeof value === "number" && precision !== void 0 ? value.toFixed(precision) : value;
6179
- return /* @__PURE__ */ jsxs62("div", { "data-slot": "statistic", className: cn(className), style, children: [
6180
- title ? /* @__PURE__ */ jsx95("div", { "data-slot": "statistic-title", className: "text-sm text-muted-foreground", children: title }) : null,
6181
- /* @__PURE__ */ jsxs62("div", { "data-slot": "statistic-value", className: "text-2xl font-bold tabular-nums", children: [
6130
+ return /* @__PURE__ */ jsxs61("div", { "data-slot": "statistic", className: cn(className), style, children: [
6131
+ title ? /* @__PURE__ */ jsx93("div", { "data-slot": "statistic-title", className: "text-sm text-muted-foreground", children: title }) : null,
6132
+ /* @__PURE__ */ jsxs61("div", { "data-slot": "statistic-value", className: "text-2xl font-bold tabular-nums", children: [
6182
6133
  display,
6183
- suffix ? /* @__PURE__ */ jsx95("span", { className: "ml-1 text-sm font-normal text-muted-foreground", children: suffix }) : null
6134
+ suffix ? /* @__PURE__ */ jsx93("span", { className: "ml-1 text-sm font-normal text-muted-foreground", children: suffix }) : null
6184
6135
  ] })
6185
6136
  ] });
6186
6137
  }
6187
6138
 
6188
6139
  // src/components/components/Status/index.tsx
6189
- import { jsx as jsx96, jsxs as jsxs63 } from "react/jsx-runtime";
6140
+ import { jsx as jsx94, jsxs as jsxs62 } from "react/jsx-runtime";
6190
6141
  var dotClass = {
6191
6142
  success: "bg-success",
6192
6143
  processing: "bg-info",
@@ -6195,7 +6146,7 @@ var dotClass = {
6195
6146
  default: "bg-muted-foreground"
6196
6147
  };
6197
6148
  function Status({ status = "default", text, className, style }) {
6198
- return /* @__PURE__ */ jsxs63(
6149
+ return /* @__PURE__ */ jsxs62(
6199
6150
  "span",
6200
6151
  {
6201
6152
  "data-slot": "status",
@@ -6203,8 +6154,8 @@ function Status({ status = "default", text, className, style }) {
6203
6154
  className: cn("inline-flex items-center gap-1.5 text-sm", className),
6204
6155
  style,
6205
6156
  children: [
6206
- /* @__PURE__ */ jsxs63("span", { "data-slot": "status-dot", className: "relative flex size-2", children: [
6207
- status === "processing" ? /* @__PURE__ */ jsx96(
6157
+ /* @__PURE__ */ jsxs62("span", { "data-slot": "status-dot", className: "relative flex size-2", children: [
6158
+ status === "processing" ? /* @__PURE__ */ jsx94(
6208
6159
  "span",
6209
6160
  {
6210
6161
  "aria-hidden": "true",
@@ -6214,9 +6165,9 @@ function Status({ status = "default", text, className, style }) {
6214
6165
  )
6215
6166
  }
6216
6167
  ) : null,
6217
- /* @__PURE__ */ jsx96("span", { className: cn("relative inline-flex size-2 rounded-full", dotClass[status]) })
6168
+ /* @__PURE__ */ jsx94("span", { className: cn("relative inline-flex size-2 rounded-full", dotClass[status]) })
6218
6169
  ] }),
6219
- text ? /* @__PURE__ */ jsx96("span", { "data-slot": "status-text", children: text }) : null
6170
+ text ? /* @__PURE__ */ jsx94("span", { "data-slot": "status-text", children: text }) : null
6220
6171
  ]
6221
6172
  }
6222
6173
  );
@@ -6224,7 +6175,7 @@ function Status({ status = "default", text, className, style }) {
6224
6175
 
6225
6176
  // src/components/components/Steps/index.tsx
6226
6177
  import { Fragment as Fragment10 } from "react";
6227
- import { jsx as jsx97, jsxs as jsxs64 } from "react/jsx-runtime";
6178
+ import { jsx as jsx95, jsxs as jsxs63 } from "react/jsx-runtime";
6228
6179
  var iconBoxClass = {
6229
6180
  finish: "border-primary text-primary",
6230
6181
  process: "border-primary bg-primary text-primary-foreground",
@@ -6244,7 +6195,7 @@ function statusIcon2(status) {
6244
6195
  }
6245
6196
  function Steps({ items = [], current = 0, direction = "horizontal", className, style }) {
6246
6197
  const vertical = direction === "vertical";
6247
- return /* @__PURE__ */ jsx97(
6198
+ return /* @__PURE__ */ jsx95(
6248
6199
  "ol",
6249
6200
  {
6250
6201
  "data-slot": "steps",
@@ -6254,15 +6205,15 @@ function Steps({ items = [], current = 0, direction = "horizontal", className, s
6254
6205
  const status = item.status ?? (index < current ? "finish" : index === current ? "process" : "wait");
6255
6206
  const stateIcon = statusIcon2(status);
6256
6207
  const last = index === items.length - 1;
6257
- return /* @__PURE__ */ jsxs64(Fragment10, { children: [
6258
- /* @__PURE__ */ jsxs64(
6208
+ return /* @__PURE__ */ jsxs63(Fragment10, { children: [
6209
+ /* @__PURE__ */ jsxs63(
6259
6210
  "li",
6260
6211
  {
6261
6212
  "data-slot": "steps-item",
6262
6213
  "data-status": status,
6263
6214
  className: cn("flex gap-2", vertical ? "items-start" : "shrink-0 items-start"),
6264
6215
  children: [
6265
- /* @__PURE__ */ jsx97(
6216
+ /* @__PURE__ */ jsx95(
6266
6217
  "span",
6267
6218
  {
6268
6219
  "data-slot": "steps-icon",
@@ -6270,17 +6221,17 @@ function Steps({ items = [], current = 0, direction = "horizontal", className, s
6270
6221
  "flex size-7 shrink-0 items-center justify-center rounded-full border text-sm",
6271
6222
  iconBoxClass[status]
6272
6223
  ),
6273
- children: item.icon ? /* @__PURE__ */ jsx97(Icon, { name: item.icon, size: "sm" }) : stateIcon ? /* @__PURE__ */ jsx97(Icon, { name: stateIcon, size: "sm" }) : index + 1
6224
+ children: item.icon ? /* @__PURE__ */ jsx95(Icon, { name: item.icon, size: "sm" }) : stateIcon ? /* @__PURE__ */ jsx95(Icon, { name: stateIcon, size: "sm" }) : index + 1
6274
6225
  }
6275
6226
  ),
6276
- /* @__PURE__ */ jsxs64("div", { className: cn("min-w-0", !vertical && "pt-0.5"), children: [
6277
- /* @__PURE__ */ jsx97("div", { "data-slot": "steps-title", className: cn("text-sm", titleClass[status]), children: item.title }),
6278
- item.description ? /* @__PURE__ */ jsx97("div", { "data-slot": "steps-description", className: "mt-0.5 text-xs text-muted-foreground", children: item.description }) : null
6227
+ /* @__PURE__ */ jsxs63("div", { className: cn("min-w-0", !vertical && "pt-0.5"), children: [
6228
+ /* @__PURE__ */ jsx95("div", { "data-slot": "steps-title", className: cn("text-sm", titleClass[status]), children: item.title }),
6229
+ item.description ? /* @__PURE__ */ jsx95("div", { "data-slot": "steps-description", className: "mt-0.5 text-xs text-muted-foreground", children: item.description }) : null
6279
6230
  ] })
6280
6231
  ]
6281
6232
  }
6282
6233
  ),
6283
- !last ? /* @__PURE__ */ jsx97(
6234
+ !last ? /* @__PURE__ */ jsx95(
6284
6235
  "li",
6285
6236
  {
6286
6237
  "aria-hidden": "true",
@@ -6299,7 +6250,7 @@ function Steps({ items = [], current = 0, direction = "horizontal", className, s
6299
6250
 
6300
6251
  // src/components/components/Switch/index.tsx
6301
6252
  import { useEffect as useEffect26, useId as useId11 } from "react";
6302
- import { jsx as jsx98, jsxs as jsxs65 } from "react/jsx-runtime";
6253
+ import { jsx as jsx96, jsxs as jsxs64 } from "react/jsx-runtime";
6303
6254
  function Switch2({
6304
6255
  name,
6305
6256
  label,
@@ -6328,13 +6279,13 @@ function Switch2({
6328
6279
  }
6329
6280
  onChange?.(next);
6330
6281
  };
6331
- const control = /* @__PURE__ */ jsxs65(
6282
+ const control = /* @__PURE__ */ jsxs64(
6332
6283
  "span",
6333
6284
  {
6334
6285
  className: cn("inline-flex items-center gap-2", !inForm && className),
6335
6286
  style: inForm ? void 0 : style,
6336
6287
  children: [
6337
- /* @__PURE__ */ jsx98(
6288
+ /* @__PURE__ */ jsx96(
6338
6289
  Switch,
6339
6290
  {
6340
6291
  id: controlId,
@@ -6344,12 +6295,12 @@ function Switch2({
6344
6295
  onCheckedChange: handleChange
6345
6296
  }
6346
6297
  ),
6347
- label ? /* @__PURE__ */ jsx98("label", { htmlFor: controlId, className: "text-sm leading-none font-medium", children: label }) : null
6298
+ label ? /* @__PURE__ */ jsx96("label", { htmlFor: controlId, className: "text-sm leading-none font-medium", children: label }) : null
6348
6299
  ]
6349
6300
  }
6350
6301
  );
6351
6302
  if (inForm && form && name) {
6352
- return /* @__PURE__ */ jsxs65(
6303
+ return /* @__PURE__ */ jsxs64(
6353
6304
  "div",
6354
6305
  {
6355
6306
  "data-slot": "form-item",
@@ -6357,7 +6308,7 @@ function Switch2({
6357
6308
  style,
6358
6309
  children: [
6359
6310
  control,
6360
- form.errors[name] ? /* @__PURE__ */ jsx98("div", { "data-slot": "form-error", className: "mt-1.5 text-sm text-destructive", children: form.errors[name] }) : null
6311
+ form.errors[name] ? /* @__PURE__ */ jsx96("div", { "data-slot": "form-error", className: "mt-1.5 text-sm text-destructive", children: form.errors[name] }) : null
6361
6312
  ]
6362
6313
  }
6363
6314
  );
@@ -6498,7 +6449,7 @@ function moveRow(rows, dragKey, dropKey, position, options) {
6498
6449
  }
6499
6450
 
6500
6451
  // src/components/components/Table/index.tsx
6501
- import { jsx as jsx99, jsxs as jsxs66 } from "react/jsx-runtime";
6452
+ import { jsx as jsx97, jsxs as jsxs65 } from "react/jsx-runtime";
6502
6453
  function renderCellValue2(value) {
6503
6454
  if (value === void 0 || value === null) {
6504
6455
  return "";
@@ -6745,7 +6696,7 @@ function Table2({
6745
6696
  1,
6746
6697
  columns.length + (rowSelection ? 1 : 0) + (rowDraggable ? 1 : 0)
6747
6698
  );
6748
- return /* @__PURE__ */ jsxs66(
6699
+ return /* @__PURE__ */ jsxs65(
6749
6700
  "div",
6750
6701
  {
6751
6702
  ref: rootRef,
@@ -6753,22 +6704,22 @@ function Table2({
6753
6704
  className: cn("relative", className),
6754
6705
  style,
6755
6706
  children: [
6756
- loading ? /* @__PURE__ */ jsx99(
6707
+ loading ? /* @__PURE__ */ jsx97(
6757
6708
  "div",
6758
6709
  {
6759
6710
  "data-slot": "table-loading",
6760
6711
  className: "absolute inset-0 z-40 flex items-center justify-center bg-card/60",
6761
- children: /* @__PURE__ */ jsx99(Spinner, { className: "size-6 text-muted-foreground" })
6712
+ children: /* @__PURE__ */ jsx97(Spinner, { className: "size-6 text-muted-foreground" })
6762
6713
  }
6763
6714
  ) : null,
6764
- /* @__PURE__ */ jsxs66(
6715
+ /* @__PURE__ */ jsxs65(
6765
6716
  Table,
6766
6717
  {
6767
6718
  containerClassName: stickyHeader ? "overflow-y-auto" : void 0,
6768
6719
  containerStyle: stickyHeader ? { maxHeight: scrollY } : void 0,
6769
6720
  children: [
6770
- /* @__PURE__ */ jsx99(TableHeader, { children: /* @__PURE__ */ jsxs66(TableRow, { className: "hover:bg-transparent", children: [
6771
- rowDraggable ? /* @__PURE__ */ jsx99(
6721
+ /* @__PURE__ */ jsx97(TableHeader, { children: /* @__PURE__ */ jsxs65(TableRow, { className: "hover:bg-transparent", children: [
6722
+ rowDraggable ? /* @__PURE__ */ jsx97(
6772
6723
  TableHead,
6773
6724
  {
6774
6725
  "data-slot": "table-drag-head",
@@ -6776,13 +6727,13 @@ function Table2({
6776
6727
  style: { width: 36, minWidth: 36 }
6777
6728
  }
6778
6729
  ) : null,
6779
- rowSelection ? /* @__PURE__ */ jsx99(
6730
+ rowSelection ? /* @__PURE__ */ jsx97(
6780
6731
  TableHead,
6781
6732
  {
6782
6733
  "data-slot": "table-selection-head",
6783
6734
  className: stickyHeadClass(null, false),
6784
6735
  style: { width: 36, minWidth: 36 },
6785
- children: /* @__PURE__ */ jsx99(
6736
+ children: /* @__PURE__ */ jsx97(
6786
6737
  Checkbox,
6787
6738
  {
6788
6739
  "aria-label": t("pactor.table.selectAll"),
@@ -6798,7 +6749,7 @@ function Table2({
6798
6749
  const sortable = column.sorter === true && column.dataIndex !== void 0;
6799
6750
  const isSortedColumn = sort !== null && column.dataIndex !== void 0 && sort.dataIndex === column.dataIndex;
6800
6751
  const activeOrder = sortable && isSortedColumn ? sort.order : null;
6801
- return /* @__PURE__ */ jsx99(
6752
+ return /* @__PURE__ */ jsx97(
6802
6753
  TableHead,
6803
6754
  {
6804
6755
  className: cn(
@@ -6807,7 +6758,7 @@ function Table2({
6807
6758
  ),
6808
6759
  style: columnWidthStyle(column),
6809
6760
  "aria-sort": activeOrder === "ascend" ? "ascending" : activeOrder === "descend" ? "descending" : void 0,
6810
- children: sortable ? /* @__PURE__ */ jsxs66(
6761
+ children: sortable ? /* @__PURE__ */ jsxs65(
6811
6762
  "button",
6812
6763
  {
6813
6764
  type: "button",
@@ -6816,7 +6767,7 @@ function Table2({
6816
6767
  className: "inline-flex cursor-pointer items-center gap-1 font-medium",
6817
6768
  children: [
6818
6769
  column.title,
6819
- /* @__PURE__ */ jsx99(
6770
+ /* @__PURE__ */ jsx97(
6820
6771
  Icon,
6821
6772
  {
6822
6773
  name: activeOrder === "ascend" ? "arrow-up" : activeOrder === "descend" ? "arrow-down" : "chevrons-up-down",
@@ -6832,29 +6783,29 @@ function Table2({
6832
6783
  );
6833
6784
  })
6834
6785
  ] }) }),
6835
- /* @__PURE__ */ jsx99(TableBody, { children: flatRows.length === 0 ? /* @__PURE__ */ jsx99(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ jsx99(TableCell, { colSpan, children: /* @__PURE__ */ jsxs66(
6786
+ /* @__PURE__ */ jsx97(TableBody, { children: flatRows.length === 0 ? /* @__PURE__ */ jsx97(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ jsx97(TableCell, { colSpan, children: /* @__PURE__ */ jsxs65(
6836
6787
  "div",
6837
6788
  {
6838
6789
  "data-slot": "table-empty",
6839
6790
  className: "flex flex-col items-center gap-2 py-8 text-muted-foreground",
6840
6791
  children: [
6841
- /* @__PURE__ */ jsx99(Icon, { name: "inbox", size: "lg" }),
6842
- /* @__PURE__ */ jsx99("div", { className: "text-sm", children: emptyText ?? t("pactor.table.empty") })
6792
+ /* @__PURE__ */ jsx97(Icon, { name: "inbox", size: "lg" }),
6793
+ /* @__PURE__ */ jsx97("div", { className: "text-sm", children: emptyText ?? t("pactor.table.empty") })
6843
6794
  ]
6844
6795
  }
6845
- ) }) }) : flatRows.map((flat, rowIndex) => /* @__PURE__ */ jsxs66(
6796
+ ) }) }) : flatRows.map((flat, rowIndex) => /* @__PURE__ */ jsxs65(
6846
6797
  TableRow,
6847
6798
  {
6848
6799
  className: cn(dragKey === flat.key ? "opacity-50" : void 0),
6849
6800
  onDragOver: rowDraggable ? (event) => handleRowDragOver(flat, event) : void 0,
6850
6801
  onDrop: rowDraggable ? (event) => handleRowDrop(flat, event) : void 0,
6851
6802
  children: [
6852
- rowDraggable ? /* @__PURE__ */ jsx99(
6803
+ rowDraggable ? /* @__PURE__ */ jsx97(
6853
6804
  TableCell,
6854
6805
  {
6855
6806
  "data-slot": "table-drag-cell",
6856
6807
  className: dropIndicatorClass(flat.key),
6857
- children: /* @__PURE__ */ jsx99(
6808
+ children: /* @__PURE__ */ jsx97(
6858
6809
  "button",
6859
6810
  {
6860
6811
  type: "button",
@@ -6864,17 +6815,17 @@ function Table2({
6864
6815
  onDragStart: (event) => handleDragStart(flat, event),
6865
6816
  onDragEnd: resetDrag,
6866
6817
  className: "inline-flex size-4 cursor-move items-center justify-center text-muted-foreground hover:text-foreground",
6867
- children: /* @__PURE__ */ jsx99(Icon, { name: "grip-vertical", size: "sm" })
6818
+ children: /* @__PURE__ */ jsx97(Icon, { name: "grip-vertical", size: "sm" })
6868
6819
  }
6869
6820
  )
6870
6821
  }
6871
6822
  ) : null,
6872
- rowSelection ? /* @__PURE__ */ jsx99(
6823
+ rowSelection ? /* @__PURE__ */ jsx97(
6873
6824
  TableCell,
6874
6825
  {
6875
6826
  "data-slot": "table-selection-cell",
6876
6827
  className: dropIndicatorClass(flat.key),
6877
- children: /* @__PURE__ */ jsx99(
6828
+ children: /* @__PURE__ */ jsx97(
6878
6829
  Checkbox,
6879
6830
  {
6880
6831
  "aria-label": t("pactor.table.selectRow"),
@@ -6891,7 +6842,7 @@ function Table2({
6891
6842
  column.dataIndex === void 0 ? void 0 : flat.row[column.dataIndex]
6892
6843
  );
6893
6844
  const withTree = hasTreeData && columnIndex === 0;
6894
- return /* @__PURE__ */ jsx99(
6845
+ return /* @__PURE__ */ jsx97(
6895
6846
  TableCell,
6896
6847
  {
6897
6848
  className: cn(
@@ -6903,13 +6854,13 @@ function Table2({
6903
6854
  dropIndicatorClass(flat.key)
6904
6855
  ),
6905
6856
  style: columnWidthStyle(column),
6906
- children: withTree ? /* @__PURE__ */ jsxs66(
6857
+ children: withTree ? /* @__PURE__ */ jsxs65(
6907
6858
  "div",
6908
6859
  {
6909
6860
  className: "flex items-center gap-1",
6910
6861
  style: { paddingLeft: flat.level * indentSize },
6911
6862
  children: [
6912
- flat.hasChildren ? /* @__PURE__ */ jsx99(
6863
+ flat.hasChildren ? /* @__PURE__ */ jsx97(
6913
6864
  "button",
6914
6865
  {
6915
6866
  type: "button",
@@ -6918,7 +6869,7 @@ function Table2({
6918
6869
  "aria-expanded": expandedKeys.has(flat.key),
6919
6870
  onClick: () => toggleExpand(flat.key),
6920
6871
  className: "inline-flex size-4 shrink-0 cursor-pointer items-center justify-center text-muted-foreground hover:text-foreground",
6921
- children: /* @__PURE__ */ jsx99(
6872
+ children: /* @__PURE__ */ jsx97(
6922
6873
  Icon,
6923
6874
  {
6924
6875
  name: "chevron-right",
@@ -6930,8 +6881,8 @@ function Table2({
6930
6881
  }
6931
6882
  )
6932
6883
  }
6933
- ) : /* @__PURE__ */ jsx99("span", { className: "inline-block size-4 shrink-0" }),
6934
- /* @__PURE__ */ jsx99("div", { className: "min-w-0", children: cellContent })
6884
+ ) : /* @__PURE__ */ jsx97("span", { className: "inline-block size-4 shrink-0" }),
6885
+ /* @__PURE__ */ jsx97("div", { className: "min-w-0", children: cellContent })
6935
6886
  ]
6936
6887
  }
6937
6888
  ) : cellContent
@@ -6946,8 +6897,8 @@ function Table2({
6946
6897
  ]
6947
6898
  }
6948
6899
  ),
6949
- pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */ jsx99("div", { "data-slot": "table-pagination", className: "mt-3 flex justify-end gap-1", children: Array.from({ length: pageCount }, (_, index) => index + 1).map(
6950
- (page) => /* @__PURE__ */ jsx99(
6900
+ pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */ jsx97("div", { "data-slot": "table-pagination", className: "mt-3 flex justify-end gap-1", children: Array.from({ length: pageCount }, (_, index) => index + 1).map(
6901
+ (page) => /* @__PURE__ */ jsx97(
6951
6902
  Button,
6952
6903
  {
6953
6904
  type: "button",
@@ -6967,7 +6918,7 @@ function Table2({
6967
6918
 
6968
6919
  // src/components/components/Tabs/index.tsx
6969
6920
  import { useRenderer as useRenderer19 } from "@pactor-app/runtime";
6970
- import { jsx as jsx100, jsxs as jsxs67 } from "react/jsx-runtime";
6921
+ import { jsx as jsx98, jsxs as jsxs66 } from "react/jsx-runtime";
6971
6922
  function Tabs2({
6972
6923
  items = [],
6973
6924
  activeKey,
@@ -6981,7 +6932,7 @@ function Tabs2({
6981
6932
  }) {
6982
6933
  const { renderChildren } = useRenderer19();
6983
6934
  const vertical = tabPosition === "left";
6984
- return /* @__PURE__ */ jsxs67(
6935
+ return /* @__PURE__ */ jsxs66(
6985
6936
  Tabs,
6986
6937
  {
6987
6938
  value: activeKey,
@@ -6991,7 +6942,7 @@ function Tabs2({
6991
6942
  className: cn(vertical && "flex-row items-start gap-4", className),
6992
6943
  style,
6993
6944
  children: [
6994
- /* @__PURE__ */ jsx100(
6945
+ /* @__PURE__ */ jsx98(
6995
6946
  TabsList,
6996
6947
  {
6997
6948
  variant,
@@ -6999,10 +6950,10 @@ function Tabs2({
6999
6950
  "h-auto w-auto shrink-0 flex-col items-stretch justify-start",
7000
6951
  variant === "line" && "gap-0 border-b-0 border-r pr-2"
7001
6952
  ) : void 0,
7002
- children: items.map((item) => /* @__PURE__ */ jsx100(TabsTrigger, { value: item.key, children: item.label }, item.key))
6953
+ children: items.map((item) => /* @__PURE__ */ jsx98(TabsTrigger, { value: item.key, children: item.label }, item.key))
7003
6954
  }
7004
6955
  ),
7005
- items.map((item) => /* @__PURE__ */ jsx100(
6956
+ items.map((item) => /* @__PURE__ */ jsx98(
7006
6957
  TabsContent,
7007
6958
  {
7008
6959
  value: item.key,
@@ -7021,7 +6972,7 @@ function Tabs2({
7021
6972
  import { X as X2 } from "lucide-react";
7022
6973
  import { useI18n as useI18n26 } from "@pactor-app/runtime";
7023
6974
  import { useState as useState32 } from "react";
7024
- import { jsx as jsx101, jsxs as jsxs68 } from "react/jsx-runtime";
6975
+ import { jsx as jsx99, jsxs as jsxs67 } from "react/jsx-runtime";
7025
6976
  var colorClass = {
7026
6977
  default: "border-border bg-muted text-foreground",
7027
6978
  success: "border-success/50 bg-success/10 text-success",
@@ -7042,7 +6993,7 @@ function Tag({
7042
6993
  const [hidden, setHidden] = useState32(false);
7043
6994
  const { t } = useI18n26();
7044
6995
  if (hidden) return null;
7045
- return /* @__PURE__ */ jsxs68(
6996
+ return /* @__PURE__ */ jsxs67(
7046
6997
  "span",
7047
6998
  {
7048
6999
  "data-slot": "tag",
@@ -7055,9 +7006,9 @@ function Tag({
7055
7006
  ),
7056
7007
  style,
7057
7008
  children: [
7058
- icon ? /* @__PURE__ */ jsx101(Icon, { name: icon, size: "sm" }) : null,
7009
+ icon ? /* @__PURE__ */ jsx99(Icon, { name: icon, size: "sm" }) : null,
7059
7010
  text,
7060
- closable ? /* @__PURE__ */ jsx101(
7011
+ closable ? /* @__PURE__ */ jsx99(
7061
7012
  "button",
7062
7013
  {
7063
7014
  type: "button",
@@ -7068,7 +7019,7 @@ function Tag({
7068
7019
  onClose?.();
7069
7020
  setHidden(true);
7070
7021
  },
7071
- children: /* @__PURE__ */ jsx101(X2, { className: "size-3" })
7022
+ children: /* @__PURE__ */ jsx99(X2, { className: "size-3" })
7072
7023
  }
7073
7024
  ) : null
7074
7025
  ]
@@ -7077,7 +7028,7 @@ function Tag({
7077
7028
  }
7078
7029
 
7079
7030
  // src/components/components/Text/index.tsx
7080
- import { jsx as jsx102 } from "react/jsx-runtime";
7031
+ import { jsx as jsx100 } from "react/jsx-runtime";
7081
7032
  var typeClassMap = {
7082
7033
  default: "",
7083
7034
  secondary: "text-muted-foreground",
@@ -7102,7 +7053,7 @@ function Text({
7102
7053
  style,
7103
7054
  children
7104
7055
  }) {
7105
- return /* @__PURE__ */ jsx102(
7056
+ return /* @__PURE__ */ jsx100(
7106
7057
  "span",
7107
7058
  {
7108
7059
  "data-slot": "text",
@@ -7124,7 +7075,7 @@ function Text({
7124
7075
 
7125
7076
  // src/components/components/Textarea/index.tsx
7126
7077
  import { useEffect as useEffect28, useId as useId12 } from "react";
7127
- import { jsx as jsx103 } from "react/jsx-runtime";
7078
+ import { jsx as jsx101 } from "react/jsx-runtime";
7128
7079
  function Textarea2({
7129
7080
  name,
7130
7081
  label,
@@ -7150,16 +7101,17 @@ function Textarea2({
7150
7101
  });
7151
7102
  if (inForm && form && name) {
7152
7103
  const fieldValue = form.values[name];
7153
- return /* @__PURE__ */ jsx103(
7104
+ return /* @__PURE__ */ jsx101(
7154
7105
  FieldShell,
7155
7106
  {
7156
7107
  layout: form.layout,
7157
7108
  label,
7109
+ rules,
7158
7110
  htmlFor: controlId,
7159
7111
  error: form.errors[name],
7160
7112
  className,
7161
7113
  style,
7162
- children: /* @__PURE__ */ jsx103(
7114
+ children: /* @__PURE__ */ jsx101(
7163
7115
  Textarea,
7164
7116
  {
7165
7117
  id: controlId,
@@ -7177,7 +7129,7 @@ function Textarea2({
7177
7129
  }
7178
7130
  );
7179
7131
  }
7180
- return /* @__PURE__ */ jsx103(
7132
+ return /* @__PURE__ */ jsx101(
7181
7133
  Textarea,
7182
7134
  {
7183
7135
  value: value ?? "",
@@ -7195,7 +7147,7 @@ function Textarea2({
7195
7147
  import { useI18n as useI18n27 } from "@pactor-app/runtime";
7196
7148
  import { Clock } from "lucide-react";
7197
7149
  import { useEffect as useEffect29, useId as useId13, useState as useState33 } from "react";
7198
- import { jsx as jsx104, jsxs as jsxs69 } from "react/jsx-runtime";
7150
+ import { jsx as jsx102, jsxs as jsxs68 } from "react/jsx-runtime";
7199
7151
  function pad(n) {
7200
7152
  return String(n).padStart(2, "0");
7201
7153
  }
@@ -7271,12 +7223,12 @@ function TimePicker({
7271
7223
  }
7272
7224
  onChange?.(next);
7273
7225
  };
7274
- const renderColumn = (slot, max, active, onPick) => /* @__PURE__ */ jsx104(
7226
+ const renderColumn = (slot, max, active, onPick) => /* @__PURE__ */ jsx102(
7275
7227
  "div",
7276
7228
  {
7277
7229
  "data-slot": slot,
7278
7230
  className: "max-h-40 w-14 overflow-y-auto rounded-md border border-border",
7279
- children: Array.from({ length: max + 1 }, (_, n) => /* @__PURE__ */ jsx104(
7231
+ children: Array.from({ length: max + 1 }, (_, n) => /* @__PURE__ */ jsx102(
7280
7232
  "button",
7281
7233
  {
7282
7234
  type: "button",
@@ -7291,8 +7243,8 @@ function TimePicker({
7291
7243
  ))
7292
7244
  }
7293
7245
  );
7294
- const control = /* @__PURE__ */ jsxs69(Popover, { open, onOpenChange: openPanel, children: [
7295
- /* @__PURE__ */ jsxs69(
7246
+ const control = /* @__PURE__ */ jsxs68(Popover, { open, onOpenChange: openPanel, children: [
7247
+ /* @__PURE__ */ jsxs68(
7296
7248
  PopoverTrigger,
7297
7249
  {
7298
7250
  id: controlId,
@@ -7308,9 +7260,9 @@ function TimePicker({
7308
7260
  ),
7309
7261
  style: inForm ? void 0 : style,
7310
7262
  children: [
7311
- /* @__PURE__ */ jsx104("span", { className: "min-w-0 flex-1 truncate text-left", children: displayText === "" ? placeholder ?? t("pactor.timePicker.placeholder") : displayText }),
7312
- showClear ? /* @__PURE__ */ jsx104(ClearHoverButton, { label: t("pactor.control.clear"), onClear: handleClear }) : null,
7313
- /* @__PURE__ */ jsx104(
7263
+ /* @__PURE__ */ jsx102("span", { className: "min-w-0 flex-1 truncate text-left", children: displayText === "" ? placeholder ?? t("pactor.timePicker.placeholder") : displayText }),
7264
+ showClear ? /* @__PURE__ */ jsx102(ClearHoverButton, { label: t("pactor.control.clear"), onClear: handleClear }) : null,
7265
+ /* @__PURE__ */ jsx102(
7314
7266
  Clock,
7315
7267
  {
7316
7268
  className: cn("size-4 shrink-0 opacity-50", showClear && CLEARABLE_ICON_HIDE)
@@ -7319,8 +7271,8 @@ function TimePicker({
7319
7271
  ]
7320
7272
  }
7321
7273
  ),
7322
- /* @__PURE__ */ jsx104(PopoverContent, { className: "w-auto p-3", children: /* @__PURE__ */ jsxs69("div", { "data-slot": "timepicker-panel", className: "flex flex-col gap-2", children: [
7323
- /* @__PURE__ */ jsxs69("div", { className: "flex items-start gap-2", children: [
7274
+ /* @__PURE__ */ jsx102(PopoverContent, { className: "w-auto p-3", children: /* @__PURE__ */ jsxs68("div", { "data-slot": "timepicker-panel", className: "flex flex-col gap-2", children: [
7275
+ /* @__PURE__ */ jsxs68("div", { className: "flex items-start gap-2", children: [
7324
7276
  renderColumn(
7325
7277
  "timepicker-hour-column",
7326
7278
  23,
@@ -7340,8 +7292,8 @@ function TimePicker({
7340
7292
  (n) => setPending((prev) => ({ ...prev, second: n }))
7341
7293
  ) : null
7342
7294
  ] }),
7343
- /* @__PURE__ */ jsxs69("div", { className: "flex items-center justify-between gap-2 border-t border-border pt-2", children: [
7344
- /* @__PURE__ */ jsx104(
7295
+ /* @__PURE__ */ jsxs68("div", { className: "flex items-center justify-between gap-2 border-t border-border pt-2", children: [
7296
+ /* @__PURE__ */ jsx102(
7345
7297
  "button",
7346
7298
  {
7347
7299
  type: "button",
@@ -7350,7 +7302,7 @@ function TimePicker({
7350
7302
  children: t("pactor.timePicker.now")
7351
7303
  }
7352
7304
  ),
7353
- /* @__PURE__ */ jsx104(
7305
+ /* @__PURE__ */ jsx102(
7354
7306
  "button",
7355
7307
  {
7356
7308
  type: "button",
@@ -7366,11 +7318,12 @@ function TimePicker({
7366
7318
  ] }) })
7367
7319
  ] });
7368
7320
  if (inForm && form && name) {
7369
- return /* @__PURE__ */ jsx104(
7321
+ return /* @__PURE__ */ jsx102(
7370
7322
  FieldShell,
7371
7323
  {
7372
7324
  layout: form.layout,
7373
7325
  label,
7326
+ rules,
7374
7327
  htmlFor: controlId,
7375
7328
  error: form.errors[name],
7376
7329
  className,
@@ -7384,27 +7337,27 @@ function TimePicker({
7384
7337
 
7385
7338
  // src/components/components/Timeline/index.tsx
7386
7339
  import { useI18n as useI18n28 } from "@pactor-app/runtime";
7387
- import { jsx as jsx105, jsxs as jsxs70 } from "react/jsx-runtime";
7340
+ import { jsx as jsx103, jsxs as jsxs69 } from "react/jsx-runtime";
7388
7341
  function Timeline({ items = [], pending, className, style }) {
7389
7342
  const nodes = [...items];
7390
7343
  const { t } = useI18n28();
7391
7344
  if (pending) {
7392
7345
  nodes.push({ content: typeof pending === "string" ? pending : t("pactor.timeline.inProgress") });
7393
7346
  }
7394
- return /* @__PURE__ */ jsx105("ul", { "data-slot": "timeline", className: cn("w-full", className), style, children: nodes.map((item, index) => /* @__PURE__ */ jsxs70("li", { "data-slot": "timeline-item", className: "relative flex gap-3 pb-6 last:pb-0", children: [
7395
- index < nodes.length - 1 ? /* @__PURE__ */ jsx105(
7347
+ return /* @__PURE__ */ jsx103("ul", { "data-slot": "timeline", className: cn("w-full", className), style, children: nodes.map((item, index) => /* @__PURE__ */ jsxs69("li", { "data-slot": "timeline-item", className: "relative flex gap-3 pb-6 last:pb-0", children: [
7348
+ index < nodes.length - 1 ? /* @__PURE__ */ jsx103(
7396
7349
  "span",
7397
7350
  {
7398
7351
  "aria-hidden": "true",
7399
7352
  className: "absolute top-5 left-[7px] h-[calc(100%-20px)] w-px bg-border"
7400
7353
  }
7401
7354
  ) : null,
7402
- /* @__PURE__ */ jsx105(
7355
+ /* @__PURE__ */ jsx103(
7403
7356
  "span",
7404
7357
  {
7405
7358
  "data-slot": "timeline-dot",
7406
7359
  className: "relative mt-1 flex size-4 shrink-0 items-center justify-center",
7407
- children: item.icon ? /* @__PURE__ */ jsx105(Icon, { name: item.icon, size: "sm" }) : /* @__PURE__ */ jsx105(
7360
+ children: item.icon ? /* @__PURE__ */ jsx103(Icon, { name: item.icon, size: "sm" }) : /* @__PURE__ */ jsx103(
7408
7361
  "span",
7409
7362
  {
7410
7363
  className: "size-2 rounded-full bg-primary",
@@ -7413,15 +7366,15 @@ function Timeline({ items = [], pending, className, style }) {
7413
7366
  )
7414
7367
  }
7415
7368
  ),
7416
- /* @__PURE__ */ jsxs70("div", { className: "min-w-0 flex-1", children: [
7417
- /* @__PURE__ */ jsx105("div", { "data-slot": "timeline-content", className: "text-sm", children: item.content }),
7418
- item.time ? /* @__PURE__ */ jsx105("div", { "data-slot": "timeline-time", className: "mt-0.5 text-xs text-muted-foreground", children: item.time }) : null
7369
+ /* @__PURE__ */ jsxs69("div", { className: "min-w-0 flex-1", children: [
7370
+ /* @__PURE__ */ jsx103("div", { "data-slot": "timeline-content", className: "text-sm", children: item.content }),
7371
+ item.time ? /* @__PURE__ */ jsx103("div", { "data-slot": "timeline-time", className: "mt-0.5 text-xs text-muted-foreground", children: item.time }) : null
7419
7372
  ] })
7420
7373
  ] }, index)) });
7421
7374
  }
7422
7375
 
7423
7376
  // src/components/components/Toggle/index.tsx
7424
- import { jsx as jsx106 } from "react/jsx-runtime";
7377
+ import { jsx as jsx104 } from "react/jsx-runtime";
7425
7378
  function Toggle2({
7426
7379
  text,
7427
7380
  pressed,
@@ -7432,7 +7385,7 @@ function Toggle2({
7432
7385
  className,
7433
7386
  style
7434
7387
  }) {
7435
- return /* @__PURE__ */ jsx106(
7388
+ return /* @__PURE__ */ jsx104(
7436
7389
  Toggle,
7437
7390
  {
7438
7391
  pressed,
@@ -7448,7 +7401,7 @@ function Toggle2({
7448
7401
  }
7449
7402
 
7450
7403
  // src/components/components/ToggleGroup/index.tsx
7451
- import { jsx as jsx107 } from "react/jsx-runtime";
7404
+ import { jsx as jsx105 } from "react/jsx-runtime";
7452
7405
  function ToggleGroup2({
7453
7406
  options = [],
7454
7407
  value,
@@ -7468,7 +7421,7 @@ function ToggleGroup2({
7468
7421
  onChange?.(added ?? void 0);
7469
7422
  }
7470
7423
  };
7471
- return /* @__PURE__ */ jsx107(
7424
+ return /* @__PURE__ */ jsx105(
7472
7425
  ToggleGroup,
7473
7426
  {
7474
7427
  value: groupValue,
@@ -7477,7 +7430,7 @@ function ToggleGroup2({
7477
7430
  onValueChange: (next) => handleChange(next),
7478
7431
  className,
7479
7432
  style,
7480
- children: options.map((option) => /* @__PURE__ */ jsx107(
7433
+ children: options.map((option) => /* @__PURE__ */ jsx105(
7481
7434
  ToggleGroupItem,
7482
7435
  {
7483
7436
  value: option.value,
@@ -7490,15 +7443,6 @@ function ToggleGroup2({
7490
7443
  );
7491
7444
  }
7492
7445
 
7493
- // src/components/components/Tooltip/index.tsx
7494
- import { jsx as jsx108, jsxs as jsxs71 } from "react/jsx-runtime";
7495
- function Tooltip2({ content, side, children, className, style }) {
7496
- return /* @__PURE__ */ jsxs71(Tooltip, { children: [
7497
- /* @__PURE__ */ jsx108(TooltipTrigger, { render: triggerWrapper("tooltip-trigger-wrap"), children }),
7498
- /* @__PURE__ */ jsx108(TooltipContent, { side, className, style, children: content })
7499
- ] });
7500
- }
7501
-
7502
7446
  // src/components/components/Tour/index.tsx
7503
7447
  import { useI18n as useI18n29 } from "@pactor-app/runtime";
7504
7448
  import { XIcon as XIcon2 } from "lucide-react";
@@ -7508,7 +7452,7 @@ import {
7508
7452
  useState as useState34
7509
7453
  } from "react";
7510
7454
  import { createPortal } from "react-dom";
7511
- import { Fragment as Fragment11, jsx as jsx109, jsxs as jsxs72 } from "react/jsx-runtime";
7455
+ import { Fragment as Fragment11, jsx as jsx106, jsxs as jsxs70 } from "react/jsx-runtime";
7512
7456
  function Tour({
7513
7457
  open = false,
7514
7458
  steps = [],
@@ -7557,9 +7501,9 @@ function Tour({
7557
7501
  };
7558
7502
  const positionStyle = anchor ? { top: anchor.top, left: anchor.left } : { top: "50%", left: "50%", transform: "translate(-50%, -50%)" };
7559
7503
  return createPortal(
7560
- /* @__PURE__ */ jsxs72(Fragment11, { children: [
7561
- /* @__PURE__ */ jsx109("div", { "data-slot": "tour-mask", className: "fixed inset-0 z-[90] bg-(--overlay-background)" }),
7562
- /* @__PURE__ */ jsxs72(
7504
+ /* @__PURE__ */ jsxs70(Fragment11, { children: [
7505
+ /* @__PURE__ */ jsx106("div", { "data-slot": "tour-mask", className: "fixed inset-0 z-[90] bg-(--overlay-background)" }),
7506
+ /* @__PURE__ */ jsxs70(
7563
7507
  "div",
7564
7508
  {
7565
7509
  "data-slot": "tour-card",
@@ -7569,9 +7513,9 @@ function Tour({
7569
7513
  ),
7570
7514
  style: { ...positionStyle, ...style },
7571
7515
  children: [
7572
- /* @__PURE__ */ jsxs72("div", { className: "flex items-start justify-between gap-2", children: [
7573
- step.title ? /* @__PURE__ */ jsx109("div", { "data-slot": "tour-title", className: "font-medium", children: step.title }) : /* @__PURE__ */ jsx109("span", {}),
7574
- /* @__PURE__ */ jsx109(
7516
+ /* @__PURE__ */ jsxs70("div", { className: "flex items-start justify-between gap-2", children: [
7517
+ step.title ? /* @__PURE__ */ jsx106("div", { "data-slot": "tour-title", className: "font-medium", children: step.title }) : /* @__PURE__ */ jsx106("span", {}),
7518
+ /* @__PURE__ */ jsx106(
7575
7519
  "button",
7576
7520
  {
7577
7521
  type: "button",
@@ -7579,19 +7523,19 @@ function Tour({
7579
7523
  "aria-label": "Close",
7580
7524
  className: "cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 [&_svg]:size-3.5",
7581
7525
  onClick: () => onClose?.(),
7582
- children: /* @__PURE__ */ jsx109(XIcon2, {})
7526
+ children: /* @__PURE__ */ jsx106(XIcon2, {})
7583
7527
  }
7584
7528
  )
7585
7529
  ] }),
7586
- step.content ? /* @__PURE__ */ jsx109("div", { "data-slot": "tour-content", className: "text-muted-foreground", children: step.content }) : null,
7587
- /* @__PURE__ */ jsxs72("div", { className: "mt-1 flex items-center justify-between gap-2", children: [
7588
- /* @__PURE__ */ jsxs72("span", { className: "text-xs text-muted-foreground", children: [
7530
+ step.content ? /* @__PURE__ */ jsx106("div", { "data-slot": "tour-content", className: "text-muted-foreground", children: step.content }) : null,
7531
+ /* @__PURE__ */ jsxs70("div", { className: "mt-1 flex items-center justify-between gap-2", children: [
7532
+ /* @__PURE__ */ jsxs70("span", { className: "text-xs text-muted-foreground", children: [
7589
7533
  safeIndex + 1,
7590
7534
  " / ",
7591
7535
  steps.length
7592
7536
  ] }),
7593
- /* @__PURE__ */ jsxs72("div", { className: "flex gap-2", children: [
7594
- safeIndex > 0 ? /* @__PURE__ */ jsx109(
7537
+ /* @__PURE__ */ jsxs70("div", { className: "flex gap-2", children: [
7538
+ safeIndex > 0 ? /* @__PURE__ */ jsx106(
7595
7539
  Button,
7596
7540
  {
7597
7541
  variant: "outline",
@@ -7600,7 +7544,7 @@ function Tour({
7600
7544
  children: t("pactor.tour.prev")
7601
7545
  }
7602
7546
  ) : null,
7603
- /* @__PURE__ */ jsx109(
7547
+ /* @__PURE__ */ jsx106(
7604
7548
  Button,
7605
7549
  {
7606
7550
  size: "sm",
@@ -7628,7 +7572,7 @@ function Tour({
7628
7572
  import { useI18n as useI18n30 } from "@pactor-app/runtime";
7629
7573
  import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight3 } from "lucide-react";
7630
7574
  import { useEffect as useEffect31, useState as useState35 } from "react";
7631
- import { jsx as jsx110, jsxs as jsxs73 } from "react/jsx-runtime";
7575
+ import { jsx as jsx107, jsxs as jsxs71 } from "react/jsx-runtime";
7632
7576
  function Transfer({
7633
7577
  name,
7634
7578
  label,
@@ -7696,14 +7640,14 @@ function Transfer({
7696
7640
  const renderPanel = (side, title, items, checked) => {
7697
7641
  const enabledItems = items.filter((option) => !option.disabled);
7698
7642
  const allChecked = enabledItems.length > 0 && enabledItems.every((option) => checked.has(option.value));
7699
- return /* @__PURE__ */ jsxs73(
7643
+ return /* @__PURE__ */ jsxs71(
7700
7644
  "div",
7701
7645
  {
7702
7646
  "data-slot": `transfer-${side}-panel`,
7703
7647
  className: "flex w-48 flex-col rounded-md border border-border",
7704
7648
  children: [
7705
- /* @__PURE__ */ jsxs73("div", { className: "flex items-center gap-2 border-b border-border px-3 py-2", children: [
7706
- /* @__PURE__ */ jsx110(
7649
+ /* @__PURE__ */ jsxs71("div", { className: "flex items-center gap-2 border-b border-border px-3 py-2", children: [
7650
+ /* @__PURE__ */ jsx107(
7707
7651
  "input",
7708
7652
  {
7709
7653
  type: "checkbox",
@@ -7721,10 +7665,10 @@ function Transfer({
7721
7665
  }
7722
7666
  }
7723
7667
  ),
7724
- /* @__PURE__ */ jsx110("span", { className: "text-sm font-medium", children: title }),
7725
- /* @__PURE__ */ jsx110("span", { className: "ml-auto text-xs text-muted-foreground", children: t("pactor.transfer.itemCount", { count: items.length }) })
7668
+ /* @__PURE__ */ jsx107("span", { className: "text-sm font-medium", children: title }),
7669
+ /* @__PURE__ */ jsx107("span", { className: "ml-auto text-xs text-muted-foreground", children: t("pactor.transfer.itemCount", { count: items.length }) })
7726
7670
  ] }),
7727
- /* @__PURE__ */ jsx110("div", { className: "flex max-h-48 flex-col overflow-y-auto p-1", children: items.map((option) => /* @__PURE__ */ jsxs73(
7671
+ /* @__PURE__ */ jsx107("div", { className: "flex max-h-48 flex-col overflow-y-auto p-1", children: items.map((option) => /* @__PURE__ */ jsxs71(
7728
7672
  "label",
7729
7673
  {
7730
7674
  className: cn(
@@ -7732,7 +7676,7 @@ function Transfer({
7732
7676
  (disabled || option.disabled) && "cursor-not-allowed opacity-50"
7733
7677
  ),
7734
7678
  children: [
7735
- /* @__PURE__ */ jsx110(
7679
+ /* @__PURE__ */ jsx107(
7736
7680
  "input",
7737
7681
  {
7738
7682
  type: "checkbox",
@@ -7741,7 +7685,7 @@ function Transfer({
7741
7685
  onChange: (event) => toggleChecked(side, option.value, event.target.checked)
7742
7686
  }
7743
7687
  ),
7744
- /* @__PURE__ */ jsx110("span", { className: "min-w-0 flex-1 truncate", children: option.label })
7688
+ /* @__PURE__ */ jsx107("span", { className: "min-w-0 flex-1 truncate", children: option.label })
7745
7689
  ]
7746
7690
  },
7747
7691
  String(option.value)
@@ -7750,7 +7694,7 @@ function Transfer({
7750
7694
  }
7751
7695
  );
7752
7696
  };
7753
- const control = /* @__PURE__ */ jsxs73(
7697
+ const control = /* @__PURE__ */ jsxs71(
7754
7698
  "div",
7755
7699
  {
7756
7700
  "data-slot": "transfer",
@@ -7758,8 +7702,8 @@ function Transfer({
7758
7702
  style: inForm ? void 0 : style,
7759
7703
  children: [
7760
7704
  renderPanel("left", resolvedTitles[0], leftOptions, leftChecked),
7761
- /* @__PURE__ */ jsxs73("div", { className: "flex flex-col gap-2", children: [
7762
- /* @__PURE__ */ jsx110(
7705
+ /* @__PURE__ */ jsxs71("div", { className: "flex flex-col gap-2", children: [
7706
+ /* @__PURE__ */ jsx107(
7763
7707
  "button",
7764
7708
  {
7765
7709
  type: "button",
@@ -7767,10 +7711,10 @@ function Transfer({
7767
7711
  disabled: disabled || leftChecked.size === 0,
7768
7712
  className: "flex size-8 cursor-pointer items-center justify-center rounded-md bg-primary text-primary-foreground hover:bg-primary/90 disabled:cursor-not-allowed disabled:opacity-50",
7769
7713
  onClick: moveRight,
7770
- children: /* @__PURE__ */ jsx110(ChevronRight3, { className: "size-4" })
7714
+ children: /* @__PURE__ */ jsx107(ChevronRight3, { className: "size-4" })
7771
7715
  }
7772
7716
  ),
7773
- /* @__PURE__ */ jsx110(
7717
+ /* @__PURE__ */ jsx107(
7774
7718
  "button",
7775
7719
  {
7776
7720
  type: "button",
@@ -7778,7 +7722,7 @@ function Transfer({
7778
7722
  disabled: disabled || rightChecked.size === 0,
7779
7723
  className: "flex size-8 cursor-pointer items-center justify-center rounded-md bg-primary text-primary-foreground hover:bg-primary/90 disabled:cursor-not-allowed disabled:opacity-50",
7780
7724
  onClick: moveLeft,
7781
- children: /* @__PURE__ */ jsx110(ChevronLeft2, { className: "size-4" })
7725
+ children: /* @__PURE__ */ jsx107(ChevronLeft2, { className: "size-4" })
7782
7726
  }
7783
7727
  )
7784
7728
  ] }),
@@ -7787,11 +7731,12 @@ function Transfer({
7787
7731
  }
7788
7732
  );
7789
7733
  if (inForm && form && name) {
7790
- return /* @__PURE__ */ jsx110(
7734
+ return /* @__PURE__ */ jsx107(
7791
7735
  FieldShell,
7792
7736
  {
7793
7737
  layout: form.layout,
7794
7738
  label,
7739
+ rules,
7795
7740
  error: form.errors[name],
7796
7741
  className,
7797
7742
  style,
@@ -7901,7 +7846,7 @@ function moveTreeNode(nodes, dragKey, dropKey, position) {
7901
7846
  }
7902
7847
 
7903
7848
  // src/components/components/Tree/index.tsx
7904
- import { jsx as jsx111, jsxs as jsxs74 } from "react/jsx-runtime";
7849
+ import { jsx as jsx108, jsxs as jsxs72 } from "react/jsx-runtime";
7905
7850
  function someDescendantChecked(node, checked) {
7906
7851
  return (node.children ?? []).some(
7907
7852
  (child) => checked.has(child.key) || someDescendantChecked(child, checked)
@@ -8060,30 +8005,30 @@ function Tree({
8060
8005
  const actions = node.actions ?? nodeActions;
8061
8006
  if (!actions || actions.length === 0) return null;
8062
8007
  if (nodeActionDisplay === "dropdown") {
8063
- return /* @__PURE__ */ jsx111(
8008
+ return /* @__PURE__ */ jsx108(
8064
8009
  "span",
8065
8010
  {
8066
8011
  "data-slot": "tree-node-actions",
8067
8012
  className: "flex shrink-0 items-center opacity-0 transition-opacity group-hover:opacity-100",
8068
- children: /* @__PURE__ */ jsxs74(DropdownMenu, { children: [
8069
- /* @__PURE__ */ jsx111(
8013
+ children: /* @__PURE__ */ jsxs72(DropdownMenu, { children: [
8014
+ /* @__PURE__ */ jsx108(
8070
8015
  DropdownMenuTrigger,
8071
8016
  {
8072
8017
  "aria-label": t("pactor.tree.nodeActions"),
8073
8018
  className: "flex size-5 items-center justify-center rounded text-muted-foreground hover:bg-background hover:text-foreground",
8074
- children: /* @__PURE__ */ jsx111(Icon, { name: "ellipsis", size: "sm" })
8019
+ children: /* @__PURE__ */ jsx108(Icon, { name: "ellipsis", size: "sm" })
8075
8020
  }
8076
8021
  ),
8077
- /* @__PURE__ */ jsx111(DropdownMenuContent, { align: "end", children: actions.map((action) => /* @__PURE__ */ jsxs74(Fragment12, { children: [
8078
- action.separatorBefore ? /* @__PURE__ */ jsx111(DropdownMenuSeparator, {}) : null,
8079
- /* @__PURE__ */ jsxs74(
8022
+ /* @__PURE__ */ jsx108(DropdownMenuContent, { align: "end", children: actions.map((action) => /* @__PURE__ */ jsxs72(Fragment12, { children: [
8023
+ action.separatorBefore ? /* @__PURE__ */ jsx108(DropdownMenuSeparator, {}) : null,
8024
+ /* @__PURE__ */ jsxs72(
8080
8025
  DropdownMenuItem,
8081
8026
  {
8082
8027
  disabled: isActionDisabled(action),
8083
8028
  variant: action.danger ? "destructive" : "default",
8084
8029
  onClick: () => handleNodeAction(node, action),
8085
8030
  children: [
8086
- action.icon ? /* @__PURE__ */ jsx111(Icon, { name: action.icon, size: "sm" }) : null,
8031
+ action.icon ? /* @__PURE__ */ jsx108(Icon, { name: action.icon, size: "sm" }) : null,
8087
8032
  action.label ?? action.value
8088
8033
  ]
8089
8034
  }
@@ -8093,12 +8038,12 @@ function Tree({
8093
8038
  }
8094
8039
  );
8095
8040
  }
8096
- return /* @__PURE__ */ jsx111(
8041
+ return /* @__PURE__ */ jsx108(
8097
8042
  "span",
8098
8043
  {
8099
8044
  "data-slot": "tree-node-actions",
8100
8045
  className: "flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100",
8101
- children: actions.map((action) => /* @__PURE__ */ jsx111(
8046
+ children: actions.map((action) => /* @__PURE__ */ jsx108(
8102
8047
  "button",
8103
8048
  {
8104
8049
  type: "button",
@@ -8112,7 +8057,7 @@ function Tree({
8112
8057
  event.stopPropagation();
8113
8058
  handleNodeAction(node, action);
8114
8059
  },
8115
- children: action.icon ? /* @__PURE__ */ jsx111(Icon, { name: action.icon, size: "sm" }) : action.label
8060
+ children: action.icon ? /* @__PURE__ */ jsx108(Icon, { name: action.icon, size: "sm" }) : action.label
8116
8061
  },
8117
8062
  action.value
8118
8063
  ))
@@ -8127,7 +8072,7 @@ function Tree({
8127
8072
  const canDrag = draggable === true && !isDisabled;
8128
8073
  const dropPosition = dropTarget?.key === node.key ? dropTarget.position : null;
8129
8074
  const indeterminate = checkable === true && hasChildren && !checkedSet.has(node.key) && someDescendantChecked(node, checkedSet);
8130
- return /* @__PURE__ */ jsxs74(
8075
+ return /* @__PURE__ */ jsxs72(
8131
8076
  "div",
8132
8077
  {
8133
8078
  "data-slot": "tree-node",
@@ -8136,7 +8081,7 @@ function Tree({
8136
8081
  "aria-expanded": hasChildren ? isExpanded : void 0,
8137
8082
  "aria-selected": selected.includes(node.key),
8138
8083
  children: [
8139
- /* @__PURE__ */ jsxs74(
8084
+ /* @__PURE__ */ jsxs72(
8140
8085
  "div",
8141
8086
  {
8142
8087
  className: cn(
@@ -8157,7 +8102,7 @@ function Tree({
8157
8102
  onDragOver: draggable ? (event) => handleDragOver(event, node) : void 0,
8158
8103
  onDrop: draggable ? (event) => handleDrop(event, node) : void 0,
8159
8104
  children: [
8160
- canDrag ? /* @__PURE__ */ jsx111(
8105
+ canDrag ? /* @__PURE__ */ jsx108(
8161
8106
  "span",
8162
8107
  {
8163
8108
  "data-slot": "tree-drag-handle",
@@ -8172,10 +8117,10 @@ function Tree({
8172
8117
  },
8173
8118
  onDragEnd: clearDrag,
8174
8119
  className: "flex size-4 shrink-0 cursor-move items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100",
8175
- children: /* @__PURE__ */ jsx111(Icon, { name: "grip-vertical", size: "sm" })
8120
+ children: /* @__PURE__ */ jsx108(Icon, { name: "grip-vertical", size: "sm" })
8176
8121
  }
8177
8122
  ) : null,
8178
- hasChildren ? /* @__PURE__ */ jsx111(
8123
+ hasChildren ? /* @__PURE__ */ jsx108(
8179
8124
  "button",
8180
8125
  {
8181
8126
  type: "button",
@@ -8184,7 +8129,7 @@ function Tree({
8184
8129
  disabled: isDisabled,
8185
8130
  onClick: () => toggleExpand(node.key),
8186
8131
  className: "flex size-5 shrink-0 items-center justify-center",
8187
- children: /* @__PURE__ */ jsx111(
8132
+ children: /* @__PURE__ */ jsx108(
8188
8133
  Icon,
8189
8134
  {
8190
8135
  name: "chevron-right",
@@ -8196,8 +8141,8 @@ function Tree({
8196
8141
  }
8197
8142
  )
8198
8143
  }
8199
- ) : /* @__PURE__ */ jsx111("span", { className: "size-5 shrink-0" }),
8200
- checkable ? /* @__PURE__ */ jsx111(
8144
+ ) : /* @__PURE__ */ jsx108("span", { className: "size-5 shrink-0" }),
8145
+ checkable ? /* @__PURE__ */ jsx108(
8201
8146
  Checkbox,
8202
8147
  {
8203
8148
  checked: checkedSet.has(node.key),
@@ -8206,7 +8151,7 @@ function Tree({
8206
8151
  onCheckedChange: (next) => handleCheck(node, next === true)
8207
8152
  }
8208
8153
  ) : null,
8209
- /* @__PURE__ */ jsx111(
8154
+ /* @__PURE__ */ jsx108(
8210
8155
  "span",
8211
8156
  {
8212
8157
  "data-slot": "tree-node-title",
@@ -8225,7 +8170,7 @@ function Tree({
8225
8170
  node.key
8226
8171
  );
8227
8172
  });
8228
- return /* @__PURE__ */ jsx111(
8173
+ return /* @__PURE__ */ jsx108(
8229
8174
  "div",
8230
8175
  {
8231
8176
  "data-slot": "tree",
@@ -8241,7 +8186,7 @@ function Tree({
8241
8186
  import { useI18n as useI18n32 } from "@pactor-app/runtime";
8242
8187
  import { ChevronRight as ChevronRight4 } from "lucide-react";
8243
8188
  import { useEffect as useEffect33, useId as useId14, useState as useState37 } from "react";
8244
- import { jsx as jsx112, jsxs as jsxs75 } from "react/jsx-runtime";
8189
+ import { jsx as jsx109, jsxs as jsxs73 } from "react/jsx-runtime";
8245
8190
  function findPath(options, target, trail = []) {
8246
8191
  for (const option of options) {
8247
8192
  const path = [...trail, option.value];
@@ -8330,21 +8275,21 @@ function TreeSelect({
8330
8275
  if (searching && !matchQuery(option, query.trim())) return null;
8331
8276
  const hasChildren = (option.children?.length ?? 0) > 0;
8332
8277
  const isExpanded = searching || expanded.has(option.value);
8333
- return /* @__PURE__ */ jsxs75("div", { "data-slot": "treeselect-node", children: [
8334
- /* @__PURE__ */ jsxs75(
8278
+ return /* @__PURE__ */ jsxs73("div", { "data-slot": "treeselect-node", children: [
8279
+ /* @__PURE__ */ jsxs73(
8335
8280
  "div",
8336
8281
  {
8337
8282
  className: "flex items-center gap-1",
8338
8283
  style: { paddingLeft: depth * 16 },
8339
8284
  children: [
8340
- hasChildren ? /* @__PURE__ */ jsx112(
8285
+ hasChildren ? /* @__PURE__ */ jsx109(
8341
8286
  "button",
8342
8287
  {
8343
8288
  type: "button",
8344
8289
  "aria-label": `${isExpanded ? t("pactor.tree.collapse") : t("pactor.tree.expand")} ${option.label}`,
8345
8290
  className: "flex size-5 shrink-0 cursor-pointer items-center justify-center text-muted-foreground hover:text-foreground",
8346
8291
  onClick: () => toggleExpanded(option.value),
8347
- children: /* @__PURE__ */ jsx112(
8292
+ children: /* @__PURE__ */ jsx109(
8348
8293
  ChevronRight4,
8349
8294
  {
8350
8295
  className: cn(
@@ -8354,8 +8299,8 @@ function TreeSelect({
8354
8299
  }
8355
8300
  )
8356
8301
  }
8357
- ) : /* @__PURE__ */ jsx112("span", { className: "size-5 shrink-0" }),
8358
- /* @__PURE__ */ jsx112(
8302
+ ) : /* @__PURE__ */ jsx109("span", { className: "size-5 shrink-0" }),
8303
+ /* @__PURE__ */ jsx109(
8359
8304
  "button",
8360
8305
  {
8361
8306
  type: "button",
@@ -8373,8 +8318,8 @@ function TreeSelect({
8373
8318
  hasChildren && isExpanded ? renderNodes(option.children ?? [], depth + 1) : null
8374
8319
  ] }, String(option.value));
8375
8320
  });
8376
- const control = /* @__PURE__ */ jsxs75(Popover, { open, onOpenChange: openPanel, children: [
8377
- /* @__PURE__ */ jsxs75(
8321
+ const control = /* @__PURE__ */ jsxs73(Popover, { open, onOpenChange: openPanel, children: [
8322
+ /* @__PURE__ */ jsxs73(
8378
8323
  PopoverTrigger,
8379
8324
  {
8380
8325
  id: controlId,
@@ -8390,9 +8335,9 @@ function TreeSelect({
8390
8335
  ),
8391
8336
  style: inForm ? void 0 : style,
8392
8337
  children: [
8393
- /* @__PURE__ */ jsx112("span", { className: "min-w-0 flex-1 truncate text-left", children: selected ? selected.node.label : placeholder ?? t("pactor.select.placeholder") }),
8394
- showClear ? /* @__PURE__ */ jsx112(ClearHoverButton, { label: t("pactor.control.clear"), onClear: handleClear }) : null,
8395
- /* @__PURE__ */ jsx112(
8338
+ /* @__PURE__ */ jsx109("span", { className: "min-w-0 flex-1 truncate text-left", children: selected ? selected.node.label : placeholder ?? t("pactor.select.placeholder") }),
8339
+ showClear ? /* @__PURE__ */ jsx109(ClearHoverButton, { label: t("pactor.control.clear"), onClear: handleClear }) : null,
8340
+ /* @__PURE__ */ jsx109(
8396
8341
  ChevronRight4,
8397
8342
  {
8398
8343
  className: cn(
@@ -8404,8 +8349,8 @@ function TreeSelect({
8404
8349
  ]
8405
8350
  }
8406
8351
  ),
8407
- /* @__PURE__ */ jsxs75(PopoverContent, { className: "w-64 p-2", children: [
8408
- searchable ? /* @__PURE__ */ jsx112("div", { className: "pb-2", children: /* @__PURE__ */ jsx112(
8352
+ /* @__PURE__ */ jsxs73(PopoverContent, { className: "w-64 p-2", children: [
8353
+ searchable ? /* @__PURE__ */ jsx109("div", { className: "pb-2", children: /* @__PURE__ */ jsx109(
8409
8354
  Input,
8410
8355
  {
8411
8356
  "aria-label": t("pactor.select.search"),
@@ -8415,7 +8360,7 @@ function TreeSelect({
8415
8360
  onChange: (event) => setQuery(event.target.value)
8416
8361
  }
8417
8362
  ) }) : null,
8418
- /* @__PURE__ */ jsx112(
8363
+ /* @__PURE__ */ jsx109(
8419
8364
  "div",
8420
8365
  {
8421
8366
  "data-slot": "treeselect-tree",
@@ -8426,11 +8371,12 @@ function TreeSelect({
8426
8371
  ] })
8427
8372
  ] });
8428
8373
  if (inForm && form && name) {
8429
- return /* @__PURE__ */ jsx112(
8374
+ return /* @__PURE__ */ jsx109(
8430
8375
  FieldShell,
8431
8376
  {
8432
8377
  layout: form.layout,
8433
8378
  label,
8379
+ rules,
8434
8380
  htmlFor: controlId,
8435
8381
  error: form.errors[name],
8436
8382
  className,
@@ -8443,21 +8389,21 @@ function TreeSelect({
8443
8389
  }
8444
8390
 
8445
8391
  // src/components/components/Typography/index.tsx
8446
- import { jsx as jsx113 } from "react/jsx-runtime";
8392
+ import { jsx as jsx110 } from "react/jsx-runtime";
8447
8393
  function Typography2({
8448
8394
  variant = "p",
8449
8395
  text,
8450
8396
  className,
8451
8397
  style
8452
8398
  }) {
8453
- return /* @__PURE__ */ jsx113(Typography, { variant, className, style, children: text });
8399
+ return /* @__PURE__ */ jsx110(Typography, { variant, className, style, children: text });
8454
8400
  }
8455
8401
 
8456
8402
  // src/components/components/Upload/index.tsx
8457
8403
  import { useI18n as useI18n33 } from "@pactor-app/runtime";
8458
8404
  import { Upload as UploadIcon, X as X3 } from "lucide-react";
8459
8405
  import { useEffect as useEffect34, useId as useId15, useRef as useRef10, useState as useState38 } from "react";
8460
- import { jsx as jsx114, jsxs as jsxs76 } from "react/jsx-runtime";
8406
+ import { jsx as jsx111, jsxs as jsxs74 } from "react/jsx-runtime";
8461
8407
  function matchAccept(file, accept) {
8462
8408
  const tokens = accept.split(",").map((token) => token.trim().toLowerCase()).filter((token) => token !== "");
8463
8409
  if (tokens.length === 0) return true;
@@ -8545,7 +8491,7 @@ function Upload({
8545
8491
  const handleRemove = (index) => {
8546
8492
  commit(files.filter((_, i) => i !== index));
8547
8493
  };
8548
- const fileInput = /* @__PURE__ */ jsx114(
8494
+ const fileInput = /* @__PURE__ */ jsx111(
8549
8495
  "input",
8550
8496
  {
8551
8497
  ref: inputRef,
@@ -8562,7 +8508,7 @@ function Upload({
8562
8508
  }
8563
8509
  }
8564
8510
  );
8565
- const picker = drag ? /* @__PURE__ */ jsxs76(
8511
+ const picker = drag ? /* @__PURE__ */ jsxs74(
8566
8512
  "div",
8567
8513
  {
8568
8514
  "data-slot": "upload-dragger",
@@ -8588,11 +8534,11 @@ function Upload({
8588
8534
  handleFiles(Array.from(event.dataTransfer.files));
8589
8535
  },
8590
8536
  children: [
8591
- /* @__PURE__ */ jsx114(UploadIcon, { className: "size-6" }),
8592
- /* @__PURE__ */ jsx114("span", { children: t("pactor.upload.dragText") })
8537
+ /* @__PURE__ */ jsx111(UploadIcon, { className: "size-6" }),
8538
+ /* @__PURE__ */ jsx111("span", { children: t("pactor.upload.dragText") })
8593
8539
  ]
8594
8540
  }
8595
- ) : /* @__PURE__ */ jsxs76(
8541
+ ) : /* @__PURE__ */ jsxs74(
8596
8542
  "button",
8597
8543
  {
8598
8544
  type: "button",
@@ -8601,12 +8547,12 @@ function Upload({
8601
8547
  className: "inline-flex h-9 cursor-pointer items-center gap-2 rounded-md border border-input bg-transparent px-3 text-sm shadow-xs hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50",
8602
8548
  onClick: () => inputRef.current?.click(),
8603
8549
  children: [
8604
- /* @__PURE__ */ jsx114(UploadIcon, { className: "size-4" }),
8550
+ /* @__PURE__ */ jsx111(UploadIcon, { className: "size-4" }),
8605
8551
  t("pactor.upload.selectFile")
8606
8552
  ]
8607
8553
  }
8608
8554
  );
8609
- const control = /* @__PURE__ */ jsxs76(
8555
+ const control = /* @__PURE__ */ jsxs74(
8610
8556
  "div",
8611
8557
  {
8612
8558
  "data-slot": "upload",
@@ -8615,16 +8561,16 @@ function Upload({
8615
8561
  children: [
8616
8562
  picker,
8617
8563
  fileInput,
8618
- tip ? /* @__PURE__ */ jsx114("div", { "data-slot": "upload-tip", className: "text-xs text-muted-foreground", children: tip }) : null,
8619
- rejected > 0 ? /* @__PURE__ */ jsx114("div", { "data-slot": "upload-rejected", className: "text-xs text-destructive", children: t("pactor.upload.rejected", { count: rejected }) }) : null,
8620
- files.length > 0 ? /* @__PURE__ */ jsx114("ul", { "data-slot": "upload-list", className: "flex flex-col gap-1", children: files.map((file, index) => /* @__PURE__ */ jsxs76(
8564
+ tip ? /* @__PURE__ */ jsx111("div", { "data-slot": "upload-tip", className: "text-xs text-muted-foreground", children: tip }) : null,
8565
+ rejected > 0 ? /* @__PURE__ */ jsx111("div", { "data-slot": "upload-rejected", className: "text-xs text-destructive", children: t("pactor.upload.rejected", { count: rejected }) }) : null,
8566
+ files.length > 0 ? /* @__PURE__ */ jsx111("ul", { "data-slot": "upload-list", className: "flex flex-col gap-1", children: files.map((file, index) => /* @__PURE__ */ jsxs74(
8621
8567
  "li",
8622
8568
  {
8623
8569
  className: "flex items-center gap-2 rounded-md border border-border px-3 py-1.5 text-sm",
8624
8570
  children: [
8625
- /* @__PURE__ */ jsx114("span", { className: "min-w-0 flex-1 truncate", children: file.name }),
8626
- /* @__PURE__ */ jsx114("span", { className: "shrink-0 text-xs text-muted-foreground", children: formatSize2(file.size) }),
8627
- /* @__PURE__ */ jsx114(
8571
+ /* @__PURE__ */ jsx111("span", { className: "min-w-0 flex-1 truncate", children: file.name }),
8572
+ /* @__PURE__ */ jsx111("span", { className: "shrink-0 text-xs text-muted-foreground", children: formatSize2(file.size) }),
8573
+ /* @__PURE__ */ jsx111(
8628
8574
  "button",
8629
8575
  {
8630
8576
  type: "button",
@@ -8632,7 +8578,7 @@ function Upload({
8632
8578
  disabled,
8633
8579
  className: "shrink-0 cursor-pointer text-muted-foreground hover:text-foreground disabled:cursor-not-allowed",
8634
8580
  onClick: () => handleRemove(index),
8635
- children: /* @__PURE__ */ jsx114(X3, { className: "size-4" })
8581
+ children: /* @__PURE__ */ jsx111(X3, { className: "size-4" })
8636
8582
  }
8637
8583
  )
8638
8584
  ]
@@ -8643,11 +8589,12 @@ function Upload({
8643
8589
  }
8644
8590
  );
8645
8591
  if (inForm && form && name) {
8646
- return /* @__PURE__ */ jsx114(
8592
+ return /* @__PURE__ */ jsx111(
8647
8593
  FieldShell,
8648
8594
  {
8649
8595
  layout: form.layout,
8650
8596
  label,
8597
+ rules,
8651
8598
  error: form.errors[name],
8652
8599
  className,
8653
8600
  style,
@@ -8659,7 +8606,7 @@ function Upload({
8659
8606
  }
8660
8607
 
8661
8608
  // src/components/components/Video/index.tsx
8662
- import { jsx as jsx115 } from "react/jsx-runtime";
8609
+ import { jsx as jsx112 } from "react/jsx-runtime";
8663
8610
  function Video({
8664
8611
  src,
8665
8612
  poster,
@@ -8670,7 +8617,7 @@ function Video({
8670
8617
  className,
8671
8618
  style
8672
8619
  }) {
8673
- return /* @__PURE__ */ jsx115(
8620
+ return /* @__PURE__ */ jsx112(
8674
8621
  "video",
8675
8622
  {
8676
8623
  "data-slot": "video",
@@ -8688,7 +8635,7 @@ function Video({
8688
8635
  }
8689
8636
 
8690
8637
  // src/components/components/Watermark/index.tsx
8691
- import { jsx as jsx116, jsxs as jsxs77 } from "react/jsx-runtime";
8638
+ import { jsx as jsx113, jsxs as jsxs75 } from "react/jsx-runtime";
8692
8639
  function escapeXml(value) {
8693
8640
  return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
8694
8641
  }
@@ -8713,7 +8660,7 @@ function Watermark({
8713
8660
  style
8714
8661
  }) {
8715
8662
  const lines = (Array.isArray(content) ? content : content !== void 0 ? [content] : []).filter((line) => typeof line === "string" && line !== "");
8716
- return /* @__PURE__ */ jsxs77(
8663
+ return /* @__PURE__ */ jsxs75(
8717
8664
  "div",
8718
8665
  {
8719
8666
  "data-slot": "watermark",
@@ -8721,7 +8668,7 @@ function Watermark({
8721
8668
  style,
8722
8669
  children: [
8723
8670
  children,
8724
- lines.length > 0 ? /* @__PURE__ */ jsx116(
8671
+ lines.length > 0 ? /* @__PURE__ */ jsx113(
8725
8672
  "div",
8726
8673
  {
8727
8674
  "data-slot": "watermark-layer",
@@ -8904,6 +8851,7 @@ export {
8904
8851
  CONTROL_SIZE_AREA,
8905
8852
  CONTROL_SIZE_SELECT_ATTR,
8906
8853
  CONTROL_SIZE_TRIGGER_TEXT,
8854
+ Field2 as Field,
8907
8855
  Cascader,
8908
8856
  Checkbox2 as Checkbox,
8909
8857
  ChipNode,
@@ -8926,9 +8874,7 @@ export {
8926
8874
  DiffViewer,
8927
8875
  DocumentPreview,
8928
8876
  Drawer2 as Drawer,
8929
- DropdownMenu2 as DropdownMenu,
8930
8877
  Empty2 as Empty,
8931
- Field2 as Field,
8932
8878
  inferKind,
8933
8879
  FilePreview,
8934
8880
  Flex,
@@ -8997,7 +8943,6 @@ export {
8997
8943
  Timeline,
8998
8944
  Toggle2 as Toggle,
8999
8945
  ToggleGroup2 as ToggleGroup,
9000
- Tooltip2 as Tooltip,
9001
8946
  Tour,
9002
8947
  Transfer,
9003
8948
  Tree,