@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.js CHANGED
@@ -32,6 +32,7 @@ var src_exports = {};
32
32
  __export(src_exports, {
33
33
  ActivityIndicator: () => ActivityIndicator,
34
34
  ArrayController: () => ArrayController,
35
+ AutoResizingTextArea: () => AutoResizingTextArea,
35
36
  Avatar: () => Avatar,
36
37
  AvatarStack: () => AvatarStack,
37
38
  Body: () => Body,
@@ -115,6 +116,7 @@ __export(src_exports, {
115
116
  sketchColorToHex: () => sketchColorToHex,
116
117
  sketchColorToRgba: () => sketchColorToRgba,
117
118
  sketchColorToRgbaString: () => sketchColorToRgbaString,
119
+ useAutoResize: () => useAutoResize,
118
120
  useCurrentFloatingWindowInternal: () => useCurrentFloatingWindowInternal,
119
121
  useDesignSystemConfiguration: () => useDesignSystemConfiguration,
120
122
  useDesignSystemTheme: () => useDesignSystemTheme,
@@ -452,7 +454,13 @@ var ButtonElement = import_styled_components5.default.button(
452
454
  color: theme.colors.text,
453
455
  boxShadow: "0 1px 2px rgba(0, 0, 0, 0.1)",
454
456
  fontSize: "12px",
455
- padding: "0px 4px"
457
+ padding: "0px 4px",
458
+ "&:hover": {
459
+ opacity: 0.8
460
+ },
461
+ "&:active": {
462
+ opacity: 0.9
463
+ }
456
464
  },
457
465
  display: "flex",
458
466
  alignItems: "center",
@@ -476,7 +484,7 @@ var ButtonContent = import_styled_components5.default.span(({ theme }) => ({
476
484
  var Button = (0, import_react6.forwardRef)(function Button2({
477
485
  id,
478
486
  className,
479
- style: style3,
487
+ style: style2,
480
488
  flex,
481
489
  tabIndex,
482
490
  tooltip,
@@ -497,7 +505,7 @@ var Button = (0, import_react6.forwardRef)(function Button2({
497
505
  ref: forwardedRef,
498
506
  id,
499
507
  className,
500
- style: style3,
508
+ style: style2,
501
509
  $flex: flex,
502
510
  tabIndex,
503
511
  $active: active,
@@ -551,14 +559,14 @@ var IconButton = (0, import_react8.memo)(
551
559
  (0, import_react8.forwardRef)(function IconButton2({ selected, iconName, color, size: size2, contentStyle, ...props }, forwardedRef) {
552
560
  const { icon: iconColor, iconSelected: iconSelectedColor } = (0, import_styled_components6.useTheme)().colors;
553
561
  const Icon = Icons[iconName];
554
- const style3 = (0, import_react8.useMemo)(() => {
562
+ const style2 = (0, import_react8.useMemo)(() => {
555
563
  return {
556
564
  padding: "0 2px",
557
565
  ...size2 && { minHeight: size2 },
558
566
  ...contentStyle
559
567
  };
560
568
  }, [contentStyle, size2]);
561
- return /* @__PURE__ */ import_react8.default.createElement(Button, { ref: forwardedRef, ...props, variant: "none", contentStyle: style3 }, /* @__PURE__ */ import_react8.default.createElement(
569
+ return /* @__PURE__ */ import_react8.default.createElement(Button, { ref: forwardedRef, ...props, variant: "none", contentStyle: style2 }, /* @__PURE__ */ import_react8.default.createElement(
562
570
  Icon,
563
571
  {
564
572
  color: color ?? (selected ? iconSelectedColor : iconColor),
@@ -661,26 +669,29 @@ var mediaQuery = {
661
669
  var name = "light";
662
670
  var colors = {
663
671
  logo: {
664
- fill: "rgb(175,175,175)",
665
- highlight: "rgb(175,175,175)"
672
+ fill: "rgb(150, 152, 172)",
673
+ highlight: "rgb(150, 152, 172)"
666
674
  },
675
+ background: "rgb(255,255,255)",
667
676
  text: "rgb(38, 48, 83)",
668
- textMuted: "rgb(85, 85, 85)",
669
- textSubtle: "rgb(121, 121, 121)",
670
- textDisabled: "rgb(160, 160, 160)",
677
+ textMuted: "rgb(107, 113, 136)",
678
+ textSubtle: "rgb(117, 121, 129)",
679
+ textDisabled: "rgb(150, 152, 172)",
671
680
  textDecorativeLight: "rgb(168, 185, 212)",
672
- dividerSubtle: "rgba(0, 0, 0, 0.04)",
673
- divider: "rgba(0, 0, 0, 0.07)",
674
- dividerStrong: "rgba(0, 0, 0, 0.09)",
675
- primary: "rgb(132, 63, 255)",
681
+ dividerSubtle: "rgba(30, 50, 100, 0.04)",
682
+ divider: "rgba(30, 50, 100, 0.07)",
683
+ dividerStrong: "rgba(30, 50, 100, 0.09)",
684
+ primary: "rgb(103, 70, 255)",
676
685
  primaryLight: "rgb(147, 86, 255)",
686
+ primaryPastel: "rgba(234, 230, 255)",
677
687
  secondary: "rgb(0, 151, 117)",
678
688
  secondaryLight: "rgb(0, 160, 129)",
689
+ secondaryPastel: "rgb(205, 238, 231)",
679
690
  secondaryBright: "#0ab557",
680
691
  warning: "rgb(251, 211, 0)",
681
692
  neutralBackground: "rgb(222,223,232)",
682
- inputBackground: "rgb(240, 240, 242)",
683
- inputBackgroundLight: "rgb(243, 243, 245)",
693
+ inputBackground: "rgb(240, 242, 246)",
694
+ inputBackgroundLight: "rgb(243, 245, 249)",
684
695
  codeBackground: "rgb(250, 250, 250)",
685
696
  codeBackgroundLight: "rgb(250, 250, 250)",
686
697
  get codeBackgroundDark() {
@@ -708,6 +719,7 @@ var colors = {
708
719
  editingBackground: "#fff"
709
720
  },
710
721
  canvas: {
722
+ // background: "white",
711
723
  background: "rgb(249,249,249)",
712
724
  get selectionStroke() {
713
725
  return colors.primary;
@@ -718,8 +730,8 @@ var colors = {
718
730
  grid: "rgba(0,0,0,0.05)"
719
731
  },
720
732
  sidebar: {
721
- background: "rgb(252,252,252)",
722
- backgroundTransparent: "rgba(252,252,252,0.85)"
733
+ background: "rgb(255,255,255)",
734
+ backgroundTransparent: "rgba(255,255,255,0.85)"
723
735
  },
724
736
  popover: {
725
737
  background: "rgb(252,252,252)",
@@ -732,7 +744,7 @@ var colors = {
732
744
  radioGroup: {
733
745
  background: "white"
734
746
  },
735
- icon: "rgb(139, 139, 139)",
747
+ icon: "rgb(129, 131, 165)",
736
748
  iconSelected: "rgb(220, 220, 220)",
737
749
  mask: "rgb(12,193,67)",
738
750
  imageOverlay: "linear-gradient(0deg, rgba(132, 63, 255,0.55), rgba(132, 63, 255,0.55))",
@@ -772,41 +784,41 @@ var textStyles = {
772
784
  heading1: {
773
785
  fontFamily: fonts.normal,
774
786
  fontSize: `${typeScale[2]}rem`,
775
- fontWeight: 500,
776
- lineHeight: "1.75",
787
+ fontWeight: 600,
788
+ lineHeight: "1.6",
777
789
  letterSpacing: "-0.025em"
778
790
  },
779
791
  heading2: {
780
792
  fontFamily: fonts.normal,
781
793
  fontSize: `${typeScale[3]}rem`,
782
794
  fontWeight: 500,
783
- lineHeight: "1.75",
795
+ lineHeight: "1.5",
784
796
  letterSpacing: "-0.025em"
785
797
  },
786
798
  heading3: {
787
799
  fontFamily: fonts.normal,
788
800
  fontSize: `${typeScale[4]}rem`,
789
- fontWeight: 500,
790
- lineHeight: "1.75",
801
+ fontWeight: 400,
802
+ lineHeight: "1.4",
791
803
  letterSpacing: "-0.025em"
792
804
  },
793
805
  heading4: {
794
806
  fontFamily: fonts.normal,
795
807
  fontSize: `${typeScale[5]}rem`,
796
808
  fontWeight: 500,
797
- lineHeight: "1.75"
809
+ lineHeight: "1.4"
798
810
  },
799
811
  heading5: {
800
812
  fontFamily: fonts.normal,
801
813
  fontSize: `${typeScale[6]}rem`,
802
814
  fontWeight: 500,
803
- lineHeight: "1.75"
815
+ lineHeight: "1.4"
804
816
  },
805
817
  body: {
806
818
  fontFamily: fonts.normal,
807
819
  fontSize: `${typeScale[5]}rem`,
808
820
  fontWeight: 400,
809
- lineHeight: "1.75"
821
+ lineHeight: "1.4"
810
822
  },
811
823
  small: {
812
824
  fontFamily: fonts.normal,
@@ -989,7 +1001,7 @@ var Dialog = (0, import_react11.forwardRef)(function Dialog2({
989
1001
  title,
990
1002
  description,
991
1003
  open,
992
- style: style3,
1004
+ style: style2,
993
1005
  onOpenChange,
994
1006
  onOpenAutoFocus,
995
1007
  closeOnInteractOutside = true
@@ -1007,7 +1019,7 @@ var Dialog = (0, import_react11.forwardRef)(function Dialog2({
1007
1019
  {
1008
1020
  ref: contentRef,
1009
1021
  onOpenAutoFocus,
1010
- style: style3,
1022
+ style: style2,
1011
1023
  ...closeOnInteractOutside === false && {
1012
1024
  onPointerDownOutside: (event) => {
1013
1025
  event.preventDefault();
@@ -1023,7 +1035,7 @@ var Dialog = (0, import_react11.forwardRef)(function Dialog2({
1023
1035
  children
1024
1036
  ));
1025
1037
  });
1026
- var FullscreenDialog = (0, import_react11.forwardRef)(function FullscreenDialog2({ style: style3, ...rest }, forwardedRef) {
1038
+ var FullscreenDialog = (0, import_react11.forwardRef)(function FullscreenDialog2({ style: style2, ...rest }, forwardedRef) {
1027
1039
  return /* @__PURE__ */ import_react11.default.createElement(
1028
1040
  Dialog,
1029
1041
  {
@@ -1039,7 +1051,7 @@ var FullscreenDialog = (0, import_react11.forwardRef)(function FullscreenDialog2
1039
1051
  display: "flex",
1040
1052
  flexDirection: "column",
1041
1053
  padding: 0,
1042
- ...style3
1054
+ ...style2
1043
1055
  },
1044
1056
  ...rest
1045
1057
  }
@@ -1126,26 +1138,43 @@ var import_react14 = __toESM(require("react"));
1126
1138
 
1127
1139
  // ../noya-react-utils/src/hooks/useFileDropTarget.ts
1128
1140
  var import_react13 = require("react");
1129
- function useFileDropTarget(dropEvent) {
1141
+ function useFileDropTarget(ref, dropEvent) {
1130
1142
  const [isDropTargetActive, setIsDropTargetActive] = (0, import_react13.useState)(false);
1131
- const handleDragEvent = (0, import_react13.useCallback)((event, on) => {
1132
- if (on !== void 0)
1133
- setIsDropTargetActive(on);
1143
+ const handleDragOver = (0, import_react13.useCallback)((event) => {
1134
1144
  event.preventDefault();
1135
1145
  }, []);
1136
- const handleDropEvent = (0, import_react13.useCallback)(
1146
+ const handleDragEnter = (0, import_react13.useCallback)(
1147
+ (event) => {
1148
+ event.preventDefault();
1149
+ if (!ref.current?.contains(event.relatedTarget)) {
1150
+ setIsDropTargetActive(true);
1151
+ }
1152
+ },
1153
+ [ref]
1154
+ );
1155
+ const handleDragLeave = (0, import_react13.useCallback)(
1137
1156
  (event) => {
1157
+ event.preventDefault();
1158
+ if (!ref.current?.contains(event.relatedTarget)) {
1159
+ setIsDropTargetActive(false);
1160
+ }
1161
+ },
1162
+ [ref]
1163
+ );
1164
+ const handleDrop = (0, import_react13.useCallback)(
1165
+ (event) => {
1166
+ event.preventDefault();
1138
1167
  dropEvent(event);
1139
1168
  setIsDropTargetActive(false);
1140
1169
  },
1141
- [dropEvent, setIsDropTargetActive]
1170
+ [dropEvent]
1142
1171
  );
1143
1172
  return {
1144
1173
  dropTargetProps: {
1145
- onDragOver: handleDragEvent,
1146
- onDragEnter: (event) => handleDragEvent(event, true),
1147
- onDragLeave: (event) => handleDragEvent(event, false),
1148
- onDrop: handleDropEvent
1174
+ onDragOver: handleDragOver,
1175
+ onDragEnter: handleDragEnter,
1176
+ onDragLeave: handleDragLeave,
1177
+ onDrop: handleDrop
1149
1178
  },
1150
1179
  isDropTargetActive
1151
1180
  };
@@ -1155,12 +1184,13 @@ function useFileDropTarget(dropEvent) {
1155
1184
  function isSupportedFile(file, supportedFileTypes) {
1156
1185
  return supportedFileTypes.includes(file.type) || file.type === "" && file.name.endsWith(".sketch");
1157
1186
  }
1158
- var style2 = { display: "flex", flex: 1 };
1159
1187
  var FileDropTarget = (0, import_react14.memo)(function FileDropTarget2({
1160
1188
  children,
1161
1189
  onDropFiles,
1162
- supportedFileTypes
1190
+ supportedFileTypes,
1191
+ ...props
1163
1192
  }) {
1193
+ const ref = (0, import_react14.useRef)(null);
1164
1194
  const handleFile = (0, import_react14.useCallback)(
1165
1195
  (event) => {
1166
1196
  event.preventDefault();
@@ -1193,8 +1223,11 @@ var FileDropTarget = (0, import_react14.memo)(function FileDropTarget2({
1193
1223
  },
1194
1224
  [onDropFiles, supportedFileTypes]
1195
1225
  );
1196
- const { dropTargetProps, isDropTargetActive } = useFileDropTarget(handleFile);
1197
- return /* @__PURE__ */ import_react14.default.createElement("div", { style: style2, ...dropTargetProps }, typeof children === "function" ? children(isDropTargetActive) : children);
1226
+ const { dropTargetProps, isDropTargetActive } = useFileDropTarget(
1227
+ ref,
1228
+ handleFile
1229
+ );
1230
+ return /* @__PURE__ */ import_react14.default.createElement("div", { ref, ...dropTargetProps, ...props }, typeof children === "function" ? children(isDropTargetActive) : children);
1198
1231
  });
1199
1232
 
1200
1233
  // ../noya-react-utils/src/hooks/useDeepArray.ts
@@ -1919,7 +1952,7 @@ var LabelContainer = import_styled_components13.default.label(({ theme, $labelPo
1919
1952
  }
1920
1953
  }));
1921
1954
  var InputFieldLabel = (0, import_react33.memo)(
1922
- (0, import_react33.forwardRef)(function InputFieldLabel2({ children = false, pointerEvents = "none", style: style3 }, forwardedRef) {
1955
+ (0, import_react33.forwardRef)(function InputFieldLabel2({ children = false, pointerEvents = "none", style: style2 }, forwardedRef) {
1923
1956
  const { labelPosition, hasDropdown, setLabelWidth } = (0, import_react33.useContext)(InputFieldContext);
1924
1957
  const ref = (0, import_react33.useRef)(null);
1925
1958
  (0, import_react33.useLayoutEffect)(() => {
@@ -1940,7 +1973,7 @@ var InputFieldLabel = (0, import_react33.memo)(
1940
1973
  pointerEvents,
1941
1974
  $labelPosition: labelPosition,
1942
1975
  $hasDropdown: hasDropdown,
1943
- style: style3
1976
+ style: style2
1944
1977
  },
1945
1978
  children
1946
1979
  );
@@ -2108,34 +2141,34 @@ var InputFieldTypeahead = (props) => {
2108
2141
  labelSize,
2109
2142
  hasDropdown,
2110
2143
  hasLabel,
2111
- size: size2,
2112
- onFocusChange
2144
+ size: size2
2145
+ // onFocusChange,
2113
2146
  } = (0, import_react33.useContext)(InputFieldContext);
2114
2147
  return /* @__PURE__ */ import_react33.default.createElement(
2115
2148
  InputElement,
2116
2149
  {
2150
+ as: "span",
2117
2151
  $labelPosition: labelPosition,
2118
2152
  $labelSize: labelSize,
2119
2153
  $hasLabel: hasLabel,
2120
2154
  $hasDropdown: hasDropdown,
2121
2155
  $size: size2,
2122
- onFocusChange,
2123
- readOnly: true,
2124
- placeholder: props.value,
2125
2156
  value: "",
2126
2157
  style: {
2127
2158
  position: "absolute",
2128
- top: -1,
2159
+ top: 0,
2129
2160
  left: 0,
2130
2161
  right: 0,
2131
- bottom: -1,
2162
+ bottom: 0,
2132
2163
  width: "100%",
2133
2164
  height: "100%",
2134
2165
  pointerEvents: "none",
2135
2166
  background: "transparent",
2136
2167
  boxShadow: "none"
2137
2168
  }
2138
- }
2169
+ },
2170
+ /* @__PURE__ */ import_react33.default.createElement("span", { style: { opacity: 0 } }, props.prefix),
2171
+ /* @__PURE__ */ import_react33.default.createElement("span", { style: { opacity: 0.5 } }, props.value.slice(props.prefix.length))
2139
2172
  );
2140
2173
  };
2141
2174
  function parseNumber(value) {
@@ -2223,7 +2256,7 @@ function InputFieldRoot({
2223
2256
  size: size2 = "medium",
2224
2257
  renderPopoverContent,
2225
2258
  onFocusChange,
2226
- style: style3,
2259
+ style: style2,
2227
2260
  className
2228
2261
  }) {
2229
2262
  const childrenArray = import_react33.Children.toArray(children);
@@ -2282,7 +2315,7 @@ function InputFieldRoot({
2282
2315
  id,
2283
2316
  $width: width,
2284
2317
  $flex: flex,
2285
- style: style3,
2318
+ style: style2,
2286
2319
  className
2287
2320
  },
2288
2321
  children
@@ -2679,7 +2712,7 @@ function useHover(props = {}) {
2679
2712
  // src/components/Chip.tsx
2680
2713
  var ChipElement = import_styled_components16.default.span(({ theme, $colorScheme, $size, $variant, $monospace, $isInteractive }) => {
2681
2714
  const color = $colorScheme === "primary" ? theme.colors.primary : $colorScheme === "secondary" ? theme.colors.secondary : theme.colors.text;
2682
- const backgroundColor = $colorScheme === "primary" ? "rgb(238, 229, 255)" : $colorScheme === "secondary" ? "rgb(205, 238, 231)" : $colorScheme === "error" ? "rgb(255, 219, 219)" : theme.colors.inputBackground;
2715
+ const backgroundColor = $colorScheme === "primary" ? theme.colors.primaryPastel : $colorScheme === "secondary" ? theme.colors.secondaryPastel : $colorScheme === "error" ? "rgb(255, 219, 219)" : theme.colors.inputBackground;
2683
2716
  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)";
2684
2717
  return {
2685
2718
  textTransform: "initial",
@@ -2768,7 +2801,7 @@ var Chip = (0, import_react37.memo)(
2768
2801
  deletable,
2769
2802
  addable,
2770
2803
  clickable,
2771
- style: style3,
2804
+ style: style2,
2772
2805
  size: size2 = "large",
2773
2806
  variant = "solid",
2774
2807
  monospace = false,
@@ -2791,7 +2824,7 @@ var Chip = (0, import_react37.memo)(
2791
2824
  ref: forwardedRef,
2792
2825
  $variant: variant,
2793
2826
  $colorScheme: colorScheme,
2794
- style: style3,
2827
+ style: style2,
2795
2828
  onClick: handleClick,
2796
2829
  $size: size2,
2797
2830
  $monospace: monospace,
@@ -3861,11 +3894,11 @@ var FloatingWindow = ({
3861
3894
  ),
3862
3895
  /* @__PURE__ */ import_react45.default.createElement(Divider, null),
3863
3896
  /* @__PURE__ */ import_react45.default.createElement("div", { style: styles2.content }, children),
3864
- Object.entries(resizeHandlePositions).map(([direction, style3]) => /* @__PURE__ */ import_react45.default.createElement(
3897
+ Object.entries(resizeHandlePositions).map(([direction, style2]) => /* @__PURE__ */ import_react45.default.createElement(
3865
3898
  "div",
3866
3899
  {
3867
3900
  key: direction,
3868
- style: { ...styles2.resizeHandle, ...style3 },
3901
+ style: { ...styles2.resizeHandle, ...style2 },
3869
3902
  onMouseDown: handleResizeStart(direction)
3870
3903
  }
3871
3904
  ))
@@ -4202,7 +4235,7 @@ var GridViewItem = (0, import_react48.forwardRef)(function GridViewItem2({
4202
4235
  menuItems,
4203
4236
  onSelectMenuItem,
4204
4237
  onContextMenu,
4205
- style: style3
4238
+ style: style2
4206
4239
  }, forwardedRef) {
4207
4240
  const [hovered, setHovered] = import_react48.default.useState(false);
4208
4241
  const { hoverProps } = useHover({
@@ -4252,7 +4285,7 @@ var GridViewItem = (0, import_react48.forwardRef)(function GridViewItem2({
4252
4285
  onClick: handleClick,
4253
4286
  onDoubleClick,
4254
4287
  onContextMenu,
4255
- style: style3
4288
+ style: style2
4256
4289
  },
4257
4290
  children
4258
4291
  ),
@@ -4800,8 +4833,9 @@ var ListViewRow = (0, import_react50.forwardRef)(function ListViewRow2({
4800
4833
  onSelectMenuItem,
4801
4834
  onMenuOpenChange,
4802
4835
  onKeyDown,
4803
- style: style3,
4804
- dragIndicatorStyle
4836
+ style: style2,
4837
+ dragIndicatorStyle,
4838
+ className
4805
4839
  }, forwardedRef) {
4806
4840
  depth = Math.max(0, depth);
4807
4841
  const {
@@ -4840,9 +4874,9 @@ var ListViewRow = (0, import_react50.forwardRef)(function ListViewRow2({
4840
4874
  // TODO: Where do these offsets actually come from?
4841
4875
  transform: `translate3d(-36px, -6px, 0)`,
4842
4876
  width: `calc(100% + 48px)`,
4843
- ...style3
4844
- } : style3;
4845
- }, [isDragging, style3]);
4877
+ ...style2
4878
+ } : style2;
4879
+ }, [isDragging, style2]);
4846
4880
  const renderContent = ({
4847
4881
  relativeDropPosition,
4848
4882
  ...renderProps
@@ -4877,7 +4911,8 @@ var ListViewRow = (0, import_react50.forwardRef)(function ListViewRow2({
4877
4911
  { onPointerDown: renderProps.onPointerDown },
4878
4912
  { [pressEventName]: handlePress }
4879
4913
  ),
4880
- tabIndex
4914
+ tabIndex,
4915
+ className
4881
4916
  },
4882
4917
  relativeDropPosition && /* @__PURE__ */ import_react50.default.createElement(
4883
4918
  ListViewDragIndicatorElement,
@@ -4923,10 +4958,10 @@ var RenderItemContext = (0, import_react50.createContext)(
4923
4958
  RenderItemContext.displayName = "RenderItemContext";
4924
4959
  var VirtualizedListRow = (0, import_react50.memo)(function VirtualizedListRow2({
4925
4960
  index,
4926
- style: style3
4961
+ style: style2
4927
4962
  }) {
4928
4963
  const renderItem = (0, import_react50.useContext)(RenderItemContext);
4929
- return /* @__PURE__ */ import_react50.default.createElement("div", { key: index, style: style3 }, renderItem(index));
4964
+ return /* @__PURE__ */ import_react50.default.createElement("div", { key: index, style: style2 }, renderItem(index));
4930
4965
  });
4931
4966
  var VirtualizedListInner = (0, import_react50.forwardRef)(function VirtualizedListInner2({
4932
4967
  size: size2,
@@ -5012,7 +5047,7 @@ var RootContainer2 = import_styled_components25.default.div(({ theme, $scrollabl
5012
5047
  var ListViewRootInner = (0, import_react50.forwardRef)(function ListViewRootInner2({
5013
5048
  id,
5014
5049
  className,
5015
- style: style3,
5050
+ style: style2,
5016
5051
  onPress,
5017
5052
  scrollable = false,
5018
5053
  expandable = true,
@@ -5173,7 +5208,7 @@ var ListViewRootInner = (0, import_react50.forwardRef)(function ListViewRootInne
5173
5208
  {
5174
5209
  id,
5175
5210
  className,
5176
- style: style3,
5211
+ style: style2,
5177
5212
  ...{
5178
5213
  [pressEventName]: handleClick
5179
5214
  },
@@ -5279,6 +5314,7 @@ var Text = (0, import_react51.forwardRef)(function Text2({
5279
5314
  tabIndex,
5280
5315
  onClick,
5281
5316
  onKeyDown,
5317
+ style: style2,
5282
5318
  ...rest
5283
5319
  }, forwardedRef) {
5284
5320
  const element = as ?? elements[variant] ?? "span";
@@ -5288,6 +5324,7 @@ var Text = (0, import_react51.forwardRef)(function Text2({
5288
5324
  ref: forwardedRef,
5289
5325
  as: element,
5290
5326
  className,
5327
+ style: style2,
5291
5328
  tabIndex,
5292
5329
  $variant: variant,
5293
5330
  $breakpoints: breakpoints,
@@ -5422,7 +5459,7 @@ var InputFieldWithCompletions = (0, import_react52.memo)(
5422
5459
  onFocus,
5423
5460
  onBlur,
5424
5461
  onDeleteWhenEmpty,
5425
- style: style3,
5462
+ style: style2,
5426
5463
  className,
5427
5464
  children,
5428
5465
  hideChildrenWhenFocused = false,
@@ -5647,7 +5684,7 @@ var InputFieldWithCompletions = (0, import_react52.memo)(
5647
5684
  onBlur: handleBlur,
5648
5685
  onFocusCapture: handleFocus,
5649
5686
  onKeyDown: handleKeyDown,
5650
- style: style3,
5687
+ style: style2,
5651
5688
  className,
5652
5689
  autoCapitalize: "off",
5653
5690
  autoComplete: "off",
@@ -5660,7 +5697,7 @@ var InputFieldWithCompletions = (0, import_react52.memo)(
5660
5697
  "aria-controls": "component-listbox"
5661
5698
  }
5662
5699
  ),
5663
- filter && typeaheadValue && typeaheadValue.startsWith(filter) && /* @__PURE__ */ import_react52.default.createElement(InputField.Typeahead, { value: typeaheadValue }),
5700
+ filter && typeaheadValue && typeaheadValue.toLowerCase().startsWith(filter.toLowerCase()) && /* @__PURE__ */ import_react52.default.createElement(InputField.Typeahead, { value: typeaheadValue, prefix: filter }),
5664
5701
  (!isFocused || !hideChildrenWhenFocused) && children,
5665
5702
  loading && isFocused && /* @__PURE__ */ import_react52.default.createElement(InputField.Label, null, /* @__PURE__ */ import_react52.default.createElement(ActivityIndicator, null))
5666
5703
  );
@@ -5693,7 +5730,7 @@ var InspectorContainer = (0, import_react53.memo)(
5693
5730
  showDividers,
5694
5731
  id,
5695
5732
  className,
5696
- style: style3
5733
+ style: style2
5697
5734
  }, forwardedRef) {
5698
5735
  const theme = useDesignSystemTheme();
5699
5736
  return /* @__PURE__ */ import_react53.default.createElement(
@@ -5707,7 +5744,7 @@ var InspectorContainer = (0, import_react53.memo)(
5707
5744
  flexDirection: "column",
5708
5745
  position: "relative",
5709
5746
  background: theme.colors.sidebar.background,
5710
- ...style3
5747
+ ...style2
5711
5748
  }
5712
5749
  },
5713
5750
  header,
@@ -6151,9 +6188,12 @@ var readOnlyStyle = {
6151
6188
  justifyContent: "flex-start",
6152
6189
  textAlign: "left"
6153
6190
  };
6191
+ var flexStyle = {
6192
+ flex: 1
6193
+ };
6154
6194
  var SelectMenu = (0, import_react59.memo)(function SelectMenu2({
6155
6195
  id,
6156
- style: style3,
6196
+ style: style2,
6157
6197
  className,
6158
6198
  menuItems,
6159
6199
  value,
@@ -6171,16 +6211,16 @@ var SelectMenu = (0, import_react59.memo)(function SelectMenu2({
6171
6211
  Button,
6172
6212
  {
6173
6213
  id,
6174
- style: style3,
6214
+ style: style2,
6175
6215
  contentStyle: readOnlyStyle,
6176
6216
  className,
6177
6217
  disabled
6178
6218
  },
6179
- icon && /* @__PURE__ */ import_react59.default.createElement(import_react59.default.Fragment, null, renderIcon(icon), /* @__PURE__ */ import_react59.default.createElement(Spacer.Horizontal, { size: 8 })),
6180
- selectedItem?.title ?? value
6219
+ icon && /* @__PURE__ */ import_react59.default.createElement(import_react59.default.Fragment, null, renderIcon(icon), /* @__PURE__ */ import_react59.default.createElement(Spacer.Horizontal, { inline: true, size: 6 })),
6220
+ /* @__PURE__ */ import_react59.default.createElement("span", { style: flexStyle }, selectedItem?.title ?? value)
6181
6221
  );
6182
6222
  }
6183
- return /* @__PURE__ */ import_react59.default.createElement(Select3.Root, { value, onValueChange: onSelect }, /* @__PURE__ */ import_react59.default.createElement(Select3.SelectTrigger, { asChild: true }, /* @__PURE__ */ import_react59.default.createElement(Button, { id, style: style3, className, disabled }, icon && /* @__PURE__ */ import_react59.default.createElement(import_react59.default.Fragment, null, renderIcon(icon), /* @__PURE__ */ import_react59.default.createElement(Spacer.Horizontal, { size: 8 })), /* @__PURE__ */ import_react59.default.createElement(Select3.Value, { placeholder }), /* @__PURE__ */ import_react59.default.createElement(Spacer.Horizontal, null), /* @__PURE__ */ import_react59.default.createElement(import_noya_icons6.DropdownChevronIcon, null))), /* @__PURE__ */ import_react59.default.createElement(Select3.Portal, null, /* @__PURE__ */ import_react59.default.createElement(SelectContent, null, /* @__PURE__ */ import_react59.default.createElement(SelectViewport, null, menuItems.map((menuItem) => {
6223
+ return /* @__PURE__ */ import_react59.default.createElement(Select3.Root, { value, onValueChange: onSelect }, /* @__PURE__ */ import_react59.default.createElement(Select3.SelectTrigger, { asChild: true }, /* @__PURE__ */ import_react59.default.createElement(Button, { id, style: style2, className, disabled }, icon && /* @__PURE__ */ import_react59.default.createElement(import_react59.default.Fragment, null, renderIcon(icon), /* @__PURE__ */ import_react59.default.createElement(Spacer.Horizontal, { inline: true, size: 6 })), /* @__PURE__ */ import_react59.default.createElement("span", { style: flexStyle }, /* @__PURE__ */ import_react59.default.createElement(Select3.Value, { placeholder })), /* @__PURE__ */ import_react59.default.createElement(Spacer.Horizontal, { inline: true, size: 6 }), /* @__PURE__ */ import_react59.default.createElement(import_noya_icons6.DropdownChevronIcon, null))), /* @__PURE__ */ import_react59.default.createElement(Select3.Portal, null, /* @__PURE__ */ import_react59.default.createElement(SelectContent, null, /* @__PURE__ */ import_react59.default.createElement(SelectViewport, null, menuItems.map((menuItem) => {
6184
6224
  if (typeof menuItem === "string") {
6185
6225
  return /* @__PURE__ */ import_react59.default.createElement(StyledSeparator, null);
6186
6226
  }
@@ -6321,58 +6361,124 @@ var Switch = function Switch2({
6321
6361
  );
6322
6362
  };
6323
6363
 
6324
- // src/components/TreeView.tsx
6364
+ // src/components/TextArea.tsx
6325
6365
  var import_react62 = __toESM(require("react"));
6326
- var TreeRow = (0, import_react62.forwardRef)(function TreeRow2({
6366
+ var import_styled_components36 = __toESM(require("styled-components"));
6367
+ var TextAreaElement = import_styled_components36.default.textarea(({ theme }) => ({
6368
+ ...theme.textStyles.small,
6369
+ color: theme.colors.text,
6370
+ background: theme.colors.inputBackground,
6371
+ width: "0px",
6372
+ flex: "1 1 auto",
6373
+ padding: "4px 6px",
6374
+ border: "none",
6375
+ outline: "none",
6376
+ height: 100,
6377
+ borderRadius: "4px",
6378
+ "&::placeholder": {
6379
+ color: theme.colors.textDisabled
6380
+ },
6381
+ "&:focus": {
6382
+ boxShadow: `0 0 0 2px ${theme.colors.primary}`
6383
+ },
6384
+ // readonly
6385
+ "&:read-only": {
6386
+ color: theme.colors.textDisabled
6387
+ },
6388
+ resize: "none"
6389
+ }));
6390
+ var useAutoResize = (value) => {
6391
+ const textareaRef = (0, import_react62.useRef)(null);
6392
+ (0, import_react62.useEffect)(() => {
6393
+ if (!textareaRef.current)
6394
+ return;
6395
+ textareaRef.current.style.height = "auto";
6396
+ textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`;
6397
+ }, [value]);
6398
+ return textareaRef;
6399
+ };
6400
+ var AutoResizingTextArea = (0, import_react62.memo)(
6401
+ (0, import_react62.forwardRef)(function AutoResizingTextArea2({
6402
+ value,
6403
+ onChangeText,
6404
+ ...rest
6405
+ }, forwardedRef) {
6406
+ const ref = useAutoResize(value || rest.placeholder || "");
6407
+ const handleChange = (0, import_react62.useCallback)(
6408
+ (event) => onChangeText(event.target.value),
6409
+ [onChangeText]
6410
+ );
6411
+ const handleRef = (0, import_react62.useCallback)(
6412
+ (value2) => {
6413
+ ref.current = value2;
6414
+ assignRef(forwardedRef, value2);
6415
+ },
6416
+ [ref, forwardedRef]
6417
+ );
6418
+ return /* @__PURE__ */ import_react62.default.createElement(
6419
+ TextAreaElement,
6420
+ {
6421
+ ref: handleRef,
6422
+ ...rest,
6423
+ onChange: handleChange,
6424
+ value
6425
+ }
6426
+ );
6427
+ })
6428
+ );
6429
+
6430
+ // src/components/TreeView.tsx
6431
+ var import_react63 = __toESM(require("react"));
6432
+ var TreeRow = (0, import_react63.forwardRef)(function TreeRow2({
6327
6433
  icon,
6328
6434
  expanded,
6329
6435
  onClickChevron,
6330
6436
  children,
6331
6437
  ...rest
6332
6438
  }, forwardedRef) {
6333
- const { expandable } = (0, import_react62.useContext)(ListView.RowContext);
6334
- const handleClickChevron = (0, import_react62.useCallback)(
6439
+ const { expandable } = (0, import_react63.useContext)(ListView.RowContext);
6440
+ const handleClickChevron = (0, import_react63.useCallback)(
6335
6441
  (event) => {
6336
6442
  event.stopPropagation();
6337
6443
  onClickChevron?.({ altKey: event.altKey });
6338
6444
  },
6339
6445
  [onClickChevron]
6340
6446
  );
6341
- return /* @__PURE__ */ import_react62.default.createElement(ListView.Row, { ref: forwardedRef, ...rest }, expandable && /* @__PURE__ */ import_react62.default.createElement(import_react62.default.Fragment, null, expanded === void 0 ? /* @__PURE__ */ import_react62.default.createElement(Spacer.Horizontal, { size: 19 }) : /* @__PURE__ */ import_react62.default.createElement(
6447
+ return /* @__PURE__ */ import_react63.default.createElement(ListView.Row, { ref: forwardedRef, ...rest }, expandable && /* @__PURE__ */ import_react63.default.createElement(import_react63.default.Fragment, null, expanded === void 0 ? /* @__PURE__ */ import_react63.default.createElement(Spacer.Horizontal, { size: 19 }) : /* @__PURE__ */ import_react63.default.createElement(
6342
6448
  IconButton,
6343
6449
  {
6344
6450
  iconName: expanded ? "ChevronDownIcon2" : "ChevronRightIcon2",
6345
6451
  onClick: handleClickChevron,
6346
6452
  selected: rest.selected
6347
6453
  }
6348
- ), /* @__PURE__ */ import_react62.default.createElement(Spacer.Horizontal, { size: 6 })), icon && /* @__PURE__ */ import_react62.default.createElement(import_react62.default.Fragment, null, renderIcon(icon), /* @__PURE__ */ import_react62.default.createElement(Spacer.Horizontal, { size: 10 })), children);
6454
+ ), /* @__PURE__ */ import_react63.default.createElement(Spacer.Horizontal, { size: 6 })), icon && /* @__PURE__ */ import_react63.default.createElement(import_react63.default.Fragment, null, renderIcon(icon), /* @__PURE__ */ import_react63.default.createElement(Spacer.Horizontal, { size: 10 })), children);
6349
6455
  });
6350
6456
  var TreeView;
6351
6457
  ((TreeView2) => {
6352
6458
  TreeView2.Root = ListView.Root;
6353
6459
  TreeView2.RowTitle = ListView.RowTitle;
6354
6460
  TreeView2.EditableRowTitle = ListView.EditableRowTitle;
6355
- TreeView2.Row = (0, import_react62.memo)(TreeRow);
6461
+ TreeView2.Row = (0, import_react63.memo)(TreeRow);
6356
6462
  })(TreeView || (TreeView = {}));
6357
6463
 
6358
6464
  // src/components/WorkspaceLayout.tsx
6359
6465
  var import_noya_keymap5 = require("@noya-app/noya-keymap");
6360
- var import_react65 = __toESM(require("react"));
6466
+ var import_react66 = __toESM(require("react"));
6361
6467
  var import_react_resizable_panels = require("react-resizable-panels");
6362
6468
 
6363
6469
  // src/hooks/usePreservePanelSize.tsx
6364
- var import_react64 = require("react");
6470
+ var import_react65 = require("react");
6365
6471
 
6366
6472
  // src/hooks/useWindowSize.tsx
6367
- var import_react63 = require("react");
6473
+ var import_react64 = require("react");
6368
6474
  function useWindowSize() {
6369
- const [size2, setSize] = (0, import_react63.useState)(
6475
+ const [size2, setSize] = (0, import_react64.useState)(
6370
6476
  typeof window === "undefined" ? { width: 0, height: 0 } : {
6371
6477
  width: window.innerWidth,
6372
6478
  height: window.innerHeight
6373
6479
  }
6374
6480
  );
6375
- (0, import_react63.useEffect)(() => {
6481
+ (0, import_react64.useEffect)(() => {
6376
6482
  const handleResize = () => setSize({
6377
6483
  width: window.innerWidth,
6378
6484
  height: window.innerHeight
@@ -6390,8 +6496,8 @@ var RIGHT_SIDEBAR_ID = "editor-right-sidebar";
6390
6496
  var CONTENT_AREA_ID = "editor-content-area";
6391
6497
  function usePreservePanelSize(panelGroupRef, setPanelLayoutState) {
6392
6498
  const windowSize = useWindowSize();
6393
- const layoutRef = (0, import_react64.useRef)();
6394
- (0, import_react64.useLayoutEffect)(() => {
6499
+ const layoutRef = (0, import_react65.useRef)();
6500
+ (0, import_react65.useLayoutEffect)(() => {
6395
6501
  const panelGroup = document.querySelector(
6396
6502
  `[data-panel-group-id="${EDITOR_PANEL_GROUP_ID}"]`
6397
6503
  );
@@ -6434,7 +6540,7 @@ function usePreservePanelSize(panelGroupRef, setPanelLayoutState) {
6434
6540
  panelGroupObserver.disconnect();
6435
6541
  };
6436
6542
  }, [panelGroupRef, setPanelLayoutState]);
6437
- (0, import_react64.useLayoutEffect)(() => {
6543
+ (0, import_react65.useLayoutEffect)(() => {
6438
6544
  if (!layoutRef.current)
6439
6545
  return;
6440
6546
  const {
@@ -6494,7 +6600,7 @@ function usePreservePanelSize(panelGroupRef, setPanelLayoutState) {
6494
6600
  }
6495
6601
 
6496
6602
  // src/components/WorkspaceLayout.tsx
6497
- var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6603
+ var WorkspaceLayout = (0, import_react66.forwardRef)(function WorkspaceLayout2({
6498
6604
  autoSavePrefix,
6499
6605
  leftSidebarContent: leftPanelContent,
6500
6606
  children: centerPanelContent,
@@ -6509,7 +6615,7 @@ var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6509
6615
  leftSidebarCanResize = false,
6510
6616
  id,
6511
6617
  className,
6512
- style: style3
6618
+ style: style2
6513
6619
  }, forwardedRef) {
6514
6620
  const windowSize = useWindowSize();
6515
6621
  function getPercentage(size2) {
@@ -6519,12 +6625,12 @@ var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6519
6625
  const rightSidebarPercentage = getPercentage(rightSidebarInitialSize);
6520
6626
  const leftSidebarMinPercentage = leftSidebarMinSize !== void 0 ? getPercentage(leftSidebarMinSize) : void 0;
6521
6627
  const rightSidebarMinPercentage = rightSidebarMinSize !== void 0 ? getPercentage(rightSidebarMinSize) : void 0;
6522
- const panelGroupRef = (0, import_react65.useRef)(null);
6523
- const leftSidebarRef = (0, import_react65.useRef)(null);
6524
- const rightSidebarRef = (0, import_react65.useRef)(null);
6628
+ const panelGroupRef = (0, import_react66.useRef)(null);
6629
+ const leftSidebarRef = (0, import_react66.useRef)(null);
6630
+ const rightSidebarRef = (0, import_react66.useRef)(null);
6525
6631
  usePreservePanelSize(panelGroupRef, onChangeLayoutState);
6526
6632
  const theme = useDesignSystemTheme();
6527
- (0, import_react65.useImperativeHandle)(forwardedRef, () => ({
6633
+ (0, import_react66.useImperativeHandle)(forwardedRef, () => ({
6528
6634
  setLeftSidebarExpanded: (expanded) => {
6529
6635
  if (expanded) {
6530
6636
  leftSidebarRef.current?.expand();
@@ -6581,7 +6687,7 @@ var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6581
6687
  }
6582
6688
  });
6583
6689
  const centerPanelPercentage = 100 - (leftPanelContent ? leftSidebarPercentage : 0) - (rightPanelContent ? rightSidebarPercentage : 0);
6584
- return /* @__PURE__ */ import_react65.default.createElement(
6690
+ return /* @__PURE__ */ import_react66.default.createElement(
6585
6691
  "div",
6586
6692
  {
6587
6693
  id,
@@ -6590,10 +6696,10 @@ var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6590
6696
  backgroundColor: theme.colors.canvas.background,
6591
6697
  display: "flex",
6592
6698
  flexDirection: "row",
6593
- ...style3
6699
+ ...style2
6594
6700
  }
6595
6701
  },
6596
- /* @__PURE__ */ import_react65.default.createElement(
6702
+ /* @__PURE__ */ import_react66.default.createElement(
6597
6703
  import_react_resizable_panels.PanelGroup,
6598
6704
  {
6599
6705
  ref: panelGroupRef,
@@ -6602,7 +6708,7 @@ var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6602
6708
  autoSaveId: autoSavePrefix ? `${autoSavePrefix}--${EDITOR_PANEL_GROUP_ID}` : void 0,
6603
6709
  style: { flex: "1" }
6604
6710
  },
6605
- hasLeftSidebar && /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement(
6711
+ hasLeftSidebar && /* @__PURE__ */ import_react66.default.createElement(import_react66.default.Fragment, null, /* @__PURE__ */ import_react66.default.createElement(
6606
6712
  import_react_resizable_panels.Panel,
6607
6713
  {
6608
6714
  id: LEFT_SIDEBAR_ID,
@@ -6619,7 +6725,7 @@ var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6619
6725
  }
6620
6726
  },
6621
6727
  leftPanelContent
6622
- ), /* @__PURE__ */ import_react65.default.createElement(
6728
+ ), /* @__PURE__ */ import_react66.default.createElement(
6623
6729
  import_react_resizable_panels.PanelResizeHandle,
6624
6730
  {
6625
6731
  style: {
@@ -6630,7 +6736,7 @@ var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6630
6736
  }
6631
6737
  }
6632
6738
  )),
6633
- /* @__PURE__ */ import_react65.default.createElement(
6739
+ /* @__PURE__ */ import_react66.default.createElement(
6634
6740
  import_react_resizable_panels.Panel,
6635
6741
  {
6636
6742
  id: CONTENT_AREA_ID,
@@ -6645,7 +6751,7 @@ var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6645
6751
  },
6646
6752
  centerPanelContent
6647
6753
  ),
6648
- hasRightSidebar && /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement(
6754
+ hasRightSidebar && /* @__PURE__ */ import_react66.default.createElement(import_react66.default.Fragment, null, /* @__PURE__ */ import_react66.default.createElement(
6649
6755
  import_react_resizable_panels.PanelResizeHandle,
6650
6756
  {
6651
6757
  style: {
@@ -6655,7 +6761,7 @@ var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6655
6761
  backgroundColor: theme.colors.divider
6656
6762
  }
6657
6763
  }
6658
- ), /* @__PURE__ */ import_react65.default.createElement(
6764
+ ), /* @__PURE__ */ import_react66.default.createElement(
6659
6765
  import_react_resizable_panels.Panel,
6660
6766
  {
6661
6767
  id: RIGHT_SIDEBAR_ID,
@@ -6718,8 +6824,8 @@ var SUPPORTED_CANVAS_UPLOAD_TYPES = [
6718
6824
 
6719
6825
  // src/components/ArrayController.tsx
6720
6826
  var import_noya_utils11 = require("@noya-app/noya-utils");
6721
- var import_react67 = __toESM(require("react"));
6722
- var import_styled_components37 = __toESM(require("styled-components"));
6827
+ var import_react68 = __toESM(require("react"));
6828
+ var import_styled_components38 = __toESM(require("styled-components"));
6723
6829
 
6724
6830
  // src/components/InspectorPrimitives.tsx
6725
6831
  var InspectorPrimitives_exports = {};
@@ -6737,20 +6843,20 @@ __export(InspectorPrimitives_exports, {
6737
6843
  Title: () => Title3,
6738
6844
  VerticalSeparator: () => VerticalSeparator
6739
6845
  });
6740
- var import_react66 = __toESM(require("react"));
6741
- var import_styled_components36 = __toESM(require("styled-components"));
6742
- var Section = import_styled_components36.default.div(({ theme, $padding = "10px", $gap }) => ({
6846
+ var import_react67 = __toESM(require("react"));
6847
+ var import_styled_components37 = __toESM(require("styled-components"));
6848
+ var Section = import_styled_components37.default.div(({ theme, $padding = "10px", $gap }) => ({
6743
6849
  flex: "0 0 auto",
6744
6850
  display: "flex",
6745
6851
  flexDirection: "column",
6746
6852
  padding: $padding,
6747
6853
  gap: $gap
6748
6854
  }));
6749
- var SectionHeader = import_styled_components36.default.div(({ theme }) => ({
6855
+ var SectionHeader = import_styled_components37.default.div(({ theme }) => ({
6750
6856
  display: "flex",
6751
6857
  alignItems: "center"
6752
6858
  }));
6753
- var Title3 = import_styled_components36.default.div(({ theme, $textStyle }) => ({
6859
+ var Title3 = import_styled_components37.default.div(({ theme, $textStyle }) => ({
6754
6860
  display: "flex",
6755
6861
  flexDirection: "row",
6756
6862
  userSelect: "none",
@@ -6759,11 +6865,11 @@ var Title3 = import_styled_components36.default.div(({ theme, $textStyle }) => (
6759
6865
  color: theme.colors.text
6760
6866
  } : {
6761
6867
  ...theme.textStyles.label,
6762
- color: theme.colors.textSubtle,
6868
+ color: theme.colors.textMuted,
6763
6869
  fontWeight: "bold"
6764
6870
  }
6765
6871
  }));
6766
- var Row2 = import_styled_components36.default.div(
6872
+ var Row2 = import_styled_components37.default.div(
6767
6873
  ({ theme, $gap }) => ({
6768
6874
  flex: "1",
6769
6875
  display: "flex",
@@ -6772,26 +6878,26 @@ var Row2 = import_styled_components36.default.div(
6772
6878
  gap: $gap
6773
6879
  })
6774
6880
  );
6775
- var Column = import_styled_components36.default.div(({ theme }) => ({
6881
+ var Column = import_styled_components37.default.div(({ theme }) => ({
6776
6882
  flex: "1",
6777
6883
  display: "flex",
6778
6884
  flexDirection: "column",
6779
6885
  gap: "4px"
6780
6886
  }));
6781
- var Checkbox = import_styled_components36.default.input(({ theme }) => ({
6887
+ var Checkbox = import_styled_components37.default.input(({ theme }) => ({
6782
6888
  margin: 0
6783
6889
  }));
6784
- var Text3 = import_styled_components36.default.span(({ theme }) => ({
6890
+ var Text3 = import_styled_components37.default.span(({ theme }) => ({
6785
6891
  ...theme.textStyles.small
6786
6892
  }));
6787
- var VerticalSeparator = () => /* @__PURE__ */ import_react66.default.createElement(Spacer.Vertical, { size: (0, import_styled_components36.useTheme)().sizes.inspector.verticalSeparator });
6788
- var HorizontalSeparator = () => /* @__PURE__ */ import_react66.default.createElement(Spacer.Horizontal, { size: (0, import_styled_components36.useTheme)().sizes.inspector.horizontalSeparator });
6789
- var SliderRowLabel = import_styled_components36.default.span(({ theme }) => ({
6893
+ var VerticalSeparator = () => /* @__PURE__ */ import_react67.default.createElement(Spacer.Vertical, { size: (0, import_styled_components37.useTheme)().sizes.inspector.verticalSeparator });
6894
+ var HorizontalSeparator = () => /* @__PURE__ */ import_react67.default.createElement(Spacer.Horizontal, { size: (0, import_styled_components37.useTheme)().sizes.inspector.horizontalSeparator });
6895
+ var SliderRowLabel = import_styled_components37.default.span(({ theme }) => ({
6790
6896
  ...theme.textStyles.small,
6791
6897
  color: theme.colors.textMuted,
6792
6898
  marginBottom: "-6px"
6793
6899
  }));
6794
- var RowLabel = import_styled_components36.default.span(({ theme, $textStyle }) => ({
6900
+ var RowLabel = import_styled_components37.default.span(({ theme, $textStyle }) => ({
6795
6901
  // marginBottom: '6px',
6796
6902
  display: "flex",
6797
6903
  ...$textStyle ? {
@@ -6805,7 +6911,7 @@ var RowLabel = import_styled_components36.default.span(({ theme, $textStyle }) =
6805
6911
  // Button height
6806
6912
  alignItems: "center"
6807
6913
  }));
6808
- var LabeledRow = (0, import_react66.memo)(function LabeledRow2({
6914
+ var LabeledRow = (0, import_react67.memo)(function LabeledRow2({
6809
6915
  id,
6810
6916
  children,
6811
6917
  label,
@@ -6813,26 +6919,26 @@ var LabeledRow = (0, import_react66.memo)(function LabeledRow2({
6813
6919
  gap,
6814
6920
  right
6815
6921
  }) {
6816
- return /* @__PURE__ */ import_react66.default.createElement(Row2, { id }, /* @__PURE__ */ import_react66.default.createElement(Column, null, /* @__PURE__ */ import_react66.default.createElement(RowLabel, { $textStyle: labelTextStyle }, label, right && /* @__PURE__ */ import_react66.default.createElement(Spacer.Horizontal, null), right), /* @__PURE__ */ import_react66.default.createElement(Row2, { $gap: gap }, children)));
6922
+ return /* @__PURE__ */ import_react67.default.createElement(Row2, { id }, /* @__PURE__ */ import_react67.default.createElement(Column, null, /* @__PURE__ */ import_react67.default.createElement(RowLabel, { $textStyle: labelTextStyle }, label, right && /* @__PURE__ */ import_react67.default.createElement(Spacer.Horizontal, null), right), /* @__PURE__ */ import_react67.default.createElement(Row2, { $gap: gap }, children)));
6817
6923
  });
6818
- var LabeledSliderRow = (0, import_react66.memo)(function LabeledRow3({
6924
+ var LabeledSliderRow = (0, import_react67.memo)(function LabeledRow3({
6819
6925
  children,
6820
6926
  label
6821
6927
  }) {
6822
- return /* @__PURE__ */ import_react66.default.createElement(Row2, null, /* @__PURE__ */ import_react66.default.createElement(Column, null, /* @__PURE__ */ import_react66.default.createElement(SliderRowLabel, null, label), /* @__PURE__ */ import_react66.default.createElement(Row2, null, children)));
6928
+ return /* @__PURE__ */ import_react67.default.createElement(Row2, null, /* @__PURE__ */ import_react67.default.createElement(Column, null, /* @__PURE__ */ import_react67.default.createElement(SliderRowLabel, null, label), /* @__PURE__ */ import_react67.default.createElement(Row2, null, children)));
6823
6929
  });
6824
6930
 
6825
6931
  // src/components/ArrayController.tsx
6826
- var ElementRow = import_styled_components37.default.div({
6932
+ var ElementRow = import_styled_components38.default.div({
6827
6933
  flex: "0 0 auto",
6828
6934
  display: "flex",
6829
6935
  flexDirection: "row",
6830
6936
  alignItems: "center"
6831
6937
  });
6832
- var ItemContainer2 = import_styled_components37.default.div({
6938
+ var ItemContainer2 = import_styled_components38.default.div({
6833
6939
  position: "relative"
6834
6940
  });
6835
- var ArrayController = (0, import_react67.memo)(function ArrayController2({
6941
+ var ArrayController = (0, import_react68.memo)(function ArrayController2({
6836
6942
  id,
6837
6943
  items,
6838
6944
  title,
@@ -6848,14 +6954,14 @@ var ArrayController = (0, import_react67.memo)(function ArrayController2({
6848
6954
  renderExpandedContent,
6849
6955
  padding = 10
6850
6956
  }) {
6851
- const iconColor = (0, import_styled_components37.useTheme)().colors.icon;
6852
- const primaryLightColor = (0, import_styled_components37.useTheme)().colors.primaryLight;
6853
- const keys = (0, import_react67.useMemo)(
6957
+ const iconColor = (0, import_styled_components38.useTheme)().colors.icon;
6958
+ const primaryLightColor = (0, import_styled_components38.useTheme)().colors.primaryLight;
6959
+ const keys = (0, import_react68.useMemo)(
6854
6960
  () => items.map((item, index) => getKey?.(item) ?? index.toString()),
6855
6961
  [getKey, items]
6856
6962
  );
6857
6963
  const indexes = reversed ? (0, import_noya_utils11.range)(0, items.length).reverse() : (0, import_noya_utils11.range)(0, items.length);
6858
- const handleMoveItem = (0, import_react67.useCallback)(
6964
+ const handleMoveItem = (0, import_react68.useCallback)(
6859
6965
  (sourceIndex, destinationIndex, position) => {
6860
6966
  if (reversed) {
6861
6967
  if (position === "above") {
@@ -6872,11 +6978,11 @@ var ArrayController = (0, import_react67.memo)(function ArrayController2({
6872
6978
  [onMoveItem, reversed]
6873
6979
  );
6874
6980
  const renderRow = (index) => {
6875
- return /* @__PURE__ */ import_react67.default.createElement(ElementRow, { key: keys[index] }, renderItem({ item: items[index], index }));
6981
+ return /* @__PURE__ */ import_react68.default.createElement(ElementRow, { key: keys[index] }, renderItem({ item: items[index], index }));
6876
6982
  };
6877
- return /* @__PURE__ */ import_react67.default.createElement(Section, { id, $padding: padding, $gap: "2px" }, /* @__PURE__ */ import_react67.default.createElement(SectionHeader, null, /* @__PURE__ */ import_react67.default.createElement(Button, { variant: "none", onClick: onClickPlus }, /* @__PURE__ */ import_react67.default.createElement(Title3, null, title)), /* @__PURE__ */ import_react67.default.createElement(Spacer.Horizontal, null), withSeparatorElements(
6983
+ return /* @__PURE__ */ import_react68.default.createElement(Section, { id, $padding: padding, $gap: "2px" }, /* @__PURE__ */ import_react68.default.createElement(SectionHeader, null, /* @__PURE__ */ import_react68.default.createElement(Button, { variant: "none", onClick: onClickPlus }, /* @__PURE__ */ import_react68.default.createElement(Title3, null, title)), /* @__PURE__ */ import_react68.default.createElement(Spacer.Horizontal, null), withSeparatorElements(
6878
6984
  [
6879
- onClickTrash && /* @__PURE__ */ import_react67.default.createElement(
6985
+ onClickTrash && /* @__PURE__ */ import_react68.default.createElement(
6880
6986
  IconButton,
6881
6987
  {
6882
6988
  id: `${id}-trash`,
@@ -6885,7 +6991,7 @@ var ArrayController = (0, import_react67.memo)(function ArrayController2({
6885
6991
  onClick: onClickTrash
6886
6992
  }
6887
6993
  ),
6888
- onClickExpand && /* @__PURE__ */ import_react67.default.createElement(
6994
+ onClickExpand && /* @__PURE__ */ import_react68.default.createElement(
6889
6995
  IconButton,
6890
6996
  {
6891
6997
  id: `${id}-gear`,
@@ -6894,7 +7000,7 @@ var ArrayController = (0, import_react67.memo)(function ArrayController2({
6894
7000
  onClick: onClickExpand
6895
7001
  }
6896
7002
  ),
6897
- onClickPlus && /* @__PURE__ */ import_react67.default.createElement(
7003
+ onClickPlus && /* @__PURE__ */ import_react68.default.createElement(
6898
7004
  IconButton,
6899
7005
  {
6900
7006
  id: `${id}-add`,
@@ -6904,15 +7010,15 @@ var ArrayController = (0, import_react67.memo)(function ArrayController2({
6904
7010
  }
6905
7011
  )
6906
7012
  ],
6907
- /* @__PURE__ */ import_react67.default.createElement(Spacer.Horizontal, { size: 8 })
6908
- )), /* @__PURE__ */ import_react67.default.createElement(Stack.V, { gap: "4px" }, sortable ? /* @__PURE__ */ import_react67.default.createElement(
7013
+ /* @__PURE__ */ import_react68.default.createElement(Spacer.Horizontal, { size: 8 })
7014
+ )), /* @__PURE__ */ import_react68.default.createElement(Stack.V, { gap: "4px" }, sortable ? /* @__PURE__ */ import_react68.default.createElement(
6909
7015
  Sortable.Root,
6910
7016
  {
6911
7017
  keys,
6912
7018
  renderOverlay: renderRow,
6913
7019
  onMoveItem: handleMoveItem
6914
7020
  },
6915
- indexes.map((index) => /* @__PURE__ */ import_react67.default.createElement(Sortable.Item, { id: keys[index], key: keys[index] }, ({ relativeDropPosition, ...sortableProps }) => /* @__PURE__ */ import_react67.default.createElement(ItemContainer2, { ...sortableProps }, renderRow(index), relativeDropPosition && /* @__PURE__ */ import_react67.default.createElement(
7021
+ indexes.map((index) => /* @__PURE__ */ import_react68.default.createElement(Sortable.Item, { id: keys[index], key: keys[index] }, ({ relativeDropPosition, ...sortableProps }) => /* @__PURE__ */ import_react68.default.createElement(ItemContainer2, { ...sortableProps }, renderRow(index), relativeDropPosition && /* @__PURE__ */ import_react68.default.createElement(
6916
7022
  ListView.DragIndicator,
6917
7023
  {
6918
7024
  $gap: 0,
@@ -6926,11 +7032,11 @@ var ArrayController = (0, import_react67.memo)(function ArrayController2({
6926
7032
 
6927
7033
  // src/components/DimensionInput.tsx
6928
7034
  var import_noya_utils12 = require("@noya-app/noya-utils");
6929
- var import_react68 = __toESM(require("react"));
7035
+ var import_react69 = __toESM(require("react"));
6930
7036
  function getNewValue(value, mode, delta) {
6931
7037
  return delta === void 0 ? value : mode === "replace" ? delta : value + delta;
6932
7038
  }
6933
- var DimensionInput = (0, import_react68.memo)(function DimensionInput2({
7039
+ var DimensionInput = (0, import_react69.memo)(function DimensionInput2({
6934
7040
  id,
6935
7041
  value,
6936
7042
  onSetValue,
@@ -6940,15 +7046,15 @@ var DimensionInput = (0, import_react68.memo)(function DimensionInput2({
6940
7046
  disabled,
6941
7047
  trigger = "submit"
6942
7048
  }) {
6943
- const handleNudgeValue = (0, import_react68.useCallback)(
7049
+ const handleNudgeValue = (0, import_react69.useCallback)(
6944
7050
  (value2) => onSetValue(value2, "adjust"),
6945
7051
  [onSetValue]
6946
7052
  );
6947
- const handleSetValue = (0, import_react68.useCallback)(
7053
+ const handleSetValue = (0, import_react69.useCallback)(
6948
7054
  (value2) => onSetValue(value2, "replace"),
6949
7055
  [onSetValue]
6950
7056
  );
6951
- return /* @__PURE__ */ import_react68.default.createElement(InputField.Root, { id, width: size2 }, /* @__PURE__ */ import_react68.default.createElement(
7057
+ return /* @__PURE__ */ import_react69.default.createElement(InputField.Root, { id, width: size2 }, /* @__PURE__ */ import_react69.default.createElement(
6952
7058
  InputField.NumberInput,
6953
7059
  {
6954
7060
  value: value === void 0 ? value : (0, import_noya_utils12.round)(value, 2),
@@ -6957,12 +7063,13 @@ var DimensionInput = (0, import_react68.memo)(function DimensionInput2({
6957
7063
  disabled,
6958
7064
  ...trigger === "change" ? { onChange: handleSetValue } : { onSubmit: handleSetValue }
6959
7065
  }
6960
- ), label && /* @__PURE__ */ import_react68.default.createElement(InputField.Label, null, label));
7066
+ ), label && /* @__PURE__ */ import_react69.default.createElement(InputField.Label, null, label));
6961
7067
  });
6962
7068
  // Annotate the CommonJS export names for ESM import in node:
6963
7069
  0 && (module.exports = {
6964
7070
  ActivityIndicator,
6965
7071
  ArrayController,
7072
+ AutoResizingTextArea,
6966
7073
  Avatar,
6967
7074
  AvatarStack,
6968
7075
  Body,
@@ -7046,6 +7153,7 @@ var DimensionInput = (0, import_react68.memo)(function DimensionInput2({
7046
7153
  sketchColorToHex,
7047
7154
  sketchColorToRgba,
7048
7155
  sketchColorToRgbaString,
7156
+ useAutoResize,
7049
7157
  useCurrentFloatingWindowInternal,
7050
7158
  useDesignSystemConfiguration,
7051
7159
  useDesignSystemTheme,