@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.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,
@@ -65,6 +66,7 @@ __export(src_exports, {
65
66
  Heading4: () => Heading4,
66
67
  Heading5: () => Heading5,
67
68
  IconButton: () => IconButton,
69
+ Icons: () => Icons,
68
70
  ImageDataProvider: () => ImageDataProvider,
69
71
  InputElement: () => InputElement,
70
72
  InputField: () => InputField,
@@ -110,11 +112,13 @@ __export(src_exports, {
110
112
  lightTheme: () => light_exports,
111
113
  mediaQuery: () => mediaQuery,
112
114
  normalizeListDestinationIndex: () => normalizeListDestinationIndex,
115
+ renderIcon: () => renderIcon,
113
116
  rgbaToSketchColor: () => rgbaToSketchColor,
114
117
  size: () => size,
115
118
  sketchColorToHex: () => sketchColorToHex,
116
119
  sketchColorToRgba: () => sketchColorToRgba,
117
120
  sketchColorToRgbaString: () => sketchColorToRgbaString,
121
+ useAutoResize: () => useAutoResize,
118
122
  useCurrentFloatingWindowInternal: () => useCurrentFloatingWindowInternal,
119
123
  useDesignSystemConfiguration: () => useDesignSystemConfiguration,
120
124
  useDesignSystemTheme: () => useDesignSystemTheme,
@@ -452,7 +456,13 @@ var ButtonElement = import_styled_components5.default.button(
452
456
  color: theme.colors.text,
453
457
  boxShadow: "0 1px 2px rgba(0, 0, 0, 0.1)",
454
458
  fontSize: "12px",
455
- padding: "0px 4px"
459
+ padding: "0px 4px",
460
+ "&:hover": {
461
+ opacity: 0.8
462
+ },
463
+ "&:active": {
464
+ opacity: 0.9
465
+ }
456
466
  },
457
467
  display: "flex",
458
468
  alignItems: "center",
@@ -476,7 +486,7 @@ var ButtonContent = import_styled_components5.default.span(({ theme }) => ({
476
486
  var Button = (0, import_react6.forwardRef)(function Button2({
477
487
  id,
478
488
  className,
479
- style: style3,
489
+ style: style2,
480
490
  flex,
481
491
  tabIndex,
482
492
  tooltip,
@@ -497,7 +507,7 @@ var Button = (0, import_react6.forwardRef)(function Button2({
497
507
  ref: forwardedRef,
498
508
  id,
499
509
  className,
500
- style: style3,
510
+ style: style2,
501
511
  $flex: flex,
502
512
  tabIndex,
503
513
  $active: active,
@@ -551,14 +561,14 @@ var IconButton = (0, import_react8.memo)(
551
561
  (0, import_react8.forwardRef)(function IconButton2({ selected, iconName, color, size: size2, contentStyle, ...props }, forwardedRef) {
552
562
  const { icon: iconColor, iconSelected: iconSelectedColor } = (0, import_styled_components6.useTheme)().colors;
553
563
  const Icon = Icons[iconName];
554
- const style3 = (0, import_react8.useMemo)(() => {
564
+ const style2 = (0, import_react8.useMemo)(() => {
555
565
  return {
556
566
  padding: "0 2px",
557
567
  ...size2 && { minHeight: size2 },
558
568
  ...contentStyle
559
569
  };
560
570
  }, [contentStyle, size2]);
561
- return /* @__PURE__ */ import_react8.default.createElement(Button, { ref: forwardedRef, ...props, variant: "none", contentStyle: style3 }, /* @__PURE__ */ import_react8.default.createElement(
571
+ return /* @__PURE__ */ import_react8.default.createElement(Button, { ref: forwardedRef, ...props, variant: "none", contentStyle: style2 }, /* @__PURE__ */ import_react8.default.createElement(
562
572
  Icon,
563
573
  {
564
574
  color: color ?? (selected ? iconSelectedColor : iconColor),
@@ -661,26 +671,29 @@ var mediaQuery = {
661
671
  var name = "light";
662
672
  var colors = {
663
673
  logo: {
664
- fill: "rgb(175,175,175)",
665
- highlight: "rgb(175,175,175)"
674
+ fill: "rgb(150, 152, 172)",
675
+ highlight: "rgb(150, 152, 172)"
666
676
  },
677
+ background: "rgb(255,255,255)",
667
678
  text: "rgb(38, 48, 83)",
668
- textMuted: "rgb(85, 85, 85)",
669
- textSubtle: "rgb(121, 121, 121)",
670
- textDisabled: "rgb(160, 160, 160)",
679
+ textMuted: "rgb(107, 113, 136)",
680
+ textSubtle: "rgb(117, 121, 129)",
681
+ textDisabled: "rgb(150, 152, 172)",
671
682
  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)",
683
+ dividerSubtle: "rgba(30, 50, 100, 0.04)",
684
+ divider: "rgba(30, 50, 100, 0.07)",
685
+ dividerStrong: "rgba(30, 50, 100, 0.09)",
686
+ primary: "rgb(103, 70, 255)",
676
687
  primaryLight: "rgb(147, 86, 255)",
688
+ primaryPastel: "rgba(234, 230, 255)",
677
689
  secondary: "rgb(0, 151, 117)",
678
690
  secondaryLight: "rgb(0, 160, 129)",
691
+ secondaryPastel: "rgb(205, 238, 231)",
679
692
  secondaryBright: "#0ab557",
680
693
  warning: "rgb(251, 211, 0)",
681
694
  neutralBackground: "rgb(222,223,232)",
682
- inputBackground: "rgb(240, 240, 242)",
683
- inputBackgroundLight: "rgb(243, 243, 245)",
695
+ inputBackground: "rgb(240, 242, 246)",
696
+ inputBackgroundLight: "rgb(243, 245, 249)",
684
697
  codeBackground: "rgb(250, 250, 250)",
685
698
  codeBackgroundLight: "rgb(250, 250, 250)",
686
699
  get codeBackgroundDark() {
@@ -708,6 +721,7 @@ var colors = {
708
721
  editingBackground: "#fff"
709
722
  },
710
723
  canvas: {
724
+ // background: "white",
711
725
  background: "rgb(249,249,249)",
712
726
  get selectionStroke() {
713
727
  return colors.primary;
@@ -718,8 +732,8 @@ var colors = {
718
732
  grid: "rgba(0,0,0,0.05)"
719
733
  },
720
734
  sidebar: {
721
- background: "rgb(252,252,252)",
722
- backgroundTransparent: "rgba(252,252,252,0.85)"
735
+ background: "rgb(255,255,255)",
736
+ backgroundTransparent: "rgba(255,255,255,0.85)"
723
737
  },
724
738
  popover: {
725
739
  background: "rgb(252,252,252)",
@@ -732,7 +746,7 @@ var colors = {
732
746
  radioGroup: {
733
747
  background: "white"
734
748
  },
735
- icon: "rgb(139, 139, 139)",
749
+ icon: "rgb(129, 131, 165)",
736
750
  iconSelected: "rgb(220, 220, 220)",
737
751
  mask: "rgb(12,193,67)",
738
752
  imageOverlay: "linear-gradient(0deg, rgba(132, 63, 255,0.55), rgba(132, 63, 255,0.55))",
@@ -741,7 +755,13 @@ var colors = {
741
755
  },
742
756
  selection: "rgb(179,215,254)",
743
757
  thumbnailBackground: "#f0efff",
744
- thumbnailShadow: "#D3CEED66"
758
+ thumbnailShadow: "#D3CEED66",
759
+ inlineCode: {
760
+ text: "rgb(103, 70, 255)",
761
+ background: "rgb(240, 242, 246)"
762
+ },
763
+ textLink: "rgb(103, 70, 255)",
764
+ textLinkFocused: "rgb(147, 86, 255)"
745
765
  };
746
766
  var fonts = {
747
767
  normal: "'__Inter_6b0edc', '__Inter_Fallback_6b0edc', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
@@ -772,41 +792,41 @@ var textStyles = {
772
792
  heading1: {
773
793
  fontFamily: fonts.normal,
774
794
  fontSize: `${typeScale[2]}rem`,
775
- fontWeight: 500,
776
- lineHeight: "1.75",
795
+ fontWeight: 600,
796
+ lineHeight: "1.6",
777
797
  letterSpacing: "-0.025em"
778
798
  },
779
799
  heading2: {
780
800
  fontFamily: fonts.normal,
781
801
  fontSize: `${typeScale[3]}rem`,
782
802
  fontWeight: 500,
783
- lineHeight: "1.75",
803
+ lineHeight: "1.5",
784
804
  letterSpacing: "-0.025em"
785
805
  },
786
806
  heading3: {
787
807
  fontFamily: fonts.normal,
788
808
  fontSize: `${typeScale[4]}rem`,
789
- fontWeight: 500,
790
- lineHeight: "1.75",
809
+ fontWeight: 400,
810
+ lineHeight: "1.4",
791
811
  letterSpacing: "-0.025em"
792
812
  },
793
813
  heading4: {
794
814
  fontFamily: fonts.normal,
795
815
  fontSize: `${typeScale[5]}rem`,
796
816
  fontWeight: 500,
797
- lineHeight: "1.75"
817
+ lineHeight: "1.4"
798
818
  },
799
819
  heading5: {
800
820
  fontFamily: fonts.normal,
801
821
  fontSize: `${typeScale[6]}rem`,
802
822
  fontWeight: 500,
803
- lineHeight: "1.75"
823
+ lineHeight: "1.4"
804
824
  },
805
825
  body: {
806
826
  fontFamily: fonts.normal,
807
827
  fontSize: `${typeScale[5]}rem`,
808
828
  fontWeight: 400,
809
- lineHeight: "1.75"
829
+ lineHeight: "1.4"
810
830
  },
811
831
  small: {
812
832
  fontFamily: fonts.normal,
@@ -838,6 +858,9 @@ var textStyles = {
838
858
  }
839
859
  };
840
860
  var sizes = {
861
+ inset: {
862
+ top: 46
863
+ },
841
864
  sidebarWidth: 260,
842
865
  toolbar: {
843
866
  height: 46,
@@ -989,7 +1012,7 @@ var Dialog = (0, import_react11.forwardRef)(function Dialog2({
989
1012
  title,
990
1013
  description,
991
1014
  open,
992
- style: style3,
1015
+ style: style2,
993
1016
  onOpenChange,
994
1017
  onOpenAutoFocus,
995
1018
  closeOnInteractOutside = true
@@ -1007,7 +1030,7 @@ var Dialog = (0, import_react11.forwardRef)(function Dialog2({
1007
1030
  {
1008
1031
  ref: contentRef,
1009
1032
  onOpenAutoFocus,
1010
- style: style3,
1033
+ style: style2,
1011
1034
  ...closeOnInteractOutside === false && {
1012
1035
  onPointerDownOutside: (event) => {
1013
1036
  event.preventDefault();
@@ -1023,7 +1046,7 @@ var Dialog = (0, import_react11.forwardRef)(function Dialog2({
1023
1046
  children
1024
1047
  ));
1025
1048
  });
1026
- var FullscreenDialog = (0, import_react11.forwardRef)(function FullscreenDialog2({ style: style3, ...rest }, forwardedRef) {
1049
+ var FullscreenDialog = (0, import_react11.forwardRef)(function FullscreenDialog2({ style: style2, ...rest }, forwardedRef) {
1027
1050
  return /* @__PURE__ */ import_react11.default.createElement(
1028
1051
  Dialog,
1029
1052
  {
@@ -1039,7 +1062,7 @@ var FullscreenDialog = (0, import_react11.forwardRef)(function FullscreenDialog2
1039
1062
  display: "flex",
1040
1063
  flexDirection: "column",
1041
1064
  padding: 0,
1042
- ...style3
1065
+ ...style2
1043
1066
  },
1044
1067
  ...rest
1045
1068
  }
@@ -1126,26 +1149,43 @@ var import_react14 = __toESM(require("react"));
1126
1149
 
1127
1150
  // ../noya-react-utils/src/hooks/useFileDropTarget.ts
1128
1151
  var import_react13 = require("react");
1129
- function useFileDropTarget(dropEvent) {
1152
+ function useFileDropTarget(ref, dropEvent) {
1130
1153
  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);
1154
+ const handleDragOver = (0, import_react13.useCallback)((event) => {
1134
1155
  event.preventDefault();
1135
1156
  }, []);
1136
- const handleDropEvent = (0, import_react13.useCallback)(
1157
+ const handleDragEnter = (0, import_react13.useCallback)(
1158
+ (event) => {
1159
+ event.preventDefault();
1160
+ if (!ref.current?.contains(event.relatedTarget)) {
1161
+ setIsDropTargetActive(true);
1162
+ }
1163
+ },
1164
+ [ref]
1165
+ );
1166
+ const handleDragLeave = (0, import_react13.useCallback)(
1167
+ (event) => {
1168
+ event.preventDefault();
1169
+ if (!ref.current?.contains(event.relatedTarget)) {
1170
+ setIsDropTargetActive(false);
1171
+ }
1172
+ },
1173
+ [ref]
1174
+ );
1175
+ const handleDrop = (0, import_react13.useCallback)(
1137
1176
  (event) => {
1177
+ event.preventDefault();
1138
1178
  dropEvent(event);
1139
1179
  setIsDropTargetActive(false);
1140
1180
  },
1141
- [dropEvent, setIsDropTargetActive]
1181
+ [dropEvent]
1142
1182
  );
1143
1183
  return {
1144
1184
  dropTargetProps: {
1145
- onDragOver: handleDragEvent,
1146
- onDragEnter: (event) => handleDragEvent(event, true),
1147
- onDragLeave: (event) => handleDragEvent(event, false),
1148
- onDrop: handleDropEvent
1185
+ onDragOver: handleDragOver,
1186
+ onDragEnter: handleDragEnter,
1187
+ onDragLeave: handleDragLeave,
1188
+ onDrop: handleDrop
1149
1189
  },
1150
1190
  isDropTargetActive
1151
1191
  };
@@ -1155,12 +1195,13 @@ function useFileDropTarget(dropEvent) {
1155
1195
  function isSupportedFile(file, supportedFileTypes) {
1156
1196
  return supportedFileTypes.includes(file.type) || file.type === "" && file.name.endsWith(".sketch");
1157
1197
  }
1158
- var style2 = { display: "flex", flex: 1 };
1159
1198
  var FileDropTarget = (0, import_react14.memo)(function FileDropTarget2({
1160
1199
  children,
1161
1200
  onDropFiles,
1162
- supportedFileTypes
1201
+ supportedFileTypes,
1202
+ ...props
1163
1203
  }) {
1204
+ const ref = (0, import_react14.useRef)(null);
1164
1205
  const handleFile = (0, import_react14.useCallback)(
1165
1206
  (event) => {
1166
1207
  event.preventDefault();
@@ -1193,8 +1234,11 @@ var FileDropTarget = (0, import_react14.memo)(function FileDropTarget2({
1193
1234
  },
1194
1235
  [onDropFiles, supportedFileTypes]
1195
1236
  );
1196
- const { dropTargetProps, isDropTargetActive } = useFileDropTarget(handleFile);
1197
- return /* @__PURE__ */ import_react14.default.createElement("div", { style: style2, ...dropTargetProps }, typeof children === "function" ? children(isDropTargetActive) : children);
1237
+ const { dropTargetProps, isDropTargetActive } = useFileDropTarget(
1238
+ ref,
1239
+ handleFile
1240
+ );
1241
+ return /* @__PURE__ */ import_react14.default.createElement("div", { ref, ...dropTargetProps, ...props }, typeof children === "function" ? children(isDropTargetActive) : children);
1198
1242
  });
1199
1243
 
1200
1244
  // ../noya-react-utils/src/hooks/useDeepArray.ts
@@ -1919,7 +1963,7 @@ var LabelContainer = import_styled_components13.default.label(({ theme, $labelPo
1919
1963
  }
1920
1964
  }));
1921
1965
  var InputFieldLabel = (0, import_react33.memo)(
1922
- (0, import_react33.forwardRef)(function InputFieldLabel2({ children = false, pointerEvents = "none", style: style3 }, forwardedRef) {
1966
+ (0, import_react33.forwardRef)(function InputFieldLabel2({ children = false, pointerEvents = "none", style: style2 }, forwardedRef) {
1923
1967
  const { labelPosition, hasDropdown, setLabelWidth } = (0, import_react33.useContext)(InputFieldContext);
1924
1968
  const ref = (0, import_react33.useRef)(null);
1925
1969
  (0, import_react33.useLayoutEffect)(() => {
@@ -1940,7 +1984,7 @@ var InputFieldLabel = (0, import_react33.memo)(
1940
1984
  pointerEvents,
1941
1985
  $labelPosition: labelPosition,
1942
1986
  $hasDropdown: hasDropdown,
1943
- style: style3
1987
+ style: style2
1944
1988
  },
1945
1989
  children
1946
1990
  );
@@ -2108,34 +2152,34 @@ var InputFieldTypeahead = (props) => {
2108
2152
  labelSize,
2109
2153
  hasDropdown,
2110
2154
  hasLabel,
2111
- size: size2,
2112
- onFocusChange
2155
+ size: size2
2156
+ // onFocusChange,
2113
2157
  } = (0, import_react33.useContext)(InputFieldContext);
2114
2158
  return /* @__PURE__ */ import_react33.default.createElement(
2115
2159
  InputElement,
2116
2160
  {
2161
+ as: "span",
2117
2162
  $labelPosition: labelPosition,
2118
2163
  $labelSize: labelSize,
2119
2164
  $hasLabel: hasLabel,
2120
2165
  $hasDropdown: hasDropdown,
2121
2166
  $size: size2,
2122
- onFocusChange,
2123
- readOnly: true,
2124
- placeholder: props.value,
2125
2167
  value: "",
2126
2168
  style: {
2127
2169
  position: "absolute",
2128
- top: -1,
2170
+ top: 0,
2129
2171
  left: 0,
2130
2172
  right: 0,
2131
- bottom: -1,
2173
+ bottom: 0,
2132
2174
  width: "100%",
2133
2175
  height: "100%",
2134
2176
  pointerEvents: "none",
2135
2177
  background: "transparent",
2136
2178
  boxShadow: "none"
2137
2179
  }
2138
- }
2180
+ },
2181
+ /* @__PURE__ */ import_react33.default.createElement("span", { style: { opacity: 0 } }, props.prefix),
2182
+ /* @__PURE__ */ import_react33.default.createElement("span", { style: { opacity: 0.5 } }, props.value.slice(props.prefix.length))
2139
2183
  );
2140
2184
  };
2141
2185
  function parseNumber(value) {
@@ -2223,7 +2267,7 @@ function InputFieldRoot({
2223
2267
  size: size2 = "medium",
2224
2268
  renderPopoverContent,
2225
2269
  onFocusChange,
2226
- style: style3,
2270
+ style: style2,
2227
2271
  className
2228
2272
  }) {
2229
2273
  const childrenArray = import_react33.Children.toArray(children);
@@ -2282,7 +2326,7 @@ function InputFieldRoot({
2282
2326
  id,
2283
2327
  $width: width,
2284
2328
  $flex: flex,
2285
- style: style3,
2329
+ style: style2,
2286
2330
  className
2287
2331
  },
2288
2332
  children
@@ -2679,7 +2723,7 @@ function useHover(props = {}) {
2679
2723
  // src/components/Chip.tsx
2680
2724
  var ChipElement = import_styled_components16.default.span(({ theme, $colorScheme, $size, $variant, $monospace, $isInteractive }) => {
2681
2725
  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;
2726
+ const backgroundColor = $colorScheme === "primary" ? theme.colors.primaryPastel : $colorScheme === "secondary" ? theme.colors.secondaryPastel : $colorScheme === "error" ? "rgb(255, 219, 219)" : theme.colors.inputBackground;
2683
2727
  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
2728
  return {
2685
2729
  textTransform: "initial",
@@ -2768,7 +2812,7 @@ var Chip = (0, import_react37.memo)(
2768
2812
  deletable,
2769
2813
  addable,
2770
2814
  clickable,
2771
- style: style3,
2815
+ style: style2,
2772
2816
  size: size2 = "large",
2773
2817
  variant = "solid",
2774
2818
  monospace = false,
@@ -2791,7 +2835,7 @@ var Chip = (0, import_react37.memo)(
2791
2835
  ref: forwardedRef,
2792
2836
  $variant: variant,
2793
2837
  $colorScheme: colorScheme,
2794
- style: style3,
2838
+ style: style2,
2795
2839
  onClick: handleClick,
2796
2840
  $size: size2,
2797
2841
  $monospace: monospace,
@@ -3861,11 +3905,11 @@ var FloatingWindow = ({
3861
3905
  ),
3862
3906
  /* @__PURE__ */ import_react45.default.createElement(Divider, null),
3863
3907
  /* @__PURE__ */ import_react45.default.createElement("div", { style: styles2.content }, children),
3864
- Object.entries(resizeHandlePositions).map(([direction, style3]) => /* @__PURE__ */ import_react45.default.createElement(
3908
+ Object.entries(resizeHandlePositions).map(([direction, style2]) => /* @__PURE__ */ import_react45.default.createElement(
3865
3909
  "div",
3866
3910
  {
3867
3911
  key: direction,
3868
- style: { ...styles2.resizeHandle, ...style3 },
3912
+ style: { ...styles2.resizeHandle, ...style2 },
3869
3913
  onMouseDown: handleResizeStart(direction)
3870
3914
  }
3871
3915
  ))
@@ -4202,7 +4246,7 @@ var GridViewItem = (0, import_react48.forwardRef)(function GridViewItem2({
4202
4246
  menuItems,
4203
4247
  onSelectMenuItem,
4204
4248
  onContextMenu,
4205
- style: style3
4249
+ style: style2
4206
4250
  }, forwardedRef) {
4207
4251
  const [hovered, setHovered] = import_react48.default.useState(false);
4208
4252
  const { hoverProps } = useHover({
@@ -4252,7 +4296,7 @@ var GridViewItem = (0, import_react48.forwardRef)(function GridViewItem2({
4252
4296
  onClick: handleClick,
4253
4297
  onDoubleClick,
4254
4298
  onContextMenu,
4255
- style: style3
4299
+ style: style2
4256
4300
  },
4257
4301
  children
4258
4302
  ),
@@ -4800,8 +4844,9 @@ var ListViewRow = (0, import_react50.forwardRef)(function ListViewRow2({
4800
4844
  onSelectMenuItem,
4801
4845
  onMenuOpenChange,
4802
4846
  onKeyDown,
4803
- style: style3,
4804
- dragIndicatorStyle
4847
+ style: style2,
4848
+ dragIndicatorStyle,
4849
+ className
4805
4850
  }, forwardedRef) {
4806
4851
  depth = Math.max(0, depth);
4807
4852
  const {
@@ -4840,9 +4885,9 @@ var ListViewRow = (0, import_react50.forwardRef)(function ListViewRow2({
4840
4885
  // TODO: Where do these offsets actually come from?
4841
4886
  transform: `translate3d(-36px, -6px, 0)`,
4842
4887
  width: `calc(100% + 48px)`,
4843
- ...style3
4844
- } : style3;
4845
- }, [isDragging, style3]);
4888
+ ...style2
4889
+ } : style2;
4890
+ }, [isDragging, style2]);
4846
4891
  const renderContent = ({
4847
4892
  relativeDropPosition,
4848
4893
  ...renderProps
@@ -4877,7 +4922,8 @@ var ListViewRow = (0, import_react50.forwardRef)(function ListViewRow2({
4877
4922
  { onPointerDown: renderProps.onPointerDown },
4878
4923
  { [pressEventName]: handlePress }
4879
4924
  ),
4880
- tabIndex
4925
+ tabIndex,
4926
+ className
4881
4927
  },
4882
4928
  relativeDropPosition && /* @__PURE__ */ import_react50.default.createElement(
4883
4929
  ListViewDragIndicatorElement,
@@ -4923,10 +4969,10 @@ var RenderItemContext = (0, import_react50.createContext)(
4923
4969
  RenderItemContext.displayName = "RenderItemContext";
4924
4970
  var VirtualizedListRow = (0, import_react50.memo)(function VirtualizedListRow2({
4925
4971
  index,
4926
- style: style3
4972
+ style: style2
4927
4973
  }) {
4928
4974
  const renderItem = (0, import_react50.useContext)(RenderItemContext);
4929
- return /* @__PURE__ */ import_react50.default.createElement("div", { key: index, style: style3 }, renderItem(index));
4975
+ return /* @__PURE__ */ import_react50.default.createElement("div", { key: index, style: style2 }, renderItem(index));
4930
4976
  });
4931
4977
  var VirtualizedListInner = (0, import_react50.forwardRef)(function VirtualizedListInner2({
4932
4978
  size: size2,
@@ -5012,7 +5058,7 @@ var RootContainer2 = import_styled_components25.default.div(({ theme, $scrollabl
5012
5058
  var ListViewRootInner = (0, import_react50.forwardRef)(function ListViewRootInner2({
5013
5059
  id,
5014
5060
  className,
5015
- style: style3,
5061
+ style: style2,
5016
5062
  onPress,
5017
5063
  scrollable = false,
5018
5064
  expandable = true,
@@ -5173,7 +5219,7 @@ var ListViewRootInner = (0, import_react50.forwardRef)(function ListViewRootInne
5173
5219
  {
5174
5220
  id,
5175
5221
  className,
5176
- style: style3,
5222
+ style: style2,
5177
5223
  ...{
5178
5224
  [pressEventName]: handleClick
5179
5225
  },
@@ -5279,6 +5325,7 @@ var Text = (0, import_react51.forwardRef)(function Text2({
5279
5325
  tabIndex,
5280
5326
  onClick,
5281
5327
  onKeyDown,
5328
+ style: style2,
5282
5329
  ...rest
5283
5330
  }, forwardedRef) {
5284
5331
  const element = as ?? elements[variant] ?? "span";
@@ -5288,6 +5335,7 @@ var Text = (0, import_react51.forwardRef)(function Text2({
5288
5335
  ref: forwardedRef,
5289
5336
  as: element,
5290
5337
  className,
5338
+ style: style2,
5291
5339
  tabIndex,
5292
5340
  $variant: variant,
5293
5341
  $breakpoints: breakpoints,
@@ -5422,7 +5470,7 @@ var InputFieldWithCompletions = (0, import_react52.memo)(
5422
5470
  onFocus,
5423
5471
  onBlur,
5424
5472
  onDeleteWhenEmpty,
5425
- style: style3,
5473
+ style: style2,
5426
5474
  className,
5427
5475
  children,
5428
5476
  hideChildrenWhenFocused = false,
@@ -5647,7 +5695,7 @@ var InputFieldWithCompletions = (0, import_react52.memo)(
5647
5695
  onBlur: handleBlur,
5648
5696
  onFocusCapture: handleFocus,
5649
5697
  onKeyDown: handleKeyDown,
5650
- style: style3,
5698
+ style: style2,
5651
5699
  className,
5652
5700
  autoCapitalize: "off",
5653
5701
  autoComplete: "off",
@@ -5660,7 +5708,7 @@ var InputFieldWithCompletions = (0, import_react52.memo)(
5660
5708
  "aria-controls": "component-listbox"
5661
5709
  }
5662
5710
  ),
5663
- filter && typeaheadValue && typeaheadValue.startsWith(filter) && /* @__PURE__ */ import_react52.default.createElement(InputField.Typeahead, { value: typeaheadValue }),
5711
+ filter && typeaheadValue && typeaheadValue.toLowerCase().startsWith(filter.toLowerCase()) && /* @__PURE__ */ import_react52.default.createElement(InputField.Typeahead, { value: typeaheadValue, prefix: filter }),
5664
5712
  (!isFocused || !hideChildrenWhenFocused) && children,
5665
5713
  loading && isFocused && /* @__PURE__ */ import_react52.default.createElement(InputField.Label, null, /* @__PURE__ */ import_react52.default.createElement(ActivityIndicator, null))
5666
5714
  );
@@ -5693,7 +5741,7 @@ var InspectorContainer = (0, import_react53.memo)(
5693
5741
  showDividers,
5694
5742
  id,
5695
5743
  className,
5696
- style: style3
5744
+ style: style2
5697
5745
  }, forwardedRef) {
5698
5746
  const theme = useDesignSystemTheme();
5699
5747
  return /* @__PURE__ */ import_react53.default.createElement(
@@ -5707,7 +5755,7 @@ var InspectorContainer = (0, import_react53.memo)(
5707
5755
  flexDirection: "column",
5708
5756
  position: "relative",
5709
5757
  background: theme.colors.sidebar.background,
5710
- ...style3
5758
+ ...style2
5711
5759
  }
5712
5760
  },
5713
5761
  header,
@@ -6151,9 +6199,12 @@ var readOnlyStyle = {
6151
6199
  justifyContent: "flex-start",
6152
6200
  textAlign: "left"
6153
6201
  };
6202
+ var flexStyle = {
6203
+ flex: 1
6204
+ };
6154
6205
  var SelectMenu = (0, import_react59.memo)(function SelectMenu2({
6155
6206
  id,
6156
- style: style3,
6207
+ style: style2,
6157
6208
  className,
6158
6209
  menuItems,
6159
6210
  value,
@@ -6171,16 +6222,16 @@ var SelectMenu = (0, import_react59.memo)(function SelectMenu2({
6171
6222
  Button,
6172
6223
  {
6173
6224
  id,
6174
- style: style3,
6225
+ style: style2,
6175
6226
  contentStyle: readOnlyStyle,
6176
6227
  className,
6177
6228
  disabled
6178
6229
  },
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
6230
+ icon && /* @__PURE__ */ import_react59.default.createElement(import_react59.default.Fragment, null, renderIcon(icon), /* @__PURE__ */ import_react59.default.createElement(Spacer.Horizontal, { inline: true, size: 6 })),
6231
+ /* @__PURE__ */ import_react59.default.createElement("span", { style: flexStyle }, selectedItem?.title ?? value)
6181
6232
  );
6182
6233
  }
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) => {
6234
+ 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
6235
  if (typeof menuItem === "string") {
6185
6236
  return /* @__PURE__ */ import_react59.default.createElement(StyledSeparator, null);
6186
6237
  }
@@ -6321,58 +6372,124 @@ var Switch = function Switch2({
6321
6372
  );
6322
6373
  };
6323
6374
 
6324
- // src/components/TreeView.tsx
6375
+ // src/components/TextArea.tsx
6325
6376
  var import_react62 = __toESM(require("react"));
6326
- var TreeRow = (0, import_react62.forwardRef)(function TreeRow2({
6377
+ var import_styled_components36 = __toESM(require("styled-components"));
6378
+ var TextAreaElement = import_styled_components36.default.textarea(({ theme }) => ({
6379
+ ...theme.textStyles.small,
6380
+ color: theme.colors.text,
6381
+ background: theme.colors.inputBackground,
6382
+ width: "0px",
6383
+ flex: "1 1 auto",
6384
+ padding: "4px 6px",
6385
+ border: "none",
6386
+ outline: "none",
6387
+ height: 100,
6388
+ borderRadius: "4px",
6389
+ "&::placeholder": {
6390
+ color: theme.colors.textDisabled
6391
+ },
6392
+ "&:focus": {
6393
+ boxShadow: `0 0 0 2px ${theme.colors.primary}`
6394
+ },
6395
+ // readonly
6396
+ "&:read-only": {
6397
+ color: theme.colors.textDisabled
6398
+ },
6399
+ resize: "none"
6400
+ }));
6401
+ var useAutoResize = (value) => {
6402
+ const textareaRef = (0, import_react62.useRef)(null);
6403
+ (0, import_react62.useEffect)(() => {
6404
+ if (!textareaRef.current)
6405
+ return;
6406
+ textareaRef.current.style.height = "auto";
6407
+ textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`;
6408
+ }, [value]);
6409
+ return textareaRef;
6410
+ };
6411
+ var AutoResizingTextArea = (0, import_react62.memo)(
6412
+ (0, import_react62.forwardRef)(function AutoResizingTextArea2({
6413
+ value,
6414
+ onChangeText,
6415
+ ...rest
6416
+ }, forwardedRef) {
6417
+ const ref = useAutoResize(value || rest.placeholder || "");
6418
+ const handleChange = (0, import_react62.useCallback)(
6419
+ (event) => onChangeText(event.target.value),
6420
+ [onChangeText]
6421
+ );
6422
+ const handleRef = (0, import_react62.useCallback)(
6423
+ (value2) => {
6424
+ ref.current = value2;
6425
+ assignRef(forwardedRef, value2);
6426
+ },
6427
+ [ref, forwardedRef]
6428
+ );
6429
+ return /* @__PURE__ */ import_react62.default.createElement(
6430
+ TextAreaElement,
6431
+ {
6432
+ ref: handleRef,
6433
+ ...rest,
6434
+ onChange: handleChange,
6435
+ value
6436
+ }
6437
+ );
6438
+ })
6439
+ );
6440
+
6441
+ // src/components/TreeView.tsx
6442
+ var import_react63 = __toESM(require("react"));
6443
+ var TreeRow = (0, import_react63.forwardRef)(function TreeRow2({
6327
6444
  icon,
6328
6445
  expanded,
6329
6446
  onClickChevron,
6330
6447
  children,
6331
6448
  ...rest
6332
6449
  }, forwardedRef) {
6333
- const { expandable } = (0, import_react62.useContext)(ListView.RowContext);
6334
- const handleClickChevron = (0, import_react62.useCallback)(
6450
+ const { expandable } = (0, import_react63.useContext)(ListView.RowContext);
6451
+ const handleClickChevron = (0, import_react63.useCallback)(
6335
6452
  (event) => {
6336
6453
  event.stopPropagation();
6337
6454
  onClickChevron?.({ altKey: event.altKey });
6338
6455
  },
6339
6456
  [onClickChevron]
6340
6457
  );
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(
6458
+ 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
6459
  IconButton,
6343
6460
  {
6344
6461
  iconName: expanded ? "ChevronDownIcon2" : "ChevronRightIcon2",
6345
6462
  onClick: handleClickChevron,
6346
6463
  selected: rest.selected
6347
6464
  }
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);
6465
+ ), /* @__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
6466
  });
6350
6467
  var TreeView;
6351
6468
  ((TreeView2) => {
6352
6469
  TreeView2.Root = ListView.Root;
6353
6470
  TreeView2.RowTitle = ListView.RowTitle;
6354
6471
  TreeView2.EditableRowTitle = ListView.EditableRowTitle;
6355
- TreeView2.Row = (0, import_react62.memo)(TreeRow);
6472
+ TreeView2.Row = (0, import_react63.memo)(TreeRow);
6356
6473
  })(TreeView || (TreeView = {}));
6357
6474
 
6358
6475
  // src/components/WorkspaceLayout.tsx
6359
6476
  var import_noya_keymap5 = require("@noya-app/noya-keymap");
6360
- var import_react65 = __toESM(require("react"));
6477
+ var import_react66 = __toESM(require("react"));
6361
6478
  var import_react_resizable_panels = require("react-resizable-panels");
6362
6479
 
6363
6480
  // src/hooks/usePreservePanelSize.tsx
6364
- var import_react64 = require("react");
6481
+ var import_react65 = require("react");
6365
6482
 
6366
6483
  // src/hooks/useWindowSize.tsx
6367
- var import_react63 = require("react");
6484
+ var import_react64 = require("react");
6368
6485
  function useWindowSize() {
6369
- const [size2, setSize] = (0, import_react63.useState)(
6486
+ const [size2, setSize] = (0, import_react64.useState)(
6370
6487
  typeof window === "undefined" ? { width: 0, height: 0 } : {
6371
6488
  width: window.innerWidth,
6372
6489
  height: window.innerHeight
6373
6490
  }
6374
6491
  );
6375
- (0, import_react63.useEffect)(() => {
6492
+ (0, import_react64.useEffect)(() => {
6376
6493
  const handleResize = () => setSize({
6377
6494
  width: window.innerWidth,
6378
6495
  height: window.innerHeight
@@ -6390,8 +6507,8 @@ var RIGHT_SIDEBAR_ID = "editor-right-sidebar";
6390
6507
  var CONTENT_AREA_ID = "editor-content-area";
6391
6508
  function usePreservePanelSize(panelGroupRef, setPanelLayoutState) {
6392
6509
  const windowSize = useWindowSize();
6393
- const layoutRef = (0, import_react64.useRef)();
6394
- (0, import_react64.useLayoutEffect)(() => {
6510
+ const layoutRef = (0, import_react65.useRef)();
6511
+ (0, import_react65.useLayoutEffect)(() => {
6395
6512
  const panelGroup = document.querySelector(
6396
6513
  `[data-panel-group-id="${EDITOR_PANEL_GROUP_ID}"]`
6397
6514
  );
@@ -6434,7 +6551,7 @@ function usePreservePanelSize(panelGroupRef, setPanelLayoutState) {
6434
6551
  panelGroupObserver.disconnect();
6435
6552
  };
6436
6553
  }, [panelGroupRef, setPanelLayoutState]);
6437
- (0, import_react64.useLayoutEffect)(() => {
6554
+ (0, import_react65.useLayoutEffect)(() => {
6438
6555
  if (!layoutRef.current)
6439
6556
  return;
6440
6557
  const {
@@ -6494,7 +6611,7 @@ function usePreservePanelSize(panelGroupRef, setPanelLayoutState) {
6494
6611
  }
6495
6612
 
6496
6613
  // src/components/WorkspaceLayout.tsx
6497
- var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6614
+ var WorkspaceLayout = (0, import_react66.forwardRef)(function WorkspaceLayout2({
6498
6615
  autoSavePrefix,
6499
6616
  leftSidebarContent: leftPanelContent,
6500
6617
  children: centerPanelContent,
@@ -6509,7 +6626,7 @@ var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6509
6626
  leftSidebarCanResize = false,
6510
6627
  id,
6511
6628
  className,
6512
- style: style3
6629
+ style: style2
6513
6630
  }, forwardedRef) {
6514
6631
  const windowSize = useWindowSize();
6515
6632
  function getPercentage(size2) {
@@ -6519,12 +6636,12 @@ var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6519
6636
  const rightSidebarPercentage = getPercentage(rightSidebarInitialSize);
6520
6637
  const leftSidebarMinPercentage = leftSidebarMinSize !== void 0 ? getPercentage(leftSidebarMinSize) : void 0;
6521
6638
  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);
6639
+ const panelGroupRef = (0, import_react66.useRef)(null);
6640
+ const leftSidebarRef = (0, import_react66.useRef)(null);
6641
+ const rightSidebarRef = (0, import_react66.useRef)(null);
6525
6642
  usePreservePanelSize(panelGroupRef, onChangeLayoutState);
6526
6643
  const theme = useDesignSystemTheme();
6527
- (0, import_react65.useImperativeHandle)(forwardedRef, () => ({
6644
+ (0, import_react66.useImperativeHandle)(forwardedRef, () => ({
6528
6645
  setLeftSidebarExpanded: (expanded) => {
6529
6646
  if (expanded) {
6530
6647
  leftSidebarRef.current?.expand();
@@ -6581,7 +6698,7 @@ var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6581
6698
  }
6582
6699
  });
6583
6700
  const centerPanelPercentage = 100 - (leftPanelContent ? leftSidebarPercentage : 0) - (rightPanelContent ? rightSidebarPercentage : 0);
6584
- return /* @__PURE__ */ import_react65.default.createElement(
6701
+ return /* @__PURE__ */ import_react66.default.createElement(
6585
6702
  "div",
6586
6703
  {
6587
6704
  id,
@@ -6590,10 +6707,10 @@ var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6590
6707
  backgroundColor: theme.colors.canvas.background,
6591
6708
  display: "flex",
6592
6709
  flexDirection: "row",
6593
- ...style3
6710
+ ...style2
6594
6711
  }
6595
6712
  },
6596
- /* @__PURE__ */ import_react65.default.createElement(
6713
+ /* @__PURE__ */ import_react66.default.createElement(
6597
6714
  import_react_resizable_panels.PanelGroup,
6598
6715
  {
6599
6716
  ref: panelGroupRef,
@@ -6602,7 +6719,7 @@ var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6602
6719
  autoSaveId: autoSavePrefix ? `${autoSavePrefix}--${EDITOR_PANEL_GROUP_ID}` : void 0,
6603
6720
  style: { flex: "1" }
6604
6721
  },
6605
- hasLeftSidebar && /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement(
6722
+ hasLeftSidebar && /* @__PURE__ */ import_react66.default.createElement(import_react66.default.Fragment, null, /* @__PURE__ */ import_react66.default.createElement(
6606
6723
  import_react_resizable_panels.Panel,
6607
6724
  {
6608
6725
  id: LEFT_SIDEBAR_ID,
@@ -6619,7 +6736,7 @@ var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6619
6736
  }
6620
6737
  },
6621
6738
  leftPanelContent
6622
- ), /* @__PURE__ */ import_react65.default.createElement(
6739
+ ), /* @__PURE__ */ import_react66.default.createElement(
6623
6740
  import_react_resizable_panels.PanelResizeHandle,
6624
6741
  {
6625
6742
  style: {
@@ -6630,7 +6747,7 @@ var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6630
6747
  }
6631
6748
  }
6632
6749
  )),
6633
- /* @__PURE__ */ import_react65.default.createElement(
6750
+ /* @__PURE__ */ import_react66.default.createElement(
6634
6751
  import_react_resizable_panels.Panel,
6635
6752
  {
6636
6753
  id: CONTENT_AREA_ID,
@@ -6645,7 +6762,7 @@ var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6645
6762
  },
6646
6763
  centerPanelContent
6647
6764
  ),
6648
- hasRightSidebar && /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement(
6765
+ hasRightSidebar && /* @__PURE__ */ import_react66.default.createElement(import_react66.default.Fragment, null, /* @__PURE__ */ import_react66.default.createElement(
6649
6766
  import_react_resizable_panels.PanelResizeHandle,
6650
6767
  {
6651
6768
  style: {
@@ -6655,7 +6772,7 @@ var WorkspaceLayout = (0, import_react65.forwardRef)(function WorkspaceLayout2({
6655
6772
  backgroundColor: theme.colors.divider
6656
6773
  }
6657
6774
  }
6658
- ), /* @__PURE__ */ import_react65.default.createElement(
6775
+ ), /* @__PURE__ */ import_react66.default.createElement(
6659
6776
  import_react_resizable_panels.Panel,
6660
6777
  {
6661
6778
  id: RIGHT_SIDEBAR_ID,
@@ -6718,8 +6835,8 @@ var SUPPORTED_CANVAS_UPLOAD_TYPES = [
6718
6835
 
6719
6836
  // src/components/ArrayController.tsx
6720
6837
  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"));
6838
+ var import_react68 = __toESM(require("react"));
6839
+ var import_styled_components38 = __toESM(require("styled-components"));
6723
6840
 
6724
6841
  // src/components/InspectorPrimitives.tsx
6725
6842
  var InspectorPrimitives_exports = {};
@@ -6737,20 +6854,20 @@ __export(InspectorPrimitives_exports, {
6737
6854
  Title: () => Title3,
6738
6855
  VerticalSeparator: () => VerticalSeparator
6739
6856
  });
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 }) => ({
6857
+ var import_react67 = __toESM(require("react"));
6858
+ var import_styled_components37 = __toESM(require("styled-components"));
6859
+ var Section = import_styled_components37.default.div(({ theme, $padding = "10px", $gap }) => ({
6743
6860
  flex: "0 0 auto",
6744
6861
  display: "flex",
6745
6862
  flexDirection: "column",
6746
6863
  padding: $padding,
6747
6864
  gap: $gap
6748
6865
  }));
6749
- var SectionHeader = import_styled_components36.default.div(({ theme }) => ({
6866
+ var SectionHeader = import_styled_components37.default.div(({ theme }) => ({
6750
6867
  display: "flex",
6751
6868
  alignItems: "center"
6752
6869
  }));
6753
- var Title3 = import_styled_components36.default.div(({ theme, $textStyle }) => ({
6870
+ var Title3 = import_styled_components37.default.div(({ theme, $textStyle }) => ({
6754
6871
  display: "flex",
6755
6872
  flexDirection: "row",
6756
6873
  userSelect: "none",
@@ -6759,11 +6876,11 @@ var Title3 = import_styled_components36.default.div(({ theme, $textStyle }) => (
6759
6876
  color: theme.colors.text
6760
6877
  } : {
6761
6878
  ...theme.textStyles.label,
6762
- color: theme.colors.textSubtle,
6879
+ color: theme.colors.textMuted,
6763
6880
  fontWeight: "bold"
6764
6881
  }
6765
6882
  }));
6766
- var Row2 = import_styled_components36.default.div(
6883
+ var Row2 = import_styled_components37.default.div(
6767
6884
  ({ theme, $gap }) => ({
6768
6885
  flex: "1",
6769
6886
  display: "flex",
@@ -6772,26 +6889,26 @@ var Row2 = import_styled_components36.default.div(
6772
6889
  gap: $gap
6773
6890
  })
6774
6891
  );
6775
- var Column = import_styled_components36.default.div(({ theme }) => ({
6892
+ var Column = import_styled_components37.default.div(({ theme }) => ({
6776
6893
  flex: "1",
6777
6894
  display: "flex",
6778
6895
  flexDirection: "column",
6779
6896
  gap: "4px"
6780
6897
  }));
6781
- var Checkbox = import_styled_components36.default.input(({ theme }) => ({
6898
+ var Checkbox = import_styled_components37.default.input(({ theme }) => ({
6782
6899
  margin: 0
6783
6900
  }));
6784
- var Text3 = import_styled_components36.default.span(({ theme }) => ({
6901
+ var Text3 = import_styled_components37.default.span(({ theme }) => ({
6785
6902
  ...theme.textStyles.small
6786
6903
  }));
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 }) => ({
6904
+ var VerticalSeparator = () => /* @__PURE__ */ import_react67.default.createElement(Spacer.Vertical, { size: (0, import_styled_components37.useTheme)().sizes.inspector.verticalSeparator });
6905
+ var HorizontalSeparator = () => /* @__PURE__ */ import_react67.default.createElement(Spacer.Horizontal, { size: (0, import_styled_components37.useTheme)().sizes.inspector.horizontalSeparator });
6906
+ var SliderRowLabel = import_styled_components37.default.span(({ theme }) => ({
6790
6907
  ...theme.textStyles.small,
6791
6908
  color: theme.colors.textMuted,
6792
6909
  marginBottom: "-6px"
6793
6910
  }));
6794
- var RowLabel = import_styled_components36.default.span(({ theme, $textStyle }) => ({
6911
+ var RowLabel = import_styled_components37.default.span(({ theme, $textStyle }) => ({
6795
6912
  // marginBottom: '6px',
6796
6913
  display: "flex",
6797
6914
  ...$textStyle ? {
@@ -6805,7 +6922,7 @@ var RowLabel = import_styled_components36.default.span(({ theme, $textStyle }) =
6805
6922
  // Button height
6806
6923
  alignItems: "center"
6807
6924
  }));
6808
- var LabeledRow = (0, import_react66.memo)(function LabeledRow2({
6925
+ var LabeledRow = (0, import_react67.memo)(function LabeledRow2({
6809
6926
  id,
6810
6927
  children,
6811
6928
  label,
@@ -6813,26 +6930,26 @@ var LabeledRow = (0, import_react66.memo)(function LabeledRow2({
6813
6930
  gap,
6814
6931
  right
6815
6932
  }) {
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)));
6933
+ 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
6934
  });
6818
- var LabeledSliderRow = (0, import_react66.memo)(function LabeledRow3({
6935
+ var LabeledSliderRow = (0, import_react67.memo)(function LabeledRow3({
6819
6936
  children,
6820
6937
  label
6821
6938
  }) {
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)));
6939
+ 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
6940
  });
6824
6941
 
6825
6942
  // src/components/ArrayController.tsx
6826
- var ElementRow = import_styled_components37.default.div({
6943
+ var ElementRow = import_styled_components38.default.div({
6827
6944
  flex: "0 0 auto",
6828
6945
  display: "flex",
6829
6946
  flexDirection: "row",
6830
6947
  alignItems: "center"
6831
6948
  });
6832
- var ItemContainer2 = import_styled_components37.default.div({
6949
+ var ItemContainer2 = import_styled_components38.default.div({
6833
6950
  position: "relative"
6834
6951
  });
6835
- var ArrayController = (0, import_react67.memo)(function ArrayController2({
6952
+ var ArrayController = (0, import_react68.memo)(function ArrayController2({
6836
6953
  id,
6837
6954
  items,
6838
6955
  title,
@@ -6848,14 +6965,14 @@ var ArrayController = (0, import_react67.memo)(function ArrayController2({
6848
6965
  renderExpandedContent,
6849
6966
  padding = 10
6850
6967
  }) {
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)(
6968
+ const iconColor = (0, import_styled_components38.useTheme)().colors.icon;
6969
+ const primaryLightColor = (0, import_styled_components38.useTheme)().colors.primaryLight;
6970
+ const keys = (0, import_react68.useMemo)(
6854
6971
  () => items.map((item, index) => getKey?.(item) ?? index.toString()),
6855
6972
  [getKey, items]
6856
6973
  );
6857
6974
  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)(
6975
+ const handleMoveItem = (0, import_react68.useCallback)(
6859
6976
  (sourceIndex, destinationIndex, position) => {
6860
6977
  if (reversed) {
6861
6978
  if (position === "above") {
@@ -6872,11 +6989,11 @@ var ArrayController = (0, import_react67.memo)(function ArrayController2({
6872
6989
  [onMoveItem, reversed]
6873
6990
  );
6874
6991
  const renderRow = (index) => {
6875
- return /* @__PURE__ */ import_react67.default.createElement(ElementRow, { key: keys[index] }, renderItem({ item: items[index], index }));
6992
+ return /* @__PURE__ */ import_react68.default.createElement(ElementRow, { key: keys[index] }, renderItem({ item: items[index], index }));
6876
6993
  };
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(
6994
+ 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
6995
  [
6879
- onClickTrash && /* @__PURE__ */ import_react67.default.createElement(
6996
+ onClickTrash && /* @__PURE__ */ import_react68.default.createElement(
6880
6997
  IconButton,
6881
6998
  {
6882
6999
  id: `${id}-trash`,
@@ -6885,7 +7002,7 @@ var ArrayController = (0, import_react67.memo)(function ArrayController2({
6885
7002
  onClick: onClickTrash
6886
7003
  }
6887
7004
  ),
6888
- onClickExpand && /* @__PURE__ */ import_react67.default.createElement(
7005
+ onClickExpand && /* @__PURE__ */ import_react68.default.createElement(
6889
7006
  IconButton,
6890
7007
  {
6891
7008
  id: `${id}-gear`,
@@ -6894,7 +7011,7 @@ var ArrayController = (0, import_react67.memo)(function ArrayController2({
6894
7011
  onClick: onClickExpand
6895
7012
  }
6896
7013
  ),
6897
- onClickPlus && /* @__PURE__ */ import_react67.default.createElement(
7014
+ onClickPlus && /* @__PURE__ */ import_react68.default.createElement(
6898
7015
  IconButton,
6899
7016
  {
6900
7017
  id: `${id}-add`,
@@ -6904,15 +7021,15 @@ var ArrayController = (0, import_react67.memo)(function ArrayController2({
6904
7021
  }
6905
7022
  )
6906
7023
  ],
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(
7024
+ /* @__PURE__ */ import_react68.default.createElement(Spacer.Horizontal, { size: 8 })
7025
+ )), /* @__PURE__ */ import_react68.default.createElement(Stack.V, { gap: "4px" }, sortable ? /* @__PURE__ */ import_react68.default.createElement(
6909
7026
  Sortable.Root,
6910
7027
  {
6911
7028
  keys,
6912
7029
  renderOverlay: renderRow,
6913
7030
  onMoveItem: handleMoveItem
6914
7031
  },
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(
7032
+ 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
7033
  ListView.DragIndicator,
6917
7034
  {
6918
7035
  $gap: 0,
@@ -6926,11 +7043,11 @@ var ArrayController = (0, import_react67.memo)(function ArrayController2({
6926
7043
 
6927
7044
  // src/components/DimensionInput.tsx
6928
7045
  var import_noya_utils12 = require("@noya-app/noya-utils");
6929
- var import_react68 = __toESM(require("react"));
7046
+ var import_react69 = __toESM(require("react"));
6930
7047
  function getNewValue(value, mode, delta) {
6931
7048
  return delta === void 0 ? value : mode === "replace" ? delta : value + delta;
6932
7049
  }
6933
- var DimensionInput = (0, import_react68.memo)(function DimensionInput2({
7050
+ var DimensionInput = (0, import_react69.memo)(function DimensionInput2({
6934
7051
  id,
6935
7052
  value,
6936
7053
  onSetValue,
@@ -6940,15 +7057,15 @@ var DimensionInput = (0, import_react68.memo)(function DimensionInput2({
6940
7057
  disabled,
6941
7058
  trigger = "submit"
6942
7059
  }) {
6943
- const handleNudgeValue = (0, import_react68.useCallback)(
7060
+ const handleNudgeValue = (0, import_react69.useCallback)(
6944
7061
  (value2) => onSetValue(value2, "adjust"),
6945
7062
  [onSetValue]
6946
7063
  );
6947
- const handleSetValue = (0, import_react68.useCallback)(
7064
+ const handleSetValue = (0, import_react69.useCallback)(
6948
7065
  (value2) => onSetValue(value2, "replace"),
6949
7066
  [onSetValue]
6950
7067
  );
6951
- return /* @__PURE__ */ import_react68.default.createElement(InputField.Root, { id, width: size2 }, /* @__PURE__ */ import_react68.default.createElement(
7068
+ return /* @__PURE__ */ import_react69.default.createElement(InputField.Root, { id, width: size2 }, /* @__PURE__ */ import_react69.default.createElement(
6952
7069
  InputField.NumberInput,
6953
7070
  {
6954
7071
  value: value === void 0 ? value : (0, import_noya_utils12.round)(value, 2),
@@ -6957,12 +7074,13 @@ var DimensionInput = (0, import_react68.memo)(function DimensionInput2({
6957
7074
  disabled,
6958
7075
  ...trigger === "change" ? { onChange: handleSetValue } : { onSubmit: handleSetValue }
6959
7076
  }
6960
- ), label && /* @__PURE__ */ import_react68.default.createElement(InputField.Label, null, label));
7077
+ ), label && /* @__PURE__ */ import_react69.default.createElement(InputField.Label, null, label));
6961
7078
  });
6962
7079
  // Annotate the CommonJS export names for ESM import in node:
6963
7080
  0 && (module.exports = {
6964
7081
  ActivityIndicator,
6965
7082
  ArrayController,
7083
+ AutoResizingTextArea,
6966
7084
  Avatar,
6967
7085
  AvatarStack,
6968
7086
  Body,
@@ -6996,6 +7114,7 @@ var DimensionInput = (0, import_react68.memo)(function DimensionInput2({
6996
7114
  Heading4,
6997
7115
  Heading5,
6998
7116
  IconButton,
7117
+ Icons,
6999
7118
  ImageDataProvider,
7000
7119
  InputElement,
7001
7120
  InputField,
@@ -7041,11 +7160,13 @@ var DimensionInput = (0, import_react68.memo)(function DimensionInput2({
7041
7160
  lightTheme,
7042
7161
  mediaQuery,
7043
7162
  normalizeListDestinationIndex,
7163
+ renderIcon,
7044
7164
  rgbaToSketchColor,
7045
7165
  size,
7046
7166
  sketchColorToHex,
7047
7167
  sketchColorToRgba,
7048
7168
  sketchColorToRgbaString,
7169
+ useAutoResize,
7049
7170
  useCurrentFloatingWindowInternal,
7050
7171
  useDesignSystemConfiguration,
7051
7172
  useDesignSystemTheme,