@parathantl/react-email-editor 0.1.1 → 0.1.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/dist/index.cjs CHANGED
@@ -1457,7 +1457,11 @@ function EditorProvider({
1457
1457
  var import_react13 = require("react");
1458
1458
 
1459
1459
  // src/styles/error-boundary.module.css
1460
- var error_boundary_default = {};
1460
+ var error_boundary_default = {
1461
+ "errorBoundary": "errorBoundary",
1462
+ "errorMessage": "errorMessage",
1463
+ "retryBtn": "retryBtn"
1464
+ };
1461
1465
 
1462
1466
  // src/components/ErrorBoundary.tsx
1463
1467
  var import_jsx_runtime2 = require("react/jsx-runtime");
@@ -1508,7 +1512,15 @@ var import_react14 = require("react");
1508
1512
  var import_react_dom = require("react-dom");
1509
1513
 
1510
1514
  // src/styles/confirm-dialog.module.css
1511
- var confirm_dialog_default = {};
1515
+ var confirm_dialog_default = {
1516
+ "overlay": "overlay",
1517
+ "dialog": "dialog",
1518
+ "title": "title",
1519
+ "message": "message",
1520
+ "actions": "actions",
1521
+ "btnCancel": "btnCancel",
1522
+ "btnConfirm": "btnConfirm"
1523
+ };
1512
1524
 
1513
1525
  // src/components/ConfirmDialog.tsx
1514
1526
  var import_jsx_runtime3 = require("react/jsx-runtime");
@@ -2830,10 +2842,64 @@ function parseMenuBlock(el) {
2830
2842
  }
2831
2843
 
2832
2844
  // src/styles/toolbar.module.css
2833
- var toolbar_default = {};
2845
+ var toolbar_default = {
2846
+ "toolbar": "toolbar",
2847
+ "toolbarGroup": "toolbarGroup",
2848
+ "toolbarSeparator": "toolbarSeparator",
2849
+ "toolbarSpacer": "toolbarSpacer",
2850
+ "toolbarBtn": "toolbarBtn",
2851
+ "toolbarBtnActive": "toolbarBtnActive",
2852
+ "toolbarBtnPrimary": "toolbarBtnPrimary",
2853
+ "tabBar": "tabBar",
2854
+ "tabBtn": "tabBtn",
2855
+ "tabBtnActive": "tabBtnActive",
2856
+ "panelToggleBtn": "panelToggleBtn toolbarBtn",
2857
+ "panelToggleBtnActive": "panelToggleBtnActive",
2858
+ "exportWrapper": "exportWrapper",
2859
+ "exportDropdown": "exportDropdown",
2860
+ "exportDropdownItem": "exportDropdownItem",
2861
+ "richTextToolbar": "richTextToolbar",
2862
+ "richTextBtn": "richTextBtn",
2863
+ "richTextBtnActive": "richTextBtnActive",
2864
+ "richTextSeparator": "richTextSeparator",
2865
+ "richTextSelect": "richTextSelect",
2866
+ "richTextSelectSmall": "richTextSelectSmall richTextSelect",
2867
+ "richTextColorWrapper": "richTextColorWrapper",
2868
+ "richTextColorLabel": "richTextColorLabel",
2869
+ "richTextColorIndicator": "richTextColorIndicator",
2870
+ "richTextColorDropdown": "richTextColorDropdown",
2871
+ "richTextColorGrid": "richTextColorGrid",
2872
+ "richTextColorSwatch": "richTextColorSwatch",
2873
+ "richTextColorActions": "richTextColorActions",
2874
+ "richTextColorInput": "richTextColorInput",
2875
+ "richTextColorClearBtn": "richTextColorClearBtn",
2876
+ "richTextLinkDropdown": "richTextLinkDropdown",
2877
+ "richTextLinkLabel": "richTextLinkLabel",
2878
+ "richTextLinkInput": "richTextLinkInput",
2879
+ "richTextLinkError": "richTextLinkError",
2880
+ "richTextLinkActions": "richTextLinkActions",
2881
+ "richTextLinkApply": "richTextLinkApply",
2882
+ "richTextLinkRemove": "richTextLinkRemove"
2883
+ };
2834
2884
 
2835
2885
  // src/styles/editor.module.css
2836
- var editor_default = {};
2886
+ var editor_default = {
2887
+ "editorWrapper": "editorWrapper",
2888
+ "editorContainer": "editorContainer",
2889
+ "editorBody": "editorBody",
2890
+ "editorPanel": "editorPanel",
2891
+ "sidebarPanel": "sidebarPanel",
2892
+ "canvasPanel": "canvasPanel",
2893
+ "propertiesPanel": "propertiesPanel",
2894
+ "sourceLayout": "sourceLayout",
2895
+ "sourcePane": "sourcePane",
2896
+ "sourcePaneDivider": "sourcePaneDivider",
2897
+ "panelToggle": "panelToggle",
2898
+ "panelOverlay": "panelOverlay",
2899
+ "sidebarOpen": "sidebarOpen",
2900
+ "propertiesOpen": "propertiesOpen",
2901
+ "panelOverlayVisible": "panelOverlayVisible"
2902
+ };
2837
2903
 
2838
2904
  // src/components/Toolbar/Toolbar.tsx
2839
2905
  var import_jsx_runtime4 = require("react/jsx-runtime");
@@ -3087,7 +3153,39 @@ function isDropAllowed(e) {
3087
3153
  }
3088
3154
 
3089
3155
  // src/styles/sidebar.module.css
3090
- var sidebar_default = {};
3156
+ var sidebar_default = {
3157
+ "sidebar": "sidebar",
3158
+ "sectionTitle": "sectionTitle",
3159
+ "blockPalette": "blockPalette",
3160
+ "blockCard": "blockCard",
3161
+ "blockCardIcon": "blockCardIcon",
3162
+ "blockCardLabel": "blockCardLabel",
3163
+ "variableList": "variableList",
3164
+ "variableHint": "variableHint",
3165
+ "variableGroup": "variableGroup",
3166
+ "variableGroupTitle": "variableGroupTitle",
3167
+ "variableChips": "variableChips",
3168
+ "variableChip": "variableChip",
3169
+ "variableChipInserted": "variableChipInserted",
3170
+ "variableChipCustom": "variableChipCustom",
3171
+ "variableChipDelete": "variableChipDelete",
3172
+ "variableChipIcon": "variableChipIcon",
3173
+ "addVariableSection": "addVariableSection",
3174
+ "addVariableBtn": "addVariableBtn",
3175
+ "addVariableForm": "addVariableForm",
3176
+ "addVariableField": "addVariableField",
3177
+ "addVariableLabel": "addVariableLabel",
3178
+ "addVariableInput": "addVariableInput",
3179
+ "addVariableError": "addVariableError",
3180
+ "addVariableActions": "addVariableActions",
3181
+ "addVariableCancelBtn": "addVariableCancelBtn",
3182
+ "addVariableSubmitBtn": "addVariableSubmitBtn",
3183
+ "layoutSection": "layoutSection",
3184
+ "layoutOption": "layoutOption",
3185
+ "layoutPreview": "layoutPreview",
3186
+ "layoutColumn": "layoutColumn",
3187
+ "layoutLabel": "layoutLabel"
3188
+ };
3091
3189
 
3092
3190
  // src/components/Sidebar/BlockPalette.tsx
3093
3191
  var import_jsx_runtime5 = require("react/jsx-runtime");
@@ -4178,10 +4276,65 @@ function InlineColorPicker({ editor, type, title, label }) {
4178
4276
  }
4179
4277
 
4180
4278
  // src/styles/blocks.module.css
4181
- var blocks_default = {};
4279
+ var blocks_default = {
4280
+ "textBlock": "textBlock",
4281
+ "textBlockToolbar": "textBlockToolbar",
4282
+ "buttonBlock": "buttonBlock",
4283
+ "buttonBlockLeft": "buttonBlockLeft",
4284
+ "buttonBlockCenter": "buttonBlockCenter",
4285
+ "buttonBlockRight": "buttonBlockRight",
4286
+ "buttonPreview": "buttonPreview",
4287
+ "imageBlock": "imageBlock",
4288
+ "imageBlockLeft": "imageBlockLeft",
4289
+ "imageBlockCenter": "imageBlockCenter",
4290
+ "imageBlockRight": "imageBlockRight",
4291
+ "imagePreview": "imagePreview",
4292
+ "imagePlaceholder": "imagePlaceholder",
4293
+ "imagePlaceholderIcon": "imagePlaceholderIcon",
4294
+ "imageUploading": "imageUploading",
4295
+ "imageProgress": "imageProgress",
4296
+ "imageError": "imageError",
4297
+ "dividerBlock": "dividerBlock",
4298
+ "dividerLine": "dividerLine",
4299
+ "spacerBlock": "spacerBlock",
4300
+ "spacerLabel": "spacerLabel",
4301
+ "socialBlock": "socialBlock",
4302
+ "socialElement": "socialElement",
4303
+ "socialIcon": "socialIcon",
4304
+ "socialLabel": "socialLabel",
4305
+ "socialElementsContainer": "socialElementsContainer",
4306
+ "socialElementItem": "socialElementItem",
4307
+ "htmlBlock": "htmlBlock",
4308
+ "htmlPlaceholder": "htmlPlaceholder",
4309
+ "videoBlock": "videoBlock",
4310
+ "videoBlockLeft": "videoBlockLeft",
4311
+ "videoBlockCenter": "videoBlockCenter",
4312
+ "videoBlockRight": "videoBlockRight",
4313
+ "videoPreview": "videoPreview",
4314
+ "playOverlay": "playOverlay",
4315
+ "videoPlaceholder": "videoPlaceholder",
4316
+ "headingBlock": "headingBlock",
4317
+ "countdownBlock": "countdownBlock",
4318
+ "countdownLabel": "countdownLabel",
4319
+ "countdownDigits": "countdownDigits",
4320
+ "countdownUnit": "countdownUnit",
4321
+ "countdownDigitBox": "countdownDigitBox",
4322
+ "countdownUnitLabel": "countdownUnitLabel",
4323
+ "menuBlock": "menuBlock",
4324
+ "menuItems": "menuItems",
4325
+ "menuItem": "menuItem",
4326
+ "menuItemsContainer": "menuItemsContainer",
4327
+ "menuItemEntry": "menuItemEntry",
4328
+ "heroBlock": "heroBlock",
4329
+ "heroHeading": "heroHeading",
4330
+ "heroSubtext": "heroSubtext",
4331
+ "heroButton": "heroButton"
4332
+ };
4182
4333
 
4183
4334
  // src/styles/tiptap.module.css
4184
- var tiptap_default = {};
4335
+ var tiptap_default = {
4336
+ "tiptapWrapper": "tiptapWrapper"
4337
+ };
4185
4338
 
4186
4339
  // src/components/Canvas/blocks/TextBlock.tsx
4187
4340
  var import_jsx_runtime11 = require("react/jsx-runtime");
@@ -4878,7 +5031,36 @@ var BlockRenderer = import_react36.default.memo(function BlockRenderer2({ block
4878
5031
  var import_react37 = __toESM(require("react"));
4879
5032
 
4880
5033
  // src/styles/canvas.module.css
4881
- var canvas_default = {};
5034
+ var canvas_default = {
5035
+ "canvasWrapper": "canvasWrapper",
5036
+ "canvasBody": "canvasBody",
5037
+ "canvasBodyDragOver": "canvasBodyDragOver",
5038
+ "section": "section",
5039
+ "sectionSelected": "sectionSelected",
5040
+ "sectionFullWidth": "sectionFullWidth",
5041
+ "sectionOverlay": "sectionOverlay",
5042
+ "sectionBtn": "sectionBtn",
5043
+ "sectionBtnDuplicate": "sectionBtnDuplicate",
5044
+ "sectionDragHandle": "sectionDragHandle",
5045
+ "sectionContent": "sectionContent",
5046
+ "column": "column",
5047
+ "blockWrapper": "blockWrapper",
5048
+ "blockSelected": "blockSelected",
5049
+ "blockOverlay": "blockOverlay",
5050
+ "blockBtn": "blockBtn",
5051
+ "blockBtnDuplicate": "blockBtnDuplicate",
5052
+ "blockDropBefore": "blockDropBefore",
5053
+ "blockDropAfter": "blockDropAfter",
5054
+ "dropZone": "dropZone",
5055
+ "dropZoneActive": "dropZoneActive",
5056
+ "dropZoneLabel": "dropZoneLabel",
5057
+ "emptyColumn": "emptyColumn",
5058
+ "emptyColumnActive": "emptyColumnActive",
5059
+ "sectionDropZone": "sectionDropZone",
5060
+ "sectionDropZoneActive": "sectionDropZoneActive",
5061
+ "sectionDropZoneLabel": "sectionDropZoneLabel",
5062
+ "addSectionBtn": "addSectionBtn"
5063
+ };
4882
5064
 
4883
5065
  // src/components/Canvas/DropZone.tsx
4884
5066
  var import_jsx_runtime24 = require("react/jsx-runtime");
@@ -5468,7 +5650,54 @@ var import_react46 = __toESM(require("react"));
5468
5650
  var import_react42 = require("react");
5469
5651
 
5470
5652
  // src/styles/properties.module.css
5471
- var properties_default = {};
5653
+ var properties_default = {
5654
+ "propertiesPanel": "propertiesPanel",
5655
+ "propertiesHeader": "propertiesHeader",
5656
+ "propertiesBody": "propertiesBody",
5657
+ "emptyProperties": "emptyProperties",
5658
+ "fieldHint": "fieldHint",
5659
+ "fieldGroup": "fieldGroup",
5660
+ "fieldLabel": "fieldLabel",
5661
+ "fieldInput": "fieldInput",
5662
+ "fieldTextarea": "fieldTextarea fieldInput",
5663
+ "fieldSelect": "fieldSelect fieldInput",
5664
+ "fieldRow": "fieldRow",
5665
+ "fieldHalf": "fieldHalf",
5666
+ "colorPickerWrapper": "colorPickerWrapper",
5667
+ "colorPickerTrigger": "colorPickerTrigger",
5668
+ "colorSwatch": "colorSwatch",
5669
+ "colorValue": "colorValue",
5670
+ "colorPresets": "colorPresets",
5671
+ "colorPresetBtn": "colorPresetBtn",
5672
+ "colorPresetBtnActive": "colorPresetBtnActive",
5673
+ "colorPresetBtnTransparent": "colorPresetBtnTransparent",
5674
+ "colorSwatchTransparent": "colorSwatchTransparent",
5675
+ "paddingGrid": "paddingGrid",
5676
+ "paddingField": "paddingField",
5677
+ "paddingLabel": "paddingLabel",
5678
+ "paddingInput": "paddingInput fieldInput",
5679
+ "alignmentPicker": "alignmentPicker",
5680
+ "alignmentBtn": "alignmentBtn",
5681
+ "alignmentBtnActive": "alignmentBtnActive",
5682
+ "sliderWrapper": "sliderWrapper",
5683
+ "sliderInput": "sliderInput",
5684
+ "sliderValue": "sliderValue",
5685
+ "itemActionBtn": "itemActionBtn",
5686
+ "itemActionBtnDanger": "itemActionBtnDanger itemActionBtn",
5687
+ "addItemBtn": "addItemBtn",
5688
+ "fieldInputFlex": "fieldInputFlex fieldInput",
5689
+ "fieldRowCompact": "fieldRowCompact",
5690
+ "fieldSelectNarrow": "fieldSelectNarrow fieldSelect",
5691
+ "fieldTextareaCode": "fieldTextareaCode fieldInput",
5692
+ "fieldBtnUpload": "fieldBtnUpload fieldInput",
5693
+ "fieldBtnUploadDisabled": "fieldBtnUploadDisabled fieldBtnUpload",
5694
+ "validationError": "validationError",
5695
+ "fieldInputStacked": "fieldInputStacked fieldInput",
5696
+ "checkboxLabel": "checkboxLabel fieldLabel",
5697
+ "colorPresetBtnFull": "colorPresetBtnFull",
5698
+ "colorNativeInput": "colorNativeInput",
5699
+ "separator": "separator"
5700
+ };
5472
5701
 
5473
5702
  // src/components/Properties/controls/ColorPicker.tsx
5474
5703
  var import_jsx_runtime29 = require("react/jsx-runtime");
@@ -6138,7 +6367,7 @@ function SocialProperties({ block }) {
6138
6367
  [block.properties.elements, update]
6139
6368
  );
6140
6369
  const addElement = (0, import_react51.useCallback)(() => {
6141
- const elements = [...block.properties.elements, { name: "web", href: "#" }];
6370
+ const elements = [...block.properties.elements, { id: generateId("se"), name: "web", href: "#" }];
6142
6371
  update({ elements });
6143
6372
  }, [block.properties.elements, update]);
6144
6373
  const removeElement = (0, import_react51.useCallback)(
@@ -6216,7 +6445,7 @@ function SocialProperties({ block }) {
6216
6445
  placeholder: "Label (optional)"
6217
6446
  }
6218
6447
  )
6219
- ] }, index)) }),
6448
+ ] }, element.id ?? `se-${index}`)) }),
6220
6449
  /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("button", { className: `ee-add-item ${properties_default.addItemBtn}`, onClick: addElement, children: "+ Add Element" })
6221
6450
  ] })
6222
6451
  ] });
@@ -6406,7 +6635,7 @@ function MenuProperties({ block }) {
6406
6635
  [block.properties.items, update]
6407
6636
  );
6408
6637
  const addItem = (0, import_react54.useCallback)(() => {
6409
- const items = [...block.properties.items, { text: "Link", href: "#" }];
6638
+ const items = [...block.properties.items, { id: generateId("mi"), text: "Link", href: "#" }];
6410
6639
  update({ items });
6411
6640
  }, [block.properties.items, update]);
6412
6641
  const removeItem = (0, import_react54.useCallback)(
@@ -6463,7 +6692,7 @@ function MenuProperties({ block }) {
6463
6692
  placeholder: "URL"
6464
6693
  }
6465
6694
  )
6466
- ] }, index)) }),
6695
+ ] }, item.id ?? `mi-${index}`)) }),
6467
6696
  /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("button", { className: `ee-add-item ${properties_default.addItemBtn}`, onClick: addItem, children: "+ Add Item" })
6468
6697
  ] })
6469
6698
  ] });
@@ -6616,7 +6845,16 @@ function PropertiesPanel() {
6616
6845
  var import_react56 = require("react");
6617
6846
 
6618
6847
  // src/styles/preview.module.css
6619
- var preview_default = {};
6848
+ var preview_default = {
6849
+ "preview": "preview",
6850
+ "previewToggles": "previewToggles",
6851
+ "previewToggle": "previewToggle",
6852
+ "previewToggleActive": "previewToggleActive",
6853
+ "previewToggleDesktop": "previewToggleDesktop",
6854
+ "previewToggleMobile": "previewToggleMobile",
6855
+ "previewContainer": "previewContainer",
6856
+ "previewIframe": "previewIframe"
6857
+ };
6620
6858
 
6621
6859
  // src/components/Preview/PreviewPanel.tsx
6622
6860
  var import_jsx_runtime52 = require("react/jsx-runtime");
@@ -6696,7 +6934,14 @@ function PreviewPanel() {
6696
6934
  var import_react57 = require("react");
6697
6935
 
6698
6936
  // src/styles/source-editor.module.css
6699
- var source_editor_default = {};
6937
+ var source_editor_default = {
6938
+ "sourceEditor": "sourceEditor",
6939
+ "sourceHeader": "sourceHeader",
6940
+ "sourceLabel": "sourceLabel",
6941
+ "sourceApply": "sourceApply",
6942
+ "sourceError": "sourceError",
6943
+ "sourceTextarea": "sourceTextarea"
6944
+ };
6700
6945
 
6701
6946
  // src/components/SourceEditor/SourceEditor.tsx
6702
6947
  var import_jsx_runtime53 = require("react/jsx-runtime");