@bycrux/editor 0.4.3 → 0.4.4
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
|
@@ -365,10 +365,10 @@ export default function CarouselEditor<P extends Project = Project>({ project: i
|
|
|
365
365
|
|
|
366
366
|
return (
|
|
367
367
|
<div ref={containerRef} className="flex flex-col h-full overflow-y-auto bg-[var(--editor-bg)]">
|
|
368
|
-
{/* TOP: slide rail
|
|
369
|
-
the slide renders large; the
|
|
370
|
-
whole editor scrolls vertically. */}
|
|
371
|
-
<div className="flex flex-shrink-0 min-h-[
|
|
368
|
+
{/* TOP: slide rail | canvas | editing panel (right). Given a generous
|
|
369
|
+
viewport-relative height so the slide renders large; the project-media
|
|
370
|
+
region flows beneath and the whole editor scrolls vertically. */}
|
|
371
|
+
<div className="flex flex-shrink-0 min-h-[62vh] overflow-hidden">
|
|
372
372
|
<SlideGrid
|
|
373
373
|
project={project}
|
|
374
374
|
slides={slides}
|
|
@@ -493,50 +493,50 @@ export default function CarouselEditor<P extends Project = Project>({ project: i
|
|
|
493
493
|
</div>
|
|
494
494
|
)}
|
|
495
495
|
</div>
|
|
496
|
-
</div>
|
|
497
496
|
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
/>
|
|
532
|
-
{slots?.assetsPanel && (
|
|
533
|
-
// Project media — at the very bottom, full width.
|
|
534
|
-
<div className="w-full flex flex-col">
|
|
535
|
-
{slots.assetsPanel}
|
|
536
|
-
</div>
|
|
537
|
-
)}
|
|
497
|
+
{/* RIGHT: the slide editor (add-element toolbar + property panel),
|
|
498
|
+
beside the canvas with its own vertical scroll. */}
|
|
499
|
+
<div className="w-[24rem] flex-shrink-0 border-l border-[var(--editor-border)] flex flex-col overflow-y-auto bg-[var(--editor-bg)]">
|
|
500
|
+
{selectedSlide && project.status !== 'pending' && (
|
|
501
|
+
<div className="px-4 py-2 border-b border-[var(--editor-border)]">
|
|
502
|
+
<AddElementMenu
|
|
503
|
+
project={project}
|
|
504
|
+
selectedSlideId={selectedSlideId}
|
|
505
|
+
adapter={adapter}
|
|
506
|
+
onAddElement={handleAddElement}
|
|
507
|
+
/>
|
|
508
|
+
</div>
|
|
509
|
+
)}
|
|
510
|
+
<SlidePropertyPanel
|
|
511
|
+
project={project}
|
|
512
|
+
slide={selectedSlide}
|
|
513
|
+
element={selectedElement}
|
|
514
|
+
adapter={adapter}
|
|
515
|
+
onSlideChange={handleSlideChange}
|
|
516
|
+
onElementChange={handlePanelElementChange}
|
|
517
|
+
onDeleteSlide={handleDeleteSlide}
|
|
518
|
+
onDuplicateSlide={handleDuplicateSlide}
|
|
519
|
+
onDeleteElement={handleDeleteElement}
|
|
520
|
+
onDuplicateElement={handleDuplicateElement}
|
|
521
|
+
onReorderElement={handleReorderElement}
|
|
522
|
+
onEnterCrop={(_slideId, elementId) => { setSelectedElementId(elementId); setCropElementId(elementId) }}
|
|
523
|
+
updateOverlayProp={state.updateOverlayProp}
|
|
524
|
+
hiddenElementIds={hiddenElementIds}
|
|
525
|
+
onToggleElementVisibility={onToggleElementVisibility}
|
|
526
|
+
// Fills the right column (drop the default w-80 width + left border).
|
|
527
|
+
className="w-full border-l-0"
|
|
528
|
+
/>
|
|
529
|
+
</div>
|
|
538
530
|
</div>
|
|
539
531
|
|
|
532
|
+
{/* BELOW: Project media, full width at the bottom. Flows beneath the top
|
|
533
|
+
region and scrolls with the page (the root is overflow-y-auto). */}
|
|
534
|
+
{slots?.assetsPanel && (
|
|
535
|
+
<div className="flex-shrink-0 border-t border-[var(--editor-border)] w-full flex flex-col">
|
|
536
|
+
{slots.assetsPanel}
|
|
537
|
+
</div>
|
|
538
|
+
)}
|
|
539
|
+
|
|
540
540
|
{renderOpen && (
|
|
541
541
|
<CarouselRenderModal
|
|
542
542
|
projectId={project.id}
|
|
@@ -97,9 +97,9 @@ describe('CarouselEditor — editor-core integration', () => {
|
|
|
97
97
|
/>,
|
|
98
98
|
)
|
|
99
99
|
await waitFor(() => getByTestId('assets'))
|
|
100
|
-
// The assets slot lives in the below-canvas region,
|
|
101
|
-
//
|
|
102
|
-
//
|
|
100
|
+
// The assets slot lives in the below-canvas region, full-width at the very
|
|
101
|
+
// bottom (no longer capped to a 320px sidebar) so the host panel spans the
|
|
102
|
+
// editor width beneath the top canvas/editing region.
|
|
103
103
|
const wrapper = getByTestId('assets').parentElement
|
|
104
104
|
expect(wrapper?.className).toContain('w-full')
|
|
105
105
|
expect(wrapper?.className).not.toContain('w-80')
|