@tutti-os/workbench-surface 0.0.41 → 0.0.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.js +324 -253
- package/dist/index.js.map +1 -1
- package/dist/styles/workbench.css +84 -4
- package/dist/styles/workbenchStyle.test.ts +16 -6
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1934,9 +1934,103 @@ import { createPortal } from "react-dom";
|
|
|
1934
1934
|
import { createI18nRuntime } from "@tutti-os/ui-i18n-runtime";
|
|
1935
1935
|
import { Checkbox } from "@tutti-os/ui-system";
|
|
1936
1936
|
|
|
1937
|
+
// src/react/WorkbenchWindowTrafficLights.tsx
|
|
1938
|
+
import {
|
|
1939
|
+
Tooltip,
|
|
1940
|
+
TooltipContent,
|
|
1941
|
+
TooltipProvider,
|
|
1942
|
+
TooltipTrigger
|
|
1943
|
+
} from "@tutti-os/ui-system";
|
|
1944
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1945
|
+
function WorkbenchWindowTrafficLights({
|
|
1946
|
+
className,
|
|
1947
|
+
close,
|
|
1948
|
+
maximize,
|
|
1949
|
+
minimize,
|
|
1950
|
+
onDoubleClick,
|
|
1951
|
+
onPointerDown,
|
|
1952
|
+
...props
|
|
1953
|
+
}) {
|
|
1954
|
+
return /* @__PURE__ */ jsxs2(
|
|
1955
|
+
"div",
|
|
1956
|
+
{
|
|
1957
|
+
...props,
|
|
1958
|
+
className: ["workbench-window-traffic-lights", className ?? null].filter(Boolean).join(" "),
|
|
1959
|
+
onDoubleClick: (event) => {
|
|
1960
|
+
event.stopPropagation();
|
|
1961
|
+
onDoubleClick?.(event);
|
|
1962
|
+
},
|
|
1963
|
+
onPointerDown: (event) => {
|
|
1964
|
+
event.stopPropagation();
|
|
1965
|
+
onPointerDown?.(event);
|
|
1966
|
+
},
|
|
1967
|
+
children: [
|
|
1968
|
+
close ? /* @__PURE__ */ jsx4(
|
|
1969
|
+
WorkbenchWindowTrafficLightButton,
|
|
1970
|
+
{
|
|
1971
|
+
action: "close",
|
|
1972
|
+
input: close,
|
|
1973
|
+
tone: "close"
|
|
1974
|
+
}
|
|
1975
|
+
) : null,
|
|
1976
|
+
minimize ? /* @__PURE__ */ jsx4(
|
|
1977
|
+
WorkbenchWindowTrafficLightButton,
|
|
1978
|
+
{
|
|
1979
|
+
action: "minimize",
|
|
1980
|
+
input: minimize,
|
|
1981
|
+
tone: "minimize"
|
|
1982
|
+
}
|
|
1983
|
+
) : null,
|
|
1984
|
+
maximize ? /* @__PURE__ */ jsx4(
|
|
1985
|
+
WorkbenchWindowTrafficLightButton,
|
|
1986
|
+
{
|
|
1987
|
+
action: "fullscreen",
|
|
1988
|
+
input: maximize,
|
|
1989
|
+
tone: "maximize"
|
|
1990
|
+
}
|
|
1991
|
+
) : null
|
|
1992
|
+
]
|
|
1993
|
+
}
|
|
1994
|
+
);
|
|
1995
|
+
}
|
|
1996
|
+
function WorkbenchWindowTrafficLightButton({
|
|
1997
|
+
action,
|
|
1998
|
+
input,
|
|
1999
|
+
tone
|
|
2000
|
+
}) {
|
|
2001
|
+
const handleClick = (event) => {
|
|
2002
|
+
event.stopPropagation();
|
|
2003
|
+
if (input.disabled) {
|
|
2004
|
+
return;
|
|
2005
|
+
}
|
|
2006
|
+
input.onClick(event);
|
|
2007
|
+
};
|
|
2008
|
+
const stopPointer = (event) => {
|
|
2009
|
+
event.stopPropagation();
|
|
2010
|
+
};
|
|
2011
|
+
const button = /* @__PURE__ */ jsx4(
|
|
2012
|
+
"button",
|
|
2013
|
+
{
|
|
2014
|
+
"aria-label": input.label,
|
|
2015
|
+
"aria-pressed": input.pressed,
|
|
2016
|
+
className: "workbench-window-traffic-light",
|
|
2017
|
+
"data-workbench-action": action,
|
|
2018
|
+
"data-workbench-traffic-light": tone,
|
|
2019
|
+
disabled: input.disabled,
|
|
2020
|
+
type: "button",
|
|
2021
|
+
onClick: handleClick,
|
|
2022
|
+
onDoubleClick: (event) => event.stopPropagation(),
|
|
2023
|
+
onPointerDown: stopPointer
|
|
2024
|
+
}
|
|
2025
|
+
);
|
|
2026
|
+
return /* @__PURE__ */ jsx4(TooltipProvider, { delayDuration: 250, skipDelayDuration: 0, children: /* @__PURE__ */ jsxs2(Tooltip, { children: [
|
|
2027
|
+
/* @__PURE__ */ jsx4(TooltipTrigger, { asChild: true, children: button }),
|
|
2028
|
+
/* @__PURE__ */ jsx4(TooltipContent, { side: "bottom", children: input.label })
|
|
2029
|
+
] }) });
|
|
2030
|
+
}
|
|
2031
|
+
|
|
1937
2032
|
// src/react/WorkbenchWindowFullscreenToggle.tsx
|
|
1938
|
-
import {
|
|
1939
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
2033
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
1940
2034
|
function WorkbenchWindowFullscreenToggle({
|
|
1941
2035
|
controller,
|
|
1942
2036
|
disabled = false,
|
|
@@ -1945,32 +2039,23 @@ function WorkbenchWindowFullscreenToggle({
|
|
|
1945
2039
|
}) {
|
|
1946
2040
|
const isFullscreen = node.displayMode === "fullscreen";
|
|
1947
2041
|
const label = i18n.t(isFullscreen ? "exitFullscreen" : "enterFullscreen");
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
Button2,
|
|
2042
|
+
return /* @__PURE__ */ jsx5(
|
|
2043
|
+
WorkbenchWindowTrafficLights,
|
|
1951
2044
|
{
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
if (isFullscreen) {
|
|
1967
|
-
controller.commands.exitFullscreen(node.id);
|
|
1968
|
-
return;
|
|
1969
|
-
}
|
|
1970
|
-
event.currentTarget.blur();
|
|
1971
|
-
controller.commands.enterFullscreen(node.id);
|
|
1972
|
-
},
|
|
1973
|
-
children: /* @__PURE__ */ jsx4(Icon, { "aria-hidden": true, className: "size-3.5" })
|
|
2045
|
+
maximize: {
|
|
2046
|
+
disabled,
|
|
2047
|
+
label,
|
|
2048
|
+
onClick: (event) => {
|
|
2049
|
+
controller.commands.focusNode(node.id);
|
|
2050
|
+
if (isFullscreen) {
|
|
2051
|
+
controller.commands.exitFullscreen(node.id);
|
|
2052
|
+
return;
|
|
2053
|
+
}
|
|
2054
|
+
event.currentTarget.blur();
|
|
2055
|
+
controller.commands.enterFullscreen(node.id);
|
|
2056
|
+
},
|
|
2057
|
+
pressed: isFullscreen
|
|
2058
|
+
}
|
|
1974
2059
|
}
|
|
1975
2060
|
);
|
|
1976
2061
|
}
|
|
@@ -2168,7 +2253,7 @@ function resolveWorkbenchWindowHeader({
|
|
|
2168
2253
|
}
|
|
2169
2254
|
|
|
2170
2255
|
// src/react/WorkbenchWindowFrame.tsx
|
|
2171
|
-
import { Fragment as Fragment2, jsx as
|
|
2256
|
+
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
2172
2257
|
var resizeHandles = [
|
|
2173
2258
|
"north",
|
|
2174
2259
|
"east",
|
|
@@ -2240,10 +2325,10 @@ function WorkbenchWindowFrame({
|
|
|
2240
2325
|
genie.minimizeNodeToAnchor(nodeID, minimize);
|
|
2241
2326
|
}
|
|
2242
2327
|
};
|
|
2243
|
-
const defaultActions = interactive ? /* @__PURE__ */
|
|
2328
|
+
const defaultActions = interactive ? /* @__PURE__ */ jsxs3(
|
|
2244
2329
|
"div",
|
|
2245
2330
|
{
|
|
2246
|
-
className: "
|
|
2331
|
+
className: "workbench-window__traffic-light-actions",
|
|
2247
2332
|
onDoubleClick: (event) => {
|
|
2248
2333
|
event.stopPropagation();
|
|
2249
2334
|
},
|
|
@@ -2251,19 +2336,19 @@ function WorkbenchWindowFrame({
|
|
|
2251
2336
|
event.stopPropagation();
|
|
2252
2337
|
},
|
|
2253
2338
|
children: [
|
|
2254
|
-
|
|
2339
|
+
renderActions ? renderActions({
|
|
2340
|
+
controller,
|
|
2341
|
+
genie: genieControls,
|
|
2342
|
+
node
|
|
2343
|
+
}) : null,
|
|
2344
|
+
/* @__PURE__ */ jsx6(
|
|
2255
2345
|
WorkbenchWindowFullscreenToggle,
|
|
2256
2346
|
{
|
|
2257
2347
|
controller,
|
|
2258
2348
|
i18n: windowChromeI18n ?? defaultWindowChromeI18n,
|
|
2259
2349
|
node
|
|
2260
2350
|
}
|
|
2261
|
-
)
|
|
2262
|
-
renderActions ? renderActions({
|
|
2263
|
-
controller,
|
|
2264
|
-
genie: genieControls,
|
|
2265
|
-
node
|
|
2266
|
-
}) : null
|
|
2351
|
+
)
|
|
2267
2352
|
]
|
|
2268
2353
|
}
|
|
2269
2354
|
) : null;
|
|
@@ -2297,7 +2382,7 @@ function WorkbenchWindowFrame({
|
|
|
2297
2382
|
(presentationFrame.height - node.frame.height * presentationScale) / 2
|
|
2298
2383
|
) - node.frame.y : 0;
|
|
2299
2384
|
const shellTransform = presentationMode === "mission-control" && presentationFrame ? `matrix(${presentationScale}, 0, 0, ${presentationScale}, ${presentationOffsetX}, ${presentationOffsetY})` : void 0;
|
|
2300
|
-
return /* @__PURE__ */
|
|
2385
|
+
return /* @__PURE__ */ jsxs3(
|
|
2301
2386
|
"section",
|
|
2302
2387
|
{
|
|
2303
2388
|
"aria-hidden": hiddenMounted || isPresentationHidden ? true : void 0,
|
|
@@ -2325,39 +2410,41 @@ function WorkbenchWindowFrame({
|
|
|
2325
2410
|
},
|
|
2326
2411
|
onPointerDown: hiddenMounted || isPresentationHidden || !interactive || presentationMode === "mission-control" ? void 0 : () => controller.commands.focusNode(node.id),
|
|
2327
2412
|
children: [
|
|
2328
|
-
/* @__PURE__ */
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
/* @__PURE__ */
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2413
|
+
/* @__PURE__ */ jsxs3("div", { className: "workbench-window-shell__content", children: [
|
|
2414
|
+
/* @__PURE__ */ jsxs3(
|
|
2415
|
+
"div",
|
|
2416
|
+
{
|
|
2417
|
+
className: "workbench-window",
|
|
2418
|
+
"data-focused": isFocused ? "true" : "false",
|
|
2419
|
+
"data-display-mode": node.displayMode,
|
|
2420
|
+
"data-fullscreen-header-mode": resolvedFullscreenHeaderMode,
|
|
2421
|
+
"data-window-chrome-mode": resolvedHeader.windowChromeMode,
|
|
2422
|
+
"data-workbench-window-capture": "true",
|
|
2423
|
+
"data-window-drag-state": isDragging ? "dragging" : "idle",
|
|
2424
|
+
"data-window-resize-state": isResizing ? "resizing" : "idle",
|
|
2425
|
+
children: [
|
|
2426
|
+
/* @__PURE__ */ jsx6(
|
|
2427
|
+
"div",
|
|
2428
|
+
{
|
|
2429
|
+
className: [
|
|
2430
|
+
"workbench-window__header",
|
|
2431
|
+
shouldRenderCustomHeader ? "workbench-window__header--custom" : null
|
|
2432
|
+
].filter(Boolean).join(" "),
|
|
2433
|
+
onDoubleClick: shouldRenderCustomHeader || !interactive ? void 0 : onHeaderDoubleClick,
|
|
2434
|
+
onPointerDown: shouldRenderCustomHeader || !interactive ? void 0 : onDragStart,
|
|
2435
|
+
children: shouldRenderCustomHeader ? resolvedHeader.customHeader : /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
2436
|
+
defaultActions,
|
|
2437
|
+
/* @__PURE__ */ jsx6("div", { className: "workbench-window__title", children: node.title })
|
|
2438
|
+
] })
|
|
2439
|
+
}
|
|
2440
|
+
),
|
|
2441
|
+
/* @__PURE__ */ jsx6("div", { className: "workbench-window__body", children })
|
|
2442
|
+
]
|
|
2443
|
+
}
|
|
2444
|
+
),
|
|
2445
|
+
node.displayMode === "floating" && !hiddenMounted && presentationMode !== "mission-control" && interactive ? resizeHandles.map((handle) => /* @__PURE__ */ jsx6(ResizeHandle, { handle, node }, handle)) : null
|
|
2446
|
+
] }),
|
|
2447
|
+
presentationInteraction ? /* @__PURE__ */ jsx6(
|
|
2361
2448
|
"button",
|
|
2362
2449
|
{
|
|
2363
2450
|
"aria-label": node.title,
|
|
@@ -2368,10 +2455,10 @@ function WorkbenchWindowFrame({
|
|
|
2368
2455
|
event.stopPropagation();
|
|
2369
2456
|
presentationInteraction.onNodePress(node.id);
|
|
2370
2457
|
},
|
|
2371
|
-
children: presentationInteraction.mode === "layout" && isMissionControlSelected ? /* @__PURE__ */
|
|
2458
|
+
children: presentationInteraction.mode === "layout" && isMissionControlSelected ? /* @__PURE__ */ jsx6("div", { className: "pointer-events-none absolute inset-0 rounded-lg border-2 border-[var(--tutti-purple)] transition-[border-color,transform] duration-150 ease-out" }) : null
|
|
2372
2459
|
}
|
|
2373
2460
|
) : null,
|
|
2374
|
-
presentationInteraction?.mode === "layout" && isMissionControlSelected ? /* @__PURE__ */
|
|
2461
|
+
presentationInteraction?.mode === "layout" && isMissionControlSelected ? /* @__PURE__ */ jsx6(
|
|
2375
2462
|
Checkbox,
|
|
2376
2463
|
{
|
|
2377
2464
|
"aria-hidden": "true",
|
|
@@ -2389,7 +2476,7 @@ function ResizeHandle({
|
|
|
2389
2476
|
node
|
|
2390
2477
|
}) {
|
|
2391
2478
|
const onPointerDown = useWorkbenchResize(node, handle);
|
|
2392
|
-
return /* @__PURE__ */
|
|
2479
|
+
return /* @__PURE__ */ jsx6(
|
|
2393
2480
|
"div",
|
|
2394
2481
|
{
|
|
2395
2482
|
className: "workbench-window__resize-handle",
|
|
@@ -2424,7 +2511,7 @@ function stringArraysEqual(left, right) {
|
|
|
2424
2511
|
}
|
|
2425
2512
|
|
|
2426
2513
|
// src/react/WorkbenchNodeLayer.tsx
|
|
2427
|
-
import { jsx as
|
|
2514
|
+
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2428
2515
|
function WorkbenchNodeLayer({
|
|
2429
2516
|
genie,
|
|
2430
2517
|
edgeSnapEnabled = false,
|
|
@@ -2472,7 +2559,7 @@ function WorkbenchNodeLayer({
|
|
|
2472
2559
|
});
|
|
2473
2560
|
const snapPreviewRect = useWorkbenchSelector(selectWorkbenchSnapPreviewRect);
|
|
2474
2561
|
const presentationInteraction = interactive && presentation?.mode === "mission-control" ? presentation.interaction ?? null : null;
|
|
2475
|
-
const dialogPopoverLayer = dialogPopoverNodeIDs.length > 0 ? /* @__PURE__ */
|
|
2562
|
+
const dialogPopoverLayer = dialogPopoverNodeIDs.length > 0 ? /* @__PURE__ */ jsx7(
|
|
2476
2563
|
WorkbenchNodeLayerGroup,
|
|
2477
2564
|
{
|
|
2478
2565
|
className: "workbench-node-layer workbench-node-layer--dialog-popover",
|
|
@@ -2490,8 +2577,8 @@ function WorkbenchNodeLayer({
|
|
|
2490
2577
|
windowChromeMode
|
|
2491
2578
|
}
|
|
2492
2579
|
) : null;
|
|
2493
|
-
return /* @__PURE__ */
|
|
2494
|
-
/* @__PURE__ */
|
|
2580
|
+
return /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
2581
|
+
/* @__PURE__ */ jsx7(
|
|
2495
2582
|
WorkbenchNodeLayerGroup,
|
|
2496
2583
|
{
|
|
2497
2584
|
className: "workbench-node-layer",
|
|
@@ -2531,7 +2618,7 @@ function WorkbenchNodeLayerGroup({
|
|
|
2531
2618
|
windowChromeI18n,
|
|
2532
2619
|
windowChromeMode
|
|
2533
2620
|
}) {
|
|
2534
|
-
return /* @__PURE__ */
|
|
2621
|
+
return /* @__PURE__ */ jsxs4(
|
|
2535
2622
|
"div",
|
|
2536
2623
|
{
|
|
2537
2624
|
className,
|
|
@@ -2543,7 +2630,7 @@ function WorkbenchNodeLayerGroup({
|
|
|
2543
2630
|
onBackdropPress();
|
|
2544
2631
|
} : void 0,
|
|
2545
2632
|
children: [
|
|
2546
|
-
snapPreviewRect ? /* @__PURE__ */
|
|
2633
|
+
snapPreviewRect ? /* @__PURE__ */ jsx7(
|
|
2547
2634
|
"div",
|
|
2548
2635
|
{
|
|
2549
2636
|
className: "workbench-snap-preview",
|
|
@@ -2555,7 +2642,7 @@ function WorkbenchNodeLayerGroup({
|
|
|
2555
2642
|
}
|
|
2556
2643
|
}
|
|
2557
2644
|
) : null,
|
|
2558
|
-
nodeIDs.map((nodeID) => /* @__PURE__ */
|
|
2645
|
+
nodeIDs.map((nodeID) => /* @__PURE__ */ jsx7(
|
|
2559
2646
|
MemoizedWorkbenchNodeLayerItem,
|
|
2560
2647
|
{
|
|
2561
2648
|
fullscreenHeaderMode,
|
|
@@ -2604,7 +2691,7 @@ function WorkbenchNodeLayerItem({
|
|
|
2604
2691
|
if (!node) {
|
|
2605
2692
|
return null;
|
|
2606
2693
|
}
|
|
2607
|
-
return /* @__PURE__ */
|
|
2694
|
+
return /* @__PURE__ */ jsx7(
|
|
2608
2695
|
WorkbenchWindowFrame,
|
|
2609
2696
|
{
|
|
2610
2697
|
edgeSnapEnabled,
|
|
@@ -3118,7 +3205,7 @@ function renderGenieScanlines(context, viewportWidth, viewportHeight, frame) {
|
|
|
3118
3205
|
}
|
|
3119
3206
|
|
|
3120
3207
|
// src/react/useWorkbenchGenieAnimation.tsx
|
|
3121
|
-
import { Fragment as Fragment4, jsx as
|
|
3208
|
+
import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
3122
3209
|
var genieDurationMs = 400;
|
|
3123
3210
|
var previewCaptureRaceTimeoutMs = 120;
|
|
3124
3211
|
var scaleMinimizeDurationMs = 220;
|
|
@@ -4650,8 +4737,8 @@ function useWorkbenchGenieAnimation({
|
|
|
4650
4737
|
);
|
|
4651
4738
|
return {
|
|
4652
4739
|
genieLayer: typeof document === "undefined" ? null : createPortal2(
|
|
4653
|
-
/* @__PURE__ */
|
|
4654
|
-
/* @__PURE__ */
|
|
4740
|
+
/* @__PURE__ */ jsxs5(Fragment4, { children: [
|
|
4741
|
+
/* @__PURE__ */ jsx8(
|
|
4655
4742
|
"canvas",
|
|
4656
4743
|
{
|
|
4657
4744
|
ref: canvasRef,
|
|
@@ -4660,7 +4747,7 @@ function useWorkbenchGenieAnimation({
|
|
|
4660
4747
|
"aria-hidden": true
|
|
4661
4748
|
}
|
|
4662
4749
|
),
|
|
4663
|
-
pendingRenderedPreviewCapture ? /* @__PURE__ */
|
|
4750
|
+
pendingRenderedPreviewCapture ? /* @__PURE__ */ jsx8(
|
|
4664
4751
|
"div",
|
|
4665
4752
|
{
|
|
4666
4753
|
ref: renderedPreviewCaptureElementRef,
|
|
@@ -4696,7 +4783,7 @@ function useWorkbenchGenieAnimation({
|
|
|
4696
4783
|
}
|
|
4697
4784
|
|
|
4698
4785
|
// src/react/WorkbenchSurface.tsx
|
|
4699
|
-
import { jsx as
|
|
4786
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
4700
4787
|
function WorkbenchSurface({
|
|
4701
4788
|
captureNodePreviewImage,
|
|
4702
4789
|
className,
|
|
@@ -4731,7 +4818,7 @@ function WorkbenchSurface({
|
|
|
4731
4818
|
windowChromeMode,
|
|
4732
4819
|
windowChromeI18n
|
|
4733
4820
|
}) {
|
|
4734
|
-
return /* @__PURE__ */
|
|
4821
|
+
return /* @__PURE__ */ jsx9(WorkbenchProvider, { controller, children: /* @__PURE__ */ jsx9(
|
|
4735
4822
|
WorkbenchSurfaceInner,
|
|
4736
4823
|
{
|
|
4737
4824
|
captureNodePreviewImage,
|
|
@@ -4837,7 +4924,7 @@ function WorkbenchSurfaceInner({
|
|
|
4837
4924
|
wallpaper.fit ?? "cover"
|
|
4838
4925
|
)
|
|
4839
4926
|
} : void 0;
|
|
4840
|
-
return /* @__PURE__ */
|
|
4927
|
+
return /* @__PURE__ */ jsxs6(
|
|
4841
4928
|
"div",
|
|
4842
4929
|
{
|
|
4843
4930
|
ref,
|
|
@@ -4846,7 +4933,7 @@ function WorkbenchSurfaceInner({
|
|
|
4846
4933
|
"data-presentation-mode": presentation?.mode ?? "default",
|
|
4847
4934
|
"data-workbench-interactive": interactive ? "true" : "false",
|
|
4848
4935
|
children: [
|
|
4849
|
-
wallpaper ? /* @__PURE__ */
|
|
4936
|
+
wallpaper ? /* @__PURE__ */ jsx9(
|
|
4850
4937
|
"div",
|
|
4851
4938
|
{
|
|
4852
4939
|
className: "workbench-surface__wallpaper",
|
|
@@ -4854,9 +4941,9 @@ function WorkbenchSurfaceInner({
|
|
|
4854
4941
|
"aria-hidden": true
|
|
4855
4942
|
}
|
|
4856
4943
|
) : null,
|
|
4857
|
-
renderTopChrome ? /* @__PURE__ */
|
|
4944
|
+
renderTopChrome ? /* @__PURE__ */ jsx9("div", { className: "workbench-surface__top-chrome", children: renderTopChrome() }) : null,
|
|
4858
4945
|
renderBackdrop ? renderBackdrop() : null,
|
|
4859
|
-
/* @__PURE__ */
|
|
4946
|
+
/* @__PURE__ */ jsx9(
|
|
4860
4947
|
WorkbenchNodeLayer,
|
|
4861
4948
|
{
|
|
4862
4949
|
genie,
|
|
@@ -4874,7 +4961,7 @@ function WorkbenchSurfaceInner({
|
|
|
4874
4961
|
windowChromeI18n
|
|
4875
4962
|
}
|
|
4876
4963
|
),
|
|
4877
|
-
/* @__PURE__ */
|
|
4964
|
+
/* @__PURE__ */ jsx9(
|
|
4878
4965
|
WorkbenchDockFrame,
|
|
4879
4966
|
{
|
|
4880
4967
|
dockPlacement,
|
|
@@ -4883,7 +4970,7 @@ function WorkbenchSurfaceInner({
|
|
|
4883
4970
|
renderDock
|
|
4884
4971
|
}
|
|
4885
4972
|
),
|
|
4886
|
-
renderBottomChrome ? /* @__PURE__ */
|
|
4973
|
+
renderBottomChrome ? /* @__PURE__ */ jsx9("div", { className: "workbench-surface__bottom-chrome", children: renderBottomChrome() }) : null,
|
|
4887
4974
|
renderOverlay ? renderOverlay() : null,
|
|
4888
4975
|
genie.genieLayer
|
|
4889
4976
|
]
|
|
@@ -6981,7 +7068,7 @@ import {
|
|
|
6981
7068
|
import {
|
|
6982
7069
|
ArrowLeftIcon,
|
|
6983
7070
|
ArrowRightIcon,
|
|
6984
|
-
Button as
|
|
7071
|
+
Button as Button3,
|
|
6985
7072
|
ChevronDownIcon,
|
|
6986
7073
|
ChevronUpIcon
|
|
6987
7074
|
} from "@tutti-os/ui-system";
|
|
@@ -7685,11 +7772,11 @@ import {
|
|
|
7685
7772
|
} from "react";
|
|
7686
7773
|
import { createPortal as createPortal3 } from "react-dom";
|
|
7687
7774
|
import {
|
|
7688
|
-
Button as
|
|
7775
|
+
Button as Button2,
|
|
7689
7776
|
CheckIcon,
|
|
7690
7777
|
CloseIcon,
|
|
7691
7778
|
FileCreateIcon,
|
|
7692
|
-
MaximizeIcon
|
|
7779
|
+
MaximizeIcon,
|
|
7693
7780
|
MinimizeIcon,
|
|
7694
7781
|
OverviewLayoutIcon,
|
|
7695
7782
|
PinFilledIcon,
|
|
@@ -7827,7 +7914,7 @@ function resolveMinimizedStackTrackTranslateXPx(input) {
|
|
|
7827
7914
|
}
|
|
7828
7915
|
|
|
7829
7916
|
// src/host/WorkbenchHostDockPopup.tsx
|
|
7830
|
-
import { Fragment as Fragment5, jsx as
|
|
7917
|
+
import { Fragment as Fragment5, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
7831
7918
|
var dockPopupCardWidthPx = 165;
|
|
7832
7919
|
var dockPopupGridGapPx = 8;
|
|
7833
7920
|
var dockPopupPanelPaddingInlinePx = 12;
|
|
@@ -8332,7 +8419,7 @@ function WorkbenchHostDockPopup({
|
|
|
8332
8419
|
previewCaptureKey,
|
|
8333
8420
|
resolveDockPreviewCacheKey2
|
|
8334
8421
|
]);
|
|
8335
|
-
const content = /* @__PURE__ */
|
|
8422
|
+
const content = /* @__PURE__ */ jsx10(
|
|
8336
8423
|
"div",
|
|
8337
8424
|
{
|
|
8338
8425
|
ref: popupRootRef,
|
|
@@ -8341,7 +8428,7 @@ function WorkbenchHostDockPopup({
|
|
|
8341
8428
|
"data-desktop-dock-popup-root": "true",
|
|
8342
8429
|
"data-popup-variant": resolvedVariant,
|
|
8343
8430
|
style: popupStyle,
|
|
8344
|
-
children: /* @__PURE__ */
|
|
8431
|
+
children: /* @__PURE__ */ jsx10(
|
|
8345
8432
|
"div",
|
|
8346
8433
|
{
|
|
8347
8434
|
"aria-label": label,
|
|
@@ -8357,7 +8444,7 @@ function WorkbenchHostDockPopup({
|
|
|
8357
8444
|
onPointerLeave: isMinimizedStack ? () => setPointer(null) : void 0,
|
|
8358
8445
|
role: "dialog",
|
|
8359
8446
|
style: panelStyle,
|
|
8360
|
-
children: isContextMenu ? /* @__PURE__ */
|
|
8447
|
+
children: isContextMenu ? /* @__PURE__ */ jsx10(
|
|
8361
8448
|
WorkbenchHostDockContextMenu,
|
|
8362
8449
|
{
|
|
8363
8450
|
canCreateNew: showCreateNew !== false,
|
|
@@ -8380,9 +8467,9 @@ function WorkbenchHostDockPopup({
|
|
|
8380
8467
|
showAllWindowsLabel,
|
|
8381
8468
|
showOpen: showOpen === true
|
|
8382
8469
|
}
|
|
8383
|
-
) : /* @__PURE__ */
|
|
8384
|
-
/* @__PURE__ */
|
|
8385
|
-
isMinimizedStack ? /* @__PURE__ */
|
|
8470
|
+
) : /* @__PURE__ */ jsxs7(Fragment5, { children: [
|
|
8471
|
+
/* @__PURE__ */ jsx10("div", { className: "mb-2.5 flex items-center justify-between", children: /* @__PURE__ */ jsx10("span", { className: "min-w-0 truncate text-sm font-semibold", children: label }) }),
|
|
8472
|
+
isMinimizedStack ? /* @__PURE__ */ jsx10(
|
|
8386
8473
|
"div",
|
|
8387
8474
|
{
|
|
8388
8475
|
ref: minimizedStackViewportRef,
|
|
@@ -8391,7 +8478,7 @@ function WorkbenchHostDockPopup({
|
|
|
8391
8478
|
height: minimizedStackViewportHeightPx,
|
|
8392
8479
|
...isLeftMinimizedStack ? { paddingLeft: minimizedStackLeftGutterPx } : {}
|
|
8393
8480
|
},
|
|
8394
|
-
children: /* @__PURE__ */
|
|
8481
|
+
children: /* @__PURE__ */ jsx10(
|
|
8395
8482
|
"div",
|
|
8396
8483
|
{
|
|
8397
8484
|
className: "desktop-dock-popup__minimized-stack-track",
|
|
@@ -8410,7 +8497,7 @@ function WorkbenchHostDockPopup({
|
|
|
8410
8497
|
capturedPreview,
|
|
8411
8498
|
Boolean(capturePreview)
|
|
8412
8499
|
);
|
|
8413
|
-
return /* @__PURE__ */
|
|
8500
|
+
return /* @__PURE__ */ jsx10(
|
|
8414
8501
|
WorkbenchHostDockPopupCard,
|
|
8415
8502
|
{
|
|
8416
8503
|
ref: registerCard(item.node.id),
|
|
@@ -8439,7 +8526,7 @@ function WorkbenchHostDockPopup({
|
|
|
8439
8526
|
}
|
|
8440
8527
|
)
|
|
8441
8528
|
}
|
|
8442
|
-
) : /* @__PURE__ */
|
|
8529
|
+
) : /* @__PURE__ */ jsxs7("div", { className: "grid max-h-[min(52vh,420px)] grid-cols-[repeat(var(--desktop-dock-popup-columns,2),165px)] gap-2 overflow-auto overscroll-contain", children: [
|
|
8443
8530
|
items.map((item) => {
|
|
8444
8531
|
const previewMemoryKey = resolveDockPopupPreviewMemoryKey(
|
|
8445
8532
|
item.node,
|
|
@@ -8451,7 +8538,7 @@ function WorkbenchHostDockPopup({
|
|
|
8451
8538
|
capturedPreview,
|
|
8452
8539
|
Boolean(capturePreview)
|
|
8453
8540
|
);
|
|
8454
|
-
return /* @__PURE__ */
|
|
8541
|
+
return /* @__PURE__ */ jsx10(
|
|
8455
8542
|
WorkbenchHostDockPopupCard,
|
|
8456
8543
|
{
|
|
8457
8544
|
ref: registerCard(item.node.id),
|
|
@@ -8466,14 +8553,14 @@ function WorkbenchHostDockPopup({
|
|
|
8466
8553
|
item.node.id
|
|
8467
8554
|
);
|
|
8468
8555
|
}),
|
|
8469
|
-
showCreateNew !== false ? /* @__PURE__ */
|
|
8556
|
+
showCreateNew !== false ? /* @__PURE__ */ jsxs7(
|
|
8470
8557
|
"button",
|
|
8471
8558
|
{
|
|
8472
8559
|
className: "flex h-[103px] w-[165px] min-w-0 flex-col items-center justify-center gap-2 rounded-[8px] border border-dashed border-[var(--border-1)] bg-transparency-block text-center text-[var(--text-secondary)] transition-colors hover:bg-transparency-hover hover:text-[var(--text-primary)]",
|
|
8473
8560
|
type: "button",
|
|
8474
8561
|
onClick: onCreateNew,
|
|
8475
8562
|
children: [
|
|
8476
|
-
/* @__PURE__ */
|
|
8563
|
+
/* @__PURE__ */ jsx10(
|
|
8477
8564
|
FileCreateIcon,
|
|
8478
8565
|
{
|
|
8479
8566
|
"aria-hidden": "true",
|
|
@@ -8481,7 +8568,7 @@ function WorkbenchHostDockPopup({
|
|
|
8481
8568
|
size: 28
|
|
8482
8569
|
}
|
|
8483
8570
|
),
|
|
8484
|
-
/* @__PURE__ */
|
|
8571
|
+
/* @__PURE__ */ jsx10("span", { className: "text-xs font-semibold text-[var(--text-primary)]", children: newWindowLabel })
|
|
8485
8572
|
]
|
|
8486
8573
|
}
|
|
8487
8574
|
) : null
|
|
@@ -8522,14 +8609,14 @@ function WorkbenchHostDockContextMenu({
|
|
|
8522
8609
|
const hasOpenCommand = !hasOpenWindows;
|
|
8523
8610
|
const hasDockActionGroup = Boolean(dockRetention) || hasNewWindowCommand || hasOpenCommand;
|
|
8524
8611
|
const hasWindowActionGroup = hasOpenWindows;
|
|
8525
|
-
return /* @__PURE__ */
|
|
8612
|
+
return /* @__PURE__ */ jsxs7(
|
|
8526
8613
|
"div",
|
|
8527
8614
|
{
|
|
8528
8615
|
className: "flex min-w-0 flex-col gap-1",
|
|
8529
8616
|
"data-desktop-dock-context-menu": "true",
|
|
8530
8617
|
role: "menu",
|
|
8531
8618
|
children: [
|
|
8532
|
-
hasOpenWindows ? /* @__PURE__ */
|
|
8619
|
+
hasOpenWindows ? /* @__PURE__ */ jsx10(Fragment5, { children: /* @__PURE__ */ jsx10("div", { className: "max-h-48 min-w-0 overflow-auto overscroll-contain", children: items.map((item) => /* @__PURE__ */ jsx10(
|
|
8533
8620
|
WorkbenchHostDockContextMenuItem,
|
|
8534
8621
|
{
|
|
8535
8622
|
checked: !item.isMinimized,
|
|
@@ -8538,12 +8625,12 @@ function WorkbenchHostDockContextMenu({
|
|
|
8538
8625
|
},
|
|
8539
8626
|
item.node.id
|
|
8540
8627
|
)) }) }) : null,
|
|
8541
|
-
hasOpenWindows && (hasDockActionGroup || hasWindowActionGroup) ? /* @__PURE__ */
|
|
8542
|
-
dockRetention ? /* @__PURE__ */
|
|
8628
|
+
hasOpenWindows && (hasDockActionGroup || hasWindowActionGroup) ? /* @__PURE__ */ jsx10(WorkbenchHostDockContextMenuSeparator, {}) : null,
|
|
8629
|
+
dockRetention ? /* @__PURE__ */ jsx10(
|
|
8543
8630
|
WorkbenchHostDockContextMenuItem,
|
|
8544
8631
|
{
|
|
8545
8632
|
checked: dockRetention.checked,
|
|
8546
|
-
checkedIcon: /* @__PURE__ */
|
|
8633
|
+
checkedIcon: /* @__PURE__ */ jsx10(
|
|
8547
8634
|
PinFilledIcon,
|
|
8548
8635
|
{
|
|
8549
8636
|
"aria-hidden": "true",
|
|
@@ -8551,61 +8638,61 @@ function WorkbenchHostDockContextMenu({
|
|
|
8551
8638
|
}
|
|
8552
8639
|
),
|
|
8553
8640
|
disabled: dockRetention.disabled,
|
|
8554
|
-
icon: /* @__PURE__ */
|
|
8641
|
+
icon: /* @__PURE__ */ jsx10(PinIcon, { "aria-hidden": "true", className: "size-4" }),
|
|
8555
8642
|
label: dockRetention.pendingLabel ?? dockRetention.label,
|
|
8556
8643
|
onSelect: onRunDockRetentionAction
|
|
8557
8644
|
}
|
|
8558
8645
|
) : null,
|
|
8559
|
-
hasNewWindowCommand ? /* @__PURE__ */
|
|
8646
|
+
hasNewWindowCommand ? /* @__PURE__ */ jsx10(
|
|
8560
8647
|
WorkbenchHostDockContextMenuItem,
|
|
8561
8648
|
{
|
|
8562
|
-
icon: /* @__PURE__ */
|
|
8649
|
+
icon: /* @__PURE__ */ jsx10(FileCreateIcon, { "aria-hidden": "true", className: "size-4" }),
|
|
8563
8650
|
label: newWindowLabel,
|
|
8564
8651
|
onSelect: onCreateNew
|
|
8565
8652
|
}
|
|
8566
8653
|
) : null,
|
|
8567
|
-
hasOpenCommand ? /* @__PURE__ */
|
|
8654
|
+
hasOpenCommand ? /* @__PURE__ */ jsx10(
|
|
8568
8655
|
WorkbenchHostDockContextMenuItem,
|
|
8569
8656
|
{
|
|
8570
8657
|
disabled: !showOpen,
|
|
8571
|
-
icon: /* @__PURE__ */
|
|
8658
|
+
icon: /* @__PURE__ */ jsx10(FileCreateIcon, { "aria-hidden": "true", className: "size-4" }),
|
|
8572
8659
|
label: openLabel,
|
|
8573
8660
|
onSelect: onCreateNew
|
|
8574
8661
|
}
|
|
8575
8662
|
) : null,
|
|
8576
|
-
hasOpenWindows ? /* @__PURE__ */
|
|
8577
|
-
hasDockActionGroup ? /* @__PURE__ */
|
|
8578
|
-
canShowAllWindows && onShowAllWindows ? /* @__PURE__ */
|
|
8663
|
+
hasOpenWindows ? /* @__PURE__ */ jsxs7(Fragment5, { children: [
|
|
8664
|
+
hasDockActionGroup ? /* @__PURE__ */ jsx10(WorkbenchHostDockContextMenuSeparator, {}) : null,
|
|
8665
|
+
canShowAllWindows && onShowAllWindows ? /* @__PURE__ */ jsx10(
|
|
8579
8666
|
WorkbenchHostDockContextMenuItem,
|
|
8580
8667
|
{
|
|
8581
|
-
icon: /* @__PURE__ */
|
|
8668
|
+
icon: /* @__PURE__ */ jsx10(OverviewLayoutIcon, { "aria-hidden": "true", className: "size-4" }),
|
|
8582
8669
|
label: showAllWindowsLabel,
|
|
8583
8670
|
onSelect: onShowAllWindows
|
|
8584
8671
|
}
|
|
8585
8672
|
) : null,
|
|
8586
|
-
/* @__PURE__ */
|
|
8673
|
+
/* @__PURE__ */ jsx10(
|
|
8587
8674
|
WorkbenchHostDockContextMenuItem,
|
|
8588
8675
|
{
|
|
8589
8676
|
disabled: !canEnterFullscreen || !onEnterFullscreen,
|
|
8590
|
-
icon: /* @__PURE__ */
|
|
8677
|
+
icon: /* @__PURE__ */ jsx10(MaximizeIcon, { "aria-hidden": "true", className: "size-4" }),
|
|
8591
8678
|
label: fullscreenLabel,
|
|
8592
8679
|
onSelect: onEnterFullscreen
|
|
8593
8680
|
}
|
|
8594
8681
|
),
|
|
8595
|
-
/* @__PURE__ */
|
|
8682
|
+
/* @__PURE__ */ jsx10(
|
|
8596
8683
|
WorkbenchHostDockContextMenuItem,
|
|
8597
8684
|
{
|
|
8598
8685
|
disabled: !onHide,
|
|
8599
|
-
icon: /* @__PURE__ */
|
|
8686
|
+
icon: /* @__PURE__ */ jsx10(MinimizeIcon, { "aria-hidden": "true", className: "size-4" }),
|
|
8600
8687
|
label: hideLabel,
|
|
8601
8688
|
onSelect: onHide
|
|
8602
8689
|
}
|
|
8603
8690
|
),
|
|
8604
|
-
/* @__PURE__ */
|
|
8691
|
+
/* @__PURE__ */ jsx10(
|
|
8605
8692
|
WorkbenchHostDockContextMenuItem,
|
|
8606
8693
|
{
|
|
8607
8694
|
disabled: !onQuit,
|
|
8608
|
-
icon: /* @__PURE__ */
|
|
8695
|
+
icon: /* @__PURE__ */ jsx10(CloseIcon, { "aria-hidden": "true", className: "size-4" }),
|
|
8609
8696
|
label: quitLabel,
|
|
8610
8697
|
onSelect: onQuit
|
|
8611
8698
|
}
|
|
@@ -8623,7 +8710,7 @@ function WorkbenchHostDockContextMenuItem({
|
|
|
8623
8710
|
label,
|
|
8624
8711
|
onSelect
|
|
8625
8712
|
}) {
|
|
8626
|
-
return /* @__PURE__ */
|
|
8713
|
+
return /* @__PURE__ */ jsxs7(
|
|
8627
8714
|
"button",
|
|
8628
8715
|
{
|
|
8629
8716
|
className: cn(
|
|
@@ -8640,20 +8727,20 @@ function WorkbenchHostDockContextMenuItem({
|
|
|
8640
8727
|
onSelect();
|
|
8641
8728
|
},
|
|
8642
8729
|
children: [
|
|
8643
|
-
/* @__PURE__ */
|
|
8730
|
+
/* @__PURE__ */ jsx10("span", { className: "flex size-4 shrink-0 items-center justify-center text-[var(--text-secondary)]", children: checked && checkedIcon ? checkedIcon : checked ? /* @__PURE__ */ jsx10(
|
|
8644
8731
|
CheckIcon,
|
|
8645
8732
|
{
|
|
8646
8733
|
"aria-hidden": "true",
|
|
8647
8734
|
className: "size-4 text-[var(--tutti-purple)]"
|
|
8648
8735
|
}
|
|
8649
8736
|
) : icon ?? null }),
|
|
8650
|
-
/* @__PURE__ */
|
|
8737
|
+
/* @__PURE__ */ jsx10("span", { className: "min-w-0 truncate", children: label })
|
|
8651
8738
|
]
|
|
8652
8739
|
}
|
|
8653
8740
|
);
|
|
8654
8741
|
}
|
|
8655
8742
|
function WorkbenchHostDockContextMenuSeparator() {
|
|
8656
|
-
return /* @__PURE__ */
|
|
8743
|
+
return /* @__PURE__ */ jsx10(
|
|
8657
8744
|
"div",
|
|
8658
8745
|
{
|
|
8659
8746
|
"aria-hidden": "true",
|
|
@@ -8802,7 +8889,7 @@ var WorkbenchHostDockPopupCard = forwardRef(function WorkbenchHostDockPopupCard2
|
|
|
8802
8889
|
[handleSelect]
|
|
8803
8890
|
);
|
|
8804
8891
|
const hasReadyPreview = previewState.status === "ready";
|
|
8805
|
-
return /* @__PURE__ */
|
|
8892
|
+
return /* @__PURE__ */ jsxs7(
|
|
8806
8893
|
"div",
|
|
8807
8894
|
{
|
|
8808
8895
|
ref,
|
|
@@ -8817,7 +8904,7 @@ var WorkbenchHostDockPopupCard = forwardRef(function WorkbenchHostDockPopupCard2
|
|
|
8817
8904
|
"data-minimized": item.isMinimized ? "true" : void 0,
|
|
8818
8905
|
style,
|
|
8819
8906
|
children: [
|
|
8820
|
-
/* @__PURE__ */
|
|
8907
|
+
/* @__PURE__ */ jsxs7(
|
|
8821
8908
|
"div",
|
|
8822
8909
|
{
|
|
8823
8910
|
"aria-label": title,
|
|
@@ -8831,13 +8918,13 @@ var WorkbenchHostDockPopupCard = forwardRef(function WorkbenchHostDockPopupCard2
|
|
|
8831
8918
|
onClick: handleSelect,
|
|
8832
8919
|
onKeyDown: handleSelectKeyDown,
|
|
8833
8920
|
children: [
|
|
8834
|
-
/* @__PURE__ */
|
|
8835
|
-
labelMode === "hover-overlay" && item.title?.trim() ? /* @__PURE__ */
|
|
8921
|
+
/* @__PURE__ */ jsx10(WorkbenchHostDockPopupCardPreview, { previewState }),
|
|
8922
|
+
labelMode === "hover-overlay" && item.title?.trim() ? /* @__PURE__ */ jsx10(WorkbenchHostDockPopupCardLabel, { title: item.title }) : null
|
|
8836
8923
|
]
|
|
8837
8924
|
}
|
|
8838
8925
|
),
|
|
8839
|
-
/* @__PURE__ */
|
|
8840
|
-
|
|
8926
|
+
/* @__PURE__ */ jsx10(
|
|
8927
|
+
Button2,
|
|
8841
8928
|
{
|
|
8842
8929
|
"aria-label": closeWindowLabel(title),
|
|
8843
8930
|
className: "absolute top-1.5 right-1.5 z-[2] rounded-full bg-[var(--background-fronted)] opacity-0 transition-[background-color,opacity] duration-150 hover:bg-[var(--background-fronted)] focus-visible:bg-[var(--background-fronted)] group-hover/dock-popup-card:opacity-100 group-focus-within/dock-popup-card:opacity-100 focus-visible:opacity-100",
|
|
@@ -8850,10 +8937,10 @@ var WorkbenchHostDockPopupCard = forwardRef(function WorkbenchHostDockPopupCard2
|
|
|
8850
8937
|
event.stopPropagation();
|
|
8851
8938
|
onCloseNode(item.node.id);
|
|
8852
8939
|
},
|
|
8853
|
-
children: /* @__PURE__ */
|
|
8940
|
+
children: /* @__PURE__ */ jsx10(CloseIcon, { className: "size-3.5" })
|
|
8854
8941
|
}
|
|
8855
8942
|
),
|
|
8856
|
-
item.isFocused ? /* @__PURE__ */
|
|
8943
|
+
item.isFocused ? /* @__PURE__ */ jsx10(
|
|
8857
8944
|
"span",
|
|
8858
8945
|
{
|
|
8859
8946
|
"aria-hidden": "true",
|
|
@@ -8861,7 +8948,7 @@ var WorkbenchHostDockPopupCard = forwardRef(function WorkbenchHostDockPopupCard2
|
|
|
8861
8948
|
"data-desktop-dock-popup-card-active-overlay": "true"
|
|
8862
8949
|
}
|
|
8863
8950
|
) : null,
|
|
8864
|
-
isMinimizedStack ? /* @__PURE__ */
|
|
8951
|
+
isMinimizedStack ? /* @__PURE__ */ jsx10("span", { className: "desktop-dock-popup__fan-title-tip", title, children: title }) : null
|
|
8865
8952
|
]
|
|
8866
8953
|
}
|
|
8867
8954
|
);
|
|
@@ -8870,23 +8957,23 @@ function WorkbenchHostDockPopupCardPreview({
|
|
|
8870
8957
|
previewState
|
|
8871
8958
|
}) {
|
|
8872
8959
|
if (previewState.status !== "ready") {
|
|
8873
|
-
return /* @__PURE__ */
|
|
8960
|
+
return /* @__PURE__ */ jsxs7(
|
|
8874
8961
|
"span",
|
|
8875
8962
|
{
|
|
8876
8963
|
className: "flex min-h-0 min-w-0 flex-1 flex-col justify-center gap-[7px] rounded-md border border-[var(--border-1)] bg-transparency-block px-3 py-[11px]",
|
|
8877
8964
|
"aria-hidden": "true",
|
|
8878
8965
|
"data-preview-state": previewState.status,
|
|
8879
8966
|
children: [
|
|
8880
|
-
/* @__PURE__ */
|
|
8881
|
-
/* @__PURE__ */
|
|
8882
|
-
/* @__PURE__ */
|
|
8967
|
+
/* @__PURE__ */ jsx10("span", { className: "block h-[7px] w-[72%] rounded-full bg-transparency-hover" }),
|
|
8968
|
+
/* @__PURE__ */ jsx10("span", { className: "block h-[7px] w-[58%] rounded-full bg-transparency-hover" }),
|
|
8969
|
+
/* @__PURE__ */ jsx10("span", { className: "block h-[7px] w-[34%] rounded-full bg-transparency-hover" })
|
|
8883
8970
|
]
|
|
8884
8971
|
}
|
|
8885
8972
|
);
|
|
8886
8973
|
}
|
|
8887
8974
|
const preview = previewState.preview;
|
|
8888
8975
|
if (preview.kind === "component") {
|
|
8889
|
-
return /* @__PURE__ */
|
|
8976
|
+
return /* @__PURE__ */ jsx10(
|
|
8890
8977
|
"span",
|
|
8891
8978
|
{
|
|
8892
8979
|
className: "block min-h-0 min-w-0 flex-1 overflow-hidden rounded-md",
|
|
@@ -8897,14 +8984,14 @@ function WorkbenchHostDockPopupCardPreview({
|
|
|
8897
8984
|
}
|
|
8898
8985
|
);
|
|
8899
8986
|
}
|
|
8900
|
-
return /* @__PURE__ */
|
|
8987
|
+
return /* @__PURE__ */ jsx10(
|
|
8901
8988
|
"span",
|
|
8902
8989
|
{
|
|
8903
8990
|
className: "block min-h-0 min-w-0 flex-1 overflow-hidden rounded-md",
|
|
8904
8991
|
"aria-hidden": "true",
|
|
8905
8992
|
"data-preview-kind": preview.kind,
|
|
8906
8993
|
"data-preview-state": previewState.status,
|
|
8907
|
-
children: /* @__PURE__ */
|
|
8994
|
+
children: /* @__PURE__ */ jsx10(
|
|
8908
8995
|
"img",
|
|
8909
8996
|
{
|
|
8910
8997
|
alt: "",
|
|
@@ -8917,7 +9004,7 @@ function WorkbenchHostDockPopupCardPreview({
|
|
|
8917
9004
|
);
|
|
8918
9005
|
}
|
|
8919
9006
|
function WorkbenchHostDockPopupCardLabel({ title }) {
|
|
8920
|
-
return /* @__PURE__ */
|
|
9007
|
+
return /* @__PURE__ */ jsx10(
|
|
8921
9008
|
"span",
|
|
8922
9009
|
{
|
|
8923
9010
|
className: "pointer-events-none absolute inset-x-0 bottom-0 z-[1] flex h-[30px] items-end px-[10px] pb-0.5 text-[var(--white-stationary)] opacity-0 transition-opacity duration-150 [text-shadow:0_1px_2px_rgb(0_0_0_/_20%)] group-hover/dock-popup-card:opacity-100 group-focus-within/dock-popup-card:opacity-100",
|
|
@@ -8925,13 +9012,13 @@ function WorkbenchHostDockPopupCardLabel({ title }) {
|
|
|
8925
9012
|
background: "linear-gradient(180deg, transparent 0%, color-mix(in srgb, hsl(var(--card)) 28%, transparent) 18%, color-mix(in srgb, hsl(var(--card)) 82%, transparent) 56%, color-mix(in srgb, hsl(var(--card)) 98%, transparent) 100%)"
|
|
8926
9013
|
},
|
|
8927
9014
|
title,
|
|
8928
|
-
children: /* @__PURE__ */
|
|
9015
|
+
children: /* @__PURE__ */ jsx10("span", { className: "desktop-dock-popup__title-viewport block min-w-0 flex-1 overflow-hidden whitespace-nowrap", children: /* @__PURE__ */ jsx10("span", { className: "desktop-dock-popup__title-marquee inline-block max-w-full overflow-hidden text-[12px] font-semibold leading-5 text-ellipsis whitespace-nowrap", children: title }) })
|
|
8929
9016
|
}
|
|
8930
9017
|
);
|
|
8931
9018
|
}
|
|
8932
9019
|
|
|
8933
9020
|
// src/host/WorkbenchHostDock.tsx
|
|
8934
|
-
import { jsx as
|
|
9021
|
+
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
8935
9022
|
var minimizedDockPreviewViewport = {
|
|
8936
9023
|
height: 34.2,
|
|
8937
9024
|
width: 46.8
|
|
@@ -9964,20 +10051,20 @@ function WorkbenchHostDock({
|
|
|
9964
10051
|
instanceMode: dockContextMenuInstanceMode,
|
|
9965
10052
|
matchedNodes: popupEntry.matchedNodes
|
|
9966
10053
|
}).kind === "launch";
|
|
9967
|
-
return /* @__PURE__ */
|
|
10054
|
+
return /* @__PURE__ */ jsxs8(
|
|
9968
10055
|
"div",
|
|
9969
10056
|
{
|
|
9970
10057
|
className: "flex justify-center pointer-events-none",
|
|
9971
10058
|
"data-dock-placement": dockPlacement,
|
|
9972
10059
|
children: [
|
|
9973
|
-
/* @__PURE__ */
|
|
10060
|
+
/* @__PURE__ */ jsx11(
|
|
9974
10061
|
"div",
|
|
9975
10062
|
{
|
|
9976
10063
|
className: "desktop-dock-plate",
|
|
9977
10064
|
style: dockFrameSize === null ? void 0 : {
|
|
9978
10065
|
"--desktop-dock-frame-size": `${dockFrameSize}px`
|
|
9979
10066
|
},
|
|
9980
|
-
children: /* @__PURE__ */
|
|
10067
|
+
children: /* @__PURE__ */ jsxs8(
|
|
9981
10068
|
"div",
|
|
9982
10069
|
{
|
|
9983
10070
|
ref: dockMeasureRef,
|
|
@@ -10003,7 +10090,7 @@ function WorkbenchHostDock({
|
|
|
10003
10090
|
role: "toolbar",
|
|
10004
10091
|
style: dockPlacement === "left" ? { height: dockWidth } : { width: dockWidth },
|
|
10005
10092
|
children: [
|
|
10006
|
-
/* @__PURE__ */
|
|
10093
|
+
/* @__PURE__ */ jsx11(
|
|
10007
10094
|
"span",
|
|
10008
10095
|
{
|
|
10009
10096
|
className: "desktop-dock__pointer-rail",
|
|
@@ -10011,7 +10098,7 @@ function WorkbenchHostDock({
|
|
|
10011
10098
|
"aria-hidden": true
|
|
10012
10099
|
}
|
|
10013
10100
|
),
|
|
10014
|
-
/* @__PURE__ */
|
|
10101
|
+
/* @__PURE__ */ jsx11(
|
|
10015
10102
|
"button",
|
|
10016
10103
|
{
|
|
10017
10104
|
"aria-label": i18n.t(
|
|
@@ -10022,12 +10109,12 @@ function WorkbenchHostDock({
|
|
|
10022
10109
|
disabled: !dockScrollState.canScrollBackward,
|
|
10023
10110
|
onClick: () => scrollDockItems("backward"),
|
|
10024
10111
|
type: "button",
|
|
10025
|
-
children: dockPlacement === "left" ? /* @__PURE__ */
|
|
10112
|
+
children: dockPlacement === "left" ? /* @__PURE__ */ jsx11(ChevronUpIcon, { size: 16 }) : /* @__PURE__ */ jsx11(ArrowLeftIcon, { size: 16 })
|
|
10026
10113
|
}
|
|
10027
10114
|
),
|
|
10028
|
-
/* @__PURE__ */
|
|
10115
|
+
/* @__PURE__ */ jsx11("div", { ref: dockItemsRef, className: "desktop-dock__items", children: presentDockItems.map((dockItem) => {
|
|
10029
10116
|
if (dockItem.item.kind === "separator") {
|
|
10030
|
-
return /* @__PURE__ */
|
|
10117
|
+
return /* @__PURE__ */ jsx11(
|
|
10031
10118
|
"span",
|
|
10032
10119
|
{
|
|
10033
10120
|
ref: registerWallpaperToneElement(dockItem.key),
|
|
@@ -10054,7 +10141,7 @@ function WorkbenchHostDock({
|
|
|
10054
10141
|
});
|
|
10055
10142
|
const hasHoverPanel = dockEntryHasHoverPanel(entry);
|
|
10056
10143
|
const labelTooltipTarget2 = hasHoverPanel ? null : dockLabelTooltipTarget(`entry:${entry.id}`, entry.label);
|
|
10057
|
-
const dockButton2 = /* @__PURE__ */
|
|
10144
|
+
const dockButton2 = /* @__PURE__ */ jsx11(
|
|
10058
10145
|
"button",
|
|
10059
10146
|
{
|
|
10060
10147
|
"aria-expanded": currentPopup ? true : void 0,
|
|
@@ -10212,7 +10299,7 @@ function WorkbenchHostDock({
|
|
|
10212
10299
|
entryId: entry.id
|
|
10213
10300
|
});
|
|
10214
10301
|
},
|
|
10215
|
-
children: /* @__PURE__ */
|
|
10302
|
+
children: /* @__PURE__ */ jsxs8(
|
|
10216
10303
|
"span",
|
|
10217
10304
|
{
|
|
10218
10305
|
className: "desktop-dock__icon-shell",
|
|
@@ -10220,7 +10307,7 @@ function WorkbenchHostDock({
|
|
|
10220
10307
|
"data-entry-state": entry.state?.kind ?? "enabled",
|
|
10221
10308
|
"aria-hidden": true,
|
|
10222
10309
|
children: [
|
|
10223
|
-
/* @__PURE__ */
|
|
10310
|
+
/* @__PURE__ */ jsx11("span", { className: "desktop-dock__icon-content", children: entry.icon }),
|
|
10224
10311
|
renderDockBadge(
|
|
10225
10312
|
entry,
|
|
10226
10313
|
resolvedEntry.matchedNodes.length
|
|
@@ -10230,7 +10317,7 @@ function WorkbenchHostDock({
|
|
|
10230
10317
|
)
|
|
10231
10318
|
}
|
|
10232
10319
|
);
|
|
10233
|
-
return /* @__PURE__ */
|
|
10320
|
+
return /* @__PURE__ */ jsx11(
|
|
10234
10321
|
"span",
|
|
10235
10322
|
{
|
|
10236
10323
|
ref: registerDockSlot(anchorKey),
|
|
@@ -10331,7 +10418,7 @@ function WorkbenchHostDock({
|
|
|
10331
10418
|
`minimized-stack:${slot.anchorKey}`,
|
|
10332
10419
|
stackLabel
|
|
10333
10420
|
);
|
|
10334
|
-
const stackButton = /* @__PURE__ */
|
|
10421
|
+
const stackButton = /* @__PURE__ */ jsx11(
|
|
10335
10422
|
"span",
|
|
10336
10423
|
{
|
|
10337
10424
|
"aria-expanded": stackPopupActive,
|
|
@@ -10365,7 +10452,7 @@ function WorkbenchHostDock({
|
|
|
10365
10452
|
}
|
|
10366
10453
|
);
|
|
10367
10454
|
},
|
|
10368
|
-
children: /* @__PURE__ */
|
|
10455
|
+
children: /* @__PURE__ */ jsxs8(
|
|
10369
10456
|
"span",
|
|
10370
10457
|
{
|
|
10371
10458
|
className: "desktop-dock__minimized-stack-icon",
|
|
@@ -10380,7 +10467,7 @@ function WorkbenchHostDock({
|
|
|
10380
10467
|
(_, index) => {
|
|
10381
10468
|
const node2 = slot.nodes[index];
|
|
10382
10469
|
if (index === 0 && node2) {
|
|
10383
|
-
return /* @__PURE__ */
|
|
10470
|
+
return /* @__PURE__ */ jsx11(
|
|
10384
10471
|
WorkbenchHostDockMinimizedNodePreview,
|
|
10385
10472
|
{
|
|
10386
10473
|
capturePreview: captureMinimizedNodePreview,
|
|
@@ -10395,7 +10482,7 @@ function WorkbenchHostDock({
|
|
|
10395
10482
|
minimizedDockPreviewFreezeKey(node2)
|
|
10396
10483
|
);
|
|
10397
10484
|
}
|
|
10398
|
-
return /* @__PURE__ */
|
|
10485
|
+
return /* @__PURE__ */ jsx11(
|
|
10399
10486
|
"span",
|
|
10400
10487
|
{
|
|
10401
10488
|
"aria-hidden": "true",
|
|
@@ -10405,13 +10492,13 @@ function WorkbenchHostDock({
|
|
|
10405
10492
|
);
|
|
10406
10493
|
}
|
|
10407
10494
|
),
|
|
10408
|
-
/* @__PURE__ */
|
|
10495
|
+
/* @__PURE__ */ jsx11("span", { className: "desktop-dock__count-badge", children: slot.nodes.length })
|
|
10409
10496
|
]
|
|
10410
10497
|
}
|
|
10411
10498
|
)
|
|
10412
10499
|
}
|
|
10413
10500
|
);
|
|
10414
|
-
return /* @__PURE__ */
|
|
10501
|
+
return /* @__PURE__ */ jsx11(
|
|
10415
10502
|
"span",
|
|
10416
10503
|
{
|
|
10417
10504
|
ref: registerDockSlot(slot.anchorKey),
|
|
@@ -10466,7 +10553,7 @@ function WorkbenchHostDock({
|
|
|
10466
10553
|
`minimized-node:${node.id}`,
|
|
10467
10554
|
node.title
|
|
10468
10555
|
);
|
|
10469
|
-
const dockButton = /* @__PURE__ */
|
|
10556
|
+
const dockButton = /* @__PURE__ */ jsx11(
|
|
10470
10557
|
"span",
|
|
10471
10558
|
{
|
|
10472
10559
|
"aria-label": i18n.t("launch", { title: node.title }),
|
|
@@ -10527,7 +10614,7 @@ function WorkbenchHostDock({
|
|
|
10527
10614
|
}
|
|
10528
10615
|
);
|
|
10529
10616
|
},
|
|
10530
|
-
children: /* @__PURE__ */
|
|
10617
|
+
children: /* @__PURE__ */ jsx11(
|
|
10531
10618
|
WorkbenchHostDockMinimizedNodePreview,
|
|
10532
10619
|
{
|
|
10533
10620
|
capturePreview: isPendingMinimizedNode ? void 0 : captureMinimizedNodePreview,
|
|
@@ -10541,7 +10628,7 @@ function WorkbenchHostDock({
|
|
|
10541
10628
|
)
|
|
10542
10629
|
}
|
|
10543
10630
|
);
|
|
10544
|
-
return /* @__PURE__ */
|
|
10631
|
+
return /* @__PURE__ */ jsx11(
|
|
10545
10632
|
"span",
|
|
10546
10633
|
{
|
|
10547
10634
|
ref: registerDockSlot(slot.anchorKey),
|
|
@@ -10591,7 +10678,7 @@ function WorkbenchHostDock({
|
|
|
10591
10678
|
dockItem.key
|
|
10592
10679
|
);
|
|
10593
10680
|
}) }),
|
|
10594
|
-
/* @__PURE__ */
|
|
10681
|
+
/* @__PURE__ */ jsx11(
|
|
10595
10682
|
"button",
|
|
10596
10683
|
{
|
|
10597
10684
|
"aria-label": i18n.t(
|
|
@@ -10602,10 +10689,10 @@ function WorkbenchHostDock({
|
|
|
10602
10689
|
disabled: !dockScrollState.canScrollForward,
|
|
10603
10690
|
onClick: () => scrollDockItems("forward"),
|
|
10604
10691
|
type: "button",
|
|
10605
|
-
children: dockPlacement === "left" ? /* @__PURE__ */
|
|
10692
|
+
children: dockPlacement === "left" ? /* @__PURE__ */ jsx11(ChevronDownIcon, { size: 16 }) : /* @__PURE__ */ jsx11(ArrowRightIcon, { size: 16 })
|
|
10606
10693
|
}
|
|
10607
10694
|
),
|
|
10608
|
-
activeHoverPanel ? /* @__PURE__ */
|
|
10695
|
+
activeHoverPanel ? /* @__PURE__ */ jsx11(
|
|
10609
10696
|
WorkbenchHostDockHoverPanel,
|
|
10610
10697
|
{
|
|
10611
10698
|
entry: resolvedEntries.find(
|
|
@@ -10638,7 +10725,7 @@ function WorkbenchHostDock({
|
|
|
10638
10725
|
}
|
|
10639
10726
|
}
|
|
10640
10727
|
) : null,
|
|
10641
|
-
activeLabelTooltip ? /* @__PURE__ */
|
|
10728
|
+
activeLabelTooltip ? /* @__PURE__ */ jsx11(
|
|
10642
10729
|
WorkbenchHostDockLabelTooltip,
|
|
10643
10730
|
{
|
|
10644
10731
|
placement: dockPlacement,
|
|
@@ -10650,7 +10737,7 @@ function WorkbenchHostDock({
|
|
|
10650
10737
|
)
|
|
10651
10738
|
}
|
|
10652
10739
|
),
|
|
10653
|
-
popupEntry && activePopup ? /* @__PURE__ */
|
|
10740
|
+
popupEntry && activePopup ? /* @__PURE__ */ jsx11(
|
|
10654
10741
|
WorkbenchHostDockPopup,
|
|
10655
10742
|
{
|
|
10656
10743
|
anchorRect: activePopup.anchorRect,
|
|
@@ -10841,7 +10928,7 @@ function WorkbenchHostDock({
|
|
|
10841
10928
|
variant: activePopup.kind === "context-menu" ? "context-menu" : "default"
|
|
10842
10929
|
}
|
|
10843
10930
|
) : null,
|
|
10844
|
-
activeMinimizedStackSlot && activeMinimizedStackPopup ? /* @__PURE__ */
|
|
10931
|
+
activeMinimizedStackSlot && activeMinimizedStackPopup ? /* @__PURE__ */ jsx11(
|
|
10845
10932
|
WorkbenchHostDockPopup,
|
|
10846
10933
|
{
|
|
10847
10934
|
anchorRect: activeMinimizedStackPopup,
|
|
@@ -11056,7 +11143,7 @@ function WorkbenchHostDockMinimizedNodePreview({
|
|
|
11056
11143
|
return renderMinimizedDockPreviewContent(componentPreview, className);
|
|
11057
11144
|
}
|
|
11058
11145
|
if (previewImageUrl) {
|
|
11059
|
-
return /* @__PURE__ */
|
|
11146
|
+
return /* @__PURE__ */ jsx11(
|
|
11060
11147
|
"span",
|
|
11061
11148
|
{
|
|
11062
11149
|
className: [
|
|
@@ -11065,7 +11152,7 @@ function WorkbenchHostDockMinimizedNodePreview({
|
|
|
11065
11152
|
className
|
|
11066
11153
|
].filter(Boolean).join(" "),
|
|
11067
11154
|
"aria-hidden": "true",
|
|
11068
|
-
children: /* @__PURE__ */
|
|
11155
|
+
children: /* @__PURE__ */ jsx11(
|
|
11069
11156
|
"img",
|
|
11070
11157
|
{
|
|
11071
11158
|
alt: "",
|
|
@@ -11080,22 +11167,22 @@ function WorkbenchHostDockMinimizedNodePreview({
|
|
|
11080
11167
|
return renderMinimizedDockPreviewPlaceholder(className);
|
|
11081
11168
|
}
|
|
11082
11169
|
function renderMinimizedDockPreviewPlaceholder(className) {
|
|
11083
|
-
return /* @__PURE__ */
|
|
11170
|
+
return /* @__PURE__ */ jsxs8(
|
|
11084
11171
|
"span",
|
|
11085
11172
|
{
|
|
11086
11173
|
className: ["desktop-dock__minimized-preview", className].filter(Boolean).join(" "),
|
|
11087
11174
|
"aria-hidden": "true",
|
|
11088
11175
|
children: [
|
|
11089
|
-
/* @__PURE__ */
|
|
11090
|
-
/* @__PURE__ */
|
|
11091
|
-
/* @__PURE__ */
|
|
11176
|
+
/* @__PURE__ */ jsx11("span", { className: "desktop-dock__minimized-preview-line" }),
|
|
11177
|
+
/* @__PURE__ */ jsx11("span", { className: "desktop-dock__minimized-preview-line desktop-dock__minimized-preview-line--short" }),
|
|
11178
|
+
/* @__PURE__ */ jsx11("span", { className: "desktop-dock__minimized-preview-line desktop-dock__minimized-preview-line--accent" })
|
|
11092
11179
|
]
|
|
11093
11180
|
}
|
|
11094
11181
|
);
|
|
11095
11182
|
}
|
|
11096
11183
|
function renderMinimizedDockPreviewContent(preview, className) {
|
|
11097
11184
|
if (preview.kind === "image") {
|
|
11098
|
-
return /* @__PURE__ */
|
|
11185
|
+
return /* @__PURE__ */ jsx11(
|
|
11099
11186
|
"span",
|
|
11100
11187
|
{
|
|
11101
11188
|
className: [
|
|
@@ -11104,7 +11191,7 @@ function renderMinimizedDockPreviewContent(preview, className) {
|
|
|
11104
11191
|
className
|
|
11105
11192
|
].filter(Boolean).join(" "),
|
|
11106
11193
|
"aria-hidden": "true",
|
|
11107
|
-
children: /* @__PURE__ */
|
|
11194
|
+
children: /* @__PURE__ */ jsx11(
|
|
11108
11195
|
"img",
|
|
11109
11196
|
{
|
|
11110
11197
|
alt: "",
|
|
@@ -11116,7 +11203,7 @@ function renderMinimizedDockPreviewContent(preview, className) {
|
|
|
11116
11203
|
}
|
|
11117
11204
|
);
|
|
11118
11205
|
}
|
|
11119
|
-
return /* @__PURE__ */
|
|
11206
|
+
return /* @__PURE__ */ jsx11(
|
|
11120
11207
|
WorkbenchHostDockFrozenComponentPreview,
|
|
11121
11208
|
{
|
|
11122
11209
|
className,
|
|
@@ -11136,7 +11223,7 @@ function WorkbenchHostDockFrozenComponentPreview({
|
|
|
11136
11223
|
}
|
|
11137
11224
|
setFrozenMarkup(sourceRef.current?.innerHTML ?? "");
|
|
11138
11225
|
}, [frozenMarkup]);
|
|
11139
|
-
return /* @__PURE__ */
|
|
11226
|
+
return /* @__PURE__ */ jsx11(
|
|
11140
11227
|
"span",
|
|
11141
11228
|
{
|
|
11142
11229
|
className: [
|
|
@@ -11145,14 +11232,14 @@ function WorkbenchHostDockFrozenComponentPreview({
|
|
|
11145
11232
|
className
|
|
11146
11233
|
].filter(Boolean).join(" "),
|
|
11147
11234
|
"aria-hidden": "true",
|
|
11148
|
-
children: frozenMarkup === null ? /* @__PURE__ */
|
|
11235
|
+
children: frozenMarkup === null ? /* @__PURE__ */ jsx11(
|
|
11149
11236
|
"span",
|
|
11150
11237
|
{
|
|
11151
11238
|
ref: sourceRef,
|
|
11152
11239
|
className: "desktop-dock__minimized-preview-freeze-source",
|
|
11153
11240
|
children: preview.element
|
|
11154
11241
|
}
|
|
11155
|
-
) : /* @__PURE__ */
|
|
11242
|
+
) : /* @__PURE__ */ jsx11(
|
|
11156
11243
|
"span",
|
|
11157
11244
|
{
|
|
11158
11245
|
className: "desktop-dock__minimized-preview-frozen-content",
|
|
@@ -11220,18 +11307,18 @@ function renderDockBadge(entry, matchedNodeCount) {
|
|
|
11220
11307
|
return null;
|
|
11221
11308
|
}
|
|
11222
11309
|
if (badge.kind === "count") {
|
|
11223
|
-
return /* @__PURE__ */
|
|
11310
|
+
return /* @__PURE__ */ jsx11("span", { className: "desktop-dock__count-badge", children: badge.value });
|
|
11224
11311
|
}
|
|
11225
11312
|
if (badge.kind === "custom") {
|
|
11226
|
-
return /* @__PURE__ */
|
|
11313
|
+
return /* @__PURE__ */ jsx11("span", { className: "desktop-dock__custom-badge", children: badge.content });
|
|
11227
11314
|
}
|
|
11228
|
-
return /* @__PURE__ */
|
|
11315
|
+
return /* @__PURE__ */ jsx11("span", { className: "desktop-dock__status-badge", "data-status": badge.status });
|
|
11229
11316
|
}
|
|
11230
11317
|
function WorkbenchHostDockLabelTooltip({
|
|
11231
11318
|
placement,
|
|
11232
11319
|
state
|
|
11233
11320
|
}) {
|
|
11234
|
-
return /* @__PURE__ */
|
|
11321
|
+
return /* @__PURE__ */ jsx11(
|
|
11235
11322
|
"div",
|
|
11236
11323
|
{
|
|
11237
11324
|
className: "desktop-dock__label-tooltip",
|
|
@@ -11264,7 +11351,7 @@ function WorkbenchHostDockHoverPanel({
|
|
|
11264
11351
|
if (!entry) {
|
|
11265
11352
|
return null;
|
|
11266
11353
|
}
|
|
11267
|
-
return /* @__PURE__ */
|
|
11354
|
+
return /* @__PURE__ */ jsxs8(
|
|
11268
11355
|
"div",
|
|
11269
11356
|
{
|
|
11270
11357
|
ref: hoverPanelRef,
|
|
@@ -11283,14 +11370,14 @@ function WorkbenchHostDockHoverPanel({
|
|
|
11283
11370
|
"--desktop-dock-hover-panel-anchor-width": `${state.anchorRect.width}px`
|
|
11284
11371
|
},
|
|
11285
11372
|
children: [
|
|
11286
|
-
/* @__PURE__ */
|
|
11287
|
-
entry.state?.reason ? /* @__PURE__ */
|
|
11288
|
-
entry.hoverActions?.length ? /* @__PURE__ */
|
|
11373
|
+
/* @__PURE__ */ jsx11("div", { className: "desktop-dock__hover-panel-title", children: entry.label }),
|
|
11374
|
+
entry.state?.reason ? /* @__PURE__ */ jsx11("div", { className: "desktop-dock__hover-panel-description", children: stripDockDescriptionTerminalPunctuation(entry.state.reason) }) : null,
|
|
11375
|
+
entry.hoverActions?.length ? /* @__PURE__ */ jsx11("div", { className: "desktop-dock__hover-actions", children: entry.hoverActions.map((action) => {
|
|
11289
11376
|
const actionKey = dockActionKey(entry.id, action.id);
|
|
11290
11377
|
const isLocallyPending = pendingActionKeys.has(actionKey);
|
|
11291
11378
|
const isPending = isLocallyPending || action.disabled === true && action.pendingLabel !== void 0;
|
|
11292
|
-
return /* @__PURE__ */
|
|
11293
|
-
|
|
11379
|
+
return /* @__PURE__ */ jsx11(
|
|
11380
|
+
Button3,
|
|
11294
11381
|
{
|
|
11295
11382
|
"aria-busy": isPending ? true : void 0,
|
|
11296
11383
|
className: "desktop-dock__hover-action",
|
|
@@ -12007,8 +12094,7 @@ function createWorkbenchHostNodeHeaderContext({
|
|
|
12007
12094
|
}
|
|
12008
12095
|
|
|
12009
12096
|
// src/host/WorkbenchHostWindowActions.tsx
|
|
12010
|
-
import {
|
|
12011
|
-
import { Fragment as Fragment6, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
12097
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
12012
12098
|
function WorkbenchHostWindowActions({
|
|
12013
12099
|
context,
|
|
12014
12100
|
host,
|
|
@@ -12021,49 +12107,34 @@ function WorkbenchHostWindowActions({
|
|
|
12021
12107
|
}
|
|
12022
12108
|
const minimizable = definition.window?.minimizable !== false;
|
|
12023
12109
|
const closable = definition.window?.closable !== false;
|
|
12024
|
-
return /* @__PURE__ */
|
|
12025
|
-
|
|
12026
|
-
|
|
12027
|
-
{
|
|
12028
|
-
|
|
12029
|
-
|
|
12030
|
-
|
|
12031
|
-
|
|
12032
|
-
|
|
12033
|
-
|
|
12110
|
+
return /* @__PURE__ */ jsx12(
|
|
12111
|
+
WorkbenchWindowTrafficLights,
|
|
12112
|
+
{
|
|
12113
|
+
close: closable ? {
|
|
12114
|
+
label: i18n.t("actions.close"),
|
|
12115
|
+
onClick: () => {
|
|
12116
|
+
host.requestNodeClose(context.node.id);
|
|
12117
|
+
}
|
|
12118
|
+
} : null,
|
|
12119
|
+
minimize: minimizable ? {
|
|
12120
|
+
label: i18n.t("actions.minimize"),
|
|
12034
12121
|
onClick: () => {
|
|
12035
12122
|
context.genie.minimizeNodeToAnchor(
|
|
12036
12123
|
context.node.id,
|
|
12037
12124
|
() => context.controller.commands.minimizeNode(context.node.id)
|
|
12038
12125
|
);
|
|
12039
|
-
}
|
|
12040
|
-
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
closable ? /* @__PURE__ */ jsx11(
|
|
12044
|
-
Button5,
|
|
12045
|
-
{
|
|
12046
|
-
"aria-label": i18n.t("actions.close"),
|
|
12047
|
-
className: "order-3 rounded-md",
|
|
12048
|
-
"data-workbench-action": "close",
|
|
12049
|
-
size: "icon-sm",
|
|
12050
|
-
type: "button",
|
|
12051
|
-
variant: "chrome",
|
|
12052
|
-
onClick: () => {
|
|
12053
|
-
host.requestNodeClose(context.node.id);
|
|
12054
|
-
},
|
|
12055
|
-
children: /* @__PURE__ */ jsx11(CloseIcon2, { className: "size-3.5" })
|
|
12056
|
-
}
|
|
12057
|
-
) : null
|
|
12058
|
-
] });
|
|
12126
|
+
}
|
|
12127
|
+
} : null
|
|
12128
|
+
}
|
|
12129
|
+
);
|
|
12059
12130
|
}
|
|
12060
12131
|
|
|
12061
12132
|
// src/host/useWorkbenchHostSurfaceRenderers.tsx
|
|
12062
|
-
import { jsx as
|
|
12133
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
12063
12134
|
function useWorkbenchHostSurfaceRenderers(input) {
|
|
12064
12135
|
const renderBottomChrome = useMemo6(() => {
|
|
12065
12136
|
const renderChrome = input.renderBottomChrome;
|
|
12066
|
-
return renderChrome ? () => /* @__PURE__ */
|
|
12137
|
+
return renderChrome ? () => /* @__PURE__ */ jsx13(
|
|
12067
12138
|
WorkbenchHostSurfaceRenderErrorBoundary,
|
|
12068
12139
|
{
|
|
12069
12140
|
debugDiagnostics: input.debugDiagnostics,
|
|
@@ -12074,7 +12145,7 @@ function useWorkbenchHostSurfaceRenderers(input) {
|
|
|
12074
12145
|
fallbackKind: "bottom-chrome",
|
|
12075
12146
|
resetKey: `${input.workspaceId}:bottom-chrome`,
|
|
12076
12147
|
workspaceId: input.workspaceId,
|
|
12077
|
-
children: /* @__PURE__ */
|
|
12148
|
+
children: /* @__PURE__ */ jsx13(
|
|
12078
12149
|
WorkbenchHostChromeRenderer,
|
|
12079
12150
|
{
|
|
12080
12151
|
context: input.chromeContext,
|
|
@@ -12091,7 +12162,7 @@ function useWorkbenchHostSurfaceRenderers(input) {
|
|
|
12091
12162
|
]);
|
|
12092
12163
|
const renderTopChrome = useMemo6(() => {
|
|
12093
12164
|
const renderChrome = input.renderTopChrome;
|
|
12094
|
-
return renderChrome ? () => /* @__PURE__ */
|
|
12165
|
+
return renderChrome ? () => /* @__PURE__ */ jsx13(
|
|
12095
12166
|
WorkbenchHostSurfaceRenderErrorBoundary,
|
|
12096
12167
|
{
|
|
12097
12168
|
debugDiagnostics: input.debugDiagnostics,
|
|
@@ -12102,7 +12173,7 @@ function useWorkbenchHostSurfaceRenderers(input) {
|
|
|
12102
12173
|
fallbackKind: "top-chrome",
|
|
12103
12174
|
resetKey: `${input.workspaceId}:top-chrome`,
|
|
12104
12175
|
workspaceId: input.workspaceId,
|
|
12105
|
-
children: /* @__PURE__ */
|
|
12176
|
+
children: /* @__PURE__ */ jsx13(
|
|
12106
12177
|
WorkbenchHostChromeRenderer,
|
|
12107
12178
|
{
|
|
12108
12179
|
context: input.chromeContext,
|
|
@@ -12151,7 +12222,7 @@ function useWorkbenchHostSurfaceRenderers(input) {
|
|
|
12151
12222
|
]
|
|
12152
12223
|
);
|
|
12153
12224
|
const renderDock = useCallback11(
|
|
12154
|
-
(context) => /* @__PURE__ */
|
|
12225
|
+
(context) => /* @__PURE__ */ jsx13(
|
|
12155
12226
|
WorkbenchHostSurfaceRenderErrorBoundary,
|
|
12156
12227
|
{
|
|
12157
12228
|
debugDiagnostics: input.debugDiagnostics,
|
|
@@ -12163,7 +12234,7 @@ function useWorkbenchHostSurfaceRenderers(input) {
|
|
|
12163
12234
|
fallbackKind: "dock",
|
|
12164
12235
|
resetKey: `${input.workspaceId}:dock`,
|
|
12165
12236
|
workspaceId: input.workspaceId,
|
|
12166
|
-
children: /* @__PURE__ */
|
|
12237
|
+
children: /* @__PURE__ */ jsx13(
|
|
12167
12238
|
WorkbenchHostDock,
|
|
12168
12239
|
{
|
|
12169
12240
|
captureNodePreviewImage,
|
|
@@ -12217,14 +12288,14 @@ function useWorkbenchHostSurfaceRenderers(input) {
|
|
|
12217
12288
|
host: input.hostSession,
|
|
12218
12289
|
workspaceId: input.workspaceId
|
|
12219
12290
|
});
|
|
12220
|
-
return /* @__PURE__ */
|
|
12291
|
+
return /* @__PURE__ */ jsx13(
|
|
12221
12292
|
WorkbenchHostNodeRenderErrorBoundary,
|
|
12222
12293
|
{
|
|
12223
12294
|
debugDiagnostics: input.debugDiagnostics,
|
|
12224
12295
|
node: context.node,
|
|
12225
12296
|
resetKey: `${context.node.id}:${context.node.data.typeId}:${input.externalStateRevision}`,
|
|
12226
12297
|
workspaceId: input.workspaceId,
|
|
12227
|
-
children: /* @__PURE__ */
|
|
12298
|
+
children: /* @__PURE__ */ jsx13(
|
|
12228
12299
|
WorkbenchHostNodeBodyRenderer,
|
|
12229
12300
|
{
|
|
12230
12301
|
context: bodyContext,
|
|
@@ -12244,7 +12315,7 @@ function useWorkbenchHostSurfaceRenderers(input) {
|
|
|
12244
12315
|
]
|
|
12245
12316
|
);
|
|
12246
12317
|
const renderWindowActions = useCallback11(
|
|
12247
|
-
(context) => /* @__PURE__ */
|
|
12318
|
+
(context) => /* @__PURE__ */ jsx13(
|
|
12248
12319
|
WorkbenchHostWindowActions,
|
|
12249
12320
|
{
|
|
12250
12321
|
context,
|
|
@@ -12437,7 +12508,7 @@ var WorkbenchHostSurfaceRenderErrorBoundary = class extends Component {
|
|
|
12437
12508
|
}
|
|
12438
12509
|
render() {
|
|
12439
12510
|
if (this.state.hasError) {
|
|
12440
|
-
return /* @__PURE__ */
|
|
12511
|
+
return /* @__PURE__ */ jsx13(
|
|
12441
12512
|
"div",
|
|
12442
12513
|
{
|
|
12443
12514
|
"data-workbench-surface-render-error": this.props.fallbackKind,
|
|
@@ -12507,7 +12578,7 @@ var WorkbenchHostNodeRenderErrorBoundary = class extends Component {
|
|
|
12507
12578
|
width: "100%"
|
|
12508
12579
|
},
|
|
12509
12580
|
children: [
|
|
12510
|
-
/* @__PURE__ */
|
|
12581
|
+
/* @__PURE__ */ jsx13(
|
|
12511
12582
|
"div",
|
|
12512
12583
|
{
|
|
12513
12584
|
"data-workbench-node-render-error-message": "true",
|
|
@@ -12519,8 +12590,8 @@ var WorkbenchHostNodeRenderErrorBoundary = class extends Component {
|
|
|
12519
12590
|
children: "This workspace view failed to render."
|
|
12520
12591
|
}
|
|
12521
12592
|
),
|
|
12522
|
-
/* @__PURE__ */
|
|
12523
|
-
/* @__PURE__ */
|
|
12593
|
+
/* @__PURE__ */ jsx13("div", { style: { fontSize: 12 }, children: "Try selecting another conversation or reopen the window." }),
|
|
12594
|
+
/* @__PURE__ */ jsx13(
|
|
12524
12595
|
"button",
|
|
12525
12596
|
{
|
|
12526
12597
|
type: "button",
|
|
@@ -12560,7 +12631,7 @@ function WorkbenchHostChromeRenderer({
|
|
|
12560
12631
|
}
|
|
12561
12632
|
|
|
12562
12633
|
// src/host/WorkbenchHost.tsx
|
|
12563
|
-
import { jsx as
|
|
12634
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
12564
12635
|
var noop3 = () => {
|
|
12565
12636
|
};
|
|
12566
12637
|
function WorkbenchHost({
|
|
@@ -12673,7 +12744,7 @@ function WorkbenchHost({
|
|
|
12673
12744
|
});
|
|
12674
12745
|
const missionControlPresence = useWorkbenchMissionControlPresence(missionControlState);
|
|
12675
12746
|
const missionControlRenderedState = missionControlPresence.state;
|
|
12676
|
-
return /* @__PURE__ */
|
|
12747
|
+
return /* @__PURE__ */ jsx14(
|
|
12677
12748
|
WorkbenchSurface,
|
|
12678
12749
|
{
|
|
12679
12750
|
className,
|
|
@@ -12687,7 +12758,7 @@ function WorkbenchHost({
|
|
|
12687
12758
|
missionControlPhase: missionControlPresence.phase,
|
|
12688
12759
|
minimizeAnimation,
|
|
12689
12760
|
presentation: missionControlState?.presentation ?? null,
|
|
12690
|
-
renderBackdrop: missionControlRenderedState ? () => /* @__PURE__ */
|
|
12761
|
+
renderBackdrop: missionControlRenderedState ? () => /* @__PURE__ */ jsx14(
|
|
12691
12762
|
WorkbenchMissionControlBackdrop,
|
|
12692
12763
|
{
|
|
12693
12764
|
onExitTransitionComplete: () => missionControlPresence.completeExitTransition(),
|
|
@@ -12698,7 +12769,7 @@ function WorkbenchHost({
|
|
|
12698
12769
|
renderDock: surfaceRenderers.renderDock,
|
|
12699
12770
|
renderNode: surfaceRenderers.renderNode,
|
|
12700
12771
|
renderNodeGeniePreview: surfaceRenderers.renderNodeGeniePreview,
|
|
12701
|
-
renderOverlay: missionControlRenderedState ? () => /* @__PURE__ */
|
|
12772
|
+
renderOverlay: missionControlRenderedState ? () => /* @__PURE__ */ jsx14(
|
|
12702
12773
|
WorkbenchMissionControlOverlay,
|
|
12703
12774
|
{
|
|
12704
12775
|
i18n: missionControlI18n,
|