monto-email-builder 1.2.4 → 1.2.5
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/App/InspectorDrawer/ConfigurationPanel/input-panels/ColumnsContainerSidebarPanel.d.ts.map +1 -1
- package/dist/App/InspectorDrawer/ConfigurationPanel/input-panels/EmailLayoutSidebarPanel.d.ts.map +1 -1
- package/dist/App/InspectorDrawer/ConfigurationPanel/input-panels/ImageSidebarPanel.d.ts.map +1 -1
- package/dist/App/InspectorDrawer/ConfigurationPanel/input-panels/SocialsSidebarPanel.d.ts.map +1 -1
- package/dist/App/InspectorDrawer/ConfigurationPanel/input-panels/TextSidebarPanel.d.ts.map +1 -1
- package/dist/App/InspectorDrawer/ConfigurationPanel/input-panels/VideoSidebarPanel.d.ts.map +1 -1
- package/dist/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/BaseColorInput.d.ts.map +1 -1
- package/dist/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/PaddingInput.d.ts.map +1 -1
- package/dist/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/TextAlignInput.d.ts.map +1 -1
- package/dist/HtmlEditor/index.d.ts.map +1 -1
- package/dist/documents/blocks/Image/ImageEditor.d.ts.map +1 -1
- package/dist/documents/blocks/Video/VideoEditor.d.ts.map +1 -1
- package/dist/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/buttons.d.ts.map +1 -1
- package/dist/documents/blocks/helpers/block-wrappers/TuneMenu.d.ts.map +1 -1
- package/dist/html-editor.js +43 -39
- package/dist/index.js +874 -835
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnsContainerSidebarPanel.d.ts","sourceRoot":"","sources":["../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/ColumnsContainerSidebarPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ColumnsContainerSidebarPanel.d.ts","sourceRoot":"","sources":["../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/ColumnsContainerSidebarPanel.tsx"],"names":[],"mappings":"AAkBA,OAAoC,EAClC,qBAAqB,EACtB,MAAM,2EAA2E,CAAC;AAUnF,KAAK,0BAA0B,GAAG;IAChC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,CAAC,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAC7C,CAAC;AACF,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,0BAA0B,2CA+U1F"}
|
package/dist/App/InspectorDrawer/ConfigurationPanel/input-panels/EmailLayoutSidebarPanel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailLayoutSidebarPanel.d.ts","sourceRoot":"","sources":["../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/EmailLayoutSidebarPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EmailLayoutSidebarPanel.d.ts","sourceRoot":"","sources":["../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/EmailLayoutSidebarPanel.tsx"],"names":[],"mappings":"AAKA,OAA+B,EAC7B,gBAAgB,EACjB,MAAM,iEAAiE,CAAC;AASzE,KAAK,6BAA6B,GAAG;IACnC,IAAI,EAAE,gBAAgB,CAAC;IACvB,OAAO,EAAE,CAAC,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACxC,CAAC;AACF,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,6BAA6B,2CAiEhG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageSidebarPanel.d.ts","sourceRoot":"","sources":["../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/ImageSidebarPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ImageSidebarPanel.d.ts","sourceRoot":"","sources":["../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/ImageSidebarPanel.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAoB,MAAM,yBAAyB,CAAC;AAYvE,KAAK,sBAAsB,GAAG;IAC5B,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CAClC,CAAC;AACF,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,sBAAsB,2CA+JlF"}
|
package/dist/App/InspectorDrawer/ConfigurationPanel/input-panels/SocialsSidebarPanel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocialsSidebarPanel.d.ts","sourceRoot":"","sources":["../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/SocialsSidebarPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SocialsSidebarPanel.d.ts","sourceRoot":"","sources":["../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/SocialsSidebarPanel.tsx"],"names":[],"mappings":"AAOA,OAA2B,EAAE,YAAY,EAA4D,MAAM,yDAAyD,CAAC;AAsCrK,KAAK,wBAAwB,GAAG;IAC9B,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,IAAI,CAAC;CACpC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,wBAAwB,2CA+gBtF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextSidebarPanel.d.ts","sourceRoot":"","sources":["../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/TextSidebarPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextSidebarPanel.d.ts","sourceRoot":"","sources":["../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/TextSidebarPanel.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAA4C,MAAM,wBAAwB,CAAC;AAqD7F,KAAK,qBAAqB,GAAG;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;CACjC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,qBAAqB,2CAovBzF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoSidebarPanel.d.ts","sourceRoot":"","sources":["../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/VideoSidebarPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VideoSidebarPanel.d.ts","sourceRoot":"","sources":["../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/VideoSidebarPanel.tsx"],"names":[],"mappings":"AAYA,OAAyB,EAAE,UAAU,EAAE,MAAM,qDAAqD,CAAC;AASnG,KAAK,sBAAsB,GAAG;IAC5B,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CAClC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,sBAAsB,2CA0MlF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseColorInput.d.ts","sourceRoot":"","sources":["../../../../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/BaseColorInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseColorInput.d.ts","sourceRoot":"","sources":["../../../../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/BaseColorInput.tsx"],"names":[],"mappings":"AAiCA,KAAK,KAAK,GACN;IACE,QAAQ,EAAE,IAAI,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,GACD;IACE,QAAQ,EAAE,KAAK,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AACN,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,KAAK,2CA0EpF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaddingInput.d.ts","sourceRoot":"","sources":["../../../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/PaddingInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PaddingInput.d.ts","sourceRoot":"","sources":["../../../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/PaddingInput.tsx"],"names":[],"mappings":"AAUA,KAAK,aAAa,GAAG;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AACF,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,aAAa,GAAG,IAAI,CAAC;IACnC,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;CAC1C,CAAC;AACF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,KAAK,2CAuE5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAlignInput.d.ts","sourceRoot":"","sources":["../../../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/TextAlignInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextAlignInput.d.ts","sourceRoot":"","sources":["../../../../../../../src/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/TextAlignInput.tsx"],"names":[],"mappings":"AASA,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC1C,CAAC;AACF,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,KAAK,2CAuB9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/HtmlEditor/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,EASL,OAAO,EACP,KAAK,EAGN,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/HtmlEditor/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,EASL,OAAO,EACP,KAAK,EAGN,MAAM,eAAe,CAAC;AAOvB,OAAO,EAAE,QAAQ,EAAK,MAAM,SAAS,CAAC;AAEtC,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAC1D,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,CAAC;AA8DpD,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B;;;OAGG;IACH,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,KAAK,EACL,QAAQ,EACR,QAAe,EACf,WAAqB,EACrB,aAAyB,EACzB,gBAAyB,EACzB,aAAsB,EACtB,EAAE,EACF,WAAkB,EAClB,YAAY,GACb,EAAE,eAAe,2CAiYjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageEditor.d.ts","sourceRoot":"","sources":["../../../../src/documents/blocks/Image/ImageEditor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ImageEditor.d.ts","sourceRoot":"","sources":["../../../../src/documents/blocks/Image/ImageEditor.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAS,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAM5D,KAAK,gBAAgB,GAAG,UAAU,CAAC;AAEnC,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAsN1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoEditor.d.ts","sourceRoot":"","sources":["../../../../src/documents/blocks/Video/VideoEditor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VideoEditor.d.ts","sourceRoot":"","sources":["../../../../src/documents/blocks/Video/VideoEditor.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAS,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAM5D,KAAK,gBAAgB,GAAG,UAAU,CAAC;AAEnC,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAqO1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buttons.d.ts","sourceRoot":"","sources":["../../../../../../src/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/buttons.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"buttons.d.ts","sourceRoot":"","sources":["../../../../../../src/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/buttons.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,YAAY,CAAC;CAC3B,CAAC;AACF,eAAO,MAAM,OAAO,EAAE,YAAY,EAkLjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TuneMenu.d.ts","sourceRoot":"","sources":["../../../../../src/documents/blocks/helpers/block-wrappers/TuneMenu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TuneMenu.d.ts","sourceRoot":"","sources":["../../../../../src/documents/blocks/helpers/block-wrappers/TuneMenu.tsx"],"names":[],"mappings":"AA2FA,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AACF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAAE,OAAO,EAAE,EAAE,KAAK,2CAkWlD"}
|
package/dist/html-editor.js
CHANGED
|
@@ -2,21 +2,25 @@ import { jsxs as s, jsx as e, Fragment as ke } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as w, useRef as Q, useEffect as L, useMemo as De } from "react";
|
|
3
3
|
import Se from "@uiw/react-codemirror";
|
|
4
4
|
import { html as Fe } from "@codemirror/lang-html";
|
|
5
|
-
import { xcodeDark as He, tomorrowNightBlue as Me, dracula as ie, basicDark as Pe, abcdef as
|
|
6
|
-
import { useTheme as je, Box as i, ToggleButtonGroup as Z, Tooltip as
|
|
5
|
+
import { xcodeDark as He, tomorrowNightBlue as Me, dracula as ie, basicDark as Pe, abcdef as Ie, bbedit as Oe, noctisLilac as Ne, gruvboxLight as ze, tokyoNightDay as Be, vscodeLight as We, xcodeLight as Ve } from "@uiw/codemirror-themes-all";
|
|
6
|
+
import { useTheme as je, Box as i, ToggleButtonGroup as Z, Tooltip as g, ToggleButton as b, FormControl as _e, InputLabel as Re, Select as Ye, ListSubheader as ee, MenuItem as te } from "@mui/material";
|
|
7
7
|
import { alpha as oe } from "@mui/material/styles";
|
|
8
|
-
import
|
|
8
|
+
import Ae from "@mui/icons-material/Code";
|
|
9
|
+
import Ge from "@mui/icons-material/Visibility";
|
|
10
|
+
import $e from "@mui/icons-material/ViewColumn";
|
|
11
|
+
import Xe from "@mui/icons-material/MonitorOutlined";
|
|
12
|
+
import qe from "@mui/icons-material/PhoneIphoneOutlined";
|
|
9
13
|
import { t as Ke } from "./chunks/chunk-_7XTjFEi.js";
|
|
10
14
|
const T = {
|
|
11
15
|
// 浅色主题
|
|
12
16
|
xcodeLight: Ve,
|
|
13
17
|
vscodeLight: We,
|
|
14
|
-
tokyoNightDay:
|
|
15
|
-
gruvboxLight:
|
|
16
|
-
noctisLilac:
|
|
17
|
-
bbedit:
|
|
18
|
+
tokyoNightDay: Be,
|
|
19
|
+
gruvboxLight: ze,
|
|
20
|
+
noctisLilac: Ne,
|
|
21
|
+
bbedit: Oe,
|
|
18
22
|
// 深色主题
|
|
19
|
-
abcdef:
|
|
23
|
+
abcdef: Ie,
|
|
20
24
|
basicDark: Pe,
|
|
21
25
|
dracula: ie,
|
|
22
26
|
tomorrowNightBlue: Me,
|
|
@@ -53,7 +57,7 @@ function Ze(l) {
|
|
|
53
57
|
console.error("Failed to set HTML Editor stored theme", l);
|
|
54
58
|
}
|
|
55
59
|
}
|
|
56
|
-
function
|
|
60
|
+
function ft({
|
|
57
61
|
value: l,
|
|
58
62
|
onChange: c,
|
|
59
63
|
language: p = "zh",
|
|
@@ -62,15 +66,15 @@ function ht({
|
|
|
62
66
|
codeEditorHeight: ae = "100%",
|
|
63
67
|
previewHeight: se = "100%",
|
|
64
68
|
sx: ce,
|
|
65
|
-
showToolbar:
|
|
66
|
-
initialTheme:
|
|
69
|
+
showToolbar: me = !0,
|
|
70
|
+
initialTheme: he
|
|
67
71
|
}) {
|
|
68
|
-
var F, H, M, P, O, N, z, B,
|
|
69
|
-
const r = (o, t) => Ke(o, t, p), [n, pe] = w(ne), [
|
|
72
|
+
var F, H, M, P, I, O, N, z, B, W, V, j, _, R, Y, A, G, $;
|
|
73
|
+
const r = (o, t) => Ke(o, t, p), [n, pe] = w(ne), [m, ue] = w(de), [C, fe] = w(() => Qe(he)), [x, k] = w(l), u = Q(null), v = Q(null);
|
|
70
74
|
L(() => {
|
|
71
75
|
l !== x && k(l);
|
|
72
76
|
}, [l]);
|
|
73
|
-
const
|
|
77
|
+
const ge = (o) => {
|
|
74
78
|
k(o), u.current && clearTimeout(u.current), u.current = setTimeout(() => {
|
|
75
79
|
c == null || c(o);
|
|
76
80
|
}, 300);
|
|
@@ -81,21 +85,21 @@ function ht({
|
|
|
81
85
|
const be = (o) => {
|
|
82
86
|
var q, K, U;
|
|
83
87
|
const t = o || "";
|
|
84
|
-
let
|
|
88
|
+
let h = t;
|
|
85
89
|
if (!t.trim())
|
|
86
|
-
|
|
90
|
+
h = "<!DOCTYPE html><html><head></head><body></body></html>";
|
|
87
91
|
else {
|
|
88
92
|
const a = new DOMParser().parseFromString(t, "text/html"), E = ((q = a.documentElement) == null ? void 0 : q.tagName.toLowerCase()) === "html", Le = ((K = a.head) == null ? void 0 : K.tagName.toLowerCase()) === "head", Te = ((U = a.body) == null ? void 0 : U.tagName.toLowerCase()) === "body";
|
|
89
93
|
if (!E || !Le || !Te) {
|
|
90
94
|
const Ce = a.body ? a.body.innerHTML : t;
|
|
91
|
-
|
|
95
|
+
h = `<!DOCTYPE html><html><head>${a.head ? a.head.innerHTML : ""}</head><body>${Ce}</body></html>`;
|
|
92
96
|
} else
|
|
93
|
-
|
|
97
|
+
h = `<!DOCTYPE html>${a.documentElement.outerHTML}`;
|
|
94
98
|
}
|
|
95
|
-
const Ee = ["script", "iframe", "object", "embed", "canvas"], X = new DOMParser().parseFromString(
|
|
99
|
+
const Ee = ["script", "iframe", "object", "embed", "canvas"], X = new DOMParser().parseFromString(h, "text/html");
|
|
96
100
|
return Ee.forEach((J) => {
|
|
97
101
|
X.querySelectorAll(J).forEach((E) => E.remove());
|
|
98
|
-
}),
|
|
102
|
+
}), h = `<!DOCTYPE html>${X.documentElement.outerHTML}`, h;
|
|
99
103
|
}, y = De(() => be(x), [x]);
|
|
100
104
|
L(() => {
|
|
101
105
|
v.current && v.current.srcdoc !== y && (v.current.srcdoc = y);
|
|
@@ -104,9 +108,9 @@ function ht({
|
|
|
104
108
|
t !== null && pe(t);
|
|
105
109
|
}, ve = (o, t) => {
|
|
106
110
|
(t === "desktop" || t === "mobile") && ue(t);
|
|
107
|
-
}, d = je(), ye =
|
|
108
|
-
(H = (F = d.palette) == null ? void 0 : F.action) == null || H.selected, (P = (M = d.palette) == null ? void 0 : M.primary) == null || P.main, (
|
|
109
|
-
const
|
|
111
|
+
}, d = je(), ye = m === "desktop" || m === "mobile" ? m : "desktop", we = n === "split" || n === "code" || n === "preview" ? n : "split";
|
|
112
|
+
(H = (F = d.palette) == null ? void 0 : F.action) == null || H.selected, (P = (M = d.palette) == null ? void 0 : M.primary) == null || P.main, (O = (I = d.palette) == null ? void 0 : I.action) == null || O.selected, (z = (N = d.palette) == null ? void 0 : N.background) == null || z.paper, (W = (B = d.palette) == null ? void 0 : B.text) == null || W.primary, (j = (V = d.palette) == null ? void 0 : V.action) == null || j.hover;
|
|
113
|
+
const f = {
|
|
110
114
|
tooltip: {
|
|
111
115
|
sx: {
|
|
112
116
|
fontSize: "11px",
|
|
@@ -167,7 +171,7 @@ function ht({
|
|
|
167
171
|
height: "100%",
|
|
168
172
|
extensions: [Fe()],
|
|
169
173
|
theme: T[C] || ie,
|
|
170
|
-
onChange:
|
|
174
|
+
onChange: ge,
|
|
171
175
|
basicSetup: {
|
|
172
176
|
lineNumbers: !0,
|
|
173
177
|
foldGutter: !0,
|
|
@@ -183,7 +187,7 @@ function ht({
|
|
|
183
187
|
height: se,
|
|
184
188
|
overflow: "auto",
|
|
185
189
|
backgroundColor: "#F5F5F5",
|
|
186
|
-
padding:
|
|
190
|
+
padding: m === "mobile" ? "32px 16px" : "16px",
|
|
187
191
|
display: "flex",
|
|
188
192
|
justifyContent: "center"
|
|
189
193
|
}, children: /* @__PURE__ */ e(
|
|
@@ -191,8 +195,8 @@ function ht({
|
|
|
191
195
|
{
|
|
192
196
|
sx: {
|
|
193
197
|
width: "100%",
|
|
194
|
-
maxWidth:
|
|
195
|
-
height:
|
|
198
|
+
maxWidth: m === "mobile" ? "370px" : "100%",
|
|
199
|
+
height: m === "mobile" ? "800px" : "100%",
|
|
196
200
|
border: "none",
|
|
197
201
|
overflow: "hidden"
|
|
198
202
|
},
|
|
@@ -226,7 +230,7 @@ function ht({
|
|
|
226
230
|
...ce
|
|
227
231
|
},
|
|
228
232
|
children: [
|
|
229
|
-
|
|
233
|
+
me && /* @__PURE__ */ s(
|
|
230
234
|
i,
|
|
231
235
|
{
|
|
232
236
|
sx: {
|
|
@@ -249,28 +253,28 @@ function ht({
|
|
|
249
253
|
size: "small",
|
|
250
254
|
"aria-label": r("htmlEditor.mode.split"),
|
|
251
255
|
children: [
|
|
252
|
-
/* @__PURE__ */ e(
|
|
256
|
+
/* @__PURE__ */ e(g, { title: r("htmlEditor.tooltips.splitView"), arrow: !0, slotProps: f, children: /* @__PURE__ */ e(
|
|
253
257
|
b,
|
|
254
258
|
{
|
|
255
259
|
value: "split",
|
|
256
260
|
"aria-label": r("htmlEditor.mode.split"),
|
|
257
|
-
children: /* @__PURE__ */ e(
|
|
261
|
+
children: /* @__PURE__ */ e($e, { fontSize: "small" })
|
|
258
262
|
}
|
|
259
263
|
) }),
|
|
260
|
-
/* @__PURE__ */ e(
|
|
264
|
+
/* @__PURE__ */ e(g, { title: r("htmlEditor.tooltips.codeOnly"), arrow: !0, slotProps: f, children: /* @__PURE__ */ e(
|
|
261
265
|
b,
|
|
262
266
|
{
|
|
263
267
|
value: "code",
|
|
264
268
|
"aria-label": r("htmlEditor.mode.code"),
|
|
265
|
-
children: /* @__PURE__ */ e(
|
|
269
|
+
children: /* @__PURE__ */ e(Ae, { fontSize: "small" })
|
|
266
270
|
}
|
|
267
271
|
) }),
|
|
268
|
-
/* @__PURE__ */ e(
|
|
272
|
+
/* @__PURE__ */ e(g, { title: r("htmlEditor.tooltips.previewOnly"), arrow: !0, slotProps: f, children: /* @__PURE__ */ e(
|
|
269
273
|
b,
|
|
270
274
|
{
|
|
271
275
|
value: "preview",
|
|
272
276
|
"aria-label": r("htmlEditor.mode.preview"),
|
|
273
|
-
children: /* @__PURE__ */ e(
|
|
277
|
+
children: /* @__PURE__ */ e(Ge, { fontSize: "small" })
|
|
274
278
|
}
|
|
275
279
|
) })
|
|
276
280
|
]
|
|
@@ -287,7 +291,7 @@ function ht({
|
|
|
287
291
|
label: r("htmlEditor.theme"),
|
|
288
292
|
onChange: (o) => {
|
|
289
293
|
const t = o.target.value;
|
|
290
|
-
|
|
294
|
+
fe(t), console.log("theme changed to", t), Ze(t);
|
|
291
295
|
},
|
|
292
296
|
sx: {
|
|
293
297
|
// fontSize: '0.875rem',
|
|
@@ -314,7 +318,7 @@ function ht({
|
|
|
314
318
|
size: "small",
|
|
315
319
|
"aria-label": r("htmlEditor.device.desktop"),
|
|
316
320
|
children: [
|
|
317
|
-
/* @__PURE__ */ e(
|
|
321
|
+
/* @__PURE__ */ e(g, { title: r("htmlEditor.tooltips.desktopView"), arrow: !0, slotProps: f, children: /* @__PURE__ */ e(
|
|
318
322
|
b,
|
|
319
323
|
{
|
|
320
324
|
value: "desktop",
|
|
@@ -322,7 +326,7 @@ function ht({
|
|
|
322
326
|
children: /* @__PURE__ */ e(Xe, { fontSize: "small" })
|
|
323
327
|
}
|
|
324
328
|
) }),
|
|
325
|
-
/* @__PURE__ */ e(
|
|
329
|
+
/* @__PURE__ */ e(g, { title: r("htmlEditor.tooltips.mobileView"), arrow: !0, slotProps: f, children: /* @__PURE__ */ e(
|
|
326
330
|
b,
|
|
327
331
|
{
|
|
328
332
|
value: "mobile",
|
|
@@ -361,6 +365,6 @@ function ht({
|
|
|
361
365
|
);
|
|
362
366
|
}
|
|
363
367
|
export {
|
|
364
|
-
|
|
365
|
-
|
|
368
|
+
ft as HtmlEditor,
|
|
369
|
+
ft as default
|
|
366
370
|
};
|