@fps-games/editor 0.1.5-beta.1 → 0.1.5-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +14 -14
- package/dist/local-editor-harness.d.ts.map +1 -1
- package/dist/local-editor-harness.js +25 -11
- package/dist/local-editor-harness.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/package.json +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection-pick-resolver.d.ts +26 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection-pick-resolver.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection-pick-resolver.js +312 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection-pick-resolver.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection-selection-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection-selection-controller.js +51 -29
- package/node_modules/@fps-games/editor-babylon/dist/projection-selection-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js +4 -39
- package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/package.json +5 -5
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-actions.d.ts +5 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-actions.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-actions.js +34 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-actions.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-attach-dialog.d.ts +52 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-attach-dialog.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-attach-dialog.js +445 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-attach-dialog.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js +71 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-input-router.d.ts +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-input-router.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-input-router.js +12 -6
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-input-router.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +6 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +3 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/package.json +3 -3
- package/node_modules/@fps-games/editor-core/package.json +2 -2
- package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/index.d.ts +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/patches.d.ts +13 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/patches.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/patches.js +20 -6
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/patches.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/package.json +3 -3
- package/node_modules/@fps-games/editor-protocol/package.json +1 -1
- package/package.json +8 -8
package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-attach-dialog.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type LocalEditorThemeName } from './local-editor-ui-theme';
|
|
2
|
+
import type { LocalEditorHierarchyDropResolution, LocalEditorHierarchyTreeModel, LocalEditorHierarchyTreeNode } from './local-editor-ui-hierarchy-tree';
|
|
3
|
+
export interface LocalEditorHierarchyAttachTarget {
|
|
4
|
+
key: string;
|
|
5
|
+
targetId: string | null;
|
|
6
|
+
label: string;
|
|
7
|
+
role: LocalEditorHierarchyTreeNode['role'] | 'scene-root';
|
|
8
|
+
depth: number;
|
|
9
|
+
valid: boolean;
|
|
10
|
+
disabledReason?: string;
|
|
11
|
+
selected: boolean;
|
|
12
|
+
node?: LocalEditorHierarchyTreeNode;
|
|
13
|
+
resolution: LocalEditorHierarchyDropResolution;
|
|
14
|
+
}
|
|
15
|
+
export interface LocalEditorHierarchyAttachTargetSelection {
|
|
16
|
+
targetId: string | null;
|
|
17
|
+
placement: 'root' | 'inside';
|
|
18
|
+
label: string;
|
|
19
|
+
resolution: LocalEditorHierarchyDropResolution;
|
|
20
|
+
}
|
|
21
|
+
export interface LocalEditorHierarchyAttachConfirmResult {
|
|
22
|
+
ok: boolean;
|
|
23
|
+
reason?: string;
|
|
24
|
+
}
|
|
25
|
+
export type LocalEditorHierarchyAttachConfirmResponse = LocalEditorHierarchyAttachConfirmResult | boolean | string | void;
|
|
26
|
+
export interface LocalEditorHierarchyAttachTargetInput {
|
|
27
|
+
model: LocalEditorHierarchyTreeModel;
|
|
28
|
+
targetIds: readonly string[];
|
|
29
|
+
query?: string;
|
|
30
|
+
selectedTargetKey?: string | null;
|
|
31
|
+
}
|
|
32
|
+
export interface LocalEditorHierarchyAttachDialogOpenInput {
|
|
33
|
+
model: LocalEditorHierarchyTreeModel;
|
|
34
|
+
targetIds: readonly string[];
|
|
35
|
+
activeId: string | null;
|
|
36
|
+
}
|
|
37
|
+
export interface LocalEditorHierarchyAttachDialogOptions {
|
|
38
|
+
doc: Document;
|
|
39
|
+
getTheme?: () => LocalEditorThemeName | undefined;
|
|
40
|
+
onOpenChange?: (open: boolean) => void;
|
|
41
|
+
onConfirm?: (selection: LocalEditorHierarchyAttachTargetSelection) => LocalEditorHierarchyAttachConfirmResponse;
|
|
42
|
+
}
|
|
43
|
+
export interface LocalEditorHierarchyAttachDialogController {
|
|
44
|
+
isOpen(): boolean;
|
|
45
|
+
open(input: LocalEditorHierarchyAttachDialogOpenInput): void;
|
|
46
|
+
close(): void;
|
|
47
|
+
setTheme(theme: LocalEditorThemeName): void;
|
|
48
|
+
dispose(): void;
|
|
49
|
+
}
|
|
50
|
+
export declare function resolveLocalEditorHierarchyAttachTargets(input: LocalEditorHierarchyAttachTargetInput): LocalEditorHierarchyAttachTarget[];
|
|
51
|
+
export declare function createLocalEditorHierarchyAttachDialog(options: LocalEditorHierarchyAttachDialogOptions): LocalEditorHierarchyAttachDialogController;
|
|
52
|
+
//# sourceMappingURL=local-editor-ui-hierarchy-attach-dialog.d.ts.map
|
package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-attach-dialog.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-editor-ui-hierarchy-attach-dialog.d.ts","sourceRoot":"","sources":["../src/local-editor-ui-hierarchy-attach-dialog.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EACV,kCAAkC,EAClC,6BAA6B,EAC7B,4BAA4B,EAC7B,MAAM,kCAAkC,CAAC;AAU1C,MAAM,WAAW,gCAAgC;IAC/C,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,4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D,MAAM,IAAI,OAAO,CAAC;IAClB,IAAI,CAAC,KAAK,EAAE,yCAAyC,GAAG,IAAI,CAAC;IAC7D,KAAK,IAAI,IAAI,CAAC;IACd,QAAQ,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAC5C,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,wBAAgB,wCAAwC,CACtD,KAAK,EAAE,qCAAqC,GAC3C,gCAAgC,EAAE,CA8BpC;AAED,wBAAgB,sCAAsC,CACpD,OAAO,EAAE,uCAAuC,GAC/C,0CAA0C,CAiX5C"}
|
package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-attach-dialog.js
ADDED
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
import { createButton } from './local-editor-ui-shared.js';
|
|
2
|
+
import { createEditorInputStyle, } from './local-editor-ui-primitives.js';
|
|
3
|
+
import { createLocalEditorIcon, isLocalEditorIconName, } from './local-editor-ui-icons.js';
|
|
4
|
+
import { applyLocalEditorTheme, LOCAL_EDITOR_THEME_CLASS, } from './local-editor-ui-theme.js';
|
|
5
|
+
import { resolveLocalEditorHierarchySearchRows, } from './local-editor-ui-hierarchy-view.js';
|
|
6
|
+
const ATTACH_TARGET_ROOT_KEY = '__fps_editor_scene_root__';
|
|
7
|
+
const ATTACH_ROLE_ICONS = {
|
|
8
|
+
root: 'root',
|
|
9
|
+
group: 'group',
|
|
10
|
+
object: 'object',
|
|
11
|
+
};
|
|
12
|
+
export function resolveLocalEditorHierarchyAttachTargets(input) {
|
|
13
|
+
const sourceIds = input.model.getTopLevelSelection(input.targetIds);
|
|
14
|
+
const rootResolution = input.model.resolveDrop({ draggedIds: sourceIds, placement: 'root' });
|
|
15
|
+
const targets = [{
|
|
16
|
+
key: ATTACH_TARGET_ROOT_KEY,
|
|
17
|
+
targetId: null,
|
|
18
|
+
label: 'Scene Root',
|
|
19
|
+
role: 'scene-root',
|
|
20
|
+
depth: 0,
|
|
21
|
+
valid: rootResolution.ok,
|
|
22
|
+
disabledReason: rootResolution.ok ? undefined : formatAttachDisabledReason(rootResolution.reason),
|
|
23
|
+
selected: input.selectedTargetKey === ATTACH_TARGET_ROOT_KEY,
|
|
24
|
+
resolution: rootResolution,
|
|
25
|
+
}];
|
|
26
|
+
for (const node of resolveLocalEditorHierarchySearchRows(input.model, input.query ?? '')) {
|
|
27
|
+
const resolution = resolveAttachTargetDrop(input.model, sourceIds, node.id);
|
|
28
|
+
targets.push({
|
|
29
|
+
key: node.id,
|
|
30
|
+
targetId: node.id,
|
|
31
|
+
label: node.label,
|
|
32
|
+
role: node.role,
|
|
33
|
+
depth: node.depth + 1,
|
|
34
|
+
valid: resolution.ok,
|
|
35
|
+
disabledReason: resolution.ok ? undefined : formatAttachDisabledReason(resolution.reason),
|
|
36
|
+
selected: input.selectedTargetKey === node.id,
|
|
37
|
+
node,
|
|
38
|
+
resolution,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return targets;
|
|
42
|
+
}
|
|
43
|
+
export function createLocalEditorHierarchyAttachDialog(options) {
|
|
44
|
+
const { doc } = options;
|
|
45
|
+
const root = doc.createElement('div');
|
|
46
|
+
root.classList.add(LOCAL_EDITOR_THEME_CLASS);
|
|
47
|
+
root.dataset.editorHierarchyAttachDialog = 'true';
|
|
48
|
+
root.dataset.editorWorkbenchRegion = 'modal';
|
|
49
|
+
root.style.cssText = [
|
|
50
|
+
'position:fixed',
|
|
51
|
+
'inset:0',
|
|
52
|
+
'z-index:2147483642',
|
|
53
|
+
'display:none',
|
|
54
|
+
'align-items:center',
|
|
55
|
+
'justify-content:center',
|
|
56
|
+
'padding:32px',
|
|
57
|
+
'background:rgba(0,0,0,0.45)',
|
|
58
|
+
'font-family:var(--fps-editor-font)',
|
|
59
|
+
'color:var(--fps-editor-text)',
|
|
60
|
+
'pointer-events:auto',
|
|
61
|
+
].join(';');
|
|
62
|
+
const dialog = doc.createElement('div');
|
|
63
|
+
dialog.setAttribute('role', 'dialog');
|
|
64
|
+
dialog.setAttribute('aria-modal', 'true');
|
|
65
|
+
dialog.setAttribute('aria-label', 'Attach selection to hierarchy target');
|
|
66
|
+
dialog.style.cssText = [
|
|
67
|
+
'width:min(520px,calc(100vw - 64px))',
|
|
68
|
+
'max-height:calc(100vh - 64px)',
|
|
69
|
+
'display:flex',
|
|
70
|
+
'flex-direction:column',
|
|
71
|
+
'gap:10px',
|
|
72
|
+
'padding:14px',
|
|
73
|
+
'border:1px solid var(--fps-editor-border)',
|
|
74
|
+
'border-radius:4px',
|
|
75
|
+
'background:var(--fps-editor-panel)',
|
|
76
|
+
'box-shadow:var(--fps-editor-shadow-modal)',
|
|
77
|
+
'overflow:hidden',
|
|
78
|
+
].join(';');
|
|
79
|
+
const header = doc.createElement('div');
|
|
80
|
+
header.style.cssText = 'display:flex;align-items:center;justify-content:space-between;gap:12px';
|
|
81
|
+
const title = doc.createElement('h2');
|
|
82
|
+
title.textContent = 'Attach To...';
|
|
83
|
+
title.style.cssText = [
|
|
84
|
+
'min-width:0',
|
|
85
|
+
'margin:0',
|
|
86
|
+
'overflow:hidden',
|
|
87
|
+
'text-overflow:ellipsis',
|
|
88
|
+
'white-space:nowrap',
|
|
89
|
+
'font-size:13px',
|
|
90
|
+
'font-weight:900',
|
|
91
|
+
'color:var(--fps-editor-text-strong)',
|
|
92
|
+
].join(';');
|
|
93
|
+
const closeButton = createButton(doc, 'Cancel');
|
|
94
|
+
closeButton.dataset.editorHierarchyAttachCancel = 'true';
|
|
95
|
+
header.appendChild(title);
|
|
96
|
+
header.appendChild(closeButton);
|
|
97
|
+
const summary = doc.createElement('div');
|
|
98
|
+
summary.style.cssText = 'color:var(--fps-editor-muted);font-size:11px;font-weight:800;line-height:16px';
|
|
99
|
+
const search = doc.createElement('input');
|
|
100
|
+
search.type = 'search';
|
|
101
|
+
search.dataset.editorHierarchyAttachSearch = 'true';
|
|
102
|
+
search.placeholder = 'Search hierarchy target';
|
|
103
|
+
search.style.cssText = [
|
|
104
|
+
createEditorInputStyle(),
|
|
105
|
+
'width:100%',
|
|
106
|
+
'height:30px',
|
|
107
|
+
'outline:none',
|
|
108
|
+
].join(';');
|
|
109
|
+
const list = doc.createElement('div');
|
|
110
|
+
list.dataset.editorHierarchyAttachList = 'true';
|
|
111
|
+
list.style.cssText = [
|
|
112
|
+
'min-height:180px',
|
|
113
|
+
'max-height:min(430px,calc(100vh - 230px))',
|
|
114
|
+
'overflow:auto',
|
|
115
|
+
'display:flex',
|
|
116
|
+
'flex-direction:column',
|
|
117
|
+
'gap:2px',
|
|
118
|
+
'padding:2px',
|
|
119
|
+
'border:1px solid var(--fps-editor-border-soft)',
|
|
120
|
+
'border-radius:3px',
|
|
121
|
+
'background:var(--fps-editor-field)',
|
|
122
|
+
].join(';');
|
|
123
|
+
const selectedSummary = doc.createElement('div');
|
|
124
|
+
selectedSummary.style.cssText = [
|
|
125
|
+
'min-height:18px',
|
|
126
|
+
'color:var(--fps-editor-muted-strong)',
|
|
127
|
+
'font-size:11px',
|
|
128
|
+
'font-weight:800',
|
|
129
|
+
'line-height:16px',
|
|
130
|
+
].join(';');
|
|
131
|
+
const feedback = doc.createElement('div');
|
|
132
|
+
feedback.dataset.editorHierarchyAttachFeedback = 'true';
|
|
133
|
+
feedback.setAttribute('role', 'status');
|
|
134
|
+
feedback.setAttribute('aria-live', 'polite');
|
|
135
|
+
feedback.style.cssText = [
|
|
136
|
+
'display:none',
|
|
137
|
+
'min-height:18px',
|
|
138
|
+
'padding:5px 7px',
|
|
139
|
+
'border:1px solid var(--fps-editor-danger-border)',
|
|
140
|
+
'border-radius:3px',
|
|
141
|
+
'background:var(--fps-editor-danger-soft)',
|
|
142
|
+
'color:var(--fps-editor-danger-text)',
|
|
143
|
+
'font-size:11px',
|
|
144
|
+
'font-weight:800',
|
|
145
|
+
'line-height:15px',
|
|
146
|
+
].join(';');
|
|
147
|
+
const footer = doc.createElement('div');
|
|
148
|
+
footer.style.cssText = 'display:flex;align-items:center;justify-content:flex-end;gap:8px';
|
|
149
|
+
const cancelButton = createButton(doc, 'Cancel');
|
|
150
|
+
cancelButton.dataset.editorHierarchyAttachCancel = 'true';
|
|
151
|
+
const confirmButton = createButton(doc, 'Attach', { icon: 'hierarchy' });
|
|
152
|
+
confirmButton.dataset.editorHierarchyAttachConfirm = 'true';
|
|
153
|
+
footer.appendChild(cancelButton);
|
|
154
|
+
footer.appendChild(confirmButton);
|
|
155
|
+
dialog.appendChild(header);
|
|
156
|
+
dialog.appendChild(summary);
|
|
157
|
+
dialog.appendChild(search);
|
|
158
|
+
dialog.appendChild(list);
|
|
159
|
+
dialog.appendChild(selectedSummary);
|
|
160
|
+
dialog.appendChild(feedback);
|
|
161
|
+
dialog.appendChild(footer);
|
|
162
|
+
root.appendChild(dialog);
|
|
163
|
+
doc.body.appendChild(root);
|
|
164
|
+
let openInput = null;
|
|
165
|
+
let query = '';
|
|
166
|
+
let selectedTargetKey = null;
|
|
167
|
+
let selectedTarget = null;
|
|
168
|
+
const close = () => {
|
|
169
|
+
if (!openInput)
|
|
170
|
+
return;
|
|
171
|
+
openInput = null;
|
|
172
|
+
query = '';
|
|
173
|
+
selectedTargetKey = null;
|
|
174
|
+
selectedTarget = null;
|
|
175
|
+
root.style.display = 'none';
|
|
176
|
+
search.value = '';
|
|
177
|
+
clearElement(list);
|
|
178
|
+
options.onOpenChange?.(false);
|
|
179
|
+
};
|
|
180
|
+
const render = () => {
|
|
181
|
+
if (!openInput) {
|
|
182
|
+
root.style.display = 'none';
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
const targets = resolveLocalEditorHierarchyAttachTargets({
|
|
186
|
+
model: openInput.model,
|
|
187
|
+
targetIds: openInput.targetIds,
|
|
188
|
+
query,
|
|
189
|
+
selectedTargetKey,
|
|
190
|
+
});
|
|
191
|
+
const validSelection = targets.find(target => target.key === selectedTargetKey && target.valid) ?? null;
|
|
192
|
+
selectedTarget = validSelection;
|
|
193
|
+
if (!validSelection)
|
|
194
|
+
selectedTargetKey = null;
|
|
195
|
+
summary.textContent = `${openInput.targetIds.length} selected node${openInput.targetIds.length === 1 ? '' : 's'} will keep world transform.`;
|
|
196
|
+
search.value = query;
|
|
197
|
+
renderTargetList(targets);
|
|
198
|
+
renderSelectedSummary();
|
|
199
|
+
root.style.display = 'flex';
|
|
200
|
+
syncConfirmButton();
|
|
201
|
+
};
|
|
202
|
+
const clearFeedback = () => {
|
|
203
|
+
feedback.textContent = '';
|
|
204
|
+
feedback.style.display = 'none';
|
|
205
|
+
};
|
|
206
|
+
const showFeedback = (message) => {
|
|
207
|
+
feedback.textContent = message;
|
|
208
|
+
feedback.style.display = 'block';
|
|
209
|
+
};
|
|
210
|
+
const renderTargetList = (targets) => {
|
|
211
|
+
clearElement(list);
|
|
212
|
+
const rootTarget = targets[0] ?? null;
|
|
213
|
+
if (rootTarget)
|
|
214
|
+
list.appendChild(createTargetButton(rootTarget));
|
|
215
|
+
const nodeTargets = targets.slice(1);
|
|
216
|
+
if (nodeTargets.length === 0) {
|
|
217
|
+
const empty = doc.createElement('div');
|
|
218
|
+
empty.textContent = query.trim() ? 'No matching GameObjects.' : 'No hierarchy nodes.';
|
|
219
|
+
empty.style.cssText = 'padding:8px;color:var(--fps-editor-muted);font-size:11px;font-weight:800';
|
|
220
|
+
list.appendChild(empty);
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
for (const target of nodeTargets)
|
|
224
|
+
list.appendChild(createTargetButton(target));
|
|
225
|
+
};
|
|
226
|
+
const renderSelectedSummary = () => {
|
|
227
|
+
if (!selectedTarget) {
|
|
228
|
+
selectedSummary.textContent = 'Select a target, then confirm Attach.';
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
const movingCount = selectedTarget.resolution.draggedIds.length;
|
|
232
|
+
selectedSummary.textContent = `Target: ${selectedTarget.label} · ${movingCount} node${movingCount === 1 ? '' : 's'} will move`;
|
|
233
|
+
};
|
|
234
|
+
const syncConfirmButton = () => {
|
|
235
|
+
confirmButton.disabled = !selectedTarget;
|
|
236
|
+
confirmButton.title = selectedTarget ? `Attach to ${selectedTarget.label}` : 'Select a valid target first.';
|
|
237
|
+
confirmButton.style.opacity = selectedTarget ? '1' : '0.55';
|
|
238
|
+
confirmButton.style.cursor = selectedTarget ? 'pointer' : 'not-allowed';
|
|
239
|
+
};
|
|
240
|
+
const createTargetButton = (target) => {
|
|
241
|
+
const button = doc.createElement('button');
|
|
242
|
+
button.type = 'button';
|
|
243
|
+
button.dataset.editorHierarchyAttachTarget = target.key;
|
|
244
|
+
button.disabled = !target.valid;
|
|
245
|
+
if (target.disabledReason)
|
|
246
|
+
button.title = target.disabledReason;
|
|
247
|
+
button.style.cssText = [
|
|
248
|
+
'width:100%',
|
|
249
|
+
'min-height:28px',
|
|
250
|
+
'display:flex',
|
|
251
|
+
'align-items:center',
|
|
252
|
+
'gap:6px',
|
|
253
|
+
`padding:4px 8px 4px ${8 + Math.max(0, target.depth) * 14}px`,
|
|
254
|
+
`border:1px solid ${target.selected ? 'var(--fps-editor-accent-strong)' : 'transparent'}`,
|
|
255
|
+
'border-radius:2px',
|
|
256
|
+
`background:${target.selected ? 'var(--fps-editor-row-active)' : 'transparent'}`,
|
|
257
|
+
`color:${target.valid ? target.selected ? 'var(--fps-editor-row-selected-text)' : 'var(--fps-editor-text)' : 'var(--fps-editor-muted)'}`,
|
|
258
|
+
'font-size:12px',
|
|
259
|
+
'font-weight:800',
|
|
260
|
+
'text-align:left',
|
|
261
|
+
`cursor:${target.valid ? 'pointer' : 'not-allowed'}`,
|
|
262
|
+
`opacity:${target.valid ? '1' : '0.55'}`,
|
|
263
|
+
].join(';');
|
|
264
|
+
button.appendChild(createTargetIcon(target));
|
|
265
|
+
const label = doc.createElement('span');
|
|
266
|
+
label.textContent = target.label;
|
|
267
|
+
label.style.cssText = 'min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap';
|
|
268
|
+
button.appendChild(label);
|
|
269
|
+
if (target.disabledReason) {
|
|
270
|
+
const reason = doc.createElement('span');
|
|
271
|
+
reason.textContent = target.disabledReason;
|
|
272
|
+
reason.style.cssText = 'max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--fps-editor-muted);font-size:10px;font-weight:800';
|
|
273
|
+
button.appendChild(reason);
|
|
274
|
+
}
|
|
275
|
+
return button;
|
|
276
|
+
};
|
|
277
|
+
const createTargetIcon = (target) => {
|
|
278
|
+
const rawIcon = target.node?.item.icon;
|
|
279
|
+
const iconName = target.role === 'scene-root'
|
|
280
|
+
? 'root'
|
|
281
|
+
: isLocalEditorIconName(rawIcon)
|
|
282
|
+
? rawIcon
|
|
283
|
+
: ATTACH_ROLE_ICONS[target.role];
|
|
284
|
+
const icon = doc.createElement('span');
|
|
285
|
+
icon.style.cssText = [
|
|
286
|
+
'width:16px',
|
|
287
|
+
'height:16px',
|
|
288
|
+
'flex:0 0 16px',
|
|
289
|
+
'display:inline-flex',
|
|
290
|
+
'align-items:center',
|
|
291
|
+
'justify-content:center',
|
|
292
|
+
'color:var(--fps-editor-muted-strong)',
|
|
293
|
+
].join(';');
|
|
294
|
+
icon.appendChild(createLocalEditorIcon(doc, iconName, { size: 13, strokeWidth: 2.3 }));
|
|
295
|
+
return icon;
|
|
296
|
+
};
|
|
297
|
+
const getSelectionForConfirm = () => {
|
|
298
|
+
if (!selectedTarget)
|
|
299
|
+
return null;
|
|
300
|
+
return {
|
|
301
|
+
targetId: selectedTarget.targetId,
|
|
302
|
+
placement: selectedTarget.targetId === null ? 'root' : 'inside',
|
|
303
|
+
label: selectedTarget.label,
|
|
304
|
+
resolution: selectedTarget.resolution,
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
const normalizeConfirmResult = (result) => {
|
|
308
|
+
if (typeof result === 'boolean')
|
|
309
|
+
return { ok: result };
|
|
310
|
+
if (typeof result === 'string')
|
|
311
|
+
return { ok: false, reason: result };
|
|
312
|
+
if (result && typeof result === 'object')
|
|
313
|
+
return result;
|
|
314
|
+
return { ok: true };
|
|
315
|
+
};
|
|
316
|
+
const onClick = (event) => {
|
|
317
|
+
const target = event.target instanceof Element ? event.target : null;
|
|
318
|
+
if (!target)
|
|
319
|
+
return;
|
|
320
|
+
if (target.closest('[data-editor-hierarchy-attach-cancel]') || target === root) {
|
|
321
|
+
event.preventDefault();
|
|
322
|
+
close();
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
const targetButton = target.closest('[data-editor-hierarchy-attach-target]');
|
|
326
|
+
if (targetButton) {
|
|
327
|
+
event.preventDefault();
|
|
328
|
+
if (targetButton.disabled)
|
|
329
|
+
return;
|
|
330
|
+
selectedTargetKey = targetButton.dataset.editorHierarchyAttachTarget ?? null;
|
|
331
|
+
clearFeedback();
|
|
332
|
+
render();
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
if (target.closest('[data-editor-hierarchy-attach-confirm]')) {
|
|
336
|
+
event.preventDefault();
|
|
337
|
+
const selection = getSelectionForConfirm();
|
|
338
|
+
if (!selection)
|
|
339
|
+
return;
|
|
340
|
+
const result = normalizeConfirmResult(options.onConfirm?.(selection));
|
|
341
|
+
if (!result.ok) {
|
|
342
|
+
showFeedback(`Move rejected: ${result.reason ?? 'Attach target cannot preserve world transform.'}`);
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
close();
|
|
346
|
+
}
|
|
347
|
+
};
|
|
348
|
+
const onInput = (event) => {
|
|
349
|
+
const input = event.target instanceof HTMLInputElement ? event.target : null;
|
|
350
|
+
if (input?.dataset.editorHierarchyAttachSearch == null)
|
|
351
|
+
return;
|
|
352
|
+
query = input.value;
|
|
353
|
+
clearFeedback();
|
|
354
|
+
render();
|
|
355
|
+
};
|
|
356
|
+
const onKeyDown = (event) => {
|
|
357
|
+
if (!openInput || event.key !== 'Escape')
|
|
358
|
+
return;
|
|
359
|
+
event.preventDefault();
|
|
360
|
+
event.stopPropagation();
|
|
361
|
+
close();
|
|
362
|
+
};
|
|
363
|
+
root.addEventListener('click', onClick);
|
|
364
|
+
root.addEventListener('input', onInput);
|
|
365
|
+
doc.addEventListener('keydown', onKeyDown, { capture: true });
|
|
366
|
+
return {
|
|
367
|
+
isOpen() {
|
|
368
|
+
return !!openInput;
|
|
369
|
+
},
|
|
370
|
+
open(input) {
|
|
371
|
+
openInput = {
|
|
372
|
+
model: input.model,
|
|
373
|
+
targetIds: input.model.getTopLevelSelection(input.targetIds),
|
|
374
|
+
activeId: input.activeId,
|
|
375
|
+
};
|
|
376
|
+
query = '';
|
|
377
|
+
selectedTargetKey = null;
|
|
378
|
+
selectedTarget = null;
|
|
379
|
+
clearFeedback();
|
|
380
|
+
applyLocalEditorTheme(root, options.getTheme?.());
|
|
381
|
+
options.onOpenChange?.(true);
|
|
382
|
+
render();
|
|
383
|
+
setTimeout(() => {
|
|
384
|
+
search.focus({ preventScroll: true });
|
|
385
|
+
search.select();
|
|
386
|
+
}, 0);
|
|
387
|
+
},
|
|
388
|
+
close,
|
|
389
|
+
setTheme(theme) {
|
|
390
|
+
applyLocalEditorTheme(root, theme);
|
|
391
|
+
},
|
|
392
|
+
dispose() {
|
|
393
|
+
close();
|
|
394
|
+
root.removeEventListener('click', onClick);
|
|
395
|
+
root.removeEventListener('input', onInput);
|
|
396
|
+
doc.removeEventListener('keydown', onKeyDown, { capture: true });
|
|
397
|
+
root.remove();
|
|
398
|
+
},
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
function resolveAttachTargetDrop(model, sourceIds, targetId) {
|
|
402
|
+
const resolution = model.resolveDrop({
|
|
403
|
+
draggedIds: sourceIds,
|
|
404
|
+
targetId,
|
|
405
|
+
placement: 'inside',
|
|
406
|
+
});
|
|
407
|
+
if (resolution.ok || !sourceIds.includes(targetId))
|
|
408
|
+
return resolution;
|
|
409
|
+
const remainingSourceIds = sourceIds.filter(id => id !== targetId);
|
|
410
|
+
if (remainingSourceIds.length === 0)
|
|
411
|
+
return resolution;
|
|
412
|
+
return model.resolveDrop({
|
|
413
|
+
draggedIds: remainingSourceIds,
|
|
414
|
+
targetId,
|
|
415
|
+
placement: 'inside',
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
function formatAttachDisabledReason(reason) {
|
|
419
|
+
if (!reason)
|
|
420
|
+
return undefined;
|
|
421
|
+
if (reason === 'empty-drag')
|
|
422
|
+
return 'Select one or more movable nodes first.';
|
|
423
|
+
if (reason === 'dragged-node-protected')
|
|
424
|
+
return 'Protected nodes cannot be attached.';
|
|
425
|
+
if (reason === 'missing-target')
|
|
426
|
+
return 'Target no longer exists.';
|
|
427
|
+
if (reason === 'cannot-drop-on-self')
|
|
428
|
+
return 'Cannot attach to itself.';
|
|
429
|
+
if (reason === 'cannot-drop-on-descendant')
|
|
430
|
+
return 'Cannot attach to selected descendants.';
|
|
431
|
+
if (reason === 'target-cannot-have-children')
|
|
432
|
+
return 'This node cannot contain children.';
|
|
433
|
+
if (reason === 'cannot-reorder-root')
|
|
434
|
+
return 'Root nodes cannot be reordered.';
|
|
435
|
+
if (reason === 'target-node-locked')
|
|
436
|
+
return 'Locked nodes cannot be used as targets.';
|
|
437
|
+
if (reason === 'target-parent-locked')
|
|
438
|
+
return 'The target parent is locked.';
|
|
439
|
+
return reason;
|
|
440
|
+
}
|
|
441
|
+
function clearElement(element) {
|
|
442
|
+
while (element.firstChild)
|
|
443
|
+
element.firstChild.remove();
|
|
444
|
+
}
|
|
445
|
+
//# sourceMappingURL=local-editor-ui-hierarchy-attach-dialog.js.map
|
package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-attach-dialog.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-editor-ui-hierarchy-attach-dialog.js","sourceRoot":"","sources":["../src/local-editor-ui-hierarchy-attach-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EACL,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,qBAAqB,EACrB,qBAAqB,GAEtB,MA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y-controller.d.ts","sourceRoot":"","sources":["../src/local-editor-ui-hierarchy-controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"local-editor-ui-hierarchy-controller.d.ts","sourceRoot":"","sources":["../src/local-editor-ui-hierarchy-controller.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AACtF,OAAO,KAAK,EAIV,oDAAoD,EACpD,6BAA6B,EAC7B,yBAAyB,EAE1B,MAAM,yBAAyB,CAAC;AAIjC,MAAM,WAAW,8BAA8B,CAAC,SAAS,GAAG,OAAO;IACjE,MAAM,CAAC,KAAK,EAAE,yBAAyB,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;IAC1D,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC;IAClD,oBAAoB,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC;IACpD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,qCAAqC,CAAC,SAAS,GAAG,OAAO;IACxE,GAAG,EAAE,QAAQ,CAAC;IACd,KAAK,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,6BAA6B,CAAC;IACzC,WAAW,EAAE,+BAA+B,CAAC;IAC7C,WAAW,EAAE,gCAAgC,CAAC;IAC9C,QAAQ,EAAE,MAAM,yBAAyB,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;IAC5D,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,cAAc,CAAC,EAAE,SAAS,oDAAoD,CAAC,SAAS,CAAC,EAAE,CAAC;CAC7F;AAED,wBAAgB,oCAAoC,CAAC,SAAS,GAAG,OAAO,EACtE,OAAO,EAAE,qCAAqC,CAAC,SAAS,CAAC,GACxD,8BAA8B,CAAC,SAAS,CAAC,CAq8B3C"}
|
|
@@ -5,6 +5,7 @@ import { resolveLocalEditorHierarchyAutoScroll, } from './local-editor-ui-hierar
|
|
|
5
5
|
import { clearLocalEditorStructuredDragSession, createLocalEditorStructuredDragSession, hasLocalEditorStructuredDragSessionFeedback, } from './local-editor-ui-structured-drag-session.js';
|
|
6
6
|
import { renderLocalEditorHierarchyPanel, syncLocalEditorHierarchyDropPreview, } from './local-editor-ui-hierarchy-view.js';
|
|
7
7
|
import { createLocalEditorViewportRevealController, } from './local-editor-ui-dock-panel.js';
|
|
8
|
+
import { createLocalEditorHierarchyAttachDialog, } from './local-editor-ui-hierarchy-attach-dialog.js';
|
|
8
9
|
const HIERARCHY_DRAG_INDENT_WIDTH = 16;
|
|
9
10
|
export function createLocalEditorHierarchyController(options) {
|
|
10
11
|
const { doc, panel, callbacks, inputRouter, contextMenu, getState, requestRender } = options;
|
|
@@ -22,6 +23,12 @@ export function createLocalEditorHierarchyController(options) {
|
|
|
22
23
|
let lastRenderedActiveId;
|
|
23
24
|
let pendingHierarchyScrollId = null;
|
|
24
25
|
let hierarchySelectionAnchorId = null;
|
|
26
|
+
const attachDialog = createLocalEditorHierarchyAttachDialog({
|
|
27
|
+
doc,
|
|
28
|
+
getTheme: resolveActiveTheme,
|
|
29
|
+
onOpenChange: open => inputRouter.setModalOpen(open, 'hierarchy-attach'),
|
|
30
|
+
onConfirm: selection => submitAttachSelection(selection),
|
|
31
|
+
});
|
|
25
32
|
const treeViewportReveal = createLocalEditorViewportRevealController({
|
|
26
33
|
getViewport: findHierarchyTreeViewport,
|
|
27
34
|
margin: 4,
|
|
@@ -355,6 +362,7 @@ export function createLocalEditorHierarchyController(options) {
|
|
|
355
362
|
panel.removeEventListener('drop', onDrop);
|
|
356
363
|
doc.removeEventListener('pointerdown', onDocumentPointerDown, { capture: true });
|
|
357
364
|
doc.removeEventListener('focusin', onDocumentFocusIn, { capture: true });
|
|
365
|
+
attachDialog.dispose();
|
|
358
366
|
},
|
|
359
367
|
};
|
|
360
368
|
function handleDeleteShortcut(event) {
|
|
@@ -730,6 +738,7 @@ export function createLocalEditorHierarchyController(options) {
|
|
|
730
738
|
clipboardIds: hierarchyClipboard?.ids ?? null,
|
|
731
739
|
clipboardActiveId: hierarchyClipboard?.activeId ?? null,
|
|
732
740
|
hasDuplicateHandler: hasDuplicateHandler(),
|
|
741
|
+
hasMoveHandler: typeof callbacks.onSceneGraphMove === 'function',
|
|
733
742
|
hasGroupSelectionHandler: typeof callbacks.onSceneGraphGroupSelection === 'function',
|
|
734
743
|
contextActions: options.contextActions,
|
|
735
744
|
})
|
|
@@ -739,6 +748,7 @@ export function createLocalEditorHierarchyController(options) {
|
|
|
739
748
|
clipboardIds: hierarchyClipboard?.ids ?? null,
|
|
740
749
|
clipboardActiveId: hierarchyClipboard?.activeId ?? null,
|
|
741
750
|
hasDuplicateHandler: hasDuplicateHandler(),
|
|
751
|
+
hasMoveHandler: typeof callbacks.onSceneGraphMove === 'function',
|
|
742
752
|
hasGroupSelectionHandler: typeof callbacks.onSceneGraphGroupSelection === 'function',
|
|
743
753
|
contextActions: options.contextActions,
|
|
744
754
|
});
|
|
@@ -773,6 +783,10 @@ export function createLocalEditorHierarchyController(options) {
|
|
|
773
783
|
callbacks.onSceneGraphGroupSelection?.(action.intent);
|
|
774
784
|
return;
|
|
775
785
|
}
|
|
786
|
+
if (action.kind === 'open-attach-picker') {
|
|
787
|
+
openAttachPicker(action.targetIds, action.activeId);
|
|
788
|
+
return;
|
|
789
|
+
}
|
|
776
790
|
if (action.kind === 'selection-command') {
|
|
777
791
|
submitSelectionCommand(action.command);
|
|
778
792
|
return;
|
|
@@ -782,6 +796,58 @@ export function createLocalEditorHierarchyController(options) {
|
|
|
782
796
|
function submitSelectionCommand(command) {
|
|
783
797
|
callbacks.onSelectionCommand?.(command);
|
|
784
798
|
}
|
|
799
|
+
function openAttachPicker(targetIds, activeId) {
|
|
800
|
+
const state = getState();
|
|
801
|
+
if (!state || state.mode !== 'editor' || state.busy || targetIds.length === 0)
|
|
802
|
+
return;
|
|
803
|
+
attachDialog.open({
|
|
804
|
+
model: getModel(state),
|
|
805
|
+
targetIds,
|
|
806
|
+
activeId,
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
function submitAttachSelection(selection) {
|
|
810
|
+
const state = getState();
|
|
811
|
+
if (!state || state.mode !== 'editor' || state.busy)
|
|
812
|
+
return { ok: false, reason: 'Editor is not ready.' };
|
|
813
|
+
const ids = selection.resolution.draggedIds;
|
|
814
|
+
if (ids.length === 0)
|
|
815
|
+
return { ok: false, reason: 'Select one or more movable nodes first.' };
|
|
816
|
+
if (!callbacks.onSceneGraphMove)
|
|
817
|
+
return { ok: false, reason: 'Hierarchy move pipeline is not connected yet.' };
|
|
818
|
+
if (selection.placement === 'root') {
|
|
819
|
+
const result = normalizeAttachSceneGraphMoveResult(callbacks.onSceneGraphMove({
|
|
820
|
+
ids,
|
|
821
|
+
placement: 'root',
|
|
822
|
+
preserveWorldTransform: true,
|
|
823
|
+
}));
|
|
824
|
+
requestRender();
|
|
825
|
+
return result;
|
|
826
|
+
}
|
|
827
|
+
if (!selection.targetId)
|
|
828
|
+
return { ok: false, reason: 'Select a valid target first.' };
|
|
829
|
+
expandNode(selection.targetId);
|
|
830
|
+
const result = normalizeAttachSceneGraphMoveResult(callbacks.onSceneGraphMove({
|
|
831
|
+
ids,
|
|
832
|
+
targetId: selection.targetId,
|
|
833
|
+
placement: 'inside',
|
|
834
|
+
parentId: selection.resolution.parentId,
|
|
835
|
+
beforeId: selection.resolution.beforeId,
|
|
836
|
+
afterId: selection.resolution.afterId,
|
|
837
|
+
preserveWorldTransform: true,
|
|
838
|
+
}));
|
|
839
|
+
requestRender();
|
|
840
|
+
return result;
|
|
841
|
+
}
|
|
842
|
+
function normalizeAttachSceneGraphMoveResult(result) {
|
|
843
|
+
if (typeof result === 'boolean')
|
|
844
|
+
return { ok: result };
|
|
845
|
+
if (typeof result === 'string')
|
|
846
|
+
return { ok: false, reason: result };
|
|
847
|
+
if (result && typeof result === 'object')
|
|
848
|
+
return result;
|
|
849
|
+
return { ok: true };
|
|
850
|
+
}
|
|
785
851
|
function shouldClearSelectionFromBlankClick(event, target) {
|
|
786
852
|
if (event.button !== 0 || event.shiftKey || event.metaKey || event.ctrlKey || event.altKey)
|
|
787
853
|
return false;
|
|
@@ -860,6 +926,11 @@ export function createLocalEditorHierarchyController(options) {
|
|
|
860
926
|
function hasDuplicateHandler() {
|
|
861
927
|
return typeof callbacks.onSceneGraphDuplicate === 'function';
|
|
862
928
|
}
|
|
929
|
+
function resolveActiveTheme() {
|
|
930
|
+
const themed = panel.closest('.fps-editor-workbench[data-fps-editor-theme]');
|
|
931
|
+
const theme = themed?.dataset.fpsEditorTheme;
|
|
932
|
+
return theme === 'light' || theme === 'dark' ? theme : undefined;
|
|
933
|
+
}
|
|
863
934
|
function beginHierarchyRename(id) {
|
|
864
935
|
const state = getState();
|
|
865
936
|
const model = state ? getModel(state) : null;
|