@capillarytech/creatives-library 8.0.235 → 8.0.236-alpha.1

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 (86) hide show
  1. package/assets/Android.png +0 -0
  2. package/assets/iOS.png +0 -0
  3. package/config/app.js +0 -1
  4. package/constants/unified.js +1 -1
  5. package/initialReducer.js +2 -0
  6. package/package.json +1 -1
  7. package/services/api.js +5 -2
  8. package/services/tests/api.test.js +18 -0
  9. package/utils/common.js +1 -2
  10. package/utils/commonUtils.js +14 -1
  11. package/utils/transformTemplateConfig.js +0 -10
  12. package/v2Components/CapDeviceContent/index.js +61 -56
  13. package/v2Components/CapTagList/index.js +4 -0
  14. package/v2Components/CapWhatsappCTA/tests/index.test.js +5 -0
  15. package/v2Components/HtmlEditor/HTMLEditor.js +165 -80
  16. package/v2Components/HtmlEditor/__tests__/HTMLEditor.test.js +532 -0
  17. package/v2Components/HtmlEditor/__tests__/index.lazy.test.js +17 -12
  18. package/v2Components/HtmlEditor/_htmlEditor.scss +0 -4
  19. package/v2Components/HtmlEditor/_index.lazy.scss +0 -1
  20. package/v2Components/HtmlEditor/components/CodeEditorPane/_codeEditorPane.scss +0 -98
  21. package/v2Components/HtmlEditor/components/CodeEditorPane/index.js +125 -148
  22. package/v2Components/HtmlEditor/components/DeviceToggle/_deviceToggle.scss +1 -0
  23. package/v2Components/HtmlEditor/components/DeviceToggle/index.js +3 -3
  24. package/v2Components/HtmlEditor/components/InAppPreviewPane/DeviceFrame.js +4 -7
  25. package/v2Components/HtmlEditor/components/InAppPreviewPane/__tests__/DeviceFrame.test.js +35 -45
  26. package/v2Components/HtmlEditor/components/InAppPreviewPane/_inAppPreviewPane.scss +1 -3
  27. package/v2Components/HtmlEditor/components/InAppPreviewPane/constants.js +33 -33
  28. package/v2Components/HtmlEditor/components/InAppPreviewPane/index.js +7 -6
  29. package/v2Components/HtmlEditor/constants.js +29 -20
  30. package/v2Components/HtmlEditor/hooks/__tests__/useInAppContent.test.js +158 -17
  31. package/v2Components/HtmlEditor/hooks/useInAppContent.js +53 -143
  32. package/v2Components/HtmlEditor/index.js +1 -1
  33. package/v2Components/HtmlEditor/messages.js +85 -85
  34. package/v2Components/MobilePushPreviewV2/index.js +32 -7
  35. package/v2Components/TemplatePreview/_templatePreview.scss +31 -21
  36. package/v2Components/TemplatePreview/index.js +47 -32
  37. package/v2Components/TemplatePreview/messages.js +4 -0
  38. package/v2Containers/BeeEditor/index.js +82 -80
  39. package/v2Containers/BeePopupEditor/constants.js +10 -0
  40. package/v2Containers/BeePopupEditor/index.js +180 -0
  41. package/v2Containers/BeePopupEditor/tests/index.test.js +627 -0
  42. package/v2Containers/CreativesContainer/SlideBoxContent.js +69 -34
  43. package/v2Containers/CreativesContainer/SlideBoxHeader.js +2 -1
  44. package/v2Containers/CreativesContainer/constants.js +1 -0
  45. package/v2Containers/CreativesContainer/index.js +65 -13
  46. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +4 -12
  47. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +15 -0
  48. package/v2Containers/InApp/__tests__/InAppHTMLEditor.test.js +376 -0
  49. package/v2Containers/InApp/__tests__/sagas.test.js +363 -0
  50. package/v2Containers/InApp/actions.js +7 -0
  51. package/v2Containers/InApp/constants.js +18 -4
  52. package/v2Containers/InApp/index.js +642 -355
  53. package/v2Containers/InApp/index.scss +4 -3
  54. package/v2Containers/InApp/messages.js +7 -3
  55. package/v2Containers/InApp/reducer.js +21 -3
  56. package/v2Containers/InApp/sagas.js +29 -9
  57. package/v2Containers/InApp/selectors.js +25 -5
  58. package/v2Containers/InApp/tests/index.test.js +154 -50
  59. package/v2Containers/InApp/tests/reducer.test.js +34 -0
  60. package/v2Containers/InApp/tests/sagas.test.js +61 -9
  61. package/v2Containers/InApp/tests/selectors.test.js +612 -0
  62. package/v2Containers/InAppWrapper/components/InAppWrapperView.js +162 -0
  63. package/v2Containers/InAppWrapper/components/__tests__/InAppWrapperView.test.js +267 -0
  64. package/v2Containers/InAppWrapper/components/inAppWrapperView.scss +9 -0
  65. package/v2Containers/InAppWrapper/constants.js +16 -0
  66. package/v2Containers/InAppWrapper/hooks/__tests__/useInAppWrapper.test.js +473 -0
  67. package/v2Containers/InAppWrapper/hooks/useInAppWrapper.js +198 -0
  68. package/v2Containers/InAppWrapper/index.js +148 -0
  69. package/v2Containers/InAppWrapper/messages.js +49 -0
  70. package/v2Containers/InappAdvance/index.js +1006 -0
  71. package/v2Containers/InappAdvance/index.scss +10 -0
  72. package/v2Containers/InappAdvance/tests/index.test.js +448 -0
  73. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +3 -0
  74. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +2 -0
  75. package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +2 -0
  76. package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +9 -0
  77. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +12 -0
  78. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +4 -0
  79. package/v2Containers/TagList/index.js +65 -1
  80. package/v2Containers/Templates/_templates.scss +49 -1
  81. package/v2Containers/Templates/index.js +93 -5
  82. package/v2Containers/Templates/messages.js +4 -0
  83. package/v2Containers/Templates/reducer.js +20 -7
  84. package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +8 -88
  85. package/v2Containers/Templates/tests/reducer.test.js +125 -0
  86. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +35 -0
@@ -31,79 +31,6 @@
31
31
  display: flex;
32
32
  align-items: center;
33
33
  gap: 0.5rem;
34
-
35
- .cap-button,
36
- .ant-btn,
37
- button {
38
- color: map-get($CAP_PRIMARY, base);
39
- border: none;
40
- background: $CAP_WHITE;
41
- border-radius: 0.25rem;
42
- padding: 0.375rem 0.5rem;
43
- font-size: 0.875rem;
44
- font-family: $FONT_FAMILY;
45
- font-weight: 500;
46
- height: auto;
47
- min-width: 5.9375rem;
48
- display: flex;
49
- align-items: center;
50
- gap: 0.25rem;
51
- box-shadow: 0 0 0.0625rem 0 rgba(9, 30, 66, 0.31), 0 0.25rem 0.5rem -0.125rem rgba(9, 30, 66, 0.25);
52
- line-height: 1.25rem;
53
- text-align: left;
54
-
55
- &:hover {
56
- background: $CAP_G09;
57
- box-shadow: 0 0 0.0625rem 0 rgba(9, 30, 66, 0.31), 0 0.375rem 0.75rem -0.125rem rgba(9, 30, 66, 0.25);
58
- color: map-get($CAP_PRIMARY, base);
59
- border: none;
60
- }
61
-
62
- &:active,
63
- &:focus {
64
- background: $CAP_G08;
65
- box-shadow: 0 0 0.0625rem 0 rgba(9, 30, 66, 0.31), 0 0.125rem 0.25rem -0.125rem rgba(9, 30, 66, 0.25);
66
- color: map-get($CAP_PRIMARY, base);
67
- border: none;
68
- }
69
-
70
- .anticon,
71
- .cap-icon {
72
- font-size: 1rem;
73
- color: map-get($CAP_PRIMARY, base);
74
- }
75
-
76
- span {
77
- font-size: 0.875rem;
78
- font-weight: 500;
79
- line-height: 1.25rem;
80
- color: map-get($CAP_PRIMARY, base);
81
- white-space: nowrap;
82
- }
83
-
84
- &:before,
85
- &:after {
86
- display: none;
87
- }
88
- }
89
-
90
- .tooltip-add-label-container {
91
-
92
- .cap-button,
93
- .ant-btn {
94
- color: map-get($CAP_PRIMARY, base);
95
- background: $CAP_WHITE;
96
- border: none;
97
- box-shadow: 0 0 0.0625rem 0 rgba(9, 30, 66, 0.31), 0 0.25rem 0.5rem -0.125rem rgba(9, 30, 66, 0.25);
98
- }
99
- }
100
-
101
- .cap-button-flat,
102
- .cap-button-add {
103
- background: $CAP_WHITE;
104
- color: map-get($CAP_PRIMARY, base);
105
- border: none;
106
- }
107
34
  }
108
35
 
109
36
  &__content {
@@ -234,31 +161,6 @@
234
161
  top: 0.5rem;
235
162
  right: 0.5rem;
236
163
  z-index: 20;
237
-
238
- .cap-button,
239
- .ant-btn,
240
- button {
241
- background: $CAP_WHITE;
242
- color: map-get($CAP_PRIMARY, base);
243
- border: none;
244
- border-radius: 0.25rem;
245
- padding: 0.375rem 0.5rem;
246
- font-size: 0.875rem;
247
- font-family: $FONT_FAMILY;
248
- font-weight: 500;
249
- min-width: 5.9375rem;
250
- box-shadow: 0 0 0.0625rem 0 rgba(9, 30, 66, 0.31), 0 0.25rem 0.5rem -0.125rem rgba(9, 30, 66, 0.25);
251
-
252
- &:hover {
253
- background: $CAP_G09;
254
- color: map-get($CAP_PRIMARY, base);
255
- }
256
-
257
- &:active {
258
- background: $CAP_G08;
259
- color: map-get($CAP_PRIMARY, base);
260
- }
261
- }
262
164
  }
263
165
 
264
166
  .codemirror-editor {
@@ -8,7 +8,9 @@
8
8
  * - Theme support with proper styling
9
9
  */
10
10
 
11
- import React, { forwardRef, useImperativeHandle, useRef, useEffect, useState } from 'react';
11
+ import React, {
12
+ forwardRef, useImperativeHandle, useRef, useEffect,
13
+ } from 'react';
12
14
  import PropTypes from 'prop-types';
13
15
 
14
16
  // CodeMirror 6 imports
@@ -16,16 +18,15 @@ import { EditorState } from '@codemirror/state';
16
18
  import { EditorView, lineNumbers, highlightActiveLine } from '@codemirror/view';
17
19
 
18
20
  // Import our comprehensive syntax highlighting solution
21
+ import { injectIntl, intlShape } from 'react-intl';
22
+ import CapRow from '@capillarytech/cap-ui-library/CapRow';
19
23
  import { createRobustExtensions } from '../../utils/properSyntaxHighlighting';
20
24
 
21
25
 
22
- import { injectIntl, intlShape } from 'react-intl';
23
-
24
26
  // Messages
25
27
  import messages from '../../messages';
26
28
 
27
29
  // Cap UI Components
28
- import CapRow from '@capillarytech/cap-ui-library/CapRow';
29
30
 
30
31
  // Components
31
32
  import TagList from '../../../../v2Containers/TagList';
@@ -44,7 +45,14 @@ const CodeEditorPaneComponent = ({
44
45
  className = '',
45
46
  isFullscreenMode = false,
46
47
  onLabelInsert,
47
- forwardedRef
48
+ forwardedRef,
49
+ // Tags-related props
50
+ tags = [],
51
+ injectedTags = {},
52
+ location = {},
53
+ selectedOfferDetails = null,
54
+ onTagSelect = null,
55
+ onContextChange = null,
48
56
  }) => {
49
57
  const { content, validation } = useEditorContext();
50
58
  const { content: contentValue, updateContent } = content;
@@ -61,7 +69,7 @@ const CodeEditorPaneComponent = ({
61
69
  get view() {
62
70
  return viewRef.current;
63
71
  },
64
- viewRef: viewRef, // For compatibility with existing code
72
+ viewRef, // For compatibility with existing code
65
73
 
66
74
  focus: () => {
67
75
  if (viewRef.current) {
@@ -75,7 +83,7 @@ const CodeEditorPaneComponent = ({
75
83
  const pos = position !== undefined ? position : head;
76
84
  view.dispatch({
77
85
  changes: { from: pos, insert: text },
78
- selection: { anchor: pos + text.length }
86
+ selection: { anchor: pos + text.length },
79
87
  });
80
88
  } else {
81
89
  throw new Error('CodeMirror view not initialized');
@@ -88,9 +96,7 @@ const CodeEditorPaneComponent = ({
88
96
  }
89
97
  return 0;
90
98
  },
91
- getValue: () => {
92
- return contentValue || '';
93
- },
99
+ getValue: () => contentValue || '',
94
100
  setValue: (value) => {
95
101
  updateContent(value);
96
102
  },
@@ -107,7 +113,7 @@ const CodeEditorPaneComponent = ({
107
113
 
108
114
  view.dispatch({
109
115
  selection: { anchor: pos },
110
- effects: EditorView.scrollIntoView(pos, { y: 'center' })
116
+ effects: EditorView.scrollIntoView(pos, { y: 'center' }),
111
117
  });
112
118
  view.focus();
113
119
  } catch (error) {
@@ -117,79 +123,99 @@ const CodeEditorPaneComponent = ({
117
123
  }
118
124
  }
119
125
  }
120
- }
126
+ },
121
127
  }), [contentValue]);
122
128
 
123
129
  // Note: handleContentChange removed - using updateContentRef directly in CodeMirror
124
130
 
125
131
  const handleTagSelect = (tagData) => {
126
132
  // Get the unified editor
127
- if (viewRef.current) {
128
- const view = viewRef.current;
129
- const { state: { selection: { main: { head: pos } } } } = view;
130
-
131
- // Extract tag text from the tagData object using destructuring
132
- let tagText = '';
133
- if (typeof tagData === 'string') {
134
- tagText = tagData;
135
- } else if (tagData) {
136
- const { text, name, label, value } = tagData;
137
- tagText = text || name || label || value;
138
- if (!tagText) {
139
- console.warn('Invalid tag data:', tagData);
140
- return;
133
+ if (!viewRef.current) {
134
+ console.warn('CodeEditorPane: Editor view not initialized. Cannot insert tag.');
135
+ // Try to notify parent if onLabelInsert is available
136
+ if (onLabelInsert) {
137
+ // Extract tag text for notification purposes
138
+ let tagText = '';
139
+ if (typeof tagData === 'string') {
140
+ tagText = tagData;
141
+ } else if (tagData) {
142
+ const { text, name, label, value } = tagData;
143
+ tagText = text || name || label || value || '';
141
144
  }
142
- } else {
145
+ const formattedTag = tagText ? `{{${tagText}}}` : '';
146
+ // Call onLabelInsert with null position to indicate editor not ready
147
+ onLabelInsert(formattedTag, null);
148
+ }
149
+ return;
150
+ }
151
+
152
+ const view = viewRef.current;
153
+ const { state: { selection: { main: { head: pos } } } } = view;
154
+
155
+ // Extract tag text from the tagData object using destructuring
156
+ let tagText = '';
157
+ if (typeof tagData === 'string') {
158
+ tagText = tagData;
159
+ } else if (tagData) {
160
+ const {
161
+ text, name, label, value,
162
+ } = tagData;
163
+ tagText = text || name || label || value;
164
+ if (!tagText) {
143
165
  console.warn('Invalid tag data:', tagData);
144
166
  return;
145
167
  }
168
+ } else {
169
+ console.warn('Invalid tag data:', tagData);
170
+ return;
171
+ }
146
172
 
147
- // For unified HTML editor, insert as template variable
148
- const formattedTag = `{{${tagText}}}`;
173
+ // For unified HTML editor, insert as template variable
174
+ const formattedTag = `{{${tagText}}}`;
149
175
 
150
- // Insert the tag at cursor position
151
- view.dispatch({
152
- changes: { from: pos, insert: formattedTag },
153
- selection: { anchor: pos + formattedTag.length }
154
- });
176
+ // Insert the tag at cursor position
177
+ view.dispatch({
178
+ changes: { from: pos, insert: formattedTag },
179
+ selection: { anchor: pos + formattedTag.length },
180
+ });
155
181
 
156
- // Focus back to editor
157
- view.focus();
182
+ // Focus back to editor
183
+ view.focus();
158
184
 
159
- // Call the parent's handleLabelInsert if available
160
- if (onLabelInsert) {
161
- onLabelInsert(formattedTag, pos);
162
- }
185
+ // Call the parent's handleLabelInsert for notification purposes only
186
+ // The tag has already been inserted above, so this is just for parent component awareness
187
+ if (onLabelInsert) {
188
+ onLabelInsert(formattedTag, pos);
163
189
  }
164
190
  };
165
191
 
166
192
  // Initialize CodeMirror effect
167
193
  useEffect(() => {
168
194
  if (editorRef.current && !viewRef.current) {
169
- // Use the comprehensive extensions from properSyntaxHighlighting.js
170
- // This includes: html(), syntaxHighlighting(comprehensiveVSCodeTheme), cleanEditorTheme
171
- const robustExtensions = createRobustExtensions();
172
-
173
- // Add additional extensions for line numbers, active line, and update listener
174
- const extensions = [
175
- lineNumbers(),
176
- highlightActiveLine(),
177
- ...robustExtensions, // Spread the robust extensions (html, syntax highlighting, theme)
178
- EditorView.updateListener.of((update) => {
179
- if (update.docChanged) {
180
- updateContentRef.current(update.state.doc.toString());
181
- }
182
- })
183
- ];
195
+ // Use the comprehensive extensions from properSyntaxHighlighting.js
196
+ // This includes: html(), syntaxHighlighting(comprehensiveVSCodeTheme), cleanEditorTheme
197
+ const robustExtensions = createRobustExtensions();
198
+
199
+ // Add additional extensions for line numbers, active line, and update listener
200
+ const extensions = [
201
+ lineNumbers(),
202
+ highlightActiveLine(),
203
+ ...robustExtensions, // Spread the robust extensions (html, syntax highlighting, theme)
204
+ EditorView.updateListener.of((update) => {
205
+ if (update.docChanged) {
206
+ updateContentRef.current(update.state.doc.toString());
207
+ }
208
+ }),
209
+ ];
184
210
 
185
211
  const state = EditorState.create({
186
212
  doc: contentValue || '',
187
- extensions
213
+ extensions,
188
214
  });
189
215
 
190
216
  viewRef.current = new EditorView({
191
217
  state,
192
- parent: editorRef.current
218
+ parent: editorRef.current,
193
219
  });
194
220
  }
195
221
 
@@ -215,100 +241,52 @@ const CodeEditorPaneComponent = ({
215
241
  changes: {
216
242
  from: 0,
217
243
  to: length,
218
- insert: contentValue || ''
219
- }
244
+ insert: contentValue || '',
245
+ },
220
246
  });
221
247
  }
222
248
  }, [contentValue]);
223
249
 
224
- return (
225
- <CapRow className={`code-editor-pane ${className}`}>
226
- {/* Unified Code Editor with Floating Add Label Button */}
227
- <CapRow className="code-editor-pane__content">
228
- <div className="codemirror-wrapper">
229
- <div ref={editorRef} className="codemirror-editor" />
230
- {/* Floating Add Label Button */}
231
- <CapRow className="code-editor-pane__actions">
232
- <TagList
233
- key="html-editor-taglist"
234
- label={intl.formatMessage(messages.addLabel)}
235
- onTagSelect={handleTagSelect}
236
- onContextChange={(context) => {
237
- }}
238
- className="tag-list-trigger"
239
- tags={[]} // Empty initially - TagList will fetch from API
240
- injectedTags={{
241
- // Add common HTML/Email specific tags as fallback
242
- 'Customer Info': {
243
- name: 'Customer Info',
244
- desc: 'Customer information tags',
245
- resolved: true,
246
- 'tag-header': true,
247
- subtags: {
248
- 'customer.firstName': {
249
- name: 'First Name',
250
- desc: 'Customer first name',
251
- resolved: true
252
- },
253
- 'customer.lastName': {
254
- name: 'Last Name',
255
- desc: 'Customer last name',
256
- resolved: true
257
- },
258
- 'customer.email': {
259
- name: 'Email',
260
- desc: 'Customer email address',
261
- resolved: true
262
- },
263
- 'customer.phone': {
264
- name: 'Phone',
265
- desc: 'Customer phone number',
266
- resolved: true
267
- }
268
- }
269
- },
270
- 'Common Tags': {
271
- name: 'Common Tags',
272
- desc: 'Commonly used template tags',
273
- resolved: true,
274
- 'tag-header': true,
275
- subtags: {
276
- 'organization.name': {
277
- name: 'Organization Name',
278
- desc: 'Organization name',
279
- resolved: true
280
- },
281
- 'currentDate': {
282
- name: 'Current Date',
283
- desc: 'Current date',
284
- resolved: true
285
- },
286
- 'unsubscribeLink': {
287
- name: 'Unsubscribe Link',
288
- desc: 'Unsubscribe link',
289
- resolved: true
290
- }
291
- }
292
- }
293
- }}
294
- moduleFilterEnabled={true}
295
- userLocale="en"
296
- channel="email"
297
- disabled={readOnly}
298
- location={{
299
- query: {
300
- type: 'html-editor' // Identify the context
301
- }
302
- }}
303
- selectedOfferDetails={[]}
304
- eventContextTags={[]}
305
- />
306
- </CapRow>
307
- </div>
308
- </CapRow>
309
-
250
+ return (
251
+ <CapRow className={`code-editor-pane ${className}`}>
252
+ {/* Unified Code Editor with Floating Add Label Button */}
253
+ <CapRow className="code-editor-pane__content">
254
+ <div className="codemirror-wrapper">
255
+ <div ref={editorRef} className="codemirror-editor" />
256
+ {/* Floating Add Label Button */}
257
+ <CapRow className="code-editor-pane__actions">
258
+ <TagList
259
+ key="html-editor-taglist"
260
+ label={intl.formatMessage(messages.addLabel)}
261
+ onTagSelect={(tag) => {
262
+ // Always use handleTagSelect to insert tag at cursor position
263
+ handleTagSelect(tag);
264
+ // Also call parent's onTagSelect callback if provided
265
+ if (onTagSelect) {
266
+ onTagSelect(tag);
267
+ }
268
+ }}
269
+ onContextChange={(context) => {
270
+ if (onContextChange) {
271
+ onContextChange(context);
272
+ }
273
+ }}
274
+ className="tag-list-trigger"
275
+ tags={tags} // Use passed tags from parent component
276
+ injectedTags={injectedTags} // Use passed injectedTags from parent component
277
+ location={location} // Use passed location for context
278
+ selectedOfferDetails={selectedOfferDetails} // Use passed selectedOfferDetails
279
+ moduleFilterEnabled={
280
+ location && location?.query && location?.query?.type !== "embedded"
281
+ }
282
+ disabled={readOnly}
283
+ />
284
+ </CapRow>
285
+ </div>
310
286
  </CapRow>
311
- );
287
+
288
+ </CapRow>
289
+ );
312
290
  };
313
291
 
314
292
  // Create the forwardRef wrapper
@@ -323,9 +301,8 @@ CodeEditorPane.propTypes = {
323
301
  readOnly: PropTypes.bool,
324
302
  className: PropTypes.string,
325
303
  isFullscreenMode: PropTypes.bool,
326
- onLabelInsert: PropTypes.func
304
+ onLabelInsert: PropTypes.func,
327
305
  };
328
306
 
329
307
  // Export with injectIntl - ref forwarding is handled by forwardRef wrapper
330
308
  export default injectIntl(CodeEditorPane);
331
-
@@ -220,6 +220,7 @@
220
220
 
221
221
  // Integration with editor toolbar
222
222
  .html-editor.html-editor--inapp {
223
+ margin-top: 4%;
223
224
  .editor-toolbar {
224
225
  padding: 0 1rem 0 0; // Remove left padding to align with device toggle
225
226
  background-color: $CAP_G10;
@@ -32,7 +32,7 @@ const DeviceToggle = ({
32
32
  onDeviceChange,
33
33
  keepContentSame = false,
34
34
  onKeepContentSameChange,
35
- className = ''
35
+ className = '',
36
36
  }) => {
37
37
  const handleDeviceClick = (device) => {
38
38
  if (onDeviceChange && device !== activeDevice) {
@@ -97,7 +97,7 @@ DeviceToggle.propTypes = {
97
97
  onDeviceChange: PropTypes.func,
98
98
  keepContentSame: PropTypes.bool,
99
99
  onKeepContentSameChange: PropTypes.func,
100
- className: PropTypes.string
100
+ className: PropTypes.string,
101
101
  };
102
102
 
103
103
  DeviceToggle.defaultProps = {
@@ -105,7 +105,7 @@ DeviceToggle.defaultProps = {
105
105
  onDeviceChange: null,
106
106
  keepContentSame: false,
107
107
  onKeepContentSameChange: null,
108
- className: ''
108
+ className: '',
109
109
  };
110
110
 
111
111
  export default injectIntl(DeviceToggle);
@@ -14,9 +14,7 @@ const DeviceFrame = ({
14
14
  className = '',
15
15
  ...props
16
16
  }) => {
17
- const getFrameAsset = () => {
18
- return device === DEVICE_TYPES.IOS ? iosFrame : androidFrame;
19
- };
17
+ const getFrameAsset = () => device === DEVICE_TYPES.IOS ? iosFrame : androidFrame;
20
18
 
21
19
  const getFrameStyles = () => {
22
20
  const baseStyles = {
@@ -26,14 +24,13 @@ const DeviceFrame = ({
26
24
  backgroundRepeat: 'no-repeat',
27
25
  backgroundPosition: 'center',
28
26
  backgroundSize: 'contain',
29
- filter: 'drop-shadow(0 12px 48px rgba(0, 0, 0, 0.25)) brightness(1.05) contrast(1.1)'
30
27
  };
31
28
 
32
29
  // Unified dimensions - both devices use the same size since assets are identical
33
30
  return {
34
31
  ...baseStyles,
35
32
  width: '450px',
36
- height: '920px'
33
+ height: '920px',
37
34
  };
38
35
  };
39
36
 
@@ -45,7 +42,7 @@ const DeviceFrame = ({
45
42
  {...props}
46
43
  >
47
44
 
48
- {children}
45
+ {children}
49
46
 
50
47
  </div>
51
48
  );
@@ -54,7 +51,7 @@ const DeviceFrame = ({
54
51
  DeviceFrame.propTypes = {
55
52
  device: PropTypes.oneOf(Object.values(DEVICE_TYPES)),
56
53
  children: PropTypes.node,
57
- className: PropTypes.string
54
+ className: PropTypes.string,
58
55
  };
59
56
 
60
57
  export default DeviceFrame;