docs(storybook): drop the 1440px maximum of the SW Viewer Header screens
Deploy Storybook / deploy (push) Successful in 1m52s

The Viewer Header Story screens (기본형, 최소화 · 닫기) fill the Story column instead of
an inline 1440px max-width; the other viewer frames keep their 1440px default.

Verified in Storybook: frame and header 1536px at 1920, 2048px at 2560, no overflow.
This commit is contained in:
shkim4 committed 2026-10-22 21:11:05 +09:00
1 parent 2f1edd47eb
commit 9458ed34c5
1 file changed
+5 -4
+5 -4
View File
@@ -30,11 +30,11 @@ function Log({ lines }: { lines: string[] }) {
}
/** A viewer screen: header on top, the drawing area below it (panels are placed inside this frame). */
function ViewerFrame({ width = 1440, height = 620, children, header }: { width?: number; height?: number; header: ReactNode; children?: ReactNode }) {
function ViewerFrame({ width = 1440, height = 620, children, header }: { width?: number | null; height?: number; header: ReactNode; children?: ReactNode }) {
return (
<div className="sw-story-scroller">
{/* Fills the Story column up to `width`, so panels placed at the right edge stay visible. */}
<div className="sw-viewer-story-frame" style={{ width: "100%", maxWidth: width, height }} data-viewer-frame="">
{/* Fills the Story column up to `width` (null: the whole column), so panels placed at the right edge stay visible. */}
<div className="sw-viewer-story-frame" style={{ width: "100%", maxWidth: width ?? undefined, height }} data-viewer-frame="">
{header}
<div className="sw-viewer-story-canvas" aria-label="도면 영역 (예시)">{children}</div>
</div>
@@ -58,7 +58,8 @@ function AboutPanel({ demo }: { demo: ViewerDemo }) {
)
}
function ViewerScreen({ width = 1440, initialDocument = SAMPLES[1].name as string | null, open = [] as ("layers" | "options" | "properties")[], windowControls = false }) {
// 2026-10-22 (user request): the Viewer Header screens have no 1440px maximum; they fill the Story column.
function ViewerScreen({ width = null as number | null, initialDocument = SAMPLES[1].name as string | null, open = [] as ("layers" | "options" | "properties")[], windowControls = false }) {
const demo = useViewerDemo({ initialDocument, initialPanels: open })
// 2026-10-21 new viewer version: SWHeader's own minimize / close (SWHeaderWindowControls, same icons, size, hover)
// at the right end after the existing trailing items (the `trailing` slot, no new API). The program owns the real