@noya-app/noya-designsystem 0.1.25 → 0.1.26

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
@@ -331,7 +331,13 @@ var ButtonElement = styled5.button(
331
331
  color: theme.colors.text,
332
332
  boxShadow: "0 1px 2px rgba(0, 0, 0, 0.1)",
333
333
  fontSize: "12px",
334
- padding: "0px 4px"
334
+ padding: "0px 4px",
335
+ "&:hover": {
336
+ opacity: 0.8
337
+ },
338
+ "&:active": {
339
+ opacity: 0.9
340
+ }
335
341
  },
336
342
  display: "flex",
337
343
  alignItems: "center",
@@ -355,7 +361,7 @@ var ButtonContent = styled5.span(({ theme }) => ({
355
361
  var Button = forwardRef3(function Button2({
356
362
  id,
357
363
  className,
358
- style: style3,
364
+ style: style2,
359
365
  flex,
360
366
  tabIndex,
361
367
  tooltip,
@@ -376,7 +382,7 @@ var Button = forwardRef3(function Button2({
376
382
  ref: forwardedRef,
377
383
  id,
378
384
  className,
379
- style: style3,
385
+ style: style2,
380
386
  $flex: flex,
381
387
  tabIndex,
382
388
  $active: active,
@@ -441,14 +447,14 @@ var IconButton = memo4(
441
447
  forwardRef4(function IconButton2({ selected, iconName, color, size: size2, contentStyle, ...props }, forwardedRef) {
442
448
  const { icon: iconColor, iconSelected: iconSelectedColor } = useTheme().colors;
443
449
  const Icon = Icons[iconName];
444
- const style3 = useMemo(() => {
450
+ const style2 = useMemo(() => {
445
451
  return {
446
452
  padding: "0 2px",
447
453
  ...size2 && { minHeight: size2 },
448
454
  ...contentStyle
449
455
  };
450
456
  }, [contentStyle, size2]);
451
- return /* @__PURE__ */ React7.createElement(Button, { ref: forwardedRef, ...props, variant: "none", contentStyle: style3 }, /* @__PURE__ */ React7.createElement(
457
+ return /* @__PURE__ */ React7.createElement(Button, { ref: forwardedRef, ...props, variant: "none", contentStyle: style2 }, /* @__PURE__ */ React7.createElement(
452
458
  Icon,
453
459
  {
454
460
  color: color ?? (selected ? iconSelectedColor : iconColor),
@@ -551,26 +557,29 @@ var mediaQuery = {
551
557
  var name = "light";
552
558
  var colors = {
553
559
  logo: {
554
- fill: "rgb(175,175,175)",
555
- highlight: "rgb(175,175,175)"
560
+ fill: "rgb(150, 152, 172)",
561
+ highlight: "rgb(150, 152, 172)"
556
562
  },
563
+ background: "rgb(255,255,255)",
557
564
  text: "rgb(38, 48, 83)",
558
- textMuted: "rgb(85, 85, 85)",
559
- textSubtle: "rgb(121, 121, 121)",
560
- textDisabled: "rgb(160, 160, 160)",
565
+ textMuted: "rgb(107, 113, 136)",
566
+ textSubtle: "rgb(117, 121, 129)",
567
+ textDisabled: "rgb(150, 152, 172)",
561
568
  textDecorativeLight: "rgb(168, 185, 212)",
562
- dividerSubtle: "rgba(0, 0, 0, 0.04)",
563
- divider: "rgba(0, 0, 0, 0.07)",
564
- dividerStrong: "rgba(0, 0, 0, 0.09)",
565
- primary: "rgb(132, 63, 255)",
569
+ dividerSubtle: "rgba(30, 50, 100, 0.04)",
570
+ divider: "rgba(30, 50, 100, 0.07)",
571
+ dividerStrong: "rgba(30, 50, 100, 0.09)",
572
+ primary: "rgb(103, 70, 255)",
566
573
  primaryLight: "rgb(147, 86, 255)",
574
+ primaryPastel: "rgba(234, 230, 255)",
567
575
  secondary: "rgb(0, 151, 117)",
568
576
  secondaryLight: "rgb(0, 160, 129)",
577
+ secondaryPastel: "rgb(205, 238, 231)",
569
578
  secondaryBright: "#0ab557",
570
579
  warning: "rgb(251, 211, 0)",
571
580
  neutralBackground: "rgb(222,223,232)",
572
- inputBackground: "rgb(240, 240, 242)",
573
- inputBackgroundLight: "rgb(243, 243, 245)",
581
+ inputBackground: "rgb(240, 242, 246)",
582
+ inputBackgroundLight: "rgb(243, 245, 249)",
574
583
  codeBackground: "rgb(250, 250, 250)",
575
584
  codeBackgroundLight: "rgb(250, 250, 250)",
576
585
  get codeBackgroundDark() {
@@ -598,6 +607,7 @@ var colors = {
598
607
  editingBackground: "#fff"
599
608
  },
600
609
  canvas: {
610
+ // background: "white",
601
611
  background: "rgb(249,249,249)",
602
612
  get selectionStroke() {
603
613
  return colors.primary;
@@ -608,8 +618,8 @@ var colors = {
608
618
  grid: "rgba(0,0,0,0.05)"
609
619
  },
610
620
  sidebar: {
611
- background: "rgb(252,252,252)",
612
- backgroundTransparent: "rgba(252,252,252,0.85)"
621
+ background: "rgb(255,255,255)",
622
+ backgroundTransparent: "rgba(255,255,255,0.85)"
613
623
  },
614
624
  popover: {
615
625
  background: "rgb(252,252,252)",
@@ -622,7 +632,7 @@ var colors = {
622
632
  radioGroup: {
623
633
  background: "white"
624
634
  },
625
- icon: "rgb(139, 139, 139)",
635
+ icon: "rgb(129, 131, 165)",
626
636
  iconSelected: "rgb(220, 220, 220)",
627
637
  mask: "rgb(12,193,67)",
628
638
  imageOverlay: "linear-gradient(0deg, rgba(132, 63, 255,0.55), rgba(132, 63, 255,0.55))",
@@ -662,41 +672,41 @@ var textStyles = {
662
672
  heading1: {
663
673
  fontFamily: fonts.normal,
664
674
  fontSize: `${typeScale[2]}rem`,
665
- fontWeight: 500,
666
- lineHeight: "1.75",
675
+ fontWeight: 600,
676
+ lineHeight: "1.6",
667
677
  letterSpacing: "-0.025em"
668
678
  },
669
679
  heading2: {
670
680
  fontFamily: fonts.normal,
671
681
  fontSize: `${typeScale[3]}rem`,
672
682
  fontWeight: 500,
673
- lineHeight: "1.75",
683
+ lineHeight: "1.5",
674
684
  letterSpacing: "-0.025em"
675
685
  },
676
686
  heading3: {
677
687
  fontFamily: fonts.normal,
678
688
  fontSize: `${typeScale[4]}rem`,
679
- fontWeight: 500,
680
- lineHeight: "1.75",
689
+ fontWeight: 400,
690
+ lineHeight: "1.4",
681
691
  letterSpacing: "-0.025em"
682
692
  },
683
693
  heading4: {
684
694
  fontFamily: fonts.normal,
685
695
  fontSize: `${typeScale[5]}rem`,
686
696
  fontWeight: 500,
687
- lineHeight: "1.75"
697
+ lineHeight: "1.4"
688
698
  },
689
699
  heading5: {
690
700
  fontFamily: fonts.normal,
691
701
  fontSize: `${typeScale[6]}rem`,
692
702
  fontWeight: 500,
693
- lineHeight: "1.75"
703
+ lineHeight: "1.4"
694
704
  },
695
705
  body: {
696
706
  fontFamily: fonts.normal,
697
707
  fontSize: `${typeScale[5]}rem`,
698
708
  fontWeight: 400,
699
- lineHeight: "1.75"
709
+ lineHeight: "1.4"
700
710
  },
701
711
  small: {
702
712
  fontFamily: fonts.normal,
@@ -798,7 +808,7 @@ import React19, {
798
808
  useCallback as useCallback12,
799
809
  useContext as useContext3,
800
810
  useMemo as useMemo7,
801
- useRef as useRef11,
811
+ useRef as useRef12,
802
812
  useState as useState12
803
813
  } from "react";
804
814
  import styled13 from "styled-components";
@@ -890,7 +900,7 @@ var Dialog = forwardRef6(function Dialog2({
890
900
  title,
891
901
  description,
892
902
  open,
893
- style: style3,
903
+ style: style2,
894
904
  onOpenChange,
895
905
  onOpenAutoFocus,
896
906
  closeOnInteractOutside = true
@@ -908,7 +918,7 @@ var Dialog = forwardRef6(function Dialog2({
908
918
  {
909
919
  ref: contentRef,
910
920
  onOpenAutoFocus,
911
- style: style3,
921
+ style: style2,
912
922
  ...closeOnInteractOutside === false && {
913
923
  onPointerDownOutside: (event) => {
914
924
  event.preventDefault();
@@ -924,7 +934,7 @@ var Dialog = forwardRef6(function Dialog2({
924
934
  children
925
935
  ));
926
936
  });
927
- var FullscreenDialog = forwardRef6(function FullscreenDialog2({ style: style3, ...rest }, forwardedRef) {
937
+ var FullscreenDialog = forwardRef6(function FullscreenDialog2({ style: style2, ...rest }, forwardedRef) {
928
938
  return /* @__PURE__ */ React10.createElement(
929
939
  Dialog,
930
940
  {
@@ -940,7 +950,7 @@ var FullscreenDialog = forwardRef6(function FullscreenDialog2({ style: style3, .
940
950
  display: "flex",
941
951
  flexDirection: "column",
942
952
  padding: 0,
943
- ...style3
953
+ ...style2
944
954
  },
945
955
  ...rest
946
956
  }
@@ -1023,33 +1033,47 @@ var SingleDimensionAutoSizer = memo5(function SingleDimensionAutoSizer2({
1023
1033
  });
1024
1034
 
1025
1035
  // ../noya-react-utils/src/components/FileDropTarget.tsx
1026
- import React13, {
1027
- memo as memo6,
1028
- useCallback as useCallback3
1029
- } from "react";
1036
+ import React13, { memo as memo6, useCallback as useCallback3, useRef as useRef3 } from "react";
1030
1037
 
1031
1038
  // ../noya-react-utils/src/hooks/useFileDropTarget.ts
1032
1039
  import { useCallback as useCallback2, useState as useState2 } from "react";
1033
- function useFileDropTarget(dropEvent) {
1040
+ function useFileDropTarget(ref, dropEvent) {
1034
1041
  const [isDropTargetActive, setIsDropTargetActive] = useState2(false);
1035
- const handleDragEvent = useCallback2((event, on) => {
1036
- if (on !== void 0)
1037
- setIsDropTargetActive(on);
1042
+ const handleDragOver = useCallback2((event) => {
1038
1043
  event.preventDefault();
1039
1044
  }, []);
1040
- const handleDropEvent = useCallback2(
1045
+ const handleDragEnter = useCallback2(
1046
+ (event) => {
1047
+ event.preventDefault();
1048
+ if (!ref.current?.contains(event.relatedTarget)) {
1049
+ setIsDropTargetActive(true);
1050
+ }
1051
+ },
1052
+ [ref]
1053
+ );
1054
+ const handleDragLeave = useCallback2(
1055
+ (event) => {
1056
+ event.preventDefault();
1057
+ if (!ref.current?.contains(event.relatedTarget)) {
1058
+ setIsDropTargetActive(false);
1059
+ }
1060
+ },
1061
+ [ref]
1062
+ );
1063
+ const handleDrop = useCallback2(
1041
1064
  (event) => {
1065
+ event.preventDefault();
1042
1066
  dropEvent(event);
1043
1067
  setIsDropTargetActive(false);
1044
1068
  },
1045
- [dropEvent, setIsDropTargetActive]
1069
+ [dropEvent]
1046
1070
  );
1047
1071
  return {
1048
1072
  dropTargetProps: {
1049
- onDragOver: handleDragEvent,
1050
- onDragEnter: (event) => handleDragEvent(event, true),
1051
- onDragLeave: (event) => handleDragEvent(event, false),
1052
- onDrop: handleDropEvent
1073
+ onDragOver: handleDragOver,
1074
+ onDragEnter: handleDragEnter,
1075
+ onDragLeave: handleDragLeave,
1076
+ onDrop: handleDrop
1053
1077
  },
1054
1078
  isDropTargetActive
1055
1079
  };
@@ -1059,12 +1083,13 @@ function useFileDropTarget(dropEvent) {
1059
1083
  function isSupportedFile(file, supportedFileTypes) {
1060
1084
  return supportedFileTypes.includes(file.type) || file.type === "" && file.name.endsWith(".sketch");
1061
1085
  }
1062
- var style2 = { display: "flex", flex: 1 };
1063
1086
  var FileDropTarget = memo6(function FileDropTarget2({
1064
1087
  children,
1065
1088
  onDropFiles,
1066
- supportedFileTypes
1089
+ supportedFileTypes,
1090
+ ...props
1067
1091
  }) {
1092
+ const ref = useRef3(null);
1068
1093
  const handleFile = useCallback3(
1069
1094
  (event) => {
1070
1095
  event.preventDefault();
@@ -1097,13 +1122,16 @@ var FileDropTarget = memo6(function FileDropTarget2({
1097
1122
  },
1098
1123
  [onDropFiles, supportedFileTypes]
1099
1124
  );
1100
- const { dropTargetProps, isDropTargetActive } = useFileDropTarget(handleFile);
1101
- return /* @__PURE__ */ React13.createElement("div", { style: style2, ...dropTargetProps }, typeof children === "function" ? children(isDropTargetActive) : children);
1125
+ const { dropTargetProps, isDropTargetActive } = useFileDropTarget(
1126
+ ref,
1127
+ handleFile
1128
+ );
1129
+ return /* @__PURE__ */ React13.createElement("div", { ref, ...dropTargetProps, ...props }, typeof children === "function" ? children(isDropTargetActive) : children);
1102
1130
  });
1103
1131
 
1104
1132
  // ../noya-react-utils/src/hooks/useDeepArray.ts
1105
1133
  import { isDeepEqual } from "@noya-app/noya-utils";
1106
- import { useRef as useRef3 } from "react";
1134
+ import { useRef as useRef4 } from "react";
1107
1135
 
1108
1136
  // ../noya-react-utils/src/hooks/useDeepState.ts
1109
1137
  import { isDeepEqual as isDeepEqual2 } from "@noya-app/noya-utils";
@@ -1113,13 +1141,13 @@ import { useCallback as useCallback4, useMemo as useMemo2, useState as useState3
1113
1141
  import { useEffect as useEffect2, useState as useState4 } from "react";
1114
1142
 
1115
1143
  // ../noya-react-utils/src/hooks/useIsMounted.ts
1116
- import { useEffect as useEffect3, useRef as useRef4 } from "react";
1144
+ import { useEffect as useEffect3, useRef as useRef5 } from "react";
1117
1145
 
1118
1146
  // ../noya-react-utils/src/hooks/useLateReference.ts
1119
- import { useCallback as useCallback5, useLayoutEffect, useRef as useRef5 } from "react";
1147
+ import { useCallback as useCallback5, useLayoutEffect, useRef as useRef6 } from "react";
1120
1148
 
1121
1149
  // ../noya-react-utils/src/hooks/useLazyValue.ts
1122
- import { useRef as useRef6 } from "react";
1150
+ import { useRef as useRef7 } from "react";
1123
1151
 
1124
1152
  // ../noya-react-utils/src/hooks/useMutableState.ts
1125
1153
  import { useCallback as useCallback6, useMemo as useMemo3, useState as useState5 } from "react";
@@ -1137,10 +1165,10 @@ import { useEffect as useEffect5, useState as useState7 } from "react";
1137
1165
 
1138
1166
  // ../noya-react-utils/src/hooks/useShallowArray.ts
1139
1167
  import { isShallowEqual } from "@noya-app/noya-utils";
1140
- import { useRef as useRef7 } from "react";
1168
+ import { useRef as useRef8 } from "react";
1141
1169
 
1142
1170
  // ../noya-react-utils/src/hooks/useStableCallback.ts
1143
- import { useCallback as useCallback8, useLayoutEffect as useLayoutEffect2, useRef as useRef8 } from "react";
1171
+ import { useCallback as useCallback8, useLayoutEffect as useLayoutEffect2, useRef as useRef9 } from "react";
1144
1172
 
1145
1173
  // ../noya-react-utils/src/hooks/useSystemColorScheme.ts
1146
1174
  import { useEffect as useEffect6, useState as useState8 } from "react";
@@ -1249,7 +1277,7 @@ import React18, {
1249
1277
  useEffect as useEffect10,
1250
1278
  useLayoutEffect as useLayoutEffect4,
1251
1279
  useMemo as useMemo6,
1252
- useRef as useRef10,
1280
+ useRef as useRef11,
1253
1281
  useState as useState11
1254
1282
  } from "react";
1255
1283
  import styled12 from "styled-components";
@@ -1522,7 +1550,7 @@ import React16, {
1522
1550
  useCallback as useCallback10,
1523
1551
  useEffect as useEffect9,
1524
1552
  useLayoutEffect as useLayoutEffect3,
1525
- useRef as useRef9,
1553
+ useRef as useRef10,
1526
1554
  useState as useState10
1527
1555
  } from "react";
1528
1556
 
@@ -1630,10 +1658,10 @@ var SubmittableTextInput = forwardRef8(function SubmittableTextInput2({
1630
1658
  ...rest
1631
1659
  }, forwardedRef) {
1632
1660
  const ref = React16.useRef(null);
1633
- const latestValue = useRef9(value);
1661
+ const latestValue = useRef10(value);
1634
1662
  latestValue.current = value;
1635
- const userDidEdit = useRef9(false);
1636
- const isSubmitTriggeredByEscapeKey = useRef9(false);
1663
+ const userDidEdit = useRef10(false);
1664
+ const isSubmitTriggeredByEscapeKey = useRef10(false);
1637
1665
  const [internalValue, setInternalValue] = useState10("");
1638
1666
  useLayoutEffect3(() => {
1639
1667
  setInternalValue(value);
@@ -1691,10 +1719,10 @@ var SubmittableTextInput = forwardRef8(function SubmittableTextInput2({
1691
1719
  },
1692
1720
  [onFocusCapture, onFocusChange]
1693
1721
  );
1694
- const autoSubmitTimeoutRef = useRef9(
1722
+ const autoSubmitTimeoutRef = useRef10(
1695
1723
  null
1696
1724
  );
1697
- const latestHandleSubmit = useRef9(handleSubmit);
1725
+ const latestHandleSubmit = useRef10(handleSubmit);
1698
1726
  latestHandleSubmit.current = handleSubmit;
1699
1727
  useEffect9(() => {
1700
1728
  if (submitAutomaticallyAfterDelay) {
@@ -1853,9 +1881,9 @@ var LabelContainer = styled12.label(({ theme, $labelPosition, $hasDropdown, poin
1853
1881
  }
1854
1882
  }));
1855
1883
  var InputFieldLabel = memo9(
1856
- forwardRef9(function InputFieldLabel2({ children = false, pointerEvents = "none", style: style3 }, forwardedRef) {
1884
+ forwardRef9(function InputFieldLabel2({ children = false, pointerEvents = "none", style: style2 }, forwardedRef) {
1857
1885
  const { labelPosition, hasDropdown, setLabelWidth } = useContext2(InputFieldContext);
1858
- const ref = useRef10(null);
1886
+ const ref = useRef11(null);
1859
1887
  useLayoutEffect4(() => {
1860
1888
  if (!setLabelWidth)
1861
1889
  return;
@@ -1874,7 +1902,7 @@ var InputFieldLabel = memo9(
1874
1902
  pointerEvents,
1875
1903
  $labelPosition: labelPosition,
1876
1904
  $hasDropdown: hasDropdown,
1877
- style: style3
1905
+ style: style2
1878
1906
  },
1879
1907
  children
1880
1908
  );
@@ -2042,34 +2070,34 @@ var InputFieldTypeahead = (props) => {
2042
2070
  labelSize,
2043
2071
  hasDropdown,
2044
2072
  hasLabel,
2045
- size: size2,
2046
- onFocusChange
2073
+ size: size2
2074
+ // onFocusChange,
2047
2075
  } = useContext2(InputFieldContext);
2048
2076
  return /* @__PURE__ */ React18.createElement(
2049
2077
  InputElement,
2050
2078
  {
2079
+ as: "span",
2051
2080
  $labelPosition: labelPosition,
2052
2081
  $labelSize: labelSize,
2053
2082
  $hasLabel: hasLabel,
2054
2083
  $hasDropdown: hasDropdown,
2055
2084
  $size: size2,
2056
- onFocusChange,
2057
- readOnly: true,
2058
- placeholder: props.value,
2059
2085
  value: "",
2060
2086
  style: {
2061
2087
  position: "absolute",
2062
- top: -1,
2088
+ top: 0,
2063
2089
  left: 0,
2064
2090
  right: 0,
2065
- bottom: -1,
2091
+ bottom: 0,
2066
2092
  width: "100%",
2067
2093
  height: "100%",
2068
2094
  pointerEvents: "none",
2069
2095
  background: "transparent",
2070
2096
  boxShadow: "none"
2071
2097
  }
2072
- }
2098
+ },
2099
+ /* @__PURE__ */ React18.createElement("span", { style: { opacity: 0 } }, props.prefix),
2100
+ /* @__PURE__ */ React18.createElement("span", { style: { opacity: 0.5 } }, props.value.slice(props.prefix.length))
2073
2101
  );
2074
2102
  };
2075
2103
  function parseNumber(value) {
@@ -2157,7 +2185,7 @@ function InputFieldRoot({
2157
2185
  size: size2 = "medium",
2158
2186
  renderPopoverContent,
2159
2187
  onFocusChange,
2160
- style: style3,
2188
+ style: style2,
2161
2189
  className
2162
2190
  }) {
2163
2191
  const childrenArray = Children3.toArray(children);
@@ -2216,7 +2244,7 @@ function InputFieldRoot({
2216
2244
  id,
2217
2245
  $width: width,
2218
2246
  $flex: flex,
2219
- style: style3,
2247
+ style: style2,
2220
2248
  className
2221
2249
  },
2222
2250
  children
@@ -2341,8 +2369,8 @@ var DialogProvider = function DialogProvider2({
2341
2369
  },
2342
2370
  [submit]
2343
2371
  );
2344
- const inputRef = useRef11(null);
2345
- const dialogRef = useRef11(null);
2372
+ const inputRef = useRef12(null);
2373
+ const dialogRef = useRef12(null);
2346
2374
  const containsElement = useCallback12((element) => {
2347
2375
  if (!dialogRef.current)
2348
2376
  return false;
@@ -2613,7 +2641,7 @@ function useHover(props = {}) {
2613
2641
  // src/components/Chip.tsx
2614
2642
  var ChipElement = styled14.span(({ theme, $colorScheme, $size, $variant, $monospace, $isInteractive }) => {
2615
2643
  const color = $colorScheme === "primary" ? theme.colors.primary : $colorScheme === "secondary" ? theme.colors.secondary : theme.colors.text;
2616
- const backgroundColor = $colorScheme === "primary" ? "rgb(238, 229, 255)" : $colorScheme === "secondary" ? "rgb(205, 238, 231)" : $colorScheme === "error" ? "rgb(255, 219, 219)" : theme.colors.inputBackground;
2644
+ const backgroundColor = $colorScheme === "primary" ? theme.colors.primaryPastel : $colorScheme === "secondary" ? theme.colors.secondaryPastel : $colorScheme === "error" ? "rgb(255, 219, 219)" : theme.colors.inputBackground;
2617
2645
  const subtleColor = $colorScheme === "primary" ? "rgba(238, 229, 255, 0.2)" : $colorScheme === "secondary" ? "rgba(205, 238, 231, 0.2)" : $colorScheme === "error" ? "rgba(255, 219, 219, 0.2)" : "rgba(0, 0, 0, 0.1)";
2618
2646
  return {
2619
2647
  textTransform: "initial",
@@ -2702,7 +2730,7 @@ var Chip = memo11(
2702
2730
  deletable,
2703
2731
  addable,
2704
2732
  clickable,
2705
- style: style3,
2733
+ style: style2,
2706
2734
  size: size2 = "large",
2707
2735
  variant = "solid",
2708
2736
  monospace = false,
@@ -2725,7 +2753,7 @@ var Chip = memo11(
2725
2753
  ref: forwardedRef,
2726
2754
  $variant: variant,
2727
2755
  $colorScheme: colorScheme,
2728
- style: style3,
2756
+ style: style2,
2729
2757
  onClick: handleClick,
2730
2758
  $size: size2,
2731
2759
  $monospace: monospace,
@@ -3547,7 +3575,7 @@ var FillInputField = memo17(
3547
3575
  );
3548
3576
 
3549
3577
  // src/components/FloatingWindow.tsx
3550
- import React30, { useCallback as useCallback15, useRef as useRef13, useState as useState17 } from "react";
3578
+ import React30, { useCallback as useCallback15, useRef as useRef14, useState as useState17 } from "react";
3551
3579
  var styles2 = {
3552
3580
  noSelect: {
3553
3581
  userSelect: "none",
@@ -3674,7 +3702,7 @@ var FloatingWindow = ({
3674
3702
  const [isResizing, setIsResizing] = useState17(false);
3675
3703
  const [dragOffset, setDragOffset] = useState17({ x: 0, y: 0 });
3676
3704
  const [resizeDirection, setResizeDirection] = useState17(null);
3677
- const wrapperRef = useRef13(null);
3705
+ const wrapperRef = useRef14(null);
3678
3706
  const toggleGlobalTextSelection = (disable) => {
3679
3707
  if (disable) {
3680
3708
  document.body.style.userSelect = "none";
@@ -3804,11 +3832,11 @@ var FloatingWindow = ({
3804
3832
  ),
3805
3833
  /* @__PURE__ */ React30.createElement(Divider, null),
3806
3834
  /* @__PURE__ */ React30.createElement("div", { style: styles2.content }, children),
3807
- Object.entries(resizeHandlePositions).map(([direction, style3]) => /* @__PURE__ */ React30.createElement(
3835
+ Object.entries(resizeHandlePositions).map(([direction, style2]) => /* @__PURE__ */ React30.createElement(
3808
3836
  "div",
3809
3837
  {
3810
3838
  key: direction,
3811
- style: { ...styles2.resizeHandle, ...style3 },
3839
+ style: { ...styles2.resizeHandle, ...style2 },
3812
3840
  onMouseDown: handleResizeStart(direction)
3813
3841
  }
3814
3842
  ))
@@ -4161,7 +4189,7 @@ var GridViewItem = forwardRef12(function GridViewItem2({
4161
4189
  menuItems,
4162
4190
  onSelectMenuItem,
4163
4191
  onContextMenu,
4164
- style: style3
4192
+ style: style2
4165
4193
  }, forwardedRef) {
4166
4194
  const [hovered, setHovered] = React33.useState(false);
4167
4195
  const { hoverProps } = useHover({
@@ -4211,7 +4239,7 @@ var GridViewItem = forwardRef12(function GridViewItem2({
4211
4239
  onClick: handleClick,
4212
4240
  onDoubleClick,
4213
4241
  onContextMenu,
4214
- style: style3
4242
+ style: style2
4215
4243
  },
4216
4244
  children
4217
4245
  ),
@@ -4299,7 +4327,7 @@ import React37, {
4299
4327
  useImperativeHandle as useImperativeHandle3,
4300
4328
  useLayoutEffect as useLayoutEffect7,
4301
4329
  useMemo as useMemo19,
4302
- useRef as useRef16,
4330
+ useRef as useRef17,
4303
4331
  useState as useState20
4304
4332
  } from "react";
4305
4333
  import styled25 from "styled-components";
@@ -4389,7 +4417,7 @@ import React35, {
4389
4417
  useImperativeHandle as useImperativeHandle2,
4390
4418
  useLayoutEffect as useLayoutEffect6,
4391
4419
  useMemo as useMemo18,
4392
- useRef as useRef15
4420
+ useRef as useRef16
4393
4421
  } from "react";
4394
4422
  import { WindowScroller } from "react-virtualized";
4395
4423
  import { VariableSizeList } from "react-window";
@@ -4439,7 +4467,7 @@ import React34, {
4439
4467
  useContext as useContext8,
4440
4468
  useEffect as useEffect13,
4441
4469
  useMemo as useMemo17,
4442
- useRef as useRef14,
4470
+ useRef as useRef15,
4443
4471
  useState as useState19
4444
4472
  } from "react";
4445
4473
  import { createPortal as createPortal2 } from "react-dom";
@@ -4529,7 +4557,7 @@ function SortableRoot({
4529
4557
  })
4530
4558
  );
4531
4559
  const [activeIndex, setActiveIndex] = useState19();
4532
- const activatorEvent = useRef14(null);
4560
+ const activatorEvent = useRef15(null);
4533
4561
  const setActivatorEvent = useCallback19((event) => {
4534
4562
  activatorEvent.current = event;
4535
4563
  }, []);
@@ -4649,7 +4677,7 @@ function ListViewEditableRowTitle({
4649
4677
  autoFocus,
4650
4678
  placeholder
4651
4679
  }) {
4652
- const inputRef = useRef15(null);
4680
+ const inputRef = useRef16(null);
4653
4681
  useLayoutEffect6(() => {
4654
4682
  const element = inputRef.current;
4655
4683
  if (!element || !autoFocus)
@@ -4801,8 +4829,9 @@ var ListViewRow = forwardRef13(function ListViewRow2({
4801
4829
  onSelectMenuItem,
4802
4830
  onMenuOpenChange,
4803
4831
  onKeyDown,
4804
- style: style3,
4805
- dragIndicatorStyle
4832
+ style: style2,
4833
+ dragIndicatorStyle,
4834
+ className
4806
4835
  }, forwardedRef) {
4807
4836
  depth = Math.max(0, depth);
4808
4837
  const {
@@ -4841,9 +4870,9 @@ var ListViewRow = forwardRef13(function ListViewRow2({
4841
4870
  // TODO: Where do these offsets actually come from?
4842
4871
  transform: `translate3d(-36px, -6px, 0)`,
4843
4872
  width: `calc(100% + 48px)`,
4844
- ...style3
4845
- } : style3;
4846
- }, [isDragging, style3]);
4873
+ ...style2
4874
+ } : style2;
4875
+ }, [isDragging, style2]);
4847
4876
  const renderContent = ({
4848
4877
  relativeDropPosition,
4849
4878
  ...renderProps
@@ -4878,7 +4907,8 @@ var ListViewRow = forwardRef13(function ListViewRow2({
4878
4907
  { onPointerDown: renderProps.onPointerDown },
4879
4908
  { [pressEventName]: handlePress }
4880
4909
  ),
4881
- tabIndex
4910
+ tabIndex,
4911
+ className
4882
4912
  },
4883
4913
  relativeDropPosition && /* @__PURE__ */ React35.createElement(
4884
4914
  ListViewDragIndicatorElement,
@@ -4924,10 +4954,10 @@ var RenderItemContext = createContext9(
4924
4954
  RenderItemContext.displayName = "RenderItemContext";
4925
4955
  var VirtualizedListRow = memo22(function VirtualizedListRow2({
4926
4956
  index,
4927
- style: style3
4957
+ style: style2
4928
4958
  }) {
4929
4959
  const renderItem = useContext9(RenderItemContext);
4930
- return /* @__PURE__ */ React35.createElement("div", { key: index, style: style3 }, renderItem(index));
4960
+ return /* @__PURE__ */ React35.createElement("div", { key: index, style: style2 }, renderItem(index));
4931
4961
  });
4932
4962
  var VirtualizedListInner = forwardRef13(function VirtualizedListInner2({
4933
4963
  size: size2,
@@ -4937,7 +4967,7 @@ var VirtualizedListInner = forwardRef13(function VirtualizedListInner2({
4937
4967
  keyExtractor,
4938
4968
  renderItem
4939
4969
  }, ref) {
4940
- const listRef = useRef15(null);
4970
+ const listRef = useRef16(null);
4941
4971
  useImperativeHandle2(ref, () => ({
4942
4972
  scrollToIndex(index) {
4943
4973
  listRef.current?.scrollToItem(index);
@@ -5013,7 +5043,7 @@ var RootContainer2 = styled23.div(({ theme, $scrollable, $gap }) => ({
5013
5043
  var ListViewRootInner = forwardRef13(function ListViewRootInner2({
5014
5044
  id,
5015
5045
  className,
5016
- style: style3,
5046
+ style: style2,
5017
5047
  onPress,
5018
5048
  scrollable = false,
5019
5049
  expandable = true,
@@ -5174,7 +5204,7 @@ var ListViewRootInner = forwardRef13(function ListViewRootInner2({
5174
5204
  {
5175
5205
  id,
5176
5206
  className,
5177
- style: style3,
5207
+ style: style2,
5178
5208
  ...{
5179
5209
  [pressEventName]: handleClick
5180
5210
  },
@@ -5280,6 +5310,7 @@ var Text = forwardRef14(function Text2({
5280
5310
  tabIndex,
5281
5311
  onClick,
5282
5312
  onKeyDown,
5313
+ style: style2,
5283
5314
  ...rest
5284
5315
  }, forwardedRef) {
5285
5316
  const element = as ?? elements[variant] ?? "span";
@@ -5289,6 +5320,7 @@ var Text = forwardRef14(function Text2({
5289
5320
  ref: forwardedRef,
5290
5321
  as: element,
5291
5322
  className,
5323
+ style: style2,
5292
5324
  tabIndex,
5293
5325
  $variant: variant,
5294
5326
  $breakpoints: breakpoints,
@@ -5423,13 +5455,13 @@ var InputFieldWithCompletions = memo23(
5423
5455
  onFocus,
5424
5456
  onBlur,
5425
5457
  onDeleteWhenEmpty,
5426
- style: style3,
5458
+ style: style2,
5427
5459
  className,
5428
5460
  children,
5429
5461
  hideChildrenWhenFocused = false,
5430
5462
  hideMenuWhenEmptyValue = false
5431
5463
  }, forwardedRef) {
5432
- const ref = useRef16(null);
5464
+ const ref = useRef17(null);
5433
5465
  const [isFocused, setIsFocused] = useState20(false);
5434
5466
  const [state, _setState] = useState20({
5435
5467
  filter: initialValue,
@@ -5464,7 +5496,7 @@ var InputFieldWithCompletions = memo23(
5464
5496
  },
5465
5497
  [items, onChange, onHoverItem, state]
5466
5498
  );
5467
- const initialValueRef = useRef16(initialValue);
5499
+ const initialValueRef = useRef17(initialValue);
5468
5500
  useLayoutEffect7(() => {
5469
5501
  if (initialValueRef.current === initialValue)
5470
5502
  return;
@@ -5494,7 +5526,7 @@ var InputFieldWithCompletions = memo23(
5494
5526
  listRef.current.scrollToIndex(selectedIndex);
5495
5527
  }
5496
5528
  }, [selectedIndex]);
5497
- const lastSubmittedValueRef = useRef16(void 0);
5529
+ const lastSubmittedValueRef = useRef17(void 0);
5498
5530
  const selectItem = useCallback21(
5499
5531
  (item) => {
5500
5532
  if (item.type === "sectionHeader")
@@ -5648,7 +5680,7 @@ var InputFieldWithCompletions = memo23(
5648
5680
  onBlur: handleBlur,
5649
5681
  onFocusCapture: handleFocus,
5650
5682
  onKeyDown: handleKeyDown,
5651
- style: style3,
5683
+ style: style2,
5652
5684
  className,
5653
5685
  autoCapitalize: "off",
5654
5686
  autoComplete: "off",
@@ -5661,7 +5693,7 @@ var InputFieldWithCompletions = memo23(
5661
5693
  "aria-controls": "component-listbox"
5662
5694
  }
5663
5695
  ),
5664
- filter && typeaheadValue && typeaheadValue.startsWith(filter) && /* @__PURE__ */ React37.createElement(InputField.Typeahead, { value: typeaheadValue }),
5696
+ filter && typeaheadValue && typeaheadValue.toLowerCase().startsWith(filter.toLowerCase()) && /* @__PURE__ */ React37.createElement(InputField.Typeahead, { value: typeaheadValue, prefix: filter }),
5665
5697
  (!isFocused || !hideChildrenWhenFocused) && children,
5666
5698
  loading && isFocused && /* @__PURE__ */ React37.createElement(InputField.Label, null, /* @__PURE__ */ React37.createElement(ActivityIndicator, null))
5667
5699
  );
@@ -5694,7 +5726,7 @@ var InspectorContainer = memo24(
5694
5726
  showDividers,
5695
5727
  id,
5696
5728
  className,
5697
- style: style3
5729
+ style: style2
5698
5730
  }, forwardedRef) {
5699
5731
  const theme = useDesignSystemTheme();
5700
5732
  return /* @__PURE__ */ React38.createElement(
@@ -5708,7 +5740,7 @@ var InspectorContainer = memo24(
5708
5740
  flexDirection: "column",
5709
5741
  position: "relative",
5710
5742
  background: theme.colors.sidebar.background,
5711
- ...style3
5743
+ ...style2
5712
5744
  }
5713
5745
  },
5714
5746
  header,
@@ -5765,7 +5797,7 @@ import React40, {
5765
5797
  memo as memo26,
5766
5798
  useLayoutEffect as useLayoutEffect8,
5767
5799
  useMemo as useMemo20,
5768
- useRef as useRef17
5800
+ useRef as useRef18
5769
5801
  } from "react";
5770
5802
  import styled27 from "styled-components";
5771
5803
  var Container4 = styled27.div(({ theme }) => ({
@@ -5795,7 +5827,7 @@ var LabeledElementView = memo26(function LabeledElementView2({
5795
5827
  (child) => isValidElement4(child) && "id" in child.props ? child.props.id : null
5796
5828
  ).filter((id) => !!id);
5797
5829
  const serializedIds = elementIds.join(",");
5798
- const containerRef = useRef17(null);
5830
+ const containerRef = useRef18(null);
5799
5831
  const refs = useMemo20(() => {
5800
5832
  return Object.fromEntries(
5801
5833
  serializedIds.split(",").map((id) => [id, createRef()])
@@ -6042,7 +6074,7 @@ import React43, {
6042
6074
  useContext as useContext11,
6043
6075
  useEffect as useEffect15,
6044
6076
  useMemo as useMemo22,
6045
- useRef as useRef18
6077
+ useRef as useRef19
6046
6078
  } from "react";
6047
6079
  import styled30 from "styled-components";
6048
6080
  var SelectContext = createContext11(void 0);
@@ -6143,7 +6175,7 @@ var Select = memo28(function Select2({
6143
6175
  )) : children,
6144
6176
  [children, getTitle, onChange, options]
6145
6177
  );
6146
- const listeners = useRef18(/* @__PURE__ */ new Map());
6178
+ const listeners = useRef19(/* @__PURE__ */ new Map());
6147
6179
  const contextValue = useMemo22(
6148
6180
  () => ({
6149
6181
  addListener: (value2, listener) => listeners.current.set(value2, listener),
@@ -6176,9 +6208,12 @@ var readOnlyStyle = {
6176
6208
  justifyContent: "flex-start",
6177
6209
  textAlign: "left"
6178
6210
  };
6211
+ var flexStyle = {
6212
+ flex: 1
6213
+ };
6179
6214
  var SelectMenu = memo29(function SelectMenu2({
6180
6215
  id,
6181
- style: style3,
6216
+ style: style2,
6182
6217
  className,
6183
6218
  menuItems,
6184
6219
  value,
@@ -6196,16 +6231,16 @@ var SelectMenu = memo29(function SelectMenu2({
6196
6231
  Button,
6197
6232
  {
6198
6233
  id,
6199
- style: style3,
6234
+ style: style2,
6200
6235
  contentStyle: readOnlyStyle,
6201
6236
  className,
6202
6237
  disabled
6203
6238
  },
6204
- icon && /* @__PURE__ */ React44.createElement(React44.Fragment, null, renderIcon(icon), /* @__PURE__ */ React44.createElement(Spacer.Horizontal, { size: 8 })),
6205
- selectedItem?.title ?? value
6239
+ icon && /* @__PURE__ */ React44.createElement(React44.Fragment, null, renderIcon(icon), /* @__PURE__ */ React44.createElement(Spacer.Horizontal, { inline: true, size: 6 })),
6240
+ /* @__PURE__ */ React44.createElement("span", { style: flexStyle }, selectedItem?.title ?? value)
6206
6241
  );
6207
6242
  }
6208
- return /* @__PURE__ */ React44.createElement(Select3.Root, { value, onValueChange: onSelect }, /* @__PURE__ */ React44.createElement(Select3.SelectTrigger, { asChild: true }, /* @__PURE__ */ React44.createElement(Button, { id, style: style3, className, disabled }, icon && /* @__PURE__ */ React44.createElement(React44.Fragment, null, renderIcon(icon), /* @__PURE__ */ React44.createElement(Spacer.Horizontal, { size: 8 })), /* @__PURE__ */ React44.createElement(Select3.Value, { placeholder }), /* @__PURE__ */ React44.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React44.createElement(DropdownChevronIcon, null))), /* @__PURE__ */ React44.createElement(Select3.Portal, null, /* @__PURE__ */ React44.createElement(SelectContent, null, /* @__PURE__ */ React44.createElement(SelectViewport, null, menuItems.map((menuItem) => {
6243
+ return /* @__PURE__ */ React44.createElement(Select3.Root, { value, onValueChange: onSelect }, /* @__PURE__ */ React44.createElement(Select3.SelectTrigger, { asChild: true }, /* @__PURE__ */ React44.createElement(Button, { id, style: style2, className, disabled }, icon && /* @__PURE__ */ React44.createElement(React44.Fragment, null, renderIcon(icon), /* @__PURE__ */ React44.createElement(Spacer.Horizontal, { inline: true, size: 6 })), /* @__PURE__ */ React44.createElement("span", { style: flexStyle }, /* @__PURE__ */ React44.createElement(Select3.Value, { placeholder })), /* @__PURE__ */ React44.createElement(Spacer.Horizontal, { inline: true, size: 6 }), /* @__PURE__ */ React44.createElement(DropdownChevronIcon, null))), /* @__PURE__ */ React44.createElement(Select3.Portal, null, /* @__PURE__ */ React44.createElement(SelectContent, null, /* @__PURE__ */ React44.createElement(SelectViewport, null, menuItems.map((menuItem) => {
6209
6244
  if (typeof menuItem === "string") {
6210
6245
  return /* @__PURE__ */ React44.createElement(StyledSeparator, null);
6211
6246
  }
@@ -6346,14 +6381,80 @@ var Switch = function Switch2({
6346
6381
  );
6347
6382
  };
6348
6383
 
6384
+ // src/components/TextArea.tsx
6385
+ import React47, { forwardRef as forwardRef18, memo as memo30, useCallback as useCallback25, useEffect as useEffect16, useRef as useRef20 } from "react";
6386
+ import styled34 from "styled-components";
6387
+ var TextAreaElement = styled34.textarea(({ theme }) => ({
6388
+ ...theme.textStyles.small,
6389
+ color: theme.colors.text,
6390
+ background: theme.colors.inputBackground,
6391
+ width: "0px",
6392
+ flex: "1 1 auto",
6393
+ padding: "4px 6px",
6394
+ border: "none",
6395
+ outline: "none",
6396
+ height: 100,
6397
+ borderRadius: "4px",
6398
+ "&::placeholder": {
6399
+ color: theme.colors.textDisabled
6400
+ },
6401
+ "&:focus": {
6402
+ boxShadow: `0 0 0 2px ${theme.colors.primary}`
6403
+ },
6404
+ // readonly
6405
+ "&:read-only": {
6406
+ color: theme.colors.textDisabled
6407
+ },
6408
+ resize: "none"
6409
+ }));
6410
+ var useAutoResize = (value) => {
6411
+ const textareaRef = useRef20(null);
6412
+ useEffect16(() => {
6413
+ if (!textareaRef.current)
6414
+ return;
6415
+ textareaRef.current.style.height = "auto";
6416
+ textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`;
6417
+ }, [value]);
6418
+ return textareaRef;
6419
+ };
6420
+ var AutoResizingTextArea = memo30(
6421
+ forwardRef18(function AutoResizingTextArea2({
6422
+ value,
6423
+ onChangeText,
6424
+ ...rest
6425
+ }, forwardedRef) {
6426
+ const ref = useAutoResize(value || rest.placeholder || "");
6427
+ const handleChange = useCallback25(
6428
+ (event) => onChangeText(event.target.value),
6429
+ [onChangeText]
6430
+ );
6431
+ const handleRef = useCallback25(
6432
+ (value2) => {
6433
+ ref.current = value2;
6434
+ assignRef(forwardedRef, value2);
6435
+ },
6436
+ [ref, forwardedRef]
6437
+ );
6438
+ return /* @__PURE__ */ React47.createElement(
6439
+ TextAreaElement,
6440
+ {
6441
+ ref: handleRef,
6442
+ ...rest,
6443
+ onChange: handleChange,
6444
+ value
6445
+ }
6446
+ );
6447
+ })
6448
+ );
6449
+
6349
6450
  // src/components/TreeView.tsx
6350
- import React47, {
6351
- forwardRef as forwardRef18,
6352
- memo as memo30,
6353
- useCallback as useCallback25,
6451
+ import React48, {
6452
+ forwardRef as forwardRef19,
6453
+ memo as memo31,
6454
+ useCallback as useCallback26,
6354
6455
  useContext as useContext12
6355
6456
  } from "react";
6356
- var TreeRow = forwardRef18(function TreeRow2({
6457
+ var TreeRow = forwardRef19(function TreeRow2({
6357
6458
  icon,
6358
6459
  expanded,
6359
6460
  onClickChevron,
@@ -6361,33 +6462,33 @@ var TreeRow = forwardRef18(function TreeRow2({
6361
6462
  ...rest
6362
6463
  }, forwardedRef) {
6363
6464
  const { expandable } = useContext12(ListView.RowContext);
6364
- const handleClickChevron = useCallback25(
6465
+ const handleClickChevron = useCallback26(
6365
6466
  (event) => {
6366
6467
  event.stopPropagation();
6367
6468
  onClickChevron?.({ altKey: event.altKey });
6368
6469
  },
6369
6470
  [onClickChevron]
6370
6471
  );
6371
- return /* @__PURE__ */ React47.createElement(ListView.Row, { ref: forwardedRef, ...rest }, expandable && /* @__PURE__ */ React47.createElement(React47.Fragment, null, expanded === void 0 ? /* @__PURE__ */ React47.createElement(Spacer.Horizontal, { size: 19 }) : /* @__PURE__ */ React47.createElement(
6472
+ return /* @__PURE__ */ React48.createElement(ListView.Row, { ref: forwardedRef, ...rest }, expandable && /* @__PURE__ */ React48.createElement(React48.Fragment, null, expanded === void 0 ? /* @__PURE__ */ React48.createElement(Spacer.Horizontal, { size: 19 }) : /* @__PURE__ */ React48.createElement(
6372
6473
  IconButton,
6373
6474
  {
6374
6475
  iconName: expanded ? "ChevronDownIcon2" : "ChevronRightIcon2",
6375
6476
  onClick: handleClickChevron,
6376
6477
  selected: rest.selected
6377
6478
  }
6378
- ), /* @__PURE__ */ React47.createElement(Spacer.Horizontal, { size: 6 })), icon && /* @__PURE__ */ React47.createElement(React47.Fragment, null, renderIcon(icon), /* @__PURE__ */ React47.createElement(Spacer.Horizontal, { size: 10 })), children);
6479
+ ), /* @__PURE__ */ React48.createElement(Spacer.Horizontal, { size: 6 })), icon && /* @__PURE__ */ React48.createElement(React48.Fragment, null, renderIcon(icon), /* @__PURE__ */ React48.createElement(Spacer.Horizontal, { size: 10 })), children);
6379
6480
  });
6380
6481
  var TreeView;
6381
6482
  ((TreeView2) => {
6382
6483
  TreeView2.Root = ListView.Root;
6383
6484
  TreeView2.RowTitle = ListView.RowTitle;
6384
6485
  TreeView2.EditableRowTitle = ListView.EditableRowTitle;
6385
- TreeView2.Row = memo30(TreeRow);
6486
+ TreeView2.Row = memo31(TreeRow);
6386
6487
  })(TreeView || (TreeView = {}));
6387
6488
 
6388
6489
  // src/components/WorkspaceLayout.tsx
6389
6490
  import { useKeyboardShortcuts as useKeyboardShortcuts3 } from "@noya-app/noya-keymap";
6390
- import React49, { forwardRef as forwardRef19, useImperativeHandle as useImperativeHandle4, useRef as useRef20 } from "react";
6491
+ import React50, { forwardRef as forwardRef20, useImperativeHandle as useImperativeHandle4, useRef as useRef22 } from "react";
6391
6492
  import {
6392
6493
  Panel,
6393
6494
  PanelGroup,
@@ -6395,10 +6496,10 @@ import {
6395
6496
  } from "react-resizable-panels";
6396
6497
 
6397
6498
  // src/hooks/usePreservePanelSize.tsx
6398
- import { useLayoutEffect as useLayoutEffect9, useRef as useRef19 } from "react";
6499
+ import { useLayoutEffect as useLayoutEffect9, useRef as useRef21 } from "react";
6399
6500
 
6400
6501
  // src/hooks/useWindowSize.tsx
6401
- import { useEffect as useEffect16, useState as useState21 } from "react";
6502
+ import { useEffect as useEffect17, useState as useState21 } from "react";
6402
6503
  function useWindowSize() {
6403
6504
  const [size2, setSize] = useState21(
6404
6505
  typeof window === "undefined" ? { width: 0, height: 0 } : {
@@ -6406,7 +6507,7 @@ function useWindowSize() {
6406
6507
  height: window.innerHeight
6407
6508
  }
6408
6509
  );
6409
- useEffect16(() => {
6510
+ useEffect17(() => {
6410
6511
  const handleResize = () => setSize({
6411
6512
  width: window.innerWidth,
6412
6513
  height: window.innerHeight
@@ -6424,7 +6525,7 @@ var RIGHT_SIDEBAR_ID = "editor-right-sidebar";
6424
6525
  var CONTENT_AREA_ID = "editor-content-area";
6425
6526
  function usePreservePanelSize(panelGroupRef, setPanelLayoutState) {
6426
6527
  const windowSize = useWindowSize();
6427
- const layoutRef = useRef19();
6528
+ const layoutRef = useRef21();
6428
6529
  useLayoutEffect9(() => {
6429
6530
  const panelGroup = document.querySelector(
6430
6531
  `[data-panel-group-id="${EDITOR_PANEL_GROUP_ID}"]`
@@ -6528,7 +6629,7 @@ function usePreservePanelSize(panelGroupRef, setPanelLayoutState) {
6528
6629
  }
6529
6630
 
6530
6631
  // src/components/WorkspaceLayout.tsx
6531
- var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6632
+ var WorkspaceLayout = forwardRef20(function WorkspaceLayout2({
6532
6633
  autoSavePrefix,
6533
6634
  leftSidebarContent: leftPanelContent,
6534
6635
  children: centerPanelContent,
@@ -6543,7 +6644,7 @@ var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6543
6644
  leftSidebarCanResize = false,
6544
6645
  id,
6545
6646
  className,
6546
- style: style3
6647
+ style: style2
6547
6648
  }, forwardedRef) {
6548
6649
  const windowSize = useWindowSize();
6549
6650
  function getPercentage(size2) {
@@ -6553,9 +6654,9 @@ var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6553
6654
  const rightSidebarPercentage = getPercentage(rightSidebarInitialSize);
6554
6655
  const leftSidebarMinPercentage = leftSidebarMinSize !== void 0 ? getPercentage(leftSidebarMinSize) : void 0;
6555
6656
  const rightSidebarMinPercentage = rightSidebarMinSize !== void 0 ? getPercentage(rightSidebarMinSize) : void 0;
6556
- const panelGroupRef = useRef20(null);
6557
- const leftSidebarRef = useRef20(null);
6558
- const rightSidebarRef = useRef20(null);
6657
+ const panelGroupRef = useRef22(null);
6658
+ const leftSidebarRef = useRef22(null);
6659
+ const rightSidebarRef = useRef22(null);
6559
6660
  usePreservePanelSize(panelGroupRef, onChangeLayoutState);
6560
6661
  const theme = useDesignSystemTheme();
6561
6662
  useImperativeHandle4(forwardedRef, () => ({
@@ -6615,7 +6716,7 @@ var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6615
6716
  }
6616
6717
  });
6617
6718
  const centerPanelPercentage = 100 - (leftPanelContent ? leftSidebarPercentage : 0) - (rightPanelContent ? rightSidebarPercentage : 0);
6618
- return /* @__PURE__ */ React49.createElement(
6719
+ return /* @__PURE__ */ React50.createElement(
6619
6720
  "div",
6620
6721
  {
6621
6722
  id,
@@ -6624,10 +6725,10 @@ var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6624
6725
  backgroundColor: theme.colors.canvas.background,
6625
6726
  display: "flex",
6626
6727
  flexDirection: "row",
6627
- ...style3
6728
+ ...style2
6628
6729
  }
6629
6730
  },
6630
- /* @__PURE__ */ React49.createElement(
6731
+ /* @__PURE__ */ React50.createElement(
6631
6732
  PanelGroup,
6632
6733
  {
6633
6734
  ref: panelGroupRef,
@@ -6636,7 +6737,7 @@ var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6636
6737
  autoSaveId: autoSavePrefix ? `${autoSavePrefix}--${EDITOR_PANEL_GROUP_ID}` : void 0,
6637
6738
  style: { flex: "1" }
6638
6739
  },
6639
- hasLeftSidebar && /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement(
6740
+ hasLeftSidebar && /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement(
6640
6741
  Panel,
6641
6742
  {
6642
6743
  id: LEFT_SIDEBAR_ID,
@@ -6653,7 +6754,7 @@ var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6653
6754
  }
6654
6755
  },
6655
6756
  leftPanelContent
6656
- ), /* @__PURE__ */ React49.createElement(
6757
+ ), /* @__PURE__ */ React50.createElement(
6657
6758
  PanelResizeHandle,
6658
6759
  {
6659
6760
  style: {
@@ -6664,7 +6765,7 @@ var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6664
6765
  }
6665
6766
  }
6666
6767
  )),
6667
- /* @__PURE__ */ React49.createElement(
6768
+ /* @__PURE__ */ React50.createElement(
6668
6769
  Panel,
6669
6770
  {
6670
6771
  id: CONTENT_AREA_ID,
@@ -6679,7 +6780,7 @@ var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6679
6780
  },
6680
6781
  centerPanelContent
6681
6782
  ),
6682
- hasRightSidebar && /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement(
6783
+ hasRightSidebar && /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement(
6683
6784
  PanelResizeHandle,
6684
6785
  {
6685
6786
  style: {
@@ -6689,7 +6790,7 @@ var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6689
6790
  backgroundColor: theme.colors.divider
6690
6791
  }
6691
6792
  }
6692
- ), /* @__PURE__ */ React49.createElement(
6793
+ ), /* @__PURE__ */ React50.createElement(
6693
6794
  Panel,
6694
6795
  {
6695
6796
  id: RIGHT_SIDEBAR_ID,
@@ -6752,8 +6853,8 @@ var SUPPORTED_CANVAS_UPLOAD_TYPES = [
6752
6853
 
6753
6854
  // src/components/ArrayController.tsx
6754
6855
  import { range as range2 } from "@noya-app/noya-utils";
6755
- import React51, { memo as memo32, useCallback as useCallback26, useMemo as useMemo24 } from "react";
6756
- import styled35, { useTheme as useTheme5 } from "styled-components";
6856
+ import React52, { memo as memo33, useCallback as useCallback27, useMemo as useMemo24 } from "react";
6857
+ import styled36, { useTheme as useTheme5 } from "styled-components";
6757
6858
 
6758
6859
  // src/components/InspectorPrimitives.tsx
6759
6860
  var InspectorPrimitives_exports = {};
@@ -6771,20 +6872,20 @@ __export(InspectorPrimitives_exports, {
6771
6872
  Title: () => Title3,
6772
6873
  VerticalSeparator: () => VerticalSeparator
6773
6874
  });
6774
- import React50, { memo as memo31 } from "react";
6775
- import styled34, { useTheme as useTheme4 } from "styled-components";
6776
- var Section = styled34.div(({ theme, $padding = "10px", $gap }) => ({
6875
+ import React51, { memo as memo32 } from "react";
6876
+ import styled35, { useTheme as useTheme4 } from "styled-components";
6877
+ var Section = styled35.div(({ theme, $padding = "10px", $gap }) => ({
6777
6878
  flex: "0 0 auto",
6778
6879
  display: "flex",
6779
6880
  flexDirection: "column",
6780
6881
  padding: $padding,
6781
6882
  gap: $gap
6782
6883
  }));
6783
- var SectionHeader = styled34.div(({ theme }) => ({
6884
+ var SectionHeader = styled35.div(({ theme }) => ({
6784
6885
  display: "flex",
6785
6886
  alignItems: "center"
6786
6887
  }));
6787
- var Title3 = styled34.div(({ theme, $textStyle }) => ({
6888
+ var Title3 = styled35.div(({ theme, $textStyle }) => ({
6788
6889
  display: "flex",
6789
6890
  flexDirection: "row",
6790
6891
  userSelect: "none",
@@ -6793,11 +6894,11 @@ var Title3 = styled34.div(({ theme, $textStyle }) => ({
6793
6894
  color: theme.colors.text
6794
6895
  } : {
6795
6896
  ...theme.textStyles.label,
6796
- color: theme.colors.textSubtle,
6897
+ color: theme.colors.textMuted,
6797
6898
  fontWeight: "bold"
6798
6899
  }
6799
6900
  }));
6800
- var Row2 = styled34.div(
6901
+ var Row2 = styled35.div(
6801
6902
  ({ theme, $gap }) => ({
6802
6903
  flex: "1",
6803
6904
  display: "flex",
@@ -6806,26 +6907,26 @@ var Row2 = styled34.div(
6806
6907
  gap: $gap
6807
6908
  })
6808
6909
  );
6809
- var Column = styled34.div(({ theme }) => ({
6910
+ var Column = styled35.div(({ theme }) => ({
6810
6911
  flex: "1",
6811
6912
  display: "flex",
6812
6913
  flexDirection: "column",
6813
6914
  gap: "4px"
6814
6915
  }));
6815
- var Checkbox = styled34.input(({ theme }) => ({
6916
+ var Checkbox = styled35.input(({ theme }) => ({
6816
6917
  margin: 0
6817
6918
  }));
6818
- var Text3 = styled34.span(({ theme }) => ({
6919
+ var Text3 = styled35.span(({ theme }) => ({
6819
6920
  ...theme.textStyles.small
6820
6921
  }));
6821
- var VerticalSeparator = () => /* @__PURE__ */ React50.createElement(Spacer.Vertical, { size: useTheme4().sizes.inspector.verticalSeparator });
6822
- var HorizontalSeparator = () => /* @__PURE__ */ React50.createElement(Spacer.Horizontal, { size: useTheme4().sizes.inspector.horizontalSeparator });
6823
- var SliderRowLabel = styled34.span(({ theme }) => ({
6922
+ var VerticalSeparator = () => /* @__PURE__ */ React51.createElement(Spacer.Vertical, { size: useTheme4().sizes.inspector.verticalSeparator });
6923
+ var HorizontalSeparator = () => /* @__PURE__ */ React51.createElement(Spacer.Horizontal, { size: useTheme4().sizes.inspector.horizontalSeparator });
6924
+ var SliderRowLabel = styled35.span(({ theme }) => ({
6824
6925
  ...theme.textStyles.small,
6825
6926
  color: theme.colors.textMuted,
6826
6927
  marginBottom: "-6px"
6827
6928
  }));
6828
- var RowLabel = styled34.span(({ theme, $textStyle }) => ({
6929
+ var RowLabel = styled35.span(({ theme, $textStyle }) => ({
6829
6930
  // marginBottom: '6px',
6830
6931
  display: "flex",
6831
6932
  ...$textStyle ? {
@@ -6839,7 +6940,7 @@ var RowLabel = styled34.span(({ theme, $textStyle }) => ({
6839
6940
  // Button height
6840
6941
  alignItems: "center"
6841
6942
  }));
6842
- var LabeledRow = memo31(function LabeledRow2({
6943
+ var LabeledRow = memo32(function LabeledRow2({
6843
6944
  id,
6844
6945
  children,
6845
6946
  label,
@@ -6847,26 +6948,26 @@ var LabeledRow = memo31(function LabeledRow2({
6847
6948
  gap,
6848
6949
  right
6849
6950
  }) {
6850
- return /* @__PURE__ */ React50.createElement(Row2, { id }, /* @__PURE__ */ React50.createElement(Column, null, /* @__PURE__ */ React50.createElement(RowLabel, { $textStyle: labelTextStyle }, label, right && /* @__PURE__ */ React50.createElement(Spacer.Horizontal, null), right), /* @__PURE__ */ React50.createElement(Row2, { $gap: gap }, children)));
6951
+ return /* @__PURE__ */ React51.createElement(Row2, { id }, /* @__PURE__ */ React51.createElement(Column, null, /* @__PURE__ */ React51.createElement(RowLabel, { $textStyle: labelTextStyle }, label, right && /* @__PURE__ */ React51.createElement(Spacer.Horizontal, null), right), /* @__PURE__ */ React51.createElement(Row2, { $gap: gap }, children)));
6851
6952
  });
6852
- var LabeledSliderRow = memo31(function LabeledRow3({
6953
+ var LabeledSliderRow = memo32(function LabeledRow3({
6853
6954
  children,
6854
6955
  label
6855
6956
  }) {
6856
- return /* @__PURE__ */ React50.createElement(Row2, null, /* @__PURE__ */ React50.createElement(Column, null, /* @__PURE__ */ React50.createElement(SliderRowLabel, null, label), /* @__PURE__ */ React50.createElement(Row2, null, children)));
6957
+ return /* @__PURE__ */ React51.createElement(Row2, null, /* @__PURE__ */ React51.createElement(Column, null, /* @__PURE__ */ React51.createElement(SliderRowLabel, null, label), /* @__PURE__ */ React51.createElement(Row2, null, children)));
6857
6958
  });
6858
6959
 
6859
6960
  // src/components/ArrayController.tsx
6860
- var ElementRow = styled35.div({
6961
+ var ElementRow = styled36.div({
6861
6962
  flex: "0 0 auto",
6862
6963
  display: "flex",
6863
6964
  flexDirection: "row",
6864
6965
  alignItems: "center"
6865
6966
  });
6866
- var ItemContainer2 = styled35.div({
6967
+ var ItemContainer2 = styled36.div({
6867
6968
  position: "relative"
6868
6969
  });
6869
- var ArrayController = memo32(function ArrayController2({
6970
+ var ArrayController = memo33(function ArrayController2({
6870
6971
  id,
6871
6972
  items,
6872
6973
  title,
@@ -6889,7 +6990,7 @@ var ArrayController = memo32(function ArrayController2({
6889
6990
  [getKey, items]
6890
6991
  );
6891
6992
  const indexes = reversed ? range2(0, items.length).reverse() : range2(0, items.length);
6892
- const handleMoveItem = useCallback26(
6993
+ const handleMoveItem = useCallback27(
6893
6994
  (sourceIndex, destinationIndex, position) => {
6894
6995
  if (reversed) {
6895
6996
  if (position === "above") {
@@ -6906,11 +7007,11 @@ var ArrayController = memo32(function ArrayController2({
6906
7007
  [onMoveItem, reversed]
6907
7008
  );
6908
7009
  const renderRow = (index) => {
6909
- return /* @__PURE__ */ React51.createElement(ElementRow, { key: keys[index] }, renderItem({ item: items[index], index }));
7010
+ return /* @__PURE__ */ React52.createElement(ElementRow, { key: keys[index] }, renderItem({ item: items[index], index }));
6910
7011
  };
6911
- return /* @__PURE__ */ React51.createElement(Section, { id, $padding: padding, $gap: "2px" }, /* @__PURE__ */ React51.createElement(SectionHeader, null, /* @__PURE__ */ React51.createElement(Button, { variant: "none", onClick: onClickPlus }, /* @__PURE__ */ React51.createElement(Title3, null, title)), /* @__PURE__ */ React51.createElement(Spacer.Horizontal, null), withSeparatorElements(
7012
+ return /* @__PURE__ */ React52.createElement(Section, { id, $padding: padding, $gap: "2px" }, /* @__PURE__ */ React52.createElement(SectionHeader, null, /* @__PURE__ */ React52.createElement(Button, { variant: "none", onClick: onClickPlus }, /* @__PURE__ */ React52.createElement(Title3, null, title)), /* @__PURE__ */ React52.createElement(Spacer.Horizontal, null), withSeparatorElements(
6912
7013
  [
6913
- onClickTrash && /* @__PURE__ */ React51.createElement(
7014
+ onClickTrash && /* @__PURE__ */ React52.createElement(
6914
7015
  IconButton,
6915
7016
  {
6916
7017
  id: `${id}-trash`,
@@ -6919,7 +7020,7 @@ var ArrayController = memo32(function ArrayController2({
6919
7020
  onClick: onClickTrash
6920
7021
  }
6921
7022
  ),
6922
- onClickExpand && /* @__PURE__ */ React51.createElement(
7023
+ onClickExpand && /* @__PURE__ */ React52.createElement(
6923
7024
  IconButton,
6924
7025
  {
6925
7026
  id: `${id}-gear`,
@@ -6928,7 +7029,7 @@ var ArrayController = memo32(function ArrayController2({
6928
7029
  onClick: onClickExpand
6929
7030
  }
6930
7031
  ),
6931
- onClickPlus && /* @__PURE__ */ React51.createElement(
7032
+ onClickPlus && /* @__PURE__ */ React52.createElement(
6932
7033
  IconButton,
6933
7034
  {
6934
7035
  id: `${id}-add`,
@@ -6938,15 +7039,15 @@ var ArrayController = memo32(function ArrayController2({
6938
7039
  }
6939
7040
  )
6940
7041
  ],
6941
- /* @__PURE__ */ React51.createElement(Spacer.Horizontal, { size: 8 })
6942
- )), /* @__PURE__ */ React51.createElement(Stack.V, { gap: "4px" }, sortable ? /* @__PURE__ */ React51.createElement(
7042
+ /* @__PURE__ */ React52.createElement(Spacer.Horizontal, { size: 8 })
7043
+ )), /* @__PURE__ */ React52.createElement(Stack.V, { gap: "4px" }, sortable ? /* @__PURE__ */ React52.createElement(
6943
7044
  Sortable.Root,
6944
7045
  {
6945
7046
  keys,
6946
7047
  renderOverlay: renderRow,
6947
7048
  onMoveItem: handleMoveItem
6948
7049
  },
6949
- indexes.map((index) => /* @__PURE__ */ React51.createElement(Sortable.Item, { id: keys[index], key: keys[index] }, ({ relativeDropPosition, ...sortableProps }) => /* @__PURE__ */ React51.createElement(ItemContainer2, { ...sortableProps }, renderRow(index), relativeDropPosition && /* @__PURE__ */ React51.createElement(
7050
+ indexes.map((index) => /* @__PURE__ */ React52.createElement(Sortable.Item, { id: keys[index], key: keys[index] }, ({ relativeDropPosition, ...sortableProps }) => /* @__PURE__ */ React52.createElement(ItemContainer2, { ...sortableProps }, renderRow(index), relativeDropPosition && /* @__PURE__ */ React52.createElement(
6950
7051
  ListView.DragIndicator,
6951
7052
  {
6952
7053
  $gap: 0,
@@ -6960,11 +7061,11 @@ var ArrayController = memo32(function ArrayController2({
6960
7061
 
6961
7062
  // src/components/DimensionInput.tsx
6962
7063
  import { round } from "@noya-app/noya-utils";
6963
- import React52, { memo as memo33, useCallback as useCallback27 } from "react";
7064
+ import React53, { memo as memo34, useCallback as useCallback28 } from "react";
6964
7065
  function getNewValue(value, mode, delta) {
6965
7066
  return delta === void 0 ? value : mode === "replace" ? delta : value + delta;
6966
7067
  }
6967
- var DimensionInput = memo33(function DimensionInput2({
7068
+ var DimensionInput = memo34(function DimensionInput2({
6968
7069
  id,
6969
7070
  value,
6970
7071
  onSetValue,
@@ -6974,15 +7075,15 @@ var DimensionInput = memo33(function DimensionInput2({
6974
7075
  disabled,
6975
7076
  trigger = "submit"
6976
7077
  }) {
6977
- const handleNudgeValue = useCallback27(
7078
+ const handleNudgeValue = useCallback28(
6978
7079
  (value2) => onSetValue(value2, "adjust"),
6979
7080
  [onSetValue]
6980
7081
  );
6981
- const handleSetValue = useCallback27(
7082
+ const handleSetValue = useCallback28(
6982
7083
  (value2) => onSetValue(value2, "replace"),
6983
7084
  [onSetValue]
6984
7085
  );
6985
- return /* @__PURE__ */ React52.createElement(InputField.Root, { id, width: size2 }, /* @__PURE__ */ React52.createElement(
7086
+ return /* @__PURE__ */ React53.createElement(InputField.Root, { id, width: size2 }, /* @__PURE__ */ React53.createElement(
6986
7087
  InputField.NumberInput,
6987
7088
  {
6988
7089
  value: value === void 0 ? value : round(value, 2),
@@ -6991,11 +7092,12 @@ var DimensionInput = memo33(function DimensionInput2({
6991
7092
  disabled,
6992
7093
  ...trigger === "change" ? { onChange: handleSetValue } : { onSubmit: handleSetValue }
6993
7094
  }
6994
- ), label && /* @__PURE__ */ React52.createElement(InputField.Label, null, label));
7095
+ ), label && /* @__PURE__ */ React53.createElement(InputField.Label, null, label));
6995
7096
  });
6996
7097
  export {
6997
7098
  ActivityIndicator,
6998
7099
  ArrayController,
7100
+ AutoResizingTextArea,
6999
7101
  Avatar,
7000
7102
  AvatarStack,
7001
7103
  Body,
@@ -7079,6 +7181,7 @@ export {
7079
7181
  sketchColorToHex,
7080
7182
  sketchColorToRgba,
7081
7183
  sketchColorToRgbaString,
7184
+ useAutoResize,
7082
7185
  useCurrentFloatingWindowInternal,
7083
7186
  useDesignSystemConfiguration,
7084
7187
  useDesignSystemTheme,