@kubohiroya/turbowarp-plus-editor-workbench 0.27.0 → 0.28.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/EDITOR-MIGRATION.md +5 -0
- package/README.ja.md +9 -0
- package/dist/basic-panel.d.ts +52 -0
- package/dist/basic-panel.js +153 -0
- package/dist/editor-tabs.d.ts +37 -0
- package/dist/editor-tabs.js +550 -0
- package/dist/popup-layout.d.ts +20 -0
- package/dist/popup-layout.js +59 -0
- package/dist/project-folder-workflows.d.ts +31 -0
- package/dist/project-folder-workflows.js +1 -0
- package/dist/project-payload-forms.d.ts +8 -0
- package/dist/project-payload-forms.js +184 -0
- package/dist/project-tools/diagnostics.d.ts +13 -0
- package/dist/project-tools/diagnostics.js +65 -0
- package/dist/project-tools/dialog.d.ts +21 -0
- package/dist/project-tools/dialog.js +363 -0
- package/dist/project-tools/history.d.ts +8 -0
- package/dist/project-tools/history.js +22 -0
- package/dist/project-tools/integration.d.ts +65 -0
- package/dist/project-tools/integration.js +356 -0
- package/dist/project-tools/links.d.ts +3 -0
- package/dist/project-tools/links.js +36 -0
- package/dist/project-tools/properties.d.ts +51 -0
- package/dist/project-tools/properties.js +268 -0
- package/dist/sprite-tabs.d.ts +1 -0
- package/dist/sprite-tabs.js +1 -0
- package/dist/stage-display-menu.d.ts +21 -0
- package/dist/stage-display-menu.js +156 -0
- package/dist/stage-panel.d.ts +29 -0
- package/dist/stage-panel.js +105 -0
- package/package.json +78 -9
- package/src/basic-panel.tsx +207 -0
- package/src/editor-tabs.tsx +591 -0
- package/src/popup-layout.css +4 -0
- package/src/popup-layout.tsx +81 -0
- package/src/project-dialog.css +39 -0
- package/src/project-folder-workflows.ts +32 -0
- package/src/project-payload-forms.ts +179 -0
- package/src/project-snackbar.css +85 -0
- package/src/project-tools/diagnostics.ts +51 -0
- package/src/project-tools/dialog.ts +341 -0
- package/src/project-tools/history.ts +20 -0
- package/src/project-tools/integration.ts +366 -0
- package/src/project-tools/links.ts +31 -0
- package/src/project-tools/properties.ts +251 -0
- package/src/sprite-tabs.ts +2 -1
- package/src/stage-display-menu.css +28 -0
- package/src/stage-display-menu.tsx +177 -0
- package/src/stage-panel.tsx +127 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubohiroya/turbowarp-plus-editor-workbench",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "The TurboWarp Plus Editor workbench: layout, dockable sprite tabs, stage, debugger tab and file menu",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -123,7 +123,63 @@
|
|
|
123
123
|
"types": "./dist/standard-layout.d.ts",
|
|
124
124
|
"default": "./dist/standard-layout.js"
|
|
125
125
|
},
|
|
126
|
-
"./targets.css": "./src/targets.css"
|
|
126
|
+
"./targets.css": "./src/targets.css",
|
|
127
|
+
"./project-dialogs": {
|
|
128
|
+
"types": "./dist/project-tools/dialog.d.ts",
|
|
129
|
+
"default": "./dist/project-tools/dialog.js"
|
|
130
|
+
},
|
|
131
|
+
"./project-dialog.css": "./src/project-dialog.css",
|
|
132
|
+
"./project-snackbar.css": "./src/project-snackbar.css",
|
|
133
|
+
"./project-payload-forms": {
|
|
134
|
+
"types": "./dist/project-payload-forms.d.ts",
|
|
135
|
+
"default": "./dist/project-payload-forms.js"
|
|
136
|
+
},
|
|
137
|
+
"./project-diagnostics": {
|
|
138
|
+
"types": "./dist/project-tools/diagnostics.d.ts",
|
|
139
|
+
"default": "./dist/project-tools/diagnostics.js"
|
|
140
|
+
},
|
|
141
|
+
"./project-history": {
|
|
142
|
+
"types": "./dist/project-tools/history.d.ts",
|
|
143
|
+
"default": "./dist/project-tools/history.js"
|
|
144
|
+
},
|
|
145
|
+
"./project-links": {
|
|
146
|
+
"types": "./dist/project-tools/links.d.ts",
|
|
147
|
+
"default": "./dist/project-tools/links.js"
|
|
148
|
+
},
|
|
149
|
+
"./project-properties": {
|
|
150
|
+
"types": "./dist/project-tools/properties.d.ts",
|
|
151
|
+
"default": "./dist/project-tools/properties.js"
|
|
152
|
+
},
|
|
153
|
+
"./project-tools": {
|
|
154
|
+
"types": "./dist/project-tools/integration.d.ts",
|
|
155
|
+
"default": "./dist/project-tools/integration.js"
|
|
156
|
+
},
|
|
157
|
+
"./project-folder-workflows": {
|
|
158
|
+
"types": "./dist/project-folder-workflows.d.ts",
|
|
159
|
+
"default": "./dist/project-folder-workflows.js"
|
|
160
|
+
},
|
|
161
|
+
"./basic-panel": {
|
|
162
|
+
"types": "./dist/basic-panel.d.ts",
|
|
163
|
+
"default": "./dist/basic-panel.js"
|
|
164
|
+
},
|
|
165
|
+
"./popup-layout": {
|
|
166
|
+
"types": "./dist/popup-layout.d.ts",
|
|
167
|
+
"default": "./dist/popup-layout.js"
|
|
168
|
+
},
|
|
169
|
+
"./stage-display-menu": {
|
|
170
|
+
"types": "./dist/stage-display-menu.d.ts",
|
|
171
|
+
"default": "./dist/stage-display-menu.js"
|
|
172
|
+
},
|
|
173
|
+
"./stage-panel": {
|
|
174
|
+
"types": "./dist/stage-panel.d.ts",
|
|
175
|
+
"default": "./dist/stage-panel.js"
|
|
176
|
+
},
|
|
177
|
+
"./popup-layout.css": "./src/popup-layout.css",
|
|
178
|
+
"./stage-display-menu.css": "./src/stage-display-menu.css",
|
|
179
|
+
"./editor-tabs": {
|
|
180
|
+
"types": "./dist/editor-tabs.d.ts",
|
|
181
|
+
"default": "./dist/editor-tabs.js"
|
|
182
|
+
}
|
|
127
183
|
},
|
|
128
184
|
"files": [
|
|
129
185
|
"dist",
|
|
@@ -132,16 +188,17 @@
|
|
|
132
188
|
"README.md",
|
|
133
189
|
"README.ja.md",
|
|
134
190
|
"LICENSE",
|
|
135
|
-
"NOTICE"
|
|
191
|
+
"NOTICE",
|
|
192
|
+
"EDITOR-MIGRATION.md"
|
|
136
193
|
],
|
|
137
194
|
"scripts": {
|
|
138
195
|
"build": "tsc -p tsconfig.json && tsc -p example/tsconfig.json",
|
|
139
196
|
"prepare": "npm run build",
|
|
140
|
-
"test": "npm run build && node --test test/*.test.ts",
|
|
197
|
+
"test": "npm run build && node --test test/*.test.ts test/*.test.cts",
|
|
141
198
|
"test:browser": "npm run build && node --test test/*.browser.ts"
|
|
142
199
|
},
|
|
143
200
|
"devDependencies": {
|
|
144
|
-
"@kubohiroya/turbowarp-plus-editor-git": "0.
|
|
201
|
+
"@kubohiroya/turbowarp-plus-editor-git": "0.25.2",
|
|
145
202
|
"@kubohiroya/turbowarp-plus-editor-windows": "0.2.1",
|
|
146
203
|
"@playwright/test": "1.64.1",
|
|
147
204
|
"@types/react": "18.3.31",
|
|
@@ -150,7 +207,13 @@
|
|
|
150
207
|
"jsdom": "26.1.0",
|
|
151
208
|
"react": "18.3.1",
|
|
152
209
|
"react-dom": "18.3.1",
|
|
153
|
-
"typescript": "^6.0.3"
|
|
210
|
+
"typescript": "^6.0.3",
|
|
211
|
+
"@kubohiroya/turbowarp-sb3-save-format": "0.4.0-rc.2",
|
|
212
|
+
"@turbowarp/jszip": "3.12.0",
|
|
213
|
+
"@kubohiroya/turbowarp-extension-loader": "0.11.1",
|
|
214
|
+
"@kubohiroya/turbowarp-plus-editor-project-folder": "0.20.1",
|
|
215
|
+
"@kubohiroya/turbowarp-plus-editor-code-views": "0.22.0",
|
|
216
|
+
"@kubohiroya/turbowarp-extension-security-dialog": "0.9.0"
|
|
154
217
|
},
|
|
155
218
|
"repository": {
|
|
156
219
|
"type": "git",
|
|
@@ -158,15 +221,21 @@
|
|
|
158
221
|
},
|
|
159
222
|
"dependencies": {
|
|
160
223
|
"@kubohiroya/turbowarp-plus-editor-project-model": "0.2.0",
|
|
161
|
-
"@kubohiroya/turbowarp-plus-editor-sprite-panes": "0.
|
|
224
|
+
"@kubohiroya/turbowarp-plus-editor-sprite-panes": "0.11.0",
|
|
162
225
|
"@kubohiroya/turbowarp-script-transfer": "0.1.5",
|
|
163
226
|
"dockview": "8.8.3"
|
|
164
227
|
},
|
|
165
228
|
"peerDependencies": {
|
|
166
|
-
"@kubohiroya/turbowarp-plus-editor-git": ">=0.
|
|
229
|
+
"@kubohiroya/turbowarp-plus-editor-git": ">=0.25.2 <0.26.0",
|
|
167
230
|
"@kubohiroya/turbowarp-plus-editor-windows": ">=0.2.1 <0.3.0",
|
|
168
231
|
"react": ">=16.14",
|
|
169
|
-
"react-dom": ">=16.14"
|
|
232
|
+
"react-dom": ">=16.14",
|
|
233
|
+
"@kubohiroya/turbowarp-sb3-save-format": ">=0.4.0-rc.2 <0.5.0",
|
|
234
|
+
"@turbowarp/jszip": ">=3.12.0 <4",
|
|
235
|
+
"@kubohiroya/turbowarp-extension-loader": ">=0.11.1 <0.12.0",
|
|
236
|
+
"@kubohiroya/turbowarp-plus-editor-project-folder": ">=0.20.1 <0.21.0",
|
|
237
|
+
"@kubohiroya/turbowarp-plus-editor-code-views": ">=0.22.0 <0.23.0",
|
|
238
|
+
"@kubohiroya/turbowarp-extension-security-dialog": ">=0.9.0 <0.10.0"
|
|
170
239
|
},
|
|
171
240
|
"peerDependenciesMeta": {
|
|
172
241
|
"@kubohiroya/turbowarp-plus-editor-git": {
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import {createPortal, flushSync} from 'react-dom';
|
|
4
|
+
import {createSurface, pendingSurfaceEdits, recordSurface} from '@kubohiroya/turbowarp-plus-editor-windows/surfaces';
|
|
5
|
+
import type {SurfaceHost, SurfaceRecovery} from '@kubohiroya/turbowarp-plus-editor-windows/surfaces';
|
|
6
|
+
import type {SurfaceState} from '@kubohiroya/turbowarp-plus-editor-windows/surfaces';
|
|
7
|
+
import {DockablePanel, OpenWindowButton, useWindowHost} from '@kubohiroya/turbowarp-plus-editor-windows';
|
|
8
|
+
|
|
9
|
+
export interface PanelMount {
|
|
10
|
+
mount: HTMLElement;
|
|
11
|
+
presentation?: 'internal' | 'external';
|
|
12
|
+
}
|
|
13
|
+
export interface PanelRequest {
|
|
14
|
+
id: string;
|
|
15
|
+
title: string;
|
|
16
|
+
rememberPlacement: boolean;
|
|
17
|
+
presentation: 'internal';
|
|
18
|
+
layer?: 'utility';
|
|
19
|
+
openExternal?: () => void;
|
|
20
|
+
}
|
|
21
|
+
export interface PanelProps {
|
|
22
|
+
id: string;
|
|
23
|
+
title: string;
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
render?: (floating: boolean, mount?: HTMLElement | null) => React.ReactNode;
|
|
26
|
+
actionMount?: HTMLElement | null;
|
|
27
|
+
dockHeight?: number;
|
|
28
|
+
className?: string;
|
|
29
|
+
externalOnly?: boolean;
|
|
30
|
+
externalHost?: SurfaceHost<undefined, PanelMount>;
|
|
31
|
+
decorate?: (document: Document) => () => void;
|
|
32
|
+
renderInExternalDocument?: boolean;
|
|
33
|
+
onDockActionChange?: (actions: {kind: SurfaceState<PanelMount>['kind']; dock(): void;
|
|
34
|
+
undock(): void; external: boolean; mount?: HTMLElement} | null) => void;
|
|
35
|
+
alwaysShowUndock?: boolean;
|
|
36
|
+
openLabel?: string;
|
|
37
|
+
dockRequest?: number;
|
|
38
|
+
renderDockHeading?: (action: React.ReactNode) => React.ReactNode;
|
|
39
|
+
layer?: 'utility';
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function createBasicPanel({WindowLayoutContext, PopupLayout, surfaceRecovery, styles}: {
|
|
43
|
+
WindowLayoutContext: React.Context<any>;
|
|
44
|
+
PopupLayout: React.ComponentType<{window: Window; locale: string; onDock(): void}>;
|
|
45
|
+
surfaceRecovery: SurfaceRecovery;
|
|
46
|
+
styles: Record<string, string>;
|
|
47
|
+
}) {
|
|
48
|
+
// React 16 needs an explicit subscription to the external layout state.
|
|
49
|
+
function useLostWindow(recovery: SurfaceRecovery | null | undefined, id: string) {
|
|
50
|
+
const [lost, setLost] = React.useState(() => Boolean(recovery?.isLost(id)));
|
|
51
|
+
React.useEffect(() => {
|
|
52
|
+
if (!recovery) return;
|
|
53
|
+
const update = () => setLost(recovery.isLost(id));
|
|
54
|
+
update();
|
|
55
|
+
return recovery.subscribe(update);
|
|
56
|
+
}, [recovery, id]);
|
|
57
|
+
return Boolean(recovery) && lost;
|
|
58
|
+
}
|
|
59
|
+
// Inputs commit on blur, so blurring the external document collects an unfinished edit.
|
|
60
|
+
const commitInput = (mount?: HTMLElement | null) => {
|
|
61
|
+
const active = mount?.ownerDocument.activeElement as HTMLElement | null | undefined;
|
|
62
|
+
if (active && active !== mount.ownerDocument.body) active.blur?.();
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
function DockableBasicPanel({host, id, title, children, render, actionMount, dockHeight, className,
|
|
69
|
+
externalHost, externalOnly, decorate, renderInExternalDocument, onDockActionChange, alwaysShowUndock, openLabel, renderDockHeading, layer, dockRequest}: PanelProps & {host: NonNullable<ReturnType<typeof useWindowHost>>}) {
|
|
70
|
+
const {showUndock, locale, plusLayout} = React.useContext(WindowLayoutContext);
|
|
71
|
+
const canUndock = alwaysShowUndock || showUndock;
|
|
72
|
+
const [state, setState] = React.useState<SurfaceState<PanelMount>>({kind: 'docked'});
|
|
73
|
+
const action = React.useRef(null);
|
|
74
|
+
const undecorate = React.useRef(null);
|
|
75
|
+
const unmounting = React.useRef(false);
|
|
76
|
+
const fallback = React.useRef<PanelRequest | null>(null);
|
|
77
|
+
const surface = React.useMemo(() => createSurface<PanelRequest | undefined, PanelMount>({
|
|
78
|
+
open: request => request?.presentation === 'internal' ? host.open(request) : externalHost?.open(undefined)
|
|
79
|
+
}, next => {
|
|
80
|
+
if (externalHost) recordSurface(surfaceRecovery, id, next, target => target.presentation !== 'internal');
|
|
81
|
+
if (next.kind === 'external' && next.target.presentation !== 'internal') {
|
|
82
|
+
undecorate.current = decorate(next.target.mount.ownerDocument);
|
|
83
|
+
}
|
|
84
|
+
if (next.kind === 'docked' && fallback.current) {
|
|
85
|
+
const retry = fallback.current;
|
|
86
|
+
fallback.current = null;
|
|
87
|
+
if (next.reason === 'blocked' || next.reason === 'failed') {
|
|
88
|
+
surface.undock(retry);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (next.kind === 'docked' && undecorate.current) {
|
|
93
|
+
if (!unmounting.current) flushSync(() => setState(next));
|
|
94
|
+
undecorate.current();
|
|
95
|
+
undecorate.current = null;
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (!unmounting.current) setState(next);
|
|
99
|
+
}), [host, externalHost, decorate, id]);
|
|
100
|
+
const lost = useLostWindow(externalHost ? surfaceRecovery : null, id);
|
|
101
|
+
React.useLayoutEffect(() => {
|
|
102
|
+
unmounting.current = false;
|
|
103
|
+
return () => {
|
|
104
|
+
unmounting.current = true;
|
|
105
|
+
fallback.current = null;
|
|
106
|
+
surface.dock();
|
|
107
|
+
};
|
|
108
|
+
}, [surface]);
|
|
109
|
+
React.useLayoutEffect(() => {
|
|
110
|
+
if (!canUndock || state.kind !== 'docked' || state.reason !== 'returned' && state.reason !== 'disconnected') return;
|
|
111
|
+
const frame = requestAnimationFrame(() => action.current?.querySelector('button')?.focus({preventScroll: true}));
|
|
112
|
+
return () => cancelAnimationFrame(frame);
|
|
113
|
+
}, [canUndock, state]);
|
|
114
|
+
|
|
115
|
+
const undock = React.useCallback(() => {
|
|
116
|
+
// A window that was external when the editor closed reopens there, one panel per click.
|
|
117
|
+
if (externalOnly || (externalHost && (!plusLayout || lost))) {
|
|
118
|
+
surface.undock(undefined);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const request: PanelRequest = {id, title, rememberPlacement: true, presentation: 'internal', layer};
|
|
122
|
+
if (externalHost) request.openExternal = () => {
|
|
123
|
+
surface.dock();
|
|
124
|
+
fallback.current = request;
|
|
125
|
+
surface.undock(undefined);
|
|
126
|
+
};
|
|
127
|
+
surface.undock(request);
|
|
128
|
+
}, [surface, id, title, externalHost, externalOnly, plusLayout, layer, lost]);
|
|
129
|
+
const japanese = /^ja(?:-|$)/i.test(locale);
|
|
130
|
+
const mount = state.kind === 'external' ? state.target.mount : undefined;
|
|
131
|
+
const externalMount = state.kind === 'external' && state.target.presentation !== 'internal' ? state.target.mount : null;
|
|
132
|
+
const returnHere = React.useCallback(() => {
|
|
133
|
+
commitInput(externalMount);
|
|
134
|
+
surface.dock();
|
|
135
|
+
}, [surface, externalMount]);
|
|
136
|
+
const lastDockRequest = React.useRef(dockRequest);
|
|
137
|
+
React.useEffect(() => {
|
|
138
|
+
if (dockRequest === lastDockRequest.current) return;
|
|
139
|
+
lastDockRequest.current = dockRequest;
|
|
140
|
+
if (!dockRequest || state.kind === 'docked') return;
|
|
141
|
+
// Returning an external panel flushes React before its document is closed.
|
|
142
|
+
queueMicrotask(() => {
|
|
143
|
+
if (!unmounting.current) returnHere();
|
|
144
|
+
});
|
|
145
|
+
}, [dockRequest, state.kind, returnHere]);
|
|
146
|
+
React.useEffect(() => externalMount ? pendingSurfaceEdits.register(() => commitInput(externalMount)) : undefined,
|
|
147
|
+
[externalMount]);
|
|
148
|
+
React.useLayoutEffect(() => {
|
|
149
|
+
if (!onDockActionChange) return;
|
|
150
|
+
onDockActionChange({kind: state.kind, dock: returnHere, undock,
|
|
151
|
+
external: Boolean(externalHost && (externalOnly || !plusLayout || lost)), mount: externalMount ?? undefined});
|
|
152
|
+
return () => onDockActionChange(null);
|
|
153
|
+
}, [onDockActionChange, state.kind, returnHere, undock, externalHost, externalOnly, plusLayout, externalMount, lost]);
|
|
154
|
+
React.useLayoutEffect(() => {
|
|
155
|
+
if (externalMount) externalMount.ownerDocument.title = title;
|
|
156
|
+
}, [externalMount, title]);
|
|
157
|
+
const content = render ? render(Boolean(mount), externalMount) : children;
|
|
158
|
+
// Create target controls in the child document so React delegates input there.
|
|
159
|
+
const nativeContent = externalMount && renderInExternalDocument ?
|
|
160
|
+
createPortal(<div className={styles.externalPanel}>
|
|
161
|
+
{plusLayout && <div className={styles.popupTools}>
|
|
162
|
+
<PopupLayout window={externalMount.ownerDocument.defaultView} locale={locale} onDock={returnHere} />
|
|
163
|
+
</div>}
|
|
164
|
+
{content}
|
|
165
|
+
</div>, externalMount) : null;
|
|
166
|
+
|
|
167
|
+
const openAction = canUndock && !mount && <span className={styles.openWindowAction} ref={action}>
|
|
168
|
+
<OpenWindowButton
|
|
169
|
+
disabled={state.kind === 'opening'}
|
|
170
|
+
label={lost ? (japanese ? '別画面で開き直す' : 'Reopen in another window') :
|
|
171
|
+
openLabel ?? (japanese ? '別画面で開く' : 'Open in another window')}
|
|
172
|
+
onOpen={undock}
|
|
173
|
+
/>
|
|
174
|
+
</span>;
|
|
175
|
+
const focusable = Boolean(openAction && actionMount === undefined);
|
|
176
|
+
return <div className={className ? `${styles.basicPanel} ${className}` : styles.basicPanel}
|
|
177
|
+
style={mount ? {minBlockSize: dockHeight} : undefined}
|
|
178
|
+
tabIndex={focusable ? -1 : undefined}
|
|
179
|
+
onClick={focusable ? event => {
|
|
180
|
+
const node = event.currentTarget;
|
|
181
|
+
const target = event.target as HTMLElement;
|
|
182
|
+
if (node.contains(target) && !target.closest('button, input, a, select, textarea, [tabindex]') &&
|
|
183
|
+
!node.contains(node.ownerDocument.activeElement)) node.focus({preventScroll: true});
|
|
184
|
+
} : undefined}>
|
|
185
|
+
{actionMount === undefined ? (
|
|
186
|
+
renderDockHeading ? !mount && renderDockHeading(openAction) : <div className={styles.basicPanelHeading}>
|
|
187
|
+
<h2>{title}</h2>
|
|
188
|
+
{openAction}
|
|
189
|
+
</div>
|
|
190
|
+
) : (actionMount && openAction && createPortal(openAction, actionMount))}
|
|
191
|
+
<DockablePanel
|
|
192
|
+
dockLabel={japanese ? 'ここに戻す' : 'Return here'}
|
|
193
|
+
mount={mount}
|
|
194
|
+
onDock={returnHere}
|
|
195
|
+
>{nativeContent ? null : content}</DockablePanel>
|
|
196
|
+
{nativeContent}
|
|
197
|
+
</div>;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function BasicPanel({children, ...options}: PanelProps) {
|
|
201
|
+
const host = useWindowHost();
|
|
202
|
+
return host ? <DockableBasicPanel {...options} host={host}>{children}</DockableBasicPanel> :
|
|
203
|
+
<>{options.renderDockHeading?.(null)}{options.render ? options.render(false) : children}</>;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
return {BasicPanel};
|
|
207
|
+
}
|