create-email-template 0.1.5 → 0.2.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 +9 -0
- package/SKILL.md +145 -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 +22 -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/config/types.d.ts +6 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/core/blocks.d.ts +10 -5
- 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/id.d.ts +1 -1
- package/dist/core/id.d.ts.map +1 -1
- 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 +12 -12
- package/dist/hooks/use-email-builder.d.ts.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27067 -20760
- 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/llms.txt +15 -0
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -4,6 +4,15 @@ Editor visual de plantillas de email por bloques para React: palette, canvas con
|
|
|
4
4
|
|
|
5
5
|
El JSON que produce se renderiza a HTML email-safe con su compañero [`create-email-renderer`](https://www.npmjs.com/package/create-email-renderer) (**sin React**, pensado para backend/edge). Ambas librerías comparten el mismo core, por lo que el preview del editor y el HTML final nunca divergen.
|
|
6
6
|
|
|
7
|
+
## ¿Programas con una IA o vas a integrarlo?
|
|
8
|
+
|
|
9
|
+
- **[`SKILL.md`](./SKILL.md)** — orientación para agentes: provider, hooks, store, presets, CSS
|
|
10
|
+
obligatorio y errores comunes.
|
|
11
|
+
- **[`llms.txt`](./llms.txt)** — índice corto.
|
|
12
|
+
- **Catálogo de bloques** (core compartido): `node_modules/create-email-renderer/docs/BLOCKS.md`
|
|
13
|
+
— props, defaults, variantes y ejemplos de los 25 bloques.
|
|
14
|
+
- **Guía de MCP**: `node_modules/create-email-renderer/docs/MCP.md`.
|
|
15
|
+
|
|
7
16
|
## Instalación
|
|
8
17
|
|
|
9
18
|
```sh
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-email-template
|
|
3
|
+
description: React email template builder UI (drag & drop editor with autosave) backed by create-email-renderer
|
|
4
|
+
licence: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: asmel2020
|
|
7
|
+
version: 1.0.0
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Skill: `create-email-template`
|
|
11
|
+
|
|
12
|
+
Editor visual de plantillas de email para React. Se apoya en `create-email-renderer` (el core sin
|
|
13
|
+
React) para tipos, defaults, normalización y el HTML final → **el preview del editor y el HTML
|
|
14
|
+
del back-end nunca divergen**.
|
|
15
|
+
|
|
16
|
+
- 📖 Catálogo de bloques, props y defaults: [`create-email-renderer/docs/BLOCKS.md`](../create-email-renderer/docs/BLOCKS.md)
|
|
17
|
+
- 🔌 Exponer un MCP en el back-end: [`create-email-renderer/docs/MCP.md`](../create-email-renderer/docs/MCP.md)
|
|
18
|
+
|
|
19
|
+
> Instalado desde npm, el catálogo vive en
|
|
20
|
+
> `node_modules/create-email-renderer/docs/BLOCKS.md`.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Cuándo usar esto
|
|
25
|
+
|
|
26
|
+
- Meter un editor de correos en tu app (drag & drop, panel de propiedades, undo, autosave).
|
|
27
|
+
- Cargar una plantilla guardada para editarla y volver a guardarla.
|
|
28
|
+
- Reusar el **payload** (`{ content, settings }`) que tu back-end renderiza con
|
|
29
|
+
`create-email-renderer`.
|
|
30
|
+
|
|
31
|
+
## Instalación y CSS (importante)
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
npm install create-email-template create-email-renderer
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
import { EmailBuilderProvider, EmailBuilder } from "create-email-template";
|
|
39
|
+
import "create-email-template/style.css"; // ← OBLIGATORIO
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
El CSS es **autocontenido** (fuente Geist inline) y está **scopeado bajo `.ter-theme`**. El
|
|
43
|
+
consumidor debe importarlo explícitamente; sin él, el editor se ve sin estilos.
|
|
44
|
+
|
|
45
|
+
## Uso mínimo
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
<EmailBuilderProvider
|
|
49
|
+
config={{ variables: [{ key: "firstName", label: "Nombre" }] }}
|
|
50
|
+
autosave={{ onSave: async (payload) => { await api.put(`/templates/${id}`, payload); } }}
|
|
51
|
+
>
|
|
52
|
+
<EmailBuilder />
|
|
53
|
+
</EmailBuilderProvider>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`onSave` recibe el payload `{ content, settings }`; la librería **no** hace red.
|
|
57
|
+
|
|
58
|
+
## API pública
|
|
59
|
+
|
|
60
|
+
### Componentes
|
|
61
|
+
|
|
62
|
+
| Componente | Para qué |
|
|
63
|
+
|---|---|
|
|
64
|
+
| `EmailBuilder` | Editor completo (paleta + canvas + panel). |
|
|
65
|
+
| `BlockPalette` | Paleta de bloques suelta. |
|
|
66
|
+
| `Canvas` / `SortableCanvas` | Lienzo con drag & drop. |
|
|
67
|
+
| `EditableBlockRenderer` | Render editable de un bloque concreto. |
|
|
68
|
+
| `PropertiesPanel` | Panel de propiedades schema-driven. |
|
|
69
|
+
| `InlineTextEditor`, `SelectionToolbar`, `VariablesInfoDialog` | Piezas internas reutilizables. |
|
|
70
|
+
|
|
71
|
+
### Hooks (siempre dentro de `<EmailBuilderProvider>`)
|
|
72
|
+
|
|
73
|
+
| Hook | Devuelve |
|
|
74
|
+
|---|---|
|
|
75
|
+
| `useRenderEmail()` | `{ getPayload, renderHtml, getHtml, resolve, html, isPending, setHtml }` |
|
|
76
|
+
| `useAutosaveStatus()` | `{ isSaving, lastSavedAt, lastError, lastResult, saveNow }` |
|
|
77
|
+
| `useEmailBuilderStore(selector)` | Estado/acciones con selector. |
|
|
78
|
+
| `useEmailBuilderStoreInstance()` | Instancia vanilla del store (`getState`/`setState`/`subscribe`). |
|
|
79
|
+
| `useEmailBuilderConfig()` | Config resuelta. |
|
|
80
|
+
|
|
81
|
+
### Store
|
|
82
|
+
|
|
83
|
+
Estado: `blocks, selectedId, settings, dirty, propertiesOpen, past`.
|
|
84
|
+
Acciones: `addBlock(type, index?, location?)`, `removeBlock`, `duplicateBlock`,
|
|
85
|
+
`updateBlockProps`, `reorder(a, b, location?)`, `moveBlock`, `setSettings`, `select`,
|
|
86
|
+
`setPropertiesOpen`, `hydrate({ blocks, settings? })`, `markSaved`, `getPayload`, `undo`.
|
|
87
|
+
|
|
88
|
+
### Provider (`EmailBuilderConfig`)
|
|
89
|
+
|
|
90
|
+
`variables`, `variableSections`, `blockLibrary`, `blockDefaults`, `palette`, `defaultSettings`,
|
|
91
|
+
`sampleContext`, `labels`, `historyLimit` (default 50). `autosave` recibe
|
|
92
|
+
`{ onSave, intervalMs (10s), enabled, onSaved }` y `uploadImage` sirve para subir imágenes.
|
|
93
|
+
|
|
94
|
+
## Flujos típicos
|
|
95
|
+
|
|
96
|
+
### Cargar una plantilla del backend
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
const { json } = await api.get(`/templates/${id}`);
|
|
100
|
+
store.hydrate({ blocks: json.content, settings: json.settings }); // normaliza y reinicia el undo
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Guardar
|
|
104
|
+
|
|
105
|
+
```ts
|
|
106
|
+
const payload = store.getPayload(); // { content, settings }
|
|
107
|
+
await api.put(`/templates/${id}`, payload); // tu backend lo renderiza con create-email-renderer
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Forzar guardado (botón manual)
|
|
111
|
+
|
|
112
|
+
```ts
|
|
113
|
+
const { saveNow } = useAutosaveStatus();
|
|
114
|
+
await saveNow();
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Cómo extender
|
|
118
|
+
|
|
119
|
+
- **Bloques nuevos de UI** (preview + editable + campos): registra una vista con `registerBlockViews`
|
|
120
|
+
(`block-views.ts`) y el render del backend con `registerBlock` en `create-email-renderer`.
|
|
121
|
+
- **Recetas de variantes** (estilos de un bloque): un archivo `*-presets.ts` con `{ value, label, build() }`
|
|
122
|
+
que el panel consume con el kind `preset`.
|
|
123
|
+
- **Kinds del panel** (`BlockFieldDef`): `text, richText, number, color, align, select, layout,
|
|
124
|
+
preset, image, icons, hint, row, group, stringList, repeat, custom`; los `group` aceptan
|
|
125
|
+
`visibleWhen: { key, equals }` para mostrar solo la sección de la variante activa.
|
|
126
|
+
- **Labels**: todo texto de UI pasa por `labels` (`EmailBuilderLabels`) para i18n.
|
|
127
|
+
|
|
128
|
+
## Reglas de oro
|
|
129
|
+
|
|
130
|
+
1. **Core compartido en el renderer**: `src/core/*` son shims de una línea hacia
|
|
131
|
+
`create-email-renderer`. No dupliques tipos ni defaults aquí.
|
|
132
|
+
2. **Nunca externalices** más de `react`, `react-dom` y `use-sync-external-store`.
|
|
133
|
+
3. **CSS**: todo bajo `.ter-theme`/`ter-*`; los portales (dialog/sheet/toolbar) también. Un
|
|
134
|
+
selector global rompe la app del consumidor.
|
|
135
|
+
4. **No expongas un entry `/server`**: el back-end usa el renderer.
|
|
136
|
+
|
|
137
|
+
## Errores comunes
|
|
138
|
+
|
|
139
|
+
| Síntoma | Causa |
|
|
140
|
+
|---|---|
|
|
141
|
+
| El editor se ve sin estilos | Falta `import "create-email-template/style.css"`. |
|
|
142
|
+
| Un hook lanza "outside provider" | Está fuera de `<EmailBuilderProvider>`. |
|
|
143
|
+
| Estilos raros en tu app | Un selector del CSS de la lib no está scopeado (`check:css-scope` lo vigila). |
|
|
144
|
+
| El canvas muestra una versión vieja | Caché del dev server: borra `node_modules/.vite` y reinicia. |
|
|
145
|
+
| `dirty` no baja | Solo `markSaved()` (autosave o manual) lo limpia. |
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BlockFieldDef, BlockViewRegistration } from "./block-views";
|
|
2
|
+
/** Editables built-in por tipo — registrados junto a los Preview. */
|
|
3
|
+
export declare const BUILTIN_EDITABLES: Record<string, BlockViewRegistration["Editable"]>;
|
|
4
|
+
export declare const BUILTIN_FIELDS: Record<string, BlockFieldDef[]>;
|
|
5
|
+
export declare const RICH_INLINE_TYPES: Set<string>;
|
|
6
|
+
//# sourceMappingURL=block-views-builtin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-views-builtin.d.ts","sourceRoot":"","sources":["../src/block-views-builtin.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAsnBzE,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAE,MAAM,CACpC,MAAM,EACN,qBAAqB,CAAC,UAAU,CAAC,CA2BlC,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,CA0B1D,CAAA;AAED,eAAO,MAAM,iBAAiB,aAO5B,CAAA"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import type { EmailBlock, EmailContext, EmailPalette } from "./core/types";
|
|
3
|
+
import type { EmailBuilderLabels } from "./config/types";
|
|
4
|
+
export interface BlockPreviewProps {
|
|
5
|
+
props: any;
|
|
6
|
+
context: EmailContext;
|
|
7
|
+
palette: EmailPalette;
|
|
8
|
+
}
|
|
9
|
+
export interface BlockEditableProps {
|
|
10
|
+
block: EmailBlock;
|
|
11
|
+
props: any;
|
|
12
|
+
set: (patch: Record<string, unknown>) => void;
|
|
13
|
+
palette: EmailPalette;
|
|
14
|
+
labels: EmailBuilderLabels;
|
|
15
|
+
}
|
|
16
|
+
export interface BlockFieldsProps {
|
|
17
|
+
block: EmailBlock;
|
|
18
|
+
props: any;
|
|
19
|
+
set: (patch: Record<string, unknown>) => void;
|
|
20
|
+
labels: EmailBuilderLabels;
|
|
21
|
+
}
|
|
22
|
+
export type BlockFieldDef = {
|
|
23
|
+
kind: "text";
|
|
24
|
+
key: string;
|
|
25
|
+
label: string;
|
|
26
|
+
} | {
|
|
27
|
+
kind: "richText";
|
|
28
|
+
key: string;
|
|
29
|
+
label: string;
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
} | {
|
|
32
|
+
kind: "number";
|
|
33
|
+
key: string;
|
|
34
|
+
label: string;
|
|
35
|
+
min?: number;
|
|
36
|
+
default?: number;
|
|
37
|
+
} | {
|
|
38
|
+
kind: "color";
|
|
39
|
+
key: string;
|
|
40
|
+
label: string;
|
|
41
|
+
fallback?: string;
|
|
42
|
+
} | {
|
|
43
|
+
kind: "align";
|
|
44
|
+
key: string;
|
|
45
|
+
label: string;
|
|
46
|
+
} | {
|
|
47
|
+
kind: "select";
|
|
48
|
+
key: string;
|
|
49
|
+
label: string;
|
|
50
|
+
options: {
|
|
51
|
+
value: string | boolean | number;
|
|
52
|
+
label: string;
|
|
53
|
+
}[];
|
|
54
|
+
} | {
|
|
55
|
+
kind: "layout";
|
|
56
|
+
key: string;
|
|
57
|
+
label: string;
|
|
58
|
+
options: {
|
|
59
|
+
value: string;
|
|
60
|
+
label: string;
|
|
61
|
+
widths: number[];
|
|
62
|
+
}[];
|
|
63
|
+
} | {
|
|
64
|
+
kind: "preset";
|
|
65
|
+
key: string;
|
|
66
|
+
label: string;
|
|
67
|
+
options: {
|
|
68
|
+
value: string;
|
|
69
|
+
label: string;
|
|
70
|
+
build: () => Record<string, unknown>;
|
|
71
|
+
}[];
|
|
72
|
+
} | {
|
|
73
|
+
kind: "image";
|
|
74
|
+
key: string;
|
|
75
|
+
} | {
|
|
76
|
+
kind: "icons";
|
|
77
|
+
key: string;
|
|
78
|
+
label: string;
|
|
79
|
+
options: readonly string[];
|
|
80
|
+
} | {
|
|
81
|
+
kind: "hint";
|
|
82
|
+
labelKey: keyof EmailBuilderLabels;
|
|
83
|
+
} | {
|
|
84
|
+
kind: "row";
|
|
85
|
+
fields: [BlockFieldDef, BlockFieldDef?];
|
|
86
|
+
} | {
|
|
87
|
+
kind: "group";
|
|
88
|
+
label: string;
|
|
89
|
+
fields: BlockFieldDef[];
|
|
90
|
+
/** Muestra el grupo solo si `props[key]` coincide con `equals`. */
|
|
91
|
+
visibleWhen?: {
|
|
92
|
+
key: string;
|
|
93
|
+
equals: string | boolean | number | (string | boolean | number)[];
|
|
94
|
+
};
|
|
95
|
+
} | {
|
|
96
|
+
kind: "stringList";
|
|
97
|
+
key: string;
|
|
98
|
+
label: string;
|
|
99
|
+
placeholder?: string;
|
|
100
|
+
} | {
|
|
101
|
+
kind: "repeat";
|
|
102
|
+
key: string;
|
|
103
|
+
label: string;
|
|
104
|
+
itemLabel: string;
|
|
105
|
+
/** No numera las filas ("Plan" en vez de "Plan 1"). */
|
|
106
|
+
hideIndex?: boolean;
|
|
107
|
+
fields: BlockFieldDef[];
|
|
108
|
+
} | {
|
|
109
|
+
kind: "custom";
|
|
110
|
+
id: string;
|
|
111
|
+
};
|
|
112
|
+
export interface BlockViewRegistration {
|
|
113
|
+
type: string;
|
|
114
|
+
Preview?: React.ComponentType<BlockPreviewProps>;
|
|
115
|
+
Editable?: React.ComponentType<BlockEditableProps>;
|
|
116
|
+
fields?: BlockFieldDef[];
|
|
117
|
+
/** Muestra el hint de edición inline en el panel. */
|
|
118
|
+
richInline?: boolean;
|
|
119
|
+
}
|
|
120
|
+
export declare const registerBlockViews: (registration: BlockViewRegistration) => void;
|
|
121
|
+
export declare const unregisterBlockViews: (type: string) => void;
|
|
122
|
+
export declare const getBlockView: (type: string) => BlockViewRegistration | undefined;
|
|
123
|
+
export declare const listBlockViews: () => BlockViewRegistration[];
|
|
124
|
+
//# sourceMappingURL=block-views.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-views.d.ts","sourceRoot":"","sources":["../src/block-views.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AACnC,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACb,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAExD,MAAM,WAAW,iBAAiB;IAEhC,KAAK,EAAE,GAAG,CAAA;IACV,OAAO,EAAE,YAAY,CAAA;IACrB,OAAO,EAAE,YAAY,CAAA;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,UAAU,CAAA;IAEjB,K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AA;KAClE,CAAA;CACF,GACD;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GACxE;IACE,IAAI,EAAE,QAAQ,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,uDAAuD;IACvD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,MAAM,EAAE,aAAa,EAAE,CAAA;CACxB,GACD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAA;AAElC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAA;IAChD,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAA;IAClD,MAAM,CAAC,EAAE,aAAa,EAAE,CAAA;IACxB,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAID,eAAO,MAAM,kBAAkB,GAAI,cAAc,qBAAqB,KAAG,IAUxE,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,KAAG,IAEnD,CAAA;AAED,eAAO,MAAM,YAAY,GACvB,MAAM,MAAM,KACX,qBAAqB,GAAG,SAA4B,CAAA;AAEvD,eAAO,MAAM,cAAc,QAAO,qBAAqB,EAEtD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas.d.ts","sourceRoot":"","sources":["../../../src/components/builder/canvas.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"canvas.d.ts","sourceRoot":"","sources":["../../../src/components/builder/canvas.tsx"],"names":[],"mappings":"AA8BA,eAAO,MAAM,cAAc,GAAI,cAE5B;IACD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,gCAkQA,CAAC"}
|
|
@@ -1,7 +1,29 @@
|
|
|
1
1
|
import { type EmailBlock } from "../../core/types";
|
|
2
|
+
import { type BlockEditableProps } from "../../block-views";
|
|
2
3
|
interface Props {
|
|
3
4
|
block: EmailBlock;
|
|
4
5
|
}
|
|
6
|
+
export declare const EditableHeader: ({ props, set, palette, }: BlockEditableProps) => import("react").JSX.Element;
|
|
7
|
+
export declare const EditableHero: ({ props, set, palette }: BlockEditableProps) => import("react").JSX.Element;
|
|
8
|
+
export declare const EditableHeading: ({ props, set, palette }: BlockEditableProps) => import("react").JSX.Element;
|
|
9
|
+
export declare const EditableText: ({ props, set, palette }: BlockEditableProps) => import("react").JSX.Element;
|
|
10
|
+
export declare const EditableList: ({ props, set, palette, labels }: BlockEditableProps) => import("react").JSX.Element;
|
|
11
|
+
export declare const EditableButton: ({ props, set, palette }: BlockEditableProps) => import("react").JSX.Element;
|
|
12
|
+
export declare const EditableImage: ({ props, palette, labels, }: BlockEditableProps) => import("react").JSX.Element;
|
|
13
|
+
export declare const EditableQuote: ({ props, set, palette, labels }: BlockEditableProps) => import("react").JSX.Element;
|
|
14
|
+
export declare const EditableDivider: ({ props }: BlockEditableProps) => import("react").JSX.Element;
|
|
15
|
+
export declare const EditableSpacer: ({ props }: BlockEditableProps) => import("react").JSX.Element;
|
|
16
|
+
export declare const EditableSocial: ({ props, palette }: BlockEditableProps) => import("react").JSX.Element;
|
|
17
|
+
export declare const EditableGallery: ({ props, palette }: BlockEditableProps) => import("react").JSX.Element;
|
|
18
|
+
export declare const EditableStats: ({ props, palette }: BlockEditableProps) => import("react").JSX.Element;
|
|
19
|
+
export declare const EditablePricing: ({ props, palette }: BlockEditableProps) => import("react").JSX.Element;
|
|
20
|
+
export declare const EditableCheckout: ({ props, palette }: BlockEditableProps) => import("react").JSX.Element;
|
|
21
|
+
export declare const EditableProduct: ({ props, palette }: BlockEditableProps) => import("react").JSX.Element;
|
|
22
|
+
export declare const EditableTestimonial: ({ props, palette }: BlockEditableProps) => import("react").JSX.Element;
|
|
23
|
+
export declare const EditableFeatures: ({ props, palette }: BlockEditableProps) => import("react").JSX.Element;
|
|
24
|
+
export declare const EditableAvatar: ({ props, palette }: BlockEditableProps) => import("react").JSX.Element;
|
|
25
|
+
export declare const EditableCode: ({ props }: BlockEditableProps) => import("react").JSX.Element;
|
|
26
|
+
export declare const EditableLink: ({ props, palette }: BlockEditableProps) => import("react").JSX.Element;
|
|
5
27
|
export declare const EditableBlockRenderer: ({ block }: Props) => import("react").JSX.Element | null;
|
|
6
28
|
export {};
|
|
7
29
|
//# sourceMappingURL=editable-block-renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editable-block-renderer.d.ts","sourceRoot":"","sources":["../../../src/components/builder/editable-block-renderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,
|
|
1
|
+
{"version":3,"file":"editable-block-renderer.d.ts","sourceRoot":"","sources":["../../../src/components/builder/editable-block-renderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAqB,MAAM,kBAAkB,CAAA;AAUrE,OAAO,EAAgB,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAEzE,UAAU,KAAK;IACb,KAAK,EAAE,UAAU,CAAA;CAClB;AAED,eAAO,MAAM,cAAc,GAAI,0BAI5B,kBAAkB,gCA+CpB,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,yBAAyB,kBAAkB,gCAqCvE,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,yBAAyB,kBAAkB,gCAyB1E,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,yBAAyB,kBAAkB,gCAwBvE,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,iCAAiC,kBAAkB,gCAsP/E,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,yBAAyB,kBAAkB,gCAwCzE,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,6BAI3B,kBAAkB,gCAuCpB,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,iCAAiC,kBAAkB,gCAuChF,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,WAAW,kBAAkB,gCAe5D,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,WAAW,kBAAkB,gCAO3D,CAAA;AAwBD,eAAO,MAAM,cAAc,GAAI,oBAAoB,kBAAkB,gCAgDpE,CAAA;AA8CD,eAAO,MAAM,eAAe,GAAI,oBAAoB,kBAAkB,gCAqErE,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,oBAAoB,kBAAkB,gCAsBnE,CAAA;AAyKD,eAAO,MAAM,eAAe,GAAI,oBAAoB,kBAAkB,gCAkErE,CAAA;AAiND,eAAO,MAAM,gBAAgB,GAAI,oBAAoB,kBAAkB,gCAoFtE,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,oBAAoB,kBAAkB,gCAKrE,CAAA;AA4CD,eAAO,MAAM,mBAAmB,GAAI,oBAAoB,kBAAkB,gCAiCzE,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,oBAAoB,kBAAkB,gCA8BtE,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,oBAAoB,kBAAkB,gCAmCpE,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,WAAW,kBAAkB,gCAmBzD,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,oBAAoB,kBAAkB,gCAalE,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAI,WAAW,KAAK,uCAuBrD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email-builder.d.ts","sourceRoot":"","sources":["../../../src/components/builder/email-builder.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"email-builder.d.ts","sourceRoot":"","sources":["../../../src/components/builder/email-builder.tsx"],"names":[],"mappings":"AAiCA,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,YAAY,GAAI,eAAe,iBAAiB,gCA8M5D,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { BlockFieldDef } from "../../block-views";
|
|
3
|
+
import type { EmailBuilderLabels } from "../../config/types";
|
|
4
|
+
export declare const Field: ({ label, children, }: {
|
|
5
|
+
label: string;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}) => React.JSX.Element;
|
|
8
|
+
export declare const InlineHint: ({ text }: {
|
|
9
|
+
text: string;
|
|
10
|
+
}) => React.JSX.Element;
|
|
11
|
+
export declare const TextEdit: ({ label, value, onChange, }: {
|
|
12
|
+
label: string;
|
|
13
|
+
value: string;
|
|
14
|
+
onChange: (v: string) => void;
|
|
15
|
+
}) => React.JSX.Element;
|
|
16
|
+
export declare const AlignEdit: ({ value, onChange, }: {
|
|
17
|
+
value: string;
|
|
18
|
+
onChange: (v: "left" | "center" | "right") => void;
|
|
19
|
+
}) => React.JSX.Element;
|
|
20
|
+
export declare const ColorEdit: ({ value, onChange, }: {
|
|
21
|
+
value: string;
|
|
22
|
+
onChange: (v: string) => void;
|
|
23
|
+
}) => React.JSX.Element;
|
|
24
|
+
export declare const ImageEdit: ({ value, onChange, }: {
|
|
25
|
+
value: string;
|
|
26
|
+
onChange: (v: string) => void;
|
|
27
|
+
}) => React.JSX.Element;
|
|
28
|
+
export interface FieldsRendererProps {
|
|
29
|
+
props: any;
|
|
30
|
+
set: (patch: Record<string, unknown>) => void;
|
|
31
|
+
labels: EmailBuilderLabels;
|
|
32
|
+
fields: BlockFieldDef[];
|
|
33
|
+
}
|
|
34
|
+
/** Resuelve un schema de campos a controles concretos. */
|
|
35
|
+
export declare const FieldsRenderer: ({ props, set, labels, fields, }: FieldsRendererProps) => React.JSX.Element;
|
|
36
|
+
//# sourceMappingURL=field-editors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-editors.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E,kBAAkB,CAAA;IAC1B,MAAM,EAAE,aAAa,EAAE,CAAA;CACxB;AAED,0DAA0D;AAC1D,eAAO,MAAM,cAAc,GAAI,iCAK5B,mBAAmB,sBAgVrB,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type BlockLocation } from "../../store/block-tree";
|
|
2
|
+
interface Props {
|
|
3
|
+
location: BlockLocation;
|
|
4
|
+
emptyLabel?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const NestedBlockList: ({ location, emptyLabel }: Props) => import("react").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=nested-block-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nested-block-list.d.ts","sourceRoot":"","sources":["../../../src/components/builder/nested-block-list.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAA6B,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAGtF,UAAU,KAAK;IACb,QAAQ,EAAE,aAAa,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,eAAO,MAAM,eAAe,GAAI,0BAA0B,KAAK,gCA6F9D,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BlockEditableProps } from "../../block-views";
|
|
2
|
+
export declare const EditableContainer: ({ block, props, }: BlockEditableProps) => import("react").JSX.Element;
|
|
3
|
+
export declare const EditableGrid: ({ block, props }: BlockEditableProps) => import("react").JSX.Element;
|
|
4
|
+
export declare const EditableColumns: ({ block, props, }: BlockEditableProps) => import("react").JSX.Element;
|
|
5
|
+
export declare const EditableFooter: ({ block, props, set, palette, }: BlockEditableProps) => import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=nested-blocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nested-blocks.d.ts","sourceRoot":"","sources":["../../../src/components/builder/nested-blocks.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAI3D,eAAO,MAAM,iBAAiB,GAAI,mBAG/B,kBAAkB,gCAcpB,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,kBAAkB,kBAAkB,gCA+BhE,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,mBAG7B,kBAAkB,gCAuBpB,CAAA;AAID,eAAO,MAAM,cAAc,GAAI,iCAK5B,kBAAkB,gCA4DpB,CAAA"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { type EmailBlock } from "../../core/types";
|
|
3
2
|
interface Props {
|
|
4
3
|
block: EmailBlock;
|
|
5
4
|
}
|
|
6
|
-
export declare const PropertiesPanel: ({ block }: Props) =>
|
|
5
|
+
export declare const PropertiesPanel: ({ block }: Props) => import("react").JSX.Element;
|
|
7
6
|
export {};
|
|
8
7
|
//# sourceMappingURL=properties-panel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"properties-panel.d.ts","sourceRoot":"","sources":["../../../src/components/builder/properties-panel.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"properties-panel.d.ts","sourceRoot":"","sources":["../../../src/components/builder/properties-panel.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAKlD,UAAU,KAAK;IACb,KAAK,EAAE,UAAU,CAAA;CAClB;AAED,eAAO,MAAM,eAAe,GAAI,WAAW,KAAK,gCA4C/C,CAAA"}
|
package/dist/config/types.d.ts
CHANGED
|
@@ -19,6 +19,10 @@ export interface EmailBuilderLabels {
|
|
|
19
19
|
editInlineHint: string;
|
|
20
20
|
listEditHint: string;
|
|
21
21
|
columnsEditHint: string;
|
|
22
|
+
containerEditHint: string;
|
|
23
|
+
gridEditHint: string;
|
|
24
|
+
footerEditHint: string;
|
|
25
|
+
pricingEditHint: string;
|
|
22
26
|
addListItem: string;
|
|
23
27
|
listItemPlaceholder: string;
|
|
24
28
|
imagePlaceholder: string;
|
|
@@ -51,6 +55,8 @@ export interface EmailBuilderLabels {
|
|
|
51
55
|
pageBackground: string;
|
|
52
56
|
cardBorderWidth: string;
|
|
53
57
|
cardBorderRadius: string;
|
|
58
|
+
fontFamily: string;
|
|
59
|
+
fontCustom: string;
|
|
54
60
|
settings: string;
|
|
55
61
|
deviceMobile: string;
|
|
56
62
|
deviceDesktop: string;
|
|
@@ -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;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAA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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,31 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { EmailBlock, EmailBlockProps, EmailContext, EmailPalette } 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
|
+
/** Preview components react-email por tipo — alimentan el registry de vistas. */
|
|
14
|
+
export declare const PREVIEW_COMPONENTS: Record<string, React.ComponentType<BlockPreviewProps>>;
|
|
12
15
|
export declare const BlockRenderer: ({ block, context, palette, }: {
|
|
13
16
|
block: EmailBlock;
|
|
14
17
|
context: EmailContext;
|
|
15
18
|
palette?: EmailPalette;
|
|
16
19
|
}) => React.JSX.Element | null;
|
|
17
|
-
export declare const EmailBody: ({ blocks, context, palette, cardBorderWidth, cardBorderRadius, }: {
|
|
20
|
+
export declare const EmailBody: ({ blocks, context, palette, cardBorderWidth, cardBorderRadius, fontFamily, }: {
|
|
18
21
|
blocks: EmailBlock[];
|
|
19
22
|
context: EmailContext;
|
|
20
23
|
palette?: EmailPalette;
|
|
21
24
|
cardBorderWidth?: number;
|
|
22
25
|
cardBorderRadius?: number;
|
|
26
|
+
fontFamily?: string;
|
|
23
27
|
}) => React.JSX.Element;
|
|
24
|
-
export declare const EmailTemplate: ({ blocks, subject, context, palette, pageBackground, cardBorderWidth, cardBorderRadius, }: {
|
|
28
|
+
export declare const EmailTemplate: ({ blocks, subject, context, palette, pageBackground, cardBorderWidth, cardBorderRadius, fontFamily, }: {
|
|
25
29
|
blocks: EmailBlock[];
|
|
26
30
|
subject: string;
|
|
27
31
|
context: EmailContext;
|
|
@@ -29,5 +33,6 @@ export declare const EmailTemplate: ({ blocks, subject, context, palette, pageBa
|
|
|
29
33
|
pageBackground?: string;
|
|
30
34
|
cardBorderWidth?: number;
|
|
31
35
|
cardBorderRadius?: number;
|
|
36
|
+
fontFamily?: string;
|
|
32
37
|
}) => React.JSX.Element;
|
|
33
38
|
//# 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
|
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;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,sBAsBA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/core/build.ts"],"names":[],"mappings":"AAEA,cAAc,6BAA6B,CAAC"}
|
package/dist/core/id.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { newId } from "create-email-renderer";
|
|
2
2
|
//# sourceMappingURL=id.d.ts.map
|
package/dist/core/id.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../src/core/id.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../src/core/id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,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,CAYvC,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"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import type { EmailContext } from "../core/types";
|
|
2
2
|
export declare const useEmailBuilder: () => {
|
|
3
3
|
config: import("..").ResolvedEmailBuilderConfig;
|
|
4
|
-
variables: import("create-email-renderer
|
|
5
|
-
blockLibrary: import("create-email-renderer
|
|
6
|
-
blockMap: Record<import("create-email-renderer
|
|
7
|
-
palette: import("create-email-renderer
|
|
4
|
+
variables: import("create-email-renderer").EmailVariable[];
|
|
5
|
+
blockLibrary: import("create-email-renderer").BlockDefinition[];
|
|
6
|
+
blockMap: Record<import("create-email-renderer").EmailBlockType, import("create-email-renderer").BlockDefinition>;
|
|
7
|
+
palette: import("create-email-renderer").EmailPalette;
|
|
8
8
|
sampleContext: EmailContext;
|
|
9
9
|
labels: import("..").EmailBuilderLabels;
|
|
10
10
|
uploadImage: import("..").UploadImage | undefined;
|
|
11
|
-
blocks: import("create-email-renderer
|
|
11
|
+
blocks: import("create-email-renderer").EmailBlock[];
|
|
12
12
|
selectedId: string | null;
|
|
13
13
|
propertiesOpen: boolean;
|
|
14
|
-
settings: import("create-email-renderer
|
|
14
|
+
settings: import("create-email-renderer").EmailSettings;
|
|
15
15
|
dirty: boolean;
|
|
16
16
|
hydrate: (data: {
|
|
17
|
-
blocks: import("create-email-renderer
|
|
18
|
-
settings?: Partial<import("create-email-renderer
|
|
17
|
+
blocks: import("create-email-renderer").EmailBlock[];
|
|
18
|
+
settings?: Partial<import("create-email-renderer").EmailSettings>;
|
|
19
19
|
}) => void;
|
|
20
|
-
setSettings: (patch: Partial<import("create-email-renderer
|
|
21
|
-
addBlock: (type: import("create-email-renderer
|
|
22
|
-
reorder: (activeIndex: number, overIndex: number) => void;
|
|
23
|
-
updateBlockProps: (id: string, props: import("create-email-renderer
|
|
20
|
+
setSettings: (patch: Partial<import("create-email-renderer").EmailSettings>) => void;
|
|
21
|
+
addBlock: (type: import("create-email-renderer").EmailBlockType, index?: number, location?: import("..").BlockLocation) => void;
|
|
22
|
+
reorder: (activeIndex: number, overIndex: number, location?: import("..").BlockLocation) => void;
|
|
23
|
+
updateBlockProps: (id: string, props: import("create-email-renderer").EmailBlockProps) => void;
|
|
24
24
|
removeBlock: (id: string) => void;
|
|
25
25
|
duplicateBlock: (id: string) => void;
|
|
26
26
|
select: (id: string | null) => 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;;;;;;;;;;;;;;;;gBAiBV,CAAC;;;;;;;;;;;;wBAKD;QAAE,OAAO,CAAC,EAAE,YAAY,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;oBAoBnD,MAAM,YAAY,YAAY,KAAG,MAAM;CAoCjD,CAAC"}
|