hivewrite-sdk 1.1.63 → 1.1.65

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/README.md CHANGED
@@ -15,8 +15,9 @@ A powerful, flexible, and easy-to-integrate drag-and-drop email builder for Reac
15
15
  - 🎯 **Merge Tags** - Dynamic content placeholders for personalization
16
16
  - 🖼️ **Stock Images** - Built-in Unsplash integration for stock photos
17
17
  - 🏗️ **Pre-built Templates** - E-commerce, marketing, and transactional email templates
18
- - � **Saved Sections** - Save and reuse custom block groups across templates
19
- - �🔧 **Fully Customizable** - White-labeling, permissions, and branding options
18
+ - 💾 **Saved Sections** - Save and reuse custom block groups across templates
19
+ - 📐 **Adaptive Container Sizing** - Seamlessly adapts to any container width/height without overflowing
20
+ - 🔧 **Fully Customizable** - White-labeling, permissions, and branding options
20
21
 
21
22
  ---
22
23
 
@@ -118,6 +119,7 @@ Initializes and mounts the editor.
118
119
  | `mode` | `string` | Yes | `'FULL_EDITOR'`, `'DESIGN_ONLY'`, `'READ_ONLY'` |
119
120
  | `theme` | `string` | No | `'light'` (default) or `'dark'` |
120
121
  | `locale` | `string` | No | `'en'` (default), `'es'`, or `'fr'` |
122
+ | `height` | `string` | No | Height of the editor (e.g. `'100%'` (default), `'100dvh'`, `'650px'`, `'80vh'`). Adapts the editor to any container size without overflowing. |
121
123
  | `branding` | `object` | No | Custom white-labeling options (`primaryColor`, `secondaryColor`, `accentColor`, `logoUrl`, `customCSS`) |
122
124
  | `mergeTags` | `array` | No | Array of `{ label, value }` for dynamic content |
123
125
  | `portalTarget` | `string` | No | `'window'` (default) or `'container'`. Controls where dialogs render. |
@@ -424,6 +426,33 @@ Toggle between desktop and mobile using the view mode controls in the toolbar.
424
426
 
425
427
  ---
426
428
 
429
+ ## 📐 Container Sizing & Responsiveness
430
+
431
+ HiveWrite is built to adapt to **any parent container size** instead of assuming full-screen viewport usage.
432
+
433
+ ### 1. Flexible Height (`height` option)
434
+
435
+ By default, the editor takes `100%` of its parent container:
436
+
437
+ ```javascript
438
+ hivewrite.init({
439
+ container: "#editor-container",
440
+ height: "100%", // Optional: defaults to "100%". Supports "650px", "100dvh", "80vh", etc.
441
+ // ...
442
+ });
443
+ ```
444
+
445
+ - **Contained Layouts**: If embedded in a card, modal, or custom div (e.g. `height: 600px`), the editor fits the container and the email canvas scrolls internally without overflowing the host page.
446
+ - **Full Viewport**: Pass `height: "100dvh"` or `height: "100vh"` if you want the editor to lock to the full browser window.
447
+
448
+ ### 2. Container-Aware Breakpoints
449
+
450
+ HiveWrite monitors the container's rendered dimensions:
451
+ - **Container Width < 1024px**: The sidebar automatically collapses into an overlay drawer accessible via a floating settings button.
452
+ - **Container Width < 768px**: Top-bar action buttons collapse text labels into compact icon buttons to prevent overflowing.
453
+
454
+ ---
455
+
427
456
  ## 📧 Email Client Compatibility
428
457
 
429
458
  Exported HTML is fully compatible with: