@capillarytech/creatives-library 8.0.242-alpha.5 → 8.0.242-alpha.7

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.242-alpha.5",
4
+ "version": "8.0.242-alpha.7",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -436,7 +436,9 @@ const HTMLEditor = ({
436
436
  }
437
437
 
438
438
  // Add library-mode class when not in full mode
439
- const editorClassName = `html-editor html-editor--${variant} ${!isFullMode ? 'html-editor--library-mode' : ''} ${className}`;
439
+ // Note: isFullMode defaults to true, so library mode is when isFullMode === false
440
+ const isLibraryMode = isFullMode === false;
441
+ const editorClassName = `html-editor html-editor--${variant} ${isLibraryMode ? 'html-editor--library-mode' : ''} ${className}`.trim();
440
442
 
441
443
  return (
442
444
  <EditorProvider value={contextValue}>
@@ -508,7 +510,7 @@ const HTMLEditor = ({
508
510
  width="90vw"
509
511
  className="html-editor-fullscreen-modal"
510
512
  >
511
- <CapRow className="html-editor-fullscreen">
513
+ <CapRow className={`html-editor-fullscreen ${isLibraryMode ? 'html-editor-fullscreen--library-mode' : ''}`}>
512
514
  {/* Editor Toolbar - Conditional based on variant */}
513
515
  {variant === HTML_EDITOR_VARIANTS.EMAIL ? (
514
516
  <EditorToolbar
@@ -37,24 +37,25 @@
37
37
  }
38
38
  }
39
39
 
40
- // Library mode: Apply specific styles when isFullMode is false
41
- &--library-mode {
42
- .preview-pane {
43
- max-height: calc(107vh);
44
-
45
- &__content {
46
- height: calc(95vh - 5%); // Same as editor pane - maximize to full available height
47
- max-height: calc(95vh - 50%);
48
- }
40
+ // Fullscreen modal library mode styles (outside .html-editor block since fullscreen is a separate element)
41
+ .html-editor-fullscreen--library-mode {
42
+ .preview-pane {
43
+ max-height: calc(95vh - 5%);
44
+
45
+ &__content {
46
+ height: calc(95vh - 5%); // Same as editor pane - maximize to full available height
47
+ max-height: calc(95vh - 50%);
48
+ }
49
49
 
50
- iframe {
51
- height: calc(95vh - 5%); // Same as editor pane - maximize to full available height
52
- max-height: calc(95vh - 50%);
53
- }
50
+ iframe {
51
+ height: calc(95vh - 5%); // Same as editor pane - maximize to full available height
52
+ max-height: calc(95vh - 50%);
54
53
  }
55
54
  }
56
55
  }
57
56
 
57
+ }
58
+
58
59
  .html-editor {
59
60
  height: 37.5rem; // Fixed height instead of 100vh (600px = 37.5rem)
60
61
  max-height: 80vh; // Responsive maximum height
@@ -67,9 +68,9 @@
67
68
  overflow: hidden;
68
69
 
69
70
  // Library mode: Apply specific styles when isFullMode is false
70
- &--library-mode {
71
+ &.html-editor--library-mode {
71
72
  .preview-pane {
72
- max-height: calc(107vh);
73
+ max-height: calc(95vh - 5%);
73
74
 
74
75
  &__content {
75
76
  height: calc(95vh - 5%); // Same as editor pane - maximize to full available height