@noya-app/noya-designsystem 0.1.82 → 0.1.83
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/.turbo/turbo-build.log +37 -38
- package/.turbo/turbo-lint.log +1 -15
- package/CHANGELOG.md +8 -0
- package/dist/index.css +1 -1
- package/dist/index.d.mts +36 -9
- package/dist/index.d.ts +36 -9
- package/dist/index.js +422 -278
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +411 -267
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/components/SegmentedControl.tsx +227 -48
- package/src/components/resizablePanels/Panel.tsx +22 -2
- package/src/components/resizablePanels/PanelGroup.tsx +15 -8
- package/src/components/workspace/DrawerWorkspaceLayout.tsx +131 -152
- package/src/components/workspace/HorizontalTabBar.tsx +43 -0
- package/src/components/workspace/PanelWorkspaceLayout.tsx +112 -54
- package/src/components/workspace/WorkspaceLayout.tsx +19 -5
- package/src/components/workspace/types.ts +17 -5
- package/src/index.css +12 -2
- package/dist/chunk-D57E6H3M.mjs +0 -36
- package/dist/chunk-D57E6H3M.mjs.map +0 -1
- package/dist/chunk-FJ6ZGZIA.mjs +0 -43
- package/dist/chunk-FJ6ZGZIA.mjs.map +0 -1
- package/dist/chunk-QDV7OQMJ.mjs +0 -37
- package/dist/chunk-QDV7OQMJ.mjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -170,17 +170,17 @@ var require_with_selector_production = __commonJS({
|
|
|
170
170
|
}
|
|
171
171
|
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
172
172
|
var useSyncExternalStore3 = shim.useSyncExternalStore;
|
|
173
|
-
var
|
|
173
|
+
var useRef94 = React321.useRef;
|
|
174
174
|
var useEffect61 = React321.useEffect;
|
|
175
|
-
var
|
|
175
|
+
var useMemo156 = React321.useMemo;
|
|
176
176
|
var useDebugValue2 = React321.useDebugValue;
|
|
177
177
|
exports2.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
178
|
-
var instRef =
|
|
178
|
+
var instRef = useRef94(null);
|
|
179
179
|
if (null === instRef.current) {
|
|
180
180
|
var inst = { hasValue: false, value: null };
|
|
181
181
|
instRef.current = inst;
|
|
182
182
|
} else inst = instRef.current;
|
|
183
|
-
instRef =
|
|
183
|
+
instRef = useMemo156(
|
|
184
184
|
function() {
|
|
185
185
|
function memoizedSelector(nextSnapshot) {
|
|
186
186
|
if (!hasMemo) {
|
|
@@ -237,14 +237,14 @@ var require_with_selector_development = __commonJS({
|
|
|
237
237
|
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
238
238
|
}
|
|
239
239
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
240
|
-
var React321 = require("react"), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore3 = shim.useSyncExternalStore,
|
|
240
|
+
var React321 = require("react"), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore3 = shim.useSyncExternalStore, useRef94 = React321.useRef, useEffect61 = React321.useEffect, useMemo156 = React321.useMemo, useDebugValue2 = React321.useDebugValue;
|
|
241
241
|
exports2.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
242
|
-
var instRef =
|
|
242
|
+
var instRef = useRef94(null);
|
|
243
243
|
if (null === instRef.current) {
|
|
244
244
|
var inst = { hasValue: false, value: null };
|
|
245
245
|
instRef.current = inst;
|
|
246
246
|
} else inst = instRef.current;
|
|
247
|
-
instRef =
|
|
247
|
+
instRef = useMemo156(
|
|
248
248
|
function() {
|
|
249
249
|
function memoizedSelector(nextSnapshot) {
|
|
250
250
|
if (!hasMemo) {
|
|
@@ -31052,6 +31052,12 @@ function applySkinTone(emoji, skinTone) {
|
|
|
31052
31052
|
|
|
31053
31053
|
// src/components/SegmentedControl.tsx
|
|
31054
31054
|
var import_react81 = __toESM(require("react"));
|
|
31055
|
+
var CONTAINER_PADDING_X = "n-px-0.5";
|
|
31056
|
+
var CONTAINER_PADDING_X_PX = 4;
|
|
31057
|
+
var ITEM_PADDING = "n-px-input-padding-x";
|
|
31058
|
+
var ITEM_PADDING_PX = 16;
|
|
31059
|
+
var EXPANSION_THRESHOLD_PX = 20;
|
|
31060
|
+
var RESIZE_SETTLE_MS = 150;
|
|
31055
31061
|
var SegmentedControlContext = (0, import_react81.createContext)({
|
|
31056
31062
|
colorScheme: "primary"
|
|
31057
31063
|
});
|
|
@@ -31065,7 +31071,14 @@ var SegmentedControlItem = (0, import_react81.forwardRef)(function SegmentedCont
|
|
|
31065
31071
|
variant = "default",
|
|
31066
31072
|
...props
|
|
31067
31073
|
}, forwardedRef) {
|
|
31068
|
-
const {
|
|
31074
|
+
const {
|
|
31075
|
+
colorScheme,
|
|
31076
|
+
onSelect,
|
|
31077
|
+
itemWidth = "auto",
|
|
31078
|
+
isCompact
|
|
31079
|
+
} = (0, import_react81.useContext)(SegmentedControlContext);
|
|
31080
|
+
const showTitle = !(isCompact && icon);
|
|
31081
|
+
const effectiveTooltip = !showTitle && !tooltip ? title : tooltip;
|
|
31069
31082
|
const handlePointerDown = (0, import_react81.useCallback)(
|
|
31070
31083
|
(event2) => {
|
|
31071
31084
|
if (disabled2) return;
|
|
@@ -31096,7 +31109,7 @@ var SegmentedControlItem = (0, import_react81.forwardRef)(function SegmentedCont
|
|
|
31096
31109
|
// checked
|
|
31097
31110
|
variant === "tabs" ? "data-[pressed]:n-text-primary" : variant === "buttons" ? "active:n-text-button-text-active active:n-bg-button-background-active data-[pressed]:n-text-button-text-active data-[pressed]:n-bg-button-background-active" : variant === "default" ? (
|
|
31098
31111
|
// default variant: only text color, background handled by sliding indicator
|
|
31099
|
-
colorScheme === "secondary"
|
|
31112
|
+
colorScheme === "secondary" || colorScheme === "primary" ? "data-[pressed]:n-text-white" : "data-[pressed]:n-text-segmented-control-item-active-text"
|
|
31100
31113
|
) : colorScheme === "secondary" ? "data-[pressed]:n-bg-secondary data-[pressed]:n-text-white" : colorScheme === "primary" ? "data-[pressed]:n-bg-primary data-[pressed]:n-text-white" : "data-[pressed]:n-bg-segmented-control-item-active-background data-[pressed]:n-text-segmented-control-item-active-text",
|
|
31101
31114
|
"focus-visible:n-z-interactable",
|
|
31102
31115
|
// checked default (all colorSchemes) - hide separators near selected
|
|
@@ -31104,10 +31117,12 @@ var SegmentedControlItem = (0, import_react81.forwardRef)(function SegmentedCont
|
|
|
31104
31117
|
// hover
|
|
31105
31118
|
variant === "buttons" && "hover:n-bg-button-background-hover",
|
|
31106
31119
|
// spacing and borders
|
|
31107
|
-
|
|
31120
|
+
ITEM_PADDING,
|
|
31108
31121
|
variant === "default" ? "n-rounded after:n-content-[''] after:n-absolute after:n-right-0 after:n-top-0.5 after:n-bottom-0.5 after:n-w-px after:n-bg-divider last:after:n-hidden" : variant === "buttons" ? "n-rounded-sm n-max-w-fit" : "n-border-y-2 n-border-y-transparent data-[pressed]:n-border-b-primary",
|
|
31109
|
-
// icon only buttons
|
|
31122
|
+
// icon only buttons (explicit or due to compact mode)
|
|
31110
31123
|
variant === "buttons" && title === "" && icon && "n-min-w-input-height",
|
|
31124
|
+
// icon only in compact mode
|
|
31125
|
+
isCompact && icon && "n-min-w-input-height",
|
|
31111
31126
|
className
|
|
31112
31127
|
),
|
|
31113
31128
|
...props
|
|
@@ -31121,34 +31136,24 @@ var SegmentedControlItem = (0, import_react81.forwardRef)(function SegmentedCont
|
|
|
31121
31136
|
)
|
|
31122
31137
|
},
|
|
31123
31138
|
icon && renderIcon(icon),
|
|
31124
|
-
title
|
|
31139
|
+
showTitle && title
|
|
31125
31140
|
)
|
|
31126
31141
|
);
|
|
31127
|
-
return
|
|
31142
|
+
return effectiveTooltip ? /* @__PURE__ */ import_react81.default.createElement(Tooltip, { content: effectiveTooltip }, itemElement) : itemElement;
|
|
31128
31143
|
});
|
|
31129
|
-
|
|
31130
|
-
|
|
31131
|
-
|
|
31132
|
-
|
|
31133
|
-
|
|
31134
|
-
|
|
31135
|
-
|
|
31136
|
-
variant = "default",
|
|
31137
|
-
className,
|
|
31138
|
-
style: style2,
|
|
31139
|
-
itemWidth = "auto"
|
|
31144
|
+
function useIndicatorPosition({
|
|
31145
|
+
containerRef,
|
|
31146
|
+
itemRefs,
|
|
31147
|
+
selectedIndex,
|
|
31148
|
+
variant,
|
|
31149
|
+
itemCount,
|
|
31150
|
+
isCompact
|
|
31140
31151
|
}) {
|
|
31141
|
-
const { fieldId: id } = useLabel({ fieldId: idProp });
|
|
31142
31152
|
const hasInitialized = (0, import_react81.useRef)(false);
|
|
31143
|
-
const
|
|
31144
|
-
const
|
|
31153
|
+
const isResizingRef = (0, import_react81.useRef)(false);
|
|
31154
|
+
const resizeTimeoutRef = (0, import_react81.useRef)(void 0);
|
|
31145
31155
|
const [indicatorStyle, setIndicatorStyle] = (0, import_react81.useState)(null);
|
|
31146
|
-
const
|
|
31147
|
-
const selectedIndex = (0, import_react81.useMemo)(() => {
|
|
31148
|
-
if (!value) return -1;
|
|
31149
|
-
return items.findIndex((item) => item.value === value);
|
|
31150
|
-
}, [value, items]);
|
|
31151
|
-
(0, import_react81.useLayoutEffect)(() => {
|
|
31156
|
+
const measureIndicator = (0, import_react81.useCallback)(() => {
|
|
31152
31157
|
if (variant !== "default" || selectedIndex < 0) {
|
|
31153
31158
|
setIndicatorStyle(null);
|
|
31154
31159
|
return;
|
|
@@ -31166,16 +31171,134 @@ var SegmentedControl = memoGeneric(function SegmentedControl2({
|
|
|
31166
31171
|
width: itemRect.width
|
|
31167
31172
|
});
|
|
31168
31173
|
hasInitialized.current = true;
|
|
31169
|
-
}, [selectedIndex, variant,
|
|
31174
|
+
}, [containerRef, itemRefs, selectedIndex, variant, itemCount, isCompact]);
|
|
31175
|
+
(0, import_react81.useLayoutEffect)(measureIndicator, [measureIndicator]);
|
|
31170
31176
|
(0, import_react81.useLayoutEffect)(() => {
|
|
31171
31177
|
const container = containerRef.current;
|
|
31172
31178
|
if (!container || variant !== "default") return;
|
|
31173
31179
|
const observer = new ResizeObserver(() => {
|
|
31174
|
-
|
|
31180
|
+
isResizingRef.current = true;
|
|
31181
|
+
clearTimeout(resizeTimeoutRef.current);
|
|
31182
|
+
resizeTimeoutRef.current = setTimeout(() => {
|
|
31183
|
+
isResizingRef.current = false;
|
|
31184
|
+
}, RESIZE_SETTLE_MS);
|
|
31185
|
+
measureIndicator();
|
|
31175
31186
|
});
|
|
31176
31187
|
observer.observe(container);
|
|
31177
|
-
return () =>
|
|
31178
|
-
|
|
31188
|
+
return () => {
|
|
31189
|
+
observer.disconnect();
|
|
31190
|
+
clearTimeout(resizeTimeoutRef.current);
|
|
31191
|
+
};
|
|
31192
|
+
}, [containerRef, variant, measureIndicator]);
|
|
31193
|
+
return { indicatorStyle, hasInitialized, isResizingRef };
|
|
31194
|
+
}
|
|
31195
|
+
function useCompactMode({
|
|
31196
|
+
containerRef,
|
|
31197
|
+
itemRefs,
|
|
31198
|
+
variant,
|
|
31199
|
+
items,
|
|
31200
|
+
enabled
|
|
31201
|
+
}) {
|
|
31202
|
+
const containerSize = useSize(containerRef, "width");
|
|
31203
|
+
const expandedWidthRef = (0, import_react81.useRef)(null);
|
|
31204
|
+
const isCompactRef = (0, import_react81.useRef)(false);
|
|
31205
|
+
const [isCompact, setIsCompact] = (0, import_react81.useState)(false);
|
|
31206
|
+
const allItemsHaveIcons = (0, import_react81.useMemo)(
|
|
31207
|
+
() => items.every((item) => item.icon),
|
|
31208
|
+
[items]
|
|
31209
|
+
);
|
|
31210
|
+
const itemsKey = (0, import_react81.useMemo)(
|
|
31211
|
+
() => items.map((item) => `${item.value}-${item.icon}-${item.title}`).join("|"),
|
|
31212
|
+
[items]
|
|
31213
|
+
);
|
|
31214
|
+
(0, import_react81.useLayoutEffect)(() => {
|
|
31215
|
+
expandedWidthRef.current = null;
|
|
31216
|
+
isCompactRef.current = false;
|
|
31217
|
+
setIsCompact(false);
|
|
31218
|
+
}, [itemsKey]);
|
|
31219
|
+
(0, import_react81.useLayoutEffect)(() => {
|
|
31220
|
+
if (!enabled) return;
|
|
31221
|
+
const container = containerRef.current;
|
|
31222
|
+
if (!container || variant !== "default" || !allItemsHaveIcons) {
|
|
31223
|
+
return;
|
|
31224
|
+
}
|
|
31225
|
+
const validItems = itemRefs.current.filter(Boolean);
|
|
31226
|
+
if (validItems.length !== items.length) return;
|
|
31227
|
+
const availableWidth = (containerSize?.width ?? container.clientWidth) - CONTAINER_PADDING_X_PX;
|
|
31228
|
+
if (!isCompactRef.current) {
|
|
31229
|
+
const isOverflowing = validItems.some((item) => {
|
|
31230
|
+
const span = item.querySelector("span");
|
|
31231
|
+
if (!span) return false;
|
|
31232
|
+
const contentWidth = span.scrollWidth;
|
|
31233
|
+
const availableInButton = item.clientWidth - ITEM_PADDING_PX;
|
|
31234
|
+
return contentWidth >= availableInButton - 1;
|
|
31235
|
+
});
|
|
31236
|
+
if (isOverflowing) {
|
|
31237
|
+
const totalItemsWidth = validItems.reduce((sum, item) => {
|
|
31238
|
+
const span = item.querySelector("span");
|
|
31239
|
+
const contentWidth = span ? span.scrollWidth : 0;
|
|
31240
|
+
return sum + contentWidth + ITEM_PADDING_PX;
|
|
31241
|
+
}, 0);
|
|
31242
|
+
expandedWidthRef.current = totalItemsWidth;
|
|
31243
|
+
isCompactRef.current = true;
|
|
31244
|
+
setIsCompact(true);
|
|
31245
|
+
}
|
|
31246
|
+
} else {
|
|
31247
|
+
const expandedWidth = expandedWidthRef.current;
|
|
31248
|
+
if (!expandedWidth) return;
|
|
31249
|
+
if (availableWidth >= expandedWidth + EXPANSION_THRESHOLD_PX) {
|
|
31250
|
+
isCompactRef.current = false;
|
|
31251
|
+
expandedWidthRef.current = null;
|
|
31252
|
+
setIsCompact(false);
|
|
31253
|
+
}
|
|
31254
|
+
}
|
|
31255
|
+
}, [
|
|
31256
|
+
enabled,
|
|
31257
|
+
containerRef,
|
|
31258
|
+
itemRefs,
|
|
31259
|
+
variant,
|
|
31260
|
+
allItemsHaveIcons,
|
|
31261
|
+
containerSize?.width,
|
|
31262
|
+
itemsKey,
|
|
31263
|
+
items.length
|
|
31264
|
+
]);
|
|
31265
|
+
return isCompact;
|
|
31266
|
+
}
|
|
31267
|
+
var SegmentedControl = memoGeneric(function SegmentedControl2({
|
|
31268
|
+
id: idProp,
|
|
31269
|
+
value,
|
|
31270
|
+
onValueChange,
|
|
31271
|
+
colorScheme,
|
|
31272
|
+
allowEmpty,
|
|
31273
|
+
items,
|
|
31274
|
+
variant = "default",
|
|
31275
|
+
className,
|
|
31276
|
+
style: style2,
|
|
31277
|
+
itemWidth = "auto",
|
|
31278
|
+
enableCompactMode = false
|
|
31279
|
+
}) {
|
|
31280
|
+
const { fieldId: id } = useLabel({ fieldId: idProp });
|
|
31281
|
+
const containerRef = (0, import_react81.useRef)(null);
|
|
31282
|
+
const itemRefs = (0, import_react81.useRef)([]);
|
|
31283
|
+
const selectedIndex = (0, import_react81.useMemo)(() => {
|
|
31284
|
+
if (!value) return -1;
|
|
31285
|
+
return items.findIndex((item) => item.value === value);
|
|
31286
|
+
}, [value, items]);
|
|
31287
|
+
const isCompact = useCompactMode({
|
|
31288
|
+
containerRef,
|
|
31289
|
+
itemRefs,
|
|
31290
|
+
variant,
|
|
31291
|
+
items,
|
|
31292
|
+
enabled: enableCompactMode
|
|
31293
|
+
});
|
|
31294
|
+
const { indicatorStyle, hasInitialized, isResizingRef } = useIndicatorPosition({
|
|
31295
|
+
containerRef,
|
|
31296
|
+
itemRefs,
|
|
31297
|
+
selectedIndex,
|
|
31298
|
+
variant,
|
|
31299
|
+
itemCount: items.length,
|
|
31300
|
+
isCompact
|
|
31301
|
+
});
|
|
31179
31302
|
const handleSelect = (0, import_react81.useCallback)(
|
|
31180
31303
|
(newValue) => {
|
|
31181
31304
|
if (!allowEmpty && !newValue) return;
|
|
@@ -31188,8 +31311,8 @@ var SegmentedControl = memoGeneric(function SegmentedControl2({
|
|
|
31188
31311
|
[handleSelect]
|
|
31189
31312
|
);
|
|
31190
31313
|
const contextValue = (0, import_react81.useMemo)(
|
|
31191
|
-
() => ({ colorScheme, onSelect: handleSelect, itemWidth }),
|
|
31192
|
-
[colorScheme, handleSelect, itemWidth]
|
|
31314
|
+
() => ({ colorScheme, onSelect: handleSelect, itemWidth, isCompact }),
|
|
31315
|
+
[colorScheme, handleSelect, itemWidth, isCompact]
|
|
31193
31316
|
);
|
|
31194
31317
|
const indicatorBgClass = colorScheme === "secondary" ? "n-bg-secondary" : colorScheme === "primary" ? "n-bg-primary" : "n-bg-segmented-control-item-active-background";
|
|
31195
31318
|
return /* @__PURE__ */ import_react81.default.createElement(SegmentedControlContext.Provider, { value: contextValue }, /* @__PURE__ */ import_react81.default.createElement(
|
|
@@ -31202,7 +31325,7 @@ var SegmentedControl = memoGeneric(function SegmentedControl2({
|
|
|
31202
31325
|
className: cx(
|
|
31203
31326
|
"n-appearance-none n-relative n-outline-none",
|
|
31204
31327
|
variant === "default" && (itemWidth === "fit" ? "n-flex n-w-fit" : "n-grid"),
|
|
31205
|
-
variant === "default" &&
|
|
31328
|
+
variant === "default" && `n-min-h-input-height n-bg-input-background n-rounded n-py-0.5 ${CONTAINER_PADDING_X}`,
|
|
31206
31329
|
variant !== "default" && "n-flex",
|
|
31207
31330
|
variant === "tabs" && "n-gap-1.5 n-min-h-[33px]",
|
|
31208
31331
|
variant === "buttons" && "n-gap-1.5 n-min-h-input-height",
|
|
@@ -31221,7 +31344,7 @@ var SegmentedControl = memoGeneric(function SegmentedControl2({
|
|
|
31221
31344
|
className: cx(
|
|
31222
31345
|
"n-absolute n-top-0.5 n-bottom-0.5 n-rounded n-shadow-segment n-pointer-events-none",
|
|
31223
31346
|
indicatorBgClass,
|
|
31224
|
-
hasInitialized.current && "n-transition-[left,width] n-duration-200 n-ease-out"
|
|
31347
|
+
hasInitialized.current && !isResizingRef.current && "n-transition-[left,width] n-duration-200 n-ease-out"
|
|
31225
31348
|
),
|
|
31226
31349
|
style: {
|
|
31227
31350
|
left: indicatorStyle.left,
|
|
@@ -41367,15 +41490,6 @@ function OverlayToolbar({
|
|
|
41367
41490
|
}
|
|
41368
41491
|
|
|
41369
41492
|
// src/components/workspace/DrawerWorkspaceLayout.tsx
|
|
41370
|
-
var import_react114 = __toESM(require("react"));
|
|
41371
|
-
|
|
41372
|
-
// src/components/workspace/constants.ts
|
|
41373
|
-
var EDITOR_PANEL_GROUP_ID = "editor-panel-group";
|
|
41374
|
-
var LEFT_SIDEBAR_ID = "editor-1-left-sidebar";
|
|
41375
|
-
var RIGHT_SIDEBAR_ID = "editor-3-right-sidebar";
|
|
41376
|
-
var CONTENT_AREA_ID = "editor-2-content-area";
|
|
41377
|
-
|
|
41378
|
-
// src/components/workspace/VerticalTabMenu.tsx
|
|
41379
41493
|
var import_react113 = __toESM(require("react"));
|
|
41380
41494
|
|
|
41381
41495
|
// src/components/Toolbar.tsx
|
|
@@ -41688,38 +41802,11 @@ function Toolbar({
|
|
|
41688
41802
|
);
|
|
41689
41803
|
}
|
|
41690
41804
|
|
|
41691
|
-
// src/components/workspace/
|
|
41692
|
-
var
|
|
41693
|
-
|
|
41694
|
-
|
|
41695
|
-
|
|
41696
|
-
onChange,
|
|
41697
|
-
tooltipSide
|
|
41698
|
-
}) {
|
|
41699
|
-
const style2 = (0, import_react113.useMemo)(() => {
|
|
41700
|
-
return {
|
|
41701
|
-
[cssVarNames.colors.inputBackground]: "transparent",
|
|
41702
|
-
[cssVarNames.colors.buttonBackground]: "transparent"
|
|
41703
|
-
};
|
|
41704
|
-
}, []);
|
|
41705
|
-
return /* @__PURE__ */ import_react113.default.createElement(
|
|
41706
|
-
"div",
|
|
41707
|
-
{
|
|
41708
|
-
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",
|
|
41709
|
-
style: style2
|
|
41710
|
-
},
|
|
41711
|
-
/* @__PURE__ */ import_react113.default.createElement(
|
|
41712
|
-
ToolbarMenu,
|
|
41713
|
-
{
|
|
41714
|
-
items,
|
|
41715
|
-
activeValue: isSidebarCollapsed ? void 0 : activeValue,
|
|
41716
|
-
onSelectMenuItem: onChange,
|
|
41717
|
-
tooltipSide,
|
|
41718
|
-
displayFilter: "iconOnly"
|
|
41719
|
-
}
|
|
41720
|
-
)
|
|
41721
|
-
);
|
|
41722
|
-
});
|
|
41805
|
+
// src/components/workspace/constants.ts
|
|
41806
|
+
var EDITOR_PANEL_GROUP_ID = "editor-panel-group";
|
|
41807
|
+
var LEFT_SIDEBAR_ID = "editor-1-left-sidebar";
|
|
41808
|
+
var RIGHT_SIDEBAR_ID = "editor-3-right-sidebar";
|
|
41809
|
+
var CONTENT_AREA_ID = "editor-2-content-area";
|
|
41723
41810
|
|
|
41724
41811
|
// src/components/workspace/DrawerWorkspaceLayout.tsx
|
|
41725
41812
|
var DrawerWorkspaceLayout = memoGeneric(function DrawerWorkspaceLayout2({
|
|
@@ -41733,158 +41820,130 @@ var DrawerWorkspaceLayout = memoGeneric(function DrawerWorkspaceLayout2({
|
|
|
41733
41820
|
rightTabItems,
|
|
41734
41821
|
rightTabValue,
|
|
41735
41822
|
onChangeRightTab,
|
|
41736
|
-
onChangeLeftTab
|
|
41737
|
-
compactDrawerMenu
|
|
41823
|
+
onChangeLeftTab
|
|
41738
41824
|
}) {
|
|
41739
|
-
const
|
|
41740
|
-
const [{ leftSidebarCollapsed, rightSidebarCollapsed }, setLayoutState] = (0, import_react114.useState)({
|
|
41825
|
+
const [{ leftSidebarCollapsed, rightSidebarCollapsed }, setLayoutState] = (0, import_react113.useState)({
|
|
41741
41826
|
leftSidebarCollapsed: true,
|
|
41742
41827
|
rightSidebarCollapsed: true
|
|
41743
41828
|
});
|
|
41744
|
-
|
|
41829
|
+
import_react113.default.useImperativeHandle(
|
|
41830
|
+
leftSidebarRef,
|
|
41831
|
+
() => ({
|
|
41832
|
+
expand: () => setLayoutState((prev) => ({
|
|
41833
|
+
...prev,
|
|
41834
|
+
leftSidebarCollapsed: false,
|
|
41835
|
+
rightSidebarCollapsed: true
|
|
41836
|
+
})),
|
|
41837
|
+
collapse: () => setLayoutState((prev) => ({ ...prev, leftSidebarCollapsed: true })),
|
|
41838
|
+
isExpanded: () => !leftSidebarCollapsed
|
|
41839
|
+
}),
|
|
41840
|
+
[leftSidebarCollapsed]
|
|
41841
|
+
);
|
|
41842
|
+
import_react113.default.useImperativeHandle(
|
|
41843
|
+
rightSidebarRef,
|
|
41844
|
+
() => ({
|
|
41845
|
+
expand: () => setLayoutState((prev) => ({
|
|
41846
|
+
...prev,
|
|
41847
|
+
rightSidebarCollapsed: false,
|
|
41848
|
+
leftSidebarCollapsed: true
|
|
41849
|
+
})),
|
|
41850
|
+
collapse: () => setLayoutState((prev) => ({ ...prev, rightSidebarCollapsed: true })),
|
|
41851
|
+
isExpanded: () => !rightSidebarCollapsed
|
|
41852
|
+
}),
|
|
41853
|
+
[rightSidebarCollapsed]
|
|
41854
|
+
);
|
|
41855
|
+
const allTabItems = (0, import_react113.useMemo)(
|
|
41745
41856
|
() => [
|
|
41746
41857
|
...leftPanel ? leftTabItems ?? [] : [],
|
|
41747
41858
|
...rightPanel ? rightTabItems ?? [] : []
|
|
41748
41859
|
],
|
|
41749
41860
|
[leftTabItems, rightTabItems, leftPanel, rightPanel]
|
|
41750
41861
|
);
|
|
41751
|
-
const
|
|
41752
|
-
const allSelectableTabItems = (0, import_react114.useMemo)(
|
|
41862
|
+
const allSelectableTabItems = (0, import_react113.useMemo)(
|
|
41753
41863
|
() => allTabItems.filter(isSelectableMenuItem),
|
|
41754
41864
|
[allTabItems]
|
|
41755
41865
|
);
|
|
41756
|
-
const
|
|
41757
|
-
const leftSelectableTabItems = (0,
|
|
41866
|
+
const hasTabs = allSelectableTabItems.length > 0;
|
|
41867
|
+
const leftSelectableTabItems = (0, import_react113.useMemo)(
|
|
41758
41868
|
() => (leftTabItems ?? []).filter(isSelectableMenuItem),
|
|
41759
41869
|
[leftTabItems]
|
|
41760
41870
|
);
|
|
41761
|
-
const rightSelectableTabItems = (0,
|
|
41871
|
+
const rightSelectableTabItems = (0, import_react113.useMemo)(
|
|
41762
41872
|
() => (rightTabItems ?? []).filter(isSelectableMenuItem),
|
|
41763
41873
|
[rightTabItems]
|
|
41764
41874
|
);
|
|
41765
|
-
const toggleSidebar = (ref) => {
|
|
41766
|
-
if (ref.current?.isExpanded()) {
|
|
41767
|
-
ref.current?.collapse();
|
|
41768
|
-
} else {
|
|
41769
|
-
ref.current?.expand();
|
|
41770
|
-
}
|
|
41771
|
-
};
|
|
41772
|
-
const ensureExpanded = (ref) => {
|
|
41773
|
-
if (!ref.current?.isExpanded()) {
|
|
41774
|
-
ref.current?.expand();
|
|
41775
|
-
}
|
|
41776
|
-
};
|
|
41777
41875
|
const handleSelectTab = (value) => {
|
|
41778
|
-
|
|
41779
|
-
|
|
41780
|
-
|
|
41876
|
+
const isLeftItem = leftSelectableTabItems.some(
|
|
41877
|
+
(item) => item.value === value
|
|
41878
|
+
);
|
|
41879
|
+
const isRightItem = rightSelectableTabItems.some(
|
|
41880
|
+
(item) => item.value === value
|
|
41881
|
+
);
|
|
41882
|
+
if (isLeftItem) {
|
|
41883
|
+
if (value === leftTabValue && !leftSidebarCollapsed) {
|
|
41884
|
+
setLayoutState((prev) => ({ ...prev, leftSidebarCollapsed: true }));
|
|
41781
41885
|
} else {
|
|
41782
|
-
|
|
41886
|
+
setLayoutState({
|
|
41887
|
+
leftSidebarCollapsed: false,
|
|
41888
|
+
rightSidebarCollapsed: true
|
|
41889
|
+
});
|
|
41783
41890
|
onChangeLeftTab?.(value);
|
|
41784
41891
|
}
|
|
41785
|
-
} else if (
|
|
41786
|
-
if (value === rightTabValue) {
|
|
41787
|
-
|
|
41892
|
+
} else if (isRightItem) {
|
|
41893
|
+
if (value === rightTabValue && !rightSidebarCollapsed) {
|
|
41894
|
+
setLayoutState((prev) => ({ ...prev, rightSidebarCollapsed: true }));
|
|
41788
41895
|
} else {
|
|
41789
|
-
|
|
41896
|
+
setLayoutState({
|
|
41897
|
+
leftSidebarCollapsed: true,
|
|
41898
|
+
rightSidebarCollapsed: false
|
|
41899
|
+
});
|
|
41790
41900
|
onChangeRightTab?.(value);
|
|
41791
41901
|
}
|
|
41792
41902
|
}
|
|
41793
41903
|
};
|
|
41794
|
-
const
|
|
41795
|
-
|
|
41796
|
-
|
|
41797
|
-
|
|
41798
|
-
|
|
41904
|
+
const activeDrawerPanel = !leftSidebarCollapsed ? leftPanel : !rightSidebarCollapsed ? rightPanel : null;
|
|
41905
|
+
const isDrawerOpen = activeDrawerPanel !== null;
|
|
41906
|
+
const activeTabValue = !leftSidebarCollapsed ? leftTabValue : !rightSidebarCollapsed ? rightTabValue : void 0;
|
|
41907
|
+
const toolbarMenuItems = (0, import_react113.useMemo)(
|
|
41908
|
+
() => allSelectableTabItems.map((item) => ({
|
|
41909
|
+
...item,
|
|
41910
|
+
checked: activeTabValue === item.value
|
|
41911
|
+
})),
|
|
41912
|
+
[allSelectableTabItems, activeTabValue]
|
|
41913
|
+
);
|
|
41914
|
+
return /* @__PURE__ */ import_react113.default.createElement(
|
|
41799
41915
|
"div",
|
|
41800
41916
|
{
|
|
41801
|
-
ref: portalContainer,
|
|
41802
41917
|
id: EDITOR_PANEL_GROUP_ID,
|
|
41803
|
-
className: "n-flex n-flex-1 n-relative focus:n-outline-none"
|
|
41918
|
+
className: "n-flex n-flex-col n-flex-1 n-relative focus:n-outline-none"
|
|
41804
41919
|
},
|
|
41805
|
-
hasTabs &&
|
|
41806
|
-
|
|
41807
|
-
{
|
|
41808
|
-
tooltipSide: "right",
|
|
41809
|
-
items: allTabItems,
|
|
41810
|
-
activeValue,
|
|
41811
|
-
isSidebarCollapsed,
|
|
41812
|
-
onChange: (value) => handleSelectTab(value)
|
|
41813
|
-
}
|
|
41814
|
-
), /* @__PURE__ */ import_react114.default.createElement(DividerVertical, { className: "n-h-full" })),
|
|
41815
|
-
useCompactInToolbar && /* @__PURE__ */ import_react114.default.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__ */ import_react114.default.createElement(
|
|
41816
|
-
Button,
|
|
41920
|
+
hasTabs && /* @__PURE__ */ import_react113.default.createElement(import_react113.default.Fragment, null, /* @__PURE__ */ import_react113.default.createElement(
|
|
41921
|
+
"div",
|
|
41817
41922
|
{
|
|
41818
|
-
|
|
41819
|
-
className: "n-rounded",
|
|
41923
|
+
className: "n-flex n-flex-row n-items-center n-gap-1 n-px-2 n-py-1.5 n-bg-sidebar-background n-flex-none",
|
|
41820
41924
|
style: {
|
|
41821
|
-
|
|
41822
|
-
|
|
41823
|
-
},
|
|
41824
|
-
icon: allSelectableTabItems[0].icon,
|
|
41825
|
-
tooltip: allSelectableTabItems[0].tooltip ?? allSelectableTabItems[0].title,
|
|
41826
|
-
active: (() => {
|
|
41827
|
-
const value = allSelectableTabItems[0].value;
|
|
41828
|
-
const isLeftItem = leftSelectableTabItems.some(
|
|
41829
|
-
(i) => i.value === value
|
|
41830
|
-
);
|
|
41831
|
-
const isRightItem = rightSelectableTabItems.some(
|
|
41832
|
-
(i) => i.value === value
|
|
41833
|
-
);
|
|
41834
|
-
return isLeftItem ? !leftSidebarCollapsed : isRightItem ? !rightSidebarCollapsed : false;
|
|
41835
|
-
})(),
|
|
41836
|
-
onClick: () => {
|
|
41837
|
-
const value = allSelectableTabItems[0].value;
|
|
41838
|
-
handleSelectTab(value);
|
|
41839
|
-
}
|
|
41840
|
-
}
|
|
41841
|
-
)),
|
|
41842
|
-
/* @__PURE__ */ import_react114.default.createElement("div", { className: "n-flex-1 n-flex n-relative" }, centerPanel),
|
|
41843
|
-
leftPanel && /* @__PURE__ */ import_react114.default.createElement(
|
|
41844
|
-
Drawer,
|
|
41845
|
-
{
|
|
41846
|
-
modal: false,
|
|
41847
|
-
ref: leftSidebarRef,
|
|
41848
|
-
className: "n-flex-1",
|
|
41849
|
-
style: useCompactInToolbar ? void 0 : { left: 48, maxWidth: "calc(100% - 48px)" },
|
|
41850
|
-
overlayStyle: useCompactInToolbar ? void 0 : { left: 48 },
|
|
41851
|
-
open: !leftSidebarCollapsed,
|
|
41852
|
-
positioning: "absolute",
|
|
41853
|
-
side: "left",
|
|
41854
|
-
trigger: null,
|
|
41855
|
-
portalContainer: portalContainer.current,
|
|
41856
|
-
onOpenChange: (open2) => {
|
|
41857
|
-
setLayoutState({
|
|
41858
|
-
leftSidebarCollapsed: !open2,
|
|
41859
|
-
rightSidebarCollapsed
|
|
41860
|
-
});
|
|
41925
|
+
[cssVarNames.colors.inputBackground]: "transparent",
|
|
41926
|
+
[cssVarNames.colors.buttonBackground]: "transparent"
|
|
41861
41927
|
}
|
|
41862
41928
|
},
|
|
41863
|
-
|
|
41864
|
-
|
|
41865
|
-
|
|
41866
|
-
|
|
41867
|
-
|
|
41868
|
-
id: RIGHT_SIDEBAR_ID,
|
|
41869
|
-
modal: false,
|
|
41870
|
-
ref: rightSidebarRef,
|
|
41871
|
-
className: "n-flex-1",
|
|
41872
|
-
style: useCompactInToolbar ? void 0 : { left: 48, maxWidth: "calc(100% - 48px)" },
|
|
41873
|
-
overlayStyle: useCompactInToolbar ? void 0 : { left: 48 },
|
|
41874
|
-
open: !rightSidebarCollapsed,
|
|
41875
|
-
positioning: "absolute",
|
|
41876
|
-
side: "left",
|
|
41877
|
-
trigger: null,
|
|
41878
|
-
portalContainer: portalContainer.current,
|
|
41879
|
-
onOpenChange: (open2) => {
|
|
41880
|
-
setLayoutState({
|
|
41881
|
-
leftSidebarCollapsed,
|
|
41882
|
-
rightSidebarCollapsed: !open2
|
|
41883
|
-
});
|
|
41929
|
+
/* @__PURE__ */ import_react113.default.createElement(
|
|
41930
|
+
ToolbarMenu,
|
|
41931
|
+
{
|
|
41932
|
+
items: toolbarMenuItems,
|
|
41933
|
+
onSelectMenuItem: handleSelectTab
|
|
41884
41934
|
}
|
|
41885
|
-
|
|
41886
|
-
|
|
41887
|
-
)
|
|
41935
|
+
)
|
|
41936
|
+
), /* @__PURE__ */ import_react113.default.createElement(Divider, null)),
|
|
41937
|
+
/* @__PURE__ */ import_react113.default.createElement("div", { className: "n-flex-1 n-flex n-flex-col n-relative n-min-h-0" }, isDrawerOpen && /* @__PURE__ */ import_react113.default.createElement("div", { className: "n-absolute n-inset-0 n-z-20 n-flex n-flex-col" }, /* @__PURE__ */ import_react113.default.createElement("div", { className: "n-flex-none n-max-h-[50vh] n-overflow-auto n-bg-sidebar-background n-border-b n-border-divider-strong n-shadow-lg" }, activeDrawerPanel), /* @__PURE__ */ import_react113.default.createElement(
|
|
41938
|
+
"div",
|
|
41939
|
+
{
|
|
41940
|
+
className: "n-flex-1 n-bg-black/30",
|
|
41941
|
+
onClick: () => setLayoutState({
|
|
41942
|
+
leftSidebarCollapsed: true,
|
|
41943
|
+
rightSidebarCollapsed: true
|
|
41944
|
+
})
|
|
41945
|
+
}
|
|
41946
|
+
)), /* @__PURE__ */ import_react113.default.createElement("div", { className: "n-flex-1 n-flex n-relative n-min-h-0" }, centerPanel))
|
|
41888
41947
|
);
|
|
41889
41948
|
});
|
|
41890
41949
|
|
|
@@ -41892,15 +41951,15 @@ var DrawerWorkspaceLayout = memoGeneric(function DrawerWorkspaceLayout2({
|
|
|
41892
41951
|
var import_react119 = __toESM(require("react"));
|
|
41893
41952
|
|
|
41894
41953
|
// src/components/resizablePanels/Panel.tsx
|
|
41895
|
-
var
|
|
41954
|
+
var import_react115 = __toESM(require("react"));
|
|
41896
41955
|
|
|
41897
41956
|
// src/components/resizablePanels/PanelGroupContext.tsx
|
|
41898
|
-
var
|
|
41899
|
-
var PanelGroupContext = (0,
|
|
41957
|
+
var import_react114 = require("react");
|
|
41958
|
+
var PanelGroupContext = (0, import_react114.createContext)(
|
|
41900
41959
|
null
|
|
41901
41960
|
);
|
|
41902
41961
|
function usePanelGroupContext() {
|
|
41903
|
-
const context = (0,
|
|
41962
|
+
const context = (0, import_react114.useContext)(PanelGroupContext);
|
|
41904
41963
|
if (!context) {
|
|
41905
41964
|
throw new Error("Panel must be used within a PanelGroup");
|
|
41906
41965
|
}
|
|
@@ -41908,9 +41967,19 @@ function usePanelGroupContext() {
|
|
|
41908
41967
|
}
|
|
41909
41968
|
|
|
41910
41969
|
// src/components/resizablePanels/Panel.tsx
|
|
41911
|
-
var Panel = (0,
|
|
41912
|
-
function Panel2({
|
|
41913
|
-
|
|
41970
|
+
var Panel = (0, import_react115.forwardRef)(
|
|
41971
|
+
function Panel2({
|
|
41972
|
+
id: propId,
|
|
41973
|
+
order,
|
|
41974
|
+
className,
|
|
41975
|
+
defaultSize,
|
|
41976
|
+
minSize,
|
|
41977
|
+
maxSize,
|
|
41978
|
+
collapsible,
|
|
41979
|
+
defaultCollapsed,
|
|
41980
|
+
children
|
|
41981
|
+
}, ref) {
|
|
41982
|
+
const generatedId = (0, import_react115.useId)();
|
|
41914
41983
|
const id = propId ?? generatedId;
|
|
41915
41984
|
const context = usePanelGroupContext();
|
|
41916
41985
|
const {
|
|
@@ -41921,7 +41990,7 @@ var Panel = (0, import_react116.forwardRef)(
|
|
|
41921
41990
|
collapsePanel,
|
|
41922
41991
|
isPanelExpanded
|
|
41923
41992
|
} = context;
|
|
41924
|
-
(0,
|
|
41993
|
+
(0, import_react115.useEffect)(() => {
|
|
41925
41994
|
registerPanel({
|
|
41926
41995
|
id,
|
|
41927
41996
|
order,
|
|
@@ -41934,10 +42003,20 @@ var Panel = (0, import_react116.forwardRef)(
|
|
|
41934
42003
|
return () => {
|
|
41935
42004
|
unregisterPanel(id);
|
|
41936
42005
|
};
|
|
41937
|
-
}, [
|
|
42006
|
+
}, [
|
|
42007
|
+
id,
|
|
42008
|
+
order,
|
|
42009
|
+
defaultSize,
|
|
42010
|
+
minSize,
|
|
42011
|
+
maxSize,
|
|
42012
|
+
collapsible,
|
|
42013
|
+
defaultCollapsed,
|
|
42014
|
+
registerPanel,
|
|
42015
|
+
unregisterPanel
|
|
42016
|
+
]);
|
|
41938
42017
|
const size4 = getPanelSize(id);
|
|
41939
42018
|
const isFlexPanel = defaultSize === void 0;
|
|
41940
|
-
(0,
|
|
42019
|
+
(0, import_react115.useImperativeHandle)(
|
|
41941
42020
|
ref,
|
|
41942
42021
|
() => ({
|
|
41943
42022
|
expand: () => expandPanel(id),
|
|
@@ -41950,7 +42029,7 @@ var Panel = (0, import_react116.forwardRef)(
|
|
|
41950
42029
|
if (size4 === 0 && !isFlexPanel) {
|
|
41951
42030
|
return null;
|
|
41952
42031
|
}
|
|
41953
|
-
return /* @__PURE__ */
|
|
42032
|
+
return /* @__PURE__ */ import_react115.default.createElement(
|
|
41954
42033
|
"div",
|
|
41955
42034
|
{
|
|
41956
42035
|
"data-panel-id": id,
|
|
@@ -41965,7 +42044,7 @@ var Panel = (0, import_react116.forwardRef)(
|
|
|
41965
42044
|
);
|
|
41966
42045
|
|
|
41967
42046
|
// src/components/resizablePanels/PanelGroup.tsx
|
|
41968
|
-
var
|
|
42047
|
+
var import_react116 = __toESM(require("react"));
|
|
41969
42048
|
function getStorageKey(autoSaveId) {
|
|
41970
42049
|
return `noya-panels:${autoSaveId}`;
|
|
41971
42050
|
}
|
|
@@ -41983,19 +42062,19 @@ function saveSizes(autoSaveId, sizes) {
|
|
|
41983
42062
|
if (!autoSaveId) return;
|
|
41984
42063
|
clientStorage.setItem(getStorageKey(autoSaveId), JSON.stringify(sizes));
|
|
41985
42064
|
}
|
|
41986
|
-
var PanelGroup = (0,
|
|
42065
|
+
var PanelGroup = (0, import_react116.forwardRef)(
|
|
41987
42066
|
function PanelGroup2({ id, className, direction, autoSaveId, onLayout, children }, ref) {
|
|
41988
|
-
const containerRef = (0,
|
|
42067
|
+
const containerRef = (0, import_react116.useRef)(null);
|
|
41989
42068
|
const containerSize = useSize(containerRef);
|
|
41990
42069
|
const containerWidth = containerSize?.width ?? 0;
|
|
41991
|
-
const [panels, setPanels] = (0,
|
|
41992
|
-
const panelsRef = (0,
|
|
42070
|
+
const [panels, setPanels] = (0, import_react116.useState)(/* @__PURE__ */ new Map());
|
|
42071
|
+
const panelsRef = (0, import_react116.useRef)(panels);
|
|
41993
42072
|
panelsRef.current = panels;
|
|
41994
|
-
const [resizing, setResizing] = (0,
|
|
41995
|
-
const sortedPanels = (0,
|
|
42073
|
+
const [resizing, setResizing] = (0, import_react116.useState)(null);
|
|
42074
|
+
const sortedPanels = (0, import_react116.useMemo)(() => {
|
|
41996
42075
|
return Array.from(panels.values()).sort((a, b) => a.order - b.order);
|
|
41997
42076
|
}, [panels]);
|
|
41998
|
-
const flexPanelId = (0,
|
|
42077
|
+
const flexPanelId = (0, import_react116.useMemo)(() => {
|
|
41999
42078
|
for (const panel of sortedPanels) {
|
|
42000
42079
|
if (panel.defaultSize === void 0) {
|
|
42001
42080
|
return panel.id;
|
|
@@ -42003,7 +42082,7 @@ var PanelGroup = (0, import_react117.forwardRef)(
|
|
|
42003
42082
|
}
|
|
42004
42083
|
return null;
|
|
42005
42084
|
}, [sortedPanels]);
|
|
42006
|
-
const calculateLayout = (0,
|
|
42085
|
+
const calculateLayout = (0, import_react116.useCallback)(
|
|
42007
42086
|
(panelStates, width) => {
|
|
42008
42087
|
if (width === 0) return panelStates;
|
|
42009
42088
|
const sorted = Array.from(panelStates.values()).sort(
|
|
@@ -42028,25 +42107,30 @@ var PanelGroup = (0, import_react117.forwardRef)(
|
|
|
42028
42107
|
},
|
|
42029
42108
|
[]
|
|
42030
42109
|
);
|
|
42031
|
-
(0,
|
|
42110
|
+
(0, import_react116.useEffect)(() => {
|
|
42032
42111
|
if (containerWidth > 0 && panels.size > 0) {
|
|
42033
42112
|
setPanels((prev) => calculateLayout(prev, containerWidth));
|
|
42034
42113
|
}
|
|
42035
42114
|
}, [containerWidth, calculateLayout, panels.size]);
|
|
42036
|
-
(0,
|
|
42115
|
+
(0, import_react116.useEffect)(() => {
|
|
42037
42116
|
if (onLayout && sortedPanels.length > 0) {
|
|
42038
42117
|
const sizes = sortedPanels.map((p) => p.collapsed ? 0 : p.size);
|
|
42039
42118
|
onLayout(sizes);
|
|
42040
42119
|
}
|
|
42041
42120
|
}, [onLayout, sortedPanels]);
|
|
42042
|
-
const registerPanel = (0,
|
|
42121
|
+
const registerPanel = (0, import_react116.useCallback)(
|
|
42043
42122
|
(panel) => {
|
|
42044
42123
|
setPanels((prev) => {
|
|
42045
42124
|
const savedSizes = loadSavedSizes(autoSaveId);
|
|
42046
42125
|
const savedSize = savedSizes?.[panel.id];
|
|
42047
42126
|
const hasSavedSize = savedSize !== void 0;
|
|
42048
|
-
|
|
42049
|
-
|
|
42127
|
+
let collapsed;
|
|
42128
|
+
if (hasSavedSize) {
|
|
42129
|
+
collapsed = savedSize === 0 && !!panel.collapsible;
|
|
42130
|
+
} else {
|
|
42131
|
+
collapsed = !!panel.defaultCollapsed && !!panel.collapsible;
|
|
42132
|
+
}
|
|
42133
|
+
const initialSize = collapsed ? 0 : hasSavedSize ? savedSize : panel.defaultSize ?? 0;
|
|
42050
42134
|
const newPanels = new Map(prev);
|
|
42051
42135
|
newPanels.set(panel.id, {
|
|
42052
42136
|
...panel,
|
|
@@ -42059,26 +42143,26 @@ var PanelGroup = (0, import_react117.forwardRef)(
|
|
|
42059
42143
|
},
|
|
42060
42144
|
[autoSaveId, calculateLayout, containerWidth]
|
|
42061
42145
|
);
|
|
42062
|
-
const unregisterPanel = (0,
|
|
42146
|
+
const unregisterPanel = (0, import_react116.useCallback)((panelId) => {
|
|
42063
42147
|
setPanels((prev) => {
|
|
42064
42148
|
const newPanels = new Map(prev);
|
|
42065
42149
|
newPanels.delete(panelId);
|
|
42066
42150
|
return newPanels;
|
|
42067
42151
|
});
|
|
42068
42152
|
}, []);
|
|
42069
|
-
const getPanelSize = (0,
|
|
42153
|
+
const getPanelSize = (0, import_react116.useCallback)(
|
|
42070
42154
|
(panelId) => {
|
|
42071
42155
|
return panels.get(panelId)?.size ?? 0;
|
|
42072
42156
|
},
|
|
42073
42157
|
[panels]
|
|
42074
42158
|
);
|
|
42075
|
-
const getPanelIndex = (0,
|
|
42159
|
+
const getPanelIndex = (0, import_react116.useCallback)(
|
|
42076
42160
|
(panelId) => {
|
|
42077
42161
|
return sortedPanels.findIndex((p) => p.id === panelId);
|
|
42078
42162
|
},
|
|
42079
42163
|
[sortedPanels]
|
|
42080
42164
|
);
|
|
42081
|
-
const setPanelSize = (0,
|
|
42165
|
+
const setPanelSize = (0, import_react116.useCallback)(
|
|
42082
42166
|
(panelId, size4) => {
|
|
42083
42167
|
setPanels((prev) => {
|
|
42084
42168
|
const panel = prev.get(panelId);
|
|
@@ -42106,7 +42190,7 @@ var PanelGroup = (0, import_react117.forwardRef)(
|
|
|
42106
42190
|
},
|
|
42107
42191
|
[autoSaveId, calculateLayout, containerWidth]
|
|
42108
42192
|
);
|
|
42109
|
-
const expandPanel = (0,
|
|
42193
|
+
const expandPanel = (0, import_react116.useCallback)(
|
|
42110
42194
|
(panelId) => {
|
|
42111
42195
|
setPanels((prev) => {
|
|
42112
42196
|
const panel = prev.get(panelId);
|
|
@@ -42131,7 +42215,7 @@ var PanelGroup = (0, import_react117.forwardRef)(
|
|
|
42131
42215
|
},
|
|
42132
42216
|
[autoSaveId, calculateLayout, containerWidth]
|
|
42133
42217
|
);
|
|
42134
|
-
const collapsePanel = (0,
|
|
42218
|
+
const collapsePanel = (0, import_react116.useCallback)(
|
|
42135
42219
|
(panelId) => {
|
|
42136
42220
|
setPanels((prev) => {
|
|
42137
42221
|
const panel = prev.get(panelId);
|
|
@@ -42155,14 +42239,14 @@ var PanelGroup = (0, import_react117.forwardRef)(
|
|
|
42155
42239
|
},
|
|
42156
42240
|
[autoSaveId, calculateLayout, containerWidth]
|
|
42157
42241
|
);
|
|
42158
|
-
const isPanelExpanded = (0,
|
|
42242
|
+
const isPanelExpanded = (0, import_react116.useCallback)(
|
|
42159
42243
|
(panelId) => {
|
|
42160
42244
|
const panel = panels.get(panelId);
|
|
42161
42245
|
return panel ? !panel.collapsed : false;
|
|
42162
42246
|
},
|
|
42163
42247
|
[panels]
|
|
42164
42248
|
);
|
|
42165
|
-
const startResize = (0,
|
|
42249
|
+
const startResize = (0, import_react116.useCallback)(
|
|
42166
42250
|
(handleIndex, startX) => {
|
|
42167
42251
|
const startSizes = sortedPanels.map((p) => p.size);
|
|
42168
42252
|
setResizing({
|
|
@@ -42173,7 +42257,7 @@ var PanelGroup = (0, import_react117.forwardRef)(
|
|
|
42173
42257
|
},
|
|
42174
42258
|
[sortedPanels]
|
|
42175
42259
|
);
|
|
42176
|
-
(0,
|
|
42260
|
+
(0, import_react116.useEffect)(() => {
|
|
42177
42261
|
if (!resizing) return;
|
|
42178
42262
|
const handleMouseMove = (e) => {
|
|
42179
42263
|
const delta = e.clientX - resizing.startX;
|
|
@@ -42262,7 +42346,7 @@ var PanelGroup = (0, import_react117.forwardRef)(
|
|
|
42262
42346
|
containerWidth,
|
|
42263
42347
|
flexPanelId
|
|
42264
42348
|
]);
|
|
42265
|
-
(0,
|
|
42349
|
+
(0, import_react116.useImperativeHandle)(ref, () => ({
|
|
42266
42350
|
getLayout: () => sortedPanels.map((p) => p.size),
|
|
42267
42351
|
setLayout: (sizes) => {
|
|
42268
42352
|
setPanels((prev) => {
|
|
@@ -42280,7 +42364,7 @@ var PanelGroup = (0, import_react117.forwardRef)(
|
|
|
42280
42364
|
});
|
|
42281
42365
|
}
|
|
42282
42366
|
}));
|
|
42283
|
-
const contextValue = (0,
|
|
42367
|
+
const contextValue = (0, import_react116.useMemo)(
|
|
42284
42368
|
() => ({
|
|
42285
42369
|
registerPanel,
|
|
42286
42370
|
unregisterPanel,
|
|
@@ -42306,7 +42390,7 @@ var PanelGroup = (0, import_react117.forwardRef)(
|
|
|
42306
42390
|
containerWidth
|
|
42307
42391
|
]
|
|
42308
42392
|
);
|
|
42309
|
-
return /* @__PURE__ */
|
|
42393
|
+
return /* @__PURE__ */ import_react116.default.createElement(PanelGroupContext.Provider, { value: contextValue }, /* @__PURE__ */ import_react116.default.createElement(
|
|
42310
42394
|
"div",
|
|
42311
42395
|
{
|
|
42312
42396
|
ref: containerRef,
|
|
@@ -42324,15 +42408,15 @@ var PanelGroup = (0, import_react117.forwardRef)(
|
|
|
42324
42408
|
);
|
|
42325
42409
|
|
|
42326
42410
|
// src/components/resizablePanels/PanelResizeHandle.tsx
|
|
42327
|
-
var
|
|
42411
|
+
var import_react117 = __toESM(require("react"));
|
|
42328
42412
|
function PanelResizeHandle({
|
|
42329
42413
|
className,
|
|
42330
42414
|
disabled: disabled2,
|
|
42331
42415
|
index: index2
|
|
42332
42416
|
}) {
|
|
42333
|
-
const context = (0,
|
|
42334
|
-
const handleRef = (0,
|
|
42335
|
-
const handleMouseDown = (0,
|
|
42417
|
+
const context = (0, import_react117.useContext)(PanelGroupContext);
|
|
42418
|
+
const handleRef = (0, import_react117.useRef)(null);
|
|
42419
|
+
const handleMouseDown = (0, import_react117.useCallback)(
|
|
42336
42420
|
(e) => {
|
|
42337
42421
|
if (disabled2 || !context) return;
|
|
42338
42422
|
e.preventDefault();
|
|
@@ -42343,7 +42427,7 @@ function PanelResizeHandle({
|
|
|
42343
42427
|
if (!context) {
|
|
42344
42428
|
return null;
|
|
42345
42429
|
}
|
|
42346
|
-
return /* @__PURE__ */
|
|
42430
|
+
return /* @__PURE__ */ import_react117.default.createElement(
|
|
42347
42431
|
"div",
|
|
42348
42432
|
{
|
|
42349
42433
|
ref: handleRef,
|
|
@@ -42356,7 +42440,7 @@ function PanelResizeHandle({
|
|
|
42356
42440
|
zIndex: 10
|
|
42357
42441
|
}
|
|
42358
42442
|
},
|
|
42359
|
-
/* @__PURE__ */
|
|
42443
|
+
/* @__PURE__ */ import_react117.default.createElement(
|
|
42360
42444
|
"div",
|
|
42361
42445
|
{
|
|
42362
42446
|
style: {
|
|
@@ -42372,6 +42456,32 @@ function PanelResizeHandle({
|
|
|
42372
42456
|
);
|
|
42373
42457
|
}
|
|
42374
42458
|
|
|
42459
|
+
// src/components/workspace/HorizontalTabBar.tsx
|
|
42460
|
+
var import_react118 = __toESM(require("react"));
|
|
42461
|
+
var HorizontalTabBar = memoGeneric(function HorizontalTabBar2({ items, activeValue, onChange }) {
|
|
42462
|
+
const selectableItems = items.filter(isSelectableMenuItem);
|
|
42463
|
+
if (selectableItems.length <= 1) {
|
|
42464
|
+
return null;
|
|
42465
|
+
}
|
|
42466
|
+
return /* @__PURE__ */ import_react118.default.createElement("div", { className: "n-flex n-flex-col n-bg-sidebar-background n-flex-none" }, /* @__PURE__ */ import_react118.default.createElement("div", { className: "n-flex n-flex-row n-px-3 n-py-3" }, /* @__PURE__ */ import_react118.default.createElement(
|
|
42467
|
+
SegmentedControl,
|
|
42468
|
+
{
|
|
42469
|
+
enableCompactMode: true,
|
|
42470
|
+
className: "n-flex-1",
|
|
42471
|
+
value: activeValue,
|
|
42472
|
+
onValueChange: onChange,
|
|
42473
|
+
variant: "default",
|
|
42474
|
+
items: selectableItems.map((item) => ({
|
|
42475
|
+
value: item.value,
|
|
42476
|
+
title: item.title,
|
|
42477
|
+
icon: item.icon,
|
|
42478
|
+
tooltip: item.tooltip,
|
|
42479
|
+
disabled: item.disabled
|
|
42480
|
+
}))
|
|
42481
|
+
}
|
|
42482
|
+
)));
|
|
42483
|
+
});
|
|
42484
|
+
|
|
42375
42485
|
// src/components/workspace/PanelWorkspaceLayout.tsx
|
|
42376
42486
|
var PanelWorkspaceLayout = memoGeneric(function PanelWorkspaceLayout2({
|
|
42377
42487
|
leftPanel,
|
|
@@ -42388,30 +42498,54 @@ var PanelWorkspaceLayout = memoGeneric(function PanelWorkspaceLayout2({
|
|
|
42388
42498
|
rightTabValue,
|
|
42389
42499
|
onChangeLeftTab,
|
|
42390
42500
|
onChangeRightTab,
|
|
42391
|
-
|
|
42501
|
+
onLeftSidebarStateChange,
|
|
42502
|
+
onRightSidebarStateChange,
|
|
42503
|
+
shouldAutoSave = true
|
|
42392
42504
|
}) {
|
|
42393
42505
|
const panelGroupRef = (0, import_react119.useRef)(null);
|
|
42506
|
+
const containerRef = (0, import_react119.useRef)(null);
|
|
42394
42507
|
const autoSaveId = (0, import_react119.useMemo)(() => {
|
|
42395
|
-
|
|
42396
|
-
|
|
42508
|
+
if (!shouldAutoSave) return void 0;
|
|
42509
|
+
return autoSavePrefix ? `${autoSavePrefix}--v5--${EDITOR_PANEL_GROUP_ID}` : Math.random().toString(36).substring(2, 15);
|
|
42510
|
+
}, [autoSavePrefix, shouldAutoSave]);
|
|
42397
42511
|
const [leftSidebarCollapsed, setLeftSidebarCollapsed] = (0, import_react119.useState)(
|
|
42398
42512
|
leftSidebarOptions.defaultCollapsed ?? false
|
|
42399
42513
|
);
|
|
42400
42514
|
const [rightSidebarCollapsed, setRightSidebarCollapsed] = (0, import_react119.useState)(
|
|
42401
42515
|
rightSidebarOptions.defaultCollapsed ?? false
|
|
42402
42516
|
);
|
|
42517
|
+
const prevLeftSidebarState = (0, import_react119.useRef)(null);
|
|
42518
|
+
const prevRightSidebarState = (0, import_react119.useRef)(null);
|
|
42403
42519
|
const handleLayoutChange = (0, import_react119.useCallback)(
|
|
42404
42520
|
(sizes) => {
|
|
42405
42521
|
const leftIndex = leftPanel ? 0 : -1;
|
|
42406
42522
|
const rightIndex = rightPanel ? leftPanel ? 2 : 1 : -1;
|
|
42523
|
+
const containerWidth = containerRef.current?.clientWidth ?? 0;
|
|
42524
|
+
const sizesSum = sizes.reduce((a, b) => a + b, 0);
|
|
42525
|
+
if (containerWidth > 0 && sizesSum < containerWidth * 0.5 && sizesSum > 100) {
|
|
42526
|
+
return;
|
|
42527
|
+
}
|
|
42528
|
+
const isPixels = containerWidth > 0 && Math.abs(sizesSum - containerWidth) < Math.abs(sizesSum - 100);
|
|
42407
42529
|
if (leftIndex >= 0) {
|
|
42408
|
-
|
|
42530
|
+
const collapsed = sizes[leftIndex] === 0;
|
|
42531
|
+
setLeftSidebarCollapsed(collapsed);
|
|
42532
|
+
const widthPixels = isPixels ? Math.round(sizes[leftIndex]) : containerWidth > 0 ? Math.round(sizes[leftIndex] / 100 * containerWidth) : 0;
|
|
42533
|
+
if (prevLeftSidebarState.current?.width !== widthPixels || prevLeftSidebarState.current?.collapsed !== collapsed) {
|
|
42534
|
+
prevLeftSidebarState.current = { width: widthPixels, collapsed };
|
|
42535
|
+
onLeftSidebarStateChange?.({ width: widthPixels, collapsed });
|
|
42536
|
+
}
|
|
42409
42537
|
}
|
|
42410
42538
|
if (rightIndex >= 0) {
|
|
42411
|
-
|
|
42539
|
+
const collapsed = sizes[rightIndex] === 0;
|
|
42540
|
+
setRightSidebarCollapsed(collapsed);
|
|
42541
|
+
const widthPixels = isPixels ? Math.round(sizes[rightIndex]) : containerWidth > 0 ? Math.round(sizes[rightIndex] / 100 * containerWidth) : 0;
|
|
42542
|
+
if (prevRightSidebarState.current?.width !== widthPixels || prevRightSidebarState.current?.collapsed !== collapsed) {
|
|
42543
|
+
prevRightSidebarState.current = { width: widthPixels, collapsed };
|
|
42544
|
+
onRightSidebarStateChange?.({ width: widthPixels, collapsed });
|
|
42545
|
+
}
|
|
42412
42546
|
}
|
|
42413
42547
|
},
|
|
42414
|
-
[leftPanel, rightPanel]
|
|
42548
|
+
[leftPanel, rightPanel, onLeftSidebarStateChange, onRightSidebarStateChange]
|
|
42415
42549
|
);
|
|
42416
42550
|
const handleLeftTabChange = (0, import_react119.useCallback)(
|
|
42417
42551
|
(value) => {
|
|
@@ -42447,10 +42581,8 @@ var PanelWorkspaceLayout = memoGeneric(function PanelWorkspaceLayout2({
|
|
|
42447
42581
|
},
|
|
42448
42582
|
[onChangeRightTab, rightSidebarRef, rightTabValue]
|
|
42449
42583
|
);
|
|
42450
|
-
const showLeftTabs = !!leftSidebarOptions.showTabs && !!leftTabItems
|
|
42451
|
-
|
|
42452
|
-
(!compactDrawerMenu || leftSidebarCollapsed);
|
|
42453
|
-
return /* @__PURE__ */ import_react119.default.createElement(
|
|
42584
|
+
const showLeftTabs = !!leftSidebarOptions.showTabs && !!leftTabItems;
|
|
42585
|
+
return /* @__PURE__ */ import_react119.default.createElement("div", { ref: containerRef, className: "n-flex n-flex-1" }, /* @__PURE__ */ import_react119.default.createElement(
|
|
42454
42586
|
PanelGroup,
|
|
42455
42587
|
{
|
|
42456
42588
|
ref: panelGroupRef,
|
|
@@ -42460,20 +42592,11 @@ var PanelWorkspaceLayout = memoGeneric(function PanelWorkspaceLayout2({
|
|
|
42460
42592
|
autoSaveId,
|
|
42461
42593
|
onLayout: handleLayoutChange
|
|
42462
42594
|
},
|
|
42463
|
-
leftPanel && /* @__PURE__ */ import_react119.default.createElement(import_react119.default.Fragment, null,
|
|
42464
|
-
VerticalTabMenu,
|
|
42465
|
-
{
|
|
42466
|
-
tooltipSide: "right",
|
|
42467
|
-
items: leftTabItems,
|
|
42468
|
-
activeValue: leftTabValue,
|
|
42469
|
-
isSidebarCollapsed: leftSidebarCollapsed,
|
|
42470
|
-
onChange: handleLeftTabChange
|
|
42471
|
-
}
|
|
42472
|
-
), showLeftTabs && !leftSidebarCollapsed && /* @__PURE__ */ import_react119.default.createElement(DividerVertical, { className: "n-h-full" }), /* @__PURE__ */ import_react119.default.createElement(
|
|
42595
|
+
leftPanel && /* @__PURE__ */ import_react119.default.createElement(import_react119.default.Fragment, null, /* @__PURE__ */ import_react119.default.createElement(
|
|
42473
42596
|
Panel,
|
|
42474
42597
|
{
|
|
42475
42598
|
id: LEFT_SIDEBAR_ID,
|
|
42476
|
-
className: "n-relative",
|
|
42599
|
+
className: "n-relative n-workspace-sidebar",
|
|
42477
42600
|
order: 1,
|
|
42478
42601
|
ref: leftSidebarRef,
|
|
42479
42602
|
defaultSize: leftSidebarOptions.initialSize,
|
|
@@ -42482,8 +42605,21 @@ var PanelWorkspaceLayout = memoGeneric(function PanelWorkspaceLayout2({
|
|
|
42482
42605
|
collapsible: true,
|
|
42483
42606
|
defaultCollapsed: leftSidebarOptions.defaultCollapsed
|
|
42484
42607
|
},
|
|
42485
|
-
leftSidebarCollapsed ? null :
|
|
42486
|
-
|
|
42608
|
+
leftSidebarCollapsed ? null : /* @__PURE__ */ import_react119.default.createElement("div", { className: "n-flex n-flex-col n-h-full" }, showLeftTabs && /* @__PURE__ */ import_react119.default.createElement(
|
|
42609
|
+
HorizontalTabBar,
|
|
42610
|
+
{
|
|
42611
|
+
items: leftTabItems,
|
|
42612
|
+
activeValue: leftTabValue,
|
|
42613
|
+
onChange: handleLeftTabChange
|
|
42614
|
+
}
|
|
42615
|
+
), /* @__PURE__ */ import_react119.default.createElement("div", { className: "n-flex-1 n-relative n-min-h-0" }, leftPanel))
|
|
42616
|
+
), /* @__PURE__ */ import_react119.default.createElement(
|
|
42617
|
+
PanelResizeHandle,
|
|
42618
|
+
{
|
|
42619
|
+
index: 0,
|
|
42620
|
+
className: `n-cursor-col-resize n-w-px n-h-full ${leftSidebarCollapsed ? "" : "n-bg-divider"}`
|
|
42621
|
+
}
|
|
42622
|
+
)),
|
|
42487
42623
|
/* @__PURE__ */ import_react119.default.createElement(
|
|
42488
42624
|
Panel,
|
|
42489
42625
|
{
|
|
@@ -42493,11 +42629,17 @@ var PanelWorkspaceLayout = memoGeneric(function PanelWorkspaceLayout2({
|
|
|
42493
42629
|
},
|
|
42494
42630
|
centerPanel
|
|
42495
42631
|
),
|
|
42496
|
-
rightPanel && /* @__PURE__ */ import_react119.default.createElement(import_react119.default.Fragment, null, /* @__PURE__ */ import_react119.default.createElement(
|
|
42632
|
+
rightPanel && /* @__PURE__ */ import_react119.default.createElement(import_react119.default.Fragment, null, /* @__PURE__ */ import_react119.default.createElement(
|
|
42633
|
+
PanelResizeHandle,
|
|
42634
|
+
{
|
|
42635
|
+
index: 1,
|
|
42636
|
+
className: `n-cursor-col-resize n-w-px n-h-full ${rightSidebarCollapsed ? "" : "n-bg-divider"}`
|
|
42637
|
+
}
|
|
42638
|
+
), /* @__PURE__ */ import_react119.default.createElement(
|
|
42497
42639
|
Panel,
|
|
42498
42640
|
{
|
|
42499
42641
|
id: RIGHT_SIDEBAR_ID,
|
|
42500
|
-
className: "n-relative",
|
|
42642
|
+
className: "n-relative n-workspace-sidebar",
|
|
42501
42643
|
order: 3,
|
|
42502
42644
|
ref: rightSidebarRef,
|
|
42503
42645
|
minSize: rightSidebarOptions.minSize,
|
|
@@ -42506,18 +42648,16 @@ var PanelWorkspaceLayout = memoGeneric(function PanelWorkspaceLayout2({
|
|
|
42506
42648
|
collapsible: true,
|
|
42507
42649
|
defaultCollapsed: rightSidebarOptions.defaultCollapsed
|
|
42508
42650
|
},
|
|
42509
|
-
rightSidebarCollapsed ? null :
|
|
42510
|
-
|
|
42511
|
-
|
|
42512
|
-
|
|
42513
|
-
|
|
42514
|
-
|
|
42515
|
-
|
|
42516
|
-
|
|
42517
|
-
onChange: handleRightTabChange
|
|
42518
|
-
}
|
|
42651
|
+
rightSidebarCollapsed ? null : /* @__PURE__ */ import_react119.default.createElement("div", { className: "n-flex n-flex-col n-h-full" }, rightSidebarOptions.showTabs && rightTabItems && /* @__PURE__ */ import_react119.default.createElement(
|
|
42652
|
+
HorizontalTabBar,
|
|
42653
|
+
{
|
|
42654
|
+
items: rightTabItems,
|
|
42655
|
+
activeValue: rightTabValue,
|
|
42656
|
+
onChange: handleRightTabChange
|
|
42657
|
+
}
|
|
42658
|
+
), /* @__PURE__ */ import_react119.default.createElement("div", { className: "n-flex-1 n-relative n-min-h-0" }, rightPanel))
|
|
42519
42659
|
))
|
|
42520
|
-
);
|
|
42660
|
+
));
|
|
42521
42661
|
});
|
|
42522
42662
|
|
|
42523
42663
|
// src/components/workspace/renderPanelChildren.tsx
|
|
@@ -42598,7 +42738,9 @@ var WorkspaceLayout = forwardRefGeneric(function WorkspaceLayout2({
|
|
|
42598
42738
|
showTabs: rightShowTabs = true
|
|
42599
42739
|
} = {},
|
|
42600
42740
|
theme,
|
|
42601
|
-
|
|
42741
|
+
onLeftSidebarStateChange,
|
|
42742
|
+
onRightSidebarStateChange,
|
|
42743
|
+
shouldAutoSave
|
|
42602
42744
|
}, forwardedRef) {
|
|
42603
42745
|
const containerRef = import_react121.default.useRef(null);
|
|
42604
42746
|
const containerSize = useSize(containerRef);
|
|
@@ -42803,7 +42945,9 @@ var WorkspaceLayout = forwardRefGeneric(function WorkspaceLayout2({
|
|
|
42803
42945
|
autoSavePrefix,
|
|
42804
42946
|
leftSidebarRef,
|
|
42805
42947
|
rightSidebarRef,
|
|
42806
|
-
|
|
42948
|
+
onLeftSidebarStateChange,
|
|
42949
|
+
onRightSidebarStateChange,
|
|
42950
|
+
shouldAutoSave
|
|
42807
42951
|
}
|
|
42808
42952
|
), isOverlay && /* @__PURE__ */ import_react121.default.createElement(
|
|
42809
42953
|
OverlayToolbar,
|