@noya-app/noya-designsystem 0.1.52 → 0.1.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -381,7 +381,7 @@ var ClientStorage = class {
381
381
  var clientStorage = new ClientStorage();
382
382
 
383
383
  // src/components/ActionMenu.tsx
384
- import React25, { useMemo as useMemo11 } from "react";
384
+ import React26, { useMemo as useMemo11 } from "react";
385
385
 
386
386
  // src/theme/index.ts
387
387
  import tailwindConfig from "@noya-app/noya-tailwind-config";
@@ -422,27 +422,57 @@ var INPUT_HEIGHT = 27;
422
422
  // src/components/DropdownMenu.tsx
423
423
  import { useKeyboardShortcuts } from "@noya-app/noya-keymap";
424
424
  import * as RadixDropdownMenu from "@radix-ui/react-dropdown-menu";
425
- import React24, {
425
+ import React25, {
426
426
  useMemo as useMemo10
427
427
  } from "react";
428
428
 
429
+ // src/contexts/PortalScopeContext.tsx
430
+ import * as React5 from "react";
431
+ var PortalScopeContext = React5.createContext(void 0);
432
+ var PortalScopeProvider = React5.memo(function PortalScopeProvider2({
433
+ children,
434
+ portalScopeId
435
+ }) {
436
+ return /* @__PURE__ */ React5.createElement(PortalScopeContext.Provider, { value: portalScopeId }, children);
437
+ });
438
+ function usePortalScopeId() {
439
+ return React5.useContext(PortalScopeContext) ?? "";
440
+ }
441
+ var portalScopeDataSetName = "noyaPortalScope";
442
+ var portalScopePropName = `data-noya-portal-scope`;
443
+ function portalScopeProps(id) {
444
+ return {
445
+ [portalScopePropName]: id
446
+ };
447
+ }
448
+ function getClosestPortalScope(element) {
449
+ if (!(element instanceof HTMLElement)) {
450
+ return;
451
+ }
452
+ const closest = element.closest(`[${portalScopePropName}]`);
453
+ if (!closest || !(closest instanceof HTMLElement)) {
454
+ return;
455
+ }
456
+ return closest.dataset[portalScopeDataSetName];
457
+ }
458
+
429
459
  // src/components/internal/Menu.tsx
430
460
  import { getShortcutDisplayParts } from "@noya-app/noya-keymap";
431
- import React21, { memo as memo8 } from "react";
461
+ import React22, { memo as memo9 } from "react";
432
462
 
433
463
  // src/contexts/DesignSystemConfiguration.tsx
434
464
  import { getCurrentPlatform } from "@noya-app/noya-keymap";
435
- import * as React20 from "react";
465
+ import * as React21 from "react";
436
466
 
437
467
  // src/components/Toast.tsx
438
468
  import * as ToastPrimitive from "@radix-ui/react-toast";
439
- import React10 from "react";
469
+ import React11 from "react";
440
470
 
441
471
  // src/components/IconButton.tsx
442
- import * as React9 from "react";
472
+ import * as React10 from "react";
443
473
 
444
474
  // src/components/Button.tsx
445
- import React7, {
475
+ import React8, {
446
476
  forwardRef as forwardRef3,
447
477
  useCallback as useCallback10,
448
478
  useMemo as useMemo4
@@ -513,10 +543,10 @@ function mergeConflictingClassNames(classNames, options) {
513
543
 
514
544
  // src/components/Tooltip.tsx
515
545
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
516
- import * as React6 from "react";
546
+ import * as React7 from "react";
517
547
 
518
548
  // src/components/Text.tsx
519
- import React5, { forwardRef as forwardRef2 } from "react";
549
+ import React6, { forwardRef as forwardRef2 } from "react";
520
550
  var elements = {
521
551
  title: "h1",
522
552
  subtitle: "h1",
@@ -559,7 +589,7 @@ var Text = forwardRef2(function Text2({
559
589
  ...rest
560
590
  }, forwardedRef) {
561
591
  const Component = as ?? elements[variant] ?? "span";
562
- return /* @__PURE__ */ React5.createElement(
592
+ return /* @__PURE__ */ React6.createElement(
563
593
  Component,
564
594
  {
565
595
  ref: forwardedRef,
@@ -578,27 +608,27 @@ var Text = forwardRef2(function Text2({
578
608
  );
579
609
  });
580
610
  var Heading1 = forwardRef2(
581
- (props, ref) => /* @__PURE__ */ React5.createElement(Text, { ref, ...props, variant: "heading1" })
611
+ (props, ref) => /* @__PURE__ */ React6.createElement(Text, { ref, ...props, variant: "heading1" })
582
612
  );
583
613
  var Heading2 = forwardRef2(
584
- (props, ref) => /* @__PURE__ */ React5.createElement(Text, { ref, ...props, variant: "heading2" })
614
+ (props, ref) => /* @__PURE__ */ React6.createElement(Text, { ref, ...props, variant: "heading2" })
585
615
  );
586
616
  var Heading3 = forwardRef2(
587
- (props, ref) => /* @__PURE__ */ React5.createElement(Text, { ref, ...props, variant: "heading3" })
617
+ (props, ref) => /* @__PURE__ */ React6.createElement(Text, { ref, ...props, variant: "heading3" })
588
618
  );
589
619
  var Heading4 = forwardRef2(
590
- (props, ref) => /* @__PURE__ */ React5.createElement(Text, { ref, ...props, variant: "heading4" })
620
+ (props, ref) => /* @__PURE__ */ React6.createElement(Text, { ref, ...props, variant: "heading4" })
591
621
  );
592
622
  var Heading5 = forwardRef2(
593
- (props, ref) => /* @__PURE__ */ React5.createElement(Text, { ref, ...props, variant: "heading5" })
623
+ (props, ref) => /* @__PURE__ */ React6.createElement(Text, { ref, ...props, variant: "heading5" })
594
624
  );
595
625
  var Body = forwardRef2(
596
- (props, ref) => /* @__PURE__ */ React5.createElement(Text, { ref, ...props, variant: "body" })
626
+ (props, ref) => /* @__PURE__ */ React6.createElement(Text, { ref, ...props, variant: "body" })
597
627
  );
598
628
  var Small = forwardRef2(
599
- (props, ref) => /* @__PURE__ */ React5.createElement(Text, { ref, ...props, variant: "small" })
629
+ (props, ref) => /* @__PURE__ */ React6.createElement(Text, { ref, ...props, variant: "small" })
600
630
  );
601
- var Italic = ({ children }) => /* @__PURE__ */ React5.createElement(
631
+ var Italic = ({ children }) => /* @__PURE__ */ React6.createElement(
602
632
  "span",
603
633
  {
604
634
  style: {
@@ -609,14 +639,16 @@ var Italic = ({ children }) => /* @__PURE__ */ React5.createElement(
609
639
  );
610
640
 
611
641
  // src/components/Tooltip.tsx
612
- var Tooltip = React6.memo(function Tooltip2({
642
+ var Tooltip = React7.memo(function Tooltip2({
613
643
  children,
614
644
  content,
615
645
  sideOffset = 2
616
646
  }) {
617
- return /* @__PURE__ */ React6.createElement(TooltipPrimitive.Provider, null, /* @__PURE__ */ React6.createElement(TooltipPrimitive.Root, null, /* @__PURE__ */ React6.createElement(TooltipPrimitive.Trigger, { asChild: true }, children), /* @__PURE__ */ React6.createElement(TooltipPrimitive.Portal, null, /* @__PURE__ */ React6.createElement(
647
+ const portalScopeId = usePortalScopeId();
648
+ return /* @__PURE__ */ React7.createElement(TooltipPrimitive.Provider, null, /* @__PURE__ */ React7.createElement(TooltipPrimitive.Root, null, /* @__PURE__ */ React7.createElement(TooltipPrimitive.Trigger, { asChild: true }, children), /* @__PURE__ */ React7.createElement(TooltipPrimitive.Portal, null, /* @__PURE__ */ React7.createElement(
618
649
  TooltipPrimitive.Content,
619
650
  {
651
+ ...portalScopeProps(portalScopeId),
620
652
  side: "bottom",
621
653
  align: "center",
622
654
  sideOffset,
@@ -665,7 +697,7 @@ var Button = forwardRef3(function Button2({
665
697
  "no-underline leading-[1] relative border-0 outline-none select-none text-left rounded flex items-center justify-center [&>*]:pointer-events-none [-webkit-app-region:no-drag] focus:ring-2 focus:ring-primary focus:shadow-[0_0_0_1px_var(--n-popover-background)_inset] transition-all",
666
698
  disabled ? "opacity-25" : "",
667
699
  !className?.includes("flex") ? "flex-none" : "",
668
- active ? "bg-primary text-white hover:bg-primary-light active:bg-primary" : variantStyles[variant],
700
+ active ? "bg-primary-pastel text-primary hover:bg-primary-pastel-light min-w-[31px]" : variantStyles[variant],
669
701
  sizeStyles[variant === "thin" ? "thin" : variant === "floating" && size2 !== "small" ? "floating" : variant === "none" ? "none" : size2]
670
702
  );
671
703
  const buttonClassName = useMemo4(() => {
@@ -673,7 +705,7 @@ var Button = forwardRef3(function Button2({
673
705
  categories: ["position"]
674
706
  }) : baseClassName;
675
707
  }, [className, baseClassName]);
676
- const buttonElement = /* @__PURE__ */ React7.createElement(
708
+ const buttonElement = /* @__PURE__ */ React8.createElement(
677
709
  Component,
678
710
  {
679
711
  ref: forwardedRef,
@@ -688,7 +720,7 @@ var Button = forwardRef3(function Button2({
688
720
  }, []),
689
721
  ...rest
690
722
  },
691
- /* @__PURE__ */ React7.createElement(
723
+ /* @__PURE__ */ React8.createElement(
692
724
  "span",
693
725
  {
694
726
  className: "min-h-[19px] flex items-center flex-1 justify-center leading-[15px]",
@@ -697,33 +729,33 @@ var Button = forwardRef3(function Button2({
697
729
  children
698
730
  )
699
731
  );
700
- return tooltip ? /* @__PURE__ */ React7.createElement(Tooltip, { content: tooltip }, buttonElement) : buttonElement;
732
+ return tooltip ? /* @__PURE__ */ React8.createElement(Tooltip, { content: tooltip }, buttonElement) : buttonElement;
701
733
  });
702
734
  var Button_default = Button;
703
735
 
704
736
  // src/components/Icons.tsx
705
737
  import * as Icons from "@noya-app/noya-icons";
706
- import * as React8 from "react";
738
+ import * as React9 from "react";
707
739
  function renderIcon(iconName) {
708
740
  if (typeof iconName === "string") {
709
741
  const Icon = Icons[iconName];
710
- return /* @__PURE__ */ React8.createElement(Icon, null);
742
+ return /* @__PURE__ */ React9.createElement(Icon, null);
711
743
  }
712
744
  return iconName;
713
745
  }
714
746
 
715
747
  // src/components/IconButton.tsx
716
- var IconButton = React9.memo(
717
- React9.forwardRef(function IconButton2({ selected, iconName, color, size: size2, contentStyle, ...props }, forwardedRef) {
748
+ var IconButton = React10.memo(
749
+ React10.forwardRef(function IconButton2({ selected, iconName, color, size: size2, contentStyle, ...props }, forwardedRef) {
718
750
  const Icon = Icons[iconName];
719
- const style2 = React9.useMemo(() => {
751
+ const style2 = React10.useMemo(() => {
720
752
  return {
721
753
  padding: "0 2px",
722
754
  ...size2 && { minHeight: size2 },
723
755
  ...contentStyle
724
756
  };
725
757
  }, [contentStyle, size2]);
726
- return /* @__PURE__ */ React9.createElement(Button, { ref: forwardedRef, ...props, variant: "none", contentStyle: style2 }, /* @__PURE__ */ React9.createElement(
758
+ return /* @__PURE__ */ React10.createElement(Button, { ref: forwardedRef, ...props, variant: "none", contentStyle: style2 }, /* @__PURE__ */ React10.createElement(
727
759
  Icon,
728
760
  {
729
761
  color: color ?? (selected ? cssVars.colors.iconSelected : cssVars.colors.icon),
@@ -740,37 +772,37 @@ var Toast = ({
740
772
  children,
741
773
  ...props
742
774
  }) => {
743
- return /* @__PURE__ */ React10.createElement(
775
+ return /* @__PURE__ */ React11.createElement(
744
776
  ToastPrimitive.Root,
745
777
  {
746
778
  className: "px-2 py-2.5 grid grid-cols-[auto_max-content] gap-x-2.5 items-center rounded text-sm bg-popover-background shadow-popover text-text-muted",
747
779
  ...props
748
780
  },
749
- title && /* @__PURE__ */ React10.createElement(
781
+ title && /* @__PURE__ */ React11.createElement(
750
782
  ToastPrimitive.Title,
751
783
  {
752
784
  className: `mb-[5px] ${textStyles.label} font-bold text-text`
753
785
  },
754
786
  title
755
787
  ),
756
- /* @__PURE__ */ React10.createElement(
788
+ /* @__PURE__ */ React11.createElement(
757
789
  ToastPrimitive.Description,
758
790
  {
759
791
  className: `${textStyles.small} text-text-muted`
760
792
  },
761
793
  content
762
794
  ),
763
- children && /* @__PURE__ */ React10.createElement(ToastPrimitive.Action, { asChild: true, altText: "" }, children),
764
- /* @__PURE__ */ React10.createElement(ToastPrimitive.Close, { "aria-label": "Close", asChild: true }, /* @__PURE__ */ React10.createElement(IconButton, { iconName: "Cross1Icon" }))
795
+ children && /* @__PURE__ */ React11.createElement(ToastPrimitive.Action, { asChild: true, altText: "" }, children),
796
+ /* @__PURE__ */ React11.createElement(ToastPrimitive.Close, { "aria-label": "Close", asChild: true }, /* @__PURE__ */ React11.createElement(IconButton, { iconName: "Cross1Icon" }))
765
797
  );
766
798
  };
767
- var ToastProvider = ({ children }) => /* @__PURE__ */ React10.createElement(ToastPrimitive.Provider, null, children, /* @__PURE__ */ React10.createElement(ToastPrimitive.Viewport, { className: "fixed bottom-0 right-0 flex flex-col p-5 g-2.5 min-w-[200px] max-w-[100vw] m-0 list-none z-[2147483647] outline-none" }));
799
+ var ToastProvider = ({ children }) => /* @__PURE__ */ React11.createElement(ToastPrimitive.Provider, null, children, /* @__PURE__ */ React11.createElement(ToastPrimitive.Viewport, { className: "fixed bottom-0 right-0 flex flex-col p-5 g-2.5 min-w-[200px] max-w-[100vw] m-0 list-none z-[2147483647] outline-none" }));
768
800
 
769
801
  // src/contexts/DialogContext.tsx
770
- import React18, {
771
- createContext as createContext3,
802
+ import React19, {
803
+ createContext as createContext4,
772
804
  useCallback as useCallback13,
773
- useContext as useContext3,
805
+ useContext as useContext4,
774
806
  useMemo as useMemo7,
775
807
  useRef as useRef11,
776
808
  useState as useState13
@@ -778,17 +810,17 @@ import React18, {
778
810
 
779
811
  // src/components/Dialog.tsx
780
812
  import * as DialogPrimitive from "@radix-ui/react-dialog";
781
- import React12, {
813
+ import React13, {
782
814
  forwardRef as forwardRef6,
783
815
  useImperativeHandle,
784
816
  useRef as useRef9
785
817
  } from "react";
786
818
 
787
819
  // src/components/Spacer.tsx
788
- import * as React11 from "react";
789
- var SpacerVertical = React11.forwardRef(
820
+ import * as React12 from "react";
821
+ var SpacerVertical = React12.forwardRef(
790
822
  ({ size: size2, inline, ...props }, ref) => {
791
- return /* @__PURE__ */ React11.createElement(
823
+ return /* @__PURE__ */ React12.createElement(
792
824
  "span",
793
825
  {
794
826
  className: `${inline ? "inline-block" : "block"} ${size2 === void 0 ? "flex flex-1" : ""}`,
@@ -801,9 +833,9 @@ var SpacerVertical = React11.forwardRef(
801
833
  );
802
834
  }
803
835
  );
804
- var SpacerHorizontal = React11.forwardRef(
836
+ var SpacerHorizontal = React12.forwardRef(
805
837
  ({ size: size2, inline, ...props }, ref) => {
806
- return /* @__PURE__ */ React11.createElement(
838
+ return /* @__PURE__ */ React12.createElement(
807
839
  "span",
808
840
  {
809
841
  className: `${inline ? "inline-block" : "block"} ${size2 === void 0 ? "flex flex-1" : ""}`,
@@ -823,7 +855,7 @@ var Spacer;
823
855
  })(Spacer || (Spacer = {}));
824
856
 
825
857
  // src/components/Dialog.tsx
826
- var StyledOverlay = forwardRef6(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
858
+ var StyledOverlay = forwardRef6(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
827
859
  DialogPrimitive.Overlay,
828
860
  {
829
861
  ref,
@@ -832,7 +864,7 @@ var StyledOverlay = forwardRef6(({ className, ...props }, ref) => /* @__PURE__ *
832
864
  }
833
865
  ));
834
866
  var StyledContent = forwardRef6(({ className, children, ...props }, ref) => {
835
- return /* @__PURE__ */ React12.createElement(
867
+ return /* @__PURE__ */ React13.createElement(
836
868
  DialogPrimitive.Content,
837
869
  {
838
870
  ref,
@@ -852,7 +884,7 @@ var StyledContent = forwardRef6(({ className, children, ...props }, ref) => {
852
884
  children
853
885
  );
854
886
  });
855
- var StyledTitle = forwardRef6(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
887
+ var StyledTitle = forwardRef6(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
856
888
  DialogPrimitive.Title,
857
889
  {
858
890
  ref,
@@ -863,7 +895,7 @@ var StyledTitle = forwardRef6(({ className, ...props }, ref) => /* @__PURE__ */
863
895
  ...props
864
896
  }
865
897
  ));
866
- var StyledDescription = forwardRef6(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
898
+ var StyledDescription = forwardRef6(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
867
899
  DialogPrimitive.Description,
868
900
  {
869
901
  ref,
@@ -893,7 +925,7 @@ var Dialog = forwardRef6(function Dialog2({
893
925
  return contentRef.current.contains(element);
894
926
  }
895
927
  }));
896
- return /* @__PURE__ */ React12.createElement(DialogPrimitive.Root, { open, onOpenChange }, /* @__PURE__ */ React12.createElement(StyledOverlay, null), /* @__PURE__ */ React12.createElement(
928
+ return /* @__PURE__ */ React13.createElement(DialogPrimitive.Root, { open, onOpenChange }, /* @__PURE__ */ React13.createElement(StyledOverlay, null), /* @__PURE__ */ React13.createElement(
897
929
  StyledContent,
898
930
  {
899
931
  ref: contentRef,
@@ -905,7 +937,7 @@ var Dialog = forwardRef6(function Dialog2({
905
937
  onInteractOutside: (event) => event.preventDefault()
906
938
  }
907
939
  },
908
- showCloseButton && /* @__PURE__ */ React12.createElement(DialogPrimitive.Close, { asChild: true }, /* @__PURE__ */ React12.createElement(
940
+ showCloseButton && /* @__PURE__ */ React13.createElement(DialogPrimitive.Close, { asChild: true }, /* @__PURE__ */ React13.createElement(
909
941
  IconButton,
910
942
  {
911
943
  iconName: "Cross1Icon",
@@ -917,13 +949,13 @@ var Dialog = forwardRef6(function Dialog2({
917
949
  }
918
950
  }
919
951
  )),
920
- title && /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(StyledTitle, null, title), /* @__PURE__ */ React12.createElement(Spacer.Vertical, { size: description ? 10 : 20 })),
921
- description && /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Spacer.Vertical, { size: 10 }), /* @__PURE__ */ React12.createElement(StyledDescription, null, description), /* @__PURE__ */ React12.createElement(Spacer.Vertical, { size: 20 })),
952
+ title && /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(StyledTitle, null, title), /* @__PURE__ */ React13.createElement(Spacer.Vertical, { size: description ? 10 : 20 })),
953
+ description && /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(Spacer.Vertical, { size: 10 }), /* @__PURE__ */ React13.createElement(StyledDescription, null, description), /* @__PURE__ */ React13.createElement(Spacer.Vertical, { size: 20 })),
922
954
  children
923
955
  ));
924
956
  });
925
957
  var FullscreenDialog = forwardRef6(function FullscreenDialog2({ style: style2, ...rest }, forwardedRef) {
926
- return /* @__PURE__ */ React12.createElement(
958
+ return /* @__PURE__ */ React13.createElement(
927
959
  Dialog,
928
960
  {
929
961
  ref: forwardedRef,
@@ -936,42 +968,42 @@ var FullscreenDialog = forwardRef6(function FullscreenDialog2({ style: style2, .
936
968
 
937
969
  // src/components/InputField.tsx
938
970
  import { DropdownChevronIcon } from "@noya-app/noya-icons";
939
- import React17, {
940
- createContext as createContext2,
971
+ import React18, {
972
+ createContext as createContext3,
941
973
  forwardRef as forwardRef9,
942
- memo as memo6,
974
+ memo as memo7,
943
975
  useCallback as useCallback12,
944
- useContext as useContext2,
976
+ useContext as useContext3,
945
977
  useId,
946
978
  useMemo as useMemo6,
947
979
  useState as useState12
948
980
  } from "react";
949
981
 
950
982
  // src/hooks/useLabel.ts
951
- import React13 from "react";
952
- var LabelContext = React13.createContext({
983
+ import React14 from "react";
984
+ var LabelContext = React14.createContext({
953
985
  fieldId: "",
954
986
  label: void 0
955
987
  });
956
988
  var useLabel = ({ label, fieldId }) => {
957
- const { label: labelFromContext, fieldId: fieldIdFromContext } = React13.useContext(LabelContext);
989
+ const { label: labelFromContext, fieldId: fieldIdFromContext } = React14.useContext(LabelContext);
958
990
  return {
959
991
  label: label ?? labelFromContext,
960
992
  fieldId: fieldId ?? fieldIdFromContext
961
993
  };
962
994
  };
963
- var LabelPositionContext = React13.createContext({
995
+ var LabelPositionContext = React14.createContext({
964
996
  position: "start"
965
997
  });
966
998
  var useLabelPosition = () => {
967
- const { position } = React13.useContext(LabelPositionContext);
999
+ const { position } = React14.useContext(LabelPositionContext);
968
1000
  return position;
969
1001
  };
970
- var LabelWidthContext = React13.createContext({
1002
+ var LabelWidthContext = React14.createContext({
971
1003
  width: 100
972
1004
  });
973
1005
  var useLabelWidth = () => {
974
- const { width } = React13.useContext(LabelWidthContext);
1006
+ const { width } = React14.useContext(LabelWidthContext);
975
1007
  return width;
976
1008
  };
977
1009
 
@@ -1011,7 +1043,7 @@ var startBaseStyles = "absolute left-1.5 inset-y-0 flex items-center";
1011
1043
 
1012
1044
  // src/components/internal/TextInput.tsx
1013
1045
  import { composeRefs } from "@radix-ui/react-compose-refs";
1014
- import React14, {
1046
+ import React15, {
1015
1047
  forwardRef as forwardRef7,
1016
1048
  useCallback as useCallback11,
1017
1049
  useEffect as useEffect9,
@@ -1021,7 +1053,7 @@ import React14, {
1021
1053
  } from "react";
1022
1054
 
1023
1055
  // src/contexts/GlobalInputBlurContext.tsx
1024
- import { createContext, useContext, useEffect as useEffect8 } from "react";
1056
+ import { createContext as createContext2, useContext as useContext2, useEffect as useEffect8 } from "react";
1025
1057
  var defaultValue = /* @__PURE__ */ (() => {
1026
1058
  const listeners = [];
1027
1059
  const value = {
@@ -1041,10 +1073,10 @@ var defaultValue = /* @__PURE__ */ (() => {
1041
1073
  };
1042
1074
  return value;
1043
1075
  })();
1044
- var GlobalInputBlurContext = createContext(defaultValue);
1076
+ var GlobalInputBlurContext = createContext2(defaultValue);
1045
1077
  var GlobalInputBlurProvider = GlobalInputBlurContext.Provider;
1046
1078
  var useGlobalInputBlur = () => {
1047
- return useContext(GlobalInputBlurContext);
1079
+ return useContext2(GlobalInputBlurContext);
1048
1080
  };
1049
1081
  function useGlobalInputBlurListener(f) {
1050
1082
  const context = useGlobalInputBlur();
@@ -1061,7 +1093,7 @@ function useGlobalInputBlurTrigger() {
1061
1093
 
1062
1094
  // src/components/internal/TextInput.tsx
1063
1095
  var ReadOnlyTextInput = forwardRef7(function ReadOnlyTextInput2({ onKeyDown, onFocusChange, value, ...rest }, forwardedRef) {
1064
- return /* @__PURE__ */ React14.createElement(
1096
+ return /* @__PURE__ */ React15.createElement(
1065
1097
  "input",
1066
1098
  {
1067
1099
  ref: forwardedRef,
@@ -1104,7 +1136,7 @@ var ControlledTextInput = forwardRef7(function ControlledTextInput2({
1104
1136
  },
1105
1137
  [onFocus, onFocusChange]
1106
1138
  );
1107
- return /* @__PURE__ */ React14.createElement(
1139
+ return /* @__PURE__ */ React15.createElement(
1108
1140
  "input",
1109
1141
  {
1110
1142
  ref: forwardedRef,
@@ -1133,7 +1165,7 @@ var SubmittableTextInput = forwardRef7(function SubmittableTextInput2({
1133
1165
  submitOnBlur = true,
1134
1166
  ...rest
1135
1167
  }, forwardedRef) {
1136
- const ref = React14.useRef(null);
1168
+ const ref = React15.useRef(null);
1137
1169
  const latestValue = useRef10(value);
1138
1170
  latestValue.current = value;
1139
1171
  const userDidEdit = useRef10(false);
@@ -1216,7 +1248,7 @@ var SubmittableTextInput = forwardRef7(function SubmittableTextInput2({
1216
1248
  }
1217
1249
  };
1218
1250
  }, [internalValue, submitAutomaticallyAfterDelay]);
1219
- return /* @__PURE__ */ React14.createElement(
1251
+ return /* @__PURE__ */ React15.createElement(
1220
1252
  "input",
1221
1253
  {
1222
1254
  ref: composeRefs(ref, forwardedRef),
@@ -1248,21 +1280,21 @@ var TextInput_default = forwardRef7(function TextInput(props, forwardedRef) {
1248
1280
  ...props
1249
1281
  };
1250
1282
  if ("readOnly" in commonProps) {
1251
- return /* @__PURE__ */ React14.createElement(ReadOnlyTextInput, { ref: forwardedRef, ...commonProps, readOnly: true });
1283
+ return /* @__PURE__ */ React15.createElement(ReadOnlyTextInput, { ref: forwardedRef, ...commonProps, readOnly: true });
1252
1284
  } else if ("onChange" in commonProps) {
1253
- return /* @__PURE__ */ React14.createElement(ControlledTextInput, { ref: forwardedRef, ...commonProps });
1285
+ return /* @__PURE__ */ React15.createElement(ControlledTextInput, { ref: forwardedRef, ...commonProps });
1254
1286
  } else {
1255
- return /* @__PURE__ */ React14.createElement(SubmittableTextInput, { ref: forwardedRef, ...commonProps });
1287
+ return /* @__PURE__ */ React15.createElement(SubmittableTextInput, { ref: forwardedRef, ...commonProps });
1256
1288
  }
1257
1289
  });
1258
1290
 
1259
1291
  // src/components/Label.tsx
1260
- import React15, { forwardRef as forwardRef8, memo as memo5 } from "react";
1292
+ import React16, { forwardRef as forwardRef8, memo as memo6 } from "react";
1261
1293
  var labelStyles = "flex items-center select-none z-label relative";
1262
1294
  var labelTextStyles = "font-sans text-label uppercase leading-3 font-bold text-text-muted";
1263
- var Label = memo5(
1295
+ var Label = memo6(
1264
1296
  forwardRef8(function Label2({ className, children, ...props }, ref) {
1265
- return /* @__PURE__ */ React15.createElement(
1297
+ return /* @__PURE__ */ React16.createElement(
1266
1298
  "label",
1267
1299
  {
1268
1300
  ref,
@@ -1286,7 +1318,7 @@ var Label = memo5(
1286
1318
 
1287
1319
  // src/components/Popover.tsx
1288
1320
  import * as PopoverPrimitive from "@radix-ui/react-popover";
1289
- import React16 from "react";
1321
+ import React17 from "react";
1290
1322
  var closeStyles = {
1291
1323
  all: "unset",
1292
1324
  fontFamily: "inherit"
@@ -1314,9 +1346,11 @@ function Popover({
1314
1346
  onClickClose,
1315
1347
  className
1316
1348
  }) {
1317
- return /* @__PURE__ */ React16.createElement(PopoverPrimitive.Root, { open, onOpenChange }, /* @__PURE__ */ React16.createElement(PopoverPrimitive.Trigger, { asChild: true }, trigger), /* @__PURE__ */ React16.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React16.createElement(
1349
+ const portalScopeId = usePortalScopeId();
1350
+ return /* @__PURE__ */ React17.createElement(PopoverPrimitive.Root, { open, onOpenChange }, /* @__PURE__ */ React17.createElement(PopoverPrimitive.Trigger, { asChild: true }, trigger), /* @__PURE__ */ React17.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React17.createElement(
1318
1351
  PopoverPrimitive.Content,
1319
1352
  {
1353
+ ...portalScopeProps(portalScopeId),
1320
1354
  className: cx(
1321
1355
  popoverStyle.base,
1322
1356
  variant === "large" && popoverStyle.large,
@@ -1335,20 +1369,20 @@ function Popover({
1335
1369
  arrowPadding: 2
1336
1370
  },
1337
1371
  children,
1338
- showArrow && /* @__PURE__ */ React16.createElement(PopoverPrimitive.Arrow, { className: "fill-popover-background" }),
1339
- closable && /* @__PURE__ */ React16.createElement(
1372
+ showArrow && /* @__PURE__ */ React17.createElement(PopoverPrimitive.Arrow, { className: "fill-popover-background" }),
1373
+ closable && /* @__PURE__ */ React17.createElement(
1340
1374
  PopoverPrimitive.Close,
1341
1375
  {
1342
1376
  className: "rounded-full h-[25px] w-[25px] inline-flex items-center justify-center absolute top-[5px] right-[5px]",
1343
1377
  style: closeStyles
1344
1378
  },
1345
- /* @__PURE__ */ React16.createElement(IconButton, { iconName: "Cross2Icon", onClick: onClickClose })
1379
+ /* @__PURE__ */ React17.createElement(IconButton, { iconName: "Cross2Icon", onClick: onClickClose })
1346
1380
  )
1347
1381
  )));
1348
1382
  }
1349
1383
 
1350
1384
  // src/components/InputField.tsx
1351
- var InputFieldContext = createContext2({
1385
+ var InputFieldContext = createContext3({
1352
1386
  startWidth: void 0,
1353
1387
  size: "medium",
1354
1388
  isFocused: false,
@@ -1358,7 +1392,7 @@ var InputFieldContext = createContext2({
1358
1392
  startRef: null,
1359
1393
  endRef: null
1360
1394
  });
1361
- var useInputFieldContext = () => useContext2(InputFieldContext);
1395
+ var useInputFieldContext = () => useContext3(InputFieldContext);
1362
1396
  var noop2 = () => {
1363
1397
  };
1364
1398
  var getFieldSpacing = ({
@@ -1370,7 +1404,7 @@ var getFieldSpacing = ({
1370
1404
  paddingRight: `${variant === "bare" ? endWidth : endWidth ? endWidth + 12 : 6}px`
1371
1405
  });
1372
1406
  var InputFieldDropdownMenu = memoGeneric(function InputFieldDropdownMenu2({ id, items, onSelect, children }) {
1373
- return /* @__PURE__ */ React17.createElement(
1407
+ return /* @__PURE__ */ React18.createElement(
1374
1408
  DropdownMenu,
1375
1409
  {
1376
1410
  items,
@@ -1378,10 +1412,10 @@ var InputFieldDropdownMenu = memoGeneric(function InputFieldDropdownMenu2({ id,
1378
1412
  align: "end",
1379
1413
  sideOffset: 8
1380
1414
  },
1381
- children || /* @__PURE__ */ React17.createElement(InputFieldButton, { variant: "floating", id }, /* @__PURE__ */ React17.createElement(DropdownChevronIcon, null))
1415
+ children || /* @__PURE__ */ React18.createElement(InputFieldButton, { variant: "floating", id }, /* @__PURE__ */ React18.createElement(DropdownChevronIcon, null))
1382
1416
  );
1383
1417
  });
1384
- var InputFieldButton = memo6(
1418
+ var InputFieldButton = memo7(
1385
1419
  forwardRef9(function InputFieldButton2(props, forwardedRef) {
1386
1420
  const {
1387
1421
  children,
@@ -1421,7 +1455,7 @@ var InputFieldButton = memo6(
1421
1455
  }),
1422
1456
  [style2, variant]
1423
1457
  );
1424
- return /* @__PURE__ */ React17.createElement(
1458
+ return /* @__PURE__ */ React18.createElement(
1425
1459
  Button,
1426
1460
  {
1427
1461
  as,
@@ -1478,7 +1512,7 @@ var InputElement = forwardRef9(
1478
1512
  [inputClassName]
1479
1513
  );
1480
1514
  if (as === "span") {
1481
- return /* @__PURE__ */ React17.createElement(
1515
+ return /* @__PURE__ */ React18.createElement(
1482
1516
  "span",
1483
1517
  {
1484
1518
  ref,
@@ -1489,7 +1523,7 @@ var InputElement = forwardRef9(
1489
1523
  children
1490
1524
  );
1491
1525
  }
1492
- return /* @__PURE__ */ React17.createElement(
1526
+ return /* @__PURE__ */ React18.createElement(
1493
1527
  TextInput_default,
1494
1528
  {
1495
1529
  ref,
@@ -1513,7 +1547,7 @@ var InputFieldInput = forwardRef9(function InputFieldInput2({ textAlign, variant
1513
1547
  },
1514
1548
  [onFocusChange]
1515
1549
  );
1516
- return /* @__PURE__ */ React17.createElement(
1550
+ return /* @__PURE__ */ React18.createElement(
1517
1551
  InputElement,
1518
1552
  {
1519
1553
  ref,
@@ -1525,7 +1559,7 @@ var InputFieldInput = forwardRef9(function InputFieldInput2({ textAlign, variant
1525
1559
  );
1526
1560
  });
1527
1561
  var InputFieldTypeahead = (props) => {
1528
- return /* @__PURE__ */ React17.createElement(
1562
+ return /* @__PURE__ */ React18.createElement(
1529
1563
  InputElement,
1530
1564
  {
1531
1565
  as: "span",
@@ -1543,8 +1577,8 @@ var InputFieldTypeahead = (props) => {
1543
1577
  []
1544
1578
  )
1545
1579
  },
1546
- /* @__PURE__ */ React17.createElement("span", { style: { opacity: 0 } }, props.prefix),
1547
- props.isFocused && /* @__PURE__ */ React17.createElement("span", { style: { opacity: 0.5 } }, props.value.slice(props.prefix.length))
1580
+ /* @__PURE__ */ React18.createElement("span", { style: { opacity: 0 } }, props.prefix),
1581
+ props.isFocused && /* @__PURE__ */ React18.createElement("span", { style: { opacity: 0.5 } }, props.value.slice(props.prefix.length))
1548
1582
  );
1549
1583
  };
1550
1584
  function parseNumber(value) {
@@ -1600,7 +1634,7 @@ function InputFieldNumberInput(props) {
1600
1634
  },
1601
1635
  [onBlur]
1602
1636
  );
1603
- return /* @__PURE__ */ React17.createElement(
1637
+ return /* @__PURE__ */ React18.createElement(
1604
1638
  InputFieldInput,
1605
1639
  {
1606
1640
  ...rest,
@@ -1613,7 +1647,7 @@ function InputFieldNumberInput(props) {
1613
1647
  }
1614
1648
  );
1615
1649
  }
1616
- var RootContainer = forwardRef9(({ $width, className, ...props }, ref) => /* @__PURE__ */ React17.createElement(
1650
+ var RootContainer = forwardRef9(({ $width, className, ...props }, ref) => /* @__PURE__ */ React18.createElement(
1617
1651
  "div",
1618
1652
  {
1619
1653
  ref,
@@ -1642,10 +1676,10 @@ function InputFieldRoot({
1642
1676
  label: labelProp
1643
1677
  }) {
1644
1678
  const randomId = useId();
1645
- const [isFocused, setIsFocused] = React17.useState(false);
1646
- const startRef = React17.useRef(null);
1647
- const inputRef = React17.useRef(null);
1648
- const endRef = React17.useRef(null);
1679
+ const [isFocused, setIsFocused] = React18.useState(false);
1680
+ const startRef = React18.useRef(null);
1681
+ const inputRef = React18.useRef(null);
1682
+ const endRef = React18.useRef(null);
1649
1683
  const measuredInputSize = useSize(inputRef, "width");
1650
1684
  const measuredStartSize = useSize(startRef, "width");
1651
1685
  const measuredEndSize = useSize(endRef, "width");
@@ -1676,15 +1710,15 @@ function InputFieldRoot({
1676
1710
  [startWidth, endWidth, size2, isFocused, handleFocusChange, id, randomId]
1677
1711
  );
1678
1712
  const insetLabel = useMemo6(
1679
- () => /* @__PURE__ */ React17.createElement(Label, { htmlFor: id, className: "!text-text-disabled" }, labelProp ?? label),
1713
+ () => /* @__PURE__ */ React18.createElement(Label, { htmlFor: id, className: "!text-text-disabled" }, labelProp ?? label),
1680
1714
  [id, labelProp, label]
1681
1715
  );
1682
- const rootElement = /* @__PURE__ */ React17.createElement(RootContainer, { $width: width, style: style2, className }, children, start && /* @__PURE__ */ React17.createElement("span", { ref: startRef, className: startBaseStyles }, start), (end || label) && /* @__PURE__ */ React17.createElement("span", { ref: endRef, className: cx(endStyles, label && end && "gap-1.5") }, labelProp ? insetLabel : label && labelPosition === "inset" && insetLabel, end));
1716
+ const rootElement = /* @__PURE__ */ React18.createElement(RootContainer, { $width: width, style: style2, className }, children, start && /* @__PURE__ */ React18.createElement("span", { ref: startRef, className: startBaseStyles }, start), (end || label) && /* @__PURE__ */ React18.createElement("span", { ref: endRef, className: cx(endStyles, label && end && "gap-1.5") }, labelProp ? insetLabel : label && labelPosition === "inset" && insetLabel, end));
1683
1717
  const measuredWidthObject = useMemo6(
1684
1718
  () => measuredInputSize ? { width: measuredInputSize.width + 4 } : void 0,
1685
1719
  [measuredInputSize]
1686
1720
  );
1687
- return /* @__PURE__ */ React17.createElement(InputFieldContext.Provider, { value: contextValue }, renderPopoverContent ? /* @__PURE__ */ React17.createElement(
1721
+ return /* @__PURE__ */ React18.createElement(InputFieldContext.Provider, { value: contextValue }, renderPopoverContent ? /* @__PURE__ */ React18.createElement(
1688
1722
  Popover,
1689
1723
  {
1690
1724
  open: true,
@@ -1700,7 +1734,7 @@ function InputFieldRoot({
1700
1734
  event.stopPropagation();
1701
1735
  }
1702
1736
  },
1703
- measuredWidthObject && /* @__PURE__ */ React17.createElement(
1737
+ measuredWidthObject && /* @__PURE__ */ React18.createElement(
1704
1738
  "div",
1705
1739
  {
1706
1740
  className: "flex flex-col overflow-hidden",
@@ -1725,7 +1759,7 @@ var PrimitiveInputField = ({
1725
1759
  () => ({ ...spacingStyles, ...style2 }),
1726
1760
  [spacingStyles, style2]
1727
1761
  );
1728
- return /* @__PURE__ */ React17.createElement(
1762
+ return /* @__PURE__ */ React18.createElement(
1729
1763
  "input",
1730
1764
  {
1731
1765
  style: memoizedStyles,
@@ -1740,10 +1774,10 @@ var PrimitiveInputField = ({
1740
1774
  );
1741
1775
  };
1742
1776
  var InputFieldSubcomponents = {
1743
- Root: memo6(InputFieldRoot),
1744
- Input: memo6(InputFieldInput),
1745
- Typeahead: memo6(InputFieldTypeahead),
1746
- NumberInput: memo6(InputFieldNumberInput),
1777
+ Root: memo7(InputFieldRoot),
1778
+ Input: memo7(InputFieldInput),
1779
+ Typeahead: memo7(InputFieldTypeahead),
1780
+ NumberInput: memo7(InputFieldNumberInput),
1747
1781
  DropdownMenu: InputFieldDropdownMenu,
1748
1782
  Button: InputFieldButton,
1749
1783
  PrimitiveElement: PrimitiveInputField
@@ -1766,7 +1800,7 @@ var InputFieldComponent = forwardRef9(
1766
1800
  className,
1767
1801
  ...inputProps
1768
1802
  } = props;
1769
- return /* @__PURE__ */ React17.createElement(
1803
+ return /* @__PURE__ */ React18.createElement(
1770
1804
  InputFieldSubcomponents.Root,
1771
1805
  {
1772
1806
  width,
@@ -1782,7 +1816,7 @@ var InputFieldComponent = forwardRef9(
1782
1816
  style: style2,
1783
1817
  className
1784
1818
  },
1785
- /* @__PURE__ */ React17.createElement(InputFieldSubcomponents.Input, { ref, ...inputProps }),
1819
+ /* @__PURE__ */ React18.createElement(InputFieldSubcomponents.Input, { ref, ...inputProps }),
1786
1820
  children
1787
1821
  );
1788
1822
  }
@@ -1801,7 +1835,7 @@ function createDeferredPromise() {
1801
1835
  });
1802
1836
  return { promise, resolve, reject };
1803
1837
  }
1804
- var DialogContext = createContext3(void 0);
1838
+ var DialogContext = createContext4(void 0);
1805
1839
  var DialogProvider = function DialogProvider2({
1806
1840
  children
1807
1841
  }) {
@@ -1903,7 +1937,7 @@ var DialogProvider = function DialogProvider2({
1903
1937
  if (!dialogRef.current) return false;
1904
1938
  return dialogRef.current.containsElement(element);
1905
1939
  }, []);
1906
- return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(
1940
+ return /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
1907
1941
  DialogContext.Provider,
1908
1942
  {
1909
1943
  value: useMemo7(
@@ -1917,7 +1951,7 @@ var DialogProvider = function DialogProvider2({
1917
1951
  )
1918
1952
  },
1919
1953
  children
1920
- ), /* @__PURE__ */ React18.createElement(
1954
+ ), /* @__PURE__ */ React19.createElement(
1921
1955
  Dialog,
1922
1956
  {
1923
1957
  ref: dialogRef,
@@ -1948,7 +1982,7 @@ var DialogProvider = function DialogProvider2({
1948
1982
  [contents]
1949
1983
  )
1950
1984
  },
1951
- contents?.type === "confirmation" ? /* @__PURE__ */ React18.createElement("div", { className: "flex flex-1 flex-row items-center" }, /* @__PURE__ */ React18.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React18.createElement(
1985
+ contents?.type === "confirmation" ? /* @__PURE__ */ React19.createElement("div", { className: "flex flex-1 flex-row items-center" }, /* @__PURE__ */ React19.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React19.createElement(
1952
1986
  Button,
1953
1987
  {
1954
1988
  onClick: () => {
@@ -1957,7 +1991,7 @@ var DialogProvider = function DialogProvider2({
1957
1991
  }
1958
1992
  },
1959
1993
  contents.cancelButtonLabel ?? "Cancel"
1960
- ), /* @__PURE__ */ React18.createElement(Spacer.Horizontal, { size: 16 }), /* @__PURE__ */ React18.createElement(
1994
+ ), /* @__PURE__ */ React19.createElement(Spacer.Horizontal, { size: 16 }), /* @__PURE__ */ React19.createElement(
1961
1995
  Button,
1962
1996
  {
1963
1997
  onClick: () => {
@@ -1966,7 +2000,7 @@ var DialogProvider = function DialogProvider2({
1966
2000
  }
1967
2001
  },
1968
2002
  contents.confirmButtonLabel ?? "OK"
1969
- )) : contents?.type === "custom" ? /* @__PURE__ */ React18.createElement(React18.Fragment, null, contents.children) : /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(InputField2.Root, null, /* @__PURE__ */ React18.createElement(
2003
+ )) : contents?.type === "custom" ? /* @__PURE__ */ React19.createElement(React19.Fragment, null, contents.children) : /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(InputField2.Root, null, /* @__PURE__ */ React19.createElement(
1970
2004
  InputField2.Input,
1971
2005
  {
1972
2006
  ref: inputRef,
@@ -1982,7 +2016,7 @@ var DialogProvider = function DialogProvider2({
1982
2016
  },
1983
2017
  onKeyDown: handleKeyDown
1984
2018
  }
1985
- )), /* @__PURE__ */ React18.createElement(Spacer.Vertical, { size: 20 }), /* @__PURE__ */ React18.createElement("div", { className: "flex flex-1 flex-row items-center" }, /* @__PURE__ */ React18.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React18.createElement(Button, { onClick: close }, "Cancel"), /* @__PURE__ */ React18.createElement(Spacer.Horizontal, { size: 16 }), /* @__PURE__ */ React18.createElement(
2019
+ )), /* @__PURE__ */ React19.createElement(Spacer.Vertical, { size: 20 }), /* @__PURE__ */ React19.createElement("div", { className: "flex flex-1 flex-row items-center" }, /* @__PURE__ */ React19.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React19.createElement(Button, { onClick: close }, "Cancel"), /* @__PURE__ */ React19.createElement(Spacer.Horizontal, { size: 16 }), /* @__PURE__ */ React19.createElement(
1986
2020
  Button,
1987
2021
  {
1988
2022
  disabled: !contents || contents.type !== "input" || !contents.inputValue,
@@ -1993,7 +2027,7 @@ var DialogProvider = function DialogProvider2({
1993
2027
  ));
1994
2028
  };
1995
2029
  function useDialogContext() {
1996
- const value = useContext3(DialogContext);
2030
+ const value = useContext4(DialogContext);
1997
2031
  if (!value) {
1998
2032
  throw new Error("Missing DialogProvider");
1999
2033
  }
@@ -2014,10 +2048,10 @@ function useOpenDialog() {
2014
2048
 
2015
2049
  // src/contexts/FloatingWindowContext.tsx
2016
2050
  import { uuid } from "@noya-app/noya-utils";
2017
- import React19, { createContext as createContext4, useContext as useContext4, useMemo as useMemo8, useState as useState14 } from "react";
2051
+ import React20, { createContext as createContext5, useContext as useContext5, useMemo as useMemo8, useState as useState14 } from "react";
2018
2052
  import { createPortal } from "react-dom";
2019
- var FloatingWindowContext = createContext4(void 0);
2020
- var CurrentWindowContext = createContext4(void 0);
2053
+ var FloatingWindowContext = createContext5(void 0);
2054
+ var CurrentWindowContext = createContext5(void 0);
2021
2055
  var FloatingWindowProvider = ({
2022
2056
  children
2023
2057
  }) => {
@@ -2027,7 +2061,7 @@ var FloatingWindowProvider = ({
2027
2061
  const id = uuid();
2028
2062
  setWindows((windows2) => ({
2029
2063
  ...windows2,
2030
- [id]: /* @__PURE__ */ React19.createElement(CurrentWindowContext.Provider, { value: { id } }, element)
2064
+ [id]: /* @__PURE__ */ React20.createElement(CurrentWindowContext.Provider, { value: { id } }, element)
2031
2065
  }));
2032
2066
  return id;
2033
2067
  };
@@ -2039,12 +2073,12 @@ var FloatingWindowProvider = ({
2039
2073
  };
2040
2074
  return { createWindow, closeWindow };
2041
2075
  }, []);
2042
- return /* @__PURE__ */ React19.createElement(FloatingWindowContext.Provider, { value: contextValue }, children, Object.entries(windows).map(
2076
+ return /* @__PURE__ */ React20.createElement(FloatingWindowContext.Provider, { value: contextValue }, children, Object.entries(windows).map(
2043
2077
  ([id, element]) => createPortal(element, document.body, id)
2044
2078
  ));
2045
2079
  };
2046
2080
  var useFloatingWindowManager = () => {
2047
- const context = useContext4(FloatingWindowContext);
2081
+ const context = useContext5(FloatingWindowContext);
2048
2082
  if (!context) {
2049
2083
  throw new Error(
2050
2084
  "useFloatingWindow must be used within a FloatingWindowProvider"
@@ -2053,7 +2087,7 @@ var useFloatingWindowManager = () => {
2053
2087
  return context;
2054
2088
  };
2055
2089
  var useCurrentFloatingWindowInternal = () => {
2056
- const context = useContext4(CurrentWindowContext);
2090
+ const context = useContext5(CurrentWindowContext);
2057
2091
  if (!context) {
2058
2092
  throw new Error("useCurrentWindow must be used within a FloatingWindow");
2059
2093
  }
@@ -2061,30 +2095,30 @@ var useCurrentFloatingWindowInternal = () => {
2061
2095
  };
2062
2096
 
2063
2097
  // src/contexts/DesignSystemConfiguration.tsx
2064
- var DesignSystemConfigurationContext = React20.createContext({
2098
+ var DesignSystemConfigurationContext = React21.createContext({
2065
2099
  platform: "key"
2066
2100
  });
2067
- var DesignSystemConfigurationProvider = React20.memo(
2101
+ var DesignSystemConfigurationProvider = React21.memo(
2068
2102
  function DesignSystemConfigurationProvider2({
2069
2103
  children,
2070
2104
  platform
2071
2105
  }) {
2072
- const [internalPlatform, setInternalPlatform] = React20.useState(platform ?? "key");
2073
- React20.useEffect(() => {
2106
+ const [internalPlatform, setInternalPlatform] = React21.useState(platform ?? "key");
2107
+ React21.useEffect(() => {
2074
2108
  if (platform !== void 0) return;
2075
2109
  if (typeof navigator !== "undefined") {
2076
2110
  setInternalPlatform(getCurrentPlatform(navigator));
2077
2111
  }
2078
2112
  }, [platform]);
2079
- const contextValue = React20.useMemo(
2113
+ const contextValue = React21.useMemo(
2080
2114
  () => ({ platform: platform ?? internalPlatform }),
2081
2115
  [platform, internalPlatform]
2082
2116
  );
2083
- return /* @__PURE__ */ React20.createElement(DesignSystemConfigurationContext.Provider, { value: contextValue }, /* @__PURE__ */ React20.createElement(DialogProvider, null, /* @__PURE__ */ React20.createElement(ToastProvider, null, /* @__PURE__ */ React20.createElement(FloatingWindowProvider, null, children))));
2117
+ return /* @__PURE__ */ React21.createElement(DesignSystemConfigurationContext.Provider, { value: contextValue }, /* @__PURE__ */ React21.createElement(DialogProvider, null, /* @__PURE__ */ React21.createElement(ToastProvider, null, /* @__PURE__ */ React21.createElement(FloatingWindowProvider, null, children))));
2084
2118
  }
2085
2119
  );
2086
2120
  function useDesignSystemConfiguration() {
2087
- return React20.useContext(DesignSystemConfigurationContext);
2121
+ return React21.useContext(DesignSystemConfigurationContext);
2088
2122
  }
2089
2123
 
2090
2124
  // src/utils/withSeparatorElements.ts
@@ -2144,7 +2178,7 @@ var getMenuItemKey = (item, index) => {
2144
2178
  }
2145
2179
  };
2146
2180
  var CHECKBOX_WIDTH = 15;
2147
- var CHECKBOX_RIGHT_INSET = 8;
2181
+ var CHECKBOX_RIGHT_INSET = 6;
2148
2182
  var CHECKBOX_INDENT_WIDTH = 6;
2149
2183
  var styles = {
2150
2184
  separatorStyle: "h-px bg-divider mx-3 my-1",
@@ -2181,7 +2215,7 @@ function getKeyboardShortcutsForMenuItems(menuItems, onSelect) {
2181
2215
  var ShortcutElement = ({
2182
2216
  children,
2183
2217
  fixedWidth
2184
- }) => /* @__PURE__ */ React21.createElement(
2218
+ }) => /* @__PURE__ */ React22.createElement(
2185
2219
  "kbd",
2186
2220
  {
2187
2221
  className: cx(
@@ -2192,12 +2226,12 @@ var ShortcutElement = ({
2192
2226
  },
2193
2227
  children
2194
2228
  );
2195
- var KeyboardShortcut = memo8(function KeyboardShortcut2({
2229
+ var KeyboardShortcut = memo9(function KeyboardShortcut2({
2196
2230
  shortcut
2197
2231
  }) {
2198
2232
  const platform = useDesignSystemConfiguration().platform;
2199
2233
  const { keys, separator: separator2 } = getShortcutDisplayParts(shortcut, platform);
2200
- const keyElements = keys.map((key) => /* @__PURE__ */ React21.createElement(
2234
+ const keyElements = keys.map((key) => /* @__PURE__ */ React22.createElement(
2201
2235
  ShortcutElement,
2202
2236
  {
2203
2237
  key,
@@ -2205,19 +2239,19 @@ var KeyboardShortcut = memo8(function KeyboardShortcut2({
2205
2239
  },
2206
2240
  key
2207
2241
  ));
2208
- return /* @__PURE__ */ React21.createElement(React21.Fragment, null, separator2 ? withSeparatorElements(
2242
+ return /* @__PURE__ */ React22.createElement(React22.Fragment, null, separator2 ? withSeparatorElements(
2209
2243
  keyElements,
2210
- /* @__PURE__ */ React21.createElement(ShortcutElement, null, separator2)
2244
+ /* @__PURE__ */ React22.createElement(ShortcutElement, null, separator2)
2211
2245
  ) : keyElements);
2212
2246
  });
2213
- var SectionHeader = memo8(function SectionHeader2({
2247
+ var SectionHeader = memo9(function SectionHeader2({
2214
2248
  title,
2215
2249
  variant = "normal",
2216
2250
  id,
2217
2251
  isFirst,
2218
2252
  indented
2219
2253
  }) {
2220
- return /* @__PURE__ */ React21.createElement(
2254
+ return /* @__PURE__ */ React22.createElement(
2221
2255
  "span",
2222
2256
  {
2223
2257
  id,
@@ -2232,7 +2266,7 @@ var SectionHeader = memo8(function SectionHeader2({
2232
2266
  }
2233
2267
  )
2234
2268
  },
2235
- indented && /* @__PURE__ */ React21.createElement(
2269
+ indented && /* @__PURE__ */ React22.createElement(
2236
2270
  Spacer.Horizontal,
2237
2271
  {
2238
2272
  size: CHECKBOX_WIDTH - CHECKBOX_RIGHT_INSET + CHECKBOX_INDENT_WIDTH
@@ -2244,12 +2278,11 @@ var SectionHeader = memo8(function SectionHeader2({
2244
2278
 
2245
2279
  // src/components/internal/MenuViewport.tsx
2246
2280
  import { ChevronRightIcon } from "@noya-app/noya-icons";
2247
- import React23 from "react";
2281
+ import React24 from "react";
2248
2282
 
2249
2283
  // src/components/internal/SelectItem.tsx
2250
- import { CheckIcon } from "@noya-app/noya-icons";
2251
- import React22, { useCallback as useCallback14 } from "react";
2252
- var SelectItem = React22.forwardRef(
2284
+ import React23, { useCallback as useCallback14 } from "react";
2285
+ var SelectItem = React23.forwardRef(
2253
2286
  ({
2254
2287
  children,
2255
2288
  icon,
@@ -2274,7 +2307,7 @@ var SelectItem = React22.forwardRef(
2274
2307
  []
2275
2308
  );
2276
2309
  if (checked && Components4.CheckboxItem) {
2277
- return /* @__PURE__ */ React22.createElement("div", { className: "px-1" }, /* @__PURE__ */ React22.createElement(
2310
+ return /* @__PURE__ */ React23.createElement("div", { className: "px-1" }, /* @__PURE__ */ React23.createElement(
2278
2311
  Components4.CheckboxItem,
2279
2312
  {
2280
2313
  checked,
@@ -2286,14 +2319,14 @@ var SelectItem = React22.forwardRef(
2286
2319
  testSelected && styles.testSelectedItemStyle
2287
2320
  )
2288
2321
  },
2289
- /* @__PURE__ */ React22.createElement(Spacer.Horizontal, { size: CHECKBOX_INDENT_WIDTH }),
2290
- Components4.ItemIndicator && /* @__PURE__ */ React22.createElement(Components4.ItemIndicator, { ...styles.itemIndicator }, /* @__PURE__ */ React22.createElement(CheckIcon, null)),
2291
- icon && /* @__PURE__ */ React22.createElement(React22.Fragment, null, renderIcon(icon), /* @__PURE__ */ React22.createElement(Spacer.Horizontal, { size: 8 })),
2322
+ /* @__PURE__ */ React23.createElement(Spacer.Horizontal, { size: CHECKBOX_INDENT_WIDTH }),
2323
+ Components4.ItemIndicator && /* @__PURE__ */ React23.createElement(Components4.ItemIndicator, { ...styles.itemIndicator }, /* @__PURE__ */ React23.createElement(Checkmark, null)),
2324
+ icon && /* @__PURE__ */ React23.createElement(React23.Fragment, null, renderIcon(icon), /* @__PURE__ */ React23.createElement(Spacer.Horizontal, { size: 8 })),
2292
2325
  children,
2293
- shortcut && /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React22.createElement(Spacer.Horizontal, { size: 24 }), /* @__PURE__ */ React22.createElement(KeyboardShortcut, { shortcut }))
2326
+ shortcut && /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React23.createElement(Spacer.Horizontal, { size: 24 }), /* @__PURE__ */ React23.createElement(KeyboardShortcut, { shortcut }))
2294
2327
  ));
2295
2328
  }
2296
- return /* @__PURE__ */ React22.createElement("div", { className: "px-1" }, /* @__PURE__ */ React22.createElement(
2329
+ return /* @__PURE__ */ React23.createElement("div", { className: "px-1" }, /* @__PURE__ */ React23.createElement(
2297
2330
  Components4.Item,
2298
2331
  {
2299
2332
  className: cx(
@@ -2308,10 +2341,34 @@ var SelectItem = React22.forwardRef(
2308
2341
  onSelect: handleSelectItem,
2309
2342
  ...props
2310
2343
  },
2311
- /* @__PURE__ */ React22.createElement("div", { className: "flex flex-1 items-center" }, indented && /* @__PURE__ */ React22.createElement(Spacer.Horizontal, { size: CHECKBOX_INDENT_WIDTH }), checked ? /* @__PURE__ */ React22.createElement("div", { ...styles.itemIndicator }, /* @__PURE__ */ React22.createElement(CheckIcon, null)) : indented ? /* @__PURE__ */ React22.createElement(Spacer.Horizontal, { size: CHECKBOX_WIDTH - CHECKBOX_RIGHT_INSET }) : null, icon && /* @__PURE__ */ React22.createElement(React22.Fragment, null, renderIcon(icon), /* @__PURE__ */ React22.createElement(Spacer.Horizontal, { size: 8 })), /* @__PURE__ */ React22.createElement(Components4.ItemText, null, children), shortcut && /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React22.createElement(Spacer.Horizontal, { size: 24 }), /* @__PURE__ */ React22.createElement(KeyboardShortcut, { shortcut })))
2344
+ /* @__PURE__ */ React23.createElement("div", { className: "flex flex-1 items-center" }, indented && /* @__PURE__ */ React23.createElement(Spacer.Horizontal, { size: CHECKBOX_INDENT_WIDTH }), checked ? /* @__PURE__ */ React23.createElement("div", { ...styles.itemIndicator }, /* @__PURE__ */ React23.createElement(Checkmark, null)) : indented ? /* @__PURE__ */ React23.createElement(Spacer.Horizontal, { size: CHECKBOX_WIDTH - CHECKBOX_RIGHT_INSET }) : null, icon && /* @__PURE__ */ React23.createElement(React23.Fragment, null, renderIcon(icon), /* @__PURE__ */ React23.createElement(Spacer.Horizontal, { size: 8 })), /* @__PURE__ */ React23.createElement(Components4.ItemText, null, children), shortcut && /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React23.createElement(Spacer.Horizontal, { size: 24 }), /* @__PURE__ */ React23.createElement(KeyboardShortcut, { shortcut })))
2312
2345
  ));
2313
2346
  }
2314
2347
  );
2348
+ function Checkmark() {
2349
+ return /* @__PURE__ */ React23.createElement(
2350
+ "svg",
2351
+ {
2352
+ viewBox: "0 0 15 15",
2353
+ fill: "none",
2354
+ xmlns: "http://www.w3.org/2000/svg",
2355
+ "aria-hidden": "true",
2356
+ width: 15,
2357
+ height: 15
2358
+ },
2359
+ /* @__PURE__ */ React23.createElement(
2360
+ "path",
2361
+ {
2362
+ className: "scale-90 origin-center",
2363
+ d: "M3 8L6 11L12 5",
2364
+ strokeWidth: "1.1",
2365
+ strokeLinecap: "round",
2366
+ strokeLinejoin: "round",
2367
+ stroke: "currentColor"
2368
+ }
2369
+ )
2370
+ );
2371
+ }
2315
2372
 
2316
2373
  // src/components/internal/MenuViewport.tsx
2317
2374
  var MenuViewport = ({
@@ -2319,13 +2376,14 @@ var MenuViewport = ({
2319
2376
  Components: Components4,
2320
2377
  onSelect
2321
2378
  }) => {
2379
+ const portalScopeId = usePortalScopeId();
2322
2380
  const hasCheckedItem = items.some(
2323
2381
  (item) => item.type !== "separator" && item.type !== "sectionHeader" && item.checked
2324
2382
  );
2325
- return /* @__PURE__ */ React23.createElement(React23.Fragment, null, items.map((item, index) => {
2383
+ return /* @__PURE__ */ React24.createElement(React24.Fragment, null, items.map((item, index) => {
2326
2384
  switch (item.type) {
2327
2385
  case "separator":
2328
- return /* @__PURE__ */ React23.createElement(
2386
+ return /* @__PURE__ */ React24.createElement(
2329
2387
  Components4.Separator,
2330
2388
  {
2331
2389
  key: index,
@@ -2333,7 +2391,7 @@ var MenuViewport = ({
2333
2391
  }
2334
2392
  );
2335
2393
  case "sectionHeader":
2336
- return /* @__PURE__ */ React23.createElement(
2394
+ return /* @__PURE__ */ React24.createElement(
2337
2395
  SectionHeader,
2338
2396
  {
2339
2397
  isFirst: index === 0,
@@ -2344,7 +2402,7 @@ var MenuViewport = ({
2344
2402
  );
2345
2403
  case "submenu":
2346
2404
  if (item.items && Components4.Sub && Components4.SubTrigger && Components4.SubContent && Components4.Portal) {
2347
- return /* @__PURE__ */ React23.createElement(Components4.Sub, { key: item.id }, /* @__PURE__ */ React23.createElement(
2405
+ return /* @__PURE__ */ React24.createElement(Components4.Sub, { key: item.id }, /* @__PURE__ */ React24.createElement(
2348
2406
  Components4.SubTrigger,
2349
2407
  {
2350
2408
  className: cx(
@@ -2355,9 +2413,10 @@ var MenuViewport = ({
2355
2413
  onClick: (e) => {
2356
2414
  e.stopPropagation();
2357
2415
  e.preventDefault();
2358
- }
2416
+ },
2417
+ disabled: item.disabled
2359
2418
  },
2360
- /* @__PURE__ */ React23.createElement(
2419
+ /* @__PURE__ */ React24.createElement(
2361
2420
  SelectItem,
2362
2421
  {
2363
2422
  value: item.id,
@@ -2368,16 +2427,17 @@ var MenuViewport = ({
2368
2427
  indented: hasCheckedItem,
2369
2428
  disabled: item.disabled
2370
2429
  },
2371
- /* @__PURE__ */ React23.createElement("div", { className: "flex items-center flex-1" }, item.title),
2372
- /* @__PURE__ */ React23.createElement(ChevronRightIcon, { className: "-mr-1" })
2430
+ /* @__PURE__ */ React24.createElement("div", { className: "flex items-center flex-1" }, item.title),
2431
+ /* @__PURE__ */ React24.createElement(ChevronRightIcon, { className: "-mr-1" })
2373
2432
  )
2374
- ), /* @__PURE__ */ React23.createElement(Components4.Portal, null, /* @__PURE__ */ React23.createElement(
2433
+ ), /* @__PURE__ */ React24.createElement(Components4.Portal, null, /* @__PURE__ */ React24.createElement(
2375
2434
  Components4.SubContent,
2376
2435
  {
2436
+ ...portalScopeProps(portalScopeId),
2377
2437
  alignOffset: -5,
2378
2438
  className: styles.contentStyle
2379
2439
  },
2380
- /* @__PURE__ */ React23.createElement(
2440
+ /* @__PURE__ */ React24.createElement(
2381
2441
  MenuViewport,
2382
2442
  {
2383
2443
  items: item.items,
@@ -2388,7 +2448,7 @@ var MenuViewport = ({
2388
2448
  )));
2389
2449
  } else return null;
2390
2450
  default:
2391
- return /* @__PURE__ */ React23.createElement(
2451
+ return /* @__PURE__ */ React24.createElement(
2392
2452
  SelectItem,
2393
2453
  {
2394
2454
  key: item.value,
@@ -2411,7 +2471,7 @@ var MenuViewport = ({
2411
2471
  // src/components/DropdownMenu.tsx
2412
2472
  var Components = {
2413
2473
  Separator: RadixDropdownMenu.Separator,
2414
- ItemText: React24.Fragment,
2474
+ ItemText: React25.Fragment,
2415
2475
  Item: RadixDropdownMenu.Item,
2416
2476
  CheckboxItem: RadixDropdownMenu.CheckboxItem,
2417
2477
  ItemIndicator: RadixDropdownMenu.ItemIndicator,
@@ -2437,6 +2497,7 @@ var DropdownMenuRoot = forwardRefGeneric(function DropdownMenuRoot2(props, forwa
2437
2497
  emptyState,
2438
2498
  contentStyle
2439
2499
  } = props;
2500
+ const portalScopeId = usePortalScopeId();
2440
2501
  const keymap = useMemo10(
2441
2502
  () => shouldBindKeyboardShortcuts === false ? {} : getKeyboardShortcutsForMenuItems(items, onSelect),
2442
2503
  [items, onSelect, shouldBindKeyboardShortcuts]
@@ -2450,16 +2511,17 @@ var DropdownMenuRoot = forwardRefGeneric(function DropdownMenuRoot2(props, forwa
2450
2511
  }),
2451
2512
  [contentStyle]
2452
2513
  );
2453
- return /* @__PURE__ */ React24.createElement(RadixDropdownMenu.Root, { onOpenChange, open }, /* @__PURE__ */ React24.createElement(
2514
+ return /* @__PURE__ */ React25.createElement(RadixDropdownMenu.Root, { onOpenChange, open }, /* @__PURE__ */ React25.createElement(
2454
2515
  RadixDropdownMenu.Trigger,
2455
2516
  {
2456
2517
  ref: forwardedRef,
2457
2518
  asChild: true
2458
2519
  },
2459
2520
  children
2460
- ), /* @__PURE__ */ React24.createElement(RadixDropdownMenu.Portal, null, /* @__PURE__ */ React24.createElement(
2521
+ ), /* @__PURE__ */ React25.createElement(RadixDropdownMenu.Portal, null, /* @__PURE__ */ React25.createElement(
2461
2522
  RadixDropdownMenu.Content,
2462
2523
  {
2524
+ ...portalScopeProps(portalScopeId),
2463
2525
  className: styles.contentStyle,
2464
2526
  side,
2465
2527
  sideOffset,
@@ -2470,7 +2532,7 @@ var DropdownMenuRoot = forwardRefGeneric(function DropdownMenuRoot2(props, forwa
2470
2532
  ...{ onCloseAutoFocus }
2471
2533
  },
2472
2534
  items.length === 0 ? emptyState : null,
2473
- /* @__PURE__ */ React24.createElement(
2535
+ /* @__PURE__ */ React25.createElement(
2474
2536
  MenuViewport,
2475
2537
  {
2476
2538
  items,
@@ -2501,14 +2563,14 @@ var ActionMenu = memoGeneric(function ActionMenu2({
2501
2563
  ...style2
2502
2564
  };
2503
2565
  }, [selected, style2, variant]);
2504
- return /* @__PURE__ */ React25.createElement(
2566
+ return /* @__PURE__ */ React26.createElement(
2505
2567
  DropdownMenu,
2506
2568
  {
2507
2569
  items: menuItems,
2508
2570
  onSelect,
2509
2571
  onOpenChange
2510
2572
  },
2511
- /* @__PURE__ */ React25.createElement(
2573
+ /* @__PURE__ */ React26.createElement(
2512
2574
  IconButton,
2513
2575
  {
2514
2576
  style: internalStyle,
@@ -2522,16 +2584,16 @@ var ActionMenu = memoGeneric(function ActionMenu2({
2522
2584
  });
2523
2585
 
2524
2586
  // src/components/ActivityIndicator.tsx
2525
- import * as React26 from "react";
2526
- var ActivityIndicator = React26.memo(function ActivityIndicator2({
2587
+ import * as React27 from "react";
2588
+ var ActivityIndicator = React27.memo(function ActivityIndicator2({
2527
2589
  size: size2 = 16,
2528
2590
  opacity = 1,
2529
2591
  color = "black",
2530
2592
  trackColor = "rgba(0, 0, 0, 0.1)",
2531
2593
  className
2532
2594
  }) {
2533
- const opacityStyle = React26.useMemo(() => ({ opacity }), [opacity]);
2534
- const dynamicStyles = React26.useMemo(
2595
+ const opacityStyle = React27.useMemo(() => ({ opacity }), [opacity]);
2596
+ const dynamicStyles = React27.useMemo(
2535
2597
  () => ({
2536
2598
  border: `2px solid ${trackColor}`,
2537
2599
  borderTopColor: color,
@@ -2540,19 +2602,19 @@ var ActivityIndicator = React26.memo(function ActivityIndicator2({
2540
2602
  }),
2541
2603
  [size2, color, trackColor]
2542
2604
  );
2543
- return /* @__PURE__ */ React26.createElement(
2605
+ return /* @__PURE__ */ React27.createElement(
2544
2606
  "div",
2545
2607
  {
2546
2608
  className: cx("flex justify-center items-center", className),
2547
2609
  style: opacityStyle
2548
2610
  },
2549
- /* @__PURE__ */ React26.createElement("div", { style: dynamicStyles, className: "animate-spin rounded-[50%]" })
2611
+ /* @__PURE__ */ React27.createElement("div", { style: dynamicStyles, className: "animate-spin rounded-[50%]" })
2550
2612
  );
2551
2613
  });
2552
2614
 
2553
2615
  // src/components/Avatar.tsx
2554
2616
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
2555
- import React27, { forwardRef as forwardRef10, useMemo as useMemo13 } from "react";
2617
+ import React28, { forwardRef as forwardRef10, useMemo as useMemo13 } from "react";
2556
2618
 
2557
2619
  // src/utils/colorFromString.ts
2558
2620
  var colorForStringValues = {
@@ -2621,7 +2683,7 @@ var getInnerAvatarStyles = (size2, variant) => {
2621
2683
  minHeight: dimension
2622
2684
  };
2623
2685
  };
2624
- var AvatarRoot = React27.forwardRef(
2686
+ var AvatarRoot = React28.forwardRef(
2625
2687
  ({
2626
2688
  className,
2627
2689
  size: size2 = 21,
@@ -2640,7 +2702,7 @@ var AvatarRoot = React27.forwardRef(
2640
2702
  }),
2641
2703
  [backgroundColor, size2, style2]
2642
2704
  );
2643
- return /* @__PURE__ */ React27.createElement(
2705
+ return /* @__PURE__ */ React28.createElement(
2644
2706
  AvatarPrimitive.Root,
2645
2707
  {
2646
2708
  ref,
@@ -2655,8 +2717,8 @@ var AvatarRoot = React27.forwardRef(
2655
2717
  );
2656
2718
  }
2657
2719
  );
2658
- var AvatarImage = React27.forwardRef(({ className, size: size2 = 21, variant = "normal", ...props }, ref) => {
2659
- return /* @__PURE__ */ React27.createElement(
2720
+ var AvatarImage = React28.forwardRef(({ className, size: size2 = 21, variant = "normal", ...props }, ref) => {
2721
+ return /* @__PURE__ */ React28.createElement(
2660
2722
  AvatarPrimitive.Image,
2661
2723
  {
2662
2724
  ref,
@@ -2672,9 +2734,9 @@ var AvatarImage = React27.forwardRef(({ className, size: size2 = 21, variant = "
2672
2734
  function getMonogram(text) {
2673
2735
  return text?.at(0)?.toLocaleUpperCase();
2674
2736
  }
2675
- var AvatarFallback = React27.forwardRef(
2737
+ var AvatarFallback = React28.forwardRef(
2676
2738
  ({ className, children, style: style2, size: size2 = 21, backgroundColor, ...props }, ref) => {
2677
- return /* @__PURE__ */ React27.createElement(
2739
+ return /* @__PURE__ */ React28.createElement(
2678
2740
  AvatarPrimitive.Fallback,
2679
2741
  {
2680
2742
  ref,
@@ -2695,7 +2757,7 @@ var AvatarFallback = React27.forwardRef(
2695
2757
  );
2696
2758
  }
2697
2759
  );
2698
- var Avatar = React27.memo(
2760
+ var Avatar = React28.memo(
2699
2761
  forwardRef10(function Avatar2({
2700
2762
  image,
2701
2763
  name,
@@ -2708,7 +2770,7 @@ var Avatar = React27.memo(
2708
2770
  ...props
2709
2771
  }, forwardedRef) {
2710
2772
  const getBackgroundColor = backgroundColor ?? colorFromString(userId ?? name ?? "");
2711
- return /* @__PURE__ */ React27.createElement(
2773
+ return /* @__PURE__ */ React28.createElement(
2712
2774
  AvatarRoot,
2713
2775
  {
2714
2776
  ref: forwardedRef,
@@ -2718,7 +2780,7 @@ var Avatar = React27.memo(
2718
2780
  className,
2719
2781
  ...props
2720
2782
  },
2721
- image ? /* @__PURE__ */ React27.createElement(AvatarImage, { src: image, alt: name, size: size2, variant }) : /* @__PURE__ */ React27.createElement(
2783
+ image ? /* @__PURE__ */ React28.createElement(AvatarImage, { src: image, alt: name, size: size2, variant }) : /* @__PURE__ */ React28.createElement(
2722
2784
  AvatarFallback,
2723
2785
  {
2724
2786
  backgroundColor: getBackgroundColor,
@@ -2730,31 +2792,31 @@ var Avatar = React27.memo(
2730
2792
  );
2731
2793
  })
2732
2794
  );
2733
- var OverflowAvatar = React27.memo(function OverflowAvatar2({
2795
+ var OverflowAvatar = React28.memo(function OverflowAvatar2({
2734
2796
  size: size2 = 21,
2735
2797
  count
2736
2798
  }) {
2737
- return /* @__PURE__ */ React27.createElement(AvatarRoot, { size: size2, backgroundColor: "var(--n-text-disabled)", disabled: true }, /* @__PURE__ */ React27.createElement(AvatarFallback, { backgroundColor: "var(--n-text-disabled)", size: size2 }, "+", count));
2799
+ return /* @__PURE__ */ React28.createElement(AvatarRoot, { size: size2, backgroundColor: "var(--n-text-disabled)", disabled: true }, /* @__PURE__ */ React28.createElement(AvatarFallback, { backgroundColor: "var(--n-text-disabled)", size: size2 }, "+", count));
2738
2800
  });
2739
- var AvatarStack = React27.memo(function AvatarStack2({
2801
+ var AvatarStack = React28.memo(function AvatarStack2({
2740
2802
  size: size2 = 21,
2741
2803
  children,
2742
2804
  max = 3,
2743
2805
  className
2744
2806
  }) {
2745
- const avatarCount = React27.Children.count(children);
2807
+ const avatarCount = React28.Children.count(children);
2746
2808
  const overflowCount = avatarCount - max;
2747
2809
  const childrenArray = useMemo13(() => {
2748
- const processedChildren = React27.Children.toArray(children).map((child) => React27.cloneElement(child, { size: size2 })).slice(0, max);
2810
+ const processedChildren = React28.Children.toArray(children).map((child) => React28.cloneElement(child, { size: size2 })).slice(0, max);
2749
2811
  if (avatarCount > max) {
2750
2812
  return [
2751
- /* @__PURE__ */ React27.createElement(OverflowAvatar, { key: "overflow", size: size2, count: overflowCount }),
2813
+ /* @__PURE__ */ React28.createElement(OverflowAvatar, { key: "overflow", size: size2, count: overflowCount }),
2752
2814
  ...processedChildren
2753
2815
  ];
2754
2816
  }
2755
2817
  return processedChildren;
2756
2818
  }, [children, max, size2, avatarCount, overflowCount]);
2757
- return /* @__PURE__ */ React27.createElement(
2819
+ return /* @__PURE__ */ React28.createElement(
2758
2820
  "div",
2759
2821
  {
2760
2822
  className: cx(
@@ -2764,7 +2826,7 @@ var AvatarStack = React27.memo(function AvatarStack2({
2764
2826
  )
2765
2827
  },
2766
2828
  childrenArray.map((child, index) => {
2767
- return /* @__PURE__ */ React27.createElement(
2829
+ return /* @__PURE__ */ React28.createElement(
2768
2830
  "div",
2769
2831
  {
2770
2832
  className: cx("relative", size2 > 36 ? "-ml-3" : "-ml-1.5"),
@@ -2777,10 +2839,10 @@ var AvatarStack = React27.memo(function AvatarStack2({
2777
2839
  });
2778
2840
 
2779
2841
  // src/components/NoyaLogo.tsx
2780
- import React28, { forwardRef as forwardRef11 } from "react";
2842
+ import React29, { forwardRef as forwardRef11 } from "react";
2781
2843
  var Logo = forwardRef11(function Logo2(props, ref) {
2782
2844
  const fill = props.fill || cssVars.colors.logoFill;
2783
- return /* @__PURE__ */ React28.createElement(
2845
+ return /* @__PURE__ */ React29.createElement(
2784
2846
  "svg",
2785
2847
  {
2786
2848
  ref,
@@ -2790,14 +2852,14 @@ var Logo = forwardRef11(function Logo2(props, ref) {
2790
2852
  ...props,
2791
2853
  className: "w-6 aspect-[24/26]"
2792
2854
  },
2793
- /* @__PURE__ */ React28.createElement(
2855
+ /* @__PURE__ */ React29.createElement(
2794
2856
  "path",
2795
2857
  {
2796
2858
  d: "M6.5 3H2V12H5V6H6.5C7.32843 6 8 6.67157 8 7.5V12H11V7.5C11 5.01472 8.98528 3 6.5 3Z",
2797
2859
  fill
2798
2860
  }
2799
2861
  ),
2800
- /* @__PURE__ */ React28.createElement(
2862
+ /* @__PURE__ */ React29.createElement(
2801
2863
  "path",
2802
2864
  {
2803
2865
  fillRule: "evenodd",
@@ -2806,14 +2868,14 @@ var Logo = forwardRef11(function Logo2(props, ref) {
2806
2868
  fill
2807
2869
  }
2808
2870
  ),
2809
- /* @__PURE__ */ React28.createElement(
2871
+ /* @__PURE__ */ React29.createElement(
2810
2872
  "path",
2811
2873
  {
2812
2874
  d: "M5 14H2V18.5C2 20.9853 4.01472 23 6.5 23H8V26H11V17H8V20H6.5C5.67157 20 5 19.3284 5 18.5V14Z",
2813
2875
  fill
2814
2876
  }
2815
2877
  ),
2816
- /* @__PURE__ */ React28.createElement(
2878
+ /* @__PURE__ */ React29.createElement(
2817
2879
  "path",
2818
2880
  {
2819
2881
  fillRule: "evenodd",
@@ -2826,12 +2888,12 @@ var Logo = forwardRef11(function Logo2(props, ref) {
2826
2888
  });
2827
2889
 
2828
2890
  // src/components/ai-assistant/AIAssistantLayout.tsx
2829
- import React30, { forwardRef as forwardRef13 } from "react";
2891
+ import React31, { forwardRef as forwardRef13 } from "react";
2830
2892
 
2831
2893
  // src/components/TextArea.tsx
2832
- import React29, {
2894
+ import React30, {
2833
2895
  forwardRef as forwardRef12,
2834
- memo as memo10,
2896
+ memo as memo11,
2835
2897
  useCallback as useCallback15,
2836
2898
  useEffect as useEffect11,
2837
2899
  useRef as useRef12
@@ -2846,7 +2908,7 @@ var useAutoResize = (value) => {
2846
2908
  }, [value]);
2847
2909
  return textareaRef;
2848
2910
  };
2849
- var TextArea = memo10(
2911
+ var TextArea = memo11(
2850
2912
  forwardRef12(function TextArea2({
2851
2913
  value,
2852
2914
  onChangeText,
@@ -2875,7 +2937,7 @@ var TextArea = memo10(
2875
2937
  },
2876
2938
  [autoResize, autoResizeRef, forwardedRef]
2877
2939
  );
2878
- return /* @__PURE__ */ React29.createElement(
2940
+ return /* @__PURE__ */ React30.createElement(
2879
2941
  "textarea",
2880
2942
  {
2881
2943
  className: cx(
@@ -2891,7 +2953,7 @@ var TextArea = memo10(
2891
2953
  );
2892
2954
  })
2893
2955
  );
2894
- var TextAreaRow = memo10(
2956
+ var TextAreaRow = memo11(
2895
2957
  forwardRef12(function TextAreaRow2({
2896
2958
  className,
2897
2959
  textAreaClassName,
@@ -2900,31 +2962,31 @@ var TextAreaRow = memo10(
2900
2962
  endClassName,
2901
2963
  ...rest
2902
2964
  }, forwardedRef) {
2903
- return /* @__PURE__ */ React29.createElement(
2965
+ return /* @__PURE__ */ React30.createElement(
2904
2966
  "div",
2905
2967
  {
2906
2968
  ref: forwardedRef,
2907
2969
  className: cx("relative w-full h-full", className)
2908
2970
  },
2909
- /* @__PURE__ */ React29.createElement(TextArea, { className: textAreaClassName, ...rest, ref: textAreaRef }),
2910
- /* @__PURE__ */ React29.createElement("div", { className: cx("absolute right-1 top-4", endClassName) }, end)
2971
+ /* @__PURE__ */ React30.createElement(TextArea, { className: textAreaClassName, ...rest, ref: textAreaRef }),
2972
+ /* @__PURE__ */ React30.createElement("div", { className: cx("absolute right-1 top-4", endClassName) }, end)
2911
2973
  );
2912
2974
  })
2913
2975
  );
2914
2976
 
2915
2977
  // src/components/ai-assistant/AIAssistantLayout.tsx
2916
2978
  var AIAssistantLoadingIndicator = () => {
2917
- return /* @__PURE__ */ React30.createElement("div", { className: "flex gap-2" }, /* @__PURE__ */ React30.createElement(
2979
+ return /* @__PURE__ */ React31.createElement("div", { className: "flex gap-2" }, /* @__PURE__ */ React31.createElement(
2918
2980
  Avatar,
2919
2981
  {
2920
2982
  name: "Assistant",
2921
2983
  size: INPUT_HEIGHT,
2922
2984
  backgroundColor: cssVars.colors.primaryPastel
2923
2985
  },
2924
- /* @__PURE__ */ React30.createElement(Logo, { style: { width: 15 }, fill: cssVars.colors.primary })
2925
- ), /* @__PURE__ */ React30.createElement("div", { className: "animate-pulse" }, "\u258B"));
2986
+ /* @__PURE__ */ React31.createElement(Logo, { style: { width: 15 }, fill: cssVars.colors.primary })
2987
+ ), /* @__PURE__ */ React31.createElement("div", { className: "animate-pulse" }, "\u258B"));
2926
2988
  };
2927
- var AIAssistantInput = forwardRef13(({ value, onChange, onSubmitClick, onKeyDown, disabled }, ref) => /* @__PURE__ */ React30.createElement(
2989
+ var AIAssistantInput = forwardRef13(({ value, onChange, onSubmitClick, onKeyDown, disabled }, ref) => /* @__PURE__ */ React31.createElement(
2928
2990
  TextAreaRow,
2929
2991
  {
2930
2992
  autoResize: true,
@@ -2936,7 +2998,7 @@ var AIAssistantInput = forwardRef13(({ value, onChange, onSubmitClick, onKeyDown
2936
2998
  placeholder: "Tell me what you'd like to do...",
2937
2999
  onKeyDown,
2938
3000
  disabled,
2939
- end: /* @__PURE__ */ React30.createElement(
3001
+ end: /* @__PURE__ */ React31.createElement(
2940
3002
  IconButton,
2941
3003
  {
2942
3004
  iconName: "ArrowUpIcon",
@@ -2961,13 +3023,13 @@ var AIAssistantLayout = forwardRef13(
2961
3023
  className,
2962
3024
  style: style2
2963
3025
  }, ref) => {
2964
- return /* @__PURE__ */ React30.createElement("div", { className: cx("flex flex-col flex-1", className), style: style2 }, /* @__PURE__ */ React30.createElement("div", { className: "flex-1 min-h-0 overflow-auto", ref }, /* @__PURE__ */ React30.createElement("div", { className: "flex flex-col gap-2 pb-4 pt-1" }, renderMessages(), isLoading ? renderLoadingIndicator?.() : null)), /* @__PURE__ */ React30.createElement("div", { className: "border-t border-divider pt-1 px-1" }, renderInput()));
3026
+ return /* @__PURE__ */ React31.createElement("div", { className: cx("flex flex-col flex-1", className), style: style2 }, /* @__PURE__ */ React31.createElement("div", { className: "flex-1 min-h-0 overflow-auto", ref }, /* @__PURE__ */ React31.createElement("div", { className: "flex flex-col gap-2 pb-4 pt-1" }, renderMessages(), isLoading ? renderLoadingIndicator?.() : null)), /* @__PURE__ */ React31.createElement("div", { className: "border-t border-divider pt-1 px-1" }, renderInput()));
2965
3027
  }
2966
3028
  );
2967
3029
 
2968
3030
  // src/components/AnimatePresence.tsx
2969
3031
  import { isDeepEqual as isDeepEqual3 } from "@noya-app/noya-utils";
2970
- import React31, {
3032
+ import React32, {
2971
3033
  Children as Children2,
2972
3034
  isValidElement as isValidElement2,
2973
3035
  useCallback as useCallback16,
@@ -3047,7 +3109,7 @@ var PresenceChild = ({
3047
3109
  if (animationState === "exited" && !isPresent) {
3048
3110
  return null;
3049
3111
  }
3050
- return /* @__PURE__ */ React31.createElement("div", { style: mergedAnimationStyles[animationState], className }, children);
3112
+ return /* @__PURE__ */ React32.createElement("div", { style: mergedAnimationStyles[animationState], className }, children);
3051
3113
  };
3052
3114
  var AnimatePresence = ({
3053
3115
  children,
@@ -3122,7 +3184,7 @@ var AnimatePresence = ({
3122
3184
  return filtered;
3123
3185
  });
3124
3186
  }, []);
3125
- return /* @__PURE__ */ React31.createElement(React31.Fragment, null, mountedChildren.map(({ child, isPresent, skipInitialAnimation: skipInitialAnimation2 }) => /* @__PURE__ */ React31.createElement(
3187
+ return /* @__PURE__ */ React32.createElement(React32.Fragment, null, mountedChildren.map(({ child, isPresent, skipInitialAnimation: skipInitialAnimation2 }) => /* @__PURE__ */ React32.createElement(
3126
3188
  PresenceChild,
3127
3189
  {
3128
3190
  key: child.key,
@@ -3138,13 +3200,13 @@ var AnimatePresence = ({
3138
3200
  };
3139
3201
 
3140
3202
  // src/components/Banner.tsx
3141
- import React32 from "react";
3203
+ import React33 from "react";
3142
3204
  var bannerStyles = {
3143
3205
  backgroundColor: cssVars.colors.inputBackground,
3144
3206
  color: cssVars.colors.textDisabled
3145
3207
  };
3146
3208
  function Banner({ label = "No items", className, style: style2 }) {
3147
- return /* @__PURE__ */ React32.createElement(
3209
+ return /* @__PURE__ */ React33.createElement(
3148
3210
  "div",
3149
3211
  {
3150
3212
  className: cx(
@@ -3153,15 +3215,15 @@ function Banner({ label = "No items", className, style: style2 }) {
3153
3215
  ),
3154
3216
  style: { ...bannerStyles, ...style2 }
3155
3217
  },
3156
- /* @__PURE__ */ React32.createElement(Small, { color: "textDisabled" }, label)
3218
+ /* @__PURE__ */ React33.createElement(Small, { color: "textDisabled" }, label)
3157
3219
  );
3158
3220
  }
3159
3221
 
3160
3222
  // src/components/Breadcrumbs.tsx
3161
3223
  import { forwardRef as forwardRef14 } from "react";
3162
- import React33 from "react";
3224
+ import React34 from "react";
3163
3225
  var BreadcrumbText = forwardRef14(function BreadcrumbText2({ children, className, onClick, ...props }, ref) {
3164
- return /* @__PURE__ */ React33.createElement(
3226
+ return /* @__PURE__ */ React34.createElement(
3165
3227
  Text,
3166
3228
  {
3167
3229
  ...props,
@@ -3181,7 +3243,7 @@ var slashStyle = {
3181
3243
  margin: "0 3px"
3182
3244
  };
3183
3245
  var BreadcrumbSlash = () => {
3184
- return /* @__PURE__ */ React33.createElement(
3246
+ return /* @__PURE__ */ React34.createElement(
3185
3247
  "svg",
3186
3248
  {
3187
3249
  width: "7",
@@ -3192,7 +3254,7 @@ var BreadcrumbSlash = () => {
3192
3254
  opacity: 0.5,
3193
3255
  style: slashStyle
3194
3256
  },
3195
- /* @__PURE__ */ React33.createElement(
3257
+ /* @__PURE__ */ React34.createElement(
3196
3258
  "path",
3197
3259
  {
3198
3260
  d: "M1 16L6 1",
@@ -3206,16 +3268,16 @@ var BreadcrumbSlash = () => {
3206
3268
  };
3207
3269
 
3208
3270
  // src/components/Checkbox.tsx
3209
- import * as React34 from "react";
3271
+ import * as React35 from "react";
3210
3272
  var colorSchemeStyles = {
3211
3273
  normal: "text-text-subtle",
3212
3274
  primary: "text-primary",
3213
3275
  secondary: "text-secondary"
3214
3276
  };
3215
- var Checkbox = React34.memo(
3216
- React34.forwardRef(function Checkbox2({ className, style: style2, colorScheme = "secondary", ...props }, ref) {
3277
+ var Checkbox = React35.memo(
3278
+ React35.forwardRef(function Checkbox2({ className, style: style2, colorScheme = "secondary", ...props }, ref) {
3217
3279
  const { fieldId: id } = useLabel({ fieldId: props.id });
3218
- return /* @__PURE__ */ React34.createElement(
3280
+ return /* @__PURE__ */ React35.createElement(
3219
3281
  "div",
3220
3282
  {
3221
3283
  className: cx(
@@ -3225,7 +3287,7 @@ var Checkbox = React34.memo(
3225
3287
  ),
3226
3288
  style: style2
3227
3289
  },
3228
- /* @__PURE__ */ React34.createElement(
3290
+ /* @__PURE__ */ React35.createElement(
3229
3291
  "input",
3230
3292
  {
3231
3293
  ref,
@@ -3254,7 +3316,7 @@ var Checkbox = React34.memo(
3254
3316
  id
3255
3317
  }
3256
3318
  ),
3257
- /* @__PURE__ */ React34.createElement(
3319
+ /* @__PURE__ */ React35.createElement(
3258
3320
  "svg",
3259
3321
  {
3260
3322
  className: `
@@ -3274,7 +3336,7 @@ var Checkbox = React34.memo(
3274
3336
  xmlns: "http://www.w3.org/2000/svg",
3275
3337
  "aria-hidden": "true"
3276
3338
  },
3277
- /* @__PURE__ */ React34.createElement(
3339
+ /* @__PURE__ */ React35.createElement(
3278
3340
  "path",
3279
3341
  {
3280
3342
  d: "M3 6L4.5 7.5L8 4",
@@ -3290,10 +3352,10 @@ var Checkbox = React34.memo(
3290
3352
 
3291
3353
  // src/components/Chip.tsx
3292
3354
  import { Cross1Icon, PlusIcon } from "@noya-app/noya-icons";
3293
- import React36, { forwardRef as forwardRef16, memo as memo12 } from "react";
3355
+ import React37, { forwardRef as forwardRef16, memo as memo13 } from "react";
3294
3356
 
3295
3357
  // src/hooks/useHover.ts
3296
- import * as React35 from "react";
3358
+ import * as React36 from "react";
3297
3359
  var globalIgnoreEmulatedMouseEvents = false;
3298
3360
  var hoverCount = 0;
3299
3361
  function setGlobalIgnoreEmulatedMouseEvents() {
@@ -3323,13 +3385,13 @@ function setupGlobalTouchEvents() {
3323
3385
  }
3324
3386
  function useHover(props = {}) {
3325
3387
  const { onHoverStart, onHoverChange, onHoverEnd, isDisabled } = props;
3326
- const [isHovered, setHovered] = React35.useState(false);
3327
- const state = React35.useRef({
3388
+ const [isHovered, setHovered] = React36.useState(false);
3389
+ const state = React36.useRef({
3328
3390
  isHovered: false,
3329
3391
  ignoreEmulatedMouseEvents: false
3330
3392
  }).current;
3331
- React35.useEffect(setupGlobalTouchEvents, []);
3332
- const hoverProps = React35.useMemo(
3393
+ React36.useEffect(setupGlobalTouchEvents, []);
3394
+ const hoverProps = React36.useMemo(
3333
3395
  function getHoverProps() {
3334
3396
  function triggerHoverStart(event, pointerType) {
3335
3397
  if (isDisabled || pointerType === "touch" || state.isHovered) {
@@ -3438,7 +3500,7 @@ var ICON_SIZE_STYLES = {
3438
3500
  delete: "mr-[-2px] scale-[0.60]"
3439
3501
  }
3440
3502
  };
3441
- var Chip = memo12(
3503
+ var Chip = memo13(
3442
3504
  forwardRef16(function Chip2({
3443
3505
  colorScheme,
3444
3506
  children,
@@ -3475,7 +3537,7 @@ var Chip = memo12(
3475
3537
  className
3476
3538
  );
3477
3539
  const color = colorScheme === "primary" ? cssVars.colors.primary : colorScheme === "secondary" ? cssVars.colors.secondary : cssVars.colors.text;
3478
- return /* @__PURE__ */ React36.createElement(
3540
+ return /* @__PURE__ */ React37.createElement(
3479
3541
  "span",
3480
3542
  {
3481
3543
  ref: forwardedRef,
@@ -3485,7 +3547,7 @@ var Chip = memo12(
3485
3547
  tabIndex,
3486
3548
  ...rest
3487
3549
  },
3488
- addable && /* @__PURE__ */ React36.createElement(
3550
+ addable && /* @__PURE__ */ React37.createElement(
3489
3551
  PlusIcon,
3490
3552
  {
3491
3553
  className: cx(ICON_BASE_STYLES, ICON_SIZE_STYLES[size2].add),
@@ -3497,7 +3559,7 @@ var Chip = memo12(
3497
3559
  }
3498
3560
  ),
3499
3561
  children,
3500
- deletable && /* @__PURE__ */ React36.createElement(
3562
+ deletable && /* @__PURE__ */ React37.createElement(
3501
3563
  Cross1Icon,
3502
3564
  {
3503
3565
  className: cx(ICON_BASE_STYLES, ICON_SIZE_STYLES[size2].delete),
@@ -3514,10 +3576,10 @@ var Chip = memo12(
3514
3576
  );
3515
3577
 
3516
3578
  // src/components/Collection.tsx
3517
- import React46 from "react";
3579
+ import React47 from "react";
3518
3580
 
3519
3581
  // src/components/Grid.tsx
3520
- import React41, { useImperativeHandle as useImperativeHandle3, useRef as useRef16, useState as useState20 } from "react";
3582
+ import React42, { useImperativeHandle as useImperativeHandle3, useRef as useRef16, useState as useState20 } from "react";
3521
3583
 
3522
3584
  // src/utils/selection.ts
3523
3585
  function updateSelection(allIds, selectedIds, clickedId, event) {
@@ -3545,17 +3607,17 @@ function updateSelection(allIds, selectedIds, clickedId, event) {
3545
3607
  }
3546
3608
 
3547
3609
  // src/components/EditableText.tsx
3548
- import React37, {
3610
+ import React38, {
3549
3611
  forwardRef as forwardRef17,
3550
- memo as memo13,
3612
+ memo as memo14,
3551
3613
  useCallback as useCallback17,
3552
3614
  useEffect as useEffect14,
3553
3615
  useImperativeHandle as useImperativeHandle2,
3554
3616
  useRef as useRef15,
3555
3617
  useState as useState18
3556
3618
  } from "react";
3557
- var defaultRenderPreview = (props) => /* @__PURE__ */ React37.createElement(BreadcrumbText, { ...props });
3558
- var EditableText = memo13(
3619
+ var defaultRenderPreview = (props) => /* @__PURE__ */ React38.createElement(BreadcrumbText, { ...props });
3620
+ var EditableText = memo14(
3559
3621
  forwardRef17(function EditableText2({
3560
3622
  value,
3561
3623
  onChange,
@@ -3631,7 +3693,7 @@ var EditableText = memo13(
3631
3693
  style: textStyle,
3632
3694
  className: textClassName
3633
3695
  });
3634
- const input = /* @__PURE__ */ React37.createElement("div", { className: "flex absolute inset-0 -mx-1.5 -my-1" }, /* @__PURE__ */ React37.createElement(InputField2.Root, { onFocusChange: setFocused }, /* @__PURE__ */ React37.createElement(
3696
+ const input = /* @__PURE__ */ React38.createElement("div", { className: "flex absolute inset-0 -mx-1.5 -my-1" }, /* @__PURE__ */ React38.createElement(InputField2.Root, { onFocusChange: setFocused }, /* @__PURE__ */ React38.createElement(
3635
3697
  InputField2.Input,
3636
3698
  {
3637
3699
  ref: inputRef,
@@ -3671,27 +3733,27 @@ var EditableText = memo13(
3671
3733
  }
3672
3734
  }
3673
3735
  )));
3674
- return /* @__PURE__ */ React37.createElement("div", { className: cx("flex relative", className), style: style2 }, preview, focused && !readOnly && input);
3736
+ return /* @__PURE__ */ React38.createElement("div", { className: cx("flex relative", className), style: style2 }, preview, focused && !readOnly && input);
3675
3737
  })
3676
3738
  );
3677
3739
 
3678
3740
  // src/components/GridView.tsx
3679
- import React40, {
3680
- createContext as createContext6,
3741
+ import React41, {
3742
+ createContext as createContext7,
3681
3743
  forwardRef as forwardRef18,
3682
- memo as memo15,
3744
+ memo as memo16,
3683
3745
  useCallback as useCallback20,
3684
- useContext as useContext6,
3746
+ useContext as useContext7,
3685
3747
  useMemo as useMemo16
3686
3748
  } from "react";
3687
3749
 
3688
3750
  // src/components/ContextMenu.tsx
3689
3751
  import { useKeyboardShortcuts as useKeyboardShortcuts2 } from "@noya-app/noya-keymap";
3690
3752
  import * as RadixContextMenu from "@radix-ui/react-context-menu";
3691
- import React38, { useCallback as useCallback18, useMemo as useMemo15 } from "react";
3753
+ import React39, { useCallback as useCallback18, useMemo as useMemo15 } from "react";
3692
3754
  var Components2 = {
3693
3755
  Separator: RadixContextMenu.Separator,
3694
- ItemText: React38.Fragment,
3756
+ ItemText: React39.Fragment,
3695
3757
  Item: RadixContextMenu.Item,
3696
3758
  CheckboxItem: RadixContextMenu.CheckboxItem,
3697
3759
  ItemIndicator: RadixContextMenu.ItemIndicator,
@@ -3711,6 +3773,7 @@ function ContextMenuRoot({
3711
3773
  () => shouldBindKeyboardShortcuts === false ? {} : getKeyboardShortcutsForMenuItems(items, onSelect),
3712
3774
  [items, onSelect, shouldBindKeyboardShortcuts]
3713
3775
  );
3776
+ const portalScopeId = usePortalScopeId();
3714
3777
  useKeyboardShortcuts2(keymap);
3715
3778
  const onPointerDown = useCallback18((event) => {
3716
3779
  event.preventDefault();
@@ -3722,39 +3785,46 @@ function ContextMenuRoot({
3722
3785
  },
3723
3786
  [onSelect]
3724
3787
  );
3725
- return /* @__PURE__ */ React38.createElement(RadixContextMenu.Root, { onOpenChange }, /* @__PURE__ */ React38.createElement(RadixContextMenu.Trigger, { asChild: true, onPointerDown }, children), /* @__PURE__ */ React38.createElement(RadixContextMenu.Portal, null, /* @__PURE__ */ React38.createElement(RadixContextMenu.Content, { className: styles.contentStyle }, /* @__PURE__ */ React38.createElement(
3726
- MenuViewport,
3788
+ return /* @__PURE__ */ React39.createElement(RadixContextMenu.Root, { onOpenChange }, /* @__PURE__ */ React39.createElement(RadixContextMenu.Trigger, { asChild: true, onPointerDown }, children), /* @__PURE__ */ React39.createElement(RadixContextMenu.Portal, null, /* @__PURE__ */ React39.createElement(
3789
+ RadixContextMenu.Content,
3727
3790
  {
3728
- items,
3729
- Components: Components2,
3730
- onSelect: handleSelectItem
3731
- }
3732
- ))));
3791
+ ...portalScopeProps(portalScopeId),
3792
+ className: styles.contentStyle
3793
+ },
3794
+ /* @__PURE__ */ React39.createElement(
3795
+ MenuViewport,
3796
+ {
3797
+ items,
3798
+ Components: Components2,
3799
+ onSelect: handleSelectItem
3800
+ }
3801
+ )
3802
+ )));
3733
3803
  }
3734
3804
  var ContextMenu = memoGeneric(ContextMenuRoot);
3735
3805
 
3736
3806
  // src/components/ScrollArea.tsx
3737
3807
  import * as RadixScrollArea from "@radix-ui/react-scroll-area";
3738
- import * as React39 from "react";
3739
- var ScrollArea = React39.memo(function ScrollArea2({ children }) {
3740
- const [scrollElementRef, setScrollElementRef] = React39.useState(null);
3741
- return /* @__PURE__ */ React39.createElement("div", { className: "flex-1 min-h-0" }, /* @__PURE__ */ React39.createElement(RadixScrollArea.Root, { style: { width: "100%", height: "100%" } }, /* @__PURE__ */ React39.createElement(
3808
+ import * as React40 from "react";
3809
+ var ScrollArea = React40.memo(function ScrollArea2({ children }) {
3810
+ const [scrollElementRef, setScrollElementRef] = React40.useState(null);
3811
+ return /* @__PURE__ */ React40.createElement("div", { className: "flex-1 min-h-0" }, /* @__PURE__ */ React40.createElement(RadixScrollArea.Root, { style: { width: "100%", height: "100%" } }, /* @__PURE__ */ React40.createElement(
3742
3812
  RadixScrollArea.Viewport,
3743
3813
  {
3744
3814
  className: "w-full h-full [&>div]:block",
3745
- ref: React39.useCallback(
3815
+ ref: React40.useCallback(
3746
3816
  (ref) => setScrollElementRef(ref),
3747
3817
  []
3748
3818
  )
3749
3819
  },
3750
3820
  typeof children === "function" ? scrollElementRef ? children(scrollElementRef) : null : children
3751
- ), /* @__PURE__ */ React39.createElement(
3821
+ ), /* @__PURE__ */ React40.createElement(
3752
3822
  RadixScrollArea.Scrollbar,
3753
3823
  {
3754
3824
  orientation: "vertical",
3755
3825
  className: "scroll-component flex p-[3px] data-[orientation=vertical]:w-[10px]"
3756
3826
  },
3757
- /* @__PURE__ */ React39.createElement(RadixScrollArea.Thumb, { className: "scroll-component flex-1 rounded-[10px] bg-scrollbar" })
3827
+ /* @__PURE__ */ React40.createElement(RadixScrollArea.Thumb, { className: "scroll-component flex-1 rounded-[10px] bg-scrollbar" })
3758
3828
  )));
3759
3829
  });
3760
3830
 
@@ -3763,7 +3833,7 @@ var ItemTitle = ({
3763
3833
  showBackground,
3764
3834
  children
3765
3835
  }) => {
3766
- return /* @__PURE__ */ React40.createElement(
3836
+ return /* @__PURE__ */ React41.createElement(
3767
3837
  "span",
3768
3838
  {
3769
3839
  className: cx(
@@ -3778,7 +3848,7 @@ var ItemDescription = ({
3778
3848
  showBackground,
3779
3849
  children
3780
3850
  }) => {
3781
- return /* @__PURE__ */ React40.createElement(
3851
+ return /* @__PURE__ */ React41.createElement(
3782
3852
  "span",
3783
3853
  {
3784
3854
  className: cx(
@@ -3793,7 +3863,7 @@ var SectionTitle = ({
3793
3863
  last = false,
3794
3864
  children
3795
3865
  }) => {
3796
- return /* @__PURE__ */ React40.createElement(
3866
+ return /* @__PURE__ */ React41.createElement(
3797
3867
  "span",
3798
3868
  {
3799
3869
  className: `font-sans text-heading3 font-medium user-select-none truncate ${last ? "text-text" : "text-text-muted"}`
@@ -3826,7 +3896,7 @@ var GridViewItem = forwardRefGeneric(function GridViewItem2({
3826
3896
  const { hoverProps } = useHover({
3827
3897
  onHoverChange
3828
3898
  });
3829
- const { textPosition, bordered, disabled } = useContext6(GridViewContext);
3899
+ const { textPosition, bordered, disabled } = useContext7(GridViewContext);
3830
3900
  const handleClick = useCallback20(
3831
3901
  (event) => {
3832
3902
  event.stopPropagation();
@@ -3849,7 +3919,7 @@ var GridViewItem = forwardRefGeneric(function GridViewItem2({
3849
3919
  },
3850
3920
  [onSelect, onKeyDown]
3851
3921
  );
3852
- let element = /* @__PURE__ */ React40.createElement(
3922
+ let element = /* @__PURE__ */ React41.createElement(
3853
3923
  "div",
3854
3924
  {
3855
3925
  ...props,
@@ -3872,7 +3942,7 @@ var GridViewItem = forwardRefGeneric(function GridViewItem2({
3872
3942
  onDoubleClick,
3873
3943
  onContextMenu
3874
3944
  },
3875
- /* @__PURE__ */ React40.createElement(
3945
+ /* @__PURE__ */ React41.createElement(
3876
3946
  "div",
3877
3947
  {
3878
3948
  className: cx(
@@ -3883,13 +3953,13 @@ var GridViewItem = forwardRefGeneric(function GridViewItem2({
3883
3953
  },
3884
3954
  children
3885
3955
  ),
3886
- textPosition === "below" && /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(Spacer.Vertical, { size: 8 }), /* @__PURE__ */ React40.createElement(ItemTitle, null, title || " "), /* @__PURE__ */ React40.createElement(ItemDescription, null, subtitle || " ")),
3887
- textPosition === "overlay" && hovered && (title || subtitle) && /* @__PURE__ */ React40.createElement("div", { className: "absolute inset-0 flex flex-col justify-end items-start p-1 pointer-events-none truncate gap-0.5" }, title && /* @__PURE__ */ React40.createElement(ItemTitle, { showBackground: true }, title), subtitle && /* @__PURE__ */ React40.createElement(ItemDescription, { showBackground: true }, subtitle)),
3888
- action && /* @__PURE__ */ React40.createElement("div", { className: "absolute top-[7px] right-[7px] flex flex-col justify-end items-start p-1 truncate gap-0.5" }, action),
3889
- loading && /* @__PURE__ */ React40.createElement("div", { className: "flex flex-col justify-start items-end p-1 pointer-events-none animate-shimmer absolute inset-0 bg-gradient-to-r from-white/0 via-[rgb(226,232,240)]/50 to-white/0 bg-length:200%_100%]" }, /* @__PURE__ */ React40.createElement(ActivityIndicator, { opacity: 0.5, size: 13 }))
3956
+ textPosition === "below" && /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(Spacer.Vertical, { size: 8 }), /* @__PURE__ */ React41.createElement(ItemTitle, null, title || " "), /* @__PURE__ */ React41.createElement(ItemDescription, null, subtitle || " ")),
3957
+ textPosition === "overlay" && hovered && (title || subtitle) && /* @__PURE__ */ React41.createElement("div", { className: "absolute inset-0 flex flex-col justify-end items-start p-1 pointer-events-none truncate gap-0.5" }, title && /* @__PURE__ */ React41.createElement(ItemTitle, { showBackground: true }, title), subtitle && /* @__PURE__ */ React41.createElement(ItemDescription, { showBackground: true }, subtitle)),
3958
+ action && /* @__PURE__ */ React41.createElement("div", { className: "absolute top-[7px] right-[7px] flex flex-col justify-end items-start p-1 truncate gap-0.5" }, action),
3959
+ loading && /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col justify-start items-end p-1 pointer-events-none animate-shimmer absolute inset-0 bg-gradient-to-r from-white/0 via-[rgb(226,232,240)]/50 to-white/0 bg-length:200%_100%]" }, /* @__PURE__ */ React41.createElement(ActivityIndicator, { opacity: 0.5, size: 13 }))
3890
3960
  );
3891
3961
  if (menuItems && onSelectMenuItem) {
3892
- element = /* @__PURE__ */ React40.createElement(
3962
+ element = /* @__PURE__ */ React41.createElement(
3893
3963
  ContextMenu,
3894
3964
  {
3895
3965
  items: menuItems,
@@ -3900,17 +3970,17 @@ var GridViewItem = forwardRefGeneric(function GridViewItem2({
3900
3970
  );
3901
3971
  }
3902
3972
  if (textPosition === "toolip") {
3903
- element = /* @__PURE__ */ React40.createElement(
3973
+ element = /* @__PURE__ */ React41.createElement(
3904
3974
  Tooltip,
3905
3975
  {
3906
- content: /* @__PURE__ */ React40.createElement("div", { className: "flex flex-col gap-0.5" }, /* @__PURE__ */ React40.createElement(ItemTitle, null, title), /* @__PURE__ */ React40.createElement(ItemDescription, null, subtitle))
3976
+ content: /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col gap-0.5" }, /* @__PURE__ */ React41.createElement(ItemTitle, null, title), /* @__PURE__ */ React41.createElement(ItemDescription, null, subtitle))
3907
3977
  },
3908
3978
  element
3909
3979
  );
3910
3980
  }
3911
3981
  return element;
3912
3982
  });
3913
- var GridViewContext = createContext6({
3983
+ var GridViewContext = createContext7({
3914
3984
  minColumnWidth: "220px",
3915
3985
  textPosition: "below",
3916
3986
  bordered: false,
@@ -3958,8 +4028,8 @@ var GridViewRoot = forwardRef18(function GridViewRoot2({
3958
4028
  categories: ["flex"]
3959
4029
  });
3960
4030
  }, [className, scrollable]);
3961
- const content = /* @__PURE__ */ React40.createElement("div", { className: cx("p-3", contentClassName) }, children);
3962
- return /* @__PURE__ */ React40.createElement(GridViewContext.Provider, { value: contextValue }, /* @__PURE__ */ React40.createElement(
4031
+ const content = /* @__PURE__ */ React41.createElement("div", { className: cx("p-3", contentClassName) }, children);
4032
+ return /* @__PURE__ */ React41.createElement(GridViewContext.Provider, { value: contextValue }, /* @__PURE__ */ React41.createElement(
3963
4033
  "div",
3964
4034
  {
3965
4035
  onClick: handleClick,
@@ -3967,7 +4037,7 @@ var GridViewRoot = forwardRef18(function GridViewRoot2({
3967
4037
  ...props,
3968
4038
  ref: forwardedRef
3969
4039
  },
3970
- scrollable ? /* @__PURE__ */ React40.createElement(ScrollArea, null, content) : content
4040
+ scrollable ? /* @__PURE__ */ React41.createElement(ScrollArea, null, content) : content
3971
4041
  ));
3972
4042
  });
3973
4043
  function GridViewSection({
@@ -3975,13 +4045,13 @@ function GridViewSection({
3975
4045
  className,
3976
4046
  renderEmptyState
3977
4047
  }) {
3978
- const { minColumnWidth, gap } = useContext6(GridViewContext);
4048
+ const { minColumnWidth, gap } = useContext7(GridViewContext);
3979
4049
  const styles3 = {
3980
4050
  gridTemplateColumns: `repeat(auto-fill, minmax(${minColumnWidth}, 1fr))`,
3981
4051
  gap: `${gap}px`
3982
4052
  };
3983
- const isEmpty = React40.Children.count(children) === 0;
3984
- return isEmpty && renderEmptyState ? renderEmptyState() : /* @__PURE__ */ React40.createElement(
4053
+ const isEmpty = React41.Children.count(children) === 0;
4054
+ return isEmpty && renderEmptyState ? renderEmptyState() : /* @__PURE__ */ React41.createElement(
3985
4055
  "div",
3986
4056
  {
3987
4057
  role: "presentation",
@@ -3993,17 +4063,17 @@ function GridViewSection({
3993
4063
  }
3994
4064
  function GridViewSectionHeader({ title }) {
3995
4065
  const grouped = title.split("/");
3996
- return /* @__PURE__ */ React40.createElement("div", { className: "px-5" }, /* @__PURE__ */ React40.createElement(Spacer.Vertical, { size: 24 }), withSeparatorElements(
3997
- grouped.map((title2, index) => /* @__PURE__ */ React40.createElement(SectionTitle, { last: index === grouped.length - 1 }, title2)),
3998
- /* @__PURE__ */ React40.createElement(SectionTitle, null, " / ")
4066
+ return /* @__PURE__ */ React41.createElement("div", { className: "px-5" }, /* @__PURE__ */ React41.createElement(Spacer.Vertical, { size: 24 }), withSeparatorElements(
4067
+ grouped.map((title2, index) => /* @__PURE__ */ React41.createElement(SectionTitle, { last: index === grouped.length - 1 }, title2)),
4068
+ /* @__PURE__ */ React41.createElement(SectionTitle, null, " / ")
3999
4069
  ));
4000
4070
  }
4001
4071
  var GridView;
4002
4072
  ((GridView2) => {
4003
- GridView2.Root = memo15(GridViewRoot);
4073
+ GridView2.Root = memo16(GridViewRoot);
4004
4074
  GridView2.Item = memoGeneric(GridViewItem);
4005
- GridView2.Section = memo15(GridViewSection);
4006
- GridView2.SectionHeader = memo15(GridViewSectionHeader);
4075
+ GridView2.Section = memo16(GridViewSection);
4076
+ GridView2.SectionHeader = memo16(GridViewSectionHeader);
4007
4077
  })(GridView || (GridView = {}));
4008
4078
 
4009
4079
  // src/components/Grid.tsx
@@ -4110,7 +4180,7 @@ var Grid = memoGeneric(
4110
4180
  onFilesDrop
4111
4181
  );
4112
4182
  const { minColumnWidth, gap } = getGridSize(size2);
4113
- return /* @__PURE__ */ React41.createElement(
4183
+ return /* @__PURE__ */ React42.createElement(
4114
4184
  GridView.Root,
4115
4185
  {
4116
4186
  role: "listbox",
@@ -4127,7 +4197,7 @@ var Grid = memoGeneric(
4127
4197
  ...dropTargetProps,
4128
4198
  ref: fileDropTargetRef
4129
4199
  },
4130
- items.length > 0 ? /* @__PURE__ */ React41.createElement(GridView.Section, null, items.map((item) => {
4200
+ items.length > 0 ? /* @__PURE__ */ React42.createElement(GridView.Section, null, items.map((item) => {
4131
4201
  const id = getId(item);
4132
4202
  const isDropdownOpen = dropdownOpenId === id;
4133
4203
  const isHovered = testHoveredId === id || currentHoveredId === id || isDropdownOpen;
@@ -4146,7 +4216,7 @@ var Grid = memoGeneric(
4146
4216
  handleSelect(id);
4147
4217
  }
4148
4218
  };
4149
- const action = (isHovered || isSelected) && !isRenaming && (typeof renderAction === "function" ? renderAction({ item, selected: isSelected, onOpenChange }) : renderAction === "menu" && menuItems && /* @__PURE__ */ React41.createElement(
4219
+ const action = (isHovered || isSelected) && !isRenaming && (typeof renderAction === "function" ? renderAction({ item, selected: isSelected, onOpenChange }) : renderAction === "menu" && menuItems && /* @__PURE__ */ React42.createElement(
4150
4220
  ActionMenu,
4151
4221
  {
4152
4222
  menuItems,
@@ -4155,7 +4225,7 @@ var Grid = memoGeneric(
4155
4225
  onOpenChange
4156
4226
  }
4157
4227
  ));
4158
- return /* @__PURE__ */ React41.createElement(
4228
+ return /* @__PURE__ */ React42.createElement(
4159
4229
  GridView.Item,
4160
4230
  {
4161
4231
  key: id,
@@ -4168,7 +4238,7 @@ var Grid = memoGeneric(
4168
4238
  onHoverChange: (isHovering) => {
4169
4239
  setHoveredId(isHovering ? id : void 0);
4170
4240
  },
4171
- title: /* @__PURE__ */ React41.createElement(
4241
+ title: /* @__PURE__ */ React42.createElement(
4172
4242
  EditableText,
4173
4243
  {
4174
4244
  tabIndex: isRenaming ? void 0 : -1,
@@ -4185,7 +4255,7 @@ var Grid = memoGeneric(
4185
4255
  },
4186
4256
  textClassName: "bg-listview-editing-background max-h-input-height"
4187
4257
  },
4188
- (props2) => /* @__PURE__ */ React41.createElement(
4258
+ (props2) => /* @__PURE__ */ React42.createElement(
4189
4259
  "span",
4190
4260
  {
4191
4261
  ...props2,
@@ -4196,7 +4266,7 @@ var Grid = memoGeneric(
4196
4266
  }
4197
4267
  )
4198
4268
  ),
4199
- subtitle: /* @__PURE__ */ React41.createElement(
4269
+ subtitle: /* @__PURE__ */ React42.createElement(
4200
4270
  "span",
4201
4271
  {
4202
4272
  className: cx(
@@ -4230,7 +4300,7 @@ var Grid = memoGeneric(
4230
4300
  }
4231
4301
  }
4232
4302
  },
4233
- thumbnail && /* @__PURE__ */ React41.createElement(
4303
+ thumbnail && /* @__PURE__ */ React42.createElement(
4234
4304
  "div",
4235
4305
  {
4236
4306
  className: cx(
@@ -4248,19 +4318,19 @@ var Grid = memoGeneric(
4248
4318
  );
4249
4319
 
4250
4320
  // src/components/List.tsx
4251
- import React45, { memo as memo18, useImperativeHandle as useImperativeHandle5, useRef as useRef19, useState as useState22 } from "react";
4321
+ import React46, { memo as memo19, useImperativeHandle as useImperativeHandle5, useRef as useRef19, useState as useState22 } from "react";
4252
4322
 
4253
4323
  // src/components/ListView.tsx
4254
4324
  import { range } from "@noya-app/noya-utils";
4255
4325
  import { composeRefs as composeRefs2 } from "@radix-ui/react-compose-refs";
4256
- import React43, {
4326
+ import React44, {
4257
4327
  Children as Children3,
4258
- createContext as createContext8,
4328
+ createContext as createContext9,
4259
4329
  forwardRef as forwardRef19,
4260
4330
  isValidElement as isValidElement3,
4261
- memo as memo17,
4331
+ memo as memo18,
4262
4332
  useCallback as useCallback22,
4263
- useContext as useContext8,
4333
+ useContext as useContext9,
4264
4334
  useImperativeHandle as useImperativeHandle4,
4265
4335
  useLayoutEffect as useLayoutEffect5,
4266
4336
  useMemo as useMemo18,
@@ -4308,8 +4378,8 @@ import {
4308
4378
  useSortable,
4309
4379
  verticalListSortingStrategy
4310
4380
  } from "@dnd-kit/sortable";
4311
- import * as React42 from "react";
4312
- import { memo as memo16 } from "react";
4381
+ import * as React43 from "react";
4382
+ import { memo as memo17 } from "react";
4313
4383
  import { createPortal as createPortal2 } from "react-dom";
4314
4384
  var normalizeListTargetIndex = (index, position) => {
4315
4385
  return position === "above" ? index : index + 1;
@@ -4322,7 +4392,7 @@ var defaultAcceptsDrop = (sourceIndex, targetIndex, position) => {
4322
4392
  }
4323
4393
  return true;
4324
4394
  };
4325
- var SortableItemContext = React42.createContext({
4395
+ var SortableItemContext = React43.createContext({
4326
4396
  keys: [],
4327
4397
  acceptsDrop: defaultAcceptsDrop,
4328
4398
  axis: "y",
@@ -4377,7 +4447,7 @@ function SortableItem({
4377
4447
  setActivatorEvent,
4378
4448
  axis,
4379
4449
  getDropTargetParentIndex
4380
- } = React42.useContext(SortableItemContext);
4450
+ } = React43.useContext(SortableItemContext);
4381
4451
  const sortable = useSortable({ id, disabled });
4382
4452
  const { activatorEvent } = useDndContext();
4383
4453
  const {
@@ -4398,7 +4468,7 @@ function SortableItem({
4398
4468
  const eventY = activatorEvent?.clientY ?? 0;
4399
4469
  const offsetLeft = eventX + position.x;
4400
4470
  const offsetTop = eventY + position.y;
4401
- const ref = React42.useCallback((node) => setNodeRef(node), [setNodeRef]);
4471
+ const ref = React43.useCallback((node) => setNodeRef(node), [setNodeRef]);
4402
4472
  const parentIndex = overIndex === -1 ? void 0 : getDropTargetParentIndex?.(overIndex);
4403
4473
  const isValidParent = parentIndex === void 0 || parentIndex === -1 ? false : acceptsDrop2(activeIndex, parentIndex, "inside");
4404
4474
  const overIdAcceptsDrop = overIndex === -1 ? void 0 : acceptsDrop2(activeIndex, overIndex, "inside");
@@ -4435,26 +4505,26 @@ function SortableRoot({
4435
4505
  }
4436
4506
  })
4437
4507
  );
4438
- const [activeIndex, setActiveIndex] = React42.useState();
4439
- const activatorEvent = React42.useRef(null);
4440
- const [position, setPosition] = React42.useState({
4508
+ const [activeIndex, setActiveIndex] = React43.useState();
4509
+ const activatorEvent = React43.useRef(null);
4510
+ const [position, setPosition] = React43.useState({
4441
4511
  x: 0,
4442
4512
  y: 0
4443
4513
  });
4444
- const setActivatorEvent = React42.useCallback((event) => {
4514
+ const setActivatorEvent = React43.useCallback((event) => {
4445
4515
  activatorEvent.current = event;
4446
4516
  }, []);
4447
- const handleDragStart = React42.useCallback(
4517
+ const handleDragStart = React43.useCallback(
4448
4518
  (event) => {
4449
4519
  const index = keys.findIndex((id) => id === event.active.id);
4450
4520
  setActiveIndex(index);
4451
4521
  },
4452
4522
  [keys]
4453
4523
  );
4454
- const handleDragMove = React42.useCallback((event) => {
4524
+ const handleDragMove = React43.useCallback((event) => {
4455
4525
  setPosition({ ...event.delta });
4456
4526
  }, []);
4457
- const handleDragEnd = React42.useCallback(
4527
+ const handleDragEnd = React43.useCallback(
4458
4528
  (event) => {
4459
4529
  const { active, over } = event;
4460
4530
  setActiveIndex(void 0);
@@ -4481,14 +4551,14 @@ function SortableRoot({
4481
4551
  },
4482
4552
  [acceptsDrop2, axis, keys, onMoveItem, position.x, position.y]
4483
4553
  );
4484
- const [mounted, setMounted] = React42.useState(false);
4485
- React42.useEffect(() => {
4554
+ const [mounted, setMounted] = React43.useState(false);
4555
+ React43.useEffect(() => {
4486
4556
  setMounted(true);
4487
4557
  }, []);
4488
- return /* @__PURE__ */ React42.createElement(
4558
+ return /* @__PURE__ */ React43.createElement(
4489
4559
  SortableItemContext.Provider,
4490
4560
  {
4491
- value: React42.useMemo(
4561
+ value: React43.useMemo(
4492
4562
  () => ({
4493
4563
  keys,
4494
4564
  acceptsDrop: acceptsDrop2,
@@ -4507,7 +4577,7 @@ function SortableRoot({
4507
4577
  ]
4508
4578
  )
4509
4579
  },
4510
- /* @__PURE__ */ React42.createElement(
4580
+ /* @__PURE__ */ React43.createElement(
4511
4581
  DndContext,
4512
4582
  {
4513
4583
  sensors,
@@ -4516,7 +4586,7 @@ function SortableRoot({
4516
4586
  onDragMove: handleDragMove,
4517
4587
  onDragEnd: handleDragEnd
4518
4588
  },
4519
- /* @__PURE__ */ React42.createElement(
4589
+ /* @__PURE__ */ React43.createElement(
4520
4590
  SortableContext,
4521
4591
  {
4522
4592
  items: keys,
@@ -4525,14 +4595,14 @@ function SortableRoot({
4525
4595
  children
4526
4596
  ),
4527
4597
  mounted && renderOverlay && createPortal2(
4528
- /* @__PURE__ */ React42.createElement(DragOverlay, { dropAnimation: null }, activeIndex !== void 0 && activeIndex >= 0 && renderOverlay(activeIndex)),
4598
+ /* @__PURE__ */ React43.createElement(DragOverlay, { dropAnimation: null }, activeIndex !== void 0 && activeIndex >= 0 && renderOverlay(activeIndex)),
4529
4599
  document.body
4530
4600
  )
4531
4601
  )
4532
4602
  );
4533
4603
  }
4534
4604
  var SortableSubcomponents = {
4535
- Root: memo16(SortableRoot),
4605
+ Root: memo17(SortableRoot),
4536
4606
  Item: memoGeneric(SortableItem)
4537
4607
  };
4538
4608
  var SortableComponent = memoGeneric(function Sortable(props) {
@@ -4543,11 +4613,11 @@ var SortableComponent = memoGeneric(function Sortable(props) {
4543
4613
  shouldRenderOverlay = true,
4544
4614
  ...rest
4545
4615
  } = props;
4546
- const keys = React42.useMemo(
4616
+ const keys = React43.useMemo(
4547
4617
  () => items.map(keyExtractor),
4548
4618
  [items, keyExtractor]
4549
4619
  );
4550
- const renderOverlay = React42.useCallback(
4620
+ const renderOverlay = React43.useCallback(
4551
4621
  (index) => {
4552
4622
  return renderItem(
4553
4623
  items[index],
@@ -4567,14 +4637,14 @@ var SortableComponent = memoGeneric(function Sortable(props) {
4567
4637
  },
4568
4638
  [renderItem, items]
4569
4639
  );
4570
- return /* @__PURE__ */ React42.createElement(
4640
+ return /* @__PURE__ */ React43.createElement(
4571
4641
  SortableSubcomponents.Root,
4572
4642
  {
4573
4643
  ...rest,
4574
4644
  keys,
4575
4645
  renderOverlay: shouldRenderOverlay ? renderOverlay : void 0
4576
4646
  },
4577
- keys.map((key, index) => /* @__PURE__ */ React42.createElement(SortableSubcomponents.Item, { key, id: key }, (props2) => {
4647
+ keys.map((key, index) => /* @__PURE__ */ React43.createElement(SortableSubcomponents.Item, { key, id: key }, (props2) => {
4578
4648
  return renderItem(
4579
4649
  items[index],
4580
4650
  props2,
@@ -4588,11 +4658,11 @@ var Sortable2 = Object.assign(SortableComponent, SortableSubcomponents);
4588
4658
  // src/components/ListView.tsx
4589
4659
  var ROW_HEIGHT = 31;
4590
4660
  var SECTION_HEADER_LABEL_HEIGHT = INPUT_HEIGHT;
4591
- var ListViewDraggingContext = createContext8({
4661
+ var ListViewDraggingContext = createContext9({
4592
4662
  indentation: 12
4593
4663
  });
4594
4664
  ListViewDraggingContext.displayName = "ListViewDraggingContext";
4595
- var ListRowContext = createContext8({
4665
+ var ListRowContext = createContext9({
4596
4666
  marginType: "none",
4597
4667
  selectedPosition: "only",
4598
4668
  sortable: false,
@@ -4610,7 +4680,7 @@ var ListViewRowTitle = ({
4610
4680
  className,
4611
4681
  children,
4612
4682
  ...props
4613
- }) => /* @__PURE__ */ React43.createElement(
4683
+ }) => /* @__PURE__ */ React44.createElement(
4614
4684
  "span",
4615
4685
  {
4616
4686
  className: cx(
@@ -4638,7 +4708,7 @@ function ListViewEditableRowTitle({
4638
4708
  element.select();
4639
4709
  }, 1);
4640
4710
  }, [autoFocus]);
4641
- return /* @__PURE__ */ React43.createElement(
4711
+ return /* @__PURE__ */ React44.createElement(
4642
4712
  InputField2.Input,
4643
4713
  {
4644
4714
  ref: inputRef,
@@ -4677,7 +4747,7 @@ var RowContainer = forwardRef19(
4677
4747
  "aria-selected": ariaSelected,
4678
4748
  ...props
4679
4749
  }, ref) => {
4680
- return /* @__PURE__ */ React43.createElement(
4750
+ return /* @__PURE__ */ React44.createElement(
4681
4751
  "div",
4682
4752
  {
4683
4753
  ref,
@@ -4755,7 +4825,7 @@ var ListViewDragIndicatorElement = forwardRef19(
4755
4825
  style: style2,
4756
4826
  ...props
4757
4827
  }, ref) => {
4758
- return /* @__PURE__ */ React43.createElement(
4828
+ return /* @__PURE__ */ React44.createElement(
4759
4829
  "div",
4760
4830
  {
4761
4831
  ref,
@@ -4822,11 +4892,11 @@ var ListViewRow = forwardRefGeneric(function ListViewRow2({
4822
4892
  divider,
4823
4893
  gap: listGap,
4824
4894
  colorScheme
4825
- } = useContext8(ListRowContext);
4895
+ } = useContext9(ListRowContext);
4826
4896
  const { hoverProps } = useHover({
4827
4897
  onHoverChange
4828
4898
  });
4829
- const { indentation, isDragOverlay } = useContext8(ListViewDraggingContext);
4899
+ const { indentation, isDragOverlay } = useContext9(ListViewDraggingContext);
4830
4900
  const handlePress = useCallback22(
4831
4901
  (event) => {
4832
4902
  event.preventDefault();
@@ -4856,7 +4926,7 @@ var ListViewRow = forwardRefGeneric(function ListViewRow2({
4856
4926
  }, ref) => {
4857
4927
  const Component = RowContainer;
4858
4928
  const relativeDropPosition = testRelativeDropPosition ?? relativeDropPositionProp;
4859
- const element = /* @__PURE__ */ React43.createElement(
4929
+ const element = /* @__PURE__ */ React44.createElement(
4860
4930
  Component,
4861
4931
  {
4862
4932
  ref,
@@ -4890,7 +4960,7 @@ var ListViewRow = forwardRefGeneric(function ListViewRow2({
4890
4960
  className,
4891
4961
  $clickable: !!onPress
4892
4962
  },
4893
- relativeDropPosition && /* @__PURE__ */ React43.createElement(
4963
+ relativeDropPosition && /* @__PURE__ */ React44.createElement(
4894
4964
  ListViewDragIndicatorElement,
4895
4965
  {
4896
4966
  key: relativeDropPosition,
@@ -4905,11 +4975,11 @@ var ListViewRow = forwardRefGeneric(function ListViewRow2({
4905
4975
  }) : dragIndicatorStyle
4906
4976
  }
4907
4977
  ),
4908
- depth > 0 && /* @__PURE__ */ React43.createElement(Spacer.Horizontal, { size: depth * indentation }),
4978
+ depth > 0 && /* @__PURE__ */ React44.createElement(Spacer.Horizontal, { size: depth * indentation }),
4909
4979
  children
4910
4980
  );
4911
4981
  if (menuItems && onSelectMenuItem) {
4912
- return /* @__PURE__ */ React43.createElement(
4982
+ return /* @__PURE__ */ React44.createElement(
4913
4983
  ContextMenu,
4914
4984
  {
4915
4985
  items: menuItems,
@@ -4922,23 +4992,23 @@ var ListViewRow = forwardRefGeneric(function ListViewRow2({
4922
4992
  return element;
4923
4993
  };
4924
4994
  if (sortable && id) {
4925
- return /* @__PURE__ */ React43.createElement(Sortable2.Item, { id, disabled: overrideSortable === false }, ({ ref: sortableRef, ...sortableProps }) => renderContent(
4995
+ return /* @__PURE__ */ React44.createElement(Sortable2.Item, { id, disabled: overrideSortable === false }, ({ ref: sortableRef, ...sortableProps }) => renderContent(
4926
4996
  sortableProps,
4927
4997
  composeRefs2(sortableRef, forwardedRef)
4928
4998
  ));
4929
4999
  }
4930
5000
  return renderContent({}, forwardedRef);
4931
5001
  });
4932
- var RenderItemContext = createContext8(
5002
+ var RenderItemContext = createContext9(
4933
5003
  () => null
4934
5004
  );
4935
5005
  RenderItemContext.displayName = "RenderItemContext";
4936
- var VirtualizedListRow = memo17(function VirtualizedListRow2({
5006
+ var VirtualizedListRow = memo18(function VirtualizedListRow2({
4937
5007
  index,
4938
5008
  style: style2
4939
5009
  }) {
4940
- const renderItem = useContext8(RenderItemContext);
4941
- return /* @__PURE__ */ React43.createElement("div", { key: index, style: style2 }, renderItem(index));
5010
+ const renderItem = useContext9(RenderItemContext);
5011
+ return /* @__PURE__ */ React44.createElement("div", { key: index, style: style2 }, renderItem(index));
4942
5012
  });
4943
5013
  var VirtualizedListInner = forwardRefGeneric(function VirtualizedListInner2({
4944
5014
  size: size2,
@@ -4969,7 +5039,7 @@ var VirtualizedListInner = forwardRefGeneric(function VirtualizedListInner2({
4969
5039
  }),
4970
5040
  []
4971
5041
  );
4972
- return /* @__PURE__ */ React43.createElement(RenderItemContext.Provider, { value: renderItem }, /* @__PURE__ */ React43.createElement(
5042
+ return /* @__PURE__ */ React44.createElement(RenderItemContext.Provider, { value: renderItem }, /* @__PURE__ */ React44.createElement(
4973
5043
  WindowScroller,
4974
5044
  {
4975
5045
  scrollElement,
@@ -4980,7 +5050,7 @@ var VirtualizedListInner = forwardRefGeneric(function VirtualizedListInner2({
4980
5050
  registerChild,
4981
5051
  onChildScroll,
4982
5052
  scrollTop
4983
- }) => /* @__PURE__ */ React43.createElement("div", { ref: registerChild }, /* @__PURE__ */ React43.createElement(
5053
+ }) => /* @__PURE__ */ React44.createElement("div", { ref: registerChild }, /* @__PURE__ */ React44.createElement(
4984
5054
  VariableSizeList,
4985
5055
  {
4986
5056
  ref: listRef,
@@ -5010,7 +5080,7 @@ var VirtualizedListInner = forwardRefGeneric(function VirtualizedListInner2({
5010
5080
  )
5011
5081
  ));
5012
5082
  });
5013
- var VirtualizedList = memo17(
5083
+ var VirtualizedList = memo18(
5014
5084
  VirtualizedListInner
5015
5085
  );
5016
5086
  var ListViewRootInner = forwardRefGeneric(function ListViewRootInner2({
@@ -5152,7 +5222,7 @@ var ListViewRootInner = forwardRefGeneric(function ListViewRootInner2({
5152
5222
  [indentation]
5153
5223
  );
5154
5224
  const renderOverlay = useCallback22(
5155
- (index) => /* @__PURE__ */ React43.createElement("div", { style: { opacity: 0.25 } }, /* @__PURE__ */ React43.createElement(ListViewDraggingContext.Provider, { value: draggingContextOverlayValue }, renderItem(data[index], index, { isDragOverlay: true }))),
5225
+ (index) => /* @__PURE__ */ React44.createElement("div", { style: { opacity: 0.25 } }, /* @__PURE__ */ React44.createElement(ListViewDraggingContext.Provider, { value: draggingContextOverlayValue }, renderItem(data[index], index, { isDragOverlay: true }))),
5156
5226
  [draggingContextOverlayValue, renderItem, data]
5157
5227
  );
5158
5228
  const renderWrappedChild = useCallback22(
@@ -5160,12 +5230,12 @@ var ListViewRootInner = forwardRefGeneric(function ListViewRootInner2({
5160
5230
  const contextValue = getItemContextValue(index);
5161
5231
  const current = renderChild(index);
5162
5232
  if (!contextValue || !isValidElement3(current)) return null;
5163
- return /* @__PURE__ */ React43.createElement(ListRowContext.Provider, { key: current.key, value: contextValue }, current);
5233
+ return /* @__PURE__ */ React44.createElement(ListRowContext.Provider, { key: current.key, value: contextValue }, current);
5164
5234
  },
5165
5235
  [getItemContextValue, renderChild]
5166
5236
  );
5167
5237
  const ids = useMemo18(() => data.map(keyExtractor), [keyExtractor, data]);
5168
- const withSortable = (children) => sortable ? /* @__PURE__ */ React43.createElement(
5238
+ const withSortable = (children) => sortable ? /* @__PURE__ */ React44.createElement(
5169
5239
  Sortable2.Root,
5170
5240
  {
5171
5241
  onMoveItem,
@@ -5176,7 +5246,7 @@ var ListViewRootInner = forwardRefGeneric(function ListViewRootInner2({
5176
5246
  },
5177
5247
  children
5178
5248
  ) : children;
5179
- const withScrollable = (children) => scrollable ? /* @__PURE__ */ React43.createElement(ScrollArea, null, children) : children(null);
5249
+ const withScrollable = (children) => scrollable ? /* @__PURE__ */ React44.createElement(ScrollArea, null, children) : children(null);
5180
5250
  const getItemHeight = useCallback22(
5181
5251
  (index) => {
5182
5252
  const child = getItemContextValue(index);
@@ -5191,7 +5261,7 @@ var ListViewRootInner = forwardRefGeneric(function ListViewRootInner2({
5191
5261
  );
5192
5262
  const draggingContextValue = useMemo18(() => ({ indentation }), [indentation]);
5193
5263
  const gapStyle = useMemo18(() => ({ gap: `${gap}px` }), [gap]);
5194
- return /* @__PURE__ */ React43.createElement(ListViewDraggingContext.Provider, { value: draggingContextValue }, /* @__PURE__ */ React43.createElement(
5264
+ return /* @__PURE__ */ React44.createElement(ListViewDraggingContext.Provider, { value: draggingContextValue }, /* @__PURE__ */ React44.createElement(
5195
5265
  "div",
5196
5266
  {
5197
5267
  id,
@@ -5220,7 +5290,7 @@ var ListViewRootInner = forwardRefGeneric(function ListViewRootInner2({
5220
5290
  },
5221
5291
  data.length === 0 && renderEmptyState ? renderEmptyState() : withScrollable(
5222
5292
  (scrollElementRef) => withSortable(
5223
- virtualized ? /* @__PURE__ */ React43.createElement(
5293
+ virtualized ? /* @__PURE__ */ React44.createElement(
5224
5294
  VirtualizedList,
5225
5295
  {
5226
5296
  ref: forwardedRef,
@@ -5244,7 +5314,7 @@ var ChildrenListViewInner = forwardRef19(function ChildrenListViewInner2({ child
5244
5314
  ),
5245
5315
  [children]
5246
5316
  );
5247
- return /* @__PURE__ */ React43.createElement(
5317
+ return /* @__PURE__ */ React44.createElement(
5248
5318
  ListViewRoot,
5249
5319
  {
5250
5320
  ref: forwardedRef,
@@ -5258,19 +5328,19 @@ var ChildrenListViewInner = forwardRef19(function ChildrenListViewInner2({ child
5258
5328
  }
5259
5329
  );
5260
5330
  });
5261
- var ChildrenListView = memo17(ChildrenListViewInner);
5331
+ var ChildrenListView = memo18(ChildrenListViewInner);
5262
5332
  var SimpleListViewInner = forwardRefGeneric(function SimpleListViewInner2(props, forwardedRef) {
5263
5333
  if ("children" in props) {
5264
- return /* @__PURE__ */ React43.createElement(ChildrenListView, { ref: forwardedRef, ...props });
5334
+ return /* @__PURE__ */ React44.createElement(ChildrenListView, { ref: forwardedRef, ...props });
5265
5335
  } else {
5266
- return /* @__PURE__ */ React43.createElement(ListViewRoot, { ref: forwardedRef, ...props });
5336
+ return /* @__PURE__ */ React44.createElement(ListViewRoot, { ref: forwardedRef, ...props });
5267
5337
  }
5268
5338
  });
5269
5339
  var SimpleListView = memoGeneric(SimpleListViewInner);
5270
5340
  var ListView;
5271
5341
  ((ListView2) => {
5272
- ListView2.RowTitle = memo17(ListViewRowTitle);
5273
- ListView2.EditableRowTitle = memo17(ListViewEditableRowTitle);
5342
+ ListView2.RowTitle = memo18(ListViewRowTitle);
5343
+ ListView2.EditableRowTitle = memo18(ListViewEditableRowTitle);
5274
5344
  ListView2.Row = memoGeneric(ListViewRow);
5275
5345
  ListView2.Root = SimpleListView;
5276
5346
  ListView2.RowContext = ListRowContext;
@@ -5287,7 +5357,7 @@ var ListView;
5287
5357
  })(ListView || (ListView = {}));
5288
5358
 
5289
5359
  // src/components/TreeView.tsx
5290
- import React44, { useCallback as useCallback23, useContext as useContext9 } from "react";
5360
+ import React45, { useCallback as useCallback23, useContext as useContext10 } from "react";
5291
5361
  var TreeRow = forwardRefGeneric(function TreeRow2({
5292
5362
  icon,
5293
5363
  expanded,
@@ -5296,7 +5366,7 @@ var TreeRow = forwardRefGeneric(function TreeRow2({
5296
5366
  children,
5297
5367
  ...rest
5298
5368
  }, forwardedRef) {
5299
- const { expandable } = useContext9(ListView.RowContext);
5369
+ const { expandable } = useContext10(ListView.RowContext);
5300
5370
  const handleClickChevron = useCallback23(
5301
5371
  (event) => {
5302
5372
  event.stopPropagation();
@@ -5304,7 +5374,7 @@ var TreeRow = forwardRefGeneric(function TreeRow2({
5304
5374
  },
5305
5375
  [onClickChevron]
5306
5376
  );
5307
- return /* @__PURE__ */ React44.createElement(ListView.Row, { ref: forwardedRef, ...rest }, expandable && /* @__PURE__ */ React44.createElement(React44.Fragment, null, expanded === void 0 ? /* @__PURE__ */ React44.createElement(Spacer.Horizontal, { size: 19 }) : /* @__PURE__ */ React44.createElement(
5377
+ return /* @__PURE__ */ React45.createElement(ListView.Row, { ref: forwardedRef, ...rest }, expandable && /* @__PURE__ */ React45.createElement(React45.Fragment, null, expanded === void 0 ? /* @__PURE__ */ React45.createElement(Spacer.Horizontal, { size: 19 }) : /* @__PURE__ */ React45.createElement(
5308
5378
  IconButton,
5309
5379
  {
5310
5380
  className: chevronClassName,
@@ -5312,7 +5382,7 @@ var TreeRow = forwardRefGeneric(function TreeRow2({
5312
5382
  onClick: handleClickChevron,
5313
5383
  selected: rest.selected
5314
5384
  }
5315
- ), /* @__PURE__ */ React44.createElement(Spacer.Horizontal, { size: 6 })), icon && /* @__PURE__ */ React44.createElement(React44.Fragment, null, renderIcon(icon), /* @__PURE__ */ React44.createElement(Spacer.Horizontal, { size: 10 })), children);
5385
+ ), /* @__PURE__ */ React45.createElement(Spacer.Horizontal, { size: 6 })), icon && /* @__PURE__ */ React45.createElement(React45.Fragment, null, renderIcon(icon), /* @__PURE__ */ React45.createElement(Spacer.Horizontal, { size: 10 })), children);
5316
5386
  });
5317
5387
  var TreeView;
5318
5388
  ((TreeView2) => {
@@ -5404,7 +5474,7 @@ var List = memoGeneric(
5404
5474
  setRenamingId(id);
5405
5475
  }
5406
5476
  }));
5407
- return /* @__PURE__ */ React45.createElement(
5477
+ return /* @__PURE__ */ React46.createElement(
5408
5478
  ViewComponent.Root,
5409
5479
  {
5410
5480
  variant: "bare",
@@ -5447,7 +5517,7 @@ var List = memoGeneric(
5447
5517
  handleSelect(id);
5448
5518
  }
5449
5519
  };
5450
- const action = (isHovered || isSelected) && !isRenaming && (typeof renderAction === "function" ? renderAction({ item, selected: isSelected, onOpenChange }) : renderAction === "menu" && menuItems && /* @__PURE__ */ React45.createElement(
5520
+ const action = (isHovered || isSelected) && !isRenaming && (typeof renderAction === "function" ? renderAction({ item, selected: isSelected, onOpenChange }) : renderAction === "menu" && menuItems && /* @__PURE__ */ React46.createElement(
5451
5521
  ActionMenu,
5452
5522
  {
5453
5523
  menuItems,
@@ -5463,7 +5533,7 @@ var List = memoGeneric(
5463
5533
  ));
5464
5534
  const end = action || detailPosition === "end" && renderDetail?.(item, isSelected);
5465
5535
  const below = detailPosition === "below" && renderDetail?.(item, isSelected);
5466
- return /* @__PURE__ */ React45.createElement(
5536
+ return /* @__PURE__ */ React46.createElement(
5467
5537
  ViewComponent.Row,
5468
5538
  {
5469
5539
  id,
@@ -5511,12 +5581,12 @@ var List = memoGeneric(
5511
5581
  },
5512
5582
  dragIndicatorStyle
5513
5583
  },
5514
- /* @__PURE__ */ React45.createElement(
5584
+ /* @__PURE__ */ React46.createElement(
5515
5585
  "div",
5516
5586
  {
5517
5587
  className: cx("flex flex-1 items-center px-2", rowGapMap[size2])
5518
5588
  },
5519
- thumbnail && /* @__PURE__ */ React45.createElement(
5589
+ thumbnail && /* @__PURE__ */ React46.createElement(
5520
5590
  "div",
5521
5591
  {
5522
5592
  className: cx(
@@ -5529,7 +5599,7 @@ var List = memoGeneric(
5529
5599
  },
5530
5600
  thumbnail
5531
5601
  ),
5532
- /* @__PURE__ */ React45.createElement("div", { className: "flex flex-col flex-1 w-0" }, /* @__PURE__ */ React45.createElement("div", { className: "flex items-center min-h-input-height flex-1 gap-2" }, /* @__PURE__ */ React45.createElement("div", { className: "flex-1 w-0 flex items-center", tabIndex: -1 }, isRenaming ? /* @__PURE__ */ React45.createElement(
5602
+ /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col flex-1 w-0" }, /* @__PURE__ */ React46.createElement("div", { className: "flex items-center min-h-input-height flex-1 gap-2" }, /* @__PURE__ */ React46.createElement("div", { className: "flex-1 w-0 flex items-center", tabIndex: -1 }, isRenaming ? /* @__PURE__ */ React46.createElement(
5533
5603
  ViewComponent.EditableRowTitle,
5534
5604
  {
5535
5605
  value: getName(item),
@@ -5544,7 +5614,7 @@ var List = memoGeneric(
5544
5614
  e.stopPropagation();
5545
5615
  }
5546
5616
  }
5547
- ) : /* @__PURE__ */ React45.createElement(
5617
+ ) : /* @__PURE__ */ React46.createElement(
5548
5618
  ViewComponent.RowTitle,
5549
5619
  {
5550
5620
  className: cx(
@@ -5553,8 +5623,8 @@ var List = memoGeneric(
5553
5623
  )
5554
5624
  },
5555
5625
  getName(item)
5556
- )), end && detailPosition === "end" && /* @__PURE__ */ React45.createElement(DetailContainer, { selected: isSelected }, end)), below && /* @__PURE__ */ React45.createElement(DetailContainer, { selected: isSelected }, below)),
5557
- end && detailPosition === "below" && /* @__PURE__ */ React45.createElement(DetailContainer, { selected: isSelected }, end)
5626
+ )), end && detailPosition === "end" && /* @__PURE__ */ React46.createElement(DetailContainer, { selected: isSelected }, end)), below && /* @__PURE__ */ React46.createElement(DetailContainer, { selected: isSelected }, below)),
5627
+ end && detailPosition === "below" && /* @__PURE__ */ React46.createElement(DetailContainer, { selected: isSelected }, end)
5558
5628
  )
5559
5629
  );
5560
5630
  }
@@ -5562,11 +5632,11 @@ var List = memoGeneric(
5562
5632
  );
5563
5633
  })
5564
5634
  );
5565
- var DetailContainer = memo18(function DetailContainer2({
5635
+ var DetailContainer = memo19(function DetailContainer2({
5566
5636
  children,
5567
5637
  selected
5568
5638
  }) {
5569
- return /* @__PURE__ */ React45.createElement(
5639
+ return /* @__PURE__ */ React46.createElement(
5570
5640
  "div",
5571
5641
  {
5572
5642
  className: cx("flex items-center gap-2", selected && "text-primary"),
@@ -5611,11 +5681,11 @@ var fontStyleMap = {
5611
5681
  // src/components/Collection.tsx
5612
5682
  var Collection = forwardRefGeneric(function Collection2(props, ref) {
5613
5683
  const { viewType, ...rest } = props;
5614
- return viewType === "grid" ? /* @__PURE__ */ React46.createElement(Grid, { ref, ...rest }) : /* @__PURE__ */ React46.createElement(List, { ref, ...rest });
5684
+ return viewType === "grid" ? /* @__PURE__ */ React47.createElement(Grid, { ref, ...rest }) : /* @__PURE__ */ React47.createElement(List, { ref, ...rest });
5615
5685
  });
5616
5686
 
5617
5687
  // src/components/ColorSwatch.tsx
5618
- import React47, { forwardRef as forwardRef20 } from "react";
5688
+ import React48, { forwardRef as forwardRef20 } from "react";
5619
5689
  var colorSwatchSizeMap = {
5620
5690
  xsmall: 21,
5621
5691
  small: 27,
@@ -5624,7 +5694,7 @@ var colorSwatchSizeMap = {
5624
5694
  };
5625
5695
  var ColorSwatch = forwardRef20(function ColorSwatch2({ color, size: size2 = "small", checked, style: style2, ...props }, ref) {
5626
5696
  const sizePx = colorSwatchSizeMap[size2];
5627
- return /* @__PURE__ */ React47.createElement(
5697
+ return /* @__PURE__ */ React48.createElement(
5628
5698
  "button",
5629
5699
  {
5630
5700
  ...props,
@@ -5634,9 +5704,9 @@ var ColorSwatch = forwardRef20(function ColorSwatch2({ color, size: size2 = "sma
5634
5704
  width: sizePx,
5635
5705
  height: sizePx,
5636
5706
  borderRadius: "4px",
5637
- outline: checked ? "2px solid rgba(0,0,0,0.2)" : "1px solid rgba(0,0,0,0.1)",
5707
+ outline: checked ? `2px solid ${cssVars.colors.primary}` : "1px solid rgba(0,0,0,0.1)",
5638
5708
  outlineOffset: -1,
5639
- boxShadow: checked ? `inset 0 0 0 2px rgba(0,0,0,0.2)` : void 0,
5709
+ boxShadow: checked ? `inset 0 0 0 2px ${cssVars.colors.background}` : void 0,
5640
5710
  ...style2
5641
5711
  }
5642
5712
  }
@@ -5645,7 +5715,7 @@ var ColorSwatch = forwardRef20(function ColorSwatch2({ color, size: size2 = "sma
5645
5715
 
5646
5716
  // src/components/ColorSwatchControl.tsx
5647
5717
  import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
5648
- import React48, { useMemo as useMemo19 } from "react";
5718
+ import React49, { useMemo as useMemo19 } from "react";
5649
5719
  function ColorSwatchControl(props) {
5650
5720
  const {
5651
5721
  options,
@@ -5668,8 +5738,8 @@ function ColorSwatchControl(props) {
5668
5738
  ...style2
5669
5739
  };
5670
5740
  }, [size2, style2]);
5671
- const content = /* @__PURE__ */ React48.createElement("div", { className, id, style: styles3 }, options.map((option) => {
5672
- const item = /* @__PURE__ */ React48.createElement(
5741
+ const content = /* @__PURE__ */ React49.createElement("div", { className, id, style: styles3 }, options.map((option) => {
5742
+ const item = /* @__PURE__ */ React49.createElement(
5673
5743
  ColorSwatch,
5674
5744
  {
5675
5745
  key: option,
@@ -5682,23 +5752,25 @@ function ColorSwatchControl(props) {
5682
5752
  checked: value === option
5683
5753
  }
5684
5754
  );
5685
- return readOnly ? item : /* @__PURE__ */ React48.createElement(
5755
+ return /* @__PURE__ */ React49.createElement(
5686
5756
  ToggleGroupPrimitive.Item,
5687
5757
  {
5688
5758
  asChild: true,
5689
5759
  value: option,
5690
- key: option
5760
+ key: option,
5761
+ disabled: readOnly
5691
5762
  },
5692
5763
  item
5693
5764
  );
5694
5765
  }));
5695
- return readOnly ? content : /* @__PURE__ */ React48.createElement(
5766
+ return /* @__PURE__ */ React49.createElement(
5696
5767
  ToggleGroupPrimitive.Root,
5697
5768
  {
5698
5769
  type: "single",
5699
5770
  value,
5700
5771
  onValueChange,
5701
- className: "w-full"
5772
+ className: "w-full",
5773
+ disabled: readOnly
5702
5774
  },
5703
5775
  content
5704
5776
  );
@@ -5706,7 +5778,7 @@ function ColorSwatchControl(props) {
5706
5778
 
5707
5779
  // src/components/Combobox.tsx
5708
5780
  import { DropdownChevronIcon as DropdownChevronIcon2 } from "@noya-app/noya-icons";
5709
- import React50, {
5781
+ import React51, {
5710
5782
  useCallback as useCallback24,
5711
5783
  useEffect as useEffect16,
5712
5784
  useImperativeHandle as useImperativeHandle6,
@@ -6047,8 +6119,8 @@ function useComboboxState(state) {
6047
6119
  }
6048
6120
 
6049
6121
  // src/components/ComboboxMenu.tsx
6050
- import { CheckIcon as CheckIcon2 } from "@noya-app/noya-icons";
6051
- import React49 from "react";
6122
+ import { CheckIcon } from "@noya-app/noya-icons";
6123
+ import React50 from "react";
6052
6124
  var ComboboxMenu = memoGeneric(
6053
6125
  forwardRefGeneric(function ComboboxMenu2({
6054
6126
  items,
@@ -6060,7 +6132,7 @@ var ComboboxMenu = memoGeneric(
6060
6132
  indented,
6061
6133
  iconPosition = "right"
6062
6134
  }, forwardedRef) {
6063
- return /* @__PURE__ */ React49.createElement(
6135
+ return /* @__PURE__ */ React50.createElement(
6064
6136
  ListView.Root,
6065
6137
  {
6066
6138
  ref: forwardedRef,
@@ -6076,7 +6148,7 @@ var ComboboxMenu = memoGeneric(
6076
6148
  style: style2,
6077
6149
  renderItem: (item, i) => {
6078
6150
  if (item.type === "sectionHeader") {
6079
- return /* @__PURE__ */ React49.createElement(ListView.Row, { key: item.id, isSectionHeader: true }, indented && /* @__PURE__ */ React49.createElement(
6151
+ return /* @__PURE__ */ React50.createElement(ListView.Row, { key: item.id, isSectionHeader: true }, indented && /* @__PURE__ */ React50.createElement(
6080
6152
  Spacer.Horizontal,
6081
6153
  {
6082
6154
  size: CHECKBOX_WIDTH - CHECKBOX_RIGHT_INSET + CHECKBOX_INDENT_WIDTH
@@ -6087,7 +6159,7 @@ var ComboboxMenu = memoGeneric(
6087
6159
  item: typeof item.title === "string" ? item.title : item.value,
6088
6160
  itemScore: item
6089
6161
  });
6090
- return /* @__PURE__ */ React49.createElement(
6162
+ return /* @__PURE__ */ React50.createElement(
6091
6163
  ListView.Row,
6092
6164
  {
6093
6165
  key: item.value,
@@ -6100,12 +6172,12 @@ var ComboboxMenu = memoGeneric(
6100
6172
  }
6101
6173
  }
6102
6174
  },
6103
- /* @__PURE__ */ React49.createElement("div", { className: "flex flex-1 min-w-0 items-center" }, indented && /* @__PURE__ */ React49.createElement(Spacer.Horizontal, { size: CHECKBOX_INDENT_WIDTH }), item.checked ? /* @__PURE__ */ React49.createElement("div", { ...styles.itemIndicator }, /* @__PURE__ */ React49.createElement(CheckIcon2, null)) : indented ? /* @__PURE__ */ React49.createElement(
6175
+ /* @__PURE__ */ React50.createElement("div", { className: "flex flex-1 min-w-0 items-center" }, indented && /* @__PURE__ */ React50.createElement(Spacer.Horizontal, { size: CHECKBOX_INDENT_WIDTH }), item.checked ? /* @__PURE__ */ React50.createElement("div", { ...styles.itemIndicator }, /* @__PURE__ */ React50.createElement(CheckIcon, null)) : indented ? /* @__PURE__ */ React50.createElement(
6104
6176
  Spacer.Horizontal,
6105
6177
  {
6106
6178
  size: CHECKBOX_WIDTH - CHECKBOX_RIGHT_INSET
6107
6179
  }
6108
- ) : null, iconPosition === "left" && item.icon && /* @__PURE__ */ React49.createElement(React49.Fragment, null, renderIcon(item.icon), /* @__PURE__ */ React49.createElement(Spacer.Horizontal, { size: 8 })), tokens.map((token, j) => /* @__PURE__ */ React49.createElement(
6180
+ ) : null, iconPosition === "left" && item.icon && /* @__PURE__ */ React50.createElement(React50.Fragment, null, renderIcon(item.icon), /* @__PURE__ */ React50.createElement(Spacer.Horizontal, { size: 8 })), tokens.map((token, j) => /* @__PURE__ */ React50.createElement(
6109
6181
  "span",
6110
6182
  {
6111
6183
  key: `${item.value}-token-${j}`,
@@ -6116,7 +6188,7 @@ var ComboboxMenu = memoGeneric(
6116
6188
  },
6117
6189
  token.text
6118
6190
  ))),
6119
- (item.shortcut || item.icon && iconPosition === "right") && /* @__PURE__ */ React49.createElement(React49.Fragment, null, item.shortcut ? /* @__PURE__ */ React49.createElement(KeyboardShortcut, { shortcut: item.shortcut }) : item.icon && renderIcon(item.icon))
6191
+ (item.shortcut || item.icon && iconPosition === "right") && /* @__PURE__ */ React50.createElement(React50.Fragment, null, item.shortcut ? /* @__PURE__ */ React50.createElement(KeyboardShortcut, { shortcut: item.shortcut }) : item.icon && renderIcon(item.icon))
6120
6192
  );
6121
6193
  }
6122
6194
  }
@@ -6438,19 +6510,19 @@ var Combobox = memoGeneric(
6438
6510
  const hasCheckedItems = items.some(
6439
6511
  (item) => isSelectableMenuItem(item) && item.checked
6440
6512
  );
6441
- return /* @__PURE__ */ React50.createElement(
6513
+ return /* @__PURE__ */ React51.createElement(
6442
6514
  InputField2.Root,
6443
6515
  {
6444
6516
  id,
6445
6517
  size: size2,
6446
6518
  sideOffset: 6,
6447
- end: /* @__PURE__ */ React50.createElement(React50.Fragment, null, loading && /* @__PURE__ */ React50.createElement("div", { className: "pr-1.5" }, /* @__PURE__ */ React50.createElement(ActivityIndicator, null)), !readOnly && /* @__PURE__ */ React50.createElement(
6519
+ end: /* @__PURE__ */ React51.createElement(React51.Fragment, null, loading && /* @__PURE__ */ React51.createElement("div", { className: "pr-1.5" }, /* @__PURE__ */ React51.createElement(ActivityIndicator, null)), !readOnly && /* @__PURE__ */ React51.createElement(
6448
6520
  InputField2.Button,
6449
6521
  {
6450
6522
  variant: "floating",
6451
6523
  onClick: handleChevronClick
6452
6524
  },
6453
- /* @__PURE__ */ React50.createElement(
6525
+ /* @__PURE__ */ React51.createElement(
6454
6526
  DropdownChevronIcon2,
6455
6527
  {
6456
6528
  className: cx(
@@ -6469,7 +6541,7 @@ var Combobox = memoGeneric(
6469
6541
  ListView.rowHeight * 10.5
6470
6542
  );
6471
6543
  const listSize = { width, height };
6472
- return /* @__PURE__ */ React50.createElement(
6544
+ return /* @__PURE__ */ React51.createElement(
6473
6545
  "div",
6474
6546
  {
6475
6547
  className: cx(
@@ -6477,7 +6549,7 @@ var Combobox = memoGeneric(
6477
6549
  shouldShowMenu && !readOnly ? "flex" : "hidden"
6478
6550
  )
6479
6551
  },
6480
- filteredItems.length > 0 && !loading ? /* @__PURE__ */ React50.createElement(
6552
+ filteredItems.length > 0 && !loading ? /* @__PURE__ */ React51.createElement(
6481
6553
  ComboboxMenu,
6482
6554
  {
6483
6555
  ref: listRef,
@@ -6491,11 +6563,11 @@ var Combobox = memoGeneric(
6491
6563
  },
6492
6564
  indented: hasCheckedItems
6493
6565
  }
6494
- ) : /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col h-[50px] p-5 items-center justify-center" }, /* @__PURE__ */ React50.createElement(Small, { className: "text-text-disabled" }, loading ? "Loading..." : "No results"))
6566
+ ) : /* @__PURE__ */ React51.createElement("div", { className: "flex flex-col h-[50px] p-5 items-center justify-center" }, /* @__PURE__ */ React51.createElement(Small, { className: "text-text-disabled" }, loading ? "Loading..." : "No results"))
6495
6567
  );
6496
6568
  }
6497
6569
  },
6498
- /* @__PURE__ */ React50.createElement(
6570
+ /* @__PURE__ */ React51.createElement(
6499
6571
  InputField2.Input,
6500
6572
  {
6501
6573
  ref,
@@ -6520,7 +6592,7 @@ var Combobox = memoGeneric(
6520
6592
  ...readOnly ? { readOnly: true } : {}
6521
6593
  }
6522
6594
  ),
6523
- filter && typeaheadValue && typeaheadValue.toLowerCase().startsWith(filter.toLowerCase()) && /* @__PURE__ */ React50.createElement(
6595
+ filter && typeaheadValue && typeaheadValue.toLowerCase().startsWith(filter.toLowerCase()) && /* @__PURE__ */ React51.createElement(
6524
6596
  InputField2.Typeahead,
6525
6597
  {
6526
6598
  value: typeaheadValue,
@@ -6534,11 +6606,11 @@ var Combobox = memoGeneric(
6534
6606
  );
6535
6607
 
6536
6608
  // src/components/CommandPalette.tsx
6537
- import React53, { memo as memo20 } from "react";
6609
+ import React54, { memo as memo21 } from "react";
6538
6610
 
6539
6611
  // src/components/SearchCompletionMenu.tsx
6540
6612
  import { getCurrentPlatform as getCurrentPlatform2, handleKeyboardEvent } from "@noya-app/noya-keymap";
6541
- import React52, {
6613
+ import React53, {
6542
6614
  forwardRef as forwardRef21,
6543
6615
  useCallback as useCallback25,
6544
6616
  useEffect as useEffect17,
@@ -6549,15 +6621,15 @@ import React52, {
6549
6621
  } from "react";
6550
6622
 
6551
6623
  // src/components/Divider.tsx
6552
- import React51, { memo as memo19 } from "react";
6553
- var Divider = memo19(function Divider2({
6624
+ import React52, { memo as memo20 } from "react";
6625
+ var Divider = memo20(function Divider2({
6554
6626
  variant = "normal",
6555
6627
  overflow = 0,
6556
6628
  className,
6557
6629
  style: style2,
6558
6630
  ...props
6559
6631
  }) {
6560
- return /* @__PURE__ */ React51.createElement(
6632
+ return /* @__PURE__ */ React52.createElement(
6561
6633
  "div",
6562
6634
  {
6563
6635
  className: cx(
@@ -6577,14 +6649,14 @@ var Divider = memo19(function Divider2({
6577
6649
  }
6578
6650
  );
6579
6651
  });
6580
- var DividerVertical = memo19(function DividerVertical2({
6652
+ var DividerVertical = memo20(function DividerVertical2({
6581
6653
  variant = "normal",
6582
6654
  overflow = 0,
6583
6655
  className,
6584
6656
  style: style2,
6585
6657
  ...props
6586
6658
  }) {
6587
- return /* @__PURE__ */ React51.createElement(
6659
+ return /* @__PURE__ */ React52.createElement(
6588
6660
  "div",
6589
6661
  {
6590
6662
  className: cx(`
@@ -6618,7 +6690,7 @@ var SearchCompletionMenu = forwardRef21(function SearchCompletionMenu2({
6618
6690
  index: 0
6619
6691
  });
6620
6692
  const { index, search } = state;
6621
- const listRef = React52.useRef(null);
6693
+ const listRef = React53.useRef(null);
6622
6694
  const hasCheckedItems = items.some((item) => item.checked);
6623
6695
  useEffect17(() => {
6624
6696
  listRef.current?.scrollToIndex(index);
@@ -6697,7 +6769,7 @@ var SearchCompletionMenu = forwardRef21(function SearchCompletionMenu2({
6697
6769
  inputRef.current?.focus();
6698
6770
  }
6699
6771
  }));
6700
- return /* @__PURE__ */ React52.createElement("div", { ...elementSize, className: "flex flex-col overflow-hidden" }, /* @__PURE__ */ React52.createElement(InputField2.Root, { className: "flex flex-0" }, /* @__PURE__ */ React52.createElement(
6772
+ return /* @__PURE__ */ React53.createElement("div", { ...elementSize, className: "flex flex-col overflow-hidden" }, /* @__PURE__ */ React53.createElement(InputField2.Root, { className: "flex flex-0" }, /* @__PURE__ */ React53.createElement(
6701
6773
  InputField2.Input,
6702
6774
  {
6703
6775
  ref: inputRef,
@@ -6717,7 +6789,7 @@ var SearchCompletionMenu = forwardRef21(function SearchCompletionMenu2({
6717
6789
  onChange: setSearch,
6718
6790
  onKeyDown: handleKeyDown
6719
6791
  }
6720
- )), /* @__PURE__ */ React52.createElement(Divider, null), results.length > 0 ? /* @__PURE__ */ React52.createElement(
6792
+ )), /* @__PURE__ */ React53.createElement(Divider, null), results.length > 0 ? /* @__PURE__ */ React53.createElement(
6721
6793
  ComboboxMenu,
6722
6794
  {
6723
6795
  ref: listRef,
@@ -6732,29 +6804,29 @@ var SearchCompletionMenu = forwardRef21(function SearchCompletionMenu2({
6732
6804
  onHoverIndex: setIndex,
6733
6805
  indented: hasCheckedItems
6734
6806
  }
6735
- ) : /* @__PURE__ */ React52.createElement(
6807
+ ) : /* @__PURE__ */ React53.createElement(
6736
6808
  "div",
6737
6809
  {
6738
6810
  ...listSize,
6739
6811
  className: "flex flex-col p-20 items-center justify-center"
6740
6812
  },
6741
- /* @__PURE__ */ React52.createElement(Small, { color: "textDisabled" }, "No results")
6813
+ /* @__PURE__ */ React53.createElement(Small, { color: "textDisabled" }, "No results")
6742
6814
  ));
6743
6815
  });
6744
6816
 
6745
6817
  // src/components/CommandPalette.tsx
6746
- var CommandPalette = memo20(function CommandPalette2({
6818
+ var CommandPalette = memo21(function CommandPalette2({
6747
6819
  showCommandPalette,
6748
6820
  setShowCommandPalette,
6749
6821
  items,
6750
6822
  onSelect,
6751
6823
  onHover
6752
6824
  }) {
6753
- const menuRef = React53.useRef(null);
6754
- const handleClose = React53.useCallback(() => {
6825
+ const menuRef = React54.useRef(null);
6826
+ const handleClose = React54.useCallback(() => {
6755
6827
  setShowCommandPalette(false);
6756
6828
  }, [setShowCommandPalette]);
6757
- return /* @__PURE__ */ React53.createElement(
6829
+ return /* @__PURE__ */ React54.createElement(
6758
6830
  Dialog,
6759
6831
  {
6760
6832
  style: {
@@ -6780,7 +6852,7 @@ var CommandPalette = memo20(function CommandPalette2({
6780
6852
  }, 0);
6781
6853
  }
6782
6854
  },
6783
- /* @__PURE__ */ React53.createElement("div", { className: "flex flex-col flex-1" }, /* @__PURE__ */ React53.createElement(AutoSizer, null, (size2) => /* @__PURE__ */ React53.createElement(
6855
+ /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col flex-1" }, /* @__PURE__ */ React54.createElement(AutoSizer, null, (size2) => /* @__PURE__ */ React54.createElement(
6784
6856
  SearchCompletionMenu,
6785
6857
  {
6786
6858
  ref: menuRef,
@@ -6796,14 +6868,14 @@ var CommandPalette = memo20(function CommandPalette2({
6796
6868
 
6797
6869
  // src/components/connected-users-menu/ConnectedUsersMenuLayout.tsx
6798
6870
  import { ChatBubbleWithDotsIcon } from "@noya-app/noya-icons";
6799
- import React54 from "react";
6800
- var UserAvatar = ({ userId, name, image }) => /* @__PURE__ */ React54.createElement(
6871
+ import React55 from "react";
6872
+ var UserAvatar = ({ userId, name, image }) => /* @__PURE__ */ React55.createElement(
6801
6873
  Tooltip,
6802
6874
  {
6803
6875
  key: userId,
6804
- content: /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React54.createElement(Small, null, name))
6876
+ content: /* @__PURE__ */ React55.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React55.createElement(Small, null, name))
6805
6877
  },
6806
- /* @__PURE__ */ React54.createElement(Avatar, { size: INPUT_HEIGHT, userId, name, image })
6878
+ /* @__PURE__ */ React55.createElement(Avatar, { size: INPUT_HEIGHT, userId, name, image })
6807
6879
  );
6808
6880
  var ConnectedUsersMenuLayout = ({
6809
6881
  renderUsers,
@@ -6811,12 +6883,12 @@ var ConnectedUsersMenuLayout = ({
6811
6883
  launchAIAssistant,
6812
6884
  isAssistantOpen
6813
6885
  }) => {
6814
- return /* @__PURE__ */ React54.createElement("div", { className: "flex gap-1.5" }, /* @__PURE__ */ React54.createElement(AvatarStack, { size: INPUT_HEIGHT, className: "mr-1" }, renderUsers()), launchAIAssistant && /* @__PURE__ */ React54.createElement(
6886
+ return /* @__PURE__ */ React55.createElement("div", { className: "flex gap-1.5" }, /* @__PURE__ */ React55.createElement(AvatarStack, { size: INPUT_HEIGHT, className: "mr-1" }, renderUsers()), launchAIAssistant && /* @__PURE__ */ React55.createElement(
6815
6887
  Tooltip,
6816
6888
  {
6817
- content: /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React54.createElement(Small, null, "AI Assistant"))
6889
+ content: /* @__PURE__ */ React55.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React55.createElement(Small, null, "AI Assistant"))
6818
6890
  },
6819
- /* @__PURE__ */ React54.createElement(
6891
+ /* @__PURE__ */ React55.createElement(
6820
6892
  Button_default,
6821
6893
  {
6822
6894
  variant: isAssistantOpen ? "secondary" : void 0,
@@ -6825,44 +6897,28 @@ var ConnectedUsersMenuLayout = ({
6825
6897
  backgroundColor: isAssistantOpen ? colorFromString(currentUserId ?? "") : void 0
6826
6898
  }
6827
6899
  },
6828
- "AI",
6829
- /* @__PURE__ */ React54.createElement(Spacer.Horizontal, { size: 8 }),
6830
- /* @__PURE__ */ React54.createElement(
6900
+ /* @__PURE__ */ React55.createElement(
6831
6901
  ChatBubbleWithDotsIcon,
6832
6902
  {
6833
6903
  color: isAssistantOpen ? void 0 : cssVars.colors.icon
6834
6904
  }
6835
- )
6905
+ ),
6906
+ /* @__PURE__ */ React55.createElement(Spacer.Horizontal, { inline: true, size: 6 }),
6907
+ "AI"
6836
6908
  )
6837
6909
  ));
6838
6910
  };
6839
6911
 
6840
6912
  // src/components/DraggableMenuButton.tsx
6841
6913
  import { DragHandleDots2Icon } from "@noya-app/noya-icons";
6842
- import React55, { forwardRef as forwardRef22, useCallback as useCallback26, useState as useState25 } from "react";
6843
- var DotButton = forwardRef22(({ className, ...props }, ref) => /* @__PURE__ */ React55.createElement(
6844
- "div",
6845
- {
6846
- ref,
6847
- className: cx(
6848
- `cursor-pointer rounded flex items-center justify-center py-[2px] hover:bg-input-background-light active:bg-active-background `,
6849
- className
6850
- ),
6851
- ...props
6852
- }
6853
- ));
6854
- var Trigger5 = forwardRef22(({ className, ...props }, ref) => /* @__PURE__ */ React55.createElement(
6855
- "div",
6856
- {
6857
- ref,
6858
- className: cx(`pointer-events-none h-[15px] `, className),
6859
- ...props
6860
- }
6861
- ));
6914
+ import React56, { useCallback as useCallback26, useState as useState25 } from "react";
6862
6915
  var DraggableMenuButton = memoGeneric(function DraggableMenuButton2({
6863
6916
  items,
6864
6917
  onSelect,
6865
- isVisible = true
6918
+ onClick,
6919
+ isVisible = true,
6920
+ className,
6921
+ style: style2
6866
6922
  }) {
6867
6923
  const [open, setOpen] = useState25(false);
6868
6924
  const [downPosition, setDownPosition] = useState25(null);
@@ -6901,17 +6957,23 @@ var DraggableMenuButton = memoGeneric(function DraggableMenuButton2({
6901
6957
  },
6902
6958
  [setOpen]
6903
6959
  );
6904
- return /* @__PURE__ */ React55.createElement(
6905
- DotButton,
6960
+ return /* @__PURE__ */ React56.createElement(
6961
+ "div",
6906
6962
  {
6963
+ className: cx(
6964
+ "cursor-pointer rounded flex items-center justify-center py-[2px] hover:bg-input-background-light active:bg-active-background ",
6965
+ className
6966
+ ),
6967
+ style: style2,
6907
6968
  onPointerDownCapture: handlePointerDownCapture,
6908
6969
  onPointerUp: handlePointerUp,
6909
6970
  onClick: (event) => {
6910
6971
  event.stopPropagation();
6911
6972
  event.preventDefault();
6973
+ onClick?.();
6912
6974
  }
6913
6975
  },
6914
- items && onSelect ? /* @__PURE__ */ React55.createElement(
6976
+ items && onSelect ? /* @__PURE__ */ React56.createElement(
6915
6977
  DropdownMenu,
6916
6978
  {
6917
6979
  open,
@@ -6920,13 +6982,13 @@ var DraggableMenuButton = memoGeneric(function DraggableMenuButton2({
6920
6982
  onSelect,
6921
6983
  shouldBindKeyboardShortcuts: false
6922
6984
  },
6923
- /* @__PURE__ */ React55.createElement(Trigger5, null, /* @__PURE__ */ React55.createElement(
6985
+ /* @__PURE__ */ React56.createElement("div", { className: "pointer-events-none h-[15px]" }, /* @__PURE__ */ React56.createElement(
6924
6986
  DragHandleDots2Icon,
6925
6987
  {
6926
6988
  color: isVisible || open ? cssVars.colors.icon : "transparent"
6927
6989
  }
6928
6990
  ))
6929
- ) : /* @__PURE__ */ React55.createElement(
6991
+ ) : /* @__PURE__ */ React56.createElement(
6930
6992
  DragHandleDots2Icon,
6931
6993
  {
6932
6994
  color: isVisible || open ? cssVars.colors.icon : "transparent"
@@ -6937,10 +6999,10 @@ var DraggableMenuButton = memoGeneric(function DraggableMenuButton2({
6937
6999
 
6938
7000
  // src/components/Drawer.tsx
6939
7001
  import * as Dialog3 from "@radix-ui/react-dialog";
6940
- import * as React56 from "react";
7002
+ import * as React57 from "react";
6941
7003
  import { useImperativeHandle as useImperativeHandle8 } from "react";
6942
- var Drawer = React56.memo(
6943
- React56.forwardRef(function Drawer2({
7004
+ var Drawer = React57.memo(
7005
+ React57.forwardRef(function Drawer2({
6944
7006
  open,
6945
7007
  onOpenChange,
6946
7008
  trigger,
@@ -6970,7 +7032,7 @@ var Drawer = React56.memo(
6970
7032
  return internalOpen;
6971
7033
  }
6972
7034
  }));
6973
- const inner = /* @__PURE__ */ React56.createElement(React56.Fragment, null, /* @__PURE__ */ React56.createElement(
7035
+ const inner = /* @__PURE__ */ React57.createElement(React57.Fragment, null, /* @__PURE__ */ React57.createElement(
6974
7036
  Dialog3.Overlay,
6975
7037
  {
6976
7038
  className: cx(
@@ -6978,7 +7040,7 @@ var Drawer = React56.memo(
6978
7040
  positioning === "absolute" ? "absolute" : "fixed"
6979
7041
  )
6980
7042
  }
6981
- ), /* @__PURE__ */ React56.createElement(
7043
+ ), /* @__PURE__ */ React57.createElement(
6982
7044
  Dialog3.Content,
6983
7045
  {
6984
7046
  id,
@@ -6990,24 +7052,24 @@ var Drawer = React56.memo(
6990
7052
  className
6991
7053
  )
6992
7054
  },
6993
- title && /* @__PURE__ */ React56.createElement(Dialog3.Title, null, title),
7055
+ title && /* @__PURE__ */ React57.createElement(Dialog3.Title, null, title),
6994
7056
  children
6995
7057
  ));
6996
- return /* @__PURE__ */ React56.createElement(
7058
+ return /* @__PURE__ */ React57.createElement(
6997
7059
  Dialog3.Root,
6998
7060
  {
6999
7061
  key: "dialog",
7000
7062
  open: internalOpen,
7001
7063
  onOpenChange: setInternalOpen
7002
7064
  },
7003
- /* @__PURE__ */ React56.createElement(Dialog3.Trigger, { key: "trigger" }, trigger),
7004
- portalled ? /* @__PURE__ */ React56.createElement(Dialog3.Portal, { container: portalContainer }, inner) : inner
7065
+ /* @__PURE__ */ React57.createElement(Dialog3.Trigger, { key: "trigger" }, trigger),
7066
+ portalled ? /* @__PURE__ */ React57.createElement(Dialog3.Portal, { container: portalContainer }, inner) : inner
7005
7067
  );
7006
7068
  })
7007
7069
  );
7008
7070
 
7009
7071
  // src/components/Fade.tsx
7010
- import React57 from "react";
7072
+ import React58 from "react";
7011
7073
  var Fade = ({
7012
7074
  children,
7013
7075
  direction = "right",
@@ -7029,7 +7091,7 @@ var Fade = ({
7029
7091
  top: "left-0 right-0 top-0",
7030
7092
  bottom: "left-0 right-0 bottom-0"
7031
7093
  }[direction];
7032
- return /* @__PURE__ */ React57.createElement("div", { className: cx("relative", className), style: { height } }, position === "front" ? children : null, /* @__PURE__ */ React57.createElement(
7094
+ return /* @__PURE__ */ React58.createElement("div", { className: cx("relative", className), style: { height } }, position === "front" ? children : null, /* @__PURE__ */ React58.createElement(
7033
7095
  "div",
7034
7096
  {
7035
7097
  className: cx(
@@ -7048,17 +7110,17 @@ var Fade = ({
7048
7110
  };
7049
7111
 
7050
7112
  // src/components/file-explorer/FileExplorerLayout.tsx
7051
- import React58 from "react";
7113
+ import React59 from "react";
7052
7114
  var FileExplorerLayout = ({
7053
7115
  children,
7054
7116
  className,
7055
7117
  ...props
7056
- }) => /* @__PURE__ */ React58.createElement(Section, { className: cx(className, "px-3 flex-1"), ...props }, children);
7118
+ }) => /* @__PURE__ */ React59.createElement(Section, { className: cx(className, "px-3 flex-1"), ...props }, children);
7057
7119
  var FileExplorerUploadButton = ({
7058
7120
  showUploadButton,
7059
7121
  onUpload,
7060
7122
  children
7061
- }) => /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-2" }, showUploadButton && /* @__PURE__ */ React58.createElement(
7123
+ }) => /* @__PURE__ */ React59.createElement("div", { className: "flex items-center gap-2" }, showUploadButton && /* @__PURE__ */ React59.createElement(
7062
7124
  IconButton,
7063
7125
  {
7064
7126
  iconName: "UploadIcon",
@@ -7069,14 +7131,14 @@ var FileExplorerUploadButton = ({
7069
7131
  ), children);
7070
7132
  var FileExplorerCollection = forwardRefGeneric(
7071
7133
  function FileExplorerCollection2({ ...props }, ref) {
7072
- return /* @__PURE__ */ React58.createElement(Collection, { ref, className: "-mx-3 flex-1", ...props });
7134
+ return /* @__PURE__ */ React59.createElement(Collection, { ref, className: "-mx-3 flex-1", ...props });
7073
7135
  }
7074
7136
  );
7075
7137
  var FileExplorerDetail = ({
7076
7138
  selected,
7077
7139
  size: size2,
7078
7140
  children
7079
- }) => /* @__PURE__ */ React58.createElement(
7141
+ }) => /* @__PURE__ */ React59.createElement(
7080
7142
  "span",
7081
7143
  {
7082
7144
  className: cx(
@@ -7089,10 +7151,10 @@ var FileExplorerDetail = ({
7089
7151
  var FileExplorerEmptyState = ({
7090
7152
  label = "No files",
7091
7153
  ...props
7092
- }) => /* @__PURE__ */ React58.createElement(Banner, { label, className: "mx-3", ...props });
7154
+ }) => /* @__PURE__ */ React59.createElement(Banner, { label, className: "mx-3", ...props });
7093
7155
 
7094
7156
  // src/components/FillInputField.tsx
7095
- import React61, { forwardRef as forwardRef24, memo as memo24 } from "react";
7157
+ import React62, { forwardRef as forwardRef23, memo as memo25 } from "react";
7096
7158
 
7097
7159
  // ../noya-file-format/src/types.ts
7098
7160
  var types_exports = {};
@@ -7417,25 +7479,25 @@ var ClassValue = /* @__PURE__ */ ((ClassValue2) => {
7417
7479
  })(ClassValue || {});
7418
7480
 
7419
7481
  // src/components/FillPreviewBackground.tsx
7420
- import * as React60 from "react";
7482
+ import * as React61 from "react";
7421
7483
 
7422
7484
  // src/contexts/ImageDataContext.tsx
7423
- import * as React59 from "react";
7424
- var ImageDataContext = React59.createContext(
7485
+ import * as React60 from "react";
7486
+ var ImageDataContext = React60.createContext(
7425
7487
  void 0
7426
7488
  );
7427
- var ImageDataProvider = React59.memo(function ImageDataProvider2({
7489
+ var ImageDataProvider = React60.memo(function ImageDataProvider2({
7428
7490
  children,
7429
7491
  getImageData
7430
7492
  }) {
7431
- const contextValue = React59.useMemo(
7493
+ const contextValue = React60.useMemo(
7432
7494
  () => ({ getImageData: getImageData ?? (() => void 0) }),
7433
7495
  [getImageData]
7434
7496
  );
7435
- return /* @__PURE__ */ React59.createElement(ImageDataContext.Provider, { value: contextValue }, children);
7497
+ return /* @__PURE__ */ React60.createElement(ImageDataContext.Provider, { value: contextValue }, children);
7436
7498
  });
7437
7499
  function useImageData(ref) {
7438
- const value = React59.useContext(ImageDataContext);
7500
+ const value = React60.useContext(ImageDataContext);
7439
7501
  if (!value) {
7440
7502
  throw new Error("Missing ImageDataProvider");
7441
7503
  }
@@ -7505,10 +7567,10 @@ var dotsHorizontalSvg = (fillColor) => `
7505
7567
  <path d='M3.625 7.5C3.625 8.12132 3.12132 8.625 2.5 8.625C1.87868 8.625 1.375 8.12132 1.375 7.5C1.375 6.87868 1.87868 6.375 2.5 6.375C3.12132 6.375 3.625 6.87868 3.625 7.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM12.5 8.625C13.1213 8.625 13.625 8.12132 13.625 7.5C13.625 6.87868 13.1213 6.375 12.5 6.375C11.8787 6.375 11.375 6.87868 11.375 7.5C11.375 8.12132 11.8787 8.625 12.5 8.625Z'></path>
7506
7568
  </svg>
7507
7569
  `;
7508
- var Background = React60.memo(function Background2({
7570
+ var Background = React61.memo(function Background2({
7509
7571
  background: background2
7510
7572
  }) {
7511
- return /* @__PURE__ */ React60.createElement(
7573
+ return /* @__PURE__ */ React61.createElement(
7512
7574
  "span",
7513
7575
  {
7514
7576
  className: `${background2 ? `bg-[${background2}]` : "bg-input-background"} absolute inset-0`
@@ -7527,7 +7589,7 @@ function getPatternSizeAndPosition(fillType, tileScale) {
7527
7589
  return "center / 100% 100%";
7528
7590
  }
7529
7591
  }
7530
- var PatternPreviewBackground = React60.memo(
7592
+ var PatternPreviewBackground = React61.memo(
7531
7593
  function PatternPreviewBackground2({
7532
7594
  fillType,
7533
7595
  tileScale,
@@ -7536,7 +7598,7 @@ var PatternPreviewBackground = React60.memo(
7536
7598
  const image = useImageData(imageRef);
7537
7599
  const url = useObjectURL(image);
7538
7600
  const size2 = getPatternSizeAndPosition(fillType, tileScale);
7539
- const background2 = React60.useMemo(
7601
+ const background2 = React61.useMemo(
7540
7602
  () => [
7541
7603
  size2,
7542
7604
  `url(${url})`,
@@ -7544,44 +7606,44 @@ var PatternPreviewBackground = React60.memo(
7544
7606
  ].join(" "),
7545
7607
  [fillType, size2, url]
7546
7608
  );
7547
- return /* @__PURE__ */ React60.createElement(Background, { background: background2 });
7609
+ return /* @__PURE__ */ React61.createElement(Background, { background: background2 });
7548
7610
  }
7549
7611
  );
7550
- var ColorPreviewBackground = React60.memo(function ColorPreviewBackground2({
7612
+ var ColorPreviewBackground = React61.memo(function ColorPreviewBackground2({
7551
7613
  color
7552
7614
  }) {
7553
- const background2 = React60.useMemo(
7615
+ const background2 = React61.useMemo(
7554
7616
  () => sketchColorToRgbaString(color),
7555
7617
  [color]
7556
7618
  );
7557
- return /* @__PURE__ */ React60.createElement(Background, { background: background2 });
7619
+ return /* @__PURE__ */ React61.createElement(Background, { background: background2 });
7558
7620
  });
7559
- var GradientPreviewBackground = React60.memo(
7621
+ var GradientPreviewBackground = React61.memo(
7560
7622
  function GradientPreviewBackground2({
7561
7623
  gradient
7562
7624
  }) {
7563
- const background2 = React60.useMemo(
7625
+ const background2 = React61.useMemo(
7564
7626
  () => getGradientBackground(gradient.stops, gradient.gradientType, 180),
7565
7627
  [gradient.gradientType, gradient.stops]
7566
7628
  );
7567
- return /* @__PURE__ */ React60.createElement(Background, { background: background2 });
7629
+ return /* @__PURE__ */ React61.createElement(Background, { background: background2 });
7568
7630
  }
7569
7631
  );
7570
7632
  var background = `center url("data:image/svg+xml;utf8,${dotsHorizontalSvg(
7571
7633
  cssVars.colors.placeholderDots
7572
7634
  )}") no-repeat`;
7573
- var FillPreviewBackground = React60.memo(function FillPreviewBackground2({
7635
+ var FillPreviewBackground = React61.memo(function FillPreviewBackground2({
7574
7636
  value
7575
7637
  }) {
7576
- if (!value) return /* @__PURE__ */ React60.createElement(Background, { background });
7638
+ if (!value) return /* @__PURE__ */ React61.createElement(Background, { background });
7577
7639
  switch (value._class) {
7578
7640
  case "color":
7579
- return /* @__PURE__ */ React60.createElement(ColorPreviewBackground, { color: value });
7641
+ return /* @__PURE__ */ React61.createElement(ColorPreviewBackground, { color: value });
7580
7642
  case "gradient":
7581
- return /* @__PURE__ */ React60.createElement(GradientPreviewBackground, { gradient: value });
7643
+ return /* @__PURE__ */ React61.createElement(GradientPreviewBackground, { gradient: value });
7582
7644
  case "pattern":
7583
7645
  if (!value.image) return null;
7584
- return /* @__PURE__ */ React60.createElement(
7646
+ return /* @__PURE__ */ React61.createElement(
7585
7647
  PatternPreviewBackground,
7586
7648
  {
7587
7649
  fillType: value.patternFillType,
@@ -7593,7 +7655,7 @@ var FillPreviewBackground = React60.memo(function FillPreviewBackground2({
7593
7655
  });
7594
7656
 
7595
7657
  // src/components/FillInputField.tsx
7596
- var FillButton = forwardRef24(({ className, ...props }, ref) => /* @__PURE__ */ React61.createElement(
7658
+ var FillButton = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React62.createElement(
7597
7659
  "button",
7598
7660
  {
7599
7661
  ref,
@@ -7604,14 +7666,14 @@ var FillButton = forwardRef24(({ className, ...props }, ref) => /* @__PURE__ */
7604
7666
  ...props
7605
7667
  }
7606
7668
  ));
7607
- var FillInputField = memo24(
7608
- forwardRef24(function FillInputField2({ id, value, ...rest }, ref) {
7609
- return /* @__PURE__ */ React61.createElement(FillButton, { ref, id, ...rest }, /* @__PURE__ */ React61.createElement(FillPreviewBackground, { value }));
7669
+ var FillInputField = memo25(
7670
+ forwardRef23(function FillInputField2({ id, value, ...rest }, ref) {
7671
+ return /* @__PURE__ */ React62.createElement(FillButton, { ref, id, ...rest }, /* @__PURE__ */ React62.createElement(FillPreviewBackground, { value }));
7610
7672
  })
7611
7673
  );
7612
7674
 
7613
7675
  // src/components/FloatingWindow.tsx
7614
- import React62, { useCallback as useCallback27, useRef as useRef22, useState as useState26 } from "react";
7676
+ import React63, { useCallback as useCallback27, useRef as useRef22, useState as useState26 } from "react";
7615
7677
  var styles2 = {
7616
7678
  noSelect: {
7617
7679
  userSelect: "none",
@@ -7704,7 +7766,7 @@ function defaultRenderToolbar({
7704
7766
  toolbarContent,
7705
7767
  onClose
7706
7768
  }) {
7707
- return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(Small, { className: "flex-1 font-medium text-text" }, title), toolbarContent, /* @__PURE__ */ React62.createElement(
7769
+ return /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(Small, { className: "flex-1 font-medium text-text" }, title), toolbarContent, /* @__PURE__ */ React63.createElement(
7708
7770
  IconButton,
7709
7771
  {
7710
7772
  iconName: "Cross3Icon",
@@ -7826,7 +7888,7 @@ var FloatingWindow = ({
7826
7888
  setResizeDirection(null);
7827
7889
  toggleGlobalTextSelection(false);
7828
7890
  }, []);
7829
- React62.useEffect(() => {
7891
+ React63.useEffect(() => {
7830
7892
  document.addEventListener("mousemove", handleMouseMove);
7831
7893
  document.addEventListener("mouseup", handleMouseUp);
7832
7894
  return () => {
@@ -7840,7 +7902,7 @@ var FloatingWindow = ({
7840
7902
  if (onClose) onClose();
7841
7903
  floatingWindowManager.closeWindow(currentFloatingWindow.id);
7842
7904
  }, [currentFloatingWindow.id, floatingWindowManager, onClose]);
7843
- return /* @__PURE__ */ React62.createElement(
7905
+ return /* @__PURE__ */ React63.createElement(
7844
7906
  "div",
7845
7907
  {
7846
7908
  ref: wrapperRef,
@@ -7855,7 +7917,7 @@ var FloatingWindow = ({
7855
7917
  zIndex: cssVars.zIndex.menu
7856
7918
  }
7857
7919
  },
7858
- /* @__PURE__ */ React62.createElement(
7920
+ /* @__PURE__ */ React63.createElement(
7859
7921
  "div",
7860
7922
  {
7861
7923
  style: {
@@ -7866,9 +7928,9 @@ var FloatingWindow = ({
7866
7928
  },
7867
7929
  renderToolbar({ title, toolbarContent, onClose: handleClose })
7868
7930
  ),
7869
- /* @__PURE__ */ React62.createElement(Divider, null),
7870
- /* @__PURE__ */ React62.createElement("div", { style: styles2.content }, children),
7871
- Object.entries(resizeHandlePositions).map(([direction, style2]) => /* @__PURE__ */ React62.createElement(
7931
+ /* @__PURE__ */ React63.createElement(Divider, null),
7932
+ /* @__PURE__ */ React63.createElement("div", { style: styles2.content }, children),
7933
+ Object.entries(resizeHandlePositions).map(([direction, style2]) => /* @__PURE__ */ React63.createElement(
7872
7934
  "div",
7873
7935
  {
7874
7936
  key: direction,
@@ -7890,8 +7952,8 @@ import {
7890
7952
  hsvaToRgba,
7891
7953
  rgbaToHsva as rgbaToHsva2
7892
7954
  } from "@noya-app/noya-colorpicker";
7893
- import * as React63 from "react";
7894
- var GradientPicker = React63.memo(function GradientPicker2({
7955
+ import * as React64 from "react";
7956
+ var GradientPicker = React64.memo(function GradientPicker2({
7895
7957
  value,
7896
7958
  selectedStop,
7897
7959
  onChangeColor,
@@ -7900,7 +7962,7 @@ var GradientPicker = React63.memo(function GradientPicker2({
7900
7962
  onDelete,
7901
7963
  onSelectStop
7902
7964
  }) {
7903
- const colorModel = React63.useMemo(
7965
+ const colorModel = React64.useMemo(
7904
7966
  () => ({
7905
7967
  defaultColor: { r: 0, g: 0, b: 0, a: 1 },
7906
7968
  toHsva: rgbaToHsva2,
@@ -7909,30 +7971,30 @@ var GradientPicker = React63.memo(function GradientPicker2({
7909
7971
  }),
7910
7972
  []
7911
7973
  );
7912
- const rgbaColor = React63.useMemo(
7974
+ const rgbaColor = React64.useMemo(
7913
7975
  () => sketchColorToRgba(value[selectedStop].color),
7914
7976
  [value, selectedStop]
7915
7977
  );
7916
- const handleChangeColor = React63.useCallback(
7978
+ const handleChangeColor = React64.useCallback(
7917
7979
  (value2) => {
7918
7980
  onChangeColor(rgbaToSketchColor(value2));
7919
7981
  },
7920
7982
  [onChangeColor]
7921
7983
  );
7922
- const handleAddGradientStop = React63.useCallback(
7984
+ const handleAddGradientStop = React64.useCallback(
7923
7985
  (value2, position) => {
7924
7986
  onAdd(rgbaToSketchColor(value2), position);
7925
7987
  },
7926
7988
  [onAdd]
7927
7989
  );
7928
- return /* @__PURE__ */ React63.createElement(
7990
+ return /* @__PURE__ */ React64.createElement(
7929
7991
  NoyaColorPicker,
7930
7992
  {
7931
7993
  onChange: handleChangeColor,
7932
7994
  colorModel,
7933
7995
  color: rgbaColor
7934
7996
  },
7935
- /* @__PURE__ */ React63.createElement(
7997
+ /* @__PURE__ */ React64.createElement(
7936
7998
  Gradient,
7937
7999
  {
7938
8000
  gradients: value,
@@ -7943,19 +8005,19 @@ var GradientPicker = React63.memo(function GradientPicker2({
7943
8005
  onDelete
7944
8006
  }
7945
8007
  ),
7946
- /* @__PURE__ */ React63.createElement(Spacer.Vertical, { size: 10 }),
7947
- /* @__PURE__ */ React63.createElement(Saturation, null),
7948
- /* @__PURE__ */ React63.createElement(Spacer.Vertical, { size: 12 }),
7949
- /* @__PURE__ */ React63.createElement(Hue, null),
7950
- /* @__PURE__ */ React63.createElement(Spacer.Vertical, { size: 5 }),
7951
- /* @__PURE__ */ React63.createElement(Alpha, null)
8008
+ /* @__PURE__ */ React64.createElement(Spacer.Vertical, { size: 10 }),
8009
+ /* @__PURE__ */ React64.createElement(Saturation, null),
8010
+ /* @__PURE__ */ React64.createElement(Spacer.Vertical, { size: 12 }),
8011
+ /* @__PURE__ */ React64.createElement(Hue, null),
8012
+ /* @__PURE__ */ React64.createElement(Spacer.Vertical, { size: 5 }),
8013
+ /* @__PURE__ */ React64.createElement(Alpha, null)
7952
8014
  );
7953
8015
  });
7954
8016
 
7955
8017
  // src/components/InspectorContainer.tsx
7956
- import React64, { forwardRef as forwardRef25, memo as memo26 } from "react";
7957
- var InspectorContainer = memo26(
7958
- forwardRef25(function InspectorContainer2({
8018
+ import React65, { forwardRef as forwardRef24, memo as memo27 } from "react";
8019
+ var InspectorContainer = memo27(
8020
+ forwardRef24(function InspectorContainer2({
7959
8021
  header,
7960
8022
  children,
7961
8023
  fallback,
@@ -7964,7 +8026,7 @@ var InspectorContainer = memo26(
7964
8026
  className,
7965
8027
  style: style2
7966
8028
  }, forwardedRef) {
7967
- return /* @__PURE__ */ React64.createElement(
8029
+ return /* @__PURE__ */ React65.createElement(
7968
8030
  "div",
7969
8031
  {
7970
8032
  ref: forwardedRef,
@@ -7979,32 +8041,32 @@ var InspectorContainer = memo26(
7979
8041
  }
7980
8042
  },
7981
8043
  header,
7982
- children ? /* @__PURE__ */ React64.createElement(ScrollArea, null, /* @__PURE__ */ React64.createElement("div", { className: "flex flex-col relative" }, showDividers ? withSeparatorElements(children, /* @__PURE__ */ React64.createElement(Divider, null)) : children)) : fallback ? /* @__PURE__ */ React64.createElement("div", { className: "flex flex-col relative h-full" }, fallback) : null
8044
+ children ? /* @__PURE__ */ React65.createElement(ScrollArea, null, /* @__PURE__ */ React65.createElement("div", { className: "flex flex-col relative" }, showDividers ? withSeparatorElements(children, /* @__PURE__ */ React65.createElement(Divider, null)) : children)) : fallback ? /* @__PURE__ */ React65.createElement("div", { className: "flex flex-col relative h-full" }, fallback) : null
7983
8045
  );
7984
8046
  })
7985
8047
  );
7986
8048
 
7987
8049
  // src/components/LabeledElementView.tsx
7988
8050
  import * as kiwi from "kiwi.js";
7989
- import * as React65 from "react";
7990
- var LabeledElementView = React65.memo(function LabeledElementView2({
8051
+ import * as React66 from "react";
8052
+ var LabeledElementView = React66.memo(function LabeledElementView2({
7991
8053
  children,
7992
8054
  renderLabel
7993
8055
  }) {
7994
- const elementIds = React65.Children.toArray(children).flatMap(
7995
- (child) => React65.isValidElement(child) && child.type === React65.Fragment ? child.props.children : [child]
8056
+ const elementIds = React66.Children.toArray(children).flatMap(
8057
+ (child) => React66.isValidElement(child) && child.type === React66.Fragment ? child.props.children : [child]
7996
8058
  ).map(
7997
- (child) => React65.isValidElement(child) && "id" in child.props ? child.props.id : null
8059
+ (child) => React66.isValidElement(child) && "id" in child.props ? child.props.id : null
7998
8060
  ).filter((id) => !!id);
7999
8061
  const serializedIds = elementIds.join(",");
8000
- const containerRef = React65.useRef(null);
8001
- const refs = React65.useMemo(() => {
8062
+ const containerRef = React66.useRef(null);
8063
+ const refs = React66.useMemo(() => {
8002
8064
  return Object.fromEntries(
8003
- serializedIds.split(",").map((id) => [id, React65.createRef()])
8065
+ serializedIds.split(",").map((id) => [id, React66.createRef()])
8004
8066
  );
8005
8067
  }, [serializedIds]);
8006
- const labelElements = React65.useMemo(() => {
8007
- return serializedIds.split(",").map((id, index) => /* @__PURE__ */ React65.createElement(
8068
+ const labelElements = React66.useMemo(() => {
8069
+ return serializedIds.split(",").map((id, index) => /* @__PURE__ */ React66.createElement(
8008
8070
  "span",
8009
8071
  {
8010
8072
  key: id,
@@ -8017,7 +8079,7 @@ var LabeledElementView = React65.memo(function LabeledElementView2({
8017
8079
  })
8018
8080
  ));
8019
8081
  }, [refs, serializedIds, renderLabel]);
8020
- React65.useLayoutEffect(() => {
8082
+ React66.useLayoutEffect(() => {
8021
8083
  if (!containerRef.current) return;
8022
8084
  const containerRect = containerRef.current.getBoundingClientRect();
8023
8085
  const solver = new kiwi.Solver();
@@ -8079,19 +8141,19 @@ var LabeledElementView = React65.memo(function LabeledElementView2({
8079
8141
  `${Math.max(...heights)}px`
8080
8142
  );
8081
8143
  }, [refs, labelElements]);
8082
- return /* @__PURE__ */ React65.createElement("div", { className: "flex flex-1 flex-col relative", ref: containerRef }, /* @__PURE__ */ React65.createElement("div", { className: "flex flex-1 items-center" }, children), /* @__PURE__ */ React65.createElement("div", { className: "relative overflow-hidden select-none" }, labelElements));
8144
+ return /* @__PURE__ */ React66.createElement("div", { className: "flex flex-1 flex-col relative", ref: containerRef }, /* @__PURE__ */ React66.createElement("div", { className: "flex flex-1 items-center" }, children), /* @__PURE__ */ React66.createElement("div", { className: "relative overflow-hidden select-none" }, labelElements));
8083
8145
  });
8084
8146
 
8085
8147
  // src/components/LabeledField.tsx
8086
- import React67, { memo as memo28, useMemo as useMemo27 } from "react";
8148
+ import React68, { memo as memo29, useMemo as useMemo27 } from "react";
8087
8149
 
8088
8150
  // src/hooks/useIndent.ts
8089
- import React66 from "react";
8090
- var IndentContext = React66.createContext({
8151
+ import React67 from "react";
8152
+ var IndentContext = React67.createContext({
8091
8153
  indentLevel: 0
8092
8154
  });
8093
8155
  var useIndent = () => {
8094
- const { indentLevel } = React66.useContext(IndentContext);
8156
+ const { indentLevel } = React67.useContext(IndentContext);
8095
8157
  return indentLevel;
8096
8158
  };
8097
8159
 
@@ -8104,7 +8166,7 @@ var labeledFieldStyles = (labelPosition) => cx(
8104
8166
  var labelPositionInset = {
8105
8167
  position: "inset"
8106
8168
  };
8107
- var LabeledField = memo28(function LabeledField2({
8169
+ var LabeledField = memo29(function LabeledField2({
8108
8170
  children,
8109
8171
  label,
8110
8172
  labelPosition: labelPositionProp,
@@ -8150,7 +8212,7 @@ var LabeledField = memo28(function LabeledField2({
8150
8212
  }),
8151
8213
  [labelWidth, indentLevel, labelStyleProp]
8152
8214
  );
8153
- return /* @__PURE__ */ React67.createElement(LabelContext.Provider, { value: labelContextValue }, labelPosition === "inset" ? /* @__PURE__ */ React67.createElement(LabelPositionContext.Provider, { value: labelPositionInset }, children) : /* @__PURE__ */ React67.createElement("div", { className: cx("flex relative flex-1", className), style: style2 }, Boolean(indentLevel) && /* @__PURE__ */ React67.createElement("div", { style: indentStyle }), /* @__PURE__ */ React67.createElement("div", { className: labeledFieldClasses }, /* @__PURE__ */ React67.createElement(
8215
+ return /* @__PURE__ */ React68.createElement(LabelContext.Provider, { value: labelContextValue }, labelPosition === "inset" ? /* @__PURE__ */ React68.createElement(LabelPositionContext.Provider, { value: labelPositionInset }, children) : /* @__PURE__ */ React68.createElement("div", { className: cx("flex relative flex-1", className), style: style2 }, Boolean(indentLevel) && /* @__PURE__ */ React68.createElement("div", { style: indentStyle }), /* @__PURE__ */ React68.createElement("div", { className: labeledFieldClasses }, /* @__PURE__ */ React68.createElement(
8154
8216
  Label,
8155
8217
  {
8156
8218
  htmlFor: fieldId,
@@ -8159,7 +8221,7 @@ var LabeledField = memo28(function LabeledField2({
8159
8221
  ...props
8160
8222
  },
8161
8223
  label
8162
- ), labelPosition === "start" ? /* @__PURE__ */ React67.createElement("div", { className: "flex-auto flex", style: fieldStyle }, children) : children)));
8224
+ ), labelPosition === "start" ? /* @__PURE__ */ React68.createElement("div", { className: "flex-auto flex", style: fieldStyle }, children) : children)));
8163
8225
  });
8164
8226
 
8165
8227
  // src/components/MediaThumbnail.tsx
@@ -8169,7 +8231,7 @@ import {
8169
8231
  SpeakerLoudIcon,
8170
8232
  VideoIcon
8171
8233
  } from "@noya-app/noya-icons";
8172
- import React68, { memo as memo29, useMemo as useMemo28 } from "react";
8234
+ import React69, { memo as memo30, useMemo as useMemo28 } from "react";
8173
8235
 
8174
8236
  // src/components/catppuccin/fileIcons.ts
8175
8237
  var fileIcons = {
@@ -10609,7 +10671,7 @@ var getThumbnailColors = (colorScheme, selected) => {
10609
10671
  };
10610
10672
  }
10611
10673
  };
10612
- var MediaThumbnail = memo29(function MediaThumbnail2({
10674
+ var MediaThumbnail = memo30(function MediaThumbnail2({
10613
10675
  contentType: contentTypeProp,
10614
10676
  selected = false,
10615
10677
  className,
@@ -10634,8 +10696,8 @@ var MediaThumbnail = memo29(function MediaThumbnail2({
10634
10696
  const content = useMemo28(() => {
10635
10697
  switch (contentType) {
10636
10698
  case "image":
10637
- if (!url) return /* @__PURE__ */ React68.createElement(ImageIcon, { color: iconColor, style: iconStyles });
10638
- return /* @__PURE__ */ React68.createElement(
10699
+ if (!url) return /* @__PURE__ */ React69.createElement(ImageIcon, { color: iconColor, style: iconStyles });
10700
+ return /* @__PURE__ */ React69.createElement(
10639
10701
  "img",
10640
10702
  {
10641
10703
  src: url,
@@ -10645,18 +10707,18 @@ var MediaThumbnail = memo29(function MediaThumbnail2({
10645
10707
  }
10646
10708
  );
10647
10709
  case "video":
10648
- return /* @__PURE__ */ React68.createElement(VideoIcon, { color: iconColor, style: iconStyles });
10710
+ return /* @__PURE__ */ React69.createElement(VideoIcon, { color: iconColor, style: iconStyles });
10649
10711
  case "audio":
10650
- return /* @__PURE__ */ React68.createElement(SpeakerLoudIcon, { color: iconColor, style: iconStyles });
10712
+ return /* @__PURE__ */ React69.createElement(SpeakerLoudIcon, { color: iconColor, style: iconStyles });
10651
10713
  default:
10652
10714
  if (iconName) {
10653
10715
  const Icon = Icons[iconName];
10654
- return /* @__PURE__ */ React68.createElement(Icon, { color: iconColor, style: iconStyles });
10716
+ return /* @__PURE__ */ React69.createElement(Icon, { color: iconColor, style: iconStyles });
10655
10717
  }
10656
10718
  if (fileName) {
10657
10719
  const fileIcon = findFileIcon(fileName);
10658
10720
  if (fileIcon) {
10659
- return /* @__PURE__ */ React68.createElement(
10721
+ return /* @__PURE__ */ React69.createElement(
10660
10722
  "img",
10661
10723
  {
10662
10724
  src: `https://api.iconify.design/catppuccin/${fileIcon}.svg?height=none&box=1`,
@@ -10666,10 +10728,10 @@ var MediaThumbnail = memo29(function MediaThumbnail2({
10666
10728
  );
10667
10729
  }
10668
10730
  }
10669
- return /* @__PURE__ */ React68.createElement(FileIcon, { color: iconColor, style: iconStyles });
10731
+ return /* @__PURE__ */ React69.createElement(FileIcon, { color: iconColor, style: iconStyles });
10670
10732
  }
10671
10733
  }, [contentType, url, iconColor, iconStyles, iconName, fileName]);
10672
- return /* @__PURE__ */ React68.createElement(
10734
+ return /* @__PURE__ */ React69.createElement(
10673
10735
  "div",
10674
10736
  {
10675
10737
  className: cx(
@@ -10700,9 +10762,9 @@ function findFileIcon(fileName) {
10700
10762
  }
10701
10763
 
10702
10764
  // src/components/Message.tsx
10703
- import React69, { forwardRef as forwardRef26, memo as memo30, useMemo as useMemo29 } from "react";
10704
- var Message = memo30(
10705
- forwardRef26(function Message2({ role, children, user, avatarSize = INPUT_HEIGHT }, ref) {
10765
+ import React70, { forwardRef as forwardRef25, memo as memo31, useMemo as useMemo29 } from "react";
10766
+ var Message = memo31(
10767
+ forwardRef25(function Message2({ role, children, user, avatarSize = INPUT_HEIGHT }, ref) {
10706
10768
  const randomId = crypto.randomUUID();
10707
10769
  const userMessageBackgroundColor = colorFromString(user?.id ?? randomId);
10708
10770
  const styles3 = useMemo29(
@@ -10711,7 +10773,7 @@ var Message = memo30(
10711
10773
  } : void 0,
10712
10774
  [userMessageBackgroundColor, role]
10713
10775
  );
10714
- return /* @__PURE__ */ React69.createElement(
10776
+ return /* @__PURE__ */ React70.createElement(
10715
10777
  "div",
10716
10778
  {
10717
10779
  className: cx(
@@ -10719,15 +10781,15 @@ var Message = memo30(
10719
10781
  role === "user" ? "flex-row-reverse" : "flex-row"
10720
10782
  )
10721
10783
  },
10722
- role === "assistant" ? /* @__PURE__ */ React69.createElement(
10784
+ role === "assistant" ? /* @__PURE__ */ React70.createElement(
10723
10785
  Avatar,
10724
10786
  {
10725
10787
  name: "Assistant",
10726
10788
  size: avatarSize,
10727
10789
  backgroundColor: cssVars.colors.primaryPastel
10728
10790
  },
10729
- /* @__PURE__ */ React69.createElement(Logo, { style: { width: 15 }, fill: cssVars.colors.primary })
10730
- ) : /* @__PURE__ */ React69.createElement(
10791
+ /* @__PURE__ */ React70.createElement(Logo, { style: { width: 15 }, fill: cssVars.colors.primary })
10792
+ ) : /* @__PURE__ */ React70.createElement(
10731
10793
  Avatar,
10732
10794
  {
10733
10795
  userId: !user ? randomId : user?.id,
@@ -10736,7 +10798,7 @@ var Message = memo30(
10736
10798
  size: avatarSize
10737
10799
  }
10738
10800
  ),
10739
- /* @__PURE__ */ React69.createElement(
10801
+ /* @__PURE__ */ React70.createElement(
10740
10802
  "div",
10741
10803
  {
10742
10804
  className: cx(
@@ -10746,7 +10808,7 @@ var Message = memo30(
10746
10808
  style: styles3,
10747
10809
  ref
10748
10810
  },
10749
- /* @__PURE__ */ React69.createElement(
10811
+ /* @__PURE__ */ React70.createElement(
10750
10812
  Text,
10751
10813
  {
10752
10814
  variant: "small",
@@ -10761,9 +10823,9 @@ var Message = memo30(
10761
10823
 
10762
10824
  // src/components/pipeline/PipelineResultLayout.tsx
10763
10825
  import { Link1Icon } from "@noya-app/noya-icons";
10764
- import React70 from "react";
10826
+ import React71 from "react";
10765
10827
  var PipelineResultLink = ({ url }) => {
10766
- return /* @__PURE__ */ React70.createElement("div", { className: "flex flex-col gap-0.5" }, /* @__PURE__ */ React70.createElement(
10828
+ return /* @__PURE__ */ React71.createElement("div", { className: "flex flex-col gap-0.5" }, /* @__PURE__ */ React71.createElement(
10767
10829
  "a",
10768
10830
  {
10769
10831
  href: url,
@@ -10771,15 +10833,15 @@ var PipelineResultLink = ({ url }) => {
10771
10833
  rel: "noopener noreferrer",
10772
10834
  className: "flex text-primary hover:opacity-80 border border-divider rounded-md"
10773
10835
  },
10774
- /* @__PURE__ */ React70.createElement("div", { className: "flex gap-1 items-center p-2" }, /* @__PURE__ */ React70.createElement(Link1Icon, { className: "w-[15px] h-[15px] flex-shrink-0" })),
10775
- /* @__PURE__ */ React70.createElement(DividerVertical, null),
10776
- /* @__PURE__ */ React70.createElement(Small, { className: "truncate p-2 flex-1" }, url)
10836
+ /* @__PURE__ */ React71.createElement("div", { className: "flex gap-1 items-center p-2" }, /* @__PURE__ */ React71.createElement(Link1Icon, { className: "w-[15px] h-[15px] flex-shrink-0" })),
10837
+ /* @__PURE__ */ React71.createElement(DividerVertical, null),
10838
+ /* @__PURE__ */ React71.createElement(Small, { className: "truncate p-2 flex-1" }, url)
10777
10839
  ));
10778
10840
  };
10779
10841
  var PipelineResultLayout = ({
10780
10842
  children
10781
10843
  }) => {
10782
- return /* @__PURE__ */ React70.createElement("div", { className: "flex flex-col gap-2" }, children);
10844
+ return /* @__PURE__ */ React71.createElement("div", { className: "flex flex-col gap-2" }, children);
10783
10845
  };
10784
10846
  function getPipelineResultLink(value) {
10785
10847
  if (typeof value !== "object" || value === null) return void 0;
@@ -10795,27 +10857,27 @@ function getPipelineResultLink(value) {
10795
10857
  // src/components/Progress.tsx
10796
10858
  import { clamp } from "@noya-app/noya-utils";
10797
10859
  import * as ProgressPrimitive from "@radix-ui/react-progress";
10798
- import * as React71 from "react";
10860
+ import * as React72 from "react";
10799
10861
  function Progress({
10800
10862
  value,
10801
10863
  variant = "normal",
10802
10864
  className
10803
10865
  }) {
10804
10866
  const clampedValue = clamp(value, 0, 100);
10805
- const transformStyles = React71.useMemo(
10867
+ const transformStyles = React72.useMemo(
10806
10868
  () => ({
10807
10869
  transform: `translateX(-${100 - clampedValue}%)`
10808
10870
  }),
10809
10871
  [clampedValue]
10810
10872
  );
10811
- return /* @__PURE__ */ React71.createElement(
10873
+ return /* @__PURE__ */ React72.createElement(
10812
10874
  ProgressPrimitive.Root,
10813
10875
  {
10814
10876
  className: cx(`relative hidden bg-input-background h-[5px] `, className),
10815
10877
  style: { transform: "translateZ(0)" },
10816
10878
  value: clampedValue
10817
10879
  },
10818
- /* @__PURE__ */ React71.createElement(
10880
+ /* @__PURE__ */ React72.createElement(
10819
10881
  ProgressPrimitive.Indicator,
10820
10882
  {
10821
10883
  className: `${variant === "primary" ? "bg-primary" : variant === "secondary" ? "bg-secondary" : variant === "warning" ? "bg-warning" : "bg-text"} transition-[transform_660ms_cubic-bezier(0.65,0,0.35,1) w-full h-full`,
@@ -10826,7 +10888,7 @@ function Progress({
10826
10888
  }
10827
10889
 
10828
10890
  // src/components/Section.tsx
10829
- import React72, { memo as memo31, useMemo as useMemo31 } from "react";
10891
+ import React73, { memo as memo32, useMemo as useMemo31 } from "react";
10830
10892
  var titleIconStyle = {
10831
10893
  marginRight: "8px",
10832
10894
  alignSelf: "flex-start",
@@ -10861,7 +10923,7 @@ var SectionInternal = ({
10861
10923
  }),
10862
10924
  [titleTextStyle, title, extraPadding, styleProp]
10863
10925
  );
10864
- const hasChildren = React72.Children.toArray(children).some((child) => !!child);
10926
+ const hasChildren = React73.Children.toArray(children).some((child) => !!child);
10865
10927
  const headerStyle = useMemo31(
10866
10928
  () => ({
10867
10929
  marginBottom: hasChildren ? "4px" : void 0,
@@ -10869,7 +10931,7 @@ var SectionInternal = ({
10869
10931
  }),
10870
10932
  [hasChildren]
10871
10933
  );
10872
- return /* @__PURE__ */ React72.createElement("div", { style: style2, className }, (title || titleIcon || right) && /* @__PURE__ */ React72.createElement(InspectorPrimitives_exports.SectionHeader, { style: headerStyle }, titleIcon && /* @__PURE__ */ React72.createElement("div", { style: titleIconStyle, className: textStyles[titleTextStyle] }, titleIconOptions.inlineBlockWrapper ? /* @__PURE__ */ React72.createElement("div", { style: titleIconWrapperStyle }, titleIcon) : titleIcon), title && /* @__PURE__ */ React72.createElement(React72.Fragment, null, onClickTitle ? /* @__PURE__ */ React72.createElement(Button, { variant: "none", onClick: onClickTitle }, /* @__PURE__ */ React72.createElement(InspectorPrimitives_exports.Title, { $textStyle: titleTextStyle }, title)) : /* @__PURE__ */ React72.createElement(InspectorPrimitives_exports.Title, { $textStyle: titleTextStyle }, title)), /* @__PURE__ */ React72.createElement(Spacer.Horizontal, null), right), /* @__PURE__ */ React72.createElement(IndentContext.Provider, { value: { indentLevel: 1 } }, children));
10934
+ return /* @__PURE__ */ React73.createElement("div", { style: style2, className }, (title || titleIcon || right) && /* @__PURE__ */ React73.createElement(InspectorPrimitives_exports.SectionHeader, { style: headerStyle }, titleIcon && /* @__PURE__ */ React73.createElement("div", { style: titleIconStyle, className: textStyles[titleTextStyle] }, titleIconOptions.inlineBlockWrapper ? /* @__PURE__ */ React73.createElement("div", { style: titleIconWrapperStyle }, titleIcon) : titleIcon), title && /* @__PURE__ */ React73.createElement(React73.Fragment, null, onClickTitle ? /* @__PURE__ */ React73.createElement(Button, { variant: "none", onClick: onClickTitle }, /* @__PURE__ */ React73.createElement(InspectorPrimitives_exports.Title, { $textStyle: titleTextStyle }, title)) : /* @__PURE__ */ React73.createElement(InspectorPrimitives_exports.Title, { $textStyle: titleTextStyle }, title)), /* @__PURE__ */ React73.createElement(Spacer.Horizontal, null), right), /* @__PURE__ */ React73.createElement(IndentContext.Provider, { value: { indentLevel: 1 } }, children));
10873
10935
  };
10874
10936
  var ExpandableSection = ({
10875
10937
  storageKey,
@@ -10882,12 +10944,12 @@ var ExpandableSection = ({
10882
10944
  initialVisibility
10883
10945
  );
10884
10946
  const expanded = visibility === "show";
10885
- return /* @__PURE__ */ React72.createElement(
10947
+ return /* @__PURE__ */ React73.createElement(
10886
10948
  SectionInternal,
10887
10949
  {
10888
10950
  ...props,
10889
10951
  right: !props.hideRightWhenCollapsed || expanded ? props.right : null,
10890
- title: /* @__PURE__ */ React72.createElement("div", { className: "flex gap-1 items-center" }, props.title, /* @__PURE__ */ React72.createElement(
10952
+ title: /* @__PURE__ */ React73.createElement("div", { className: "flex gap-1 items-center" }, props.title, /* @__PURE__ */ React73.createElement(
10891
10953
  IconButton,
10892
10954
  {
10893
10955
  iconName: expanded ? "ChevronDownIcon2" : "ChevronRightIcon2",
@@ -10898,26 +10960,26 @@ var ExpandableSection = ({
10898
10960
  expanded && props.children
10899
10961
  );
10900
10962
  };
10901
- var Section = memo31(function InspectorSection({
10963
+ var Section = memo32(function InspectorSection({
10902
10964
  storageKey,
10903
10965
  ...props
10904
10966
  }) {
10905
- return storageKey ? /* @__PURE__ */ React72.createElement(ExpandableSection, { ...props, storageKey }) : /* @__PURE__ */ React72.createElement(SectionInternal, { ...props });
10967
+ return storageKey ? /* @__PURE__ */ React73.createElement(ExpandableSection, { ...props, storageKey }) : /* @__PURE__ */ React73.createElement(SectionInternal, { ...props });
10906
10968
  });
10907
10969
 
10908
10970
  // src/components/SegmentedControl.tsx
10909
10971
  import * as ToggleGroupPrimitive2 from "@radix-ui/react-toggle-group";
10910
- import React73, {
10911
- createContext as createContext10,
10912
- forwardRef as forwardRef27,
10972
+ import React74, {
10973
+ createContext as createContext11,
10974
+ forwardRef as forwardRef26,
10913
10975
  useCallback as useCallback29,
10914
- useContext as useContext11,
10976
+ useContext as useContext12,
10915
10977
  useMemo as useMemo32
10916
10978
  } from "react";
10917
- var SegmentedControlContext = createContext10({
10979
+ var SegmentedControlContext = createContext11({
10918
10980
  colorScheme: "primary"
10919
10981
  });
10920
- var SegmentedControlItem = forwardRef27(function SegmentedControlItem2({
10982
+ var SegmentedControlItem = forwardRef26(function SegmentedControlItem2({
10921
10983
  value,
10922
10984
  tooltip,
10923
10985
  title,
@@ -10926,20 +10988,23 @@ var SegmentedControlItem = forwardRef27(function SegmentedControlItem2({
10926
10988
  className,
10927
10989
  ...props
10928
10990
  }, forwardedRef) {
10929
- const { colorScheme } = useContext11(SegmentedControlContext);
10930
- const itemElement = /* @__PURE__ */ React73.createElement(
10991
+ const { colorScheme } = useContext12(SegmentedControlContext);
10992
+ const itemElement = /* @__PURE__ */ React74.createElement(
10931
10993
  ToggleGroupPrimitive2.Item,
10932
10994
  {
10933
10995
  ref: forwardedRef,
10934
10996
  value: (value ?? "").toString(),
10935
10997
  disabled,
10936
10998
  className: cx(
10937
- "font-sans text-heading5 font-normal relative flex-1 appearance-none text-segmented-control-item rounded inline-flex gap-1.5 items-center justify-center align-middle text-center focus:outline-none transition-colors",
10999
+ "font-sans text-button font-normal relative flex-1 appearance-none text-segmented-control-item rounded inline-flex gap-1.5 items-center justify-center align-middle text-center focus:outline-none transition-colors",
10938
11000
  colorScheme === "secondary" ? "focus:ring-2 focus:ring-secondary focus:ring-offset-1" : "focus:ring-2 focus:ring-primary focus:ring-offset-1",
10939
11001
  colorScheme === "secondary" ? "aria-checked:bg-secondary aria-checked:text-white" : colorScheme === "primary" ? "aria-checked:bg-primary aria-checked:text-white" : "aria-checked:bg-background aria-checked:text-text",
10940
11002
  "focus:z-interactable",
10941
11003
  "aria-checked:shadow-segment",
10942
- "whitespace-pre",
11004
+ "whitespace-pre px-1",
11005
+ "border-r border-divider last:border-r-0",
11006
+ "aria-checked:border-r-transparent",
11007
+ "[&:has(+[aria-checked=true])]:border-r-transparent",
10943
11008
  className
10944
11009
  ),
10945
11010
  ...props
@@ -10947,17 +11012,8 @@ var SegmentedControlItem = forwardRef27(function SegmentedControlItem2({
10947
11012
  icon && renderIcon(icon),
10948
11013
  title
10949
11014
  );
10950
- return tooltip ? /* @__PURE__ */ React73.createElement(Tooltip, { content: tooltip }, itemElement) : itemElement;
11015
+ return tooltip ? /* @__PURE__ */ React74.createElement(Tooltip, { content: tooltip }, itemElement) : itemElement;
10951
11016
  });
10952
- var Separator3 = ({ transparent }) => /* @__PURE__ */ React73.createElement(
10953
- "div",
10954
- {
10955
- className: cx(
10956
- "w-[1px] my-1 self-stretch bg-divider",
10957
- transparent && "bg-transparent"
10958
- )
10959
- }
10960
- );
10961
11017
  var SegmentedControl = memoGeneric(function SegmentedControl2({
10962
11018
  id: idProp,
10963
11019
  value,
@@ -10965,7 +11021,6 @@ var SegmentedControl = memoGeneric(function SegmentedControl2({
10965
11021
  colorScheme,
10966
11022
  allowEmpty,
10967
11023
  items,
10968
- separator: separator2 = true,
10969
11024
  className,
10970
11025
  style: style2
10971
11026
  }) {
@@ -10978,8 +11033,7 @@ var SegmentedControl = memoGeneric(function SegmentedControl2({
10978
11033
  },
10979
11034
  [allowEmpty, onValueChange]
10980
11035
  );
10981
- const selectedIndex = items.findIndex((item) => item?.value === value);
10982
- return /* @__PURE__ */ React73.createElement(SegmentedControlContext.Provider, { value: contextValue }, /* @__PURE__ */ React73.createElement(
11036
+ return /* @__PURE__ */ React74.createElement(SegmentedControlContext.Provider, { value: contextValue }, /* @__PURE__ */ React74.createElement(
10983
11037
  ToggleGroupPrimitive2.Root,
10984
11038
  {
10985
11039
  id,
@@ -10987,23 +11041,21 @@ var SegmentedControl = memoGeneric(function SegmentedControl2({
10987
11041
  value,
10988
11042
  onValueChange: handleValueChange,
10989
11043
  className: cx(
10990
- `flex items-stretch flex-auto appearance-none relative outline-none min-h-input-height rounded bg-input-background py-[2px] px-[2px]`,
11044
+ `grid appearance-none relative outline-none min-h-input-height rounded bg-input-background py-0.5 px-0.5`,
10991
11045
  className
10992
11046
  ),
10993
- style: style2
11047
+ style: {
11048
+ ...style2,
11049
+ gridTemplateColumns: `repeat(${items.length}, 1fr)`
11050
+ }
10994
11051
  },
10995
- separator2 ? items.map((item, index) => {
10996
- const isLastItem = index === items.length - 1;
10997
- const currentValue = item?.value;
10998
- const showSeparator = currentValue !== value && (selectedIndex === 0 && selectedIndex !== index ? true : index !== selectedIndex - 1);
10999
- return /* @__PURE__ */ React73.createElement(React73.Fragment, { key: index }, /* @__PURE__ */ React73.createElement(SegmentedControlItem, { key: index, ...item }), !isLastItem && /* @__PURE__ */ React73.createElement(Separator3, { transparent: !showSeparator }));
11000
- }) : items.map((item, index) => /* @__PURE__ */ React73.createElement(SegmentedControlItem, { key: index, ...item }))
11052
+ items.map((item, index) => /* @__PURE__ */ React74.createElement(SegmentedControlItem, { key: index, ...item }))
11001
11053
  ));
11002
11054
  });
11003
11055
 
11004
11056
  // src/components/SelectionToolbar.tsx
11005
11057
  import * as PopperPrimitive from "@radix-ui/react-popper";
11006
- import React74, { useMemo as useMemo33 } from "react";
11058
+ import React75, { memo as memo33, useMemo as useMemo33 } from "react";
11007
11059
  var createVirtualElement = (rect) => ({
11008
11060
  getBoundingClientRect: () => ({
11009
11061
  width: rect.width,
@@ -11017,42 +11069,48 @@ var createVirtualElement = (rect) => ({
11017
11069
  toJSON: () => null
11018
11070
  })
11019
11071
  });
11020
- var SelectionToolbar = memoGeneric(function SelectionToolbar2({ rect, menuItems, onSelectMenuItem }) {
11021
- const containerRef = React74.useRef(null);
11022
- const size2 = useSize(containerRef, "width");
11023
- const virtualRef = useMemo33(
11024
- () => ({
11025
- current: createVirtualElement(rect)
11026
- }),
11027
- [rect]
11028
- );
11029
- return /* @__PURE__ */ React74.createElement(PopperPrimitive.Root, null, /* @__PURE__ */ React74.createElement(PopperPrimitive.Anchor, { virtualRef }), /* @__PURE__ */ React74.createElement(
11030
- PopperPrimitive.Content,
11031
- {
11032
- side: "top",
11033
- sideOffset: 10,
11034
- align: "center",
11035
- avoidCollisions: true,
11036
- collisionPadding: 10,
11037
- "data-editor-overlay": true,
11038
- contentEditable: false,
11039
- style: {
11040
- zIndex: 1e3,
11041
- opacity: size2 ? 1 : 0,
11042
- transition: "opacity 0.2s ease-in-out",
11043
- ["--n-input-background"]: "transparent"
11044
- }
11045
- },
11046
- /* @__PURE__ */ React74.createElement(
11047
- "div",
11072
+ var SelectionToolbarContainer = memo33(
11073
+ function SelectionToolbarContainer2({
11074
+ rect,
11075
+ children
11076
+ }) {
11077
+ const portalScopeId = usePortalScopeId();
11078
+ const containerRef = React75.useRef(null);
11079
+ const size2 = useSize(containerRef, "width");
11080
+ const virtualRef = useMemo33(
11081
+ () => ({
11082
+ current: createVirtualElement(rect)
11083
+ }),
11084
+ [rect]
11085
+ );
11086
+ return /* @__PURE__ */ React75.createElement(PopperPrimitive.Root, null, /* @__PURE__ */ React75.createElement(PopperPrimitive.Anchor, { virtualRef }), /* @__PURE__ */ React75.createElement(
11087
+ PopperPrimitive.Content,
11048
11088
  {
11049
- ref: containerRef,
11050
- className: "flex gap-1 bg-popover-background rounded shadow-popover p-1"
11089
+ ...portalScopeProps(portalScopeId),
11090
+ side: "top",
11091
+ sideOffset: 10,
11092
+ align: "center",
11093
+ avoidCollisions: true,
11094
+ collisionPadding: 10,
11095
+ contentEditable: false,
11096
+ style: {
11097
+ zIndex: 1e3,
11098
+ opacity: size2 ? 1 : 0,
11099
+ transition: "opacity 0.2s ease-in-out",
11100
+ ["--n-input-background"]: "transparent"
11101
+ }
11051
11102
  },
11052
- /* @__PURE__ */ React74.createElement(ToolbarMenu, { items: menuItems, onSelectMenuItem })
11053
- )
11054
- ));
11055
- });
11103
+ /* @__PURE__ */ React75.createElement(
11104
+ "div",
11105
+ {
11106
+ ref: containerRef,
11107
+ className: "flex gap-1 bg-popover-background rounded shadow-popover p-1"
11108
+ },
11109
+ children
11110
+ )
11111
+ ));
11112
+ }
11113
+ );
11056
11114
 
11057
11115
  // src/components/SelectMenu.tsx
11058
11116
  import {
@@ -11061,7 +11119,7 @@ import {
11061
11119
  DropdownChevronIcon as DropdownChevronIcon3
11062
11120
  } from "@noya-app/noya-icons";
11063
11121
  import * as Select from "@radix-ui/react-select";
11064
- import React75, {
11122
+ import React76, {
11065
11123
  useMemo as useMemo34,
11066
11124
  useState as useState27
11067
11125
  } from "react";
@@ -11095,7 +11153,7 @@ var SelectMenuTrigger = memoGeneric(function SelectMenuTrigger2({
11095
11153
  fieldId: props.id
11096
11154
  });
11097
11155
  const labelPosition = useLabelPosition();
11098
- return /* @__PURE__ */ React75.createElement(Select.SelectTrigger, { asChild: true, onFocus, onBlur }, /* @__PURE__ */ React75.createElement(
11156
+ return /* @__PURE__ */ React76.createElement(Select.SelectTrigger, { asChild: true, onFocus, onBlur }, /* @__PURE__ */ React76.createElement(
11099
11157
  Button,
11100
11158
  {
11101
11159
  id,
@@ -11107,10 +11165,10 @@ var SelectMenuTrigger = memoGeneric(function SelectMenuTrigger2({
11107
11165
  ),
11108
11166
  disabled
11109
11167
  },
11110
- icon && /* @__PURE__ */ React75.createElement("span", { className: "pr-1.5" }, renderIcon(icon)),
11111
- label && labelPosition === "inset" && /* @__PURE__ */ React75.createElement("div", { className: insetEndStyles }, /* @__PURE__ */ React75.createElement(Label, { className: "pr-4 text-text-disabled", htmlFor: id }, label)),
11112
- /* @__PURE__ */ React75.createElement("span", { className: "flex-1 flex" }, /* @__PURE__ */ React75.createElement(Select.Value, { placeholder })),
11113
- /* @__PURE__ */ React75.createElement(
11168
+ icon && /* @__PURE__ */ React76.createElement("span", { className: "pr-1.5" }, renderIcon(icon)),
11169
+ label && labelPosition === "inset" && /* @__PURE__ */ React76.createElement("div", { className: insetEndStyles }, /* @__PURE__ */ React76.createElement(Label, { className: "pr-4 text-text-disabled", htmlFor: id }, label)),
11170
+ /* @__PURE__ */ React76.createElement("span", { className: "flex-1 flex" }, /* @__PURE__ */ React76.createElement(Select.Value, { placeholder })),
11171
+ /* @__PURE__ */ React76.createElement(
11114
11172
  DropdownChevronIcon3,
11115
11173
  {
11116
11174
  className: cx(
@@ -11142,6 +11200,7 @@ var SelectMenu = memoGeneric(function SelectMenu2({
11142
11200
  contentStyle: contentStyleProp,
11143
11201
  ...props
11144
11202
  }) {
11203
+ const portalScopeId = usePortalScopeId();
11145
11204
  const selectedItem = items.find(
11146
11205
  (item) => isSelectableMenuItem(item) && item.value === value
11147
11206
  );
@@ -11158,7 +11217,7 @@ var SelectMenu = memoGeneric(function SelectMenu2({
11158
11217
  setInternalOpen(open2);
11159
11218
  };
11160
11219
  const readOnlyButton = useMemo34(
11161
- () => /* @__PURE__ */ React75.createElement(
11220
+ () => /* @__PURE__ */ React76.createElement(
11162
11221
  Button,
11163
11222
  {
11164
11223
  id,
@@ -11168,7 +11227,7 @@ var SelectMenu = memoGeneric(function SelectMenu2({
11168
11227
  disabled
11169
11228
  },
11170
11229
  icon && renderIcon(icon),
11171
- /* @__PURE__ */ React75.createElement("span", { className: "flex flex-1" }, selectedItem?.title ?? value)
11230
+ /* @__PURE__ */ React76.createElement("span", { className: "flex flex-1" }, selectedItem?.title ?? value)
11172
11231
  ),
11173
11232
  [icon, id, style2, className, disabled, value, selectedItem]
11174
11233
  );
@@ -11180,7 +11239,7 @@ var SelectMenu = memoGeneric(function SelectMenu2({
11180
11239
  ...contentStyleProp
11181
11240
  };
11182
11241
  }, [contentStyleProp]);
11183
- const content = /* @__PURE__ */ React75.createElement(
11242
+ const content = /* @__PURE__ */ React76.createElement(
11184
11243
  Select.Root,
11185
11244
  {
11186
11245
  value,
@@ -11188,7 +11247,7 @@ var SelectMenu = memoGeneric(function SelectMenu2({
11188
11247
  open,
11189
11248
  onOpenChange: handleOpenChange
11190
11249
  },
11191
- /* @__PURE__ */ React75.createElement(
11250
+ /* @__PURE__ */ React76.createElement(
11192
11251
  SelectMenuTrigger,
11193
11252
  {
11194
11253
  id,
@@ -11203,9 +11262,10 @@ var SelectMenu = memoGeneric(function SelectMenu2({
11203
11262
  label
11204
11263
  }
11205
11264
  ),
11206
- /* @__PURE__ */ React75.createElement(Select.Portal, null, /* @__PURE__ */ React75.createElement(
11265
+ /* @__PURE__ */ React76.createElement(Select.Portal, null, /* @__PURE__ */ React76.createElement(
11207
11266
  Select.Content,
11208
11267
  {
11268
+ ...portalScopeProps(portalScopeId),
11209
11269
  className: styles.contentStyle,
11210
11270
  position: "popper",
11211
11271
  sideOffset: 6,
@@ -11213,14 +11273,14 @@ var SelectMenu = memoGeneric(function SelectMenu2({
11213
11273
  align: "center",
11214
11274
  style: contentStyle
11215
11275
  },
11216
- /* @__PURE__ */ React75.createElement(Select.ScrollUpButton, { className: scrollButtonStyles }, /* @__PURE__ */ React75.createElement(
11276
+ /* @__PURE__ */ React76.createElement(Select.ScrollUpButton, { className: scrollButtonStyles }, /* @__PURE__ */ React76.createElement(
11217
11277
  ChevronUpIcon,
11218
11278
  {
11219
11279
  className: cx("transition-transform duration-100")
11220
11280
  }
11221
11281
  )),
11222
- /* @__PURE__ */ React75.createElement(Select.Viewport, null, /* @__PURE__ */ React75.createElement(MenuViewport, { items, Components: Components3 })),
11223
- /* @__PURE__ */ React75.createElement(Select.ScrollDownButton, { className: scrollButtonStyles }, /* @__PURE__ */ React75.createElement(ChevronDownIcon, null))
11282
+ /* @__PURE__ */ React76.createElement(Select.Viewport, null, /* @__PURE__ */ React76.createElement(MenuViewport, { items, Components: Components3 })),
11283
+ /* @__PURE__ */ React76.createElement(Select.ScrollDownButton, { className: scrollButtonStyles }, /* @__PURE__ */ React76.createElement(ChevronDownIcon, null))
11224
11284
  ))
11225
11285
  );
11226
11286
  return readOnly ? readOnlyButton : content;
@@ -11228,13 +11288,13 @@ var SelectMenu = memoGeneric(function SelectMenu2({
11228
11288
 
11229
11289
  // src/components/Slider.tsx
11230
11290
  import * as RadixSlider from "@radix-ui/react-slider";
11231
- import React76, { memo as memo32, useCallback as useCallback30, useMemo as useMemo35 } from "react";
11291
+ import React77, { memo as memo34, useCallback as useCallback30, useMemo as useMemo35 } from "react";
11232
11292
  var THUMB_WIDTH = 8;
11233
11293
  var thumbStyle = {
11234
11294
  width: THUMB_WIDTH
11235
11295
  };
11236
11296
  var insetEndStyles2 = getInsetEndStyles();
11237
- var Slider = memo32(function Slider2({
11297
+ var Slider = memo34(function Slider2({
11238
11298
  style: style2,
11239
11299
  className,
11240
11300
  value,
@@ -11283,7 +11343,7 @@ var Slider = memo32(function Slider2({
11283
11343
  }),
11284
11344
  [percentage.raw]
11285
11345
  );
11286
- return /* @__PURE__ */ React76.createElement(
11346
+ return /* @__PURE__ */ React77.createElement(
11287
11347
  RadixSlider.Root,
11288
11348
  {
11289
11349
  min,
@@ -11301,19 +11361,19 @@ var Slider = memo32(function Slider2({
11301
11361
  onBlur,
11302
11362
  disabled: readOnly
11303
11363
  },
11304
- /* @__PURE__ */ React76.createElement(RadixSlider.Track, { className: "flex-grow h-full rounded overflow-hidden bg-input-background" }, label && labelPosition === "inset" && /* @__PURE__ */ React76.createElement("div", { className: insetEndStyles2 }, /* @__PURE__ */ React76.createElement(Label, { htmlFor: id, className: "text-text-disabled" }, label)), /* @__PURE__ */ React76.createElement(
11364
+ /* @__PURE__ */ React77.createElement(RadixSlider.Track, { className: "flex-grow h-full rounded overflow-hidden bg-input-background" }, label && labelPosition === "inset" && /* @__PURE__ */ React77.createElement("div", { className: insetEndStyles2 }, /* @__PURE__ */ React77.createElement(Label, { htmlFor: id, className: "text-text-disabled" }, label)), /* @__PURE__ */ React77.createElement(
11305
11365
  "div",
11306
11366
  {
11307
11367
  style: trackFillStyle,
11308
11368
  className: cx(
11309
- "absolute inset-0 w-full h-full rounded overflow-hidden",
11369
+ "absolute inset-0 w-full h-full rounded overflow-hidden bg-primary-pastel",
11310
11370
  colorScheme === "primary" && "bg-primary",
11311
11371
  colorScheme === "secondary" && "bg-secondary"
11312
11372
  )
11313
11373
  }
11314
11374
  )),
11315
- label && labelPosition === "inset" && colorScheme !== void 0 && /* @__PURE__ */ React76.createElement("div", { className: insetEndStyles2 }, /* @__PURE__ */ React76.createElement(Label, { className: "text-white overflow-hidden", style: labelStyle }, label)),
11316
- /* @__PURE__ */ React76.createElement(
11375
+ label && labelPosition === "inset" && colorScheme !== void 0 && /* @__PURE__ */ React77.createElement("div", { className: insetEndStyles2 }, /* @__PURE__ */ React77.createElement(Label, { className: "text-white overflow-hidden", style: labelStyle }, label)),
11376
+ /* @__PURE__ */ React77.createElement(
11317
11377
  RadixSlider.Thumb,
11318
11378
  {
11319
11379
  style: thumbStyle,
@@ -11330,7 +11390,7 @@ var Slider = memo32(function Slider2({
11330
11390
 
11331
11391
  // src/components/Switch.tsx
11332
11392
  import * as SwitchPrimitive from "@radix-ui/react-switch";
11333
- import * as React77 from "react";
11393
+ import * as React78 from "react";
11334
11394
  var Switch = function Switch2({
11335
11395
  id,
11336
11396
  value,
@@ -11342,7 +11402,7 @@ var Switch = function Switch2({
11342
11402
  style: style2,
11343
11403
  className
11344
11404
  }) {
11345
- return /* @__PURE__ */ React77.createElement(
11405
+ return /* @__PURE__ */ React78.createElement(
11346
11406
  SwitchPrimitive.Root,
11347
11407
  {
11348
11408
  id,
@@ -11361,20 +11421,20 @@ var Switch = function Switch2({
11361
11421
  onFocus,
11362
11422
  onBlur
11363
11423
  },
11364
- /* @__PURE__ */ React77.createElement(SwitchPrimitive.Thumb, { className: "block w-[15px] h-[15px] bg-background rounded-full transition-transform translate-x-[2px] data-[state=checked]:translate-x-[15px]" })
11424
+ /* @__PURE__ */ React78.createElement(SwitchPrimitive.Thumb, { className: "block w-[15px] h-[15px] bg-background rounded-full transition-transform translate-x-[2px] data-[state=checked]:translate-x-[15px]" })
11365
11425
  );
11366
11426
  };
11367
11427
 
11368
11428
  // src/components/UserPointer.tsx
11369
- import React78, { memo as memo33, useMemo as useMemo36 } from "react";
11370
- var UserPointerContainer = memo33(function UserPointerContainer2({
11429
+ import React79, { memo as memo35, useMemo as useMemo36 } from "react";
11430
+ var UserPointerContainer = memo35(function UserPointerContainer2({
11371
11431
  point,
11372
11432
  visible,
11373
11433
  children,
11374
11434
  className,
11375
11435
  style: style2
11376
11436
  }) {
11377
- return /* @__PURE__ */ React78.createElement(
11437
+ return /* @__PURE__ */ React79.createElement(
11378
11438
  "div",
11379
11439
  {
11380
11440
  style: {
@@ -11391,13 +11451,13 @@ var UserPointerContainer = memo33(function UserPointerContainer2({
11391
11451
  children
11392
11452
  );
11393
11453
  });
11394
- var UserNameTag = memo33(function UserNameTag2({
11454
+ var UserNameTag = memo35(function UserNameTag2({
11395
11455
  backgroundColor,
11396
11456
  className,
11397
11457
  style: style2,
11398
11458
  children
11399
11459
  }) {
11400
- return /* @__PURE__ */ React78.createElement(
11460
+ return /* @__PURE__ */ React79.createElement(
11401
11461
  "span",
11402
11462
  {
11403
11463
  className: cx(
@@ -11413,14 +11473,14 @@ var UserNameTag = memo33(function UserNameTag2({
11413
11473
  children
11414
11474
  );
11415
11475
  });
11416
- var UserPointerIcon = memo33(function PointerIcon({
11476
+ var UserPointerIcon = memo35(function PointerIcon({
11417
11477
  size: size2,
11418
11478
  color = "black",
11419
11479
  className,
11420
11480
  style: style2
11421
11481
  }) {
11422
11482
  const points = "0,5 10,0 10,10";
11423
- return /* @__PURE__ */ React78.createElement(
11483
+ return /* @__PURE__ */ React79.createElement(
11424
11484
  "svg",
11425
11485
  {
11426
11486
  width: size2,
@@ -11435,7 +11495,7 @@ var UserPointerIcon = memo33(function PointerIcon({
11435
11495
  ...style2
11436
11496
  }
11437
11497
  },
11438
- /* @__PURE__ */ React78.createElement(
11498
+ /* @__PURE__ */ React79.createElement(
11439
11499
  "polygon",
11440
11500
  {
11441
11501
  points,
@@ -11448,7 +11508,7 @@ var UserPointerIcon = memo33(function PointerIcon({
11448
11508
  });
11449
11509
  var POINTER_SIZE = 12;
11450
11510
  var POINTER_OVERLAP = 6;
11451
- var UserPointer = memo33(function UserPointer2({
11511
+ var UserPointer = memo35(function UserPointer2({
11452
11512
  userId,
11453
11513
  name,
11454
11514
  visible = true,
@@ -11472,7 +11532,7 @@ var UserPointer = memo33(function UserPointer2({
11472
11532
  () => ({ marginLeft: `${POINTER_SIZE - POINTER_OVERLAP + 1}px` }),
11473
11533
  []
11474
11534
  );
11475
- return /* @__PURE__ */ React78.createElement(
11535
+ return /* @__PURE__ */ React79.createElement(
11476
11536
  UserPointerContainer,
11477
11537
  {
11478
11538
  point,
@@ -11480,14 +11540,14 @@ var UserPointer = memo33(function UserPointer2({
11480
11540
  className,
11481
11541
  style: style2
11482
11542
  },
11483
- name && /* @__PURE__ */ React78.createElement("div", { className: "relative" }, /* @__PURE__ */ React78.createElement(
11543
+ name && /* @__PURE__ */ React79.createElement("div", { className: "relative" }, /* @__PURE__ */ React79.createElement(
11484
11544
  UserPointerIcon,
11485
11545
  {
11486
11546
  size: POINTER_SIZE,
11487
11547
  color: userBackgroundColor,
11488
11548
  style: pointerOverlapStyle
11489
11549
  }
11490
- ), /* @__PURE__ */ React78.createElement(
11550
+ ), /* @__PURE__ */ React79.createElement(
11491
11551
  UserNameTag,
11492
11552
  {
11493
11553
  backgroundColor: userBackgroundColor,
@@ -11500,9 +11560,9 @@ var UserPointer = memo33(function UserPointer2({
11500
11560
 
11501
11561
  // src/components/workspace/WorkspaceLayout.tsx
11502
11562
  import { useKeyboardShortcuts as useKeyboardShortcuts3 } from "@noya-app/noya-keymap";
11503
- import React82, {
11504
- forwardRef as forwardRef28,
11505
- memo as memo36,
11563
+ import React83, {
11564
+ forwardRef as forwardRef27,
11565
+ memo as memo38,
11506
11566
  useCallback as useCallback31,
11507
11567
  useImperativeHandle as useImperativeHandle9,
11508
11568
  useRef as useRef27,
@@ -11530,7 +11590,7 @@ function useWindowSize() {
11530
11590
  }
11531
11591
 
11532
11592
  // src/components/workspace/DrawerWorkspaceLayout.tsx
11533
- import React80, { memo as memo34, useLayoutEffect as useLayoutEffect9, useRef as useRef25, useState as useState29 } from "react";
11593
+ import React81, { memo as memo36, useLayoutEffect as useLayoutEffect9, useRef as useRef25, useState as useState29 } from "react";
11534
11594
 
11535
11595
  // src/hooks/usePreservePanelSize.tsx
11536
11596
  import { useLayoutEffect as useLayoutEffect8, useRef as useRef24 } from "react";
@@ -11670,7 +11730,7 @@ function usePreservePanelSize(panelGroupRef, setPanelLayoutState) {
11670
11730
  }
11671
11731
 
11672
11732
  // src/components/workspace/DrawerWorkspaceLayout.tsx
11673
- var DrawerWorkspaceLayout = memo34(function DrawerWorkspaceLayout2({
11733
+ var DrawerWorkspaceLayout = memo36(function DrawerWorkspaceLayout2({
11674
11734
  leftPanel,
11675
11735
  leftSidebarRef,
11676
11736
  rightPanel,
@@ -11691,14 +11751,14 @@ var DrawerWorkspaceLayout = memo34(function DrawerWorkspaceLayout2({
11691
11751
  }, [handleChangeLayoutState, mounted]);
11692
11752
  const leftSidebarCollapsed = internalLayoutState?.leftSidebarCollapsed ?? false;
11693
11753
  const rightSidebarCollapsed = internalLayoutState?.rightSidebarCollapsed ?? false;
11694
- return /* @__PURE__ */ React80.createElement(
11754
+ return /* @__PURE__ */ React81.createElement(
11695
11755
  "div",
11696
11756
  {
11697
11757
  ref: portalContainer,
11698
11758
  id: EDITOR_PANEL_GROUP_ID,
11699
11759
  className: "flex flex-1 relative focus:outline-none"
11700
11760
  },
11701
- leftPanel && /* @__PURE__ */ React80.createElement(
11761
+ leftPanel && /* @__PURE__ */ React81.createElement(
11702
11762
  Drawer,
11703
11763
  {
11704
11764
  id: LEFT_SIDEBAR_ID,
@@ -11719,7 +11779,7 @@ var DrawerWorkspaceLayout = memo34(function DrawerWorkspaceLayout2({
11719
11779
  leftPanel
11720
11780
  ),
11721
11781
  centerPanel,
11722
- rightPanel && /* @__PURE__ */ React80.createElement(
11782
+ rightPanel && /* @__PURE__ */ React81.createElement(
11723
11783
  Drawer,
11724
11784
  {
11725
11785
  id: RIGHT_SIDEBAR_ID,
@@ -11743,13 +11803,13 @@ var DrawerWorkspaceLayout = memo34(function DrawerWorkspaceLayout2({
11743
11803
  });
11744
11804
 
11745
11805
  // src/components/workspace/PanelWorkspaceLayout.tsx
11746
- import React81, { memo as memo35, useRef as useRef26 } from "react";
11806
+ import React82, { memo as memo37, useRef as useRef26 } from "react";
11747
11807
  import {
11748
11808
  Panel,
11749
11809
  PanelGroup,
11750
11810
  PanelResizeHandle
11751
11811
  } from "react-resizable-panels";
11752
- var PanelWorkspaceLayout = memo35(function PanelWorkspaceLayout2({
11812
+ var PanelWorkspaceLayout = memo37(function PanelWorkspaceLayout2({
11753
11813
  leftPanel,
11754
11814
  rightPanel,
11755
11815
  centerPanel,
@@ -11764,7 +11824,7 @@ var PanelWorkspaceLayout = memo35(function PanelWorkspaceLayout2({
11764
11824
  }) {
11765
11825
  const panelGroupRef = useRef26(null);
11766
11826
  usePreservePanelSize(panelGroupRef, handleChangeLayoutState);
11767
- return /* @__PURE__ */ React81.createElement(
11827
+ return /* @__PURE__ */ React82.createElement(
11768
11828
  PanelGroup,
11769
11829
  {
11770
11830
  ref: panelGroupRef,
@@ -11773,7 +11833,7 @@ var PanelWorkspaceLayout = memo35(function PanelWorkspaceLayout2({
11773
11833
  direction: "horizontal",
11774
11834
  autoSaveId: autoSavePrefix ? `${autoSavePrefix}--${EDITOR_PANEL_GROUP_ID}` : void 0
11775
11835
  },
11776
- leftPanel && /* @__PURE__ */ React81.createElement(React81.Fragment, null, /* @__PURE__ */ React81.createElement(
11836
+ leftPanel && /* @__PURE__ */ React82.createElement(React82.Fragment, null, /* @__PURE__ */ React82.createElement(
11777
11837
  Panel,
11778
11838
  {
11779
11839
  id: LEFT_SIDEBAR_ID,
@@ -11786,8 +11846,8 @@ var PanelWorkspaceLayout = memo35(function PanelWorkspaceLayout2({
11786
11846
  collapsible: true
11787
11847
  },
11788
11848
  internalLayoutState?.leftSidebarCollapsed ? null : leftPanel
11789
- ), /* @__PURE__ */ React81.createElement(PanelResizeHandle, { className: "cursor-col-resize w-px h-full bg-divider" })),
11790
- /* @__PURE__ */ React81.createElement(
11849
+ ), /* @__PURE__ */ React82.createElement(PanelResizeHandle, { className: "cursor-col-resize w-px h-full bg-divider" })),
11850
+ /* @__PURE__ */ React82.createElement(
11791
11851
  Panel,
11792
11852
  {
11793
11853
  id: CONTENT_AREA_ID,
@@ -11798,7 +11858,7 @@ var PanelWorkspaceLayout = memo35(function PanelWorkspaceLayout2({
11798
11858
  },
11799
11859
  centerPanel
11800
11860
  ),
11801
- rightPanel && /* @__PURE__ */ React81.createElement(React81.Fragment, null, /* @__PURE__ */ React81.createElement(PanelResizeHandle, { className: "cursor-col-resize w-px h-full bg-divider" }), /* @__PURE__ */ React81.createElement(
11861
+ rightPanel && /* @__PURE__ */ React82.createElement(React82.Fragment, null, /* @__PURE__ */ React82.createElement(PanelResizeHandle, { className: "cursor-col-resize w-px h-full bg-divider" }), /* @__PURE__ */ React82.createElement(
11802
11862
  Panel,
11803
11863
  {
11804
11864
  id: RIGHT_SIDEBAR_ID,
@@ -11816,7 +11876,7 @@ var PanelWorkspaceLayout = memo35(function PanelWorkspaceLayout2({
11816
11876
  });
11817
11877
 
11818
11878
  // src/components/workspace/WorkspaceLayout.tsx
11819
- var WorkspaceLayout = forwardRef28(function WorkspaceLayout2({
11879
+ var WorkspaceLayout = forwardRef27(function WorkspaceLayout2({
11820
11880
  autoSavePrefix,
11821
11881
  left,
11822
11882
  right,
@@ -11847,7 +11907,7 @@ var WorkspaceLayout = forwardRef28(function WorkspaceLayout2({
11847
11907
  } = {},
11848
11908
  theme
11849
11909
  }, forwardedRef) {
11850
- const containerRef = React82.useRef(null);
11910
+ const containerRef = React83.useRef(null);
11851
11911
  const containerSize = useSize(containerRef);
11852
11912
  const windowSize = useWindowSize();
11853
11913
  const parentSize = detectSize === "window" ? windowSize : containerSize && containerSize.width > 0 ? containerSize : windowSize;
@@ -11945,7 +12005,7 @@ var WorkspaceLayout = forwardRef28(function WorkspaceLayout2({
11945
12005
  }
11946
12006
  });
11947
12007
  const centerPanelPercentage = 100 - (left ? leftSidebarPercentage : 0) - (right ? rightSidebarPercentage : 0);
11948
- const leftPanel = left ? /* @__PURE__ */ React82.createElement(
12008
+ const leftPanel = left ? /* @__PURE__ */ React83.createElement(
11949
12009
  PanelInner,
11950
12010
  {
11951
12011
  style: leftStyle,
@@ -11953,7 +12013,7 @@ var WorkspaceLayout = forwardRef28(function WorkspaceLayout2({
11953
12013
  },
11954
12014
  left
11955
12015
  ) : null;
11956
- const rightPanel = right ? /* @__PURE__ */ React82.createElement(
12016
+ const rightPanel = right ? /* @__PURE__ */ React83.createElement(
11957
12017
  PanelInner,
11958
12018
  {
11959
12019
  style: rightStyle,
@@ -11961,7 +12021,7 @@ var WorkspaceLayout = forwardRef28(function WorkspaceLayout2({
11961
12021
  },
11962
12022
  right
11963
12023
  ) : null;
11964
- const centerPanel = /* @__PURE__ */ React82.createElement(PanelInner, { className: "bg-canvas-background" }, children);
12024
+ const centerPanel = /* @__PURE__ */ React83.createElement(PanelInner, { className: "bg-canvas-background" }, children);
11965
12025
  const leftSidebarOptions = {
11966
12026
  minSize: leftSidebarMinPercentage,
11967
12027
  maxSize: leftSidebarMaxPercentage,
@@ -11976,7 +12036,7 @@ var WorkspaceLayout = forwardRef28(function WorkspaceLayout2({
11976
12036
  };
11977
12037
  const LayoutComponent = sideType === "panel" ? PanelWorkspaceLayout : sideType === "drawer" ? DrawerWorkspaceLayout : parentSize.width > sideTypeBreakpoint ? PanelWorkspaceLayout : DrawerWorkspaceLayout;
11978
12038
  const readyToRender = detectSize === "window" || containerSize && containerSize.width > 0;
11979
- return /* @__PURE__ */ React82.createElement(
12039
+ return /* @__PURE__ */ React83.createElement(
11980
12040
  "div",
11981
12041
  {
11982
12042
  ref: containerRef,
@@ -11986,7 +12046,7 @@ var WorkspaceLayout = forwardRef28(function WorkspaceLayout2({
11986
12046
  "data-theme": theme
11987
12047
  },
11988
12048
  toolbar,
11989
- /* @__PURE__ */ React82.createElement("div", { className: "flex flex-row flex-1 relative" }, readyToRender && /* @__PURE__ */ React82.createElement(
12049
+ /* @__PURE__ */ React83.createElement("div", { className: "flex flex-row flex-1 relative" }, readyToRender && /* @__PURE__ */ React83.createElement(
11990
12050
  LayoutComponent,
11991
12051
  {
11992
12052
  leftPanel,
@@ -12004,12 +12064,12 @@ var WorkspaceLayout = forwardRef28(function WorkspaceLayout2({
12004
12064
  ))
12005
12065
  );
12006
12066
  });
12007
- var PanelInner = memo36(function PanelInner2({
12067
+ var PanelInner = memo38(function PanelInner2({
12008
12068
  children,
12009
12069
  style: style2,
12010
12070
  className
12011
12071
  }) {
12012
- return /* @__PURE__ */ React82.createElement("div", { style: style2, className: cx("absolute inset-0 flex", className) }, children);
12072
+ return /* @__PURE__ */ React83.createElement("div", { style: style2, className: cx("absolute inset-0 flex", className) }, children);
12013
12073
  });
12014
12074
 
12015
12075
  // src/hooks/usePlatform.ts
@@ -12162,11 +12222,11 @@ var SUPPORTED_CANVAS_UPLOAD_TYPES = [
12162
12222
 
12163
12223
  // src/components/DimensionInput.tsx
12164
12224
  import { round } from "@noya-app/noya-utils";
12165
- import * as React83 from "react";
12225
+ import * as React84 from "react";
12166
12226
  function getNewValue(value, mode, delta) {
12167
12227
  return delta === void 0 ? value : mode === "replace" ? delta : value + delta;
12168
12228
  }
12169
- var DimensionInput = React83.memo(function DimensionInput2({
12229
+ var DimensionInput = React84.memo(function DimensionInput2({
12170
12230
  id,
12171
12231
  value,
12172
12232
  onSetValue,
@@ -12176,15 +12236,15 @@ var DimensionInput = React83.memo(function DimensionInput2({
12176
12236
  disabled,
12177
12237
  trigger = "submit"
12178
12238
  }) {
12179
- const handleNudgeValue = React83.useCallback(
12239
+ const handleNudgeValue = React84.useCallback(
12180
12240
  (value2) => onSetValue(value2, "adjust"),
12181
12241
  [onSetValue]
12182
12242
  );
12183
- const handleSetValue = React83.useCallback(
12243
+ const handleSetValue = React84.useCallback(
12184
12244
  (value2) => onSetValue(value2, "replace"),
12185
12245
  [onSetValue]
12186
12246
  );
12187
- return /* @__PURE__ */ React83.createElement(LabeledField, { label, labelPosition: "inset" }, /* @__PURE__ */ React83.createElement(InputField2.Root, { id, width: size2 }, /* @__PURE__ */ React83.createElement(
12247
+ return /* @__PURE__ */ React84.createElement(LabeledField, { label, labelPosition: "inset" }, /* @__PURE__ */ React84.createElement(InputField2.Root, { id, width: size2 }, /* @__PURE__ */ React84.createElement(
12188
12248
  InputField2.NumberInput,
12189
12249
  {
12190
12250
  value: value === void 0 ? value : round(value, 2),
@@ -12211,11 +12271,11 @@ __export(InspectorPrimitives_exports, {
12211
12271
  Title: () => Title4,
12212
12272
  VerticalSeparator: () => VerticalSeparator
12213
12273
  });
12214
- import React84, {
12215
- forwardRef as forwardRef29,
12216
- memo as memo38
12274
+ import React85, {
12275
+ forwardRef as forwardRef28,
12276
+ memo as memo40
12217
12277
  } from "react";
12218
- var Section2 = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React84.createElement(
12278
+ var Section2 = forwardRef28(({ className, ...props }, ref) => /* @__PURE__ */ React85.createElement(
12219
12279
  "div",
12220
12280
  {
12221
12281
  ref,
@@ -12223,8 +12283,8 @@ var Section2 = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ Re
12223
12283
  ...props
12224
12284
  }
12225
12285
  ));
12226
- var SectionHeader3 = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React84.createElement("div", { ref, className: cx(`flex items-center `, className), ...props }));
12227
- var Title4 = forwardRef29(({ className, $textStyle, ...props }, ref) => /* @__PURE__ */ React84.createElement(
12286
+ var SectionHeader3 = forwardRef28(({ className, ...props }, ref) => /* @__PURE__ */ React85.createElement("div", { ref, className: cx(`flex items-center `, className), ...props }));
12287
+ var Title4 = forwardRef28(({ className, $textStyle, ...props }, ref) => /* @__PURE__ */ React85.createElement(
12228
12288
  "div",
12229
12289
  {
12230
12290
  ref,
@@ -12235,7 +12295,7 @@ var Title4 = forwardRef29(({ className, $textStyle, ...props }, ref) => /* @__PU
12235
12295
  ...props
12236
12296
  }
12237
12297
  ));
12238
- var Row = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React84.createElement(
12298
+ var Row = forwardRef28(({ className, ...props }, ref) => /* @__PURE__ */ React85.createElement(
12239
12299
  "div",
12240
12300
  {
12241
12301
  ref,
@@ -12243,7 +12303,7 @@ var Row = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React84
12243
12303
  ...props
12244
12304
  }
12245
12305
  ));
12246
- var Column = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React84.createElement(
12306
+ var Column = forwardRef28(({ className, ...props }, ref) => /* @__PURE__ */ React85.createElement(
12247
12307
  "div",
12248
12308
  {
12249
12309
  ref,
@@ -12251,7 +12311,7 @@ var Column = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ Reac
12251
12311
  ...props
12252
12312
  }
12253
12313
  ));
12254
- var Checkbox3 = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React84.createElement(
12314
+ var Checkbox3 = forwardRef28(({ className, ...props }, ref) => /* @__PURE__ */ React85.createElement(
12255
12315
  "input",
12256
12316
  {
12257
12317
  ref,
@@ -12260,7 +12320,7 @@ var Checkbox3 = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ R
12260
12320
  ...props
12261
12321
  }
12262
12322
  ));
12263
- var Text3 = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React84.createElement(
12323
+ var Text3 = forwardRef28(({ className, ...props }, ref) => /* @__PURE__ */ React85.createElement(
12264
12324
  "span",
12265
12325
  {
12266
12326
  ref,
@@ -12268,14 +12328,14 @@ var Text3 = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React
12268
12328
  ...props
12269
12329
  }
12270
12330
  ));
12271
- var VerticalSeparator = () => /* @__PURE__ */ React84.createElement(Spacer.Vertical, { size: "inspector-v-separator" });
12272
- var HorizontalSeparator = () => /* @__PURE__ */ React84.createElement(Spacer.Horizontal, { size: "inspector-h-separator" });
12273
- var RowLabel = forwardRef29(function RowLabel2({
12331
+ var VerticalSeparator = () => /* @__PURE__ */ React85.createElement(Spacer.Vertical, { size: "inspector-v-separator" });
12332
+ var HorizontalSeparator = () => /* @__PURE__ */ React85.createElement(Spacer.Horizontal, { size: "inspector-h-separator" });
12333
+ var RowLabel = forwardRef28(function RowLabel2({
12274
12334
  className,
12275
12335
  $textStyle,
12276
12336
  ...props
12277
12337
  }, ref) {
12278
- return /* @__PURE__ */ React84.createElement(
12338
+ return /* @__PURE__ */ React85.createElement(
12279
12339
  "label",
12280
12340
  {
12281
12341
  ref,
@@ -12287,7 +12347,7 @@ var RowLabel = forwardRef29(function RowLabel2({
12287
12347
  }
12288
12348
  );
12289
12349
  });
12290
- var LabeledRow = memo38(function LabeledRow2({
12350
+ var LabeledRow = memo40(function LabeledRow2({
12291
12351
  id,
12292
12352
  children,
12293
12353
  label,
@@ -12295,11 +12355,11 @@ var LabeledRow = memo38(function LabeledRow2({
12295
12355
  right,
12296
12356
  className
12297
12357
  }) {
12298
- return /* @__PURE__ */ React84.createElement(Row, { id, className }, /* @__PURE__ */ React84.createElement(Column, null, /* @__PURE__ */ React84.createElement(RowLabel, { $textStyle: labelTextStyle }, label, right && /* @__PURE__ */ React84.createElement(Spacer.Horizontal, null), right), /* @__PURE__ */ React84.createElement(Row, null, children)));
12358
+ return /* @__PURE__ */ React85.createElement(Row, { id, className }, /* @__PURE__ */ React85.createElement(Column, null, /* @__PURE__ */ React85.createElement(RowLabel, { $textStyle: labelTextStyle }, label, right && /* @__PURE__ */ React85.createElement(Spacer.Horizontal, null), right), /* @__PURE__ */ React85.createElement(Row, null, children)));
12299
12359
  });
12300
12360
 
12301
12361
  // src/components/BaseToolbar.tsx
12302
- import React85 from "react";
12362
+ import React86 from "react";
12303
12363
  var toolbarStyle = {
12304
12364
  [cssVarNames.colors.inputBackground]: "transparent"
12305
12365
  };
@@ -12310,7 +12370,7 @@ function BaseToolbar({
12310
12370
  logo,
12311
12371
  showDivider = true
12312
12372
  }) {
12313
- return /* @__PURE__ */ React85.createElement("div", { className: "flex flex-col", style: toolbarStyle }, /* @__PURE__ */ React85.createElement(
12373
+ return /* @__PURE__ */ React86.createElement("div", { className: "flex flex-col", style: toolbarStyle }, /* @__PURE__ */ React86.createElement(
12314
12374
  "div",
12315
12375
  {
12316
12376
  className: "flex items-center pr-2.5 bg-sidebar-background flex-none relative @container/toolbar",
@@ -12318,10 +12378,10 @@ function BaseToolbar({
12318
12378
  flex: `0 0 ${cssVars.spacing.toolbarHeight}`
12319
12379
  }
12320
12380
  },
12321
- logo && /* @__PURE__ */ React85.createElement(React85.Fragment, null, logo, /* @__PURE__ */ React85.createElement(DividerVertical, null)),
12322
- /* @__PURE__ */ React85.createElement(Spacer.Horizontal, { size: 10 }),
12323
- left && /* @__PURE__ */ React85.createElement(React85.Fragment, null, /* @__PURE__ */ React85.createElement("div", { className: "flex gap-toolbar-separator" }, left), /* @__PURE__ */ React85.createElement(Spacer.Horizontal, { size: 10 })),
12324
- /* @__PURE__ */ React85.createElement("div", { className: "flex items-center justify-center text-text-muted pointer-events-none @2xl/toolbar:absolute inset-0" }, /* @__PURE__ */ React85.createElement(
12381
+ logo && /* @__PURE__ */ React86.createElement(React86.Fragment, null, logo, /* @__PURE__ */ React86.createElement(DividerVertical, null)),
12382
+ /* @__PURE__ */ React86.createElement(Spacer.Horizontal, { size: 10 }),
12383
+ left && /* @__PURE__ */ React86.createElement(React86.Fragment, null, /* @__PURE__ */ React86.createElement("div", { className: "flex gap-toolbar-separator" }, left), /* @__PURE__ */ React86.createElement(Spacer.Horizontal, { size: 10 })),
12384
+ /* @__PURE__ */ React86.createElement("div", { className: "flex items-center justify-center text-text-muted pointer-events-none @2xl/toolbar:absolute inset-0" }, /* @__PURE__ */ React86.createElement(
12325
12385
  "div",
12326
12386
  {
12327
12387
  style: {
@@ -12333,16 +12393,91 @@ function BaseToolbar({
12333
12393
  },
12334
12394
  children
12335
12395
  )),
12336
- /* @__PURE__ */ React85.createElement(Spacer.Horizontal, null),
12337
- /* @__PURE__ */ React85.createElement(Spacer.Horizontal, { size: 10 }),
12338
- /* @__PURE__ */ React85.createElement("div", { className: "flex gap-toolbar-separator" }, right)
12339
- ), showDivider && /* @__PURE__ */ React85.createElement(Divider, { variant: "strong" }));
12396
+ /* @__PURE__ */ React86.createElement(Spacer.Horizontal, null),
12397
+ /* @__PURE__ */ React86.createElement(Spacer.Horizontal, { size: 10 }),
12398
+ /* @__PURE__ */ React86.createElement("div", { className: "flex gap-toolbar-separator" }, right)
12399
+ ), showDivider && /* @__PURE__ */ React86.createElement(Divider, { variant: "strong" }));
12340
12400
  }
12341
12401
 
12342
12402
  // src/components/Toolbar.tsx
12343
12403
  import { DropdownChevronIcon as DropdownChevronIcon4 } from "@noya-app/noya-icons";
12344
12404
  import { useKeyboardShortcuts as useKeyboardShortcuts4 } from "@noya-app/noya-keymap";
12345
- import React86 from "react";
12405
+ import React87 from "react";
12406
+ var iconButtonStyle = {
12407
+ height: 27,
12408
+ width: 27,
12409
+ minWidth: 27
12410
+ };
12411
+ var ToolbarMenuDropdown = memoGeneric(function ToolbarMenuDropdown2({
12412
+ item,
12413
+ onSelectMenuItem
12414
+ }) {
12415
+ const [open, setOpen] = React87.useState(false);
12416
+ return /* @__PURE__ */ React87.createElement(
12417
+ DropdownMenu,
12418
+ {
12419
+ open,
12420
+ onOpenChange: setOpen,
12421
+ items: item.items,
12422
+ onSelect: (value) => {
12423
+ if (onSelectMenuItem && value) {
12424
+ onSelectMenuItem(value);
12425
+ }
12426
+ }
12427
+ },
12428
+ /* @__PURE__ */ React87.createElement(Button, { disabled: item.disabled, active: item.checked || open }, item.icon && renderIcon(item.icon), item.title && item.icon && /* @__PURE__ */ React87.createElement(Spacer.Horizontal, { inline: true, size: 6 }), item.title, /* @__PURE__ */ React87.createElement(Spacer.Horizontal, { inline: true, size: 6 }), /* @__PURE__ */ React87.createElement(DropdownChevronIcon4, null))
12429
+ );
12430
+ });
12431
+ var ToolbarMenuButton = memoGeneric(function ToolbarMenuButton2({
12432
+ item,
12433
+ onSelectMenuItem
12434
+ }) {
12435
+ const content = /* @__PURE__ */ React87.createElement(
12436
+ Button,
12437
+ {
12438
+ disabled: item.disabled,
12439
+ active: item.checked,
12440
+ style: item.icon && !item.title ? iconButtonStyle : void 0,
12441
+ onClick: () => {
12442
+ if (onSelectMenuItem && item.value) {
12443
+ onSelectMenuItem(item.value);
12444
+ }
12445
+ }
12446
+ },
12447
+ item.icon && renderIcon(item.icon),
12448
+ item.title && item.icon && /* @__PURE__ */ React87.createElement(Spacer.Horizontal, { inline: true, size: 6 }),
12449
+ item.title
12450
+ );
12451
+ return item.tooltip ? /* @__PURE__ */ React87.createElement(Tooltip, { sideOffset: 10, content: item.tooltip }, content) : content;
12452
+ });
12453
+ var ToolbarMenuItem = memoGeneric(function ToolbarMenuItem2({
12454
+ item,
12455
+ onSelectMenuItem
12456
+ }) {
12457
+ if (item.type === "sectionHeader") return null;
12458
+ if (item.type === "separator") {
12459
+ return /* @__PURE__ */ React87.createElement(DividerVertical, { overflow: 4 });
12460
+ }
12461
+ if (isSelectableMenuItem(item)) {
12462
+ return /* @__PURE__ */ React87.createElement(ToolbarMenuButton, { item, onSelectMenuItem });
12463
+ }
12464
+ return /* @__PURE__ */ React87.createElement(ToolbarMenuDropdown, { item, onSelectMenuItem });
12465
+ });
12466
+ var ToolbarMenu = memoGeneric(function ToolbarMenu2({
12467
+ items,
12468
+ onSelectMenuItem
12469
+ }) {
12470
+ return /* @__PURE__ */ React87.createElement(React87.Fragment, null, items.map((item, i) => {
12471
+ return /* @__PURE__ */ React87.createElement(
12472
+ ToolbarMenuItem,
12473
+ {
12474
+ key: i,
12475
+ item,
12476
+ onSelectMenuItem
12477
+ }
12478
+ );
12479
+ }));
12480
+ });
12346
12481
  function Toolbar({
12347
12482
  children,
12348
12483
  logo,
@@ -12351,28 +12486,28 @@ function Toolbar({
12351
12486
  onSelectMenuItem,
12352
12487
  shouldBindKeyboardShortcuts = true
12353
12488
  }) {
12354
- const allMenuItems = React86.useMemo(
12489
+ const allMenuItems = React87.useMemo(
12355
12490
  () => [...leftMenuItems, ...rightMenuItems],
12356
12491
  [leftMenuItems, rightMenuItems]
12357
12492
  );
12358
12493
  useKeyboardShortcuts4(
12359
- React86.useMemo(
12494
+ React87.useMemo(
12360
12495
  () => onSelectMenuItem && shouldBindKeyboardShortcuts ? getKeyboardShortcutsForMenuItems(allMenuItems, onSelectMenuItem) : {},
12361
12496
  [allMenuItems, onSelectMenuItem, shouldBindKeyboardShortcuts]
12362
12497
  )
12363
12498
  );
12364
- return /* @__PURE__ */ React86.createElement(
12499
+ return /* @__PURE__ */ React87.createElement(
12365
12500
  BaseToolbar,
12366
12501
  {
12367
12502
  logo,
12368
- left: leftMenuItems.length > 0 && /* @__PURE__ */ React86.createElement("div", { className: "flex gap-2" }, /* @__PURE__ */ React86.createElement(
12503
+ left: leftMenuItems.length > 0 && /* @__PURE__ */ React87.createElement("div", { className: "flex gap-2" }, /* @__PURE__ */ React87.createElement(
12369
12504
  ToolbarMenu,
12370
12505
  {
12371
12506
  items: leftMenuItems,
12372
12507
  onSelectMenuItem
12373
12508
  }
12374
12509
  )),
12375
- right: rightMenuItems.length > 0 && /* @__PURE__ */ React86.createElement("div", { className: "flex gap-2" }, /* @__PURE__ */ React86.createElement(
12510
+ right: rightMenuItems.length > 0 && /* @__PURE__ */ React87.createElement("div", { className: "flex gap-2" }, /* @__PURE__ */ React87.createElement(
12376
12511
  ToolbarMenu,
12377
12512
  {
12378
12513
  items: rightMenuItems,
@@ -12383,64 +12518,6 @@ function Toolbar({
12383
12518
  children
12384
12519
  );
12385
12520
  }
12386
- var activeButtonStyle = {
12387
- backgroundColor: cssVars.colors.primaryPastel,
12388
- color: cssVars.colors.primary
12389
- };
12390
- var ToolbarMenu = memoGeneric(function ToolbarMenu2({
12391
- items,
12392
- onSelectMenuItem
12393
- }) {
12394
- return /* @__PURE__ */ React86.createElement(React86.Fragment, null, items.map((item, i) => {
12395
- if (item.type === "sectionHeader") return null;
12396
- if (item.type === "separator") {
12397
- return /* @__PURE__ */ React86.createElement(DividerVertical, { key: i, overflow: 4 });
12398
- }
12399
- if (isSelectableMenuItem(item)) {
12400
- const content = /* @__PURE__ */ React86.createElement(
12401
- Button,
12402
- {
12403
- key: i,
12404
- disabled: item.disabled,
12405
- style: item.checked ? activeButtonStyle : void 0,
12406
- onClick: () => {
12407
- if (onSelectMenuItem && item.value) {
12408
- onSelectMenuItem(item.value);
12409
- }
12410
- }
12411
- },
12412
- item.title,
12413
- item.title && item.icon && /* @__PURE__ */ React86.createElement(Spacer.Horizontal, { inline: true, size: 6 }),
12414
- item.icon && renderIcon(item.icon)
12415
- );
12416
- return item.tooltip ? /* @__PURE__ */ React86.createElement(Tooltip, { sideOffset: 10, content: item.tooltip, key: i }, content) : content;
12417
- }
12418
- return /* @__PURE__ */ React86.createElement(
12419
- DropdownMenu,
12420
- {
12421
- key: i,
12422
- items: item.items,
12423
- onSelect: (value) => {
12424
- if (onSelectMenuItem && value) {
12425
- onSelectMenuItem(value);
12426
- }
12427
- }
12428
- },
12429
- /* @__PURE__ */ React86.createElement(
12430
- Button,
12431
- {
12432
- disabled: item.disabled,
12433
- style: item.checked ? activeButtonStyle : void 0
12434
- },
12435
- item.title,
12436
- item.title && item.icon && /* @__PURE__ */ React86.createElement(Spacer.Horizontal, { inline: true, size: 6 }),
12437
- item.icon && renderIcon(item.icon),
12438
- /* @__PURE__ */ React86.createElement(Spacer.Horizontal, { size: 6 }),
12439
- /* @__PURE__ */ React86.createElement(DropdownChevronIcon4, null)
12440
- )
12441
- );
12442
- }));
12443
- });
12444
12521
  export {
12445
12522
  AIAssistantInput,
12446
12523
  AIAssistantLayout,
@@ -12529,6 +12606,7 @@ export {
12529
12606
  PipelineResultLayout,
12530
12607
  PipelineResultLink,
12531
12608
  Popover,
12609
+ PortalScopeProvider,
12532
12610
  Progress,
12533
12611
  RIGHT_SIDEBAR_ID,
12534
12612
  SUPPORTED_CANVAS_UPLOAD_TYPES,
@@ -12539,7 +12617,7 @@ export {
12539
12617
  SectionHeader,
12540
12618
  SegmentedControl,
12541
12619
  SelectMenu,
12542
- SelectionToolbar,
12620
+ SelectionToolbarContainer,
12543
12621
  Slider,
12544
12622
  Small,
12545
12623
  Sortable2 as Sortable,
@@ -12552,6 +12630,9 @@ export {
12552
12630
  ToastProvider,
12553
12631
  Toolbar,
12554
12632
  ToolbarMenu,
12633
+ ToolbarMenuButton,
12634
+ ToolbarMenuDropdown,
12635
+ ToolbarMenuItem,
12555
12636
  Tooltip,
12556
12637
  TreeView,
12557
12638
  UserAvatar,
@@ -12570,6 +12651,7 @@ export {
12570
12651
  fuzzyFilter,
12571
12652
  fuzzyScore,
12572
12653
  fuzzyTokenize,
12654
+ getClosestPortalScope,
12573
12655
  getFieldSpacing,
12574
12656
  getGradientBackground,
12575
12657
  getGridSize,
@@ -12589,6 +12671,9 @@ export {
12589
12671
  moveTreeItem,
12590
12672
  normalizeListTargetIndex,
12591
12673
  popoverStyle,
12674
+ portalScopeDataSetName,
12675
+ portalScopePropName,
12676
+ portalScopeProps,
12592
12677
  renderIcon,
12593
12678
  rgbaToSketchColor,
12594
12679
  separator,
@@ -12621,6 +12706,7 @@ export {
12621
12706
  useOpenInputDialog,
12622
12707
  usePlatform,
12623
12708
  usePlatformModKey,
12709
+ usePortalScopeId,
12624
12710
  usePreservePanelSize,
12625
12711
  useTheme,
12626
12712
  validateDropIndicator,