@floegence/floe-webapp-core 0.36.32 → 0.36.34
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/components/editor/CodeEditor.d.ts +10 -5
- package/dist/components/editor/CodeEditor.js +53 -54
- package/dist/components/editor/monacoStandaloneRuntime.d.ts +3 -1
- package/dist/components/editor/monacoStandaloneRuntime.js +60 -32
- package/dist/components/workbench/WorkbenchSurface.d.ts +10 -1
- package/dist/components/workbench/WorkbenchSurface.js +155 -135
- package/dist/components/workbench/index.d.ts +1 -1
- package/dist/components/workbench/useWorkbenchModel.js +6 -6
- package/package.json +1 -1
|
@@ -1,25 +1,30 @@
|
|
|
1
1
|
import { type JSX } from 'solid-js';
|
|
2
|
-
import * as
|
|
2
|
+
import type * as Monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
|
|
3
3
|
import 'monaco-editor/min/vs/editor/editor.main.css';
|
|
4
4
|
import { type CodeEditorRuntimeOptions } from './monacoStandaloneRuntime';
|
|
5
|
+
type MonacoEditorOptions = Monaco.editor.IStandaloneEditorConstructionOptions;
|
|
6
|
+
type MonacoStandaloneCodeEditor = Monaco.editor.IStandaloneCodeEditor;
|
|
7
|
+
type MonacoTextModel = Monaco.editor.ITextModel;
|
|
8
|
+
type MonacoModelContentChangedEvent = Monaco.editor.IModelContentChangedEvent;
|
|
5
9
|
export interface CodeEditorProps {
|
|
6
10
|
path: string;
|
|
7
11
|
language?: string;
|
|
8
12
|
value: string;
|
|
9
|
-
options?:
|
|
13
|
+
options?: MonacoEditorOptions;
|
|
10
14
|
runtimeOptions?: CodeEditorRuntimeOptions;
|
|
11
15
|
class?: string;
|
|
12
16
|
style?: JSX.CSSProperties;
|
|
13
17
|
onReady?: (api: CodeEditorApi) => void;
|
|
14
|
-
onContentChange?: (e:
|
|
18
|
+
onContentChange?: (e: MonacoModelContentChangedEvent, api: CodeEditorApi) => void;
|
|
15
19
|
onSelectionChange?: (selectionText: string, api: CodeEditorApi) => void;
|
|
16
20
|
onChange?: (value: string) => void;
|
|
17
21
|
}
|
|
18
22
|
export interface CodeEditorApi {
|
|
19
|
-
editor:
|
|
20
|
-
model:
|
|
23
|
+
editor: MonacoStandaloneCodeEditor;
|
|
24
|
+
model: MonacoTextModel;
|
|
21
25
|
getValue: () => string;
|
|
22
26
|
getSelectedText: () => string;
|
|
23
27
|
focus: () => void;
|
|
24
28
|
}
|
|
25
29
|
export declare function CodeEditor(props: CodeEditorProps): JSX.Element;
|
|
30
|
+
export {};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { use as L, effect as O, className as
|
|
2
|
-
import { onMount as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import { useResizeObserver as
|
|
5
|
-
import * as f from "monaco-editor/esm/vs/editor/editor.api.js";
|
|
1
|
+
import { use as L, effect as O, className as A, style as D, template as F } from "solid-js/web";
|
|
2
|
+
import { onMount as V, onCleanup as b, createEffect as g } from "solid-js";
|
|
3
|
+
import { useTheme as q } from "../../context/ThemeContext.js";
|
|
4
|
+
import { useResizeObserver as w } from "../../hooks/useResizeObserver.js";
|
|
6
5
|
import "monaco-editor/min/vs/editor/editor.main.css";
|
|
7
6
|
import { resolveCodeEditorLanguageSpec as U } from "./languages.js";
|
|
8
7
|
import { ensureMonacoEnvironment as p } from "./monacoEnvironment.js";
|
|
9
|
-
import {
|
|
10
|
-
var _ = /* @__PURE__ */
|
|
11
|
-
const
|
|
8
|
+
import { loadMonacoEditorApi as N } from "./monacoStandaloneRuntime.js";
|
|
9
|
+
var _ = /* @__PURE__ */ F("<div>");
|
|
10
|
+
const T = {
|
|
12
11
|
readOnly: !0,
|
|
13
12
|
automaticLayout: !1,
|
|
14
13
|
minimap: {
|
|
@@ -21,21 +20,21 @@ const E = {
|
|
|
21
20
|
fontFamily: "var(--font-mono)"
|
|
22
21
|
};
|
|
23
22
|
let $ = 0;
|
|
24
|
-
function k(t,
|
|
25
|
-
return
|
|
23
|
+
function k(t, d, a) {
|
|
24
|
+
return t.Uri.parse(`inmemory://model/${d}/${encodeURIComponent(a)}`);
|
|
26
25
|
}
|
|
27
|
-
function B(t,
|
|
28
|
-
if (!t || !
|
|
29
|
-
const
|
|
30
|
-
return !
|
|
26
|
+
function B(t, d) {
|
|
27
|
+
if (!t || !d) return "";
|
|
28
|
+
const a = t.getSelection();
|
|
29
|
+
return !a || a.isEmpty() ? "" : d.getValueInRange(a);
|
|
31
30
|
}
|
|
32
31
|
function X(t) {
|
|
33
|
-
const
|
|
34
|
-
let
|
|
35
|
-
const
|
|
36
|
-
let n, o,
|
|
37
|
-
const
|
|
38
|
-
|
|
32
|
+
const d = q();
|
|
33
|
+
let a;
|
|
34
|
+
const x = ++$;
|
|
35
|
+
let l, n, o, s, y = null, v = 0;
|
|
36
|
+
const R = w(() => a), S = () => {
|
|
37
|
+
l && l.editor.setTheme(d.resolvedTheme() === "dark" ? "vs-dark" : "vs");
|
|
39
38
|
}, m = () => !n || !o ? null : {
|
|
40
39
|
editor: n,
|
|
41
40
|
model: o,
|
|
@@ -45,73 +44,73 @@ function X(t) {
|
|
|
45
44
|
}, C = () => {
|
|
46
45
|
const e = m();
|
|
47
46
|
if (!e) return;
|
|
48
|
-
const
|
|
49
|
-
|
|
47
|
+
const r = e.model.uri.toString();
|
|
48
|
+
r !== y && (y = r, t.onReady?.(e));
|
|
50
49
|
}, M = () => {
|
|
51
50
|
const e = m();
|
|
52
51
|
e && t.onSelectionChange?.(e.getSelectedText(), e);
|
|
53
|
-
},
|
|
54
|
-
if (!n) return;
|
|
55
|
-
const e = ++v,
|
|
56
|
-
let i =
|
|
52
|
+
}, E = async () => {
|
|
53
|
+
if (!n || !l) return;
|
|
54
|
+
const e = ++v, r = U(t.language);
|
|
55
|
+
let i = r.id;
|
|
57
56
|
try {
|
|
58
|
-
await
|
|
57
|
+
await r.load?.();
|
|
59
58
|
} catch {
|
|
60
59
|
if (e !== v) return;
|
|
61
60
|
i = "plaintext";
|
|
62
61
|
}
|
|
63
62
|
if (!n || e !== v) return;
|
|
64
|
-
const u = k(
|
|
63
|
+
const u = k(l, x, t.path);
|
|
65
64
|
if (o && o.uri.toString() === u.toString()) {
|
|
66
|
-
o.getLanguageId() !== i &&
|
|
65
|
+
o.getLanguageId() !== i && l.editor.setModelLanguage(o, i), o.getValue() !== t.value && o.setValue(t.value), C(), M();
|
|
67
66
|
return;
|
|
68
67
|
}
|
|
69
|
-
const
|
|
70
|
-
o?.dispose(), o =
|
|
68
|
+
const c = l.editor.createModel(t.value, i, u);
|
|
69
|
+
o?.dispose(), o = c, n.setModel(o), C(), M();
|
|
71
70
|
};
|
|
72
|
-
return
|
|
73
|
-
let e = !1,
|
|
71
|
+
return V(() => {
|
|
72
|
+
let e = !1, r, i;
|
|
74
73
|
(async () => {
|
|
75
|
-
if (!
|
|
74
|
+
if (!a || (p(), l = await N(t.runtimeOptions), e || !a) || (n = l.editor.create(a, {
|
|
76
75
|
model: null,
|
|
77
|
-
...
|
|
76
|
+
...T,
|
|
78
77
|
...t.options ?? {}
|
|
79
|
-
}),
|
|
80
|
-
const
|
|
81
|
-
|
|
78
|
+
}), S(), await E(), e || !n)) return;
|
|
79
|
+
const c = t.onContentChange, I = t.onChange, z = t.onSelectionChange;
|
|
80
|
+
r = n.onDidChangeModelContent((f) => {
|
|
82
81
|
const h = m();
|
|
83
|
-
h && (
|
|
82
|
+
h && (c?.(f, h), I && I(h.getValue()));
|
|
84
83
|
}), i = n.onDidChangeCursorSelection(() => {
|
|
85
|
-
const
|
|
86
|
-
|
|
84
|
+
const f = m();
|
|
85
|
+
f && z?.(f.getSelectedText(), f);
|
|
87
86
|
});
|
|
88
|
-
})().catch((
|
|
89
|
-
console.error("Failed to initialize Monaco editor runtime",
|
|
90
|
-
}),
|
|
91
|
-
e = !0,
|
|
87
|
+
})().catch((c) => {
|
|
88
|
+
console.error("Failed to initialize Monaco editor runtime", c);
|
|
89
|
+
}), b(() => {
|
|
90
|
+
e = !0, r?.dispose(), i?.dispose(), s && cancelAnimationFrame(s), n?.dispose(), o?.dispose(), l = void 0, n = void 0, o = void 0;
|
|
92
91
|
});
|
|
93
92
|
}), g(() => {
|
|
94
|
-
|
|
93
|
+
S();
|
|
95
94
|
}), g(() => {
|
|
96
95
|
n && n.updateOptions({
|
|
97
|
-
...
|
|
96
|
+
...T,
|
|
98
97
|
...t.options ?? {}
|
|
99
98
|
});
|
|
100
99
|
}), g(() => {
|
|
101
|
-
t.path, t.language, t.value,
|
|
100
|
+
t.path, t.language, t.value, E();
|
|
102
101
|
}), g(() => {
|
|
103
|
-
const e =
|
|
104
|
-
!e || !n || (
|
|
102
|
+
const e = R();
|
|
103
|
+
!e || !n || (s && cancelAnimationFrame(s), s = requestAnimationFrame(() => {
|
|
105
104
|
n?.layout({
|
|
106
105
|
width: e.width,
|
|
107
106
|
height: e.height
|
|
108
107
|
});
|
|
109
108
|
}));
|
|
110
109
|
}), (() => {
|
|
111
|
-
var e = _(),
|
|
112
|
-
return typeof
|
|
113
|
-
var u = t.class,
|
|
114
|
-
return u !== i.e &&
|
|
110
|
+
var e = _(), r = a;
|
|
111
|
+
return typeof r == "function" ? L(r, e) : a = e, O((i) => {
|
|
112
|
+
var u = t.class, c = t.style;
|
|
113
|
+
return u !== i.e && A(e, i.e = u), i.t = D(e, c, i.t), i;
|
|
115
114
|
}, {
|
|
116
115
|
e: void 0,
|
|
117
116
|
t: void 0
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
type MonacoEditorApi = typeof import('monaco-editor/esm/vs/editor/editor.api.js');
|
|
1
2
|
export interface MonacoRuntimeFeatureSet {
|
|
2
3
|
suggestMemory: boolean;
|
|
3
4
|
codeLensCache: boolean;
|
|
@@ -25,11 +26,12 @@ export interface ResolvedMonacoRuntimeRequest {
|
|
|
25
26
|
cacheKey: string;
|
|
26
27
|
blueprint: MonacoStandaloneRuntimeBlueprint;
|
|
27
28
|
}
|
|
28
|
-
type MonacoStandaloneRuntimeLoader = (request: ResolvedMonacoRuntimeRequest) => Promise<
|
|
29
|
+
type MonacoStandaloneRuntimeLoader = (request: ResolvedMonacoRuntimeRequest) => Promise<void>;
|
|
29
30
|
export declare function normalizeMonacoRuntimeFeatureSet(standaloneFeatures?: Partial<MonacoRuntimeFeatureSet>): MonacoRuntimeFeatureSet;
|
|
30
31
|
export declare const MONACO_RUNTIME_BLUEPRINTS: Record<MonacoRuntimeProfileName, MonacoStandaloneRuntimeBlueprint>;
|
|
31
32
|
export declare function resolveMonacoRuntimeProfile(options?: CodeEditorRuntimeOptions): MonacoRuntimeProfileName;
|
|
32
33
|
export declare function resolveMonacoRuntimeRequest(options?: CodeEditorRuntimeOptions): ResolvedMonacoRuntimeRequest;
|
|
33
34
|
export declare function createMonacoStandaloneRuntime(loader: MonacoStandaloneRuntimeLoader): (options?: CodeEditorRuntimeOptions) => Promise<void>;
|
|
34
35
|
export declare const ensureMonacoStandaloneRuntime: (options?: CodeEditorRuntimeOptions) => Promise<void>;
|
|
36
|
+
export declare function loadMonacoEditorApi(options?: CodeEditorRuntimeOptions): Promise<MonacoEditorApi>;
|
|
35
37
|
export {};
|
|
@@ -1,32 +1,52 @@
|
|
|
1
|
-
const
|
|
1
|
+
const s = {
|
|
2
2
|
suggestMemory: !0,
|
|
3
3
|
codeLensCache: !0,
|
|
4
4
|
inlayHintsCache: !0,
|
|
5
5
|
treeViewsDnd: !0,
|
|
6
6
|
actionWidget: !0
|
|
7
7
|
}, a = "editor_full";
|
|
8
|
-
function
|
|
8
|
+
function d(e) {
|
|
9
9
|
return {
|
|
10
|
-
...
|
|
10
|
+
...s,
|
|
11
11
|
...e ?? {}
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const c = [
|
|
15
15
|
{
|
|
16
|
-
id: "
|
|
17
|
-
load: () => import("monaco-editor/esm/vs/editor/
|
|
16
|
+
id: "edcore.main",
|
|
17
|
+
load: () => import("monaco-editor/esm/vs/editor/edcore.main.js")
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: "suggestMemory",
|
|
21
|
+
load: () => import("monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestMemory.js")
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: "codeLensCache",
|
|
25
|
+
load: () => import("monaco-editor/esm/vs/editor/contrib/codelens/browser/codeLensCache.js")
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: "inlayHintsContribution",
|
|
29
|
+
load: () => import("monaco-editor/esm/vs/editor/contrib/inlayHints/browser/inlayHintsContribution.js")
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: "treeViewsDndService",
|
|
33
|
+
load: () => import("monaco-editor/esm/vs/editor/common/services/treeViewsDndService.js")
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: "actionWidget",
|
|
37
|
+
load: () => import("monaco-editor/esm/vs/platform/actionWidget/browser/actionWidget.js")
|
|
18
38
|
}
|
|
19
|
-
],
|
|
39
|
+
], f = c, m = c, p = {
|
|
20
40
|
editor_full: {
|
|
21
41
|
profile: "editor_full",
|
|
22
|
-
modules:
|
|
42
|
+
modules: f
|
|
23
43
|
},
|
|
24
44
|
preview_basic: {
|
|
25
45
|
profile: "preview_basic",
|
|
26
|
-
modules:
|
|
46
|
+
modules: m
|
|
27
47
|
}
|
|
28
48
|
};
|
|
29
|
-
function
|
|
49
|
+
function M(e) {
|
|
30
50
|
return e.suggestMemory === !1 && e.codeLensCache === !1 && e.inlayHintsCache === !1 && e.treeViewsDnd === !1 && e.actionWidget === !1;
|
|
31
51
|
}
|
|
32
52
|
function _(e) {
|
|
@@ -34,42 +54,50 @@ function _(e) {
|
|
|
34
54
|
return e.profile;
|
|
35
55
|
if (!e?.standaloneFeatures)
|
|
36
56
|
return a;
|
|
37
|
-
const n =
|
|
38
|
-
return
|
|
57
|
+
const n = d(e.standaloneFeatures);
|
|
58
|
+
return M(n) ? "preview_basic" : a;
|
|
39
59
|
}
|
|
40
|
-
function
|
|
60
|
+
function E(e) {
|
|
41
61
|
const n = _(e);
|
|
42
62
|
return {
|
|
43
63
|
profile: n,
|
|
44
64
|
cacheKey: `profile:${n}`,
|
|
45
|
-
blueprint:
|
|
65
|
+
blueprint: p[n]
|
|
46
66
|
};
|
|
47
67
|
}
|
|
48
|
-
function
|
|
68
|
+
function O(e) {
|
|
49
69
|
const n = /* @__PURE__ */ new Map();
|
|
50
|
-
return (
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
const r = e(
|
|
54
|
-
}).catch((
|
|
55
|
-
throw n.delete(
|
|
70
|
+
return (l) => {
|
|
71
|
+
const o = E(l), i = n.get(o.cacheKey);
|
|
72
|
+
if (i) return i;
|
|
73
|
+
const r = e(o).then(() => {
|
|
74
|
+
}).catch((u) => {
|
|
75
|
+
throw n.delete(o.cacheKey), u;
|
|
56
76
|
});
|
|
57
|
-
return n.set(
|
|
77
|
+
return n.set(o.cacheKey, r), r;
|
|
58
78
|
};
|
|
59
79
|
}
|
|
60
|
-
function
|
|
61
|
-
return Promise.all(e.blueprint.modules.map((n) => n.load()))
|
|
80
|
+
function A(e) {
|
|
81
|
+
return Promise.all(e.blueprint.modules.map((n) => n.load())).then(() => {
|
|
82
|
+
});
|
|
62
83
|
}
|
|
63
|
-
const
|
|
64
|
-
|
|
84
|
+
const h = O(
|
|
85
|
+
A
|
|
65
86
|
);
|
|
87
|
+
let t = null;
|
|
88
|
+
async function L(e) {
|
|
89
|
+
return await h(e), t || (t = import("monaco-editor/esm/vs/editor/editor.api.js").catch((n) => {
|
|
90
|
+
throw t = null, n;
|
|
91
|
+
}), t);
|
|
92
|
+
}
|
|
66
93
|
export {
|
|
67
94
|
a as DEFAULT_MONACO_RUNTIME_PROFILE,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
95
|
+
s as DEFAULT_MONACO_STANDALONE_FEATURES,
|
|
96
|
+
p as MONACO_RUNTIME_BLUEPRINTS,
|
|
97
|
+
O as createMonacoStandaloneRuntime,
|
|
98
|
+
h as ensureMonacoStandaloneRuntime,
|
|
99
|
+
L as loadMonacoEditorApi,
|
|
100
|
+
d as normalizeMonacoRuntimeFeatureSet,
|
|
73
101
|
_ as resolveMonacoRuntimeProfile,
|
|
74
|
-
|
|
102
|
+
E as resolveMonacoRuntimeRequest
|
|
75
103
|
};
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type WorkbenchContextMenuItem } from './WorkbenchContextMenu';
|
|
2
|
+
import type { WorkbenchState, WorkbenchContextMenuState, WorkbenchInteractionAdapter, WorkbenchWidgetDefinition, WorkbenchWidgetItem, WorkbenchWidgetType } from './types';
|
|
3
|
+
export type WorkbenchContextMenuItemsResolver = (context: Readonly<{
|
|
4
|
+
menu: WorkbenchContextMenuState;
|
|
5
|
+
items: readonly WorkbenchContextMenuItem[];
|
|
6
|
+
widgets: readonly WorkbenchWidgetItem[];
|
|
7
|
+
widget: WorkbenchWidgetItem | null;
|
|
8
|
+
closeMenu: () => void;
|
|
9
|
+
}>) => readonly WorkbenchContextMenuItem[];
|
|
2
10
|
export interface WorkbenchSurfaceApi {
|
|
3
11
|
ensureWidget: (type: WorkbenchWidgetType, options?: {
|
|
4
12
|
centerViewport?: boolean;
|
|
@@ -41,6 +49,7 @@ export interface WorkbenchSurfaceProps {
|
|
|
41
49
|
widgetDefinitions?: readonly WorkbenchWidgetDefinition[];
|
|
42
50
|
launcherWidgetTypes?: readonly WorkbenchWidgetType[];
|
|
43
51
|
interactionAdapter?: WorkbenchInteractionAdapter;
|
|
52
|
+
resolveContextMenuItems?: WorkbenchContextMenuItemsResolver;
|
|
44
53
|
onApiReady?: (api: WorkbenchSurfaceApi | null) => void;
|
|
45
54
|
onRequestDelete?: (widgetId: string) => void;
|
|
46
55
|
onLayoutInteractionStart?: () => void;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { use as
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import { clientToCanvasWorld as
|
|
4
|
-
import { WorkbenchCanvas as
|
|
5
|
-
import { WorkbenchContextMenu as
|
|
6
|
-
import { WorkbenchFilterBar as
|
|
7
|
-
import { WorkbenchHud as
|
|
8
|
-
import { WorkbenchLockButton as
|
|
9
|
-
import { installWorkbenchContextMenuDismissListeners as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { use as _, spread as B, mergeProps as q, insert as m, createComponent as u, Portal as N, addEventListener as z, template as A, delegateEvents as H } from "solid-js/web";
|
|
2
|
+
import { createSignal as M, createMemo as w, untrack as W, createEffect as v, onCleanup as h, Show as P } from "solid-js";
|
|
3
|
+
import { clientToCanvasWorld as X } from "../ui/canvasGeometry.js";
|
|
4
|
+
import { WorkbenchCanvas as $ } from "./WorkbenchCanvas.js";
|
|
5
|
+
import { WorkbenchContextMenu as V } from "./WorkbenchContextMenu.js";
|
|
6
|
+
import { WorkbenchFilterBar as Y } from "./WorkbenchFilterBar.js";
|
|
7
|
+
import { WorkbenchHud as K } from "./WorkbenchHud.js";
|
|
8
|
+
import { WorkbenchLockButton as U } from "./WorkbenchLockButton.js";
|
|
9
|
+
import { installWorkbenchContextMenuDismissListeners as Z } from "./workbenchContextMenuDismiss.js";
|
|
10
|
+
import { createContextMenuPosition as G, WORKBENCH_CONTEXT_MENU_WIDTH_PX as j, estimateContextMenuHeight as J } from "./workbenchHelpers.js";
|
|
11
|
+
import { useWorkbenchModel as Q } from "./useWorkbenchModel.js";
|
|
12
|
+
import { resolveWorkbenchInteractionAdapter as ee } from "./workbenchInteractionAdapter.js";
|
|
13
|
+
var te = /* @__PURE__ */ A("<div class=workbench-menu-backdrop data-floe-workbench-boundary=true>"), ne = /* @__PURE__ */ A("<div><div class=workbench-surface__body data-floe-workbench-canvas-frame=true>");
|
|
14
|
+
const re = "F1";
|
|
15
|
+
function x(i) {
|
|
15
16
|
if (i)
|
|
16
17
|
try {
|
|
17
18
|
i.focus({
|
|
@@ -21,186 +22,205 @@ function I(i) {
|
|
|
21
22
|
i.focus();
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
-
const t =
|
|
25
|
+
function he(i) {
|
|
26
|
+
const t = Q({
|
|
26
27
|
state: () => i.state(),
|
|
27
28
|
setState: (e) => i.setState(e),
|
|
28
29
|
widgetDefinitions: () => i.widgetDefinitions,
|
|
29
30
|
onClose: () => {
|
|
30
31
|
}
|
|
31
|
-
}), [
|
|
32
|
+
}), [d, E] = M(null), s = w(() => ee(i.interactionAdapter)), [p, l] = M(W(() => s().createInitialInputOwner())), k = w(() => {
|
|
32
33
|
const e = i.launcherWidgetTypes;
|
|
33
34
|
return !e || e.length <= 0 ? null : new Set(e);
|
|
34
35
|
}), D = w(() => {
|
|
35
|
-
const e = t.widgetDefinitions(),
|
|
36
|
-
return
|
|
37
|
-
}),
|
|
38
|
-
const e = t.contextMenu.items(), r =
|
|
39
|
-
|
|
40
|
-
if (n.kind !== "action")
|
|
36
|
+
const e = t.widgetDefinitions(), n = k();
|
|
37
|
+
return n ? e.filter((r) => n.has(r.type)) : e;
|
|
38
|
+
}), C = w(() => {
|
|
39
|
+
const e = t.contextMenu.state(), n = t.contextMenu.items(), r = k(), o = r ? n.filter((c) => {
|
|
40
|
+
if (c.kind !== "action")
|
|
41
41
|
return !0;
|
|
42
|
-
const
|
|
43
|
-
return
|
|
44
|
-
}) :
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
const f = /^add-(.+)$/.exec(String(c.id ?? ""));
|
|
43
|
+
return f ? r.has(f[1]) : !0;
|
|
44
|
+
}) : n;
|
|
45
|
+
if (!e || !i.resolveContextMenuItems)
|
|
46
|
+
return o;
|
|
47
|
+
const a = e.widgetId ? t.queries.findWidgetById(e.widgetId) : null;
|
|
48
|
+
return i.resolveContextMenuItems({
|
|
49
|
+
menu: e,
|
|
50
|
+
items: o,
|
|
51
|
+
widgets: t.widgets(),
|
|
52
|
+
widget: a,
|
|
53
|
+
closeMenu: t.contextMenu.close
|
|
54
|
+
});
|
|
55
|
+
}), b = w(() => {
|
|
56
|
+
const e = t.contextMenu.state();
|
|
57
|
+
if (!e) return;
|
|
58
|
+
const n = C(), r = n.filter((a) => a.kind === "action").length, o = n.filter((a) => a.kind === "separator").length;
|
|
59
|
+
return G({
|
|
60
|
+
clientX: e.clientX,
|
|
61
|
+
clientY: e.clientY,
|
|
62
|
+
menuWidth: j,
|
|
63
|
+
menuHeight: J(r, o)
|
|
64
|
+
});
|
|
65
|
+
}), I = (e, n, r) => {
|
|
66
|
+
const o = s(), a = o.findWidgetRoot(e), c = o.readWidgetId(a);
|
|
67
|
+
if (c) {
|
|
68
|
+
l(o.createWidgetInputOwner(c, n));
|
|
49
69
|
return;
|
|
50
70
|
}
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
const
|
|
55
|
-
t.selection.clear(), l(
|
|
56
|
-
if (!
|
|
71
|
+
const f = d();
|
|
72
|
+
f && e instanceof Node && f.contains(e) && l(o.createCanvasInputOwner(r));
|
|
73
|
+
}, y = (e = "selection_cleared") => {
|
|
74
|
+
const n = s(), r = d();
|
|
75
|
+
t.selection.clear(), l(n.createCanvasInputOwner(e)), queueMicrotask(() => {
|
|
76
|
+
if (!r || typeof document > "u") return;
|
|
57
77
|
const o = document.activeElement;
|
|
58
|
-
if (!(o instanceof HTMLElement) || !
|
|
59
|
-
|
|
78
|
+
if (!(o instanceof HTMLElement) || !r.contains(o)) {
|
|
79
|
+
x(r);
|
|
60
80
|
return;
|
|
61
81
|
}
|
|
62
|
-
const
|
|
63
|
-
|
|
82
|
+
const a = n.findWidgetRoot(o);
|
|
83
|
+
x(r), a && document.activeElement === o && o.isConnected && o.blur();
|
|
64
84
|
});
|
|
65
85
|
}, R = () => {
|
|
66
|
-
const e =
|
|
86
|
+
const e = d()?.querySelector('[data-floe-workbench-canvas-frame="true"]'), n = t.viewport(), r = e?.getBoundingClientRect(), o = r?.width ?? 0, a = r?.height ?? 0;
|
|
67
87
|
return {
|
|
68
|
-
worldX: o > 0 ? (o / 2 -
|
|
69
|
-
worldY:
|
|
88
|
+
worldX: o > 0 ? (o / 2 - n.x) / n.scale : 240,
|
|
89
|
+
worldY: a > 0 ? (a / 2 - n.y) / n.scale : 180
|
|
70
90
|
};
|
|
71
91
|
}, g = (e) => {
|
|
72
|
-
const
|
|
92
|
+
const n = W(s), r = W(d);
|
|
73
93
|
queueMicrotask(() => {
|
|
74
|
-
|
|
94
|
+
n.focusWidgetElement(r, e), l(n.createWidgetInputOwner(e, "activation"));
|
|
75
95
|
});
|
|
76
|
-
},
|
|
77
|
-
const
|
|
78
|
-
g(
|
|
79
|
-
},
|
|
80
|
-
const
|
|
81
|
-
g(
|
|
96
|
+
}, O = (e) => {
|
|
97
|
+
const n = t.navigation.fitWidget(e);
|
|
98
|
+
g(n.id);
|
|
99
|
+
}, T = (e) => {
|
|
100
|
+
const n = t.navigation.overviewWidget(e);
|
|
101
|
+
g(n.id);
|
|
82
102
|
};
|
|
83
|
-
|
|
103
|
+
v(() => {
|
|
84
104
|
i.onApiReady?.({
|
|
85
|
-
ensureWidget: (e,
|
|
86
|
-
createWidget: (e,
|
|
87
|
-
const
|
|
88
|
-
return o &&
|
|
89
|
-
},
|
|
90
|
-
clearSelection: () =>
|
|
91
|
-
focusWidget: (e,
|
|
92
|
-
const
|
|
93
|
-
return g(
|
|
105
|
+
ensureWidget: (e, n) => t.widgetActions.ensureWidget(e, n) ?? null,
|
|
106
|
+
createWidget: (e, n) => {
|
|
107
|
+
const r = R(), o = t.widgetActions.addWidgetAtCursor(e, n?.worldX ?? r.worldX, n?.worldY ?? r.worldY) ?? null;
|
|
108
|
+
return o && n?.centerViewport !== !1 && t.navigation.centerOnWidget(o), o;
|
|
109
|
+
},
|
|
110
|
+
clearSelection: () => y("selection_cleared"),
|
|
111
|
+
focusWidget: (e, n) => {
|
|
112
|
+
const r = t.navigation.focusWidget(e, n);
|
|
113
|
+
return g(r.id), r;
|
|
94
114
|
},
|
|
95
115
|
fitWidget: (e) => {
|
|
96
|
-
const
|
|
97
|
-
return g(
|
|
116
|
+
const n = t.navigation.fitWidget(e);
|
|
117
|
+
return g(n.id), n;
|
|
98
118
|
},
|
|
99
119
|
overviewWidget: (e) => {
|
|
100
|
-
const
|
|
101
|
-
return g(
|
|
120
|
+
const n = t.navigation.overviewWidget(e);
|
|
121
|
+
return g(n.id), n;
|
|
102
122
|
},
|
|
103
123
|
findWidgetByType: (e) => t.queries.findWidgetByType(e),
|
|
104
124
|
findWidgetById: (e) => t.queries.findWidgetById(e),
|
|
105
|
-
updateWidgetTitle: (e,
|
|
106
|
-
const
|
|
107
|
-
!
|
|
108
|
-
...
|
|
109
|
-
widgets:
|
|
110
|
-
...
|
|
125
|
+
updateWidgetTitle: (e, n) => {
|
|
126
|
+
const r = String(e ?? "").trim(), o = String(n ?? "").trim();
|
|
127
|
+
!r || !o || i.setState((a) => ({
|
|
128
|
+
...a,
|
|
129
|
+
widgets: a.widgets.map((c) => c.id === r && c.title !== o ? {
|
|
130
|
+
...c,
|
|
111
131
|
title: o
|
|
112
|
-
} :
|
|
132
|
+
} : c)
|
|
113
133
|
}));
|
|
114
134
|
}
|
|
115
|
-
}),
|
|
135
|
+
}), h(() => {
|
|
116
136
|
i.onApiReady?.(null);
|
|
117
137
|
});
|
|
118
138
|
});
|
|
119
|
-
const
|
|
120
|
-
|
|
139
|
+
const S = () => i.lockShortcut === void 0 ? re : i.lockShortcut;
|
|
140
|
+
v(() => {
|
|
121
141
|
if (typeof window > "u" || !t.contextMenu.state()) return;
|
|
122
|
-
const e =
|
|
142
|
+
const e = Z({
|
|
123
143
|
ownerWindow: window,
|
|
124
144
|
onDismiss: t.contextMenu.close
|
|
125
145
|
});
|
|
126
|
-
|
|
127
|
-
}),
|
|
146
|
+
h(() => e());
|
|
147
|
+
}), v(() => {
|
|
128
148
|
const e = p();
|
|
129
149
|
if (e.kind !== "widget") return;
|
|
130
|
-
t.widgets().some((
|
|
131
|
-
}),
|
|
132
|
-
const e =
|
|
150
|
+
t.widgets().some((r) => r.id === e.widgetId) || l(s().createCanvasInputOwner("widget_removed"));
|
|
151
|
+
}), v(() => {
|
|
152
|
+
const e = d();
|
|
133
153
|
if (!e) return;
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
},
|
|
137
|
-
|
|
154
|
+
const n = (o) => {
|
|
155
|
+
I(o.target, "pointer", "background_pointer");
|
|
156
|
+
}, r = (o) => {
|
|
157
|
+
I(o.target, "focus", "background_focus");
|
|
138
158
|
};
|
|
139
|
-
e.addEventListener("pointerdown",
|
|
140
|
-
e.removeEventListener("pointerdown",
|
|
159
|
+
e.addEventListener("pointerdown", n, !0), e.addEventListener("focusin", r), h(() => {
|
|
160
|
+
e.removeEventListener("pointerdown", n, !0), e.removeEventListener("focusin", r);
|
|
141
161
|
});
|
|
142
|
-
}),
|
|
162
|
+
}), v(() => {
|
|
143
163
|
if (i.enableKeyboard === !1 || typeof document > "u") return;
|
|
144
|
-
const e =
|
|
145
|
-
if (!(
|
|
146
|
-
if (e !== null &&
|
|
147
|
-
|
|
164
|
+
const e = S(), n = (r) => {
|
|
165
|
+
if (!(r.defaultPrevented || r.isComposing)) {
|
|
166
|
+
if (e !== null && r.key === e) {
|
|
167
|
+
r.preventDefault(), t.lock.toggle();
|
|
148
168
|
return;
|
|
149
169
|
}
|
|
150
|
-
if (!
|
|
151
|
-
root:
|
|
152
|
-
target:
|
|
170
|
+
if (!s().shouldBypassGlobalHotkeys({
|
|
171
|
+
root: d(),
|
|
172
|
+
target: r.target,
|
|
153
173
|
owner: p(),
|
|
154
|
-
interactiveSelector:
|
|
174
|
+
interactiveSelector: s().interactiveSelector
|
|
155
175
|
}))
|
|
156
|
-
switch (
|
|
176
|
+
switch (r.key) {
|
|
157
177
|
case "ArrowUp":
|
|
158
|
-
|
|
178
|
+
r.preventDefault(), t.navigation.handleArrowNavigation("up");
|
|
159
179
|
break;
|
|
160
180
|
case "ArrowDown":
|
|
161
|
-
|
|
181
|
+
r.preventDefault(), t.navigation.handleArrowNavigation("down");
|
|
162
182
|
break;
|
|
163
183
|
case "ArrowLeft":
|
|
164
|
-
|
|
184
|
+
r.preventDefault(), t.navigation.handleArrowNavigation("left");
|
|
165
185
|
break;
|
|
166
186
|
case "ArrowRight":
|
|
167
|
-
|
|
187
|
+
r.preventDefault(), t.navigation.handleArrowNavigation("right");
|
|
168
188
|
break;
|
|
169
189
|
case "Delete":
|
|
170
190
|
case "Backspace":
|
|
171
|
-
t.selectedWidgetId() && (
|
|
191
|
+
t.selectedWidgetId() && (r.preventDefault(), t.widgetActions.deleteSelected());
|
|
172
192
|
break;
|
|
173
193
|
}
|
|
174
194
|
}
|
|
175
195
|
};
|
|
176
|
-
document.addEventListener("keydown",
|
|
196
|
+
document.addEventListener("keydown", n, !0), h(() => document.removeEventListener("keydown", n, !0));
|
|
177
197
|
});
|
|
178
|
-
const
|
|
179
|
-
const
|
|
180
|
-
if (!
|
|
181
|
-
const o =
|
|
182
|
-
return
|
|
198
|
+
const L = (e, n) => {
|
|
199
|
+
const r = d()?.querySelector('[data-floe-workbench-canvas-frame="true"]');
|
|
200
|
+
if (!r) return null;
|
|
201
|
+
const o = r.getBoundingClientRect();
|
|
202
|
+
return X(o, t.viewport(), {
|
|
183
203
|
clientX: e,
|
|
184
|
-
clientY:
|
|
204
|
+
clientY: n
|
|
185
205
|
});
|
|
186
|
-
},
|
|
187
|
-
const o =
|
|
206
|
+
}, F = (e, n, r) => {
|
|
207
|
+
const o = L(n, r);
|
|
188
208
|
o && t.widgetActions.addWidgetAtCursor(e, o.worldX, o.worldY);
|
|
189
209
|
};
|
|
190
210
|
return (() => {
|
|
191
|
-
var e =
|
|
192
|
-
return
|
|
211
|
+
var e = ne(), n = e.firstChild;
|
|
212
|
+
return _(E, e), B(e, q({
|
|
193
213
|
get class() {
|
|
194
214
|
return `workbench-surface${i.class ? ` ${i.class}` : ""}`;
|
|
195
215
|
}
|
|
196
216
|
}, () => ({
|
|
197
|
-
[
|
|
217
|
+
[s().surfaceRootAttr]: "true"
|
|
198
218
|
}), {
|
|
199
219
|
get "data-workbench-theme"() {
|
|
200
220
|
return t.theme();
|
|
201
221
|
},
|
|
202
222
|
tabIndex: -1
|
|
203
|
-
}), !1, !0),
|
|
223
|
+
}), !1, !0), m(n, u($, {
|
|
204
224
|
get widgetDefinitions() {
|
|
205
225
|
return t.widgetDefinitions();
|
|
206
226
|
},
|
|
@@ -226,7 +246,7 @@ function ge(i) {
|
|
|
226
246
|
return t.filters();
|
|
227
247
|
},
|
|
228
248
|
get interactionAdapter() {
|
|
229
|
-
return
|
|
249
|
+
return s();
|
|
230
250
|
},
|
|
231
251
|
get setCanvasFrameRef() {
|
|
232
252
|
return t.setCanvasFrameRef;
|
|
@@ -240,7 +260,7 @@ function ge(i) {
|
|
|
240
260
|
get onCanvasContextMenu() {
|
|
241
261
|
return t.canvas.openCanvasContextMenu;
|
|
242
262
|
},
|
|
243
|
-
onCanvasPointerDown: () =>
|
|
263
|
+
onCanvasPointerDown: () => y("background_pointer"),
|
|
244
264
|
get onSelectWidget() {
|
|
245
265
|
return t.canvas.selectWidget;
|
|
246
266
|
},
|
|
@@ -259,8 +279,8 @@ function ge(i) {
|
|
|
259
279
|
get onCommitResize() {
|
|
260
280
|
return t.canvas.commitResize;
|
|
261
281
|
},
|
|
262
|
-
onRequestOverview:
|
|
263
|
-
onRequestFit:
|
|
282
|
+
onRequestOverview: T,
|
|
283
|
+
onRequestFit: O,
|
|
264
284
|
get onRequestDelete() {
|
|
265
285
|
return i.onRequestDelete ?? t.widgetActions.deleteWidget;
|
|
266
286
|
},
|
|
@@ -270,7 +290,7 @@ function ge(i) {
|
|
|
270
290
|
get onLayoutInteractionEnd() {
|
|
271
291
|
return i.onLayoutInteractionEnd;
|
|
272
292
|
}
|
|
273
|
-
})),
|
|
293
|
+
})), m(e, u(U, {
|
|
274
294
|
get locked() {
|
|
275
295
|
return t.locked();
|
|
276
296
|
},
|
|
@@ -278,9 +298,9 @@ function ge(i) {
|
|
|
278
298
|
return t.lock.toggle;
|
|
279
299
|
},
|
|
280
300
|
get shortcutLabel() {
|
|
281
|
-
return
|
|
301
|
+
return S() ?? void 0;
|
|
282
302
|
}
|
|
283
|
-
}), null),
|
|
303
|
+
}), null), m(e, u(Y, {
|
|
284
304
|
get widgetDefinitions() {
|
|
285
305
|
return D();
|
|
286
306
|
},
|
|
@@ -296,8 +316,8 @@ function ge(i) {
|
|
|
296
316
|
get onShowAll() {
|
|
297
317
|
return t.filter.showAll;
|
|
298
318
|
},
|
|
299
|
-
onCreateAt:
|
|
300
|
-
}), null),
|
|
319
|
+
onCreateAt: F
|
|
320
|
+
}), null), m(e, u(K, {
|
|
301
321
|
get scaleLabel() {
|
|
302
322
|
return t.scaleLabel();
|
|
303
323
|
},
|
|
@@ -310,26 +330,26 @@ function ge(i) {
|
|
|
310
330
|
get activeTheme() {
|
|
311
331
|
return t.theme();
|
|
312
332
|
},
|
|
313
|
-
onSelectTheme: (
|
|
314
|
-
}), null),
|
|
333
|
+
onSelectTheme: (r) => t.appearance.setTheme(r)
|
|
334
|
+
}), null), m(e, u(P, {
|
|
315
335
|
get when() {
|
|
316
336
|
return t.contextMenu.state();
|
|
317
337
|
},
|
|
318
338
|
get children() {
|
|
319
|
-
return u(
|
|
339
|
+
return u(N, {
|
|
320
340
|
get children() {
|
|
321
341
|
return [(() => {
|
|
322
|
-
var
|
|
323
|
-
return z(
|
|
324
|
-
})(), u(
|
|
342
|
+
var r = te();
|
|
343
|
+
return z(r, "contextmenu", t.contextMenu.retarget, !0), r;
|
|
344
|
+
})(), u(V, {
|
|
325
345
|
get x() {
|
|
326
|
-
return
|
|
346
|
+
return b()?.left ?? 0;
|
|
327
347
|
},
|
|
328
348
|
get y() {
|
|
329
|
-
return
|
|
349
|
+
return b()?.top ?? 0;
|
|
330
350
|
},
|
|
331
351
|
get items() {
|
|
332
|
-
return
|
|
352
|
+
return C();
|
|
333
353
|
}
|
|
334
354
|
})];
|
|
335
355
|
}
|
|
@@ -338,7 +358,7 @@ function ge(i) {
|
|
|
338
358
|
}), null), e;
|
|
339
359
|
})();
|
|
340
360
|
}
|
|
341
|
-
|
|
361
|
+
H(["contextmenu"]);
|
|
342
362
|
export {
|
|
343
|
-
|
|
363
|
+
he as WorkbenchSurface
|
|
344
364
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { WorkbenchOverlay, type WorkbenchOverlayProps, } from './WorkbenchOverlay';
|
|
2
|
-
export { WorkbenchSurface, type WorkbenchSurfaceApi, type WorkbenchSurfaceProps, } from './WorkbenchSurface';
|
|
2
|
+
export { WorkbenchSurface, type WorkbenchSurfaceApi, type WorkbenchContextMenuItemsResolver, type WorkbenchSurfaceProps, } from './WorkbenchSurface';
|
|
3
3
|
export { WorkbenchContextMenu, type WorkbenchContextMenuItem, type WorkbenchContextMenuProps, } from './WorkbenchContextMenu';
|
|
4
4
|
export { useWorkbenchModel, type UseWorkbenchModelOptions } from './useWorkbenchModel';
|
|
5
5
|
export { WIDGET_REGISTRY, createWorkbenchFilterState, getWidgetEntry, isValidWorkbenchWidgetType, resolveWorkbenchWidgetDefinitions, type WidgetRegistryEntry, } from './widgets/widgetRegistry';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSignal as A, createMemo as r, onCleanup as Ct } from "solid-js";
|
|
2
2
|
import { ArrowUp as bt, Copy as kt, Trash as Ft } from "../icons/index.js";
|
|
3
|
-
import { getTopZIndex as It, createContextMenuPosition as Mt, createWorkbenchId as vt, createWorkbenchViewportCenteredOnWidget as K, findNearestWidget as Xt,
|
|
3
|
+
import { getTopZIndex as It, createContextMenuPosition as Mt, createWorkbenchId as vt, createWorkbenchViewportCenteredOnWidget as K, findNearestWidget as Xt, WORKBENCH_CONTEXT_MENU_WIDTH_PX as Yt, estimateContextMenuHeight as yt, clampScale as Ot, WORKBENCH_CANVAS_ZOOM_STEP as L, WORKBENCH_MIN_SCALE as _t, createWorkbenchViewportFitForWidget as zt } from "./workbenchHelpers.js";
|
|
4
4
|
import { resolveWorkbenchWidgetDefinitions as Tt, getWidgetEntry as j, createWorkbenchFilterState as Vt } from "./widgets/widgetRegistry.js";
|
|
5
5
|
function Kt(c) {
|
|
6
6
|
const [x, S] = A(null), [U, N] = A(null), [D, G] = A({ width: 0, height: 0 });
|
|
@@ -107,8 +107,8 @@ function Kt(c) {
|
|
|
107
107
|
return Mt({
|
|
108
108
|
clientX: t.clientX,
|
|
109
109
|
clientY: t.clientY,
|
|
110
|
-
menuWidth:
|
|
111
|
-
menuHeight:
|
|
110
|
+
menuWidth: Yt,
|
|
111
|
+
menuHeight: yt(n, i)
|
|
112
112
|
});
|
|
113
113
|
}), v = (t, e, n) => {
|
|
114
114
|
const i = j(t, w()), o = i.singleton ? C(t) : null;
|
|
@@ -167,7 +167,7 @@ function Kt(c) {
|
|
|
167
167
|
}, y = (t) => {
|
|
168
168
|
c.setState((e) => ({ ...e, viewport: t }));
|
|
169
169
|
}, q = (t) => {
|
|
170
|
-
const e = h(), n = a(), i = (n.width / 2 - e.x) / e.scale, o = (n.height / 2 - e.y) / e.scale, s =
|
|
170
|
+
const e = h(), n = a(), i = (n.width / 2 - e.x) / e.scale, o = (n.height / 2 - e.y) / e.scale, s = Ot(
|
|
171
171
|
t === "in" ? e.scale * L : e.scale / L
|
|
172
172
|
), u = {
|
|
173
173
|
x: n.width / 2 - i * s,
|
|
@@ -232,7 +232,7 @@ function Kt(c) {
|
|
|
232
232
|
}));
|
|
233
233
|
}, Wt = (t) => {
|
|
234
234
|
const e = a();
|
|
235
|
-
e.width === 0 || e.height === 0 || _(
|
|
235
|
+
e.width === 0 || e.height === 0 || _(zt({
|
|
236
236
|
widget: t,
|
|
237
237
|
frameWidth: e.width,
|
|
238
238
|
frameHeight: e.height
|
|
@@ -241,7 +241,7 @@ function Kt(c) {
|
|
|
241
241
|
const e = a();
|
|
242
242
|
e.width === 0 || e.height === 0 || _(K({
|
|
243
243
|
widget: t,
|
|
244
|
-
scale:
|
|
244
|
+
scale: _t,
|
|
245
245
|
frameWidth: e.width,
|
|
246
246
|
frameHeight: e.height
|
|
247
247
|
}));
|