@pubwave/editor 0.2.5 → 0.2.6
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 +31 -0
- package/dist/index.cjs +19 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.js +19 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -98,6 +98,8 @@ The main React component for rendering the editor.
|
|
|
98
98
|
| `autofocus` | `boolean \| 'start' \| 'end'` | `false` | Enable autofocus on mount. `true` or `'end'` focuses at the end, `'start'` focuses at the beginning |
|
|
99
99
|
| `imageUpload` | `ImageUploadConfig` | `undefined` | Image upload configuration (see [Image Upload](#-image-upload)) |
|
|
100
100
|
| `width` | `string` | `'100%'` | Editor container width. Can be a CSS value like `'100%'`, `'1200px'`, `'90vw'`, etc. Defaults to `'100%'` (full width of parent container) |
|
|
101
|
+
| `height` | `string` | `undefined` | Editor container height. Can be a CSS value like `'500px'`, `'80vh'`, `'auto'`, etc. When set, the editor becomes a fixed-height scrollable container |
|
|
102
|
+
| `minHeight` | `string` | `undefined` | Editor container minimum height. Can be a CSS value like `'200px'`, `'50vh'`, etc. The editor will expand with content but maintain at least this height |
|
|
101
103
|
| `onChange` | `(content: JSONContent) => void` | `undefined` | Callback fired when the editor content changes |
|
|
102
104
|
| `onSelectionChange` | `() => void` | `undefined` | Callback fired when the selection changes |
|
|
103
105
|
| `onFocus` | `() => void` | `undefined` | Callback fired when the editor gains focus |
|
|
@@ -498,6 +500,35 @@ By default, the editor takes 100% of the parent container width. You can customi
|
|
|
498
500
|
|
|
499
501
|
The `width` prop accepts any valid CSS width value. When set, it will override the default `max-width` constraint.
|
|
500
502
|
|
|
503
|
+
### Setting Editor Height
|
|
504
|
+
|
|
505
|
+
You can control the editor's height using the `height` and `minHeight` props:
|
|
506
|
+
|
|
507
|
+
```tsx
|
|
508
|
+
// Fixed height with scrollable content
|
|
509
|
+
<PubwaveEditor height="500px" />
|
|
510
|
+
|
|
511
|
+
// Minimum height (expands with content)
|
|
512
|
+
<PubwaveEditor minHeight="300px" />
|
|
513
|
+
|
|
514
|
+
// Combined: fixed height with minimum fallback
|
|
515
|
+
<PubwaveEditor
|
|
516
|
+
height="600px"
|
|
517
|
+
minHeight="400px"
|
|
518
|
+
/>
|
|
519
|
+
|
|
520
|
+
// Using viewport units
|
|
521
|
+
<PubwaveEditor height="80vh" />
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
**Important Notes:**
|
|
525
|
+
- The editor has default padding of **96px top and bottom** (192px total). Your `height` value should account for this padding to ensure content is visible.
|
|
526
|
+
- For example, `height="100px"` would leave no space for content (100px - 192px padding = negative space).
|
|
527
|
+
- **Recommended minimum height:** At least `300px` for desktop to accommodate padding and content.
|
|
528
|
+
- When `height` is set, the editor becomes a scrollable container - content will scroll vertically when it exceeds the height.
|
|
529
|
+
- When only `minHeight` is set, the editor will grow automatically with content but maintain at least the minimum height.
|
|
530
|
+
- Both props accept any valid CSS height value (`px`, `vh`, `rem`, `%`, etc.).
|
|
531
|
+
|
|
501
532
|
### Programmatic Content Manipulation
|
|
502
533
|
|
|
503
534
|
```tsx
|
package/dist/index.cjs
CHANGED
|
@@ -6942,6 +6942,8 @@ const PubwaveEditor = React.forwardRef(
|
|
|
6942
6942
|
onReady,
|
|
6943
6943
|
className,
|
|
6944
6944
|
width,
|
|
6945
|
+
height,
|
|
6946
|
+
minHeight,
|
|
6945
6947
|
"data-testid": testId = "pubwave-editor"
|
|
6946
6948
|
} = props;
|
|
6947
6949
|
const locale = getLocale(theme == null ? void 0 : theme.locale);
|
|
@@ -7058,11 +7060,19 @@ const PubwaveEditor = React.forwardRef(
|
|
|
7058
7060
|
(theme == null ? void 0 : theme.classNamePrefix) ?? "",
|
|
7059
7061
|
(theme == null ? void 0 : theme.containerClassName) ?? "",
|
|
7060
7062
|
editor ? getReadOnlyClassName(editor) : "",
|
|
7063
|
+
// Add class when height is constrained
|
|
7064
|
+
height || minHeight ? "pubwave-editor--fixed-height" : "",
|
|
7061
7065
|
className
|
|
7062
7066
|
].filter(Boolean).join(" ");
|
|
7063
7067
|
const themeStyles = {
|
|
7064
7068
|
position: "relative",
|
|
7065
|
-
overflow
|
|
7069
|
+
// When height or minHeight is set, we need overflow handling for scrolling
|
|
7070
|
+
// Otherwise, use visible overflow for normal flow
|
|
7071
|
+
overflow: height || minHeight ? "hidden" : "visible",
|
|
7072
|
+
...height || minHeight ? {
|
|
7073
|
+
display: "flex",
|
|
7074
|
+
flexDirection: "column"
|
|
7075
|
+
} : {}
|
|
7066
7076
|
};
|
|
7067
7077
|
if (width) {
|
|
7068
7078
|
themeStyles["--pubwave-container-width"] = width;
|
|
@@ -7070,6 +7080,14 @@ const PubwaveEditor = React.forwardRef(
|
|
|
7070
7080
|
themeStyles["--pubwave-container-max-width"] = width;
|
|
7071
7081
|
themeStyles.maxWidth = width;
|
|
7072
7082
|
}
|
|
7083
|
+
if (height) {
|
|
7084
|
+
themeStyles["--pubwave-container-height"] = height;
|
|
7085
|
+
themeStyles.height = height;
|
|
7086
|
+
}
|
|
7087
|
+
if (minHeight) {
|
|
7088
|
+
themeStyles["--pubwave-container-min-height"] = minHeight;
|
|
7089
|
+
themeStyles.minHeight = minHeight;
|
|
7090
|
+
}
|
|
7073
7091
|
if (theme == null ? void 0 : theme.colors) {
|
|
7074
7092
|
const { colors } = theme;
|
|
7075
7093
|
const textColor = colors.text || "#1f2937";
|
package/dist/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */
|
|
2
|
-
@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.isolate{isolation:isolate}.container{width:100%}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.resize{resize:both}.border{border-style:var(--tw-border-style);border-width:1px}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}:root{--pubwave-bg:#fff;--pubwave-surface:#fff;--pubwave-text:#37352f;--pubwave-text-muted:#9b9a97;--pubwave-border:#e3e2e0;--pubwave-border-light:#f3f4f6;--pubwave-hover:#f7f6f3;--pubwave-focus:#0000000d;--pubwave-selection:#3b82f6;--pubwave-selection-bg:#2383e226;--pubwave-primary:#2383e2;--pubwave-primary-hover:#2563eb;--pubwave-handle-color:#9b9a97;--pubwave-primary-faded:#3b82f61a;--pubwave-drop-indicator:#3b82f6;--pubwave-drop-target:#3b82f60d;--pubwave-error:#ef4444;--pubwave-success:#10b981;--pubwave-warning:#f59e0b;--pubwave-text-secondary:#374151;--pubwave-text-tertiary:#4b5563;--pubwave-hover-bg:#f3f4f6;--pubwave-hover-task:#e8f2ff;--pubwave-checked-text:#9ca3af;--pubwave-spacing-xs:.25rem;--pubwave-spacing-sm:.5rem;--pubwave-spacing-md:1rem;--pubwave-spacing-lg:1.5rem;--pubwave-spacing-xl:2rem;--pubwave-spacing-1:4px;--pubwave-spacing-2:8px;--pubwave-spacing-3:12px;--pubwave-spacing-4:16px;--pubwave-spacing-7:28px;--pubwave-font-family:inherit;--pubwave-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--pubwave-font-size-xs:11px;--pubwave-font-size-sm:13px;--pubwave-font-size-base:14px;--pubwave-font-size-md:1rem;--pubwave-font-size-lg:1.125rem;--pubwave-font-size-xl:1.25rem;--pubwave-font-size-2xl:1.5rem;--pubwave-font-size-3xl:2rem;--pubwave-line-height:1.625;--pubwave-line-height-heading:1.25;--pubwave-button-width:28px;--pubwave-button-height:28px;--pubwave-icon-size:20px;--pubwave-checkbox-size:20px;--pubwave-checkbox-input-size:16px;--pubwave-divider-width:1px;--pubwave-divider-height:20px;--pubwave-drop-indicator-width:2px;--pubwave-drop-indicator-height:2px;--pubwave-task-item-height:30px;--pubwave-radius-xs:3px;--pubwave-radius-sm:4px;--pubwave-radius:6px;--pubwave-radius-md:6px;--pubwave-radius-lg:8px;--pubwave-shadow-sm:0 1px 2px 0 #0000000d;--pubwave-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;--pubwave-shadow-lg:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}@media (prefers-color-scheme:dark){:root{--pubwave-bg:#1a1a1a;--pubwave-surface:#262626;--pubwave-text:#e5e7eb;--pubwave-text-muted:#9ca3af;--pubwave-border:#374151;--pubwave-border-light:#4b5563;--pubwave-hover:#ffffff0d;--pubwave-focus:#ffffff14;--pubwave-selection:#60a5fa;--pubwave-selection-bg:#60a5fa26;--pubwave-primary:#60a5fa;--pubwave-primary-hover:#3b82f6;--pubwave-primary-faded:#60a5fa26;--pubwave-drop-indicator:#60a5fa;--pubwave-drop-target:#60a5fa14;--pubwave-error:#f87171;--pubwave-text-secondary:#d1d5db;--pubwave-text-tertiary:#9ca3af;--pubwave-hover-bg:#374151;--pubwave-hover-task:#3b82f626;--pubwave-checked-text:#6b7280}}.pubwave-editor{width:var(--pubwave-container-width,100%);max-width:var(--pubwave-container-max-width,none);font-family:var(--pubwave-font-family);color:var(--pubwave-text);background:var(--pubwave-bg,#fff);border-radius:var(--pubwave-container-border-radius,16px);min-height:var(--pubwave-container-min-height,700px);padding:var(--pubwave-container-padding-y,96px)var(--pubwave-container-padding-x,120px);padding-left:var(--pubwave-container-padding-left,140px);position:relative;box-shadow:0 0 0 1px #0000000a,0 20px 25px -5px #0000000d,0 10px 10px -5px #00000005}@media (max-width:768px){.pubwave-editor{padding:var(--pubwave-container-padding-y-mobile,20px)var(--pubwave-container-padding-x-mobile,16px);padding-left:var(--pubwave-container-padding-left-mobile,16px);border-radius:var(--pubwave-container-border-radius-mobile,12px);min-height:var(--pubwave-container-min-height-mobile,400px)}}.pubwave-editor,.pubwave-editor *,.pubwave-editor :before,.pubwave-editor :after{box-sizing:border-box}.pubwave-editor__content{outline:none;flex-direction:column;min-height:1em;display:flex}.pubwave-editor__content .ProseMirror{min-height:100%;padding-bottom:30vh;padding-top:var(--pubwave-spacing-md,1rem);outline:none;flex-grow:1}.pubwave-editor__content .ProseMirror p.is-editor-empty:first-child:before,.pubwave-editor__content.ProseMirror-focused p.pubwave-editor__node--empty:before,.ProseMirror.ProseMirror-focused p.pubwave-editor__node--empty:before{content:attr(data-placeholder);float:left;color:var(--pubwave-text-muted);pointer-events:none;height:0}.pubwave-editor__content .ProseMirror>*+*{margin-top:.75em}@media (max-width:768px){.pubwave-editor__content .ProseMirror>*+*{margin-top:.35em}.pubwave-editor__content .ProseMirror h1+*,.pubwave-editor__content .ProseMirror h2+*,.pubwave-editor__content .ProseMirror h3+*{margin-top:.4em}.pubwave-editor__content .ProseMirror h1,.pubwave-editor__content .ProseMirror h2,.pubwave-editor__content .ProseMirror h3{margin-top:.6em}.pubwave-editor__content .ProseMirror{font-size:var(--pubwave-font-size-base-mobile,15px)}.pubwave-editor__content .ProseMirror h1{font-size:var(--pubwave-font-size-3xl-mobile,1.75rem)}.pubwave-editor__content .ProseMirror h2{font-size:var(--pubwave-font-size-2xl-mobile,1.375rem)}.pubwave-editor__content .ProseMirror h3{font-size:var(--pubwave-font-size-xl-mobile,1.125rem)}}.pubwave-editor__content .pubwave-editor__bullet-list,.pubwave-editor__content .pubwave-editor__ordered-list{padding-left:1.3em!important}.pubwave-editor__content .ProseMirror p{line-height:var(--pubwave-line-height);margin:0}.pubwave-editor__content .ProseMirror h1,.pubwave-editor__content .ProseMirror h2,.pubwave-editor__content .ProseMirror h3{line-height:var(--pubwave-line-height-heading);margin:0;font-weight:600}.pubwave-editor__content .ProseMirror h1{font-size:var(--pubwave-font-size-3xl)}.pubwave-editor__content .ProseMirror h2{font-size:var(--pubwave-font-size-2xl)}.pubwave-editor__content .ProseMirror h3{font-size:var(--pubwave-font-size-xl)}.pubwave-editor__content .ProseMirror ul:not([data-type=taskList]),.pubwave-editor__content .ProseMirror ol{margin:0;padding-left:1.5em}.pubwave-editor__content .ProseMirror li:not([data-type=taskItem]):not(.pubwave-editor__task-item){margin:.25em 0}.pubwave-editor__content .ProseMirror li>p{margin:0}.pubwave-editor__content ul[data-type=taskList]{padding:var(--pubwave-spacing-4,16px)0;margin:0!important;padding-left:0!important;list-style:none!important}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li,.pubwave-editor__content .ProseMirror ul[data-type=taskList]>li,.pubwave-editor__content .ProseMirror ul[data-type=taskList] li[data-type=taskItem],.pubwave-editor__content .ProseMirror ul[data-type=taskList] li.pubwave-editor__task-item,.pubwave-editor__content .ProseMirror .pubwave-editor__task-item,.pubwave-editor__content.ProseMirror ul[data-type=taskList] li,.ProseMirror.pubwave-editor__content ul[data-type=taskList] li{border-radius:var(--pubwave-radius-sm,4px)!important;-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;flex-direction:row!important;align-items:flex-start!important;gap:.5em!important;margin:0!important;padding:.25em 0!important;list-style:none!important;display:flex!important}.pubwave-editor__task-item{min-height:var(--pubwave-task-item-height,30px);height:auto!important}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li::marker{content:""!important;width:0!important;font-size:0!important;display:none!important}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li[data-type=taskItem]::marker{content:""!important;width:0!important;font-size:0!important;display:none!important}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li.pubwave-editor__task-item::marker{content:""!important;width:0!important;font-size:0!important;display:none!important}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li:before,.pubwave-editor__content .ProseMirror ul[data-type=taskList] li[data-type=taskItem]:before,.pubwave-editor__content .ProseMirror ul[data-type=taskList] li.pubwave-editor__task-item:before{content:""!important;width:0!important;display:none!important}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li:hover,.pubwave-editor__content .ProseMirror ul[data-type=taskList] li.ProseMirror-selectednode{background-color:var(--pubwave-hover-task,#e8f2ff)}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li>label,.pubwave-editor__content .ProseMirror ul[data-type=taskList] li[data-type=taskItem]>label,.pubwave-editor__content .ProseMirror ul[data-type=taskList] li.pubwave-editor__task-item>label{cursor:pointer!important;width:var(--pubwave-checkbox-size,20px)!important;height:var(--pubwave-checkbox-size,20px)!important;min-height:var(--pubwave-checkbox-size,20px)!important;max-height:var(--pubwave-checkbox-size,20px)!important;flex-shrink:0!important;align-self:flex-start!important;margin:.125em 0 0!important;padding:0!important;line-height:1!important;display:block!important;position:relative!important;overflow:hidden!important}li>label input[type=checkbox]{width:var(--pubwave-checkbox-input-size,16px);height:var(--pubwave-checkbox-input-size,16px);cursor:pointer;margin-top:5px}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li>label:before{content:"";width:var(--pubwave-checkbox-size,20px);height:var(--pubwave-checkbox-size,20px);border:1.5px solid var(--pubwave-text,#1a1a1a);border-radius:var(--pubwave-radius-xs,3px);background-color:var(--pubwave-bg,#fff);box-sizing:border-box;transition:all .15s;display:block;position:absolute;top:0;left:0}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li[data-checked=true]>label:before{background-color:var(--pubwave-primary-hover,#2563eb);border-color:var(--pubwave-primary-hover,#2563eb)}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li[data-checked=true]>label:after{content:"";border:solid var(--pubwave-bg,#fff);box-sizing:border-box;z-index:1;border-width:0 2px 2px 0;width:5px;height:10px;position:absolute;top:3px;left:6px;transform:rotate(45deg)}.pubwave-editor__content ul[data-type=taskList] li>div,.pubwave-editor__content ul[data-type=taskList] li[data-type=taskItem]>div,.pubwave-editor__content ul[data-type=taskList] li.pubwave-editor__task-item>div{min-width:0!important;color:var(--pubwave-text,#1a1a1a)!important;flex:1!important;margin:0!important;padding:.1em 0!important;display:block!important}.pubwave-editor__content ul[data-type=taskList] li>div p,.pubwave-editor__content ul[data-type=taskList] li[data-type=taskItem]>div p,.pubwave-editor__content ul[data-type=taskList] li.pubwave-editor__task-item>div p,.pubwave-editor__content ul[data-type=taskList] li>div>p,.pubwave-editor__content ul[data-type=taskList] li>div p.pubwave-editor__paragraph,.pubwave-editor__content ul[data-type=taskList] li[data-type=taskItem]>div p.pubwave-editor__paragraph{width:100%!important;min-height:1.5em!important;margin:0!important;padding:0!important;line-height:1.5!important;display:block!important}.pubwave-editor__content.ProseMirror ul[data-type=taskList] li[data-checked=true]>div p,.pubwave-editor__content ul[data-type=taskList] li[data-checked=true]>div p{color:var(--pubwave-checked-text,#9ca3af)!important;text-decoration:line-through!important}.pubwave-editor__content blockquote,.pubwave-editor__content.ProseMirror blockquote{margin:.5em 0;padding-left:1em;font-style:italic;border-left:3px solid var(--pubwave-text,#1a1a1a)!important}.pubwave-editor__content .ProseMirror pre,.pubwave-editor__content pre{margin:.5em 0;padding:.5em .75em;line-height:1.5;overflow-x:auto;background:var(--pubwave-border-light,#f3f4f6)!important;border-radius:var(--pubwave-radius-md,6px)!important;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace!important;font-size:var(--pubwave-font-size-sm,13px)!important;color:#1a1a1a!important}.pubwave-editor__content .ProseMirror pre code,.pubwave-editor__content pre code{font-size:inherit!important;color:inherit!important;background:0 0!important;border-radius:0!important;padding:0!important;font-family:inherit!important}.pubwave-block{padding-left:2.5em;position:relative}.pubwave-block-menu{z-index:2;align-items:center;gap:.5em;display:flex;position:absolute;top:50%;left:.5em;transform:translateY(-50%)}.pubwave-editor__content .ProseMirror hr,.pubwave-editor__content hr,.pubwave-editor__content .pubwave-editor__divider{border:none;border-top:1px solid var(--pubwave-border,#e5e7eb)!important;background:0 0!important;height:0!important;margin:1em 0!important}.pubwave-editor__content .ProseMirror img,.pubwave-editor__content img,.pubwave-editor__content .pubwave-editor__image{border-radius:var(--pubwave-radius-md,6px);cursor:pointer;max-width:100%;height:auto;margin:1em auto;transition:opacity .2s;display:block;box-shadow:0 1px 3px #0000001a}.pubwave-editor__content .ProseMirror img:hover,.pubwave-editor__content img:hover,.pubwave-editor__content .pubwave-editor__image:hover{opacity:.9}.pubwave-editor__content .ProseMirror img.ProseMirror-selectednode,.pubwave-editor__content img.ProseMirror-selectednode,.pubwave-editor__content .pubwave-editor__image.ProseMirror-selectednode{outline:2px solid var(--pubwave-primary,#2383e2);outline-offset:2px}.pubwave-editor__content .ProseMirror strong{font-weight:600}.pubwave-editor__content .ProseMirror em{font-style:italic}.pubwave-editor__content .ProseMirror u{text-decoration:underline}.pubwave-editor__content .ProseMirror s{text-decoration:line-through}.pubwave-editor__content .ProseMirror code{background:var(--pubwave-hover);border-radius:var(--pubwave-radius-sm);font-family:var(--pubwave-font-mono);padding:.15em .35em;font-size:.9em}.pubwave-editor__content .ProseMirror a,.pubwave-editor .ProseMirror a{cursor:pointer;text-decoration:underline;color:var(--pubwave-link-color,#2383e2)!important}.pubwave-editor__content .ProseMirror a:hover,.pubwave-editor .ProseMirror a:hover{opacity:.8;color:var(--pubwave-link-hover-color,var(--pubwave-link-color,#2383e2))!important}.pubwave-editor__content .ProseMirror ::-moz-selection{background-color:var(--pubwave-selection-bg)}.pubwave-editor__content .ProseMirror ::selection{background-color:var(--pubwave-selection-bg)}.pubwave-editor--readonly,.pubwave-editor--readonly .pubwave-editor__content{cursor:default}.pubwave-block--dragging{opacity:.4}.pubwave-block--drag-preview{color:var(--pubwave-text-muted,#9b9a97)!important;opacity:.6!important}.pubwave-block--drag-preview div,.pubwave-block--drag-preview p,.pubwave-block--drag-preview label,.pubwave-block--drag-preview .pubwave-editor__task-item>div{color:var(--pubwave-text-muted,#9b9a97)!important}.pubwave-block--drag-preview label input{display:none!important}.pubwave-block--drag-preview label:before{border-color:var(--pubwave-text-muted,#9b9a97)!important;width:16px!important;height:16px!important}.pubwave-block--drag-preview label:after{border-color:var(--pubwave-bg,#fff)!important;top:2px!important;left:4px!important}.ProseMirror .ProseMirror-gapcursor{pointer-events:none;display:none;position:absolute}.ProseMirror .ProseMirror-gapcursor:after{content:"";border-top:1px solid var(--pubwave-text);width:20px;animation:1.1s steps(2,start) infinite pubwave-cursor-blink;display:block;position:absolute;top:-2px}@keyframes pubwave-cursor-blink{to{visibility:hidden}}.ProseMirror-focused .ProseMirror-gapcursor{display:block}.tippy-box{z-index:var(--pubwave-z-dropdown,60)!important;background:0 0!important;border:none!important}.tippy-box:has(.pubwave-slash-menu){background:0 0!important;border:none!important}.pubwave-slash-menu{border:1px solid var(--pubwave-border,#e3e2e0)!important}.ProseMirror-dropcursor{border-left:2px solid var(--pubwave-primary);pointer-events:none}.pubwave-editor .ProseMirror .suggestion{border:1px solid var(--pubwave-border,#e3e2e0)!important;border-radius:var(--pubwave-radius-md,6px)!important;color:#1f2937!important;background-color:#fffffff2!important;padding:2px 4px!important;display:inline-block!important}.pubwave-editor .ProseMirror .suggestion,.pubwave-editor .ProseMirror .suggestion *,.pubwave-editor .ProseMirror .suggestion span,.pubwave-editor .ProseMirror .suggestion strong,.pubwave-editor .ProseMirror .suggestion em,.pubwave-editor .ProseMirror .suggestion code{color:#1f2937!important}.tippy-box,.tippy-box[data-theme]{z-index:60!important}.tippy-box[data-theme~=pubwave]{box-shadow:none;background:0 0;border:none}.tippy-box[data-theme~=pubwave] .tippy-content{padding:0}.tippy-box[data-theme~=light-border]{border-radius:var(--pubwave-radius,6px);box-shadow:var(--pubwave-shadow-md,0 4px 6px -1px #0000001a);padding:4px 8px;font-size:12px;color:#fff!important;background-color:#000!important;border:none!important}.tippy-box[data-theme~=light-border] .tippy-content{color:#fff!important}.pubwave-block-handle__drag,.pubwave-block-handle__add{color:var(--pubwave-text-muted,#9b9a97)!important}.pubwave-toolbar__button:not(:disabled):hover,.pubwave-toolbar__turn-into-option:not(.pubwave-toolbar__turn-into-option--active):hover{background-color:var(--pubwave-hover)!important}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}
|
|
2
|
+
@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.isolate{isolation:isolate}.container{width:100%}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.grow{flex-grow:1}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.resize{resize:both}.border{border-style:var(--tw-border-style);border-width:1px}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}:root{--pubwave-bg:#fff;--pubwave-surface:#fff;--pubwave-text:#37352f;--pubwave-text-muted:#9b9a97;--pubwave-border:#e3e2e0;--pubwave-border-light:#f3f4f6;--pubwave-hover:#f7f6f3;--pubwave-focus:#0000000d;--pubwave-selection:#3b82f6;--pubwave-selection-bg:#2383e226;--pubwave-primary:#2383e2;--pubwave-primary-hover:#2563eb;--pubwave-handle-color:#9b9a97;--pubwave-primary-faded:#3b82f61a;--pubwave-drop-indicator:#3b82f6;--pubwave-drop-target:#3b82f60d;--pubwave-error:#ef4444;--pubwave-success:#10b981;--pubwave-warning:#f59e0b;--pubwave-text-secondary:#374151;--pubwave-text-tertiary:#4b5563;--pubwave-hover-bg:#f3f4f6;--pubwave-hover-task:#e8f2ff;--pubwave-checked-text:#9ca3af;--pubwave-spacing-xs:.25rem;--pubwave-spacing-sm:.5rem;--pubwave-spacing-md:1rem;--pubwave-spacing-lg:1.5rem;--pubwave-spacing-xl:2rem;--pubwave-spacing-1:4px;--pubwave-spacing-2:8px;--pubwave-spacing-3:12px;--pubwave-spacing-4:16px;--pubwave-spacing-7:28px;--pubwave-font-family:inherit;--pubwave-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--pubwave-font-size-xs:11px;--pubwave-font-size-sm:13px;--pubwave-font-size-base:14px;--pubwave-font-size-md:1rem;--pubwave-font-size-lg:1.125rem;--pubwave-font-size-xl:1.25rem;--pubwave-font-size-2xl:1.5rem;--pubwave-font-size-3xl:2rem;--pubwave-line-height:1.625;--pubwave-line-height-heading:1.25;--pubwave-button-width:28px;--pubwave-button-height:28px;--pubwave-icon-size:20px;--pubwave-checkbox-size:20px;--pubwave-checkbox-input-size:16px;--pubwave-divider-width:1px;--pubwave-divider-height:20px;--pubwave-drop-indicator-width:2px;--pubwave-drop-indicator-height:2px;--pubwave-task-item-height:30px;--pubwave-radius-xs:3px;--pubwave-radius-sm:4px;--pubwave-radius:6px;--pubwave-radius-md:6px;--pubwave-radius-lg:8px;--pubwave-shadow-sm:0 1px 2px 0 #0000000d;--pubwave-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;--pubwave-shadow-lg:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}@media (prefers-color-scheme:dark){:root{--pubwave-bg:#1a1a1a;--pubwave-surface:#262626;--pubwave-text:#e5e7eb;--pubwave-text-muted:#9ca3af;--pubwave-border:#374151;--pubwave-border-light:#4b5563;--pubwave-hover:#ffffff0d;--pubwave-focus:#ffffff14;--pubwave-selection:#60a5fa;--pubwave-selection-bg:#60a5fa26;--pubwave-primary:#60a5fa;--pubwave-primary-hover:#3b82f6;--pubwave-primary-faded:#60a5fa26;--pubwave-drop-indicator:#60a5fa;--pubwave-drop-target:#60a5fa14;--pubwave-error:#f87171;--pubwave-text-secondary:#d1d5db;--pubwave-text-tertiary:#9ca3af;--pubwave-hover-bg:#374151;--pubwave-hover-task:#3b82f626;--pubwave-checked-text:#6b7280}}.pubwave-editor{width:var(--pubwave-container-width,100%);max-width:var(--pubwave-container-max-width,none);font-family:var(--pubwave-font-family);color:var(--pubwave-text);background:var(--pubwave-bg,#fff);border-radius:var(--pubwave-container-border-radius,16px);padding:var(--pubwave-container-padding-y,96px)var(--pubwave-container-padding-x,120px);padding-left:var(--pubwave-container-padding-left,140px);position:relative;box-shadow:0 0 0 1px #0000000a,0 20px 25px -5px #0000000d,0 10px 10px -5px #00000005}.pubwave-editor:not(.pubwave-editor--fixed-height){min-height:var(--pubwave-container-min-height,700px)}@media (max-width:768px){.pubwave-editor{padding:var(--pubwave-container-padding-y-mobile,20px)var(--pubwave-container-padding-x-mobile,16px);padding-left:var(--pubwave-container-padding-left-mobile,16px);border-radius:var(--pubwave-container-border-radius-mobile,12px)}.pubwave-editor:not(.pubwave-editor--fixed-height){min-height:var(--pubwave-container-min-height-mobile,400px)}}.pubwave-editor,.pubwave-editor *,.pubwave-editor :before,.pubwave-editor :after{box-sizing:border-box}.pubwave-editor__content{outline:none;flex-direction:column;flex:1;min-height:1em;display:flex;overflow:hidden auto}.pubwave-editor__content .ProseMirror{min-height:100%;padding-bottom:30vh;padding-top:var(--pubwave-spacing-md,1rem);outline:none;flex-grow:1}.pubwave-editor--fixed-height .pubwave-editor__content .ProseMirror{padding-bottom:2rem}.pubwave-editor__content .ProseMirror p.is-editor-empty:first-child:before,.pubwave-editor__content.ProseMirror-focused p.pubwave-editor__node--empty:before,.ProseMirror.ProseMirror-focused p.pubwave-editor__node--empty:before{content:attr(data-placeholder);float:left;color:var(--pubwave-text-muted);pointer-events:none;height:0}.pubwave-editor__content .ProseMirror>*+*{margin-top:.75em}@media (max-width:768px){.pubwave-editor__content .ProseMirror>*+*{margin-top:.35em}.pubwave-editor__content .ProseMirror h1+*,.pubwave-editor__content .ProseMirror h2+*,.pubwave-editor__content .ProseMirror h3+*{margin-top:.4em}.pubwave-editor__content .ProseMirror h1,.pubwave-editor__content .ProseMirror h2,.pubwave-editor__content .ProseMirror h3{margin-top:.6em}.pubwave-editor__content .ProseMirror{font-size:var(--pubwave-font-size-base-mobile,15px)}.pubwave-editor__content .ProseMirror h1{font-size:var(--pubwave-font-size-3xl-mobile,1.75rem)}.pubwave-editor__content .ProseMirror h2{font-size:var(--pubwave-font-size-2xl-mobile,1.375rem)}.pubwave-editor__content .ProseMirror h3{font-size:var(--pubwave-font-size-xl-mobile,1.125rem)}}.pubwave-editor__content .pubwave-editor__bullet-list,.pubwave-editor__content .pubwave-editor__ordered-list{padding-left:1.3em!important}.pubwave-editor__content .ProseMirror p{line-height:var(--pubwave-line-height);margin:0}.pubwave-editor__content .ProseMirror h1,.pubwave-editor__content .ProseMirror h2,.pubwave-editor__content .ProseMirror h3{line-height:var(--pubwave-line-height-heading);margin:0;font-weight:600}.pubwave-editor__content .ProseMirror h1{font-size:var(--pubwave-font-size-3xl)}.pubwave-editor__content .ProseMirror h2{font-size:var(--pubwave-font-size-2xl)}.pubwave-editor__content .ProseMirror h3{font-size:var(--pubwave-font-size-xl)}.pubwave-editor__content .ProseMirror ul:not([data-type=taskList]),.pubwave-editor__content .ProseMirror ol{margin:0;padding-left:1.5em}.pubwave-editor__content .ProseMirror li:not([data-type=taskItem]):not(.pubwave-editor__task-item){margin:.25em 0}.pubwave-editor__content .ProseMirror li>p{margin:0}.pubwave-editor__content ul[data-type=taskList]{padding:var(--pubwave-spacing-4,16px)0;margin:0!important;padding-left:0!important;list-style:none!important}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li,.pubwave-editor__content .ProseMirror ul[data-type=taskList]>li,.pubwave-editor__content .ProseMirror ul[data-type=taskList] li[data-type=taskItem],.pubwave-editor__content .ProseMirror ul[data-type=taskList] li.pubwave-editor__task-item,.pubwave-editor__content .ProseMirror .pubwave-editor__task-item,.pubwave-editor__content.ProseMirror ul[data-type=taskList] li,.ProseMirror.pubwave-editor__content ul[data-type=taskList] li{border-radius:var(--pubwave-radius-sm,4px)!important;-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;flex-direction:row!important;align-items:flex-start!important;gap:.5em!important;margin:0!important;padding:.25em 0!important;list-style:none!important;display:flex!important}.pubwave-editor__task-item{min-height:var(--pubwave-task-item-height,30px);height:auto!important}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li::marker{content:""!important;width:0!important;font-size:0!important;display:none!important}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li[data-type=taskItem]::marker{content:""!important;width:0!important;font-size:0!important;display:none!important}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li.pubwave-editor__task-item::marker{content:""!important;width:0!important;font-size:0!important;display:none!important}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li:before,.pubwave-editor__content .ProseMirror ul[data-type=taskList] li[data-type=taskItem]:before,.pubwave-editor__content .ProseMirror ul[data-type=taskList] li.pubwave-editor__task-item:before{content:""!important;width:0!important;display:none!important}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li:hover,.pubwave-editor__content .ProseMirror ul[data-type=taskList] li.ProseMirror-selectednode{background-color:var(--pubwave-hover-task,#e8f2ff)}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li>label,.pubwave-editor__content .ProseMirror ul[data-type=taskList] li[data-type=taskItem]>label,.pubwave-editor__content .ProseMirror ul[data-type=taskList] li.pubwave-editor__task-item>label{cursor:pointer!important;width:var(--pubwave-checkbox-size,20px)!important;height:var(--pubwave-checkbox-size,20px)!important;min-height:var(--pubwave-checkbox-size,20px)!important;max-height:var(--pubwave-checkbox-size,20px)!important;flex-shrink:0!important;align-self:flex-start!important;margin:.125em 0 0!important;padding:0!important;line-height:1!important;display:block!important;position:relative!important;overflow:hidden!important}li>label input[type=checkbox]{width:var(--pubwave-checkbox-input-size,16px);height:var(--pubwave-checkbox-input-size,16px);cursor:pointer;margin-top:5px}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li>label:before{content:"";width:var(--pubwave-checkbox-size,20px);height:var(--pubwave-checkbox-size,20px);border:1.5px solid var(--pubwave-text,#1a1a1a);border-radius:var(--pubwave-radius-xs,3px);background-color:var(--pubwave-bg,#fff);box-sizing:border-box;transition:all .15s;display:block;position:absolute;top:0;left:0}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li[data-checked=true]>label:before{background-color:var(--pubwave-primary-hover,#2563eb);border-color:var(--pubwave-primary-hover,#2563eb)}.pubwave-editor__content .ProseMirror ul[data-type=taskList] li[data-checked=true]>label:after{content:"";border:solid var(--pubwave-bg,#fff);box-sizing:border-box;z-index:1;border-width:0 2px 2px 0;width:5px;height:10px;position:absolute;top:3px;left:6px;transform:rotate(45deg)}.pubwave-editor__content ul[data-type=taskList] li>div,.pubwave-editor__content ul[data-type=taskList] li[data-type=taskItem]>div,.pubwave-editor__content ul[data-type=taskList] li.pubwave-editor__task-item>div{min-width:0!important;color:var(--pubwave-text,#1a1a1a)!important;flex:1!important;margin:0!important;padding:.1em 0!important;display:block!important}.pubwave-editor__content ul[data-type=taskList] li>div p,.pubwave-editor__content ul[data-type=taskList] li[data-type=taskItem]>div p,.pubwave-editor__content ul[data-type=taskList] li.pubwave-editor__task-item>div p,.pubwave-editor__content ul[data-type=taskList] li>div>p,.pubwave-editor__content ul[data-type=taskList] li>div p.pubwave-editor__paragraph,.pubwave-editor__content ul[data-type=taskList] li[data-type=taskItem]>div p.pubwave-editor__paragraph{width:100%!important;min-height:1.5em!important;margin:0!important;padding:0!important;line-height:1.5!important;display:block!important}.pubwave-editor__content.ProseMirror ul[data-type=taskList] li[data-checked=true]>div p,.pubwave-editor__content ul[data-type=taskList] li[data-checked=true]>div p{color:var(--pubwave-checked-text,#9ca3af)!important;text-decoration:line-through!important}.pubwave-editor__content blockquote,.pubwave-editor__content.ProseMirror blockquote{margin:.5em 0;padding-left:1em;font-style:italic;border-left:3px solid var(--pubwave-text,#1a1a1a)!important}.pubwave-editor__content .ProseMirror pre,.pubwave-editor__content pre{margin:.5em 0;padding:.5em .75em;line-height:1.5;overflow-x:auto;background:var(--pubwave-border-light,#f3f4f6)!important;border-radius:var(--pubwave-radius-md,6px)!important;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace!important;font-size:var(--pubwave-font-size-sm,13px)!important;color:#1a1a1a!important}.pubwave-editor__content .ProseMirror pre code,.pubwave-editor__content pre code{font-size:inherit!important;color:inherit!important;background:0 0!important;border-radius:0!important;padding:0!important;font-family:inherit!important}.pubwave-block{padding-left:2.5em;position:relative}.pubwave-block-menu{z-index:2;align-items:center;gap:.5em;display:flex;position:absolute;top:50%;left:.5em;transform:translateY(-50%)}.pubwave-editor__content .ProseMirror hr,.pubwave-editor__content hr,.pubwave-editor__content .pubwave-editor__divider{border:none;border-top:1px solid var(--pubwave-border,#e5e7eb)!important;background:0 0!important;height:0!important;margin:1em 0!important}.pubwave-editor__content .ProseMirror img,.pubwave-editor__content img,.pubwave-editor__content .pubwave-editor__image{border-radius:var(--pubwave-radius-md,6px);cursor:pointer;max-width:100%;height:auto;margin:1em auto;transition:opacity .2s;display:block;box-shadow:0 1px 3px #0000001a}.pubwave-editor__content .ProseMirror img:hover,.pubwave-editor__content img:hover,.pubwave-editor__content .pubwave-editor__image:hover{opacity:.9}.pubwave-editor__content .ProseMirror img.ProseMirror-selectednode,.pubwave-editor__content img.ProseMirror-selectednode,.pubwave-editor__content .pubwave-editor__image.ProseMirror-selectednode{outline:2px solid var(--pubwave-primary,#2383e2);outline-offset:2px}.pubwave-editor__content .ProseMirror strong{font-weight:600}.pubwave-editor__content .ProseMirror em{font-style:italic}.pubwave-editor__content .ProseMirror u{text-decoration:underline}.pubwave-editor__content .ProseMirror s{text-decoration:line-through}.pubwave-editor__content .ProseMirror code{background:var(--pubwave-hover);border-radius:var(--pubwave-radius-sm);font-family:var(--pubwave-font-mono);padding:.15em .35em;font-size:.9em}.pubwave-editor__content .ProseMirror a,.pubwave-editor .ProseMirror a{cursor:pointer;text-decoration:underline;color:var(--pubwave-link-color,#2383e2)!important}.pubwave-editor__content .ProseMirror a:hover,.pubwave-editor .ProseMirror a:hover{opacity:.8;color:var(--pubwave-link-hover-color,var(--pubwave-link-color,#2383e2))!important}.pubwave-editor__content .ProseMirror ::-moz-selection{background-color:var(--pubwave-selection-bg)}.pubwave-editor__content .ProseMirror ::selection{background-color:var(--pubwave-selection-bg)}.pubwave-editor--readonly,.pubwave-editor--readonly .pubwave-editor__content{cursor:default}.pubwave-block--dragging{opacity:.4}.pubwave-block--drag-preview{color:var(--pubwave-text-muted,#9b9a97)!important;opacity:.6!important}.pubwave-block--drag-preview div,.pubwave-block--drag-preview p,.pubwave-block--drag-preview label,.pubwave-block--drag-preview .pubwave-editor__task-item>div{color:var(--pubwave-text-muted,#9b9a97)!important}.pubwave-block--drag-preview label input{display:none!important}.pubwave-block--drag-preview label:before{border-color:var(--pubwave-text-muted,#9b9a97)!important;width:16px!important;height:16px!important}.pubwave-block--drag-preview label:after{border-color:var(--pubwave-bg,#fff)!important;top:2px!important;left:4px!important}.ProseMirror .ProseMirror-gapcursor{pointer-events:none;display:none;position:absolute}.ProseMirror .ProseMirror-gapcursor:after{content:"";border-top:1px solid var(--pubwave-text);width:20px;animation:1.1s steps(2,start) infinite pubwave-cursor-blink;display:block;position:absolute;top:-2px}@keyframes pubwave-cursor-blink{to{visibility:hidden}}.ProseMirror-focused .ProseMirror-gapcursor{display:block}.tippy-box{z-index:var(--pubwave-z-dropdown,60)!important;background:0 0!important;border:none!important}.tippy-box:has(.pubwave-slash-menu){background:0 0!important;border:none!important}.pubwave-slash-menu{border:1px solid var(--pubwave-border,#e3e2e0)!important}.ProseMirror-dropcursor{border-left:2px solid var(--pubwave-primary);pointer-events:none}.pubwave-editor .ProseMirror .suggestion{border:1px solid var(--pubwave-border,#e3e2e0)!important;border-radius:var(--pubwave-radius-md,6px)!important;color:#1f2937!important;background-color:#fffffff2!important;padding:2px 4px!important;display:inline-block!important}.pubwave-editor .ProseMirror .suggestion,.pubwave-editor .ProseMirror .suggestion *,.pubwave-editor .ProseMirror .suggestion span,.pubwave-editor .ProseMirror .suggestion strong,.pubwave-editor .ProseMirror .suggestion em,.pubwave-editor .ProseMirror .suggestion code{color:#1f2937!important}.tippy-box,.tippy-box[data-theme]{z-index:60!important}.tippy-box[data-theme~=pubwave]{box-shadow:none;background:0 0;border:none}.tippy-box[data-theme~=pubwave] .tippy-content{padding:0}.tippy-box[data-theme~=light-border]{border-radius:var(--pubwave-radius,6px);box-shadow:var(--pubwave-shadow-md,0 4px 6px -1px #0000001a);padding:4px 8px;font-size:12px;color:#fff!important;background-color:#000!important;border:none!important}.tippy-box[data-theme~=light-border] .tippy-content{color:#fff!important}.pubwave-block-handle__drag,.pubwave-block-handle__add{color:var(--pubwave-text-muted,#9b9a97)!important}.pubwave-toolbar__button:not(:disabled):hover,.pubwave-toolbar__turn-into-option:not(.pubwave-toolbar__turn-into-option--active):hover{background-color:var(--pubwave-hover)!important}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}
|
package/dist/index.d.ts
CHANGED
|
@@ -919,6 +919,16 @@ declare interface PubwaveEditorProps {
|
|
|
919
919
|
* @default '100%'
|
|
920
920
|
*/
|
|
921
921
|
width?: string;
|
|
922
|
+
/**
|
|
923
|
+
* Editor container height
|
|
924
|
+
* Can be a CSS value like '500px', '80vh', 'auto', etc.
|
|
925
|
+
*/
|
|
926
|
+
height?: string;
|
|
927
|
+
/**
|
|
928
|
+
* Editor container minimum height
|
|
929
|
+
* Can be a CSS value like '200px', '50vh', etc.
|
|
930
|
+
*/
|
|
931
|
+
minHeight?: string;
|
|
922
932
|
/**
|
|
923
933
|
* Test ID for testing
|
|
924
934
|
*/
|
package/dist/index.js
CHANGED
|
@@ -6940,6 +6940,8 @@ const PubwaveEditor = forwardRef(
|
|
|
6940
6940
|
onReady,
|
|
6941
6941
|
className,
|
|
6942
6942
|
width,
|
|
6943
|
+
height,
|
|
6944
|
+
minHeight,
|
|
6943
6945
|
"data-testid": testId = "pubwave-editor"
|
|
6944
6946
|
} = props;
|
|
6945
6947
|
const locale = getLocale(theme == null ? void 0 : theme.locale);
|
|
@@ -7056,11 +7058,19 @@ const PubwaveEditor = forwardRef(
|
|
|
7056
7058
|
(theme == null ? void 0 : theme.classNamePrefix) ?? "",
|
|
7057
7059
|
(theme == null ? void 0 : theme.containerClassName) ?? "",
|
|
7058
7060
|
editor ? getReadOnlyClassName(editor) : "",
|
|
7061
|
+
// Add class when height is constrained
|
|
7062
|
+
height || minHeight ? "pubwave-editor--fixed-height" : "",
|
|
7059
7063
|
className
|
|
7060
7064
|
].filter(Boolean).join(" ");
|
|
7061
7065
|
const themeStyles = {
|
|
7062
7066
|
position: "relative",
|
|
7063
|
-
overflow
|
|
7067
|
+
// When height or minHeight is set, we need overflow handling for scrolling
|
|
7068
|
+
// Otherwise, use visible overflow for normal flow
|
|
7069
|
+
overflow: height || minHeight ? "hidden" : "visible",
|
|
7070
|
+
...height || minHeight ? {
|
|
7071
|
+
display: "flex",
|
|
7072
|
+
flexDirection: "column"
|
|
7073
|
+
} : {}
|
|
7064
7074
|
};
|
|
7065
7075
|
if (width) {
|
|
7066
7076
|
themeStyles["--pubwave-container-width"] = width;
|
|
@@ -7068,6 +7078,14 @@ const PubwaveEditor = forwardRef(
|
|
|
7068
7078
|
themeStyles["--pubwave-container-max-width"] = width;
|
|
7069
7079
|
themeStyles.maxWidth = width;
|
|
7070
7080
|
}
|
|
7081
|
+
if (height) {
|
|
7082
|
+
themeStyles["--pubwave-container-height"] = height;
|
|
7083
|
+
themeStyles.height = height;
|
|
7084
|
+
}
|
|
7085
|
+
if (minHeight) {
|
|
7086
|
+
themeStyles["--pubwave-container-min-height"] = minHeight;
|
|
7087
|
+
themeStyles.minHeight = minHeight;
|
|
7088
|
+
}
|
|
7071
7089
|
if (theme == null ? void 0 : theme.colors) {
|
|
7072
7090
|
const { colors } = theme;
|
|
7073
7091
|
const textColor = colors.text || "#1f2937";
|