@ai-matrx/summon 0.1.17 → 0.1.19
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/CHANGELOG.md +26 -1
- package/dist/chunk-server-C4KQZFIN.js +411 -0
- package/dist/chunk-server-C4KQZFIN.js.map +1 -0
- package/dist/chunk-server-H7NUWPEM.js +94 -0
- package/dist/chunk-server-H7NUWPEM.js.map +1 -0
- package/dist/chunk-server-WP7NOTZQ.js +208 -0
- package/dist/chunk-server-WP7NOTZQ.js.map +1 -0
- package/dist/dock.cjs +41 -112
- package/dist/dock.cjs.map +1 -1
- package/dist/dock.js +42 -113
- package/dist/dock.js.map +1 -1
- package/dist/handles.js +9 -272
- package/dist/handles.js.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +350 -810
- package/dist/index.js.map +1 -1
- package/dist/lite.cjs +16 -76
- package/dist/lite.cjs.map +1 -1
- package/dist/lite.js +17 -77
- package/dist/lite.js.map +1 -1
- package/dist/open.js +74 -439
- package/dist/open.js.map +1 -1
- package/dist/react.cjs +2 -2
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +2 -2
- package/dist/react.js.map +1 -1
- package/dist/window.cjs +192 -287
- package/dist/window.cjs.map +1 -1
- package/dist/window.d.cts +3 -1
- package/dist/window.d.ts +3 -1
- package/dist/window.js +70 -165
- package/dist/window.js.map +1 -1
- package/package.json +4 -4
package/dist/window.d.cts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { ComponentType, SVGAttributes, ReactNode } from 'react';
|
|
3
3
|
import { WindowRect, WindowPersistenceRegistration, MobilePresentation } from '@ai-matrx/summon';
|
|
4
|
+
import { ResizeEdge as ResizeEdge$1 } from '@ai-matrx/design-system';
|
|
4
5
|
import { TraySnapshotCapture } from '@ai-matrx/summon/window-host';
|
|
5
6
|
export { DEFAULT_ESCAPE_YIELD_SELECTOR, DEFAULT_MOBILE_TOP_OFFSET, DEFAULT_WINDOW_CONFIG, PopoutContext, PopoutContextValue, PopoutMode, TrayPreviewContext, TrayPreviewEntry, TraySnapshotCapture, WindowConfig, WindowSelectionSurface, WindowSelectionSurfaceProps, WindowTraySync, WindowsProvider, WindowsProviderProps, getTrayPreviewEntry, registerTrayPreview, resetTrayPreviews, useOverlaySurfaceRenderAck, usePopout, usePopoutContainer, useWindowConfig } from '@ai-matrx/summon/window-host';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
/** The edge or corner a resize handle grabs (design-system window-drag). */
|
|
9
|
+
type ResizeEdge = ResizeEdge$1;
|
|
8
10
|
/** Where to place the window when it first opens. */
|
|
9
11
|
type WindowPosition = "center" | "top-right" | "top-left" | "bottom-right" | "bottom-left";
|
|
10
12
|
declare function resetDefaultWindowCascade(): void;
|
package/dist/window.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { ComponentType, SVGAttributes, ReactNode } from 'react';
|
|
3
3
|
import { WindowRect, WindowPersistenceRegistration, MobilePresentation } from '@ai-matrx/summon';
|
|
4
|
+
import { ResizeEdge as ResizeEdge$1 } from '@ai-matrx/design-system';
|
|
4
5
|
import { TraySnapshotCapture } from '@ai-matrx/summon/window-host';
|
|
5
6
|
export { DEFAULT_ESCAPE_YIELD_SELECTOR, DEFAULT_MOBILE_TOP_OFFSET, DEFAULT_WINDOW_CONFIG, PopoutContext, PopoutContextValue, PopoutMode, TrayPreviewContext, TrayPreviewEntry, TraySnapshotCapture, WindowConfig, WindowSelectionSurface, WindowSelectionSurfaceProps, WindowTraySync, WindowsProvider, WindowsProviderProps, getTrayPreviewEntry, registerTrayPreview, resetTrayPreviews, useOverlaySurfaceRenderAck, usePopout, usePopoutContainer, useWindowConfig } from '@ai-matrx/summon/window-host';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
/** The edge or corner a resize handle grabs (design-system window-drag). */
|
|
9
|
+
type ResizeEdge = ResizeEdge$1;
|
|
8
10
|
/** Where to place the window when it first opens. */
|
|
9
11
|
type WindowPosition = "center" | "top-right" | "top-left" | "bottom-right" | "bottom-left";
|
|
10
12
|
declare function resetDefaultWindowCascade(): void;
|
package/dist/window.js
CHANGED
|
@@ -52,39 +52,13 @@ function glyph(children) {
|
|
|
52
52
|
);
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
var XIcon = glyph(/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
56
|
-
/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }),
|
|
57
|
-
/* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })
|
|
58
|
-
] }));
|
|
59
55
|
var MinusIcon = glyph(/* @__PURE__ */ jsx("path", { d: "M5 12h14" }));
|
|
60
|
-
var Maximize2Icon = glyph(/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
61
|
-
/* @__PURE__ */ jsx("path", { d: "M15 3h6v6" }),
|
|
62
|
-
/* @__PURE__ */ jsx("path", { d: "m21 3-7 7" }),
|
|
63
|
-
/* @__PURE__ */ jsx("path", { d: "m3 21 7-7" }),
|
|
64
|
-
/* @__PURE__ */ jsx("path", { d: "M9 21H3v-6" })
|
|
65
|
-
] }));
|
|
66
|
-
var Minimize2Icon = glyph(/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
67
|
-
/* @__PURE__ */ jsx("path", { d: "m14 10 7-7" }),
|
|
68
|
-
/* @__PURE__ */ jsx("path", { d: "M20 10h-6V4" }),
|
|
69
|
-
/* @__PURE__ */ jsx("path", { d: "m3 21 7-7" }),
|
|
70
|
-
/* @__PURE__ */ jsx("path", { d: "M4 14h6v6" })
|
|
71
|
-
] }));
|
|
72
56
|
var RectangleVerticalIcon = glyph(/* @__PURE__ */ jsx("rect", { width: "12", height: "20", x: "6", y: "2", rx: "2" }));
|
|
73
57
|
var PanelLeftCloseIcon = glyph(/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
74
58
|
/* @__PURE__ */ jsx("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
75
59
|
/* @__PURE__ */ jsx("path", { d: "M9 3v18" }),
|
|
76
60
|
/* @__PURE__ */ jsx("path", { d: "m16 15-3-3 3-3" })
|
|
77
61
|
] }));
|
|
78
|
-
var PanelLeftIcon = glyph(/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
79
|
-
/* @__PURE__ */ jsx("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
80
|
-
/* @__PURE__ */ jsx("path", { d: "M9 3v18" })
|
|
81
|
-
] }));
|
|
82
|
-
var AppWindowIcon = glyph(/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
83
|
-
/* @__PURE__ */ jsx("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }),
|
|
84
|
-
/* @__PURE__ */ jsx("path", { d: "M10 4v4" }),
|
|
85
|
-
/* @__PURE__ */ jsx("path", { d: "M2 8h20" }),
|
|
86
|
-
/* @__PURE__ */ jsx("path", { d: "M6 4v4" })
|
|
87
|
-
] }));
|
|
88
62
|
var SaveIcon = glyph(
|
|
89
63
|
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
90
64
|
/* @__PURE__ */ jsx("path", { d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" }),
|
|
@@ -92,19 +66,15 @@ var SaveIcon = glyph(
|
|
|
92
66
|
/* @__PURE__ */ jsx("path", { d: "M7 3v4a1 1 0 0 0 1 1h7" })
|
|
93
67
|
] })
|
|
94
68
|
);
|
|
95
|
-
var TriangleAlertIcon = glyph(
|
|
96
|
-
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
97
|
-
/* @__PURE__ */ jsx("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
|
|
98
|
-
/* @__PURE__ */ jsx("path", { d: "M12 9v4" }),
|
|
99
|
-
/* @__PURE__ */ jsx("path", { d: "M12 17h.01" })
|
|
100
|
-
] })
|
|
101
|
-
);
|
|
102
69
|
var ArrowLeftToLineIcon = glyph(/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
103
70
|
/* @__PURE__ */ jsx("path", { d: "M3 19V5" }),
|
|
104
71
|
/* @__PURE__ */ jsx("path", { d: "m13 6-6 6 6 6" }),
|
|
105
72
|
/* @__PURE__ */ jsx("path", { d: "M7 12h14" })
|
|
106
73
|
] }));
|
|
107
74
|
|
|
75
|
+
// src/window/WindowPanel.tsx
|
|
76
|
+
import { AppWindowIcon, Maximize2Icon, Minimize2Icon, PanelLeftIcon as PanelLeftIcon2, XIcon as XIcon5 } from "@ai-matrx/design-system/icons";
|
|
77
|
+
|
|
108
78
|
// src/window/LayoutIcon.tsx
|
|
109
79
|
import { cn } from "@ai-matrx/design-system/cn";
|
|
110
80
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
@@ -396,21 +366,11 @@ function resolveAutoOpenPlacement(args) {
|
|
|
396
366
|
}
|
|
397
367
|
|
|
398
368
|
// src/window/useWindowPanel.ts
|
|
399
|
-
import {
|
|
369
|
+
import { RESIZE_EDGE_CURSOR, resizeRect, startPointerDrag } from "@ai-matrx/design-system";
|
|
400
370
|
var MIN_WIDTH = 180;
|
|
401
371
|
var MIN_HEIGHT = 80;
|
|
402
372
|
var DEFAULT_WIDTH = 320;
|
|
403
373
|
var DEFAULT_HEIGHT = 400;
|
|
404
|
-
var RESIZE_CURSOR = {
|
|
405
|
-
e: "ew-resize",
|
|
406
|
-
w: "ew-resize",
|
|
407
|
-
n: "ns-resize",
|
|
408
|
-
s: "ns-resize",
|
|
409
|
-
se: "nwse-resize",
|
|
410
|
-
nw: "nwse-resize",
|
|
411
|
-
ne: "nesw-resize",
|
|
412
|
-
sw: "nesw-resize"
|
|
413
|
-
};
|
|
414
374
|
function resolveSize(value, fallback) {
|
|
415
375
|
if (value === void 0) return fallback;
|
|
416
376
|
if (typeof value === "number") return value;
|
|
@@ -608,86 +568,53 @@ function useWindowPanel(opts = {}) {
|
|
|
608
568
|
dispatch(updateWindowTitle({ id, title: opts.title }));
|
|
609
569
|
}
|
|
610
570
|
}, [id, opts.title, dispatch]);
|
|
611
|
-
const dragStart = useRef(null);
|
|
612
571
|
const onTriggerPopout = opts.onTriggerPopout;
|
|
613
572
|
const onTriggerPopoutRef = useRef(onTriggerPopout);
|
|
614
573
|
useEffect(() => {
|
|
615
574
|
onTriggerPopoutRef.current = onTriggerPopout;
|
|
616
575
|
}, [onTriggerPopout]);
|
|
576
|
+
const gestureRef = useRef(null);
|
|
577
|
+
useEffect(() => () => gestureRef.current?.cancel(), []);
|
|
617
578
|
const onDragStart = useCallback(
|
|
618
579
|
(e) => {
|
|
619
580
|
e.preventDefault();
|
|
620
581
|
dispatch(focusWindow(id));
|
|
621
582
|
if (!entry || entry.state === "maximized") return;
|
|
622
|
-
|
|
623
|
-
mx: e.clientX,
|
|
624
|
-
my: e.clientY,
|
|
625
|
-
wx: entry.windowed.x,
|
|
626
|
-
wy: entry.windowed.y
|
|
627
|
-
};
|
|
628
|
-
setIsInteracting(true);
|
|
629
|
-
const releaseCursor = holdDragCursor();
|
|
583
|
+
const origin = { x: entry.windowed.x, y: entry.windowed.y };
|
|
630
584
|
let dragOutState = INITIAL_DRAG_OUT_STATE;
|
|
631
|
-
let lastClientX = e.clientX;
|
|
632
|
-
let lastClientY = e.clientY;
|
|
633
585
|
const popoutEnabled = onTriggerPopoutRef.current !== void 0;
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
window.innerHeight,
|
|
648
|
-
performance.now()
|
|
649
|
-
);
|
|
650
|
-
if (result.state.isCandidate !== dragOutState.isCandidate) {
|
|
651
|
-
dispatch(
|
|
652
|
-
setPopoutCandidate({ id: result.state.isCandidate ? id : null })
|
|
586
|
+
gestureRef.current?.cancel();
|
|
587
|
+
gestureRef.current = startPointerDrag(e, {
|
|
588
|
+
onStart: () => setIsInteracting(true),
|
|
589
|
+
onMove: ({ dx, dy }, ev) => {
|
|
590
|
+
dispatch(updateWindowRect({ id, rect: { x: origin.x + dx, y: origin.y + dy } }));
|
|
591
|
+
if (!popoutEnabled) return;
|
|
592
|
+
const result = evaluateDragOut(
|
|
593
|
+
{ clientX: ev.clientX, clientY: ev.clientY },
|
|
594
|
+
dragOutState,
|
|
595
|
+
DEFAULT_DRAG_OUT_CONFIG,
|
|
596
|
+
window.innerWidth,
|
|
597
|
+
window.innerHeight,
|
|
598
|
+
performance.now()
|
|
653
599
|
);
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
dispatch(setPopoutCandidate({ id: null }));
|
|
668
|
-
}
|
|
669
|
-
if (wasCandidate && onTriggerPopoutRef.current && entry) {
|
|
670
|
-
const lastRect = {
|
|
671
|
-
x: dragOrigin?.wx ?? entry.windowed.x,
|
|
672
|
-
y: dragOrigin?.wy ?? entry.windowed.y,
|
|
673
|
-
width: entry.windowed.width,
|
|
674
|
-
height: entry.windowed.height
|
|
675
|
-
};
|
|
676
|
-
onTriggerPopoutRef.current(lastRect);
|
|
677
|
-
} else {
|
|
678
|
-
const { vw, vh, degenerate } = safeViewportDims();
|
|
679
|
-
if (!degenerate) {
|
|
680
|
-
dispatch(
|
|
681
|
-
clampWindowRect({ id, viewportWidth: vw, viewportHeight: vh })
|
|
682
|
-
);
|
|
600
|
+
if (result.state.isCandidate !== dragOutState.isCandidate) {
|
|
601
|
+
dispatch(setPopoutCandidate({ id: result.state.isCandidate ? id : null }));
|
|
602
|
+
}
|
|
603
|
+
dragOutState = result.state;
|
|
604
|
+
},
|
|
605
|
+
onEnd: () => {
|
|
606
|
+
gestureRef.current = null;
|
|
607
|
+
const wasCandidate = dragOutState.isCandidate;
|
|
608
|
+
setIsInteracting(false);
|
|
609
|
+
if (popoutEnabled && wasCandidate) dispatch(setPopoutCandidate({ id: null }));
|
|
610
|
+
if (wasCandidate && onTriggerPopoutRef.current) {
|
|
611
|
+
onTriggerPopoutRef.current({ x: origin.x, y: origin.y, width: entry.windowed.width, height: entry.windowed.height });
|
|
612
|
+
return;
|
|
683
613
|
}
|
|
614
|
+
const { vw, vh, degenerate } = safeViewportDims();
|
|
615
|
+
if (!degenerate) dispatch(clampWindowRect({ id, viewportWidth: vw, viewportHeight: vh }));
|
|
684
616
|
}
|
|
685
|
-
|
|
686
|
-
void lastClientY;
|
|
687
|
-
};
|
|
688
|
-
document.addEventListener("pointermove", onMove);
|
|
689
|
-
document.addEventListener("pointerup", onUp);
|
|
690
|
-
document.addEventListener("pointercancel", onUp);
|
|
617
|
+
});
|
|
691
618
|
},
|
|
692
619
|
[dispatch, id, entry]
|
|
693
620
|
);
|
|
@@ -697,44 +624,21 @@ function useWindowPanel(opts = {}) {
|
|
|
697
624
|
e.stopPropagation();
|
|
698
625
|
dispatch(focusWindow(id));
|
|
699
626
|
if (!entry || entry.state !== "windowed") return;
|
|
700
|
-
const
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
if (edge.includes("w")) {
|
|
714
|
-
nw = Math.min(maxWidth, Math.max(minWidth, width - dx));
|
|
715
|
-
nx = x + (width - nw);
|
|
716
|
-
}
|
|
717
|
-
if (edge.includes("n")) {
|
|
718
|
-
nh = Math.min(maxHeight, Math.max(minHeight, height - dy));
|
|
719
|
-
ny = y + (height - nh);
|
|
627
|
+
const origin = { ...entry.windowed };
|
|
628
|
+
gestureRef.current?.cancel();
|
|
629
|
+
gestureRef.current = startPointerDrag(e, {
|
|
630
|
+
// THE CURSOR LAW: the edge's resize cursor holds on <html> until release.
|
|
631
|
+
cursor: RESIZE_EDGE_CURSOR[edge],
|
|
632
|
+
onStart: () => setIsInteracting(true),
|
|
633
|
+
onMove: ({ dx, dy }) => {
|
|
634
|
+
const rect2 = resizeRect(origin, edge, dx, dy, { minWidth, minHeight, maxWidth, maxHeight });
|
|
635
|
+
dispatch(updateWindowRect({ id, rect: { x: rect2.x, y: rect2.y, width: rect2.width, height: rect2.height } }));
|
|
636
|
+
},
|
|
637
|
+
onEnd: () => {
|
|
638
|
+
gestureRef.current = null;
|
|
639
|
+
setIsInteracting(false);
|
|
720
640
|
}
|
|
721
|
-
|
|
722
|
-
updateWindowRect({
|
|
723
|
-
id,
|
|
724
|
-
rect: { x: nx, y: ny, width: nw, height: nh }
|
|
725
|
-
})
|
|
726
|
-
);
|
|
727
|
-
};
|
|
728
|
-
const onUp = () => {
|
|
729
|
-
setIsInteracting(false);
|
|
730
|
-
releaseCursor();
|
|
731
|
-
document.removeEventListener("pointermove", onMove);
|
|
732
|
-
document.removeEventListener("pointerup", onUp);
|
|
733
|
-
document.removeEventListener("pointercancel", onUp);
|
|
734
|
-
};
|
|
735
|
-
document.addEventListener("pointermove", onMove);
|
|
736
|
-
document.addEventListener("pointerup", onUp);
|
|
737
|
-
document.addEventListener("pointercancel", onUp);
|
|
641
|
+
});
|
|
738
642
|
},
|
|
739
643
|
[dispatch, id, entry, minWidth, minHeight, maxWidth, maxHeight]
|
|
740
644
|
);
|
|
@@ -779,20 +683,15 @@ function useWindowPanel(opts = {}) {
|
|
|
779
683
|
};
|
|
780
684
|
}
|
|
781
685
|
|
|
782
|
-
// src/window/
|
|
783
|
-
import {
|
|
784
|
-
var subscribe = () => () => {
|
|
785
|
-
};
|
|
786
|
-
function useIsClient() {
|
|
787
|
-
return useSyncExternalStore(subscribe, () => true, () => false);
|
|
788
|
-
}
|
|
686
|
+
// src/window/WindowPanel.tsx
|
|
687
|
+
import { useIsClient } from "@ai-matrx/kit/client-lazy";
|
|
789
688
|
|
|
790
689
|
// src/window/utils/useDebugFlag.ts
|
|
791
|
-
import { useSyncExternalStore
|
|
690
|
+
import { useSyncExternalStore } from "react";
|
|
792
691
|
var noSubscribe = () => () => {
|
|
793
692
|
};
|
|
794
693
|
function useDebugFlag(debug) {
|
|
795
|
-
return
|
|
694
|
+
return useSyncExternalStore(
|
|
796
695
|
debug.subscribe ? (listener) => debug.subscribe?.(listener) ?? (() => {
|
|
797
696
|
}) : noSubscribe,
|
|
798
697
|
() => debug.enabled(),
|
|
@@ -869,6 +768,7 @@ import {
|
|
|
869
768
|
} from "@ai-matrx/design-system";
|
|
870
769
|
import { Button } from "@ai-matrx/design-system";
|
|
871
770
|
import { cn as cn3 } from "@ai-matrx/design-system/cn";
|
|
771
|
+
import { PanelLeftIcon, XIcon } from "@ai-matrx/design-system/icons";
|
|
872
772
|
|
|
873
773
|
// src/window/chrome/MobileTitleRow.tsx
|
|
874
774
|
import { cn as cn2 } from "@ai-matrx/design-system/cn";
|
|
@@ -1064,6 +964,7 @@ import { createPortal } from "react-dom";
|
|
|
1064
964
|
import { FloatingLayer, useFloatingLayerZIndex } from "@ai-matrx/design-system";
|
|
1065
965
|
import { Button as Button2 } from "@ai-matrx/design-system";
|
|
1066
966
|
import { cn as cn4 } from "@ai-matrx/design-system/cn";
|
|
967
|
+
import { XIcon as XIcon2 } from "@ai-matrx/design-system/icons";
|
|
1067
968
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1068
969
|
function MobileCardSurface({
|
|
1069
970
|
title,
|
|
@@ -1120,7 +1021,7 @@ function MobileCardSurface({
|
|
|
1120
1021
|
className: "h-11 w-11 shrink-0",
|
|
1121
1022
|
"aria-label": "Close",
|
|
1122
1023
|
onClick: onClose,
|
|
1123
|
-
children: /* @__PURE__ */ jsx5(
|
|
1024
|
+
children: /* @__PURE__ */ jsx5(XIcon2, { className: "w-3.5 h-3.5" })
|
|
1124
1025
|
}
|
|
1125
1026
|
),
|
|
1126
1027
|
children: /* @__PURE__ */ jsx5(MobileWindowTitle, { title })
|
|
@@ -1213,6 +1114,9 @@ function DebugStrip({ rect, zIndex }) {
|
|
|
1213
1114
|
] });
|
|
1214
1115
|
}
|
|
1215
1116
|
|
|
1117
|
+
// src/window/chrome/MobileHeader.tsx
|
|
1118
|
+
import { XIcon as XIcon3 } from "@ai-matrx/design-system/icons";
|
|
1119
|
+
|
|
1216
1120
|
// src/window/chrome/chromeClasses.ts
|
|
1217
1121
|
import { cn as cn5 } from "@ai-matrx/design-system/cn";
|
|
1218
1122
|
var WINDOW_CHROME_INTERACTIVE = "[&_button:not(:disabled)]:cursor-pointer [&_a]:cursor-pointer [&_[role=button]:not([aria-disabled=true])]:cursor-pointer [&_summary]:cursor-pointer [&_label:has(input,[role=checkbox],[role=radio])]:cursor-pointer";
|
|
@@ -1241,7 +1145,7 @@ function MobileWindowHeader({
|
|
|
1241
1145
|
className: "flex h-11 w-11 shrink-0 cursor-pointer items-center justify-center",
|
|
1242
1146
|
onClick: onClose,
|
|
1243
1147
|
"aria-label": "Close",
|
|
1244
|
-
children: /* @__PURE__ */ jsx7("span", { className: "flex h-6 w-6 items-center justify-center rounded-full matrx-window-light-close", children: /* @__PURE__ */ jsx7(
|
|
1148
|
+
children: /* @__PURE__ */ jsx7("span", { className: "flex h-6 w-6 items-center justify-center rounded-full matrx-window-light-close", children: /* @__PURE__ */ jsx7(XIcon3, { className: "h-2.5 w-2.5 matrx-window-light-glyph" }) })
|
|
1245
1149
|
}
|
|
1246
1150
|
),
|
|
1247
1151
|
onMinimize && /* @__PURE__ */ jsx7(
|
|
@@ -1275,6 +1179,7 @@ function MobileWindowHeader({
|
|
|
1275
1179
|
|
|
1276
1180
|
// src/window/chrome/DeprecationBanner.tsx
|
|
1277
1181
|
import { useState as useState4 } from "react";
|
|
1182
|
+
import { AlertTriangleIcon, XIcon as XIcon4 } from "@ai-matrx/design-system/icons";
|
|
1278
1183
|
import { cn as cn6 } from "@ai-matrx/design-system/cn";
|
|
1279
1184
|
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1280
1185
|
function DeprecationBanner({
|
|
@@ -1293,7 +1198,7 @@ function DeprecationBanner({
|
|
|
1293
1198
|
className
|
|
1294
1199
|
),
|
|
1295
1200
|
children: [
|
|
1296
|
-
/* @__PURE__ */ jsx8(
|
|
1201
|
+
/* @__PURE__ */ jsx8(AlertTriangleIcon, { className: "w-3.5 h-3.5 mt-[1px] shrink-0" }),
|
|
1297
1202
|
/* @__PURE__ */ jsx8("span", { className: "flex-1 break-words", children: message }),
|
|
1298
1203
|
/* @__PURE__ */ jsx8(
|
|
1299
1204
|
"button",
|
|
@@ -1302,7 +1207,7 @@ function DeprecationBanner({
|
|
|
1302
1207
|
"aria-label": "Dismiss deprecation notice",
|
|
1303
1208
|
className: "shrink-0 rounded hover:bg-destructive/20 p-0.5 transition-colors",
|
|
1304
1209
|
onClick: () => setDismissed(true),
|
|
1305
|
-
children: /* @__PURE__ */ jsx8(
|
|
1210
|
+
children: /* @__PURE__ */ jsx8(XIcon4, { className: "w-3 h-3" })
|
|
1306
1211
|
}
|
|
1307
1212
|
)
|
|
1308
1213
|
]
|
|
@@ -1379,7 +1284,7 @@ import {
|
|
|
1379
1284
|
} from "@ai-matrx/summon";
|
|
1380
1285
|
|
|
1381
1286
|
// src/window/popout/popoutWindowMap.ts
|
|
1382
|
-
import { useSyncExternalStore as
|
|
1287
|
+
import { useSyncExternalStore as useSyncExternalStore2 } from "react";
|
|
1383
1288
|
import { globalSlot as globalSlot3 } from "@ai-matrx/kit/global-slot";
|
|
1384
1289
|
var slot = () => globalSlot3("ai-matrx.summon.window.popoutWindows", () => ({ map: /* @__PURE__ */ new Map(), listeners: /* @__PURE__ */ new Set() }));
|
|
1385
1290
|
function notify() {
|
|
@@ -1412,7 +1317,7 @@ function subscribePopoutWindowMap(listener) {
|
|
|
1412
1317
|
};
|
|
1413
1318
|
}
|
|
1414
1319
|
function usePopoutWindowRef(id) {
|
|
1415
|
-
return
|
|
1320
|
+
return useSyncExternalStore2(
|
|
1416
1321
|
subscribePopoutWindowMap,
|
|
1417
1322
|
() => getPopoutWindow(id),
|
|
1418
1323
|
// SSR snapshot — popouts are never present during SSR.
|
|
@@ -2001,7 +1906,7 @@ async function isFlatImage(blob) {
|
|
|
2001
1906
|
import { getOverlayMeta as getOverlayMeta2 } from "@ai-matrx/summon";
|
|
2002
1907
|
|
|
2003
1908
|
// src/window/tray/TrayChipPreview.tsx
|
|
2004
|
-
import { Component, memo, useSyncExternalStore as
|
|
1909
|
+
import { Component, memo, useSyncExternalStore as useSyncExternalStore3 } from "react";
|
|
2005
1910
|
import { cn as cn8 } from "@ai-matrx/design-system/cn";
|
|
2006
1911
|
import { getOverlayMeta, selectOverlayData, DEFAULT_INSTANCE_ID } from "@ai-matrx/summon";
|
|
2007
1912
|
import { useSummonPorts as useSummonPorts2, useSummonSelector as useSummonSelector4 } from "@ai-matrx/summon/react";
|
|
@@ -2082,7 +1987,7 @@ var TraySnapshotImage = memo(function TraySnapshotImage2({
|
|
|
2082
1987
|
registryLabel,
|
|
2083
1988
|
title
|
|
2084
1989
|
}) {
|
|
2085
|
-
const snapshot =
|
|
1990
|
+
const snapshot = useSyncExternalStore3(
|
|
2086
1991
|
subscribeTraySnapshotMap,
|
|
2087
1992
|
() => getTraySnapshot(snapshotKey),
|
|
2088
1993
|
() => null
|
|
@@ -3318,7 +3223,7 @@ function TrafficLightGroup({
|
|
|
3318
3223
|
TrafficLight,
|
|
3319
3224
|
{
|
|
3320
3225
|
color: "red",
|
|
3321
|
-
icon: /* @__PURE__ */ jsx14(
|
|
3226
|
+
icon: /* @__PURE__ */ jsx14(XIcon5, { className: "w-2 h-2 matrx-window-light-glyph" }),
|
|
3322
3227
|
onClick: onClose ?? void 0,
|
|
3323
3228
|
disabled: !onClose,
|
|
3324
3229
|
"aria-label": "Close"
|
|
@@ -3367,7 +3272,7 @@ function TrafficLightGroup({
|
|
|
3367
3272
|
onClick: onToggleSidebar,
|
|
3368
3273
|
title: sidebarOpen ? "Hide sidebar" : "Show sidebar",
|
|
3369
3274
|
"aria-label": sidebarOpen ? "Hide sidebar" : "Show sidebar",
|
|
3370
|
-
children: sidebarOpen ? /* @__PURE__ */ jsx14(PanelLeftCloseIcon, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ jsx14(
|
|
3275
|
+
children: sidebarOpen ? /* @__PURE__ */ jsx14(PanelLeftCloseIcon, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ jsx14(PanelLeftIcon2, { className: "w-3.5 h-3.5" })
|
|
3371
3276
|
}
|
|
3372
3277
|
)
|
|
3373
3278
|
] });
|