@floegence/floe-webapp-core 0.81.2 → 0.81.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/components/chat/blocks/SvgBlock.js +16 -10
- package/dist/components/editor/CodeEditor.d.ts +1 -2
- package/dist/components/editor/CodeEditor.js +8 -9
- package/dist/components/editor/languages.js +37 -37
- package/dist/components/editor/monacoEnvironment.js +5 -5
- package/dist/components/editor/monacoStandaloneRuntime.d.ts +1 -1
- package/dist/components/editor/monacoStandaloneRuntime.js +7 -7
- package/dist/node_modules/.pnpm/dompurify@3.4.16/node_modules/dompurify/dist/purify.es.js +1480 -0
- package/dist/terminal/mockRuntime.js +118 -110
- package/package.json +3 -2
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import { effect as
|
|
1
|
+
import { effect as s, className as a, template as c } from "solid-js/web";
|
|
2
2
|
import "solid-js";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import v from "../../../node_modules/.pnpm/dompurify@3.4.16/node_modules/dompurify/dist/purify.es.js";
|
|
4
|
+
import { cn as m } from "../../../utils/cn.js";
|
|
5
|
+
var l = /* @__PURE__ */ c("<div>");
|
|
6
|
+
const S = (r) => {
|
|
7
|
+
const n = (t) => v.isSupported ? v.sanitize(t, {
|
|
8
|
+
USE_PROFILES: {
|
|
9
|
+
svg: !0,
|
|
10
|
+
svgFilters: !0
|
|
11
|
+
}
|
|
12
|
+
}) : "";
|
|
7
13
|
return (() => {
|
|
8
|
-
var t =
|
|
9
|
-
return
|
|
10
|
-
var
|
|
11
|
-
return
|
|
14
|
+
var t = l();
|
|
15
|
+
return s((e) => {
|
|
16
|
+
var i = m("chat-svg-block", r.class), o = n(r.content);
|
|
17
|
+
return i !== e.e && a(t, e.e = i), o !== e.t && (t.innerHTML = e.t = o), e;
|
|
12
18
|
}, {
|
|
13
19
|
e: void 0,
|
|
14
20
|
t: void 0
|
|
@@ -16,5 +22,5 @@ const f = (r) => {
|
|
|
16
22
|
})();
|
|
17
23
|
};
|
|
18
24
|
export {
|
|
19
|
-
|
|
25
|
+
S as SvgBlock
|
|
20
26
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type JSX } from 'solid-js';
|
|
2
|
-
import type * as Monaco from 'monaco-editor/
|
|
3
|
-
import 'monaco-editor/min/vs/editor/editor.main.css';
|
|
2
|
+
import type * as Monaco from 'monaco-editor/editor';
|
|
4
3
|
import { type CodeEditorRuntimeOptions } from './monacoStandaloneRuntime';
|
|
5
4
|
type MonacoEditorOptions = Monaco.editor.IStandaloneEditorConstructionOptions;
|
|
6
5
|
type MonacoStandaloneCodeEditor = Monaco.editor.IStandaloneCodeEditor;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { effect as
|
|
1
|
+
import { effect as F, className as L, style as O, template as p, use as A } from "solid-js/web";
|
|
2
2
|
import { onMount as D, onCleanup as V, createEffect as g } from "solid-js";
|
|
3
3
|
import { useTheme as b } from "../../context/ThemeContext.js";
|
|
4
4
|
import { useResizeObserver as q } from "../../hooks/useResizeObserver.js";
|
|
5
|
-
import "monaco-editor/min/vs/editor/editor.main.css";
|
|
6
5
|
import { resolveCodeEditorLanguageSpec as w } from "./languages.js";
|
|
7
6
|
import { applyFloeMonacoTheme as U } from "./monacoTheme.js";
|
|
8
7
|
import { ensureMonacoEnvironment as N } from "./monacoEnvironment.js";
|
|
9
8
|
import { loadMonacoEditorApi as P } from "./monacoStandaloneRuntime.js";
|
|
10
|
-
var _ = /* @__PURE__ */
|
|
9
|
+
var _ = /* @__PURE__ */ p("<div>");
|
|
11
10
|
const I = {
|
|
12
11
|
readOnly: !0,
|
|
13
12
|
automaticLayout: !1,
|
|
@@ -29,7 +28,7 @@ function H(t, c) {
|
|
|
29
28
|
const r = t.getSelection();
|
|
30
29
|
return !r || r.isEmpty() ? "" : c.getValueInRange(r);
|
|
31
30
|
}
|
|
32
|
-
function
|
|
31
|
+
function Y(t) {
|
|
33
32
|
const c = b();
|
|
34
33
|
let r;
|
|
35
34
|
const x = ++$;
|
|
@@ -78,13 +77,13 @@ function Z(t) {
|
|
|
78
77
|
...I,
|
|
79
78
|
...t.options ?? {}
|
|
80
79
|
}), S(), await T(), e || !n)) return;
|
|
81
|
-
const s = t.onContentChange, E = t.onChange,
|
|
80
|
+
const s = t.onContentChange, E = t.onChange, z = t.onSelectionChange;
|
|
82
81
|
i = n.onDidChangeModelContent((f) => {
|
|
83
82
|
const v = m();
|
|
84
83
|
v && (s?.(f, v), E && E(v.getValue()));
|
|
85
84
|
}), a = n.onDidChangeCursorSelection(() => {
|
|
86
85
|
const f = m();
|
|
87
|
-
f &&
|
|
86
|
+
f && z?.(f.getSelectedText(), f);
|
|
88
87
|
});
|
|
89
88
|
})().catch((s) => {
|
|
90
89
|
console.error("Failed to initialize Monaco editor runtime", s);
|
|
@@ -110,9 +109,9 @@ function Z(t) {
|
|
|
110
109
|
}));
|
|
111
110
|
}), (() => {
|
|
112
111
|
var e = _(), i = r;
|
|
113
|
-
return typeof i == "function" ? A(i, e) : r = e,
|
|
112
|
+
return typeof i == "function" ? A(i, e) : r = e, F((a) => {
|
|
114
113
|
var d = t.class, s = t.style;
|
|
115
|
-
return d !== a.e &&
|
|
114
|
+
return d !== a.e && L(e, a.e = d), a.t = O(e, s, a.t), a;
|
|
116
115
|
}, {
|
|
117
116
|
e: void 0,
|
|
118
117
|
t: void 0
|
|
@@ -120,5 +119,5 @@ function Z(t) {
|
|
|
120
119
|
})();
|
|
121
120
|
}
|
|
122
121
|
export {
|
|
123
|
-
|
|
122
|
+
Y as CodeEditor
|
|
124
123
|
};
|
|
@@ -47,54 +47,54 @@ const n = {
|
|
|
47
47
|
svelte: "plaintext",
|
|
48
48
|
groovy: "plaintext"
|
|
49
49
|
}, a = {
|
|
50
|
-
javascript: () => import("monaco-editor/
|
|
51
|
-
typescript: () => import("monaco-editor/
|
|
52
|
-
json: () => import("monaco-editor/
|
|
50
|
+
javascript: () => import("monaco-editor/languages/definitions/javascript/register"),
|
|
51
|
+
typescript: () => import("monaco-editor/languages/definitions/typescript/register"),
|
|
52
|
+
json: () => import("monaco-editor/languages/features/json/register"),
|
|
53
53
|
// Monaco's HTML/CSS language-service contributions do not register standalone
|
|
54
54
|
// tokenizers by themselves, so editable syntax coloring must load the paired
|
|
55
55
|
// basic-language contribution alongside the rich language-service runtime.
|
|
56
56
|
html: r(
|
|
57
|
-
() => import("monaco-editor/
|
|
58
|
-
() => import("monaco-editor/
|
|
57
|
+
() => import("monaco-editor/languages/definitions/html/register"),
|
|
58
|
+
() => import("monaco-editor/languages/features/html/register")
|
|
59
59
|
),
|
|
60
60
|
css: r(
|
|
61
|
-
() => import("monaco-editor/
|
|
62
|
-
() => import("monaco-editor/
|
|
61
|
+
() => import("monaco-editor/languages/definitions/css/register"),
|
|
62
|
+
() => import("monaco-editor/languages/features/css/register")
|
|
63
63
|
),
|
|
64
64
|
scss: r(
|
|
65
|
-
() => import("monaco-editor/
|
|
66
|
-
() => import("monaco-editor/
|
|
65
|
+
() => import("monaco-editor/languages/definitions/scss/register"),
|
|
66
|
+
() => import("monaco-editor/languages/features/css/register")
|
|
67
67
|
),
|
|
68
68
|
less: r(
|
|
69
|
-
() => import("monaco-editor/
|
|
70
|
-
() => import("monaco-editor/
|
|
69
|
+
() => import("monaco-editor/languages/definitions/less/register"),
|
|
70
|
+
() => import("monaco-editor/languages/features/css/register")
|
|
71
71
|
),
|
|
72
|
-
markdown: () => import("monaco-editor/
|
|
73
|
-
yaml: () => import("monaco-editor/
|
|
74
|
-
ini: () => import("monaco-editor/
|
|
75
|
-
xml: () => import("monaco-editor/
|
|
76
|
-
python: () => import("monaco-editor/
|
|
77
|
-
java: () => import("monaco-editor/
|
|
78
|
-
kotlin: () => import("monaco-editor/
|
|
79
|
-
scala: () => import("monaco-editor/
|
|
80
|
-
go: () => import("monaco-editor/
|
|
81
|
-
rust: () => import("monaco-editor/
|
|
82
|
-
cpp: () => import("monaco-editor/
|
|
83
|
-
csharp: () => import("monaco-editor/
|
|
84
|
-
fsharp: () => import("monaco-editor/
|
|
85
|
-
php: () => import("monaco-editor/
|
|
86
|
-
ruby: () => import("monaco-editor/
|
|
87
|
-
perl: () => import("monaco-editor/
|
|
88
|
-
shell: () => import("monaco-editor/
|
|
89
|
-
swift: () => import("monaco-editor/
|
|
90
|
-
"objective-c": () => import("monaco-editor/
|
|
91
|
-
r: () => import("monaco-editor/
|
|
92
|
-
sql: () => import("monaco-editor/
|
|
93
|
-
lua: () => import("monaco-editor/
|
|
94
|
-
dart: () => import("monaco-editor/
|
|
95
|
-
dockerfile: () => import("monaco-editor/
|
|
96
|
-
bat: () => import("monaco-editor/
|
|
97
|
-
powershell: () => import("monaco-editor/
|
|
72
|
+
markdown: () => import("monaco-editor/languages/definitions/markdown/register"),
|
|
73
|
+
yaml: () => import("monaco-editor/languages/definitions/yaml/register"),
|
|
74
|
+
ini: () => import("monaco-editor/languages/definitions/ini/register"),
|
|
75
|
+
xml: () => import("monaco-editor/languages/definitions/xml/register"),
|
|
76
|
+
python: () => import("monaco-editor/languages/definitions/python/register"),
|
|
77
|
+
java: () => import("monaco-editor/languages/definitions/java/register"),
|
|
78
|
+
kotlin: () => import("monaco-editor/languages/definitions/kotlin/register"),
|
|
79
|
+
scala: () => import("monaco-editor/languages/definitions/scala/register"),
|
|
80
|
+
go: () => import("monaco-editor/languages/definitions/go/register"),
|
|
81
|
+
rust: () => import("monaco-editor/languages/definitions/rust/register"),
|
|
82
|
+
cpp: () => import("monaco-editor/languages/definitions/cpp/register"),
|
|
83
|
+
csharp: () => import("monaco-editor/languages/definitions/csharp/register"),
|
|
84
|
+
fsharp: () => import("monaco-editor/languages/definitions/fsharp/register"),
|
|
85
|
+
php: () => import("monaco-editor/languages/definitions/php/register"),
|
|
86
|
+
ruby: () => import("monaco-editor/languages/definitions/ruby/register"),
|
|
87
|
+
perl: () => import("monaco-editor/languages/definitions/perl/register"),
|
|
88
|
+
shell: () => import("monaco-editor/languages/definitions/shell/register"),
|
|
89
|
+
swift: () => import("monaco-editor/languages/definitions/swift/register"),
|
|
90
|
+
"objective-c": () => import("monaco-editor/languages/definitions/objective-c/register"),
|
|
91
|
+
r: () => import("monaco-editor/languages/definitions/r/register"),
|
|
92
|
+
sql: () => import("monaco-editor/languages/definitions/sql/register"),
|
|
93
|
+
lua: () => import("monaco-editor/languages/definitions/lua/register"),
|
|
94
|
+
dart: () => import("monaco-editor/languages/definitions/dart/register"),
|
|
95
|
+
dockerfile: () => import("monaco-editor/languages/definitions/dockerfile/register"),
|
|
96
|
+
bat: () => import("monaco-editor/languages/definitions/bat/register"),
|
|
97
|
+
powershell: () => import("monaco-editor/languages/definitions/powershell/register")
|
|
98
98
|
}, e = /* @__PURE__ */ new Map();
|
|
99
99
|
function c(p) {
|
|
100
100
|
const t = String(p ?? "").trim().toLowerCase();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import n from "monaco-editor/
|
|
2
|
-
import t from "monaco-editor/
|
|
3
|
-
import e from "monaco-editor/
|
|
4
|
-
import i from "monaco-editor/
|
|
5
|
-
import s from "monaco-editor/
|
|
1
|
+
import n from "monaco-editor/editor/editor.worker.js?worker";
|
|
2
|
+
import t from "monaco-editor/languages/features/typescript/ts.worker.js?worker";
|
|
3
|
+
import e from "monaco-editor/languages/features/json/json.worker.js?worker";
|
|
4
|
+
import i from "monaco-editor/languages/features/html/html.worker.js?worker";
|
|
5
|
+
import s from "monaco-editor/languages/features/css/css.worker.js?worker";
|
|
6
6
|
const o = globalThis;
|
|
7
7
|
function W() {
|
|
8
8
|
o.MonacoEnvironment || (o.MonacoEnvironment = {
|
|
@@ -14,27 +14,27 @@ function d(e) {
|
|
|
14
14
|
const c = [
|
|
15
15
|
{
|
|
16
16
|
id: "edcore.main",
|
|
17
|
-
load: () => import("monaco-editor/
|
|
17
|
+
load: () => import("monaco-editor/features/register.all")
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
id: "suggestMemory",
|
|
21
|
-
load: () => import("monaco-editor/
|
|
21
|
+
load: () => import("monaco-editor/editor/contrib/suggest/browser/suggestMemory.js")
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
id: "codeLensCache",
|
|
25
|
-
load: () => import("monaco-editor/
|
|
25
|
+
load: () => import("monaco-editor/editor/contrib/codelens/browser/codeLensCache.js")
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
id: "inlayHintsContribution",
|
|
29
|
-
load: () => import("monaco-editor/
|
|
29
|
+
load: () => import("monaco-editor/editor/contrib/inlayHints/browser/inlayHintsContribution.js")
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
id: "treeViewsDndService",
|
|
33
|
-
load: () => import("monaco-editor/
|
|
33
|
+
load: () => import("monaco-editor/editor/common/services/treeViewsDndService.js")
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
id: "actionWidget",
|
|
37
|
-
load: () => import("monaco-editor/
|
|
37
|
+
load: () => import("monaco-editor/platform/actionWidget/browser/actionWidget.js")
|
|
38
38
|
}
|
|
39
39
|
], f = c, m = c, p = {
|
|
40
40
|
editor_full: {
|
|
@@ -86,7 +86,7 @@ const h = O(
|
|
|
86
86
|
);
|
|
87
87
|
let t = null;
|
|
88
88
|
async function L(e) {
|
|
89
|
-
return await h(e), t || (t = import("monaco-editor/
|
|
89
|
+
return await h(e), t || (t = import("monaco-editor/editor").catch((n) => {
|
|
90
90
|
throw t = null, n;
|
|
91
91
|
}), t);
|
|
92
92
|
}
|