@noya-app/noya-designsystem 0.1.42 → 0.1.43

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
@@ -13139,29 +13139,59 @@ var Combobox = memo14(
13139
13139
  forwardRef14(function Combobox2({
13140
13140
  id,
13141
13141
  loading,
13142
- initialValue = "",
13143
13142
  placeholder,
13144
13143
  items,
13145
13144
  size: size3,
13146
- onChange,
13147
- onSelectItem,
13148
- onHoverItem,
13149
- onFocus,
13150
- onBlur,
13151
- onDeleteWhenEmpty,
13152
13145
  style: style5,
13153
13146
  className,
13154
13147
  label,
13155
13148
  children: children2,
13156
13149
  hideMenuWhenEmptyValue = false,
13157
- allowArbitraryValues = false,
13158
13150
  readOnly = false,
13159
13151
  tabBehavior = "select",
13160
- openMenuBehavior = "showFilteredItems"
13152
+ openMenuBehavior = "showFilteredItems",
13153
+ onFocus,
13154
+ onDeleteWhenEmpty,
13155
+ ...rest
13161
13156
  }, forwardedRef) {
13157
+ const props = useMemo17(() => {
13158
+ if (rest.mode === "string") {
13159
+ return {
13160
+ mode: rest.mode,
13161
+ initialValue: rest.initialValue,
13162
+ onChange: rest.onChange,
13163
+ onSelectItem: rest.onSelectItem,
13164
+ onHoverItem: rest.onHoverItem,
13165
+ onBlur: rest.onBlur,
13166
+ allowArbitraryValues: rest.allowArbitraryValues
13167
+ };
13168
+ } else {
13169
+ return {
13170
+ mode: rest.mode,
13171
+ initialValue: rest.initialValue,
13172
+ onChange: rest.onChange,
13173
+ onSelectItem: rest.onSelectItem,
13174
+ onHoverItem: rest.onHoverItem,
13175
+ onBlur: rest.onBlur
13176
+ };
13177
+ }
13178
+ }, [
13179
+ rest.mode,
13180
+ rest.initialValue,
13181
+ rest.onChange,
13182
+ rest.onSelectItem,
13183
+ rest.onHoverItem,
13184
+ rest.onBlur,
13185
+ rest.allowArbitraryValues
13186
+ ]);
13162
13187
  const ref = useRef17(null);
13188
+ const initialValueString = typeof props.initialValue === "string" ? props.initialValue : props.initialValue?.name ?? "";
13163
13189
  const [comboboxState] = useState20(
13164
- () => new ComboboxState(items, initialValue, allowArbitraryValues)
13190
+ () => new ComboboxState(
13191
+ items,
13192
+ initialValueString,
13193
+ props.mode === "string" && (props.allowArbitraryValues ?? false)
13194
+ )
13165
13195
  );
13166
13196
  const state = useComboboxState(comboboxState);
13167
13197
  const [isFocused, setIsFocused] = useState20(false);
@@ -13171,11 +13201,7 @@ var Combobox = memo14(
13171
13201
  comboboxState.setItems(items);
13172
13202
  }, [items, comboboxState]);
13173
13203
  const { filter, selectedIndex, filteredItems } = state;
13174
- const shouldShowMenu = useMemo17(() => {
13175
- if (!isFocused) return false;
13176
- if (hideMenuWhenEmptyValue && filter === "") return false;
13177
- return true;
13178
- }, [hideMenuWhenEmptyValue, filter, isFocused]);
13204
+ const shouldShowMenu = isFocused && !(hideMenuWhenEmptyValue && filter === "");
13179
13205
  useEffect15(() => {
13180
13206
  if (listRef.current) {
13181
13207
  listRef.current.scrollToIndex(selectedIndex);
@@ -13183,15 +13209,28 @@ var Combobox = memo14(
13183
13209
  }, [selectedIndex]);
13184
13210
  const handleBlur = useCallback18(() => {
13185
13211
  ref.current?.blur();
13186
- comboboxState.reset(initialValue);
13187
- onBlur?.(state.filter === state.lastSubmittedValue.filter, filter);
13212
+ comboboxState.reset(initialValueString);
13213
+ if (props.mode === "string") {
13214
+ props.onBlur?.(
13215
+ state.filter === state.lastSubmittedValue.filter,
13216
+ filter
13217
+ );
13218
+ } else {
13219
+ const selectedItem = comboboxState.getSelectedItem();
13220
+ if (selectedItem && selectedItem.type !== "sectionHeader") {
13221
+ props.onBlur?.(
13222
+ state.filter === state.lastSubmittedValue.filter,
13223
+ selectedItem
13224
+ );
13225
+ }
13226
+ }
13188
13227
  setIsFocused(false);
13189
- }, [filter, initialValue, onBlur, state, comboboxState]);
13228
+ }, [filter, initialValueString, props, state, comboboxState]);
13190
13229
  const handleFocus = useCallback18(
13191
13230
  (event) => {
13192
13231
  setIsFocused(true);
13193
13232
  comboboxState.reset(
13194
- openMenuBehavior === "showAllItems" ? "" : initialValue
13233
+ openMenuBehavior === "showAllItems" ? "" : initialValueString
13195
13234
  );
13196
13235
  if (ref.current) {
13197
13236
  const length = ref.current.value.length;
@@ -13199,30 +13238,54 @@ var Combobox = memo14(
13199
13238
  }
13200
13239
  onFocus?.(event);
13201
13240
  },
13202
- [initialValue, onFocus, openMenuBehavior, comboboxState]
13241
+ [initialValueString, onFocus, openMenuBehavior, comboboxState]
13203
13242
  );
13204
13243
  const handleUpdateSelection = useCallback18(
13205
13244
  (item) => {
13206
13245
  if (item.type === "sectionHeader") return;
13207
13246
  const selectedItem = comboboxState.selectCurrentItem(item);
13208
13247
  if (!selectedItem || selectedItem.type === "sectionHeader") return;
13209
- onSelectItem?.(selectedItem);
13210
- onHoverItem?.(void 0);
13248
+ if (props.mode === "string") {
13249
+ props.onSelectItem?.(selectedItem.name);
13250
+ props.onHoverItem?.(void 0);
13251
+ } else {
13252
+ props.onSelectItem?.(selectedItem);
13253
+ props.onHoverItem?.(void 0);
13254
+ }
13211
13255
  setShouldBlur(true);
13212
13256
  },
13213
- [onSelectItem, onHoverItem, comboboxState]
13257
+ [props, comboboxState]
13214
13258
  );
13215
13259
  const handleIndexChange = useCallback18(
13216
13260
  (index) => {
13217
13261
  comboboxState.setSelectedIndex(index);
13218
13262
  const item = comboboxState.getSelectedItem();
13219
13263
  if (item && item.type !== "sectionHeader") {
13220
- onHoverItem?.(item);
13264
+ if (props.mode === "string") {
13265
+ props.onHoverItem?.(item.name);
13266
+ } else {
13267
+ props.onHoverItem?.(item);
13268
+ }
13269
+ } else {
13270
+ props.onHoverItem?.(void 0);
13271
+ }
13272
+ },
13273
+ [props, comboboxState]
13274
+ );
13275
+ const handleChange = useCallback18(
13276
+ (value) => {
13277
+ if (readOnly) return;
13278
+ comboboxState.setFilter(value);
13279
+ if (props.mode === "string") {
13280
+ props.onChange?.(value);
13221
13281
  } else {
13222
- onHoverItem?.(void 0);
13282
+ const selectedItem = comboboxState.getSelectedItem();
13283
+ if (selectedItem && selectedItem.type !== "sectionHeader") {
13284
+ props.onChange?.(selectedItem);
13285
+ }
13223
13286
  }
13224
13287
  },
13225
- [onHoverItem, comboboxState]
13288
+ [readOnly, props, comboboxState]
13226
13289
  );
13227
13290
  const handleKeyDown = useCallback18(
13228
13291
  (event) => {
@@ -13241,7 +13304,7 @@ var Combobox = memo14(
13241
13304
  if (shouldShowMenu) {
13242
13305
  if (item) {
13243
13306
  handleUpdateSelection(item);
13244
- } else if (allowArbitraryValues) {
13307
+ } else if (props.mode === "string" && props.allowArbitraryValues) {
13245
13308
  comboboxState.submitArbitraryFilter(filter);
13246
13309
  handleBlur();
13247
13310
  } else {
@@ -13271,7 +13334,7 @@ var Combobox = memo14(
13271
13334
  }
13272
13335
  handled = true;
13273
13336
  }
13274
- } else if (allowArbitraryValues && filter !== "") {
13337
+ } else if (props.mode === "string" && props.allowArbitraryValues && filter !== "") {
13275
13338
  comboboxState.submitArbitraryFilter(filter);
13276
13339
  handleBlur();
13277
13340
  handled = true;
@@ -13306,17 +13369,9 @@ var Combobox = memo14(
13306
13369
  shouldShowMenu,
13307
13370
  comboboxState,
13308
13371
  tabBehavior,
13309
- allowArbitraryValues
13372
+ props
13310
13373
  ]
13311
13374
  );
13312
- const handleChange = useCallback18(
13313
- (value) => {
13314
- if (readOnly) return;
13315
- comboboxState.setFilter(value);
13316
- onChange?.(value);
13317
- },
13318
- [onChange, readOnly, comboboxState]
13319
- );
13320
13375
  const typeaheadValue = comboboxState.getTypeaheadValue();
13321
13376
  useImperativeHandle3(forwardedRef, () => ({
13322
13377
  focus: () => {
@@ -13327,7 +13382,11 @@ var Combobox = memo14(
13327
13382
  }
13328
13383
  },
13329
13384
  setValue: (value) => {
13330
- comboboxState.setFilter(value);
13385
+ if (typeof value === "string") {
13386
+ comboboxState.setFilter(value);
13387
+ } else {
13388
+ comboboxState.setFilter(value.name);
13389
+ }
13331
13390
  },
13332
13391
  selectAllInputText: () => {
13333
13392
  ref.current?.setSelectionRange(0, ref.current.value.length);
@@ -13341,14 +13400,14 @@ var Combobox = memo14(
13341
13400
  return;
13342
13401
  }
13343
13402
  comboboxState.reset(
13344
- openMenuBehavior === "showAllItems" ? "" : initialValue
13403
+ openMenuBehavior === "showAllItems" ? "" : initialValueString
13345
13404
  );
13346
13405
  ref.current?.focus();
13347
13406
  },
13348
13407
  [
13349
13408
  shouldShowMenu,
13350
13409
  openMenuBehavior,
13351
- initialValue,
13410
+ initialValueString,
13352
13411
  handleBlur,
13353
13412
  comboboxState
13354
13413
  ]
@@ -15193,46 +15252,56 @@ var Switch = function Switch2({
15193
15252
  };
15194
15253
 
15195
15254
  // src/components/TextArea.tsx
15196
- import React71, { forwardRef as forwardRef21, memo as memo27, useCallback as useCallback25, useEffect as useEffect16, useRef as useRef20 } from "react";
15255
+ import React71, {
15256
+ forwardRef as forwardRef21,
15257
+ memo as memo27,
15258
+ useCallback as useCallback25,
15259
+ useEffect as useEffect16,
15260
+ useRef as useRef20
15261
+ } from "react";
15197
15262
  var useAutoResize = (value) => {
15198
15263
  const textareaRef = useRef20(null);
15199
15264
  useEffect16(() => {
15265
+ if (value === void 0) return;
15200
15266
  if (!textareaRef.current) return;
15201
15267
  textareaRef.current.style.height = "auto";
15202
15268
  textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`;
15203
15269
  }, [value]);
15204
15270
  return textareaRef;
15205
15271
  };
15206
- var AutoResizingTextArea = memo27(
15207
- forwardRef21(function AutoResizingTextArea2({
15272
+ var TextArea = memo27(
15273
+ forwardRef21(function TextArea2({
15208
15274
  value,
15209
15275
  onChangeText,
15210
15276
  className,
15211
- end,
15212
- endClassName,
15213
15277
  onChange,
15278
+ autoResize = false,
15214
15279
  ...rest
15215
15280
  }, forwardedRef) {
15216
- const ref = useAutoResize(value || rest.placeholder || "");
15281
+ const autoResizeRef = useAutoResize(
15282
+ autoResize ? value || rest.placeholder || "" : void 0
15283
+ );
15217
15284
  const handleChange = useCallback25(
15218
15285
  (event) => {
15219
- onChangeText(event.target.value);
15286
+ onChangeText?.(event.target.value);
15220
15287
  onChange?.(event);
15221
15288
  },
15222
15289
  [onChangeText, onChange]
15223
15290
  );
15224
15291
  const handleRef = useCallback25(
15225
15292
  (value2) => {
15226
- ref.current = value2;
15293
+ if (autoResize) {
15294
+ autoResizeRef.current = value2;
15295
+ }
15227
15296
  assignRef(forwardedRef, value2);
15228
15297
  },
15229
- [ref, forwardedRef]
15298
+ [autoResize, autoResizeRef, forwardedRef]
15230
15299
  );
15231
- return /* @__PURE__ */ React71.createElement("div", { className: "relative w-full h-full" }, /* @__PURE__ */ React71.createElement(
15300
+ return /* @__PURE__ */ React71.createElement(
15232
15301
  "textarea",
15233
15302
  {
15234
15303
  className: cx(
15235
- `font-sans text-heading5 font-normal text-text bg-input-background flex-1 py-1 px-1.5 border-none outline-none min-h-24 w-full rounded resize-none placeholder:text-text-disabled focus:ring-2 focus:ring-primary read-only:text-text-disabled focus:z-interactable transition-all`,
15304
+ `font-sans text-heading5 font-normal text-text bg-input-background flex-1 py-1 px-1.5 border-none outline-none min-h-6 w-full rounded resize-none placeholder:text-text-disabled focus:ring-2 focus:ring-primary read-only:text-text-disabled focus:z-interactable transition-all`,
15236
15305
  className
15237
15306
  ),
15238
15307
  ref: handleRef,
@@ -15240,7 +15309,27 @@ var AutoResizingTextArea = memo27(
15240
15309
  onChange: handleChange,
15241
15310
  value
15242
15311
  }
15243
- ), /* @__PURE__ */ React71.createElement("div", { className: cx("absolute right-1 top-4", endClassName) }, end));
15312
+ );
15313
+ })
15314
+ );
15315
+ var TextAreaRow = memo27(
15316
+ forwardRef21(function TextAreaRow2({
15317
+ className,
15318
+ textAreaClassName,
15319
+ textAreaRef,
15320
+ end,
15321
+ endClassName,
15322
+ ...rest
15323
+ }, forwardedRef) {
15324
+ return /* @__PURE__ */ React71.createElement(
15325
+ "div",
15326
+ {
15327
+ ref: forwardedRef,
15328
+ className: cx("relative w-full h-full", className)
15329
+ },
15330
+ /* @__PURE__ */ React71.createElement(TextArea, { className: textAreaClassName, ...rest, ref: textAreaRef }),
15331
+ /* @__PURE__ */ React71.createElement("div", { className: cx("absolute right-1 top-4", endClassName) }, end)
15332
+ );
15244
15333
  })
15245
15334
  );
15246
15335
 
@@ -15415,6 +15504,7 @@ var UserPointer = memo28(function UserPointer2({
15415
15504
  import { useKeyboardShortcuts as useKeyboardShortcuts3 } from "@noya-app/noya-keymap";
15416
15505
  import React75, {
15417
15506
  forwardRef as forwardRef22,
15507
+ memo as memo29,
15418
15508
  useCallback as useCallback27,
15419
15509
  useImperativeHandle as useImperativeHandle4,
15420
15510
  useRef as useRef22,
@@ -15559,32 +15649,39 @@ function usePreservePanelSize(panelGroupRef, setPanelLayoutState) {
15559
15649
  }
15560
15650
 
15561
15651
  // src/components/WorkspaceLayout.tsx
15562
- var WorkspaceLayoutWithTheme = forwardRef22(function WorkspaceLayoutWithTheme2({
15652
+ var WorkspaceLayout = forwardRef22(function WorkspaceLayout2({
15563
15653
  autoSavePrefix,
15564
- leftSidebarContent: leftPanelContent,
15565
- children: centerPanelContent,
15566
- rightSidebarContent: rightPanelContent,
15567
- hasLeftSidebar = !!leftPanelContent,
15568
- hasRightSidebar = !!rightPanelContent,
15569
- onChangeLayoutState,
15570
- leftSidebarInitialSize = 280,
15571
- rightSidebarInitialSize = 400,
15572
- leftSidebarMinSize,
15573
- rightSidebarMinSize,
15574
- leftSidebarCanResize = false,
15575
- rightSidebarCanResize = false,
15654
+ left,
15655
+ right,
15576
15656
  id,
15577
15657
  className,
15578
- style: style5
15658
+ style: style5,
15659
+ toolbar,
15660
+ children: children2,
15661
+ onChangeLayoutState,
15662
+ leftOptions: {
15663
+ initialSize: leftInitialSize = 280,
15664
+ minSize: leftMinSize,
15665
+ resizable: leftResizable = true,
15666
+ style: leftStyle,
15667
+ className: leftClassName
15668
+ } = {},
15669
+ rightOptions: {
15670
+ initialSize: rightInitialSize = 280,
15671
+ minSize: rightMinSize,
15672
+ resizable: rightResizable = true,
15673
+ style: rightStyle,
15674
+ className: rightClassName
15675
+ } = {}
15579
15676
  }, forwardedRef) {
15580
15677
  const windowSize = useWindowSize();
15581
15678
  function getPercentage(size3) {
15582
15679
  return typeof size3 === "string" ? parseFloat(size3) : size3 / windowSize.width * 100;
15583
15680
  }
15584
- const leftSidebarPercentage = getPercentage(leftSidebarInitialSize);
15585
- const rightSidebarPercentage = getPercentage(rightSidebarInitialSize);
15586
- const leftSidebarMinPercentage = leftSidebarMinSize !== void 0 ? getPercentage(leftSidebarMinSize) : void 0;
15587
- const rightSidebarMinPercentage = rightSidebarMinSize !== void 0 ? getPercentage(rightSidebarMinSize) : void 0;
15681
+ const leftSidebarPercentage = getPercentage(leftInitialSize);
15682
+ const rightSidebarPercentage = getPercentage(rightInitialSize);
15683
+ const leftSidebarMinPercentage = leftMinSize !== void 0 ? getPercentage(leftMinSize) : void 0;
15684
+ const rightSidebarMinPercentage = rightMinSize !== void 0 ? getPercentage(rightMinSize) : void 0;
15588
15685
  const panelGroupRef = useRef22(null);
15589
15686
  const leftSidebarRef = useRef22(null);
15590
15687
  const rightSidebarRef = useRef22(null);
@@ -15598,21 +15695,21 @@ var WorkspaceLayoutWithTheme = forwardRef22(function WorkspaceLayoutWithTheme2({
15598
15695
  );
15599
15696
  usePreservePanelSize(panelGroupRef, handleChangeLayoutState);
15600
15697
  useImperativeHandle4(forwardedRef, () => ({
15601
- setLeftSidebarExpanded: (expanded) => {
15698
+ setLeftExpanded: (expanded) => {
15602
15699
  if (expanded) {
15603
15700
  leftSidebarRef.current?.expand();
15604
15701
  } else {
15605
15702
  leftSidebarRef.current?.collapse();
15606
15703
  }
15607
15704
  },
15608
- setRightSidebarExpanded: (expanded) => {
15705
+ setRightExpanded: (expanded) => {
15609
15706
  if (expanded) {
15610
15707
  rightSidebarRef.current?.expand();
15611
15708
  } else {
15612
15709
  rightSidebarRef.current?.collapse();
15613
15710
  }
15614
15711
  },
15615
- toggleAllSidebars: () => {
15712
+ toggleSides: () => {
15616
15713
  const isLeftSidebarExpanded = leftSidebarRef.current?.isExpanded();
15617
15714
  const isRightSidebarExpanded = rightSidebarRef.current?.isExpanded();
15618
15715
  if (isLeftSidebarExpanded || isRightSidebarExpanded) {
@@ -15623,7 +15720,7 @@ var WorkspaceLayoutWithTheme = forwardRef22(function WorkspaceLayoutWithTheme2({
15623
15720
  rightSidebarRef.current?.expand();
15624
15721
  }
15625
15722
  },
15626
- toggleLeftSidebar: () => {
15723
+ toggleLeft: () => {
15627
15724
  const isLeftSidebarExpanded = leftSidebarRef.current?.isExpanded();
15628
15725
  if (isLeftSidebarExpanded) {
15629
15726
  leftSidebarRef.current?.collapse();
@@ -15631,7 +15728,7 @@ var WorkspaceLayoutWithTheme = forwardRef22(function WorkspaceLayoutWithTheme2({
15631
15728
  leftSidebarRef.current?.expand();
15632
15729
  }
15633
15730
  },
15634
- toggleRightSidebar: () => {
15731
+ toggleRight: () => {
15635
15732
  const isRightSidebarExpanded = rightSidebarRef.current?.isExpanded();
15636
15733
  if (isRightSidebarExpanded) {
15637
15734
  rightSidebarRef.current?.collapse();
@@ -15653,56 +15750,38 @@ var WorkspaceLayoutWithTheme = forwardRef22(function WorkspaceLayoutWithTheme2({
15653
15750
  }
15654
15751
  }
15655
15752
  });
15656
- const centerPanelPercentage = 100 - (leftPanelContent ? leftSidebarPercentage : 0) - (rightPanelContent ? rightSidebarPercentage : 0);
15753
+ const centerPanelPercentage = 100 - (left ? leftSidebarPercentage : 0) - (right ? rightSidebarPercentage : 0);
15657
15754
  return /* @__PURE__ */ React75.createElement(
15658
15755
  "div",
15659
15756
  {
15660
15757
  id,
15661
- className,
15662
- style: {
15663
- backgroundColor: cssVars.colors.canvasBackground,
15664
- display: "flex",
15665
- flexDirection: "row",
15666
- ...style5
15667
- }
15758
+ className: cx("flex flex-col bg-canvas-background", className),
15759
+ style: style5
15668
15760
  },
15669
- /* @__PURE__ */ React75.createElement(
15761
+ toolbar,
15762
+ /* @__PURE__ */ React75.createElement("div", { className: "flex flex-row flex-1" }, /* @__PURE__ */ React75.createElement(
15670
15763
  PanelGroup,
15671
15764
  {
15672
15765
  ref: panelGroupRef,
15673
15766
  id: EDITOR_PANEL_GROUP_ID,
15767
+ className: "flex-1",
15674
15768
  direction: "horizontal",
15675
- autoSaveId: autoSavePrefix ? `${autoSavePrefix}--${EDITOR_PANEL_GROUP_ID}` : void 0,
15676
- style: { flex: "1" }
15769
+ autoSaveId: autoSavePrefix ? `${autoSavePrefix}--${EDITOR_PANEL_GROUP_ID}` : void 0
15677
15770
  },
15678
- hasLeftSidebar && /* @__PURE__ */ React75.createElement(React75.Fragment, null, /* @__PURE__ */ React75.createElement(
15771
+ left && /* @__PURE__ */ React75.createElement(React75.Fragment, null, /* @__PURE__ */ React75.createElement(
15679
15772
  Panel,
15680
15773
  {
15681
15774
  id: LEFT_SIDEBAR_ID,
15775
+ className: "relative",
15682
15776
  order: 1,
15683
15777
  ref: leftSidebarRef,
15684
15778
  defaultSize: leftSidebarPercentage,
15685
15779
  minSize: leftSidebarMinPercentage ?? leftSidebarPercentage,
15686
- ...!leftSidebarCanResize && { maxSize: leftSidebarPercentage },
15687
- collapsible: true,
15688
- style: {
15689
- display: "flex",
15690
- flexDirection: "row",
15691
- position: "relative"
15692
- }
15780
+ ...!leftResizable && { maxSize: leftSidebarPercentage },
15781
+ collapsible: true
15693
15782
  },
15694
- internalLayoutState?.leftSidebarCollapsed ? null : leftPanelContent
15695
- ), /* @__PURE__ */ React75.createElement(
15696
- PanelResizeHandle,
15697
- {
15698
- style: {
15699
- cursor: "col-resize",
15700
- width: "1px",
15701
- height: "100%",
15702
- backgroundColor: cssVars.colors.divider
15703
- }
15704
- }
15705
- )),
15783
+ internalLayoutState?.leftSidebarCollapsed ? null : /* @__PURE__ */ React75.createElement(PanelInner, { style: leftStyle, className: leftClassName }, left)
15784
+ ), /* @__PURE__ */ React75.createElement(PanelResizeHandle, { className: "cursor-col-resize w-px h-full bg-divider" })),
15706
15785
  /* @__PURE__ */ React75.createElement(
15707
15786
  Panel,
15708
15787
  {
@@ -15710,49 +15789,45 @@ var WorkspaceLayoutWithTheme = forwardRef22(function WorkspaceLayoutWithTheme2({
15710
15789
  order: 2,
15711
15790
  defaultSize: centerPanelPercentage,
15712
15791
  minSize: 10,
15713
- style: {
15714
- display: "flex",
15715
- flexDirection: "row",
15716
- position: "relative"
15717
- }
15792
+ className: "flex relative"
15718
15793
  },
15719
- centerPanelContent
15794
+ children2
15720
15795
  ),
15721
- hasRightSidebar && /* @__PURE__ */ React75.createElement(React75.Fragment, null, /* @__PURE__ */ React75.createElement(
15722
- PanelResizeHandle,
15723
- {
15724
- style: {
15725
- cursor: "col-resize",
15726
- width: "1px",
15727
- height: "100%",
15728
- backgroundColor: cssVars.colors.divider
15729
- }
15730
- }
15731
- ), /* @__PURE__ */ React75.createElement(
15796
+ right && /* @__PURE__ */ React75.createElement(React75.Fragment, null, /* @__PURE__ */ React75.createElement(PanelResizeHandle, { className: "cursor-col-resize w-px h-full bg-divider" }), /* @__PURE__ */ React75.createElement(
15732
15797
  Panel,
15733
15798
  {
15734
15799
  id: RIGHT_SIDEBAR_ID,
15800
+ className: "relative",
15735
15801
  order: 3,
15736
15802
  ref: rightSidebarRef,
15737
15803
  minSize: rightSidebarMinPercentage ?? rightSidebarPercentage,
15738
15804
  defaultSize: rightSidebarPercentage,
15739
- ...!rightSidebarCanResize && {
15805
+ ...!rightResizable && {
15740
15806
  maxSize: rightSidebarPercentage
15741
15807
  },
15742
- collapsible: true,
15743
- style: {
15744
- display: "flex",
15745
- flexDirection: "row",
15746
- position: "relative"
15747
- }
15808
+ collapsible: true
15748
15809
  },
15749
- internalLayoutState?.rightSidebarCollapsed ? null : rightPanelContent
15810
+ internalLayoutState?.rightSidebarCollapsed ? null : /* @__PURE__ */ React75.createElement(PanelInner, { style: rightStyle, className: rightClassName }, right)
15750
15811
  ))
15751
- )
15812
+ ))
15752
15813
  );
15753
15814
  });
15754
- var WorkspaceLayout = forwardRef22(function WorkspaceLayout2(props, forwardedRef) {
15755
- return /* @__PURE__ */ React75.createElement(WorkspaceLayoutWithTheme, { ...props, ref: forwardedRef });
15815
+ var PanelInner = memo29(function PanelInner2({
15816
+ children: children2,
15817
+ style: style5,
15818
+ className
15819
+ }) {
15820
+ return /* @__PURE__ */ React75.createElement(
15821
+ "div",
15822
+ {
15823
+ style: style5,
15824
+ className: cx(
15825
+ "absolute inset-0 flex flex-col bg-sidebar-background",
15826
+ className
15827
+ )
15828
+ },
15829
+ children2
15830
+ );
15756
15831
  });
15757
15832
 
15758
15833
  // src/hooks/usePlatform.ts
@@ -15895,7 +15970,7 @@ __export(InspectorPrimitives_exports, {
15895
15970
  });
15896
15971
  import React77, {
15897
15972
  forwardRef as forwardRef23,
15898
- memo as memo30
15973
+ memo as memo31
15899
15974
  } from "react";
15900
15975
  var Section2 = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React77.createElement(
15901
15976
  "div",
@@ -15969,7 +16044,7 @@ var RowLabel = forwardRef23(function RowLabel2({
15969
16044
  }
15970
16045
  );
15971
16046
  });
15972
- var LabeledRow = memo30(function LabeledRow2({
16047
+ var LabeledRow = memo31(function LabeledRow2({
15973
16048
  id,
15974
16049
  children: children2,
15975
16050
  label,
@@ -16073,14 +16148,15 @@ function ToolbarMenu({
16073
16148
  Button,
16074
16149
  {
16075
16150
  key: i,
16151
+ disabled: item.disabled,
16076
16152
  onClick: () => {
16077
16153
  if (onSelectMenuItem && item.value) {
16078
16154
  onSelectMenuItem(item.value);
16079
16155
  }
16080
16156
  }
16081
16157
  },
16082
- item.icon && /* @__PURE__ */ React79.createElement(React79.Fragment, null, renderIcon(item.icon), /* @__PURE__ */ React79.createElement(Spacer.Horizontal, { inline: true, size: 6 })),
16083
- item.title
16158
+ item.title,
16159
+ item.icon && /* @__PURE__ */ React79.createElement(React79.Fragment, null, /* @__PURE__ */ React79.createElement(Spacer.Horizontal, { inline: true, size: 6 }), renderIcon(item.icon))
16084
16160
  );
16085
16161
  }
16086
16162
  return /* @__PURE__ */ React79.createElement(
@@ -16094,14 +16170,13 @@ function ToolbarMenu({
16094
16170
  }
16095
16171
  }
16096
16172
  },
16097
- /* @__PURE__ */ React79.createElement(Button, null, item.icon && /* @__PURE__ */ React79.createElement(React79.Fragment, null, renderIcon(item.icon), /* @__PURE__ */ React79.createElement(Spacer.Horizontal, { size: 6 })), item.title, /* @__PURE__ */ React79.createElement(Spacer.Horizontal, { size: 6 }), /* @__PURE__ */ React79.createElement(DropdownChevronIcon4, null))
16173
+ /* @__PURE__ */ React79.createElement(Button, { disabled: item.disabled }, item.title, /* @__PURE__ */ React79.createElement(Spacer.Horizontal, { size: 6 }), /* @__PURE__ */ React79.createElement(DropdownChevronIcon4, null))
16098
16174
  );
16099
16175
  }));
16100
16176
  }
16101
16177
  export {
16102
16178
  ActivityIndicator,
16103
16179
  AnimatePresence,
16104
- AutoResizingTextArea,
16105
16180
  Avatar,
16106
16181
  AvatarStack,
16107
16182
  BaseToolbar,
@@ -16165,6 +16240,8 @@ export {
16165
16240
  Spacer,
16166
16241
  Switch,
16167
16242
  Text,
16243
+ TextArea,
16244
+ TextAreaRow,
16168
16245
  Toast,
16169
16246
  ToastProvider,
16170
16247
  Toolbar,