@bycrux/editor 0.7.2 → 0.7.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@bycrux/editor",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,4 +1,5 @@
1
1
  import { useEffect, useRef, useState, type ReactNode } from 'react'
2
+ import { createPortal } from 'react-dom'
2
3
  import type { EditorAdapter, Project } from '../types'
3
4
 
4
5
  interface CarouselRenderModalProps {
@@ -108,7 +109,9 @@ export default function CarouselRenderModal({ projectId, adapter, slidesCount, r
108
109
 
109
110
  // ── Done state — gallery + zip download ─────────────────────────────────
110
111
  if (status === 'done' && outputDir) {
111
- return (
112
+ // Portal to document.body (see RenderModal): a transformed host ancestor
113
+ // would otherwise trap this `fixed` overlay and center the panel off-screen.
114
+ return createPortal(
112
115
  <div className="fixed inset-0 z-50 flex items-center justify-center bg-black/90 backdrop-blur-md">
113
116
  <div className="w-[96vw] h-[96vh] bg-[var(--editor-bg)] border border-[var(--editor-border)] rounded-2xl shadow-2xl flex overflow-hidden">
114
117
 
@@ -172,12 +175,13 @@ export default function CarouselRenderModal({ projectId, adapter, slidesCount, r
172
175
  </div>
173
176
  </div>
174
177
  </div>
175
- </div>
178
+ </div>,
179
+ document.body,
176
180
  )
177
181
  }
178
182
 
179
183
  // ── Running / error state — log readout ─────────────────────────────────
180
- return (
184
+ return createPortal(
181
185
  <div className="fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm">
182
186
  <div className="w-full max-w-3xl bg-[var(--editor-surface)] border border-[var(--editor-border)] rounded-xl shadow-2xl flex flex-col overflow-hidden">
183
187
 
@@ -238,6 +242,7 @@ export default function CarouselRenderModal({ projectId, adapter, slidesCount, r
238
242
  )}
239
243
  </div>
240
244
  </div>
241
- </div>
245
+ </div>,
246
+ document.body,
242
247
  )
243
248
  }
@@ -1,4 +1,5 @@
1
1
  import { useEffect, useRef, useState } from 'react'
2
+ import { createPortal } from 'react-dom'
2
3
  import type { EditorAdapter, Project } from '../types'
3
4
  import type { Captions } from '../schema'
4
5
 
@@ -105,7 +106,9 @@ export default function CaptionRegenModal<P extends Project = Project>({ project
105
106
  onClose()
106
107
  }
107
108
 
108
- return (
109
+ // Portal to document.body so a transformed host ancestor can't trap this
110
+ // `fixed` overlay and push the panel off-screen (see RenderModal).
111
+ return createPortal(
109
112
  <div className="fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm">
110
113
  <div className="w-full max-w-3xl bg-[var(--editor-surface)] border border-[var(--editor-border)] rounded-xl shadow-2xl flex flex-col overflow-hidden">
111
114
 
@@ -172,6 +175,7 @@ export default function CaptionRegenModal<P extends Project = Project>({ project
172
175
  )}
173
176
  </div>
174
177
  </div>
175
- </div>
178
+ </div>,
179
+ document.body,
176
180
  )
177
181
  }
@@ -1,4 +1,5 @@
1
1
  import { useEffect, useRef, useState, type ReactNode } from 'react'
2
+ import { createPortal } from 'react-dom'
2
3
  import type { EditorAdapter, Project } from '../types'
3
4
 
4
5
  interface RenderModalProps<P extends Project = Project> {
@@ -131,7 +132,11 @@ export default function RenderModal<P extends Project = Project>({ projectId, ad
131
132
  }
132
133
 
133
134
  if (status === 'done' && outputPath) {
134
- return (
135
+ // Portal to document.body: a transformed/filtered host ancestor (e.g. the
136
+ // Los Parceros app-shell wrapper) would otherwise become the containing
137
+ // block for this `fixed` overlay, sizing it to the scrolled page height and
138
+ // centering the panel off-screen below the fold.
139
+ return createPortal(
135
140
  <div className="fixed inset-0 z-50 flex items-center justify-center bg-black/90 backdrop-blur-md">
136
141
  <div className="w-[96vw] h-[96vh] bg-[var(--editor-surface)] border border-[var(--editor-border)] rounded-2xl shadow-2xl flex overflow-hidden">
137
142
 
@@ -179,11 +184,12 @@ export default function RenderModal<P extends Project = Project>({ projectId, ad
179
184
  </div>
180
185
  </div>
181
186
  </div>
182
- </div>
187
+ </div>,
188
+ document.body,
183
189
  )
184
190
  }
185
191
 
186
- return (
192
+ return createPortal(
187
193
  <div className="fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm">
188
194
  <div className="w-full max-w-3xl bg-[var(--editor-surface)] border border-[var(--editor-border)] rounded-xl shadow-2xl flex flex-col overflow-hidden">
189
195
 
@@ -247,6 +253,7 @@ export default function RenderModal<P extends Project = Project>({ projectId, ad
247
253
  )}
248
254
  </div>
249
255
  </div>
250
- </div>
256
+ </div>,
257
+ document.body,
251
258
  )
252
259
  }