@noya-app/noya-designsystem 0.1.25 → 0.1.27

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))",
@@ -631,7 +641,13 @@ var colors = {
631
641
  },
632
642
  selection: "rgb(179,215,254)",
633
643
  thumbnailBackground: "#f0efff",
634
- thumbnailShadow: "#D3CEED66"
644
+ thumbnailShadow: "#D3CEED66",
645
+ inlineCode: {
646
+ text: "rgb(103, 70, 255)",
647
+ background: "rgb(240, 242, 246)"
648
+ },
649
+ textLink: "rgb(103, 70, 255)",
650
+ textLinkFocused: "rgb(147, 86, 255)"
635
651
  };
636
652
  var fonts = {
637
653
  normal: "'__Inter_6b0edc', '__Inter_Fallback_6b0edc', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
@@ -662,41 +678,41 @@ var textStyles = {
662
678
  heading1: {
663
679
  fontFamily: fonts.normal,
664
680
  fontSize: `${typeScale[2]}rem`,
665
- fontWeight: 500,
666
- lineHeight: "1.75",
681
+ fontWeight: 600,
682
+ lineHeight: "1.6",
667
683
  letterSpacing: "-0.025em"
668
684
  },
669
685
  heading2: {
670
686
  fontFamily: fonts.normal,
671
687
  fontSize: `${typeScale[3]}rem`,
672
688
  fontWeight: 500,
673
- lineHeight: "1.75",
689
+ lineHeight: "1.5",
674
690
  letterSpacing: "-0.025em"
675
691
  },
676
692
  heading3: {
677
693
  fontFamily: fonts.normal,
678
694
  fontSize: `${typeScale[4]}rem`,
679
- fontWeight: 500,
680
- lineHeight: "1.75",
695
+ fontWeight: 400,
696
+ lineHeight: "1.4",
681
697
  letterSpacing: "-0.025em"
682
698
  },
683
699
  heading4: {
684
700
  fontFamily: fonts.normal,
685
701
  fontSize: `${typeScale[5]}rem`,
686
702
  fontWeight: 500,
687
- lineHeight: "1.75"
703
+ lineHeight: "1.4"
688
704
  },
689
705
  heading5: {
690
706
  fontFamily: fonts.normal,
691
707
  fontSize: `${typeScale[6]}rem`,
692
708
  fontWeight: 500,
693
- lineHeight: "1.75"
709
+ lineHeight: "1.4"
694
710
  },
695
711
  body: {
696
712
  fontFamily: fonts.normal,
697
713
  fontSize: `${typeScale[5]}rem`,
698
714
  fontWeight: 400,
699
- lineHeight: "1.75"
715
+ lineHeight: "1.4"
700
716
  },
701
717
  small: {
702
718
  fontFamily: fonts.normal,
@@ -728,6 +744,9 @@ var textStyles = {
728
744
  }
729
745
  };
730
746
  var sizes = {
747
+ inset: {
748
+ top: 46
749
+ },
731
750
  sidebarWidth: 260,
732
751
  toolbar: {
733
752
  height: 46,
@@ -798,7 +817,7 @@ import React19, {
798
817
  useCallback as useCallback12,
799
818
  useContext as useContext3,
800
819
  useMemo as useMemo7,
801
- useRef as useRef11,
820
+ useRef as useRef12,
802
821
  useState as useState12
803
822
  } from "react";
804
823
  import styled13 from "styled-components";
@@ -890,7 +909,7 @@ var Dialog = forwardRef6(function Dialog2({
890
909
  title,
891
910
  description,
892
911
  open,
893
- style: style3,
912
+ style: style2,
894
913
  onOpenChange,
895
914
  onOpenAutoFocus,
896
915
  closeOnInteractOutside = true
@@ -908,7 +927,7 @@ var Dialog = forwardRef6(function Dialog2({
908
927
  {
909
928
  ref: contentRef,
910
929
  onOpenAutoFocus,
911
- style: style3,
930
+ style: style2,
912
931
  ...closeOnInteractOutside === false && {
913
932
  onPointerDownOutside: (event) => {
914
933
  event.preventDefault();
@@ -924,7 +943,7 @@ var Dialog = forwardRef6(function Dialog2({
924
943
  children
925
944
  ));
926
945
  });
927
- var FullscreenDialog = forwardRef6(function FullscreenDialog2({ style: style3, ...rest }, forwardedRef) {
946
+ var FullscreenDialog = forwardRef6(function FullscreenDialog2({ style: style2, ...rest }, forwardedRef) {
928
947
  return /* @__PURE__ */ React10.createElement(
929
948
  Dialog,
930
949
  {
@@ -940,7 +959,7 @@ var FullscreenDialog = forwardRef6(function FullscreenDialog2({ style: style3, .
940
959
  display: "flex",
941
960
  flexDirection: "column",
942
961
  padding: 0,
943
- ...style3
962
+ ...style2
944
963
  },
945
964
  ...rest
946
965
  }
@@ -1023,33 +1042,47 @@ var SingleDimensionAutoSizer = memo5(function SingleDimensionAutoSizer2({
1023
1042
  });
1024
1043
 
1025
1044
  // ../noya-react-utils/src/components/FileDropTarget.tsx
1026
- import React13, {
1027
- memo as memo6,
1028
- useCallback as useCallback3
1029
- } from "react";
1045
+ import React13, { memo as memo6, useCallback as useCallback3, useRef as useRef3 } from "react";
1030
1046
 
1031
1047
  // ../noya-react-utils/src/hooks/useFileDropTarget.ts
1032
1048
  import { useCallback as useCallback2, useState as useState2 } from "react";
1033
- function useFileDropTarget(dropEvent) {
1049
+ function useFileDropTarget(ref, dropEvent) {
1034
1050
  const [isDropTargetActive, setIsDropTargetActive] = useState2(false);
1035
- const handleDragEvent = useCallback2((event, on) => {
1036
- if (on !== void 0)
1037
- setIsDropTargetActive(on);
1051
+ const handleDragOver = useCallback2((event) => {
1038
1052
  event.preventDefault();
1039
1053
  }, []);
1040
- const handleDropEvent = useCallback2(
1054
+ const handleDragEnter = useCallback2(
1041
1055
  (event) => {
1056
+ event.preventDefault();
1057
+ if (!ref.current?.contains(event.relatedTarget)) {
1058
+ setIsDropTargetActive(true);
1059
+ }
1060
+ },
1061
+ [ref]
1062
+ );
1063
+ const handleDragLeave = useCallback2(
1064
+ (event) => {
1065
+ event.preventDefault();
1066
+ if (!ref.current?.contains(event.relatedTarget)) {
1067
+ setIsDropTargetActive(false);
1068
+ }
1069
+ },
1070
+ [ref]
1071
+ );
1072
+ const handleDrop = useCallback2(
1073
+ (event) => {
1074
+ event.preventDefault();
1042
1075
  dropEvent(event);
1043
1076
  setIsDropTargetActive(false);
1044
1077
  },
1045
- [dropEvent, setIsDropTargetActive]
1078
+ [dropEvent]
1046
1079
  );
1047
1080
  return {
1048
1081
  dropTargetProps: {
1049
- onDragOver: handleDragEvent,
1050
- onDragEnter: (event) => handleDragEvent(event, true),
1051
- onDragLeave: (event) => handleDragEvent(event, false),
1052
- onDrop: handleDropEvent
1082
+ onDragOver: handleDragOver,
1083
+ onDragEnter: handleDragEnter,
1084
+ onDragLeave: handleDragLeave,
1085
+ onDrop: handleDrop
1053
1086
  },
1054
1087
  isDropTargetActive
1055
1088
  };
@@ -1059,12 +1092,13 @@ function useFileDropTarget(dropEvent) {
1059
1092
  function isSupportedFile(file, supportedFileTypes) {
1060
1093
  return supportedFileTypes.includes(file.type) || file.type === "" && file.name.endsWith(".sketch");
1061
1094
  }
1062
- var style2 = { display: "flex", flex: 1 };
1063
1095
  var FileDropTarget = memo6(function FileDropTarget2({
1064
1096
  children,
1065
1097
  onDropFiles,
1066
- supportedFileTypes
1098
+ supportedFileTypes,
1099
+ ...props
1067
1100
  }) {
1101
+ const ref = useRef3(null);
1068
1102
  const handleFile = useCallback3(
1069
1103
  (event) => {
1070
1104
  event.preventDefault();
@@ -1097,13 +1131,16 @@ var FileDropTarget = memo6(function FileDropTarget2({
1097
1131
  },
1098
1132
  [onDropFiles, supportedFileTypes]
1099
1133
  );
1100
- const { dropTargetProps, isDropTargetActive } = useFileDropTarget(handleFile);
1101
- return /* @__PURE__ */ React13.createElement("div", { style: style2, ...dropTargetProps }, typeof children === "function" ? children(isDropTargetActive) : children);
1134
+ const { dropTargetProps, isDropTargetActive } = useFileDropTarget(
1135
+ ref,
1136
+ handleFile
1137
+ );
1138
+ return /* @__PURE__ */ React13.createElement("div", { ref, ...dropTargetProps, ...props }, typeof children === "function" ? children(isDropTargetActive) : children);
1102
1139
  });
1103
1140
 
1104
1141
  // ../noya-react-utils/src/hooks/useDeepArray.ts
1105
1142
  import { isDeepEqual } from "@noya-app/noya-utils";
1106
- import { useRef as useRef3 } from "react";
1143
+ import { useRef as useRef4 } from "react";
1107
1144
 
1108
1145
  // ../noya-react-utils/src/hooks/useDeepState.ts
1109
1146
  import { isDeepEqual as isDeepEqual2 } from "@noya-app/noya-utils";
@@ -1113,13 +1150,13 @@ import { useCallback as useCallback4, useMemo as useMemo2, useState as useState3
1113
1150
  import { useEffect as useEffect2, useState as useState4 } from "react";
1114
1151
 
1115
1152
  // ../noya-react-utils/src/hooks/useIsMounted.ts
1116
- import { useEffect as useEffect3, useRef as useRef4 } from "react";
1153
+ import { useEffect as useEffect3, useRef as useRef5 } from "react";
1117
1154
 
1118
1155
  // ../noya-react-utils/src/hooks/useLateReference.ts
1119
- import { useCallback as useCallback5, useLayoutEffect, useRef as useRef5 } from "react";
1156
+ import { useCallback as useCallback5, useLayoutEffect, useRef as useRef6 } from "react";
1120
1157
 
1121
1158
  // ../noya-react-utils/src/hooks/useLazyValue.ts
1122
- import { useRef as useRef6 } from "react";
1159
+ import { useRef as useRef7 } from "react";
1123
1160
 
1124
1161
  // ../noya-react-utils/src/hooks/useMutableState.ts
1125
1162
  import { useCallback as useCallback6, useMemo as useMemo3, useState as useState5 } from "react";
@@ -1137,10 +1174,10 @@ import { useEffect as useEffect5, useState as useState7 } from "react";
1137
1174
 
1138
1175
  // ../noya-react-utils/src/hooks/useShallowArray.ts
1139
1176
  import { isShallowEqual } from "@noya-app/noya-utils";
1140
- import { useRef as useRef7 } from "react";
1177
+ import { useRef as useRef8 } from "react";
1141
1178
 
1142
1179
  // ../noya-react-utils/src/hooks/useStableCallback.ts
1143
- import { useCallback as useCallback8, useLayoutEffect as useLayoutEffect2, useRef as useRef8 } from "react";
1180
+ import { useCallback as useCallback8, useLayoutEffect as useLayoutEffect2, useRef as useRef9 } from "react";
1144
1181
 
1145
1182
  // ../noya-react-utils/src/hooks/useSystemColorScheme.ts
1146
1183
  import { useEffect as useEffect6, useState as useState8 } from "react";
@@ -1249,7 +1286,7 @@ import React18, {
1249
1286
  useEffect as useEffect10,
1250
1287
  useLayoutEffect as useLayoutEffect4,
1251
1288
  useMemo as useMemo6,
1252
- useRef as useRef10,
1289
+ useRef as useRef11,
1253
1290
  useState as useState11
1254
1291
  } from "react";
1255
1292
  import styled12 from "styled-components";
@@ -1522,7 +1559,7 @@ import React16, {
1522
1559
  useCallback as useCallback10,
1523
1560
  useEffect as useEffect9,
1524
1561
  useLayoutEffect as useLayoutEffect3,
1525
- useRef as useRef9,
1562
+ useRef as useRef10,
1526
1563
  useState as useState10
1527
1564
  } from "react";
1528
1565
 
@@ -1630,10 +1667,10 @@ var SubmittableTextInput = forwardRef8(function SubmittableTextInput2({
1630
1667
  ...rest
1631
1668
  }, forwardedRef) {
1632
1669
  const ref = React16.useRef(null);
1633
- const latestValue = useRef9(value);
1670
+ const latestValue = useRef10(value);
1634
1671
  latestValue.current = value;
1635
- const userDidEdit = useRef9(false);
1636
- const isSubmitTriggeredByEscapeKey = useRef9(false);
1672
+ const userDidEdit = useRef10(false);
1673
+ const isSubmitTriggeredByEscapeKey = useRef10(false);
1637
1674
  const [internalValue, setInternalValue] = useState10("");
1638
1675
  useLayoutEffect3(() => {
1639
1676
  setInternalValue(value);
@@ -1691,10 +1728,10 @@ var SubmittableTextInput = forwardRef8(function SubmittableTextInput2({
1691
1728
  },
1692
1729
  [onFocusCapture, onFocusChange]
1693
1730
  );
1694
- const autoSubmitTimeoutRef = useRef9(
1731
+ const autoSubmitTimeoutRef = useRef10(
1695
1732
  null
1696
1733
  );
1697
- const latestHandleSubmit = useRef9(handleSubmit);
1734
+ const latestHandleSubmit = useRef10(handleSubmit);
1698
1735
  latestHandleSubmit.current = handleSubmit;
1699
1736
  useEffect9(() => {
1700
1737
  if (submitAutomaticallyAfterDelay) {
@@ -1853,9 +1890,9 @@ var LabelContainer = styled12.label(({ theme, $labelPosition, $hasDropdown, poin
1853
1890
  }
1854
1891
  }));
1855
1892
  var InputFieldLabel = memo9(
1856
- forwardRef9(function InputFieldLabel2({ children = false, pointerEvents = "none", style: style3 }, forwardedRef) {
1893
+ forwardRef9(function InputFieldLabel2({ children = false, pointerEvents = "none", style: style2 }, forwardedRef) {
1857
1894
  const { labelPosition, hasDropdown, setLabelWidth } = useContext2(InputFieldContext);
1858
- const ref = useRef10(null);
1895
+ const ref = useRef11(null);
1859
1896
  useLayoutEffect4(() => {
1860
1897
  if (!setLabelWidth)
1861
1898
  return;
@@ -1874,7 +1911,7 @@ var InputFieldLabel = memo9(
1874
1911
  pointerEvents,
1875
1912
  $labelPosition: labelPosition,
1876
1913
  $hasDropdown: hasDropdown,
1877
- style: style3
1914
+ style: style2
1878
1915
  },
1879
1916
  children
1880
1917
  );
@@ -2042,34 +2079,34 @@ var InputFieldTypeahead = (props) => {
2042
2079
  labelSize,
2043
2080
  hasDropdown,
2044
2081
  hasLabel,
2045
- size: size2,
2046
- onFocusChange
2082
+ size: size2
2083
+ // onFocusChange,
2047
2084
  } = useContext2(InputFieldContext);
2048
2085
  return /* @__PURE__ */ React18.createElement(
2049
2086
  InputElement,
2050
2087
  {
2088
+ as: "span",
2051
2089
  $labelPosition: labelPosition,
2052
2090
  $labelSize: labelSize,
2053
2091
  $hasLabel: hasLabel,
2054
2092
  $hasDropdown: hasDropdown,
2055
2093
  $size: size2,
2056
- onFocusChange,
2057
- readOnly: true,
2058
- placeholder: props.value,
2059
2094
  value: "",
2060
2095
  style: {
2061
2096
  position: "absolute",
2062
- top: -1,
2097
+ top: 0,
2063
2098
  left: 0,
2064
2099
  right: 0,
2065
- bottom: -1,
2100
+ bottom: 0,
2066
2101
  width: "100%",
2067
2102
  height: "100%",
2068
2103
  pointerEvents: "none",
2069
2104
  background: "transparent",
2070
2105
  boxShadow: "none"
2071
2106
  }
2072
- }
2107
+ },
2108
+ /* @__PURE__ */ React18.createElement("span", { style: { opacity: 0 } }, props.prefix),
2109
+ /* @__PURE__ */ React18.createElement("span", { style: { opacity: 0.5 } }, props.value.slice(props.prefix.length))
2073
2110
  );
2074
2111
  };
2075
2112
  function parseNumber(value) {
@@ -2157,7 +2194,7 @@ function InputFieldRoot({
2157
2194
  size: size2 = "medium",
2158
2195
  renderPopoverContent,
2159
2196
  onFocusChange,
2160
- style: style3,
2197
+ style: style2,
2161
2198
  className
2162
2199
  }) {
2163
2200
  const childrenArray = Children3.toArray(children);
@@ -2216,7 +2253,7 @@ function InputFieldRoot({
2216
2253
  id,
2217
2254
  $width: width,
2218
2255
  $flex: flex,
2219
- style: style3,
2256
+ style: style2,
2220
2257
  className
2221
2258
  },
2222
2259
  children
@@ -2341,8 +2378,8 @@ var DialogProvider = function DialogProvider2({
2341
2378
  },
2342
2379
  [submit]
2343
2380
  );
2344
- const inputRef = useRef11(null);
2345
- const dialogRef = useRef11(null);
2381
+ const inputRef = useRef12(null);
2382
+ const dialogRef = useRef12(null);
2346
2383
  const containsElement = useCallback12((element) => {
2347
2384
  if (!dialogRef.current)
2348
2385
  return false;
@@ -2613,7 +2650,7 @@ function useHover(props = {}) {
2613
2650
  // src/components/Chip.tsx
2614
2651
  var ChipElement = styled14.span(({ theme, $colorScheme, $size, $variant, $monospace, $isInteractive }) => {
2615
2652
  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;
2653
+ const backgroundColor = $colorScheme === "primary" ? theme.colors.primaryPastel : $colorScheme === "secondary" ? theme.colors.secondaryPastel : $colorScheme === "error" ? "rgb(255, 219, 219)" : theme.colors.inputBackground;
2617
2654
  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
2655
  return {
2619
2656
  textTransform: "initial",
@@ -2702,7 +2739,7 @@ var Chip = memo11(
2702
2739
  deletable,
2703
2740
  addable,
2704
2741
  clickable,
2705
- style: style3,
2742
+ style: style2,
2706
2743
  size: size2 = "large",
2707
2744
  variant = "solid",
2708
2745
  monospace = false,
@@ -2725,7 +2762,7 @@ var Chip = memo11(
2725
2762
  ref: forwardedRef,
2726
2763
  $variant: variant,
2727
2764
  $colorScheme: colorScheme,
2728
- style: style3,
2765
+ style: style2,
2729
2766
  onClick: handleClick,
2730
2767
  $size: size2,
2731
2768
  $monospace: monospace,
@@ -3547,7 +3584,7 @@ var FillInputField = memo17(
3547
3584
  );
3548
3585
 
3549
3586
  // src/components/FloatingWindow.tsx
3550
- import React30, { useCallback as useCallback15, useRef as useRef13, useState as useState17 } from "react";
3587
+ import React30, { useCallback as useCallback15, useRef as useRef14, useState as useState17 } from "react";
3551
3588
  var styles2 = {
3552
3589
  noSelect: {
3553
3590
  userSelect: "none",
@@ -3674,7 +3711,7 @@ var FloatingWindow = ({
3674
3711
  const [isResizing, setIsResizing] = useState17(false);
3675
3712
  const [dragOffset, setDragOffset] = useState17({ x: 0, y: 0 });
3676
3713
  const [resizeDirection, setResizeDirection] = useState17(null);
3677
- const wrapperRef = useRef13(null);
3714
+ const wrapperRef = useRef14(null);
3678
3715
  const toggleGlobalTextSelection = (disable) => {
3679
3716
  if (disable) {
3680
3717
  document.body.style.userSelect = "none";
@@ -3804,11 +3841,11 @@ var FloatingWindow = ({
3804
3841
  ),
3805
3842
  /* @__PURE__ */ React30.createElement(Divider, null),
3806
3843
  /* @__PURE__ */ React30.createElement("div", { style: styles2.content }, children),
3807
- Object.entries(resizeHandlePositions).map(([direction, style3]) => /* @__PURE__ */ React30.createElement(
3844
+ Object.entries(resizeHandlePositions).map(([direction, style2]) => /* @__PURE__ */ React30.createElement(
3808
3845
  "div",
3809
3846
  {
3810
3847
  key: direction,
3811
- style: { ...styles2.resizeHandle, ...style3 },
3848
+ style: { ...styles2.resizeHandle, ...style2 },
3812
3849
  onMouseDown: handleResizeStart(direction)
3813
3850
  }
3814
3851
  ))
@@ -4161,7 +4198,7 @@ var GridViewItem = forwardRef12(function GridViewItem2({
4161
4198
  menuItems,
4162
4199
  onSelectMenuItem,
4163
4200
  onContextMenu,
4164
- style: style3
4201
+ style: style2
4165
4202
  }, forwardedRef) {
4166
4203
  const [hovered, setHovered] = React33.useState(false);
4167
4204
  const { hoverProps } = useHover({
@@ -4211,7 +4248,7 @@ var GridViewItem = forwardRef12(function GridViewItem2({
4211
4248
  onClick: handleClick,
4212
4249
  onDoubleClick,
4213
4250
  onContextMenu,
4214
- style: style3
4251
+ style: style2
4215
4252
  },
4216
4253
  children
4217
4254
  ),
@@ -4299,7 +4336,7 @@ import React37, {
4299
4336
  useImperativeHandle as useImperativeHandle3,
4300
4337
  useLayoutEffect as useLayoutEffect7,
4301
4338
  useMemo as useMemo19,
4302
- useRef as useRef16,
4339
+ useRef as useRef17,
4303
4340
  useState as useState20
4304
4341
  } from "react";
4305
4342
  import styled25 from "styled-components";
@@ -4389,7 +4426,7 @@ import React35, {
4389
4426
  useImperativeHandle as useImperativeHandle2,
4390
4427
  useLayoutEffect as useLayoutEffect6,
4391
4428
  useMemo as useMemo18,
4392
- useRef as useRef15
4429
+ useRef as useRef16
4393
4430
  } from "react";
4394
4431
  import { WindowScroller } from "react-virtualized";
4395
4432
  import { VariableSizeList } from "react-window";
@@ -4439,7 +4476,7 @@ import React34, {
4439
4476
  useContext as useContext8,
4440
4477
  useEffect as useEffect13,
4441
4478
  useMemo as useMemo17,
4442
- useRef as useRef14,
4479
+ useRef as useRef15,
4443
4480
  useState as useState19
4444
4481
  } from "react";
4445
4482
  import { createPortal as createPortal2 } from "react-dom";
@@ -4529,7 +4566,7 @@ function SortableRoot({
4529
4566
  })
4530
4567
  );
4531
4568
  const [activeIndex, setActiveIndex] = useState19();
4532
- const activatorEvent = useRef14(null);
4569
+ const activatorEvent = useRef15(null);
4533
4570
  const setActivatorEvent = useCallback19((event) => {
4534
4571
  activatorEvent.current = event;
4535
4572
  }, []);
@@ -4649,7 +4686,7 @@ function ListViewEditableRowTitle({
4649
4686
  autoFocus,
4650
4687
  placeholder
4651
4688
  }) {
4652
- const inputRef = useRef15(null);
4689
+ const inputRef = useRef16(null);
4653
4690
  useLayoutEffect6(() => {
4654
4691
  const element = inputRef.current;
4655
4692
  if (!element || !autoFocus)
@@ -4801,8 +4838,9 @@ var ListViewRow = forwardRef13(function ListViewRow2({
4801
4838
  onSelectMenuItem,
4802
4839
  onMenuOpenChange,
4803
4840
  onKeyDown,
4804
- style: style3,
4805
- dragIndicatorStyle
4841
+ style: style2,
4842
+ dragIndicatorStyle,
4843
+ className
4806
4844
  }, forwardedRef) {
4807
4845
  depth = Math.max(0, depth);
4808
4846
  const {
@@ -4841,9 +4879,9 @@ var ListViewRow = forwardRef13(function ListViewRow2({
4841
4879
  // TODO: Where do these offsets actually come from?
4842
4880
  transform: `translate3d(-36px, -6px, 0)`,
4843
4881
  width: `calc(100% + 48px)`,
4844
- ...style3
4845
- } : style3;
4846
- }, [isDragging, style3]);
4882
+ ...style2
4883
+ } : style2;
4884
+ }, [isDragging, style2]);
4847
4885
  const renderContent = ({
4848
4886
  relativeDropPosition,
4849
4887
  ...renderProps
@@ -4878,7 +4916,8 @@ var ListViewRow = forwardRef13(function ListViewRow2({
4878
4916
  { onPointerDown: renderProps.onPointerDown },
4879
4917
  { [pressEventName]: handlePress }
4880
4918
  ),
4881
- tabIndex
4919
+ tabIndex,
4920
+ className
4882
4921
  },
4883
4922
  relativeDropPosition && /* @__PURE__ */ React35.createElement(
4884
4923
  ListViewDragIndicatorElement,
@@ -4924,10 +4963,10 @@ var RenderItemContext = createContext9(
4924
4963
  RenderItemContext.displayName = "RenderItemContext";
4925
4964
  var VirtualizedListRow = memo22(function VirtualizedListRow2({
4926
4965
  index,
4927
- style: style3
4966
+ style: style2
4928
4967
  }) {
4929
4968
  const renderItem = useContext9(RenderItemContext);
4930
- return /* @__PURE__ */ React35.createElement("div", { key: index, style: style3 }, renderItem(index));
4969
+ return /* @__PURE__ */ React35.createElement("div", { key: index, style: style2 }, renderItem(index));
4931
4970
  });
4932
4971
  var VirtualizedListInner = forwardRef13(function VirtualizedListInner2({
4933
4972
  size: size2,
@@ -4937,7 +4976,7 @@ var VirtualizedListInner = forwardRef13(function VirtualizedListInner2({
4937
4976
  keyExtractor,
4938
4977
  renderItem
4939
4978
  }, ref) {
4940
- const listRef = useRef15(null);
4979
+ const listRef = useRef16(null);
4941
4980
  useImperativeHandle2(ref, () => ({
4942
4981
  scrollToIndex(index) {
4943
4982
  listRef.current?.scrollToItem(index);
@@ -5013,7 +5052,7 @@ var RootContainer2 = styled23.div(({ theme, $scrollable, $gap }) => ({
5013
5052
  var ListViewRootInner = forwardRef13(function ListViewRootInner2({
5014
5053
  id,
5015
5054
  className,
5016
- style: style3,
5055
+ style: style2,
5017
5056
  onPress,
5018
5057
  scrollable = false,
5019
5058
  expandable = true,
@@ -5174,7 +5213,7 @@ var ListViewRootInner = forwardRef13(function ListViewRootInner2({
5174
5213
  {
5175
5214
  id,
5176
5215
  className,
5177
- style: style3,
5216
+ style: style2,
5178
5217
  ...{
5179
5218
  [pressEventName]: handleClick
5180
5219
  },
@@ -5280,6 +5319,7 @@ var Text = forwardRef14(function Text2({
5280
5319
  tabIndex,
5281
5320
  onClick,
5282
5321
  onKeyDown,
5322
+ style: style2,
5283
5323
  ...rest
5284
5324
  }, forwardedRef) {
5285
5325
  const element = as ?? elements[variant] ?? "span";
@@ -5289,6 +5329,7 @@ var Text = forwardRef14(function Text2({
5289
5329
  ref: forwardedRef,
5290
5330
  as: element,
5291
5331
  className,
5332
+ style: style2,
5292
5333
  tabIndex,
5293
5334
  $variant: variant,
5294
5335
  $breakpoints: breakpoints,
@@ -5423,13 +5464,13 @@ var InputFieldWithCompletions = memo23(
5423
5464
  onFocus,
5424
5465
  onBlur,
5425
5466
  onDeleteWhenEmpty,
5426
- style: style3,
5467
+ style: style2,
5427
5468
  className,
5428
5469
  children,
5429
5470
  hideChildrenWhenFocused = false,
5430
5471
  hideMenuWhenEmptyValue = false
5431
5472
  }, forwardedRef) {
5432
- const ref = useRef16(null);
5473
+ const ref = useRef17(null);
5433
5474
  const [isFocused, setIsFocused] = useState20(false);
5434
5475
  const [state, _setState] = useState20({
5435
5476
  filter: initialValue,
@@ -5464,7 +5505,7 @@ var InputFieldWithCompletions = memo23(
5464
5505
  },
5465
5506
  [items, onChange, onHoverItem, state]
5466
5507
  );
5467
- const initialValueRef = useRef16(initialValue);
5508
+ const initialValueRef = useRef17(initialValue);
5468
5509
  useLayoutEffect7(() => {
5469
5510
  if (initialValueRef.current === initialValue)
5470
5511
  return;
@@ -5494,7 +5535,7 @@ var InputFieldWithCompletions = memo23(
5494
5535
  listRef.current.scrollToIndex(selectedIndex);
5495
5536
  }
5496
5537
  }, [selectedIndex]);
5497
- const lastSubmittedValueRef = useRef16(void 0);
5538
+ const lastSubmittedValueRef = useRef17(void 0);
5498
5539
  const selectItem = useCallback21(
5499
5540
  (item) => {
5500
5541
  if (item.type === "sectionHeader")
@@ -5648,7 +5689,7 @@ var InputFieldWithCompletions = memo23(
5648
5689
  onBlur: handleBlur,
5649
5690
  onFocusCapture: handleFocus,
5650
5691
  onKeyDown: handleKeyDown,
5651
- style: style3,
5692
+ style: style2,
5652
5693
  className,
5653
5694
  autoCapitalize: "off",
5654
5695
  autoComplete: "off",
@@ -5661,7 +5702,7 @@ var InputFieldWithCompletions = memo23(
5661
5702
  "aria-controls": "component-listbox"
5662
5703
  }
5663
5704
  ),
5664
- filter && typeaheadValue && typeaheadValue.startsWith(filter) && /* @__PURE__ */ React37.createElement(InputField.Typeahead, { value: typeaheadValue }),
5705
+ filter && typeaheadValue && typeaheadValue.toLowerCase().startsWith(filter.toLowerCase()) && /* @__PURE__ */ React37.createElement(InputField.Typeahead, { value: typeaheadValue, prefix: filter }),
5665
5706
  (!isFocused || !hideChildrenWhenFocused) && children,
5666
5707
  loading && isFocused && /* @__PURE__ */ React37.createElement(InputField.Label, null, /* @__PURE__ */ React37.createElement(ActivityIndicator, null))
5667
5708
  );
@@ -5694,7 +5735,7 @@ var InspectorContainer = memo24(
5694
5735
  showDividers,
5695
5736
  id,
5696
5737
  className,
5697
- style: style3
5738
+ style: style2
5698
5739
  }, forwardedRef) {
5699
5740
  const theme = useDesignSystemTheme();
5700
5741
  return /* @__PURE__ */ React38.createElement(
@@ -5708,7 +5749,7 @@ var InspectorContainer = memo24(
5708
5749
  flexDirection: "column",
5709
5750
  position: "relative",
5710
5751
  background: theme.colors.sidebar.background,
5711
- ...style3
5752
+ ...style2
5712
5753
  }
5713
5754
  },
5714
5755
  header,
@@ -5765,7 +5806,7 @@ import React40, {
5765
5806
  memo as memo26,
5766
5807
  useLayoutEffect as useLayoutEffect8,
5767
5808
  useMemo as useMemo20,
5768
- useRef as useRef17
5809
+ useRef as useRef18
5769
5810
  } from "react";
5770
5811
  import styled27 from "styled-components";
5771
5812
  var Container4 = styled27.div(({ theme }) => ({
@@ -5795,7 +5836,7 @@ var LabeledElementView = memo26(function LabeledElementView2({
5795
5836
  (child) => isValidElement4(child) && "id" in child.props ? child.props.id : null
5796
5837
  ).filter((id) => !!id);
5797
5838
  const serializedIds = elementIds.join(",");
5798
- const containerRef = useRef17(null);
5839
+ const containerRef = useRef18(null);
5799
5840
  const refs = useMemo20(() => {
5800
5841
  return Object.fromEntries(
5801
5842
  serializedIds.split(",").map((id) => [id, createRef()])
@@ -6042,7 +6083,7 @@ import React43, {
6042
6083
  useContext as useContext11,
6043
6084
  useEffect as useEffect15,
6044
6085
  useMemo as useMemo22,
6045
- useRef as useRef18
6086
+ useRef as useRef19
6046
6087
  } from "react";
6047
6088
  import styled30 from "styled-components";
6048
6089
  var SelectContext = createContext11(void 0);
@@ -6143,7 +6184,7 @@ var Select = memo28(function Select2({
6143
6184
  )) : children,
6144
6185
  [children, getTitle, onChange, options]
6145
6186
  );
6146
- const listeners = useRef18(/* @__PURE__ */ new Map());
6187
+ const listeners = useRef19(/* @__PURE__ */ new Map());
6147
6188
  const contextValue = useMemo22(
6148
6189
  () => ({
6149
6190
  addListener: (value2, listener) => listeners.current.set(value2, listener),
@@ -6176,9 +6217,12 @@ var readOnlyStyle = {
6176
6217
  justifyContent: "flex-start",
6177
6218
  textAlign: "left"
6178
6219
  };
6220
+ var flexStyle = {
6221
+ flex: 1
6222
+ };
6179
6223
  var SelectMenu = memo29(function SelectMenu2({
6180
6224
  id,
6181
- style: style3,
6225
+ style: style2,
6182
6226
  className,
6183
6227
  menuItems,
6184
6228
  value,
@@ -6196,16 +6240,16 @@ var SelectMenu = memo29(function SelectMenu2({
6196
6240
  Button,
6197
6241
  {
6198
6242
  id,
6199
- style: style3,
6243
+ style: style2,
6200
6244
  contentStyle: readOnlyStyle,
6201
6245
  className,
6202
6246
  disabled
6203
6247
  },
6204
- icon && /* @__PURE__ */ React44.createElement(React44.Fragment, null, renderIcon(icon), /* @__PURE__ */ React44.createElement(Spacer.Horizontal, { size: 8 })),
6205
- selectedItem?.title ?? value
6248
+ icon && /* @__PURE__ */ React44.createElement(React44.Fragment, null, renderIcon(icon), /* @__PURE__ */ React44.createElement(Spacer.Horizontal, { inline: true, size: 6 })),
6249
+ /* @__PURE__ */ React44.createElement("span", { style: flexStyle }, selectedItem?.title ?? value)
6206
6250
  );
6207
6251
  }
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) => {
6252
+ 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
6253
  if (typeof menuItem === "string") {
6210
6254
  return /* @__PURE__ */ React44.createElement(StyledSeparator, null);
6211
6255
  }
@@ -6346,14 +6390,80 @@ var Switch = function Switch2({
6346
6390
  );
6347
6391
  };
6348
6392
 
6393
+ // src/components/TextArea.tsx
6394
+ import React47, { forwardRef as forwardRef18, memo as memo30, useCallback as useCallback25, useEffect as useEffect16, useRef as useRef20 } from "react";
6395
+ import styled34 from "styled-components";
6396
+ var TextAreaElement = styled34.textarea(({ theme }) => ({
6397
+ ...theme.textStyles.small,
6398
+ color: theme.colors.text,
6399
+ background: theme.colors.inputBackground,
6400
+ width: "0px",
6401
+ flex: "1 1 auto",
6402
+ padding: "4px 6px",
6403
+ border: "none",
6404
+ outline: "none",
6405
+ height: 100,
6406
+ borderRadius: "4px",
6407
+ "&::placeholder": {
6408
+ color: theme.colors.textDisabled
6409
+ },
6410
+ "&:focus": {
6411
+ boxShadow: `0 0 0 2px ${theme.colors.primary}`
6412
+ },
6413
+ // readonly
6414
+ "&:read-only": {
6415
+ color: theme.colors.textDisabled
6416
+ },
6417
+ resize: "none"
6418
+ }));
6419
+ var useAutoResize = (value) => {
6420
+ const textareaRef = useRef20(null);
6421
+ useEffect16(() => {
6422
+ if (!textareaRef.current)
6423
+ return;
6424
+ textareaRef.current.style.height = "auto";
6425
+ textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`;
6426
+ }, [value]);
6427
+ return textareaRef;
6428
+ };
6429
+ var AutoResizingTextArea = memo30(
6430
+ forwardRef18(function AutoResizingTextArea2({
6431
+ value,
6432
+ onChangeText,
6433
+ ...rest
6434
+ }, forwardedRef) {
6435
+ const ref = useAutoResize(value || rest.placeholder || "");
6436
+ const handleChange = useCallback25(
6437
+ (event) => onChangeText(event.target.value),
6438
+ [onChangeText]
6439
+ );
6440
+ const handleRef = useCallback25(
6441
+ (value2) => {
6442
+ ref.current = value2;
6443
+ assignRef(forwardedRef, value2);
6444
+ },
6445
+ [ref, forwardedRef]
6446
+ );
6447
+ return /* @__PURE__ */ React47.createElement(
6448
+ TextAreaElement,
6449
+ {
6450
+ ref: handleRef,
6451
+ ...rest,
6452
+ onChange: handleChange,
6453
+ value
6454
+ }
6455
+ );
6456
+ })
6457
+ );
6458
+
6349
6459
  // src/components/TreeView.tsx
6350
- import React47, {
6351
- forwardRef as forwardRef18,
6352
- memo as memo30,
6353
- useCallback as useCallback25,
6460
+ import React48, {
6461
+ forwardRef as forwardRef19,
6462
+ memo as memo31,
6463
+ useCallback as useCallback26,
6354
6464
  useContext as useContext12
6355
6465
  } from "react";
6356
- var TreeRow = forwardRef18(function TreeRow2({
6466
+ var TreeRow = forwardRef19(function TreeRow2({
6357
6467
  icon,
6358
6468
  expanded,
6359
6469
  onClickChevron,
@@ -6361,33 +6471,33 @@ var TreeRow = forwardRef18(function TreeRow2({
6361
6471
  ...rest
6362
6472
  }, forwardedRef) {
6363
6473
  const { expandable } = useContext12(ListView.RowContext);
6364
- const handleClickChevron = useCallback25(
6474
+ const handleClickChevron = useCallback26(
6365
6475
  (event) => {
6366
6476
  event.stopPropagation();
6367
6477
  onClickChevron?.({ altKey: event.altKey });
6368
6478
  },
6369
6479
  [onClickChevron]
6370
6480
  );
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(
6481
+ 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
6482
  IconButton,
6373
6483
  {
6374
6484
  iconName: expanded ? "ChevronDownIcon2" : "ChevronRightIcon2",
6375
6485
  onClick: handleClickChevron,
6376
6486
  selected: rest.selected
6377
6487
  }
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);
6488
+ ), /* @__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
6489
  });
6380
6490
  var TreeView;
6381
6491
  ((TreeView2) => {
6382
6492
  TreeView2.Root = ListView.Root;
6383
6493
  TreeView2.RowTitle = ListView.RowTitle;
6384
6494
  TreeView2.EditableRowTitle = ListView.EditableRowTitle;
6385
- TreeView2.Row = memo30(TreeRow);
6495
+ TreeView2.Row = memo31(TreeRow);
6386
6496
  })(TreeView || (TreeView = {}));
6387
6497
 
6388
6498
  // src/components/WorkspaceLayout.tsx
6389
6499
  import { useKeyboardShortcuts as useKeyboardShortcuts3 } from "@noya-app/noya-keymap";
6390
- import React49, { forwardRef as forwardRef19, useImperativeHandle as useImperativeHandle4, useRef as useRef20 } from "react";
6500
+ import React50, { forwardRef as forwardRef20, useImperativeHandle as useImperativeHandle4, useRef as useRef22 } from "react";
6391
6501
  import {
6392
6502
  Panel,
6393
6503
  PanelGroup,
@@ -6395,10 +6505,10 @@ import {
6395
6505
  } from "react-resizable-panels";
6396
6506
 
6397
6507
  // src/hooks/usePreservePanelSize.tsx
6398
- import { useLayoutEffect as useLayoutEffect9, useRef as useRef19 } from "react";
6508
+ import { useLayoutEffect as useLayoutEffect9, useRef as useRef21 } from "react";
6399
6509
 
6400
6510
  // src/hooks/useWindowSize.tsx
6401
- import { useEffect as useEffect16, useState as useState21 } from "react";
6511
+ import { useEffect as useEffect17, useState as useState21 } from "react";
6402
6512
  function useWindowSize() {
6403
6513
  const [size2, setSize] = useState21(
6404
6514
  typeof window === "undefined" ? { width: 0, height: 0 } : {
@@ -6406,7 +6516,7 @@ function useWindowSize() {
6406
6516
  height: window.innerHeight
6407
6517
  }
6408
6518
  );
6409
- useEffect16(() => {
6519
+ useEffect17(() => {
6410
6520
  const handleResize = () => setSize({
6411
6521
  width: window.innerWidth,
6412
6522
  height: window.innerHeight
@@ -6424,7 +6534,7 @@ var RIGHT_SIDEBAR_ID = "editor-right-sidebar";
6424
6534
  var CONTENT_AREA_ID = "editor-content-area";
6425
6535
  function usePreservePanelSize(panelGroupRef, setPanelLayoutState) {
6426
6536
  const windowSize = useWindowSize();
6427
- const layoutRef = useRef19();
6537
+ const layoutRef = useRef21();
6428
6538
  useLayoutEffect9(() => {
6429
6539
  const panelGroup = document.querySelector(
6430
6540
  `[data-panel-group-id="${EDITOR_PANEL_GROUP_ID}"]`
@@ -6528,7 +6638,7 @@ function usePreservePanelSize(panelGroupRef, setPanelLayoutState) {
6528
6638
  }
6529
6639
 
6530
6640
  // src/components/WorkspaceLayout.tsx
6531
- var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6641
+ var WorkspaceLayout = forwardRef20(function WorkspaceLayout2({
6532
6642
  autoSavePrefix,
6533
6643
  leftSidebarContent: leftPanelContent,
6534
6644
  children: centerPanelContent,
@@ -6543,7 +6653,7 @@ var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6543
6653
  leftSidebarCanResize = false,
6544
6654
  id,
6545
6655
  className,
6546
- style: style3
6656
+ style: style2
6547
6657
  }, forwardedRef) {
6548
6658
  const windowSize = useWindowSize();
6549
6659
  function getPercentage(size2) {
@@ -6553,9 +6663,9 @@ var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6553
6663
  const rightSidebarPercentage = getPercentage(rightSidebarInitialSize);
6554
6664
  const leftSidebarMinPercentage = leftSidebarMinSize !== void 0 ? getPercentage(leftSidebarMinSize) : void 0;
6555
6665
  const rightSidebarMinPercentage = rightSidebarMinSize !== void 0 ? getPercentage(rightSidebarMinSize) : void 0;
6556
- const panelGroupRef = useRef20(null);
6557
- const leftSidebarRef = useRef20(null);
6558
- const rightSidebarRef = useRef20(null);
6666
+ const panelGroupRef = useRef22(null);
6667
+ const leftSidebarRef = useRef22(null);
6668
+ const rightSidebarRef = useRef22(null);
6559
6669
  usePreservePanelSize(panelGroupRef, onChangeLayoutState);
6560
6670
  const theme = useDesignSystemTheme();
6561
6671
  useImperativeHandle4(forwardedRef, () => ({
@@ -6615,7 +6725,7 @@ var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6615
6725
  }
6616
6726
  });
6617
6727
  const centerPanelPercentage = 100 - (leftPanelContent ? leftSidebarPercentage : 0) - (rightPanelContent ? rightSidebarPercentage : 0);
6618
- return /* @__PURE__ */ React49.createElement(
6728
+ return /* @__PURE__ */ React50.createElement(
6619
6729
  "div",
6620
6730
  {
6621
6731
  id,
@@ -6624,10 +6734,10 @@ var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6624
6734
  backgroundColor: theme.colors.canvas.background,
6625
6735
  display: "flex",
6626
6736
  flexDirection: "row",
6627
- ...style3
6737
+ ...style2
6628
6738
  }
6629
6739
  },
6630
- /* @__PURE__ */ React49.createElement(
6740
+ /* @__PURE__ */ React50.createElement(
6631
6741
  PanelGroup,
6632
6742
  {
6633
6743
  ref: panelGroupRef,
@@ -6636,7 +6746,7 @@ var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6636
6746
  autoSaveId: autoSavePrefix ? `${autoSavePrefix}--${EDITOR_PANEL_GROUP_ID}` : void 0,
6637
6747
  style: { flex: "1" }
6638
6748
  },
6639
- hasLeftSidebar && /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement(
6749
+ hasLeftSidebar && /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement(
6640
6750
  Panel,
6641
6751
  {
6642
6752
  id: LEFT_SIDEBAR_ID,
@@ -6653,7 +6763,7 @@ var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6653
6763
  }
6654
6764
  },
6655
6765
  leftPanelContent
6656
- ), /* @__PURE__ */ React49.createElement(
6766
+ ), /* @__PURE__ */ React50.createElement(
6657
6767
  PanelResizeHandle,
6658
6768
  {
6659
6769
  style: {
@@ -6664,7 +6774,7 @@ var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6664
6774
  }
6665
6775
  }
6666
6776
  )),
6667
- /* @__PURE__ */ React49.createElement(
6777
+ /* @__PURE__ */ React50.createElement(
6668
6778
  Panel,
6669
6779
  {
6670
6780
  id: CONTENT_AREA_ID,
@@ -6679,7 +6789,7 @@ var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6679
6789
  },
6680
6790
  centerPanelContent
6681
6791
  ),
6682
- hasRightSidebar && /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement(
6792
+ hasRightSidebar && /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement(
6683
6793
  PanelResizeHandle,
6684
6794
  {
6685
6795
  style: {
@@ -6689,7 +6799,7 @@ var WorkspaceLayout = forwardRef19(function WorkspaceLayout2({
6689
6799
  backgroundColor: theme.colors.divider
6690
6800
  }
6691
6801
  }
6692
- ), /* @__PURE__ */ React49.createElement(
6802
+ ), /* @__PURE__ */ React50.createElement(
6693
6803
  Panel,
6694
6804
  {
6695
6805
  id: RIGHT_SIDEBAR_ID,
@@ -6752,8 +6862,8 @@ var SUPPORTED_CANVAS_UPLOAD_TYPES = [
6752
6862
 
6753
6863
  // src/components/ArrayController.tsx
6754
6864
  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";
6865
+ import React52, { memo as memo33, useCallback as useCallback27, useMemo as useMemo24 } from "react";
6866
+ import styled36, { useTheme as useTheme5 } from "styled-components";
6757
6867
 
6758
6868
  // src/components/InspectorPrimitives.tsx
6759
6869
  var InspectorPrimitives_exports = {};
@@ -6771,20 +6881,20 @@ __export(InspectorPrimitives_exports, {
6771
6881
  Title: () => Title3,
6772
6882
  VerticalSeparator: () => VerticalSeparator
6773
6883
  });
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 }) => ({
6884
+ import React51, { memo as memo32 } from "react";
6885
+ import styled35, { useTheme as useTheme4 } from "styled-components";
6886
+ var Section = styled35.div(({ theme, $padding = "10px", $gap }) => ({
6777
6887
  flex: "0 0 auto",
6778
6888
  display: "flex",
6779
6889
  flexDirection: "column",
6780
6890
  padding: $padding,
6781
6891
  gap: $gap
6782
6892
  }));
6783
- var SectionHeader = styled34.div(({ theme }) => ({
6893
+ var SectionHeader = styled35.div(({ theme }) => ({
6784
6894
  display: "flex",
6785
6895
  alignItems: "center"
6786
6896
  }));
6787
- var Title3 = styled34.div(({ theme, $textStyle }) => ({
6897
+ var Title3 = styled35.div(({ theme, $textStyle }) => ({
6788
6898
  display: "flex",
6789
6899
  flexDirection: "row",
6790
6900
  userSelect: "none",
@@ -6793,11 +6903,11 @@ var Title3 = styled34.div(({ theme, $textStyle }) => ({
6793
6903
  color: theme.colors.text
6794
6904
  } : {
6795
6905
  ...theme.textStyles.label,
6796
- color: theme.colors.textSubtle,
6906
+ color: theme.colors.textMuted,
6797
6907
  fontWeight: "bold"
6798
6908
  }
6799
6909
  }));
6800
- var Row2 = styled34.div(
6910
+ var Row2 = styled35.div(
6801
6911
  ({ theme, $gap }) => ({
6802
6912
  flex: "1",
6803
6913
  display: "flex",
@@ -6806,26 +6916,26 @@ var Row2 = styled34.div(
6806
6916
  gap: $gap
6807
6917
  })
6808
6918
  );
6809
- var Column = styled34.div(({ theme }) => ({
6919
+ var Column = styled35.div(({ theme }) => ({
6810
6920
  flex: "1",
6811
6921
  display: "flex",
6812
6922
  flexDirection: "column",
6813
6923
  gap: "4px"
6814
6924
  }));
6815
- var Checkbox = styled34.input(({ theme }) => ({
6925
+ var Checkbox = styled35.input(({ theme }) => ({
6816
6926
  margin: 0
6817
6927
  }));
6818
- var Text3 = styled34.span(({ theme }) => ({
6928
+ var Text3 = styled35.span(({ theme }) => ({
6819
6929
  ...theme.textStyles.small
6820
6930
  }));
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 }) => ({
6931
+ var VerticalSeparator = () => /* @__PURE__ */ React51.createElement(Spacer.Vertical, { size: useTheme4().sizes.inspector.verticalSeparator });
6932
+ var HorizontalSeparator = () => /* @__PURE__ */ React51.createElement(Spacer.Horizontal, { size: useTheme4().sizes.inspector.horizontalSeparator });
6933
+ var SliderRowLabel = styled35.span(({ theme }) => ({
6824
6934
  ...theme.textStyles.small,
6825
6935
  color: theme.colors.textMuted,
6826
6936
  marginBottom: "-6px"
6827
6937
  }));
6828
- var RowLabel = styled34.span(({ theme, $textStyle }) => ({
6938
+ var RowLabel = styled35.span(({ theme, $textStyle }) => ({
6829
6939
  // marginBottom: '6px',
6830
6940
  display: "flex",
6831
6941
  ...$textStyle ? {
@@ -6839,7 +6949,7 @@ var RowLabel = styled34.span(({ theme, $textStyle }) => ({
6839
6949
  // Button height
6840
6950
  alignItems: "center"
6841
6951
  }));
6842
- var LabeledRow = memo31(function LabeledRow2({
6952
+ var LabeledRow = memo32(function LabeledRow2({
6843
6953
  id,
6844
6954
  children,
6845
6955
  label,
@@ -6847,26 +6957,26 @@ var LabeledRow = memo31(function LabeledRow2({
6847
6957
  gap,
6848
6958
  right
6849
6959
  }) {
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)));
6960
+ 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
6961
  });
6852
- var LabeledSliderRow = memo31(function LabeledRow3({
6962
+ var LabeledSliderRow = memo32(function LabeledRow3({
6853
6963
  children,
6854
6964
  label
6855
6965
  }) {
6856
- return /* @__PURE__ */ React50.createElement(Row2, null, /* @__PURE__ */ React50.createElement(Column, null, /* @__PURE__ */ React50.createElement(SliderRowLabel, null, label), /* @__PURE__ */ React50.createElement(Row2, null, children)));
6966
+ return /* @__PURE__ */ React51.createElement(Row2, null, /* @__PURE__ */ React51.createElement(Column, null, /* @__PURE__ */ React51.createElement(SliderRowLabel, null, label), /* @__PURE__ */ React51.createElement(Row2, null, children)));
6857
6967
  });
6858
6968
 
6859
6969
  // src/components/ArrayController.tsx
6860
- var ElementRow = styled35.div({
6970
+ var ElementRow = styled36.div({
6861
6971
  flex: "0 0 auto",
6862
6972
  display: "flex",
6863
6973
  flexDirection: "row",
6864
6974
  alignItems: "center"
6865
6975
  });
6866
- var ItemContainer2 = styled35.div({
6976
+ var ItemContainer2 = styled36.div({
6867
6977
  position: "relative"
6868
6978
  });
6869
- var ArrayController = memo32(function ArrayController2({
6979
+ var ArrayController = memo33(function ArrayController2({
6870
6980
  id,
6871
6981
  items,
6872
6982
  title,
@@ -6889,7 +6999,7 @@ var ArrayController = memo32(function ArrayController2({
6889
6999
  [getKey, items]
6890
7000
  );
6891
7001
  const indexes = reversed ? range2(0, items.length).reverse() : range2(0, items.length);
6892
- const handleMoveItem = useCallback26(
7002
+ const handleMoveItem = useCallback27(
6893
7003
  (sourceIndex, destinationIndex, position) => {
6894
7004
  if (reversed) {
6895
7005
  if (position === "above") {
@@ -6906,11 +7016,11 @@ var ArrayController = memo32(function ArrayController2({
6906
7016
  [onMoveItem, reversed]
6907
7017
  );
6908
7018
  const renderRow = (index) => {
6909
- return /* @__PURE__ */ React51.createElement(ElementRow, { key: keys[index] }, renderItem({ item: items[index], index }));
7019
+ return /* @__PURE__ */ React52.createElement(ElementRow, { key: keys[index] }, renderItem({ item: items[index], index }));
6910
7020
  };
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(
7021
+ 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
7022
  [
6913
- onClickTrash && /* @__PURE__ */ React51.createElement(
7023
+ onClickTrash && /* @__PURE__ */ React52.createElement(
6914
7024
  IconButton,
6915
7025
  {
6916
7026
  id: `${id}-trash`,
@@ -6919,7 +7029,7 @@ var ArrayController = memo32(function ArrayController2({
6919
7029
  onClick: onClickTrash
6920
7030
  }
6921
7031
  ),
6922
- onClickExpand && /* @__PURE__ */ React51.createElement(
7032
+ onClickExpand && /* @__PURE__ */ React52.createElement(
6923
7033
  IconButton,
6924
7034
  {
6925
7035
  id: `${id}-gear`,
@@ -6928,7 +7038,7 @@ var ArrayController = memo32(function ArrayController2({
6928
7038
  onClick: onClickExpand
6929
7039
  }
6930
7040
  ),
6931
- onClickPlus && /* @__PURE__ */ React51.createElement(
7041
+ onClickPlus && /* @__PURE__ */ React52.createElement(
6932
7042
  IconButton,
6933
7043
  {
6934
7044
  id: `${id}-add`,
@@ -6938,15 +7048,15 @@ var ArrayController = memo32(function ArrayController2({
6938
7048
  }
6939
7049
  )
6940
7050
  ],
6941
- /* @__PURE__ */ React51.createElement(Spacer.Horizontal, { size: 8 })
6942
- )), /* @__PURE__ */ React51.createElement(Stack.V, { gap: "4px" }, sortable ? /* @__PURE__ */ React51.createElement(
7051
+ /* @__PURE__ */ React52.createElement(Spacer.Horizontal, { size: 8 })
7052
+ )), /* @__PURE__ */ React52.createElement(Stack.V, { gap: "4px" }, sortable ? /* @__PURE__ */ React52.createElement(
6943
7053
  Sortable.Root,
6944
7054
  {
6945
7055
  keys,
6946
7056
  renderOverlay: renderRow,
6947
7057
  onMoveItem: handleMoveItem
6948
7058
  },
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(
7059
+ 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
7060
  ListView.DragIndicator,
6951
7061
  {
6952
7062
  $gap: 0,
@@ -6960,11 +7070,11 @@ var ArrayController = memo32(function ArrayController2({
6960
7070
 
6961
7071
  // src/components/DimensionInput.tsx
6962
7072
  import { round } from "@noya-app/noya-utils";
6963
- import React52, { memo as memo33, useCallback as useCallback27 } from "react";
7073
+ import React53, { memo as memo34, useCallback as useCallback28 } from "react";
6964
7074
  function getNewValue(value, mode, delta) {
6965
7075
  return delta === void 0 ? value : mode === "replace" ? delta : value + delta;
6966
7076
  }
6967
- var DimensionInput = memo33(function DimensionInput2({
7077
+ var DimensionInput = memo34(function DimensionInput2({
6968
7078
  id,
6969
7079
  value,
6970
7080
  onSetValue,
@@ -6974,15 +7084,15 @@ var DimensionInput = memo33(function DimensionInput2({
6974
7084
  disabled,
6975
7085
  trigger = "submit"
6976
7086
  }) {
6977
- const handleNudgeValue = useCallback27(
7087
+ const handleNudgeValue = useCallback28(
6978
7088
  (value2) => onSetValue(value2, "adjust"),
6979
7089
  [onSetValue]
6980
7090
  );
6981
- const handleSetValue = useCallback27(
7091
+ const handleSetValue = useCallback28(
6982
7092
  (value2) => onSetValue(value2, "replace"),
6983
7093
  [onSetValue]
6984
7094
  );
6985
- return /* @__PURE__ */ React52.createElement(InputField.Root, { id, width: size2 }, /* @__PURE__ */ React52.createElement(
7095
+ return /* @__PURE__ */ React53.createElement(InputField.Root, { id, width: size2 }, /* @__PURE__ */ React53.createElement(
6986
7096
  InputField.NumberInput,
6987
7097
  {
6988
7098
  value: value === void 0 ? value : round(value, 2),
@@ -6991,11 +7101,12 @@ var DimensionInput = memo33(function DimensionInput2({
6991
7101
  disabled,
6992
7102
  ...trigger === "change" ? { onChange: handleSetValue } : { onSubmit: handleSetValue }
6993
7103
  }
6994
- ), label && /* @__PURE__ */ React52.createElement(InputField.Label, null, label));
7104
+ ), label && /* @__PURE__ */ React53.createElement(InputField.Label, null, label));
6995
7105
  });
6996
7106
  export {
6997
7107
  ActivityIndicator,
6998
7108
  ArrayController,
7109
+ AutoResizingTextArea,
6999
7110
  Avatar,
7000
7111
  AvatarStack,
7001
7112
  Body,
@@ -7029,6 +7140,7 @@ export {
7029
7140
  Heading4,
7030
7141
  Heading5,
7031
7142
  IconButton,
7143
+ Icons,
7032
7144
  ImageDataProvider,
7033
7145
  InputElement,
7034
7146
  InputField,
@@ -7074,11 +7186,13 @@ export {
7074
7186
  light_exports as lightTheme,
7075
7187
  mediaQuery,
7076
7188
  normalizeListDestinationIndex,
7189
+ renderIcon,
7077
7190
  rgbaToSketchColor,
7078
7191
  size,
7079
7192
  sketchColorToHex,
7080
7193
  sketchColorToRgba,
7081
7194
  sketchColorToRgbaString,
7195
+ useAutoResize,
7082
7196
  useCurrentFloatingWindowInternal,
7083
7197
  useDesignSystemConfiguration,
7084
7198
  useDesignSystemTheme,