@noya-app/noya-designsystem 0.1.14 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -15,14 +15,14 @@ var Spinner = styled.div`
15
15
  display: flex;
16
16
  justify-content: center;
17
17
  align-items: center;
18
- opacity: ${({ opacity }) => opacity};
18
+ opacity: ${({ $opacity }) => $opacity};
19
19
  `;
20
20
  var SpinnerCircle = styled.div`
21
- border: 2px solid ${({ trackColor }) => trackColor};
22
- border-top: 2px solid ${({ color }) => color};
21
+ border: 2px solid ${({ $trackColor }) => $trackColor};
22
+ border-top: 2px solid ${({ $color }) => $color};
23
23
  border-radius: 50%;
24
- width: ${({ size: size2 }) => `${size2}px`};
25
- height: ${({ size: size2 }) => `${size2}px`};
24
+ width: ${({ $size }) => `${$size}px`};
25
+ height: ${({ $size }) => `${$size}px`};
26
26
  animation: ${spin} 1s linear infinite;
27
27
  `;
28
28
  var ActivityIndicator = memo(function ActivityIndicator2({
@@ -31,7 +31,7 @@ var ActivityIndicator = memo(function ActivityIndicator2({
31
31
  color = "black",
32
32
  trackColor = "rgba(0, 0, 0, 0.1)"
33
33
  }) {
34
- return /* @__PURE__ */ React.createElement(Spinner, { opacity }, /* @__PURE__ */ React.createElement(SpinnerCircle, { size: size2, color, trackColor }));
34
+ return /* @__PURE__ */ React.createElement(Spinner, { $opacity: opacity }, /* @__PURE__ */ React.createElement(SpinnerCircle, { $size: size2, $color: color, $trackColor: trackColor }));
35
35
  });
36
36
 
37
37
  // src/components/Avatar.tsx
@@ -85,9 +85,9 @@ function withSeparatorElements(elements2, separator) {
85
85
  }
86
86
 
87
87
  // src/components/Stack.tsx
88
- var Element = styled2.div(({ styleProps, breakpoints }) => ({
89
- ...styleProps,
90
- ...mergeBreakpoints(breakpoints || [])
88
+ var Element = styled2.div(({ $styleProps, $breakpoints }) => ({
89
+ ...$styleProps,
90
+ ...mergeBreakpoints($breakpoints || [])
91
91
  }));
92
92
  var StackBase = forwardRef(function StackBase2({ id, as, children, separator, breakpoints, tabIndex, href, ...rest }, forwardedRef) {
93
93
  const elements2 = separator ? withSeparatorElements(Children2.toArray(children), separator) : children;
@@ -103,8 +103,8 @@ var StackBase = forwardRef(function StackBase2({ id, as, children, separator, br
103
103
  ref: forwardedRef,
104
104
  id,
105
105
  as,
106
- styleProps,
107
- breakpoints,
106
+ $styleProps: styleProps,
107
+ $breakpoints: breakpoints,
108
108
  tabIndex,
109
109
  ...href && { href }
110
110
  },
@@ -173,10 +173,10 @@ var Avatar = forwardRef2(function Avatar2({
173
173
  }, forwardedRef) {
174
174
  return /* @__PURE__ */ React3.createElement(AvatarRoot, { ref: forwardedRef, size: size2, overflow, ...props }, /* @__PURE__ */ React3.createElement(AvatarImage, { src: image, alt: name3 }), /* @__PURE__ */ React3.createElement(AvatarFallback, { size: size2 }, fallback));
175
175
  });
176
- var AvatarStackItemWrapper = styled3.div(({ size: size2, theme }) => ({
176
+ var AvatarStackItemWrapper = styled3.div(({ $size, theme }) => ({
177
177
  position: "relative",
178
- width: size2,
179
- height: size2,
178
+ width: $size,
179
+ height: $size,
180
180
  marginLeft: "-8px",
181
181
  // outline: `2px solid ${theme.colors.sidebar.background}`,
182
182
  borderRadius: "50%",
@@ -193,7 +193,7 @@ function AvatarStack({
193
193
  return /* @__PURE__ */ React3.createElement(Stack.H, null, childrenArray.map((child, index) => {
194
194
  if (index === 0)
195
195
  return child;
196
- return /* @__PURE__ */ React3.createElement(AvatarStackItemWrapper, { size: size2, key: index }, child);
196
+ return /* @__PURE__ */ React3.createElement(AvatarStackItemWrapper, { $size: size2, key: index }, child);
197
197
  }));
198
198
  }
199
199
 
@@ -234,48 +234,49 @@ var Tooltip = memo3(function Tooltip2({ children, content }) {
234
234
  var ButtonElement = styled5.button(
235
235
  ({
236
236
  theme,
237
- active,
237
+ $active,
238
238
  disabled,
239
- variant,
240
- size: size2,
241
- flex,
242
- defaultBackground = theme.colors.inputBackground
239
+ $variant,
240
+ $size,
241
+ $flex,
242
+ $defaultBackground = theme.colors.inputBackground
243
243
  }) => ({
244
- ...size2 === "large" ? theme.textStyles.heading4 : theme.textStyles.button,
244
+ ...$size === "large" ? theme.textStyles.heading4 : theme.textStyles.button,
245
245
  textDecoration: "none",
246
246
  lineHeight: "1",
247
- flex: flex ?? "0 0 auto",
247
+ flex: $flex ?? "0 0 auto",
248
248
  position: "relative",
249
249
  border: "0",
250
250
  outline: "none",
251
251
  WebkitAppRegion: "no-drag",
252
252
  userSelect: "none",
253
- minWidth: variant === "normal" ? "31px" : void 0,
253
+ minWidth: $variant === "normal" ? "31px" : void 0,
254
254
  textAlign: "left",
255
255
  borderRadius: "4px",
256
- paddingTop: variant === "none" ? "0px" : "4px",
257
- paddingRight: variant === "none" ? "0px" : variant === "thin" ? "1px" : "8px",
258
- paddingBottom: variant === "none" ? "0px" : "4px",
259
- paddingLeft: variant === "none" ? "0px" : variant === "thin" ? "1px" : "8px",
260
- ...size2 === "large" && {
256
+ paddingTop: $variant === "none" ? "0px" : "4px",
257
+ paddingRight: $variant === "none" ? "0px" : $variant === "thin" ? "1px" : "8px",
258
+ paddingBottom: $variant === "none" ? "0px" : "4px",
259
+ paddingLeft: $variant === "none" ? "0px" : $variant === "thin" ? "1px" : "8px",
260
+ ...$size === "large" && {
261
261
  paddingTop: "12px",
262
262
  paddingRight: "16px",
263
263
  paddingBottom: "12px",
264
264
  paddingLeft: "16px"
265
265
  },
266
- background: active ? theme.colors.primary : variant === "primaryGradient" ? `linear-gradient(90deg, ${theme.colors.primary}, ${theme.colors.primaryLight})` : variant === "none" || variant === "thin" ? "transparent" : defaultBackground,
267
- color: active ? "white" : theme.colors.text,
266
+ background: $active ? theme.colors.primary : $variant === "primaryGradient" ? `linear-gradient(90deg, ${theme.colors.primary}, ${theme.colors.primaryLight})` : $variant === "none" || $variant === "thin" ? "transparent" : $defaultBackground,
267
+ color: $active ? "white" : theme.colors.text,
268
268
  opacity: disabled ? 0.25 : 1,
269
269
  "&:focus": {
270
- boxShadow: `0 0 0 1px ${theme.colors.sidebar.background}, 0 0 0 3px ${theme.colors.primary}`
270
+ outline: `2px solid ${theme.colors.primary}`,
271
+ boxShadow: `0 0 0 1px ${theme.colors.popover.background} inset`
271
272
  },
272
273
  "&:hover": {
273
- background: variant === "primaryGradient" || active ? theme.colors.primaryLight : theme.colors.inputBackgroundLight
274
+ background: $variant === "primaryGradient" || $active ? theme.colors.primaryLight : theme.colors.inputBackgroundLight
274
275
  },
275
276
  "&:active": {
276
- background: variant === "primaryGradient" || active ? theme.colors.primary : theme.colors.activeBackground
277
+ background: $variant === "primaryGradient" || $active ? theme.colors.primary : theme.colors.activeBackground
277
278
  },
278
- ...variant === "primary" && {
279
+ ...$variant === "primary" && {
279
280
  background: theme.colors.primary,
280
281
  color: "white",
281
282
  "&:hover": {
@@ -285,7 +286,7 @@ var ButtonElement = styled5.button(
285
286
  background: theme.colors.primary
286
287
  }
287
288
  },
288
- ...variant === "secondary" && {
289
+ ...$variant === "secondary" && {
289
290
  background: theme.colors.secondary,
290
291
  color: "white",
291
292
  "&:hover": {
@@ -295,7 +296,7 @@ var ButtonElement = styled5.button(
295
296
  background: theme.colors.secondary
296
297
  }
297
298
  },
298
- ...variant === "secondaryBright" && {
299
+ ...$variant === "secondaryBright" && {
299
300
  background: "#0ab557",
300
301
  color: "white",
301
302
  "&:hover": {
@@ -305,7 +306,7 @@ var ButtonElement = styled5.button(
305
306
  opacity: 0.9
306
307
  }
307
308
  },
308
- ...variant === "white" && {
309
+ ...$variant === "white" && {
309
310
  background: "white",
310
311
  "&:hover": {
311
312
  opacity: 0.8
@@ -314,7 +315,7 @@ var ButtonElement = styled5.button(
314
315
  opacity: 0.9
315
316
  }
316
317
  },
317
- ...variant === "floating" && {
318
+ ...$variant === "floating" && {
318
319
  background: "white",
319
320
  color: theme.colors.text,
320
321
  boxShadow: "0 1px 2px rgba(0, 0, 0, 0.1)",
@@ -365,13 +366,13 @@ var Button = forwardRef3(function Button2({
365
366
  id,
366
367
  className,
367
368
  style: style3,
368
- flex,
369
+ $flex: flex,
369
370
  tabIndex,
370
- active,
371
+ $active: active,
371
372
  disabled,
372
- variant,
373
- size: size2,
374
- defaultBackground,
373
+ $variant: variant,
374
+ $size: size2,
375
+ $defaultBackground: defaultBackground,
375
376
  onClick,
376
377
  onDoubleClick: useCallback((event) => {
377
378
  event.stopPropagation();
@@ -385,12 +386,12 @@ var Button = forwardRef3(function Button2({
385
386
 
386
387
  // src/components/Chip.tsx
387
388
  import { Cross1Icon, PlusIcon } from "@noya-app/noya-icons";
388
- import React21, { memo as memo11 } from "react";
389
+ import React22, { memo as memo11 } from "react";
389
390
  import styled14 from "styled-components";
390
391
 
391
392
  // src/contexts/DesignSystemConfiguration.tsx
392
393
  import { getCurrentPlatform } from "@noya-app/noya-keymap";
393
- import React19, {
394
+ import React20, {
394
395
  createContext as createContext5,
395
396
  memo as memo10,
396
397
  useContext as useContext5,
@@ -714,7 +715,7 @@ var sizes = {
714
715
  };
715
716
 
716
717
  // src/contexts/DialogContext.tsx
717
- import React17, {
718
+ import React18, {
718
719
  createContext as createContext3,
719
720
  useCallback as useCallback12,
720
721
  useContext as useContext3,
@@ -726,23 +727,34 @@ import styled13 from "styled-components";
726
727
 
727
728
  // src/components/Dialog.tsx
728
729
  import * as DialogPrimitive from "@radix-ui/react-dialog";
729
- import React8, {
730
- forwardRef as forwardRef5,
730
+ import React9, {
731
+ forwardRef as forwardRef6,
731
732
  useImperativeHandle,
732
733
  useRef
733
734
  } from "react";
734
735
  import styled8 from "styled-components";
735
736
 
736
737
  // src/components/Spacer.tsx
738
+ import React8, { forwardRef as forwardRef5 } from "react";
737
739
  import styled7 from "styled-components";
738
- var SpacerVertical = styled7.span(({ size: size2, inline }) => ({
739
- display: inline ? "inline-block" : "block",
740
- ...size2 === void 0 ? { flex: 1 } : { minHeight: size2 }
740
+ var SpacerVertical_ = styled7.span(({ $size, $inline }) => ({
741
+ display: $inline ? "inline-block" : "block",
742
+ ...$size === void 0 ? { flex: 1 } : { minHeight: $size }
741
743
  }));
742
- var SpacerHorizontal = styled7.span(({ size: size2, inline }) => ({
743
- display: inline ? "inline-block" : "block",
744
- ...size2 === void 0 ? { flex: 1 } : { minWidth: size2 }
744
+ var SpacerVertical = forwardRef5(
745
+ ({ size: size2, inline, ...props }, ref) => {
746
+ return /* @__PURE__ */ React8.createElement(SpacerVertical_, { $size: size2, $inline: inline, ...props, ref });
747
+ }
748
+ );
749
+ var SpacerHorizontal_ = styled7.span(({ $size, $inline }) => ({
750
+ display: $inline ? "inline-block" : "block",
751
+ ...$size === void 0 ? { flex: 1 } : { minWidth: $size }
745
752
  }));
753
+ var SpacerHorizontal = forwardRef5(
754
+ ({ size: size2, inline, ...props }, ref) => {
755
+ return /* @__PURE__ */ React8.createElement(SpacerHorizontal_, { $size: size2, $inline: inline, ...props, ref });
756
+ }
757
+ );
746
758
  var Spacer;
747
759
  ((Spacer2) => {
748
760
  Spacer2.Vertical = SpacerVertical;
@@ -795,7 +807,7 @@ var CloseButtonContainer = styled8.div(({ theme }) => ({
795
807
  // boxShadow: `0 0 2px rgba(0, 0, 0, 0.2)`,
796
808
  border: `1px solid rgba(128,128,128,0.2)`
797
809
  }));
798
- var Dialog = forwardRef5(function Dialog2({
810
+ var Dialog = forwardRef6(function Dialog2({
799
811
  children,
800
812
  title,
801
813
  description,
@@ -813,7 +825,7 @@ var Dialog = forwardRef5(function Dialog2({
813
825
  return contentRef.current.contains(element);
814
826
  }
815
827
  }));
816
- return /* @__PURE__ */ React8.createElement(DialogPrimitive.Root, { open, onOpenChange }, /* @__PURE__ */ React8.createElement(StyledOverlay, null), /* @__PURE__ */ React8.createElement(
828
+ return /* @__PURE__ */ React9.createElement(DialogPrimitive.Root, { open, onOpenChange }, /* @__PURE__ */ React9.createElement(StyledOverlay, null), /* @__PURE__ */ React9.createElement(
817
829
  StyledContent,
818
830
  {
819
831
  ref: contentRef,
@@ -828,14 +840,14 @@ var Dialog = forwardRef5(function Dialog2({
828
840
  }
829
841
  }
830
842
  },
831
- /* @__PURE__ */ React8.createElement(CloseButtonContainer, null, /* @__PURE__ */ React8.createElement(DialogPrimitive.Close, { asChild: true }, /* @__PURE__ */ React8.createElement(IconButton, { iconName: "Cross1Icon" }))),
832
- title && /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(StyledTitle, null, title), /* @__PURE__ */ React8.createElement(Spacer.Vertical, { size: description ? 10 : 20 })),
833
- description && /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(Spacer.Vertical, { size: 10 }), /* @__PURE__ */ React8.createElement(StyledDescription, null, description), /* @__PURE__ */ React8.createElement(Spacer.Vertical, { size: 20 })),
843
+ /* @__PURE__ */ React9.createElement(CloseButtonContainer, null, /* @__PURE__ */ React9.createElement(DialogPrimitive.Close, { asChild: true }, /* @__PURE__ */ React9.createElement(IconButton, { iconName: "Cross1Icon" }))),
844
+ title && /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(StyledTitle, null, title), /* @__PURE__ */ React9.createElement(Spacer.Vertical, { size: description ? 10 : 20 })),
845
+ description && /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(Spacer.Vertical, { size: 10 }), /* @__PURE__ */ React9.createElement(StyledDescription, null, description), /* @__PURE__ */ React9.createElement(Spacer.Vertical, { size: 20 })),
834
846
  children
835
847
  ));
836
848
  });
837
- var FullscreenDialog = forwardRef5(function FullscreenDialog2({ style: style3, ...rest }, forwardedRef) {
838
- return /* @__PURE__ */ React8.createElement(
849
+ var FullscreenDialog = forwardRef6(function FullscreenDialog2({ style: style3, ...rest }, forwardedRef) {
850
+ return /* @__PURE__ */ React9.createElement(
839
851
  Dialog,
840
852
  {
841
853
  ref: forwardedRef,
@@ -859,16 +871,15 @@ var FullscreenDialog = forwardRef5(function FullscreenDialog2({ style: style3, .
859
871
 
860
872
  // src/components/InputField.tsx
861
873
  import { CaretDownIcon } from "@noya-app/noya-icons";
862
- import { memoize } from "@noya-app/noya-utils";
863
874
 
864
875
  // ../noya-react-utils/src/components/AutoSizer.tsx
865
- import React10, { memo as memo5, useRef as useRef2 } from "react";
876
+ import React11, { memo as memo5, useRef as useRef2 } from "react";
866
877
 
867
878
  // ../noya-react-utils/src/hooks/useSize.ts
868
- import * as React9 from "react";
879
+ import * as React10 from "react";
869
880
  function useSize(refToObserve, dimensions = "both") {
870
- const [size2, setSize] = React9.useState(void 0);
871
- React9.useEffect(() => {
881
+ const [size2, setSize] = React10.useState(void 0);
882
+ React10.useEffect(() => {
872
883
  if (refToObserve.current) {
873
884
  const elementToObserve = refToObserve.current;
874
885
  const resizeObserver = new ResizeObserver((entries) => {
@@ -921,7 +932,7 @@ var AutoSizer = memo5(function AutoSizer2({
921
932
  }) {
922
933
  const containerRef = useRef2(null);
923
934
  const containerSize = useSize(containerRef);
924
- return /* @__PURE__ */ React10.createElement("div", { ref: containerRef, style, className }, containerSize && containerSize.width > 0 && containerSize.height > 0 && children(containerSize));
935
+ return /* @__PURE__ */ React11.createElement("div", { ref: containerRef, style, className }, containerSize && containerSize.width > 0 && containerSize.height > 0 && children(containerSize));
925
936
  });
926
937
  var SingleDimensionAutoSizer = memo5(function SingleDimensionAutoSizer2({
927
938
  children,
@@ -930,11 +941,11 @@ var SingleDimensionAutoSizer = memo5(function SingleDimensionAutoSizer2({
930
941
  }) {
931
942
  const containerRef = useRef2(null);
932
943
  const containerSize = useSize(containerRef, dimension);
933
- return /* @__PURE__ */ React10.createElement("div", { ref: containerRef, style, className }, containerSize && containerSize[dimension] > 0 && children(containerSize[dimension]));
944
+ return /* @__PURE__ */ React11.createElement("div", { ref: containerRef, style, className }, containerSize && containerSize[dimension] > 0 && children(containerSize[dimension]));
934
945
  });
935
946
 
936
947
  // ../noya-react-utils/src/components/FileDropTarget.tsx
937
- import React11, {
948
+ import React12, {
938
949
  memo as memo6,
939
950
  useCallback as useCallback3
940
951
  } from "react";
@@ -1009,7 +1020,7 @@ var FileDropTarget = memo6(function FileDropTarget2({
1009
1020
  [onDropFiles, supportedFileTypes]
1010
1021
  );
1011
1022
  const { dropTargetProps, isDropTargetActive } = useFileDropTarget(handleFile);
1012
- return /* @__PURE__ */ React11.createElement("div", { style: style2, ...dropTargetProps }, typeof children === "function" ? children(isDropTargetActive) : children);
1023
+ return /* @__PURE__ */ React12.createElement("div", { style: style2, ...dropTargetProps }, typeof children === "function" ? children(isDropTargetActive) : children);
1013
1024
  });
1014
1025
 
1015
1026
  // ../noya-react-utils/src/hooks/useDeepArray.ts
@@ -1149,10 +1160,10 @@ function assignRef(ref, value) {
1149
1160
  }
1150
1161
 
1151
1162
  // src/components/InputField.tsx
1152
- import React16, {
1163
+ import React17, {
1153
1164
  Children as Children3,
1154
1165
  createContext as createContext2,
1155
- forwardRef as forwardRef8,
1166
+ forwardRef as forwardRef9,
1156
1167
  isValidElement as isValidElement2,
1157
1168
  memo as memo9,
1158
1169
  useCallback as useCallback11,
@@ -1192,8 +1203,8 @@ function handleNudge(e) {
1192
1203
  import { CheckIcon, ChevronRightIcon } from "@noya-app/noya-icons";
1193
1204
  import { useKeyboardShortcuts } from "@noya-app/noya-keymap";
1194
1205
  import * as RadixDropdownMenu from "@radix-ui/react-dropdown-menu";
1195
- import React13, {
1196
- forwardRef as forwardRef6,
1206
+ import React14, {
1207
+ forwardRef as forwardRef7,
1197
1208
  memo as memo8,
1198
1209
  useCallback as useCallback9,
1199
1210
  useMemo as useMemo5
@@ -1202,7 +1213,7 @@ import styled10 from "styled-components";
1202
1213
 
1203
1214
  // src/components/internal/Menu.tsx
1204
1215
  import { getShortcutDisplayParts } from "@noya-app/noya-keymap";
1205
- import React12, { memo as memo7 } from "react";
1216
+ import React13, { memo as memo7 } from "react";
1206
1217
  import styled9 from "styled-components";
1207
1218
  var SEPARATOR_ITEM = "separator";
1208
1219
  var CHECKBOX_WIDTH = 15;
@@ -1280,13 +1291,10 @@ function getKeyboardShortcutsForMenuItems(menuItems, onSelect) {
1280
1291
  );
1281
1292
  }
1282
1293
  var ShortcutElement = styled9.kbd(
1283
- ({
1284
- theme,
1285
- fixedWidth
1286
- }) => ({
1294
+ ({ theme, $fixedWidth }) => ({
1287
1295
  ...theme.textStyles.small,
1288
1296
  color: theme.colors.textDisabled,
1289
- ...fixedWidth && {
1297
+ ...$fixedWidth && {
1290
1298
  width: "0.9rem",
1291
1299
  textAlign: "center"
1292
1300
  }
@@ -1297,17 +1305,17 @@ var KeyboardShortcut = memo7(function KeyboardShortcut2({
1297
1305
  }) {
1298
1306
  const platform = useDesignSystemConfiguration().platform;
1299
1307
  const { keys, separator } = getShortcutDisplayParts(shortcut, platform);
1300
- const keyElements = keys.map((key) => /* @__PURE__ */ React12.createElement(
1308
+ const keyElements = keys.map((key) => /* @__PURE__ */ React13.createElement(
1301
1309
  ShortcutElement,
1302
1310
  {
1303
1311
  key,
1304
- fixedWidth: platform === "mac" && key.length === 1
1312
+ $fixedWidth: platform === "mac" && key.length === 1
1305
1313
  },
1306
1314
  key
1307
1315
  ));
1308
- return /* @__PURE__ */ React12.createElement(React12.Fragment, null, separator ? withSeparatorElements(
1316
+ return /* @__PURE__ */ React13.createElement(React13.Fragment, null, separator ? withSeparatorElements(
1309
1317
  keyElements,
1310
- /* @__PURE__ */ React12.createElement(ShortcutElement, null, separator)
1318
+ /* @__PURE__ */ React13.createElement(ShortcutElement, null, separator)
1311
1319
  ) : keyElements);
1312
1320
  });
1313
1321
 
@@ -1339,21 +1347,21 @@ var DropdownMenuItem = memo8(function ContextMenuItem({
1339
1347
  onSelect(value);
1340
1348
  }, [onSelect, value]);
1341
1349
  if (checked) {
1342
- return /* @__PURE__ */ React13.createElement(
1350
+ return /* @__PURE__ */ React14.createElement(
1343
1351
  CheckboxItemElement,
1344
1352
  {
1345
1353
  checked,
1346
1354
  disabled,
1347
1355
  onSelect: handleSelectItem
1348
1356
  },
1349
- /* @__PURE__ */ React13.createElement(StyledItemIndicator, null, /* @__PURE__ */ React13.createElement(CheckIcon, null)),
1350
- icon && /* @__PURE__ */ React13.createElement(React13.Fragment, null, icon, /* @__PURE__ */ React13.createElement(Spacer.Horizontal, { size: 8 })),
1357
+ /* @__PURE__ */ React14.createElement(StyledItemIndicator, null, /* @__PURE__ */ React14.createElement(CheckIcon, null)),
1358
+ icon && /* @__PURE__ */ React14.createElement(React14.Fragment, null, icon, /* @__PURE__ */ React14.createElement(Spacer.Horizontal, { size: 8 })),
1351
1359
  children
1352
1360
  );
1353
1361
  }
1354
- const element = /* @__PURE__ */ React13.createElement(ItemElement, { disabled, onSelect: handleSelectItem }, indented && /* @__PURE__ */ React13.createElement(Spacer.Horizontal, { size: CHECKBOX_WIDTH - CHECKBOX_RIGHT_INSET }), icon && /* @__PURE__ */ React13.createElement(React13.Fragment, null, icon, /* @__PURE__ */ React13.createElement(Spacer.Horizontal, { size: 8 })), children, shortcut && /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React13.createElement(Spacer.Horizontal, { size: 24 }), /* @__PURE__ */ React13.createElement(KeyboardShortcut, { shortcut })), items && items.length > 0 && /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React13.createElement(Spacer.Horizontal, { size: 16 }), /* @__PURE__ */ React13.createElement(ChevronRightIcon, null)));
1362
+ const element = /* @__PURE__ */ React14.createElement(ItemElement, { disabled, onSelect: handleSelectItem }, indented && /* @__PURE__ */ React14.createElement(Spacer.Horizontal, { size: CHECKBOX_WIDTH - CHECKBOX_RIGHT_INSET }), icon && /* @__PURE__ */ React14.createElement(React14.Fragment, null, icon, /* @__PURE__ */ React14.createElement(Spacer.Horizontal, { size: 8 })), children, shortcut && /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React14.createElement(Spacer.Horizontal, { size: 24 }), /* @__PURE__ */ React14.createElement(KeyboardShortcut, { shortcut })), items && items.length > 0 && /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React14.createElement(Spacer.Horizontal, { size: 16 }), /* @__PURE__ */ React14.createElement(ChevronRightIcon, null)));
1355
1363
  if (items && items.length > 0) {
1356
- return /* @__PURE__ */ React13.createElement(
1364
+ return /* @__PURE__ */ React14.createElement(
1357
1365
  DropdownMenuRoot,
1358
1366
  {
1359
1367
  isNested: true,
@@ -1369,7 +1377,7 @@ var DropdownMenuItem = memo8(function ContextMenuItem({
1369
1377
  });
1370
1378
  var Content5 = styled10(RadixDropdownMenu.Content)(styles.contentStyle);
1371
1379
  var SubContent2 = styled10(RadixDropdownMenu.SubContent)(styles.contentStyle);
1372
- var DropdownMenuRoot = forwardRef6(function DropdownMenuRoot2({
1380
+ var DropdownMenuRoot = forwardRef7(function DropdownMenuRoot2({
1373
1381
  items,
1374
1382
  children,
1375
1383
  onSelect,
@@ -1396,7 +1404,7 @@ var DropdownMenuRoot = forwardRef6(function DropdownMenuRoot2({
1396
1404
  const TriggerComponent = isNested ? RadixDropdownMenu.SubTrigger : RadixDropdownMenu.Trigger;
1397
1405
  const ContentComponent = isNested ? SubContent2 : Content5;
1398
1406
  const contentStyle = useMemo5(() => ({ zIndex: 1e3 }), []);
1399
- return /* @__PURE__ */ React13.createElement(RootComponent, { onOpenChange, open }, /* @__PURE__ */ React13.createElement(TriggerComponent, { ref: forwardedRef, asChild: true }, children), /* @__PURE__ */ React13.createElement(RadixDropdownMenu.Portal, null, /* @__PURE__ */ React13.createElement(
1407
+ return /* @__PURE__ */ React14.createElement(RootComponent, { onOpenChange, open }, /* @__PURE__ */ React14.createElement(TriggerComponent, { ref: forwardedRef, asChild: true }, children), /* @__PURE__ */ React14.createElement(RadixDropdownMenu.Portal, null, /* @__PURE__ */ React14.createElement(
1400
1408
  ContentComponent,
1401
1409
  {
1402
1410
  side,
@@ -1408,7 +1416,7 @@ var DropdownMenuRoot = forwardRef6(function DropdownMenuRoot2({
1408
1416
  ...{ onCloseAutoFocus }
1409
1417
  },
1410
1418
  items.map(
1411
- (item, index) => item === SEPARATOR_ITEM ? /* @__PURE__ */ React13.createElement(SeparatorElement, { key: index }) : /* @__PURE__ */ React13.createElement(
1419
+ (item, index) => item === SEPARATOR_ITEM ? /* @__PURE__ */ React14.createElement(SeparatorElement, { key: index }) : /* @__PURE__ */ React14.createElement(
1412
1420
  DropdownMenuItem,
1413
1421
  {
1414
1422
  key: item.value ?? index,
@@ -1430,8 +1438,8 @@ var DropdownMenu = memo8(DropdownMenuRoot);
1430
1438
 
1431
1439
  // src/components/internal/TextInput.tsx
1432
1440
  import { composeRefs } from "@radix-ui/react-compose-refs";
1433
- import React14, {
1434
- forwardRef as forwardRef7,
1441
+ import React15, {
1442
+ forwardRef as forwardRef8,
1435
1443
  useCallback as useCallback10,
1436
1444
  useEffect as useEffect9,
1437
1445
  useLayoutEffect as useLayoutEffect3,
@@ -1480,8 +1488,8 @@ function useGlobalInputBlurTrigger() {
1480
1488
  }
1481
1489
 
1482
1490
  // src/components/internal/TextInput.tsx
1483
- var ReadOnlyTextInput = forwardRef7(function ReadOnlyTextInput2({ onKeyDown, onFocusChange, value, ...rest }, forwardedRef) {
1484
- return /* @__PURE__ */ React14.createElement(
1491
+ var ReadOnlyTextInput = forwardRef8(function ReadOnlyTextInput2({ onKeyDown, onFocusChange, value, ...rest }, forwardedRef) {
1492
+ return /* @__PURE__ */ React15.createElement(
1485
1493
  "input",
1486
1494
  {
1487
1495
  ref: forwardedRef,
@@ -1492,7 +1500,7 @@ var ReadOnlyTextInput = forwardRef7(function ReadOnlyTextInput2({ onKeyDown, onF
1492
1500
  }
1493
1501
  );
1494
1502
  });
1495
- var ControlledTextInput = forwardRef7(function ControlledTextInput2({
1503
+ var ControlledTextInput = forwardRef8(function ControlledTextInput2({
1496
1504
  onKeyDown,
1497
1505
  value,
1498
1506
  onChange,
@@ -1515,7 +1523,7 @@ var ControlledTextInput = forwardRef7(function ControlledTextInput2({
1515
1523
  },
1516
1524
  [onFocusCapture, onFocusChange]
1517
1525
  );
1518
- return /* @__PURE__ */ React14.createElement(
1526
+ return /* @__PURE__ */ React15.createElement(
1519
1527
  "input",
1520
1528
  {
1521
1529
  ref: forwardedRef,
@@ -1531,7 +1539,7 @@ var ControlledTextInput = forwardRef7(function ControlledTextInput2({
1531
1539
  }
1532
1540
  );
1533
1541
  });
1534
- var SubmittableTextInput = forwardRef7(function SubmittableTextInput2({
1542
+ var SubmittableTextInput = forwardRef8(function SubmittableTextInput2({
1535
1543
  onKeyDown,
1536
1544
  value,
1537
1545
  onSubmit,
@@ -1542,7 +1550,7 @@ var SubmittableTextInput = forwardRef7(function SubmittableTextInput2({
1542
1550
  submitAutomaticallyAfterDelay,
1543
1551
  ...rest
1544
1552
  }, forwardedRef) {
1545
- const ref = React14.useRef(null);
1553
+ const ref = React15.useRef(null);
1546
1554
  const latestValue = useRef9(value);
1547
1555
  latestValue.current = value;
1548
1556
  const userDidEdit = useRef9(false);
@@ -1626,7 +1634,7 @@ var SubmittableTextInput = forwardRef7(function SubmittableTextInput2({
1626
1634
  }
1627
1635
  };
1628
1636
  }, [internalValue, submitAutomaticallyAfterDelay]);
1629
- return /* @__PURE__ */ React14.createElement(
1637
+ return /* @__PURE__ */ React15.createElement(
1630
1638
  "input",
1631
1639
  {
1632
1640
  ref: composeRefs(ref, forwardedRef),
@@ -1639,7 +1647,7 @@ var SubmittableTextInput = forwardRef7(function SubmittableTextInput2({
1639
1647
  }
1640
1648
  );
1641
1649
  });
1642
- var TextInput_default = forwardRef7(function TextInput(props, forwardedRef) {
1650
+ var TextInput_default = forwardRef8(function TextInput(props, forwardedRef) {
1643
1651
  const commonProps = {
1644
1652
  onPointerDown: useCallback10(
1645
1653
  (event) => event.stopPropagation(),
@@ -1658,17 +1666,17 @@ var TextInput_default = forwardRef7(function TextInput(props, forwardedRef) {
1658
1666
  ...props
1659
1667
  };
1660
1668
  if ("readOnly" in commonProps) {
1661
- return /* @__PURE__ */ React14.createElement(ReadOnlyTextInput, { ref: forwardedRef, ...commonProps, readOnly: true });
1669
+ return /* @__PURE__ */ React15.createElement(ReadOnlyTextInput, { ref: forwardedRef, ...commonProps, readOnly: true });
1662
1670
  } else if ("onChange" in commonProps) {
1663
- return /* @__PURE__ */ React14.createElement(ControlledTextInput, { ref: forwardedRef, ...commonProps });
1671
+ return /* @__PURE__ */ React15.createElement(ControlledTextInput, { ref: forwardedRef, ...commonProps });
1664
1672
  } else {
1665
- return /* @__PURE__ */ React14.createElement(SubmittableTextInput, { ref: forwardedRef, ...commonProps });
1673
+ return /* @__PURE__ */ React15.createElement(SubmittableTextInput, { ref: forwardedRef, ...commonProps });
1666
1674
  }
1667
1675
  });
1668
1676
 
1669
1677
  // src/components/Popover.tsx
1670
1678
  import * as PopoverPrimitive from "@radix-ui/react-popover";
1671
- import React15 from "react";
1679
+ import React16 from "react";
1672
1680
  import styled11 from "styled-components";
1673
1681
  var ContentElement = styled11(PopoverPrimitive.Content)(({ theme, variant }) => ({
1674
1682
  borderRadius: 4,
@@ -1715,7 +1723,7 @@ function Popover({
1715
1723
  onFocusOutside,
1716
1724
  onClickClose
1717
1725
  }) {
1718
- return /* @__PURE__ */ React15.createElement(PopoverPrimitive.Root, { open, onOpenChange }, /* @__PURE__ */ React15.createElement(PopoverPrimitive.Trigger, { asChild: true }, trigger), /* @__PURE__ */ React15.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React15.createElement(
1726
+ return /* @__PURE__ */ React16.createElement(PopoverPrimitive.Root, { open, onOpenChange }, /* @__PURE__ */ React16.createElement(PopoverPrimitive.Trigger, { asChild: true }, trigger), /* @__PURE__ */ React16.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React16.createElement(
1719
1727
  ContentElement,
1720
1728
  {
1721
1729
  variant,
@@ -1737,8 +1745,8 @@ function Popover({
1737
1745
  }
1738
1746
  },
1739
1747
  children,
1740
- showArrow && /* @__PURE__ */ React15.createElement(ArrowElement, null),
1741
- closable && /* @__PURE__ */ React15.createElement(PopoverClose, null, /* @__PURE__ */ React15.createElement(IconButton, { iconName: "Cross2Icon", onClick: onClickClose }))
1748
+ showArrow && /* @__PURE__ */ React16.createElement(ArrowElement, null),
1749
+ closable && /* @__PURE__ */ React16.createElement(PopoverClose, null, /* @__PURE__ */ React16.createElement(IconButton, { iconName: "Cross2Icon", onClick: onClickClose }))
1742
1750
  )));
1743
1751
  }
1744
1752
 
@@ -1753,26 +1761,26 @@ var InputFieldContext = createContext2({
1753
1761
  onFocusChange: () => {
1754
1762
  }
1755
1763
  });
1756
- var LabelContainer = styled12.label(({ theme, labelPosition, hasDropdown, pointerEvents }) => ({
1764
+ var LabelContainer = styled12.label(({ theme, $labelPosition, $hasDropdown, pointerEvents }) => ({
1757
1765
  ...theme.textStyles.label,
1758
1766
  fontWeight: "bold",
1759
1767
  color: theme.colors.textDisabled,
1760
1768
  position: "absolute",
1761
1769
  top: 0,
1762
- right: labelPosition === "end" ? 0 : void 0,
1770
+ right: $labelPosition === "end" ? 0 : void 0,
1763
1771
  bottom: 0,
1764
- left: labelPosition === "start" ? 0 : void 0,
1772
+ left: $labelPosition === "start" ? 0 : void 0,
1765
1773
  display: "flex",
1766
1774
  alignItems: "center",
1767
1775
  pointerEvents,
1768
1776
  userSelect: "none",
1769
- ...labelPosition === "start" ? { justifyContent: "flex-start", paddingLeft: "6px" } : {
1777
+ ...$labelPosition === "start" ? { justifyContent: "flex-start", paddingLeft: "6px" } : {
1770
1778
  justifyContent: "flex-end",
1771
- paddingRight: hasDropdown ? "16px" : "6px"
1779
+ paddingRight: $hasDropdown ? "16px" : "6px"
1772
1780
  }
1773
1781
  }));
1774
1782
  var InputFieldLabel = memo9(
1775
- forwardRef8(function InputFieldLabel2({ children = false, pointerEvents = "none", style: style3 }, forwardedRef) {
1783
+ forwardRef9(function InputFieldLabel2({ children = false, pointerEvents = "none", style: style3 }, forwardedRef) {
1776
1784
  const { labelPosition, hasDropdown, setLabelWidth } = useContext2(InputFieldContext);
1777
1785
  const ref = useRef10(null);
1778
1786
  useLayoutEffect4(() => {
@@ -1783,7 +1791,7 @@ var InputFieldLabel = memo9(
1783
1791
  return;
1784
1792
  setLabelWidth(width);
1785
1793
  }, [setLabelWidth]);
1786
- return /* @__PURE__ */ React16.createElement(
1794
+ return /* @__PURE__ */ React17.createElement(
1787
1795
  LabelContainer,
1788
1796
  {
1789
1797
  ref: (element) => {
@@ -1791,8 +1799,8 @@ var InputFieldLabel = memo9(
1791
1799
  assignRef(forwardedRef, element);
1792
1800
  },
1793
1801
  pointerEvents,
1794
- labelPosition,
1795
- hasDropdown,
1802
+ $labelPosition: labelPosition,
1803
+ $hasDropdown: hasDropdown,
1796
1804
  style: style3
1797
1805
  },
1798
1806
  children
@@ -1816,13 +1824,13 @@ var InputFieldDropdownMenu = memo9(function InputFieldDropdownMenu2({ id, items,
1816
1824
  }),
1817
1825
  [size2]
1818
1826
  );
1819
- return /* @__PURE__ */ React16.createElement(DropdownContainer, null, /* @__PURE__ */ React16.createElement(DropdownMenu, { items, onSelect }, children || /* @__PURE__ */ React16.createElement(Button, { id, variant: "thin", flex: "1", contentStyle }, /* @__PURE__ */ React16.createElement(CaretDownIcon, null))));
1827
+ return /* @__PURE__ */ React17.createElement(DropdownContainer, null, /* @__PURE__ */ React17.createElement(DropdownMenu, { items, onSelect }, children || /* @__PURE__ */ React17.createElement(Button, { id, variant: "thin", flex: "1", contentStyle }, /* @__PURE__ */ React17.createElement(CaretDownIcon, null))));
1820
1828
  });
1821
1829
  var ButtonContainer = styled12.span(
1822
- ({ theme, size: size2 }) => ({
1830
+ ({ theme, $size }) => ({
1823
1831
  position: "absolute",
1824
- right: size2 === "large" ? "9px" : size2 === "medium" ? "4px" : "2px",
1825
- top: size2 === "large" ? "8px" : size2 === "medium" ? "4px" : "2px"
1832
+ right: $size === "large" ? "9px" : $size === "medium" ? "4px" : "2px",
1833
+ top: $size === "large" ? "8px" : $size === "medium" ? "4px" : "2px"
1826
1834
  })
1827
1835
  );
1828
1836
  var InputFieldButton = memo9(function InputFieldButton2({
@@ -1845,7 +1853,7 @@ var InputFieldButton = memo9(function InputFieldButton2({
1845
1853
  event.preventDefault();
1846
1854
  event.stopPropagation();
1847
1855
  }, []);
1848
- return /* @__PURE__ */ React16.createElement(ButtonContainer, { size: size2 }, /* @__PURE__ */ React16.createElement(
1856
+ return /* @__PURE__ */ React17.createElement(ButtonContainer, { $size: size2 }, /* @__PURE__ */ React17.createElement(
1849
1857
  Button,
1850
1858
  {
1851
1859
  variant: "floating",
@@ -1856,42 +1864,26 @@ var InputFieldButton = memo9(function InputFieldButton2({
1856
1864
  children
1857
1865
  ));
1858
1866
  });
1859
- var createCrossSVGString = memoize(
1860
- (color) => `<svg width='15' height='15' viewBox='0 0 15 15' fill='${color}' xmlns='http://www.w3.org/2000/svg'>
1861
- <path d='M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z' fill-rule='evenodd' clip-rule='evenodd'></path>
1862
- </svg>`
1863
- );
1864
- var ignoredProps = /* @__PURE__ */ new Set([
1865
- "labelPosition",
1866
- "labelSize",
1867
- "hasLabel",
1868
- "hasDropdown",
1869
- "textAlign",
1870
- "variant",
1871
- "onNudge"
1872
- ]);
1873
- var InputElement = styled12(TextInput_default).withConfig({
1874
- shouldForwardProp: (prop) => ignoredProps.has(prop) ? false : true
1875
- })(
1876
- ({
1877
- theme,
1878
- labelPosition,
1879
- labelSize,
1880
- hasDropdown,
1881
- textAlign,
1882
- disabled,
1883
- hasLabel,
1884
- readOnly,
1885
- variant = "normal",
1886
- size: size2
1887
- }) => ({
1867
+ var InputElement = styled12(TextInput_default)(({
1868
+ theme,
1869
+ $labelPosition,
1870
+ $labelSize,
1871
+ $hasDropdown,
1872
+ $textAlign,
1873
+ disabled,
1874
+ $hasLabel,
1875
+ readOnly,
1876
+ $variant = "normal",
1877
+ $size
1878
+ }) => {
1879
+ return {
1888
1880
  // placeholder
1889
1881
  "&::placeholder": {
1890
1882
  color: theme.colors.textDisabled
1891
1883
  },
1892
1884
  ...theme.textStyles.small,
1893
1885
  color: readOnly ? theme.colors.textMuted : disabled ? theme.colors.textDisabled : theme.colors.text,
1894
- ...size2 === "small" && {
1886
+ ...$size === "small" && {
1895
1887
  fontSize: "11px"
1896
1888
  },
1897
1889
  width: "0px",
@@ -1901,18 +1893,18 @@ var InputElement = styled12(TextInput_default).withConfig({
1901
1893
  border: "0",
1902
1894
  outline: "none",
1903
1895
  minWidth: "0",
1904
- textAlign: textAlign ?? "left",
1896
+ textAlign: $textAlign ?? "left",
1905
1897
  alignSelf: "stretch",
1906
1898
  borderRadius: "4px",
1907
- paddingTop: size2 === "large" ? "10px" : size2 === "medium" ? "4px" : "1px",
1908
- paddingBottom: size2 === "large" ? "10px" : size2 === "medium" ? "4px" : "1px",
1909
- paddingLeft: (size2 === "large" ? 10 : size2 === "medium" ? 6 : 4) + (hasLabel && labelPosition === "start" ? 6 + labelSize : 0) + "px",
1910
- paddingRight: (size2 === "large" ? 10 : size2 === "medium" ? 6 : 4) + (hasLabel && labelPosition === "end" ? 6 + labelSize : 0) + (hasDropdown ? 11 : 0) + "px",
1899
+ paddingTop: $size === "large" ? "10px" : $size === "medium" ? "4px" : "1px",
1900
+ paddingBottom: $size === "large" ? "10px" : $size === "medium" ? "4px" : "1px",
1901
+ paddingLeft: ($size === "large" ? 10 : $size === "medium" ? 6 : 4) + ($hasLabel && $labelPosition === "start" ? 6 + $labelSize : 0) + "px",
1902
+ paddingRight: ($size === "large" ? 10 : $size === "medium" ? 6 : 4) + ($hasLabel && $labelPosition === "end" ? 6 + $labelSize : 0) + ($hasDropdown ? 11 : 0) + "px",
1911
1903
  background: theme.colors.inputBackground,
1912
1904
  "&:focus": {
1913
1905
  boxShadow: `0 0 0 2px ${theme.colors.primary}`
1914
1906
  },
1915
- ...variant === "bare" && {
1907
+ ...$variant === "bare" && {
1916
1908
  paddingTop: "4px",
1917
1909
  paddingRight: "4px",
1918
1910
  paddingBottom: "4px",
@@ -1921,18 +1913,18 @@ var InputElement = styled12(TextInput_default).withConfig({
1921
1913
  marginRight: "-4px",
1922
1914
  marginBottom: "-4px",
1923
1915
  marginLeft: "-4px"
1924
- },
1925
- '&[type="search"]::-webkit-search-cancel-button': {
1926
- appearance: "none",
1927
- height: "15px",
1928
- width: "15px",
1929
- background: `url("data:image/svg+xml;utf8,${createCrossSVGString(
1930
- theme.colors.icon
1931
- )}") no-repeat`
1932
1916
  }
1933
- })
1934
- );
1935
- var InputFieldInput = forwardRef8(function InputFieldInput2(props, forwardedRef) {
1917
+ // '&[type="search"]::-webkit-search-cancel-button': {
1918
+ // appearance: "none",
1919
+ // height: "15px",
1920
+ // width: "15px",
1921
+ // background: `url("data:image/svg+xml;utf8,${createCrossSVGString(
1922
+ // theme.colors.icon
1923
+ // )}") no-repeat`,
1924
+ // },
1925
+ };
1926
+ });
1927
+ var InputFieldInput = forwardRef9(function InputFieldInput2(props, forwardedRef) {
1936
1928
  const {
1937
1929
  labelPosition,
1938
1930
  labelSize,
@@ -1951,15 +1943,15 @@ var InputFieldInput = forwardRef8(function InputFieldInput2(props, forwardedRef)
1951
1943
  useLayoutEffect4(() => {
1952
1944
  setInputRef?.(forwardedRef);
1953
1945
  }, [forwardedRef, setInputRef]);
1954
- return /* @__PURE__ */ React16.createElement(
1946
+ return /* @__PURE__ */ React17.createElement(
1955
1947
  InputElement,
1956
1948
  {
1957
1949
  ref: forwardedRef,
1958
- labelPosition,
1959
- labelSize,
1960
- hasLabel,
1961
- hasDropdown,
1962
- size: size2,
1950
+ $labelPosition: labelPosition,
1951
+ $labelSize: labelSize,
1952
+ $hasLabel: hasLabel,
1953
+ $hasDropdown: hasDropdown,
1954
+ $size: size2,
1963
1955
  onFocusChange: handleFocusChange,
1964
1956
  ...props
1965
1957
  }
@@ -1974,14 +1966,14 @@ var InputFieldTypeahead = (props) => {
1974
1966
  size: size2,
1975
1967
  onFocusChange
1976
1968
  } = useContext2(InputFieldContext);
1977
- return /* @__PURE__ */ React16.createElement(
1969
+ return /* @__PURE__ */ React17.createElement(
1978
1970
  InputElement,
1979
1971
  {
1980
- labelPosition,
1981
- labelSize,
1982
- hasLabel,
1983
- hasDropdown,
1984
- size: size2,
1972
+ $labelPosition: labelPosition,
1973
+ $labelSize: labelSize,
1974
+ $hasLabel: hasLabel,
1975
+ $hasDropdown: hasDropdown,
1976
+ $size: size2,
1985
1977
  onFocusChange,
1986
1978
  readOnly: true,
1987
1979
  placeholder: props.value,
@@ -2005,7 +1997,7 @@ function parseNumber(value) {
2005
1997
  return value ? Number(value) : NaN;
2006
1998
  }
2007
1999
  function InputFieldNumberInput(props) {
2008
- const { value, placeholder, onNudge } = props;
2000
+ const { value, placeholder, onNudge, ...rest } = props;
2009
2001
  const onSubmit = "onSubmit" in props ? props.onSubmit : void 0;
2010
2002
  const onChange = "onChange" in props ? props.onChange : void 0;
2011
2003
  const handleSubmit = useCallback11(
@@ -2034,10 +2026,10 @@ function InputFieldNumberInput(props) {
2034
2026
  },
2035
2027
  [onChange]
2036
2028
  );
2037
- return /* @__PURE__ */ React16.createElement(
2029
+ return /* @__PURE__ */ React17.createElement(
2038
2030
  InputFieldInput,
2039
2031
  {
2040
- ...props,
2032
+ ...rest,
2041
2033
  value: value === void 0 ? "" : String(value),
2042
2034
  placeholder,
2043
2035
  onKeyDown: handleKeyDown,
@@ -2046,12 +2038,12 @@ function InputFieldNumberInput(props) {
2046
2038
  );
2047
2039
  }
2048
2040
  var RootContainer = styled12.div(
2049
- ({ theme, flex, width }) => ({
2050
- flex: flex ?? "1",
2041
+ ({ theme, $flex, $width }) => ({
2042
+ flex: $flex ?? "1",
2051
2043
  display: "flex",
2052
2044
  flexDirection: "row",
2053
2045
  position: "relative",
2054
- maxWidth: typeof width === "number" ? `${width}px` : void 0
2046
+ maxWidth: typeof $width === "number" ? `${$width}px` : void 0
2055
2047
  })
2056
2048
  );
2057
2049
  function InputFieldRoot({
@@ -2072,9 +2064,9 @@ function InputFieldRoot({
2072
2064
  const hasLabel = childrenArray.some(
2073
2065
  (child) => isValidElement2(child) && child.type === InputFieldLabel
2074
2066
  );
2075
- const [isFocused, setIsFocused] = React16.useState(false);
2076
- const [measuredLabelSize, setMeasuredLabelSize] = React16.useState();
2077
- const [measuredWidth, setMeasuredWidth] = React16.useState();
2067
+ const [isFocused, setIsFocused] = React17.useState(false);
2068
+ const [measuredLabelSize, setMeasuredLabelSize] = React17.useState();
2069
+ const [measuredWidth, setMeasuredWidth] = React17.useState();
2078
2070
  const handleFocusChange = useCallback11(
2079
2071
  (isFocused2) => {
2080
2072
  setIsFocused(isFocused2);
@@ -2082,7 +2074,7 @@ function InputFieldRoot({
2082
2074
  },
2083
2075
  [onFocusChange]
2084
2076
  );
2085
- const [inputRef, setInputRef] = React16.useState();
2077
+ const [inputRef, setInputRef] = React17.useState();
2086
2078
  useEffect10(() => {
2087
2079
  if (inputRef && typeof inputRef !== "function") {
2088
2080
  setMeasuredWidth?.(
@@ -2115,8 +2107,8 @@ function InputFieldRoot({
2115
2107
  inputRef
2116
2108
  ]
2117
2109
  );
2118
- const rootElement = /* @__PURE__ */ React16.createElement(RootContainer, { id, width, flex }, children);
2119
- return /* @__PURE__ */ React16.createElement(InputFieldContext.Provider, { value: contextValue }, renderPopoverContent ? /* @__PURE__ */ React16.createElement(
2110
+ const rootElement = /* @__PURE__ */ React17.createElement(RootContainer, { id, $width: width, $flex: flex }, children);
2111
+ return /* @__PURE__ */ React17.createElement(InputFieldContext.Provider, { value: contextValue }, renderPopoverContent ? /* @__PURE__ */ React17.createElement(
2120
2112
  Popover,
2121
2113
  {
2122
2114
  open: true,
@@ -2132,7 +2124,7 @@ function InputFieldRoot({
2132
2124
  event.stopPropagation();
2133
2125
  }
2134
2126
  },
2135
- measuredWidth && /* @__PURE__ */ React16.createElement(Stack.V, { width: measuredWidth, overflow: "hidden" }, renderPopoverContent({ width: measuredWidth }))
2127
+ measuredWidth && /* @__PURE__ */ React17.createElement(Stack.V, { width: measuredWidth, overflow: "hidden" }, renderPopoverContent({ width: measuredWidth }))
2136
2128
  ) : rootElement);
2137
2129
  }
2138
2130
  var InputField;
@@ -2213,7 +2205,7 @@ var DialogProvider = function DialogProvider2({
2213
2205
  return false;
2214
2206
  return dialogRef.current.containsElement(element);
2215
2207
  }, []);
2216
- return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
2208
+ return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(
2217
2209
  DialogContext.Provider,
2218
2210
  {
2219
2211
  value: useMemo7(
@@ -2222,7 +2214,7 @@ var DialogProvider = function DialogProvider2({
2222
2214
  )
2223
2215
  },
2224
2216
  children
2225
- ), /* @__PURE__ */ React17.createElement(
2217
+ ), /* @__PURE__ */ React18.createElement(
2226
2218
  Dialog,
2227
2219
  {
2228
2220
  ref: dialogRef,
@@ -2243,7 +2235,7 @@ var DialogProvider = function DialogProvider2({
2243
2235
  inputRef.current?.setSelectionRange(0, inputRef.current.value.length);
2244
2236
  }, [])
2245
2237
  },
2246
- /* @__PURE__ */ React17.createElement(InputField.Root, null, /* @__PURE__ */ React17.createElement(
2238
+ /* @__PURE__ */ React18.createElement(InputField.Root, null, /* @__PURE__ */ React18.createElement(
2247
2239
  InputField.Input,
2248
2240
  {
2249
2241
  ref: inputRef,
@@ -2259,8 +2251,8 @@ var DialogProvider = function DialogProvider2({
2259
2251
  onKeyDown: handleKeyDown
2260
2252
  }
2261
2253
  )),
2262
- /* @__PURE__ */ React17.createElement(Spacer.Vertical, { size: 20 }),
2263
- /* @__PURE__ */ React17.createElement(Row, null, /* @__PURE__ */ React17.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React17.createElement(Button, { onClick: close }, "Cancel"), /* @__PURE__ */ React17.createElement(Spacer.Horizontal, { size: 16 }), /* @__PURE__ */ React17.createElement(Button, { disabled: !contents?.inputValue, onClick: submit }, "Submit"))
2254
+ /* @__PURE__ */ React18.createElement(Spacer.Vertical, { size: 20 }),
2255
+ /* @__PURE__ */ React18.createElement(Row, null, /* @__PURE__ */ React18.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React18.createElement(Button, { onClick: close }, "Cancel"), /* @__PURE__ */ React18.createElement(Spacer.Horizontal, { size: 16 }), /* @__PURE__ */ React18.createElement(Button, { disabled: !contents?.inputValue, onClick: submit }, "Submit"))
2264
2256
  ));
2265
2257
  };
2266
2258
  function useDialog() {
@@ -2279,7 +2271,7 @@ function useDialogContainsElement() {
2279
2271
 
2280
2272
  // src/contexts/FloatingWindowContext.tsx
2281
2273
  import { uuid } from "@noya-app/noya-utils";
2282
- import React18, { createContext as createContext4, useContext as useContext4, useMemo as useMemo8, useState as useState12 } from "react";
2274
+ import React19, { createContext as createContext4, useContext as useContext4, useMemo as useMemo8, useState as useState12 } from "react";
2283
2275
  import { createPortal } from "react-dom";
2284
2276
  var FloatingWindowContext = createContext4(void 0);
2285
2277
  var CurrentWindowContext = createContext4(void 0);
@@ -2292,7 +2284,7 @@ var FloatingWindowProvider = ({
2292
2284
  const id = uuid();
2293
2285
  setWindows((windows2) => ({
2294
2286
  ...windows2,
2295
- [id]: /* @__PURE__ */ React18.createElement(CurrentWindowContext.Provider, { value: { id } }, element)
2287
+ [id]: /* @__PURE__ */ React19.createElement(CurrentWindowContext.Provider, { value: { id } }, element)
2296
2288
  }));
2297
2289
  return id;
2298
2290
  };
@@ -2304,7 +2296,7 @@ var FloatingWindowProvider = ({
2304
2296
  };
2305
2297
  return { createWindow, closeWindow };
2306
2298
  }, []);
2307
- return /* @__PURE__ */ React18.createElement(FloatingWindowContext.Provider, { value: contextValue }, children, Object.entries(windows).map(
2299
+ return /* @__PURE__ */ React19.createElement(FloatingWindowContext.Provider, { value: contextValue }, children, Object.entries(windows).map(
2308
2300
  ([id, element]) => createPortal(element, document.body, id)
2309
2301
  ));
2310
2302
  };
@@ -2331,13 +2323,17 @@ var DesignSystemThemeProvider = memo10(
2331
2323
  children,
2332
2324
  theme
2333
2325
  }) {
2334
- const parentTheme = useTheme2();
2326
+ let parentTheme;
2327
+ try {
2328
+ parentTheme = useTheme2();
2329
+ } catch (e) {
2330
+ }
2335
2331
  if (theme) {
2336
- return /* @__PURE__ */ React19.createElement(ThemeProvider, { theme }, children);
2332
+ return /* @__PURE__ */ React20.createElement(ThemeProvider, { theme }, children);
2337
2333
  } else if (parentTheme) {
2338
2334
  return children;
2339
2335
  } else {
2340
- return /* @__PURE__ */ React19.createElement(ThemeProvider, { theme: light_exports }, children);
2336
+ return /* @__PURE__ */ React20.createElement(ThemeProvider, { theme: light_exports }, children);
2341
2337
  }
2342
2338
  }
2343
2339
  );
@@ -2364,7 +2360,7 @@ var DesignSystemConfigurationProvider = memo10(
2364
2360
  () => ({ platform: platform ?? internalPlatform }),
2365
2361
  [platform, internalPlatform]
2366
2362
  );
2367
- return /* @__PURE__ */ React19.createElement(DesignSystemConfigurationContext.Provider, { value: contextValue }, /* @__PURE__ */ React19.createElement(ThemeProvider, { theme }, /* @__PURE__ */ React19.createElement(DialogProvider, null, /* @__PURE__ */ React19.createElement(ToastProvider, null, /* @__PURE__ */ React19.createElement(FloatingWindowProvider, null, children)))));
2363
+ return /* @__PURE__ */ React20.createElement(DesignSystemConfigurationContext.Provider, { value: contextValue }, /* @__PURE__ */ React20.createElement(ThemeProvider, { theme }, /* @__PURE__ */ React20.createElement(DialogProvider, null, /* @__PURE__ */ React20.createElement(ToastProvider, null, /* @__PURE__ */ React20.createElement(FloatingWindowProvider, null, children)))));
2368
2364
  }
2369
2365
  );
2370
2366
  function useDesignSystemConfiguration() {
@@ -2375,7 +2371,7 @@ function useDesignSystemTheme() {
2375
2371
  }
2376
2372
 
2377
2373
  // src/hooks/useHover.ts
2378
- import * as React20 from "react";
2374
+ import * as React21 from "react";
2379
2375
  var globalIgnoreEmulatedMouseEvents = false;
2380
2376
  var hoverCount = 0;
2381
2377
  function setGlobalIgnoreEmulatedMouseEvents() {
@@ -2405,13 +2401,13 @@ function setupGlobalTouchEvents() {
2405
2401
  }
2406
2402
  function useHover(props = {}) {
2407
2403
  const { onHoverStart, onHoverChange, onHoverEnd, isDisabled } = props;
2408
- const [isHovered, setHovered] = React20.useState(false);
2409
- const state = React20.useRef({
2404
+ const [isHovered, setHovered] = React21.useState(false);
2405
+ const state = React21.useRef({
2410
2406
  isHovered: false,
2411
2407
  ignoreEmulatedMouseEvents: false
2412
2408
  }).current;
2413
- React20.useEffect(setupGlobalTouchEvents, []);
2414
- const hoverProps = React20.useMemo(
2409
+ React21.useEffect(setupGlobalTouchEvents, []);
2410
+ const hoverProps = React21.useMemo(
2415
2411
  function getHoverProps() {
2416
2412
  function triggerHoverStart(event, pointerType) {
2417
2413
  if (isDisabled || pointerType === "touch" || state.isHovered) {
@@ -2471,10 +2467,10 @@ function useHover(props = {}) {
2471
2467
  }
2472
2468
 
2473
2469
  // src/components/Chip.tsx
2474
- var ChipElement = styled14.span(({ theme, colorScheme, size: size2, variant, monospace, isInteractive }) => {
2475
- const color = colorScheme === "primary" ? theme.colors.primary : colorScheme === "secondary" ? theme.colors.secondary : theme.colors.text;
2476
- const backgroundColor = colorScheme === "primary" ? "rgb(238, 229, 255)" : colorScheme === "secondary" ? "rgb(205, 238, 231)" : colorScheme === "error" ? "rgb(255, 219, 219)" : theme.colors.inputBackground;
2477
- 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)";
2470
+ var ChipElement = styled14.span(({ theme, $colorScheme, $size, $variant, $monospace, $isInteractive }) => {
2471
+ const color = $colorScheme === "primary" ? theme.colors.primary : $colorScheme === "secondary" ? theme.colors.secondary : theme.colors.text;
2472
+ const backgroundColor = $colorScheme === "primary" ? "rgb(238, 229, 255)" : $colorScheme === "secondary" ? "rgb(205, 238, 231)" : $colorScheme === "error" ? "rgb(255, 219, 219)" : theme.colors.inputBackground;
2473
+ 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)";
2478
2474
  return {
2479
2475
  textTransform: "initial",
2480
2476
  borderRadius: 4,
@@ -2483,7 +2479,7 @@ var ChipElement = styled14.span(({ theme, colorScheme, size: size2, variant, mon
2483
2479
  alignItems: "center",
2484
2480
  lineHeight: "1.4",
2485
2481
  whiteSpace: "pre",
2486
- ...size2 === "medium" ? {
2482
+ ...$size === "medium" ? {
2487
2483
  fontSize: "11px",
2488
2484
  padding: "4px 8px"
2489
2485
  } : {
@@ -2491,24 +2487,24 @@ var ChipElement = styled14.span(({ theme, colorScheme, size: size2, variant, mon
2491
2487
  padding: "0px 4px",
2492
2488
  lineHeight: "15px"
2493
2489
  },
2494
- ...monospace && {
2490
+ ...$monospace && {
2495
2491
  fontFamily: theme.fonts.monospace
2496
2492
  },
2497
- ...variant === "solid" ? {
2493
+ ...$variant === "solid" ? {
2498
2494
  color,
2499
2495
  backgroundColor
2500
- } : variant === "outlined" ? {
2496
+ } : $variant === "outlined" ? {
2501
2497
  color,
2502
2498
  backgroundColor: "transparent",
2503
2499
  boxShadow: `0 0 0 1px ${subtleColor} inset`
2504
2500
  } : {},
2505
2501
  "&:hover": {
2506
- ...variant === "outlined" && {
2502
+ ...$variant === "outlined" && {
2507
2503
  backgroundColor: subtleColor,
2508
2504
  boxShadow: "none"
2509
2505
  }
2510
2506
  },
2511
- ...isInteractive && {
2507
+ ...$isInteractive && {
2512
2508
  cursor: "pointer",
2513
2509
  "&:hover": {
2514
2510
  opacity: 0.85
@@ -2532,9 +2528,9 @@ var DeleteElement = styled14(Cross1Icon)(({ size: size2 }) => ({
2532
2528
  opacity: 0.85
2533
2529
  }
2534
2530
  }));
2535
- var ignoredProps2 = /* @__PURE__ */ new Set(["size", "isOnlyChild"]);
2531
+ var ignoredProps = /* @__PURE__ */ new Set(["size", "isOnlyChild"]);
2536
2532
  var AddElement = styled14(PlusIcon).withConfig({
2537
- shouldForwardProp: (prop) => !ignoredProps2.has(prop)
2533
+ shouldForwardProp: (prop) => !ignoredProps.has(prop)
2538
2534
  })(({ size: size2, isOnlyChild }) => ({
2539
2535
  position: "relative",
2540
2536
  marginLeft: "-2px",
@@ -2573,19 +2569,19 @@ var Chip = memo11(function Chip2({
2573
2569
  });
2574
2570
  const handleClick = !children && !deletable && addable ? onAdd : onClick;
2575
2571
  const color = colorScheme === "primary" ? theme.colors.primary : colorScheme === "secondary" ? theme.colors.secondary : theme.colors.text;
2576
- return /* @__PURE__ */ React21.createElement(
2572
+ return /* @__PURE__ */ React22.createElement(
2577
2573
  ChipElement,
2578
2574
  {
2579
- variant,
2580
- colorScheme,
2575
+ $variant: variant,
2576
+ $colorScheme: colorScheme,
2581
2577
  style: style3,
2582
2578
  onClick: handleClick,
2583
- size: size2,
2584
- monospace,
2585
- isInteractive: !!handleClick,
2579
+ $size: size2,
2580
+ $monospace: monospace,
2581
+ $isInteractive: !!handleClick,
2586
2582
  tabIndex
2587
2583
  },
2588
- addable && /* @__PURE__ */ React21.createElement(
2584
+ addable && /* @__PURE__ */ React22.createElement(
2589
2585
  AddElement,
2590
2586
  {
2591
2587
  size: size2,
@@ -2598,7 +2594,7 @@ var Chip = memo11(function Chip2({
2598
2594
  }
2599
2595
  ),
2600
2596
  children,
2601
- deletable && /* @__PURE__ */ React21.createElement(
2597
+ deletable && /* @__PURE__ */ React22.createElement(
2602
2598
  DeleteElement,
2603
2599
  {
2604
2600
  size: size2,
@@ -2617,7 +2613,7 @@ var Chip = memo11(function Chip2({
2617
2613
  import { CheckIcon as CheckIcon2, ChevronRightIcon as ChevronRightIcon2 } from "@noya-app/noya-icons";
2618
2614
  import { useKeyboardShortcuts as useKeyboardShortcuts2 } from "@noya-app/noya-keymap";
2619
2615
  import * as RadixContextMenu from "@radix-ui/react-context-menu";
2620
- import React22, {
2616
+ import React23, {
2621
2617
  memo as memo12,
2622
2618
  useCallback as useCallback13,
2623
2619
  useMemo as useMemo11
@@ -2654,32 +2650,32 @@ var ContextMenuItem2 = memo12(function ContextMenuItem3({
2654
2650
  onSelect(value);
2655
2651
  }, [onSelect, value]);
2656
2652
  if (checked) {
2657
- return /* @__PURE__ */ React22.createElement(
2653
+ return /* @__PURE__ */ React23.createElement(
2658
2654
  CheckboxItemElement2,
2659
2655
  {
2660
2656
  checked,
2661
2657
  disabled,
2662
2658
  onSelect: handleSelectItem
2663
2659
  },
2664
- /* @__PURE__ */ React22.createElement(StyledItemIndicator2, null, /* @__PURE__ */ React22.createElement(CheckIcon2, null)),
2660
+ /* @__PURE__ */ React23.createElement(StyledItemIndicator2, null, /* @__PURE__ */ React23.createElement(CheckIcon2, null)),
2665
2661
  children
2666
2662
  );
2667
2663
  }
2668
- const element = /* @__PURE__ */ React22.createElement(
2664
+ const element = /* @__PURE__ */ React23.createElement(
2669
2665
  ItemElement2,
2670
2666
  {
2671
2667
  disabled,
2672
2668
  onSelect: handleSelectItem,
2673
2669
  onPointerDown: handlePointerDown
2674
2670
  },
2675
- indented && /* @__PURE__ */ React22.createElement(Spacer.Horizontal, { size: CHECKBOX_WIDTH - CHECKBOX_RIGHT_INSET }),
2676
- icon && /* @__PURE__ */ React22.createElement(React22.Fragment, null, icon, /* @__PURE__ */ React22.createElement(Spacer.Horizontal, { size: 8 })),
2671
+ indented && /* @__PURE__ */ React23.createElement(Spacer.Horizontal, { size: CHECKBOX_WIDTH - CHECKBOX_RIGHT_INSET }),
2672
+ icon && /* @__PURE__ */ React23.createElement(React23.Fragment, null, icon, /* @__PURE__ */ React23.createElement(Spacer.Horizontal, { size: 8 })),
2677
2673
  children,
2678
- shortcut && /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React22.createElement(Spacer.Horizontal, { size: 24 }), /* @__PURE__ */ React22.createElement(KeyboardShortcut, { shortcut })),
2679
- items && items.length > 0 && /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React22.createElement(Spacer.Horizontal, { size: 16 }), /* @__PURE__ */ React22.createElement(ChevronRightIcon2, null))
2674
+ shortcut && /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React23.createElement(Spacer.Horizontal, { size: 24 }), /* @__PURE__ */ React23.createElement(KeyboardShortcut, { shortcut })),
2675
+ items && items.length > 0 && /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React23.createElement(Spacer.Horizontal, { size: 16 }), /* @__PURE__ */ React23.createElement(ChevronRightIcon2, null))
2680
2676
  );
2681
2677
  if (items && items.length > 0) {
2682
- return /* @__PURE__ */ React22.createElement(ContextMenuRoot, { isNested: true, items, onSelect }, element);
2678
+ return /* @__PURE__ */ React23.createElement(ContextMenuRoot, { isNested: true, items, onSelect }, element);
2683
2679
  } else {
2684
2680
  return element;
2685
2681
  }
@@ -2708,8 +2704,8 @@ function ContextMenuRoot({
2708
2704
  const RootComponent = isNested ? RadixContextMenu.Sub : RadixContextMenu.Root;
2709
2705
  const TriggerComponent = isNested ? RadixContextMenu.SubTrigger : RadixContextMenu.Trigger;
2710
2706
  const ContentComponent = isNested ? SubContent4 : Content8;
2711
- return /* @__PURE__ */ React22.createElement(RootComponent, { onOpenChange }, /* @__PURE__ */ React22.createElement(TriggerComponent, { asChild: true, onPointerDown }, children), /* @__PURE__ */ React22.createElement(RadixContextMenu.Portal, null, /* @__PURE__ */ React22.createElement(ContentComponent, null, items.map(
2712
- (item, index) => item === SEPARATOR_ITEM ? /* @__PURE__ */ React22.createElement(SeparatorElement2, { key: index }) : /* @__PURE__ */ React22.createElement(
2707
+ return /* @__PURE__ */ React23.createElement(RootComponent, { onOpenChange }, /* @__PURE__ */ React23.createElement(TriggerComponent, { asChild: true, onPointerDown }, children), /* @__PURE__ */ React23.createElement(RadixContextMenu.Portal, null, /* @__PURE__ */ React23.createElement(ContentComponent, null, items.map(
2708
+ (item, index) => item === SEPARATOR_ITEM ? /* @__PURE__ */ React23.createElement(SeparatorElement2, { key: index }) : /* @__PURE__ */ React23.createElement(
2713
2709
  ContextMenuItem2,
2714
2710
  {
2715
2711
  key: item.value ?? index,
@@ -2729,23 +2725,47 @@ function ContextMenuRoot({
2729
2725
  var ContextMenu = memo12(ContextMenuRoot);
2730
2726
 
2731
2727
  // src/components/Divider.tsx
2732
- import React23, { memo as memo13 } from "react";
2728
+ import React24, { memo as memo13 } from "react";
2733
2729
  import styled16 from "styled-components";
2734
- var DividerContainer = styled16.div(({ theme, variant = "normal", orientation, overflow = 0 }) => ({
2735
- ...orientation === "horizontal" ? { height: "1px", minHeight: "1px", margin: `0px -${overflow}px` } : { width: "1px", minWidth: "1px", margin: `-${overflow}px 0px` },
2736
- background: variant === "strong" ? theme.colors.dividerStrong : variant === "subtle" ? theme.colors.dividerSubtle : theme.colors.divider,
2730
+ var DividerContainer = styled16.div(({ theme, $variant = "normal", $orientation, $overflow = 0 }) => ({
2731
+ ...$orientation === "horizontal" ? { height: "1px", minHeight: "1px", margin: `0px -${$overflow}px` } : { width: "1px", minWidth: "1px", margin: `-${$overflow}px 0px` },
2732
+ background: $variant === "strong" ? theme.colors.dividerStrong : $variant === "subtle" ? theme.colors.dividerSubtle : theme.colors.divider,
2737
2733
  alignSelf: "stretch"
2738
2734
  }));
2739
- var Divider = memo13(function Divider2(props) {
2740
- return /* @__PURE__ */ React23.createElement(DividerContainer, { orientation: "horizontal", ...props });
2735
+ var Divider = memo13(function Divider2({
2736
+ variant,
2737
+ overflow,
2738
+ ...props
2739
+ }) {
2740
+ return /* @__PURE__ */ React24.createElement(
2741
+ DividerContainer,
2742
+ {
2743
+ $orientation: "horizontal",
2744
+ $variant: variant,
2745
+ $overflow: overflow,
2746
+ ...props
2747
+ }
2748
+ );
2741
2749
  });
2742
- var DividerVertical = memo13(function DividerVertical2(props) {
2743
- return /* @__PURE__ */ React23.createElement(DividerContainer, { orientation: "vertical", ...props });
2750
+ var DividerVertical = memo13(function DividerVertical2({
2751
+ variant,
2752
+ overflow,
2753
+ ...props
2754
+ }) {
2755
+ return /* @__PURE__ */ React24.createElement(
2756
+ DividerContainer,
2757
+ {
2758
+ $orientation: "vertical",
2759
+ $variant: variant,
2760
+ $overflow: overflow,
2761
+ ...props
2762
+ }
2763
+ );
2744
2764
  });
2745
2765
 
2746
2766
  // src/components/DraggableMenuButton.tsx
2747
2767
  import { DragHandleDots2Icon } from "@noya-app/noya-icons";
2748
- import React24, { memo as memo14, useCallback as useCallback14, useState as useState15 } from "react";
2768
+ import React25, { memo as memo14, useCallback as useCallback14, useState as useState15 } from "react";
2749
2769
  import styled17 from "styled-components";
2750
2770
  var DotButtonElement = styled17.div(({ theme }) => ({
2751
2771
  cursor: "pointer",
@@ -2772,7 +2792,7 @@ var DraggableMenuButton = memo14(function DraggableMenuButton2({
2772
2792
  }) {
2773
2793
  const color = useDesignSystemTheme().colors.icon;
2774
2794
  const [open, setOpen] = useState15(false);
2775
- const [downPosition, setDownPosition] = React24.useState(null);
2795
+ const [downPosition, setDownPosition] = React25.useState(null);
2776
2796
  const handlePointerDownCapture = useCallback14(
2777
2797
  (event) => {
2778
2798
  if (open) {
@@ -2809,7 +2829,7 @@ var DraggableMenuButton = memo14(function DraggableMenuButton2({
2809
2829
  },
2810
2830
  [setOpen]
2811
2831
  );
2812
- return /* @__PURE__ */ React24.createElement(
2832
+ return /* @__PURE__ */ React25.createElement(
2813
2833
  DotButtonElement,
2814
2834
  {
2815
2835
  onPointerDownCapture: handlePointerDownCapture,
@@ -2819,7 +2839,7 @@ var DraggableMenuButton = memo14(function DraggableMenuButton2({
2819
2839
  event.preventDefault();
2820
2840
  }
2821
2841
  },
2822
- items && onSelect ? /* @__PURE__ */ React24.createElement(
2842
+ items && onSelect ? /* @__PURE__ */ React25.createElement(
2823
2843
  DropdownMenu,
2824
2844
  {
2825
2845
  open,
@@ -2828,13 +2848,13 @@ var DraggableMenuButton = memo14(function DraggableMenuButton2({
2828
2848
  onSelect,
2829
2849
  shouldBindKeyboardShortcuts: false
2830
2850
  },
2831
- /* @__PURE__ */ React24.createElement(TriggerElement, null, /* @__PURE__ */ React24.createElement(
2851
+ /* @__PURE__ */ React25.createElement(TriggerElement, null, /* @__PURE__ */ React25.createElement(
2832
2852
  DragHandleDots2Icon,
2833
2853
  {
2834
2854
  color: isVisible || open ? color : "transparent"
2835
2855
  }
2836
2856
  ))
2837
- ) : /* @__PURE__ */ React24.createElement(
2857
+ ) : /* @__PURE__ */ React25.createElement(
2838
2858
  DragHandleDots2Icon,
2839
2859
  {
2840
2860
  color: isVisible || open ? color : "transparent"
@@ -2844,7 +2864,7 @@ var DraggableMenuButton = memo14(function DraggableMenuButton2({
2844
2864
  });
2845
2865
 
2846
2866
  // src/components/FillInputField.tsx
2847
- import React27, { forwardRef as forwardRef9, memo as memo17 } from "react";
2867
+ import React28, { forwardRef as forwardRef10, memo as memo17 } from "react";
2848
2868
  import styled19 from "styled-components";
2849
2869
 
2850
2870
  // ../noya-file-format/src/types.ts
@@ -3170,11 +3190,11 @@ var ClassValue = /* @__PURE__ */ ((ClassValue2) => {
3170
3190
  })(ClassValue || {});
3171
3191
 
3172
3192
  // src/components/FillPreviewBackground.tsx
3173
- import React26, { memo as memo16, useMemo as useMemo14 } from "react";
3193
+ import React27, { memo as memo16, useMemo as useMemo14 } from "react";
3174
3194
  import styled18, { useTheme as useTheme3 } from "styled-components";
3175
3195
 
3176
3196
  // src/contexts/ImageDataContext.tsx
3177
- import React25, {
3197
+ import React26, {
3178
3198
  createContext as createContext6,
3179
3199
  memo as memo15,
3180
3200
  useContext as useContext6,
@@ -3191,7 +3211,7 @@ var ImageDataProvider = memo15(function ImageDataProvider2({
3191
3211
  () => ({ getImageData: getImageData ?? (() => void 0) }),
3192
3212
  [getImageData]
3193
3213
  );
3194
- return /* @__PURE__ */ React25.createElement(ImageDataContext.Provider, { value: contextValue }, children);
3214
+ return /* @__PURE__ */ React26.createElement(ImageDataContext.Provider, { value: contextValue }, children);
3195
3215
  });
3196
3216
  function useImageData(ref) {
3197
3217
  const value = useContext6(ImageDataContext);
@@ -3281,7 +3301,7 @@ var HorizontalDotsBackground = memo16(function HorizontalDotsBackground2() {
3281
3301
  ].join(","),
3282
3302
  [inputBackground, placeholderDots]
3283
3303
  );
3284
- return /* @__PURE__ */ React26.createElement(Background, { background });
3304
+ return /* @__PURE__ */ React27.createElement(Background, { background });
3285
3305
  });
3286
3306
  function getPatternSizeAndPosition(fillType, tileScale) {
3287
3307
  switch (fillType) {
@@ -3311,13 +3331,13 @@ var PatternPreviewBackground = memo16(function PatternPreviewBackground2({
3311
3331
  ].join(" "),
3312
3332
  [fillType, size2, url]
3313
3333
  );
3314
- return /* @__PURE__ */ React26.createElement(Background, { background });
3334
+ return /* @__PURE__ */ React27.createElement(Background, { background });
3315
3335
  });
3316
3336
  var ColorPreviewBackground = memo16(function ColorPreviewBackground2({
3317
3337
  color
3318
3338
  }) {
3319
3339
  const background = useMemo14(() => sketchColorToRgbaString(color), [color]);
3320
- return /* @__PURE__ */ React26.createElement(Background, { background });
3340
+ return /* @__PURE__ */ React27.createElement(Background, { background });
3321
3341
  });
3322
3342
  var GradientPreviewBackground = memo16(function GradientPreviewBackground2({
3323
3343
  gradient
@@ -3326,22 +3346,22 @@ var GradientPreviewBackground = memo16(function GradientPreviewBackground2({
3326
3346
  () => getGradientBackground(gradient.stops, gradient.gradientType, 180),
3327
3347
  [gradient.gradientType, gradient.stops]
3328
3348
  );
3329
- return /* @__PURE__ */ React26.createElement(Background, { background });
3349
+ return /* @__PURE__ */ React27.createElement(Background, { background });
3330
3350
  });
3331
3351
  var FillPreviewBackground = memo16(function FillPreviewBackground2({
3332
3352
  value
3333
3353
  }) {
3334
3354
  if (!value)
3335
- return /* @__PURE__ */ React26.createElement(HorizontalDotsBackground, null);
3355
+ return /* @__PURE__ */ React27.createElement(HorizontalDotsBackground, null);
3336
3356
  switch (value._class) {
3337
3357
  case "color":
3338
- return /* @__PURE__ */ React26.createElement(ColorPreviewBackground, { color: value });
3358
+ return /* @__PURE__ */ React27.createElement(ColorPreviewBackground, { color: value });
3339
3359
  case "gradient":
3340
- return /* @__PURE__ */ React26.createElement(GradientPreviewBackground, { gradient: value });
3360
+ return /* @__PURE__ */ React27.createElement(GradientPreviewBackground, { gradient: value });
3341
3361
  case "pattern":
3342
3362
  if (!value.image)
3343
3363
  return null;
3344
- return /* @__PURE__ */ React26.createElement(
3364
+ return /* @__PURE__ */ React27.createElement(
3345
3365
  PatternPreviewBackground,
3346
3366
  {
3347
3367
  fillType: value.patternFillType,
@@ -3354,7 +3374,7 @@ var FillPreviewBackground = memo16(function FillPreviewBackground2({
3354
3374
 
3355
3375
  // src/components/FillInputField.tsx
3356
3376
  var Container = styled19.button(
3357
- ({ theme, flex }) => ({
3377
+ ({ theme, $flex }) => ({
3358
3378
  outline: "none",
3359
3379
  padding: 0,
3360
3380
  width: "50px",
@@ -3368,17 +3388,17 @@ var Container = styled19.button(
3368
3388
  boxShadow: `0 0 0 1px ${theme.colors.sidebar.background}, 0 0 0 3px ${theme.colors.primary}`
3369
3389
  },
3370
3390
  position: "relative",
3371
- flex
3391
+ flex: $flex
3372
3392
  })
3373
3393
  );
3374
3394
  var FillInputField = memo17(
3375
- forwardRef9(function FillInputField2({ id, value, ...rest }, ref) {
3376
- return /* @__PURE__ */ React27.createElement(Container, { ref, id, ...rest }, /* @__PURE__ */ React27.createElement(FillPreviewBackground, { value }));
3395
+ forwardRef10(function FillInputField2({ id, value, flex, ...rest }, ref) {
3396
+ return /* @__PURE__ */ React28.createElement(Container, { ref, id, $flex: flex, ...rest }, /* @__PURE__ */ React28.createElement(FillPreviewBackground, { value }));
3377
3397
  })
3378
3398
  );
3379
3399
 
3380
3400
  // src/components/FloatingWindow.tsx
3381
- import React28, { useCallback as useCallback15, useRef as useRef13, useState as useState16 } from "react";
3401
+ import React29, { useCallback as useCallback15, useRef as useRef13, useState as useState16 } from "react";
3382
3402
  var styles2 = {
3383
3403
  noSelect: {
3384
3404
  userSelect: "none",
@@ -3471,7 +3491,7 @@ function defaultRenderToolbar({
3471
3491
  toolbarContent,
3472
3492
  onClose
3473
3493
  }) {
3474
- return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(Small, { flex: "1", fontWeight: "500", color: "text" }, title), toolbarContent, /* @__PURE__ */ React28.createElement(
3494
+ return /* @__PURE__ */ React29.createElement(React29.Fragment, null, /* @__PURE__ */ React29.createElement(Small, { flex: "1", fontWeight: "500", color: "text" }, title), toolbarContent, /* @__PURE__ */ React29.createElement(
3475
3495
  IconButton,
3476
3496
  {
3477
3497
  iconName: "Cross3Icon",
@@ -3592,7 +3612,7 @@ var FloatingWindow = ({
3592
3612
  setResizeDirection(null);
3593
3613
  toggleGlobalTextSelection(false);
3594
3614
  }, []);
3595
- React28.useEffect(() => {
3615
+ React29.useEffect(() => {
3596
3616
  document.addEventListener("mousemove", handleMouseMove);
3597
3617
  document.addEventListener("mouseup", handleMouseUp);
3598
3618
  return () => {
@@ -3608,7 +3628,7 @@ var FloatingWindow = ({
3608
3628
  onClose();
3609
3629
  floatingWindowManager.closeWindow(currentFloatingWindow.id);
3610
3630
  }, [currentFloatingWindow.id, floatingWindowManager, onClose]);
3611
- return /* @__PURE__ */ React28.createElement(
3631
+ return /* @__PURE__ */ React29.createElement(
3612
3632
  "div",
3613
3633
  {
3614
3634
  ref: wrapperRef,
@@ -3622,7 +3642,7 @@ var FloatingWindow = ({
3622
3642
  backgroundColor: theme.colors.canvas.background
3623
3643
  }
3624
3644
  },
3625
- /* @__PURE__ */ React28.createElement(
3645
+ /* @__PURE__ */ React29.createElement(
3626
3646
  "div",
3627
3647
  {
3628
3648
  style: {
@@ -3633,9 +3653,9 @@ var FloatingWindow = ({
3633
3653
  },
3634
3654
  renderToolbar({ title, toolbarContent, onClose: handleClose })
3635
3655
  ),
3636
- /* @__PURE__ */ React28.createElement(Divider, null),
3637
- /* @__PURE__ */ React28.createElement("div", { style: styles2.content }, children),
3638
- Object.entries(resizeHandlePositions).map(([direction, style3]) => /* @__PURE__ */ React28.createElement(
3656
+ /* @__PURE__ */ React29.createElement(Divider, null),
3657
+ /* @__PURE__ */ React29.createElement("div", { style: styles2.content }, children),
3658
+ Object.entries(resizeHandlePositions).map(([direction, style3]) => /* @__PURE__ */ React29.createElement(
3639
3659
  "div",
3640
3660
  {
3641
3661
  key: direction,
@@ -3657,7 +3677,7 @@ import {
3657
3677
  hsvaToRgba,
3658
3678
  rgbaToHsva as rgbaToHsva2
3659
3679
  } from "@noya-app/noya-colorpicker";
3660
- import React29, { memo as memo18, useCallback as useCallback16, useMemo as useMemo15 } from "react";
3680
+ import React30, { memo as memo18, useCallback as useCallback16, useMemo as useMemo15 } from "react";
3661
3681
  var GradientPicker = memo18(function GradientPicker2({
3662
3682
  value,
3663
3683
  selectedStop,
@@ -3692,14 +3712,14 @@ var GradientPicker = memo18(function GradientPicker2({
3692
3712
  },
3693
3713
  [onAdd]
3694
3714
  );
3695
- return /* @__PURE__ */ React29.createElement(
3715
+ return /* @__PURE__ */ React30.createElement(
3696
3716
  NoyaColorPicker,
3697
3717
  {
3698
3718
  onChange: handleChangeColor,
3699
3719
  colorModel,
3700
3720
  color: rgbaColor
3701
3721
  },
3702
- /* @__PURE__ */ React29.createElement(
3722
+ /* @__PURE__ */ React30.createElement(
3703
3723
  Gradient,
3704
3724
  {
3705
3725
  gradients: value,
@@ -3710,12 +3730,12 @@ var GradientPicker = memo18(function GradientPicker2({
3710
3730
  onDelete
3711
3731
  }
3712
3732
  ),
3713
- /* @__PURE__ */ React29.createElement(Spacer.Vertical, { size: 10 }),
3714
- /* @__PURE__ */ React29.createElement(Saturation, null),
3715
- /* @__PURE__ */ React29.createElement(Spacer.Vertical, { size: 12 }),
3716
- /* @__PURE__ */ React29.createElement(Hue, null),
3717
- /* @__PURE__ */ React29.createElement(Spacer.Vertical, { size: 5 }),
3718
- /* @__PURE__ */ React29.createElement(Alpha, null)
3733
+ /* @__PURE__ */ React30.createElement(Spacer.Vertical, { size: 10 }),
3734
+ /* @__PURE__ */ React30.createElement(Saturation, null),
3735
+ /* @__PURE__ */ React30.createElement(Spacer.Vertical, { size: 12 }),
3736
+ /* @__PURE__ */ React30.createElement(Hue, null),
3737
+ /* @__PURE__ */ React30.createElement(Spacer.Vertical, { size: 5 }),
3738
+ /* @__PURE__ */ React30.createElement(Alpha, null)
3719
3739
  );
3720
3740
  });
3721
3741
 
@@ -3747,9 +3767,9 @@ var Grid = styled20.div((props) => ({
3747
3767
  }));
3748
3768
 
3749
3769
  // src/components/GridView.tsx
3750
- import React31, {
3770
+ import React32, {
3751
3771
  createContext as createContext7,
3752
- forwardRef as forwardRef10,
3772
+ forwardRef as forwardRef11,
3753
3773
  memo as memo20,
3754
3774
  useCallback as useCallback18,
3755
3775
  useContext as useContext7,
@@ -3759,7 +3779,7 @@ import styled22, { keyframes as keyframes2 } from "styled-components";
3759
3779
 
3760
3780
  // src/components/ScrollArea.tsx
3761
3781
  import * as RadixScrollArea from "@radix-ui/react-scroll-area";
3762
- import React30, { memo as memo19, useCallback as useCallback17, useState as useState17 } from "react";
3782
+ import React31, { memo as memo19, useCallback as useCallback17, useState as useState17 } from "react";
3763
3783
  import styled21 from "styled-components";
3764
3784
  var SCROLLBAR_SIZE = 10;
3765
3785
  var StyledViewport = styled21(RadixScrollArea.Viewport)({
@@ -3789,7 +3809,7 @@ var Container2 = styled21.div({
3789
3809
  });
3790
3810
  var ScrollArea = memo19(function ScrollArea2({ children }) {
3791
3811
  const [scrollElementRef, setScrollElementRef] = useState17(null);
3792
- return /* @__PURE__ */ React30.createElement(Container2, null, /* @__PURE__ */ React30.createElement(RadixScrollArea.Root, { style: { width: "100%", height: "100%" } }, /* @__PURE__ */ React30.createElement(
3812
+ return /* @__PURE__ */ React31.createElement(Container2, null, /* @__PURE__ */ React31.createElement(RadixScrollArea.Root, { style: { width: "100%", height: "100%" } }, /* @__PURE__ */ React31.createElement(
3793
3813
  StyledViewport,
3794
3814
  {
3795
3815
  ref: useCallback17(
@@ -3798,7 +3818,7 @@ var ScrollArea = memo19(function ScrollArea2({ children }) {
3798
3818
  )
3799
3819
  },
3800
3820
  typeof children === "function" ? scrollElementRef ? children(scrollElementRef) : null : children
3801
- ), /* @__PURE__ */ React30.createElement(StyledScrollbar, { orientation: "vertical", className: "scroll-component" }, /* @__PURE__ */ React30.createElement(StyledThumb, { className: "scroll-component" }))));
3821
+ ), /* @__PURE__ */ React31.createElement(StyledScrollbar, { orientation: "vertical", className: "scroll-component" }, /* @__PURE__ */ React31.createElement(StyledThumb, { className: "scroll-component" }))));
3802
3822
  });
3803
3823
 
3804
3824
  // src/components/GridView.tsx
@@ -3978,7 +3998,7 @@ var Shimmer = styled22.div`
3978
3998
  align-items: end;
3979
3999
  padding: 4px;
3980
4000
  `;
3981
- var GridViewItem = forwardRef10(function GridViewItem2({
4001
+ var GridViewItem = forwardRef11(function GridViewItem2({
3982
4002
  id,
3983
4003
  title,
3984
4004
  subtitle,
@@ -3994,7 +4014,7 @@ var GridViewItem = forwardRef10(function GridViewItem2({
3994
4014
  onContextMenu,
3995
4015
  style: style3
3996
4016
  }, forwardedRef) {
3997
- const [hovered, setHovered] = React31.useState(false);
4017
+ const [hovered, setHovered] = React32.useState(false);
3998
4018
  const { hoverProps } = useHover({
3999
4019
  onHoverChange: (isHovering) => {
4000
4020
  onHoverChange?.(isHovering);
@@ -4023,7 +4043,7 @@ var GridViewItem = forwardRef10(function GridViewItem2({
4023
4043
  },
4024
4044
  [onPress]
4025
4045
  );
4026
- let element = /* @__PURE__ */ React31.createElement(
4046
+ let element = /* @__PURE__ */ React32.createElement(
4027
4047
  ItemContainer,
4028
4048
  {
4029
4049
  id,
@@ -4032,7 +4052,7 @@ var GridViewItem = forwardRef10(function GridViewItem2({
4032
4052
  tabIndex: disabled ? void 0 : 0,
4033
4053
  onKeyDown: handleKeyDown
4034
4054
  },
4035
- /* @__PURE__ */ React31.createElement(
4055
+ /* @__PURE__ */ React32.createElement(
4036
4056
  ContentContainer,
4037
4057
  {
4038
4058
  disabled,
@@ -4046,18 +4066,18 @@ var GridViewItem = forwardRef10(function GridViewItem2({
4046
4066
  },
4047
4067
  children
4048
4068
  ),
4049
- textPosition === "below" && /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(Spacer.Vertical, { size: 8 }), /* @__PURE__ */ React31.createElement(ItemTitle, { showBackground: false }, title || " "), /* @__PURE__ */ React31.createElement(ItemDescription, { showBackground: false }, subtitle || " ")),
4050
- textPosition === "overlay" && hovered && (title || subtitle) && /* @__PURE__ */ React31.createElement(TextOverlay, null, title && /* @__PURE__ */ React31.createElement(ItemTitle, { showBackground: true }, title), subtitle && /* @__PURE__ */ React31.createElement(ItemDescription, { showBackground: true }, subtitle)),
4051
- loading && /* @__PURE__ */ React31.createElement(Shimmer, null, /* @__PURE__ */ React31.createElement(ActivityIndicator, { opacity: 0.5, size: 13 }))
4069
+ textPosition === "below" && /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(Spacer.Vertical, { size: 8 }), /* @__PURE__ */ React32.createElement(ItemTitle, { showBackground: false }, title || " "), /* @__PURE__ */ React32.createElement(ItemDescription, { showBackground: false }, subtitle || " ")),
4070
+ textPosition === "overlay" && hovered && (title || subtitle) && /* @__PURE__ */ React32.createElement(TextOverlay, null, title && /* @__PURE__ */ React32.createElement(ItemTitle, { showBackground: true }, title), subtitle && /* @__PURE__ */ React32.createElement(ItemDescription, { showBackground: true }, subtitle)),
4071
+ loading && /* @__PURE__ */ React32.createElement(Shimmer, null, /* @__PURE__ */ React32.createElement(ActivityIndicator, { opacity: 0.5, size: 13 }))
4052
4072
  );
4053
4073
  if (menuItems && onSelectMenuItem) {
4054
- element = /* @__PURE__ */ React31.createElement(ContextMenu, { items: menuItems, onSelect: onSelectMenuItem }, element);
4074
+ element = /* @__PURE__ */ React32.createElement(ContextMenu, { items: menuItems, onSelect: onSelectMenuItem }, element);
4055
4075
  }
4056
4076
  if (textPosition === "toolip") {
4057
- element = /* @__PURE__ */ React31.createElement(
4077
+ element = /* @__PURE__ */ React32.createElement(
4058
4078
  Tooltip,
4059
4079
  {
4060
- content: /* @__PURE__ */ React31.createElement(Stack.V, { gap: 2 }, /* @__PURE__ */ React31.createElement(ItemTitle, { showBackground: false }, title), /* @__PURE__ */ React31.createElement(ItemDescription, { showBackground: false }, subtitle))
4080
+ content: /* @__PURE__ */ React32.createElement(Stack.V, { gap: 2 }, /* @__PURE__ */ React32.createElement(ItemTitle, { showBackground: false }, title), /* @__PURE__ */ React32.createElement(ItemDescription, { showBackground: false }, subtitle))
4061
4081
  },
4062
4082
  element
4063
4083
  );
@@ -4096,20 +4116,20 @@ function GridViewRoot({
4096
4116
  }),
4097
4117
  [bordered, disabled, size2, textPosition]
4098
4118
  );
4099
- return /* @__PURE__ */ React31.createElement(GridViewContext.Provider, { value: contextValue }, /* @__PURE__ */ React31.createElement(Container3, { onClick: handleClick, scrollable }, scrollable ? /* @__PURE__ */ React31.createElement(ScrollArea, null, children) : children));
4119
+ return /* @__PURE__ */ React32.createElement(GridViewContext.Provider, { value: contextValue }, /* @__PURE__ */ React32.createElement(Container3, { onClick: handleClick, scrollable }, scrollable ? /* @__PURE__ */ React32.createElement(ScrollArea, null, children) : children));
4100
4120
  }
4101
4121
  function GridViewSection({
4102
4122
  children,
4103
4123
  padding = "20px"
4104
4124
  }) {
4105
4125
  const { size: size2 } = useContext7(GridViewContext);
4106
- return /* @__PURE__ */ React31.createElement(Grid2, { size: size2, padding }, children);
4126
+ return /* @__PURE__ */ React32.createElement(Grid2, { size: size2, padding }, children);
4107
4127
  }
4108
4128
  function GridViewSectionHeader({ title }) {
4109
4129
  const grouped = title.split("/");
4110
- return /* @__PURE__ */ React31.createElement(SectionHeaderContainer, null, /* @__PURE__ */ React31.createElement(Spacer.Vertical, { size: 24 }), withSeparatorElements(
4111
- grouped.map((title2, index) => /* @__PURE__ */ React31.createElement(SectionTitle, { last: index === grouped.length - 1 }, title2)),
4112
- /* @__PURE__ */ React31.createElement(SectionTitle, null, " / ")
4130
+ return /* @__PURE__ */ React32.createElement(SectionHeaderContainer, null, /* @__PURE__ */ React32.createElement(Spacer.Vertical, { size: 24 }), withSeparatorElements(
4131
+ grouped.map((title2, index) => /* @__PURE__ */ React32.createElement(SectionTitle, { last: index === grouped.length - 1 }, title2)),
4132
+ /* @__PURE__ */ React32.createElement(SectionTitle, null, " / ")
4113
4133
  ));
4114
4134
  }
4115
4135
  var GridView;
@@ -4122,11 +4142,11 @@ var GridView;
4122
4142
 
4123
4143
  // src/components/InputFieldWithCompletions.tsx
4124
4144
  import { chunkBy, partition } from "@noya-app/noya-utils";
4125
- import React35, {
4126
- forwardRef as forwardRef13,
4145
+ import React36, {
4146
+ forwardRef as forwardRef14,
4127
4147
  memo as memo23,
4128
4148
  useCallback as useCallback21,
4129
- useEffect as useEffect13,
4149
+ useEffect as useEffect14,
4130
4150
  useImperativeHandle as useImperativeHandle3,
4131
4151
  useLayoutEffect as useLayoutEffect7,
4132
4152
  useMemo as useMemo19,
@@ -4209,10 +4229,10 @@ function mergeRanges(ranges) {
4209
4229
  // src/components/ListView.tsx
4210
4230
  import { range } from "@noya-app/noya-utils";
4211
4231
  import { composeRefs as composeRefs2 } from "@radix-ui/react-compose-refs";
4212
- import React33, {
4232
+ import React34, {
4213
4233
  Children as Children4,
4214
4234
  createContext as createContext9,
4215
- forwardRef as forwardRef11,
4235
+ forwardRef as forwardRef12,
4216
4236
  isValidElement as isValidElement3,
4217
4237
  memo as memo22,
4218
4238
  useCallback as useCallback20,
@@ -4263,11 +4283,12 @@ import {
4263
4283
  useSortable,
4264
4284
  verticalListSortingStrategy
4265
4285
  } from "@dnd-kit/sortable";
4266
- import React32, {
4286
+ import React33, {
4267
4287
  createContext as createContext8,
4268
4288
  memo as memo21,
4269
4289
  useCallback as useCallback19,
4270
4290
  useContext as useContext8,
4291
+ useEffect as useEffect13,
4271
4292
  useMemo as useMemo17,
4272
4293
  useRef as useRef14,
4273
4294
  useState as useState18
@@ -4400,7 +4421,11 @@ function SortableRoot({
4400
4421
  },
4401
4422
  [acceptsDrop, axis, keys, onMoveItem, position.x, position.y]
4402
4423
  );
4403
- return /* @__PURE__ */ React32.createElement(
4424
+ const [mounted, setMounted] = useState18(false);
4425
+ useEffect13(() => {
4426
+ setMounted(true);
4427
+ }, []);
4428
+ return /* @__PURE__ */ React33.createElement(
4404
4429
  SortableItemContext.Provider,
4405
4430
  {
4406
4431
  value: useMemo17(
@@ -4414,7 +4439,7 @@ function SortableRoot({
4414
4439
  [acceptsDrop, axis, keys, position, setActivatorEvent]
4415
4440
  )
4416
4441
  },
4417
- /* @__PURE__ */ React32.createElement(
4442
+ /* @__PURE__ */ React33.createElement(
4418
4443
  DndContext,
4419
4444
  {
4420
4445
  sensors,
@@ -4423,9 +4448,9 @@ function SortableRoot({
4423
4448
  onDragMove: handleDragMove,
4424
4449
  onDragEnd: handleDragEnd
4425
4450
  },
4426
- /* @__PURE__ */ React32.createElement(SortableContext, { items: keys, strategy: verticalListSortingStrategy }, children),
4427
- renderOverlay && createPortal2(
4428
- /* @__PURE__ */ React32.createElement(DragOverlay, { dropAnimation: null }, activeIndex !== void 0 && activeIndex >= 0 && renderOverlay(activeIndex)),
4451
+ /* @__PURE__ */ React33.createElement(SortableContext, { items: keys, strategy: verticalListSortingStrategy }, children),
4452
+ mounted && renderOverlay && createPortal2(
4453
+ /* @__PURE__ */ React33.createElement(DragOverlay, { dropAnimation: null }, activeIndex !== void 0 && activeIndex >= 0 && renderOverlay(activeIndex)),
4429
4454
  document.body
4430
4455
  )
4431
4456
  )
@@ -4483,7 +4508,7 @@ function ListViewEditableRowTitle({
4483
4508
  element.select();
4484
4509
  }, 0);
4485
4510
  }, [autoFocus]);
4486
- return /* @__PURE__ */ React33.createElement(
4511
+ return /* @__PURE__ */ React34.createElement(
4487
4512
  ListViewEditableRowTitleElement,
4488
4513
  {
4489
4514
  ref: inputRef,
@@ -4504,34 +4529,34 @@ function getPositionMargin(marginType) {
4504
4529
  var RowContainer = styled23.div(
4505
4530
  ({
4506
4531
  theme,
4507
- marginType,
4508
- selected,
4509
- selectedPosition,
4510
- disabled,
4511
- hovered,
4512
- variant,
4513
- divider,
4514
- isSectionHeader,
4515
- showsActiveState,
4516
- sectionHeaderVariant,
4517
- colorScheme,
4518
- gap,
4519
- backgroundColor
4532
+ $marginType,
4533
+ $selected,
4534
+ $selectedPosition,
4535
+ $disabled,
4536
+ $hovered,
4537
+ $variant,
4538
+ $divider,
4539
+ $isSectionHeader,
4540
+ $showsActiveState,
4541
+ $sectionHeaderVariant,
4542
+ $colorScheme,
4543
+ $gap,
4544
+ $backgroundColor
4520
4545
  }) => {
4521
- const margin = getPositionMargin(marginType);
4546
+ const margin = getPositionMargin($marginType);
4522
4547
  return {
4523
- ...isSectionHeader && sectionHeaderVariant === "label" ? theme.textStyles.label : theme.textStyles.small,
4524
- ...isSectionHeader && { fontWeight: 500 },
4525
- gap,
4548
+ ...$isSectionHeader && $sectionHeaderVariant === "label" ? theme.textStyles.label : theme.textStyles.small,
4549
+ ...$isSectionHeader && { fontWeight: 500 },
4550
+ gap: $gap,
4526
4551
  flex: "0 0 auto",
4527
4552
  userSelect: "none",
4528
4553
  cursor: "default",
4529
- ...variant !== "bare" && {
4554
+ ...$variant !== "bare" && {
4530
4555
  paddingTop: "6px",
4531
4556
  paddingRight: "12px",
4532
4557
  paddingBottom: "6px",
4533
4558
  paddingLeft: "12px",
4534
- ...variant === "padded" && {
4559
+ ...$variant === "padded" && {
4535
4560
  borderRadius: "2px",
4536
4561
  marginLeft: "8px",
4537
4562
  marginRight: "8px",
@@ -4540,72 +4565,72 @@ var RowContainer = styled23.div(
4540
4565
  }
4541
4566
  },
4542
4567
  color: theme.colors.textMuted,
4543
- ...isSectionHeader && {
4568
+ ...$isSectionHeader && {
4544
4569
  backgroundColor: theme.colors.listView.raisedBackground,
4545
- ...sectionHeaderVariant === "label" && {
4570
+ ...$sectionHeaderVariant === "label" && {
4546
4571
  color: theme.colors.textDisabled
4547
4572
  }
4548
4573
  },
4549
- ...disabled && {
4574
+ ...$disabled && {
4550
4575
  color: theme.colors.textDisabled
4551
4576
  },
4552
- ...selected && {
4577
+ ...$selected && {
4553
4578
  color: "white",
4554
- backgroundColor: theme.colors[colorScheme]
4579
+ backgroundColor: theme.colors[$colorScheme]
4555
4580
  },
4556
4581
  display: "flex",
4557
4582
  alignItems: "center",
4558
- ...selected && !isSectionHeader && (selectedPosition === "middle" || selectedPosition === "last") && {
4583
+ ...$selected && !$isSectionHeader && ($selectedPosition === "middle" || $selectedPosition === "last") && {
4559
4584
  borderTopRightRadius: "0px",
4560
4585
  borderTopLeftRadius: "0px"
4561
4586
  },
4562
- ...selected && !isSectionHeader && (selectedPosition === "middle" || selectedPosition === "first") && {
4587
+ ...$selected && !$isSectionHeader && ($selectedPosition === "middle" || $selectedPosition === "first") && {
4563
4588
  borderBottomRightRadius: "0px",
4564
4589
  borderBottomLeftRadius: "0px"
4565
4590
  },
4566
4591
  position: "relative",
4567
- ...hovered && {
4568
- boxShadow: `0 0 0 1px ${theme.colors[colorScheme]} inset`
4592
+ ...$hovered && {
4593
+ boxShadow: `0 0 0 1px ${theme.colors[$colorScheme]} inset`
4569
4594
  },
4570
- ...showsActiveState && {
4595
+ ...$showsActiveState && {
4571
4596
  "&:active": {
4572
- backgroundColor: selected ? colorScheme === "secondary" ? theme.colors.secondaryLight : theme.colors.primaryLight : theme.colors.activeBackground
4597
+ backgroundColor: $selected ? $colorScheme === "secondary" ? theme.colors.secondaryLight : theme.colors.primaryLight : theme.colors.activeBackground
4573
4598
  }
4574
4599
  },
4575
- ...divider && {
4600
+ ...$divider && {
4576
4601
  borderBottom: `1px solid ${theme.colors.dividerSubtle}`
4577
4602
  },
4578
- ...backgroundColor && {
4579
- backgroundColor,
4603
+ ...$backgroundColor && {
4604
+ backgroundColor: $backgroundColor,
4580
4605
  "&:hover": {
4581
- backgroundColor
4606
+ backgroundColor: $backgroundColor
4582
4607
  },
4583
4608
  "&:active": {
4584
- backgroundColor
4609
+ backgroundColor: $backgroundColor
4585
4610
  }
4586
4611
  }
4587
4612
  };
4588
4613
  }
4589
4614
  );
4590
- var ListViewDragIndicatorElement = styled23.div(({ theme, relativeDropPosition, offsetLeft, colorScheme, gap }) => ({
4615
+ var ListViewDragIndicatorElement = styled23.div(({ theme, $relativeDropPosition, $offsetLeft, $colorScheme, $gap }) => ({
4591
4616
  zIndex: 1,
4592
4617
  position: "absolute",
4593
4618
  borderRadius: "3px",
4594
- ...relativeDropPosition === "inside" ? {
4619
+ ...$relativeDropPosition === "inside" ? {
4595
4620
  inset: 2,
4596
- boxShadow: `0 0 0 1px ${theme.colors.sidebar.background}, 0 0 0 3px ${colorScheme === "secondary" ? theme.colors.secondary : theme.colors.dragOutline}`
4621
+ boxShadow: `0 0 0 1px ${theme.colors.sidebar.background}, 0 0 0 3px ${$colorScheme === "secondary" ? theme.colors.secondary : theme.colors.dragOutline}`
4597
4622
  } : {
4598
- top: relativeDropPosition === "above" ? -(3 + gap / 2) : void 0,
4599
- bottom: relativeDropPosition === "below" ? -(3 + gap / 2) : void 0,
4600
- left: offsetLeft,
4623
+ top: $relativeDropPosition === "above" ? -(3 + $gap / 2) : void 0,
4624
+ bottom: $relativeDropPosition === "below" ? -(3 + $gap / 2) : void 0,
4625
+ left: $offsetLeft,
4601
4626
  right: 0,
4602
4627
  height: 6,
4603
- background: theme.colors[colorScheme],
4628
+ background: theme.colors[$colorScheme],
4604
4629
  border: `2px solid white`,
4605
4630
  boxShadow: "0 0 2px rgba(0,0,0,0.5)"
4606
4631
  }
4607
4632
  }));
4608
- var ListViewRow = forwardRef11(function ListViewRow2({
4633
+ var ListViewRow = forwardRef12(function ListViewRow2({
4609
4634
  id,
4610
4635
  tabIndex = 0,
4611
4636
  gap,
@@ -4671,28 +4696,29 @@ var ListViewRow = forwardRef11(function ListViewRow2({
4671
4696
  relativeDropPosition,
4672
4697
  ...renderProps
4673
4698
  }, ref) => {
4674
- const element = /* @__PURE__ */ React33.createElement(
4675
- RowContainer,
4699
+ const Component = RowContainer;
4700
+ const element = /* @__PURE__ */ React34.createElement(
4701
+ Component,
4676
4702
  {
4677
4703
  ref,
4678
- colorScheme,
4704
+ $colorScheme: colorScheme,
4679
4705
  onContextMenu,
4680
- isSectionHeader,
4706
+ $isSectionHeader: isSectionHeader,
4681
4707
  id,
4682
- gap,
4683
- backgroundColor,
4708
+ $gap: gap ?? 0,
4709
+ $backgroundColor: backgroundColor,
4684
4710
  ...hoverProps,
4685
4711
  onDoubleClick: handleDoubleClick,
4686
- marginType,
4687
- disabled,
4688
- hovered,
4689
- selected,
4690
- variant,
4691
- sectionHeaderVariant,
4692
- selectedPosition,
4693
- showsActiveState: pressEventName === "onClick",
4712
+ $marginType: marginType ?? "none",
4713
+ $disabled: disabled,
4714
+ $hovered: hovered,
4715
+ $selected: selected,
4716
+ $variant: variant,
4717
+ $sectionHeaderVariant: sectionHeaderVariant,
4718
+ $selectedPosition: selectedPosition,
4719
+ $showsActiveState: pressEventName === "onClick",
4694
4720
  "aria-selected": selected,
4695
- divider: !isDragging && divider,
4721
+ $divider: !isDragging && divider,
4696
4722
  onKeyDown,
4697
4723
  style: mergedStyle,
4698
4724
  ...renderProps,
@@ -4702,20 +4728,20 @@ var ListViewRow = forwardRef11(function ListViewRow2({
4702
4728
  ),
4703
4729
  tabIndex
4704
4730
  },
4705
- relativeDropPosition && /* @__PURE__ */ React33.createElement(
4731
+ relativeDropPosition && /* @__PURE__ */ React34.createElement(
4706
4732
  ListViewDragIndicatorElement,
4707
4733
  {
4708
- colorScheme,
4709
- relativeDropPosition,
4710
- offsetLeft: 33 + depth * indentation,
4711
- gap: listGap
4734
+ $colorScheme: colorScheme,
4735
+ $relativeDropPosition: relativeDropPosition,
4736
+ $offsetLeft: 33 + depth * indentation,
4737
+ $gap: listGap
4712
4738
  }
4713
4739
  ),
4714
- depth > 0 && /* @__PURE__ */ React33.createElement(Spacer.Horizontal, { size: depth * indentation }),
4740
+ depth > 0 && /* @__PURE__ */ React34.createElement(Spacer.Horizontal, { size: depth * indentation }),
4715
4741
  children
4716
4742
  );
4717
4743
  if (menuItems && onSelectMenuItem) {
4718
- return /* @__PURE__ */ React33.createElement(
4744
+ return /* @__PURE__ */ React34.createElement(
4719
4745
  ContextMenu,
4720
4746
  {
4721
4747
  items: menuItems,
@@ -4728,7 +4754,10 @@ var ListViewRow = forwardRef11(function ListViewRow2({
4728
4754
  return element;
4729
4755
  };
4730
4756
  if (sortable && id) {
4731
- return /* @__PURE__ */ React33.createElement(Sortable.Item, { id, disabled: overrideSortable === false }, ({ ref: sortableRef, ...sortableProps }) => renderContent(sortableProps, composeRefs2(sortableRef, forwardedRef)));
4757
+ return /* @__PURE__ */ React34.createElement(Sortable.Item, { id, disabled: overrideSortable === false }, ({ ref: sortableRef, ...sortableProps }) => renderContent(
4758
+ sortableProps,
4759
+ composeRefs2(sortableRef, forwardedRef)
4760
+ ));
4732
4761
  }
4733
4762
  return renderContent({}, forwardedRef);
4734
4763
  });
@@ -4740,9 +4769,9 @@ var VirtualizedListRow = memo22(function VirtualizedListRow2({
4740
4769
  style: style3
4741
4770
  }) {
4742
4771
  const renderItem = useContext9(RenderItemContext);
4743
- return /* @__PURE__ */ React33.createElement("div", { key: index, style: style3 }, renderItem(index));
4772
+ return /* @__PURE__ */ React34.createElement("div", { key: index, style: style3 }, renderItem(index));
4744
4773
  });
4745
- var VirtualizedListInner = forwardRef11(function VirtualizedListInner2({
4774
+ var VirtualizedListInner = forwardRef12(function VirtualizedListInner2({
4746
4775
  size: size2,
4747
4776
  scrollElement,
4748
4777
  items,
@@ -4771,7 +4800,7 @@ var VirtualizedListInner = forwardRef11(function VirtualizedListInner2({
4771
4800
  }),
4772
4801
  []
4773
4802
  );
4774
- return /* @__PURE__ */ React33.createElement(RenderItemContext.Provider, { value: renderItem }, /* @__PURE__ */ React33.createElement(
4803
+ return /* @__PURE__ */ React34.createElement(RenderItemContext.Provider, { value: renderItem }, /* @__PURE__ */ React34.createElement(
4775
4804
  WindowScroller,
4776
4805
  {
4777
4806
  scrollElement,
@@ -4782,7 +4811,7 @@ var VirtualizedListInner = forwardRef11(function VirtualizedListInner2({
4782
4811
  registerChild,
4783
4812
  onChildScroll,
4784
4813
  scrollTop
4785
- }) => /* @__PURE__ */ React33.createElement("div", { ref: registerChild }, /* @__PURE__ */ React33.createElement(
4814
+ }) => /* @__PURE__ */ React34.createElement("div", { ref: registerChild }, /* @__PURE__ */ React34.createElement(
4786
4815
  VariableSizeList,
4787
4816
  {
4788
4817
  ref: listRef,
@@ -4815,15 +4844,15 @@ var VirtualizedListInner = forwardRef11(function VirtualizedListInner2({
4815
4844
  var VirtualizedList = memo22(
4816
4845
  VirtualizedListInner
4817
4846
  );
4818
- var RootContainer2 = styled23.div(({ theme, scrollable, gap }) => ({
4819
- flex: scrollable ? "1 0 0" : "0 0 auto",
4847
+ var RootContainer2 = styled23.div(({ theme, $scrollable, $gap }) => ({
4848
+ flex: $scrollable ? "1 0 0" : "0 0 auto",
4820
4849
  display: "flex",
4821
4850
  flexDirection: "column",
4822
4851
  flexWrap: "nowrap",
4823
4852
  color: theme.colors.textMuted,
4824
- gap
4853
+ gap: $gap
4825
4854
  }));
4826
- var ListViewRootInner = forwardRef11(function ListViewRootInner2({
4855
+ var ListViewRootInner = forwardRef12(function ListViewRootInner2({
4827
4856
  onPress,
4828
4857
  scrollable = false,
4829
4858
  expandable = true,
@@ -4921,7 +4950,7 @@ var ListViewRootInner = forwardRef11(function ListViewRootInner2({
4921
4950
  [indentation]
4922
4951
  );
4923
4952
  const renderOverlay = useCallback20(
4924
- (index) => /* @__PURE__ */ React33.createElement("div", { style: { opacity: 0.25 } }, /* @__PURE__ */ React33.createElement(DraggingContext.Provider, { value: draggingContextOverlayValue }, renderItem(data[index], index, { isDragging: true }))),
4953
+ (index) => /* @__PURE__ */ React34.createElement("div", { style: { opacity: 0.25 } }, /* @__PURE__ */ React34.createElement(DraggingContext.Provider, { value: draggingContextOverlayValue }, renderItem(data[index], index, { isDragging: true }))),
4925
4954
  [draggingContextOverlayValue, renderItem, data]
4926
4955
  );
4927
4956
  const renderWrappedChild = useCallback20(
@@ -4930,12 +4959,12 @@ var ListViewRootInner = forwardRef11(function ListViewRootInner2({
4930
4959
  const current = renderChild(index);
4931
4960
  if (!contextValue || !isValidElement3(current))
4932
4961
  return null;
4933
- return /* @__PURE__ */ React33.createElement(ListRowContext.Provider, { key: current.key, value: contextValue }, current);
4962
+ return /* @__PURE__ */ React34.createElement(ListRowContext.Provider, { key: current.key, value: contextValue }, current);
4934
4963
  },
4935
4964
  [getItemContextValue, renderChild]
4936
4965
  );
4937
4966
  const ids = useMemo18(() => data.map(keyExtractor), [keyExtractor, data]);
4938
- const withSortable = (children) => sortable ? /* @__PURE__ */ React33.createElement(
4967
+ const withSortable = (children) => sortable ? /* @__PURE__ */ React34.createElement(
4939
4968
  Sortable.Root,
4940
4969
  {
4941
4970
  onMoveItem,
@@ -4945,7 +4974,7 @@ var ListViewRootInner = forwardRef11(function ListViewRootInner2({
4945
4974
  },
4946
4975
  children
4947
4976
  ) : children;
4948
- const withScrollable = (children) => scrollable ? /* @__PURE__ */ React33.createElement(ScrollArea, null, children) : children(null);
4977
+ const withScrollable = (children) => scrollable ? /* @__PURE__ */ React34.createElement(ScrollArea, null, children) : children(null);
4949
4978
  const getItemHeight = useCallback20(
4950
4979
  (index) => {
4951
4980
  const child = getItemContextValue(index);
@@ -4960,18 +4989,18 @@ var ListViewRootInner = forwardRef11(function ListViewRootInner2({
4960
4989
  [data, keyExtractor]
4961
4990
  );
4962
4991
  const draggingContextValue = useMemo18(() => ({ indentation }), [indentation]);
4963
- return /* @__PURE__ */ React33.createElement(DraggingContext.Provider, { value: draggingContextValue }, /* @__PURE__ */ React33.createElement(
4992
+ return /* @__PURE__ */ React34.createElement(DraggingContext.Provider, { value: draggingContextValue }, /* @__PURE__ */ React34.createElement(
4964
4993
  RootContainer2,
4965
4994
  {
4966
4995
  ...{
4967
4996
  [pressEventName]: handleClick
4968
4997
  },
4969
- gap,
4970
- scrollable
4998
+ $gap: gap,
4999
+ $scrollable: scrollable
4971
5000
  },
4972
5001
  withScrollable(
4973
5002
  (scrollElementRef) => withSortable(
4974
- virtualized ? /* @__PURE__ */ React33.createElement(
5003
+ virtualized ? /* @__PURE__ */ React34.createElement(
4975
5004
  VirtualizedList,
4976
5005
  {
4977
5006
  ref: forwardedRef,
@@ -4988,14 +5017,14 @@ var ListViewRootInner = forwardRef11(function ListViewRootInner2({
4988
5017
  ));
4989
5018
  });
4990
5019
  var ListViewRoot = memo22(ListViewRootInner);
4991
- var ChildrenListViewInner = forwardRef11(function ChildrenListViewInner2({ children, ...rest }, forwardedRef) {
5020
+ var ChildrenListViewInner = forwardRef12(function ChildrenListViewInner2({ children, ...rest }, forwardedRef) {
4992
5021
  const items = useMemo18(
4993
5022
  () => Children4.toArray(children).flatMap(
4994
5023
  (child) => isValidElement3(child) ? [child] : []
4995
5024
  ),
4996
5025
  [children]
4997
5026
  );
4998
- return /* @__PURE__ */ React33.createElement(
5027
+ return /* @__PURE__ */ React34.createElement(
4999
5028
  ListViewRoot,
5000
5029
  {
5001
5030
  ref: forwardedRef,
@@ -5010,11 +5039,11 @@ var ChildrenListViewInner = forwardRef11(function ChildrenListViewInner2({ child
5010
5039
  );
5011
5040
  });
5012
5041
  var ChildrenListView = memo22(ChildrenListViewInner);
5013
- var SimpleListViewInner = forwardRef11(function SimpleListViewInner2(props, forwardedRef) {
5042
+ var SimpleListViewInner = forwardRef12(function SimpleListViewInner2(props, forwardedRef) {
5014
5043
  if ("children" in props) {
5015
- return /* @__PURE__ */ React33.createElement(ChildrenListView, { ref: forwardedRef, ...props });
5044
+ return /* @__PURE__ */ React34.createElement(ChildrenListView, { ref: forwardedRef, ...props });
5016
5045
  } else {
5017
- return /* @__PURE__ */ React33.createElement(ListViewRoot, { ref: forwardedRef, ...props });
5046
+ return /* @__PURE__ */ React34.createElement(ListViewRoot, { ref: forwardedRef, ...props });
5018
5047
  }
5019
5048
  });
5020
5049
  var SimpleListView = memo22(SimpleListViewInner);
@@ -5035,7 +5064,7 @@ var ListView;
5035
5064
  })(ListView || (ListView = {}));
5036
5065
 
5037
5066
  // src/components/Text.tsx
5038
- import React34, { forwardRef as forwardRef12 } from "react";
5067
+ import React35, { forwardRef as forwardRef13 } from "react";
5039
5068
  import styled24 from "styled-components";
5040
5069
  var elements = {
5041
5070
  title: "h1",
@@ -5051,13 +5080,13 @@ var elements = {
5051
5080
  code: "code",
5052
5081
  label: "span"
5053
5082
  };
5054
- var StyledElement = styled24.span(({ theme, variant, styleProps, breakpoints, color }) => ({
5055
- ...theme.textStyles[variant],
5056
- color: color ? theme.colors[color] : void 0,
5057
- ...styleProps,
5058
- ...mergeBreakpoints(breakpoints || [])
5083
+ var StyledElement = styled24.span(({ theme, $variant, $styleProps, $breakpoints, $color }) => ({
5084
+ ...theme.textStyles[$variant],
5085
+ color: $color ? theme.colors[$color] : void 0,
5086
+ ...$styleProps,
5087
+ ...mergeBreakpoints($breakpoints || [])
5059
5088
  }));
5060
- var Text = forwardRef12(function Text2({
5089
+ var Text = forwardRef13(function Text2({
5061
5090
  as,
5062
5091
  variant,
5063
5092
  breakpoints,
@@ -5069,44 +5098,44 @@ var Text = forwardRef12(function Text2({
5069
5098
  ...rest
5070
5099
  }, forwardedRef) {
5071
5100
  const element = as ?? elements[variant] ?? "span";
5072
- return /* @__PURE__ */ React34.createElement(
5101
+ return /* @__PURE__ */ React35.createElement(
5073
5102
  StyledElement,
5074
5103
  {
5075
5104
  ref: forwardedRef,
5076
5105
  as: element,
5077
5106
  className,
5078
- variant,
5079
- breakpoints,
5080
- styleProps: rest,
5081
- color,
5107
+ $variant: variant,
5108
+ $breakpoints: breakpoints,
5109
+ $styleProps: rest,
5110
+ $color: color,
5082
5111
  onClick,
5083
5112
  ...href && { href }
5084
5113
  },
5085
5114
  children
5086
5115
  );
5087
5116
  });
5088
- var Heading1 = forwardRef12(
5089
- (props, ref) => /* @__PURE__ */ React34.createElement(Text, { ref, ...props, variant: "heading1" })
5117
+ var Heading1 = forwardRef13(
5118
+ (props, ref) => /* @__PURE__ */ React35.createElement(Text, { ref, ...props, variant: "heading1" })
5090
5119
  );
5091
- var Heading2 = forwardRef12(
5092
- (props, ref) => /* @__PURE__ */ React34.createElement(Text, { ref, ...props, variant: "heading2" })
5120
+ var Heading2 = forwardRef13(
5121
+ (props, ref) => /* @__PURE__ */ React35.createElement(Text, { ref, ...props, variant: "heading2" })
5093
5122
  );
5094
- var Heading3 = forwardRef12(
5095
- (props, ref) => /* @__PURE__ */ React34.createElement(Text, { ref, ...props, variant: "heading3" })
5123
+ var Heading3 = forwardRef13(
5124
+ (props, ref) => /* @__PURE__ */ React35.createElement(Text, { ref, ...props, variant: "heading3" })
5096
5125
  );
5097
- var Heading4 = forwardRef12(
5098
- (props, ref) => /* @__PURE__ */ React34.createElement(Text, { ref, ...props, variant: "heading4" })
5126
+ var Heading4 = forwardRef13(
5127
+ (props, ref) => /* @__PURE__ */ React35.createElement(Text, { ref, ...props, variant: "heading4" })
5099
5128
  );
5100
- var Heading5 = forwardRef12(
5101
- (props, ref) => /* @__PURE__ */ React34.createElement(Text, { ref, ...props, variant: "heading5" })
5129
+ var Heading5 = forwardRef13(
5130
+ (props, ref) => /* @__PURE__ */ React35.createElement(Text, { ref, ...props, variant: "heading5" })
5102
5131
  );
5103
- var Body = forwardRef12(
5104
- (props, ref) => /* @__PURE__ */ React34.createElement(Text, { ref, ...props, variant: "body" })
5132
+ var Body = forwardRef13(
5133
+ (props, ref) => /* @__PURE__ */ React35.createElement(Text, { ref, ...props, variant: "body" })
5105
5134
  );
5106
- var Small = forwardRef12(
5107
- (props, ref) => /* @__PURE__ */ React34.createElement(Text, { ref, ...props, variant: "small" })
5135
+ var Small = forwardRef13(
5136
+ (props, ref) => /* @__PURE__ */ React35.createElement(Text, { ref, ...props, variant: "small" })
5108
5137
  );
5109
- var Italic = ({ children }) => /* @__PURE__ */ React34.createElement(
5138
+ var Italic = ({ children }) => /* @__PURE__ */ React35.createElement(
5110
5139
  "span",
5111
5140
  {
5112
5141
  style: {
@@ -5143,20 +5172,20 @@ function filterWithGroupedSections(items, query) {
5143
5172
  });
5144
5173
  }
5145
5174
  var CompletionToken = styled25.span(
5146
- ({ type }) => ({
5147
- fontWeight: type === "match" ? "bold" : "normal",
5175
+ ({ $type }) => ({
5176
+ fontWeight: $type === "match" ? "bold" : "normal",
5148
5177
  whiteSpace: "pre"
5149
5178
  })
5150
5179
  );
5151
5180
  var CompletionMenu = memo23(
5152
- forwardRef13(function CompletionMenu2({
5181
+ forwardRef14(function CompletionMenu2({
5153
5182
  items,
5154
5183
  selectedIndex,
5155
5184
  onSelectItem,
5156
5185
  onHoverIndex,
5157
5186
  listSize
5158
5187
  }, forwardedRef) {
5159
- return /* @__PURE__ */ React35.createElement(
5188
+ return /* @__PURE__ */ React36.createElement(
5160
5189
  ListView.Root,
5161
5190
  {
5162
5191
  ref: forwardedRef,
@@ -5168,13 +5197,13 @@ var CompletionMenu = memo23(
5168
5197
  sectionHeaderVariant: "label",
5169
5198
  renderItem: (item, i) => {
5170
5199
  if (item.type === "sectionHeader") {
5171
- return /* @__PURE__ */ React35.createElement(ListView.Row, { key: item.id, isSectionHeader: true }, item.name);
5200
+ return /* @__PURE__ */ React36.createElement(ListView.Row, { key: item.id, isSectionHeader: true }, item.name);
5172
5201
  }
5173
5202
  const tokens = fuzzyTokenize({
5174
5203
  item: item.name,
5175
5204
  itemScore: item
5176
5205
  });
5177
- return /* @__PURE__ */ React35.createElement(
5206
+ return /* @__PURE__ */ React36.createElement(
5178
5207
  ListView.Row,
5179
5208
  {
5180
5209
  key: item.id,
@@ -5186,8 +5215,8 @@ var CompletionMenu = memo23(
5186
5215
  }
5187
5216
  }
5188
5217
  },
5189
- tokens.map((token, j) => /* @__PURE__ */ React35.createElement(CompletionToken, { key: j, type: token.type }, token.text)),
5190
- item.icon && /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement(Spacer.Horizontal, null), item.icon)
5218
+ tokens.map((token, j) => /* @__PURE__ */ React36.createElement(CompletionToken, { key: j, $type: token.type }, token.text)),
5219
+ item.icon && /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(Spacer.Horizontal, null), item.icon)
5191
5220
  );
5192
5221
  }
5193
5222
  }
@@ -5195,7 +5224,7 @@ var CompletionMenu = memo23(
5195
5224
  })
5196
5225
  );
5197
5226
  var InputFieldWithCompletions = memo23(
5198
- forwardRef13(function InputFieldWithCompletions2({
5227
+ forwardRef14(function InputFieldWithCompletions2({
5199
5228
  loading,
5200
5229
  initialValue = "",
5201
5230
  placeholder,
@@ -5256,7 +5285,7 @@ var InputFieldWithCompletions = memo23(
5256
5285
  updateState({ filter: initialValue });
5257
5286
  }, [initialValue, updateState]);
5258
5287
  const { filter, selectedIndex } = state;
5259
- const listRef = React35.useRef(null);
5288
+ const listRef = React36.useRef(null);
5260
5289
  const filteredItems = useMemo19(
5261
5290
  () => filterWithGroupedSections(items, filter),
5262
5291
  [items, filter]
@@ -5273,7 +5302,7 @@ var InputFieldWithCompletions = memo23(
5273
5302
  ),
5274
5303
  ListView.rowHeight * 10.5
5275
5304
  );
5276
- useEffect13(() => {
5305
+ useEffect14(() => {
5277
5306
  if (listRef.current) {
5278
5307
  listRef.current.scrollToIndex(selectedIndex);
5279
5308
  }
@@ -5392,14 +5421,14 @@ var InputFieldWithCompletions = memo23(
5392
5421
  ref.current?.setSelectionRange(0, ref.current.value.length);
5393
5422
  }
5394
5423
  }));
5395
- return /* @__PURE__ */ React35.createElement(
5424
+ return /* @__PURE__ */ React36.createElement(
5396
5425
  InputField.Root,
5397
5426
  {
5398
5427
  size: size2,
5399
5428
  labelSize: 16,
5400
5429
  renderPopoverContent: ({ width }) => {
5401
5430
  const listSize = { width, height };
5402
- return /* @__PURE__ */ React35.createElement(Stack.V, { flex: `0 0 ${height}px`, display }, filteredItems.length > 0 ? /* @__PURE__ */ React35.createElement(
5431
+ return /* @__PURE__ */ React36.createElement(Stack.V, { flex: `0 0 ${height}px`, display }, filteredItems.length > 0 ? /* @__PURE__ */ React36.createElement(
5403
5432
  CompletionMenu,
5404
5433
  {
5405
5434
  ref: listRef,
@@ -5409,7 +5438,7 @@ var InputFieldWithCompletions = memo23(
5409
5438
  onHoverIndex: handleIndexChange,
5410
5439
  listSize
5411
5440
  }
5412
- ) : /* @__PURE__ */ React35.createElement(
5441
+ ) : /* @__PURE__ */ React36.createElement(
5413
5442
  Stack.V,
5414
5443
  {
5415
5444
  height: "100px",
@@ -5417,11 +5446,11 @@ var InputFieldWithCompletions = memo23(
5417
5446
  alignItems: "center",
5418
5447
  justifyContent: "center"
5419
5448
  },
5420
- /* @__PURE__ */ React35.createElement(Small, { color: "textDisabled" }, loading ? "Loading" : "No results")
5449
+ /* @__PURE__ */ React36.createElement(Small, { color: "textDisabled" }, loading ? "Loading" : "No results")
5421
5450
  ));
5422
5451
  }
5423
5452
  },
5424
- /* @__PURE__ */ React35.createElement(
5453
+ /* @__PURE__ */ React36.createElement(
5425
5454
  InputField.Input,
5426
5455
  {
5427
5456
  ref,
@@ -5445,9 +5474,9 @@ var InputFieldWithCompletions = memo23(
5445
5474
  "aria-controls": "component-listbox"
5446
5475
  }
5447
5476
  ),
5448
- filter && typeaheadValue && typeaheadValue.startsWith(filter) && /* @__PURE__ */ React35.createElement(InputField.Typeahead, { value: typeaheadValue }),
5477
+ filter && typeaheadValue && typeaheadValue.startsWith(filter) && /* @__PURE__ */ React36.createElement(InputField.Typeahead, { value: typeaheadValue }),
5449
5478
  (!isFocused || !hideChildrenWhenFocused) && children,
5450
- loading && isFocused && /* @__PURE__ */ React35.createElement(InputField.Label, null, /* @__PURE__ */ React35.createElement(ActivityIndicator, null))
5479
+ loading && isFocused && /* @__PURE__ */ React36.createElement(InputField.Label, null, /* @__PURE__ */ React36.createElement(ActivityIndicator, null))
5451
5480
  );
5452
5481
  })
5453
5482
  );
@@ -5469,13 +5498,13 @@ function getNextIndex(items, currentIndex, direction, isDisabled) {
5469
5498
  }
5470
5499
 
5471
5500
  // src/components/Label.tsx
5472
- import React36, { memo as memo24 } from "react";
5501
+ import React37, { memo as memo24 } from "react";
5473
5502
  import styled26 from "styled-components";
5474
5503
  var LabelLabel = styled26.label(
5475
- ({ theme, selected }) => ({
5504
+ ({ theme, $selected }) => ({
5476
5505
  ...theme.textStyles.small,
5477
5506
  color: theme.colors.textMuted,
5478
- ...selected && {
5507
+ ...$selected && {
5479
5508
  color: theme.colors.text
5480
5509
  },
5481
5510
  fontSize: "11px",
@@ -5498,7 +5527,7 @@ var LabelContainer2 = styled26.span(({ theme }) => ({
5498
5527
  alignItems: "center"
5499
5528
  }));
5500
5529
  function LabelRoot({ label, children }) {
5501
- return /* @__PURE__ */ React36.createElement(LabelContainer2, null, children, label && /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(Spacer.Vertical, { size: 2 }), /* @__PURE__ */ React36.createElement(LabelLabel, null, label)));
5530
+ return /* @__PURE__ */ React37.createElement(LabelContainer2, null, children, label && /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(Spacer.Vertical, { size: 2 }), /* @__PURE__ */ React37.createElement(LabelLabel, null, label)));
5502
5531
  }
5503
5532
  var Label;
5504
5533
  ((_Label) => {
@@ -5508,7 +5537,7 @@ var Label;
5508
5537
 
5509
5538
  // src/components/LabeledElementView.tsx
5510
5539
  import * as kiwi from "kiwi.js";
5511
- import React37, {
5540
+ import React38, {
5512
5541
  Children as Children5,
5513
5542
  createRef,
5514
5543
  Fragment,
@@ -5553,7 +5582,7 @@ var LabeledElementView = memo25(function LabeledElementView2({
5553
5582
  );
5554
5583
  }, [serializedIds]);
5555
5584
  const labelElements = useMemo20(() => {
5556
- return serializedIds.split(",").map((id, index) => /* @__PURE__ */ React37.createElement(
5585
+ return serializedIds.split(",").map((id, index) => /* @__PURE__ */ React38.createElement(
5557
5586
  "span",
5558
5587
  {
5559
5588
  key: id,
@@ -5631,13 +5660,13 @@ var LabeledElementView = memo25(function LabeledElementView2({
5631
5660
  `${Math.max(...heights)}px`
5632
5661
  );
5633
5662
  }, [refs, labelElements]);
5634
- return /* @__PURE__ */ React37.createElement(Container4, { ref: containerRef }, /* @__PURE__ */ React37.createElement(Tools, null, children), /* @__PURE__ */ React37.createElement(Labels, null, labelElements));
5663
+ return /* @__PURE__ */ React38.createElement(Container4, { ref: containerRef }, /* @__PURE__ */ React38.createElement(Tools, null, children), /* @__PURE__ */ React38.createElement(Labels, null, labelElements));
5635
5664
  });
5636
5665
 
5637
5666
  // src/components/Progress.tsx
5638
5667
  import { clamp } from "@noya-app/noya-utils";
5639
5668
  import * as ProgressPrimitive from "@radix-ui/react-progress";
5640
- import React38 from "react";
5669
+ import React39 from "react";
5641
5670
  import styled28 from "styled-components";
5642
5671
  function Progress({
5643
5672
  value,
@@ -5647,7 +5676,7 @@ function Progress({
5647
5676
  variant = "normal"
5648
5677
  }) {
5649
5678
  const clampedValue = clamp(value, 0, 100);
5650
- return /* @__PURE__ */ React38.createElement(ProgressRoot, { value: clampedValue, style: { width, flex, height } }, /* @__PURE__ */ React38.createElement(
5679
+ return /* @__PURE__ */ React39.createElement(ProgressRoot, { value: clampedValue, style: { width, flex, height } }, /* @__PURE__ */ React39.createElement(
5651
5680
  ProgressIndicator,
5652
5681
  {
5653
5682
  variant,
@@ -5672,18 +5701,18 @@ var ProgressIndicator = styled28(ProgressPrimitive.Indicator)(({ theme, variant
5672
5701
 
5673
5702
  // src/components/RadioGroup.tsx
5674
5703
  import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
5675
- import React39, {
5704
+ import React40, {
5676
5705
  createContext as createContext10,
5677
- forwardRef as forwardRef14,
5706
+ forwardRef as forwardRef15,
5678
5707
  memo as memo26,
5679
5708
  useCallback as useCallback22,
5680
5709
  useContext as useContext10,
5681
5710
  useMemo as useMemo21
5682
5711
  } from "react";
5683
5712
  import styled29 from "styled-components";
5684
- var ignoredProps3 = /* @__PURE__ */ new Set(["colorScheme"]);
5713
+ var ignoredProps2 = /* @__PURE__ */ new Set(["colorScheme"]);
5685
5714
  var StyledRoot = styled29(ToggleGroupPrimitive.Root).withConfig({
5686
- shouldForwardProp: (prop) => !ignoredProps3.has(prop)
5715
+ shouldForwardProp: (prop) => !ignoredProps2.has(prop)
5687
5716
  })(({ theme, colorScheme }) => ({
5688
5717
  appearance: "none",
5689
5718
  width: "0px",
@@ -5706,7 +5735,7 @@ var StyledRoot = styled29(ToggleGroupPrimitive.Root).withConfig({
5706
5735
  padding: colorScheme === void 0 ? "2px" : 0
5707
5736
  }));
5708
5737
  var StyledItem = styled29(ToggleGroupPrimitive.Item).withConfig({
5709
- shouldForwardProp: (prop) => !ignoredProps3.has(prop)
5738
+ shouldForwardProp: (prop) => !ignoredProps2.has(prop)
5710
5739
  })(({ theme, colorScheme }) => ({
5711
5740
  ...theme.textStyles.small,
5712
5741
  position: "relative",
@@ -5732,9 +5761,9 @@ var StyledItem = styled29(ToggleGroupPrimitive.Item).withConfig({
5732
5761
  boxShadow: `0 0 0 1px ${theme.colors.sidebar.background}, 0 0 0 3px ${theme.colors[colorScheme ?? "primary"]}`
5733
5762
  }
5734
5763
  }));
5735
- var ToggleGroupItem = forwardRef14(function ToggleGroupItem2({ value, tooltip, children, disabled = false }, forwardedRef) {
5764
+ var ToggleGroupItem = forwardRef15(function ToggleGroupItem2({ value, tooltip, children, disabled = false }, forwardedRef) {
5736
5765
  const { colorScheme } = useContext10(RadioGroupContext);
5737
- const itemElement = /* @__PURE__ */ React39.createElement(
5766
+ const itemElement = /* @__PURE__ */ React40.createElement(
5738
5767
  StyledItem,
5739
5768
  {
5740
5769
  ref: forwardedRef,
@@ -5744,7 +5773,7 @@ var ToggleGroupItem = forwardRef14(function ToggleGroupItem2({ value, tooltip, c
5744
5773
  },
5745
5774
  children
5746
5775
  );
5747
- return tooltip ? /* @__PURE__ */ React39.createElement(Tooltip, { content: tooltip }, itemElement) : itemElement;
5776
+ return tooltip ? /* @__PURE__ */ React40.createElement(Tooltip, { content: tooltip }, itemElement) : itemElement;
5748
5777
  });
5749
5778
  var RadioGroupContext = createContext10({
5750
5779
  colorScheme: "primary"
@@ -5766,7 +5795,7 @@ function ToggleGroupRoot({
5766
5795
  },
5767
5796
  [allowEmpty, onValueChange]
5768
5797
  );
5769
- return /* @__PURE__ */ React39.createElement(RadioGroupContext.Provider, { value: contextValue }, /* @__PURE__ */ React39.createElement(
5798
+ return /* @__PURE__ */ React40.createElement(RadioGroupContext.Provider, { value: contextValue }, /* @__PURE__ */ React40.createElement(
5770
5799
  StyledRoot,
5771
5800
  {
5772
5801
  id,
@@ -5785,13 +5814,13 @@ var RadioGroup;
5785
5814
  })(RadioGroup || (RadioGroup = {}));
5786
5815
 
5787
5816
  // src/components/Select.tsx
5788
- import { memoize as memoize2 } from "@noya-app/noya-utils";
5789
- import React40, {
5817
+ import { memoize } from "@noya-app/noya-utils";
5818
+ import React41, {
5790
5819
  createContext as createContext11,
5791
5820
  memo as memo27,
5792
5821
  useCallback as useCallback23,
5793
5822
  useContext as useContext11,
5794
- useEffect as useEffect14,
5823
+ useEffect as useEffect15,
5795
5824
  useMemo as useMemo22,
5796
5825
  useRef as useRef18
5797
5826
  } from "react";
@@ -5803,38 +5832,38 @@ var SelectOption = memo27(function SelectOption2({
5803
5832
  onSelect
5804
5833
  }) {
5805
5834
  const { addListener, removeListener } = useContext11(SelectContext);
5806
- useEffect14(() => {
5835
+ useEffect15(() => {
5807
5836
  if (!onSelect)
5808
5837
  return;
5809
5838
  addListener(value, onSelect);
5810
5839
  return () => removeListener(value);
5811
5840
  }, [addListener, onSelect, removeListener, value]);
5812
- return /* @__PURE__ */ React40.createElement("option", { value }, title ?? value);
5841
+ return /* @__PURE__ */ React41.createElement("option", { value }, title ?? value);
5813
5842
  });
5814
- var createChevronSVGString = memoize2(
5843
+ var createChevronSVGString = memoize(
5815
5844
  (color) => `
5816
5845
  <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15' fill='${color}'>
5817
5846
  <path d='M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z'></path>
5818
5847
  </svg>
5819
- `
5848
+ `.replace(/\n/g, "")
5820
5849
  );
5821
5850
  var SelectContainer = styled30.div(
5822
- ({ flex }) => ({
5823
- flex: flex ?? "1 1 0px",
5851
+ ({ $flex }) => ({
5852
+ flex: $flex ?? "1 1 0px",
5824
5853
  display: "flex",
5825
5854
  flexDirection: "row",
5826
5855
  position: "relative"
5827
5856
  })
5828
5857
  );
5829
5858
  var SelectElement = styled30.select(
5830
- ({ theme, flex }) => ({
5859
+ ({ theme, $flex }) => ({
5831
5860
  appearance: "none",
5832
5861
  ...theme.textStyles.small,
5833
5862
  color: theme.colors.text,
5834
5863
  lineHeight: "19px",
5835
5864
  width: "0px",
5836
5865
  // Reset intrinsic width
5837
- flex: flex ?? "1 1 0px",
5866
+ flex: $flex ?? "1 1 0px",
5838
5867
  position: "relative",
5839
5868
  border: "0",
5840
5869
  outline: "none",
@@ -5883,7 +5912,7 @@ var Select = memo27(function Select2({
5883
5912
  const onChange = "options" in rest ? rest.onChange : void 0;
5884
5913
  const children = "options" in rest ? void 0 : rest.children;
5885
5914
  const optionElements = useMemo22(
5886
- () => options ? options.map((option, index) => /* @__PURE__ */ React40.createElement(
5915
+ () => options ? options.map((option, index) => /* @__PURE__ */ React41.createElement(
5887
5916
  SelectOption,
5888
5917
  {
5889
5918
  key: option,
@@ -5902,11 +5931,11 @@ var Select = memo27(function Select2({
5902
5931
  }),
5903
5932
  []
5904
5933
  );
5905
- return /* @__PURE__ */ React40.createElement(SelectContext.Provider, { value: contextValue }, /* @__PURE__ */ React40.createElement(SelectContainer, { flex }, /* @__PURE__ */ React40.createElement(
5934
+ return /* @__PURE__ */ React41.createElement(SelectContext.Provider, { value: contextValue }, /* @__PURE__ */ React41.createElement(SelectContainer, { $flex: flex }, /* @__PURE__ */ React41.createElement(
5906
5935
  SelectElement,
5907
5936
  {
5908
5937
  id,
5909
- flex,
5938
+ $flex: flex,
5910
5939
  value,
5911
5940
  onChange: useCallback23(
5912
5941
  (event) => listeners.current.get(event.target.value)?.(),
@@ -5915,12 +5944,12 @@ var Select = memo27(function Select2({
5915
5944
  onPointerDown: (event) => event.stopPropagation()
5916
5945
  },
5917
5946
  optionElements
5918
- )), label && /* @__PURE__ */ React40.createElement(SelectLabel, { htmlFor: id }, label));
5947
+ )), label && /* @__PURE__ */ React41.createElement(SelectLabel, { htmlFor: id }, label));
5919
5948
  });
5920
5949
 
5921
5950
  // src/components/Slider.tsx
5922
5951
  import * as RadixSlider from "@radix-ui/react-slider";
5923
- import React41, { useCallback as useCallback24, useMemo as useMemo23 } from "react";
5952
+ import React42, { useCallback as useCallback24, useMemo as useMemo23 } from "react";
5924
5953
  import styled31 from "styled-components";
5925
5954
  var StyledSlider = styled31(RadixSlider.Root)({
5926
5955
  flex: "1",
@@ -5971,7 +6000,7 @@ var Slider = function Slider2({
5971
6000
  },
5972
6001
  [onValueChange]
5973
6002
  );
5974
- return /* @__PURE__ */ React41.createElement(
6003
+ return /* @__PURE__ */ React42.createElement(
5975
6004
  StyledSlider,
5976
6005
  {
5977
6006
  min,
@@ -5980,16 +6009,16 @@ var Slider = function Slider2({
5980
6009
  value: arrayValue,
5981
6010
  onValueChange: handleValueChange
5982
6011
  },
5983
- /* @__PURE__ */ React41.createElement(StyledTrack, null, /* @__PURE__ */ React41.createElement(StyledRange, null)),
5984
- /* @__PURE__ */ React41.createElement(StyledThumb2, null)
6012
+ /* @__PURE__ */ React42.createElement(StyledTrack, null, /* @__PURE__ */ React42.createElement(StyledRange, null)),
6013
+ /* @__PURE__ */ React42.createElement(StyledThumb2, null)
5985
6014
  );
5986
6015
  };
5987
6016
 
5988
6017
  // src/components/Switch.tsx
5989
6018
  import * as SwitchPrimitive from "@radix-ui/react-switch";
5990
- import React42 from "react";
6019
+ import React43 from "react";
5991
6020
  import styled32 from "styled-components";
5992
- var SwitchRoot = styled32(SwitchPrimitive.Root)(({ theme, colorScheme: variant }) => ({
6021
+ var SwitchRoot = styled32(SwitchPrimitive.Root)(({ theme, $colorScheme }) => ({
5993
6022
  all: "unset",
5994
6023
  width: 32,
5995
6024
  height: 19,
@@ -5998,13 +6027,12 @@ var SwitchRoot = styled32(SwitchPrimitive.Root)(({ theme, colorScheme: variant }
5998
6027
  position: "relative",
5999
6028
  WebkitTapHighlightColor: "rgba(0, 0, 0, 0)",
6000
6029
  cursor: "pointer",
6001
- // '&:focus': {
6002
- // boxShadow: `0 0 0 1px ${
6003
- // variant === 'secondary' ? theme.colors.secondary : theme.colors.primary
6004
- // }`,
6005
- // },
6030
+ "&:focus": {
6031
+ outline: `2px solid ${theme.colors.primary}`,
6032
+ outlineOffset: "1px"
6033
+ },
6006
6034
  '&[data-state="checked"]': {
6007
- backgroundColor: variant === "primary" ? theme.colors.primary : variant === "secondary" ? theme.colors.secondary : void 0
6035
+ backgroundColor: $colorScheme === "primary" ? theme.colors.primary : $colorScheme === "secondary" ? theme.colors.secondary : void 0
6008
6036
  }
6009
6037
  }));
6010
6038
  var SwitchThumb = styled32(SwitchPrimitive.Thumb)({
@@ -6023,27 +6051,27 @@ var Switch = function Switch2({
6023
6051
  onChange,
6024
6052
  colorScheme = "normal"
6025
6053
  }) {
6026
- return /* @__PURE__ */ React42.createElement(
6054
+ return /* @__PURE__ */ React43.createElement(
6027
6055
  SwitchRoot,
6028
6056
  {
6029
- colorScheme,
6057
+ $colorScheme: colorScheme,
6030
6058
  checked: value,
6031
6059
  onCheckedChange: (newValue) => {
6032
6060
  onChange(newValue);
6033
6061
  }
6034
6062
  },
6035
- /* @__PURE__ */ React42.createElement(SwitchThumb, null)
6063
+ /* @__PURE__ */ React43.createElement(SwitchThumb, null)
6036
6064
  );
6037
6065
  };
6038
6066
 
6039
6067
  // src/components/TreeView.tsx
6040
- import React43, {
6041
- forwardRef as forwardRef15,
6068
+ import React44, {
6069
+ forwardRef as forwardRef16,
6042
6070
  memo as memo28,
6043
6071
  useCallback as useCallback25,
6044
6072
  useContext as useContext12
6045
6073
  } from "react";
6046
- var TreeRow = forwardRef15(function TreeRow2({
6074
+ var TreeRow = forwardRef16(function TreeRow2({
6047
6075
  icon,
6048
6076
  expanded,
6049
6077
  onClickChevron,
@@ -6058,14 +6086,14 @@ var TreeRow = forwardRef15(function TreeRow2({
6058
6086
  },
6059
6087
  [onClickChevron]
6060
6088
  );
6061
- return /* @__PURE__ */ React43.createElement(ListView.Row, { ref: forwardedRef, ...rest }, expandable && /* @__PURE__ */ React43.createElement(React43.Fragment, null, expanded === void 0 ? /* @__PURE__ */ React43.createElement(Spacer.Horizontal, { size: 19 }) : /* @__PURE__ */ React43.createElement(
6089
+ return /* @__PURE__ */ React44.createElement(ListView.Row, { ref: forwardedRef, ...rest }, expandable && /* @__PURE__ */ React44.createElement(React44.Fragment, null, expanded === void 0 ? /* @__PURE__ */ React44.createElement(Spacer.Horizontal, { size: 19 }) : /* @__PURE__ */ React44.createElement(
6062
6090
  IconButton,
6063
6091
  {
6064
6092
  iconName: expanded ? "ChevronDownIcon" : "ChevronRightIcon",
6065
6093
  onClick: handleClickChevron,
6066
6094
  selected: rest.selected
6067
6095
  }
6068
- ), /* @__PURE__ */ React43.createElement(Spacer.Horizontal, { size: 6 })), icon && /* @__PURE__ */ React43.createElement(React43.Fragment, null, icon, /* @__PURE__ */ React43.createElement(Spacer.Horizontal, { size: 10 })), children);
6096
+ ), /* @__PURE__ */ React44.createElement(Spacer.Horizontal, { size: 6 })), icon && /* @__PURE__ */ React44.createElement(React44.Fragment, null, icon, /* @__PURE__ */ React44.createElement(Spacer.Horizontal, { size: 10 })), children);
6069
6097
  });
6070
6098
  var TreeView;
6071
6099
  ((TreeView2) => {
@@ -6166,7 +6194,7 @@ var SUPPORTED_CANVAS_UPLOAD_TYPES = [
6166
6194
 
6167
6195
  // src/components/ArrayController.tsx
6168
6196
  import { range as range2 } from "@noya-app/noya-utils";
6169
- import React45, { memo as memo30, useCallback as useCallback26, useMemo as useMemo24 } from "react";
6197
+ import React46, { memo as memo30, useCallback as useCallback26, useMemo as useMemo24 } from "react";
6170
6198
  import styled34, { useTheme as useTheme5 } from "styled-components";
6171
6199
 
6172
6200
  // src/components/InspectorPrimitives.tsx
@@ -6185,25 +6213,25 @@ __export(InspectorPrimitives_exports, {
6185
6213
  Title: () => Title3,
6186
6214
  VerticalSeparator: () => VerticalSeparator
6187
6215
  });
6188
- import React44, { memo as memo29 } from "react";
6216
+ import React45, { memo as memo29 } from "react";
6189
6217
  import styled33, { useTheme as useTheme4 } from "styled-components";
6190
- var Section = styled33.div(({ theme, padding = "10px", gap }) => ({
6218
+ var Section = styled33.div(({ theme, $padding = "10px", $gap }) => ({
6191
6219
  flex: "0 0 auto",
6192
6220
  display: "flex",
6193
6221
  flexDirection: "column",
6194
- padding,
6195
- gap
6222
+ padding: $padding,
6223
+ gap: $gap
6196
6224
  }));
6197
6225
  var SectionHeader = styled33.div(({ theme }) => ({
6198
6226
  display: "flex",
6199
6227
  alignItems: "center"
6200
6228
  }));
6201
- var Title3 = styled33.div(({ theme, textStyle }) => ({
6229
+ var Title3 = styled33.div(({ theme, $textStyle }) => ({
6202
6230
  display: "flex",
6203
6231
  flexDirection: "row",
6204
6232
  userSelect: "none",
6205
- ...textStyle ? {
6206
- ...theme.textStyles[textStyle],
6233
+ ...$textStyle ? {
6234
+ ...theme.textStyles[$textStyle],
6207
6235
  color: theme.colors.text
6208
6236
  } : {
6209
6237
  ...theme.textStyles.label,
@@ -6212,12 +6240,12 @@ var Title3 = styled33.div(({ theme, textStyle }) => ({
6212
6240
  }
6213
6241
  }));
6214
6242
  var Row2 = styled33.div(
6215
- ({ theme, gap }) => ({
6243
+ ({ theme, $gap }) => ({
6216
6244
  flex: "1",
6217
6245
  display: "flex",
6218
6246
  flexDirection: "row",
6219
6247
  alignItems: "center",
6220
- gap
6248
+ gap: $gap
6221
6249
  })
6222
6250
  );
6223
6251
  var Column = styled33.div(({ theme }) => ({
@@ -6232,18 +6260,18 @@ var Checkbox = styled33.input(({ theme }) => ({
6232
6260
  var Text3 = styled33.span(({ theme }) => ({
6233
6261
  ...theme.textStyles.small
6234
6262
  }));
6235
- var VerticalSeparator = () => /* @__PURE__ */ React44.createElement(Spacer.Vertical, { size: useTheme4().sizes.inspector.verticalSeparator });
6236
- var HorizontalSeparator = () => /* @__PURE__ */ React44.createElement(Spacer.Horizontal, { size: useTheme4().sizes.inspector.horizontalSeparator });
6263
+ var VerticalSeparator = () => /* @__PURE__ */ React45.createElement(Spacer.Vertical, { size: useTheme4().sizes.inspector.verticalSeparator });
6264
+ var HorizontalSeparator = () => /* @__PURE__ */ React45.createElement(Spacer.Horizontal, { size: useTheme4().sizes.inspector.horizontalSeparator });
6237
6265
  var SliderRowLabel = styled33.span(({ theme }) => ({
6238
6266
  ...theme.textStyles.small,
6239
6267
  color: theme.colors.textMuted,
6240
6268
  marginBottom: "-6px"
6241
6269
  }));
6242
- var RowLabel = styled33.span(({ theme, textStyle }) => ({
6270
+ var RowLabel = styled33.span(({ theme, $textStyle }) => ({
6243
6271
  // marginBottom: '6px',
6244
6272
  display: "flex",
6245
- ...textStyle ? {
6246
- ...theme.textStyles[textStyle]
6273
+ ...$textStyle ? {
6274
+ ...theme.textStyles[$textStyle]
6247
6275
  } : {
6248
6276
  ...theme.textStyles.label,
6249
6277
  color: theme.colors.textSubtle,
@@ -6261,13 +6289,13 @@ var LabeledRow = memo29(function LabeledRow2({
6261
6289
  gap,
6262
6290
  right
6263
6291
  }) {
6264
- return /* @__PURE__ */ React44.createElement(Row2, { id }, /* @__PURE__ */ React44.createElement(Column, null, /* @__PURE__ */ React44.createElement(RowLabel, { textStyle: labelTextStyle }, label, right && /* @__PURE__ */ React44.createElement(Spacer.Horizontal, null), right), /* @__PURE__ */ React44.createElement(Row2, { gap }, children)));
6292
+ return /* @__PURE__ */ React45.createElement(Row2, { id }, /* @__PURE__ */ React45.createElement(Column, null, /* @__PURE__ */ React45.createElement(RowLabel, { $textStyle: labelTextStyle }, label, right && /* @__PURE__ */ React45.createElement(Spacer.Horizontal, null), right), /* @__PURE__ */ React45.createElement(Row2, { $gap: gap }, children)));
6265
6293
  });
6266
6294
  var LabeledSliderRow = memo29(function LabeledRow3({
6267
6295
  children,
6268
6296
  label
6269
6297
  }) {
6270
- return /* @__PURE__ */ React44.createElement(Row2, null, /* @__PURE__ */ React44.createElement(Column, null, /* @__PURE__ */ React44.createElement(SliderRowLabel, null, label), /* @__PURE__ */ React44.createElement(Row2, null, children)));
6298
+ return /* @__PURE__ */ React45.createElement(Row2, null, /* @__PURE__ */ React45.createElement(Column, null, /* @__PURE__ */ React45.createElement(SliderRowLabel, null, label), /* @__PURE__ */ React45.createElement(Row2, null, children)));
6271
6299
  });
6272
6300
 
6273
6301
  // src/components/ArrayController.tsx
@@ -6320,11 +6348,11 @@ var ArrayController = memo30(function ArrayController2({
6320
6348
  [onMoveItem, reversed]
6321
6349
  );
6322
6350
  const renderRow = (index) => {
6323
- return /* @__PURE__ */ React45.createElement(ElementRow, { key: keys[index] }, renderItem({ item: items[index], index }));
6351
+ return /* @__PURE__ */ React46.createElement(ElementRow, { key: keys[index] }, renderItem({ item: items[index], index }));
6324
6352
  };
6325
- return /* @__PURE__ */ React45.createElement(Section, { id, padding, gap: "2px" }, /* @__PURE__ */ React45.createElement(SectionHeader, null, /* @__PURE__ */ React45.createElement(Button, { variant: "none", onClick: onClickPlus }, /* @__PURE__ */ React45.createElement(Title3, null, title)), /* @__PURE__ */ React45.createElement(Spacer.Horizontal, null), withSeparatorElements(
6353
+ return /* @__PURE__ */ React46.createElement(Section, { id, $padding: padding, $gap: "2px" }, /* @__PURE__ */ React46.createElement(SectionHeader, null, /* @__PURE__ */ React46.createElement(Button, { variant: "none", onClick: onClickPlus }, /* @__PURE__ */ React46.createElement(Title3, null, title)), /* @__PURE__ */ React46.createElement(Spacer.Horizontal, null), withSeparatorElements(
6326
6354
  [
6327
- onClickTrash && /* @__PURE__ */ React45.createElement(
6355
+ onClickTrash && /* @__PURE__ */ React46.createElement(
6328
6356
  IconButton,
6329
6357
  {
6330
6358
  id: `${id}-trash`,
@@ -6333,7 +6361,7 @@ var ArrayController = memo30(function ArrayController2({
6333
6361
  onClick: onClickTrash
6334
6362
  }
6335
6363
  ),
6336
- onClickExpand && /* @__PURE__ */ React45.createElement(
6364
+ onClickExpand && /* @__PURE__ */ React46.createElement(
6337
6365
  IconButton,
6338
6366
  {
6339
6367
  id: `${id}-gear`,
@@ -6342,7 +6370,7 @@ var ArrayController = memo30(function ArrayController2({
6342
6370
  onClick: onClickExpand
6343
6371
  }
6344
6372
  ),
6345
- onClickPlus && /* @__PURE__ */ React45.createElement(
6373
+ onClickPlus && /* @__PURE__ */ React46.createElement(
6346
6374
  IconButton,
6347
6375
  {
6348
6376
  id: `${id}-add`,
@@ -6352,21 +6380,21 @@ var ArrayController = memo30(function ArrayController2({
6352
6380
  }
6353
6381
  )
6354
6382
  ],
6355
- /* @__PURE__ */ React45.createElement(Spacer.Horizontal, { size: 8 })
6356
- )), /* @__PURE__ */ React45.createElement(Stack.V, { gap: "4px" }, sortable ? /* @__PURE__ */ React45.createElement(
6383
+ /* @__PURE__ */ React46.createElement(Spacer.Horizontal, { size: 8 })
6384
+ )), /* @__PURE__ */ React46.createElement(Stack.V, { gap: "4px" }, sortable ? /* @__PURE__ */ React46.createElement(
6357
6385
  Sortable.Root,
6358
6386
  {
6359
6387
  keys,
6360
6388
  renderOverlay: renderRow,
6361
6389
  onMoveItem: handleMoveItem
6362
6390
  },
6363
- indexes.map((index) => /* @__PURE__ */ React45.createElement(Sortable.Item, { id: keys[index], key: keys[index] }, ({ relativeDropPosition, ...sortableProps }) => /* @__PURE__ */ React45.createElement(ItemContainer2, { ...sortableProps }, renderRow(index), relativeDropPosition && /* @__PURE__ */ React45.createElement(
6391
+ indexes.map((index) => /* @__PURE__ */ React46.createElement(Sortable.Item, { id: keys[index], key: keys[index] }, ({ relativeDropPosition, ...sortableProps }) => /* @__PURE__ */ React46.createElement(ItemContainer2, { ...sortableProps }, renderRow(index), relativeDropPosition && /* @__PURE__ */ React46.createElement(
6364
6392
  ListView.DragIndicator,
6365
6393
  {
6366
- gap: 0,
6367
- colorScheme: "primary",
6368
- relativeDropPosition,
6369
- offsetLeft: 0
6394
+ $gap: 0,
6395
+ $colorScheme: "primary",
6396
+ $relativeDropPosition: relativeDropPosition,
6397
+ $offsetLeft: 0
6370
6398
  }
6371
6399
  ))))
6372
6400
  ) : indexes.map(renderRow)), expanded && renderExpandedContent?.());
@@ -6374,7 +6402,7 @@ var ArrayController = memo30(function ArrayController2({
6374
6402
 
6375
6403
  // src/components/DimensionInput.tsx
6376
6404
  import { round } from "@noya-app/noya-utils";
6377
- import React46, { memo as memo31, useCallback as useCallback27 } from "react";
6405
+ import React47, { memo as memo31, useCallback as useCallback27 } from "react";
6378
6406
  function getNewValue(value, mode, delta) {
6379
6407
  return delta === void 0 ? value : mode === "replace" ? delta : value + delta;
6380
6408
  }
@@ -6396,7 +6424,7 @@ var DimensionInput = memo31(function DimensionInput2({
6396
6424
  (value2) => onSetValue(value2, "replace"),
6397
6425
  [onSetValue]
6398
6426
  );
6399
- return /* @__PURE__ */ React46.createElement(InputField.Root, { id, width: size2 }, /* @__PURE__ */ React46.createElement(
6427
+ return /* @__PURE__ */ React47.createElement(InputField.Root, { id, width: size2 }, /* @__PURE__ */ React47.createElement(
6400
6428
  InputField.NumberInput,
6401
6429
  {
6402
6430
  value: value === void 0 ? value : round(value, 2),
@@ -6405,7 +6433,7 @@ var DimensionInput = memo31(function DimensionInput2({
6405
6433
  disabled,
6406
6434
  ...trigger === "change" ? { onChange: handleSetValue } : { onSubmit: handleSetValue }
6407
6435
  }
6408
- ), label && /* @__PURE__ */ React46.createElement(InputField.Label, null, label));
6436
+ ), label && /* @__PURE__ */ React47.createElement(InputField.Label, null, label));
6409
6437
  });
6410
6438
  export {
6411
6439
  ActivityIndicator,