@emabuild/core 0.2.0 → 0.4.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.
Files changed (64) hide show
  1. package/dist/canvas/column-renderer.d.ts.map +1 -1
  2. package/dist/canvas/content-renderer.d.ts +1 -1
  3. package/dist/canvas/content-renderer.d.ts.map +1 -1
  4. package/dist/canvas/editor-canvas.d.ts +13 -0
  5. package/dist/canvas/editor-canvas.d.ts.map +1 -1
  6. package/dist/canvas/inline-toolbar.d.ts +8 -0
  7. package/dist/canvas/inline-toolbar.d.ts.map +1 -1
  8. package/dist/canvas/row-renderer.d.ts +2 -0
  9. package/dist/canvas/row-renderer.d.ts.map +1 -1
  10. package/dist/compat/unlayer-adapter.d.ts +33 -0
  11. package/dist/compat/unlayer-adapter.d.ts.map +1 -0
  12. package/dist/dnd/drag-manager.d.ts +1 -0
  13. package/dist/dnd/drag-manager.d.ts.map +1 -1
  14. package/dist/dnd/drag-state.d.ts +10 -3
  15. package/dist/dnd/drag-state.d.ts.map +1 -1
  16. package/dist/{form-tool-DdFDrS3b.js → form-tool-DsPgMShR.js} +10 -9
  17. package/dist/{form-tool-DdFDrS3b.js.map → form-tool-DsPgMShR.js.map} +1 -1
  18. package/dist/{html-tool-DMtmrF3n.js → html-tool-BxhBGl4L.js} +2 -2
  19. package/dist/{html-tool-DMtmrF3n.js.map → html-tool-BxhBGl4L.js.map} +1 -1
  20. package/dist/index-2S5kBS5_.js +4436 -0
  21. package/dist/index-2S5kBS5_.js.map +1 -0
  22. package/dist/index.d.ts +1 -0
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +7 -5
  25. package/dist/mail-editor.d.ts +13 -2
  26. package/dist/mail-editor.d.ts.map +1 -1
  27. package/dist/{menu-tool-CJcQdpcP.js → menu-tool-IZqYp8Vb.js} +14 -13
  28. package/dist/{menu-tool-CJcQdpcP.js.map → menu-tool-IZqYp8Vb.js.map} +1 -1
  29. package/dist/properties/property-panel.d.ts.map +1 -1
  30. package/dist/properties/widgets/image-upload-widget.d.ts +4 -0
  31. package/dist/properties/widgets/image-upload-widget.d.ts.map +1 -0
  32. package/dist/properties/widgets/index.d.ts +1 -0
  33. package/dist/properties/widgets/index.d.ts.map +1 -1
  34. package/dist/register-elements.d.ts.map +1 -1
  35. package/dist/sidebar/a11y-checker.d.ts +27 -0
  36. package/dist/sidebar/a11y-checker.d.ts.map +1 -0
  37. package/dist/sidebar/body-settings.d.ts +2 -0
  38. package/dist/sidebar/body-settings.d.ts.map +1 -1
  39. package/dist/sidebar/editor-sidebar.d.ts +5 -2
  40. package/dist/sidebar/editor-sidebar.d.ts.map +1 -1
  41. package/dist/{social-tool-CRY3-_sU.js → social-tool-C1FeCyUm.js} +13 -12
  42. package/dist/{social-tool-CRY3-_sU.js.map → social-tool-C1FeCyUm.js.map} +1 -1
  43. package/dist/state/editor-store.d.ts +35 -28
  44. package/dist/state/editor-store.d.ts.map +1 -1
  45. package/dist/{table-tool-DeIQci5z.js → table-tool-BD72-Fuj.js} +13 -12
  46. package/dist/{table-tool-DeIQci5z.js.map → table-tool-BD72-Fuj.js.map} +1 -1
  47. package/dist/timer-tool-Dpw9p0uW.js +55 -0
  48. package/dist/timer-tool-Dpw9p0uW.js.map +1 -0
  49. package/dist/tools/built-in/button-tool.d.ts.map +1 -1
  50. package/dist/tools/built-in/divider-tool.d.ts.map +1 -1
  51. package/dist/tools/built-in/heading-tool.d.ts.map +1 -1
  52. package/dist/tools/built-in/image-tool.d.ts.map +1 -1
  53. package/dist/tools/built-in/paragraph-tool.d.ts.map +1 -1
  54. package/dist/tools/built-in/shared-options.d.ts +105 -0
  55. package/dist/tools/built-in/shared-options.d.ts.map +1 -0
  56. package/dist/tools/built-in/text-tool.d.ts.map +1 -1
  57. package/dist/tools/tool-registry.d.ts.map +1 -1
  58. package/dist/{video-tool-g1fIoCWW.js → video-tool-CHhPfHaS.js} +7 -6
  59. package/dist/{video-tool-g1fIoCWW.js.map → video-tool-CHhPfHaS.js.map} +1 -1
  60. package/package.json +4 -4
  61. package/dist/index-CpMbWdgn.js +0 -3092
  62. package/dist/index-CpMbWdgn.js.map +0 -1
  63. package/dist/timer-tool-BVE1shO1.js +0 -54
  64. package/dist/timer-tool-BVE1shO1.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -3,5 +3,6 @@ export { MailEditorElement } from './mail-editor.js';
3
3
  export { EditorStore } from './state/editor-store.js';
4
4
  export { ToolRegistry } from './tools/tool-registry.js';
5
5
  export type { LitToolDefinition } from './tools/tool-registry.js';
6
+ export { fromUnlayer, toUnlayer } from './compat/unlayer-adapter.js';
6
7
  export type { EmailDesign, DesignBody, DesignRow, DesignColumn, DesignContent, MailEditorConfig, ExportResult, ExportOptions, ToolDefinition, ToolPropertyGroup, ToolProperty, } from '@emabuild/types';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,YAAY,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAGlE,YAAY,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,YAAY,GACb,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,YAAY,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAGrE,YAAY,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,YAAY,GACb,MAAM,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -1,8 +1,10 @@
1
- import { E as a, a as r, M as t, T as e } from "./index-CpMbWdgn.js";
1
+ import { E as r, a as t, M as E, T as e, f as s, t as l } from "./index-2S5kBS5_.js";
2
2
  export {
3
- a as EMABUILD_REGISTERED,
4
- r as EditorStore,
5
- t as MailEditorElement,
6
- e as ToolRegistry
3
+ r as EMABUILD_REGISTERED,
4
+ t as EditorStore,
5
+ E as MailEditorElement,
6
+ e as ToolRegistry,
7
+ s as fromUnlayer,
8
+ l as toUnlayer
7
9
  };
8
10
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
- import { EmailDesign, MailEditorConfig, ExportResult, ExportOptions, PropertyEditorDefinition, CustomTabDefinition } from '@emabuild/types';
2
+ import { EmailDesign, MailEditorConfig, MergeTagGroup, ExportResult, ExportOptions, PropertyEditorDefinition, CustomTabDefinition } from '@emabuild/types';
3
3
  import { LitToolDefinition } from './tools/tool-registry.js';
4
4
  export declare class MailEditorElement extends LitElement {
5
5
  static styles: import('lit').CSSResult;
@@ -9,12 +9,23 @@ export declare class MailEditorElement extends LitElement {
9
9
  private dragManager;
10
10
  private callbacks;
11
11
  private unsubscribe;
12
+ private sidebarCollapsed;
13
+ private a11yHasErrors;
14
+ private a11yHasWarnings;
15
+ private a11yHasInfos;
16
+ private a11yDebounceTimer;
17
+ private updateA11yState;
18
+ private toggleSidebar;
12
19
  connectedCallback(): void;
13
20
  firstUpdated(): void;
14
21
  private _handleKeydown;
15
22
  disconnectedCallback(): void;
16
23
  loadDesign(design: EmailDesign): void;
24
+ /** Load an Unlayer design JSON, converting it to Emabuild format */
25
+ loadUnlayerDesign(unlayerJson: Record<string, unknown>): void;
17
26
  saveDesign(callback: (design: EmailDesign) => void): void;
27
+ /** Save the design as Unlayer-compatible JSON */
28
+ saveUnlayerDesign(callback: (design: Record<string, unknown>) => void): void;
18
29
  exportHtml(callback: (result: ExportResult) => void, options?: ExportOptions): void;
19
30
  private doExport;
20
31
  exportHtmlAsync(options?: ExportOptions): Promise<ExportResult>;
@@ -22,7 +33,7 @@ export declare class MailEditorElement extends LitElement {
22
33
  registerPropertyEditor(_name: string, _editor: PropertyEditorDefinition): void;
23
34
  registerTab(_tab: CustomTabDefinition): void;
24
35
  registerCallback(type: string, callback: Function): void;
25
- setMergeTags(_tags: unknown[]): void;
36
+ setMergeTags(tags: MergeTagGroup[]): void;
26
37
  undo(): void;
27
38
  redo(): void;
28
39
  setBodyValues(values: Record<string, unknown>): void;
@@ -1 +1 @@
1
- {"version":3,"file":"mail-editor.d.ts","sourceRoot":"","sources":["../src/mail-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,aAAa,EAEb,wBAAwB,EACxB,mBAAmB,EAIpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAMhF,OAAO,2BAA2B,CAAC;AACnC,OAAO,6BAA6B,CAAC;AACrC,OAAO,gCAAgC,CAAC;AAExC,qBACa,iBAAkB,SAAQ,UAAU;IAC/C,MAAM,CAAC,MAAM,0BAcX;IAE0B,OAAO,EAAE,gBAAgB,CAAM;IAE3D,OAAO,CAAC,KAAK,CAAq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EAAE,OAAO,CAAC,KAAK,IAAI,GAAG,IAAI;IAI5E,UAAU,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI;IAuBnF,OAAO,CAAC,QAAQ;IAQV,eAAe,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IAIrE,YAAY,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI;IAKjD,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,wBAAwB,GAAG,IAAI;IAI9E,WAAW,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI;IAI5C,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAKxD,YAAY,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,IAAI;IAIzC,IAAI,IAAI,IAAI;IAIZ,IAAI,IAAI,IAAI;IAIZ,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAQpD;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IASxB,OAAO,CAAC,oBAAoB;IAW5B,OAAO,CAAC,YAAY;IAapB,MAAM;CA+BP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,iBAAiB,CAAC;KAClC;CACF"}
@@ -1,6 +1,6 @@
1
- import { html as p } from "lit";
2
- import { s as e, j as g, e as m } from "./index-CpMbWdgn.js";
3
- const i = [
1
+ import { html as d } from "lit";
2
+ import { s as e, j as f, e as m } from "./index-2S5kBS5_.js";
3
+ const n = [
4
4
  { text: "Home", href: "#" },
5
5
  { text: "About", href: "#" },
6
6
  { text: "Contact", href: "#" }
@@ -13,7 +13,7 @@ const i = [
13
13
  options: {
14
14
  menu: {
15
15
  title: "Menu",
16
- options: { items: { label: "Items (JSON)", defaultValue: JSON.stringify(i), widget: "rich_text" } }
16
+ options: { items: { label: "Items (JSON)", defaultValue: JSON.stringify(n), widget: "rich_text" } }
17
17
  },
18
18
  style: {
19
19
  title: "Style",
@@ -31,7 +31,7 @@ const i = [
31
31
  }
32
32
  },
33
33
  defaultValues: {
34
- items: JSON.stringify(i),
34
+ items: JSON.stringify(n),
35
35
  textAlign: "center",
36
36
  fontSize: "14px",
37
37
  color: "#333333",
@@ -41,21 +41,22 @@ const i = [
41
41
  },
42
42
  renderer: {
43
43
  renderEditor(t) {
44
- const d = e(t, "containerPadding", "10px"), o = e(t, "textAlign", "center"), a = e(t, "fontSize", "14px"), l = e(t, "color", "#333333"), c = e(t, "separator", "|"), s = e(t, "separatorColor", "#cccccc"), x = g(t.items, i);
45
- return p`
46
- <div style="text-align:${o};font-size:${a};font-family:arial,sans-serif;">
47
- ${x.map((n, r) => p`${r > 0 ? p`<span style="color:${s};padding:0 8px;">${c}</span>` : ""}
48
- <a href=${n.href} style="color:${l};text-decoration:none;">${n.text}</a>`)}
44
+ e(t, "containerPadding", "10px");
45
+ const r = e(t, "textAlign", "center"), o = e(t, "fontSize", "14px"), i = e(t, "color", "#333333"), a = e(t, "separator", "|"), l = e(t, "separatorColor", "#cccccc"), c = f(t.items, n);
46
+ return d`
47
+ <div style="text-align:${r};font-size:${o};font-family:arial,sans-serif;">
48
+ ${c.map((s, p) => d`${p > 0 ? d`<span style="color:${l};padding:0 8px;">${a}</span>` : ""}
49
+ <a href=${s.href} style="color:${i};text-decoration:none;">${s.text}</a>`)}
49
50
  </div>
50
51
  `;
51
52
  },
52
53
  renderHtml(t) {
53
- const d = e(t, "containerPadding", "10px"), o = e(t, "textAlign", "center"), a = e(t, "fontSize", "14px"), l = e(t, "color", "#333333"), c = e(t, "separator", "|"), s = e(t, "separatorColor", "#cccccc"), n = g(t.items, i).map((r, f) => `${f > 0 ? `<span style="color:${s};padding:0 8px;">${c}</span>` : ""}<a href="${r.href}" target="_blank" style="color:${l};text-decoration:none;font-family:arial,helvetica,sans-serif;font-size:${a};">${r.text}</a>`).join("");
54
- return m(`<div style="text-align:${o};">${n}</div>`, { padding: d, align: o });
54
+ const r = e(t, "containerPadding", "10px"), o = e(t, "textAlign", "center"), i = e(t, "fontSize", "14px"), a = e(t, "color", "#333333"), l = e(t, "separator", "|"), c = e(t, "separatorColor", "#cccccc"), p = f(t.items, n).map((x, g) => `${g > 0 ? `<span style="color:${c};padding:0 8px;">${l}</span>` : ""}<a href="${x.href}" target="_blank" style="color:${a};text-decoration:none;font-family:arial,helvetica,sans-serif;font-size:${i};">${x.text}</a>`).join("");
55
+ return m(`<div style="text-align:${o};">${p}</div>`, { padding: r, align: o });
55
56
  }
56
57
  }
57
58
  };
58
59
  export {
59
60
  h as menuTool
60
61
  };
61
- //# sourceMappingURL=menu-tool-CJcQdpcP.js.map
62
+ //# sourceMappingURL=menu-tool-IZqYp8Vb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu-tool-CJcQdpcP.js","sources":["../src/tools/built-in/menu-tool.ts"],"sourcesContent":["/**\n * @module menu-tool\n *\n * Horizontal navigation menu with separator characters.\n *\n * Email compatibility: Uses inline `<a>` tags with text separators.\n * All styles are inline for cross-client rendering.\n */\n\nimport { html, TemplateResult } from 'lit';\nimport type { ContentValues } from '@emabuild/types';\nimport type { LitToolDefinition } from '../tool-registry.js';\nimport { str, jsonParse } from '../helpers/value-extractor.js';\nimport { emailTableCell } from '../helpers/email-html.js';\nimport type { MenuItem } from '../helpers/types.js';\n\nconst DEFAULT_ITEMS: MenuItem[] = [\n { text: 'Home', href: '#' },\n { text: 'About', href: '#' },\n { text: 'Contact', href: '#' },\n];\n\nexport const menuTool: LitToolDefinition = {\n name: 'menu',\n label: 'Menu',\n icon: `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"><line x1=\"4\" y1=\"6\" x2=\"20\" y2=\"6\"/><line x1=\"4\" y1=\"12\" x2=\"20\" y2=\"12\"/><line x1=\"4\" y1=\"18\" x2=\"20\" y2=\"18\"/></svg>`,\n supportedDisplayModes: ['email', 'web'],\n position: 9,\n options: {\n menu: {\n title: 'Menu',\n options: { items: { label: 'Items (JSON)', defaultValue: JSON.stringify(DEFAULT_ITEMS), widget: 'rich_text' } },\n },\n style: {\n title: 'Style',\n options: {\n textAlign: { label: 'Align', defaultValue: 'center', widget: 'alignment' },\n fontSize: { label: 'Font Size', defaultValue: '14px', widget: 'text' },\n color: { label: 'Text Color', defaultValue: '#333333', widget: 'color_picker' },\n separator: { label: 'Separator', defaultValue: '|', widget: 'text' },\n separatorColor: { label: 'Separator Color', defaultValue: '#cccccc', widget: 'color_picker' },\n },\n },\n spacing: {\n title: 'Spacing',\n options: { containerPadding: { label: 'Padding', defaultValue: '10px', widget: 'padding' } },\n },\n },\n defaultValues: {\n items: JSON.stringify(DEFAULT_ITEMS), textAlign: 'center', fontSize: '14px',\n color: '#333333', separator: '|', separatorColor: '#cccccc', containerPadding: '10px',\n },\n renderer: {\n renderEditor(values: ContentValues): TemplateResult {\n const padding = str(values, 'containerPadding', '10px');\n const align = str(values, 'textAlign', 'center');\n const fontSize = str(values, 'fontSize', '14px');\n const color = str(values, 'color', '#333333');\n const sep = str(values, 'separator', '|');\n const sepColor = str(values, 'separatorColor', '#cccccc');\n const items = jsonParse<MenuItem[]>(values.items, DEFAULT_ITEMS);\n\n return html`\n <div style=\"text-align:${align};font-size:${fontSize};font-family:arial,sans-serif;\">\n ${items.map((item, i) => html`${i > 0 ? html`<span style=\"color:${sepColor};padding:0 8px;\">${sep}</span>` : ''}\n <a href=${item.href} style=\"color:${color};text-decoration:none;\">${item.text}</a>`)}\n </div>\n `;\n },\n renderHtml(values: ContentValues): string {\n const padding = str(values, 'containerPadding', '10px');\n const align = str(values, 'textAlign', 'center');\n const fontSize = str(values, 'fontSize', '14px');\n const color = str(values, 'color', '#333333');\n const sep = str(values, 'separator', '|');\n const sepColor = str(values, 'separatorColor', '#cccccc');\n const items = jsonParse<MenuItem[]>(values.items, DEFAULT_ITEMS);\n\n const links = items.map((item, i) => {\n const prefix = i > 0 ? `<span style=\"color:${sepColor};padding:0 8px;\">${sep}</span>` : '';\n return `${prefix}<a href=\"${item.href}\" target=\"_blank\" style=\"color:${color};text-decoration:none;font-family:arial,helvetica,sans-serif;font-size:${fontSize};\">${item.text}</a>`;\n }).join('');\n\n return emailTableCell(`<div style=\"text-align:${align};\">${links}</div>`, { padding, align });\n },\n },\n};\n"],"names":["DEFAULT_ITEMS","menuTool","values","padding","str","align","fontSize","color","sep","sepColor","items","jsonParse","html","item","i","links","emailTableCell"],"mappings":";;AAgBA,MAAMA,IAA4B;AAAA,EAChC,EAAE,MAAM,QAAQ,MAAM,IAAA;AAAA,EACtB,EAAE,MAAM,SAAS,MAAM,IAAA;AAAA,EACvB,EAAE,MAAM,WAAW,MAAM,IAAA;AAC3B,GAEaC,IAA8B;AAAA,EACzC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,uBAAuB,CAAC,SAAS,KAAK;AAAA,EACtC,UAAU;AAAA,EACV,SAAS;AAAA,IACP,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,SAAS,EAAE,OAAO,EAAE,OAAO,gBAAgB,cAAc,KAAK,UAAUD,CAAa,GAAG,QAAQ,cAAY;AAAA,IAAE;AAAA,IAEhH,OAAO;AAAA,MACL,OAAO;AAAA,MACP,SAAS;AAAA,QACP,WAAW,EAAE,OAAO,SAAS,cAAc,UAAU,QAAQ,YAAA;AAAA,QAC7D,UAAU,EAAE,OAAO,aAAa,cAAc,QAAQ,QAAQ,OAAA;AAAA,QAC9D,OAAO,EAAE,OAAO,cAAc,cAAc,WAAW,QAAQ,eAAA;AAAA,QAC/D,WAAW,EAAE,OAAO,aAAa,cAAc,KAAK,QAAQ,OAAA;AAAA,QAC5D,gBAAgB,EAAE,OAAO,mBAAmB,cAAc,WAAW,Q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Q,kBAAkB,SAAS,GAGlDa,IAFQJ,EAAsBT,EAAO,OAAOF,CAAa,EAE3C,IAAI,CAACa,GAAMC,MAEtB,GADQA,IAAI,IAAI,sBAAsBL,CAAQ,oBAAoBD,CAAG,YAAY,EACxE,YAAYK,EAAK,IAAI,kCAAkCN,CAAK,0EAA0ED,CAAQ,MAAMO,EAAK,IAAI,MAC9K,EAAE,KAAK,EAAE;AAEV,aAAOG,EAAe,0BAA0BX,CAAK,MAAMU,CAAK,UAAU,EAAE,SAAAZ,GAAS,OAAAE,GAAO;AAAA,IAC9F;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"menu-tool-IZqYp8Vb.js","sources":["../src/tools/built-in/menu-tool.ts"],"sourcesContent":["/**\n * @module menu-tool\n *\n * Horizontal navigation menu with separator characters.\n *\n * Email compatibility: Uses inline `<a>` tags with text separators.\n * All styles are inline for cross-client rendering.\n */\n\nimport { html, TemplateResult } from 'lit';\nimport type { ContentValues } from '@emabuild/types';\nimport type { LitToolDefinition } from '../tool-registry.js';\nimport { str, jsonParse } from '../helpers/value-extractor.js';\nimport { emailTableCell } from '../helpers/email-html.js';\nimport type { MenuItem } from '../helpers/types.js';\n\nconst DEFAULT_ITEMS: MenuItem[] = [\n { text: 'Home', href: '#' },\n { text: 'About', href: '#' },\n { text: 'Contact', href: '#' },\n];\n\nexport const menuTool: LitToolDefinition = {\n name: 'menu',\n label: 'Menu',\n icon: `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"><line x1=\"4\" y1=\"6\" x2=\"20\" y2=\"6\"/><line x1=\"4\" y1=\"12\" x2=\"20\" y2=\"12\"/><line x1=\"4\" y1=\"18\" x2=\"20\" y2=\"18\"/></svg>`,\n supportedDisplayModes: ['email', 'web'],\n position: 9,\n options: {\n menu: {\n title: 'Menu',\n options: { items: { label: 'Items (JSON)', defaultValue: JSON.stringify(DEFAULT_ITEMS), widget: 'rich_text' } },\n },\n style: {\n title: 'Style',\n options: {\n textAlign: { label: 'Align', defaultValue: 'center', widget: 'alignment' },\n fontSize: { label: 'Font Size', defaultValue: '14px', widget: 'text' },\n color: { label: 'Text Color', defaultValue: '#333333', widget: 'color_picker' },\n separator: { label: 'Separator', defaultValue: '|', widget: 'text' },\n separatorColor: { label: 'Separator Color', defaultValue: '#cccccc', widget: 'color_picker' },\n },\n },\n spacing: {\n title: 'Spacing',\n options: { containerPadding: { label: 'Padding', defaultValue: '10px', widget: 'padding' } },\n },\n },\n defaultValues: {\n items: JSON.stringify(DEFAULT_ITEMS), textAlign: 'center', fontSize: '14px',\n color: '#333333', separator: '|', separatorColor: '#cccccc', containerPadding: '10px',\n },\n renderer: {\n renderEditor(values: ContentValues): TemplateResult {\n const padding = str(values, 'containerPadding', '10px');\n const align = str(values, 'textAlign', 'center');\n const fontSize = str(values, 'fontSize', '14px');\n const color = str(values, 'color', '#333333');\n const sep = str(values, 'separator', '|');\n const sepColor = str(values, 'separatorColor', '#cccccc');\n const items = jsonParse<MenuItem[]>(values.items, DEFAULT_ITEMS);\n\n return html`\n <div style=\"text-align:${align};font-size:${fontSize};font-family:arial,sans-serif;\">\n ${items.map((item, i) => html`${i > 0 ? html`<span style=\"color:${sepColor};padding:0 8px;\">${sep}</span>` : ''}\n <a href=${item.href} style=\"color:${color};text-decoration:none;\">${item.text}</a>`)}\n </div>\n `;\n },\n renderHtml(values: ContentValues): string {\n const padding = str(values, 'containerPadding', '10px');\n const align = str(values, 'textAlign', 'center');\n const fontSize = str(values, 'fontSize', '14px');\n const color = str(values, 'color', '#333333');\n const sep = str(values, 'separator', '|');\n const sepColor = str(values, 'separatorColor', '#cccccc');\n const items = jsonParse<MenuItem[]>(values.items, DEFAULT_ITEMS);\n\n const links = items.map((item, i) => {\n const prefix = i > 0 ? `<span style=\"color:${sepColor};padding:0 8px;\">${sep}</span>` : '';\n return `${prefix}<a href=\"${item.href}\" target=\"_blank\" style=\"color:${color};text-decoration:none;font-family:arial,helvetica,sans-serif;font-size:${fontSize};\">${item.text}</a>`;\n }).join('');\n\n return emailTableCell(`<div style=\"text-align:${align};\">${links}</div>`, { padding, align });\n },\n },\n};\n"],"names":["DEFAULT_ITEMS","menuTool","values","str","align","fontSize","color","sep","sepColor","items","jsonParse","html","item","i","padding","links","emailTableCell"],"mappings":";;AAgBA,MAAMA,IAA4B;AAAA,EAChC,EAAE,MAAM,QAAQ,MAAM,IAAA;AAAA,EACtB,EAAE,MAAM,SAAS,MAAM,IAAA;AAAA,EACvB,EAAE,MAAM,WAAW,MAAM,IAAA;AAC3B,GAEaC,IAA8B;AAAA,EACzC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,uBAAuB,CAAC,SAAS,KAAK;AAAA,EACtC,UAAU;AAAA,EACV,SAAS;AAAA,IACP,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,SAAS,EAAE,OAAO,EAAE,OAAO,gBAAgB,cAAc,KAAK,UAAUD,CAAa,GAAG,QAAQ,cAAY;AAAA,IAAE;AAAA,IAEhH,OAAO;AAAA,MACL,OAAO;AAAA,MACP,SAAS;AAAA,QACP,WAAW,EAAE,OAAO,SAAS,cAAc,UAAU,QAAQ,YAAA;AAAA,QAC7D,UAAU,EAAE,OAAO,aAAa,cAAc,QAAQ,QAAQ,OAAA;AAAA,QAC9D,OAAO,EAAE,OAAO,cAAc,cAAc,WAAW,QAAQ,eAAA;AAAA,QAC/D,WAAW,EAAE,OAAO,aAAa,cAAc,KAAK,QAAQ,OAAA;AAAA,QAC5D,gBAAgB,EAAE,OAAO,mBAAmB,cAAc,WAAW,QAAQ,eAAA;AAAA,MAAe;AAAA,IAC9F;AAAA,IAEF,SAAS;AAAA,MACP,OAAO;AAAA,MACP,SAAS,EAAE,kBAAkB,EAAE,OAAO,WAAW,cAAc,QAAQ,QAAQ,UAAA,EAAU;AAAA,IAAE;AAAA,EAC7F;AAAA,EAEF,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MAAMO,EAAK,IAAI,MAC9K,EAAE,KAAK,EAAE;AAEV,aAAOI,EAAe,0BAA0BZ,CAAK,MAAMW,CAAK,UAAU,EAAE,SAAAD,GAAS,OAAAV,GAAO;AAAA,IAC9F;AAAA,EAAA;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"property-panel.d.ts","sourceRoot":"","sources":["../../src/properties/property-panel.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAQ9D,qBACa,aAAc,SAAQ,UAAU;IAC3C,MAAM,CAAC,MAAM,0BAiCX;IAEF,OAAO,CAAC,SAAS,CAAsD;IAEvE,IACI,KAAK,CAAC,CAAC,EAAE,WAAW,EAAiC;IACzD,IAAI,KAAK,IAAI,WAAW,CAAkC;IAE1B,YAAY,EAAG,YAAY,CAAC;IAE5D,8EAA8E;IAC9E,OAAO,CAAC,QAAQ;IAMhB,MAAM;IAyBN,OAAO,CAAC,WAAW;IAanB,kFAAkF;IAClF,OAAO,CAAC,YAAY;CAgBrB"}
1
+ {"version":3,"file":"property-panel.d.ts","sourceRoot":"","sources":["../../src/properties/property-panel.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAQ9D,qBACa,aAAc,SAAQ,UAAU;IAC3C,MAAM,CAAC,MAAM,0BA6EX;IAEF,OAAO,CAAC,SAAS,CAAsD;IAEvE,IACI,KAAK,CAAC,CAAC,EAAE,WAAW,EAAiC;IACzD,IAAI,KAAK,IAAI,WAAW,CAAkC;IAE1B,YAAY,EAAG,YAAY,CAAC;IAE5D,8EAA8E;IAC9E,OAAO,CAAC,QAAQ;IAMhB,MAAM;IAuBN,OAAO,CAAC,WAAW;IAanB,kFAAkF;IAClF,OAAO,CAAC,YAAY;CAiBrB"}
@@ -0,0 +1,4 @@
1
+ import { TemplateResult } from 'lit';
2
+ /** Render an image URL input with optional upload button */
3
+ export declare function renderImageUpload(value: string, onChange: (v: string) => void, label: string, uploadCallback?: Function): TemplateResult;
4
+ //# sourceMappingURL=image-upload-widget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-upload-widget.d.ts","sourceRoot":"","sources":["../../../src/properties/widgets/image-upload-widget.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAQ,cAAc,EAAW,MAAM,KAAK,CAAC;AAEpD,4DAA4D;AAC5D,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,EAC7B,KAAK,EAAE,MAAM,EACb,cAAc,CAAC,EAAE,QAAQ,GACxB,cAAc,CAgChB"}
@@ -6,4 +6,5 @@ export { renderToggle } from './toggle-widget.js';
6
6
  export { renderTextInput } from './text-input-widget.js';
7
7
  export { renderTextArea } from './textarea-widget.js';
8
8
  export { renderNumberUnit } from './number-unit-widget.js';
9
+ export { renderImageUpload } from './image-upload-widget.js';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/properties/widgets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/properties/widgets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"register-elements.d.ts","sourceRoot":"","sources":["../src/register-elements.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA8BH,eAAO,MAAM,mBAAmB,SAAkD,CAAC"}
1
+ {"version":3,"file":"register-elements.d.ts","sourceRoot":"","sources":["../src/register-elements.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgCH,eAAO,MAAM,mBAAmB,SAAkD,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { LitElement } from 'lit';
2
+ import { EditorStore } from '../state/editor-store.js';
3
+ import { ToolRegistry } from '../tools/tool-registry.js';
4
+ export interface A11yIssue {
5
+ severity: 'error' | 'warning' | 'info';
6
+ rule: string;
7
+ message: string;
8
+ element?: string;
9
+ elementId?: string;
10
+ }
11
+ export declare class A11yChecker extends LitElement {
12
+ static styles: import('lit').CSSResult;
13
+ private storeCtrl;
14
+ set store(s: EditorStore);
15
+ get store(): EditorStore;
16
+ toolRegistry: ToolRegistry;
17
+ private checkAccessibility;
18
+ private handleIssueClick;
19
+ private handleIssueHover;
20
+ private handleFixPreheader;
21
+ private handleFixHeading;
22
+ render(): import('lit').TemplateResult<1>;
23
+ private renderIssue;
24
+ }
25
+ /** Standalone a11y check — used by both the A11yChecker component and the sidebar tab badge */
26
+ export declare function checkA11y(store: EditorStore): A11yIssue[];
27
+ //# sourceMappingURL=a11y-checker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"a11y-checker.d.ts","sourceRoot":"","sources":["../../src/sidebar/a11y-checker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAErD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAG9D,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA8ED,qBACa,WAAY,SAAQ,UAAU;IACzC,MAAM,CAAC,MAAM,0BAsGX;IAEF,OAAO,CAAC,SAAS,CAAyC;IAE1D,IACI,KAAK,CAAC,CAAC,EAAE,WAAW,EAAiC;IACzD,IAAI,KAAK,IAAI,WAAW,CAAkC;IAE1B,YAAY,EAAG,YAAY,CAAC;IAE5D,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,kBAAkB;IAc1B,OAAO,CAAC,gBAAgB;IAWxB,MAAM;IA6CN,OAAO,CAAC,WAAW;CAmBpB;AAED,+FAA+F;AAC/F,wBAAgB,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,EAAE,CA4HzD"}
@@ -5,6 +5,8 @@ export declare class BodySettings extends LitElement {
5
5
  private storeCtrl;
6
6
  set store(s: EditorStore);
7
7
  get store(): EditorStore;
8
+ /** Scroll to preheader field, focus it, and pulse highlight */
9
+ highlightPreheader(): void;
8
10
  private update_;
9
11
  private updateLinkStyle;
10
12
  private updateFontFamily;
@@ -1 +1 @@
1
- {"version":3,"file":"body-settings.d.ts","sourceRoot":"","sources":["../../src/sidebar/body-settings.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AA0B5D,qBACa,YAAa,SAAQ,UAAU;IAC1C,MAAM,CAAC,MAAM,0BAwBX;IAEF,OAAO,CAAC,SAAS,CAAyC;IAE1D,IACI,KAAK,CAAC,CAAC,EAAE,WAAW,EAAiC;IACzD,IAAI,KAAK,IAAI,WAAW,CAAkC;IAE1D,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,gBAAgB;IAkBxB,MAAM;IAwDN,gDAAgD;IAChD,OAAO,CAAC,gBAAgB;CAWzB"}
1
+ {"version":3,"file":"body-settings.d.ts","sourceRoot":"","sources":["../../src/sidebar/body-settings.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AA0B5D,qBACa,YAAa,SAAQ,UAAU;IAC1C,MAAM,CAAC,MAAM,0BAgCX;IAEF,OAAO,CAAC,SAAS,CAAyC;IAE1D,IACI,KAAK,CAAC,CAAC,EAAE,WAAW,EAAiC;IACzD,IAAI,KAAK,IAAI,WAAW,CAAkC;IAE1D,+DAA+D;IAC/D,kBAAkB;IAWlB,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,gBAAgB;IAkBxB,MAAM;IAwDN,gDAAgD;IAChD,OAAO,CAAC,gBAAgB;CAWzB"}
@@ -7,13 +7,16 @@ export declare class EditorSidebar extends LitElement {
7
7
  set store(s: EditorStore);
8
8
  get store(): EditorStore;
9
9
  toolRegistry: ToolRegistry;
10
+ private searchQuery;
11
+ private getA11ySeverities;
10
12
  private handleDragStart;
11
13
  private handleLayoutDragStart;
12
14
  private addRowWithLayout;
13
15
  render(): import('lit').TemplateResult<1>;
14
- private renderContentTab;
16
+ private renderElementsTab;
17
+ private renderA11yBadge;
18
+ private renderToolItem;
15
19
  private renderLayoutOption;
16
- private renderBlocksTab;
17
20
  private renderBodyTab;
18
21
  }
19
22
  //# sourceMappingURL=editor-sidebar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"editor-sidebar.d.ts","sourceRoot":"","sources":["../../src/sidebar/editor-sidebar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAmC,MAAM,2BAA2B,CAAC;AAG/F,OAAO,oBAAoB,CAAC;AAE5B,qBACa,aAAc,SAAQ,UAAU;IAC3C,MAAM,CAAC,MAAM,0BAqIX;IAEF,OAAO,CAAC,SAAS,CAA4C;IAE7D,IACI,KAAK,CAAC,CAAC,EAAE,WAAW,EAAiC;IACzD,IAAI,KAAK,IAAI,WAAW,CAAkC;IAE1B,YAAY,EAAG,YAAY,CAAC;IAE5D,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,qBAAqB;IAK7B,OAAO,CAAC,gBAAgB;IAKxB,MAAM;IAmBN,OAAO,CAAC,gBAAgB;IA8BxB,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,aAAa;CAGtB"}
1
+ {"version":3,"file":"editor-sidebar.d.ts","sourceRoot":"","sources":["../../src/sidebar/editor-sidebar.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAErD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAgB,MAAM,2BAA2B,CAAC;AAG5E,OAAO,oBAAoB,CAAC;AAW5B,qBACa,aAAc,SAAQ,UAAU;IAC3C,MAAM,CAAC,MAAM,0BAiKX;IAEF,OAAO,CAAC,SAAS,CAAsD;IAEvE,IACI,KAAK,CAAC,CAAC,EAAE,WAAW,EAAiC;IACzD,IAAI,KAAK,IAAI,WAAW,CAAkC;IAE1B,YAAY,EAAG,YAAY,CAAC;IAEnD,OAAO,CAAC,WAAW,CAAM;IAElC,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,qBAAqB;IAK7B,OAAO,CAAC,gBAAgB;IAKxB,MAAM;IAmBN,OAAO,CAAC,iBAAiB;IA8EzB,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,kBAAkB;IAY1B,OAAO,CAAC,aAAa;CAGtB"}
@@ -1,5 +1,5 @@
1
- import { html as s } from "lit";
2
- import { s as t, j as g, e as x } from "./index-CpMbWdgn.js";
1
+ import { html as d } from "lit";
2
+ import { s as i, j as s, e as x } from "./index-2S5kBS5_.js";
3
3
  const l = [
4
4
  { name: "Facebook", url: "https://facebook.com/", icon: "f", color: "#1877F2" },
5
5
  { name: "Twitter", url: "https://twitter.com/", icon: "𝕏", color: "#000000" },
@@ -38,25 +38,26 @@ const l = [
38
38
  },
39
39
  renderer: {
40
40
  renderEditor(n) {
41
- const r = t(n, "containerPadding", "10px"), o = t(n, "textAlign", "center"), i = t(n, "iconSize", "32px"), c = t(n, "iconSpacing", "8px"), d = g(n.icons, l);
42
- return s`
43
- <div style="text-align:${o};">
44
- ${d.map((e) => s`
45
- <a href=${e.url} target="_blank" style="display:inline-block;width:${i};height:${i};line-height:${i};text-align:center;background:${e.color};color:white;border-radius:50%;text-decoration:none;font-size:14px;font-weight:bold;margin:0 ${c};font-family:arial,sans-serif;vertical-align:middle;">${e.icon}</a>
41
+ i(n, "containerPadding", "10px");
42
+ const c = i(n, "textAlign", "center"), e = i(n, "iconSize", "32px"), t = i(n, "iconSpacing", "8px"), a = s(n.icons, l);
43
+ return d`
44
+ <div style="text-align:${c};">
45
+ ${a.map((o) => d`
46
+ <a href=${o.url} target="_blank" style="display:inline-block;width:${e};height:${e};line-height:${e};text-align:center;background:${o.color};color:white;border-radius:50%;text-decoration:none;font-size:14px;font-weight:bold;margin:0 ${t};font-family:arial,sans-serif;vertical-align:middle;">${o.icon}</a>
46
47
  `)}
47
48
  </div>
48
49
  `;
49
50
  },
50
51
  renderHtml(n) {
51
- const r = t(n, "containerPadding", "10px"), o = t(n, "textAlign", "center"), i = t(n, "iconSize", "32"), c = t(n, "iconSpacing", "8px"), e = g(n.icons, l).map(
52
- (a) => `<td align="center" valign="middle" style="padding:0 ${c};"><a href="${a.url}" target="_blank" style="text-decoration:none;"><table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td width="${i}" height="${i}" align="center" valign="middle" style="width:${i}px;height:${i}px;background:${a.color};border-radius:50%;color:#fff;font-size:14px;font-weight:bold;font-family:arial,sans-serif;">${a.icon}</td></tr></table></a></td>`
52
+ const c = i(n, "containerPadding", "10px"), e = i(n, "textAlign", "center"), t = i(n, "iconSize", "32"), a = i(n, "iconSpacing", "8px"), g = s(n.icons, l).map(
53
+ (r) => `<td align="center" valign="middle" style="padding:0 ${a};"><a href="${r.url}" target="_blank" style="text-decoration:none;"><table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td width="${t}" height="${t}" align="center" valign="middle" style="width:${t}px;height:${t}px;background:${r.color};border-radius:50%;color:#fff;font-size:14px;font-weight:bold;font-family:arial,sans-serif;">${r.icon}</td></tr></table></a></td>`
53
54
  ).join(`
54
- `), p = `<table role="presentation" cellpadding="0" cellspacing="0" border="0" align="${o}"><tr>${e}</tr></table>`;
55
- return x(p, { padding: r, align: o });
55
+ `), p = `<table role="presentation" cellpadding="0" cellspacing="0" border="0" align="${e}"><tr>${g}</tr></table>`;
56
+ return x(p, { padding: c, align: e });
56
57
  }
57
58
  }
58
59
  };
59
60
  export {
60
61
  h as socialTool
61
62
  };
62
- //# sourceMappingURL=social-tool-CRY3-_sU.js.map
63
+ //# sourceMappingURL=social-tool-C1FeCyUm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"social-tool-CRY3-_sU.js","sources":["../src/tools/built-in/social-tool.ts"],"sourcesContent":["/**\n * @module social-tool\n *\n * Social media icon links (Facebook, Twitter, Instagram, LinkedIn, etc.).\n *\n * Email compatibility: Uses nested tables for icon layout.\n * Each icon is a colored circle with centered text, rendered\n * as a table cell for cross-client consistency.\n */\n\nimport { html, TemplateResult } from 'lit';\nimport type { ContentValues } from '@emabuild/types';\nimport type { LitToolDefinition } from '../tool-registry.js';\nimport { str, jsonParse } from '../helpers/value-extractor.js';\nimport { emailTableCell } from '../helpers/email-html.js';\nimport type { SocialIcon } from '../helpers/types.js';\n\nconst DEFAULT_ICONS: SocialIcon[] = [\n { name: 'Facebook', url: 'https://facebook.com/', icon: 'f', color: '#1877F2' },\n { name: 'Twitter', url: 'https://twitter.com/', icon: '𝕏', color: '#000000' },\n { name: 'Instagram', url: 'https://instagram.com/', icon: '📷', color: '#E4405F' },\n { name: 'LinkedIn', url: 'https://linkedin.com/', icon: 'in', color: '#0A66C2' },\n];\n\nexport const socialTool: LitToolDefinition = {\n name: 'social',\n label: 'Social',\n icon: `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"18\" cy=\"5\" r=\"3\"/><circle cx=\"6\" cy=\"12\" r=\"3\"/><circle cx=\"18\" cy=\"19\" r=\"3\"/><line x1=\"8.59\" y1=\"13.51\" x2=\"15.42\" y2=\"17.49\"/><line x1=\"15.41\" y1=\"6.51\" x2=\"8.59\" y2=\"10.49\"/></svg>`,\n supportedDisplayModes: ['email', 'web'],\n position: 8,\n options: {\n icons: {\n title: 'Social Icons',\n options: {\n icons: { label: 'Icons (JSON)', defaultValue: JSON.stringify(DEFAULT_ICONS), widget: 'rich_text' },\n iconSize: { label: 'Icon Size', defaultValue: '32px', widget: 'text' },\n iconSpacing: { label: 'Spacing', defaultValue: '8px', widget: 'text' },\n },\n },\n style: {\n title: 'Style',\n options: { textAlign: { label: 'Align', defaultValue: 'center', widget: 'alignment' } },\n },\n spacing: {\n title: 'Spacing',\n options: { containerPadding: { label: 'Padding', defaultValue: '10px', widget: 'padding' } },\n },\n },\n defaultValues: {\n icons: JSON.stringify(DEFAULT_ICONS), iconSize: '32px', iconSpacing: '8px',\n textAlign: 'center', containerPadding: '10px',\n },\n renderer: {\n renderEditor(values: ContentValues): TemplateResult {\n const padding = str(values, 'containerPadding', '10px');\n const align = str(values, 'textAlign', 'center');\n const iconSize = str(values, 'iconSize', '32px');\n const spacing = str(values, 'iconSpacing', '8px');\n const icons = jsonParse<SocialIcon[]>(values.icons, DEFAULT_ICONS);\n\n return html`\n <div style=\"text-align:${align};\">\n ${icons.map((s) => html`\n <a href=${s.url} target=\"_blank\" style=\"display:inline-block;width:${iconSize};height:${iconSize};line-height:${iconSize};text-align:center;background:${s.color};color:white;border-radius:50%;text-decoration:none;font-size:14px;font-weight:bold;margin:0 ${spacing};font-family:arial,sans-serif;vertical-align:middle;\">${s.icon}</a>\n `)}\n </div>\n `;\n },\n renderHtml(values: ContentValues): string {\n const padding = str(values, 'containerPadding', '10px');\n const align = str(values, 'textAlign', 'center');\n const iconSize = str(values, 'iconSize', '32');\n const spacing = str(values, 'iconSpacing', '8px');\n const icons = jsonParse<SocialIcon[]>(values.icons, DEFAULT_ICONS);\n\n const cells = icons.map((s) =>\n `<td align=\"center\" valign=\"middle\" style=\"padding:0 ${spacing};\"><a href=\"${s.url}\" target=\"_blank\" style=\"text-decoration:none;\"><table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td width=\"${iconSize}\" height=\"${iconSize}\" align=\"center\" valign=\"middle\" style=\"width:${iconSize}px;height:${iconSize}px;background:${s.color};border-radius:50%;color:#fff;font-size:14px;font-weight:bold;font-family:arial,sans-serif;\">${s.icon}</td></tr></table></a></td>`\n ).join('\\n');\n\n const inner = `<table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"${align}\"><tr>${cells}</tr></table>`;\n return emailTableCell(inner, { padding, align });\n },\n },\n};\n"],"names":["DEFAULT_ICONS","socialTool","values","padding","str","align","iconSize","spacing","icons","jsonParse","html","s","cells","inner","emailTableCell"],"mappings":";;AAiBA,MAAMA,IAA8B;AAAA,EAClC,EAAE,MAAM,YAAY,KAAK,yBAAyB,MAAM,KAAK,OAAO,UAAA;AAAA,EACpE,EAAE,MAAM,WAAW,KAAK,wBAAwB,MAAM,MAAM,OAAO,UAAA;AAAA,EACnE,EAAE,MAAM,aAAa,KAAK,0BAA0B,MAAM,MAAM,OAAO,UAAA;AAAA,EACvE,EAAE,MAAM,YAAY,KAAK,yBAAyB,MAAM,MAAM,OAAO,UAAA;AACvE,GAEaC,IAAgC;AAAA,EAC3C,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,uBAAuB,CAAC,SAAS,KAAK;AAAA,EACtC,UAAU;AAAA,EACV,SAAS;AAAA,IACP,OAAO;AAAA,MACL,OAAO;AAAA,MACP,SAAS;AAAA,QACP,OAAO,EAAE,OAAO,gBAAgB,cAAc,KAAK,UAAUD,CAAa,G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,YAAY,IAAI,GACvCK,IAAUH,EAAIF,GAAQ,eAAe,KAAK,GAG1CU,IAFQH,EAAwBP,EAAO,OAAOF,CAAa,EAE7C;AAAA,QAAI,CAACW,MACvB,uDAAuDJ,CAAO,eAAeI,EAAE,GAAG,wIAAwIL,CAAQ,aAAaA,CAAQ,iDAAiDA,CAAQ,aAAaA,CAAQ,iBAAiBK,EAAE,KAAK,gGAAgGA,EAAE,IAAI;AAAA,MAAA,EACnc,KAAK;AAAA,CAAI,GAELE,IAAQ,gFAAgFR,CAAK,SAASO,CAAK;AACjH,aAAOE,EAAeD,GAAO,EAAE,SAAAV,GAAS,OAAAE,GAAO;AAAA,IACjD;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"social-tool-C1FeCyUm.js","sources":["../src/tools/built-in/social-tool.ts"],"sourcesContent":["/**\n * @module social-tool\n *\n * Social media icon links (Facebook, Twitter, Instagram, LinkedIn, etc.).\n *\n * Email compatibility: Uses nested tables for icon layout.\n * Each icon is a colored circle with centered text, rendered\n * as a table cell for cross-client consistency.\n */\n\nimport { html, TemplateResult } from 'lit';\nimport type { ContentValues } from '@emabuild/types';\nimport type { LitToolDefinition } from '../tool-registry.js';\nimport { str, jsonParse } from '../helpers/value-extractor.js';\nimport { emailTableCell } from '../helpers/email-html.js';\nimport type { SocialIcon } from '../helpers/types.js';\n\nconst DEFAULT_ICONS: SocialIcon[] = [\n { name: 'Facebook', url: 'https://facebook.com/', icon: 'f', color: '#1877F2' },\n { name: 'Twitter', url: 'https://twitter.com/', icon: '𝕏', color: '#000000' },\n { name: 'Instagram', url: 'https://instagram.com/', icon: '📷', color: '#E4405F' },\n { name: 'LinkedIn', url: 'https://linkedin.com/', icon: 'in', color: '#0A66C2' },\n];\n\nexport const socialTool: LitToolDefinition = {\n name: 'social',\n label: 'Social',\n icon: `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"18\" cy=\"5\" r=\"3\"/><circle cx=\"6\" cy=\"12\" r=\"3\"/><circle cx=\"18\" cy=\"19\" r=\"3\"/><line x1=\"8.59\" y1=\"13.51\" x2=\"15.42\" y2=\"17.49\"/><line x1=\"15.41\" y1=\"6.51\" x2=\"8.59\" y2=\"10.49\"/></svg>`,\n supportedDisplayModes: ['email', 'web'],\n position: 8,\n options: {\n icons: {\n title: 'Social Icons',\n options: {\n icons: { label: 'Icons (JSON)', defaultValue: JSON.stringify(DEFAULT_ICONS), widget: 'rich_text' },\n iconSize: { label: 'Icon Size', defaultValue: '32px', widget: 'text' },\n iconSpacing: { label: 'Spacing', defaultValue: '8px', widget: 'text' },\n },\n },\n style: {\n title: 'Style',\n options: { textAlign: { label: 'Align', defaultValue: 'center', widget: 'alignment' } },\n },\n spacing: {\n title: 'Spacing',\n options: { containerPadding: { label: 'Padding', defaultValue: '10px', widget: 'padding' } },\n },\n },\n defaultValues: {\n icons: JSON.stringify(DEFAULT_ICONS), iconSize: '32px', iconSpacing: '8px',\n textAlign: 'center', containerPadding: '10px',\n },\n renderer: {\n renderEditor(values: ContentValues): TemplateResult {\n const padding = str(values, 'containerPadding', '10px');\n const align = str(values, 'textAlign', 'center');\n const iconSize = str(values, 'iconSize', '32px');\n const spacing = str(values, 'iconSpacing', '8px');\n const icons = jsonParse<SocialIcon[]>(values.icons, DEFAULT_ICONS);\n\n return html`\n <div style=\"text-align:${align};\">\n ${icons.map((s) => html`\n <a href=${s.url} target=\"_blank\" style=\"display:inline-block;width:${iconSize};height:${iconSize};line-height:${iconSize};text-align:center;background:${s.color};color:white;border-radius:50%;text-decoration:none;font-size:14px;font-weight:bold;margin:0 ${spacing};font-family:arial,sans-serif;vertical-align:middle;\">${s.icon}</a>\n `)}\n </div>\n `;\n },\n renderHtml(values: ContentValues): string {\n const padding = str(values, 'containerPadding', '10px');\n const align = str(values, 'textAlign', 'center');\n const iconSize = str(values, 'iconSize', '32');\n const spacing = str(values, 'iconSpacing', '8px');\n const icons = jsonParse<SocialIcon[]>(values.icons, DEFAULT_ICONS);\n\n const cells = icons.map((s) =>\n `<td align=\"center\" valign=\"middle\" style=\"padding:0 ${spacing};\"><a href=\"${s.url}\" target=\"_blank\" style=\"text-decoration:none;\"><table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td width=\"${iconSize}\" height=\"${iconSize}\" align=\"center\" valign=\"middle\" style=\"width:${iconSize}px;height:${iconSize}px;background:${s.color};border-radius:50%;color:#fff;font-size:14px;font-weight:bold;font-family:arial,sans-serif;\">${s.icon}</td></tr></table></a></td>`\n ).join('\\n');\n\n const inner = `<table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"${align}\"><tr>${cells}</tr></table>`;\n return emailTableCell(inner, { padding, align });\n },\n },\n};\n"],"names":["DEFAULT_ICONS","socialTool","values","str","align","iconSize","spacing","icons","jsonParse","html","s","padding","cells","inner","emailTableCell"],"mappings":";;AAiBA,MAAMA,IAA8B;AAAA,EAClC,EAAE,MAAM,YAAY,KAAK,yBAAyB,MAAM,KAAK,OAAO,UAAA;AAAA,EACpE,EAAE,MAAM,WAAW,KAAK,wBAAwB,MAAM,MAAM,OAAO,UAAA;AAAA,EACnE,EAAE,MAAM,aAAa,KAAK,0BAA0B,MAAM,MAAM,OAAO,UAAA;AAAA,EACvE,EAAE,MAAM,YAAY,KAAK,yBAAyB,MAAM,MAAM,OAAO,UAAA;AACvE,GAEaC,IAAgC;AAAA,EAC3C,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,uBAAuB,CAAC,SAAS,KAAK;AAAA,EACtC,UAAU;AAAA,EACV,SAAS;AAAA,IACP,OAAO;AAAA,MACL,OAAO;AAAA,MACP,SAAS;AAAA,QACP,OAAO,EAAE,OAAO,gBAAgB,cAAc,KAAK,UAAUD,CAAa,GAAG,QAAQ,YAAA;AAAA,QACrF,UA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Ae,KAAK,GAG1CU,IAFQJ,EAAwBN,EAAO,OAAOF,CAAa,EAE7C;AAAA,QAAI,CAACU,MACvB,uDAAuDJ,CAAO,eAAeI,EAAE,GAAG,wIAAwIL,CAAQ,aAAaA,CAAQ,iDAAiDA,CAAQ,aAAaA,CAAQ,iBAAiBK,EAAE,KAAK,gGAAgGA,EAAE,IAAI;AAAA,MAAA,EACnc,KAAK;AAAA,CAAI,GAELG,IAAQ,gFAAgFT,CAAK,SAASQ,CAAK;AACjH,aAAOE,EAAeD,GAAO,EAAE,SAAAF,GAAS,OAAAP,GAAO;AAAA,IACjD;AAAA,EAAA;AAEJ;"}
@@ -1,4 +1,4 @@
1
- import { EmailDesign, DesignBody, DesignRow, DesignColumn, DesignContent, BodyValues, RowValues, ColumnValues, ContentValues } from '@emabuild/types';
1
+ import { EmailDesign, DesignBody, DesignRow, DesignColumn, DesignContent, BodyValues, RowValues, ColumnValues, ContentValues, MergeTagGroup } from '@emabuild/types';
2
2
  import { EventEmitter } from '../utils/event-emitter.js';
3
3
  export type StoreSubscriber = () => void;
4
4
  /**
@@ -17,19 +17,22 @@ export declare class EditorStore {
17
17
  private design;
18
18
  private history;
19
19
  private counterManager;
20
- /** Legacy: subscribers that listen to ALL changes */
21
- private subscribers;
22
20
  /** Channel-based subscribers: only notified on specific changes */
23
21
  private channelSubscribers;
24
22
  /** Public event emitter for design:loaded, design:updated, etc. */
25
23
  readonly events: EventEmitter;
24
+ private _mergeTags;
25
+ private _callbacks;
26
+ setCallback(type: string, fn: Function): void;
27
+ getCallback(type: string): Function | undefined;
28
+ private _a11yIssueIds;
29
+ get a11yIssueIds(): Set<string>;
30
+ setA11yIssueIds(ids: Set<string>): void;
26
31
  private _selectedId;
27
32
  private _hoveredId;
28
33
  private _viewMode;
29
34
  private _activeTab;
30
35
  constructor();
31
- /** Subscribe to ALL state changes (legacy). Returns an unsubscribe function. */
32
- subscribe(fn: StoreSubscriber): () => void;
33
36
  /**
34
37
  * Subscribe to specific channels only. The callback is invoked only
35
38
  * when one of the listed channels fires. Returns an unsubscribe function.
@@ -41,9 +44,11 @@ export declare class EditorStore {
41
44
  * ```
42
45
  */
43
46
  subscribeChannels(channels: StoreChannel[], fn: StoreSubscriber): () => void;
44
- /** Notify legacy (all) subscribers */
45
- private notify;
46
- /** Notify only subscribers of specific channels + legacy subscribers */
47
+ /** @deprecated Use subscribeChannels instead */
48
+ subscribe(fn: StoreSubscriber): () => void;
49
+ /** Batched notification coalesces multiple channels into one rAF cycle */
50
+ private pendingChannels;
51
+ private rafId;
47
52
  private notifyChannels;
48
53
  /** Get the full design document */
49
54
  getDesign(): EmailDesign;
@@ -57,40 +62,42 @@ export declare class EditorStore {
57
62
  get hoveredId(): string | null;
58
63
  get viewMode(): 'desktop' | 'mobile';
59
64
  get activeTab(): string;
65
+ get mergeTags(): MergeTagGroup[];
60
66
  get canUndo(): boolean;
61
67
  get canRedo(): boolean;
62
68
  /** Load a design document, resetting history and selection */
63
69
  loadDesign(design: EmailDesign): void;
64
70
  undo(): void;
65
71
  redo(): void;
72
+ setMergeTags(tags: MergeTagGroup[]): void;
66
73
  select(id: string | null): void;
67
74
  hover(id: string | null): void;
68
75
  setViewMode(mode: 'desktop' | 'mobile'): void;
69
76
  setActiveTab(tab: string): void;
70
- /** Add a row at the given index (or at the end) */
71
- addRow(row: DesignRow, index?: number): void;
72
- /** Remove a row by ID */
73
- removeRow(rowId: string): void;
74
- /** Move a row from one index to another */
75
- moveRow(fromIndex: number, toIndex: number): void;
77
+ /** Add a row at the given index (or at the end). Returns the inserted row. */
78
+ addRow(row: DesignRow, index?: number): DesignRow;
79
+ /** Remove a row by ID. Returns true if removed. */
80
+ removeRow(rowId: string): boolean;
81
+ /** Move a row from one index to another. Returns true if moved. */
82
+ moveRow(fromIndex: number, toIndex: number): boolean;
76
83
  /** Duplicate a row, assigning fresh IDs to all nested elements */
77
- duplicateRow(rowId: string): void;
84
+ duplicateRow(rowId: string): DesignRow | undefined;
78
85
  /** Get the index of a row */
79
86
  getRowIndex(rowId: string): number;
80
- /** Update row-level values */
81
- updateRowValues(rowId: string, patch: Partial<RowValues>): void;
82
- /** Update column-level values */
83
- updateColumnValues(columnId: string, patch: Partial<ColumnValues>): void;
84
- /** Add content to a column at the given index */
85
- addContent(columnId: string, content: DesignContent, index?: number): void;
86
- /** Remove a content block by ID */
87
- removeContent(contentId: string): void;
88
- /** Update content values by ID */
89
- updateContentValues(contentId: string, patch: Partial<ContentValues>): void;
90
- /** Move a content block to a different column at a given index */
91
- moveContent(contentId: string, targetColumnId: string, targetIndex: number): void;
87
+ /** Update row-level values. Returns true if updated. */
88
+ updateRowValues(rowId: string, patch: Partial<RowValues>): boolean;
89
+ /** Update column-level values. Returns true if updated. */
90
+ updateColumnValues(columnId: string, patch: Partial<ColumnValues>): boolean;
91
+ /** Add content to a column at the given index. Returns the inserted content. */
92
+ addContent(columnId: string, content: DesignContent, index?: number): DesignContent | undefined;
93
+ /** Remove a content block by ID. Returns true if removed. */
94
+ removeContent(contentId: string): boolean;
95
+ /** Update content values by ID. Returns true if updated. */
96
+ updateContentValues(contentId: string, patch: Partial<ContentValues>): boolean;
97
+ /** Move a content block to a different column at a given index. Returns true if moved. */
98
+ moveContent(contentId: string, targetColumnId: string, targetIndex: number): boolean;
92
99
  /** Duplicate a content block, inserting the copy right after the original */
93
- duplicateContent(contentId: string): void;
100
+ duplicateContent(contentId: string): DesignContent | undefined;
94
101
  /** Update body-level values (background, fonts, etc.) */
95
102
  updateBodyValues(patch: Partial<BodyValues>): void;
96
103
  findRow(rowId: string): DesignRow | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"editor-store.d.ts","sourceRoot":"","sources":["../../src/state/editor-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,YAAY,EACZ,aAAa,EACb,UAAU,EACV,SAAS,EACT,YAAY,EACZ,aAAa,EAEd,MAAM,iBAAiB,C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pB,OAAO,CAAC,UAAU;CAGnB"}
@@ -1,6 +1,6 @@
1
- import { html as i } from "lit";
2
- import { s as t, j as f, e as C } from "./index-CpMbWdgn.js";
3
- const n = [
1
+ import { html as n } from "lit";
2
+ import { s as t, j as g, e as C } from "./index-2S5kBS5_.js";
3
+ const s = [
4
4
  ["Header 1", "Header 2", "Header 3"],
5
5
  ["Cell 1", "Cell 2", "Cell 3"],
6
6
  ["Cell 4", "Cell 5", "Cell 6"]
@@ -13,7 +13,7 @@ const n = [
13
13
  options: {
14
14
  table: {
15
15
  title: "Table",
16
- options: { tableData: { label: "Table Data (JSON)", defaultValue: JSON.stringify(n), widget: "rich_text" } }
16
+ options: { tableData: { label: "Table Data (JSON)", defaultValue: JSON.stringify(s), widget: "rich_text" } }
17
17
  },
18
18
  style: {
19
19
  title: "Style",
@@ -31,7 +31,7 @@ const n = [
31
31
  }
32
32
  },
33
33
  defaultValues: {
34
- tableData: JSON.stringify(n),
34
+ tableData: JSON.stringify(s),
35
35
  headerBg: "#f3f4f6",
36
36
  headerColor: "#111827",
37
37
  borderColor: "#e5e7eb",
@@ -41,23 +41,24 @@ const n = [
41
41
  },
42
42
  renderer: {
43
43
  renderEditor(e) {
44
- const b = t(e, "containerPadding", "10px"), s = t(e, "headerBg", "#f3f4f6"), p = t(e, "headerColor", "#111827"), l = t(e, "borderColor", "#e5e7eb"), a = t(e, "cellPadding", "8px 12px"), r = t(e, "fontSize", "14px"), d = f(e.tableData, n);
45
- return i`
44
+ t(e, "containerPadding", "10px");
45
+ const p = t(e, "headerBg", "#f3f4f6"), c = t(e, "headerColor", "#111827"), d = t(e, "borderColor", "#e5e7eb"), l = t(e, "cellPadding", "8px 12px"), r = t(e, "fontSize", "14px"), a = g(e.tableData, s);
46
+ return n`
46
47
  <div style="overflow-x:auto;">
47
48
  <table style="width:100%;border-collapse:collapse;font-size:${r};font-family:arial,sans-serif;">
48
- <thead><tr>${d[0]?.map((o) => i`<th style="padding:${a};background:${s};color:${p};border:1px solid ${l};text-align:left;font-weight:600;">${o}</th>`)}</tr></thead>
49
- <tbody>${d.slice(1).map((o) => i`<tr>${o.map((c) => i`<td style="padding:${a};border:1px solid ${l};">${c}</td>`)}</tr>`)}</tbody>
49
+ <thead><tr>${a[0]?.map((o) => n`<th style="padding:${l};background:${p};color:${c};border:1px solid ${d};text-align:left;font-weight:600;">${o}</th>`)}</tr></thead>
50
+ <tbody>${a.slice(1).map((o) => n`<tr>${o.map((i) => n`<td style="padding:${l};border:1px solid ${d};">${i}</td>`)}</tr>`)}</tbody>
50
51
  </table>
51
52
  </div>
52
53
  `;
53
54
  },
54
55
  renderHtml(e) {
55
- const b = t(e, "containerPadding", "10px"), s = t(e, "headerBg", "#f3f4f6"), p = t(e, "headerColor", "#111827"), l = t(e, "borderColor", "#e5e7eb"), a = t(e, "cellPadding", "8px 12px"), r = t(e, "fontSize", "14px"), d = f(e.tableData, n), o = "font-family:arial,helvetica,sans-serif;", c = (d[0] || []).map((g) => `<th style="padding:${a};background-color:${s};color:${p};border:1px solid ${l};text-align:left;font-weight:600;${o}font-size:${r};">${g}</th>`).join(""), h = d.slice(1).map((g) => `<tr>${g.map(($) => `<td style="padding:${a};border:1px solid ${l};${o}font-size:${r};">${$}</td>`).join("")}</tr>`).join(""), x = `<table cellpadding="0" cellspacing="0" width="100%" border="0" style="border-collapse:collapse;"><thead><tr>${c}</tr></thead><tbody>${h}</tbody></table>`;
56
- return C(x, { padding: b });
56
+ const p = t(e, "containerPadding", "10px"), c = t(e, "headerBg", "#f3f4f6"), d = t(e, "headerColor", "#111827"), l = t(e, "borderColor", "#e5e7eb"), r = t(e, "cellPadding", "8px 12px"), a = t(e, "fontSize", "14px"), o = g(e.tableData, s), i = "font-family:arial,helvetica,sans-serif;", f = (o[0] || []).map((b) => `<th style="padding:${r};background-color:${c};color:${d};border:1px solid ${l};text-align:left;font-weight:600;${i}font-size:${a};">${b}</th>`).join(""), h = o.slice(1).map((b) => `<tr>${b.map(($) => `<td style="padding:${r};border:1px solid ${l};${i}font-size:${a};">${$}</td>`).join("")}</tr>`).join(""), x = `<table cellpadding="0" cellspacing="0" width="100%" border="0" style="border-collapse:collapse;"><thead><tr>${f}</tr></thead><tbody>${h}</tbody></table>`;
57
+ return C(x, { padding: p });
57
58
  }
58
59
  }
59
60
  };
60
61
  export {
61
62
  m as tableTool
62
63
  };
63
- //# sourceMappingURL=table-tool-DeIQci5z.js.map
64
+ //# sourceMappingURL=table-tool-BD72-Fuj.js.map