@kgalexander/mcreate 1.0.11 → 1.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.
|
@@ -1243,6 +1243,8 @@ function json2mjml(template, mode = "production", options = {}) {
|
|
|
1243
1243
|
<mj-head>
|
|
1244
1244
|
|
|
1245
1245
|
<mj-breakpoint width="480px" />
|
|
1246
|
+
<mj-preview>${options.previewText ?? template?.preview ?? ""}</mj-preview>
|
|
1247
|
+
|
|
1246
1248
|
${mjFontTags}
|
|
1247
1249
|
|
|
1248
1250
|
<mj-style>
|
package/dist/index.d.mts
CHANGED
|
@@ -254,6 +254,7 @@ type TemplateJSON = {
|
|
|
254
254
|
id: string;
|
|
255
255
|
name: string;
|
|
256
256
|
image: string;
|
|
257
|
+
preview: string;
|
|
257
258
|
version: string;
|
|
258
259
|
published: boolean;
|
|
259
260
|
creator: string;
|
|
@@ -368,6 +369,7 @@ declare function campaign_validation_warnings(): {
|
|
|
368
369
|
type RenderMode = 'production' | 'editing';
|
|
369
370
|
interface RenderOptions {
|
|
370
371
|
isPaidLevel?: number;
|
|
372
|
+
previewText?: string;
|
|
371
373
|
}
|
|
372
374
|
/**
|
|
373
375
|
* Convert template JSON to MJML string
|
package/dist/index.d.ts
CHANGED
|
@@ -254,6 +254,7 @@ type TemplateJSON = {
|
|
|
254
254
|
id: string;
|
|
255
255
|
name: string;
|
|
256
256
|
image: string;
|
|
257
|
+
preview: string;
|
|
257
258
|
version: string;
|
|
258
259
|
published: boolean;
|
|
259
260
|
creator: string;
|
|
@@ -368,6 +369,7 @@ declare function campaign_validation_warnings(): {
|
|
|
368
369
|
type RenderMode = 'production' | 'editing';
|
|
369
370
|
interface RenderOptions {
|
|
370
371
|
isPaidLevel?: number;
|
|
372
|
+
previewText?: string;
|
|
371
373
|
}
|
|
372
374
|
/**
|
|
373
375
|
* Convert template JSON to MJML string
|
package/dist/index.js
CHANGED
|
@@ -1326,6 +1326,8 @@ function json2mjml(template, mode = "production", options = {}) {
|
|
|
1326
1326
|
<mj-head>
|
|
1327
1327
|
|
|
1328
1328
|
<mj-breakpoint width="480px" />
|
|
1329
|
+
<mj-preview>${options.previewText ?? template?.preview ?? ""}</mj-preview>
|
|
1330
|
+
|
|
1329
1331
|
${mjFontTags}
|
|
1330
1332
|
|
|
1331
1333
|
<mj-style>
|
|
@@ -18225,11 +18227,11 @@ function PreviewSection({
|
|
|
18225
18227
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
18226
18228
|
Button,
|
|
18227
18229
|
{
|
|
18228
|
-
variant: "
|
|
18230
|
+
variant: "ghost",
|
|
18229
18231
|
size: "icon-sm",
|
|
18230
18232
|
onClick: () => scroll("left"),
|
|
18231
18233
|
className: cn(
|
|
18232
|
-
"absolute left-1 top-1/2 -translate-y-1/2 z-10 cursor-pointer rounded-full",
|
|
18234
|
+
"absolute left-1 top-1/2 -translate-y-1/2 z-10 cursor-pointer shadow-md border border-border rounded-full bg-white text-muted-foreground hover:bg-muted hover:dark:bg-muted-foreground",
|
|
18233
18235
|
!canGoLeft && "hidden"
|
|
18234
18236
|
),
|
|
18235
18237
|
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react34.ChevronLeftIcon, { className: "size-6 " })
|
|
@@ -18248,11 +18250,11 @@ function PreviewSection({
|
|
|
18248
18250
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
18249
18251
|
Button,
|
|
18250
18252
|
{
|
|
18251
|
-
variant: "
|
|
18253
|
+
variant: "ghost",
|
|
18252
18254
|
size: "icon-sm",
|
|
18253
18255
|
onClick: () => scroll("right"),
|
|
18254
18256
|
className: cn(
|
|
18255
|
-
"absolute right-1 top-1/2 -translate-y-1/2 z-10 cursor-pointer rounded-full",
|
|
18257
|
+
"absolute right-1 top-1/2 -translate-y-1/2 z-10 cursor-pointer shadow-md border border-border rounded-full bg-white text-muted-foreground hover:bg-muted hover:dark:bg-muted-foreground",
|
|
18256
18258
|
!canGoRight && "hidden"
|
|
18257
18259
|
),
|
|
18258
18260
|
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react34.ChevronRightIcon, { className: "size-6" })
|
package/dist/index.mjs
CHANGED
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
useSidebarContext,
|
|
65
65
|
validate_campaign_onCreate,
|
|
66
66
|
validate_editor_onPreview
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-RKZFFE24.mjs";
|
|
68
68
|
|
|
69
69
|
// src/core/editor/components/email-template-v2/header.tsx
|
|
70
70
|
import { ArrowLeftIcon, CopyIcon, MegaphoneIcon, MoreHorizontalIcon, PencilIcon, SendIcon, TrashIcon } from "lucide-react";
|
|
@@ -1338,11 +1338,11 @@ function PreviewSection({
|
|
|
1338
1338
|
/* @__PURE__ */ jsx5(
|
|
1339
1339
|
Button,
|
|
1340
1340
|
{
|
|
1341
|
-
variant: "
|
|
1341
|
+
variant: "ghost",
|
|
1342
1342
|
size: "icon-sm",
|
|
1343
1343
|
onClick: () => scroll("left"),
|
|
1344
1344
|
className: cn(
|
|
1345
|
-
"absolute left-1 top-1/2 -translate-y-1/2 z-10 cursor-pointer rounded-full",
|
|
1345
|
+
"absolute left-1 top-1/2 -translate-y-1/2 z-10 cursor-pointer shadow-md border border-border rounded-full bg-white text-muted-foreground hover:bg-muted hover:dark:bg-muted-foreground",
|
|
1346
1346
|
!canGoLeft && "hidden"
|
|
1347
1347
|
),
|
|
1348
1348
|
children: /* @__PURE__ */ jsx5(ChevronLeftIcon, { className: "size-6 " })
|
|
@@ -1361,11 +1361,11 @@ function PreviewSection({
|
|
|
1361
1361
|
/* @__PURE__ */ jsx5(
|
|
1362
1362
|
Button,
|
|
1363
1363
|
{
|
|
1364
|
-
variant: "
|
|
1364
|
+
variant: "ghost",
|
|
1365
1365
|
size: "icon-sm",
|
|
1366
1366
|
onClick: () => scroll("right"),
|
|
1367
1367
|
className: cn(
|
|
1368
|
-
"absolute right-1 top-1/2 -translate-y-1/2 z-10 cursor-pointer rounded-full",
|
|
1368
|
+
"absolute right-1 top-1/2 -translate-y-1/2 z-10 cursor-pointer shadow-md border border-border rounded-full bg-white text-muted-foreground hover:bg-muted hover:dark:bg-muted-foreground",
|
|
1369
1369
|
!canGoRight && "hidden"
|
|
1370
1370
|
),
|
|
1371
1371
|
children: /* @__PURE__ */ jsx5(ChevronRightIcon, { className: "size-6" })
|
|
@@ -12283,7 +12283,7 @@ function useAutoSave() {
|
|
|
12283
12283
|
// src/core/editor/components/email-template-v2/template-page.tsx
|
|
12284
12284
|
import "react-json-view-lite/dist/index.css";
|
|
12285
12285
|
import { jsx as jsx75, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
12286
|
-
var Editor2 = lazy(() => import("./core-
|
|
12286
|
+
var Editor2 = lazy(() => import("./core-IGOHPWMU.mjs").then((module) => ({
|
|
12287
12287
|
default: module.Editor
|
|
12288
12288
|
})));
|
|
12289
12289
|
function TemplatePage({
|