@elementor/editor-floating-panels 4.3.0-970
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 +5 -0
- package/README.md +117 -0
- package/dist/index.d.mts +159 -0
- package/dist/index.d.ts +159 -0
- package/dist/index.js +1108 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1062 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +58 -0
- package/src/api.ts +36 -0
- package/src/components/external/floating-panel-body.tsx +15 -0
- package/src/components/external/floating-panel-footer.tsx +22 -0
- package/src/components/external/floating-panel-header.tsx +100 -0
- package/src/components/external/floating-panel.tsx +10 -0
- package/src/components/external/index.ts +4 -0
- package/src/components/internal/corner-resize-handle.tsx +69 -0
- package/src/components/internal/drag-handle.tsx +29 -0
- package/src/components/internal/host.tsx +86 -0
- package/src/components/internal/panel-window.tsx +100 -0
- package/src/components/internal/resize-handle.tsx +60 -0
- package/src/constants.ts +1 -0
- package/src/hooks/use-floating-panel-actions.ts +26 -0
- package/src/hooks/use-floating-panel-drag.ts +85 -0
- package/src/hooks/use-floating-panel-resize.ts +166 -0
- package/src/hooks/use-floating-panel-status.ts +17 -0
- package/src/hooks/use-floating-panel-z-index.ts +7 -0
- package/src/index.ts +15 -0
- package/src/init.ts +14 -0
- package/src/location.ts +3 -0
- package/src/persistence.ts +76 -0
- package/src/store/index.ts +2 -0
- package/src/store/selectors.ts +61 -0
- package/src/store/slice.ts +113 -0
- package/src/sync.ts +104 -0
- package/src/types.ts +64 -0
- package/src/utils/clamp.ts +3 -0
- package/src/utils/corner-position.ts +149 -0
- package/src/utils/direction.ts +3 -0
- package/src/utils/drag-math.ts +49 -0
- package/src/utils/resize-math.ts +107 -0
- package/src/utils/viewport-bounds.ts +7 -0
package/CHANGELOG.md
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Editor Floating Panels
|
|
2
|
+
|
|
3
|
+
A generic floating panel framework for the Elementor Editor that provides the primitives for rendering panels on the canvas. The panels can be dragged and resized freely within the viewport, independent of any specific feature concern.
|
|
4
|
+
|
|
5
|
+
The panes are persisted and survive reloads. The state stores open/closed, position, size, and z-index in `localStorage`.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import {
|
|
11
|
+
createFloatingPanel,
|
|
12
|
+
init,
|
|
13
|
+
registerFloatingPanel,
|
|
14
|
+
|
|
15
|
+
FloatingPanelBody,
|
|
16
|
+
FloatingPanelFooter,
|
|
17
|
+
FloatingPanelHeader,
|
|
18
|
+
} from '@elementor/editor-floating-panels';
|
|
19
|
+
|
|
20
|
+
init();
|
|
21
|
+
|
|
22
|
+
const myPanel = createFloatingPanel( {
|
|
23
|
+
id: 'my-panel',
|
|
24
|
+
title: 'My Panel',
|
|
25
|
+
icon: MyIcon,
|
|
26
|
+
component: MyPanelComponent,
|
|
27
|
+
isDraggable: true,
|
|
28
|
+
isResizable: true,
|
|
29
|
+
defaults: {
|
|
30
|
+
width: 320,
|
|
31
|
+
height: 480,
|
|
32
|
+
minWidth: 240,
|
|
33
|
+
minHeight: 320,
|
|
34
|
+
corner: 'block-start-inline-start',
|
|
35
|
+
initialPosition: {
|
|
36
|
+
insetBlockStart: 80,
|
|
37
|
+
insetInlineStart: 200
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
} );
|
|
41
|
+
|
|
42
|
+
registerFloatingPanel( myPanel.panel );
|
|
43
|
+
|
|
44
|
+
function MyPanelComponent() {
|
|
45
|
+
return (
|
|
46
|
+
<>
|
|
47
|
+
<FloatingPanelHeader
|
|
48
|
+
panelId="my-panel"
|
|
49
|
+
title="My Panel"
|
|
50
|
+
actions={ [ /* ... */ ] }
|
|
51
|
+
/>
|
|
52
|
+
<FloatingPanelBody>
|
|
53
|
+
{ /* ... */ }
|
|
54
|
+
</FloatingPanelBody>
|
|
55
|
+
<FloatingPanelFooter>
|
|
56
|
+
{ /* ... */ }
|
|
57
|
+
</FloatingPanelFooter>
|
|
58
|
+
</>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### `isDraggable`
|
|
64
|
+
|
|
65
|
+
When `isDraggable` is `true`, the panel header acts as a drag handle — the user can reposition the panel freely. When `false` (the default), the header renders without drag interaction and the panel stays at its `initialPosition` (see `defaults.initialPosition`).
|
|
66
|
+
|
|
67
|
+
Programmatic positioning via `setPosition` from `useFloatingPanelActions` works regardless of `isDraggable`.
|
|
68
|
+
|
|
69
|
+
### `isResizable`
|
|
70
|
+
|
|
71
|
+
When `isResizable` is `true`, edge and corner resize handles render on the panel — the user can resize freely within the viewport and the minimums defined in `defaults` (`minWidth` / `minHeight`). When `false` (the default), no resize handles render and the panel stays at its declared or persisted size.
|
|
72
|
+
|
|
73
|
+
Programmatic sizing via `setSize` from `useFloatingPanelActions` works regardless of `isResizable`.
|
|
74
|
+
|
|
75
|
+
### `defaults`
|
|
76
|
+
|
|
77
|
+
`defaults` is required and defines the panel's initial dimensions and (optionally) its initial position.
|
|
78
|
+
|
|
79
|
+
| Field | Purpose |
|
|
80
|
+
| ----- | ------- |
|
|
81
|
+
| `width` | Initial panel width (in pixels). |
|
|
82
|
+
| `height` | Initial panel height (in pixels). |
|
|
83
|
+
| `minWidth` | Minimum width the panel can be resized to. |
|
|
84
|
+
| `minHeight` | Minimum height the panel can be resized to. |
|
|
85
|
+
| `corner` (optional) | Viewport corner anchor. One of `block-start-inline-start`, `block-start-inline-end`, `block-end-inline-start`, `block-end-inline-end`. Default: `block-start-inline-start`. |
|
|
86
|
+
| `initialPosition` (optional) | Offsets on the two insets that match `corner`. Used only when no persisted position exists. Other keys are ignored. |
|
|
87
|
+
|
|
88
|
+
Sizes use physical names (`width`/`height`) because Elementor renders in horizontal writing mode only. Position uses logical inset names because it is direction-sensitive (e.g. RTL).
|
|
89
|
+
|
|
90
|
+
`LogicalPosition` stores all four insets (`insetInlineStart`, `insetInlineEnd`, `insetBlockStart`, `insetBlockEnd`). Only the pair matching `corner` is used for rendering and interaction; inactive insets are `0`.
|
|
91
|
+
|
|
92
|
+
| `corner` | Active insets | Default `initialPosition` |
|
|
93
|
+
| --- | --- | --- |
|
|
94
|
+
| `block-start-inline-start` | `insetInlineStart`, `insetBlockStart` | `{ insetInlineStart: 24, insetBlockStart: 80 }` |
|
|
95
|
+
| `block-start-inline-end` | `insetInlineEnd`, `insetBlockStart` | `{ insetInlineEnd: 24, insetBlockStart: 80 }` |
|
|
96
|
+
| `block-end-inline-start` | `insetInlineStart`, `insetBlockEnd` | `{ insetInlineStart: 24, insetBlockEnd: 80 }` |
|
|
97
|
+
| `block-end-inline-end` | `insetInlineEnd`, `insetBlockEnd` | `{ insetInlineEnd: 24, insetBlockEnd: 80 }` |
|
|
98
|
+
|
|
99
|
+
Example for bottom-right anchoring:
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
defaults: {
|
|
103
|
+
width: 360,
|
|
104
|
+
height: 600,
|
|
105
|
+
minWidth: 280,
|
|
106
|
+
minHeight: 400,
|
|
107
|
+
corner: 'block-end-inline-end',
|
|
108
|
+
initialPosition: {
|
|
109
|
+
insetBlockEnd: 80,
|
|
110
|
+
insetInlineEnd: 24
|
|
111
|
+
},
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
When persisted state exists, the persisted `position`, `corner`, and `size` override `initialPosition`, `corner`, `width`, and `height`. The resize minimums (`minWidth`/`minHeight`) are always derived from `defaults`.
|
|
116
|
+
|
|
117
|
+
Call `init()` once during editor bootstrap, **before** any `createFloatingPanel` call, to register the slice, sync persisted state, and mount the host into the editor's top location.
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ComponentType, ReactNode } from 'react';
|
|
3
|
+
import { BoxProps } from '@elementor/ui';
|
|
4
|
+
|
|
5
|
+
type PanelCorner = 'block-start-inline-start' | 'block-start-inline-end' | 'block-end-inline-start' | 'block-end-inline-end';
|
|
6
|
+
|
|
7
|
+
type LogicalSize = {
|
|
8
|
+
inlineSize: number;
|
|
9
|
+
blockSize: number;
|
|
10
|
+
};
|
|
11
|
+
type LogicalPosition = {
|
|
12
|
+
insetInlineStart: number;
|
|
13
|
+
insetInlineEnd: number;
|
|
14
|
+
insetBlockStart: number;
|
|
15
|
+
insetBlockEnd: number;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Public API for declaring a floating panel's initial dimensions.
|
|
19
|
+
*
|
|
20
|
+
* Sizes use physical names (width/height) intentionally — Elementor renders
|
|
21
|
+
* in horizontal writing mode only, so these are equivalent to logical
|
|
22
|
+
* inline-size/block-size. Positioning continues to use logical names
|
|
23
|
+
* because position is genuinely direction-sensitive.
|
|
24
|
+
*
|
|
25
|
+
* If multi-writing-mode support is ever needed, replace these fields with
|
|
26
|
+
* `size: LogicalSize` and `minSize: LogicalSize` and update the store's
|
|
27
|
+
* register reducer.
|
|
28
|
+
*/
|
|
29
|
+
type FloatingPanelDefaults = {
|
|
30
|
+
width: number;
|
|
31
|
+
height: number;
|
|
32
|
+
minWidth: number;
|
|
33
|
+
minHeight: number;
|
|
34
|
+
corner?: PanelCorner;
|
|
35
|
+
initialPosition?: Partial<LogicalPosition>;
|
|
36
|
+
};
|
|
37
|
+
type FloatingPanelHeaderAction = {
|
|
38
|
+
id: string;
|
|
39
|
+
icon: ComponentType;
|
|
40
|
+
label: string;
|
|
41
|
+
onClick?: () => void;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
};
|
|
44
|
+
type FloatingPanelDeclaration = {
|
|
45
|
+
id: string;
|
|
46
|
+
title: string;
|
|
47
|
+
icon: ComponentType;
|
|
48
|
+
component: ComponentType;
|
|
49
|
+
isDraggable?: boolean;
|
|
50
|
+
isResizable?: boolean;
|
|
51
|
+
defaults: FloatingPanelDefaults;
|
|
52
|
+
};
|
|
53
|
+
type FloatingPanelState = {
|
|
54
|
+
isOpen: boolean;
|
|
55
|
+
zIndex: number;
|
|
56
|
+
size: LogicalSize;
|
|
57
|
+
corner: PanelCorner;
|
|
58
|
+
position: LogicalPosition;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
declare function createFloatingPanel(declaration: FloatingPanelDeclaration): {
|
|
62
|
+
panel: FloatingPanelDeclaration;
|
|
63
|
+
useFloatingPanelStatus: () => {
|
|
64
|
+
isOpen: boolean;
|
|
65
|
+
corner: PanelCorner;
|
|
66
|
+
position: LogicalPosition;
|
|
67
|
+
size: LogicalSize;
|
|
68
|
+
};
|
|
69
|
+
useFloatingPanelActions: () => {
|
|
70
|
+
open: () => void;
|
|
71
|
+
close: () => {
|
|
72
|
+
payload: string;
|
|
73
|
+
type: "floatingPanels/close";
|
|
74
|
+
};
|
|
75
|
+
toggle: () => void | {
|
|
76
|
+
payload: string;
|
|
77
|
+
type: "floatingPanels/close";
|
|
78
|
+
};
|
|
79
|
+
setPosition: (position: LogicalPosition) => {
|
|
80
|
+
payload: {
|
|
81
|
+
id: string;
|
|
82
|
+
position: LogicalPosition;
|
|
83
|
+
};
|
|
84
|
+
type: "floatingPanels/setPosition";
|
|
85
|
+
};
|
|
86
|
+
setSize: (size: LogicalSize) => {
|
|
87
|
+
payload: {
|
|
88
|
+
id: string;
|
|
89
|
+
size: LogicalSize;
|
|
90
|
+
};
|
|
91
|
+
type: "floatingPanels/setSize";
|
|
92
|
+
};
|
|
93
|
+
focus: () => {
|
|
94
|
+
payload: string;
|
|
95
|
+
type: "floatingPanels/bringToFront";
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
declare function registerFloatingPanel(declaration: Pick<FloatingPanelDeclaration, 'id' | 'component'>): void;
|
|
100
|
+
|
|
101
|
+
type Props$1 = {
|
|
102
|
+
children: ReactNode;
|
|
103
|
+
};
|
|
104
|
+
declare function FloatingPanel({ children }: Props$1): React.JSX.Element;
|
|
105
|
+
|
|
106
|
+
declare function FloatingPanelBody(props: BoxProps): React.JSX.Element;
|
|
107
|
+
|
|
108
|
+
declare function FloatingPanelFooter({ children, sx, ...props }: BoxProps): React.JSX.Element;
|
|
109
|
+
|
|
110
|
+
type Props = {
|
|
111
|
+
panelId: string;
|
|
112
|
+
title: string;
|
|
113
|
+
icon?: ComponentType;
|
|
114
|
+
actions?: FloatingPanelHeaderAction[];
|
|
115
|
+
};
|
|
116
|
+
declare function FloatingPanelHeader({ panelId, title, icon: Icon, actions }: Props): React.JSX.Element;
|
|
117
|
+
|
|
118
|
+
declare function useFloatingPanelActions(id: string): {
|
|
119
|
+
open: () => void;
|
|
120
|
+
close: () => {
|
|
121
|
+
payload: string;
|
|
122
|
+
type: "floatingPanels/close";
|
|
123
|
+
};
|
|
124
|
+
toggle: () => void | {
|
|
125
|
+
payload: string;
|
|
126
|
+
type: "floatingPanels/close";
|
|
127
|
+
};
|
|
128
|
+
setPosition: (position: LogicalPosition) => {
|
|
129
|
+
payload: {
|
|
130
|
+
id: string;
|
|
131
|
+
position: LogicalPosition;
|
|
132
|
+
};
|
|
133
|
+
type: "floatingPanels/setPosition";
|
|
134
|
+
};
|
|
135
|
+
setSize: (size: LogicalSize) => {
|
|
136
|
+
payload: {
|
|
137
|
+
id: string;
|
|
138
|
+
size: LogicalSize;
|
|
139
|
+
};
|
|
140
|
+
type: "floatingPanels/setSize";
|
|
141
|
+
};
|
|
142
|
+
focus: () => {
|
|
143
|
+
payload: string;
|
|
144
|
+
type: "floatingPanels/bringToFront";
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
declare function useFloatingPanelStatus(id: string): {
|
|
149
|
+
isOpen: boolean;
|
|
150
|
+
corner: PanelCorner;
|
|
151
|
+
position: LogicalPosition;
|
|
152
|
+
size: LogicalSize;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
declare function useFloatingPanelZIndex(panelId: string): number;
|
|
156
|
+
|
|
157
|
+
declare function init(): void;
|
|
158
|
+
|
|
159
|
+
export { FloatingPanel, FloatingPanelBody, type FloatingPanelDeclaration, type FloatingPanelDefaults, FloatingPanelFooter, FloatingPanelHeader, type FloatingPanelHeaderAction, type FloatingPanelState, type LogicalPosition, type LogicalSize, type PanelCorner, createFloatingPanel, init, registerFloatingPanel, useFloatingPanelActions, useFloatingPanelStatus, useFloatingPanelZIndex };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ComponentType, ReactNode } from 'react';
|
|
3
|
+
import { BoxProps } from '@elementor/ui';
|
|
4
|
+
|
|
5
|
+
type PanelCorner = 'block-start-inline-start' | 'block-start-inline-end' | 'block-end-inline-start' | 'block-end-inline-end';
|
|
6
|
+
|
|
7
|
+
type LogicalSize = {
|
|
8
|
+
inlineSize: number;
|
|
9
|
+
blockSize: number;
|
|
10
|
+
};
|
|
11
|
+
type LogicalPosition = {
|
|
12
|
+
insetInlineStart: number;
|
|
13
|
+
insetInlineEnd: number;
|
|
14
|
+
insetBlockStart: number;
|
|
15
|
+
insetBlockEnd: number;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Public API for declaring a floating panel's initial dimensions.
|
|
19
|
+
*
|
|
20
|
+
* Sizes use physical names (width/height) intentionally — Elementor renders
|
|
21
|
+
* in horizontal writing mode only, so these are equivalent to logical
|
|
22
|
+
* inline-size/block-size. Positioning continues to use logical names
|
|
23
|
+
* because position is genuinely direction-sensitive.
|
|
24
|
+
*
|
|
25
|
+
* If multi-writing-mode support is ever needed, replace these fields with
|
|
26
|
+
* `size: LogicalSize` and `minSize: LogicalSize` and update the store's
|
|
27
|
+
* register reducer.
|
|
28
|
+
*/
|
|
29
|
+
type FloatingPanelDefaults = {
|
|
30
|
+
width: number;
|
|
31
|
+
height: number;
|
|
32
|
+
minWidth: number;
|
|
33
|
+
minHeight: number;
|
|
34
|
+
corner?: PanelCorner;
|
|
35
|
+
initialPosition?: Partial<LogicalPosition>;
|
|
36
|
+
};
|
|
37
|
+
type FloatingPanelHeaderAction = {
|
|
38
|
+
id: string;
|
|
39
|
+
icon: ComponentType;
|
|
40
|
+
label: string;
|
|
41
|
+
onClick?: () => void;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
};
|
|
44
|
+
type FloatingPanelDeclaration = {
|
|
45
|
+
id: string;
|
|
46
|
+
title: string;
|
|
47
|
+
icon: ComponentType;
|
|
48
|
+
component: ComponentType;
|
|
49
|
+
isDraggable?: boolean;
|
|
50
|
+
isResizable?: boolean;
|
|
51
|
+
defaults: FloatingPanelDefaults;
|
|
52
|
+
};
|
|
53
|
+
type FloatingPanelState = {
|
|
54
|
+
isOpen: boolean;
|
|
55
|
+
zIndex: number;
|
|
56
|
+
size: LogicalSize;
|
|
57
|
+
corner: PanelCorner;
|
|
58
|
+
position: LogicalPosition;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
declare function createFloatingPanel(declaration: FloatingPanelDeclaration): {
|
|
62
|
+
panel: FloatingPanelDeclaration;
|
|
63
|
+
useFloatingPanelStatus: () => {
|
|
64
|
+
isOpen: boolean;
|
|
65
|
+
corner: PanelCorner;
|
|
66
|
+
position: LogicalPosition;
|
|
67
|
+
size: LogicalSize;
|
|
68
|
+
};
|
|
69
|
+
useFloatingPanelActions: () => {
|
|
70
|
+
open: () => void;
|
|
71
|
+
close: () => {
|
|
72
|
+
payload: string;
|
|
73
|
+
type: "floatingPanels/close";
|
|
74
|
+
};
|
|
75
|
+
toggle: () => void | {
|
|
76
|
+
payload: string;
|
|
77
|
+
type: "floatingPanels/close";
|
|
78
|
+
};
|
|
79
|
+
setPosition: (position: LogicalPosition) => {
|
|
80
|
+
payload: {
|
|
81
|
+
id: string;
|
|
82
|
+
position: LogicalPosition;
|
|
83
|
+
};
|
|
84
|
+
type: "floatingPanels/setPosition";
|
|
85
|
+
};
|
|
86
|
+
setSize: (size: LogicalSize) => {
|
|
87
|
+
payload: {
|
|
88
|
+
id: string;
|
|
89
|
+
size: LogicalSize;
|
|
90
|
+
};
|
|
91
|
+
type: "floatingPanels/setSize";
|
|
92
|
+
};
|
|
93
|
+
focus: () => {
|
|
94
|
+
payload: string;
|
|
95
|
+
type: "floatingPanels/bringToFront";
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
declare function registerFloatingPanel(declaration: Pick<FloatingPanelDeclaration, 'id' | 'component'>): void;
|
|
100
|
+
|
|
101
|
+
type Props$1 = {
|
|
102
|
+
children: ReactNode;
|
|
103
|
+
};
|
|
104
|
+
declare function FloatingPanel({ children }: Props$1): React.JSX.Element;
|
|
105
|
+
|
|
106
|
+
declare function FloatingPanelBody(props: BoxProps): React.JSX.Element;
|
|
107
|
+
|
|
108
|
+
declare function FloatingPanelFooter({ children, sx, ...props }: BoxProps): React.JSX.Element;
|
|
109
|
+
|
|
110
|
+
type Props = {
|
|
111
|
+
panelId: string;
|
|
112
|
+
title: string;
|
|
113
|
+
icon?: ComponentType;
|
|
114
|
+
actions?: FloatingPanelHeaderAction[];
|
|
115
|
+
};
|
|
116
|
+
declare function FloatingPanelHeader({ panelId, title, icon: Icon, actions }: Props): React.JSX.Element;
|
|
117
|
+
|
|
118
|
+
declare function useFloatingPanelActions(id: string): {
|
|
119
|
+
open: () => void;
|
|
120
|
+
close: () => {
|
|
121
|
+
payload: string;
|
|
122
|
+
type: "floatingPanels/close";
|
|
123
|
+
};
|
|
124
|
+
toggle: () => void | {
|
|
125
|
+
payload: string;
|
|
126
|
+
type: "floatingPanels/close";
|
|
127
|
+
};
|
|
128
|
+
setPosition: (position: LogicalPosition) => {
|
|
129
|
+
payload: {
|
|
130
|
+
id: string;
|
|
131
|
+
position: LogicalPosition;
|
|
132
|
+
};
|
|
133
|
+
type: "floatingPanels/setPosition";
|
|
134
|
+
};
|
|
135
|
+
setSize: (size: LogicalSize) => {
|
|
136
|
+
payload: {
|
|
137
|
+
id: string;
|
|
138
|
+
size: LogicalSize;
|
|
139
|
+
};
|
|
140
|
+
type: "floatingPanels/setSize";
|
|
141
|
+
};
|
|
142
|
+
focus: () => {
|
|
143
|
+
payload: string;
|
|
144
|
+
type: "floatingPanels/bringToFront";
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
declare function useFloatingPanelStatus(id: string): {
|
|
149
|
+
isOpen: boolean;
|
|
150
|
+
corner: PanelCorner;
|
|
151
|
+
position: LogicalPosition;
|
|
152
|
+
size: LogicalSize;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
declare function useFloatingPanelZIndex(panelId: string): number;
|
|
156
|
+
|
|
157
|
+
declare function init(): void;
|
|
158
|
+
|
|
159
|
+
export { FloatingPanel, FloatingPanelBody, type FloatingPanelDeclaration, type FloatingPanelDefaults, FloatingPanelFooter, FloatingPanelHeader, type FloatingPanelHeaderAction, type FloatingPanelState, type LogicalPosition, type LogicalSize, type PanelCorner, createFloatingPanel, init, registerFloatingPanel, useFloatingPanelActions, useFloatingPanelStatus, useFloatingPanelZIndex };
|