@mjml-agent-editor/editor 0.1.17 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,9 +38,204 @@ var DEFAULT_LABELS = {
38
38
  exportHtml: "Export HTML",
39
39
  exportMjml: "Export MJML",
40
40
  copied: (kind) => `${kind} copied.`,
41
+ tabBlocks: "Blocks",
42
+ tabSettings: "Settings",
43
+ tabLayers: "Layers",
41
44
  searchBlocks: "Search blocks\u2026",
45
+ noBlocksMatch: "No blocks match.",
46
+ blockAdded: (block) => `Added: ${block}`,
47
+ blockCategoryLayout: "Layout",
48
+ blockCategoryContent: "Content",
49
+ blockCategorySections: "Sections",
50
+ blockLabels: {
51
+ "mj-1-column": "1 column",
52
+ "mj-2-columns": "2 columns",
53
+ "mj-3-columns": "3 columns",
54
+ "mj-text": "Text",
55
+ "mj-image": "Image",
56
+ "mj-button": "Button",
57
+ "mj-divider": "Divider",
58
+ "mj-spacer": "Spacer",
59
+ "mj-social-group": "Social links",
60
+ "mj-navbar": "Navigation"
61
+ },
62
+ elementNames: {
63
+ "mj-wrapper": "Section group",
64
+ "mj-section": "Section",
65
+ "mj-column": "Column",
66
+ "mj-group": "Column group",
67
+ "mj-text": "Text",
68
+ "mj-button": "Button",
69
+ "mj-image": "Image",
70
+ "mj-divider": "Divider",
71
+ "mj-spacer": "Spacer",
72
+ "mj-hero": "Hero",
73
+ "mj-navbar": "Navigation",
74
+ "mj-navbar-link": "Navigation link",
75
+ "mj-social": "Social links",
76
+ "mj-social-element": "Social link",
77
+ "mj-raw": "Raw HTML",
78
+ "mj-table": "Table"
79
+ },
42
80
  expandAll: "Expand all",
43
81
  selectAnElement: "Select an element\u2026",
82
+ settingsEmpty: "Select something in the email to edit it.",
83
+ emailSettings: "Email settings",
84
+ loadingEditor: "Loading editor\u2026",
85
+ commentOnElement: "Comment on element / section",
86
+ groupContent: "Content",
87
+ groupLayout: "Layout",
88
+ groupSpacing: "Spacing",
89
+ groupStyle: "Style",
90
+ groupAdvanced: "Advanced",
91
+ otherAttributes: "Other attributes",
92
+ removeAttribute: "Remove",
93
+ resetToDefault: "Reset to default",
94
+ selectParent: "Select parent",
95
+ duplicate: "Duplicate",
96
+ deleteElement: "Delete",
97
+ multipleSelected: (count) => `${count} elements selected \u2014 select one to edit its settings.`,
98
+ editEachSide: "Edit each side",
99
+ increase: "Increase",
100
+ decrease: "Decrease",
101
+ changeUnit: (unit) => `Unit: ${unit}. Click to change`,
102
+ noUnit: "\xD7",
103
+ sidesVertical: "Top and bottom",
104
+ sidesHorizontal: "Left and right",
105
+ sideTop: "Top",
106
+ sideRight: "Right",
107
+ sideBottom: "Bottom",
108
+ sideLeft: "Left",
109
+ linkTypeProfile: "Your profile",
110
+ linkTypeShare: "Share this page",
111
+ allScreenSizes: "Changes apply to every screen size.",
112
+ columnWidths: "Column widths",
113
+ columnRatio: (ratio) => `Columns ${ratio}`,
114
+ socialNetworks: "Networks",
115
+ addNetwork: "Add network",
116
+ navbarLinks: "Links",
117
+ addLink: "Add link",
118
+ newLinkText: "Link",
119
+ inspectorLabels: {
120
+ // Fields
121
+ contentWidth: "Width",
122
+ pageBackground: "Page background",
123
+ "pageBackground.help": "Fills the area around and behind the email.",
124
+ fullWidth: "Full-width background",
125
+ "fullWidth.help": "The background reaches the window edges; the content keeps the email width.",
126
+ padding: "Padding",
127
+ backgroundColor: "Background",
128
+ backgroundImage: "Background image",
129
+ backgroundSize: "Image size",
130
+ backgroundRepeat: "Repeat image",
131
+ backgroundPosition: "Position",
132
+ cornerRadius: "Corners",
133
+ gap: "Space between sections",
134
+ border: "Border",
135
+ alignColumns: "Align columns",
136
+ "alignColumns.help": "Where the columns sit when they don't fill the row.",
137
+ reverseColumns: "Reverse column order",
138
+ "reverseColumns.help": "Swaps the columns on desktop; on phones they still stack in their original order.",
139
+ verticalAlign: "Vertical",
140
+ width: "Width",
141
+ innerBackground: "Inner background",
142
+ "innerBackground.help": "Fills only the area inside the padding, so it needs padding to show.",
143
+ innerCornerRadius: "Inner corners",
144
+ innerBorder: "Inner border",
145
+ align: "Alignment",
146
+ font: "Font",
147
+ fontSize: "Text size",
148
+ fontWeight: "Weight",
149
+ textColor: "Text color",
150
+ lineHeight: "Line height",
151
+ letterSpacing: "Letter spacing",
152
+ textTransform: "Capitalization",
153
+ blockBackground: "Block background",
154
+ "blockBackground.help": "Fills the whole block, including its padding.",
155
+ link: "Link",
156
+ buttonColor: "Button color",
157
+ buttonPadding: "Button padding",
158
+ "buttonPadding.help": "Space between the text and the button's edge; this sets the button's size.",
159
+ spaceAround: "Space around",
160
+ "spaceAround.help": "Empty space outside the button, between it and what is next to it.",
161
+ opensIn: "Opens in",
162
+ tooltip: "Tooltip",
163
+ rel: "Link relationship",
164
+ image: "Image",
165
+ altText: "Alt text",
166
+ "altText.help": "Read by screen readers and shown when images are blocked.",
167
+ fluidOnMobile: "Full width on mobile",
168
+ "fluidOnMobile.help": "On phones the image stretches across the screen, whatever its width here.",
169
+ lineColor: "Line color",
170
+ thickness: "Thickness",
171
+ lineStyle: "Line style",
172
+ height: "Height",
173
+ socialMode: "Direction",
174
+ iconSize: "Icon size",
175
+ iconSpacing: "Space around each icon",
176
+ network: "Network",
177
+ // Brand names are the same in every language and are not keys; these two are words.
178
+ networkWebsite: "Website",
179
+ networkCustom: "Custom",
180
+ customIcon: "Custom icon",
181
+ iconColor: "Icon color",
182
+ iconPosition: "Icon side",
183
+ heroMode: "Sizing",
184
+ "heroMode.help": "Fixed keeps the height you set; Fit image follows the background image's proportions.",
185
+ backgroundWidth: "Image width",
186
+ "backgroundWidth.help": "The background image's real size in pixels, so the hero keeps its proportions.",
187
+ backgroundHeight: "Image height",
188
+ fallbackColor: "Fallback color",
189
+ "fallbackColor.help": "Shown while the image loads, or when images are blocked.",
190
+ contentPadding: "Content padding",
191
+ contentBackground: "Content background",
192
+ hamburger: "Collapse into a menu on mobile",
193
+ "hamburger.help": "On phones the links fold into a menu button.",
194
+ menuIconColor: "Menu icon color",
195
+ menuIconSize: "Menu icon size",
196
+ menuIconAlign: "Menu icon align",
197
+ baseUrl: "Link prefix",
198
+ "baseUrl.help": "Added in front of every link in the bar, full addresses included, so links then give only the path.",
199
+ // Options
200
+ alignLeft: "Left",
201
+ alignCenter: "Center",
202
+ alignRight: "Right",
203
+ alignJustify: "Justify",
204
+ alignTop: "Top",
205
+ alignMiddle: "Middle",
206
+ alignBottom: "Bottom",
207
+ weightRegular: "Regular",
208
+ weightMedium: "Medium",
209
+ weightSemibold: "Semibold",
210
+ weightBold: "Bold",
211
+ caseNone: "As typed",
212
+ caseUpper: "UPPERCASE",
213
+ caseLower: "lowercase",
214
+ caseCapitalize: "Capitalize Each Word",
215
+ targetNewTab: "New tab",
216
+ targetSameTab: "Same tab",
217
+ sizeCover: "Fill",
218
+ sizeContain: "Fit",
219
+ sizeAuto: "Original",
220
+ repeatTile: "Tile",
221
+ repeatOnce: "Once",
222
+ positionTopLeft: "Top left",
223
+ positionTopCenter: "Top",
224
+ positionTopRight: "Top right",
225
+ positionCenterLeft: "Left",
226
+ positionCenter: "Center",
227
+ positionCenterRight: "Right",
228
+ positionBottomLeft: "Bottom left",
229
+ positionBottomCenter: "Bottom",
230
+ positionBottomRight: "Bottom right",
231
+ lineSolid: "Solid",
232
+ lineDashed: "Dashed",
233
+ lineDotted: "Dotted",
234
+ modeHorizontal: "In a row",
235
+ modeVertical: "Stacked",
236
+ heroFixed: "Fixed",
237
+ heroFluid: "Fit image"
238
+ },
44
239
  attributes: "Attributes",
45
240
  style: "Style",
46
241
  rteFont: "Font",
@@ -107,7 +302,10 @@ function mergeLabels(overrides) {
107
302
  return {
108
303
  ...DEFAULT_LABELS,
109
304
  ...overrides,
110
- toolLabels: { ...DEFAULT_LABELS.toolLabels, ...overrides.toolLabels }
305
+ toolLabels: { ...DEFAULT_LABELS.toolLabels, ...overrides.toolLabels },
306
+ blockLabels: { ...DEFAULT_LABELS.blockLabels, ...overrides.blockLabels },
307
+ elementNames: { ...DEFAULT_LABELS.elementNames, ...overrides.elementNames },
308
+ inspectorLabels: { ...DEFAULT_LABELS.inspectorLabels, ...overrides.inspectorLabels }
111
309
  };
112
310
  }
113
311
 
@@ -742,6 +940,7 @@ function EditorHeader({
742
940
  {
743
941
  title: labels.previewFrameTitle,
744
942
  srcDoc: preview,
943
+ sandbox: "allow-popups allow-popups-to-escape-sandbox",
745
944
  className: cn(
746
945
  "mx-auto block h-full min-h-[80vh] rounded-md border bg-white shadow-sm",
747
946
  state.device === "Mobile" ? "w-[375px]" : "w-full max-w-[720px]"
@@ -1928,4 +2127,4 @@ export {
1928
2127
  CanvasComments,
1929
2128
  STARTER_MJML
1930
2129
  };
1931
- //# sourceMappingURL=chunk-VJRKDFM4.js.map
2130
+ //# sourceMappingURL=chunk-K7KQC7LX.js.map