@noya-app/noya-designsystem 0.1.70 → 0.1.72

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
@@ -395,14 +395,14 @@ var require_grammarDiagnostics = __commonJS({
395
395
  rootNonTerminating.add(name);
396
396
  }
397
397
  }
398
- const memo41 = /* @__PURE__ */ new Map();
398
+ const memo40 = /* @__PURE__ */ new Map();
399
399
  const collectCauses = (name, path) => {
400
- if (memo41.has(name)) {
401
- return memo41.get(name);
400
+ if (memo40.has(name)) {
401
+ return memo40.get(name);
402
402
  }
403
403
  if (rootNonTerminating.has(name)) {
404
404
  const direct = /* @__PURE__ */ new Set([name]);
405
- memo41.set(name, direct);
405
+ memo40.set(name, direct);
406
406
  return direct;
407
407
  }
408
408
  if (path.has(name)) {
@@ -421,7 +421,7 @@ var require_grammarDiagnostics = __commonJS({
421
421
  }
422
422
  }
423
423
  path.delete(name);
424
- memo41.set(name, result);
424
+ memo40.set(name, result);
425
425
  return result;
426
426
  };
427
427
  const dependencyIssues = [];
@@ -4951,7 +4951,15 @@ function parseNumber(value) {
4951
4951
  return value ? Number(value) : NaN;
4952
4952
  }
4953
4953
  function InputFieldNumberInput(props) {
4954
- const { value, placeholder, onNudge, onBlur, readOnly, ...rest } = props;
4954
+ const {
4955
+ value,
4956
+ placeholder,
4957
+ onNudge,
4958
+ onBlur,
4959
+ readOnly,
4960
+ triggersOnEmpty,
4961
+ ...rest
4962
+ } = props;
4955
4963
  const onSubmit = "onSubmit" in props ? props.onSubmit : void 0;
4956
4964
  const onChange = "onChange" in props ? props.onChange : void 0;
4957
4965
  const [internalValue, setInternalValue] = useState15();
@@ -4979,6 +4987,9 @@ function InputFieldNumberInput(props) {
4979
4987
  (value2) => {
4980
4988
  if (value2 === "" || value2 === "-" || value2 === ".") {
4981
4989
  setInternalValue(value2);
4990
+ if (triggersOnEmpty) {
4991
+ onChange?.(0, { isEmpty: true });
4992
+ }
4982
4993
  return;
4983
4994
  }
4984
4995
  if (value2.endsWith(".")) {
@@ -4988,10 +4999,10 @@ function InputFieldNumberInput(props) {
4988
4999
  setInternalValue(void 0);
4989
5000
  const newValue = parseNumber(value2);
4990
5001
  if (!isNaN(newValue)) {
4991
- onChange?.(newValue);
5002
+ onChange?.(newValue, { isEmpty: false });
4992
5003
  }
4993
5004
  },
4994
- [onChange]
5005
+ [onChange, triggersOnEmpty]
4995
5006
  );
4996
5007
  const handleBlur = useCallback13(
4997
5008
  (event) => {
@@ -7036,7 +7047,8 @@ var BreadcrumbSlash = () => {
7036
7047
  fill: "none",
7037
7048
  xmlns: "http://www.w3.org/2000/svg",
7038
7049
  opacity: 0.5,
7039
- style: slashStyle
7050
+ style: slashStyle,
7051
+ className: "n-flex-none"
7040
7052
  },
7041
7053
  /* @__PURE__ */ React42.createElement(
7042
7054
  "path",
@@ -7354,7 +7366,7 @@ var Chip = memo15(
7354
7366
  );
7355
7367
 
7356
7368
  // src/components/Collection.tsx
7357
- import React61 from "react";
7369
+ import React63 from "react";
7358
7370
 
7359
7371
  // src/components/Grid.tsx
7360
7372
  import React50, { useImperativeHandle as useImperativeHandle3, useRef as useRef16, useState as useState23 } from "react";
@@ -8177,12 +8189,12 @@ var Grid = memoGeneric(
8177
8189
  );
8178
8190
 
8179
8191
  // src/components/List.tsx
8180
- import React60, {
8181
- memo as memo22,
8192
+ import React62, {
8193
+ memo as memo21,
8182
8194
  useImperativeHandle as useImperativeHandle5,
8183
- useMemo as useMemo25,
8195
+ useMemo as useMemo26,
8184
8196
  useRef as useRef20,
8185
- useState as useState25
8197
+ useState as useState26
8186
8198
  } from "react";
8187
8199
 
8188
8200
  // src/components/listView/ListViewContexts.tsx
@@ -8207,10 +8219,6 @@ var ListRowContext = createContext10({
8207
8219
  isSectionHeader: false
8208
8220
  });
8209
8221
  ListRowContext.displayName = "ListRowContext";
8210
- var RenderItemContext = createContext10(
8211
- () => null
8212
- );
8213
- RenderItemContext.displayName = "RenderItemContext";
8214
8222
 
8215
8223
  // src/components/listView/ListViewEditableRowTitle.tsx
8216
8224
  import React51, { memo as memo19, useLayoutEffect as useLayoutEffect5, useRef as useRef17 } from "react";
@@ -8263,18 +8271,347 @@ var ListViewEditableRowTitle = memo19(function ListViewEditableRowTitle2({
8263
8271
 
8264
8272
  // src/components/listView/ListViewRoot.tsx
8265
8273
  import { range } from "@noya-app/noya-utils";
8266
- import React56, {
8274
+ import React58, {
8267
8275
  isValidElement as isValidElement3,
8268
- memo as memo20,
8269
- useCallback as useCallback24,
8270
- useContext as useContext12,
8276
+ useCallback as useCallback25,
8277
+ useMemo as useMemo24
8278
+ } from "react";
8279
+
8280
+ // src/components/Virtualized.tsx
8281
+ import React53, {
8282
+ useCallback as useCallback22,
8271
8283
  useImperativeHandle as useImperativeHandle4,
8272
8284
  useLayoutEffect as useLayoutEffect6,
8273
- useMemo as useMemo23,
8274
- useRef as useRef19
8285
+ useMemo as useMemo19,
8286
+ useRef as useRef18,
8287
+ useState as useState24
8275
8288
  } from "react";
8276
- import { WindowScroller } from "react-virtualized";
8277
- import { VariableSizeList } from "react-window";
8289
+ import { flushSync } from "react-dom";
8290
+
8291
+ // src/components/ScrollArea2.tsx
8292
+ import { ScrollArea as ScrollArea3 } from "@base-ui-components/react/scroll-area";
8293
+ import * as React52 from "react";
8294
+ var SCROLLBAR_STATE_CLASSES = "scroll-component n-opacity-0 n-transition-opacity n-delay-300 n-pointer-events-none data-[hovering]:n-opacity-100 data-[hovering]:n-delay-0 data-[hovering]:n-duration-75 data-[hovering]:n-pointer-events-auto data-[scrolling]:n-opacity-100 data-[scrolling]:n-delay-0 data-[scrolling]:n-duration-75 data-[scrolling]:n-pointer-events-auto";
8295
+ var SCROLLBAR_TRACK_VERTICAL = "n-m-1 n-w-1 flex n-justify-center n-rounded-md n-bg-divider-subtle";
8296
+ var SCROLLBAR_TRACK_HORIZONTAL = "n-m-1 n-h-1 flex n-justify-center n-rounded-md n-bg-divider-subtle";
8297
+ var SCROLLBAR_THUMB_VERTICAL = "scroll-component n-w-full n-rounded n-bg-scrollbar";
8298
+ var SCROLLBAR_THUMB_HORIZONTAL = "scroll-component n-h-full n-rounded n-bg-scrollbar";
8299
+ function ScrollArea22({
8300
+ children,
8301
+ className,
8302
+ viewportClassName,
8303
+ orientation = "vertical",
8304
+ style: style2,
8305
+ viewportProps
8306
+ }) {
8307
+ const {
8308
+ className: viewportPropsClassName,
8309
+ ref: viewportRef,
8310
+ ...viewportRest
8311
+ } = viewportProps ?? {};
8312
+ return /* @__PURE__ */ React52.createElement(ScrollArea3.Root, { className: cx("n-relative", className), style: style2 }, /* @__PURE__ */ React52.createElement(
8313
+ ScrollArea3.Viewport,
8314
+ {
8315
+ ref: viewportRef,
8316
+ className: cx(
8317
+ "n-h-full n-overscroll-contain",
8318
+ viewportClassName,
8319
+ viewportPropsClassName
8320
+ ),
8321
+ ...viewportRest
8322
+ },
8323
+ children
8324
+ ), (orientation === "vertical" || orientation === "both") && /* @__PURE__ */ React52.createElement(
8325
+ ScrollArea3.Scrollbar,
8326
+ {
8327
+ className: cx(SCROLLBAR_STATE_CLASSES, SCROLLBAR_TRACK_VERTICAL)
8328
+ },
8329
+ /* @__PURE__ */ React52.createElement(ScrollArea3.Thumb, { className: SCROLLBAR_THUMB_VERTICAL })
8330
+ ), (orientation === "horizontal" || orientation === "both") && /* @__PURE__ */ React52.createElement(
8331
+ ScrollArea3.Scrollbar,
8332
+ {
8333
+ orientation: "horizontal",
8334
+ className: cx(SCROLLBAR_STATE_CLASSES, SCROLLBAR_TRACK_HORIZONTAL)
8335
+ },
8336
+ /* @__PURE__ */ React52.createElement(ScrollArea3.Thumb, { className: SCROLLBAR_THUMB_HORIZONTAL })
8337
+ ), orientation === "both" && /* @__PURE__ */ React52.createElement(ScrollArea3.Corner, null));
8338
+ }
8339
+
8340
+ // src/components/Virtualized.tsx
8341
+ function calculateScrollOffsetForIndex({
8342
+ measurements,
8343
+ height,
8344
+ totalHeight,
8345
+ targetIndex,
8346
+ currentScrollTop
8347
+ }) {
8348
+ if (!measurements.length) return;
8349
+ const index = Math.min(Math.max(targetIndex, 0), measurements.length - 1);
8350
+ const measurement = measurements[index];
8351
+ if (!measurement) return;
8352
+ const viewportTop = currentScrollTop;
8353
+ const viewportBottom = viewportTop + height;
8354
+ const itemTop = measurement.start;
8355
+ const itemBottom = measurement.end;
8356
+ let nextScrollTop = viewportTop;
8357
+ if (itemTop < viewportTop) {
8358
+ nextScrollTop = itemTop;
8359
+ } else if (itemBottom > viewportBottom) {
8360
+ const canAlignTop = height >= measurement.size;
8361
+ nextScrollTop = canAlignTop ? itemTop : itemBottom - height;
8362
+ } else {
8363
+ return;
8364
+ }
8365
+ const maxScrollTop = Math.max(0, totalHeight - height);
8366
+ nextScrollTop = Math.max(0, Math.min(nextScrollTop, maxScrollTop));
8367
+ if (nextScrollTop === viewportTop) return;
8368
+ return nextScrollTop;
8369
+ }
8370
+ function resolvePaddingValues(padding) {
8371
+ if (typeof padding === "number") {
8372
+ return { top: padding, bottom: padding };
8373
+ }
8374
+ return {
8375
+ top: padding?.top ?? 0,
8376
+ bottom: padding?.bottom ?? 0
8377
+ };
8378
+ }
8379
+ function clampGapValue(gap) {
8380
+ return Math.max(0, gap ?? 0);
8381
+ }
8382
+ function buildMeasurements({
8383
+ itemCount,
8384
+ getItemHeight,
8385
+ paddingTop,
8386
+ paddingBottom,
8387
+ gap
8388
+ }) {
8389
+ const measurements = [];
8390
+ let offset = paddingTop;
8391
+ for (let index = 0; index < itemCount; index += 1) {
8392
+ const size = Math.max(0, getItemHeight(index));
8393
+ const start = offset;
8394
+ const end = start + size;
8395
+ measurements.push({ index, size, start, end });
8396
+ offset = end + gap;
8397
+ }
8398
+ const totalHeight = measurements.length ? measurements[measurements.length - 1].end + paddingBottom : paddingTop + paddingBottom;
8399
+ return { measurements, totalHeight };
8400
+ }
8401
+ function findFirstVisibleIndex(measurements, offset) {
8402
+ if (!measurements.length) return 0;
8403
+ let low = 0;
8404
+ let high = measurements.length - 1;
8405
+ let match = measurements.length - 1;
8406
+ while (low <= high) {
8407
+ const middle = Math.floor((low + high) / 2);
8408
+ const measurement = measurements[middle];
8409
+ if (measurement.end > offset) {
8410
+ match = middle;
8411
+ high = middle - 1;
8412
+ } else {
8413
+ low = middle + 1;
8414
+ }
8415
+ }
8416
+ return match;
8417
+ }
8418
+ function calculateVisibleRange({
8419
+ measurements,
8420
+ scrollTop,
8421
+ height,
8422
+ overscan
8423
+ }) {
8424
+ if (!measurements.length) {
8425
+ return { start: 0, end: -1 };
8426
+ }
8427
+ const viewBottom = scrollTop + height;
8428
+ const firstVisible = findFirstVisibleIndex(measurements, scrollTop);
8429
+ let lastVisibleExclusive = firstVisible;
8430
+ while (lastVisibleExclusive < measurements.length && measurements[lastVisibleExclusive].start < viewBottom) {
8431
+ lastVisibleExclusive += 1;
8432
+ }
8433
+ const lastVisible = Math.max(
8434
+ firstVisible,
8435
+ Math.min(measurements.length - 1, lastVisibleExclusive - 1)
8436
+ );
8437
+ const overscanCount = Math.max(0, Math.floor(overscan));
8438
+ return {
8439
+ start: Math.max(0, firstVisible - overscanCount),
8440
+ end: Math.min(measurements.length - 1, lastVisible + overscanCount)
8441
+ };
8442
+ }
8443
+ var DEFAULT_OVERSCAN = 2;
8444
+ var VirtualizedInner = React53.forwardRef(function Virtualized({
8445
+ height,
8446
+ itemCount,
8447
+ getItemHeight,
8448
+ renderItem,
8449
+ overscan = DEFAULT_OVERSCAN,
8450
+ className,
8451
+ style: style2,
8452
+ innerClassName,
8453
+ innerStyle,
8454
+ onScroll,
8455
+ itemKey,
8456
+ initialScrollOffset = 0,
8457
+ syncScrollUpdates = true,
8458
+ padding,
8459
+ gap = 0,
8460
+ useScrollArea = false,
8461
+ scrollAreaViewportClassName
8462
+ }, forwardedRef) {
8463
+ const containerRef = useRef18(null);
8464
+ const setScrollElement = useCallback22((element) => {
8465
+ containerRef.current = element;
8466
+ }, []);
8467
+ const [scrollTop, setScrollTop] = useState24(initialScrollOffset);
8468
+ const pendingInitialOffset = useRef18(initialScrollOffset);
8469
+ useLayoutEffect6(() => {
8470
+ if (pendingInitialOffset.current == null) return;
8471
+ if (containerRef.current) {
8472
+ containerRef.current.scrollTop = pendingInitialOffset.current;
8473
+ setScrollTop(pendingInitialOffset.current);
8474
+ }
8475
+ pendingInitialOffset.current = null;
8476
+ }, []);
8477
+ const paddingValues = useMemo19(() => resolvePaddingValues(padding), [padding]);
8478
+ const gapValue = useMemo19(() => clampGapValue(gap), [gap]);
8479
+ const { measurements, totalHeight } = useMemo19(
8480
+ () => buildMeasurements({
8481
+ itemCount,
8482
+ getItemHeight,
8483
+ paddingTop: paddingValues.top,
8484
+ paddingBottom: paddingValues.bottom,
8485
+ gap: gapValue
8486
+ }),
8487
+ [
8488
+ gapValue,
8489
+ getItemHeight,
8490
+ itemCount,
8491
+ paddingValues.bottom,
8492
+ paddingValues.top
8493
+ ]
8494
+ );
8495
+ const visibleRange = useMemo19(
8496
+ () => calculateVisibleRange({
8497
+ measurements,
8498
+ scrollTop,
8499
+ height,
8500
+ overscan
8501
+ }),
8502
+ [height, measurements, overscan, scrollTop]
8503
+ );
8504
+ const handleScroll = useCallback22(
8505
+ (event) => {
8506
+ const nextOffset = event.currentTarget.scrollTop;
8507
+ if (nextOffset === scrollTop) return;
8508
+ if (syncScrollUpdates) {
8509
+ flushSync(() => {
8510
+ setScrollTop(nextOffset);
8511
+ });
8512
+ } else {
8513
+ setScrollTop(nextOffset);
8514
+ }
8515
+ onScroll?.(nextOffset);
8516
+ },
8517
+ [onScroll, scrollTop, syncScrollUpdates]
8518
+ );
8519
+ useImperativeHandle4(
8520
+ forwardedRef,
8521
+ () => ({
8522
+ scrollToIndex(index) {
8523
+ const container = containerRef.current;
8524
+ if (!container) return;
8525
+ const nextScrollTop = calculateScrollOffsetForIndex({
8526
+ measurements,
8527
+ height,
8528
+ totalHeight,
8529
+ targetIndex: index,
8530
+ currentScrollTop: container.scrollTop
8531
+ });
8532
+ if (nextScrollTop == null) return;
8533
+ container.scrollTop = nextScrollTop;
8534
+ setScrollTop(nextScrollTop);
8535
+ }
8536
+ }),
8537
+ [height, measurements, totalHeight]
8538
+ );
8539
+ const containerStyle = useMemo19(
8540
+ () => ({
8541
+ height,
8542
+ overflowY: "auto",
8543
+ overflowX: "hidden",
8544
+ ...style2
8545
+ }),
8546
+ [height, style2]
8547
+ );
8548
+ const scrollAreaStyle = useMemo19(
8549
+ () => ({
8550
+ height,
8551
+ ...style2
8552
+ }),
8553
+ [height, style2]
8554
+ );
8555
+ const totalContent = /* @__PURE__ */ React53.createElement(
8556
+ "div",
8557
+ {
8558
+ className: innerClassName,
8559
+ style: {
8560
+ position: "relative",
8561
+ width: "100%",
8562
+ height: totalHeight,
8563
+ ...innerStyle
8564
+ }
8565
+ },
8566
+ visibleRange.end >= visibleRange.start && Array.from(
8567
+ { length: visibleRange.end - visibleRange.start + 1 },
8568
+ (_, offset) => {
8569
+ const index = visibleRange.start + offset;
8570
+ const measurement = measurements[index];
8571
+ const key = itemKey ? itemKey(index) : index;
8572
+ return /* @__PURE__ */ React53.createElement(
8573
+ "div",
8574
+ {
8575
+ key,
8576
+ style: {
8577
+ position: "absolute",
8578
+ top: measurement.start,
8579
+ height: measurement.size,
8580
+ width: "100%"
8581
+ }
8582
+ },
8583
+ renderItem(index)
8584
+ );
8585
+ }
8586
+ )
8587
+ );
8588
+ if (useScrollArea) {
8589
+ return /* @__PURE__ */ React53.createElement(
8590
+ ScrollArea22,
8591
+ {
8592
+ className,
8593
+ style: scrollAreaStyle,
8594
+ viewportClassName: scrollAreaViewportClassName,
8595
+ viewportProps: {
8596
+ ref: setScrollElement,
8597
+ onScroll: handleScroll
8598
+ }
8599
+ },
8600
+ totalContent
8601
+ );
8602
+ }
8603
+ return /* @__PURE__ */ React53.createElement(
8604
+ "div",
8605
+ {
8606
+ ref: setScrollElement,
8607
+ className,
8608
+ style: containerStyle,
8609
+ onScroll: handleScroll
8610
+ },
8611
+ totalContent
8612
+ );
8613
+ });
8614
+ var Virtualized2 = React53.memo(VirtualizedInner);
8278
8615
 
8279
8616
  // src/components/sorting/Sortable.tsx
8280
8617
  import { useDroppable } from "@dnd-kit/core";
@@ -8284,14 +8621,14 @@ import {
8284
8621
  useSortable,
8285
8622
  verticalListSortingStrategy
8286
8623
  } from "@dnd-kit/sortable";
8287
- import * as React55 from "react";
8288
- import { useMemo as useMemo22 } from "react";
8624
+ import * as React57 from "react";
8625
+ import { useMemo as useMemo23 } from "react";
8289
8626
 
8290
8627
  // src/components/sorting/DragRegistration.tsx
8291
- import React52 from "react";
8292
- var DragRegistrationContext = React52.createContext(null);
8628
+ import React54 from "react";
8629
+ var DragRegistrationContext = React54.createContext(null);
8293
8630
  function useDragRegistration(context) {
8294
- const value = React52.useContext(context);
8631
+ const value = React54.useContext(context);
8295
8632
  if (!value) {
8296
8633
  throw new Error(
8297
8634
  "useDragRegistration must be used within a DragRegistrationProvider"
@@ -8300,11 +8637,11 @@ function useDragRegistration(context) {
8300
8637
  return value;
8301
8638
  }
8302
8639
  function useDragRegistrationManager() {
8303
- const [registeredLists, setRegisteredLists] = React52.useState(/* @__PURE__ */ new Map());
8304
- const registerList = React52.useCallback((list) => {
8640
+ const [registeredLists, setRegisteredLists] = React54.useState(/* @__PURE__ */ new Map());
8641
+ const registerList = React54.useCallback((list) => {
8305
8642
  setRegisteredLists((prev) => new Map(prev).set(list.id, list));
8306
8643
  }, []);
8307
- const unregisterList = React52.useCallback((listId) => {
8644
+ const unregisterList = React54.useCallback((listId) => {
8308
8645
  setRegisteredLists((prev) => {
8309
8646
  const newMap = new Map(prev);
8310
8647
  newMap.delete(listId);
@@ -8313,15 +8650,15 @@ function useDragRegistrationManager() {
8313
8650
  }, []);
8314
8651
  return { registerList, unregisterList, registeredLists };
8315
8652
  }
8316
- var ActiveDragContext = React52.createContext(null);
8653
+ var ActiveDragContext = React54.createContext(null);
8317
8654
  function useActiveDrag(context) {
8318
- const value = React52.useContext(context);
8655
+ const value = React54.useContext(context);
8319
8656
  if (!value) {
8320
8657
  throw new Error("useActiveDrag must be used within a ActiveDragProvider");
8321
8658
  }
8322
8659
  return value;
8323
8660
  }
8324
- var AnyDragContext = React52.createContext(false);
8661
+ var AnyDragContext = React54.createContext(false);
8325
8662
 
8326
8663
  // src/components/sorting/SharedDragProvider.tsx
8327
8664
  import {
@@ -8338,8 +8675,8 @@ import {
8338
8675
  unionRects
8339
8676
  } from "@noya-app/noya-geometry";
8340
8677
  import { windowsOf } from "@noya-app/noya-utils";
8341
- import * as React53 from "react";
8342
- import { useMemo as useMemo20 } from "react";
8678
+ import * as React55 from "react";
8679
+ import { useMemo as useMemo21 } from "react";
8343
8680
  import { createPortal as createPortal2 } from "react-dom";
8344
8681
  function SharedDragProvider({
8345
8682
  children,
@@ -8359,22 +8696,22 @@ function SharedDragProvider({
8359
8696
  })
8360
8697
  );
8361
8698
  const mounted = useMounted();
8362
- const [dragState, setDragState] = React53.useState({
8699
+ const [dragState, setDragState] = React55.useState({
8363
8700
  source: null,
8364
8701
  target: null,
8365
8702
  indicator: null
8366
8703
  });
8367
- const stableOnMoveItem = React53.useRef(onMoveItem);
8704
+ const stableOnMoveItem = React55.useRef(onMoveItem);
8368
8705
  useIsomorphicLayoutEffect(() => {
8369
8706
  stableOnMoveItem.current = onMoveItem;
8370
8707
  }, [onMoveItem]);
8371
- const stableAcceptsDrop = React53.useRef(acceptsDrop2);
8708
+ const stableAcceptsDrop = React55.useRef(acceptsDrop2);
8372
8709
  useIsomorphicLayoutEffect(() => {
8373
8710
  stableAcceptsDrop.current = acceptsDrop2;
8374
8711
  }, [acceptsDrop2]);
8375
8712
  const { registerList, unregisterList, registeredLists } = useDragRegistrationManager();
8376
- const activatorEventRef = React53.useRef(null);
8377
- const handleDragStart = React53.useCallback(
8713
+ const activatorEventRef = React55.useRef(null);
8714
+ const handleDragStart = React55.useCallback(
8378
8715
  (event) => {
8379
8716
  activatorEventRef.current = event.activatorEvent;
8380
8717
  for (const [listId, list] of registeredLists) {
@@ -8396,7 +8733,7 @@ function SharedDragProvider({
8396
8733
  },
8397
8734
  [registeredLists]
8398
8735
  );
8399
- const handleDragMove = React53.useCallback(
8736
+ const handleDragMove = React55.useCallback(
8400
8737
  (event) => {
8401
8738
  const { active, over } = event;
8402
8739
  if (!activatorEventRef.current || !dragState.source) return;
@@ -8420,7 +8757,7 @@ function SharedDragProvider({
8420
8757
  },
8421
8758
  [registeredLists, dragState.source]
8422
8759
  );
8423
- const handleDragEnd = React53.useCallback(
8760
+ const handleDragEnd = React55.useCallback(
8424
8761
  (event) => {
8425
8762
  const { active, over } = event;
8426
8763
  if (!activatorEventRef.current || !dragState.source) return;
@@ -8464,7 +8801,7 @@ function SharedDragProvider({
8464
8801
  },
8465
8802
  [registeredLists, dragState.source, stableOnMoveItem]
8466
8803
  );
8467
- const contextValue = React53.useMemo(
8804
+ const contextValue = React55.useMemo(
8468
8805
  () => ({
8469
8806
  registerList,
8470
8807
  unregisterList
@@ -8472,19 +8809,19 @@ function SharedDragProvider({
8472
8809
  [registerList, unregisterList]
8473
8810
  );
8474
8811
  const activeList = dragState.source ? registeredLists.get(dragState.source.listId) : null;
8475
- const activeDragContextValue = React53.useMemo(
8812
+ const activeDragContextValue = React55.useMemo(
8476
8813
  () => dragState,
8477
8814
  [dragState]
8478
8815
  );
8479
- const collisionDetection = useMemo20(() => {
8816
+ const collisionDetection = useMemo21(() => {
8480
8817
  return getItemFirstCollisionDetection(registeredLists, itemHitSlop);
8481
8818
  }, [registeredLists, itemHitSlop]);
8482
- return /* @__PURE__ */ React53.createElement(AnyDragContext.Provider, { value: true }, /* @__PURE__ */ React53.createElement(sharedDragProps.dragRegistrationContext.Provider, { value: contextValue }, /* @__PURE__ */ React53.createElement(
8819
+ return /* @__PURE__ */ React55.createElement(AnyDragContext.Provider, { value: true }, /* @__PURE__ */ React55.createElement(sharedDragProps.dragRegistrationContext.Provider, { value: contextValue }, /* @__PURE__ */ React55.createElement(
8483
8820
  sharedDragProps.activeDragContext.Provider,
8484
8821
  {
8485
8822
  value: activeDragContextValue
8486
8823
  },
8487
- /* @__PURE__ */ React53.createElement(
8824
+ /* @__PURE__ */ React55.createElement(
8488
8825
  DndContext,
8489
8826
  {
8490
8827
  sensors,
@@ -8495,26 +8832,26 @@ function SharedDragProvider({
8495
8832
  },
8496
8833
  children,
8497
8834
  mounted && activeList?.renderOverlay && dragState.source && createPortal2(
8498
- /* @__PURE__ */ React53.createElement(DragOverlay, { dropAnimation: null }, activeList.renderOverlay(dragState.source.itemId)),
8835
+ /* @__PURE__ */ React55.createElement(DragOverlay, { dropAnimation: null }, activeList.renderOverlay(dragState.source.itemId)),
8499
8836
  document.body
8500
8837
  )
8501
8838
  )
8502
8839
  )));
8503
8840
  }
8504
8841
  function useMounted() {
8505
- const [mounted, setMounted] = React53.useState(false);
8506
- React53.useEffect(() => {
8842
+ const [mounted, setMounted] = React55.useState(false);
8843
+ React55.useEffect(() => {
8507
8844
  setMounted(true);
8508
8845
  }, []);
8509
8846
  return mounted;
8510
8847
  }
8511
8848
  function withDragProvider(Component) {
8512
8849
  return function WithDragProvider(props) {
8513
- const anyDragContext = React53.useContext(AnyDragContext);
8850
+ const anyDragContext = React55.useContext(AnyDragContext);
8514
8851
  if (!anyDragContext) {
8515
- return /* @__PURE__ */ React53.createElement(SharedDragProvider, null, /* @__PURE__ */ React53.createElement(Component, { ...props }));
8852
+ return /* @__PURE__ */ React55.createElement(SharedDragProvider, null, /* @__PURE__ */ React55.createElement(Component, { ...props }));
8516
8853
  }
8517
- return /* @__PURE__ */ React53.createElement(Component, { ...props });
8854
+ return /* @__PURE__ */ React55.createElement(Component, { ...props });
8518
8855
  };
8519
8856
  }
8520
8857
  var getItemFirstCollisionDetection = (registeredLists, itemHitSlop) => (parameters) => {
@@ -8691,7 +9028,7 @@ function findDropTarget({
8691
9028
  }
8692
9029
 
8693
9030
  // src/components/sorting/sorting.ts
8694
- import * as React54 from "react";
9031
+ import * as React56 from "react";
8695
9032
  var normalizeListTargetIndex = (index, position) => {
8696
9033
  return position === "above" ? index : index + 1;
8697
9034
  };
@@ -8707,7 +9044,7 @@ var defaultAcceptsDrop = ({
8707
9044
  }
8708
9045
  return true;
8709
9046
  };
8710
- var SortableItemContext = React54.createContext({
9047
+ var SortableItemContext = React56.createContext({
8711
9048
  keys: [],
8712
9049
  acceptsDrop: defaultAcceptsDrop,
8713
9050
  axis: "y",
@@ -8773,7 +9110,7 @@ function parseDragItemKey(key) {
8773
9110
  }
8774
9111
 
8775
9112
  // src/components/sorting/Sortable.tsx
8776
- var SortableItemContext2 = React55.createContext({
9113
+ var SortableItemContext2 = React57.createContext({
8777
9114
  acceptsDrop: defaultAcceptsDrop,
8778
9115
  listId: "",
8779
9116
  getDropTargetParentIndex: void 0,
@@ -8786,7 +9123,7 @@ function useSortableDropIndicator({
8786
9123
  acceptsDrop: acceptsDrop2,
8787
9124
  getDropTargetParentIndex
8788
9125
  }) {
8789
- const { activeDragContext } = React55.useContext(SortableItemContext2);
9126
+ const { activeDragContext } = React57.useContext(SortableItemContext2);
8790
9127
  const activeDrag = useActiveDrag(activeDragContext);
8791
9128
  const { source, target } = activeDrag;
8792
9129
  if (!source || !target) return;
@@ -8817,7 +9154,7 @@ function SortableItem({
8817
9154
  disabled,
8818
9155
  children
8819
9156
  }) {
8820
- const { acceptsDrop: acceptsDrop2, listId, getDropTargetParentIndex } = React55.useContext(SortableItemContext2);
9157
+ const { acceptsDrop: acceptsDrop2, listId, getDropTargetParentIndex } = React57.useContext(SortableItemContext2);
8821
9158
  const dragItemKey = createDragItemKey(listId, id);
8822
9159
  const {
8823
9160
  attributes,
@@ -8832,7 +9169,7 @@ function SortableItem({
8832
9169
  id: dragItemKey,
8833
9170
  disabled
8834
9171
  });
8835
- const ref = React55.useCallback(
9172
+ const ref = React57.useCallback(
8836
9173
  (node) => setNodeRef(node),
8837
9174
  [setNodeRef]
8838
9175
  );
@@ -8843,7 +9180,7 @@ function SortableItem({
8843
9180
  acceptsDrop: acceptsDrop2,
8844
9181
  getDropTargetParentIndex
8845
9182
  });
8846
- const props = useMemo22(
9183
+ const props = useMemo23(
8847
9184
  () => ({
8848
9185
  ref,
8849
9186
  ...attributes,
@@ -8852,7 +9189,7 @@ function SortableItem({
8852
9189
  }),
8853
9190
  [ref, attributes, listeners, isDragging]
8854
9191
  );
8855
- const extraProps = useMemo22(
9192
+ const extraProps = useMemo23(
8856
9193
  () => ({
8857
9194
  isDragging,
8858
9195
  isOverlay: false,
@@ -8886,9 +9223,9 @@ function SortableRoot_({
8886
9223
  containerRef,
8887
9224
  itemHitSlop
8888
9225
  }) {
8889
- const defaultId = React55.useId();
9226
+ const defaultId = React57.useId();
8890
9227
  const id = idProp ?? defaultId;
8891
- const keys = React55.useMemo(() => {
9228
+ const keys = React57.useMemo(() => {
8892
9229
  return keysProp.map((key) => createDragItemKey(id, key));
8893
9230
  }, [keysProp, id]);
8894
9231
  const { registerList, unregisterList } = useDragRegistration(
@@ -8897,7 +9234,7 @@ function SortableRoot_({
8897
9234
  const { setNodeRef: setDroppableRef } = useDroppable({
8898
9235
  id
8899
9236
  });
8900
- React55.useEffect(() => {
9237
+ React57.useEffect(() => {
8901
9238
  const listConfig = {
8902
9239
  id,
8903
9240
  keys,
@@ -8951,7 +9288,7 @@ function SortableRoot_({
8951
9288
  keys,
8952
9289
  itemHitSlop
8953
9290
  ]);
8954
- const contextValue = React55.useMemo(
9291
+ const contextValue = React57.useMemo(
8955
9292
  () => ({
8956
9293
  keys,
8957
9294
  acceptsDrop: acceptsDrop2,
@@ -8962,17 +9299,17 @@ function SortableRoot_({
8962
9299
  [keys, acceptsDrop2, id, getDropTargetParentIndex, sharedDragProps]
8963
9300
  );
8964
9301
  const activeDragContext = sharedDragProps?.activeDragContext ?? ActiveDragContext;
8965
- const dragState = React55.useContext(activeDragContext);
9302
+ const dragState = React57.useContext(activeDragContext);
8966
9303
  const isDragging = !!dragState?.source;
8967
- React55.useEffect(() => {
9304
+ React57.useEffect(() => {
8968
9305
  onIsDraggingChange?.(isDragging);
8969
9306
  }, [isDragging, onIsDraggingChange]);
8970
- React55.useEffect(() => {
9307
+ React57.useEffect(() => {
8971
9308
  if (containerRef) {
8972
9309
  setDroppableRef(containerRef.current);
8973
9310
  }
8974
9311
  });
8975
- return /* @__PURE__ */ React55.createElement(SortableItemContext2.Provider, { value: contextValue }, /* @__PURE__ */ React55.createElement(
9312
+ return /* @__PURE__ */ React57.createElement(SortableItemContext2.Provider, { value: contextValue }, /* @__PURE__ */ React57.createElement(
8976
9313
  SortableContext,
8977
9314
  {
8978
9315
  items: keys,
@@ -8989,11 +9326,11 @@ var Sortable_ = function Sortable_2({
8989
9326
  renderItem,
8990
9327
  ...rest
8991
9328
  }) {
8992
- const keys = React55.useMemo(
9329
+ const keys = React57.useMemo(
8993
9330
  () => items.map(keyExtractor),
8994
9331
  [items, keyExtractor]
8995
9332
  );
8996
- const renderOverlay = React55.useCallback(
9333
+ const renderOverlay = React57.useCallback(
8997
9334
  (index) => {
8998
9335
  return renderItem(
8999
9336
  items[index],
@@ -9023,14 +9360,14 @@ var Sortable_ = function Sortable_2({
9023
9360
  },
9024
9361
  [renderItem, items]
9025
9362
  );
9026
- return /* @__PURE__ */ React55.createElement(
9363
+ return /* @__PURE__ */ React57.createElement(
9027
9364
  SortableRoot,
9028
9365
  {
9029
9366
  ...rest,
9030
9367
  keys,
9031
9368
  renderOverlay: shouldRenderOverlay ? renderOverlay : void 0
9032
9369
  },
9033
- keys.map((key, index) => /* @__PURE__ */ React55.createElement(SortableItem, { key, id: key }, (props, extraProps) => {
9370
+ keys.map((key, index) => /* @__PURE__ */ React57.createElement(SortableItem, { key, id: key }, (props, extraProps) => {
9034
9371
  return renderItem(items[index], props, extraProps);
9035
9372
  }))
9036
9373
  );
@@ -9044,87 +9381,6 @@ var Sortable = Object.assign(Sortable_, {
9044
9381
  var ROW_HEIGHT = 31;
9045
9382
  var SECTION_HEADER_LABEL_HEIGHT = 24;
9046
9383
  var TALL_ROW_HEIGHT = 50;
9047
- var VirtualizedListRow = memo20(function VirtualizedListRow2({
9048
- index,
9049
- style: style2
9050
- }) {
9051
- const renderItem = useContext12(RenderItemContext);
9052
- return /* @__PURE__ */ React56.createElement("div", { key: index, style: style2 }, renderItem(index));
9053
- });
9054
- var VirtualizedListInner = forwardRefGeneric(function VirtualizedListInner2({
9055
- size,
9056
- scrollElement,
9057
- items,
9058
- getItemHeight,
9059
- keyExtractor,
9060
- renderItem
9061
- }, ref) {
9062
- const listRef = useRef19(null);
9063
- useImperativeHandle4(ref, () => ({
9064
- scrollToIndex(index) {
9065
- listRef.current?.scrollToItem(index);
9066
- }
9067
- }));
9068
- useLayoutEffect6(() => {
9069
- listRef.current?.resetAfterIndex(0);
9070
- }, [
9071
- // When items or the height resolver change, re-render the virtualized list
9072
- // since VariableSizeList caches sizes per index.
9073
- items,
9074
- getItemHeight
9075
- ]);
9076
- const listStyle = useMemo23(
9077
- () => ({
9078
- overflowX: "initial",
9079
- overflowY: "initial",
9080
- overflow: "initial"
9081
- }),
9082
- []
9083
- );
9084
- return /* @__PURE__ */ React56.createElement(RenderItemContext.Provider, { value: renderItem }, /* @__PURE__ */ React56.createElement(
9085
- WindowScroller,
9086
- {
9087
- scrollElement,
9088
- style: useMemo23(() => ({ flex: "1 1 auto" }), [])
9089
- },
9090
- useCallback24(
9091
- ({
9092
- registerChild,
9093
- onChildScroll,
9094
- scrollTop
9095
- }) => /* @__PURE__ */ React56.createElement("div", { ref: registerChild }, /* @__PURE__ */ React56.createElement(
9096
- VariableSizeList,
9097
- {
9098
- ref: listRef,
9099
- key: scrollTop,
9100
- style: listStyle,
9101
- itemKey: keyExtractor,
9102
- onScroll: ({ scrollOffset }) => {
9103
- onChildScroll({ scrollTop: scrollOffset });
9104
- },
9105
- initialScrollOffset: scrollTop,
9106
- width: size.width,
9107
- height: size.height,
9108
- itemCount: items.length,
9109
- itemSize: getItemHeight,
9110
- estimatedItemSize: ROW_HEIGHT
9111
- },
9112
- VirtualizedListRow
9113
- )),
9114
- [
9115
- listStyle,
9116
- keyExtractor,
9117
- size.width,
9118
- size.height,
9119
- items.length,
9120
- getItemHeight
9121
- ]
9122
- )
9123
- ));
9124
- });
9125
- var VirtualizedList = memo20(
9126
- VirtualizedListInner
9127
- );
9128
9384
  var ListViewRoot = memoGeneric(
9129
9385
  forwardRefGeneric(function ListViewRootInner({
9130
9386
  id,
@@ -9163,7 +9419,7 @@ var ListViewRoot = memoGeneric(
9163
9419
  itemHeight,
9164
9420
  getItemHeightForItem
9165
9421
  }, forwardedRef) {
9166
- const handleClick = useCallback24(
9422
+ const handleClick = useCallback25(
9167
9423
  (event) => {
9168
9424
  if (event.target instanceof HTMLElement && event.target.classList.contains("scroll-component"))
9169
9425
  return;
@@ -9173,11 +9429,11 @@ var ListViewRoot = memoGeneric(
9173
9429
  },
9174
9430
  [onPress]
9175
9431
  );
9176
- const renderChild = useCallback24(
9432
+ const renderChild = useCallback25(
9177
9433
  (index) => renderItem(data[index], index, { isDragOverlay: false }),
9178
9434
  [data, renderItem]
9179
9435
  );
9180
- const defaultContextValue = useMemo23(
9436
+ const defaultContextValue = useMemo24(
9181
9437
  () => ({
9182
9438
  marginType: "none",
9183
9439
  selectedPosition: "only",
@@ -9185,7 +9441,7 @@ var ListViewRoot = memoGeneric(
9185
9441
  }),
9186
9442
  []
9187
9443
  );
9188
- const getItemContextValue = useCallback24(
9444
+ const getItemContextValue = useCallback25(
9189
9445
  (i) => {
9190
9446
  if (variant === "bare" || variant === "normal") {
9191
9447
  const current2 = renderChild(i);
@@ -9233,27 +9489,27 @@ var ListViewRoot = memoGeneric(
9233
9489
  },
9234
9490
  [variant, defaultContextValue, renderChild, data.length]
9235
9491
  );
9236
- const draggingContextOverlayValue = useMemo23(
9492
+ const draggingContextOverlayValue = useMemo24(
9237
9493
  () => ({
9238
9494
  isDragOverlay: true
9239
9495
  }),
9240
9496
  []
9241
9497
  );
9242
- const renderOverlay = useCallback24(
9243
- (index) => /* @__PURE__ */ React56.createElement("div", { style: { opacity: 0.25 } }, /* @__PURE__ */ React56.createElement(ListViewDraggingContext.Provider, { value: draggingContextOverlayValue }, renderItem(data[index], index, { isDragOverlay: true }))),
9498
+ const renderOverlay = useCallback25(
9499
+ (index) => /* @__PURE__ */ React58.createElement("div", { style: { opacity: 0.25 } }, /* @__PURE__ */ React58.createElement(ListViewDraggingContext.Provider, { value: draggingContextOverlayValue }, renderItem(data[index], index, { isDragOverlay: true }))),
9244
9500
  [draggingContextOverlayValue, renderItem, data]
9245
9501
  );
9246
- const renderWrappedChild = useCallback24(
9502
+ const renderWrappedChild = useCallback25(
9247
9503
  (index) => {
9248
9504
  const contextValue2 = getItemContextValue(index);
9249
9505
  const current = renderChild(index);
9250
9506
  if (!contextValue2 || !isValidElement3(current)) return null;
9251
- return /* @__PURE__ */ React56.createElement(ListRowContext.Provider, { key: current.key, value: contextValue2 }, current);
9507
+ return /* @__PURE__ */ React58.createElement(ListRowContext.Provider, { key: current.key, value: contextValue2 }, current);
9252
9508
  },
9253
9509
  [getItemContextValue, renderChild]
9254
9510
  );
9255
- const ids = useMemo23(() => data.map(keyExtractor), [keyExtractor, data]);
9256
- const withSortable = (children) => sortable ? /* @__PURE__ */ React56.createElement(
9511
+ const ids = useMemo24(() => data.map(keyExtractor), [keyExtractor, data]);
9512
+ const withSortable = (children) => sortable ? /* @__PURE__ */ React58.createElement(
9257
9513
  Sortable.Root,
9258
9514
  {
9259
9515
  id: sortableId,
@@ -9266,8 +9522,8 @@ var ListViewRoot = memoGeneric(
9266
9522
  },
9267
9523
  children
9268
9524
  ) : children;
9269
- const withScrollable = (children) => scrollable ? /* @__PURE__ */ React56.createElement(ScrollArea, null, children) : children(null);
9270
- const getItemHeight = useCallback24(
9525
+ const withScrollable = (children) => scrollable ? /* @__PURE__ */ React58.createElement(ScrollArea, null, children) : children;
9526
+ const getItemHeight = useCallback25(
9271
9527
  (index) => {
9272
9528
  const child = getItemContextValue(index);
9273
9529
  if (child?.isSectionHeader && sectionHeaderVariant === "label") {
@@ -9287,13 +9543,13 @@ var ListViewRoot = memoGeneric(
9287
9543
  data
9288
9544
  ]
9289
9545
  );
9290
- const getKey = useCallback24(
9546
+ const getKey = useCallback25(
9291
9547
  (index) => keyExtractor(data[index], index),
9292
9548
  [data, keyExtractor]
9293
9549
  );
9294
- const draggingContextValue = useMemo23(() => ({}), []);
9295
- const gapStyle = useMemo23(() => ({ gap: `${gap}px` }), [gap]);
9296
- const contextValue = useMemo23(
9550
+ const draggingContextValue = useMemo24(() => ({}), []);
9551
+ const gapStyle = useMemo24(() => ({ gap: `${gap}px` }), [gap]);
9552
+ const contextValue = useMemo24(
9297
9553
  () => ({
9298
9554
  pressEventName,
9299
9555
  colorScheme,
@@ -9317,7 +9573,7 @@ var ListViewRoot = memoGeneric(
9317
9573
  indentation
9318
9574
  ]
9319
9575
  );
9320
- return /* @__PURE__ */ React56.createElement(ListViewContext.Provider, { value: contextValue }, /* @__PURE__ */ React56.createElement(ListViewDraggingContext.Provider, { value: draggingContextValue }, /* @__PURE__ */ React56.createElement(
9576
+ return /* @__PURE__ */ React58.createElement(ListViewContext.Provider, { value: contextValue }, /* @__PURE__ */ React58.createElement(ListViewDraggingContext.Provider, { value: draggingContextValue }, /* @__PURE__ */ React58.createElement(
9321
9577
  "div",
9322
9578
  {
9323
9579
  id,
@@ -9344,21 +9600,21 @@ var ListViewRoot = memoGeneric(
9344
9600
  onDragLeave,
9345
9601
  onDrop
9346
9602
  },
9347
- data.length === 0 && renderEmptyState ? renderEmptyState() : withScrollable(
9348
- (scrollElementRef) => withSortable(
9349
- virtualized ? /* @__PURE__ */ React56.createElement(
9350
- VirtualizedList,
9351
- {
9352
- ref: forwardedRef,
9353
- scrollElement: scrollElementRef,
9354
- items: data,
9355
- size: virtualized,
9356
- getItemHeight,
9357
- keyExtractor: getKey,
9358
- renderItem: renderWrappedChild
9359
- }
9360
- ) : range(0, data.length).map(renderWrappedChild)
9603
+ data.length === 0 && renderEmptyState ? renderEmptyState() : virtualized != null ? withSortable(
9604
+ /* @__PURE__ */ React58.createElement(
9605
+ Virtualized2,
9606
+ {
9607
+ ref: forwardedRef,
9608
+ height: virtualized,
9609
+ itemCount: data.length,
9610
+ getItemHeight,
9611
+ renderItem: renderWrappedChild,
9612
+ itemKey: getKey,
9613
+ useScrollArea: scrollable
9614
+ }
9361
9615
  )
9616
+ ) : withScrollable(
9617
+ withSortable(range(0, data.length).map(renderWrappedChild))
9362
9618
  )
9363
9619
  )));
9364
9620
  })
@@ -9366,11 +9622,11 @@ var ListViewRoot = memoGeneric(
9366
9622
 
9367
9623
  // src/components/listView/ListViewRow.tsx
9368
9624
  import { composeRefs as composeRefs2 } from "@radix-ui/react-compose-refs";
9369
- import React57, {
9625
+ import React59, {
9370
9626
  forwardRef as forwardRef21,
9371
- useCallback as useCallback25,
9372
- useContext as useContext13,
9373
- useMemo as useMemo24
9627
+ useCallback as useCallback26,
9628
+ useContext as useContext12,
9629
+ useMemo as useMemo25
9374
9630
  } from "react";
9375
9631
 
9376
9632
  // src/hooks/mergeEventHandlers.ts
@@ -9424,7 +9680,7 @@ var RowContainer = forwardRef21(
9424
9680
  "aria-selected": ariaSelected,
9425
9681
  ...props
9426
9682
  }, ref) => {
9427
- return /* @__PURE__ */ React57.createElement(
9683
+ return /* @__PURE__ */ React59.createElement(
9428
9684
  Component,
9429
9685
  {
9430
9686
  ref,
@@ -9506,7 +9762,7 @@ var ListViewDragIndicatorElement = forwardRef21(
9506
9762
  style: style2,
9507
9763
  ...props
9508
9764
  }, ref) => {
9509
- return /* @__PURE__ */ React57.createElement(
9765
+ return /* @__PURE__ */ React59.createElement(
9510
9766
  "div",
9511
9767
  {
9512
9768
  ref,
@@ -9574,27 +9830,27 @@ var ListViewRow = memoGeneric(
9574
9830
  divider,
9575
9831
  sortable,
9576
9832
  indentation
9577
- } = useContext13(ListViewContext);
9578
- const { marginType, selectedPosition } = useContext13(ListRowContext);
9833
+ } = useContext12(ListViewContext);
9834
+ const { marginType, selectedPosition } = useContext12(ListRowContext);
9579
9835
  const { hoverProps } = useHover({
9580
9836
  onHoverChange
9581
9837
  });
9582
- const { isDragOverlay } = useContext13(ListViewDraggingContext);
9583
- const handlePress = useCallback25(
9838
+ const { isDragOverlay } = useContext12(ListViewDraggingContext);
9839
+ const handlePress = useCallback26(
9584
9840
  (event) => {
9585
9841
  if (event.button !== 0) return;
9586
9842
  onPress?.(event);
9587
9843
  },
9588
9844
  [onPress]
9589
9845
  );
9590
- const handleDoubleClick = useCallback25(
9846
+ const handleDoubleClick = useCallback26(
9591
9847
  (event) => {
9592
9848
  event.stopPropagation();
9593
9849
  onDoubleClick?.();
9594
9850
  },
9595
9851
  [onDoubleClick]
9596
9852
  );
9597
- const mergedStyle = useMemo24(() => {
9853
+ const mergedStyle = useMemo25(() => {
9598
9854
  return isDragOverlay ? {
9599
9855
  // TODO: Where do these offsets actually come from?
9600
9856
  transform: `translate3d(-36px, -6px, 0)`,
@@ -9605,7 +9861,7 @@ var ListViewRow = memoGeneric(
9605
9861
  const renderContent = (renderProps, ref, relativeDropPositionProp) => {
9606
9862
  const Component = RowContainer;
9607
9863
  const relativeDropPosition = testRelativeDropPosition ?? relativeDropPositionProp;
9608
- const element = /* @__PURE__ */ React57.createElement(
9864
+ const element = /* @__PURE__ */ React59.createElement(
9609
9865
  Component,
9610
9866
  {
9611
9867
  as,
@@ -9640,7 +9896,7 @@ var ListViewRow = memoGeneric(
9640
9896
  className,
9641
9897
  $clickable: !!onPress
9642
9898
  },
9643
- relativeDropPosition && /* @__PURE__ */ React57.createElement(
9899
+ relativeDropPosition && /* @__PURE__ */ React59.createElement(
9644
9900
  ListViewDragIndicatorElement,
9645
9901
  {
9646
9902
  key: relativeDropPosition,
@@ -9655,11 +9911,11 @@ var ListViewRow = memoGeneric(
9655
9911
  }) : dragIndicatorStyle
9656
9912
  }
9657
9913
  ),
9658
- depth > 0 && /* @__PURE__ */ React57.createElement(Spacer.Horizontal, { size: depth * indentation }),
9914
+ depth > 0 && /* @__PURE__ */ React59.createElement(Spacer.Horizontal, { size: depth * indentation }),
9659
9915
  children
9660
9916
  );
9661
9917
  if (menuItems && onSelectMenuItem) {
9662
- return /* @__PURE__ */ React57.createElement(
9918
+ return /* @__PURE__ */ React59.createElement(
9663
9919
  ContextMenu,
9664
9920
  {
9665
9921
  items: menuItems,
@@ -9672,7 +9928,7 @@ var ListViewRow = memoGeneric(
9672
9928
  return element;
9673
9929
  };
9674
9930
  if (sortable && id) {
9675
- return /* @__PURE__ */ React57.createElement(
9931
+ return /* @__PURE__ */ React59.createElement(
9676
9932
  Sortable.Item,
9677
9933
  {
9678
9934
  id,
@@ -9690,12 +9946,12 @@ var ListViewRow = memoGeneric(
9690
9946
  );
9691
9947
 
9692
9948
  // src/components/listView/ListViewRowTitle.tsx
9693
- import React58, { memo as memo21 } from "react";
9694
- var ListViewRowTitle = memo21(function ListViewRowTitle2({
9949
+ import React60, { memo as memo20 } from "react";
9950
+ var ListViewRowTitle = memo20(function ListViewRowTitle2({
9695
9951
  className,
9696
9952
  ...props
9697
9953
  }) {
9698
- return /* @__PURE__ */ React58.createElement(
9954
+ return /* @__PURE__ */ React60.createElement(
9699
9955
  "span",
9700
9956
  {
9701
9957
  className: cx(
@@ -9752,7 +10008,7 @@ var ListView;
9752
10008
  })(ListView || (ListView = {}));
9753
10009
 
9754
10010
  // src/components/TreeView.tsx
9755
- import React59, { useCallback as useCallback26, useContext as useContext14 } from "react";
10011
+ import React61, { useCallback as useCallback27, useContext as useContext13 } from "react";
9756
10012
  var TreeRow = forwardRefGeneric(function TreeRow2({
9757
10013
  icon,
9758
10014
  expanded,
@@ -9763,9 +10019,9 @@ var TreeRow = forwardRefGeneric(function TreeRow2({
9763
10019
  children,
9764
10020
  ...rest
9765
10021
  }, forwardedRef) {
9766
- const { expandable } = useContext14(ListViewContext);
10022
+ const { expandable } = useContext13(ListViewContext);
9767
10023
  const stableOnClickChevron = useStableCallback(onClickChevron);
9768
- const handleClickChevron = useCallback26(
10024
+ const handleClickChevron = useCallback27(
9769
10025
  (event) => {
9770
10026
  event.stopPropagation();
9771
10027
  event.preventDefault();
@@ -9773,7 +10029,7 @@ var TreeRow = forwardRefGeneric(function TreeRow2({
9773
10029
  },
9774
10030
  [stableOnClickChevron]
9775
10031
  );
9776
- return /* @__PURE__ */ React59.createElement(ListView.Row, { ref: forwardedRef, ...rest }, expandable && chevronPosition !== "end" && /* @__PURE__ */ React59.createElement(React59.Fragment, null, expanded === void 0 ? /* @__PURE__ */ React59.createElement(Spacer.Horizontal, { size: 19 }) : /* @__PURE__ */ React59.createElement(
10032
+ return /* @__PURE__ */ React61.createElement(ListView.Row, { ref: forwardedRef, ...rest }, expandable && chevronPosition !== "end" && /* @__PURE__ */ React61.createElement(React61.Fragment, null, expanded === void 0 ? /* @__PURE__ */ React61.createElement(Spacer.Horizontal, { size: 19 }) : /* @__PURE__ */ React61.createElement(
9777
10033
  IconButton,
9778
10034
  {
9779
10035
  as: chevronAs,
@@ -9782,7 +10038,7 @@ var TreeRow = forwardRefGeneric(function TreeRow2({
9782
10038
  onClick: handleClickChevron,
9783
10039
  selected: rest.selected
9784
10040
  }
9785
- ), /* @__PURE__ */ React59.createElement(Spacer.Horizontal, { size: 6 })), icon && /* @__PURE__ */ React59.createElement(React59.Fragment, null, renderIcon(icon), /* @__PURE__ */ React59.createElement(Spacer.Horizontal, { size: 10 })), children, expandable && chevronPosition === "end" && /* @__PURE__ */ React59.createElement(React59.Fragment, null, /* @__PURE__ */ React59.createElement(Spacer.Horizontal, { size: 6 }), expanded === void 0 ? /* @__PURE__ */ React59.createElement(React59.Fragment, null) : /* @__PURE__ */ React59.createElement(React59.Fragment, null, /* @__PURE__ */ React59.createElement(
10041
+ ), /* @__PURE__ */ React61.createElement(Spacer.Horizontal, { size: 6 })), icon && /* @__PURE__ */ React61.createElement(React61.Fragment, null, renderIcon(icon), /* @__PURE__ */ React61.createElement(Spacer.Horizontal, { size: 10 })), children, expandable && chevronPosition === "end" && /* @__PURE__ */ React61.createElement(React61.Fragment, null, /* @__PURE__ */ React61.createElement(Spacer.Horizontal, { size: 6 }), expanded === void 0 ? /* @__PURE__ */ React61.createElement(React61.Fragment, null) : /* @__PURE__ */ React61.createElement(React61.Fragment, null, /* @__PURE__ */ React61.createElement(
9786
10042
  IconButton,
9787
10043
  {
9788
10044
  as: chevronAs,
@@ -9791,7 +10047,7 @@ var TreeRow = forwardRefGeneric(function TreeRow2({
9791
10047
  onClick: handleClickChevron,
9792
10048
  selected: rest.selected
9793
10049
  }
9794
- ), /* @__PURE__ */ React59.createElement(Spacer.Horizontal, { size: 8 }))));
10050
+ ), /* @__PURE__ */ React61.createElement(Spacer.Horizontal, { size: 8 }))));
9795
10051
  });
9796
10052
  var TreeView;
9797
10053
  ((TreeView2) => {
@@ -9859,9 +10115,9 @@ var List = memoGeneric(
9859
10115
  getItemStyle,
9860
10116
  getItemClassName
9861
10117
  } = props;
9862
- const [internalHoveredId, setHoveredId] = useState25();
9863
- const [internalRenamingId, setRenamingId] = useState25();
9864
- const [dropdownOpenId, setDropdownOpenId] = useState25();
10118
+ const [internalHoveredId, setHoveredId] = useState26();
10119
+ const [internalRenamingId, setRenamingId] = useState26();
10120
+ const [dropdownOpenId, setDropdownOpenId] = useState26();
9865
10121
  const hoveredId = internalHoveredId ?? testHoveredId;
9866
10122
  const renamingId = testRenamingId ?? internalRenamingId;
9867
10123
  const itemClassName = cx(
@@ -9869,7 +10125,7 @@ var List = memoGeneric(
9869
10125
  pyMap[size],
9870
10126
  itemClassNameProp
9871
10127
  );
9872
- const itemStyle = useMemo25(
10128
+ const itemStyle = useMemo26(
9873
10129
  () => ({ ...cssVarOverrides, ...itemStyleProp }),
9874
10130
  [itemStyleProp]
9875
10131
  );
@@ -9907,7 +10163,7 @@ var List = memoGeneric(
9907
10163
  setRenamingId(id);
9908
10164
  }
9909
10165
  }));
9910
- return /* @__PURE__ */ React60.createElement(
10166
+ return /* @__PURE__ */ React62.createElement(
9911
10167
  ViewComponent.Root,
9912
10168
  {
9913
10169
  variant: "bare",
@@ -9956,7 +10212,7 @@ var List = memoGeneric(
9956
10212
  handleSelect(id);
9957
10213
  }
9958
10214
  };
9959
- const action = (isHovered || isSelected) && !isRenaming && (typeof renderAction === "function" ? renderAction({ item, selected: isSelected, onOpenChange }) : renderAction === "menu" && menuItems && /* @__PURE__ */ React60.createElement(
10215
+ const action = (isHovered || isSelected) && !isRenaming && (typeof renderAction === "function" ? renderAction({ item, selected: isSelected, onOpenChange }) : renderAction === "menu" && menuItems && /* @__PURE__ */ React62.createElement(
9960
10216
  ActionMenu,
9961
10217
  {
9962
10218
  menuItems,
@@ -9976,7 +10232,7 @@ var List = memoGeneric(
9976
10232
  let below = detailPosition === "below" ? detailContent : void 0;
9977
10233
  if (below && normalizedDetailLineClamp) {
9978
10234
  const clampClassName = DETAIL_LINE_CLAMP_CLASSES[normalizedDetailLineClamp];
9979
- below = /* @__PURE__ */ React60.createElement(
10235
+ below = /* @__PURE__ */ React62.createElement(
9980
10236
  "div",
9981
10237
  {
9982
10238
  className: cx(
@@ -9989,7 +10245,7 @@ var List = memoGeneric(
9989
10245
  }
9990
10246
  const perItemStyle = getItemStyle?.(item, isSelected);
9991
10247
  const perItemClassName = getItemClassName?.(item, isSelected);
9992
- return /* @__PURE__ */ React60.createElement(
10248
+ return /* @__PURE__ */ React62.createElement(
9993
10249
  ViewComponent.Row,
9994
10250
  {
9995
10251
  as: typeof href === "string" ? LinkComponent2 : void 0,
@@ -10044,7 +10300,7 @@ var List = memoGeneric(
10044
10300
  },
10045
10301
  dragIndicatorStyle
10046
10302
  },
10047
- /* @__PURE__ */ React60.createElement(
10303
+ /* @__PURE__ */ React62.createElement(
10048
10304
  "div",
10049
10305
  {
10050
10306
  className: cx(
@@ -10052,7 +10308,7 @@ var List = memoGeneric(
10052
10308
  rowGapMap[size]
10053
10309
  )
10054
10310
  },
10055
- thumbnail && /* @__PURE__ */ React60.createElement(
10311
+ thumbnail && /* @__PURE__ */ React62.createElement(
10056
10312
  "div",
10057
10313
  {
10058
10314
  className: cx(
@@ -10065,13 +10321,13 @@ var List = memoGeneric(
10065
10321
  },
10066
10322
  thumbnail
10067
10323
  ),
10068
- /* @__PURE__ */ React60.createElement("div", { className: "n-flex n-flex-col n-flex-1 n-w-0" }, /* @__PURE__ */ React60.createElement("div", { className: "n-flex n-items-center n-min-h-input-height n-flex-1 n-gap-2" }, /* @__PURE__ */ React60.createElement(
10324
+ /* @__PURE__ */ React62.createElement("div", { className: "n-flex n-flex-col n-flex-1 n-w-0" }, /* @__PURE__ */ React62.createElement("div", { className: "n-flex n-items-center n-min-h-input-height n-flex-1 n-gap-2" }, /* @__PURE__ */ React62.createElement(
10069
10325
  "div",
10070
10326
  {
10071
10327
  className: "n-flex-1 n-w-0 n-flex n-items-center",
10072
10328
  tabIndex: -1
10073
10329
  },
10074
- isRenaming ? /* @__PURE__ */ React60.createElement(
10330
+ isRenaming ? /* @__PURE__ */ React62.createElement(
10075
10331
  ViewComponent.EditableRowTitle,
10076
10332
  {
10077
10333
  value: getName(item),
@@ -10087,7 +10343,7 @@ var List = memoGeneric(
10087
10343
  e.stopPropagation();
10088
10344
  }
10089
10345
  }
10090
- ) : /* @__PURE__ */ React60.createElement(
10346
+ ) : /* @__PURE__ */ React62.createElement(
10091
10347
  ViewComponent.RowTitle,
10092
10348
  {
10093
10349
  className: cx(
@@ -10097,7 +10353,7 @@ var List = memoGeneric(
10097
10353
  },
10098
10354
  getName(item)
10099
10355
  )
10100
- ), right && detailPosition === "end" && /* @__PURE__ */ React60.createElement(DetailContainer, { selected: isSelected }, right), end && detailPosition === "end" && /* @__PURE__ */ React60.createElement(DetailContainer, { selected: isSelected }, end)), below && /* @__PURE__ */ React60.createElement(
10356
+ ), right && detailPosition === "end" && /* @__PURE__ */ React62.createElement(DetailContainer, { selected: isSelected }, right), end && detailPosition === "end" && /* @__PURE__ */ React62.createElement(DetailContainer, { selected: isSelected }, end)), below && /* @__PURE__ */ React62.createElement(
10101
10357
  DetailContainer,
10102
10358
  {
10103
10359
  selected: isSelected,
@@ -10105,8 +10361,8 @@ var List = memoGeneric(
10105
10361
  },
10106
10362
  below
10107
10363
  )),
10108
- right && detailPosition === "below" && /* @__PURE__ */ React60.createElement(DetailContainer, { selected: isSelected }, right),
10109
- end && detailPosition === "below" && /* @__PURE__ */ React60.createElement(DetailContainer, { selected: isSelected }, end)
10364
+ right && detailPosition === "below" && /* @__PURE__ */ React62.createElement(DetailContainer, { selected: isSelected }, right),
10365
+ end && detailPosition === "below" && /* @__PURE__ */ React62.createElement(DetailContainer, { selected: isSelected }, end)
10110
10366
  )
10111
10367
  );
10112
10368
  }
@@ -10114,12 +10370,12 @@ var List = memoGeneric(
10114
10370
  );
10115
10371
  })
10116
10372
  );
10117
- var DetailContainer = memo22(function DetailContainer2({
10373
+ var DetailContainer = memo21(function DetailContainer2({
10118
10374
  children,
10119
10375
  selected,
10120
10376
  align = "center"
10121
10377
  }) {
10122
- return /* @__PURE__ */ React60.createElement(
10378
+ return /* @__PURE__ */ React62.createElement(
10123
10379
  "div",
10124
10380
  {
10125
10381
  className: cx(
@@ -10190,7 +10446,7 @@ var itemHeightMap = {
10190
10446
  // src/components/Collection.tsx
10191
10447
  var Collection = forwardRefGeneric(function Collection2(props, ref) {
10192
10448
  const { viewType, ...rest } = props;
10193
- return viewType === "grid" ? /* @__PURE__ */ React61.createElement(Grid, { ref, ...rest }) : /* @__PURE__ */ React61.createElement(List, { ref, ...rest });
10449
+ return viewType === "grid" ? /* @__PURE__ */ React63.createElement(Grid, { ref, ...rest }) : /* @__PURE__ */ React63.createElement(List, { ref, ...rest });
10194
10450
  });
10195
10451
 
10196
10452
  // ../noya-color/src/convert.ts
@@ -10351,7 +10607,7 @@ import { clamp as clamp3 } from "@noya-app/noya-utils";
10351
10607
 
10352
10608
  // src/components/ColorSwatch.tsx
10353
10609
  import { CheckIcon } from "@noya-app/noya-icons";
10354
- import React62, { forwardRef as forwardRef22 } from "react";
10610
+ import React64, { forwardRef as forwardRef22 } from "react";
10355
10611
  var colorSwatchSizeMap = {
10356
10612
  xxsmall: 15,
10357
10613
  xsmall: 21,
@@ -10369,7 +10625,7 @@ var ColorSwatch = forwardRef22(function ColorSwatch2({
10369
10625
  }, ref) {
10370
10626
  const sizePx = colorSwatchSizeMap[size];
10371
10627
  const checkedColor = getContrastColorForBackground(color);
10372
- return /* @__PURE__ */ React62.createElement("div", { className: "n-relative", style: { width: sizePx, height: sizePx } }, /* @__PURE__ */ React62.createElement(
10628
+ return /* @__PURE__ */ React64.createElement("div", { className: "n-relative", style: { width: sizePx, height: sizePx } }, /* @__PURE__ */ React64.createElement(
10373
10629
  Component,
10374
10630
  {
10375
10631
  ...props,
@@ -10385,7 +10641,7 @@ var ColorSwatch = forwardRef22(function ColorSwatch2({
10385
10641
  ...style2
10386
10642
  }
10387
10643
  }
10388
- ), checked && /* @__PURE__ */ React62.createElement(
10644
+ ), checked && /* @__PURE__ */ React64.createElement(
10389
10645
  CheckIcon,
10390
10646
  {
10391
10647
  color: checkedColor,
@@ -10396,7 +10652,7 @@ var ColorSwatch = forwardRef22(function ColorSwatch2({
10396
10652
 
10397
10653
  // src/components/ColorSwatchControl.tsx
10398
10654
  import { ToggleGroup as ToggleGroupPrimitive } from "radix-ui";
10399
- import React63, { useMemo as useMemo26 } from "react";
10655
+ import React65, { useMemo as useMemo27 } from "react";
10400
10656
  function ColorSwatchControl(props) {
10401
10657
  const {
10402
10658
  options,
@@ -10411,7 +10667,7 @@ function ColorSwatchControl(props) {
10411
10667
  id,
10412
10668
  style: style2
10413
10669
  } = props;
10414
- const styles3 = useMemo26(() => {
10670
+ const styles3 = useMemo27(() => {
10415
10671
  return {
10416
10672
  display: "grid",
10417
10673
  gridTemplateColumns: `repeat(auto-fill, minmax(${colorSwatchSizeMap[size]}px, 1fr))`,
@@ -10419,8 +10675,8 @@ function ColorSwatchControl(props) {
10419
10675
  ...style2
10420
10676
  };
10421
10677
  }, [size, style2]);
10422
- const content = /* @__PURE__ */ React63.createElement("div", { className, id, style: styles3 }, options.map((option) => {
10423
- const item = /* @__PURE__ */ React63.createElement(
10678
+ const content = /* @__PURE__ */ React65.createElement("div", { className, id, style: styles3 }, options.map((option) => {
10679
+ const item = /* @__PURE__ */ React65.createElement(
10424
10680
  ColorSwatch,
10425
10681
  {
10426
10682
  key: `${option}-color-swatch`,
@@ -10433,7 +10689,7 @@ function ColorSwatchControl(props) {
10433
10689
  checked: value === option
10434
10690
  }
10435
10691
  );
10436
- return /* @__PURE__ */ React63.createElement(
10692
+ return /* @__PURE__ */ React65.createElement(
10437
10693
  ToggleGroupPrimitive.Item,
10438
10694
  {
10439
10695
  asChild: true,
@@ -10444,7 +10700,7 @@ function ColorSwatchControl(props) {
10444
10700
  item
10445
10701
  );
10446
10702
  }));
10447
- return /* @__PURE__ */ React63.createElement(
10703
+ return /* @__PURE__ */ React65.createElement(
10448
10704
  ToggleGroupPrimitive.Root,
10449
10705
  {
10450
10706
  type: "single",
@@ -10459,18 +10715,18 @@ function ColorSwatchControl(props) {
10459
10715
 
10460
10716
  // src/components/Combobox.tsx
10461
10717
  import { DropdownChevronIcon as DropdownChevronIcon2 } from "@noya-app/noya-icons";
10462
- import React66, {
10463
- useCallback as useCallback27,
10718
+ import React68, {
10719
+ useCallback as useCallback28,
10464
10720
  useEffect as useEffect20,
10465
10721
  useImperativeHandle as useImperativeHandle6,
10466
- useMemo as useMemo27,
10722
+ useMemo as useMemo28,
10467
10723
  useRef as useRef21,
10468
- useState as useState26
10724
+ useState as useState27
10469
10725
  } from "react";
10470
10726
 
10471
10727
  // src/utils/combobox.ts
10472
10728
  import { chunkBy, partition } from "@noya-app/noya-utils";
10473
- import React64, { useSyncExternalStore } from "react";
10729
+ import React66, { useSyncExternalStore } from "react";
10474
10730
 
10475
10731
  // src/utils/fuzzyScorer.ts
10476
10732
  import { scoreFilePathFuzzy } from "vscode-fuzzy-scorer";
@@ -10807,7 +11063,7 @@ function getNodeText(node) {
10807
11063
  return "";
10808
11064
  if (typeof node === "string" || typeof node === "number") return String(node);
10809
11065
  if (Array.isArray(node)) return node.map(getNodeText).join("");
10810
- if (React64.isValidElement(node)) {
11066
+ if (React66.isValidElement(node)) {
10811
11067
  return getNodeText(node.props?.children);
10812
11068
  }
10813
11069
  return "";
@@ -10815,7 +11071,7 @@ function getNodeText(node) {
10815
11071
 
10816
11072
  // src/components/ComboboxMenu.tsx
10817
11073
  import { CheckIcon as CheckIcon2 } from "@noya-app/noya-icons";
10818
- import React65, { memo as memo23 } from "react";
11074
+ import React67, { memo as memo22 } from "react";
10819
11075
  var ComboboxMenu = memoGeneric(
10820
11076
  forwardRefGeneric(function ComboboxMenu2({
10821
11077
  items,
@@ -10829,7 +11085,7 @@ var ComboboxMenu = memoGeneric(
10829
11085
  itemHeight,
10830
11086
  getRowHeightForItem
10831
11087
  }, forwardedRef) {
10832
- return /* @__PURE__ */ React65.createElement(
11088
+ return /* @__PURE__ */ React67.createElement(
10833
11089
  ListView.Root,
10834
11090
  {
10835
11091
  ref: forwardedRef,
@@ -10839,7 +11095,7 @@ var ComboboxMenu = memoGeneric(
10839
11095
  return item.value;
10840
11096
  },
10841
11097
  data: items,
10842
- virtualized: listSize,
11098
+ virtualized: listSize.height,
10843
11099
  ...itemHeight ? { itemHeight } : {},
10844
11100
  ...getRowHeightForItem ? { getItemHeightForItem: getRowHeightForItem } : {},
10845
11101
  pressEventName: "onPointerDown",
@@ -10847,7 +11103,7 @@ var ComboboxMenu = memoGeneric(
10847
11103
  style: style2,
10848
11104
  renderItem: (item, i) => {
10849
11105
  if (item.type === "sectionHeader") {
10850
- return /* @__PURE__ */ React65.createElement(ListView.Row, { key: item.id, isSectionHeader: true }, indented && /* @__PURE__ */ React65.createElement(
11106
+ return /* @__PURE__ */ React67.createElement(ListView.Row, { key: item.id, isSectionHeader: true }, indented && /* @__PURE__ */ React67.createElement(
10851
11107
  Spacer.Horizontal,
10852
11108
  {
10853
11109
  size: CHECKBOX_WIDTH - CHECKBOX_RIGHT_INSET + CHECKBOX_INDENT_WIDTH
@@ -10862,7 +11118,7 @@ var ComboboxMenu = memoGeneric(
10862
11118
  // Only selectable items can have tooltips in this menu
10863
11119
  isSelectableMenuItem(item) ? item.tooltip : void 0
10864
11120
  );
10865
- return /* @__PURE__ */ React65.createElement(
11121
+ return /* @__PURE__ */ React67.createElement(
10866
11122
  ListView.Row,
10867
11123
  {
10868
11124
  key: item.value,
@@ -10875,12 +11131,12 @@ var ComboboxMenu = memoGeneric(
10875
11131
  }
10876
11132
  }
10877
11133
  },
10878
- /* @__PURE__ */ React65.createElement("div", { className: "n-flex n-flex-1 n-min-w-0 n-items-start" }, indented && /* @__PURE__ */ React65.createElement(Spacer.Horizontal, { size: CHECKBOX_INDENT_WIDTH }), item.checked ? /* @__PURE__ */ React65.createElement("div", { ...styles.itemIndicator }, /* @__PURE__ */ React65.createElement(CheckIcon2, null)) : indented ? /* @__PURE__ */ React65.createElement(
11134
+ /* @__PURE__ */ React67.createElement("div", { className: "n-flex n-flex-1 n-min-w-0 n-items-start" }, indented && /* @__PURE__ */ React67.createElement(Spacer.Horizontal, { size: CHECKBOX_INDENT_WIDTH }), item.checked ? /* @__PURE__ */ React67.createElement("div", { ...styles.itemIndicator }, /* @__PURE__ */ React67.createElement(CheckIcon2, null)) : indented ? /* @__PURE__ */ React67.createElement(
10879
11135
  Spacer.Horizontal,
10880
11136
  {
10881
11137
  size: CHECKBOX_WIDTH - CHECKBOX_RIGHT_INSET
10882
11138
  }
10883
- ) : null, iconPosition === "left" && item.icon && /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(MenuIcon, { icon: item.icon }), /* @__PURE__ */ React65.createElement(Spacer.Horizontal, { size: 8 })), /* @__PURE__ */ React65.createElement("div", { className: "n-flex n-flex-col n-min-w-0 n-flex-1" }, /* @__PURE__ */ React65.createElement("div", { className: "n-min-w-0 n-truncate" }, tokens.map((token, j) => /* @__PURE__ */ React65.createElement(
11139
+ ) : null, iconPosition === "left" && item.icon && /* @__PURE__ */ React67.createElement(React67.Fragment, null, /* @__PURE__ */ React67.createElement(MenuIcon, { icon: item.icon }), /* @__PURE__ */ React67.createElement(Spacer.Horizontal, { size: 8 })), /* @__PURE__ */ React67.createElement("div", { className: "n-flex n-flex-col n-min-w-0 n-flex-1" }, /* @__PURE__ */ React67.createElement("div", { className: "n-min-w-0 n-truncate" }, tokens.map((token, j) => /* @__PURE__ */ React67.createElement(
10884
11140
  "span",
10885
11141
  {
10886
11142
  key: `${item.value}-token-${j}`,
@@ -10890,16 +11146,16 @@ var ComboboxMenu = memoGeneric(
10890
11146
  )
10891
11147
  },
10892
11148
  token.text
10893
- ))), tooltip && /* @__PURE__ */ React65.createElement(Small, { color: "textSubtle", className: "n-truncate" }, tooltip))),
10894
- (item.shortcut || item.icon && iconPosition === "right") && /* @__PURE__ */ React65.createElement("div", { className: "n-flex n-items-center n-min-w-0 n-ml-2" }, item.shortcut ? /* @__PURE__ */ React65.createElement(KeyboardShortcut, { shortcut: item.shortcut }) : item.icon && /* @__PURE__ */ React65.createElement(MenuIcon, { icon: item.icon }))
11149
+ ))), tooltip && /* @__PURE__ */ React67.createElement(Small, { color: "textSubtle", className: "n-truncate" }, tooltip))),
11150
+ (item.shortcut || item.icon && iconPosition === "right") && /* @__PURE__ */ React67.createElement("div", { className: "n-flex n-items-center n-min-w-0 n-ml-2" }, item.shortcut ? /* @__PURE__ */ React67.createElement(KeyboardShortcut, { shortcut: item.shortcut }) : item.icon && /* @__PURE__ */ React67.createElement(MenuIcon, { icon: item.icon }))
10895
11151
  );
10896
11152
  }
10897
11153
  }
10898
11154
  );
10899
11155
  })
10900
11156
  );
10901
- var MenuIcon = memo23(function MenuIcon2({ icon }) {
10902
- return /* @__PURE__ */ React65.createElement("div", { className: "n-relative n-top-[2px]" }, renderIcon(icon));
11157
+ var MenuIcon = memo22(function MenuIcon2({ icon }) {
11158
+ return /* @__PURE__ */ React67.createElement("div", { className: "n-relative n-top-[2px]" }, renderIcon(icon));
10903
11159
  });
10904
11160
 
10905
11161
  // src/components/Combobox.tsx
@@ -10920,9 +11176,10 @@ var Combobox = memoGeneric(
10920
11176
  openMenuBehavior = "showFilteredItems",
10921
11177
  onFocus,
10922
11178
  onDeleteWhenEmpty,
11179
+ iconPosition = "right",
10923
11180
  ...rest
10924
11181
  }, forwardedRef) {
10925
- const props = useMemo27(() => {
11182
+ const props = useMemo28(() => {
10926
11183
  if (rest.mode === "string") {
10927
11184
  return {
10928
11185
  mode: rest.mode,
@@ -10961,7 +11218,7 @@ var Combobox = memoGeneric(
10961
11218
  }
10962
11219
  }
10963
11220
  const initialValueString = getInitialValueString();
10964
- const [comboboxState] = useState26(
11221
+ const [comboboxState] = useState27(
10965
11222
  () => new ComboboxState(
10966
11223
  items,
10967
11224
  initialValueString,
@@ -10969,9 +11226,9 @@ var Combobox = memoGeneric(
10969
11226
  )
10970
11227
  );
10971
11228
  const state = useComboboxState(comboboxState);
10972
- const [isFocused, setIsFocused] = useState26(false);
11229
+ const [isFocused, setIsFocused] = useState27(false);
10973
11230
  const listRef = useRef21(null);
10974
- const [shouldBlur, setShouldBlur] = useState26(false);
11231
+ const [shouldBlur, setShouldBlur] = useState27(false);
10975
11232
  const { fieldId: id } = useLabel({
10976
11233
  fieldId: rest.id
10977
11234
  });
@@ -10988,7 +11245,7 @@ var Combobox = memoGeneric(
10988
11245
  listRef.current.scrollToIndex(selectedIndex);
10989
11246
  }
10990
11247
  }, [selectedIndex]);
10991
- const handleBlur = useCallback27(() => {
11248
+ const handleBlur = useCallback28(() => {
10992
11249
  ref.current?.blur();
10993
11250
  comboboxState.reset(initialValueString);
10994
11251
  if (props.mode === "string") {
@@ -11007,7 +11264,7 @@ var Combobox = memoGeneric(
11007
11264
  }
11008
11265
  setIsFocused(false);
11009
11266
  }, [filter, initialValueString, props, state, comboboxState]);
11010
- const handleFocus = useCallback27(
11267
+ const handleFocus = useCallback28(
11011
11268
  (event) => {
11012
11269
  setIsFocused(true);
11013
11270
  comboboxState.reset(
@@ -11021,7 +11278,7 @@ var Combobox = memoGeneric(
11021
11278
  },
11022
11279
  [initialValueString, onFocus, openMenuBehavior, comboboxState]
11023
11280
  );
11024
- const handleUpdateSelection = useCallback27(
11281
+ const handleUpdateSelection = useCallback28(
11025
11282
  (item) => {
11026
11283
  if (item.type !== void 0) return;
11027
11284
  const selectedItem = comboboxState.selectCurrentItem(item);
@@ -11037,7 +11294,7 @@ var Combobox = memoGeneric(
11037
11294
  },
11038
11295
  [props, comboboxState]
11039
11296
  );
11040
- const handleIndexChange = useCallback27(
11297
+ const handleIndexChange = useCallback28(
11041
11298
  (index) => {
11042
11299
  comboboxState.setSelectedIndex(index);
11043
11300
  const item = comboboxState.getSelectedItem();
@@ -11053,7 +11310,7 @@ var Combobox = memoGeneric(
11053
11310
  },
11054
11311
  [props, comboboxState]
11055
11312
  );
11056
- const handleChange = useCallback27(
11313
+ const handleChange = useCallback28(
11057
11314
  (value) => {
11058
11315
  if (readOnly) return;
11059
11316
  comboboxState.setFilter(value);
@@ -11068,7 +11325,7 @@ var Combobox = memoGeneric(
11068
11325
  },
11069
11326
  [readOnly, props, comboboxState]
11070
11327
  );
11071
- const handleKeyDown = useCallback27(
11328
+ const handleKeyDown = useCallback28(
11072
11329
  (event) => {
11073
11330
  let handled = false;
11074
11331
  const item = comboboxState.getSelectedItem();
@@ -11176,7 +11433,7 @@ var Combobox = memoGeneric(
11176
11433
  ref.current?.setSelectionRange(0, ref.current.value.length);
11177
11434
  }
11178
11435
  }));
11179
- const handleChevronClick = useCallback27(
11436
+ const handleChevronClick = useCallback28(
11180
11437
  (event) => {
11181
11438
  event.stopPropagation();
11182
11439
  if (shouldShowMenu) {
@@ -11203,27 +11460,27 @@ var Combobox = memoGeneric(
11203
11460
  ref.current?.focus();
11204
11461
  handleBlur();
11205
11462
  }, [shouldBlur, handleBlur]);
11206
- const { sectionHeaderCount, menuItemsCount, tallMenuItemsCount } = useMemo27(
11463
+ const { sectionHeaderCount, menuItemsCount, tallMenuItemsCount } = useMemo28(
11207
11464
  () => ListView.getMenuMetrics(filteredItems),
11208
11465
  [filteredItems]
11209
11466
  );
11210
11467
  const hasCheckedItems = items.some(
11211
11468
  (item) => isSelectableMenuItem(item) && item.checked
11212
11469
  );
11213
- return /* @__PURE__ */ React66.createElement(
11470
+ return /* @__PURE__ */ React68.createElement(
11214
11471
  InputField2.Root,
11215
11472
  {
11216
11473
  id,
11217
11474
  size,
11218
11475
  sideOffset: 6,
11219
11476
  start: icon ? renderIcon(icon) : void 0,
11220
- end: /* @__PURE__ */ React66.createElement(React66.Fragment, null, loading && /* @__PURE__ */ React66.createElement("div", { className: "pr-1.5" }, /* @__PURE__ */ React66.createElement(ActivityIndicator, null)), !readOnly && /* @__PURE__ */ React66.createElement(
11477
+ end: /* @__PURE__ */ React68.createElement(React68.Fragment, null, loading && /* @__PURE__ */ React68.createElement("div", { className: "pr-1.5" }, /* @__PURE__ */ React68.createElement(ActivityIndicator, null)), !readOnly && /* @__PURE__ */ React68.createElement(
11221
11478
  InputField2.Button,
11222
11479
  {
11223
11480
  variant: "floating",
11224
11481
  onClick: handleChevronClick
11225
11482
  },
11226
- /* @__PURE__ */ React66.createElement(
11483
+ /* @__PURE__ */ React68.createElement(
11227
11484
  DropdownChevronIcon2,
11228
11485
  {
11229
11486
  className: cx(
@@ -11243,7 +11500,7 @@ var Combobox = memoGeneric(
11243
11500
  maxBaseRows: 10.5
11244
11501
  });
11245
11502
  const adjustedListSize = { width, height: computedHeight };
11246
- return /* @__PURE__ */ React66.createElement(
11503
+ return /* @__PURE__ */ React68.createElement(
11247
11504
  "div",
11248
11505
  {
11249
11506
  className: cx(
@@ -11251,7 +11508,7 @@ var Combobox = memoGeneric(
11251
11508
  shouldShowMenu && !readOnly ? "n-flex" : "n-hidden"
11252
11509
  )
11253
11510
  },
11254
- filteredItems.length > 0 && !loading ? /* @__PURE__ */ React66.createElement(
11511
+ filteredItems.length > 0 && !loading ? /* @__PURE__ */ React68.createElement(
11255
11512
  ComboboxMenu,
11256
11513
  {
11257
11514
  ref: listRef,
@@ -11260,6 +11517,7 @@ var Combobox = memoGeneric(
11260
11517
  onSelectItem: handleUpdateSelection,
11261
11518
  onHoverIndex: handleIndexChange,
11262
11519
  listSize: adjustedListSize,
11520
+ iconPosition,
11263
11521
  style: {
11264
11522
  flex: `0 0 ${computedHeight}px`
11265
11523
  },
@@ -11268,11 +11526,11 @@ var Combobox = memoGeneric(
11268
11526
  getRowHeightForItem: (item) => isSelectableMenuItem(item) && item.tooltip ? ListView.tallRowHeight : baseRowHeight
11269
11527
  } : { itemHeight: baseRowHeight }
11270
11528
  }
11271
- ) : /* @__PURE__ */ React66.createElement("div", { className: "n-flex n-flex-col n-h-[50px] n-p-5 n-items-center n-justify-center" }, /* @__PURE__ */ React66.createElement(Small, { className: "n-text-text-disabled" }, loading ? "Loading..." : "No results"))
11529
+ ) : /* @__PURE__ */ React68.createElement("div", { className: "n-flex n-flex-col n-h-[50px] n-p-5 n-items-center n-justify-center" }, /* @__PURE__ */ React68.createElement(Small, { className: "n-text-text-disabled" }, loading ? "Loading..." : "No results"))
11272
11530
  );
11273
11531
  }
11274
11532
  },
11275
- /* @__PURE__ */ React66.createElement(
11533
+ /* @__PURE__ */ React68.createElement(
11276
11534
  InputField2.Input,
11277
11535
  {
11278
11536
  ref,
@@ -11297,7 +11555,7 @@ var Combobox = memoGeneric(
11297
11555
  ...readOnly ? { readOnly: true } : {}
11298
11556
  }
11299
11557
  ),
11300
- filter && typeaheadValue && typeaheadValue.toLowerCase().startsWith(filter.toLowerCase()) && /* @__PURE__ */ React66.createElement(
11558
+ filter && typeaheadValue && typeaheadValue.toLowerCase().startsWith(filter.toLowerCase()) && /* @__PURE__ */ React68.createElement(
11301
11559
  InputField2.Typeahead,
11302
11560
  {
11303
11561
  value: typeaheadValue,
@@ -11311,18 +11569,18 @@ var Combobox = memoGeneric(
11311
11569
  );
11312
11570
 
11313
11571
  // src/components/CommandPalette.tsx
11314
- import React68, { memo as memo24 } from "react";
11572
+ import React70, { memo as memo23 } from "react";
11315
11573
 
11316
11574
  // src/components/SearchCompletionMenu.tsx
11317
11575
  import { getCurrentPlatform as getCurrentPlatform2, handleKeyboardEvent } from "@noya-app/noya-keymap";
11318
- import React67, {
11576
+ import React69, {
11319
11577
  forwardRef as forwardRef23,
11320
- useCallback as useCallback28,
11578
+ useCallback as useCallback29,
11321
11579
  useEffect as useEffect21,
11322
11580
  useImperativeHandle as useImperativeHandle7,
11323
- useMemo as useMemo28,
11581
+ useMemo as useMemo29,
11324
11582
  useRef as useRef22,
11325
- useState as useState27
11583
+ useState as useState28
11326
11584
  } from "react";
11327
11585
  var SearchCompletionMenu = forwardRef23(function SearchCompletionMenu2({
11328
11586
  onSelect,
@@ -11333,17 +11591,17 @@ var SearchCompletionMenu = forwardRef23(function SearchCompletionMenu2({
11333
11591
  testSelectedIndex,
11334
11592
  testSearch
11335
11593
  }, forwardedRef) {
11336
- const [state, setState] = useState27({
11594
+ const [state, setState] = useState28({
11337
11595
  search: testSearch ?? "",
11338
11596
  index: 0
11339
11597
  });
11340
11598
  const { index, search } = state;
11341
- const listRef = React67.useRef(null);
11599
+ const listRef = React69.useRef(null);
11342
11600
  const hasCheckedItems = items.some((item) => item.checked);
11343
11601
  useEffect21(() => {
11344
11602
  listRef.current?.scrollToIndex(index);
11345
11603
  }, [index]);
11346
- const results = useMemo28(
11604
+ const results = useMemo29(
11347
11605
  () => fuzzyFilter({
11348
11606
  items: items.map(
11349
11607
  (item) => typeof item.title === "string" ? item.title : item.value
@@ -11355,10 +11613,10 @@ var SearchCompletionMenu = forwardRef23(function SearchCompletionMenu2({
11355
11613
  })),
11356
11614
  [items, search]
11357
11615
  );
11358
- const setSearch = useCallback28((search2) => {
11616
+ const setSearch = useCallback29((search2) => {
11359
11617
  setState((state2) => ({ ...state2, search: search2, index: 0 }));
11360
11618
  }, []);
11361
- const setIndex = useCallback28((index2) => {
11619
+ const setIndex = useCallback29((index2) => {
11362
11620
  setState((state2) => ({ ...state2, index: index2 }));
11363
11621
  }, []);
11364
11622
  useEffect21(() => {
@@ -11380,14 +11638,14 @@ var SearchCompletionMenu = forwardRef23(function SearchCompletionMenu2({
11380
11638
  width: listSize.width,
11381
11639
  height: searchHeight + listSize.height
11382
11640
  };
11383
- const selectAndClose = useCallback28(
11641
+ const selectAndClose = useCallback29(
11384
11642
  (item) => {
11385
11643
  onSelect(item);
11386
11644
  onClose();
11387
11645
  },
11388
11646
  [onSelect, onClose]
11389
11647
  );
11390
- const handleKeyDown = useCallback28(
11648
+ const handleKeyDown = useCallback29(
11391
11649
  (event) => {
11392
11650
  handleKeyboardEvent(event.nativeEvent, getCurrentPlatform2(navigator), {
11393
11651
  ArrowUp: () => {
@@ -11421,7 +11679,7 @@ var SearchCompletionMenu = forwardRef23(function SearchCompletionMenu2({
11421
11679
  inputRef.current?.focus();
11422
11680
  }
11423
11681
  }));
11424
- return /* @__PURE__ */ React67.createElement("div", { ...elementSize, className: "n-flex n-flex-col n-overflow-hidden" }, /* @__PURE__ */ React67.createElement(InputField2.Root, { className: "n-flex n-flex-0" }, /* @__PURE__ */ React67.createElement(
11682
+ return /* @__PURE__ */ React69.createElement("div", { ...elementSize, className: "n-flex n-flex-col n-overflow-hidden" }, /* @__PURE__ */ React69.createElement(InputField2.Root, { className: "n-flex n-flex-0" }, /* @__PURE__ */ React69.createElement(
11425
11683
  InputField2.Input,
11426
11684
  {
11427
11685
  ref: inputRef,
@@ -11441,7 +11699,7 @@ var SearchCompletionMenu = forwardRef23(function SearchCompletionMenu2({
11441
11699
  onChange: setSearch,
11442
11700
  onKeyDown: handleKeyDown
11443
11701
  }
11444
- )), /* @__PURE__ */ React67.createElement(Divider, null), results.length > 0 ? /* @__PURE__ */ React67.createElement(
11702
+ )), /* @__PURE__ */ React69.createElement(Divider, null), results.length > 0 ? /* @__PURE__ */ React69.createElement(
11445
11703
  ComboboxMenu,
11446
11704
  {
11447
11705
  ref: listRef,
@@ -11456,29 +11714,29 @@ var SearchCompletionMenu = forwardRef23(function SearchCompletionMenu2({
11456
11714
  onHoverIndex: setIndex,
11457
11715
  indented: hasCheckedItems
11458
11716
  }
11459
- ) : /* @__PURE__ */ React67.createElement(
11717
+ ) : /* @__PURE__ */ React69.createElement(
11460
11718
  "div",
11461
11719
  {
11462
11720
  ...listSize,
11463
11721
  className: "n-flex n-flex-col n-p-20 n-items-center n-justify-center"
11464
11722
  },
11465
- /* @__PURE__ */ React67.createElement(Small, { color: "textDisabled" }, "No results")
11723
+ /* @__PURE__ */ React69.createElement(Small, { color: "textDisabled" }, "No results")
11466
11724
  ));
11467
11725
  });
11468
11726
 
11469
11727
  // src/components/CommandPalette.tsx
11470
- var CommandPalette = memo24(function CommandPalette2({
11728
+ var CommandPalette = memo23(function CommandPalette2({
11471
11729
  showCommandPalette,
11472
11730
  setShowCommandPalette,
11473
11731
  items,
11474
11732
  onSelect,
11475
11733
  onHover
11476
11734
  }) {
11477
- const menuRef = React68.useRef(null);
11478
- const handleClose = React68.useCallback(() => {
11735
+ const menuRef = React70.useRef(null);
11736
+ const handleClose = React70.useCallback(() => {
11479
11737
  setShowCommandPalette(false);
11480
11738
  }, [setShowCommandPalette]);
11481
- return /* @__PURE__ */ React68.createElement(
11739
+ return /* @__PURE__ */ React70.createElement(
11482
11740
  Dialog,
11483
11741
  {
11484
11742
  style: {
@@ -11504,7 +11762,7 @@ var CommandPalette = memo24(function CommandPalette2({
11504
11762
  }, 0);
11505
11763
  }
11506
11764
  },
11507
- /* @__PURE__ */ React68.createElement("div", { className: "n-flex n-flex-col n-flex-1" }, /* @__PURE__ */ React68.createElement(AutoSizer, null, (size) => /* @__PURE__ */ React68.createElement(
11765
+ /* @__PURE__ */ React70.createElement("div", { className: "n-flex n-flex-col n-flex-1" }, /* @__PURE__ */ React70.createElement(AutoSizer, null, (size) => /* @__PURE__ */ React70.createElement(
11508
11766
  SearchCompletionMenu,
11509
11767
  {
11510
11768
  ref: menuRef,
@@ -11519,21 +11777,21 @@ var CommandPalette = memo24(function CommandPalette2({
11519
11777
  });
11520
11778
 
11521
11779
  // src/components/connected-users-menu/ConnectedUsersMenuLayout.tsx
11522
- import React69 from "react";
11523
- var UserAvatar = ({ userId, name, image }) => /* @__PURE__ */ React69.createElement(
11780
+ import React71 from "react";
11781
+ var UserAvatar = ({ userId, name, image }) => /* @__PURE__ */ React71.createElement(
11524
11782
  Tooltip,
11525
11783
  {
11526
11784
  key: userId,
11527
- content: /* @__PURE__ */ React69.createElement("div", { className: "n-flex n-flex-col" }, /* @__PURE__ */ React69.createElement(Small, null, name))
11785
+ content: /* @__PURE__ */ React71.createElement("div", { className: "n-flex n-flex-col" }, /* @__PURE__ */ React71.createElement(Small, null, name))
11528
11786
  },
11529
- /* @__PURE__ */ React69.createElement(Avatar, { size: INPUT_HEIGHT, userId, name, image })
11787
+ /* @__PURE__ */ React71.createElement(Avatar, { size: INPUT_HEIGHT, userId, name, image })
11530
11788
  );
11531
11789
  var ConnectedUsersMenuLayout = ({
11532
11790
  renderUsers,
11533
11791
  launchAIAssistant,
11534
11792
  isAssistantOpen
11535
11793
  }) => {
11536
- return /* @__PURE__ */ React69.createElement("div", { className: "n-flex n-gap-1.5" }, /* @__PURE__ */ React69.createElement(AvatarStack, { size: INPUT_HEIGHT }, renderUsers()), launchAIAssistant && /* @__PURE__ */ React69.createElement(Tooltip, { content: "AI Assistant" }, /* @__PURE__ */ React69.createElement(
11794
+ return /* @__PURE__ */ React71.createElement("div", { className: "n-flex n-gap-1.5" }, /* @__PURE__ */ React71.createElement(AvatarStack, { size: INPUT_HEIGHT }, renderUsers()), launchAIAssistant && /* @__PURE__ */ React71.createElement(Tooltip, { content: "AI Assistant" }, /* @__PURE__ */ React71.createElement(
11537
11795
  Button,
11538
11796
  {
11539
11797
  active: isAssistantOpen,
@@ -11545,7 +11803,7 @@ var ConnectedUsersMenuLayout = ({
11545
11803
  };
11546
11804
 
11547
11805
  // src/components/DraggableMenuButton.tsx
11548
- import React70, { useCallback as useCallback29, useState as useState28 } from "react";
11806
+ import React72, { useCallback as useCallback30, useState as useState29 } from "react";
11549
11807
  var DraggableMenuButton = memoGeneric(function DraggableMenuButton2({
11550
11808
  open: openProp,
11551
11809
  onOpenChange: onOpenChangeProp,
@@ -11563,8 +11821,8 @@ var DraggableMenuButton = memoGeneric(function DraggableMenuButton2({
11563
11821
  onChange: onOpenChangeProp,
11564
11822
  defaultValue: false
11565
11823
  });
11566
- const [downPosition, setDownPosition] = useState28(null);
11567
- const handlePointerDownCapture = useCallback29(
11824
+ const [downPosition, setDownPosition] = useState29(null);
11825
+ const handlePointerDownCapture = useCallback30(
11568
11826
  (event) => {
11569
11827
  if (open) {
11570
11828
  setDownPosition(null);
@@ -11577,7 +11835,7 @@ var DraggableMenuButton = memoGeneric(function DraggableMenuButton2({
11577
11835
  },
11578
11836
  [open]
11579
11837
  );
11580
- const handlePointerUp = useCallback29(
11838
+ const handlePointerUp = useCallback30(
11581
11839
  (event) => {
11582
11840
  if (open || !downPosition) {
11583
11841
  setDownPosition(null);
@@ -11596,13 +11854,13 @@ var DraggableMenuButton = memoGeneric(function DraggableMenuButton2({
11596
11854
  },
11597
11855
  [downPosition, open, setOpen]
11598
11856
  );
11599
- const handleOpenChange = useCallback29(
11857
+ const handleOpenChange = useCallback30(
11600
11858
  (isOpen) => {
11601
11859
  if (!isOpen) setOpen(false);
11602
11860
  },
11603
11861
  [setOpen]
11604
11862
  );
11605
- return /* @__PURE__ */ React70.createElement(
11863
+ return /* @__PURE__ */ React72.createElement(
11606
11864
  "div",
11607
11865
  {
11608
11866
  ...rest,
@@ -11619,7 +11877,7 @@ var DraggableMenuButton = memoGeneric(function DraggableMenuButton2({
11619
11877
  onClick?.();
11620
11878
  }
11621
11879
  },
11622
- items && onSelect ? /* @__PURE__ */ React70.createElement(
11880
+ items && onSelect ? /* @__PURE__ */ React72.createElement(
11623
11881
  DropdownMenu,
11624
11882
  {
11625
11883
  open,
@@ -11628,14 +11886,14 @@ var DraggableMenuButton = memoGeneric(function DraggableMenuButton2({
11628
11886
  onSelect,
11629
11887
  shouldBindKeyboardShortcuts: false
11630
11888
  },
11631
- /* @__PURE__ */ React70.createElement("div", { className: "n-pointer-events-none n-h-[15px]" }, /* @__PURE__ */ React70.createElement(
11889
+ /* @__PURE__ */ React72.createElement("div", { className: "n-pointer-events-none n-h-[15px]" }, /* @__PURE__ */ React72.createElement(
11632
11890
  Icon,
11633
11891
  {
11634
11892
  name: iconName,
11635
11893
  color: isVisible || open ? cssVars.colors.icon : "transparent"
11636
11894
  }
11637
11895
  ))
11638
- ) : /* @__PURE__ */ React70.createElement(
11896
+ ) : /* @__PURE__ */ React72.createElement(
11639
11897
  Icon,
11640
11898
  {
11641
11899
  name: iconName,
@@ -11647,10 +11905,10 @@ var DraggableMenuButton = memoGeneric(function DraggableMenuButton2({
11647
11905
 
11648
11906
  // src/components/Drawer.tsx
11649
11907
  import { Dialog as Dialog3 } from "radix-ui";
11650
- import * as React71 from "react";
11908
+ import * as React73 from "react";
11651
11909
  import { useImperativeHandle as useImperativeHandle8 } from "react";
11652
- var Drawer = React71.memo(
11653
- React71.forwardRef(function Drawer2({
11910
+ var Drawer = React73.memo(
11911
+ React73.forwardRef(function Drawer2({
11654
11912
  open,
11655
11913
  onOpenChange,
11656
11914
  trigger,
@@ -11682,7 +11940,7 @@ var Drawer = React71.memo(
11682
11940
  return internalOpen;
11683
11941
  }
11684
11942
  }));
11685
- const inner = /* @__PURE__ */ React71.createElement(React71.Fragment, null, /* @__PURE__ */ React71.createElement(
11943
+ const inner = /* @__PURE__ */ React73.createElement(React73.Fragment, null, /* @__PURE__ */ React73.createElement(
11686
11944
  Dialog3.Overlay,
11687
11945
  {
11688
11946
  className: cx(
@@ -11692,7 +11950,7 @@ var Drawer = React71.memo(
11692
11950
  ),
11693
11951
  style: overlayStyle
11694
11952
  }
11695
- ), /* @__PURE__ */ React71.createElement(
11953
+ ), /* @__PURE__ */ React73.createElement(
11696
11954
  Dialog3.Content,
11697
11955
  {
11698
11956
  id,
@@ -11704,24 +11962,24 @@ var Drawer = React71.memo(
11704
11962
  className
11705
11963
  )
11706
11964
  },
11707
- title && /* @__PURE__ */ React71.createElement(Dialog3.Title, null, title),
11965
+ title && /* @__PURE__ */ React73.createElement(Dialog3.Title, null, title),
11708
11966
  children
11709
11967
  ));
11710
- return /* @__PURE__ */ React71.createElement(
11968
+ return /* @__PURE__ */ React73.createElement(
11711
11969
  Dialog3.Root,
11712
11970
  {
11713
11971
  key: "dialog",
11714
11972
  open: internalOpen,
11715
11973
  onOpenChange: setInternalOpen
11716
11974
  },
11717
- /* @__PURE__ */ React71.createElement(Dialog3.Trigger, { key: "trigger" }, trigger),
11718
- portalled ? /* @__PURE__ */ React71.createElement(Dialog3.Portal, { container: portalContainer }, inner) : inner
11975
+ /* @__PURE__ */ React73.createElement(Dialog3.Trigger, { key: "trigger" }, trigger),
11976
+ portalled ? /* @__PURE__ */ React73.createElement(Dialog3.Portal, { container: portalContainer }, inner) : inner
11719
11977
  );
11720
11978
  })
11721
11979
  );
11722
11980
 
11723
11981
  // src/components/Fade.tsx
11724
- import React72 from "react";
11982
+ import React74 from "react";
11725
11983
  var Fade = ({
11726
11984
  children,
11727
11985
  direction = "right",
@@ -11743,7 +12001,7 @@ var Fade = ({
11743
12001
  top: "n-left-0 n-right-0 n-top-0",
11744
12002
  bottom: "n-left-0 n-right-0 n-bottom-0"
11745
12003
  }[direction];
11746
- return /* @__PURE__ */ React72.createElement("div", { className: cx("n-relative", className), style: { height } }, position === "front" ? children : null, /* @__PURE__ */ React72.createElement(
12004
+ return /* @__PURE__ */ React74.createElement("div", { className: cx("n-relative", className), style: { height } }, position === "front" ? children : null, /* @__PURE__ */ React74.createElement(
11747
12005
  "div",
11748
12006
  {
11749
12007
  className: cx(
@@ -11762,21 +12020,21 @@ var Fade = ({
11762
12020
  };
11763
12021
 
11764
12022
  // src/components/file-explorer/FileExplorerLayout.tsx
11765
- import React73 from "react";
12023
+ import React75 from "react";
11766
12024
  var FileExplorerLayout = ({
11767
12025
  children,
11768
12026
  className,
11769
12027
  ...props
11770
- }) => /* @__PURE__ */ React73.createElement(Section, { className: cx(className, "n-px-3 n-flex-1"), ...props }, children);
12028
+ }) => /* @__PURE__ */ React75.createElement(Section, { className: cx(className, "n-px-3 n-flex-1"), ...props }, children);
11771
12029
  var FileExplorerUploadButton = ({
11772
12030
  showUploadButton,
11773
12031
  onUpload,
11774
12032
  isUploading,
11775
12033
  children
11776
- }) => /* @__PURE__ */ React73.createElement("div", { className: "n-flex n-items-center n-gap-2" }, showUploadButton && /* @__PURE__ */ React73.createElement(
12034
+ }) => /* @__PURE__ */ React75.createElement("div", { className: "n-flex n-items-center n-gap-2" }, showUploadButton && /* @__PURE__ */ React75.createElement(
11777
12035
  Button,
11778
12036
  {
11779
- icon: isUploading ? /* @__PURE__ */ React73.createElement(ActivityIndicator, { size: 15 }) : "UploadIcon",
12037
+ icon: isUploading ? /* @__PURE__ */ React75.createElement(ActivityIndicator, { size: 15 }) : "UploadIcon",
11780
12038
  onClick: onUpload,
11781
12039
  "aria-label": "Upload file",
11782
12040
  tooltip: "Upload file",
@@ -11786,7 +12044,7 @@ var FileExplorerUploadButton = ({
11786
12044
  ), children);
11787
12045
  var FileExplorerCollection = forwardRefGeneric(
11788
12046
  function FileExplorerCollection2({ ...props }, ref) {
11789
- return /* @__PURE__ */ React73.createElement(Collection, { ref, className: "-n-mx-3 n-flex-1", ...props });
12047
+ return /* @__PURE__ */ React75.createElement(Collection, { ref, className: "-n-mx-3 n-flex-1", ...props });
11790
12048
  }
11791
12049
  );
11792
12050
  var FileExplorerDetail = ({
@@ -11795,7 +12053,7 @@ var FileExplorerDetail = ({
11795
12053
  children,
11796
12054
  className,
11797
12055
  style: style2
11798
- }) => /* @__PURE__ */ React73.createElement(
12056
+ }) => /* @__PURE__ */ React75.createElement(
11799
12057
  "span",
11800
12058
  {
11801
12059
  className: cx(
@@ -11810,10 +12068,10 @@ var FileExplorerDetail = ({
11810
12068
  var FileExplorerEmptyState = ({
11811
12069
  children: label = "No files",
11812
12070
  ...props
11813
- }) => /* @__PURE__ */ React73.createElement(Banner, { className: "n-mx-3", ...props }, label);
12071
+ }) => /* @__PURE__ */ React75.createElement(Banner, { className: "n-mx-3", ...props }, label);
11814
12072
 
11815
12073
  // src/components/FileUploadIndicator.tsx
11816
- import React76 from "react";
12074
+ import React78 from "react";
11817
12075
 
11818
12076
  // src/utils/formatByteSize.ts
11819
12077
  var byteSizeUnits = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
@@ -11833,7 +12091,7 @@ import {
11833
12091
  SpeakerLoudIcon,
11834
12092
  VideoIcon
11835
12093
  } from "@noya-app/noya-icons";
11836
- import React74, { memo as memo26, useMemo as useMemo29 } from "react";
12094
+ import React76, { memo as memo25, useMemo as useMemo30 } from "react";
11837
12095
 
11838
12096
  // src/components/catppuccin/fileIcons.ts
11839
12097
  var fileIcons = {
@@ -14273,7 +14531,7 @@ var getThumbnailColors = (colorScheme, selected) => {
14273
14531
  };
14274
14532
  }
14275
14533
  };
14276
- var MediaThumbnail = memo26(function MediaThumbnail2({
14534
+ var MediaThumbnail = memo25(function MediaThumbnail2({
14277
14535
  contentType: contentTypeProp,
14278
14536
  selected = false,
14279
14537
  className,
@@ -14291,14 +14549,14 @@ var MediaThumbnail = memo26(function MediaThumbnail2({
14291
14549
  selected
14292
14550
  );
14293
14551
  const contentType = getAssetType(contentTypeProp);
14294
- const iconStyles = useMemo29(
14552
+ const iconStyles = useMemo30(
14295
14553
  () => ({
14296
14554
  width: iconSizeMap[size],
14297
14555
  height: iconSizeMap[size]
14298
14556
  }),
14299
14557
  [size]
14300
14558
  );
14301
- const content = useMemo29(() => {
14559
+ const content = useMemo30(() => {
14302
14560
  if (renderThumbnailIcon) {
14303
14561
  const rendered = renderThumbnailIcon({ fileName, contentType });
14304
14562
  if (rendered) return rendered;
@@ -14318,7 +14576,7 @@ var MediaThumbnail = memo26(function MediaThumbnail2({
14318
14576
  renderUrl.searchParams.set("url", url);
14319
14577
  renderUrl.searchParams.set("fit", aspect);
14320
14578
  renderUrl.searchParams.set("theme", "light");
14321
- return /* @__PURE__ */ React74.createElement(
14579
+ return /* @__PURE__ */ React76.createElement(
14322
14580
  "img",
14323
14581
  {
14324
14582
  src: renderUrl.toString(),
@@ -14332,23 +14590,23 @@ var MediaThumbnail = memo26(function MediaThumbnail2({
14332
14590
  }
14333
14591
  switch (contentType) {
14334
14592
  case "image":
14335
- return /* @__PURE__ */ React74.createElement(ImageIcon2, { color: iconColor, style: iconStyles });
14593
+ return /* @__PURE__ */ React76.createElement(ImageIcon2, { color: iconColor, style: iconStyles });
14336
14594
  case "video":
14337
- return /* @__PURE__ */ React74.createElement(VideoIcon, { color: iconColor, style: iconStyles });
14595
+ return /* @__PURE__ */ React76.createElement(VideoIcon, { color: iconColor, style: iconStyles });
14338
14596
  case "audio":
14339
- return /* @__PURE__ */ React74.createElement(SpeakerLoudIcon, { color: iconColor, style: iconStyles });
14597
+ return /* @__PURE__ */ React76.createElement(SpeakerLoudIcon, { color: iconColor, style: iconStyles });
14340
14598
  default:
14341
14599
  if (iconName) {
14342
14600
  const Icon2 = Icons[iconName];
14343
- return /* @__PURE__ */ React74.createElement(Icon2, { color: iconColor, style: iconStyles });
14601
+ return /* @__PURE__ */ React76.createElement(Icon2, { color: iconColor, style: iconStyles });
14344
14602
  }
14345
14603
  if (fileName) {
14346
14604
  if (fileName.endsWith(".noya")) {
14347
- return /* @__PURE__ */ React74.createElement(NoyaIcon, { color: iconColor, style: iconStyles });
14605
+ return /* @__PURE__ */ React76.createElement(NoyaIcon, { color: iconColor, style: iconStyles });
14348
14606
  }
14349
14607
  const fileIcon = findFileIcon(fileName);
14350
14608
  if (fileIcon) {
14351
- return /* @__PURE__ */ React74.createElement(
14609
+ return /* @__PURE__ */ React76.createElement(
14352
14610
  "img",
14353
14611
  {
14354
14612
  src: `https://api.iconify.design/catppuccin/${fileIcon}.svg?height=none&box=1`,
@@ -14358,7 +14616,7 @@ var MediaThumbnail = memo26(function MediaThumbnail2({
14358
14616
  );
14359
14617
  }
14360
14618
  }
14361
- return /* @__PURE__ */ React74.createElement(FileIcon, { color: iconColor, style: iconStyles });
14619
+ return /* @__PURE__ */ React76.createElement(FileIcon, { color: iconColor, style: iconStyles });
14362
14620
  }
14363
14621
  }, [
14364
14622
  renderThumbnailIcon,
@@ -14372,7 +14630,7 @@ var MediaThumbnail = memo26(function MediaThumbnail2({
14372
14630
  iconStyles,
14373
14631
  iconName
14374
14632
  ]);
14375
- return /* @__PURE__ */ React74.createElement(
14633
+ return /* @__PURE__ */ React76.createElement(
14376
14634
  "div",
14377
14635
  {
14378
14636
  className: cx(
@@ -14415,7 +14673,7 @@ function findFileIcon(fileName) {
14415
14673
  // src/components/Progress.tsx
14416
14674
  import { clamp as clamp4 } from "@noya-app/noya-utils";
14417
14675
  import { Progress as ProgressPrimitive } from "radix-ui";
14418
- import * as React75 from "react";
14676
+ import * as React77 from "react";
14419
14677
  function Progress({
14420
14678
  value,
14421
14679
  colorScheme = "normal",
@@ -14424,18 +14682,18 @@ function Progress({
14424
14682
  style: styleProp
14425
14683
  }) {
14426
14684
  const clampedValue = clamp4(value, 0, 100);
14427
- const transformStyles = React75.useMemo(
14685
+ const transformStyles = React77.useMemo(
14428
14686
  () => ({
14429
14687
  transform: `translateX(-${100 - clampedValue}%)`,
14430
14688
  backgroundColor: color
14431
14689
  }),
14432
14690
  [color, clampedValue]
14433
14691
  );
14434
- const style2 = React75.useMemo(
14692
+ const style2 = React77.useMemo(
14435
14693
  () => ({ transform: "translateZ(0)", ...styleProp }),
14436
14694
  [styleProp]
14437
14695
  );
14438
- return /* @__PURE__ */ React75.createElement(
14696
+ return /* @__PURE__ */ React77.createElement(
14439
14697
  ProgressPrimitive.Root,
14440
14698
  {
14441
14699
  className: cx(
@@ -14445,7 +14703,7 @@ function Progress({
14445
14703
  style: style2,
14446
14704
  value: clampedValue
14447
14705
  },
14448
- /* @__PURE__ */ React75.createElement(
14706
+ /* @__PURE__ */ React77.createElement(
14449
14707
  ProgressPrimitive.Indicator,
14450
14708
  {
14451
14709
  className: cx(
@@ -14470,14 +14728,14 @@ function FileUploadIndicator({
14470
14728
  }) {
14471
14729
  const done = percent === 1;
14472
14730
  const value = typeof percent === "number" ? Math.round(percent) : 0;
14473
- return /* @__PURE__ */ React76.createElement("div", { className: "n-flex n-items-center n-gap-2" }, /* @__PURE__ */ React76.createElement("div", { className: "n-w-12 n-h-12 n-bg-background n-rounded-md n-overflow-hidden" }, /* @__PURE__ */ React76.createElement(
14731
+ return /* @__PURE__ */ React78.createElement("div", { className: "n-flex n-items-center n-gap-2" }, /* @__PURE__ */ React78.createElement("div", { className: "n-w-12 n-h-12 n-bg-background n-rounded-md n-overflow-hidden" }, /* @__PURE__ */ React78.createElement(
14474
14732
  MediaThumbnail,
14475
14733
  {
14476
14734
  size: "medium",
14477
14735
  fileName: name,
14478
14736
  contentType
14479
14737
  }
14480
- )), /* @__PURE__ */ React76.createElement("div", { className: "n-flex n-flex-col n-flex-1 n-justify-center n-gap-1 n-min-w-0" }, name && /* @__PURE__ */ React76.createElement(Small, { color: "text", className: "n-truncate n-leading-none" }, name), typeof total === "number" && typeof percent === "number" && /* @__PURE__ */ React76.createElement(
14738
+ )), /* @__PURE__ */ React78.createElement("div", { className: "n-flex n-flex-col n-flex-1 n-justify-center n-gap-1 n-min-w-0" }, name && /* @__PURE__ */ React78.createElement(Small, { color: "text", className: "n-truncate n-leading-none" }, name), typeof total === "number" && typeof percent === "number" && /* @__PURE__ */ React78.createElement(
14481
14739
  Small,
14482
14740
  {
14483
14741
  color: "textSubtle",
@@ -14488,7 +14746,7 @@ function FileUploadIndicator({
14488
14746
  " /",
14489
14747
  " ",
14490
14748
  formatByteSize(total)
14491
- ), typeof value === "number" && /* @__PURE__ */ React76.createElement(
14749
+ ), typeof value === "number" && /* @__PURE__ */ React78.createElement(
14492
14750
  Progress,
14493
14751
  {
14494
14752
  value,
@@ -14496,7 +14754,7 @@ function FileUploadIndicator({
14496
14754
  className: "n-rounded-sm",
14497
14755
  colorScheme: "secondary"
14498
14756
  }
14499
- )), /* @__PURE__ */ React76.createElement("div", { className: "n-flex n-items-center n-justify-center n-gap-2" }, typeof value === "number" && /* @__PURE__ */ React76.createElement(
14757
+ )), /* @__PURE__ */ React78.createElement("div", { className: "n-flex n-items-center n-justify-center n-gap-2" }, typeof value === "number" && /* @__PURE__ */ React78.createElement(
14500
14758
  Small,
14501
14759
  {
14502
14760
  color: "textSubtle",
@@ -14505,12 +14763,12 @@ function FileUploadIndicator({
14505
14763
  },
14506
14764
  value,
14507
14765
  "%"
14508
- ), done ? /* @__PURE__ */ React76.createElement("div", { className: "n-w-[15px] n-h-[15px] n-bg-secondary n-rounded-full n-flex n-items-center n-justify-center n-text-white" }, /* @__PURE__ */ React76.createElement(Checkmark, null)) : /* @__PURE__ */ React76.createElement(ActivityIndicator, { size: 15 })));
14766
+ ), done ? /* @__PURE__ */ React78.createElement("div", { className: "n-w-[15px] n-h-[15px] n-bg-secondary n-rounded-full n-flex n-items-center n-justify-center n-text-white" }, /* @__PURE__ */ React78.createElement(Checkmark, null)) : /* @__PURE__ */ React78.createElement(ActivityIndicator, { size: 15 })));
14509
14767
  }
14510
14768
  function FileUploadList({
14511
14769
  uploads
14512
14770
  }) {
14513
- return /* @__PURE__ */ React76.createElement(React76.Fragment, null, /* @__PURE__ */ React76.createElement("div", { className: "n-flex n-items-center n-gap-2 n-py-2 n-px-4" }, /* @__PURE__ */ React76.createElement(Heading5, null, "Uploading ", uploads.length, " ", uploads.length === 1 ? "asset" : "assets")), /* @__PURE__ */ React76.createElement(Divider, null), /* @__PURE__ */ React76.createElement("div", { className: "n-flex n-flex-col n-gap-3 n-max-h-[500px] n-overflow-y-auto n-overflow-x-hidden n-py-4 n-px-4" }, uploads.map((upload) => /* @__PURE__ */ React76.createElement(
14771
+ return /* @__PURE__ */ React78.createElement(React78.Fragment, null, /* @__PURE__ */ React78.createElement("div", { className: "n-flex n-items-center n-gap-2 n-py-2 n-px-4" }, /* @__PURE__ */ React78.createElement(Heading5, null, "Uploading ", uploads.length, " ", uploads.length === 1 ? "asset" : "assets")), /* @__PURE__ */ React78.createElement(Divider, null), /* @__PURE__ */ React78.createElement("div", { className: "n-flex n-flex-col n-gap-3 n-max-h-[500px] n-overflow-y-auto n-overflow-x-hidden n-py-4 n-px-4" }, uploads.map((upload) => /* @__PURE__ */ React78.createElement(
14514
14772
  FileUploadIndicator,
14515
14773
  {
14516
14774
  key: upload.id,
@@ -14523,7 +14781,7 @@ function FileUploadList({
14523
14781
  }
14524
14782
 
14525
14783
  // src/components/FloatingWindow.tsx
14526
- import React77, { useCallback as useCallback30, useRef as useRef23, useState as useState29 } from "react";
14784
+ import React79, { useCallback as useCallback31, useRef as useRef23, useState as useState30 } from "react";
14527
14785
  var styles2 = {
14528
14786
  noSelect: {
14529
14787
  userSelect: "none",
@@ -14616,7 +14874,7 @@ function defaultRenderToolbar({
14616
14874
  toolbarContent,
14617
14875
  onClose
14618
14876
  }) {
14619
- return /* @__PURE__ */ React77.createElement(React77.Fragment, null, /* @__PURE__ */ React77.createElement(Small, { className: "n-flex-1 n-font-medium n-text-text" }, title), toolbarContent, /* @__PURE__ */ React77.createElement(
14877
+ return /* @__PURE__ */ React79.createElement(React79.Fragment, null, /* @__PURE__ */ React79.createElement(Small, { className: "n-flex-1 n-font-medium n-text-text" }, title), toolbarContent, /* @__PURE__ */ React79.createElement(
14620
14878
  IconButton,
14621
14879
  {
14622
14880
  iconName: "Cross3Icon",
@@ -14643,15 +14901,15 @@ var FloatingWindow = ({
14643
14901
  toolbarContent,
14644
14902
  renderToolbar = defaultRenderToolbar
14645
14903
  }) => {
14646
- const [position, setPosition] = useState29({ x: initialX, y: initialY });
14647
- const [size, setSize] = useState29({
14904
+ const [position, setPosition] = useState30({ x: initialX, y: initialY });
14905
+ const [size, setSize] = useState30({
14648
14906
  width: initialWidth,
14649
14907
  height: initialHeight
14650
14908
  });
14651
- const [isDragging, setIsDragging] = useState29(false);
14652
- const [isResizing, setIsResizing] = useState29(false);
14653
- const [dragOffset, setDragOffset] = useState29({ x: 0, y: 0 });
14654
- const [resizeDirection, setResizeDirection] = useState29(null);
14909
+ const [isDragging, setIsDragging] = useState30(false);
14910
+ const [isResizing, setIsResizing] = useState30(false);
14911
+ const [dragOffset, setDragOffset] = useState30({ x: 0, y: 0 });
14912
+ const [resizeDirection, setResizeDirection] = useState30(null);
14655
14913
  const wrapperRef = useRef23(null);
14656
14914
  const toggleGlobalTextSelection = (disable) => {
14657
14915
  if (disable) {
@@ -14660,7 +14918,7 @@ var FloatingWindow = ({
14660
14918
  document.body.style.userSelect = "";
14661
14919
  }
14662
14920
  };
14663
- const handleMouseDown = useCallback30((e) => {
14921
+ const handleMouseDown = useCallback31((e) => {
14664
14922
  if (!wrapperRef.current) return;
14665
14923
  const rect = wrapperRef.current.getBoundingClientRect();
14666
14924
  setDragOffset({
@@ -14669,7 +14927,7 @@ var FloatingWindow = ({
14669
14927
  });
14670
14928
  setIsDragging(true);
14671
14929
  }, []);
14672
- const handleResizeStart = useCallback30(
14930
+ const handleResizeStart = useCallback31(
14673
14931
  (direction) => (e) => {
14674
14932
  e.stopPropagation();
14675
14933
  setIsResizing(true);
@@ -14678,7 +14936,7 @@ var FloatingWindow = ({
14678
14936
  },
14679
14937
  []
14680
14938
  );
14681
- const handleMouseMove = useCallback30(
14939
+ const handleMouseMove = useCallback31(
14682
14940
  (e) => {
14683
14941
  if (isDragging) {
14684
14942
  setPosition({
@@ -14732,13 +14990,13 @@ var FloatingWindow = ({
14732
14990
  minHeight
14733
14991
  ]
14734
14992
  );
14735
- const handleMouseUp = useCallback30((_e) => {
14993
+ const handleMouseUp = useCallback31((_e) => {
14736
14994
  setIsDragging(false);
14737
14995
  setIsResizing(false);
14738
14996
  setResizeDirection(null);
14739
14997
  toggleGlobalTextSelection(false);
14740
14998
  }, []);
14741
- React77.useEffect(() => {
14999
+ React79.useEffect(() => {
14742
15000
  document.addEventListener("mousemove", handleMouseMove);
14743
15001
  document.addEventListener("mouseup", handleMouseUp);
14744
15002
  return () => {
@@ -14748,11 +15006,11 @@ var FloatingWindow = ({
14748
15006
  }, [handleMouseMove, handleMouseUp]);
14749
15007
  const floatingWindowManager = useFloatingWindowManager();
14750
15008
  const currentFloatingWindow = useCurrentFloatingWindowInternal();
14751
- const handleClose = useCallback30(() => {
15009
+ const handleClose = useCallback31(() => {
14752
15010
  if (onClose) onClose();
14753
15011
  floatingWindowManager.closeWindow(currentFloatingWindow.id);
14754
15012
  }, [currentFloatingWindow.id, floatingWindowManager, onClose]);
14755
- return /* @__PURE__ */ React77.createElement(
15013
+ return /* @__PURE__ */ React79.createElement(
14756
15014
  "div",
14757
15015
  {
14758
15016
  ref: wrapperRef,
@@ -14767,7 +15025,7 @@ var FloatingWindow = ({
14767
15025
  zIndex: cssVars.zIndex.menu
14768
15026
  }
14769
15027
  },
14770
- /* @__PURE__ */ React77.createElement(
15028
+ /* @__PURE__ */ React79.createElement(
14771
15029
  "div",
14772
15030
  {
14773
15031
  style: {
@@ -14778,9 +15036,9 @@ var FloatingWindow = ({
14778
15036
  },
14779
15037
  renderToolbar({ title, toolbarContent, onClose: handleClose })
14780
15038
  ),
14781
- /* @__PURE__ */ React77.createElement(Divider, null),
14782
- /* @__PURE__ */ React77.createElement("div", { style: styles2.content }, children),
14783
- Object.entries(resizeHandlePositions).map(([direction, style2]) => /* @__PURE__ */ React77.createElement(
15039
+ /* @__PURE__ */ React79.createElement(Divider, null),
15040
+ /* @__PURE__ */ React79.createElement("div", { style: styles2.content }, children),
15041
+ Object.entries(resizeHandlePositions).map(([direction, style2]) => /* @__PURE__ */ React79.createElement(
14784
15042
  "div",
14785
15043
  {
14786
15044
  key: direction,
@@ -14792,8 +15050,8 @@ var FloatingWindow = ({
14792
15050
  };
14793
15051
 
14794
15052
  // src/components/InspectorContainer.tsx
14795
- import React78, { forwardRef as forwardRef25, memo as memo27 } from "react";
14796
- var InspectorContainer = memo27(
15053
+ import React80, { forwardRef as forwardRef25, memo as memo26 } from "react";
15054
+ var InspectorContainer = memo26(
14797
15055
  forwardRef25(function InspectorContainer2({
14798
15056
  header,
14799
15057
  children,
@@ -14803,7 +15061,7 @@ var InspectorContainer = memo27(
14803
15061
  className,
14804
15062
  style: style2
14805
15063
  }, forwardedRef) {
14806
- return /* @__PURE__ */ React78.createElement(
15064
+ return /* @__PURE__ */ React80.createElement(
14807
15065
  "div",
14808
15066
  {
14809
15067
  ref: forwardedRef,
@@ -14818,32 +15076,32 @@ var InspectorContainer = memo27(
14818
15076
  }
14819
15077
  },
14820
15078
  header,
14821
- children ? /* @__PURE__ */ React78.createElement(ScrollArea, null, /* @__PURE__ */ React78.createElement("div", { className: "n-flex n-flex-col n-relative" }, showDividers ? withSeparatorElements(children, /* @__PURE__ */ React78.createElement(Divider, null)) : children)) : fallback ? /* @__PURE__ */ React78.createElement("div", { className: "n-flex n-flex-col n-relative n-h-full" }, fallback) : null
15079
+ children ? /* @__PURE__ */ React80.createElement(ScrollArea, null, /* @__PURE__ */ React80.createElement("div", { className: "n-flex n-flex-col n-relative" }, showDividers ? withSeparatorElements(children, /* @__PURE__ */ React80.createElement(Divider, null)) : children)) : fallback ? /* @__PURE__ */ React80.createElement("div", { className: "n-flex n-flex-col n-relative n-h-full" }, fallback) : null
14822
15080
  );
14823
15081
  })
14824
15082
  );
14825
15083
 
14826
15084
  // src/components/LabeledElementView.tsx
14827
15085
  import * as kiwi from "kiwi.js";
14828
- import * as React79 from "react";
14829
- var LabeledElementView = React79.memo(function LabeledElementView2({
15086
+ import * as React81 from "react";
15087
+ var LabeledElementView = React81.memo(function LabeledElementView2({
14830
15088
  children,
14831
15089
  renderLabel
14832
15090
  }) {
14833
- const elementIds = React79.Children.toArray(children).flatMap(
14834
- (child) => React79.isValidElement(child) && child.type === React79.Fragment ? child.props.children : [child]
15091
+ const elementIds = React81.Children.toArray(children).flatMap(
15092
+ (child) => React81.isValidElement(child) && child.type === React81.Fragment ? child.props.children : [child]
14835
15093
  ).map(
14836
- (child) => React79.isValidElement(child) && "id" in child.props ? child.props.id : null
15094
+ (child) => React81.isValidElement(child) && "id" in child.props ? child.props.id : null
14837
15095
  ).filter((id) => !!id);
14838
15096
  const serializedIds = elementIds.join(",");
14839
- const containerRef = React79.useRef(null);
14840
- const refs = React79.useMemo(() => {
15097
+ const containerRef = React81.useRef(null);
15098
+ const refs = React81.useMemo(() => {
14841
15099
  return Object.fromEntries(
14842
- serializedIds.split(",").map((id) => [id, React79.createRef()])
15100
+ serializedIds.split(",").map((id) => [id, React81.createRef()])
14843
15101
  );
14844
15102
  }, [serializedIds]);
14845
- const labelElements = React79.useMemo(() => {
14846
- return serializedIds.split(",").map((id, index) => /* @__PURE__ */ React79.createElement(
15103
+ const labelElements = React81.useMemo(() => {
15104
+ return serializedIds.split(",").map((id, index) => /* @__PURE__ */ React81.createElement(
14847
15105
  "span",
14848
15106
  {
14849
15107
  key: id,
@@ -14856,7 +15114,7 @@ var LabeledElementView = React79.memo(function LabeledElementView2({
14856
15114
  })
14857
15115
  ));
14858
15116
  }, [refs, serializedIds, renderLabel]);
14859
- React79.useLayoutEffect(() => {
15117
+ React81.useLayoutEffect(() => {
14860
15118
  if (!containerRef.current) return;
14861
15119
  const containerRect = containerRef.current.getBoundingClientRect();
14862
15120
  const solver = new kiwi.Solver();
@@ -14918,17 +15176,17 @@ var LabeledElementView = React79.memo(function LabeledElementView2({
14918
15176
  `${Math.max(...heights)}px`
14919
15177
  );
14920
15178
  }, [refs, labelElements]);
14921
- return /* @__PURE__ */ React79.createElement("div", { className: "n-flex n-flex-1 n-flex-col n-relative", ref: containerRef }, /* @__PURE__ */ React79.createElement("div", { className: "n-flex n-flex-1 n-items-center" }, children), /* @__PURE__ */ React79.createElement("div", { className: "n-relative n-overflow-hidden n-select-none" }, labelElements));
15179
+ return /* @__PURE__ */ React81.createElement("div", { className: "n-flex n-flex-1 n-flex-col n-relative", ref: containerRef }, /* @__PURE__ */ React81.createElement("div", { className: "n-flex n-flex-1 n-items-center" }, children), /* @__PURE__ */ React81.createElement("div", { className: "n-relative n-overflow-hidden n-select-none" }, labelElements));
14922
15180
  });
14923
15181
 
14924
15182
  // src/components/LabeledField.tsx
14925
- import React81, { memo as memo29, useMemo as useMemo32 } from "react";
15183
+ import React83, { memo as memo28, useMemo as useMemo33 } from "react";
14926
15184
 
14927
15185
  // src/hooks/useIndent.ts
14928
- import React80 from "react";
14929
- var IndentContext = React80.createContext(0);
15186
+ import React82 from "react";
15187
+ var IndentContext = React82.createContext(0);
14930
15188
  var useIndent = () => {
14931
- return React80.useContext(IndentContext);
15189
+ return React82.useContext(IndentContext);
14932
15190
  };
14933
15191
 
14934
15192
  // src/components/LabeledField.tsx
@@ -14940,7 +15198,7 @@ var labeledFieldStyles = (labelType) => cx(
14940
15198
  var labelTypeInset = {
14941
15199
  type: "inset"
14942
15200
  };
14943
- var LabeledField = memo29(function LabeledField2({
15201
+ var LabeledField = memo28(function LabeledField2({
14944
15202
  children,
14945
15203
  label,
14946
15204
  labelType: labelTypeProp,
@@ -14956,15 +15214,15 @@ var LabeledField = memo29(function LabeledField2({
14956
15214
  const labelWidth = labelWidthFromContext ?? minWidth;
14957
15215
  const labelTypeFromContext = useLabelType();
14958
15216
  const labelType = labelTypeProp ?? labelTypeFromContext;
14959
- const labeledFieldClasses = useMemo32(
15217
+ const labeledFieldClasses = useMemo33(
14960
15218
  () => labeledFieldStyles(labelType),
14961
15219
  [labelType]
14962
15220
  );
14963
- const labelContextValue = useMemo32(
15221
+ const labelContextValue = useMemo33(
14964
15222
  () => ({ fieldId, label }),
14965
15223
  [fieldId, label]
14966
15224
  );
14967
- const indentStyle = useMemo32(
15225
+ const indentStyle = useMemo33(
14968
15226
  () => ({
14969
15227
  width: indentLevel * 8,
14970
15228
  flexBasis: indentLevel * 8,
@@ -14973,20 +15231,20 @@ var LabeledField = memo29(function LabeledField2({
14973
15231
  }),
14974
15232
  [indentLevel]
14975
15233
  );
14976
- const fieldStyle = useMemo32(
15234
+ const fieldStyle = useMemo33(
14977
15235
  () => ({
14978
15236
  minWidth: `calc(100% - ${labelWidth + indentLevel * 8 + 6}px)`
14979
15237
  }),
14980
15238
  [labelWidth, indentLevel]
14981
15239
  );
14982
- const labelStyle = useMemo32(
15240
+ const labelStyle = useMemo33(
14983
15241
  () => ({
14984
15242
  minWidth: `calc(${labelWidth}px - ${indentLevel * 8}px)`,
14985
15243
  ...labelStyleProp
14986
15244
  }),
14987
15245
  [labelWidth, indentLevel, labelStyleProp]
14988
15246
  );
14989
- return /* @__PURE__ */ React81.createElement(LabelContext.Provider, { value: labelContextValue }, labelType === "inset" ? /* @__PURE__ */ React81.createElement(LabelTypeContext.Provider, { value: labelTypeInset }, children) : /* @__PURE__ */ React81.createElement("div", { className: cx("n-flex n-relative n-flex-1", className), style: style2 }, Boolean(indentLevel) && /* @__PURE__ */ React81.createElement("div", { style: indentStyle }), /* @__PURE__ */ React81.createElement("div", { className: labeledFieldClasses }, labelType !== "none" && /* @__PURE__ */ React81.createElement(
15247
+ return /* @__PURE__ */ React83.createElement(LabelContext.Provider, { value: labelContextValue }, labelType === "inset" ? /* @__PURE__ */ React83.createElement(LabelTypeContext.Provider, { value: labelTypeInset }, children) : /* @__PURE__ */ React83.createElement("div", { className: cx("n-flex n-relative n-flex-1", className), style: style2 }, Boolean(indentLevel) && /* @__PURE__ */ React83.createElement("div", { style: indentStyle }), /* @__PURE__ */ React83.createElement("div", { className: labeledFieldClasses }, labelType !== "none" && /* @__PURE__ */ React83.createElement(
14990
15248
  Label,
14991
15249
  {
14992
15250
  htmlFor: fieldId,
@@ -14995,13 +15253,13 @@ var LabeledField = memo29(function LabeledField2({
14995
15253
  ...props
14996
15254
  },
14997
15255
  label
14998
- ), labelType === "start" ? /* @__PURE__ */ React81.createElement("div", { className: "n-flex-auto n-flex", style: fieldStyle }, children) : children)));
15256
+ ), labelType === "start" ? /* @__PURE__ */ React83.createElement("div", { className: "n-flex-auto n-flex", style: fieldStyle }, children) : children)));
14999
15257
  });
15000
15258
 
15001
15259
  // src/components/ListMenu.tsx
15002
15260
  import { ArrowRightIcon } from "@noya-app/noya-icons";
15003
15261
  import { chunkBy as chunkBy2 } from "@noya-app/noya-utils";
15004
- import React82 from "react";
15262
+ import React84 from "react";
15005
15263
  function getItemId(item) {
15006
15264
  if (item.type === "submenu") {
15007
15265
  return item.id;
@@ -15017,7 +15275,7 @@ function ListMenu({
15017
15275
  }) {
15018
15276
  const selectedIds = items.flatMap(
15019
15277
  (item) => isSelectableMenuItem(item) && item.checked ? [item.value] : []
15020
- ).concat(selectedIdsProp);
15278
+ ).concat(selectedIdsProp ?? []);
15021
15279
  let chunks = chunkBy2(
15022
15280
  items,
15023
15281
  (a, b) => a.type !== "separator" && b.type !== "separator"
@@ -15030,7 +15288,7 @@ function ListMenu({
15030
15288
  const regularItems = chunk.filter(
15031
15289
  (item) => isSubMenuItem(item) || isSelectableMenuItem(item)
15032
15290
  );
15033
- return /* @__PURE__ */ React82.createElement(
15291
+ return /* @__PURE__ */ React84.createElement(
15034
15292
  List,
15035
15293
  {
15036
15294
  key: regularItems.map(getItemId).join("-"),
@@ -15042,43 +15300,43 @@ function ListMenu({
15042
15300
  getName: (item) => item.title.toString(),
15043
15301
  selectedIds,
15044
15302
  renderRight,
15045
- renderThumbnail: ({ item }) => /* @__PURE__ */ React82.createElement("div", { className: "n-flex n-flex-1 n-items-center n-justify-center n-bg-divider-subtle n-w-full n-h-full n-rounded-sm" }, renderIcon(item.icon)),
15046
- renderDetail: (item) => isSubMenuItem(item) && /* @__PURE__ */ React82.createElement(ArrowRightIcon, null),
15303
+ renderThumbnail: ({ item }) => /* @__PURE__ */ React84.createElement("div", { className: "n-flex n-flex-1 n-items-center n-justify-center n-bg-divider-subtle n-w-full n-h-full n-rounded-sm" }, renderIcon(item.icon)),
15304
+ renderDetail: (item) => isSubMenuItem(item) && /* @__PURE__ */ React84.createElement(ArrowRightIcon, null),
15047
15305
  onClickItem: (itemId) => onSelect(itemId)
15048
15306
  }
15049
15307
  );
15050
15308
  });
15051
15309
  return withSeparatorElements(
15052
15310
  lists,
15053
- /* @__PURE__ */ React82.createElement(Divider, { overflow: 12, className: "n-my-1" })
15311
+ /* @__PURE__ */ React84.createElement(Divider, { overflow: 12, className: "n-my-1" })
15054
15312
  );
15055
15313
  }
15056
15314
 
15057
15315
  // src/components/ListNavigator.tsx
15058
- import React86 from "react";
15316
+ import React88 from "react";
15059
15317
 
15060
15318
  // src/components/Navigator.tsx
15061
- import React85, {
15319
+ import React87, {
15062
15320
  Children as Children4,
15063
15321
  isValidElement as isValidElement5,
15064
- useCallback as useCallback32,
15065
- useMemo as useMemo34,
15322
+ useCallback as useCallback33,
15323
+ useMemo as useMemo35,
15066
15324
  useRef as useRef26,
15067
- useState as useState31
15325
+ useState as useState32
15068
15326
  } from "react";
15069
15327
 
15070
15328
  // src/components/StackNavigator.tsx
15071
15329
  import { isDeepEqual as isDeepEqual4 } from "@noya-app/noya-utils";
15072
- import React84, {
15073
- useCallback as useCallback31,
15330
+ import React86, {
15331
+ useCallback as useCallback32,
15074
15332
  useEffect as useEffect22,
15075
- useMemo as useMemo33,
15333
+ useMemo as useMemo34,
15076
15334
  useRef as useRef25,
15077
- useState as useState30
15335
+ useState as useState31
15078
15336
  } from "react";
15079
15337
 
15080
15338
  // src/components/BaseToolbar.tsx
15081
- import React83 from "react";
15339
+ import React85 from "react";
15082
15340
  var toolbarStyle = {
15083
15341
  [cssVarNames.colors.buttonBackground]: "transparent",
15084
15342
  [cssVarNames.colors.inputBackground]: "transparent"
@@ -15090,7 +15348,7 @@ function BaseToolbarContainer({
15090
15348
  innerClassName,
15091
15349
  enableAbsoluteBreakpoint = true
15092
15350
  }) {
15093
- return /* @__PURE__ */ React83.createElement("div", { className: cx("n-flex n-flex-col", className), style: toolbarStyle }, /* @__PURE__ */ React83.createElement(
15351
+ return /* @__PURE__ */ React85.createElement("div", { className: cx("n-flex n-flex-col", className), style: toolbarStyle }, /* @__PURE__ */ React85.createElement(
15094
15352
  "div",
15095
15353
  {
15096
15354
  className: cx(
@@ -15103,7 +15361,7 @@ function BaseToolbarContainer({
15103
15361
  }
15104
15362
  },
15105
15363
  children
15106
- ), showDivider && /* @__PURE__ */ React83.createElement(Divider, { variant: "strong" }));
15364
+ ), showDivider && /* @__PURE__ */ React85.createElement(Divider, { variant: "strong" }));
15107
15365
  }
15108
15366
  function BaseToolbar({
15109
15367
  children,
@@ -15115,7 +15373,7 @@ function BaseToolbar({
15115
15373
  innerClassName,
15116
15374
  enableAbsoluteBreakpoint = true
15117
15375
  }) {
15118
- return /* @__PURE__ */ React83.createElement(
15376
+ return /* @__PURE__ */ React85.createElement(
15119
15377
  BaseToolbarContainer,
15120
15378
  {
15121
15379
  showDivider,
@@ -15123,25 +15381,25 @@ function BaseToolbar({
15123
15381
  innerClassName,
15124
15382
  enableAbsoluteBreakpoint
15125
15383
  },
15126
- logo && /* @__PURE__ */ React83.createElement(React83.Fragment, null, logo, /* @__PURE__ */ React83.createElement(DividerVertical, null)),
15127
- /* @__PURE__ */ React83.createElement(Spacer.Horizontal, { size: 10 }),
15128
- left && /* @__PURE__ */ React83.createElement(React83.Fragment, null, /* @__PURE__ */ React83.createElement("div", { className: "n-flex n-gap-toolbar-separator" }, left), /* @__PURE__ */ React83.createElement(Spacer.Horizontal, { size: 10 })),
15129
- children && /* @__PURE__ */ React83.createElement(
15384
+ logo && /* @__PURE__ */ React85.createElement(React85.Fragment, null, logo, /* @__PURE__ */ React85.createElement(DividerVertical, null)),
15385
+ /* @__PURE__ */ React85.createElement(Spacer.Horizontal, { size: 10 }),
15386
+ left && /* @__PURE__ */ React85.createElement(React85.Fragment, null, /* @__PURE__ */ React85.createElement("div", { className: "n-flex n-gap-toolbar-separator" }, left), /* @__PURE__ */ React85.createElement(Spacer.Horizontal, { size: 10 })),
15387
+ children && /* @__PURE__ */ React85.createElement(
15130
15388
  "div",
15131
15389
  {
15132
- className: "n-flex n-items-center n-justify-center n-text-text-muted n-pointer-events-none @2xl/toolbar:n-absolute n-inset-0"
15390
+ className: "n-flex n-items-center n-justify-center n-text-text-muted n-pointer-events-none @xl/toolbar:!n-absolute n-inset-0"
15133
15391
  },
15134
- /* @__PURE__ */ React83.createElement("div", { className: "n-flex n-items-center n-justify-center n-pointer-events-auto" }, children)
15392
+ /* @__PURE__ */ React85.createElement("div", { className: "n-flex n-items-center n-justify-center n-pointer-events-auto" }, children)
15135
15393
  ),
15136
- /* @__PURE__ */ React83.createElement(Spacer.Horizontal, null),
15137
- /* @__PURE__ */ React83.createElement(Spacer.Horizontal, { size: 10 }),
15138
- /* @__PURE__ */ React83.createElement("div", { className: "n-flex n-gap-toolbar-separator" }, right),
15139
- /* @__PURE__ */ React83.createElement(Spacer.Horizontal, { size: 10 })
15394
+ /* @__PURE__ */ React85.createElement(Spacer.Horizontal, null),
15395
+ /* @__PURE__ */ React85.createElement(Spacer.Horizontal, { size: 10 }),
15396
+ /* @__PURE__ */ React85.createElement("div", { className: "n-flex n-gap-toolbar-separator" }, right),
15397
+ /* @__PURE__ */ React85.createElement(Spacer.Horizontal, { size: 10 })
15140
15398
  );
15141
15399
  }
15142
15400
 
15143
15401
  // src/components/StackNavigator.tsx
15144
- var StackRenderContext = React84.createContext({});
15402
+ var StackRenderContext = React86.createContext({});
15145
15403
  function StackNavigator({
15146
15404
  items,
15147
15405
  onBack,
@@ -15156,14 +15414,14 @@ function StackNavigator({
15156
15414
  }) {
15157
15415
  const top = items.at(-1);
15158
15416
  const previousLengthRef = useRef25(items.length);
15159
- const direction = useMemo33(() => {
15417
+ const direction = useMemo34(() => {
15160
15418
  const previous = previousLengthRef.current;
15161
15419
  previousLengthRef.current = items.length;
15162
15420
  return items.length >= previous ? "forward" : "back";
15163
15421
  }, [items.length]);
15164
- const [cardSizes, setCardSizes] = useState30({});
15165
- const [containerSize, setContainerSize] = useState30();
15166
- const handleSizeChange = useCallback31((key, size) => {
15422
+ const [cardSizes, setCardSizes] = useState31({});
15423
+ const [containerSize, setContainerSize] = useState31();
15424
+ const handleSizeChange = useCallback32((key, size) => {
15167
15425
  setCardSizes((prev) => {
15168
15426
  if (isDeepEqual4(prev[key], size)) {
15169
15427
  return prev;
@@ -15203,7 +15461,7 @@ function StackNavigator({
15203
15461
  return changed ? next : prev;
15204
15462
  });
15205
15463
  }, [items]);
15206
- const animationStyles = useMemo33(() => {
15464
+ const animationStyles = useMemo34(() => {
15207
15465
  return {
15208
15466
  entering: {
15209
15467
  opacity: 0,
@@ -15223,7 +15481,7 @@ function StackNavigator({
15223
15481
  };
15224
15482
  }, [direction]);
15225
15483
  const shouldAnimateSize = containerSize !== void 0;
15226
- const contentStyle = useMemo33(() => {
15484
+ const contentStyle = useMemo34(() => {
15227
15485
  if (!containerSize) return void 0;
15228
15486
  const style3 = {
15229
15487
  // width: containerSize.width,
@@ -15236,8 +15494,8 @@ function StackNavigator({
15236
15494
  }
15237
15495
  return style3;
15238
15496
  }, [containerSize, shouldAnimateSize]);
15239
- const [animationStates, setAnimationStates] = useState30({});
15240
- const [renderContentCache, setRenderContentCache] = useState30(
15497
+ const [animationStates, setAnimationStates] = useState31({});
15498
+ const [renderContentCache, setRenderContentCache] = useState31(
15241
15499
  () => Object.fromEntries(items.map((item) => [item.key, item.renderContent]))
15242
15500
  );
15243
15501
  useEffect22(() => {
@@ -15258,7 +15516,7 @@ function StackNavigator({
15258
15516
  return changed ? next : prev;
15259
15517
  });
15260
15518
  }, [animationStates, items]);
15261
- const handleChildStateChange = useCallback31(
15519
+ const handleChildStateChange = useCallback32(
15262
15520
  (key, state) => {
15263
15521
  if (!key) return;
15264
15522
  setAnimationStates((prev) => {
@@ -15301,7 +15559,7 @@ function StackNavigator({
15301
15559
  }
15302
15560
  return defaultRenderHeader(headerProps);
15303
15561
  };
15304
- return /* @__PURE__ */ React84.createElement(
15562
+ return /* @__PURE__ */ React86.createElement(
15305
15563
  "div",
15306
15564
  {
15307
15565
  className: cx("n-flex n-flex-col", className),
@@ -15317,13 +15575,13 @@ function StackNavigator({
15317
15575
  }
15318
15576
  },
15319
15577
  showHeader && renderHeaderContent(),
15320
- /* @__PURE__ */ React84.createElement(
15578
+ /* @__PURE__ */ React86.createElement(
15321
15579
  "div",
15322
15580
  {
15323
15581
  className: cx("n-relative n-overflow-hidden", contentClassName),
15324
15582
  style: contentStyle
15325
15583
  },
15326
- /* @__PURE__ */ React84.createElement(StackRenderContext.Provider, { value: renderContentCache }, /* @__PURE__ */ React84.createElement(
15584
+ /* @__PURE__ */ React86.createElement(StackRenderContext.Provider, { value: renderContentCache }, /* @__PURE__ */ React86.createElement(
15327
15585
  AnimatePresence,
15328
15586
  {
15329
15587
  duration: 200,
@@ -15332,7 +15590,7 @@ function StackNavigator({
15332
15590
  mode: "wait",
15333
15591
  onChildStateChange: handleChildStateChange
15334
15592
  },
15335
- /* @__PURE__ */ React84.createElement(
15593
+ /* @__PURE__ */ React86.createElement(
15336
15594
  StackNavigatorCard,
15337
15595
  {
15338
15596
  key: top.key,
@@ -15352,15 +15610,15 @@ var StackNavigatorCard = ({
15352
15610
  style: style2,
15353
15611
  className
15354
15612
  }) => {
15355
- const ref = React84.useRef(null);
15613
+ const ref = React86.useRef(null);
15356
15614
  const size = useSize(ref);
15357
- const renderContext = React84.useContext(StackRenderContext);
15615
+ const renderContext = React86.useContext(StackRenderContext);
15358
15616
  const renderContent = renderContext?.[item.key] ?? item.renderContent;
15359
- React84.useEffect(() => {
15617
+ React86.useEffect(() => {
15360
15618
  if (!size || size.width === 0 || size.height === 0) return;
15361
15619
  onSizeChange(item.key, size);
15362
15620
  }, [item.key, onSizeChange, size]);
15363
- return /* @__PURE__ */ React84.createElement("div", { ref, className: cx("n-flex n-flex-col", className), style: style2 }, renderContent?.());
15621
+ return /* @__PURE__ */ React86.createElement("div", { ref, className: cx("n-flex n-flex-col", className), style: style2 }, renderContent?.());
15364
15622
  };
15365
15623
  function defaultRenderHeader({
15366
15624
  showDivider,
@@ -15369,13 +15627,13 @@ function defaultRenderHeader({
15369
15627
  right,
15370
15628
  title
15371
15629
  }) {
15372
- return /* @__PURE__ */ React84.createElement(
15630
+ return /* @__PURE__ */ React86.createElement(
15373
15631
  BaseToolbar,
15374
15632
  {
15375
15633
  innerClassName: "n-px-1",
15376
15634
  showDivider,
15377
15635
  enableAbsoluteBreakpoint: false,
15378
- left: showBackButton && /* @__PURE__ */ React84.createElement(
15636
+ left: showBackButton && /* @__PURE__ */ React86.createElement(
15379
15637
  Button,
15380
15638
  {
15381
15639
  className: "-n-mx-2",
@@ -15386,7 +15644,7 @@ function defaultRenderHeader({
15386
15644
  ),
15387
15645
  right
15388
15646
  },
15389
- typeof title === "string" || typeof title === "number" ? /* @__PURE__ */ React84.createElement(Body, null, title) : title
15647
+ typeof title === "string" || typeof title === "number" ? /* @__PURE__ */ React86.createElement(Body, null, title) : title
15390
15648
  );
15391
15649
  }
15392
15650
 
@@ -15398,16 +15656,16 @@ var NavigatorScreen = Object.assign(
15398
15656
  [navigatorScreenIdentifier]: true
15399
15657
  }
15400
15658
  );
15401
- var NavigatorScreenContext = React85.createContext(null);
15659
+ var NavigatorScreenContext = React87.createContext(null);
15402
15660
  function useNavigator() {
15403
- const context = React85.useContext(NavigatorScreenContext);
15661
+ const context = React87.useContext(NavigatorScreenContext);
15404
15662
  if (!context) {
15405
15663
  throw new Error("useNavigator must be used within a Navigator screen");
15406
15664
  }
15407
15665
  return context.navigation;
15408
15666
  }
15409
15667
  function useNavigatorRoute() {
15410
- const context = React85.useContext(NavigatorScreenContext);
15668
+ const context = React87.useContext(NavigatorScreenContext);
15411
15669
  if (!context) {
15412
15670
  throw new Error("useNavigatorRoute must be used within a Navigator screen");
15413
15671
  }
@@ -15435,7 +15693,7 @@ function NavigatorImpl({
15435
15693
  showHeader,
15436
15694
  renderHeader
15437
15695
  }) {
15438
- const screens = useMemo34(() => {
15696
+ const screens = useMemo35(() => {
15439
15697
  const configs = [];
15440
15698
  Children4.forEach(children, (child) => {
15441
15699
  if (!isNavigatorScreenElement(child)) return;
@@ -15443,7 +15701,7 @@ function NavigatorImpl({
15443
15701
  });
15444
15702
  return configs;
15445
15703
  }, [children]);
15446
- const screenMap = useMemo34(() => {
15704
+ const screenMap = useMemo35(() => {
15447
15705
  const map = /* @__PURE__ */ new Map();
15448
15706
  for (const screen of screens) {
15449
15707
  if (map.has(screen.name)) {
@@ -15456,7 +15714,7 @@ function NavigatorImpl({
15456
15714
  return map;
15457
15715
  }, [screens]);
15458
15716
  const keyRef = useRef26(0);
15459
- const createEntry = useCallback32(
15717
+ const createEntry = useCallback33(
15460
15718
  (name, params) => ({
15461
15719
  key: `${String(name)}-${keyRef.current++}`,
15462
15720
  name,
@@ -15470,13 +15728,13 @@ function NavigatorImpl({
15470
15728
  `Navigator: initial route "${String(initialScreenName)}" is not registered as a screen.`
15471
15729
  );
15472
15730
  }
15473
- const [stack, setStack] = useState31(() => [
15731
+ const [stack, setStack] = useState32(() => [
15474
15732
  createEntry(
15475
15733
  initialScreenName,
15476
15734
  initialRoute.params
15477
15735
  )
15478
15736
  ]);
15479
- const push = useCallback32(
15737
+ const push = useCallback33(
15480
15738
  (...args) => {
15481
15739
  const [name, params] = args;
15482
15740
  const screen = screenMap.get(name);
@@ -15490,7 +15748,7 @@ function NavigatorImpl({
15490
15748
  },
15491
15749
  [createEntry, screenMap]
15492
15750
  );
15493
- const pop = useCallback32(() => {
15751
+ const pop = useCallback33(() => {
15494
15752
  setStack((prev) => {
15495
15753
  if (prev.length <= 1) return prev;
15496
15754
  const nextStack = prev.slice(0, -1);
@@ -15506,7 +15764,7 @@ function NavigatorImpl({
15506
15764
  return updatedStack;
15507
15765
  });
15508
15766
  }, [createEntry]);
15509
- const replace = useCallback32(
15767
+ const replace = useCallback33(
15510
15768
  (targetKey, name, params) => {
15511
15769
  const screen = screenMap.get(name);
15512
15770
  if (!screen) {
@@ -15532,7 +15790,7 @@ function NavigatorImpl({
15532
15790
  },
15533
15791
  [createEntry, screenMap]
15534
15792
  );
15535
- const items = useMemo34(() => {
15793
+ const items = useMemo35(() => {
15536
15794
  return stack.flatMap((entry) => {
15537
15795
  const screen = screenMap.get(entry.name);
15538
15796
  if (!screen) return [];
@@ -15570,7 +15828,7 @@ function NavigatorImpl({
15570
15828
  onBack: headerProps.onBack
15571
15829
  }),
15572
15830
  renderContent: () => {
15573
- return /* @__PURE__ */ React85.createElement(NavigatorScreenContext.Provider, { value: context }, evaluateOption(screen.children, context));
15831
+ return /* @__PURE__ */ React87.createElement(NavigatorScreenContext.Provider, { value: context }, evaluateOption(screen.children, context));
15574
15832
  }
15575
15833
  };
15576
15834
  });
@@ -15578,7 +15836,7 @@ function NavigatorImpl({
15578
15836
  const shouldShowHeader = evaluateOption(showHeader, {
15579
15837
  stack
15580
15838
  });
15581
- return /* @__PURE__ */ React85.createElement(
15839
+ return /* @__PURE__ */ React87.createElement(
15582
15840
  StackNavigator,
15583
15841
  {
15584
15842
  items,
@@ -15618,7 +15876,7 @@ function ListNavigator({
15618
15876
  renderHeader,
15619
15877
  selectedIds
15620
15878
  }) {
15621
- return /* @__PURE__ */ React86.createElement(
15879
+ return /* @__PURE__ */ React88.createElement(
15622
15880
  ListNavigatorInternal,
15623
15881
  {
15624
15882
  initialRoute: { name: "screen", params: { id: void 0 } },
@@ -15636,7 +15894,7 @@ function ListNavigator({
15636
15894
  className,
15637
15895
  style: style2
15638
15896
  },
15639
- /* @__PURE__ */ React86.createElement(
15897
+ /* @__PURE__ */ React88.createElement(
15640
15898
  ListNavigatorInternal.Screen,
15641
15899
  {
15642
15900
  name: "screen",
@@ -15651,7 +15909,7 @@ function ListNavigator({
15651
15909
  const nestedItem = items.find(
15652
15910
  (item) => isSubMenuItem(item) && item.id === route.params.id
15653
15911
  );
15654
- return /* @__PURE__ */ React86.createElement(
15912
+ return /* @__PURE__ */ React88.createElement(
15655
15913
  ListMenu,
15656
15914
  {
15657
15915
  items: nestedItem?.items ?? items,
@@ -15676,18 +15934,19 @@ function ListNavigator({
15676
15934
 
15677
15935
  // src/components/Message.tsx
15678
15936
  import { uuid as uuid2 } from "@noya-app/noya-utils";
15679
- import React87, { forwardRef as forwardRef26, memo as memo30, useMemo as useMemo35 } from "react";
15680
- var Message = memo30(
15937
+ import React89, { forwardRef as forwardRef26, memo as memo29, useMemo as useMemo36 } from "react";
15938
+ var Message = memo29(
15681
15939
  forwardRef26(function Message2({ role, children, user, avatarSize = INPUT_HEIGHT }, ref) {
15682
15940
  const randomId = uuid2();
15683
- const userMessageBackgroundColor = colorFromString(user?.id ?? randomId);
15684
- const styles3 = useMemo35(
15941
+ const resolvedUserId = user?.userId ?? user?.connectionId ?? randomId;
15942
+ const userMessageBackgroundColor = colorFromString(resolvedUserId);
15943
+ const styles3 = useMemo36(
15685
15944
  () => role === "user" ? {
15686
15945
  backgroundColor: userMessageBackgroundColor
15687
15946
  } : void 0,
15688
15947
  [userMessageBackgroundColor, role]
15689
15948
  );
15690
- return /* @__PURE__ */ React87.createElement(
15949
+ return /* @__PURE__ */ React89.createElement(
15691
15950
  "div",
15692
15951
  {
15693
15952
  className: cx(
@@ -15695,24 +15954,24 @@ var Message = memo30(
15695
15954
  role === "user" ? "n-flex-row-reverse" : "n-flex-row"
15696
15955
  )
15697
15956
  },
15698
- role === "assistant" ? /* @__PURE__ */ React87.createElement(
15957
+ role === "assistant" ? /* @__PURE__ */ React89.createElement(
15699
15958
  Avatar,
15700
15959
  {
15701
15960
  name: "Assistant",
15702
15961
  size: avatarSize,
15703
15962
  backgroundColor: cssVars.colors.primaryPastel
15704
15963
  },
15705
- /* @__PURE__ */ React87.createElement(Logo, { style: { width: 15 }, fill: cssVars.colors.primary })
15706
- ) : /* @__PURE__ */ React87.createElement(
15964
+ /* @__PURE__ */ React89.createElement(Logo, { style: { width: 15 }, fill: cssVars.colors.primary })
15965
+ ) : /* @__PURE__ */ React89.createElement(
15707
15966
  Avatar,
15708
15967
  {
15709
- userId: !user ? randomId : user?.id,
15968
+ userId: resolvedUserId,
15710
15969
  name: user?.name ?? "Anonymous",
15711
15970
  image: user?.image,
15712
15971
  size: avatarSize
15713
15972
  }
15714
15973
  ),
15715
- /* @__PURE__ */ React87.createElement(
15974
+ /* @__PURE__ */ React89.createElement(
15716
15975
  "div",
15717
15976
  {
15718
15977
  className: cx(
@@ -15732,9 +15991,9 @@ var Message = memo30(
15732
15991
 
15733
15992
  // src/components/pipeline/PipelineResultLayout.tsx
15734
15993
  import { Link1Icon } from "@noya-app/noya-icons";
15735
- import React88 from "react";
15994
+ import React90 from "react";
15736
15995
  var PipelineResultLink = ({ url }) => {
15737
- return /* @__PURE__ */ React88.createElement("div", { className: "n-flex n-flex-col gap-0.5" }, /* @__PURE__ */ React88.createElement(
15996
+ return /* @__PURE__ */ React90.createElement("div", { className: "n-flex n-flex-col gap-0.5" }, /* @__PURE__ */ React90.createElement(
15738
15997
  "a",
15739
15998
  {
15740
15999
  href: url,
@@ -15742,15 +16001,15 @@ var PipelineResultLink = ({ url }) => {
15742
16001
  rel: "noopener noreferrer",
15743
16002
  className: "n-flex n-text-primary hover:n-opacity-80 n-border n-border-divider n-rounded-md"
15744
16003
  },
15745
- /* @__PURE__ */ React88.createElement("div", { className: "n-flex n-gap-1 n-items-center n-p-2" }, /* @__PURE__ */ React88.createElement(Link1Icon, { className: "n-w-[15px] n-h-[15px] n-flex-shrink-0" })),
15746
- /* @__PURE__ */ React88.createElement(DividerVertical, null),
15747
- /* @__PURE__ */ React88.createElement(Small, { className: "n-truncate n-p-2 n-flex-1" }, url)
16004
+ /* @__PURE__ */ React90.createElement("div", { className: "n-flex n-gap-1 n-items-center n-p-2" }, /* @__PURE__ */ React90.createElement(Link1Icon, { className: "n-w-[15px] n-h-[15px] n-flex-shrink-0" })),
16005
+ /* @__PURE__ */ React90.createElement(DividerVertical, null),
16006
+ /* @__PURE__ */ React90.createElement(Small, { className: "n-truncate n-p-2 n-flex-1" }, url)
15748
16007
  ));
15749
16008
  };
15750
16009
  var PipelineResultLayout = ({
15751
16010
  children
15752
16011
  }) => {
15753
- return /* @__PURE__ */ React88.createElement("div", { className: "n-flex n-flex-col n-gap-2" }, children);
16012
+ return /* @__PURE__ */ React90.createElement("div", { className: "n-flex n-flex-col n-gap-2" }, children);
15754
16013
  };
15755
16014
  function getPipelineResultLink(value) {
15756
16015
  if (typeof value !== "object" || value === null) return void 0;
@@ -15764,7 +16023,7 @@ function getPipelineResultLink(value) {
15764
16023
  }
15765
16024
 
15766
16025
  // src/components/ResizableContainer.tsx
15767
- import React89, { useCallback as useCallback33, useRef as useRef27, useState as useState32 } from "react";
16026
+ import React91, { useCallback as useCallback34, useRef as useRef27, useState as useState33 } from "react";
15768
16027
  var ResizableContainer = ({
15769
16028
  children,
15770
16029
  minWidth,
@@ -15781,9 +16040,9 @@ var ResizableContainer = ({
15781
16040
  const resizeableRef = useRef27(null);
15782
16041
  const handleRef = useRef27(null);
15783
16042
  const clickCounter = useRef27(createClickCounter({ delay: 250 }));
15784
- const [width, setWidth] = useState32();
15785
- const [drag, setDrag] = useState32();
15786
- const handlePointerDown = useCallback33(
16043
+ const [width, setWidth] = useState33();
16044
+ const [drag, setDrag] = useState33();
16045
+ const handlePointerDown = useCallback34(
15787
16046
  (event) => {
15788
16047
  const containerWidth = containerRef.current?.getBoundingClientRect().width;
15789
16048
  const resizeableWidth = resizeableRef.current?.getBoundingClientRect().width;
@@ -15801,7 +16060,7 @@ var ResizableContainer = ({
15801
16060
  },
15802
16061
  [maxWidth, minWidth]
15803
16062
  );
15804
- const handlePointerMove = useCallback33(
16063
+ const handlePointerMove = useCallback34(
15805
16064
  (event) => {
15806
16065
  if (!drag) return;
15807
16066
  const delta = event.clientX - drag.startX;
@@ -15817,7 +16076,7 @@ var ResizableContainer = ({
15817
16076
  },
15818
16077
  [drag, onChangeWidth]
15819
16078
  );
15820
- const handlePointerUp = useCallback33(
16079
+ const handlePointerUp = useCallback34(
15821
16080
  (event) => {
15822
16081
  setDrag(void 0);
15823
16082
  handleRef.current?.releasePointerCapture(event.pointerId);
@@ -15833,7 +16092,7 @@ var ResizableContainer = ({
15833
16092
  },
15834
16093
  [shouldResetWidth]
15835
16094
  );
15836
- return /* @__PURE__ */ React89.createElement(
16095
+ return /* @__PURE__ */ React91.createElement(
15837
16096
  "div",
15838
16097
  {
15839
16098
  ref: containerRef,
@@ -15841,7 +16100,7 @@ var ResizableContainer = ({
15841
16100
  style: { position: "relative", ...style2 },
15842
16101
  className
15843
16102
  },
15844
- /* @__PURE__ */ React89.createElement(
16103
+ /* @__PURE__ */ React91.createElement(
15845
16104
  "div",
15846
16105
  {
15847
16106
  ref: resizeableRef,
@@ -15852,7 +16111,7 @@ var ResizableContainer = ({
15852
16111
  }
15853
16112
  },
15854
16113
  typeof children === "function" ? children({ width }) : children,
15855
- /* @__PURE__ */ React89.createElement(
16114
+ /* @__PURE__ */ React91.createElement(
15856
16115
  "div",
15857
16116
  {
15858
16117
  ref: handleRef,
@@ -15877,7 +16136,7 @@ var ResizableContainer = ({
15877
16136
  onPointerUp: handlePointerUp,
15878
16137
  onPointerCancel: handlePointerUp
15879
16138
  },
15880
- /* @__PURE__ */ React89.createElement(
16139
+ /* @__PURE__ */ React91.createElement(
15881
16140
  "div",
15882
16141
  {
15883
16142
  style: {
@@ -15895,7 +16154,7 @@ var ResizableContainer = ({
15895
16154
  }
15896
16155
  )
15897
16156
  ),
15898
- drag && /* @__PURE__ */ React89.createElement(
16157
+ drag && /* @__PURE__ */ React91.createElement(
15899
16158
  "div",
15900
16159
  {
15901
16160
  style: {
@@ -15918,7 +16177,7 @@ function clamp5(value, min, max) {
15918
16177
 
15919
16178
  // src/components/RingProgress.tsx
15920
16179
  import { clamp as clamp6 } from "@noya-app/noya-utils";
15921
- import * as React90 from "react";
16180
+ import * as React92 from "react";
15922
16181
  function RingProgress({
15923
16182
  value,
15924
16183
  dividedBy = 100,
@@ -15934,14 +16193,14 @@ function RingProgress({
15934
16193
  const safeDivisor = dividedBy > 0 ? dividedBy : 1;
15935
16194
  const clampedRaw = clamp6(value, 0, safeDivisor);
15936
16195
  const clampedPercent = clampedRaw / safeDivisor * 100;
15937
- const radius = React90.useMemo(() => (size - thickness) / 2, [size, thickness]);
15938
- const circumference = React90.useMemo(() => 2 * Math.PI * radius, [radius]);
15939
- const dashOffset = React90.useMemo(
16196
+ const radius = React92.useMemo(() => (size - thickness) / 2, [size, thickness]);
16197
+ const circumference = React92.useMemo(() => 2 * Math.PI * radius, [radius]);
16198
+ const dashOffset = React92.useMemo(
15940
16199
  () => (100 - clampedPercent) / 100 * circumference,
15941
16200
  [circumference, clampedPercent]
15942
16201
  );
15943
16202
  const trackStroke = trackColor ?? "var(--n-input-background, rgba(0,0,0,0.08))";
15944
- const colorClass = React90.useMemo(() => {
16203
+ const colorClass = React92.useMemo(() => {
15945
16204
  switch (colorScheme) {
15946
16205
  case "primary":
15947
16206
  return "n-stroke-primary";
@@ -15954,7 +16213,7 @@ function RingProgress({
15954
16213
  return "n-stroke-text";
15955
16214
  }
15956
16215
  }, [colorScheme]);
15957
- const computedStroke = React90.useMemo(() => {
16216
+ const computedStroke = React92.useMemo(() => {
15958
16217
  if (color) return color;
15959
16218
  switch (colorScheme) {
15960
16219
  case "primary":
@@ -15968,7 +16227,7 @@ function RingProgress({
15968
16227
  return "var(--n-text, currentColor)";
15969
16228
  }
15970
16229
  }, [color, colorScheme]);
15971
- return /* @__PURE__ */ React90.createElement(
16230
+ return /* @__PURE__ */ React92.createElement(
15972
16231
  "span",
15973
16232
  {
15974
16233
  className: cx("n-inline-flex n-items-center n-justify-center", className),
@@ -15979,7 +16238,7 @@ function RingProgress({
15979
16238
  "aria-valuemax": safeDivisor,
15980
16239
  "aria-label": ariaLabel
15981
16240
  },
15982
- /* @__PURE__ */ React90.createElement(
16241
+ /* @__PURE__ */ React92.createElement(
15983
16242
  "svg",
15984
16243
  {
15985
16244
  width: size,
@@ -15987,7 +16246,7 @@ function RingProgress({
15987
16246
  viewBox: `0 0 ${size} ${size}`,
15988
16247
  style: { display: "block" }
15989
16248
  },
15990
- /* @__PURE__ */ React90.createElement(
16249
+ /* @__PURE__ */ React92.createElement(
15991
16250
  "circle",
15992
16251
  {
15993
16252
  cx: size / 2,
@@ -15998,7 +16257,7 @@ function RingProgress({
15998
16257
  strokeWidth: thickness
15999
16258
  }
16000
16259
  ),
16001
- /* @__PURE__ */ React90.createElement(
16260
+ /* @__PURE__ */ React92.createElement(
16002
16261
  "circle",
16003
16262
  {
16004
16263
  cx: size / 2,
@@ -16022,49 +16281,13 @@ function RingProgress({
16022
16281
  }
16023
16282
 
16024
16283
  // src/components/ScrollableSidebar.tsx
16025
- import React91 from "react";
16284
+ import React93 from "react";
16026
16285
  function ScrollableSidebar({ children }) {
16027
- return /* @__PURE__ */ React91.createElement("div", { className: "n-relative n-flex n-flex-col n-flex-1 n-max-h-full" }, /* @__PURE__ */ React91.createElement(ScrollArea, null, children));
16028
- }
16029
-
16030
- // src/components/ScrollArea2.tsx
16031
- import { ScrollArea as ScrollArea3 } from "@base-ui-components/react/scroll-area";
16032
- import * as React92 from "react";
16033
- var SCROLLBAR_STATE_CLASSES = "scroll-component n-opacity-0 n-transition-opacity n-delay-300 n-pointer-events-none data-[hovering]:n-opacity-100 data-[hovering]:n-delay-0 data-[hovering]:n-duration-75 data-[hovering]:n-pointer-events-auto data-[scrolling]:n-opacity-100 data-[scrolling]:n-delay-0 data-[scrolling]:n-duration-75 data-[scrolling]:n-pointer-events-auto";
16034
- var SCROLLBAR_TRACK_VERTICAL = "n-m-1 n-w-1 flex n-justify-center n-rounded-md n-bg-divider-subtle";
16035
- var SCROLLBAR_TRACK_HORIZONTAL = "n-m-1 n-h-1 flex n-justify-center n-rounded-md n-bg-divider-subtle";
16036
- var SCROLLBAR_THUMB_VERTICAL = "scroll-component n-w-full n-rounded n-bg-scrollbar";
16037
- var SCROLLBAR_THUMB_HORIZONTAL = "scroll-component n-h-full n-rounded n-bg-scrollbar";
16038
- function ScrollArea22({
16039
- children,
16040
- className,
16041
- viewportClassName,
16042
- orientation = "vertical"
16043
- }) {
16044
- return /* @__PURE__ */ React92.createElement(ScrollArea3.Root, { className: cx("n-relative", className) }, /* @__PURE__ */ React92.createElement(
16045
- ScrollArea3.Viewport,
16046
- {
16047
- className: cx("n-h-full n-overscroll-contain", viewportClassName)
16048
- },
16049
- children
16050
- ), (orientation === "vertical" || orientation === "both") && /* @__PURE__ */ React92.createElement(
16051
- ScrollArea3.Scrollbar,
16052
- {
16053
- className: cx(SCROLLBAR_STATE_CLASSES, SCROLLBAR_TRACK_VERTICAL)
16054
- },
16055
- /* @__PURE__ */ React92.createElement(ScrollArea3.Thumb, { className: SCROLLBAR_THUMB_VERTICAL })
16056
- ), (orientation === "horizontal" || orientation === "both") && /* @__PURE__ */ React92.createElement(
16057
- ScrollArea3.Scrollbar,
16058
- {
16059
- orientation: "horizontal",
16060
- className: cx(SCROLLBAR_STATE_CLASSES, SCROLLBAR_TRACK_HORIZONTAL)
16061
- },
16062
- /* @__PURE__ */ React92.createElement(ScrollArea3.Thumb, { className: SCROLLBAR_THUMB_HORIZONTAL })
16063
- ), orientation === "both" && /* @__PURE__ */ React92.createElement(ScrollArea3.Corner, null));
16286
+ return /* @__PURE__ */ React93.createElement("div", { className: "n-relative n-flex n-flex-col n-flex-1 n-max-h-full" }, /* @__PURE__ */ React93.createElement(ScrollArea, null, children));
16064
16287
  }
16065
16288
 
16066
16289
  // src/components/Section.tsx
16067
- import React93, { memo as memo31, useMemo as useMemo37 } from "react";
16290
+ import React94, { memo as memo30, useMemo as useMemo38 } from "react";
16068
16291
  var titleIconStyle = {
16069
16292
  marginRight: "6px",
16070
16293
  alignSelf: "flex-start",
@@ -16085,14 +16308,14 @@ function SectionHeader({
16085
16308
  titleClassName,
16086
16309
  onClickTitle
16087
16310
  }) {
16088
- const headerStyle = useMemo37(
16311
+ const headerStyle = useMemo38(
16089
16312
  () => ({
16090
16313
  minHeight: INPUT_HEIGHT,
16091
16314
  ...style2
16092
16315
  }),
16093
16316
  [style2]
16094
16317
  );
16095
- const titleElement = title ? /* @__PURE__ */ React93.createElement(
16318
+ const titleElement = title ? /* @__PURE__ */ React94.createElement(
16096
16319
  InspectorPrimitives_exports.Title,
16097
16320
  {
16098
16321
  $textStyle: titleTextStyle,
@@ -16100,16 +16323,16 @@ function SectionHeader({
16100
16323
  },
16101
16324
  title
16102
16325
  ) : null;
16103
- return /* @__PURE__ */ React93.createElement(
16326
+ return /* @__PURE__ */ React94.createElement(
16104
16327
  InspectorPrimitives_exports.SectionHeader,
16105
16328
  {
16106
16329
  style: headerStyle,
16107
16330
  className
16108
16331
  },
16109
- titleIcon && /* @__PURE__ */ React93.createElement("div", { style: titleIconStyle, className: textStyles[titleTextStyle] }, "\u200B", renderIcon(titleIcon)),
16110
- titleElement && /* @__PURE__ */ React93.createElement(React93.Fragment, null, onClickTitle ? /* @__PURE__ */ React93.createElement(Button, { variant: "none", onClick: onClickTitle }, titleElement) : titleElement),
16111
- headerSeparator === "space" && /* @__PURE__ */ React93.createElement(Spacer.Horizontal, null),
16112
- headerSeparator === "dot" && /* @__PURE__ */ React93.createElement(
16332
+ titleIcon && /* @__PURE__ */ React94.createElement("div", { style: titleIconStyle, className: textStyles[titleTextStyle] }, "\u200B", renderIcon(titleIcon)),
16333
+ titleElement && /* @__PURE__ */ React94.createElement(React94.Fragment, null, onClickTitle ? /* @__PURE__ */ React94.createElement(Button, { variant: "none", onClick: onClickTitle }, titleElement) : titleElement),
16334
+ headerSeparator === "space" && /* @__PURE__ */ React94.createElement(Spacer.Horizontal, null),
16335
+ headerSeparator === "dot" && /* @__PURE__ */ React94.createElement(
16113
16336
  Text,
16114
16337
  {
16115
16338
  variant: titleTextStyle,
@@ -16135,7 +16358,7 @@ var SectionInternal = ({
16135
16358
  titleClassName,
16136
16359
  headerStyle: headerStyleProp
16137
16360
  }) => {
16138
- const style2 = useMemo37(
16361
+ const style2 = useMemo38(
16139
16362
  () => ({
16140
16363
  display: "flex",
16141
16364
  flexDirection: "column",
@@ -16146,15 +16369,15 @@ var SectionInternal = ({
16146
16369
  }),
16147
16370
  [titleTextStyle, title, extraPadding, styleProp]
16148
16371
  );
16149
- const hasChildren = React93.Children.toArray(children).some((child) => !!child);
16150
- const headerStyle = useMemo37(
16372
+ const hasChildren = React94.Children.toArray(children).some((child) => !!child);
16373
+ const headerStyle = useMemo38(
16151
16374
  () => ({
16152
16375
  marginBottom: hasChildren ? "4px" : void 0,
16153
16376
  ...headerStyleProp
16154
16377
  }),
16155
16378
  [hasChildren, headerStyleProp]
16156
16379
  );
16157
- return /* @__PURE__ */ React93.createElement("div", { style: style2, className }, (title || titleIcon || right) && /* @__PURE__ */ React93.createElement(
16380
+ return /* @__PURE__ */ React94.createElement("div", { style: style2, className }, (title || titleIcon || right) && /* @__PURE__ */ React94.createElement(
16158
16381
  SectionHeader,
16159
16382
  {
16160
16383
  style: headerStyle,
@@ -16166,7 +16389,7 @@ var SectionInternal = ({
16166
16389
  right,
16167
16390
  headerSeparator
16168
16391
  }
16169
- ), /* @__PURE__ */ React93.createElement(IndentContext.Provider, { value: 0 }, children));
16392
+ ), /* @__PURE__ */ React94.createElement(IndentContext.Provider, { value: 0 }, children));
16170
16393
  };
16171
16394
  var ExpandableSection = ({
16172
16395
  storageKey,
@@ -16179,12 +16402,12 @@ var ExpandableSection = ({
16179
16402
  initialVisibility
16180
16403
  );
16181
16404
  const expanded = visibility === "show";
16182
- return /* @__PURE__ */ React93.createElement(
16405
+ return /* @__PURE__ */ React94.createElement(
16183
16406
  SectionInternal,
16184
16407
  {
16185
16408
  ...props,
16186
16409
  right: !props.hideRightWhenCollapsed || expanded ? props.right : null,
16187
- title: /* @__PURE__ */ React93.createElement("div", { className: "n-flex n-gap-1 n-items-center" }, props.title, /* @__PURE__ */ React93.createElement(
16410
+ title: /* @__PURE__ */ React94.createElement("div", { className: "n-flex n-gap-1 n-items-center" }, props.title, /* @__PURE__ */ React94.createElement(
16188
16411
  IconButton,
16189
16412
  {
16190
16413
  iconName: expanded ? "ChevronDownIcon2" : "ChevronRightIcon2",
@@ -16195,21 +16418,21 @@ var ExpandableSection = ({
16195
16418
  expanded && props.children
16196
16419
  );
16197
16420
  };
16198
- var Section = memo31(function InspectorSection({
16421
+ var Section = memo30(function InspectorSection({
16199
16422
  storageKey,
16200
16423
  ...props
16201
16424
  }) {
16202
- return storageKey ? /* @__PURE__ */ React93.createElement(ExpandableSection, { ...props, storageKey }) : /* @__PURE__ */ React93.createElement(SectionInternal, { ...props });
16425
+ return storageKey ? /* @__PURE__ */ React94.createElement(ExpandableSection, { ...props, storageKey }) : /* @__PURE__ */ React94.createElement(SectionInternal, { ...props });
16203
16426
  });
16204
16427
 
16205
16428
  // src/components/SegmentedControl.tsx
16206
16429
  import { ToggleGroup as ToggleGroupPrimitive2 } from "radix-ui";
16207
- import React94, {
16430
+ import React95, {
16208
16431
  createContext as createContext13,
16209
16432
  forwardRef as forwardRef27,
16210
- useCallback as useCallback34,
16211
- useContext as useContext15,
16212
- useMemo as useMemo38
16433
+ useCallback as useCallback35,
16434
+ useContext as useContext14,
16435
+ useMemo as useMemo39
16213
16436
  } from "react";
16214
16437
  var SegmentedControlContext = createContext13({
16215
16438
  colorScheme: "primary"
@@ -16224,8 +16447,8 @@ var SegmentedControlItem = forwardRef27(function SegmentedControlItem2({
16224
16447
  variant = "default",
16225
16448
  ...props
16226
16449
  }, forwardedRef) {
16227
- const { colorScheme } = useContext15(SegmentedControlContext);
16228
- const itemElement = /* @__PURE__ */ React94.createElement(
16450
+ const { colorScheme } = useContext14(SegmentedControlContext);
16451
+ const itemElement = /* @__PURE__ */ React95.createElement(
16229
16452
  ToggleGroupPrimitive2.Item,
16230
16453
  {
16231
16454
  ref: forwardedRef,
@@ -16256,7 +16479,7 @@ var SegmentedControlItem = forwardRef27(function SegmentedControlItem2({
16256
16479
  ),
16257
16480
  ...props
16258
16481
  },
16259
- /* @__PURE__ */ React94.createElement(
16482
+ /* @__PURE__ */ React95.createElement(
16260
16483
  "span",
16261
16484
  {
16262
16485
  className: cx(
@@ -16268,7 +16491,7 @@ var SegmentedControlItem = forwardRef27(function SegmentedControlItem2({
16268
16491
  title
16269
16492
  )
16270
16493
  );
16271
- return tooltip ? /* @__PURE__ */ React94.createElement(Tooltip, { content: tooltip }, itemElement) : itemElement;
16494
+ return tooltip ? /* @__PURE__ */ React95.createElement(Tooltip, { content: tooltip }, itemElement) : itemElement;
16272
16495
  });
16273
16496
  var SegmentedControl = memoGeneric(function SegmentedControl2({
16274
16497
  id: idProp,
@@ -16281,16 +16504,16 @@ var SegmentedControl = memoGeneric(function SegmentedControl2({
16281
16504
  className,
16282
16505
  style: style2
16283
16506
  }) {
16284
- const contextValue = useMemo38(() => ({ colorScheme }), [colorScheme]);
16507
+ const contextValue = useMemo39(() => ({ colorScheme }), [colorScheme]);
16285
16508
  const { fieldId: id } = useLabel({ fieldId: idProp });
16286
- const handleValueChange = useCallback34(
16509
+ const handleValueChange = useCallback35(
16287
16510
  (value2) => {
16288
16511
  if (!allowEmpty && !value2) return;
16289
16512
  onValueChange?.(value2);
16290
16513
  },
16291
16514
  [allowEmpty, onValueChange]
16292
16515
  );
16293
- return /* @__PURE__ */ React94.createElement(SegmentedControlContext.Provider, { value: contextValue }, /* @__PURE__ */ React94.createElement(
16516
+ return /* @__PURE__ */ React95.createElement(SegmentedControlContext.Provider, { value: contextValue }, /* @__PURE__ */ React95.createElement(
16294
16517
  ToggleGroupPrimitive2.Root,
16295
16518
  {
16296
16519
  id,
@@ -16309,13 +16532,13 @@ var SegmentedControl = memoGeneric(function SegmentedControl2({
16309
16532
  gridTemplateColumns: `repeat(${items.length}, 1fr)`
16310
16533
  }
16311
16534
  },
16312
- items.map((item, index) => /* @__PURE__ */ React94.createElement(SegmentedControlItem, { key: index, ...item, variant }))
16535
+ items.map((item, index) => /* @__PURE__ */ React95.createElement(SegmentedControlItem, { key: index, ...item, variant }))
16313
16536
  ));
16314
16537
  });
16315
16538
 
16316
16539
  // src/components/SelectionToolbar.tsx
16317
16540
  import * as PopperPrimitive from "@radix-ui/react-popper";
16318
- import React95, { memo as memo32, useMemo as useMemo39 } from "react";
16541
+ import React96, { memo as memo31, useMemo as useMemo40 } from "react";
16319
16542
  import { createPortal as createPortal3 } from "react-dom";
16320
16543
  var createVirtualElement = (rect) => ({
16321
16544
  getBoundingClientRect: () => ({
@@ -16330,7 +16553,7 @@ var createVirtualElement = (rect) => ({
16330
16553
  toJSON: () => null
16331
16554
  })
16332
16555
  });
16333
- var SelectionToolbarContainer = memo32(
16556
+ var SelectionToolbarContainer = memo31(
16334
16557
  function SelectionToolbarContainer2({
16335
16558
  rect,
16336
16559
  children,
@@ -16344,15 +16567,15 @@ var SelectionToolbarContainer = memo32(
16344
16567
  transitionDuration = 0.2
16345
16568
  }) {
16346
16569
  const portalScopeId = usePortalScopeId();
16347
- const containerRef = React95.useRef(null);
16570
+ const containerRef = React96.useRef(null);
16348
16571
  const size = useSize(containerRef, "width");
16349
- const virtualRef = useMemo39(
16572
+ const virtualRef = useMemo40(
16350
16573
  () => ({
16351
16574
  current: createVirtualElement(rect)
16352
16575
  }),
16353
16576
  [rect]
16354
16577
  );
16355
- const popperContent = /* @__PURE__ */ React95.createElement(
16578
+ const popperContent = /* @__PURE__ */ React96.createElement(
16356
16579
  PopperPrimitive.Content,
16357
16580
  {
16358
16581
  ...portalScopeProps(portalScopeId),
@@ -16370,7 +16593,7 @@ var SelectionToolbarContainer = memo32(
16370
16593
  [cssVarNames.colors.buttonBackground]: "transparent"
16371
16594
  }
16372
16595
  },
16373
- /* @__PURE__ */ React95.createElement(
16596
+ /* @__PURE__ */ React96.createElement(
16374
16597
  "div",
16375
16598
  {
16376
16599
  ref: containerRef,
@@ -16387,7 +16610,7 @@ var SelectionToolbarContainer = memo32(
16387
16610
  children
16388
16611
  )
16389
16612
  );
16390
- return /* @__PURE__ */ React95.createElement(PopperPrimitive.Root, null, /* @__PURE__ */ React95.createElement(PopperPrimitive.Anchor, { virtualRef }), portalContainer ? createPortal3(popperContent, portalContainer) : popperContent);
16613
+ return /* @__PURE__ */ React96.createElement(PopperPrimitive.Root, null, /* @__PURE__ */ React96.createElement(PopperPrimitive.Anchor, { virtualRef }), portalContainer ? createPortal3(popperContent, portalContainer) : popperContent);
16391
16614
  }
16392
16615
  );
16393
16616
 
@@ -16398,9 +16621,9 @@ import {
16398
16621
  DropdownChevronIcon as DropdownChevronIcon3
16399
16622
  } from "@noya-app/noya-icons";
16400
16623
  import { Select } from "radix-ui";
16401
- import React96, {
16402
- useMemo as useMemo40,
16403
- useState as useState33
16624
+ import React97, {
16625
+ useMemo as useMemo41,
16626
+ useState as useState34
16404
16627
  } from "react";
16405
16628
  var readOnlyStyle = {
16406
16629
  justifyContent: "flex-start",
@@ -16424,7 +16647,7 @@ var SelectMenuTrigger = memoGeneric(function SelectMenuTrigger2({
16424
16647
  fieldId: props.id
16425
16648
  });
16426
16649
  const labelType = useLabelType();
16427
- return /* @__PURE__ */ React96.createElement(Select.SelectTrigger, { asChild: true, onFocus, onBlur }, /* @__PURE__ */ React96.createElement(
16650
+ return /* @__PURE__ */ React97.createElement(Select.SelectTrigger, { asChild: true, onFocus, onBlur }, /* @__PURE__ */ React97.createElement(
16428
16651
  Button,
16429
16652
  {
16430
16653
  id,
@@ -16436,10 +16659,10 @@ var SelectMenuTrigger = memoGeneric(function SelectMenuTrigger2({
16436
16659
  ),
16437
16660
  disabled
16438
16661
  },
16439
- icon && /* @__PURE__ */ React96.createElement("span", { className: "n-pr-1.5" }, renderIcon(icon)),
16440
- label && labelType === "inset" && /* @__PURE__ */ React96.createElement("div", { className: insetEndStyles }, /* @__PURE__ */ React96.createElement(Label, { className: "n-pr-4 n-text-text-disabled", htmlFor: id }, label)),
16441
- /* @__PURE__ */ React96.createElement("span", { className: "n-flex-1 n-flex" }, /* @__PURE__ */ React96.createElement(Select.Value, { placeholder })),
16442
- /* @__PURE__ */ React96.createElement(
16662
+ icon && /* @__PURE__ */ React97.createElement("span", { className: "n-pr-1.5" }, renderIcon(icon)),
16663
+ label && labelType === "inset" && /* @__PURE__ */ React97.createElement("div", { className: insetEndStyles }, /* @__PURE__ */ React97.createElement(Label, { className: "n-pr-4 n-text-text-disabled", htmlFor: id }, label)),
16664
+ /* @__PURE__ */ React97.createElement("span", { className: "n-flex-1 n-flex" }, /* @__PURE__ */ React97.createElement(Select.Value, { placeholder })),
16665
+ /* @__PURE__ */ React97.createElement(
16443
16666
  DropdownChevronIcon3,
16444
16667
  {
16445
16668
  className: cx(
@@ -16476,7 +16699,7 @@ var SelectMenu = memoGeneric(function SelectMenu2({
16476
16699
  (item) => isSelectableMenuItem(item) && item.value === value
16477
16700
  );
16478
16701
  const icon = selectedItem?.icon;
16479
- const [internalOpen, setInternalOpen] = useState33(open);
16702
+ const [internalOpen, setInternalOpen] = useState34(open);
16480
16703
  const { label, fieldId: id } = useLabel({
16481
16704
  label: props.label,
16482
16705
  fieldId: props.id
@@ -16487,8 +16710,8 @@ var SelectMenu = memoGeneric(function SelectMenu2({
16487
16710
  }
16488
16711
  setInternalOpen(open2);
16489
16712
  };
16490
- const readOnlyButton = useMemo40(
16491
- () => /* @__PURE__ */ React96.createElement(
16713
+ const readOnlyButton = useMemo41(
16714
+ () => /* @__PURE__ */ React97.createElement(
16492
16715
  Button,
16493
16716
  {
16494
16717
  id,
@@ -16498,11 +16721,11 @@ var SelectMenu = memoGeneric(function SelectMenu2({
16498
16721
  disabled
16499
16722
  },
16500
16723
  icon && renderIcon(icon),
16501
- /* @__PURE__ */ React96.createElement("span", { className: "n-flex n-flex-1" }, selectedItem?.title ?? value)
16724
+ /* @__PURE__ */ React97.createElement("span", { className: "n-flex n-flex-1" }, selectedItem?.title ?? value)
16502
16725
  ),
16503
16726
  [icon, id, style2, className, disabled, value, selectedItem]
16504
16727
  );
16505
- const contentStyle = useMemo40(() => {
16728
+ const contentStyle = useMemo41(() => {
16506
16729
  return {
16507
16730
  width: "var(--radix-select-trigger-width)",
16508
16731
  minWidth: "max-content",
@@ -16510,7 +16733,7 @@ var SelectMenu = memoGeneric(function SelectMenu2({
16510
16733
  ...contentStyleProp
16511
16734
  };
16512
16735
  }, [contentStyleProp]);
16513
- const content = /* @__PURE__ */ React96.createElement(
16736
+ const content = /* @__PURE__ */ React97.createElement(
16514
16737
  Select.Root,
16515
16738
  {
16516
16739
  value,
@@ -16518,7 +16741,7 @@ var SelectMenu = memoGeneric(function SelectMenu2({
16518
16741
  open,
16519
16742
  onOpenChange: handleOpenChange
16520
16743
  },
16521
- /* @__PURE__ */ React96.createElement(
16744
+ /* @__PURE__ */ React97.createElement(
16522
16745
  SelectMenuTrigger,
16523
16746
  {
16524
16747
  id,
@@ -16533,7 +16756,7 @@ var SelectMenu = memoGeneric(function SelectMenu2({
16533
16756
  label
16534
16757
  }
16535
16758
  ),
16536
- /* @__PURE__ */ React96.createElement(Select.Portal, null, /* @__PURE__ */ React96.createElement(
16759
+ /* @__PURE__ */ React97.createElement(Select.Portal, null, /* @__PURE__ */ React97.createElement(
16537
16760
  Select.Content,
16538
16761
  {
16539
16762
  ...portalScopeProps(portalScopeId),
@@ -16544,14 +16767,14 @@ var SelectMenu = memoGeneric(function SelectMenu2({
16544
16767
  align: "center",
16545
16768
  style: contentStyle
16546
16769
  },
16547
- /* @__PURE__ */ React96.createElement(Select.ScrollUpButton, { className: scrollButtonStyles }, /* @__PURE__ */ React96.createElement(
16770
+ /* @__PURE__ */ React97.createElement(Select.ScrollUpButton, { className: scrollButtonStyles }, /* @__PURE__ */ React97.createElement(
16548
16771
  ChevronUpIcon,
16549
16772
  {
16550
16773
  className: cx("n-transition-transform n-duration-100")
16551
16774
  }
16552
16775
  )),
16553
- /* @__PURE__ */ React96.createElement(Select.Viewport, null, /* @__PURE__ */ React96.createElement(MenuViewport, { items, Components: Components3 })),
16554
- /* @__PURE__ */ React96.createElement(Select.ScrollDownButton, { className: scrollButtonStyles }, /* @__PURE__ */ React96.createElement(ChevronDownIcon, null))
16776
+ /* @__PURE__ */ React97.createElement(Select.Viewport, null, /* @__PURE__ */ React97.createElement(MenuViewport, { items, Components: Components3 })),
16777
+ /* @__PURE__ */ React97.createElement(Select.ScrollDownButton, { className: scrollButtonStyles }, /* @__PURE__ */ React97.createElement(ChevronDownIcon, null))
16555
16778
  ))
16556
16779
  );
16557
16780
  return readOnly ? readOnlyButton : content;
@@ -16559,12 +16782,12 @@ var SelectMenu = memoGeneric(function SelectMenu2({
16559
16782
 
16560
16783
  // src/components/Slider.tsx
16561
16784
  import { Slider as RadixSlider } from "radix-ui";
16562
- import React97, { memo as memo33, useCallback as useCallback35, useMemo as useMemo41 } from "react";
16785
+ import React98, { memo as memo32, useCallback as useCallback36, useMemo as useMemo42 } from "react";
16563
16786
  var THUMB_WIDTH = 8;
16564
16787
  var thumbStyle = {
16565
16788
  width: THUMB_WIDTH
16566
16789
  };
16567
- var Slider = memo33(function Slider2({
16790
+ var Slider = memo32(function Slider2({
16568
16791
  style: style2,
16569
16792
  className,
16570
16793
  value,
@@ -16578,21 +16801,21 @@ var Slider = memo33(function Slider2({
16578
16801
  readOnly = false,
16579
16802
  ...props
16580
16803
  }) {
16581
- const arrayValue = useMemo41(
16804
+ const arrayValue = useMemo42(
16582
16805
  () => [Math.min(Math.max(value, min), max)],
16583
16806
  [value, min, max]
16584
16807
  );
16585
16808
  const { fieldId: id } = useLabel({
16586
16809
  fieldId: props.id
16587
16810
  });
16588
- const handleValueChange = useCallback35(
16811
+ const handleValueChange = useCallback36(
16589
16812
  (arrayValue2) => {
16590
16813
  onValueChange(arrayValue2[0]);
16591
16814
  },
16592
16815
  [onValueChange]
16593
16816
  );
16594
16817
  const ratio = (arrayValue[0] - min) / (max - min);
16595
- return /* @__PURE__ */ React97.createElement(
16818
+ return /* @__PURE__ */ React98.createElement(
16596
16819
  RadixSlider.Root,
16597
16820
  {
16598
16821
  min,
@@ -16610,7 +16833,7 @@ var Slider = memo33(function Slider2({
16610
16833
  onBlur,
16611
16834
  disabled: readOnly
16612
16835
  },
16613
- /* @__PURE__ */ React97.createElement("div", { className: "n-relative n-flex-grow n-h-[3px] n-overflow-hidden" }, /* @__PURE__ */ React97.createElement(
16836
+ /* @__PURE__ */ React98.createElement("div", { className: "n-relative n-flex-grow n-h-[3px] n-overflow-hidden" }, /* @__PURE__ */ React98.createElement(
16614
16837
  "div",
16615
16838
  {
16616
16839
  className: "n-absolute n-h-full n-rounded-l n-bg-slider-active-background",
@@ -16619,7 +16842,7 @@ var Slider = memo33(function Slider2({
16619
16842
  width: `calc(${ratio * 100}% - ${ratio * 8}px - 2px)`
16620
16843
  }
16621
16844
  }
16622
- ), /* @__PURE__ */ React97.createElement(
16845
+ ), /* @__PURE__ */ React98.createElement(
16623
16846
  "div",
16624
16847
  {
16625
16848
  className: "n-absolute n-h-full n-rounded-r n-bg-input-background",
@@ -16629,7 +16852,7 @@ var Slider = memo33(function Slider2({
16629
16852
  }
16630
16853
  }
16631
16854
  )),
16632
- /* @__PURE__ */ React97.createElement(
16855
+ /* @__PURE__ */ React98.createElement(
16633
16856
  RadixSlider.Thumb,
16634
16857
  {
16635
16858
  style: thumbStyle,
@@ -16647,28 +16870,28 @@ var Slider = memo33(function Slider2({
16647
16870
  });
16648
16871
 
16649
16872
  // src/components/sorting/createSharedDrag.tsx
16650
- import * as React98 from "react";
16873
+ import * as React99 from "react";
16651
16874
  function createSharedDrag() {
16652
- const dragRegistrationContext = React98.createContext(null);
16653
- const activeDragContext = React98.createContext(
16875
+ const dragRegistrationContext = React99.createContext(null);
16876
+ const activeDragContext = React99.createContext(
16654
16877
  null
16655
16878
  );
16656
16879
  const sharedDragProps = {
16657
16880
  dragRegistrationContext,
16658
16881
  activeDragContext
16659
16882
  };
16660
- const Provider = (props) => /* @__PURE__ */ React98.createElement(SharedDragProvider, { sharedDragProps, ...props });
16883
+ const Provider = (props) => /* @__PURE__ */ React99.createElement(SharedDragProvider, { sharedDragProps, ...props });
16661
16884
  return {
16662
16885
  Provider,
16663
- Sortable: (props) => /* @__PURE__ */ React98.createElement(Sortable, { sharedDragProps, ...props }),
16886
+ Sortable: (props) => /* @__PURE__ */ React99.createElement(Sortable, { sharedDragProps, ...props }),
16664
16887
  props: sharedDragProps
16665
16888
  };
16666
16889
  }
16667
16890
 
16668
16891
  // src/components/Stepper.tsx
16669
16892
  import { clamp as clamp7 } from "@noya-app/noya-utils";
16670
- import React99, { memo as memo34, useCallback as useCallback36, useMemo as useMemo42 } from "react";
16671
- var Stepper = memo34(function Stepper2({
16893
+ import React100, { memo as memo33, useCallback as useCallback37, useMemo as useMemo43 } from "react";
16894
+ var Stepper = memo33(function Stepper2({
16672
16895
  style: style2,
16673
16896
  className,
16674
16897
  value: valueProp,
@@ -16685,17 +16908,17 @@ var Stepper = memo34(function Stepper2({
16685
16908
  const { fieldId: id } = useLabel({
16686
16909
  fieldId: props.id
16687
16910
  });
16688
- const value = useMemo42(() => {
16911
+ const value = useMemo43(() => {
16689
16912
  return clamp7(valueProp, min, max);
16690
16913
  }, [valueProp, min, max]);
16691
- const handleValueChange = useCallback36(
16914
+ const handleValueChange = useCallback37(
16692
16915
  (value2) => {
16693
16916
  const newValue = clamp7(value2, min, max);
16694
16917
  onValueChange(newValue);
16695
16918
  },
16696
16919
  [onValueChange, min, max]
16697
16920
  );
16698
- return /* @__PURE__ */ React99.createElement(
16921
+ return /* @__PURE__ */ React100.createElement(
16699
16922
  "div",
16700
16923
  {
16701
16924
  id,
@@ -16707,7 +16930,7 @@ var Stepper = memo34(function Stepper2({
16707
16930
  onFocus,
16708
16931
  onBlur
16709
16932
  },
16710
- /* @__PURE__ */ React99.createElement(
16933
+ /* @__PURE__ */ React100.createElement(
16711
16934
  InputField2.Root,
16712
16935
  {
16713
16936
  className: "n-flex-1",
@@ -16715,7 +16938,7 @@ var Stepper = memo34(function Stepper2({
16715
16938
  startClassName: "-n-ml-[3px]",
16716
16939
  endWidth: 17,
16717
16940
  endClassName: "-n-mr-[3px]",
16718
- start: /* @__PURE__ */ React99.createElement(
16941
+ start: /* @__PURE__ */ React100.createElement(
16719
16942
  IconButton,
16720
16943
  {
16721
16944
  iconName: "MinusIcon",
@@ -16729,7 +16952,7 @@ var Stepper = memo34(function Stepper2({
16729
16952
  }
16730
16953
  }
16731
16954
  ),
16732
- end: /* @__PURE__ */ React99.createElement(
16955
+ end: /* @__PURE__ */ React100.createElement(
16733
16956
  IconButton,
16734
16957
  {
16735
16958
  iconName: "PlusIcon",
@@ -16744,7 +16967,7 @@ var Stepper = memo34(function Stepper2({
16744
16967
  }
16745
16968
  )
16746
16969
  },
16747
- /* @__PURE__ */ React99.createElement(
16970
+ /* @__PURE__ */ React100.createElement(
16748
16971
  InputField2.NumberInput,
16749
16972
  {
16750
16973
  value,
@@ -16759,7 +16982,7 @@ var Stepper = memo34(function Stepper2({
16759
16982
 
16760
16983
  // src/components/Switch.tsx
16761
16984
  import { Switch as SwitchPrimitive } from "radix-ui";
16762
- import * as React100 from "react";
16985
+ import * as React101 from "react";
16763
16986
  var Switch = function Switch2({
16764
16987
  id,
16765
16988
  value,
@@ -16771,7 +16994,7 @@ var Switch = function Switch2({
16771
16994
  style: style2,
16772
16995
  className
16773
16996
  }) {
16774
- return /* @__PURE__ */ React100.createElement(
16997
+ return /* @__PURE__ */ React101.createElement(
16775
16998
  SwitchPrimitive.Root,
16776
16999
  {
16777
17000
  id,
@@ -16790,12 +17013,12 @@ var Switch = function Switch2({
16790
17013
  onFocus,
16791
17014
  onBlur
16792
17015
  },
16793
- /* @__PURE__ */ React100.createElement(SwitchPrimitive.Thumb, { className: "n-block n-w-[15px] n-h-[15px] n-bg-background n-rounded-full n-transition-transform n-translate-x-[2px] data-[state=checked]:n-translate-x-[15px]" })
17016
+ /* @__PURE__ */ React101.createElement(SwitchPrimitive.Thumb, { className: "n-block n-w-[15px] n-h-[15px] n-bg-background n-rounded-full n-transition-transform n-translate-x-[2px] data-[state=checked]:n-translate-x-[15px]" })
16794
17017
  );
16795
17018
  };
16796
17019
 
16797
17020
  // src/components/Tabs.tsx
16798
- import * as React101 from "react";
17021
+ import * as React102 from "react";
16799
17022
  function Tabs({
16800
17023
  value,
16801
17024
  onValueChange,
@@ -16810,7 +17033,7 @@ function Tabs({
16810
17033
  value,
16811
17034
  onChange: onValueChange
16812
17035
  });
16813
- return /* @__PURE__ */ React101.createElement("div", { ...props, className: cx("n-flex n-flex-col", props.className) }, /* @__PURE__ */ React101.createElement("div", { className: "n-flex n-flex-row n-px-3" }, /* @__PURE__ */ React101.createElement(
17036
+ return /* @__PURE__ */ React102.createElement("div", { ...props, className: cx("n-flex n-flex-col", props.className) }, /* @__PURE__ */ React102.createElement("div", { className: "n-flex n-flex-row n-px-3" }, /* @__PURE__ */ React102.createElement(
16814
17037
  SegmentedControl,
16815
17038
  {
16816
17039
  className: "n-flex-1",
@@ -16819,19 +17042,108 @@ function Tabs({
16819
17042
  variant,
16820
17043
  items: selectableItems
16821
17044
  }
16822
- )), /* @__PURE__ */ React101.createElement(Divider, null), renderContent({ value: activeTab }));
17045
+ )), /* @__PURE__ */ React102.createElement(Divider, null), renderContent({ value: activeTab }));
17046
+ }
17047
+
17048
+ // src/components/UserPicker.tsx
17049
+ import React103, { useCallback as useCallback38, useMemo as useMemo44, useState as useState35 } from "react";
17050
+ function UserPicker({
17051
+ users,
17052
+ value,
17053
+ defaultValue: defaultValue2,
17054
+ onChangeUserId,
17055
+ onSelectUser,
17056
+ placeholder = "Search users...",
17057
+ ...rest
17058
+ }) {
17059
+ const sortedUsers = useMemo44(() => {
17060
+ return [...users].sort(
17061
+ (a, b) => getUserDisplayName(a).localeCompare(getUserDisplayName(b), void 0, {
17062
+ sensitivity: "base"
17063
+ })
17064
+ );
17065
+ }, [users]);
17066
+ const usersById = useMemo44(() => {
17067
+ return new Map(sortedUsers.map((user) => [user.id, user]));
17068
+ }, [sortedUsers]);
17069
+ const items = useMemo44(() => {
17070
+ return sortedUsers.map(createUserMenuItem);
17071
+ }, [sortedUsers]);
17072
+ const isControlled = value !== void 0;
17073
+ const [uncontrolledValue, setUncontrolledValue] = useState35(defaultValue2);
17074
+ const selectedUserId = isControlled ? value : uncontrolledValue;
17075
+ const selectedItem = useMemo44(() => {
17076
+ if (!selectedUserId) return void 0;
17077
+ return items.find((item) => item.value === selectedUserId);
17078
+ }, [items, selectedUserId]);
17079
+ const updateSelectedUserId = useCallback38(
17080
+ (userId) => {
17081
+ if (!isControlled) {
17082
+ setUncontrolledValue(userId);
17083
+ }
17084
+ onChangeUserId?.(userId);
17085
+ },
17086
+ [isControlled, onChangeUserId]
17087
+ );
17088
+ const handleSelectItem = useCallback38(
17089
+ (item) => {
17090
+ updateSelectedUserId(item.value);
17091
+ onSelectUser?.(usersById.get(item.value));
17092
+ },
17093
+ [updateSelectedUserId, onSelectUser, usersById]
17094
+ );
17095
+ return /* @__PURE__ */ React103.createElement(
17096
+ Combobox,
17097
+ {
17098
+ ...rest,
17099
+ placeholder,
17100
+ mode: "option",
17101
+ items,
17102
+ value: selectedItem,
17103
+ onSelectItem: handleSelectItem,
17104
+ iconPosition: "left"
17105
+ }
17106
+ );
17107
+ }
17108
+ function getUserDisplayName(user) {
17109
+ const name = user.name?.trim();
17110
+ const email = user.email?.trim();
17111
+ return name || email || "Anonymous user";
17112
+ }
17113
+ function createUserMenuItem(user) {
17114
+ const title = getUserDisplayName(user);
17115
+ const overflow = 3;
17116
+ return {
17117
+ value: user.id,
17118
+ title,
17119
+ icon: /* @__PURE__ */ React103.createElement("div", { className: "n-relative n-w-[15px] n-h-[15px]" }, /* @__PURE__ */ React103.createElement(
17120
+ Avatar,
17121
+ {
17122
+ size: 15 + overflow * 2,
17123
+ name: title,
17124
+ userId: user.id,
17125
+ image: user.image ?? void 0,
17126
+ className: "n-pointer-events-none",
17127
+ variant: "bare",
17128
+ style: {
17129
+ position: "absolute",
17130
+ inset: -overflow
17131
+ }
17132
+ }
17133
+ ))
17134
+ };
16823
17135
  }
16824
17136
 
16825
17137
  // src/components/UserPointer.tsx
16826
- import React102, { memo as memo35, useMemo as useMemo43 } from "react";
16827
- var UserPointerContainer = memo35(function UserPointerContainer2({
17138
+ import React104, { memo as memo34, useMemo as useMemo45 } from "react";
17139
+ var UserPointerContainer = memo34(function UserPointerContainer2({
16828
17140
  point,
16829
17141
  visible,
16830
17142
  children,
16831
17143
  className,
16832
17144
  style: style2
16833
17145
  }) {
16834
- return /* @__PURE__ */ React102.createElement(
17146
+ return /* @__PURE__ */ React104.createElement(
16835
17147
  "div",
16836
17148
  {
16837
17149
  style: {
@@ -16848,7 +17160,7 @@ var UserPointerContainer = memo35(function UserPointerContainer2({
16848
17160
  children
16849
17161
  );
16850
17162
  });
16851
- var UserNameTag = memo35(function UserNameTag2({
17163
+ var UserNameTag = memo34(function UserNameTag2({
16852
17164
  backgroundColor,
16853
17165
  className,
16854
17166
  style: style2,
@@ -16857,7 +17169,7 @@ var UserNameTag = memo35(function UserNameTag2({
16857
17169
  size = "medium",
16858
17170
  bordered = true
16859
17171
  }) {
16860
- return /* @__PURE__ */ React102.createElement(
17172
+ return /* @__PURE__ */ React104.createElement(
16861
17173
  "span",
16862
17174
  {
16863
17175
  className: cx(
@@ -16876,14 +17188,14 @@ var UserNameTag = memo35(function UserNameTag2({
16876
17188
  children
16877
17189
  );
16878
17190
  });
16879
- var UserPointerIcon = memo35(function PointerIcon({
17191
+ var UserPointerIcon = memo34(function PointerIcon({
16880
17192
  size,
16881
17193
  color = "black",
16882
17194
  className,
16883
17195
  style: style2
16884
17196
  }) {
16885
17197
  const points = "0,5 10,0 10,10";
16886
- return /* @__PURE__ */ React102.createElement(
17198
+ return /* @__PURE__ */ React104.createElement(
16887
17199
  "svg",
16888
17200
  {
16889
17201
  width: size,
@@ -16898,7 +17210,7 @@ var UserPointerIcon = memo35(function PointerIcon({
16898
17210
  ...style2
16899
17211
  }
16900
17212
  },
16901
- /* @__PURE__ */ React102.createElement(
17213
+ /* @__PURE__ */ React104.createElement(
16902
17214
  "polygon",
16903
17215
  {
16904
17216
  points,
@@ -16911,7 +17223,7 @@ var UserPointerIcon = memo35(function PointerIcon({
16911
17223
  });
16912
17224
  var POINTER_SIZE = 12;
16913
17225
  var POINTER_OVERLAP = 6;
16914
- var UserPointer = memo35(function UserPointer2({
17226
+ var UserPointer = memo34(function UserPointer2({
16915
17227
  userId,
16916
17228
  name,
16917
17229
  visible = true,
@@ -16924,22 +17236,22 @@ var UserPointer = memo35(function UserPointer2({
16924
17236
  labelSize = "medium",
16925
17237
  bordered = true
16926
17238
  }) {
16927
- const userBackgroundColor = useMemo43(
17239
+ const userBackgroundColor = useMemo45(
16928
17240
  () => backgroundColor ?? colorFromString(userId ?? name ?? ""),
16929
17241
  [backgroundColor, userId, name]
16930
17242
  );
16931
- const pointerOverlapStyle = useMemo43(
17243
+ const pointerOverlapStyle = useMemo45(
16932
17244
  () => ({
16933
17245
  marginRight: `-${POINTER_OVERLAP}px`,
16934
17246
  marginBottom: `-${POINTER_OVERLAP}px`
16935
17247
  }),
16936
17248
  []
16937
17249
  );
16938
- const nameTagOverlapStyle = useMemo43(
17250
+ const nameTagOverlapStyle = useMemo45(
16939
17251
  () => ({ marginLeft: `${POINTER_SIZE - POINTER_OVERLAP + 1}px` }),
16940
17252
  []
16941
17253
  );
16942
- return /* @__PURE__ */ React102.createElement(
17254
+ return /* @__PURE__ */ React104.createElement(
16943
17255
  UserPointerContainer,
16944
17256
  {
16945
17257
  point,
@@ -16947,14 +17259,14 @@ var UserPointer = memo35(function UserPointer2({
16947
17259
  className,
16948
17260
  style: style2
16949
17261
  },
16950
- name && /* @__PURE__ */ React102.createElement("div", { className: "n-relative" }, showPointerIcon && /* @__PURE__ */ React102.createElement(
17262
+ name && /* @__PURE__ */ React104.createElement("div", { className: "n-relative" }, showPointerIcon && /* @__PURE__ */ React104.createElement(
16951
17263
  UserPointerIcon,
16952
17264
  {
16953
17265
  size: POINTER_SIZE,
16954
17266
  color: userBackgroundColor,
16955
17267
  style: pointerOverlapStyle
16956
17268
  }
16957
- ), /* @__PURE__ */ React102.createElement(
17269
+ ), /* @__PURE__ */ React104.createElement(
16958
17270
  UserNameTag,
16959
17271
  {
16960
17272
  backgroundColor: userBackgroundColor,
@@ -16970,16 +17282,16 @@ var UserPointer = memo35(function UserPointer2({
16970
17282
 
16971
17283
  // src/components/workspace/WorkspaceLayout.tsx
16972
17284
  import { useKeyboardShortcuts as useKeyboardShortcuts4 } from "@noya-app/noya-keymap";
16973
- import React108, {
16974
- memo as memo37,
16975
- useCallback as useCallback38,
17285
+ import React110, {
17286
+ memo as memo36,
17287
+ useCallback as useCallback40,
16976
17288
  useImperativeHandle as useImperativeHandle9,
16977
- useMemo as useMemo47,
17289
+ useMemo as useMemo49,
16978
17290
  useRef as useRef30
16979
17291
  } from "react";
16980
17292
 
16981
17293
  // src/components/workspace/DrawerWorkspaceLayout.tsx
16982
- import React106, { useMemo as useMemo45, useRef as useRef28, useState as useState34 } from "react";
17294
+ import React108, { useMemo as useMemo47, useRef as useRef28, useState as useState36 } from "react";
16983
17295
 
16984
17296
  // src/components/workspace/constants.ts
16985
17297
  var EDITOR_PANEL_GROUP_ID = "editor-panel-group";
@@ -16988,20 +17300,20 @@ var RIGHT_SIDEBAR_ID = "editor-3-right-sidebar";
16988
17300
  var CONTENT_AREA_ID = "editor-2-content-area";
16989
17301
 
16990
17302
  // src/components/workspace/VerticalTabMenu.tsx
16991
- import React105, { useMemo as useMemo44 } from "react";
17303
+ import React107, { useMemo as useMemo46 } from "react";
16992
17304
 
16993
17305
  // src/components/Toolbar.tsx
16994
17306
  import { useKeyboardShortcuts as useKeyboardShortcuts3 } from "@noya-app/noya-keymap";
16995
- import React104, {
17307
+ import React106, {
16996
17308
  createContext as createContext15,
16997
- useContext as useContext16
17309
+ useContext as useContext15
16998
17310
  } from "react";
16999
17311
 
17000
17312
  // src/components/ToolbarDrawer.tsx
17001
- import React103, { forwardRef as forwardRef28, memo as memo36 } from "react";
17002
- var ToolbarDrawer = memo36(
17313
+ import React105, { forwardRef as forwardRef28, memo as memo35 } from "react";
17314
+ var ToolbarDrawer = memo35(
17003
17315
  forwardRef28(function ToolbarDrawer2({ children, trigger, sideOffset = 8 }, ref) {
17004
- return /* @__PURE__ */ React103.createElement("div", { className: "n-relative", ref }, /* @__PURE__ */ React103.createElement(
17316
+ return /* @__PURE__ */ React105.createElement("div", { className: "n-relative", ref }, /* @__PURE__ */ React105.createElement(
17005
17317
  "div",
17006
17318
  {
17007
17319
  className: "n-absolute n-bottom-full n-left-1/2 -n-translate-x-1/2 n-rounded-t-lg n-border n-border-toolbar-drawer-border n-border-b-transparent n-bg-toolbar-drawer-background -n-z-10",
@@ -17022,8 +17334,8 @@ var ToolbarMenuDropdown = memoGeneric(function ToolbarMenuDropdown2({
17022
17334
  item,
17023
17335
  onSelectMenuItem
17024
17336
  }) {
17025
- const [open, setOpen] = React104.useState(false);
17026
- return /* @__PURE__ */ React104.createElement(
17337
+ const [open, setOpen] = React106.useState(false);
17338
+ return /* @__PURE__ */ React106.createElement(
17027
17339
  DropdownMenu,
17028
17340
  {
17029
17341
  open,
@@ -17035,7 +17347,7 @@ var ToolbarMenuDropdown = memoGeneric(function ToolbarMenuDropdown2({
17035
17347
  }
17036
17348
  }
17037
17349
  },
17038
- /* @__PURE__ */ React104.createElement(
17350
+ /* @__PURE__ */ React106.createElement(
17039
17351
  Button,
17040
17352
  {
17041
17353
  disabled: item.disabled,
@@ -17051,7 +17363,7 @@ var ToolbarShortcut = ({
17051
17363
  shortcut,
17052
17364
  label
17053
17365
  }) => {
17054
- return /* @__PURE__ */ React104.createElement("div", { className: "n-flex n-items-center" }, label, /* @__PURE__ */ React104.createElement(Spacer.Horizontal, { size: 6 }), /* @__PURE__ */ React104.createElement(KeyboardShortcut, { shortcut }));
17366
+ return /* @__PURE__ */ React106.createElement("div", { className: "n-flex n-items-center" }, label, /* @__PURE__ */ React106.createElement(Spacer.Horizontal, { size: 6 }), /* @__PURE__ */ React106.createElement(KeyboardShortcut, { shortcut }));
17055
17367
  };
17056
17368
  var ToolbarMenuPopover = memoGeneric(function ToolbarMenuPopover2({
17057
17369
  item,
@@ -17065,8 +17377,8 @@ var ToolbarMenuPopover = memoGeneric(function ToolbarMenuPopover2({
17065
17377
  content: itemContent,
17066
17378
  checked
17067
17379
  } = item;
17068
- const [open, setOpen] = React104.useState(false);
17069
- const content = /* @__PURE__ */ React104.createElement("span", null, /* @__PURE__ */ React104.createElement(
17380
+ const [open, setOpen] = React106.useState(false);
17381
+ const content = /* @__PURE__ */ React106.createElement("span", null, /* @__PURE__ */ React106.createElement(
17070
17382
  Popover,
17071
17383
  {
17072
17384
  open,
@@ -17075,7 +17387,7 @@ var ToolbarMenuPopover = memoGeneric(function ToolbarMenuPopover2({
17075
17387
  showArrow: false,
17076
17388
  sideOffset: SIDE_OFFSET,
17077
17389
  portalContainer,
17078
- trigger: /* @__PURE__ */ React104.createElement(
17390
+ trigger: /* @__PURE__ */ React106.createElement(
17079
17391
  Button,
17080
17392
  {
17081
17393
  disabled,
@@ -17088,7 +17400,7 @@ var ToolbarMenuPopover = memoGeneric(function ToolbarMenuPopover2({
17088
17400
  },
17089
17401
  typeof itemContent === "function" ? itemContent({ close: () => setOpen(false) }) : itemContent
17090
17402
  ));
17091
- return tooltip && !open ? /* @__PURE__ */ React104.createElement(
17403
+ return tooltip && !open ? /* @__PURE__ */ React106.createElement(
17092
17404
  Tooltip,
17093
17405
  {
17094
17406
  sideOffset: SIDE_OFFSET,
@@ -17108,7 +17420,7 @@ var ToolbarMenuButton = memoGeneric(function ToolbarMenuButton2({
17108
17420
  displayFilter
17109
17421
  }) {
17110
17422
  const isActive = item.checked || activeValue === item.value;
17111
- const content = /* @__PURE__ */ React104.createElement(
17423
+ const content = /* @__PURE__ */ React106.createElement(
17112
17424
  Button,
17113
17425
  {
17114
17426
  as,
@@ -17125,7 +17437,7 @@ var ToolbarMenuButton = memoGeneric(function ToolbarMenuButton2({
17125
17437
  displayFilter === "iconOnly" ? void 0 : item.title
17126
17438
  );
17127
17439
  const tooltip = item.tooltip ?? (displayFilter === "iconOnly" && item.title ? item.title : void 0);
17128
- return item.drawer && isActive ? /* @__PURE__ */ React104.createElement(ToolbarDrawer, { trigger: content }, item.drawer) : tooltip ? /* @__PURE__ */ React104.createElement(Tooltip, { sideOffset: SIDE_OFFSET, content: tooltip, side: tooltipSide }, content) : content;
17440
+ return item.drawer && isActive ? /* @__PURE__ */ React106.createElement(ToolbarDrawer, { trigger: content }, item.drawer) : tooltip ? /* @__PURE__ */ React106.createElement(Tooltip, { sideOffset: SIDE_OFFSET, content: tooltip, side: tooltipSide }, content) : content;
17129
17441
  });
17130
17442
  var ToolbarMenuItem = memoGeneric(function ToolbarMenuItem2({
17131
17443
  item,
@@ -17137,17 +17449,17 @@ var ToolbarMenuItem = memoGeneric(function ToolbarMenuItem2({
17137
17449
  displayFilter,
17138
17450
  dividerOverflow: dividerOverflowProp
17139
17451
  }) {
17140
- const { dividerOverflow: contextDividerOverflow } = useContext16(ToolbarMenuContext);
17452
+ const { dividerOverflow: contextDividerOverflow } = useContext15(ToolbarMenuContext);
17141
17453
  const dividerOverflow = dividerOverflowProp ?? contextDividerOverflow ?? 4;
17142
17454
  if (item.type === "sectionHeader") return null;
17143
17455
  if (item.type === "separator") {
17144
- return /* @__PURE__ */ React104.createElement(DividerVertical, { overflow: dividerOverflow });
17456
+ return /* @__PURE__ */ React106.createElement(DividerVertical, { overflow: dividerOverflow });
17145
17457
  }
17146
17458
  if (item.type === "popover") {
17147
- return /* @__PURE__ */ React104.createElement(ToolbarMenuPopover, { item, portalContainer });
17459
+ return /* @__PURE__ */ React106.createElement(ToolbarMenuPopover, { item, portalContainer });
17148
17460
  }
17149
17461
  if (isSelectableMenuItem(item)) {
17150
- return /* @__PURE__ */ React104.createElement(
17462
+ return /* @__PURE__ */ React106.createElement(
17151
17463
  ToolbarMenuButton,
17152
17464
  {
17153
17465
  item,
@@ -17159,7 +17471,7 @@ var ToolbarMenuItem = memoGeneric(function ToolbarMenuItem2({
17159
17471
  }
17160
17472
  );
17161
17473
  }
17162
- return /* @__PURE__ */ React104.createElement(ToolbarMenuDropdown, { item, onSelectMenuItem });
17474
+ return /* @__PURE__ */ React106.createElement(ToolbarMenuDropdown, { item, onSelectMenuItem });
17163
17475
  });
17164
17476
  var ToolbarMenu = memoGeneric(function ToolbarMenu2({
17165
17477
  items,
@@ -17171,8 +17483,8 @@ var ToolbarMenu = memoGeneric(function ToolbarMenu2({
17171
17483
  displayFilter = "iconAndText",
17172
17484
  dividerOverflow
17173
17485
  }) {
17174
- return /* @__PURE__ */ React104.createElement(React104.Fragment, null, items.map((item, i) => {
17175
- return /* @__PURE__ */ React104.createElement(
17486
+ return /* @__PURE__ */ React106.createElement(React106.Fragment, null, items.map((item, i) => {
17487
+ return /* @__PURE__ */ React106.createElement(
17176
17488
  ToolbarMenuItem,
17177
17489
  {
17178
17490
  key: i,
@@ -17197,21 +17509,21 @@ function Toolbar({
17197
17509
  shouldBindKeyboardShortcuts = true,
17198
17510
  dividerOverflow
17199
17511
  }) {
17200
- const allMenuItems = React104.useMemo(
17512
+ const allMenuItems = React106.useMemo(
17201
17513
  () => [...leftMenuItems, ...rightMenuItems],
17202
17514
  [leftMenuItems, rightMenuItems]
17203
17515
  );
17204
17516
  useKeyboardShortcuts3(
17205
- React104.useMemo(
17517
+ React106.useMemo(
17206
17518
  () => onSelectMenuItem && shouldBindKeyboardShortcuts ? getKeyboardShortcutsForMenuItems(allMenuItems, onSelectMenuItem) : {},
17207
17519
  [allMenuItems, onSelectMenuItem, shouldBindKeyboardShortcuts]
17208
17520
  )
17209
17521
  );
17210
- return /* @__PURE__ */ React104.createElement(
17522
+ return /* @__PURE__ */ React106.createElement(
17211
17523
  BaseToolbar,
17212
17524
  {
17213
17525
  logo,
17214
- left: leftMenuItems.length > 0 && /* @__PURE__ */ React104.createElement("div", { className: "n-flex n-gap-2" }, /* @__PURE__ */ React104.createElement(
17526
+ left: leftMenuItems.length > 0 && /* @__PURE__ */ React106.createElement("div", { className: "n-flex n-gap-2" }, /* @__PURE__ */ React106.createElement(
17215
17527
  ToolbarMenu,
17216
17528
  {
17217
17529
  items: leftMenuItems,
@@ -17219,7 +17531,7 @@ function Toolbar({
17219
17531
  dividerOverflow
17220
17532
  }
17221
17533
  )),
17222
- right: rightMenuItems.length > 0 && /* @__PURE__ */ React104.createElement("div", { className: "n-flex n-gap-2" }, /* @__PURE__ */ React104.createElement(
17534
+ right: rightMenuItems.length > 0 && /* @__PURE__ */ React106.createElement("div", { className: "n-flex n-gap-2" }, /* @__PURE__ */ React106.createElement(
17223
17535
  ToolbarMenu,
17224
17536
  {
17225
17537
  items: rightMenuItems,
@@ -17240,19 +17552,19 @@ var VerticalTabMenu = memoGeneric(function VerticalTabMenu2({
17240
17552
  onChange,
17241
17553
  tooltipSide
17242
17554
  }) {
17243
- const style2 = useMemo44(() => {
17555
+ const style2 = useMemo46(() => {
17244
17556
  return {
17245
17557
  [cssVarNames.colors.inputBackground]: "transparent",
17246
17558
  [cssVarNames.colors.buttonBackground]: "transparent"
17247
17559
  };
17248
17560
  }, []);
17249
- return /* @__PURE__ */ React105.createElement(
17561
+ return /* @__PURE__ */ React107.createElement(
17250
17562
  "div",
17251
17563
  {
17252
17564
  className: "n-w-[calc(var(--n-toolbar-height)+1px)] n-h-full n-bg-sidebar-background n-flex n-flex-col n-items-center n-py-3 n-gap-3",
17253
17565
  style: style2
17254
17566
  },
17255
- /* @__PURE__ */ React105.createElement(
17567
+ /* @__PURE__ */ React107.createElement(
17256
17568
  ToolbarMenu,
17257
17569
  {
17258
17570
  items,
@@ -17281,11 +17593,11 @@ var DrawerWorkspaceLayout = memoGeneric(function DrawerWorkspaceLayout2({
17281
17593
  compactDrawerMenu
17282
17594
  }) {
17283
17595
  const portalContainer = useRef28(null);
17284
- const [{ leftSidebarCollapsed, rightSidebarCollapsed }, setLayoutState] = useState34({
17596
+ const [{ leftSidebarCollapsed, rightSidebarCollapsed }, setLayoutState] = useState36({
17285
17597
  leftSidebarCollapsed: true,
17286
17598
  rightSidebarCollapsed: true
17287
17599
  });
17288
- const allTabItems = useMemo45(
17600
+ const allTabItems = useMemo47(
17289
17601
  () => [
17290
17602
  ...leftPanel ? leftTabItems ?? [] : [],
17291
17603
  ...rightPanel ? rightTabItems ?? [] : []
@@ -17293,16 +17605,16 @@ var DrawerWorkspaceLayout = memoGeneric(function DrawerWorkspaceLayout2({
17293
17605
  [leftTabItems, rightTabItems, leftPanel, rightPanel]
17294
17606
  );
17295
17607
  const hasTabs = allTabItems.length > 0;
17296
- const allSelectableTabItems = useMemo45(
17608
+ const allSelectableTabItems = useMemo47(
17297
17609
  () => allTabItems.filter(isSelectableMenuItem),
17298
17610
  [allTabItems]
17299
17611
  );
17300
17612
  const useCompactInToolbar = !!compactDrawerMenu && allSelectableTabItems.length <= 1;
17301
- const leftSelectableTabItems = useMemo45(
17613
+ const leftSelectableTabItems = useMemo47(
17302
17614
  () => (leftTabItems ?? []).filter(isSelectableMenuItem),
17303
17615
  [leftTabItems]
17304
17616
  );
17305
- const rightSelectableTabItems = useMemo45(
17617
+ const rightSelectableTabItems = useMemo47(
17306
17618
  () => (rightTabItems ?? []).filter(isSelectableMenuItem),
17307
17619
  [rightTabItems]
17308
17620
  );
@@ -17339,14 +17651,14 @@ var DrawerWorkspaceLayout = memoGeneric(function DrawerWorkspaceLayout2({
17339
17651
  activeValue: rightTabValue,
17340
17652
  isSidebarCollapsed: rightSidebarCollapsed
17341
17653
  } : { activeValue: void 0, isSidebarCollapsed: true };
17342
- return /* @__PURE__ */ React106.createElement(
17654
+ return /* @__PURE__ */ React108.createElement(
17343
17655
  "div",
17344
17656
  {
17345
17657
  ref: portalContainer,
17346
17658
  id: EDITOR_PANEL_GROUP_ID,
17347
17659
  className: "n-flex n-flex-1 n-relative focus:n-outline-none"
17348
17660
  },
17349
- hasTabs && !useCompactInToolbar && /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(
17661
+ hasTabs && !useCompactInToolbar && /* @__PURE__ */ React108.createElement(React108.Fragment, null, /* @__PURE__ */ React108.createElement(
17350
17662
  VerticalTabMenu,
17351
17663
  {
17352
17664
  tooltipSide: "right",
@@ -17355,8 +17667,8 @@ var DrawerWorkspaceLayout = memoGeneric(function DrawerWorkspaceLayout2({
17355
17667
  isSidebarCollapsed,
17356
17668
  onChange: (value) => handleSelectTab(value)
17357
17669
  }
17358
- ), /* @__PURE__ */ React106.createElement(DividerVertical, { className: "n-h-full" })),
17359
- useCompactInToolbar && /* @__PURE__ */ React106.createElement("div", { className: "n-absolute n-top-0 n-left-0 n-h-[calc(var(--n-toolbar-height)+1px)] n-w-[calc(var(--n-toolbar-height)+1px)] n-bg-sidebar-background n-border-r n-border-b n-border-divider-strong n-z-10 n-flex n-items-center n-justify-center" }, allSelectableTabItems[0] && /* @__PURE__ */ React106.createElement(
17670
+ ), /* @__PURE__ */ React108.createElement(DividerVertical, { className: "n-h-full" })),
17671
+ useCompactInToolbar && /* @__PURE__ */ React108.createElement("div", { className: "n-absolute n-top-0 n-left-0 n-h-[calc(var(--n-toolbar-height)+1px)] n-w-[calc(var(--n-toolbar-height)+1px)] n-bg-sidebar-background n-border-r n-border-b n-border-divider-strong n-z-10 n-flex n-items-center n-justify-center" }, allSelectableTabItems[0] && /* @__PURE__ */ React108.createElement(
17360
17672
  Button,
17361
17673
  {
17362
17674
  variant: "none",
@@ -17379,8 +17691,8 @@ var DrawerWorkspaceLayout = memoGeneric(function DrawerWorkspaceLayout2({
17379
17691
  }
17380
17692
  }
17381
17693
  )),
17382
- /* @__PURE__ */ React106.createElement("div", { className: "n-flex-1 n-flex n-relative" }, centerPanel),
17383
- leftPanel && /* @__PURE__ */ React106.createElement(
17694
+ /* @__PURE__ */ React108.createElement("div", { className: "n-flex-1 n-flex n-relative" }, centerPanel),
17695
+ leftPanel && /* @__PURE__ */ React108.createElement(
17384
17696
  Drawer,
17385
17697
  {
17386
17698
  ref: leftSidebarRef,
@@ -17401,7 +17713,7 @@ var DrawerWorkspaceLayout = memoGeneric(function DrawerWorkspaceLayout2({
17401
17713
  },
17402
17714
  leftPanel
17403
17715
  ),
17404
- rightPanel && /* @__PURE__ */ React106.createElement(
17716
+ rightPanel && /* @__PURE__ */ React108.createElement(
17405
17717
  Drawer,
17406
17718
  {
17407
17719
  id: RIGHT_SIDEBAR_ID,
@@ -17427,7 +17739,7 @@ var DrawerWorkspaceLayout = memoGeneric(function DrawerWorkspaceLayout2({
17427
17739
  });
17428
17740
 
17429
17741
  // src/components/workspace/PanelWorkspaceLayout.tsx
17430
- import React107, { useCallback as useCallback37, useMemo as useMemo46, useRef as useRef29 } from "react";
17742
+ import React109, { useCallback as useCallback39, useMemo as useMemo48, useRef as useRef29 } from "react";
17431
17743
  import {
17432
17744
  Panel,
17433
17745
  PanelGroup,
@@ -17601,7 +17913,7 @@ var PanelWorkspaceLayout = memoGeneric(function PanelWorkspaceLayout2({
17601
17913
  const hasLeftPanel = !!leftPanel;
17602
17914
  const hasRightPanel = !!rightPanel;
17603
17915
  const hasCenterPanel = !!centerPanel;
17604
- const autoSaveId = useMemo46(() => {
17916
+ const autoSaveId = useMemo48(() => {
17605
17917
  return autoSavePrefix ? `${autoSavePrefix}--v2--${EDITOR_PANEL_GROUP_ID}` : Math.random().toString(36).substring(2, 15);
17606
17918
  }, [autoSavePrefix]);
17607
17919
  const layoutIds = getLayoutIds({
@@ -17628,7 +17940,7 @@ var PanelWorkspaceLayout = memoGeneric(function PanelWorkspaceLayout2({
17628
17940
  });
17629
17941
  const [data, setData] = usePersistentStateObject(clientStorage, storageKey, {});
17630
17942
  const layoutGroup = data?.[propertyKey];
17631
- const { leftSidebarCollapsed, rightSidebarCollapsed } = useMemo46(() => {
17943
+ const { leftSidebarCollapsed, rightSidebarCollapsed } = useMemo48(() => {
17632
17944
  return getLayoutCollapsedState({
17633
17945
  layoutGroup,
17634
17946
  propertyKey,
@@ -17637,7 +17949,7 @@ var PanelWorkspaceLayout = memoGeneric(function PanelWorkspaceLayout2({
17637
17949
  hasRightPanel
17638
17950
  });
17639
17951
  }, [layoutGroup, propertyKey, layoutIds, hasLeftPanel, hasRightPanel]);
17640
- const handleLeftTabChange = useCallback37(
17952
+ const handleLeftTabChange = useCallback39(
17641
17953
  (value) => {
17642
17954
  if (value === leftTabValue) {
17643
17955
  if (leftSidebarRef.current?.isExpanded()) {
@@ -17654,7 +17966,7 @@ var PanelWorkspaceLayout = memoGeneric(function PanelWorkspaceLayout2({
17654
17966
  },
17655
17967
  [leftSidebarRef, leftTabValue, onChangeLeftTab]
17656
17968
  );
17657
- const handleRightTabChange = useCallback37(
17969
+ const handleRightTabChange = useCallback39(
17658
17970
  (value) => {
17659
17971
  if (value === rightTabValue) {
17660
17972
  if (rightSidebarRef.current?.isExpanded()) {
@@ -17671,7 +17983,7 @@ var PanelWorkspaceLayout = memoGeneric(function PanelWorkspaceLayout2({
17671
17983
  },
17672
17984
  [onChangeRightTab, rightSidebarRef, rightTabValue]
17673
17985
  );
17674
- const handleLayoutChange = useCallback37(
17986
+ const handleLayoutChange = useCallback39(
17675
17987
  (layout) => {
17676
17988
  setData((prev) => {
17677
17989
  const newData = {
@@ -17689,7 +18001,7 @@ var PanelWorkspaceLayout = memoGeneric(function PanelWorkspaceLayout2({
17689
18001
  const showLeftTabs = !!leftSidebarOptions.showTabs && !!leftTabItems && // When compact drawer UI is enabled, only show the rail when the
17690
18002
  // sidebar is collapsed (for large screens/panel layout).
17691
18003
  (!compactDrawerMenu || leftSidebarCollapsed);
17692
- return /* @__PURE__ */ React107.createElement(
18004
+ return /* @__PURE__ */ React109.createElement(
17693
18005
  PanelGroup,
17694
18006
  {
17695
18007
  ref: panelGroupRef,
@@ -17700,7 +18012,7 @@ var PanelWorkspaceLayout = memoGeneric(function PanelWorkspaceLayout2({
17700
18012
  autoSaveId,
17701
18013
  onLayout: handleLayoutChange
17702
18014
  },
17703
- leftPanel && /* @__PURE__ */ React107.createElement(React107.Fragment, null, showLeftTabs && /* @__PURE__ */ React107.createElement(
18015
+ leftPanel && /* @__PURE__ */ React109.createElement(React109.Fragment, null, showLeftTabs && /* @__PURE__ */ React109.createElement(
17704
18016
  VerticalTabMenu,
17705
18017
  {
17706
18018
  tooltipSide: "right",
@@ -17709,7 +18021,7 @@ var PanelWorkspaceLayout = memoGeneric(function PanelWorkspaceLayout2({
17709
18021
  isSidebarCollapsed: leftSidebarCollapsed,
17710
18022
  onChange: handleLeftTabChange
17711
18023
  }
17712
- ), showLeftTabs && !leftSidebarCollapsed && /* @__PURE__ */ React107.createElement(DividerVertical, { className: "n-h-full" }), /* @__PURE__ */ React107.createElement(
18024
+ ), showLeftTabs && !leftSidebarCollapsed && /* @__PURE__ */ React109.createElement(DividerVertical, { className: "n-h-full" }), /* @__PURE__ */ React109.createElement(
17713
18025
  Panel,
17714
18026
  {
17715
18027
  id: LEFT_SIDEBAR_ID,
@@ -17722,8 +18034,8 @@ var PanelWorkspaceLayout = memoGeneric(function PanelWorkspaceLayout2({
17722
18034
  collapsible: true
17723
18035
  },
17724
18036
  leftSidebarCollapsed ? null : leftPanel
17725
- ), /* @__PURE__ */ React107.createElement(PanelResizeHandle, { className: "n-cursor-col-resize n-w-px n-h-full n-bg-divider" })),
17726
- /* @__PURE__ */ React107.createElement(
18037
+ ), /* @__PURE__ */ React109.createElement(PanelResizeHandle, { className: "n-cursor-col-resize n-w-px n-h-full n-bg-divider" })),
18038
+ /* @__PURE__ */ React109.createElement(
17727
18039
  Panel,
17728
18040
  {
17729
18041
  id: CONTENT_AREA_ID,
@@ -17734,7 +18046,7 @@ var PanelWorkspaceLayout = memoGeneric(function PanelWorkspaceLayout2({
17734
18046
  },
17735
18047
  centerPanel
17736
18048
  ),
17737
- rightPanel && /* @__PURE__ */ React107.createElement(React107.Fragment, null, /* @__PURE__ */ React107.createElement(PanelResizeHandle, { className: "n-cursor-col-resize n-w-px n-h-full n-bg-divider" }), /* @__PURE__ */ React107.createElement(
18049
+ rightPanel && /* @__PURE__ */ React109.createElement(React109.Fragment, null, /* @__PURE__ */ React109.createElement(PanelResizeHandle, { className: "n-cursor-col-resize n-w-px n-h-full n-bg-divider" }), /* @__PURE__ */ React109.createElement(
17738
18050
  Panel,
17739
18051
  {
17740
18052
  id: RIGHT_SIDEBAR_ID,
@@ -17747,7 +18059,7 @@ var PanelWorkspaceLayout = memoGeneric(function PanelWorkspaceLayout2({
17747
18059
  collapsible: true
17748
18060
  },
17749
18061
  rightSidebarCollapsed ? null : rightPanel
17750
- ), rightSidebarOptions.showTabs && rightTabItems && !rightSidebarCollapsed && /* @__PURE__ */ React107.createElement(DividerVertical, { className: "n-h-full" }), rightSidebarOptions.showTabs && rightTabItems && /* @__PURE__ */ React107.createElement(
18062
+ ), rightSidebarOptions.showTabs && rightTabItems && !rightSidebarCollapsed && /* @__PURE__ */ React109.createElement(DividerVertical, { className: "n-h-full" }), rightSidebarOptions.showTabs && rightTabItems && /* @__PURE__ */ React109.createElement(
17751
18063
  VerticalTabMenu,
17752
18064
  {
17753
18065
  tooltipSide: "left",
@@ -17769,11 +18081,11 @@ function renderPanelChildren(fn, props) {
17769
18081
  }
17770
18082
 
17771
18083
  // src/components/workspace/WorkspaceSideContext.tsx
17772
- import { createContext as createContext16, useContext as useContext17 } from "react";
18084
+ import { createContext as createContext16, useContext as useContext16 } from "react";
17773
18085
  var WorkspaceSideContext = createContext16({});
17774
18086
  var WorkspaceSideProvider = WorkspaceSideContext.Provider;
17775
18087
  function useWorkspaceSide() {
17776
- return useContext17(WorkspaceSideContext);
18088
+ return useContext16(WorkspaceSideContext);
17777
18089
  }
17778
18090
 
17779
18091
  // src/components/workspace/WorkspaceLayout.tsx
@@ -17836,7 +18148,7 @@ var WorkspaceLayout = forwardRefGeneric(function WorkspaceLayout2({
17836
18148
  theme,
17837
18149
  compactDrawerMenu
17838
18150
  }, forwardedRef) {
17839
- const containerRef = React108.useRef(null);
18151
+ const containerRef = React110.useRef(null);
17840
18152
  const containerSize = useSize(containerRef);
17841
18153
  const windowSize = useWindowSize();
17842
18154
  const parentSize = detectSize === "window" ? windowSize : containerSize && containerSize.width > 0 ? containerSize : windowSize;
@@ -17937,56 +18249,56 @@ var WorkspaceLayout = forwardRefGeneric(function WorkspaceLayout2({
17937
18249
  });
17938
18250
  const centerPanelPercentage = 100 - (left ? leftSidebarPercentage : 0) - (right ? rightSidebarPercentage : 0);
17939
18251
  const isDrawerActive = sideType === "drawer" || sideType === "auto" && parentSize.width <= sideTypeBreakpoint;
17940
- const closeLeftSidebar = useCallback38(() => {
18252
+ const closeLeftSidebar = useCallback40(() => {
17941
18253
  if (isDrawerActive) {
17942
18254
  leftSidebarRef.current?.collapse();
17943
18255
  }
17944
18256
  }, [isDrawerActive]);
17945
- const closeRightSidebar = useCallback38(() => {
18257
+ const closeRightSidebar = useCallback40(() => {
17946
18258
  if (isDrawerActive) {
17947
18259
  rightSidebarRef.current?.collapse();
17948
18260
  }
17949
18261
  }, [isDrawerActive]);
17950
- const leftChildrenProps = useMemo47(() => {
18262
+ const leftChildrenProps = useMemo49(() => {
17951
18263
  return {
17952
18264
  activeTabValue: leftTabValue,
17953
18265
  closeSidebar: closeLeftSidebar
17954
18266
  };
17955
18267
  }, [leftTabValue, closeLeftSidebar]);
17956
- const rightChildrenProps = useMemo47(() => {
18268
+ const rightChildrenProps = useMemo49(() => {
17957
18269
  return {
17958
18270
  activeTabValue: rightTabValue,
17959
18271
  closeSidebar: closeRightSidebar
17960
18272
  };
17961
18273
  }, [rightTabValue, closeRightSidebar]);
17962
- const leftSidebarProviderValue = useMemo47(() => {
18274
+ const leftSidebarProviderValue = useMemo49(() => {
17963
18275
  return {
17964
18276
  closeSidebar: closeLeftSidebar
17965
18277
  };
17966
18278
  }, [closeLeftSidebar]);
17967
- const rightSidebarProviderValue = useMemo47(() => {
18279
+ const rightSidebarProviderValue = useMemo49(() => {
17968
18280
  return {
17969
18281
  closeSidebar: closeRightSidebar
17970
18282
  };
17971
18283
  }, [closeRightSidebar]);
17972
- const leftPanel = left && leftVisible !== false ? /* @__PURE__ */ React108.createElement(
18284
+ const leftPanel = left && leftVisible !== false ? /* @__PURE__ */ React110.createElement(
17973
18285
  PanelInner,
17974
18286
  {
17975
18287
  style: leftStyle,
17976
18288
  className: cx("n-bg-sidebar-background n-flex-col", leftClassName)
17977
18289
  },
17978
- /* @__PURE__ */ React108.createElement(WorkspaceSideProvider, { value: leftSidebarProviderValue }, leftTabValue ? renderPanelChildren(left, leftChildrenProps) : null)
18290
+ /* @__PURE__ */ React110.createElement(WorkspaceSideProvider, { value: leftSidebarProviderValue }, leftTabValue ? renderPanelChildren(left, leftChildrenProps) : null)
17979
18291
  ) : null;
17980
- const rightPanel = right && rightVisible !== false ? /* @__PURE__ */ React108.createElement(
18292
+ const rightPanel = right && rightVisible !== false ? /* @__PURE__ */ React110.createElement(
17981
18293
  PanelInner,
17982
18294
  {
17983
18295
  style: rightStyle,
17984
18296
  className: cx("n-bg-sidebar-background n-flex-col", rightClassName)
17985
18297
  },
17986
- /* @__PURE__ */ React108.createElement(WorkspaceSideProvider, { value: rightSidebarProviderValue }, rightTabValue ? renderPanelChildren(right, rightChildrenProps) : null)
18298
+ /* @__PURE__ */ React110.createElement(WorkspaceSideProvider, { value: rightSidebarProviderValue }, rightTabValue ? renderPanelChildren(right, rightChildrenProps) : null)
17987
18299
  ) : null;
17988
- const centerPanel = /* @__PURE__ */ React108.createElement(PanelInner, { className: "n-bg-canvas-background" }, children);
17989
- const leftSidebarOptions = useMemo47(
18300
+ const centerPanel = /* @__PURE__ */ React110.createElement(PanelInner, { className: "n-bg-canvas-background" }, children);
18301
+ const leftSidebarOptions = useMemo49(
17990
18302
  () => ({
17991
18303
  minSize: leftSidebarMinPercentage,
17992
18304
  maxSize: leftSidebarMaxPercentage,
@@ -18004,7 +18316,7 @@ var WorkspaceLayout = forwardRefGeneric(function WorkspaceLayout2({
18004
18316
  leftShowTabs
18005
18317
  ]
18006
18318
  );
18007
- const rightSidebarOptions = useMemo47(
18319
+ const rightSidebarOptions = useMemo49(
18008
18320
  () => ({
18009
18321
  minSize: rightSidebarMinPercentage,
18010
18322
  maxSize: rightSidebarMaxPercentage,
@@ -18024,7 +18336,7 @@ var WorkspaceLayout = forwardRefGeneric(function WorkspaceLayout2({
18024
18336
  );
18025
18337
  const LayoutComponent = sideType === "panel" ? PanelWorkspaceLayout : sideType === "drawer" ? DrawerWorkspaceLayout : parentSize.width > sideTypeBreakpoint ? PanelWorkspaceLayout : DrawerWorkspaceLayout;
18026
18338
  const readyToRender = detectSize === "window" || containerSize && containerSize.width > 0;
18027
- return /* @__PURE__ */ React108.createElement(
18339
+ return /* @__PURE__ */ React110.createElement(
18028
18340
  "div",
18029
18341
  {
18030
18342
  ref: containerRef,
@@ -18037,7 +18349,7 @@ var WorkspaceLayout = forwardRefGeneric(function WorkspaceLayout2({
18037
18349
  "data-theme": theme
18038
18350
  },
18039
18351
  toolbar,
18040
- /* @__PURE__ */ React108.createElement("div", { className: "n-flex n-flex-row n-flex-1 n-relative" }, readyToRender && /* @__PURE__ */ React108.createElement(
18352
+ /* @__PURE__ */ React110.createElement("div", { className: "n-flex n-flex-row n-flex-1 n-relative" }, readyToRender && /* @__PURE__ */ React110.createElement(
18041
18353
  LayoutComponent,
18042
18354
  {
18043
18355
  leftPanel,
@@ -18060,12 +18372,12 @@ var WorkspaceLayout = forwardRefGeneric(function WorkspaceLayout2({
18060
18372
  ))
18061
18373
  );
18062
18374
  });
18063
- var PanelInner = memo37(function PanelInner2({
18375
+ var PanelInner = memo36(function PanelInner2({
18064
18376
  children,
18065
18377
  style: style2,
18066
18378
  className
18067
18379
  }) {
18068
- return /* @__PURE__ */ React108.createElement(
18380
+ return /* @__PURE__ */ React110.createElement(
18069
18381
  "div",
18070
18382
  {
18071
18383
  style: style2,
@@ -18080,22 +18392,22 @@ function getFirstTabValue(items, defaultValue2) {
18080
18392
  }
18081
18393
 
18082
18394
  // src/contexts/ImageDataContext.tsx
18083
- import * as React109 from "react";
18084
- var ImageDataContext = React109.createContext(
18395
+ import * as React111 from "react";
18396
+ var ImageDataContext = React111.createContext(
18085
18397
  void 0
18086
18398
  );
18087
- var ImageDataProvider = React109.memo(function ImageDataProvider2({
18399
+ var ImageDataProvider = React111.memo(function ImageDataProvider2({
18088
18400
  children,
18089
18401
  getImageData
18090
18402
  }) {
18091
- const contextValue = React109.useMemo(
18403
+ const contextValue = React111.useMemo(
18092
18404
  () => ({ getImageData: getImageData ?? (() => void 0) }),
18093
18405
  [getImageData]
18094
18406
  );
18095
- return /* @__PURE__ */ React109.createElement(ImageDataContext.Provider, { value: contextValue }, children);
18407
+ return /* @__PURE__ */ React111.createElement(ImageDataContext.Provider, { value: contextValue }, children);
18096
18408
  });
18097
18409
  function useImageData(ref) {
18098
- const value = React109.useContext(ImageDataContext);
18410
+ const value = React111.useContext(ImageDataContext);
18099
18411
  if (!value) {
18100
18412
  throw new Error("Missing ImageDataProvider");
18101
18413
  }
@@ -18112,9 +18424,9 @@ function usePlatformModKey() {
18112
18424
  }
18113
18425
 
18114
18426
  // src/hooks/useTheme.ts
18115
- import { useEffect as useEffect23, useState as useState35 } from "react";
18427
+ import { useEffect as useEffect23, useState as useState37 } from "react";
18116
18428
  function useTheme() {
18117
- const [theme, setTheme] = useState35("light");
18429
+ const [theme, setTheme] = useState37("light");
18118
18430
  const checkTheme = () => {
18119
18431
  const currentTheme = document.body.getAttribute("data-theme");
18120
18432
  switch (currentTheme) {
@@ -18249,11 +18561,11 @@ var SUPPORTED_CANVAS_UPLOAD_TYPES = [
18249
18561
 
18250
18562
  // src/components/DimensionInput.tsx
18251
18563
  import { round as round2 } from "@noya-app/noya-utils";
18252
- import * as React110 from "react";
18564
+ import * as React112 from "react";
18253
18565
  function getNewValue(value, mode, delta) {
18254
18566
  return delta === void 0 ? value : mode === "replace" ? delta : value + delta;
18255
18567
  }
18256
- var DimensionInput = React110.memo(function DimensionInput2({
18568
+ var DimensionInput = React112.memo(function DimensionInput2({
18257
18569
  id,
18258
18570
  value,
18259
18571
  onSetValue,
@@ -18263,15 +18575,15 @@ var DimensionInput = React110.memo(function DimensionInput2({
18263
18575
  disabled,
18264
18576
  trigger = "submit"
18265
18577
  }) {
18266
- const handleNudgeValue = React110.useCallback(
18578
+ const handleNudgeValue = React112.useCallback(
18267
18579
  (value2) => onSetValue(value2, "adjust"),
18268
18580
  [onSetValue]
18269
18581
  );
18270
- const handleSetValue = React110.useCallback(
18582
+ const handleSetValue = React112.useCallback(
18271
18583
  (value2) => onSetValue(value2, "replace"),
18272
18584
  [onSetValue]
18273
18585
  );
18274
- return /* @__PURE__ */ React110.createElement(LabeledField, { label, labelType: "inset" }, /* @__PURE__ */ React110.createElement(InputField2.Root, { id, width: size }, /* @__PURE__ */ React110.createElement(
18586
+ return /* @__PURE__ */ React112.createElement(LabeledField, { label, labelType: "inset" }, /* @__PURE__ */ React112.createElement(InputField2.Root, { id, width: size }, /* @__PURE__ */ React112.createElement(
18275
18587
  InputField2.NumberInput,
18276
18588
  {
18277
18589
  value: value === void 0 ? value : round2(value, 2),
@@ -18298,11 +18610,11 @@ __export(InspectorPrimitives_exports, {
18298
18610
  Title: () => Title,
18299
18611
  VerticalSeparator: () => VerticalSeparator
18300
18612
  });
18301
- import React111, {
18613
+ import React113, {
18302
18614
  forwardRef as forwardRef29,
18303
- memo as memo40
18615
+ memo as memo39
18304
18616
  } from "react";
18305
- var Section2 = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React111.createElement(
18617
+ var Section2 = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React113.createElement(
18306
18618
  "div",
18307
18619
  {
18308
18620
  ref,
@@ -18310,8 +18622,8 @@ var Section2 = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ Re
18310
18622
  ...props
18311
18623
  }
18312
18624
  ));
18313
- var SectionHeader2 = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React111.createElement("div", { ref, className: cx(`n-flex n-items-center`, className), ...props }));
18314
- var Title = forwardRef29(({ className, $textStyle, ...props }, ref) => /* @__PURE__ */ React111.createElement(
18625
+ var SectionHeader2 = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React113.createElement("div", { ref, className: cx(`n-flex n-items-center`, className), ...props }));
18626
+ var Title = forwardRef29(({ className, $textStyle, ...props }, ref) => /* @__PURE__ */ React113.createElement(
18315
18627
  "div",
18316
18628
  {
18317
18629
  ref,
@@ -18322,7 +18634,7 @@ var Title = forwardRef29(({ className, $textStyle, ...props }, ref) => /* @__PUR
18322
18634
  ...props
18323
18635
  }
18324
18636
  ));
18325
- var Row = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React111.createElement(
18637
+ var Row = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React113.createElement(
18326
18638
  "div",
18327
18639
  {
18328
18640
  ref,
@@ -18330,7 +18642,7 @@ var Row = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React11
18330
18642
  ...props
18331
18643
  }
18332
18644
  ));
18333
- var Column = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React111.createElement(
18645
+ var Column = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React113.createElement(
18334
18646
  "div",
18335
18647
  {
18336
18648
  ref,
@@ -18338,7 +18650,7 @@ var Column = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ Reac
18338
18650
  ...props
18339
18651
  }
18340
18652
  ));
18341
- var Checkbox3 = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React111.createElement(
18653
+ var Checkbox3 = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React113.createElement(
18342
18654
  "input",
18343
18655
  {
18344
18656
  ref,
@@ -18347,7 +18659,7 @@ var Checkbox3 = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ R
18347
18659
  ...props
18348
18660
  }
18349
18661
  ));
18350
- var Text3 = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React111.createElement(
18662
+ var Text3 = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React113.createElement(
18351
18663
  "span",
18352
18664
  {
18353
18665
  ref,
@@ -18355,14 +18667,14 @@ var Text3 = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ React
18355
18667
  ...props
18356
18668
  }
18357
18669
  ));
18358
- var VerticalSeparator = () => /* @__PURE__ */ React111.createElement(Spacer.Vertical, { size: "inspector-v-separator" });
18359
- var HorizontalSeparator = () => /* @__PURE__ */ React111.createElement(Spacer.Horizontal, { size: "inspector-h-separator" });
18670
+ var VerticalSeparator = () => /* @__PURE__ */ React113.createElement(Spacer.Vertical, { size: "inspector-v-separator" });
18671
+ var HorizontalSeparator = () => /* @__PURE__ */ React113.createElement(Spacer.Horizontal, { size: "inspector-h-separator" });
18360
18672
  var RowLabel = forwardRef29(function RowLabel2({
18361
18673
  className,
18362
18674
  $textStyle,
18363
18675
  ...props
18364
18676
  }, ref) {
18365
- return /* @__PURE__ */ React111.createElement(
18677
+ return /* @__PURE__ */ React113.createElement(
18366
18678
  "label",
18367
18679
  {
18368
18680
  ref,
@@ -18374,7 +18686,7 @@ var RowLabel = forwardRef29(function RowLabel2({
18374
18686
  }
18375
18687
  );
18376
18688
  });
18377
- var LabeledRow = memo40(function LabeledRow2({
18689
+ var LabeledRow = memo39(function LabeledRow2({
18378
18690
  id,
18379
18691
  children,
18380
18692
  label,
@@ -18382,7 +18694,7 @@ var LabeledRow = memo40(function LabeledRow2({
18382
18694
  right,
18383
18695
  className
18384
18696
  }) {
18385
- return /* @__PURE__ */ React111.createElement(Row, { id, className }, /* @__PURE__ */ React111.createElement(Column, null, /* @__PURE__ */ React111.createElement(RowLabel, { $textStyle: labelTextStyle }, label, right && /* @__PURE__ */ React111.createElement(Spacer.Horizontal, null), right), /* @__PURE__ */ React111.createElement(Row, null, children)));
18697
+ return /* @__PURE__ */ React113.createElement(Row, { id, className }, /* @__PURE__ */ React113.createElement(Column, null, /* @__PURE__ */ React113.createElement(RowLabel, { $textStyle: labelTextStyle }, label, right && /* @__PURE__ */ React113.createElement(Spacer.Horizontal, null), right), /* @__PURE__ */ React113.createElement(Row, null, children)));
18386
18698
  });
18387
18699
  export {
18388
18700
  AIAssistantInput,
@@ -18521,7 +18833,9 @@ export {
18521
18833
  Tooltip,
18522
18834
  TreeView,
18523
18835
  UserAvatar,
18836
+ UserPicker,
18524
18837
  UserPointer,
18838
+ Virtualized2 as Virtualized,
18525
18839
  WorkspaceLayout,
18526
18840
  WorkspaceSideProvider,
18527
18841
  acceptsDrop,
@@ -18554,6 +18868,7 @@ export {
18554
18868
  getNextIndex,
18555
18869
  getPipelineResultLink,
18556
18870
  getThumbnailColors,
18871
+ getUserDisplayName,
18557
18872
  isMenuItemSectionHeader,
18558
18873
  isNonSelectableMenuItem,
18559
18874
  isPopoverMenuItem,