@capillarytech/creatives-library 8.0.242-alpha.1 → 8.0.242-alpha.3

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.1",
4
+ "version": "8.0.242-alpha.3",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -77,6 +77,7 @@ const HTMLEditor = ({
77
77
  onContextChange = null,
78
78
  globalActions = null,
79
79
  isLiquidEnabled = false, // Controls Liquid tab visibility in ValidationTabs
80
+ isFullMode = true, // Full mode vs library mode - controls layout and visibility
80
81
  ...props
81
82
  }) => {
82
83
  // Separate refs for main and modal editors to avoid conflicts
@@ -434,9 +435,12 @@ const HTMLEditor = ({
434
435
  );
435
436
  }
436
437
 
438
+ // Add library-mode class when not in full mode
439
+ const editorClassName = `html-editor html-editor--${variant} ${!isFullMode ? 'html-editor--library-mode' : ''} ${className}`;
440
+
437
441
  return (
438
442
  <EditorProvider value={contextValue}>
439
- <div className={`html-editor html-editor--${variant} ${className}`} {...props}>
443
+ <div className={editorClassName} {...props}>
440
444
  {/* Editor Toolbar - Conditional based on variant */}
441
445
  {variant === HTML_EDITOR_VARIANTS.EMAIL ? (
442
446
  <EditorToolbar
@@ -596,6 +600,7 @@ HTMLEditor.propTypes = {
596
600
  onContextChange: PropTypes.func, // Deprecated: use globalActions instead
597
601
  globalActions: PropTypes.object,
598
602
  isLiquidEnabled: PropTypes.bool, // Controls Liquid tab visibility in validation
603
+ isFullMode: PropTypes.bool, // Full mode vs library mode
599
604
  };
600
605
 
601
606
  HTMLEditor.defaultProps = {
@@ -623,6 +628,7 @@ HTMLEditor.defaultProps = {
623
628
  onContextChange: null,
624
629
  globalActions: null, // Redux actions for API calls
625
630
  isLiquidEnabled: false,
631
+ isFullMode: true, // Default to full mode
626
632
  };
627
633
 
628
634
  // Export with forwardRef to allow direct access to CodeEditorPane via ref
@@ -49,6 +49,18 @@
49
49
  border-radius: 0.25rem;
50
50
  overflow: hidden;
51
51
 
52
+ // Library mode: Apply specific styles when isFullMode is false
53
+ &--library-mode {
54
+ .preview-pane {
55
+ max-height: calc(107vh);
56
+
57
+ iframe {
58
+ height: calc(95vh - 5%); // Same as editor pane - maximize to full available height
59
+ max-height: calc(95vh - 50%);
60
+ }
61
+ }
62
+ }
63
+
52
64
  &.fullscreen {
53
65
  position: fixed;
54
66
  top: 0;
@@ -15,6 +15,7 @@
15
15
  border-radius: 0.25rem 0.25rem 0 0;
16
16
  box-sizing: border-box;
17
17
  flex-shrink: 0;
18
+ position: relative;
18
19
 
19
20
  &__left {
20
21
  display: flex;
@@ -961,6 +961,7 @@ const EmailHTMLEditor = (props) => {
961
961
  moduleFilterEnabled={location?.query?.type !== EMBEDDED}
962
962
  onTagContextChange={handleOnTagsContextChange}
963
963
  isLiquidEnabled={isLiquidEnabled}
964
+ isFullMode={isFullMode}
964
965
  />
965
966
  </CapColumn>
966
967
  </CapRow>