@floegence/floe-webapp-core 0.36.30 → 0.36.32
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.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { CodeEditor, type CodeEditorProps, type CodeEditorApi } from './CodeEditor';
|
|
2
2
|
export { resolveCodeEditorLanguageSpec, isCodeEditorLanguageSupported, type CodeEditorLanguageSpec } from './languages';
|
|
3
|
-
export { DEFAULT_MONACO_STANDALONE_FEATURES, normalizeMonacoRuntimeFeatureSet, type CodeEditorRuntimeOptions, type MonacoRuntimeFeatureSet, } from './monacoStandaloneRuntime';
|
|
3
|
+
export { DEFAULT_MONACO_RUNTIME_PROFILE, DEFAULT_MONACO_STANDALONE_FEATURES, MONACO_RUNTIME_BLUEPRINTS, normalizeMonacoRuntimeFeatureSet, resolveMonacoRuntimeProfile, resolveMonacoRuntimeRequest, type CodeEditorRuntimeOptions, type MonacoRuntimeProfileName, type MonacoStandaloneRuntimeBlueprint, type MonacoStandaloneRuntimeModuleDescriptor, type MonacoRuntimeFeatureSet, type ResolvedMonacoRuntimeRequest, } from './monacoStandaloneRuntime';
|
|
@@ -5,12 +5,31 @@ export interface MonacoRuntimeFeatureSet {
|
|
|
5
5
|
treeViewsDnd: boolean;
|
|
6
6
|
actionWidget: boolean;
|
|
7
7
|
}
|
|
8
|
+
export type MonacoRuntimeProfileName = 'editor_full' | 'preview_basic';
|
|
8
9
|
export interface CodeEditorRuntimeOptions {
|
|
10
|
+
profile?: MonacoRuntimeProfileName;
|
|
9
11
|
standaloneFeatures?: Partial<MonacoRuntimeFeatureSet>;
|
|
10
12
|
}
|
|
11
13
|
export declare const DEFAULT_MONACO_STANDALONE_FEATURES: MonacoRuntimeFeatureSet;
|
|
12
|
-
|
|
14
|
+
export declare const DEFAULT_MONACO_RUNTIME_PROFILE: MonacoRuntimeProfileName;
|
|
15
|
+
export interface MonacoStandaloneRuntimeModuleDescriptor {
|
|
16
|
+
id: string;
|
|
17
|
+
load: () => Promise<unknown>;
|
|
18
|
+
}
|
|
19
|
+
export interface MonacoStandaloneRuntimeBlueprint {
|
|
20
|
+
profile: MonacoRuntimeProfileName;
|
|
21
|
+
modules: readonly MonacoStandaloneRuntimeModuleDescriptor[];
|
|
22
|
+
}
|
|
23
|
+
export interface ResolvedMonacoRuntimeRequest {
|
|
24
|
+
profile: MonacoRuntimeProfileName;
|
|
25
|
+
cacheKey: string;
|
|
26
|
+
blueprint: MonacoStandaloneRuntimeBlueprint;
|
|
27
|
+
}
|
|
28
|
+
type MonacoStandaloneRuntimeLoader = (request: ResolvedMonacoRuntimeRequest) => Promise<unknown>;
|
|
13
29
|
export declare function normalizeMonacoRuntimeFeatureSet(standaloneFeatures?: Partial<MonacoRuntimeFeatureSet>): MonacoRuntimeFeatureSet;
|
|
30
|
+
export declare const MONACO_RUNTIME_BLUEPRINTS: Record<MonacoRuntimeProfileName, MonacoStandaloneRuntimeBlueprint>;
|
|
31
|
+
export declare function resolveMonacoRuntimeProfile(options?: CodeEditorRuntimeOptions): MonacoRuntimeProfileName;
|
|
32
|
+
export declare function resolveMonacoRuntimeRequest(options?: CodeEditorRuntimeOptions): ResolvedMonacoRuntimeRequest;
|
|
14
33
|
export declare function createMonacoStandaloneRuntime(loader: MonacoStandaloneRuntimeLoader): (options?: CodeEditorRuntimeOptions) => Promise<void>;
|
|
15
34
|
export declare const ensureMonacoStandaloneRuntime: (options?: CodeEditorRuntimeOptions) => Promise<void>;
|
|
16
35
|
export {};
|
|
@@ -1,49 +1,75 @@
|
|
|
1
|
-
const
|
|
1
|
+
const l = {
|
|
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
8
|
function u(e) {
|
|
9
9
|
return {
|
|
10
|
-
...
|
|
10
|
+
...l,
|
|
11
11
|
...e ?? {}
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
const s = [
|
|
15
|
+
{
|
|
16
|
+
id: "editor.main",
|
|
17
|
+
load: () => import("monaco-editor/esm/vs/editor/editor.main.js")
|
|
18
|
+
}
|
|
19
|
+
], d = {
|
|
20
|
+
editor_full: {
|
|
21
|
+
profile: "editor_full",
|
|
22
|
+
modules: s
|
|
23
|
+
},
|
|
24
|
+
preview_basic: {
|
|
25
|
+
profile: "preview_basic",
|
|
26
|
+
modules: []
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
function f(e) {
|
|
30
|
+
return e.suggestMemory === !1 && e.codeLensCache === !1 && e.inlayHintsCache === !1 && e.treeViewsDnd === !1 && e.actionWidget === !1;
|
|
31
|
+
}
|
|
32
|
+
function _(e) {
|
|
33
|
+
if (e?.profile)
|
|
34
|
+
return e.profile;
|
|
35
|
+
if (!e?.standaloneFeatures)
|
|
36
|
+
return a;
|
|
37
|
+
const n = u(e.standaloneFeatures);
|
|
38
|
+
return f(n) ? "preview_basic" : a;
|
|
22
39
|
}
|
|
23
40
|
function m(e) {
|
|
41
|
+
const n = _(e);
|
|
42
|
+
return {
|
|
43
|
+
profile: n,
|
|
44
|
+
cacheKey: `profile:${n}`,
|
|
45
|
+
blueprint: d[n]
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function M(e) {
|
|
24
49
|
const n = /* @__PURE__ */ new Map();
|
|
25
|
-
return (
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
28
|
-
const
|
|
29
|
-
}).catch((
|
|
30
|
-
throw n.delete(t),
|
|
50
|
+
return (i) => {
|
|
51
|
+
const t = m(i), o = n.get(t.cacheKey);
|
|
52
|
+
if (o) return o;
|
|
53
|
+
const r = e(t).then(() => {
|
|
54
|
+
}).catch((c) => {
|
|
55
|
+
throw n.delete(t.cacheKey), c;
|
|
31
56
|
});
|
|
32
|
-
return n.set(t,
|
|
57
|
+
return n.set(t.cacheKey, r), r;
|
|
33
58
|
};
|
|
34
59
|
}
|
|
35
|
-
function
|
|
36
|
-
|
|
37
|
-
import("monaco-editor/esm/vs/editor/edcore.main.js")
|
|
38
|
-
];
|
|
39
|
-
return e.suggestMemory && n.push(import("monaco-editor/esm/vs/editor/contrib/suggest/browser/suggestMemory.js")), e.codeLensCache && n.push(import("monaco-editor/esm/vs/editor/contrib/codelens/browser/codeLensCache.js")), e.inlayHintsCache && n.push(import("monaco-editor/esm/vs/editor/contrib/inlayHints/browser/inlayHintsContribution.js")), e.treeViewsDnd && n.push(import("monaco-editor/esm/vs/editor/common/services/treeViewsDndService.js")), e.actionWidget && n.push(import("monaco-editor/esm/vs/platform/actionWidget/browser/actionWidget.js")), Promise.all(n);
|
|
60
|
+
function p(e) {
|
|
61
|
+
return Promise.all(e.blueprint.modules.map((n) => n.load()));
|
|
40
62
|
}
|
|
41
|
-
const
|
|
42
|
-
|
|
63
|
+
const R = M(
|
|
64
|
+
p
|
|
43
65
|
);
|
|
44
66
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
67
|
+
a as DEFAULT_MONACO_RUNTIME_PROFILE,
|
|
68
|
+
l as DEFAULT_MONACO_STANDALONE_FEATURES,
|
|
69
|
+
d as MONACO_RUNTIME_BLUEPRINTS,
|
|
70
|
+
M as createMonacoStandaloneRuntime,
|
|
71
|
+
R as ensureMonacoStandaloneRuntime,
|
|
72
|
+
u as normalizeMonacoRuntimeFeatureSet,
|
|
73
|
+
_ as resolveMonacoRuntimeProfile,
|
|
74
|
+
m as resolveMonacoRuntimeRequest
|
|
49
75
|
};
|
package/dist/editor.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { CodeEditor as r } from "./components/editor/CodeEditor.js";
|
|
2
|
-
import { DEFAULT_MONACO_STANDALONE_FEATURES as a, normalizeMonacoRuntimeFeatureSet as
|
|
3
|
-
import { isCodeEditorLanguageSupported as
|
|
2
|
+
import { DEFAULT_MONACO_RUNTIME_PROFILE as E, DEFAULT_MONACO_STANDALONE_FEATURES as a, MONACO_RUNTIME_BLUEPRINTS as i, normalizeMonacoRuntimeFeatureSet as n, resolveMonacoRuntimeProfile as R, resolveMonacoRuntimeRequest as u } from "./components/editor/monacoStandaloneRuntime.js";
|
|
3
|
+
import { isCodeEditorLanguageSupported as M, resolveCodeEditorLanguageSpec as N } from "./components/editor/languages.js";
|
|
4
4
|
export {
|
|
5
5
|
r as CodeEditor,
|
|
6
|
+
E as DEFAULT_MONACO_RUNTIME_PROFILE,
|
|
6
7
|
a as DEFAULT_MONACO_STANDALONE_FEATURES,
|
|
7
|
-
i as
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
i as MONACO_RUNTIME_BLUEPRINTS,
|
|
9
|
+
M as isCodeEditorLanguageSupported,
|
|
10
|
+
n as normalizeMonacoRuntimeFeatureSet,
|
|
11
|
+
N as resolveCodeEditorLanguageSpec,
|
|
12
|
+
R as resolveMonacoRuntimeProfile,
|
|
13
|
+
u as resolveMonacoRuntimeRequest
|
|
10
14
|
};
|