easy-email-pro-theme 1.19.1 → 1.21.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.
@@ -0,0 +1,64 @@
1
+ import React__default, { useRef, useState, useEffect, Suspense } from "react";
2
+ import { e as editor } from "./toggleHighContrast-6ac887bb.mjs";
3
+ import { t } from "easy-email-pro-core";
4
+ const HTMLEditorEditorContent = (props) => {
5
+ const { onChange } = props;
6
+ const valueRef = useRef(props.initialValue);
7
+ const [editor$1, setEditor] = useState(null);
8
+ const monacoEl = useRef(null);
9
+ useEffect(() => {
10
+ if (monacoEl) {
11
+ setEditor((editor2) => {
12
+ if (editor2)
13
+ return editor2;
14
+ const monEditor = editor.create(monacoEl.current, {
15
+ value: valueRef.current,
16
+ language: "html",
17
+ automaticLayout: true,
18
+ minimap: { enabled: false },
19
+ theme: "vs-dark"
20
+ });
21
+ monEditor.onDidChangeModelContent(() => {
22
+ onChange(monEditor.getValue());
23
+ });
24
+ return monEditor;
25
+ });
26
+ }
27
+ return () => editor$1 == null ? void 0 : editor$1.dispose();
28
+ }, [editor$1, onChange]);
29
+ return /* @__PURE__ */ React__default.createElement(
30
+ Suspense,
31
+ {
32
+ fallback: /* @__PURE__ */ React__default.createElement(
33
+ "div",
34
+ {
35
+ style: {
36
+ height: "100%",
37
+ width: "100%",
38
+ display: "flex",
39
+ alignItems: "center",
40
+ backgroundColor: "#263238",
41
+ justifyContent: "center",
42
+ fontSize: 24,
43
+ color: "#fff"
44
+ }
45
+ },
46
+ t(`Editor Loading...`)
47
+ )
48
+ },
49
+ /* @__PURE__ */ React__default.createElement(
50
+ "div",
51
+ {
52
+ style: {
53
+ height: "100%",
54
+ width: "100%",
55
+ position: "relative"
56
+ },
57
+ ref: monacoEl
58
+ }
59
+ )
60
+ );
61
+ };
62
+ export {
63
+ HTMLEditorEditorContent as default
64
+ };
@@ -0,0 +1,64 @@
1
+ import React__default, { useRef, useState, useEffect, Suspense } from "react";
2
+ import { e as editor } from "./toggleHighContrast-6ac887bb.mjs";
3
+ import { t } from "easy-email-pro-core";
4
+ const VariablesEditorContent = (props) => {
5
+ const { onChange } = props;
6
+ const valueRef = useRef(props.initialValue);
7
+ const [editor$1, setEditor] = useState(null);
8
+ const monacoEl = useRef(null);
9
+ useEffect(() => {
10
+ if (monacoEl) {
11
+ setEditor((editor2) => {
12
+ if (editor2)
13
+ return editor2;
14
+ const monEditor = editor.create(monacoEl.current, {
15
+ value: valueRef.current,
16
+ language: "json",
17
+ automaticLayout: true,
18
+ minimap: { enabled: false },
19
+ theme: "vs-dark"
20
+ });
21
+ monEditor.onDidChangeModelContent(() => {
22
+ onChange(monEditor.getValue());
23
+ });
24
+ return monEditor;
25
+ });
26
+ }
27
+ return () => editor$1 == null ? void 0 : editor$1.dispose();
28
+ }, [editor$1, onChange]);
29
+ return /* @__PURE__ */ React__default.createElement(
30
+ Suspense,
31
+ {
32
+ fallback: /* @__PURE__ */ React__default.createElement(
33
+ "div",
34
+ {
35
+ style: {
36
+ height: "100%",
37
+ width: "100%",
38
+ display: "flex",
39
+ alignItems: "center",
40
+ backgroundColor: "#263238",
41
+ justifyContent: "center",
42
+ fontSize: 24,
43
+ color: "#fff"
44
+ }
45
+ },
46
+ t(`Editor Loading...`)
47
+ )
48
+ },
49
+ /* @__PURE__ */ React__default.createElement(
50
+ "div",
51
+ {
52
+ style: {
53
+ height: "100%",
54
+ width: "100%",
55
+ position: "relative"
56
+ },
57
+ ref: monacoEl
58
+ }
59
+ )
60
+ );
61
+ };
62
+ export {
63
+ VariablesEditorContent as default
64
+ };