create-email-template 0.1.6 → 0.3.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.
- package/README.md +63 -19
- package/SKILL.md +173 -0
- package/dist/block-views-builtin.d.ts +6 -0
- package/dist/block-views-builtin.d.ts.map +1 -0
- package/dist/block-views.d.ts +124 -0
- package/dist/block-views.d.ts.map +1 -0
- package/dist/components/builder/canvas.d.ts.map +1 -1
- package/dist/components/builder/editable-block-renderer.d.ts +27 -0
- package/dist/components/builder/editable-block-renderer.d.ts.map +1 -1
- package/dist/components/builder/email-builder.d.ts.map +1 -1
- package/dist/components/builder/field-editors.d.ts +36 -0
- package/dist/components/builder/field-editors.d.ts.map +1 -0
- package/dist/components/builder/nested-block-list.d.ts +8 -0
- package/dist/components/builder/nested-block-list.d.ts.map +1 -0
- package/dist/components/builder/nested-blocks.d.ts +6 -0
- package/dist/components/builder/nested-blocks.d.ts.map +1 -0
- package/dist/components/builder/properties-panel.d.ts +1 -2
- package/dist/components/builder/properties-panel.d.ts.map +1 -1
- package/dist/components/builder/settings-dialog.d.ts +7 -0
- package/dist/components/builder/settings-dialog.d.ts.map +1 -0
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/types.d.ts +45 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/core/blocks.d.ts +19 -6
- package/dist/core/blocks.d.ts.map +1 -1
- package/dist/core/build.d.ts +2 -0
- package/dist/core/build.d.ts.map +1 -0
- package/dist/core/render.d.ts.map +1 -1
- package/dist/footer-presets.d.ts +9 -0
- package/dist/footer-presets.d.ts.map +1 -0
- package/dist/gallery-presets.d.ts +9 -0
- package/dist/gallery-presets.d.ts.map +1 -0
- package/dist/hooks/use-email-builder.d.ts +3 -2
- package/dist/hooks/use-email-builder.d.ts.map +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29836 -22830
- package/dist/index.js.map +1 -1
- package/dist/list-presets.d.ts +9 -0
- package/dist/list-presets.d.ts.map +1 -0
- package/dist/pricing-presets.d.ts +9 -0
- package/dist/pricing-presets.d.ts.map +1 -0
- package/dist/product-presets.d.ts +9 -0
- package/dist/product-presets.d.ts.map +1 -0
- package/dist/register-builtin-views.d.ts +2 -0
- package/dist/register-builtin-views.d.ts.map +1 -0
- package/dist/store/block-tree.d.ts +18 -0
- package/dist/store/block-tree.d.ts.map +1 -0
- package/dist/store/create-email-builder-store.d.ts +6 -2
- package/dist/store/create-email-builder-store.d.ts.map +1 -1
- package/dist/store/email-builder-provider.d.ts +3 -2
- package/dist/store/email-builder-provider.d.ts.map +1 -1
- package/llms.txt +17 -0
- package/package.json +5 -3
package/dist/config/types.d.ts
CHANGED
|
@@ -4,6 +4,24 @@ import type { EmailVariable, EmailVariableSection } from "../core/variables";
|
|
|
4
4
|
export type DistributivePartial<T> = T extends unknown ? Partial<T> : never;
|
|
5
5
|
/** Sube una imagen y devuelve su URL (R2, S3, tu API, etc.). */
|
|
6
6
|
export type UploadImage = (file: File) => Promise<string>;
|
|
7
|
+
/**
|
|
8
|
+
* Sube un documento (PDF, DOC, XLS…) y devuelve su URL **pública**: el
|
|
9
|
+
* destinatario la usa para descargar y tu backend para adjuntarlo al enviar.
|
|
10
|
+
* Los `blob:`/`data:` locales solo sirven para previsualizar en el editor.
|
|
11
|
+
*/
|
|
12
|
+
export type UploadFile = (file: File) => Promise<string>;
|
|
13
|
+
/** Límites y formatos aceptados por el gestor de archivos de Ajustes. */
|
|
14
|
+
export interface EmailBuilderFileOptions {
|
|
15
|
+
/** Atributo `accept` del input (extensiones/MIME). */
|
|
16
|
+
accept: string;
|
|
17
|
+
/** Tamaño máximo por archivo en MB. */
|
|
18
|
+
maxSizeMb: number;
|
|
19
|
+
/** Cantidad máxima de archivos subidos. */
|
|
20
|
+
maxCount: number;
|
|
21
|
+
/** Avisa (sin bloquear) si el total de adjuntos supera estos MB. */
|
|
22
|
+
warnTotalMb: number;
|
|
23
|
+
}
|
|
24
|
+
export declare const DEFAULT_FILE_OPTIONS: EmailBuilderFileOptions;
|
|
7
25
|
/**
|
|
8
26
|
* Valores por defecto personalizados por tipo de bloque.
|
|
9
27
|
* Se aplican sobre los defaults de la librería (o sobre un `blockLibrary` custom).
|
|
@@ -19,6 +37,10 @@ export interface EmailBuilderLabels {
|
|
|
19
37
|
editInlineHint: string;
|
|
20
38
|
listEditHint: string;
|
|
21
39
|
columnsEditHint: string;
|
|
40
|
+
containerEditHint: string;
|
|
41
|
+
gridEditHint: string;
|
|
42
|
+
footerEditHint: string;
|
|
43
|
+
pricingEditHint: string;
|
|
22
44
|
addListItem: string;
|
|
23
45
|
listItemPlaceholder: string;
|
|
24
46
|
imagePlaceholder: string;
|
|
@@ -51,7 +73,26 @@ export interface EmailBuilderLabels {
|
|
|
51
73
|
pageBackground: string;
|
|
52
74
|
cardBorderWidth: string;
|
|
53
75
|
cardBorderRadius: string;
|
|
76
|
+
fontFamily: string;
|
|
77
|
+
fontCustom: string;
|
|
78
|
+
files: string;
|
|
79
|
+
filesHint: string;
|
|
80
|
+
filesEmpty: string;
|
|
81
|
+
uploadFile: string;
|
|
82
|
+
fileUploaded: string;
|
|
83
|
+
fileUploadError: string;
|
|
84
|
+
fileTooLarge: string;
|
|
85
|
+
fileTypeNotAllowed: string;
|
|
86
|
+
tooManyFiles: string;
|
|
87
|
+
totalSizeWarning: string;
|
|
88
|
+
attachFile: string;
|
|
89
|
+
linkFile: string;
|
|
90
|
+
copyFileUrl: string;
|
|
91
|
+
fileNotPublic: string;
|
|
92
|
+
removeFile: string;
|
|
93
|
+
downloadsHint: string;
|
|
54
94
|
settings: string;
|
|
95
|
+
settingsHint: string;
|
|
55
96
|
deviceMobile: string;
|
|
56
97
|
deviceDesktop: string;
|
|
57
98
|
canvasPreview: string;
|
|
@@ -74,6 +115,8 @@ export interface EmailBuilderConfig {
|
|
|
74
115
|
blockDefaults?: BlockDefaultsMap;
|
|
75
116
|
palette?: Partial<EmailPalette>;
|
|
76
117
|
defaultSettings?: Partial<EmailSettings>;
|
|
118
|
+
/** Límites y formatos de la subida de archivos (Ajustes). */
|
|
119
|
+
files?: Partial<EmailBuilderFileOptions>;
|
|
77
120
|
sampleContext?: EmailContext;
|
|
78
121
|
labels?: Partial<EmailBuilderLabels>;
|
|
79
122
|
/** Profundidad máxima del historial de deshacer. Default: 50. */
|
|
@@ -86,8 +129,10 @@ export interface ResolvedEmailBuilderConfig {
|
|
|
86
129
|
blockMap: Record<EmailBlockType, BlockDefinition>;
|
|
87
130
|
palette: EmailPalette;
|
|
88
131
|
defaultSettings: EmailSettings;
|
|
132
|
+
files: EmailBuilderFileOptions;
|
|
89
133
|
sampleContext: EmailContext;
|
|
90
134
|
uploadImage?: UploadImage;
|
|
135
|
+
uploadFile?: UploadFile;
|
|
91
136
|
labels: EmailBuilderLabels;
|
|
92
137
|
historyLimit: number;
|
|
93
138
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,UAAU,EACV,eAAe,EACf,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,aAAa,EACd,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE7E,2EAA2E;AAC3E,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;AAE5E,gEAAgE;AAChE,MAAM,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAE1D;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,CACpC,MAAM,CAAC,cAAc,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC,CAC7D,CAAC;AAEF,MAAM,WAAW,kBAAkB;IAC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AO,EAAE,UAAU,EAAE,CAAC;IACtB,QAAQ,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,eAAe,CAAC,KAAK,GAAG,OAAO;IAC9C,EAAE,EAAE,IAAI,CAAC;IACT,sEAAsE;IACtE,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,eAAe,CAAC;IACzB,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe,CAAC,KAAK,GAAG,OAAO;IAC9C;;;;OAIG;IACH,MAAM,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC;IACrD,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iFAAiF;IACjF,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,CAAC,KAAK,CAAC,GAAG,aAAa,KAAK,IAAI,CAAC;CACpE"}
|
package/dist/core/blocks.d.ts
CHANGED
|
@@ -1,27 +1,38 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import type { EmailBlock, EmailBlockProps, EmailContext, EmailPalette } from "./types";
|
|
2
|
+
import type { EmailBlock, EmailBlockProps, EmailContext, EmailPalette, EmailFileAttachment } from "./types";
|
|
3
|
+
import { type BlockPreviewProps } from "../block-views";
|
|
3
4
|
export declare const alignMap: {
|
|
4
5
|
readonly left: "left";
|
|
5
6
|
readonly center: "center";
|
|
6
7
|
readonly right: "right";
|
|
7
8
|
};
|
|
8
9
|
export { alignMap as blockAlignMap };
|
|
9
|
-
export declare const blockPadding: (props: EmailBlockProps) =>
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
export declare const blockPadding: (props: EmailBlockProps) => React.CSSProperties;
|
|
11
|
+
/** Padding por lado + márgenes externos (paridad con el render HTML). */
|
|
12
|
+
export declare const blockSpacing: (props: EmailBlockProps) => React.CSSProperties;
|
|
13
|
+
/**
|
|
14
|
+
* Archivos globales del correo (`settings.files`): se suben en Ajustes y el
|
|
15
|
+
* bloque `downloads` los lee de aquí. El contexto los baja por cualquier
|
|
16
|
+
* anidamiento (contenedor/columnas/grid) sin pasarlos por props.
|
|
17
|
+
*/
|
|
18
|
+
export declare const EmailFilesContext: React.Context<EmailFileAttachment[]>;
|
|
19
|
+
/** Preview components react-email por tipo — alimentan el registry de vistas. */
|
|
20
|
+
export declare const PREVIEW_COMPONENTS: Record<string, React.ComponentType<BlockPreviewProps>>;
|
|
12
21
|
export declare const BlockRenderer: ({ block, context, palette, }: {
|
|
13
22
|
block: EmailBlock;
|
|
14
23
|
context: EmailContext;
|
|
15
24
|
palette?: EmailPalette;
|
|
16
25
|
}) => React.JSX.Element | null;
|
|
17
|
-
export declare const EmailBody: ({ blocks, context, palette, cardBorderWidth, cardBorderRadius, }: {
|
|
26
|
+
export declare const EmailBody: ({ blocks, context, palette, cardBorderWidth, cardBorderRadius, fontFamily, files, }: {
|
|
18
27
|
blocks: EmailBlock[];
|
|
19
28
|
context: EmailContext;
|
|
20
29
|
palette?: EmailPalette;
|
|
21
30
|
cardBorderWidth?: number;
|
|
22
31
|
cardBorderRadius?: number;
|
|
32
|
+
fontFamily?: string;
|
|
33
|
+
files?: EmailFileAttachment[];
|
|
23
34
|
}) => React.JSX.Element;
|
|
24
|
-
export declare const EmailTemplate: ({ blocks, subject, context, palette, pageBackground, cardBorderWidth, cardBorderRadius, }: {
|
|
35
|
+
export declare const EmailTemplate: ({ blocks, subject, context, palette, pageBackground, cardBorderWidth, cardBorderRadius, fontFamily, files, }: {
|
|
25
36
|
blocks: EmailBlock[];
|
|
26
37
|
subject: string;
|
|
27
38
|
context: EmailContext;
|
|
@@ -29,5 +40,7 @@ export declare const EmailTemplate: ({ blocks, subject, context, palette, pageBa
|
|
|
29
40
|
pageBackground?: string;
|
|
30
41
|
cardBorderWidth?: number;
|
|
31
42
|
cardBorderRadius?: number;
|
|
43
|
+
fontFamily?: string;
|
|
44
|
+
files?: EmailFileAttachment[];
|
|
32
45
|
}) => React.JSX.Element;
|
|
33
46
|
//# sourceMappingURL=blocks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../src/core/blocks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,OAAO,KAAK,EACV,UAAU,EACV,eAAe,EACf,YAAY,EACZ,YAAY,
|
|
1
|
+
{"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../src/core/blocks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,OAAO,KAAK,EACV,UAAU,EACV,eAAe,EACf,YAAY,EACZ,YAAY,EA6BZ,mBAAmB,EACpB,MAAM,SAAS,CAAA;AAKhB,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAErE,eAAO,MAAM,QAAQ;;;;CAIX,CAAA;AAEV,OAAO,EAAE,QAAQ,IAAI,aAAa,EAAE,CAAA;AAEpC,eAAO,MAAM,YAAY,GAAI,OAAO,eAAe,KAAG,KAAK,CAAC,aAwB3D,CAAA;AAED,yEAAyE;AACzE,eAAO,MAAM,YAAY,GAAI,OAAO,eAAe,KAAG,KAAK,CAAC,aAY3D,CAAA;AAytBD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,sCAAiD,CAAA;AAykC/E,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,EAAE,MAAM,CACrC,MAAM,EACN,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,CA4BvC,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,8BAI3B;IACD,KAAK,EAAE,UAAU,CAAA;IACjB,OAAO,EAAE,YAAY,CAAA;IACrB,OAAO,CAAC,EAAE,YAAY,CAAA;CACvB,6BAIA,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,qFAQvB;IACD,MAAM,EAAE,UAAU,EAAE,CAAA;IACpB,OAAO,EAAE,YAAY,CAAA;IACrB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,mBAAmB,EAAE,CAAA;CAC9B,sBAsBA,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,8GAU3B;IACD,MAAM,EAAE,UAAU,EAAE,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,YAAY,CAAA;IACrB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,mBAAmB,EAAE,CAAA;CAC9B,sBAuBA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/core/build.ts"],"names":[],"mappings":"AAEA,cAAc,6BAA6B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/core/render.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,aAAa,EACd,MAAM,SAAS,CAAC;AAIjB,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAMD,eAAO,MAAM,eAAe,GAAU,kDAMnC,sBAAsB,KAAG,OAAO,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/core/render.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,aAAa,EACd,MAAM,SAAS,CAAC;AAIjB,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAMD,eAAO,MAAM,eAAe,GAAU,kDAMnC,sBAAsB,KAAG,OAAO,CAAC,MAAM,CAavC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type FooterVariant = "classic" | "one-column" | "two-columns";
|
|
2
|
+
export interface FooterVariantDef {
|
|
3
|
+
value: FooterVariant;
|
|
4
|
+
label: string;
|
|
5
|
+
/** Patch de props para `set` al cambiar de variante (ids frescos). */
|
|
6
|
+
build: () => Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
export declare const FOOTER_VARIANTS: FooterVariantDef[];
|
|
9
|
+
//# sourceMappingURL=footer-presets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footer-presets.d.ts","sourceRoot":"","sources":["../src/footer-presets.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,YAAY,GAAG,aAAa,CAAA;AAEpE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,aAAa,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,sEAAsE;IACtE,KAAK,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACrC;AA8ID,eAAO,MAAM,eAAe,EAAE,gBAAgB,EAiC7C,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { GalleryVariant } from "./core/types";
|
|
2
|
+
export interface GalleryVariantDef {
|
|
3
|
+
value: GalleryVariant;
|
|
4
|
+
label: string;
|
|
5
|
+
/** Patch de props para `set` al cambiar de diseño (ids frescos). */
|
|
6
|
+
build: () => Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
export declare const GALLERY_VARIANTS: GalleryVariantDef[];
|
|
9
|
+
//# sourceMappingURL=gallery-presets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gallery-presets.d.ts","sourceRoot":"","sources":["../src/gallery-presets.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAgB,cAAc,EAAE,MAAM,cAAc,CAAA;AAEhE,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,cAAc,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,oEAAoE;IACpE,KAAK,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACrC;AAeD,eAAO,MAAM,gBAAgB,EAAE,iBAAiB,EA2D/C,CAAA"}
|
|
@@ -8,6 +8,7 @@ export declare const useEmailBuilder: () => {
|
|
|
8
8
|
sampleContext: EmailContext;
|
|
9
9
|
labels: import("..").EmailBuilderLabels;
|
|
10
10
|
uploadImage: import("..").UploadImage | undefined;
|
|
11
|
+
uploadFile: import("..").UploadFile | undefined;
|
|
11
12
|
blocks: import("create-email-renderer").EmailBlock[];
|
|
12
13
|
selectedId: string | null;
|
|
13
14
|
propertiesOpen: boolean;
|
|
@@ -18,8 +19,8 @@ export declare const useEmailBuilder: () => {
|
|
|
18
19
|
settings?: Partial<import("create-email-renderer").EmailSettings>;
|
|
19
20
|
}) => void;
|
|
20
21
|
setSettings: (patch: Partial<import("create-email-renderer").EmailSettings>) => void;
|
|
21
|
-
addBlock: (type: import("create-email-renderer").EmailBlockType, index?: number) => void;
|
|
22
|
-
reorder: (activeIndex: number, overIndex: number) => void;
|
|
22
|
+
addBlock: (type: import("create-email-renderer").EmailBlockType, index?: number, location?: import("..").BlockLocation) => void;
|
|
23
|
+
reorder: (activeIndex: number, overIndex: number, location?: import("..").BlockLocation) => void;
|
|
23
24
|
updateBlockProps: (id: string, props: import("create-email-renderer").EmailBlockProps) => void;
|
|
24
25
|
removeBlock: (id: string) => void;
|
|
25
26
|
duplicateBlock: (id: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-email-builder.d.ts","sourceRoot":"","sources":["../../src/hooks/use-email-builder.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AASlD,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"use-email-builder.d.ts","sourceRoot":"","sources":["../../src/hooks/use-email-builder.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AASlD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;gBAiBS,CAAC;;;;;;;;;;;;wBAKpB;QAAE,OAAO,CAAC,EAAE,YAAY,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;oBAoBnD,MAAM,YAAY,YAAY,KAAG,MAAM;CAqCjD,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "./index.css";
|
|
2
|
+
import "./register-builtin-views";
|
|
2
3
|
export * from "./core/types";
|
|
3
4
|
export * from "./core/default-blocks";
|
|
4
5
|
export * from "./core/variables";
|
|
@@ -8,6 +9,14 @@ export * from "./core/blocks";
|
|
|
8
9
|
export * from "./core/render";
|
|
9
10
|
export * from "./config/types";
|
|
10
11
|
export * from "./config/defaults";
|
|
12
|
+
export * from "./block-views";
|
|
13
|
+
export * from "./components/builder/field-editors";
|
|
14
|
+
export * from "./footer-presets";
|
|
15
|
+
export * from "./core/build";
|
|
16
|
+
export * from "./gallery-presets";
|
|
17
|
+
export * from "./list-presets";
|
|
18
|
+
export * from "./product-presets";
|
|
19
|
+
export * from "./pricing-presets";
|
|
11
20
|
export * from "./store/create-email-builder-store";
|
|
12
21
|
export * from "./store/email-builder-provider";
|
|
13
22
|
export * from "./hooks/use-email-builder";
|
|
@@ -22,4 +31,5 @@ export * from "./components/builder/properties-panel";
|
|
|
22
31
|
export * from "./components/builder/inline-text-editor";
|
|
23
32
|
export * from "./components/builder/selection-toolbar";
|
|
24
33
|
export * from "./components/builder/variables-info-dialog";
|
|
34
|
+
export * from "./components/builder/settings-dialog";
|
|
25
35
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAGrB,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAG9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAG/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,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