@kgalexander/mcreate 0.0.10 → 0.0.12
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/{chunk-WO43X63M.mjs → chunk-PL5EKNN6.mjs} +37 -30
- package/dist/{core-EII6HF7K.mjs → core-UL57QVFL.mjs} +1 -1
- package/dist/index.d.mts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +619 -609
- package/dist/index.mjs +19 -9
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
MAX_FONT_SIZE,
|
|
30
30
|
MAX_LETTER_SPACING,
|
|
31
31
|
MAX_LINE_HEIGHT,
|
|
32
|
+
MAX_PAID_LEVEL,
|
|
32
33
|
MAX_TEMPLATE_SIZE,
|
|
33
34
|
MIN_FONT_SIZE,
|
|
34
35
|
MIN_LETTER_SPACING,
|
|
@@ -59,9 +60,8 @@ import {
|
|
|
59
60
|
parsePrice,
|
|
60
61
|
setupDragImage,
|
|
61
62
|
useEditorStore,
|
|
62
|
-
useSidebarContext
|
|
63
|
-
|
|
64
|
-
} from "./chunk-WO43X63M.mjs";
|
|
63
|
+
useSidebarContext
|
|
64
|
+
} from "./chunk-PL5EKNN6.mjs";
|
|
65
65
|
|
|
66
66
|
// src/core/editor/components/email-template-v2/header.tsx
|
|
67
67
|
import { ArrowLeftIcon, CopyIcon, MegaphoneIcon, MoreHorizontalIcon, PencilIcon, TrashIcon } from "lucide-react";
|
|
@@ -690,8 +690,8 @@ import { EyeOff } from "lucide-react";
|
|
|
690
690
|
import { CheckIcon } from "lucide-react";
|
|
691
691
|
import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
692
692
|
var StylesBadge = ({ value }) => {
|
|
693
|
-
const {
|
|
694
|
-
const
|
|
693
|
+
const { template, setShowCompanyFooter, isPaidLevel } = useEditorStore();
|
|
694
|
+
const isPaid = isPaidLevel >= 1;
|
|
695
695
|
const showCompanyFooter = useMemo(() => {
|
|
696
696
|
return template.content[0]?.data?.value?.showCompanyFooter ?? true;
|
|
697
697
|
}, [template]);
|
|
@@ -7810,21 +7810,31 @@ function useAutoSave() {
|
|
|
7810
7810
|
// src/core/editor/components/email-template-v2/template-page.tsx
|
|
7811
7811
|
import "react-json-view-lite/dist/index.css";
|
|
7812
7812
|
import { jsx as jsx67, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
7813
|
-
var Editor2 = lazy(() => import("./core-
|
|
7813
|
+
var Editor2 = lazy(() => import("./core-UL57QVFL.mjs").then((module) => ({
|
|
7814
7814
|
default: module.Editor
|
|
7815
7815
|
})));
|
|
7816
7816
|
function TemplatePage({
|
|
7817
7817
|
templateId,
|
|
7818
7818
|
initialTemplate,
|
|
7819
|
-
onSave
|
|
7819
|
+
onSave,
|
|
7820
|
+
isPaidLevel = 0
|
|
7820
7821
|
}) {
|
|
7822
|
+
console.log("Template page rendered!");
|
|
7823
|
+
if (isPaidLevel > MAX_PAID_LEVEL) {
|
|
7824
|
+
console.warn("This paid level is invalid:", isPaidLevel);
|
|
7825
|
+
} else {
|
|
7826
|
+
console.log("This paid level is valid:", isPaidLevel);
|
|
7827
|
+
}
|
|
7821
7828
|
useState18(() => {
|
|
7822
|
-
useEditorStore.getState().initializeWithTemplate(templateId, initialTemplate, onSave);
|
|
7829
|
+
useEditorStore.getState().initializeWithTemplate(templateId, initialTemplate, onSave, isPaidLevel);
|
|
7823
7830
|
});
|
|
7824
7831
|
useAutoSave();
|
|
7825
7832
|
const [editorLoading, setEditorLoading] = useState18(false);
|
|
7826
7833
|
const [isPageHovered, setIsPageHovered] = useState18(false);
|
|
7827
|
-
const
|
|
7834
|
+
const template = useEditorStore((state) => state.template);
|
|
7835
|
+
const previewMode = useEditorStore((state) => state.previewMode);
|
|
7836
|
+
const focusIdx = useEditorStore((state) => state.focusIdx);
|
|
7837
|
+
const setFocusIdx = useEditorStore((state) => state.setFocusIdx);
|
|
7828
7838
|
const canvasBackgroundColor = template?.content?.[0]?.attributes?.["background-color"] || "#ffffff";
|
|
7829
7839
|
const handlePageClick = (e) => {
|
|
7830
7840
|
if (!previewMode && e.target === e.currentTarget) {
|