@m4l/components 9.17.1-beta-feature-731-m4l-components-code-editor.0 → 9.18.0
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/@types/types.d.ts +0 -11
- package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.d.ts +2 -1
- package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.d.ts.map +1 -1
- package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.js +30 -41
- package/components/CommonActions/components/ActionFormCancel/types.d.ts +2 -2
- package/components/CommonActions/index.d.ts +1 -0
- package/components/CommonActions/index.d.ts.map +1 -1
- package/components/DragResizeWindowRND/DragResizeWindowRND.d.ts +3 -14
- package/components/DragResizeWindowRND/DragResizeWindowRND.d.ts.map +1 -1
- package/components/DragResizeWindowRND/DragResizeWindowRND.js +105 -119
- package/components/DragResizeWindowRND/helpers/index.d.ts +1 -0
- package/components/DragResizeWindowRND/helpers/index.d.ts.map +1 -1
- package/components/DragResizeWindowRND/helpers/resizeHandles.d.ts +15 -0
- package/components/DragResizeWindowRND/helpers/resizeHandles.d.ts.map +1 -0
- package/components/DragResizeWindowRND/helpers/resizeHandles.js +68 -0
- package/components/DragResizeWindowRND/types.d.ts +3 -1
- package/components/DragResizeWindowRND/types.d.ts.map +1 -1
- package/components/WindowBase/WindowBase.d.ts.map +1 -1
- package/components/WindowBase/WindowBase.js +49 -49
- package/components/WindowBase/WindowBase.styles.d.ts +1 -1
- package/components/WindowBase/WindowBase.styles.d.ts.map +1 -1
- package/components/WindowBase/WindowBase.styles.js +37 -12
- package/components/WindowBase/contexts/WindowToolsMFContext/types.d.ts +19 -34
- package/components/WindowBase/contexts/WindowToolsMFContext/types.d.ts.map +1 -1
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +18 -18
- package/components/areas/components/AreasAdmin/AreasAdmin.d.ts +2 -5
- package/components/areas/components/AreasAdmin/AreasAdmin.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/AreasAdmin.js +24 -24
- package/components/areas/components/AreasAdmin/helper.d.ts +1 -4
- package/components/areas/components/AreasAdmin/helper.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/AreaChip.d.ts +2 -26
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/AreaChip.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/AreaChip.js +72 -71
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/AreaChipMobile.d.ts +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/AreaChipMobile.js +17 -17
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.d.ts +2 -24
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.js +58 -57
- package/components/areas/components/AreasAdmin/types.d.ts +9 -9
- package/components/areas/components/AreasViewer/AreasViewer.styles.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/AreasViewer.styles.js +174 -6
- package/components/areas/components/AreasViewer/constants.d.ts +12 -0
- package/components/areas/components/AreasViewer/constants.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/constants.js +5 -2
- package/components/areas/components/AreasViewer/slots/AreasViewerEnum.d.ts +9 -0
- package/components/areas/components/AreasViewer/slots/AreasViewerEnum.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/slots/AreasViewerEnum.js +2 -2
- package/components/areas/components/AreasViewer/slots/AreasViewerSlots.d.ts +27 -0
- package/components/areas/components/AreasViewer/slots/AreasViewerSlots.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/slots/AreasViewerSlots.js +62 -25
- package/components/areas/components/AreasViewer/subcomponents/Area/Area.d.ts +1 -4
- package/components/areas/components/AreasViewer/subcomponents/Area/Area.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/Area.js +4 -4
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.d.ts +1 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/BaseArea.d.ts +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/BaseArea.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/BaseArea.js +12 -11
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/helpers/panelRuntime.d.ts +78 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/helpers/panelRuntime.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/helpers/panelRuntime.js +86 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/useOverlayPanelResize.d.ts +33 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/useOverlayPanelResize.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/useOverlayPanelResize.js +91 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePanelsByArea.d.ts +6 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePanelsByArea.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePanelsByArea.js +45 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePinnedPanelResize.d.ts +16 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePinnedPanelResize.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePinnedPanelResize.js +105 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/AreaPanels.d.ts +6 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/AreaPanels.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/AreaPanels.js +158 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeInteractionLayer.d.ts +15 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeInteractionLayer.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeInteractionLayer.js +19 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeRail.d.ts +14 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeRail.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeRail.js +35 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelWindow.d.ts +7 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelWindow.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelWindow.js +68 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/types.d.ts +61 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/types.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.d.ts +3 -6
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +45 -45
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions.d.ts +1 -3
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.d.ts +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +68 -40
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.d.ts +6 -11
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.js +77 -76
- package/components/areas/contexts/AreasContext/helpers/generateModuleCount.d.ts +3 -5
- package/components/areas/contexts/AreasContext/helpers/generateModuleCount.d.ts.map +1 -1
- package/components/areas/contexts/AreasContext/helpers/helper.d.ts +20 -15
- package/components/areas/contexts/AreasContext/helpers/helper.d.ts.map +1 -1
- package/components/areas/contexts/AreasContext/helpers/helper.js +8 -7
- package/components/areas/contexts/AreasContext/index.d.ts.map +1 -1
- package/components/areas/contexts/AreasContext/index.js +51 -48
- package/components/areas/contexts/AreasContext/store.d.ts +2 -3
- package/components/areas/contexts/AreasContext/store.d.ts.map +1 -1
- package/components/areas/contexts/AreasContext/store.js +397 -290
- package/components/areas/contexts/AreasContext/types.d.ts +109 -85
- package/components/areas/contexts/AreasContext/types.d.ts.map +1 -1
- package/components/areas/dictionary.d.ts +3 -0
- package/components/areas/dictionary.d.ts.map +1 -1
- package/components/areas/dictionary.js +9 -6
- package/components/areas/hooks/useAreas/index.d.ts +2 -2
- package/components/areas/hooks/useAreas/index.js +4 -4
- package/components/areas/types.d.ts +173 -47
- package/components/areas/types.d.ts.map +1 -1
- package/components/areas/utils/useOnClickOutside/index.d.ts +2 -1
- package/components/areas/utils/useOnClickOutside/index.d.ts.map +1 -1
- package/components/areas/utils/useOnClickOutside/index.js +15 -0
- package/components/extended/index.d.ts +0 -1
- package/components/extended/index.d.ts.map +1 -1
- package/components/hook-form/index.d.ts +0 -1
- package/components/hook-form/index.d.ts.map +1 -1
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +5 -4
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts.map +1 -1
- package/components/popups/components/PopupsProvider/hooks/usePopups.js +2 -2
- package/hooks/index.d.ts +1 -0
- package/hooks/index.d.ts.map +1 -1
- package/hooks/useWindowCloseGuard/index.d.ts +18 -0
- package/hooks/useWindowCloseGuard/index.d.ts.map +1 -0
- package/hooks/useWindowCloseGuard/index.js +56 -0
- package/index.js +664 -675
- package/package.json +7 -10
- package/test/mocks/dictionary-mock.d.ts +2 -0
- package/test/mocks/dictionary-mock.d.ts.map +1 -1
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.d.ts +0 -6
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.js +0 -247
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.d.ts +0 -3
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.js +0 -297
- package/components/extended/ReactSimpleCodeEditor/constants.d.ts +0 -82
- package/components/extended/ReactSimpleCodeEditor/constants.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/constants.js +0 -149
- package/components/extended/ReactSimpleCodeEditor/dictionary.d.ts +0 -11
- package/components/extended/ReactSimpleCodeEditor/dictionary.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/dictionary.js +0 -7
- package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.d.ts +0 -59
- package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.js +0 -1063
- package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.d.ts +0 -6
- package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.js +0 -7
- package/components/extended/ReactSimpleCodeEditor/index.d.ts +0 -4
- package/components/extended/ReactSimpleCodeEditor/index.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.d.ts +0 -18
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.js +0 -4
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.d.ts +0 -84
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.js +0 -63
- package/components/extended/ReactSimpleCodeEditor/slots/index.d.ts +0 -3
- package/components/extended/ReactSimpleCodeEditor/slots/index.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/storybookRuntime.d.ts +0 -15
- package/components/extended/ReactSimpleCodeEditor/storybookRuntime.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/types.d.ts +0 -127
- package/components/extended/ReactSimpleCodeEditor/types.d.ts.map +0 -1
- package/components/hook-form/RHFCodeEditor/RHFCodeEditor.d.ts +0 -7
- package/components/hook-form/RHFCodeEditor/RHFCodeEditor.d.ts.map +0 -1
- package/components/hook-form/RHFCodeEditor/RHFCodeEditor.js +0 -6
- package/components/hook-form/RHFCodeEditor/index.d.ts +0 -3
- package/components/hook-form/RHFCodeEditor/index.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panelRuntime.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../../../packages/components/src/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/helpers/panelRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC;;GAEG;AACH,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,SAAS,EAAuC,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAChC,MAAM,SAAS,KACd,IAAI,IAAI,MAAM,GAAG,OAEnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,MAAM,SAAS,KACd,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAW7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,SAAS,gCAE9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iCAAiC,GAAI,MAAM,SAAS,+BAEhE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,GAAI,MAAM,SAAS,KAAG,aA4B5D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,MAAM,SAAS,KAAG,aA6B1D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GACzB,MAAM,SAAS,EACf,UAAU,MAAM,EAChB,eAAe,WAAW,GAAG,IAAI,EACjC,OAAO,sBAAsB,WAyB9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,8BAA8B,GACzC,MAAM,SAAS,EACf,cAAc,IAAI,CAAC,UAAU,EAAE,SAAS,GAAG,SAAS,CAAC,WAKtD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,sBAAsB;;;;;;;;;;;;;;CAgB9D,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
const N = 360, _ = 280, u = 200, g = 100, a = 10, H = ["top", "left", "right", "bottom"], o = (t) => t === "left" || t === "right", s = (t) => t === "left" ? "right" : t === "right" ? "left" : t === "top" ? "bottom" : "top", r = (t) => o(t) ? "col-resize" : "row-resize", S = (t) => t === "right" || t === "bottom", l = (t) => {
|
|
2
|
+
const i = {
|
|
3
|
+
position: "absolute",
|
|
4
|
+
zIndex: 6,
|
|
5
|
+
userSelect: "none",
|
|
6
|
+
touchAction: "none",
|
|
7
|
+
background: "transparent",
|
|
8
|
+
cursor: r(t)
|
|
9
|
+
}, e = s(t);
|
|
10
|
+
return e === "left" || e === "right" ? {
|
|
11
|
+
...i,
|
|
12
|
+
top: 0,
|
|
13
|
+
bottom: 0,
|
|
14
|
+
width: "10px",
|
|
15
|
+
[e]: "0px"
|
|
16
|
+
} : {
|
|
17
|
+
...i,
|
|
18
|
+
left: 0,
|
|
19
|
+
right: 0,
|
|
20
|
+
height: "10px",
|
|
21
|
+
[e]: "0px"
|
|
22
|
+
};
|
|
23
|
+
}, d = (t) => {
|
|
24
|
+
const i = {
|
|
25
|
+
position: "absolute",
|
|
26
|
+
zIndex: 6,
|
|
27
|
+
userSelect: "none",
|
|
28
|
+
touchAction: "none",
|
|
29
|
+
background: "transparent",
|
|
30
|
+
cursor: r(t),
|
|
31
|
+
pointerEvents: "auto"
|
|
32
|
+
}, e = `-${10 / 2}px`;
|
|
33
|
+
return o(t) ? {
|
|
34
|
+
...i,
|
|
35
|
+
top: 0,
|
|
36
|
+
bottom: 0,
|
|
37
|
+
left: e,
|
|
38
|
+
width: "10px"
|
|
39
|
+
} : {
|
|
40
|
+
...i,
|
|
41
|
+
left: 0,
|
|
42
|
+
right: 0,
|
|
43
|
+
top: e,
|
|
44
|
+
height: "10px"
|
|
45
|
+
};
|
|
46
|
+
}, P = (t, i, e, n) => {
|
|
47
|
+
if (o(t)) {
|
|
48
|
+
const E = e && e.clientWidth > 0 ? e.clientWidth : Number.POSITIVE_INFINITY, c = Math.max(
|
|
49
|
+
200,
|
|
50
|
+
Math.min(n.maxWidth ?? Number.POSITIVE_INFINITY, E)
|
|
51
|
+
);
|
|
52
|
+
return Math.max(200, Math.min(i, c));
|
|
53
|
+
}
|
|
54
|
+
const h = e && e.clientHeight > 0 ? e.clientHeight : Number.POSITIVE_INFINITY, I = Math.max(
|
|
55
|
+
100,
|
|
56
|
+
Math.min(n.maxHeight ?? Number.POSITIVE_INFINITY, h)
|
|
57
|
+
);
|
|
58
|
+
return Math.max(100, Math.min(i, I));
|
|
59
|
+
}, m = (t, i) => o(t) ? i.clientX : i.clientY, x = (t) => t.side === "left" || t.side === "right" ? {
|
|
60
|
+
width: `${t.width}px`,
|
|
61
|
+
minWidth: `${t.width}px`,
|
|
62
|
+
maxWidth: `${t.width}px`,
|
|
63
|
+
height: "100%"
|
|
64
|
+
} : {
|
|
65
|
+
width: "100%",
|
|
66
|
+
height: `${t.height}px`,
|
|
67
|
+
minHeight: `${t.height}px`,
|
|
68
|
+
maxHeight: `${t.height}px`
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
_ as PANEL_DEFAULT_HEIGHT,
|
|
72
|
+
N as PANEL_DEFAULT_WIDTH,
|
|
73
|
+
g as PANEL_MIN_HEIGHT,
|
|
74
|
+
u as PANEL_MIN_WIDTH,
|
|
75
|
+
a as PANEL_RESIZE_HANDLE_SIZE,
|
|
76
|
+
H as PANEL_SIDES,
|
|
77
|
+
P as clampPanelSize,
|
|
78
|
+
l as getInlineResizeHandleStyle,
|
|
79
|
+
x as getPanelSlotStyle,
|
|
80
|
+
m as getPointerPositionForPanelSide,
|
|
81
|
+
d as getRailResizeHandleStyle,
|
|
82
|
+
r as getResizeCursor,
|
|
83
|
+
s as getResizeHandleSide,
|
|
84
|
+
o as isHorizontalPanelSide,
|
|
85
|
+
S as shouldRenderResizeRailBeforePanel
|
|
86
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CSSProperties, MouseEvent as ReactMouseEvent, RefObject } from 'react';
|
|
2
|
+
import { PanelRuntimeDescriptor } from '../types';
|
|
3
|
+
type UseOverlayPanelResizeParams = {
|
|
4
|
+
areaId: string;
|
|
5
|
+
overlay: boolean;
|
|
6
|
+
panel: PanelRuntimeDescriptor;
|
|
7
|
+
selected: boolean;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Own the local resize lifecycle for overlay panels.
|
|
11
|
+
*/
|
|
12
|
+
export declare const useOverlayPanelResize: ({ areaId, overlay, panel, selected, }: UseOverlayPanelResizeParams) => {
|
|
13
|
+
containerRef: RefObject<HTMLDivElement | null>;
|
|
14
|
+
resizeHandleStyle: CSSProperties;
|
|
15
|
+
slotStyle: {
|
|
16
|
+
width: string;
|
|
17
|
+
minWidth: string;
|
|
18
|
+
maxWidth: string;
|
|
19
|
+
height: string;
|
|
20
|
+
minHeight?: undefined;
|
|
21
|
+
maxHeight?: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
width: string;
|
|
24
|
+
height: string;
|
|
25
|
+
minHeight: string;
|
|
26
|
+
maxHeight: string;
|
|
27
|
+
minWidth?: undefined;
|
|
28
|
+
maxWidth?: undefined;
|
|
29
|
+
};
|
|
30
|
+
handleResizeStart: (event: ReactMouseEvent<HTMLDivElement>) => void;
|
|
31
|
+
};
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=useOverlayPanelResize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOverlayPanelResize.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../../../packages/components/src/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/useOverlayPanelResize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,UAAU,IAAI,eAAe,EAC7B,SAAS,EACV,MAAM,OAAO,CAAC;AAWf,OAAO,KAAK,EAAE,sBAAsB,EAAiB,MAAM,UAAU,CAAC;AAEtE,KAAK,2BAA2B,GAAG;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,sBAAsB,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,uCAKnC,2BAA2B;;;;;;;;;;;;;;;;;;+BA0IlB,eAAe,CAAC,cAAc,CAAC;CA8C1C,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { useContext as b, useState as P, useRef as m, useEffect as f, useCallback as s, useMemo as H } from "react";
|
|
2
|
+
import { useAreasStore as L } from "../../../../../../../hooks/useAreas/index.js";
|
|
3
|
+
import D from "../../../../../../../utils/useOnClickOutside/index.js";
|
|
4
|
+
import { ModalContext as U } from "../../../../../../../../../contexts/ModalContext/index.js";
|
|
5
|
+
import { isHorizontalPanelSide as n, clampPanelSize as j, getPanelSlotStyle as q, getInlineResizeHandleStyle as B } from "../helpers/panelRuntime.js";
|
|
6
|
+
const V = ({
|
|
7
|
+
areaId: w,
|
|
8
|
+
overlay: M,
|
|
9
|
+
panel: e,
|
|
10
|
+
selected: W
|
|
11
|
+
}) => {
|
|
12
|
+
const y = L((t) => t.windowActions.close), l = L((t) => t.areaActions.setPanelSize), C = b(U)?.open === !0, [v, z] = P(e.width), [g, a] = P(e.height), S = m(null), O = S, r = m(e.width), d = m(e.height), c = m(null);
|
|
13
|
+
f(() => {
|
|
14
|
+
z(e.width), r.current = e.width;
|
|
15
|
+
}, [e.width]), f(() => {
|
|
16
|
+
a(e.height), d.current = e.height;
|
|
17
|
+
}, [e.height]), D(O, () => {
|
|
18
|
+
W && M && !C && y(e.windowId);
|
|
19
|
+
});
|
|
20
|
+
const R = s(
|
|
21
|
+
(t) => {
|
|
22
|
+
const u = c.current;
|
|
23
|
+
if (!u)
|
|
24
|
+
return;
|
|
25
|
+
const X = S.current?.parentElement ?? null, E = (n(e.side) ? t.clientX : t.clientY) - u.pointerStart, Y = e.side === "left" || e.side === "top" ? u.sizeStart + E : u.sizeStart - E, h = j(
|
|
26
|
+
e.side,
|
|
27
|
+
Y,
|
|
28
|
+
X,
|
|
29
|
+
e
|
|
30
|
+
);
|
|
31
|
+
if (n(e.side)) {
|
|
32
|
+
r.current = h, z(h);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
d.current = h, a(h);
|
|
36
|
+
},
|
|
37
|
+
[e]
|
|
38
|
+
), x = s(() => {
|
|
39
|
+
if (c.current) {
|
|
40
|
+
if (c.current = null, n(e.side)) {
|
|
41
|
+
l(w, e.windowId, {
|
|
42
|
+
width: r.current,
|
|
43
|
+
maxWidth: e.maxWidth
|
|
44
|
+
});
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
l(w, e.windowId, {
|
|
48
|
+
height: d.current,
|
|
49
|
+
maxHeight: e.maxHeight
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}, [w, e, l]), i = s(
|
|
53
|
+
(t) => {
|
|
54
|
+
R(t);
|
|
55
|
+
},
|
|
56
|
+
[R]
|
|
57
|
+
), o = s(() => {
|
|
58
|
+
window.removeEventListener("mousemove", i), window.removeEventListener("mouseup", o), x();
|
|
59
|
+
}, [i, x]);
|
|
60
|
+
f(() => () => {
|
|
61
|
+
window.removeEventListener("mousemove", i), window.removeEventListener("mouseup", o);
|
|
62
|
+
}, [i, o]);
|
|
63
|
+
const A = s(
|
|
64
|
+
(t) => {
|
|
65
|
+
t.preventDefault(), t.stopPropagation(), c.current = {
|
|
66
|
+
pointerStart: n(e.side) ? t.clientX : t.clientY,
|
|
67
|
+
sizeStart: n(e.side) ? r.current : d.current
|
|
68
|
+
}, window.addEventListener("mousemove", i), window.addEventListener("mouseup", o);
|
|
69
|
+
},
|
|
70
|
+
[i, o, e.side]
|
|
71
|
+
), k = H(
|
|
72
|
+
() => q({
|
|
73
|
+
...e,
|
|
74
|
+
width: v,
|
|
75
|
+
height: g
|
|
76
|
+
}),
|
|
77
|
+
[g, v, e]
|
|
78
|
+
), I = H(
|
|
79
|
+
() => B(e.side),
|
|
80
|
+
[e.side]
|
|
81
|
+
);
|
|
82
|
+
return {
|
|
83
|
+
containerRef: S,
|
|
84
|
+
resizeHandleStyle: I,
|
|
85
|
+
slotStyle: k,
|
|
86
|
+
handleResizeStart: A
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export {
|
|
90
|
+
V as useOverlayPanelResize
|
|
91
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePanelsByArea.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../../../packages/components/src/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePanelsByArea.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAA0B,MAAM,UAAU,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,QAAQ,MAAM,iBA8D7C,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { useMemo as p } from "react";
|
|
2
|
+
import { useAreasStore as s } from "../../../../../../../hooks/useAreas/index.js";
|
|
3
|
+
import { PANEL_DEFAULT_HEIGHT as a, PANEL_DEFAULT_WIDTH as d, PANEL_SIDES as h } from "../helpers/panelRuntime.js";
|
|
4
|
+
const f = (i) => {
|
|
5
|
+
const o = s((n) => {
|
|
6
|
+
const r = n.hashAreas[i];
|
|
7
|
+
return r ? r.panelItemsIds.map((e) => {
|
|
8
|
+
const t = n.hashWindows[e];
|
|
9
|
+
if (t?.emergeType === "panel")
|
|
10
|
+
return {
|
|
11
|
+
windowId: e,
|
|
12
|
+
side: t.panelProps.side,
|
|
13
|
+
pinned: !!t.panelProps.pinned,
|
|
14
|
+
width: t.panelProps.width ?? d,
|
|
15
|
+
height: t.panelProps.height ?? a,
|
|
16
|
+
maxWidth: t.panelProps.maxWidth,
|
|
17
|
+
maxHeight: t.panelProps.maxHeight
|
|
18
|
+
};
|
|
19
|
+
}).filter((e) => e !== void 0) : [];
|
|
20
|
+
});
|
|
21
|
+
return p(() => h.reduce(
|
|
22
|
+
(n, r) => (n.pinned[r] = o.filter(
|
|
23
|
+
(e) => e.side === r && e.pinned
|
|
24
|
+
), n.overlay[r] = o.filter(
|
|
25
|
+
(e) => e.side === r && !e.pinned
|
|
26
|
+
), n),
|
|
27
|
+
{
|
|
28
|
+
pinned: {
|
|
29
|
+
top: [],
|
|
30
|
+
left: [],
|
|
31
|
+
right: [],
|
|
32
|
+
bottom: []
|
|
33
|
+
},
|
|
34
|
+
overlay: {
|
|
35
|
+
top: [],
|
|
36
|
+
left: [],
|
|
37
|
+
right: [],
|
|
38
|
+
bottom: []
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
), [o]);
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
f as usePanelsByArea
|
|
45
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MouseEvent as ReactMouseEvent } from 'react';
|
|
2
|
+
import { PanelRuntimeDescriptor, PinnedResizeSession } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Coordinate the shared resize lifecycle for pinned panels.
|
|
5
|
+
*/
|
|
6
|
+
export declare const usePinnedPanelResize: (areaId: string) => {
|
|
7
|
+
centerColumnRef: import('react').RefObject<HTMLDivElement | null>;
|
|
8
|
+
handlePinnedResizeMove: (event: Pick<MouseEvent, "clientX" | "clientY">) => void;
|
|
9
|
+
handlePinnedResizeStart: (panel: PanelRuntimeDescriptor, event: ReactMouseEvent<HTMLDivElement>) => void;
|
|
10
|
+
isPinnedResizeActive: boolean;
|
|
11
|
+
middleRowRef: import('react').RefObject<HTMLDivElement | null>;
|
|
12
|
+
pinnedResizeSession: PinnedResizeSession | null;
|
|
13
|
+
resolvePinnedPanelRuntime: (panel: PanelRuntimeDescriptor) => PanelRuntimeDescriptor;
|
|
14
|
+
stopPinnedResize: () => void;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=usePinnedPanelResize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePinnedPanelResize.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../../../packages/components/src/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePinnedPanelResize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,eAAe,EAAE,MAAM,OAAO,CAAC;AAS3D,OAAO,KAAK,EAEV,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM;;oCA2EvC,IAAI,CAAC,UAAU,EAAE,SAAS,GAAG,SAAS,CAAC;qCA7BvC,sBAAsB,SAAS,eAAe,CAAC,cAAc,CAAC;;;;uCA7B9D,sBAAsB,KAAG,sBAAsB;;CA+L1D,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { useRef as w, useState as v, useCallback as r, useEffect as f } from "react";
|
|
2
|
+
import { useAreasStore as W } from "../../../../../../../hooks/useAreas/index.js";
|
|
3
|
+
import { isHorizontalPanelSide as d, getPointerPositionForPanelSide as R, clampPanelSize as b } from "../helpers/panelRuntime.js";
|
|
4
|
+
const M = (l) => {
|
|
5
|
+
const u = W((e) => e.areaActions.setPanelSize), P = w(null), m = w(null), o = w(null), [n, z] = v(null), [p, a] = v({}), g = !!n, E = r(
|
|
6
|
+
(e) => {
|
|
7
|
+
const t = p[e.windowId];
|
|
8
|
+
return t ? {
|
|
9
|
+
...e,
|
|
10
|
+
width: t.width ?? e.width,
|
|
11
|
+
height: t.height ?? e.height
|
|
12
|
+
} : e;
|
|
13
|
+
},
|
|
14
|
+
[p]
|
|
15
|
+
), S = r((e) => d(e) ? P.current : m.current, []), L = r(
|
|
16
|
+
(e, t) => {
|
|
17
|
+
t.preventDefault(), t.stopPropagation(), z({
|
|
18
|
+
panel: e,
|
|
19
|
+
pointerStart: R(e.side, t),
|
|
20
|
+
sizeStart: d(e.side) ? e.width : e.height
|
|
21
|
+
}), o.current = d(e.side) ? e.width : e.height, a((s) => ({
|
|
22
|
+
...s,
|
|
23
|
+
[e.windowId]: {
|
|
24
|
+
width: e.width,
|
|
25
|
+
height: e.height
|
|
26
|
+
}
|
|
27
|
+
}));
|
|
28
|
+
},
|
|
29
|
+
[]
|
|
30
|
+
), h = r(
|
|
31
|
+
(e) => {
|
|
32
|
+
if (!n)
|
|
33
|
+
return;
|
|
34
|
+
const s = R(
|
|
35
|
+
n.panel.side,
|
|
36
|
+
e
|
|
37
|
+
) - n.pointerStart, x = n.panel.side === "left" || n.panel.side === "top" ? n.sizeStart + s : n.sizeStart - s, c = b(
|
|
38
|
+
n.panel.side,
|
|
39
|
+
x,
|
|
40
|
+
S(n.panel.side),
|
|
41
|
+
n.panel
|
|
42
|
+
);
|
|
43
|
+
o.current = c, a((I) => ({
|
|
44
|
+
...I,
|
|
45
|
+
[n.panel.windowId]: d(
|
|
46
|
+
n.panel.side
|
|
47
|
+
) ? { width: c } : { height: c }
|
|
48
|
+
}));
|
|
49
|
+
},
|
|
50
|
+
[S, n]
|
|
51
|
+
), i = r(() => {
|
|
52
|
+
if (n) {
|
|
53
|
+
if (d(n.panel.side)) {
|
|
54
|
+
const e = o.current ?? n.panel.width;
|
|
55
|
+
u(l, n.panel.windowId, {
|
|
56
|
+
width: e,
|
|
57
|
+
maxWidth: n.panel.maxWidth
|
|
58
|
+
});
|
|
59
|
+
} else {
|
|
60
|
+
const e = o.current ?? n.panel.height;
|
|
61
|
+
u(l, n.panel.windowId, {
|
|
62
|
+
height: e,
|
|
63
|
+
maxHeight: n.panel.maxHeight
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
z(null), o.current = null, a((e) => {
|
|
67
|
+
const t = { ...e };
|
|
68
|
+
return delete t[n.panel.windowId], t;
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}, [l, n, u]);
|
|
72
|
+
return f(() => {
|
|
73
|
+
if (n)
|
|
74
|
+
return window.addEventListener("blur", i), () => {
|
|
75
|
+
window.removeEventListener("blur", i);
|
|
76
|
+
};
|
|
77
|
+
}, [n, i]), f(() => {
|
|
78
|
+
if (!n)
|
|
79
|
+
return;
|
|
80
|
+
const e = (s) => {
|
|
81
|
+
h(s);
|
|
82
|
+
}, t = () => {
|
|
83
|
+
i();
|
|
84
|
+
};
|
|
85
|
+
return window.addEventListener("mousemove", e, !0), window.addEventListener("mouseup", t, !0), () => {
|
|
86
|
+
window.removeEventListener(
|
|
87
|
+
"mousemove",
|
|
88
|
+
e,
|
|
89
|
+
!0
|
|
90
|
+
), window.removeEventListener("mouseup", t, !0);
|
|
91
|
+
};
|
|
92
|
+
}, [h, n, i]), {
|
|
93
|
+
centerColumnRef: m,
|
|
94
|
+
handlePinnedResizeMove: h,
|
|
95
|
+
handlePinnedResizeStart: L,
|
|
96
|
+
isPinnedResizeActive: g,
|
|
97
|
+
middleRowRef: P,
|
|
98
|
+
pinnedResizeSession: n,
|
|
99
|
+
resolvePinnedPanelRuntime: E,
|
|
100
|
+
stopPinnedResize: i
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
export {
|
|
104
|
+
M as usePinnedPanelResize
|
|
105
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AreaPanelsProps } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Render the panel-aware work-area body with stable per-side hosts for overlay and docked panels.
|
|
4
|
+
*/
|
|
5
|
+
export declare const AreaPanels: ({ areaId, children, selected }: AreaPanelsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=AreaPanels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AreaPanels.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../../../../packages/components/src/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/AreaPanels.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,eAAe,EAA0B,MAAM,aAAa,CAAC;AA2F3E;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,gCAAgC,eAAe,qDAqHzE,CAAC"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { jsxs as c, jsx as l } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { usePopupsStore as S } from "../../../../../../../../../popups/components/PopupsProvider/hooks/usePopupsStore.js";
|
|
3
|
+
import { PanelLayoutStyled as z, PanelMiddleRowStyled as H, PanelCenterColumnStyled as M, MainLayoutFlowStyled as $ } from "../../../../../../slots/AreasViewerSlots.js";
|
|
4
|
+
import { usePanelsByArea as b } from "../../hooks/usePanelsByArea.js";
|
|
5
|
+
import { usePinnedPanelResize as A } from "../../hooks/usePinnedPanelResize.js";
|
|
6
|
+
import { PanelResizeInteractionLayer as W } from "./subcomponents/PanelResizeInteractionLayer.js";
|
|
7
|
+
import { PanelWindow as m } from "./subcomponents/PanelWindow.js";
|
|
8
|
+
const y = (e, o) => {
|
|
9
|
+
const i = {
|
|
10
|
+
position: "relative",
|
|
11
|
+
display: "flex",
|
|
12
|
+
flexDirection: e.side === "left" || e.side === "right" ? "row" : "column",
|
|
13
|
+
flexShrink: 0,
|
|
14
|
+
minWidth: 0,
|
|
15
|
+
minHeight: 0,
|
|
16
|
+
overflow: o ? "visible" : "hidden"
|
|
17
|
+
};
|
|
18
|
+
if (e.side === "left" || e.side === "right") {
|
|
19
|
+
const n = o ? 0 : e.width;
|
|
20
|
+
return {
|
|
21
|
+
...i,
|
|
22
|
+
width: `${n}px`,
|
|
23
|
+
minWidth: `${n}px`,
|
|
24
|
+
maxWidth: `${n}px`,
|
|
25
|
+
height: "100%"
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const t = o ? 0 : e.height;
|
|
29
|
+
return {
|
|
30
|
+
...i,
|
|
31
|
+
width: "100%",
|
|
32
|
+
height: `${t}px`,
|
|
33
|
+
minHeight: `${t}px`,
|
|
34
|
+
maxHeight: `${t}px`
|
|
35
|
+
};
|
|
36
|
+
}, u = (e, o, i) => {
|
|
37
|
+
const t = e[e.length - 1];
|
|
38
|
+
if (t)
|
|
39
|
+
return {
|
|
40
|
+
overlay: !0,
|
|
41
|
+
panel: t
|
|
42
|
+
};
|
|
43
|
+
const n = o[o.length - 1];
|
|
44
|
+
return n ? {
|
|
45
|
+
overlay: !1,
|
|
46
|
+
panel: i(n)
|
|
47
|
+
} : null;
|
|
48
|
+
}, F = ({ areaId: e, children: o, selected: i }) => {
|
|
49
|
+
const t = S((g) => g.currentZindex), n = b(e), {
|
|
50
|
+
centerColumnRef: P,
|
|
51
|
+
handlePinnedResizeMove: f,
|
|
52
|
+
handlePinnedResizeStart: p,
|
|
53
|
+
isPinnedResizeActive: w,
|
|
54
|
+
middleRowRef: R,
|
|
55
|
+
pinnedResizeSession: v,
|
|
56
|
+
resolvePinnedPanelRuntime: h,
|
|
57
|
+
stopPinnedResize: x
|
|
58
|
+
} = A(e), r = u(
|
|
59
|
+
n.overlay.left,
|
|
60
|
+
n.pinned.left,
|
|
61
|
+
h
|
|
62
|
+
), a = u(
|
|
63
|
+
n.overlay.top,
|
|
64
|
+
n.pinned.top,
|
|
65
|
+
h
|
|
66
|
+
), s = u(
|
|
67
|
+
n.overlay.right,
|
|
68
|
+
n.pinned.right,
|
|
69
|
+
h
|
|
70
|
+
), d = u(
|
|
71
|
+
n.overlay.bottom,
|
|
72
|
+
n.pinned.bottom,
|
|
73
|
+
h
|
|
74
|
+
);
|
|
75
|
+
return /* @__PURE__ */ c(z, { children: [
|
|
76
|
+
/* @__PURE__ */ c(H, { ref: R, children: [
|
|
77
|
+
r ? /* @__PURE__ */ l("div", { style: y(r.panel, r.overlay), children: /* @__PURE__ */ l(
|
|
78
|
+
m,
|
|
79
|
+
{
|
|
80
|
+
areaId: e,
|
|
81
|
+
panel: r.panel,
|
|
82
|
+
panelZIndexBase: t,
|
|
83
|
+
selected: i,
|
|
84
|
+
overlay: r.overlay,
|
|
85
|
+
onPinnedResizeStart: p
|
|
86
|
+
},
|
|
87
|
+
r.panel.windowId
|
|
88
|
+
) }) : null,
|
|
89
|
+
/* @__PURE__ */ c(
|
|
90
|
+
M,
|
|
91
|
+
{
|
|
92
|
+
"data-testid": "areas-panel-center-column",
|
|
93
|
+
ref: P,
|
|
94
|
+
children: [
|
|
95
|
+
a ? /* @__PURE__ */ l("div", { style: y(a.panel, a.overlay), children: /* @__PURE__ */ l(
|
|
96
|
+
m,
|
|
97
|
+
{
|
|
98
|
+
areaId: e,
|
|
99
|
+
panel: a.panel,
|
|
100
|
+
panelZIndexBase: t,
|
|
101
|
+
selected: i,
|
|
102
|
+
overlay: a.overlay,
|
|
103
|
+
onPinnedResizeStart: p
|
|
104
|
+
},
|
|
105
|
+
a.panel.windowId
|
|
106
|
+
) }) : null,
|
|
107
|
+
/* @__PURE__ */ l(
|
|
108
|
+
$,
|
|
109
|
+
{
|
|
110
|
+
"data-testid": "areas-main-layout-flow",
|
|
111
|
+
ownerState: { isResizingPanel: w },
|
|
112
|
+
children: o
|
|
113
|
+
},
|
|
114
|
+
"areas-main-layout-flow"
|
|
115
|
+
),
|
|
116
|
+
d ? /* @__PURE__ */ l("div", { style: y(d.panel, d.overlay), children: /* @__PURE__ */ l(
|
|
117
|
+
m,
|
|
118
|
+
{
|
|
119
|
+
areaId: e,
|
|
120
|
+
panel: d.panel,
|
|
121
|
+
panelZIndexBase: t,
|
|
122
|
+
selected: i,
|
|
123
|
+
overlay: d.overlay,
|
|
124
|
+
onPinnedResizeStart: p
|
|
125
|
+
},
|
|
126
|
+
d.panel.windowId
|
|
127
|
+
) }) : null
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"areas-panel-center-column"
|
|
131
|
+
),
|
|
132
|
+
s ? /* @__PURE__ */ l("div", { style: y(s.panel, s.overlay), children: /* @__PURE__ */ l(
|
|
133
|
+
m,
|
|
134
|
+
{
|
|
135
|
+
areaId: e,
|
|
136
|
+
panel: s.panel,
|
|
137
|
+
panelZIndexBase: t,
|
|
138
|
+
selected: i,
|
|
139
|
+
overlay: s.overlay,
|
|
140
|
+
onPinnedResizeStart: p
|
|
141
|
+
},
|
|
142
|
+
s.panel.windowId
|
|
143
|
+
) }) : null
|
|
144
|
+
] }, "areas-panel-middle-row"),
|
|
145
|
+
v ? /* @__PURE__ */ l(
|
|
146
|
+
W,
|
|
147
|
+
{
|
|
148
|
+
side: v.panel.side,
|
|
149
|
+
panelZIndexBase: t,
|
|
150
|
+
onMouseMove: f,
|
|
151
|
+
onMouseUp: x
|
|
152
|
+
}
|
|
153
|
+
) : null
|
|
154
|
+
] });
|
|
155
|
+
};
|
|
156
|
+
export {
|
|
157
|
+
F as AreaPanels
|
|
158
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MouseEvent as ReactMouseEvent } from 'react';
|
|
2
|
+
import { PanelSide } from '../../../../../../../../../types';
|
|
3
|
+
type PanelResizeInteractionLayerProps = {
|
|
4
|
+
side: PanelSide;
|
|
5
|
+
panelZIndexBase: number;
|
|
6
|
+
onMouseMove: (event: ReactMouseEvent<HTMLDivElement>) => void;
|
|
7
|
+
onMouseUp: () => void;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Transparent layer that owns the active pinned-panel resize gesture once it
|
|
11
|
+
* starts from the rail.
|
|
12
|
+
*/
|
|
13
|
+
export declare const PanelResizeInteractionLayer: ({ side, panelZIndexBase, onMouseMove, onMouseUp, }: PanelResizeInteractionLayerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=PanelResizeInteractionLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PanelResizeInteractionLayer.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../../../../../packages/components/src/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeInteractionLayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,eAAe,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAGlE,KAAK,gCAAgC,GAAG;IACtC,IAAI,EAAE,SAAS,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC9D,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,GAAI,oDAKzC,gCAAgC,qDASlC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { PanelResizeInteractionLayerStyled as i } from "../../../../../../../slots/AreasViewerSlots.js";
|
|
3
|
+
const l = ({
|
|
4
|
+
side: e,
|
|
5
|
+
panelZIndexBase: t,
|
|
6
|
+
onMouseMove: r,
|
|
7
|
+
onMouseUp: a
|
|
8
|
+
}) => /* @__PURE__ */ n(
|
|
9
|
+
i,
|
|
10
|
+
{
|
|
11
|
+
ownerState: { side: e, panelZIndexBase: t },
|
|
12
|
+
"data-testid": "areas-panel-resize-interaction-layer",
|
|
13
|
+
onMouseMove: r,
|
|
14
|
+
onMouseUp: a
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
export {
|
|
18
|
+
l as PanelResizeInteractionLayer
|
|
19
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MouseEvent as ReactMouseEvent } from 'react';
|
|
2
|
+
import { PanelRuntimeDescriptor } from '../../../types';
|
|
3
|
+
type PanelResizeRailProps = {
|
|
4
|
+
panel: PanelRuntimeDescriptor;
|
|
5
|
+
side: PanelRuntimeDescriptor['side'];
|
|
6
|
+
panelZIndexBase: number;
|
|
7
|
+
onResizeStart: (panel: PanelRuntimeDescriptor, event: ReactMouseEvent<HTMLDivElement>) => void;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Render the stable resize rail used by pinned panels.
|
|
11
|
+
*/
|
|
12
|
+
export declare const PanelResizeRail: ({ panel, side, panelZIndexBase, onResizeStart, }: PanelResizeRailProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=PanelResizeRail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PanelResizeRail.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../../../../../packages/components/src/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeRail.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,UAAU,IAAI,eAAe,EAAE,MAAM,OAAO,CAAC;AAG1E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAG7D,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,sBAAsB,CAAC;IAC9B,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACrC,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,CACb,KAAK,EAAE,sBAAsB,EAC7B,KAAK,EAAE,eAAe,CAAC,cAAc,CAAC,KACnC,IAAI,CAAC;CACX,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,kDAK7B,oBAAoB,qDAuBtB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as t } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useMemo as n } from "react";
|
|
3
|
+
import { getRailResizeHandleStyle as s } from "../../../helpers/panelRuntime.js";
|
|
4
|
+
import { PanelResizeRailStyled as m } from "../../../../../../../slots/AreasViewerSlots.js";
|
|
5
|
+
const f = ({
|
|
6
|
+
panel: a,
|
|
7
|
+
side: e,
|
|
8
|
+
panelZIndexBase: r,
|
|
9
|
+
onResizeStart: l
|
|
10
|
+
}) => {
|
|
11
|
+
const o = n(
|
|
12
|
+
() => s(e),
|
|
13
|
+
[e]
|
|
14
|
+
);
|
|
15
|
+
return /* @__PURE__ */ t(
|
|
16
|
+
m,
|
|
17
|
+
{
|
|
18
|
+
ownerState: { side: e, panelZIndexBase: r },
|
|
19
|
+
"data-testid": `areas-panel-resize-rail-${e}`,
|
|
20
|
+
children: /* @__PURE__ */ t(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
"data-testid": `areas-panel-resize-handle-${e}`,
|
|
24
|
+
onMouseDown: (i) => {
|
|
25
|
+
l(a, i);
|
|
26
|
+
},
|
|
27
|
+
style: o
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
f as PanelResizeRail
|
|
35
|
+
};
|