@savvycal/mjml-editor 0.0.1 → 0.0.2
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 +176 -0
- package/dist/components/editor/BlockIcon.d.ts +7 -0
- package/dist/components/editor/BlockIcon.d.ts.map +1 -0
- package/dist/components/editor/BlockInspector.d.ts +6 -0
- package/dist/components/editor/BlockInspector.d.ts.map +1 -0
- package/dist/components/editor/BlockInspector.js +380 -0
- package/dist/components/editor/EditorCanvas.d.ts +11 -0
- package/dist/components/editor/EditorCanvas.d.ts.map +1 -0
- package/dist/components/editor/EditorCanvas.js +116 -0
- package/dist/components/editor/FontEditor.d.ts +2 -0
- package/dist/components/editor/FontEditor.d.ts.map +1 -0
- package/dist/components/editor/FontEditor.js +227 -0
- package/dist/components/editor/GlobalStylesPanel.d.ts +7 -0
- package/dist/components/editor/GlobalStylesPanel.d.ts.map +1 -0
- package/dist/components/editor/GlobalStylesPanel.js +310 -0
- package/dist/components/editor/InteractivePreview.d.ts +8 -0
- package/dist/components/editor/InteractivePreview.d.ts.map +1 -0
- package/dist/components/editor/InteractivePreview.js +120 -0
- package/dist/components/editor/LiquidAutocomplete.d.ts +10 -0
- package/dist/components/editor/LiquidAutocomplete.d.ts.map +1 -0
- package/dist/components/editor/LiquidAutocomplete.js +70 -0
- package/dist/components/editor/LiquidInput.d.ts +12 -0
- package/dist/components/editor/LiquidInput.d.ts.map +1 -0
- package/dist/components/editor/LiquidInput.js +185 -0
- package/dist/components/editor/MjmlEditor.d.ts +11 -0
- package/dist/components/editor/MjmlEditor.d.ts.map +1 -0
- package/dist/components/editor/MjmlEditor.js +111 -0
- package/dist/components/editor/OutlineTree.d.ts +7 -0
- package/dist/components/editor/OutlineTree.d.ts.map +1 -0
- package/dist/components/editor/OutlineTree.js +282 -0
- package/dist/components/editor/SourceEditor.d.ts +2 -0
- package/dist/components/editor/SourceEditor.d.ts.map +1 -0
- package/dist/components/editor/SourceEditor.js +70 -0
- package/dist/components/editor/SourcePreview.d.ts +7 -0
- package/dist/components/editor/SourcePreview.d.ts.map +1 -0
- package/dist/components/editor/SourcePreview.js +55 -0
- package/dist/components/editor/TiptapEditor.d.ts +12 -0
- package/dist/components/editor/TiptapEditor.d.ts.map +1 -0
- package/dist/components/editor/TiptapEditor.js +330 -0
- package/dist/components/editor/VisualEditor.d.ts +7 -0
- package/dist/components/editor/VisualEditor.d.ts.map +1 -0
- package/dist/components/editor/VisualEditor.js +51 -0
- package/dist/components/editor/visual-blocks/VisualBlock.d.ts +7 -0
- package/dist/components/editor/visual-blocks/VisualBlock.d.ts.map +1 -0
- package/dist/components/editor/visual-blocks/VisualBlock.js +34 -0
- package/dist/components/editor/visual-blocks/VisualButton.d.ts +7 -0
- package/dist/components/editor/visual-blocks/VisualButton.d.ts.map +1 -0
- package/dist/components/editor/visual-blocks/VisualButton.js +111 -0
- package/dist/components/editor/visual-blocks/VisualColumn.d.ts +8 -0
- package/dist/components/editor/visual-blocks/VisualColumn.d.ts.map +1 -0
- package/dist/components/editor/visual-blocks/VisualColumn.js +44 -0
- package/dist/components/editor/visual-blocks/VisualDivider.d.ts +7 -0
- package/dist/components/editor/visual-blocks/VisualDivider.d.ts.map +1 -0
- package/dist/components/editor/visual-blocks/VisualDivider.js +41 -0
- package/dist/components/editor/visual-blocks/VisualImage.d.ts +7 -0
- package/dist/components/editor/visual-blocks/VisualImage.d.ts.map +1 -0
- package/dist/components/editor/visual-blocks/VisualImage.js +48 -0
- package/dist/components/editor/visual-blocks/VisualRaw.d.ts +7 -0
- package/dist/components/editor/visual-blocks/VisualRaw.d.ts.map +1 -0
- package/dist/components/editor/visual-blocks/VisualRaw.js +32 -0
- package/dist/components/editor/visual-blocks/VisualSection.d.ts +7 -0
- package/dist/components/editor/visual-blocks/VisualSection.d.ts.map +1 -0
- package/dist/components/editor/visual-blocks/VisualSection.js +131 -0
- package/dist/components/editor/visual-blocks/VisualSocial.d.ts +7 -0
- package/dist/components/editor/visual-blocks/VisualSocial.d.ts.map +1 -0
- package/dist/components/editor/visual-blocks/VisualSocial.js +62 -0
- package/dist/components/editor/visual-blocks/VisualSpacer.d.ts +7 -0
- package/dist/components/editor/visual-blocks/VisualSpacer.d.ts.map +1 -0
- package/dist/components/editor/visual-blocks/VisualSpacer.js +30 -0
- package/dist/components/editor/visual-blocks/VisualText.d.ts +7 -0
- package/dist/components/editor/visual-blocks/VisualText.d.ts.map +1 -0
- package/dist/components/editor/visual-blocks/VisualText.js +103 -0
- package/dist/components/editor/visual-blocks/helpers.d.ts +13 -0
- package/dist/components/editor/visual-blocks/helpers.d.ts.map +1 -0
- package/dist/components/editor/visual-blocks/helpers.js +44 -0
- package/dist/components/editor/visual-blocks/useResolvedAttributes.d.ts +7 -0
- package/dist/components/editor/visual-blocks/useResolvedAttributes.d.ts.map +1 -0
- package/dist/components/editor/visual-blocks/useResolvedAttributes.js +12 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +26 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +54 -0
- package/dist/components/ui/card.d.ts +10 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +7 -0
- package/dist/components/ui/floating-panel.d.ts +12 -0
- package/dist/components/ui/floating-panel.d.ts.map +1 -0
- package/dist/components/ui/floating-panel.js +54 -0
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +26 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +23 -0
- package/dist/components/ui/popover.d.ts +8 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +39 -0
- package/dist/components/ui/resizable-split-pane.d.ts +10 -0
- package/dist/components/ui/resizable-split-pane.d.ts.map +1 -0
- package/dist/components/ui/resizable-split-pane.js +65 -0
- package/dist/components/ui/scroll-area.d.ts +10 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +69 -0
- package/dist/components/ui/select.d.ts +16 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +145 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/tabs.d.ts +8 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +68 -0
- package/dist/components/ui/theme-toggle.d.ts +2 -0
- package/dist/components/ui/theme-toggle.d.ts.map +1 -0
- package/dist/components/ui/theme-toggle.js +58 -0
- package/dist/context/EditorContext.d.ts +40 -0
- package/dist/context/EditorContext.d.ts.map +1 -0
- package/dist/context/EditorContext.js +576 -0
- package/dist/context/LiquidSchemaContext.d.ts +10 -0
- package/dist/context/LiquidSchemaContext.d.ts.map +1 -0
- package/dist/context/LiquidSchemaContext.js +16 -0
- package/dist/context/ThemeContext.d.ts +18 -0
- package/dist/context/ThemeContext.d.ts.map +1 -0
- package/dist/context/ThemeContext.js +53 -0
- package/dist/extensions/LiquidHighlight.d.ts +3 -0
- package/dist/extensions/LiquidHighlight.d.ts.map +1 -0
- package/dist/extensions/LiquidHighlight.js +58 -0
- package/dist/extensions/LiquidSuggestion.d.ts +18 -0
- package/dist/extensions/LiquidSuggestion.d.ts.map +1 -0
- package/dist/extensions/LiquidSuggestion.js +119 -0
- package/dist/hooks/useFontLoader.d.ts +6 -0
- package/dist/hooks/useFontLoader.d.ts.map +1 -0
- package/dist/hooks/useFontLoader.js +21 -0
- package/dist/hooks/useStyleLoader.d.ts +11 -0
- package/dist/hooks/useStyleLoader.d.ts.map +1 -0
- package/dist/hooks/useStyleLoader.js +26 -0
- package/dist/index.d.ts +6 -150
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -57452
- package/dist/lib/html-utils.d.ts +23 -0
- package/dist/lib/html-utils.d.ts.map +1 -0
- package/dist/lib/html-utils.js +25 -0
- package/dist/lib/mjml/attributes.d.ts +100 -0
- package/dist/lib/mjml/attributes.d.ts.map +1 -0
- package/dist/lib/mjml/attributes.js +105 -0
- package/dist/lib/mjml/parser.d.ts +67 -0
- package/dist/lib/mjml/parser.d.ts.map +1 -0
- package/dist/lib/mjml/parser.js +184 -0
- package/dist/lib/mjml/parser.test.d.ts +2 -0
- package/dist/lib/mjml/parser.test.d.ts.map +1 -0
- package/dist/lib/mjml/renderer.d.ts +23 -0
- package/dist/lib/mjml/renderer.d.ts.map +1 -0
- package/dist/lib/mjml/renderer.js +72 -0
- package/dist/lib/mjml/schema.d.ts +21 -0
- package/dist/lib/mjml/schema.d.ts.map +1 -0
- package/dist/lib/mjml/schema.js +1307 -0
- package/dist/lib/mjml/scopeCSS.d.ts +21 -0
- package/dist/lib/mjml/scopeCSS.d.ts.map +1 -0
- package/dist/lib/mjml/scopeCSS.js +67 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +8 -0
- package/dist/styles.d.ts +1 -0
- package/dist/styles.d.ts.map +1 -0
- package/dist/styles.js +1 -0
- package/dist/types/liquid.d.ts +28 -0
- package/dist/types/liquid.d.ts.map +1 -0
- package/dist/types/mjml.d.ts +101 -0
- package/dist/types/mjml.d.ts.map +1 -0
- package/package.json +12 -9
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS scoping utility for the visual editor.
|
|
3
|
+
*
|
|
4
|
+
* Scopes CSS selectors by prefixing them with a container class
|
|
5
|
+
* to prevent styles from leaking to the parent page.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Scope CSS selectors by prefixing them with a container class.
|
|
9
|
+
*
|
|
10
|
+
* For example:
|
|
11
|
+
* .button-primary { color: red; }
|
|
12
|
+
* becomes:
|
|
13
|
+
* .mjml-visual-editor-scope .button-primary { color: red; }
|
|
14
|
+
*
|
|
15
|
+
* This also handles:
|
|
16
|
+
* - Descendant selectors: .fd-accountid p { } -> .scope .fd-accountid p { }
|
|
17
|
+
* - Multiple selectors: .a, .b { } -> .scope .a, .scope .b { }
|
|
18
|
+
* - Media queries: preserved with scoped inner rules
|
|
19
|
+
*/
|
|
20
|
+
export declare function scopeCSS(css: string, scopeClass: string): string;
|
|
21
|
+
//# sourceMappingURL=scopeCSS.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scopeCSS.d.ts","sourceRoot":"","sources":["../../../src/lib/mjml/scopeCSS.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CA4IhE"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
function g(e, c) {
|
|
2
|
+
if (!e || !e.trim())
|
|
3
|
+
return "";
|
|
4
|
+
const x = `.${c}`;
|
|
5
|
+
let i = "", t = 0;
|
|
6
|
+
for (; t < e.length; ) {
|
|
7
|
+
for (; t < e.length && /\s/.test(e[t]); )
|
|
8
|
+
i += e[t], t++;
|
|
9
|
+
if (t >= e.length) break;
|
|
10
|
+
if (e[t] === "@") {
|
|
11
|
+
const f = e.slice(t).match(/^@[\w-]+/);
|
|
12
|
+
if (f) {
|
|
13
|
+
const n = f[0];
|
|
14
|
+
if (n === "@media" || n === "@supports" || n === "@layer") {
|
|
15
|
+
const a = e.indexOf("{", t);
|
|
16
|
+
if (a === -1) {
|
|
17
|
+
i += e.slice(t);
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
i += e.slice(t, a + 1), t = a + 1;
|
|
21
|
+
let r = 1;
|
|
22
|
+
const l = t;
|
|
23
|
+
for (; t < e.length && r > 0; )
|
|
24
|
+
e[t] === "{" ? r++ : e[t] === "}" && r--, t++;
|
|
25
|
+
const w = e.slice(l, t - 1);
|
|
26
|
+
i += g(w, c), i += "}";
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
if (n === "@keyframes" || n === "@-webkit-keyframes") {
|
|
30
|
+
const a = e.indexOf("{", t);
|
|
31
|
+
if (a === -1) {
|
|
32
|
+
i += e.slice(t);
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
let r = 1, l = a + 1;
|
|
36
|
+
for (; l < e.length && r > 0; )
|
|
37
|
+
e[l] === "{" ? r++ : e[l] === "}" && r--, l++;
|
|
38
|
+
i += e.slice(t, l), t = l;
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
const h = e.indexOf(";", t), m = e.indexOf("{", t);
|
|
42
|
+
if (h !== -1 && (m === -1 || h < m)) {
|
|
43
|
+
i += e.slice(t, h + 1), t = h + 1;
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const u = e.indexOf("{", t);
|
|
49
|
+
if (u === -1) {
|
|
50
|
+
i += e.slice(t);
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
const k = e.slice(t, u).trim();
|
|
54
|
+
let b = 1, o = u + 1;
|
|
55
|
+
for (; o < e.length && b > 0; )
|
|
56
|
+
e[o] === "{" ? b++ : e[o] === "}" && b--, o++;
|
|
57
|
+
const p = e.slice(u + 1, o - 1), d = k.split(",").map((f) => {
|
|
58
|
+
const n = f.trim();
|
|
59
|
+
return n ? `${x} ${n}` : "";
|
|
60
|
+
}).filter((f) => f).join(", ");
|
|
61
|
+
d && (i += `${d} {${p}}`), t = o;
|
|
62
|
+
}
|
|
63
|
+
return i;
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
g as scopeCSS
|
|
67
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
package/dist/styles.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC"}
|
package/dist/styles.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* empty css */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema item for Liquid variables and tags
|
|
3
|
+
*/
|
|
4
|
+
export interface LiquidSchemaItem {
|
|
5
|
+
/** The name/path of the variable or tag (e.g., "user.name" or "if") */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Optional description shown in the autocomplete popup */
|
|
8
|
+
description?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Complete Liquid schema passed to MjmlEditor
|
|
12
|
+
*/
|
|
13
|
+
export interface LiquidSchema {
|
|
14
|
+
/** Variables accessible via {{ variable_name }} syntax */
|
|
15
|
+
variables: LiquidSchemaItem[];
|
|
16
|
+
/** Tags accessible via {% tag_name %} syntax */
|
|
17
|
+
tags: LiquidSchemaItem[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Internal type for autocomplete suggestions
|
|
21
|
+
*/
|
|
22
|
+
export interface LiquidSuggestion {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
type: 'variable' | 'tag';
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=liquid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liquid.d.ts","sourceRoot":"","sources":["../../src/types/liquid.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,0DAA0D;IAC1D,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,gDAAgD;IAChD,IAAI,EAAE,gBAAgB,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,UAAU,GAAG,KAAK,CAAC;CAC1B"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
export interface MjmlNode {
|
|
2
|
+
tagName: string;
|
|
3
|
+
attributes: Record<string, string>;
|
|
4
|
+
children?: MjmlNode[];
|
|
5
|
+
content?: string;
|
|
6
|
+
_id?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface MjmlFont {
|
|
9
|
+
name: string;
|
|
10
|
+
href: string;
|
|
11
|
+
}
|
|
12
|
+
export type MjmlTagName = 'mjml' | 'mj-head' | 'mj-body' | 'mj-wrapper' | 'mj-section' | 'mj-column' | 'mj-text' | 'mj-image' | 'mj-button' | 'mj-divider' | 'mj-spacer' | 'mj-title' | 'mj-preview' | 'mj-attributes' | 'mj-all' | 'mj-class' | 'mj-style' | 'mj-font';
|
|
13
|
+
export type ContentBlockType = 'mj-text' | 'mj-image' | 'mj-button' | 'mj-divider' | 'mj-spacer';
|
|
14
|
+
export type AttributeGroup = 'primary' | 'background' | 'typography' | 'border' | 'inner' | 'sizing' | 'spacing' | 'link' | 'advanced';
|
|
15
|
+
export interface AttributeSchema {
|
|
16
|
+
type: 'color' | 'dimension' | 'text' | 'url' | 'select' | 'padding' | 'number';
|
|
17
|
+
label: string;
|
|
18
|
+
default?: string;
|
|
19
|
+
options?: {
|
|
20
|
+
value: string;
|
|
21
|
+
label: string;
|
|
22
|
+
}[];
|
|
23
|
+
placeholder?: string;
|
|
24
|
+
group?: AttributeGroup;
|
|
25
|
+
}
|
|
26
|
+
export type ComponentSchema = Record<string, AttributeSchema>;
|
|
27
|
+
export interface EditorState {
|
|
28
|
+
document: MjmlNode;
|
|
29
|
+
selectedBlockId: string | null;
|
|
30
|
+
history: MjmlNode[];
|
|
31
|
+
historyIndex: number;
|
|
32
|
+
}
|
|
33
|
+
export type EditorAction = {
|
|
34
|
+
type: 'SELECT_BLOCK';
|
|
35
|
+
payload: string | null;
|
|
36
|
+
} | {
|
|
37
|
+
type: 'UPDATE_ATTRIBUTES';
|
|
38
|
+
payload: {
|
|
39
|
+
id: string;
|
|
40
|
+
attributes: Record<string, string>;
|
|
41
|
+
};
|
|
42
|
+
} | {
|
|
43
|
+
type: 'UPDATE_CONTENT';
|
|
44
|
+
payload: {
|
|
45
|
+
id: string;
|
|
46
|
+
content: string;
|
|
47
|
+
};
|
|
48
|
+
} | {
|
|
49
|
+
type: 'ADD_BLOCK';
|
|
50
|
+
payload: {
|
|
51
|
+
parentId: string;
|
|
52
|
+
index: number;
|
|
53
|
+
block: MjmlNode;
|
|
54
|
+
};
|
|
55
|
+
} | {
|
|
56
|
+
type: 'DELETE_BLOCK';
|
|
57
|
+
payload: string;
|
|
58
|
+
} | {
|
|
59
|
+
type: 'MOVE_BLOCK';
|
|
60
|
+
payload: {
|
|
61
|
+
id: string;
|
|
62
|
+
newParentId: string;
|
|
63
|
+
newIndex: number;
|
|
64
|
+
};
|
|
65
|
+
} | {
|
|
66
|
+
type: 'SET_DOCUMENT';
|
|
67
|
+
payload: MjmlNode;
|
|
68
|
+
} | {
|
|
69
|
+
type: 'UNDO';
|
|
70
|
+
} | {
|
|
71
|
+
type: 'REDO';
|
|
72
|
+
} | {
|
|
73
|
+
type: 'UPDATE_MJML_ATTRIBUTE';
|
|
74
|
+
payload: {
|
|
75
|
+
attributeType: 'all' | 'element' | 'class';
|
|
76
|
+
target: string | null;
|
|
77
|
+
attributes: Record<string, string>;
|
|
78
|
+
};
|
|
79
|
+
} | {
|
|
80
|
+
type: 'ADD_CLASS';
|
|
81
|
+
payload: string;
|
|
82
|
+
} | {
|
|
83
|
+
type: 'REMOVE_CLASS';
|
|
84
|
+
payload: string;
|
|
85
|
+
} | {
|
|
86
|
+
type: 'RENAME_CLASS';
|
|
87
|
+
payload: {
|
|
88
|
+
oldName: string;
|
|
89
|
+
newName: string;
|
|
90
|
+
};
|
|
91
|
+
} | {
|
|
92
|
+
type: 'ADD_FONT';
|
|
93
|
+
payload: MjmlFont;
|
|
94
|
+
} | {
|
|
95
|
+
type: 'REMOVE_FONT';
|
|
96
|
+
payload: string;
|
|
97
|
+
} | {
|
|
98
|
+
type: 'UPDATE_FONT';
|
|
99
|
+
payload: MjmlFont;
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=mjml.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mjml.d.ts","sourceRoot":"","sources":["../../src/types/mjml.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAGD,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAGD,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,SAAS,GACT,SAAS,GACT,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,SAAS,GACT,UAAU,GACV,WAAW,GACX,YAAY,GACZ,WAAW,GACX,UAAU,GACV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AI,EAAE,aAAa,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvycal/mjml-editor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,13 +26,9 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
"typecheck": "tsc --noEmit",
|
|
33
|
-
"test": "vitest run",
|
|
34
|
-
"test:watch": "vitest"
|
|
35
|
-
},
|
|
29
|
+
"sideEffects": [
|
|
30
|
+
"*.css"
|
|
31
|
+
],
|
|
36
32
|
"peerDependencies": {
|
|
37
33
|
"react": "^18.0.0 || ^19.0.0",
|
|
38
34
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
@@ -75,5 +71,12 @@
|
|
|
75
71
|
"vite": "^7.2.4",
|
|
76
72
|
"vite-plugin-dts": "^4.5.0",
|
|
77
73
|
"vitest": "^4.0.16"
|
|
74
|
+
},
|
|
75
|
+
"scripts": {
|
|
76
|
+
"build": "vite build",
|
|
77
|
+
"dev": "vite build --watch",
|
|
78
|
+
"typecheck": "tsc --noEmit",
|
|
79
|
+
"test": "vitest run",
|
|
80
|
+
"test:watch": "vitest"
|
|
78
81
|
}
|
|
79
|
-
}
|
|
82
|
+
}
|