@weasel-js/forge 1.8.1 → 1.9.1

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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/shell/trialFrames.ts","../src/shell/StoryGlobalsContext.ts","../src/frame/useNearViewport.ts","../src/shell/cssVars/overrides.ts","../src/shell/TrialHost.tsx","../src/timeline/trialClocks.ts","../src/timeline/usePersistedPlayhead.ts","../src/shell/StoryTrial.tsx"],"names":["createContext","useContext","useState","useEffect","NONE","useSyncExternalStore","useRef","useLatest","StoryBody","jsx","useCallback","TrialIdContext"],"mappings":";;;;;;;;;AA8CA,IAAM,QAAA,GAAuB,EAAE,IAAA,EAAM,IAAA,EAAM,MAAM,EAAC,EAAG,KAAA,EAAO,IAAA,EAAM,IAAA,EAAM,IAAA,EAAM,OAAA,EAAS,IAAA,EAAM,MAAM,IAAA,EAAK;AAEjG,SAAS,iBAAA,GAAiC;AAC/C,EAAA,MAAM,MAAA,uBAAa,GAAA,EAAwB;AAC3C,EAAA,MAAM,KAAA,uBAAY,GAAA,EAA2C;AAC7D,EAAA,MAAM,SAAA,uBAAgB,GAAA,EAAgB;AACtC,EAAA,MAAM,UAAU,MAAM;AACpB,IAAA,KAAA,MAAW,QAAA,IAAY,CAAC,GAAG,SAAS,GAAG,QAAA,EAAS;AAAA,EAClD,CAAA;AACA,EAAA,MAAM,KAAA,GAAQ,CAAC,OAAA,EAAiB,IAAA,KAA8B;AAC5D,IAAA,MAAM,KAAA,GAAQ,MAAA,CAAO,GAAA,CAAI,OAAO,CAAA;AAChC,IAAA,IAAI,CAAC,KAAA,EAAO;AACZ,IAAA,MAAA,CAAO,IAAI,OAAA,EAAS,EAAE,GAAG,KAAA,EAAO,GAAG,MAAM,CAAA;AACzC,IAAA,OAAA,EAAQ;AAAA,EACV,CAAA;AACA,EAAA,OAAO;AAAA,IACL,OAAA,CAAQ,SAAS,KAAA,EAAO;AACtB,MAAA,MAA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IAAA;AAAA,MACC,QAAQ,KAAA,CAAM,MAAA;AAAA,MACd,KAAA;AAAA,MACA,QAAQ,GAAA,CAAI,MAAA;AAAA,MACZ,OAAA,EAAS,IAAA;AAAA,MACR,GAAI,UAAA,GAAa,EAAE,UAAA,KAAe,EAAC;AAAA,MAEnC,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ","file":"chunk-QN3HJQXZ.js","sourcesContent":["import { createContext, type RefObject, useCallback, useContext, useSyncExternalStore } from 'react';\nimport type { A11yReport, CapturedPicture, CssVarReport, ToFrame, Viewport } from '../protocol/messages';\n\ntype Send = (msg: ToFrame) => void;\n\n/** What an axe run in the frame came back with. */\nexport type A11yOutcome = { ok: true; report: A11yReport } | { ok: false; message: string };\n\n/** The half of a trial's frame that answers a request: each call is one round trip over the frame's channel. */\nexport interface TrialFrameCalls {\n send: Send;\n audit: () => Promise<A11yOutcome>;\n /** Rejects when the frame could not draw itself, or went away before it did. */\n capture: () => Promise<CapturedPicture>;\n}\n\n/** What trial chrome can reach of the frame its trial shows. */\nexport interface TrialFrame {\n /** Null while no frame is connected. */\n send: Send | null;\n /** The frame's latest `vars` report. */\n vars: readonly CssVarReport[];\n /** Runs axe over the story and records the answer as `a11y`. Null while no frame is connected. */\n audit: (() => Promise<A11yOutcome>) | null;\n /** What the last audit found; null until one has run against the connected frame. */\n a11y: A11yOutcome | null;\n /** The story's own picture, for an export to draw over. Null while no frame is connected. */\n capture: (() => Promise<CapturedPicture>) | null;\n /** The story's content box, as the frame last measured it; null until it has. */\n size: Viewport | null;\n}\n\n/** Each trial's frame, keyed by trial id: `FrameView` connects and reports, trial chrome reads. */\nexport interface TrialFrames {\n /** Returns a disconnect that does nothing once a newer connection replaced this one. */\n connect(trialId: string, calls: TrialFrameCalls): () => void;\n report(trialId: string, vars: readonly CssVarReport[]): void;\n reportA11y(trialId: string, outcome: A11yOutcome): void;\n reportSize(trialId: string, size: Viewport): void;\n /** The element a trial's frame is mounted in — stable across the frame reloads that replace the link,\n * because an annotation target's ref has to outlive them. */\n hostRef(trialId: string): RefObject<HTMLElement | null>;\n get(trialId: string): TrialFrame;\n subscribe(listener: () => void): () => void;\n}\n\nconst NO_FRAME: TrialFrame = { send: null, vars: [], audit: null, a11y: null, capture: null, size: null };\n\nexport function createTrialFrames(): TrialFrames {\n const frames = new Map<string, TrialFrame>();\n const hosts = new Map<string, RefObject<HTMLElement | null>>();\n const listeners = new Set<() => void>();\n const changed = () => {\n for (const listener of [...listeners]) listener();\n };\n const patch = (trialId: string, next: Partial<TrialFrame>) => {\n const frame = frames.get(trialId);\n if (!frame) return;\n frames.set(trialId, { ...frame, ...next });\n changed();\n };\n return {\n connect(trialId, calls) {\n const held = frames.get(trialId);\n frames.set(trialId, {\n send: calls.send,\n vars: [],\n audit: calls.audit,\n a11y: null,\n capture: calls.capture,\n size: held?.size ?? null,\n });\n changed();\n return () => {\n if (frames.get(trialId)?.send !== calls.send) return;\n frames.delete(trialId);\n changed();\n };\n },\n report: (trialId, vars) => patch(trialId, { vars }),\n reportA11y: (trialId, a11y) => patch(trialId, { a11y }),\n reportSize(trialId, size) {\n const frame = frames.get(trialId) ?? NO_FRAME;\n if (frame.size?.width === size.width && frame.size?.height === size.height) return;\n frames.set(trialId, { ...frame, size });\n changed();\n },\n hostRef(trialId) {\n let ref = hosts.get(trialId);\n if (!ref) {\n ref = { current: null };\n hosts.set(trialId, ref);\n }\n return ref;\n },\n get: (trialId) => frames.get(trialId) ?? NO_FRAME,\n subscribe(listener) {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n };\n}\n\n/** The workshop's `TrialFrames`; `null` outside a `Workshop`. */\nexport const TrialFramesContext = createContext<TrialFrames | null>(null);\n\n/** The frame of the trial `trialId` names, re-read when it connects or reports. */\nexport function useTrialFrame(trialId: string): TrialFrame {\n const frames = useContext(TrialFramesContext);\n const subscribe = useCallback((listener: () => void) => frames?.subscribe(listener) ?? (() => {}), [frames]);\n const read = () => frames?.get(trialId) ?? NO_FRAME;\n return useSyncExternalStore(subscribe, read, read);\n}\n","import { createContext } from 'react';\nimport type { Globals } from '../protocol/messages';\n\n/** The lab's global values, which a trial's pins override. A change reaches open frames without replacing instruments. */\nexport const StoryGlobalsContext = createContext<Globals>({});\n","import { type RefObject, useEffect, useState } from 'react';\n\n/** How far past the viewport a trial's story stays mounted, so a small scroll back does not reload it. */\nexport const IN_VIEW_MARGIN = '50%';\n\n/**\n * Whether `ref`'s element lies within `margin` of its document's viewport; true where the browser cannot say.\n * Decided by where the element is, not by whether any of it shows: `isIntersecting` is false too for an element an\n * `overflow` ancestor clips away, as a narrow lab tile does to its content while the tiling changes.\n */\nexport function useNearViewport(ref: RefObject<Element | null>, margin: string): boolean {\n const [near, setNear] = useState(true);\n useEffect(() => {\n const el = ref.current;\n if (!el || typeof IntersectionObserver === 'undefined') return;\n // A fresh observe always reports, wherever the element is.\n const recheck = () => {\n observer.unobserve(el);\n observer.observe(el);\n };\n let watching = false;\n const watch = (on: boolean) => {\n if (on === watching) return;\n watching = on;\n if (on) {\n document.addEventListener('scroll', recheck, { capture: true, passive: true });\n window.addEventListener('resize', recheck);\n } else {\n document.removeEventListener('scroll', recheck, { capture: true });\n window.removeEventListener('resize', recheck);\n }\n };\n const observer = new IntersectionObserver(\n (entries) => {\n const last = entries.at(-1);\n if (!last) return;\n const root = last.rootBounds;\n const box = last.boundingClientRect;\n setNear(\n root\n ? box.bottom >= root.top && box.top <= root.bottom && box.right >= root.left && box.left <= root.right\n : last.isIntersecting,\n );\n // While nothing of it intersects, a clip can hide every move from the observer, so ask again on each scroll.\n watch(Boolean(root) && !last.isIntersecting);\n },\n { root: document, rootMargin: margin },\n );\n observer.observe(el);\n return () => {\n observer.disconnect();\n watch(false);\n };\n }, [ref, margin]);\n return near;\n}\n","import { usePersistedState } from '@weasel-js/labkit';\n\nexport type CssOverrides = Readonly<Record<string, string>>;\n\nconst NONE: CssOverrides = {};\n\n/** The CSS variable overrides of the trial this is rendered inside, persisted with it. */\nexport function useCssOverrides() {\n return usePersistedState<CssOverrides>('fg-css-overrides', NONE, { scope: 'trial' });\n}\n","import { useLatest } from '@weasel-js/core';\nimport { LabBoundary, TrialIdContext } from '@weasel-js/labkit';\nimport { OverlayPortalProvider } from '@weasel-js/ui';\nimport {\n type ReactNode,\n type RefObject,\n useContext,\n useEffect,\n useId,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { runAxe } from '../frame/a11y';\nimport { captureElement } from '../frame/capture';\nimport { createOverrides, type Overrides, scanCssVars } from '../frame/cssVars';\nimport type { FrameSetup } from '../frame/FrameController';\nimport { IN_VIEW_MARGIN, useNearViewport } from '../frame/useNearViewport';\nimport { createGlobalsTarget } from '../frame/globalsTarget';\nimport type { CssVarReport, Globals, Layout, ToFrame } from '../protocol/messages';\nimport { useCssOverrides } from './cssVars/overrides';\nimport { effectiveGlobals, GLOBALS_KEY } from './globals';\nimport { StoryGlobalsContext } from './StoryGlobalsContext';\nimport { type A11yOutcome, TrialFramesContext } from './trialFrames';\n\n/** Props for `TrialHost`. */\nexport interface TrialHostProps {\n layout: Layout;\n setup: FrameSetup;\n /** The trial's config, read for its `$globals` pins. */\n config: unknown;\n /** Rendered once the host element exists, with the globals in force on it. */\n children: (globals: Globals) => ReactNode;\n /** Receives the host element, for a caller with no trial to reach it through. */\n hostRef?: RefObject<HTMLElement | null>;\n /** Called once the children's first commit has painted. */\n onRendered?: () => void;\n}\n\nconst VARS_SETTLE_MS = 100;\n\n/** A selector matching only the element carrying `id`. */\nconst scopeOf = (id: string) => `[data-fg-host=\"${id}\"]`;\n\n/**\n * One story's box in the workshop document: what a frame document was, as an element. It applies the globals to\n * itself, keeps its CSS variable overrides on itself, contains fixed-position descendants and portals, reports its\n * vars, size and audits to the trial's frame registry, and unmounts its content while out of view.\n */\nexport function TrialHost({ layout, setup, config, children, hostRef, onRendered }: TrialHostProps) {\n const trialId = useContext(TrialIdContext);\n const frames = useContext(TrialFramesContext);\n const labGlobals = useContext(StoryGlobalsContext);\n const pins = (config as Record<string, unknown> | null | undefined)?.[GLOBALS_KEY];\n const globals = useMemo(() => effectiveGlobals(labGlobals, pins), [labGlobals, pins]);\n const [persisted] = useCssOverrides();\n const reactId = useId();\n const hostId = trialId ?? reactId;\n const [host, setHost] = useState<HTMLDivElement | null>(null);\n const elementRef = useRef<HTMLDivElement | null>(null);\n const inView = useNearViewport(elementRef, IN_VIEW_MARGIN);\n const [pending, setPending] = useState(true);\n const overridesRef = useRef<Overrides | null>(null);\n const latest = useLatest({ setup, onRendered });\n\n // Everything the host owns for its lifetime: the globals target, the overrides rule, the registry connection.\n useLayoutEffect(() => {\n if (!host) return;\n const doc = host.ownerDocument;\n const scope = scopeOf(hostId);\n const { cssVarsScope } = latest.current.setup;\n const overrides = createOverrides(doc, cssVarsScope ? `${scope}, ${scope} :is(${cssVarsScope})` : scope);\n overridesRef.current = overrides;\n let lastVars: CssVarReport[] | null = null;\n let reported: string | null = null;\n const publish = (vars: CssVarReport[]) => {\n lastVars = vars;\n const key = JSON.stringify(vars);\n if (key === reported) return;\n reported = key;\n if (trialId) frames?.report(trialId, vars);\n };\n const scan = () => publish(scanCssVars(doc, overrides.has, host));\n let settleTimer: ReturnType<typeof setTimeout> | undefined;\n const ownMutation = (record: MutationRecord) =>\n overrides.owns(record.target) ||\n (record.type === 'childList' &&\n [...record.addedNodes, ...record.removedNodes].length > 0 &&\n [...record.addedNodes, ...record.removedNodes].every(overrides.owns));\n const mutations =\n typeof MutationObserver === 'undefined'\n ? null\n : new MutationObserver((records) => {\n if (records.every(ownMutation)) return;\n clearTimeout(settleTimer);\n settleTimer = setTimeout(scan, VARS_SETTLE_MS);\n });\n mutations?.observe(host, { subtree: true, childList: true, characterData: true, attributes: true });\n\n const send = (msg: ToFrame) => {\n if (msg.type !== 'vars.set') return;\n overrides.set(msg.name, msg.value);\n const at = lastVars?.findIndex((v) => v.name === msg.name) ?? -1;\n if (!lastVars || at < 0) return;\n const vars = lastVars.slice();\n vars[at] = { ...vars[at]!, overridden: overrides.has(msg.name) };\n scan();\n };\n const audit = async (): Promise<A11yOutcome> => {\n let outcome: A11yOutcome;\n try {\n outcome = { ok: true, report: await runAxe(host, { page: false }) };\n } catch (error) {\n outcome = { ok: false, message: error instanceof Error ? error.message : String(error) };\n }\n if (trialId) frames?.reportA11y(trialId, outcome);\n return outcome;\n };\n const capture = async () => captureElement(host);\n const disconnect = frames && trialId ? frames.connect(trialId, { send, audit, capture }) : () => {};\n if (frames && trialId) frames.hostRef(trialId).current = host;\n\n const sizes =\n typeof ResizeObserver === 'undefined'\n ? null\n : new ResizeObserver(() => {\n const { width, height } = host.getBoundingClientRect();\n if (trialId) frames?.reportSize(trialId, { width: Math.ceil(width), height: Math.ceil(height) });\n });\n sizes?.observe(host);\n\n return () => {\n disconnect();\n sizes?.disconnect();\n mutations?.disconnect();\n clearTimeout(settleTimer);\n overrides.dispose();\n overridesRef.current = null;\n if (frames && trialId && frames.hostRef(trialId).current === host) frames.hostRef(trialId).current = null;\n };\n }, [host, hostId, trialId, frames, latest]);\n\n // The overrides the trial persisted, put back on every mount and kept in step with the panel's edits.\n const applied = useRef<Record<string, string>>({});\n useLayoutEffect(() => {\n const overrides = overridesRef.current;\n if (!overrides) return;\n for (const name of Object.keys(applied.current)) if (!(name in persisted)) overrides.set(name, null);\n for (const [name, value] of Object.entries(persisted)) overrides.set(name, value);\n applied.current = { ...persisted };\n }, [host, persisted]);\n\n useLayoutEffect(() => {\n if (!host) return;\n const target = createGlobalsTarget(host, scopeOf(hostId));\n latest.current.setup.applyGlobals?.(globals, target);\n return () => target.dispose();\n }, [host, hostId, globals, latest]);\n\n // The host is hidden until its first commit has painted with its fonts, so a new trial never shows a jump.\n const announced = useRef(false);\n useEffect(() => {\n if (!host || !inView || announced.current) return;\n announced.current = true;\n let canceled = false;\n const done = () => {\n if (canceled) return;\n setPending(false);\n latest.current.onRendered?.();\n };\n const { fonts } = host.ownerDocument;\n if (!fonts) {\n done();\n return;\n }\n const afterPaint = () => requestAnimationFrame(done);\n void fonts.ready.then(afterPaint, afterPaint);\n return () => {\n canceled = true;\n };\n }, [host, inView, latest]);\n\n return (\n <div\n ref={(el) => {\n elementRef.current = el;\n if (hostRef) hostRef.current = el;\n setHost(el);\n }}\n className=\"fg-story\"\n data-fg-host={hostId}\n data-fg-layout={layout}\n data-pending={pending || undefined}\n >\n {host && inView ? (\n // The workshop is itself a lab; below the boundary a story sees no lab, trial or theme above it, as in a\n // document of its own.\n <LabBoundary>\n <OverlayPortalProvider container={host}>{children(globals)}</OverlayPortalProvider>\n </LabBoundary>\n ) : null}\n </div>\n );\n}\n","import { createContext, useContext, useSyncExternalStore } from 'react';\nimport type { Clock } from './clock';\n\n/** Each trial's story clock, by trial id: the story's trial publishes it, and the trial's transport reads it. */\nexport interface TrialClocks {\n /** Publishes `clock` as `trialId`'s; the returned function withdraws it. */\n publish(trialId: string, clock: Clock): () => void;\n get(trialId: string): Clock | null;\n subscribe(listener: () => void): () => void;\n}\n\nexport function createTrialClocks(): TrialClocks {\n const clocks = new Map<string, Clock>();\n const listeners = new Set<() => void>();\n const notify = () => {\n for (const listener of [...listeners]) listener();\n };\n return {\n publish(trialId, clock) {\n clocks.set(trialId, clock);\n notify();\n return () => {\n if (clocks.get(trialId) !== clock) return;\n clocks.delete(trialId);\n notify();\n };\n },\n get: (trialId) => clocks.get(trialId) ?? null,\n subscribe(listener) {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n };\n}\n\nexport const TrialClocksContext = createContext<TrialClocks | null>(null);\n\nconst NEVER = () => () => {};\nconst NONE = () => null;\n\n/** The clock trial `trialId`'s story published, or null. */\nexport function useTrialClock(trialId: string): Clock | null {\n const clocks = useContext(TrialClocksContext);\n return useSyncExternalStore(clocks?.subscribe ?? NEVER, clocks ? () => clocks.get(trialId) : NONE);\n}\n","import { useLatest } from '@weasel-js/core';\nimport { useEffect, useRef } from 'react';\nimport type { Clock } from './clock';\n\n/**\n * Keeps `clock`'s paused time in the trial, through `write`, so a reload or a snapshot brings the story back there.\n * It writes when the clock stops or moves while stopped, never on a playing frame. A `persisted` value arriving from\n * outside — a snapshot loaded, a Reset — is requested of the clock, so a span set later can still hold it; null\n * stands for the span's start. Nothing is written while a request waits on a span.\n */\nexport function usePersistedPlayhead(clock: Clock | null, persisted: number | null, write: (time: number) => void): void {\n const written = useRef(persisted);\n const latestWrite = useLatest(write);\n\n useEffect(() => {\n if (!clock || persisted === written.current) return;\n written.current = persisted;\n clock.request(persisted);\n }, [clock, persisted]);\n\n useEffect(() => {\n if (!clock) return;\n return clock.subscribe(() => {\n const { playing, time } = clock.get();\n if (playing || clock.pending() !== null || time === written.current) return;\n written.current = time;\n latestWrite.current(time);\n });\n }, [clock, latestWrite]);\n}\n","import { type RenderContext, TrialIdContext } from '@weasel-js/labkit';\nimport { useLatest } from '@weasel-js/core';\nimport { memo, type RefObject, useCallback, useContext, useEffect, useRef, useState } from 'react';\nimport type { FrameSetup } from '../frame/FrameController';\nimport { StoryHost } from '../frame/StoryHost';\nimport type { Globals } from '../protocol/messages';\nimport type { Decorator, LoadedStory, StoryContext } from '../story/types';\nimport { ClockContext } from '../timeline/context';\nimport { useStoryClock } from '../timeline/StoryClock';\nimport { TrialClocksContext } from '../timeline/trialClocks';\nimport { useClockLoop } from '../timeline/useClockLoop';\nimport { usePersistedPlayhead } from '../timeline/usePersistedPlayhead';\nimport { isForgePath, PLAYHEAD_KEY, storyConfig } from './globals';\nimport { TrialHost } from './TrialHost';\n\n/** Props for `StoryTrial`. */\nexport interface StoryTrialProps {\n story: LoadedStory;\n setup: FrameSetup;\n /** The trial's config and state; the story reads and writes them through its `StoryContext`. */\n ctx: Pick<RenderContext<unknown, unknown>, 'config' | 'state' | 'setConfig' | 'setState'>;\n hostRef?: RefObject<HTMLElement | null>;\n onRendered?: () => void;\n /** A render throw, after the boundary has shown it. */\n onError?: (error: unknown) => void;\n}\n\nconst NO_DECORATORS: readonly Decorator[] = [];\n\ninterface StoryBodyProps {\n story: LoadedStory;\n config: StoryContext['config'];\n setConfig: StoryContext['setConfig'];\n state: unknown;\n setState: StoryContext['setState'];\n globals: Globals;\n decorators: readonly Decorator[];\n resetKey: number;\n onError: (error: unknown) => void;\n}\n\n/** Calls `render` only when its inputs change, as Storybook does: the lab re-renders a trial for its own reasons, and a\n * story declaring a component inside `render` remounts it on every extra call. */\nconst StoryBody = memo(function StoryBody({ story, config, setConfig, state, setState, globals, decorators, resetKey, onError }: StoryBodyProps) {\n const storyCtx: StoryContext = { config, setConfig, state, setState, globals, title: story.title, name: story.name };\n return <StoryHost story={story} ctx={storyCtx} decorators={decorators} resetKey={resetKey} onError={onError} />;\n});\n\n/** A story rendered in the workshop document, inside a `TrialHost`, from the trial's own config and state. */\nexport function StoryTrial({ story, setup, ctx, hostRef, onRendered, onError }: StoryTrialProps) {\n const latest = useLatest(ctx);\n // Kept across a write to a key forge owns, so moving the playhead or a pin does not re-render the story.\n const [heldConfig, setHeldConfig] = useState(() => storyConfig(ctx.config));\n const config = storyConfig(ctx.config, heldConfig);\n if (config !== heldConfig) setHeldConfig(config);\n\n // A trial opened on the provisional instrument starts at `null`; the story's own initial state fills it once.\n const seeded = useRef(false);\n useEffect(() => {\n if (seeded.current || ctx.state !== null || !story.initialState) return;\n seeded.current = true;\n ctx.setState(story.initialState(config));\n }, [ctx, story, config]);\n\n // Each new input retries a render the boundary caught, as the frame did on each message.\n // State, not a ref: a render React throws away takes its bump with it.\n const [input, setInput] = useState({ config, state: ctx.state, key: 0 });\n let resetKey = input.key;\n if (input.config !== config || input.state !== ctx.state) {\n resetKey = input.key + 1;\n setInput({ config, state: ctx.state, key: resetKey });\n }\n\n // Stable, as the frame's were: a story may list them as effect dependencies.\n // The pins belong to the trial; a story cannot see them, so it cannot set them either.\n const setConfig = useCallback((path: string, value: unknown) => {\n if (!isForgePath(path)) latest.current.setConfig(path, value);\n }, [latest]);\n const setState = useCallback((next: unknown) => latest.current.setState(next), [latest]);\n\n // The story's clock lives with its trial: the trial's transport reads it from the registry, the story from context.\n const trialId = useContext(TrialIdContext);\n const clocks = useContext(TrialClocksContext);\n const ownHost = useRef<HTMLElement | null>(null);\n const host = hostRef ?? ownHost;\n const kept = (ctx.config as Record<string, unknown> | null)?.[PLAYHEAD_KEY];\n const persisted = typeof kept === 'number' && Number.isFinite(kept) ? kept : null;\n const clock = useStoryClock(story.timeline?.(config) ?? null, () => persisted);\n useClockLoop(clock, host);\n usePersistedPlayhead(clock, persisted, (time) => latest.current.setConfig(PLAYHEAD_KEY, time));\n useEffect(() => (clock && clocks && trialId ? clocks.publish(trialId, clock) : undefined), [clock, clocks, trialId]);\n\n const decorators = setup.decorators ?? NO_DECORATORS;\n const latestError = useLatest(onError);\n const reportError = useCallback((error: unknown) => latestError.current?.(error), [latestError]);\n const render = (globals: Globals) => (\n <ClockContext.Provider value={clock}>\n <StoryBody\n story={story}\n config={config}\n setConfig={setConfig}\n state={ctx.state}\n setState={setState}\n globals={globals}\n decorators={decorators}\n resetKey={resetKey}\n onError={reportError}\n />\n </ClockContext.Provider>\n );\n\n return (\n <TrialHost\n layout={story.layout}\n setup={setup}\n config={ctx.config}\n hostRef={host}\n {...(onRendered ? { onRendered } : {})}\n >\n {render}\n </TrialHost>\n );\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import { LabMode, LabContribution, LabPage } from '@weasel-js/labkit';
2
2
  import { Theme } from '@weasel-js/theme';
3
3
  import { ControlRenderer } from '@weasel-js/labkit/config';
4
- import { G as Globals, F as FrameSetup } from './FrameController-BH8xJHZ8.js';
4
+ import { G as Globals, F as FrameSetup } from './FrameController-CpcY0DNB.js';
5
5
 
6
6
  /** One global the workshop's toolbar sets for every story, and a trial may pin for its own. */
7
7
  interface GlobalDeclaration {
@@ -89,6 +89,7 @@ body {
89
89
  .fg-index-cell {
90
90
  margin: var(--wzl-space-8) 0 0;
91
91
  width: fit-content;
92
+ min-width: min(100%, 20rem);
92
93
  max-width: 100%;
93
94
  }
94
95
  .fg-index-cell__stage {
@@ -102,6 +103,9 @@ body {
102
103
  background: var(--wzl-surface);
103
104
  overflow: auto;
104
105
  }
106
+ .fg-index-cell--padded {
107
+ width: auto;
108
+ }
105
109
  .fg-index-cell--padded > .fg-index-cell__stage {
106
110
  display: block;
107
111
  min-height: 0;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/frame/frame.css","../../src/frame/index/index.css"],"sourcesContent":["html,\nbody {\n margin: 0;\n}\n\n.fg-frame {\n box-sizing: border-box;\n}\n\n.fg-frame--centered {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100vh;\n}\n\n.fg-frame--padded {\n padding: 16px;\n}\n\n.fg-frame--fullscreen {\n padding: 0;\n}\n\n.fg-frame__fault {\n margin: 0;\n padding: 16px;\n white-space: pre-wrap;\n border: 1px solid #f2b8b5;\n border-radius: 4px;\n background: #fdecea;\n color: #8c1d18;\n font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;\n}\n",".fg-index {\n box-sizing: border-box;\n max-width: 1200px;\n margin: 0 auto;\n padding: var(--wzl-space-lg);\n font-family: var(--wzl-font-ui);\n font-size: var(--wzl-font-size);\n color: var(--wzl-fg);\n}\n\n.fg-index__head {\n margin-bottom: calc(var(--wzl-space-lg) * 2);\n}\n\n.fg-index__path {\n margin: 0 0 var(--wzl-space-2);\n font-size: var(--wzl-font-size-lg);\n color: var(--wzl-fg-muted);\n}\n\n.fg-index__title {\n margin: 0;\n font-family: var(--wzl-panel-title-font);\n font-size: calc(var(--wzl-font-size-xl) * 1.6);\n font-weight: var(--wzl-font-weight-medium);\n letter-spacing: var(--wzl-panel-title-tracking);\n text-transform: var(--wzl-panel-title-case);\n}\n\n.fg-index__description,\n.fg-index-story__description {\n max-width: 72ch;\n margin: var(--wzl-space-4) 0 0;\n font-family: var(--wzl-font-body);\n line-height: 1.5;\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-story {\n padding-top: calc(var(--wzl-space-lg) * 1.5);\n margin-top: calc(var(--wzl-space-lg) * 1.5);\n border-top: var(--wzl-border-w) solid var(--wzl-border);\n}\n\n.fg-index-story__head {\n display: flex;\n align-items: center;\n gap: var(--wzl-space-6);\n}\n\n.fg-index-story__name {\n margin: 0;\n font-family: var(--wzl-panel-title-font);\n font-size: var(--wzl-font-size-xl);\n font-weight: var(--wzl-panel-title-weight);\n letter-spacing: var(--wzl-panel-title-tracking);\n text-transform: var(--wzl-panel-title-case);\n color: var(--wzl-panel-title-color);\n}\n\n.fg-index-cell {\n margin: var(--wzl-space-8) 0 0;\n width: fit-content;\n max-width: 100%;\n}\n\n.fg-index-cell__stage {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 96px;\n padding: var(--wzl-space-2);\n border: var(--wzl-border-w) solid var(--wzl-border);\n border-radius: var(--wzl-radius-md);\n background: var(--wzl-surface);\n overflow: auto;\n}\n\n/* A padded story sits top-left as it would on a page, so the minimum height\n that gives a centered one presence would only leave room under it. */\n.fg-index-cell--padded > .fg-index-cell__stage {\n display: block;\n min-height: 0;\n}\n\n.fg-index-cell--fullscreen {\n width: auto;\n}\n\n.fg-index-cell--fullscreen > .fg-index-cell__stage {\n display: block;\n height: 360px;\n padding: 0;\n}\n\n.fg-index-cell__label {\n margin-top: var(--wzl-space-3);\n font-family: var(--wzl-font-mono);\n font-size: var(--wzl-font-size-sm);\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-variants__row {\n margin-top: calc(var(--wzl-space-lg) * 1.25);\n}\n\n/* Set as the kit's panel titles are, at the small size. */\n.fg-index-variants__label {\n margin: 0;\n font-family: var(--wzl-panel-title-font);\n font-size: var(--wzl-font-size-sm);\n font-weight: var(--wzl-panel-title-weight);\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-variants__cells {\n display: flex;\n flex-wrap: wrap;\n align-items: flex-start;\n gap: var(--wzl-space-6);\n}\n\n.fg-index-variants__cells > .fg-index-cell {\n margin-top: var(--wzl-space-4);\n}\n\n.fg-index__library {\n margin-inline-end: var(--wzl-space-4);\n vertical-align: middle;\n}\n\n.fg-index__title-row {\n display: flex;\n align-items: center;\n gap: var(--wzl-space-6);\n}\n\n.fg-index-deps {\n display: grid;\n grid-template-columns: max-content 1fr;\n gap: var(--wzl-space-3) var(--wzl-space-8);\n margin: var(--wzl-space-8) 0 0;\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-index-deps__row {\n display: contents;\n}\n\n.fg-index-deps__label {\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-deps__value {\n margin: 0;\n}\n\n.fg-index-deps__list {\n display: flex;\n flex-wrap: wrap;\n gap: var(--wzl-space-2) var(--wzl-space-6);\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.fg-index-deps__link {\n color: var(--wzl-accent-fg);\n text-decoration: none;\n}\n\n.fg-index-deps__link:hover {\n text-decoration: underline;\n}\n\n.fg-index-deps__prefix,\n.fg-index-deps__empty,\n.fg-index-deps__none {\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-deps__none {\n max-width: 72ch;\n margin: var(--wzl-space-8) 0 0;\n font-size: var(--wzl-font-size-sm);\n}\n"],"mappings":";AAAA;AACA;AACE,UAAQ;AACV;AAEA,CAAC;AACC,cAAY;AACd;AAEA,CAAC;AACC,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,cAAY;AACd;AAEA,CAAC;AACC,WAAS;AACX;AAEA,CAAC;AACC,WAAS;AACX;AAEA,CAAC;AACC,UAAQ;AACR,WAAS;AACT,eAAa;AACb,UAAQ,IAAI,MAAM;AAClB,iBAAe;AACf,cAAY;AACZ,SAAO;AACP;AAAA,IAAM,IAAI,CAAC,IAAI,YAAY;AAAA,IAAE,cAAc;AAAA,IAAE,KAAK;AAAA,IAAE;AACtD;;;ACjCA,CAAC;AACC,cAAY;AACZ,aAAW;AACX,UAAQ,EAAE;AACV,WAAS,IAAI;AACb,eAAa,IAAI;AACjB,aAAW,IAAI;AACf,SAAO,IAAI;AACb;AAEA,CAAC;AACC,iBAAe,KAAK,IAAI,gBAAgB,EA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AAGA,CAAC;AACC,UAAQ;AACR,eAAa,IAAI;AACjB,aAAW,IAAI;AACf,eAAa,IAAI;AACjB,kBAAgB;AAChB,kBAAgB;AAChB,SAAO,IAAI;AACb;AAEA,CAAC;AACC,WAAS;AACT,aAAW;AACX,eAAa;AACb,OAAK,IAAI;AACX;AAEA,CAPC,yBAOyB,EAAE,CAhE3B;AAiEC,cAAY,IAAI;AAClB;AAEA,CAAC;AACC,qBAAmB,IAAI;AACvB,kBAAgB;AAClB;AAEA,CAAC;AACC,WAAS;AACT,eAAa;AACb,OAAK,IAAI;AACX;AAEA,CAAC;AACC,WAAS;AACT,yBAAuB,YAAY;AACnC,OAAK,IAAI,eAAe,IAAI;AAC5B,UAAQ,IAAI,eAAe,EAAE;AAC7B,aAAW,IAAI;AACjB;AAEA,CAAC;AACC,WAAS;AACX;AAEA,CAAC;AACC,SAAO,IAAI;AACb;AAEA,CAAC;AACC,UAAQ;AACV;AAEA,CAAC;AACC,WAAS;AACT,aAAW;AACX,OAAK,IAAI,eAAe,IAAI;AAC5B,UAAQ;AACR,WAAS;AACT,cAAY;AACd;AAEA,CAAC;AACC,SAAO,IAAI;AACX,mBAAiB;AACnB;AAEA,CALC,mBAKmB;AAClB,mBAAiB;AACnB;AAEA,CAAC;AACD,CAAC;AACD,CAAC;AACC,SAAO,IAAI;AACb;AAEA,CAJC;AAKC,aAAW;AACX,UAAQ,IAAI,eAAe,EAAE;AAC7B,aAAW,IAAI;AACjB;","names":[]}
1
+ {"version":3,"sources":["../../src/frame/frame.css","../../src/frame/index/index.css"],"sourcesContent":["html,\nbody {\n margin: 0;\n}\n\n.fg-frame {\n box-sizing: border-box;\n}\n\n.fg-frame--centered {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100vh;\n}\n\n.fg-frame--padded {\n padding: 16px;\n}\n\n.fg-frame--fullscreen {\n padding: 0;\n}\n\n.fg-frame__fault {\n margin: 0;\n padding: 16px;\n white-space: pre-wrap;\n border: 1px solid #f2b8b5;\n border-radius: 4px;\n background: #fdecea;\n color: #8c1d18;\n font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;\n}\n",".fg-index {\n box-sizing: border-box;\n max-width: 1200px;\n margin: 0 auto;\n padding: var(--wzl-space-lg);\n font-family: var(--wzl-font-ui);\n font-size: var(--wzl-font-size);\n color: var(--wzl-fg);\n}\n\n.fg-index__head {\n margin-bottom: calc(var(--wzl-space-lg) * 2);\n}\n\n.fg-index__path {\n margin: 0 0 var(--wzl-space-2);\n font-size: var(--wzl-font-size-lg);\n color: var(--wzl-fg-muted);\n}\n\n.fg-index__title {\n margin: 0;\n font-family: var(--wzl-panel-title-font);\n font-size: calc(var(--wzl-font-size-xl) * 1.6);\n font-weight: var(--wzl-font-weight-medium);\n letter-spacing: var(--wzl-panel-title-tracking);\n text-transform: var(--wzl-panel-title-case);\n}\n\n.fg-index__description,\n.fg-index-story__description {\n max-width: 72ch;\n margin: var(--wzl-space-4) 0 0;\n font-family: var(--wzl-font-body);\n line-height: 1.5;\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-story {\n padding-top: calc(var(--wzl-space-lg) * 1.5);\n margin-top: calc(var(--wzl-space-lg) * 1.5);\n border-top: var(--wzl-border-w) solid var(--wzl-border);\n}\n\n.fg-index-story__head {\n display: flex;\n align-items: center;\n gap: var(--wzl-space-6);\n}\n\n.fg-index-story__name {\n margin: 0;\n font-family: var(--wzl-panel-title-font);\n font-size: var(--wzl-font-size-xl);\n font-weight: var(--wzl-panel-title-weight);\n letter-spacing: var(--wzl-panel-title-tracking);\n text-transform: var(--wzl-panel-title-case);\n color: var(--wzl-panel-title-color);\n}\n\n.fg-index-cell {\n margin: var(--wzl-space-8) 0 0;\n width: fit-content;\n /* A fluid specimen (a slider, a tiled workspace) has no width of its own,\n so hugging it alone collapses the cell to its padding. */\n min-width: min(100%, 20rem);\n max-width: 100%;\n}\n\n.fg-index-cell__stage {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 96px;\n padding: var(--wzl-space-2);\n border: var(--wzl-border-w) solid var(--wzl-border);\n border-radius: var(--wzl-radius-md);\n background: var(--wzl-surface);\n overflow: auto;\n}\n\n/* A padded story sits top-left as it would on a page: the column's width, and\n none of the minimum height that gives a centered one presence. */\n.fg-index-cell--padded {\n width: auto;\n}\n\n.fg-index-cell--padded > .fg-index-cell__stage {\n display: block;\n min-height: 0;\n}\n\n.fg-index-cell--fullscreen {\n width: auto;\n}\n\n.fg-index-cell--fullscreen > .fg-index-cell__stage {\n display: block;\n height: 360px;\n padding: 0;\n}\n\n.fg-index-cell__label {\n margin-top: var(--wzl-space-3);\n font-family: var(--wzl-font-mono);\n font-size: var(--wzl-font-size-sm);\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-variants__row {\n margin-top: calc(var(--wzl-space-lg) * 1.25);\n}\n\n/* Set as the kit's panel titles are, at the small size. */\n.fg-index-variants__label {\n margin: 0;\n font-family: var(--wzl-panel-title-font);\n font-size: var(--wzl-font-size-sm);\n font-weight: var(--wzl-panel-title-weight);\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-variants__cells {\n display: flex;\n flex-wrap: wrap;\n align-items: flex-start;\n gap: var(--wzl-space-6);\n}\n\n.fg-index-variants__cells > .fg-index-cell {\n margin-top: var(--wzl-space-4);\n}\n\n.fg-index__library {\n margin-inline-end: var(--wzl-space-4);\n vertical-align: middle;\n}\n\n.fg-index__title-row {\n display: flex;\n align-items: center;\n gap: var(--wzl-space-6);\n}\n\n.fg-index-deps {\n display: grid;\n grid-template-columns: max-content 1fr;\n gap: var(--wzl-space-3) var(--wzl-space-8);\n margin: var(--wzl-space-8) 0 0;\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-index-deps__row {\n display: contents;\n}\n\n.fg-index-deps__label {\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-deps__value {\n margin: 0;\n}\n\n.fg-index-deps__list {\n display: flex;\n flex-wrap: wrap;\n gap: var(--wzl-space-2) var(--wzl-space-6);\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.fg-index-deps__link {\n color: var(--wzl-accent-fg);\n text-decoration: none;\n}\n\n.fg-index-deps__link:hover {\n text-decoration: underline;\n}\n\n.fg-index-deps__prefix,\n.fg-index-deps__empty,\n.fg-index-deps__none {\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-deps__none {\n max-width: 72ch;\n margin: var(--wzl-space-8) 0 0;\n font-size: var(--wzl-font-size-sm);\n}\n"],"mappings":";AAAA;AACA;AACE,UAAQ;AACV;AAEA,CAAC;AACC,cAAY;AACd;AAEA,CAAC;AACC,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,cAAY;AACd;AAEA,CAAC;AACC,WAAS;AACX;AAEA,CAAC;AACC,WAAS;AACX;AAEA,CAAC;AACC,UAAQ;AACR,WAAS;AACT,eAAa;AACb,UAAQ,IAAI,MAAM;AAClB,iBAAe;AACf,cAAY;AACZ,SAAO;AACP;AAAA,IAAM,IAAI,CAAC,IAAI,YAAY;AAAA,IAAE,cAAc;AAAA,IAAE,KAAK;AAAA,IAAE;AACtD;;;ACjCA,CAAC;AACC,cAAY;AACZ,aAAW;AACX,UAAQ,EAAE;AACV,WAAS,IAAI;AACb,eAAa,IAAI;AACjB,aAAW,IAAI;AACf,SAAO,IAAI;AACb;AAEA,CAAC;AACC,iBAAe,KAAK,IAAI,gBAAgB,EAAE;AAC5C;AAEA,CAAC;AACC,UAAQ,EAAE,EAAE,IAAI;AAChB,aAAW,IAAI;AACf,SAAO,IAAI;AACb;AAEA,CAAC;AACC,UAAQ;AACR,eAAa,IAAI;AACjB,aAAW,KAAK,IAAI,oBAAoB,EAAE;AAC1C,eAAa,IAAI;AACjB,kBAAgB,IAAI;AACpB,kBAAgB,IAAI;AACtB;AAEA,CAAC;AACD,CAAC;AACC,aAAW;AACX,UAAQ,IAAI,eAAe,EAAE;AAC7B,eAAa,IAAI;AACjB,eAAa;AACb,SAAO,IAAI;AACb;AAEA,CAAC;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AAEA,CAAC;AACC,WAAS;AACT,eAAa;AACb,OAAK,IAAI;AACX;AAEA,CAAC;AACC,WAAS;AACT,yBAAuB,YAAY;AACnC,OAAK,IAAI,eAAe,IAAI;AAC5B,UAAQ,IAAI,eAAe,EAAE;AAC7B,aAAW,IAAI;AACjB;AAEA,CAAC;AACC,WAAS;AACX;AAEA,CAAC;AACC,SAAO,IAAI;AACb;AAEA,CAAC;AACC,UAAQ;AACV;AAEA,CAAC;AACC,WAAS;AACT,aAAW;AACX,OAAK,IAAI,eAAe,IAAI;AAC5B,UAAQ;AACR,WAAS;AACT,cAAY;AACd;AAEA,CAAC;AACC,SAAO,IAAI;AACX,mBAAiB;AACnB;AAEA,CALC,mBAKmB;AAClB,mBAAiB;AACnB;AAEA,CAAC;AACD,CAAC;AACD,CAAC;AACC,SAAO,IAAI;AACb;AAEA,CAJC;AAKC,aAAW;AACX,UAAQ,IAAI,eAAe,EAAE;AAC7B,aAAW,IAAI;AACjB;","names":[]}
@@ -1,5 +1,5 @@
1
- import { F as FrameSetup, L as LoadedStory } from '../FrameController-BH8xJHZ8.js';
2
- export { p as StartFrameOptions, r as reportImportFault, s as startFrame } from '../FrameController-BH8xJHZ8.js';
1
+ import { F as FrameSetup, L as LoadedStory } from '../FrameController-CpcY0DNB.js';
2
+ export { p as StartFrameOptions, r as reportImportFault, s as startFrame } from '../FrameController-CpcY0DNB.js';
3
3
  import '@weasel-js/labkit/config';
4
4
  import 'react';
5
5
 
@@ -26,7 +26,7 @@ interface MountFrameOptions {
26
26
  index: readonly FrameIndexEntry[];
27
27
  importers: FrameImporters;
28
28
  setup?: FrameSetup;
29
- load?: (mod: Record<string, unknown>, autoTitle: string, parameters?: Record<string, unknown>) => LoadedStory[];
29
+ load?: (mod: Record<string, unknown>, title: string, parameters?: Record<string, unknown>) => LoadedStory[];
30
30
  }
31
31
 
32
32
  /**
@@ -1,6 +1,6 @@
1
- import { describeSchema, openChannel, isIndexId, libraryOf, indexId, answerSchema, IndexPage } from '../chunk-JQD3MVUQ.js';
1
+ import { describeSchema, openChannel, isIndexId, libraryOf, indexId, answerSchema, IndexPage } from '../chunk-JVRHBI3V.js';
2
2
  import { isGallery } from '../chunk-WEQSLPKT.js';
3
- import { createOverrides, createGlobalsTarget, loadStories, indexRenderOf, scanCssVars, runAxe, captureElement, StoryHost, resolveCssVar } from '../chunk-5N4YP5HS.js';
3
+ import { createOverrides, createGlobalsTarget, loadStories, indexRenderOf, scanCssVars, runAxe, captureElement, StoryHost, resolveCssVar } from '../chunk-Q2EZXJFE.js';
4
4
  import '../chunk-L5XM5VKB.js';
5
5
  import '../chunk-HRGPFQBW.js';
6
6
  import '../chunk-MGQWCPYE.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/frame/FrameController.tsx","../../src/frame/index/startIndex.tsx","../../src/frame/mountFrame.tsx"],"names":["createRoot","jsx","flushSync","id","stories","story"],"mappings":";;;;;;;;;;;;;AAgDA,IAAM,cAAA,GAAiB,GAAA;AAEvB,SAAS,KAAA,CAAM,KAAA,EAAmB,KAAA,EAAgB,GAAA,EAAyB;AACzE,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,OAAA;AAAA,IACN,KAAA;AAAA,IACA,SAAS,KAAA,YAAiB,KAAA,GAAQ,KAAA,CAAM,OAAA,GAAU,OAAO,KAAK,CAAA;AAAA,IAC9D,GAAI,KAAA,YAAiB,KAAA,IAAS,KAAA,CAAM,KAAA,GAAQ,EAAE,KAAA,EAAO,KAAA,CAAM,KAAA,EAAM,GAAI,EAAC;AAAA,IACtE,GAAI,GAAA,KAAQ,MAAA,GAAY,EAAC,GAAI,EAAE,GAAA;AAAI,GACrC;AACF;AAGO,SAAS,UAAA,CAAW,EAAE,KAAA,EAAO,OAAA,EAAS,WAAW,KAAA,GAAQ,IAAG,EAAkC;AACnG,EAAA,MAAM,EAAE,MAAK,GAAI,OAAA;AACjB,EAAA,IAAA,CAAK,EAAE,IAAA,EAAM,OAAA,EAAS,MAAA,EAAQ,eAAe,K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A,EAAqB,EAAE,CAAA,CAAA,CAAG,CAAA;AACtD,IAAA,MAAM,GAAA,GAAM,MAAM,QAAA,CAAS,KAAA,CAAM,IAAI,CAAA;AACrC,IAAA,MAAM,OAAA,GAAA,CAAW,QAAQ,IAAA,IAAQ,WAAA,EAAa,KAAK,KAAA,CAAM,KAAA,EAAO,OAAA,CAAQ,KAAA,EAAO,UAAU,CAAA;AACzF,IAAA,MAAM,KAAA,GAAQ,QAAQ,IAAA,CAAK,CAAC,MAAM,CAAA,CAAE,UAAA,KAAe,MAAM,UAAU,CAAA;AACnE,IAAA,IAAI,CAAC,KAAA,EAAO,MAAM,IAAI,KAAA,CAAM,CAAA,EAAG,KAAA,CAAM,IAAI,CAAA,sBAAA,EAAyB,KAAA,CAAM,UAAU,CAAA,CAAA,CAAG,CAAA;AACrF,IAAA,MAAM,OAAA,CAAQ,KAAA,EAAO,OAAA,GAAU,KAAK,CAAA;AACpC,IAAA,UAAA,CAAW,EAAE,KAAA,EAAO,OAAA,EAAS,WAAW,KAAA,EAAO,OAAA,CAAQ,OAAO,CAAA;AAAA,EAChE,SAAS,KAAA,EAAO;AACd,IAAA,iBAAA,CAAkB,SAAS,KAAK,CAAA;AAAA,EAClC;AACF","file":"index.js","sourcesContent":["import { flushSync } from 'react-dom';\nimport { createRoot } from 'react-dom/client';\nimport type { Channel } from '../protocol/channel';\nimport {\n type CssVarReport,\n type FaultPhase,\n type FromFrame,\n type Globals,\n stableStringify,\n type ToFrame,\n} from '../protocol/messages';\nimport { answerSchema, describeSchema } from '../protocol/schema';\nimport type { Decorator, LoadedStory, StoryContext } from '../story/types';\nimport { runAxe } from './a11y';\nimport { captureElement } from './capture';\nimport { createOverrides, resolveCssVar, scanCssVars } from './cssVars';\nimport { createGlobalsTarget, type GlobalsTarget } from './globalsTarget';\nimport { StoryHost } from './StoryHost';\n\n/** The frame config: what `defineFrameConfig` returns and the `frameConfig` module default-exports. */\nexport interface FrameSetup {\n /** Wraps every story, outermost; receives the globals. From the frame config (`frameConfig`). */\n decorators?: Decorator[];\n /** Applies globals to a target: theme mode, fonts. The target is a frame document's root, or one story's host in\n * the workshop document, so a rule the setup writes goes through `target.style` under `target.scope`. */\n applyGlobals?: (globals: Globals, target: GlobalsTarget) => void;\n /**\n * The elements a CSS variable override is declared on; `:root` by default. An override has to be declared on\n * whichever element declares the token itself — a theme wrapper, say — or that element's own value wins.\n */\n cssVarsScope?: string;\n /** Project-wide CSF parameters, Storybook's preview `parameters`: under each meta's and story's. */\n parameters?: Record<string, unknown>;\n /**\n * Awaited once a story is loaded and before it first renders — the place to import what only some stories\n * need, so the rest never load it.\n */\n prepare?: (story: LoadedStory) => void | Promise<void>;\n}\n\n/** Inputs to `startFrame`: the story, the channel to the shell, and the element to render into. */\nexport interface StartFrameOptions {\n story: LoadedStory;\n channel: Channel<ToFrame, FromFrame>;\n container: HTMLElement;\n setup?: FrameSetup;\n}\n\nconst VARS_SETTLE_MS = 100;\n\nfunction fault(phase: FaultPhase, error: unknown, seq?: number): FromFrame {\n return {\n type: 'fault',\n phase,\n message: error instanceof Error ? error.message : String(error),\n ...(error instanceof Error && error.stack ? { stack: error.stack } : {}),\n ...(seq === undefined ? {} : { seq }),\n };\n}\n\n/** Sends `ready`, then renders the story on `init` and keeps it in step. Returns a stop function. */\nexport function startFrame({ story, channel, container, setup = {} }: StartFrameOptions): () => void {\n const { send } = channel;\n send({ type: 'ready', schema: describeSchema(story.config), layout: story.layout, viewport: story.viewport });\n\n const wrapper = document.createElement('div');\n wrapper.className = `fg-frame fg-frame--${story.layout}`;\n container.append(wrapper);\n const root = createRoot(wrapper);\n const decorators = setup.decorators ?? [];\n\n let initialized = false;\n let rendered = false;\n let config: unknown;\n let state: unknown = null;\n let globals: Globals = {};\n let answeredKey: string | null = null;\n let resetKey = 0;\n let seq = 0;\n\n const overrides = createOverrides(document, setup.cssVarsScope);\n const globalsTarget = createGlobalsTarget(document.documentElement, ':root');\n let lastVars: CssVarReport[] | null = null;\n let reported: string | null = null;\n const publishVars = (vars: CssVarReport[]) => {\n lastVars = vars;\n const key = JSON.stringify(vars);\n if (key === reported) return;\n reported = key;\n send({ type: 'vars', vars });\n };\n const reportVars = () => publishVars(scanCssVars(document, overrides.has));\n const ownMutation = (record: MutationRecord) =>\n overrides.owns(record.target) ||\n (record.type === 'childList' &&\n [...record.addedNodes, ...record.removedNodes].length > 0 &&\n [...record.addedNodes, ...record.removedNodes].every(overrides.owns));\n let settleTimer: ReturnType<typeof setTimeout> | undefined;\n const mutations =\n typeof MutationObserver === 'undefined'\n ? null\n : new MutationObserver((records) => {\n if (records.every(ownMutation)) return;\n clearTimeout(settleTimer);\n settleTimer = setTimeout(reportVars, VARS_SETTLE_MS);\n });\n // Every attribute, not just style and class: a stylesheet can select on any of them, `[data-wzl-mode]` included.\n mutations?.observe(document.documentElement, { subtree: true, childList: true, characterData: true, attributes: true });\n\n const setConfig = (path: string, value: unknown) => send({ type: 'setConfig', path, value });\n const setState = (next: unknown) => {\n state = typeof next === 'function' ? (next as (prev: unknown) => unknown)(state) : next;\n send({ type: 'setState', state });\n render();\n };\n\n const render = () => {\n const ctx: StoryContext = { config, setConfig, state, setState, globals, title: story.title, name: story.name };\n const at = seq;\n root.render(\n <StoryHost\n story={story}\n ctx={ctx}\n decorators={decorators}\n resetKey={resetKey}\n onError={(error) => send(fault('render', error, at))}\n />,\n );\n const key = stableStringify(config);\n if (key !== answeredKey) {\n answeredKey = key;\n send({ type: 'answers', answers: { configKey: key, ...answerSchema(story.config, config) } });\n }\n };\n\n // Input from the trial commits synchronously, so a `play` that follows sees the rendered story. A throw while\n // applying it faults like a render would; otherwise the trial would wait on a frame that never answers.\n const input = (apply: () => void) => {\n seq += 1;\n try {\n apply();\n if (!initialized) return;\n resetKey += 1;\n flushSync(render);\n } catch (error) {\n send(fault('render', error, seq));\n return;\n }\n if (!rendered) {\n rendered = true;\n announceRendered();\n }\n reportVars();\n };\n\n /**\n * The shell unhides the frame on `rendered` and fades it in, so whatever\n * reflows after that message reads as a glide rather than a jump. A webfont\n * swapping in is the reflow that does it: a `layout: 'padded'` story is\n * top-anchored, so the line-height change walks the whole story upward.\n * Waiting for the fonts and then one painted frame means the story the\n * shell reveals is the settled one.\n *\n * `document.fonts` is absent in jsdom, where there is no paint to wait for\n * and no font to swap — the message stays synchronous there, which is also\n * what `FrameController.test.tsx` observes. The deferral itself is only\n * exercised in a browser.\n */\n const announceRendered = () => {\n const { fonts } = document;\n if (!fonts) {\n send({ type: 'rendered' });\n return;\n }\n const afterPaint = () => requestAnimationFrame(() => send({ type: 'rendered' }));\n void fonts.ready.then(afterPaint, afterPaint);\n };\n\n const play = async () => {\n try {\n await story.play?.({ canvasElement: wrapper, config, globals });\n send({ type: 'played', ok: true });\n } catch (error) {\n send({ type: 'played', ok: false, message: error instanceof Error ? error.message : String(error) });\n send(fault('play', error));\n }\n };\n\n const audit = async (id: string) => {\n try {\n send({ type: 'a11y', id, ok: true, report: await runAxe(wrapper) });\n } catch (error) {\n send({ type: 'a11y', id, ok: false, message: error instanceof Error ? error.message : String(error) });\n }\n };\n\n const picture = (id: string) => {\n try {\n send({ type: 'capture', id, ok: true, picture: captureElement(wrapper) });\n } catch (error) {\n send({ type: 'capture', id, ok: false, message: error instanceof Error ? error.message : String(error) });\n }\n };\n\n const off = channel.on((msg) => {\n switch (msg.type) {\n case 'init':\n input(() => {\n initialized = true;\n config = msg.config;\n globals = msg.globals;\n state = msg.state;\n if (state === null && story.initialState) {\n state = story.initialState(config);\n send({ type: 'setState', state });\n }\n setup.applyGlobals?.(globals, globalsTarget);\n });\n break;\n case 'config':\n input(() => {\n config = msg.config;\n });\n break;\n case 'state':\n input(() => {\n state = msg.state;\n });\n break;\n case 'globals':\n input(() => {\n globals = msg.globals;\n setup.applyGlobals?.(globals, globalsTarget);\n });\n break;\n case 'vars.set': {\n overrides.set(msg.name, msg.value);\n const at = lastVars?.findIndex((v) => v.name === msg.name) ?? -1;\n if (!lastVars || at < 0) break;\n const vars = lastVars.slice();\n vars[at] = { name: msg.name, value: resolveCssVar(document, msg.name), overridden: overrides.has(msg.name) };\n publishVars(vars);\n break;\n }\n case 'play':\n void play();\n break;\n case 'a11y.run':\n void audit(msg.id);\n break;\n case 'capture.run':\n picture(msg.id);\n break;\n }\n });\n\n const observer =\n typeof ResizeObserver === 'undefined'\n ? null\n : new ResizeObserver(() => {\n const { width, height } = wrapper.getBoundingClientRect();\n send({ type: 'size', width: Math.ceil(width), height: Math.ceil(height) });\n });\n observer?.observe(wrapper);\n\n return () => {\n off();\n observer?.disconnect();\n mutations?.disconnect();\n clearTimeout(settleTimer);\n overrides.dispose();\n globalsTarget.dispose();\n root.unmount();\n wrapper.remove();\n };\n}\n\n/** Reports an import failure — there is no story to start. */\nexport function reportImportFault(channel: Channel<ToFrame, FromFrame>, error: unknown): void {\n channel.send(fault('import', error));\n}\n","import { f } from '@weasel-js/labkit/config';\nimport { Component, type ReactNode } from 'react';\nimport { flushSync } from 'react-dom';\nimport { createRoot } from 'react-dom/client';\nimport type { Channel } from '../../protocol/channel';\nimport type { FromFrame, Globals, ToFrame } from '../../protocol/messages';\nimport { describeSchema } from '../../protocol/schema';\nimport type { IndexRender, LoadedStory } from '../../story/types';\nimport { runAxe } from '../a11y';\nimport { captureElement } from '../capture';\nimport type { FrameSetup } from '../FrameController';\nimport { createGlobalsTarget } from '../globalsTarget';\nimport { type IndexEnv, IndexPage } from './IndexPage';\n\nexport interface StartIndexOptions {\n title: string;\n /** The package the component ships in. */\n library?: string;\n description?: string;\n /** Whether the component is a gallery. */\n gallery?: boolean;\n /** The ids of the stories tagged `gallery`. */\n galleries?: readonly string[];\n /** In file order. */\n stories: readonly LoadedStory[];\n descriptions: Readonly<Record<string, string>>;\n /** The component's own page; null for the generated one. */\n render: IndexRender | null;\n channel: Channel<ToFrame, FromFrame>;\n container: HTMLElement;\n setup?: FrameSetup;\n}\n\nconst message = (error: unknown): string => (error instanceof Error ? error.message : String(error));\n\n/** Faults the frame when the page itself throws. A single story's throw stays in its own cell. */\nclass PageBoundary extends Component<{ onError: (error: unknown) => void; children: ReactNode }, { failed: unknown }> {\n override state = { failed: null as unknown };\n\n static getDerivedStateFromError(error: unknown) {\n return { failed: error ?? new Error('Index page failed') };\n }\n\n override componentDidCatch(error: unknown): void {\n this.props.onError(error);\n }\n\n override render(): ReactNode {\n return this.state.failed ? null : this.props.children;\n }\n}\n\n/**\n * Sends `ready` for a page with no controls, then renders the component's index on `init` and follows the lab's\n * globals. Returns a stop function.\n */\nexport function startIndex(options: StartIndexOptions): () => void {\n const { channel, container, setup = {} } = options;\n const { send } = channel;\n send({ type: 'ready', schema: describeSchema(f.schema({})), layout: 'fullscreen', viewport: null });\n\n const wrapper = document.createElement('div');\n wrapper.className = 'fg-frame fg-frame--fullscreen';\n container.append(wrapper);\n const root = createRoot(wrapper);\n const globalsTarget = createGlobalsTarget(document.documentElement, ':root');\n let globals: Globals | null = null;\n let announced = false;\n\n const render = (): void => {\n if (!globals) return;\n const env: IndexEnv = {\n title: options.title,\n ...(options.library === undefined ? {} : { library: options.library }),\n ...(options.description === undefined ? {} : { description: options.description }),\n stories: options.stories,\n descriptions: options.descriptions,\n gallery: options.gallery ?? false,\n galleries: options.galleries ?? [],\n globals,\n decorators: setup.decorators ?? [],\n open: (id) => send({ type: 'open', id }),\n // A story that throws shows its error in its own cell; the rest of the page is still worth reading.\n onError: (error) => console.error(error),\n };\n root.render(\n <PageBoundary onError={(error) => send({ type: 'fault', phase: 'render', message: message(error) })}>\n <IndexPage env={env} render={options.render} />\n </PageBoundary>,\n );\n };\n\n const announce = (): void => {\n if (announced) return;\n announced = true;\n const { fonts } = document;\n if (!fonts) {\n send({ type: 'rendered' });\n return;\n }\n const afterPaint = () => requestAnimationFrame(() => send({ type: 'rendered' }));\n void fonts.ready.then(afterPaint, afterPaint);\n };\n\n const off = channel.on((msg) => {\n switch (msg.type) {\n case 'init':\n case 'globals':\n globals = msg.globals;\n setup.applyGlobals?.(globals, globalsTarget);\n flushSync(render);\n announce();\n break;\n case 'a11y.run':\n runAxe(wrapper).then(\n (report) => send({ type: 'a11y', id: msg.id, ok: true, report }),\n (error: unknown) => send({ type: 'a11y', id: msg.id, ok: false, message: message(error) }),\n );\n break;\n case 'capture.run':\n try {\n send({ type: 'capture', id: msg.id, ok: true, picture: captureElement(wrapper) });\n } catch (error) {\n send({ type: 'capture', id: msg.id, ok: false, message: message(error) });\n }\n break;\n default:\n break;\n }\n });\n\n return () => {\n off();\n globalsTarget.dispose();\n root.unmount();\n wrapper.remove();\n };\n}\n","import { openChannel } from '../protocol/channel';\nimport { FRAME_HELLO, type FromFrame, PORT_HANDOFF, type ToFrame } from '../protocol/messages';\nimport { indexId, isIndexId } from '../story/indexPages';\nimport { libraryOf } from '../story/library';\nimport { isGallery } from '../story/tags';\nimport { indexRenderOf, loadStories } from '../story/load';\nimport type { LoadedStory } from '../story/types';\nimport { type FrameSetup, reportImportFault, startFrame } from './FrameController';\nimport { startIndex } from './index/startIndex';\n\n/** Story modules by file path, each loaded on first use. */\nexport interface FrameImporters {\n [file: string]: () => Promise<Record<string, unknown>>;\n}\n\n/** One story as a frame document needs to find it, before its module is loaded. */\nexport interface FrameIndexEntry {\n id: string;\n /** The story's title as indexed, which titles the file's stories when its meta names none. */\n title: string;\n file: string;\n exportName: string;\n /** The JSDoc above the story's export, which its index page shows. */\n description?: string;\n /** The JSDoc above the file's meta, which heads the index page. */\n componentDescription?: string;\n /** The meta's `tags`. */\n tags?: readonly string[];\n}\n\n/** Inputs to `mountFrame`. `load` replaces the default module loader, `loadStories`. */\nexport interface MountFrameOptions {\n index: readonly FrameIndexEntry[];\n importers: FrameImporters;\n setup?: FrameSetup;\n load?: (mod: Record<string, unknown>, autoTitle: string, parameters?: Record<string, unknown>) => LoadedStory[];\n}\n\nexport { indexRenderOf, loadStories } from '../story/load';\n\nfunction waitForHandoff():Promise<{ port: MessagePort; id: string | null }> {\n return new Promise((resolve) => {\n const onMessage = (event: MessageEvent) => {\n const data = event.data as { type?: unknown; id?: unknown } | null;\n const port = event.ports[0];\n if (event.origin !== location.origin || event.source !== window.parent) return;\n if (typeof data !== 'object' || data === null || data.type !== PORT_HANDOFF || !port) return;\n window.removeEventListener('message', onMessage);\n resolve({ port, id: typeof data.id === 'string' ? data.id : null });\n };\n window.addEventListener('message', onMessage);\n });\n}\n\n/**\n * The frame document's entry: asks its parent for a port and shows what the handoff names, or, from a shell that\n * names nothing, what the hash does. The hash is read at once, so its module loads during the handshake.\n */\nexport async function mountFrame(options: MountFrameOptions): Promise<void> {\n const imports = new Map<string, Promise<Record<string, unknown>>>();\n const importOf = (file: string): Promise<Record<string, unknown>> => {\n let loading = imports.get(file);\n if (!loading) {\n const importer = options.importers[file];\n if (!importer) throw new Error(`No importer for ${file}`);\n loading = importer();\n imports.set(file, loading);\n }\n return loading;\n };\n /** The entries `id` shows: one story, or every story of the component an index id names. */\n const entriesOf = (id: string): FrameIndexEntry[] =>\n isIndexId(id)\n ? options.index.filter((e) => indexId(e.title) === id)\n : options.index.filter((e) => e.id === id);\n const early = location.hash.slice(1) || null;\n // Only starts the fetch; whoever awaits the import later sees its outcome.\n for (const file of new Set(early === null ? [] : entriesOf(early).map((e) => e.file))) {\n if (options.importers[file]) importOf(file).catch(() => {});\n }\n\n const handoff = waitForHandoff();\n window.parent.postMessage({ type: FRAME_HELLO }, location.origin);\n const { port, id: handed } = await handoff;\n const channel = openChannel<ToFrame, FromFrame>(port);\n const id = handed ?? early ?? '';\n const container = document.getElementById('root') ?? document.body;\n try {\n if (isIndexId(id)) {\n const entries = entriesOf(id);\n const title = entries[0]?.title;\n if (title === undefined) throw new Error(`No component with index \"${id}\"`);\n const files = [...new Set(entries.map((e) => e.file))];\n const mods = await Promise.all(files.map(importOf));\n const loaded = files.map((file, i) => ({\n file,\n stories: (options.load ?? loadStories)(mods[i] ?? {}, title, options.setup?.parameters),\n }));\n const stories = entries.flatMap(\n (e) => loaded.find((l) => l.file === e.file)?.stories.find((s) => s.exportName === e.exportName) ?? [],\n );\n for (const story of stories) await options.setup?.prepare?.(story);\n startIndex({\n title,\n ...(entries[0]?.componentDescription === undefined ? {} : { description: entries[0].componentDescription }),\n library: libraryOf({ file: entries[0]?.file ?? '', title }),\n gallery: entries.every(isGallery),\n galleries: entries.filter(isGallery).map((e) => e.id),\n stories,\n descriptions: Object.fromEntries(entries.flatMap((e) => (e.description ? [[e.id, e.description]] : []))),\n render: mods.map(indexRenderOf).find((render) => render !== null) ?? null,\n channel,\n container,\n ...(options.setup ? { setup: options.setup } : {}),\n });\n return;\n }\n const entry = options.index.find((e) => e.id === id);\n if (!entry) throw new Error(`No story with id \"${id}\"`);\n const mod = await importOf(entry.file);\n const stories = (options.load ?? loadStories)(mod, entry.title, options.setup?.parameters);\n const story = stories.find((s) => s.exportName === entry.exportName);\n if (!story) throw new Error(`${entry.file} has no story export \"${entry.exportName}\"`);\n await options.setup?.prepare?.(story);\n startFrame({ story, channel, container, setup: options.setup });\n } catch (error) {\n reportImportFault(channel, error);\n }\n}\n"]}
1
+ {"version":3,"sources":["../../src/frame/FrameController.tsx","../../src/frame/index/startIndex.tsx","../../src/frame/mountFrame.tsx"],"names":["createRoot","jsx","flushSync","id","stories","story"],"mappings":";;;;;;;;;;;;;AAgDA,IAAM,cAAA,GAAiB,GAAA;AAEvB,SAAS,KAAA,CAAM,KAAA,EAAmB,KAAA,EAAgB,GAAA,EAAyB;AACzE,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,OAAA;AAAA,IACN,KAAA;AAAA,IACA,SAAS,KAAA,YAAiB,KAAA,GAAQ,KAAA,CAAM,OAAA,GAAU,OAAO,KAAK,CAAA;AAAA,IAC9D,GAAI,KAAA,YAAiB,KAAA,IAAS,KAAA,CAAM,KAAA,GAAQ,EAAE,KAAA,EAAO,KAAA,CAAM,KAAA,EAAM,GAAI,EAAC;AAAA,IACtE,GAAI,GAAA,KAAQ,MAAA,GAAY,EAAC,GAAI,EAAE,GAAA;AAAI,GACrC;AACF;AAGO,SAAS,UAAA,CAAW,EAAE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AAA,MAAM,KAAA,GAAQ,QAAQ,KAAA,CAAM,IAAA,CAAK,CAAC,CAAA,KAAM,CAAA,CAAE,OAAO,EAAE,CAAA;AACnD,IAAA,IAAI,CAAC,KAAA,EAAO,MAAM,IAAI,KAAA,CAAM,CAAA,kBAAA,EAAqB,EAAE,CAAA,CAAA,CAAG,CAAA;AACtD,IAAA,MAAM,GAAA,GAAM,MAAM,QAAA,CAAS,KAAA,CAAM,IAAI,CAAA;AACrC,IAAA,MAAM,OAAA,GAAA,CAAW,QAAQ,IAAA,IAAQ,WAAA,EAAa,KAAK,KAAA,CAAM,KAAA,EAAO,OAAA,CAAQ,KAAA,EAAO,UAAU,CAAA;AACzF,IAAA,MAAM,KAAA,GAAQ,QAAQ,IAAA,CAAK,CAAC,MAAM,CAAA,CAAE,UAAA,KAAe,MAAM,UAAU,CAAA;AACnE,IAAA,IAAI,CAAC,KAAA,EAAO,MAAM,IAAI,KAAA,CAAM,CAAA,EAAG,KAAA,CAAM,IAAI,CAAA,sBAAA,EAAyB,KAAA,CAAM,UAAU,CAAA,CAAA,CAAG,CAAA;AACrF,IAAA,MAAM,OAAA,CAAQ,KAAA,EAAO,OAAA,GAAU,KAAK,CAAA;AACpC,IAAA,UAAA,CAAW,EAAE,KAAA,EAAO,OAAA,EAAS,WAAW,KAAA,EAAO,OAAA,CAAQ,OAAO,CAAA;AAAA,EAChE,SAAS,KAAA,EAAO;AACd,IAAA,iBAAA,CAAkB,SAAS,KAAK,CAAA;AAAA,EAClC;AACF","file":"index.js","sourcesContent":["import { flushSync } from 'react-dom';\nimport { createRoot } from 'react-dom/client';\nimport type { Channel } from '../protocol/channel';\nimport {\n type CssVarReport,\n type FaultPhase,\n type FromFrame,\n type Globals,\n stableStringify,\n type ToFrame,\n} from '../protocol/messages';\nimport { answerSchema, describeSchema } from '../protocol/schema';\nimport type { Decorator, LoadedStory, StoryContext } from '../story/types';\nimport { runAxe } from './a11y';\nimport { captureElement } from './capture';\nimport { createOverrides, resolveCssVar, scanCssVars } from './cssVars';\nimport { createGlobalsTarget, type GlobalsTarget } from './globalsTarget';\nimport { StoryHost } from './StoryHost';\n\n/** The frame config: what `defineFrameConfig` returns and the `frameConfig` module default-exports. */\nexport interface FrameSetup {\n /** Wraps every story, outermost; receives the globals. From the frame config (`frameConfig`). */\n decorators?: Decorator[];\n /** Applies globals to a target: theme mode, fonts. The target is a frame document's root, or one story's host in\n * the workshop document, so a rule the setup writes goes through `target.style` under `target.scope`. */\n applyGlobals?: (globals: Globals, target: GlobalsTarget) => void;\n /**\n * The elements a CSS variable override is declared on; `:root` by default. An override has to be declared on\n * whichever element declares the token itself — a theme wrapper, say — or that element's own value wins.\n */\n cssVarsScope?: string;\n /** Project-wide CSF parameters, Storybook's preview `parameters`: under each meta's and story's. */\n parameters?: Record<string, unknown>;\n /**\n * Awaited once a story is loaded and before it first renders — the place to import what only some stories\n * need, so the rest never load it.\n */\n prepare?: (story: LoadedStory) => void | Promise<void>;\n}\n\n/** Inputs to `startFrame`: the story, the channel to the shell, and the element to render into. */\nexport interface StartFrameOptions {\n story: LoadedStory;\n channel: Channel<ToFrame, FromFrame>;\n container: HTMLElement;\n setup?: FrameSetup;\n}\n\nconst VARS_SETTLE_MS = 100;\n\nfunction fault(phase: FaultPhase, error: unknown, seq?: number): FromFrame {\n return {\n type: 'fault',\n phase,\n message: error instanceof Error ? error.message : String(error),\n ...(error instanceof Error && error.stack ? { stack: error.stack } : {}),\n ...(seq === undefined ? {} : { seq }),\n };\n}\n\n/** Sends `ready`, then renders the story on `init` and keeps it in step. Returns a stop function. */\nexport function startFrame({ story, channel, container, setup = {} }: StartFrameOptions): () => void {\n const { send } = channel;\n send({ type: 'ready', schema: describeSchema(story.config), layout: story.layout, viewport: story.viewport });\n\n const wrapper = document.createElement('div');\n wrapper.className = `fg-frame fg-frame--${story.layout}`;\n container.append(wrapper);\n const root = createRoot(wrapper);\n const decorators = setup.decorators ?? [];\n\n let initialized = false;\n let rendered = false;\n let config: unknown;\n let state: unknown = null;\n let globals: Globals = {};\n let answeredKey: string | null = null;\n let resetKey = 0;\n let seq = 0;\n\n const overrides = createOverrides(document, setup.cssVarsScope);\n const globalsTarget = createGlobalsTarget(document.documentElement, ':root');\n let lastVars: CssVarReport[] | null = null;\n let reported: string | null = null;\n const publishVars = (vars: CssVarReport[]) => {\n lastVars = vars;\n const key = JSON.stringify(vars);\n if (key === reported) return;\n reported = key;\n send({ type: 'vars', vars });\n };\n const reportVars = () => publishVars(scanCssVars(document, overrides.has));\n const ownMutation = (record: MutationRecord) =>\n overrides.owns(record.target) ||\n (record.type === 'childList' &&\n [...record.addedNodes, ...record.removedNodes].length > 0 &&\n [...record.addedNodes, ...record.removedNodes].every(overrides.owns));\n let settleTimer: ReturnType<typeof setTimeout> | undefined;\n const mutations =\n typeof MutationObserver === 'undefined'\n ? null\n : new MutationObserver((records) => {\n if (records.every(ownMutation)) return;\n clearTimeout(settleTimer);\n settleTimer = setTimeout(reportVars, VARS_SETTLE_MS);\n });\n // Every attribute, not just style and class: a stylesheet can select on any of them, `[data-wzl-mode]` included.\n mutations?.observe(document.documentElement, { subtree: true, childList: true, characterData: true, attributes: true });\n\n const setConfig = (path: string, value: unknown) => send({ type: 'setConfig', path, value });\n const setState = (next: unknown) => {\n state = typeof next === 'function' ? (next as (prev: unknown) => unknown)(state) : next;\n send({ type: 'setState', state });\n render();\n };\n\n const render = () => {\n const ctx: StoryContext = { config, setConfig, state, setState, globals, title: story.title, name: story.name };\n const at = seq;\n root.render(\n <StoryHost\n story={story}\n ctx={ctx}\n decorators={decorators}\n resetKey={resetKey}\n onError={(error) => send(fault('render', error, at))}\n />,\n );\n const key = stableStringify(config);\n if (key !== answeredKey) {\n answeredKey = key;\n send({ type: 'answers', answers: { configKey: key, ...answerSchema(story.config, config) } });\n }\n };\n\n // Input from the trial commits synchronously, so a `play` that follows sees the rendered story. A throw while\n // applying it faults like a render would; otherwise the trial would wait on a frame that never answers.\n const input = (apply: () => void) => {\n seq += 1;\n try {\n apply();\n if (!initialized) return;\n resetKey += 1;\n flushSync(render);\n } catch (error) {\n send(fault('render', error, seq));\n return;\n }\n if (!rendered) {\n rendered = true;\n announceRendered();\n }\n reportVars();\n };\n\n /**\n * The shell unhides the frame on `rendered` and fades it in, so whatever\n * reflows after that message reads as a glide rather than a jump. A webfont\n * swapping in is the reflow that does it: a `layout: 'padded'` story is\n * top-anchored, so the line-height change walks the whole story upward.\n * Waiting for the fonts and then one painted frame means the story the\n * shell reveals is the settled one.\n *\n * `document.fonts` is absent in jsdom, where there is no paint to wait for\n * and no font to swap — the message stays synchronous there, which is also\n * what `FrameController.test.tsx` observes. The deferral itself is only\n * exercised in a browser.\n */\n const announceRendered = () => {\n const { fonts } = document;\n if (!fonts) {\n send({ type: 'rendered' });\n return;\n }\n const afterPaint = () => requestAnimationFrame(() => send({ type: 'rendered' }));\n void fonts.ready.then(afterPaint, afterPaint);\n };\n\n const play = async () => {\n try {\n await story.play?.({ canvasElement: wrapper, config, globals });\n send({ type: 'played', ok: true });\n } catch (error) {\n send({ type: 'played', ok: false, message: error instanceof Error ? error.message : String(error) });\n send(fault('play', error));\n }\n };\n\n const audit = async (id: string) => {\n try {\n send({ type: 'a11y', id, ok: true, report: await runAxe(wrapper) });\n } catch (error) {\n send({ type: 'a11y', id, ok: false, message: error instanceof Error ? error.message : String(error) });\n }\n };\n\n const picture = (id: string) => {\n try {\n send({ type: 'capture', id, ok: true, picture: captureElement(wrapper) });\n } catch (error) {\n send({ type: 'capture', id, ok: false, message: error instanceof Error ? error.message : String(error) });\n }\n };\n\n const off = channel.on((msg) => {\n switch (msg.type) {\n case 'init':\n input(() => {\n initialized = true;\n config = msg.config;\n globals = msg.globals;\n state = msg.state;\n if (state === null && story.initialState) {\n state = story.initialState(config);\n send({ type: 'setState', state });\n }\n setup.applyGlobals?.(globals, globalsTarget);\n });\n break;\n case 'config':\n input(() => {\n config = msg.config;\n });\n break;\n case 'state':\n input(() => {\n state = msg.state;\n });\n break;\n case 'globals':\n input(() => {\n globals = msg.globals;\n setup.applyGlobals?.(globals, globalsTarget);\n });\n break;\n case 'vars.set': {\n overrides.set(msg.name, msg.value);\n const at = lastVars?.findIndex((v) => v.name === msg.name) ?? -1;\n if (!lastVars || at < 0) break;\n const vars = lastVars.slice();\n vars[at] = { name: msg.name, value: resolveCssVar(document, msg.name), overridden: overrides.has(msg.name) };\n publishVars(vars);\n break;\n }\n case 'play':\n void play();\n break;\n case 'a11y.run':\n void audit(msg.id);\n break;\n case 'capture.run':\n picture(msg.id);\n break;\n }\n });\n\n const observer =\n typeof ResizeObserver === 'undefined'\n ? null\n : new ResizeObserver(() => {\n const { width, height } = wrapper.getBoundingClientRect();\n send({ type: 'size', width: Math.ceil(width), height: Math.ceil(height) });\n });\n observer?.observe(wrapper);\n\n return () => {\n off();\n observer?.disconnect();\n mutations?.disconnect();\n clearTimeout(settleTimer);\n overrides.dispose();\n globalsTarget.dispose();\n root.unmount();\n wrapper.remove();\n };\n}\n\n/** Reports an import failure — there is no story to start. */\nexport function reportImportFault(channel: Channel<ToFrame, FromFrame>, error: unknown): void {\n channel.send(fault('import', error));\n}\n","import { f } from '@weasel-js/labkit/config';\nimport { Component, type ReactNode } from 'react';\nimport { flushSync } from 'react-dom';\nimport { createRoot } from 'react-dom/client';\nimport type { Channel } from '../../protocol/channel';\nimport type { FromFrame, Globals, ToFrame } from '../../protocol/messages';\nimport { describeSchema } from '../../protocol/schema';\nimport type { IndexRender, LoadedStory } from '../../story/types';\nimport { runAxe } from '../a11y';\nimport { captureElement } from '../capture';\nimport type { FrameSetup } from '../FrameController';\nimport { createGlobalsTarget } from '../globalsTarget';\nimport { type IndexEnv, IndexPage } from './IndexPage';\n\nexport interface StartIndexOptions {\n title: string;\n /** The package the component ships in. */\n library?: string;\n description?: string;\n /** Whether the component is a gallery. */\n gallery?: boolean;\n /** The ids of the stories tagged `gallery`. */\n galleries?: readonly string[];\n /** In file order. */\n stories: readonly LoadedStory[];\n descriptions: Readonly<Record<string, string>>;\n /** The component's own page; null for the generated one. */\n render: IndexRender | null;\n channel: Channel<ToFrame, FromFrame>;\n container: HTMLElement;\n setup?: FrameSetup;\n}\n\nconst message = (error: unknown): string => (error instanceof Error ? error.message : String(error));\n\n/** Faults the frame when the page itself throws. A single story's throw stays in its own cell. */\nclass PageBoundary extends Component<{ onError: (error: unknown) => void; children: ReactNode }, { failed: unknown }> {\n override state = { failed: null as unknown };\n\n static getDerivedStateFromError(error: unknown) {\n return { failed: error ?? new Error('Index page failed') };\n }\n\n override componentDidCatch(error: unknown): void {\n this.props.onError(error);\n }\n\n override render(): ReactNode {\n return this.state.failed ? null : this.props.children;\n }\n}\n\n/**\n * Sends `ready` for a page with no controls, then renders the component's index on `init` and follows the lab's\n * globals. Returns a stop function.\n */\nexport function startIndex(options: StartIndexOptions): () => void {\n const { channel, container, setup = {} } = options;\n const { send } = channel;\n send({ type: 'ready', schema: describeSchema(f.schema({})), layout: 'fullscreen', viewport: null });\n\n const wrapper = document.createElement('div');\n wrapper.className = 'fg-frame fg-frame--fullscreen';\n container.append(wrapper);\n const root = createRoot(wrapper);\n const globalsTarget = createGlobalsTarget(document.documentElement, ':root');\n let globals: Globals | null = null;\n let announced = false;\n\n const render = (): void => {\n if (!globals) return;\n const env: IndexEnv = {\n title: options.title,\n ...(options.library === undefined ? {} : { library: options.library }),\n ...(options.description === undefined ? {} : { description: options.description }),\n stories: options.stories,\n descriptions: options.descriptions,\n gallery: options.gallery ?? false,\n galleries: options.galleries ?? [],\n globals,\n decorators: setup.decorators ?? [],\n open: (id) => send({ type: 'open', id }),\n // A story that throws shows its error in its own cell; the rest of the page is still worth reading.\n onError: (error) => console.error(error),\n };\n root.render(\n <PageBoundary onError={(error) => send({ type: 'fault', phase: 'render', message: message(error) })}>\n <IndexPage env={env} render={options.render} />\n </PageBoundary>,\n );\n };\n\n const announce = (): void => {\n if (announced) return;\n announced = true;\n const { fonts } = document;\n if (!fonts) {\n send({ type: 'rendered' });\n return;\n }\n const afterPaint = () => requestAnimationFrame(() => send({ type: 'rendered' }));\n void fonts.ready.then(afterPaint, afterPaint);\n };\n\n const off = channel.on((msg) => {\n switch (msg.type) {\n case 'init':\n case 'globals':\n globals = msg.globals;\n setup.applyGlobals?.(globals, globalsTarget);\n flushSync(render);\n announce();\n break;\n case 'a11y.run':\n runAxe(wrapper).then(\n (report) => send({ type: 'a11y', id: msg.id, ok: true, report }),\n (error: unknown) => send({ type: 'a11y', id: msg.id, ok: false, message: message(error) }),\n );\n break;\n case 'capture.run':\n try {\n send({ type: 'capture', id: msg.id, ok: true, picture: captureElement(wrapper) });\n } catch (error) {\n send({ type: 'capture', id: msg.id, ok: false, message: message(error) });\n }\n break;\n default:\n break;\n }\n });\n\n return () => {\n off();\n globalsTarget.dispose();\n root.unmount();\n wrapper.remove();\n };\n}\n","import { openChannel } from '../protocol/channel';\nimport { FRAME_HELLO, type FromFrame, PORT_HANDOFF, type ToFrame } from '../protocol/messages';\nimport { indexId, isIndexId } from '../story/indexPages';\nimport { libraryOf } from '../story/library';\nimport { isGallery } from '../story/tags';\nimport { indexRenderOf, loadStories } from '../story/load';\nimport type { LoadedStory } from '../story/types';\nimport { type FrameSetup, reportImportFault, startFrame } from './FrameController';\nimport { startIndex } from './index/startIndex';\n\n/** Story modules by file path, each loaded on first use. */\nexport interface FrameImporters {\n [file: string]: () => Promise<Record<string, unknown>>;\n}\n\n/** One story as a frame document needs to find it, before its module is loaded. */\nexport interface FrameIndexEntry {\n id: string;\n /** The story's title as indexed, which titles the file's stories when its meta names none. */\n title: string;\n file: string;\n exportName: string;\n /** The JSDoc above the story's export, which its index page shows. */\n description?: string;\n /** The JSDoc above the file's meta, which heads the index page. */\n componentDescription?: string;\n /** The meta's `tags`. */\n tags?: readonly string[];\n}\n\n/** Inputs to `mountFrame`. `load` replaces the default module loader, `loadStories`. */\nexport interface MountFrameOptions {\n index: readonly FrameIndexEntry[];\n importers: FrameImporters;\n setup?: FrameSetup;\n load?: (mod: Record<string, unknown>, title: string, parameters?: Record<string, unknown>) => LoadedStory[];\n}\n\nexport { indexRenderOf, loadStories } from '../story/load';\n\nfunction waitForHandoff():Promise<{ port: MessagePort; id: string | null }> {\n return new Promise((resolve) => {\n const onMessage = (event: MessageEvent) => {\n const data = event.data as { type?: unknown; id?: unknown } | null;\n const port = event.ports[0];\n if (event.origin !== location.origin || event.source !== window.parent) return;\n if (typeof data !== 'object' || data === null || data.type !== PORT_HANDOFF || !port) return;\n window.removeEventListener('message', onMessage);\n resolve({ port, id: typeof data.id === 'string' ? data.id : null });\n };\n window.addEventListener('message', onMessage);\n });\n}\n\n/**\n * The frame document's entry: asks its parent for a port and shows what the handoff names, or, from a shell that\n * names nothing, what the hash does. The hash is read at once, so its module loads during the handshake.\n */\nexport async function mountFrame(options: MountFrameOptions): Promise<void> {\n const imports = new Map<string, Promise<Record<string, unknown>>>();\n const importOf = (file: string): Promise<Record<string, unknown>> => {\n let loading = imports.get(file);\n if (!loading) {\n const importer = options.importers[file];\n if (!importer) throw new Error(`No importer for ${file}`);\n loading = importer();\n imports.set(file, loading);\n }\n return loading;\n };\n /** The entries `id` shows: one story, or every story of the component an index id names. */\n const entriesOf = (id: string): FrameIndexEntry[] =>\n isIndexId(id)\n ? options.index.filter((e) => indexId(e.title) === id)\n : options.index.filter((e) => e.id === id);\n const early = location.hash.slice(1) || null;\n // Only starts the fetch; whoever awaits the import later sees its outcome.\n for (const file of new Set(early === null ? [] : entriesOf(early).map((e) => e.file))) {\n if (options.importers[file]) importOf(file).catch(() => {});\n }\n\n const handoff = waitForHandoff();\n window.parent.postMessage({ type: FRAME_HELLO }, location.origin);\n const { port, id: handed } = await handoff;\n const channel = openChannel<ToFrame, FromFrame>(port);\n const id = handed ?? early ?? '';\n const container = document.getElementById('root') ?? document.body;\n try {\n if (isIndexId(id)) {\n const entries = entriesOf(id);\n const title = entries[0]?.title;\n if (title === undefined) throw new Error(`No component with index \"${id}\"`);\n const files = [...new Set(entries.map((e) => e.file))];\n const mods = await Promise.all(files.map(importOf));\n const loaded = files.map((file, i) => ({\n file,\n stories: (options.load ?? loadStories)(mods[i] ?? {}, title, options.setup?.parameters),\n }));\n const stories = entries.flatMap(\n (e) => loaded.find((l) => l.file === e.file)?.stories.find((s) => s.exportName === e.exportName) ?? [],\n );\n for (const story of stories) await options.setup?.prepare?.(story);\n startIndex({\n title,\n ...(entries[0]?.componentDescription === undefined ? {} : { description: entries[0].componentDescription }),\n library: libraryOf({ file: entries[0]?.file ?? '', title }),\n gallery: entries.every(isGallery),\n galleries: entries.filter(isGallery).map((e) => e.id),\n stories,\n descriptions: Object.fromEntries(entries.flatMap((e) => (e.description ? [[e.id, e.description]] : []))),\n render: mods.map(indexRenderOf).find((render) => render !== null) ?? null,\n channel,\n container,\n ...(options.setup ? { setup: options.setup } : {}),\n });\n return;\n }\n const entry = options.index.find((e) => e.id === id);\n if (!entry) throw new Error(`No story with id \"${id}\"`);\n const mod = await importOf(entry.file);\n const stories = (options.load ?? loadStories)(mod, entry.title, options.setup?.parameters);\n const story = stories.find((s) => s.exportName === entry.exportName);\n if (!story) throw new Error(`${entry.file} has no story export \"${entry.exportName}\"`);\n await options.setup?.prepare?.(story);\n startFrame({ story, channel, container, setup: options.setup });\n } catch (error) {\n reportImportFault(channel, error);\n }\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { ConfigSchema } from '@weasel-js/labkit/config';
2
2
  export { f } from '@weasel-js/labkit/config';
3
- export { F as FOLLOW_APP, G as GlobalDeclaration, a as GlobalDeclarations, L as LabChrome, S as ShellConfig, d as defineFrameConfig, b as defineShellConfig } from './config-DoLWwEb2.js';
3
+ export { F as FOLLOW_APP, G as GlobalDeclaration, a as GlobalDeclarations, L as LabChrome, S as ShellConfig, d as defineFrameConfig, b as defineShellConfig } from './config-jK7q7JuF.js';
4
4
  import { ComponentType, ReactNode } from 'react';
5
- import { G as Globals, M as MetaSpec, S as StorySpec, C as ClockState, a as SpanOverride } from './FrameController-BH8xJHZ8.js';
6
- export { A as A11yFinding, b as A11yNode, c as A11yReport, d as ComponentDeps, D as Decorator, e as DepGraph, F as FrameSetup, f as GlobalsTarget, I as IndexContext, g as IndexRender, h as IndexStoryProps, L as LoadedStory, P as PlayContext, i as StoryContext, T as TimelineSpec } from './FrameController-BH8xJHZ8.js';
5
+ import { G as Globals, M as MetaSpec, S as StorySpec, C as ClockState, a as SpanOverride } from './FrameController-CpcY0DNB.js';
6
+ export { A as A11yFinding, b as A11yNode, c as A11yReport, d as ComponentDeps, D as Decorator, e as DepGraph, F as FrameSetup, f as GlobalsTarget, I as IndexContext, g as IndexRender, h as IndexStoryProps, L as LoadedStory, P as PlayContext, i as StoryContext, T as TimelineSpec } from './FrameController-CpcY0DNB.js';
7
7
  import '@weasel-js/labkit';
8
8
  import '@weasel-js/theme';
9
9
 
@@ -537,6 +537,7 @@
537
537
  .fg-index-cell {
538
538
  margin: var(--wzl-space-8) 0 0;
539
539
  width: fit-content;
540
+ min-width: min(100%, 20rem);
540
541
  max-width: 100%;
541
542
  }
542
543
  .fg-index-cell__stage {
@@ -550,6 +551,9 @@
550
551
  background: var(--wzl-surface);
551
552
  overflow: auto;
552
553
  }
554
+ .fg-index-cell--padded {
555
+ width: auto;
556
+ }
553
557
  .fg-index-cell--padded > .fg-index-cell__stage {
554
558
  display: block;
555
559
  min-height: 0;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/shell/shell.css","../../src/timeline/timeline.css","../../src/frame/index/index.css"],"sourcesContent":[".fg-empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--wzl-space-xs);\n min-height: 100vh;\n padding-inline: var(--wzl-space-md);\n background: var(--wzl-surface-sunken);\n color: var(--wzl-fg);\n}\n\n.fg-empty__title {\n margin: 0;\n font-weight: var(--wzl-font-weight-bold);\n}\n\n.fg-empty__globs {\n margin: 0;\n padding: 0;\n list-style: none;\n font-family: var(--wzl-font-mono);\n font-size: var(--wzl-font-size-sm);\n}\n\n/* One story's box in the workshop document; the theme attributes land on it from applyGlobals. `contain: paint`,\n exactly that value, makes it the containing block for fixed-position descendants, so a Dialog stays inside its\n trial, and it is the one containment React Aria's positioning recognizes: `layout paint` also contains, but the\n popover math then still assumes the viewport and lands a list a whole host offset too high. */\n.fg-story {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n overflow: auto;\n contain: paint;\n background: var(--wzl-surface);\n color: var(--wzl-fg);\n transition: opacity var(--wzl-motion-fast) var(--wzl-ease-out-cubic);\n}\n\n.fg-story[data-pending] {\n visibility: hidden;\n opacity: 0;\n}\n\n.fg-story[data-fg-layout='centered'] {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.fg-story[data-fg-layout='padded'] {\n padding: 16px;\n}\n\n.fg-story[data-fg-layout='fullscreen'] {\n padding: 0;\n}\n\n.fg-story--loading {\n visibility: visible;\n opacity: 1;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fg-story {\n transition: none;\n }\n}\n\n.fg-frame-host {\n position: relative;\n width: 100%;\n height: 100%;\n}\n\n.fg-frame-slot {\n display: contents;\n}\n\n/* Warm frames lay out at a trial's usual size, so moving one into place is not its first layout. */\n.fg-frame-pool {\n position: fixed;\n top: 0;\n left: -10000px;\n width: 1024px;\n height: 768px;\n visibility: hidden;\n pointer-events: none;\n}\n\n.fg-frame-pool > iframe {\n width: 100%;\n height: 100%;\n border: 0;\n}\n\n.fg-frame-view {\n display: block;\n width: 100%;\n height: 100%;\n border: 0;\n transition: opacity var(--wzl-motion-fast) var(--wzl-ease-out-cubic);\n}\n\n.fg-frame-view[data-pending] {\n visibility: hidden;\n opacity: 0;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fg-frame-view {\n transition: none;\n }\n}\n\n.fg-fault {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-xs);\n padding: var(--wzl-space-md);\n overflow: auto;\n background: var(--wzl-surface-sunken);\n color: var(--wzl-fg);\n font-family: var(--wzl-font-mono);\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-fault__phase {\n color: var(--wzl-danger);\n font-weight: var(--wzl-font-weight-bold);\n text-transform: uppercase;\n}\n\n.fg-fault__message {\n margin: 0;\n white-space: pre-wrap;\n}\n\n.fg-tree {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-xs);\n padding: 0 var(--wzl-space-sm) var(--wzl-space-sm);\n border-bottom: var(--wzl-border-w) solid var(--wzl-line-subtle);\n color: var(--wzl-fg);\n}\n\n.fg-tree__heading {\n margin: 0;\n padding-block: var(--wzl-space-xs);\n color: var(--wzl-fg-muted);\n font-family: var(--wzl-font-display);\n font-size: var(--wzl-font-size-sm);\n font-weight: var(--wzl-font-weight-bold);\n letter-spacing: 0.08em;\n text-transform: uppercase;\n}\n\n.fg-route-miss {\n margin: 0;\n color: var(--wzl-danger);\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-tree__filter {\n box-sizing: border-box;\n width: 100%;\n font-size: var(--wzl-font-size);\n}\n\n.fg-tree__items,\n.fg-tree__group {\n display: flex;\n flex-direction: column;\n}\n\n.fg-tree__items {\n font-size: var(--wzl-font-size);\n}\n\n.fg-tree__group {\n padding-inline-start: var(--wzl-space-sm);\n}\n\n.fg-tree__node {\n display: flex;\n flex-direction: column;\n min-width: 0;\n outline: none;\n}\n\n.fg-tree__item {\n display: flex;\n align-items: center;\n gap: var(--wzl-space-xs);\n padding: calc(var(--wzl-space-xs) / 2) var(--wzl-space-xs);\n border-radius: var(--wzl-radius-sm);\n overflow: hidden;\n color: inherit;\n text-decoration: none;\n white-space: nowrap;\n cursor: pointer;\n}\n\n/* text-overflow does not reach a flex container's anonymous text box, so the label clips itself. */\n.fg-tree__label {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.fg-tree__item:hover {\n background: var(--wzl-surface-hover);\n}\n\n/* Sits after the label, which is the element that shrinks, so the tag keeps\n its width and the rows' tags line up down the column. */\n.fg-tree__item > .fg-tree__tag {\n flex: none;\n margin-inline-start: auto;\n}\n\n.fg-tree__tag {\n --badge-font-size: var(--wzl-font-size-2xs);\n}\n\n.fg-tree__libraries {\n display: flex;\n flex-wrap: wrap;\n gap: var(--wzl-space-xs);\n margin: 0;\n padding: 0;\n border: 0;\n}\n\n.fg-tree__libraries-legend {\n padding: 0;\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-sm);\n}\n\n/* A folder item holds its group, so its ring goes on its own row rather than around the subtree. */\n.fg-tree__story:focus-visible,\n.fg-tree__node:focus-visible > .fg-tree__folder {\n outline: var(--wzl-line-width) solid var(--wzl-accent);\n outline-offset: calc(-1 * var(--wzl-line-width));\n}\n\n.fg-tree__item[aria-current='true'],\n.fg-tree__node[aria-current='true'] > .fg-tree__folder {\n color: var(--wzl-secondary-fg);\n}\n\n/* Padded out to a hit target and pulled back by the same amount, except on the label's side, where the padding\n widens the gap to the label. */\n.fg-tree__fold {\n flex: none;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: calc(-1 * var(--wzl-space-xs));\n margin-inline-end: 0;\n padding: var(--wzl-space-xs);\n}\n\n.fg-tree__folder {\n font-weight: calc(var(--wzl-font-weight-normal) + 100);\n}\n\n.fg-tree__story {\n /* The CSS floor, which the browser rounds up to the lightest weight the face has. */\n font-weight: 100;\n /* Clears the folder rows' 13px fold mark, so a story's label lines up with its folder's. */\n padding-inline-start: calc(var(--wzl-space-xs) * 3 + 13px);\n}\n\n.lk-trial.fg-flash {\n outline: var(--wzl-line-width) solid var(--wzl-accent);\n outline-offset: calc(-1 * var(--wzl-line-width));\n animation: fg-flash 600ms ease-out forwards;\n}\n\n@keyframes fg-flash {\n from {\n outline-color: var(--wzl-accent);\n }\n to {\n outline-color: transparent;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .lk-trial.fg-flash {\n animation: none;\n }\n}\n\n.fg-css-vars {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-xs);\n}\n\n.fg-css-vars-focus {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-xs);\n min-width: 0;\n}\n\n.fg-css-vars__trial {\n margin: 0;\n overflow: hidden;\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-sm);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Held at the top while the list scrolls the aside under it. */\n.fg-css-vars__controls {\n position: sticky;\n top: 0;\n z-index: 1;\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-xs);\n padding-block-end: var(--wzl-space-xs);\n background: var(--wzl-surface);\n}\n\n.fg-css-vars__save {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--wzl-space-xs);\n}\n\n.fg-css-vars__notice {\n margin: 0;\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-css-vars__notice--saved {\n color: var(--wzl-fg-muted);\n}\n\n.fg-css-vars__notice--error {\n color: var(--wzl-danger);\n}\n\n.fg-css-vars__empty {\n margin: 0;\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-globals,\n.fg-globals__item {\n display: flex;\n align-items: center;\n gap: var(--wzl-space-xs);\n}\n\n.fg-globals__item {\n gap: 0;\n}\n\n.fg-globals__popover {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-sm);\n min-width: 14rem;\n}\n\n\n.fg-a11y,\n.fg-a11y-focus {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-xs);\n min-width: 0;\n}\n\n.fg-a11y__trial {\n margin: 0;\n overflow: hidden;\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-sm);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.fg-a11y__controls {\n display: flex;\n gap: var(--wzl-space-xs);\n}\n\n.fg-a11y__note,\n.fg-a11y__tally {\n margin: 0;\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-a11y__group {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-xs);\n}\n\n.fg-a11y__group-title {\n margin: 0;\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-a11y__findings,\n.fg-a11y__nodes {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-xs);\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.fg-a11y__finding {\n border-inline-start: 2px solid var(--wzl-border);\n padding-inline-start: var(--wzl-space-xs);\n}\n\n.fg-a11y__help {\n display: flex;\n align-items: baseline;\n gap: var(--wzl-space-xs);\n margin: 0;\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-a11y__impact {\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-xs);\n text-transform: uppercase;\n}\n\n.fg-a11y__impact[data-impact='serious'],\n.fg-a11y__impact[data-impact='critical'] {\n color: var(--wzl-danger);\n}\n\n.fg-a11y__nodes {\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-xs);\n word-break: break-all;\n}\n\n/* Get Info */\n\n.fg-info-dialog {\n /* Wide enough for the longest row a dossier carries — an absolute story file\n path — to sit on one line. */\n inline-size: min(52rem, 90vw);\n}\n\n.fg-info {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-md);\n}\n\n.fg-info__section {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-xs);\n}\n\n.fg-info__heading {\n margin: 0;\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-xs);\n font-weight: var(--wzl-font-weight-medium);\n text-transform: uppercase;\n letter-spacing: 0.04em;\n}\n\n.fg-info__doc {\n margin: 0;\n white-space: pre-line;\n}\n\n.fg-info__doc--component {\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-info__rows {\n display: grid;\n grid-template-columns: max-content 1fr;\n gap: var(--wzl-space-xs) var(--wzl-space-sm);\n margin: 0;\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-info__row {\n display: contents;\n}\n\n.fg-info__key {\n color: var(--wzl-fg-muted);\n text-align: end;\n}\n\n.fg-info__value {\n margin: 0;\n min-inline-size: 0;\n overflow-wrap: anywhere;\n}\n\n.fg-info__path {\n font-size: var(--wzl-font-size-xs);\n}\n\n.fg-info__args {\n inline-size: 100%;\n border-collapse: collapse;\n font-size: var(--wzl-font-size-sm);\n text-align: start;\n}\n\n.fg-info__args th,\n.fg-info__args td {\n padding: var(--wzl-space-xs) var(--wzl-space-xs);\n border-block-end: 1px solid var(--wzl-border);\n vertical-align: baseline;\n text-align: start;\n font-weight: var(--wzl-font-weight-normal);\n}\n\n.fg-info__args thead th {\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-xs);\n text-transform: uppercase;\n}\n\n.fg-info__arg-name {\n display: block;\n}\n\n.fg-info__arg-doc {\n display: block;\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-xs);\n}\n\n.fg-info__arg-kind {\n color: var(--wzl-fg-muted);\n}\n\n.fg-info__value-cell {\n overflow-wrap: anywhere;\n}\n\n.fg-info__empty {\n margin: 0;\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-sm);\n}\n",".fg-transport {\n display: flex;\n align-items: center;\n gap: var(--wzl-space-6);\n min-inline-size: 0;\n}\n\n.fg-transport__scrub {\n inline-size: 16rem;\n min-inline-size: 6rem;\n flex: 1 1 16rem;\n}\n",".fg-index {\n box-sizing: border-box;\n max-width: 1200px;\n margin: 0 auto;\n padding: var(--wzl-space-lg);\n font-family: var(--wzl-font-ui);\n font-size: var(--wzl-font-size);\n color: var(--wzl-fg);\n}\n\n.fg-index__head {\n margin-bottom: calc(var(--wzl-space-lg) * 2);\n}\n\n.fg-index__path {\n margin: 0 0 var(--wzl-space-2);\n font-size: var(--wzl-font-size-lg);\n color: var(--wzl-fg-muted);\n}\n\n.fg-index__title {\n margin: 0;\n font-family: var(--wzl-panel-title-font);\n font-size: calc(var(--wzl-font-size-xl) * 1.6);\n font-weight: var(--wzl-font-weight-medium);\n letter-spacing: var(--wzl-panel-title-tracking);\n text-transform: var(--wzl-panel-title-case);\n}\n\n.fg-index__description,\n.fg-index-story__description {\n max-width: 72ch;\n margin: var(--wzl-space-4) 0 0;\n font-family: var(--wzl-font-body);\n line-height: 1.5;\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-story {\n padding-top: calc(var(--wzl-space-lg) * 1.5);\n margin-top: calc(var(--wzl-space-lg) * 1.5);\n border-top: var(--wzl-border-w) solid var(--wzl-border);\n}\n\n.fg-index-story__head {\n display: flex;\n align-items: center;\n gap: var(--wzl-space-6);\n}\n\n.fg-index-story__name {\n margin: 0;\n font-family: var(--wzl-panel-title-font);\n font-size: var(--wzl-font-size-xl);\n font-weight: var(--wzl-panel-title-weight);\n letter-spacing: var(--wzl-panel-title-tracking);\n text-transform: var(--wzl-panel-title-case);\n color: var(--wzl-panel-title-color);\n}\n\n.fg-index-cell {\n margin: var(--wzl-space-8) 0 0;\n width: fit-content;\n max-width: 100%;\n}\n\n.fg-index-cell__stage {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 96px;\n padding: var(--wzl-space-2);\n border: var(--wzl-border-w) solid var(--wzl-border);\n border-radius: var(--wzl-radius-md);\n background: var(--wzl-surface);\n overflow: auto;\n}\n\n/* A padded story sits top-left as it would on a page, so the minimum height\n that gives a centered one presence would only leave room under it. */\n.fg-index-cell--padded > .fg-index-cell__stage {\n display: block;\n min-height: 0;\n}\n\n.fg-index-cell--fullscreen {\n width: auto;\n}\n\n.fg-index-cell--fullscreen > .fg-index-cell__stage {\n display: block;\n height: 360px;\n padding: 0;\n}\n\n.fg-index-cell__label {\n margin-top: var(--wzl-space-3);\n font-family: var(--wzl-font-mono);\n font-size: var(--wzl-font-size-sm);\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-variants__row {\n margin-top: calc(var(--wzl-space-lg) * 1.25);\n}\n\n/* Set as the kit's panel titles are, at the small size. */\n.fg-index-variants__label {\n margin: 0;\n font-family: var(--wzl-panel-title-font);\n font-size: var(--wzl-font-size-sm);\n font-weight: var(--wzl-panel-title-weight);\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-variants__cells {\n display: flex;\n flex-wrap: wrap;\n align-items: flex-start;\n gap: var(--wzl-space-6);\n}\n\n.fg-index-variants__cells > .fg-index-cell {\n margin-top: var(--wzl-space-4);\n}\n\n.fg-index__library {\n margin-inline-end: var(--wzl-space-4);\n vertical-align: middle;\n}\n\n.fg-index__title-row {\n display: flex;\n align-items: center;\n gap: var(--wzl-space-6);\n}\n\n.fg-index-deps {\n display: grid;\n grid-template-columns: max-content 1fr;\n gap: var(--wzl-space-3) var(--wzl-space-8);\n margin: var(--wzl-space-8) 0 0;\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-index-deps__row {\n display: contents;\n}\n\n.fg-index-deps__label {\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-deps__value {\n margin: 0;\n}\n\n.fg-index-deps__list {\n display: flex;\n flex-wrap: wrap;\n gap: var(--wzl-space-2) var(--wzl-space-6);\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.fg-index-deps__link {\n color: var(--wzl-accent-fg);\n text-decoration: none;\n}\n\n.fg-index-deps__link:hover {\n text-decoration: underline;\n}\n\n.fg-index-deps__prefix,\n.fg-index-deps__empty,\n.fg-index-deps__none {\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-deps__none {\n max-width: 72ch;\n margin: var(--wzl-space-8) 0 0;\n font-size: var(--wzl-font-size-sm);\n}\n"],"mappings":";AAAA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,eAAa;AACb,mBAAiB;AACjB,OAAK,IAAI;AACT,cAAY;AACZ,kBAAgB,IAAI;AACpB,cAAY,IAAI;AAChB,SAAO,IAAI;AACb;AAEA,CAAC;AACC,UAAQ;AACR,eAAa,IAAI;AACnB;AAEA,CAAC;AACC,UAAQ;AACR,WAAS;AACT,cAAY;AACZ,eAAa,IAAI;AACjB,aAAW,IAAI;AACjB;AAMA,CAAC;AACC,YAAU;AACV,cAAY;AACZ,SAAO;AACP,UAAQ;AACR,YAAU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K,IAAI,gBAAgB,EAAE;AACzC;AAGA,CAAC;AACC,UAAQ;AACR,eAAa,IAAI;AACjB,aAAW,IAAI;AACf,eAAa,IAAI;AACjB,kBAAgB;AAChB,kBAAgB;AAChB,SAAO,IAAI;AACb;AAEA,CAAC;AACC,WAAS;AACT,aAAW;AACX,eAAa;AACb,OAAK,IAAI;AACX;AAEA,CAPC,yBAOyB,EAAE,CAhE3B;AAiEC,cAAY,IAAI;AAClB;AAEA,CAAC;AACC,qBAAmB,IAAI;AACvB,kBAAgB;AAClB;AAEA,CAAC;AACC,WAAS;AACT,eAAa;AACb,OAAK,IAAI;AACX;AAEA,CAAC;AACC,WAAS;AACT,yBAAuB,YAAY;AACnC,OAAK,IAAI,eAAe,IAAI;AAC5B,UAAQ,IAAI,eAAe,EAAE;AAC7B,aAAW,IAAI;AACjB;AAEA,CAAC;AACC,WAAS;AACX;AAEA,CAAC;AACC,SAAO,IAAI;AACb;AAEA,CAAC;AACC,UAAQ;AACV;AAEA,CAAC;AACC,WAAS;AACT,aAAW;AACX,OAAK,IAAI,eAAe,IAAI;AAC5B,UAAQ;AACR,WAAS;AACT,cAAY;AACd;AAEA,CAAC;AACC,SAAO,IAAI;AACX,mBAAiB;AACnB;AAEA,CALC,mBAKmB;AAClB,mBAAiB;AACnB;AAEA,CAAC;AACD,CAAC;AACD,CAAC;AACC,SAAO,IAAI;AACb;AAEA,CAJC;AAKC,aAAW;AACX,UAAQ,IAAI,eAAe,EAAE;AAC7B,aAAW,IAAI;AACjB;","names":[]}
1
+ {"version":3,"sources":["../../src/shell/shell.css","../../src/timeline/timeline.css","../../src/frame/index/index.css"],"sourcesContent":[".fg-empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--wzl-space-xs);\n min-height: 100vh;\n padding-inline: var(--wzl-space-md);\n background: var(--wzl-surface-sunken);\n color: var(--wzl-fg);\n}\n\n.fg-empty__title {\n margin: 0;\n font-weight: var(--wzl-font-weight-bold);\n}\n\n.fg-empty__globs {\n margin: 0;\n padding: 0;\n list-style: none;\n font-family: var(--wzl-font-mono);\n font-size: var(--wzl-font-size-sm);\n}\n\n/* One story's box in the workshop document; the theme attributes land on it from applyGlobals. `contain: paint`,\n exactly that value, makes it the containing block for fixed-position descendants, so a Dialog stays inside its\n trial, and it is the one containment React Aria's positioning recognizes: `layout paint` also contains, but the\n popover math then still assumes the viewport and lands a list a whole host offset too high. */\n.fg-story {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n overflow: auto;\n contain: paint;\n background: var(--wzl-surface);\n color: var(--wzl-fg);\n transition: opacity var(--wzl-motion-fast) var(--wzl-ease-out-cubic);\n}\n\n.fg-story[data-pending] {\n visibility: hidden;\n opacity: 0;\n}\n\n.fg-story[data-fg-layout='centered'] {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.fg-story[data-fg-layout='padded'] {\n padding: 16px;\n}\n\n.fg-story[data-fg-layout='fullscreen'] {\n padding: 0;\n}\n\n.fg-story--loading {\n visibility: visible;\n opacity: 1;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fg-story {\n transition: none;\n }\n}\n\n.fg-frame-host {\n position: relative;\n width: 100%;\n height: 100%;\n}\n\n.fg-frame-slot {\n display: contents;\n}\n\n/* Warm frames lay out at a trial's usual size, so moving one into place is not its first layout. */\n.fg-frame-pool {\n position: fixed;\n top: 0;\n left: -10000px;\n width: 1024px;\n height: 768px;\n visibility: hidden;\n pointer-events: none;\n}\n\n.fg-frame-pool > iframe {\n width: 100%;\n height: 100%;\n border: 0;\n}\n\n.fg-frame-view {\n display: block;\n width: 100%;\n height: 100%;\n border: 0;\n transition: opacity var(--wzl-motion-fast) var(--wzl-ease-out-cubic);\n}\n\n.fg-frame-view[data-pending] {\n visibility: hidden;\n opacity: 0;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fg-frame-view {\n transition: none;\n }\n}\n\n.fg-fault {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-xs);\n padding: var(--wzl-space-md);\n overflow: auto;\n background: var(--wzl-surface-sunken);\n color: var(--wzl-fg);\n font-family: var(--wzl-font-mono);\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-fault__phase {\n color: var(--wzl-danger);\n font-weight: var(--wzl-font-weight-bold);\n text-transform: uppercase;\n}\n\n.fg-fault__message {\n margin: 0;\n white-space: pre-wrap;\n}\n\n.fg-tree {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-xs);\n padding: 0 var(--wzl-space-sm) var(--wzl-space-sm);\n border-bottom: var(--wzl-border-w) solid var(--wzl-line-subtle);\n color: var(--wzl-fg);\n}\n\n.fg-tree__heading {\n margin: 0;\n padding-block: var(--wzl-space-xs);\n color: var(--wzl-fg-muted);\n font-family: var(--wzl-font-display);\n font-size: var(--wzl-font-size-sm);\n font-weight: var(--wzl-font-weight-bold);\n letter-spacing: 0.08em;\n text-transform: uppercase;\n}\n\n.fg-route-miss {\n margin: 0;\n color: var(--wzl-danger);\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-tree__filter {\n box-sizing: border-box;\n width: 100%;\n font-size: var(--wzl-font-size);\n}\n\n.fg-tree__items,\n.fg-tree__group {\n display: flex;\n flex-direction: column;\n}\n\n.fg-tree__items {\n font-size: var(--wzl-font-size);\n}\n\n.fg-tree__group {\n padding-inline-start: var(--wzl-space-sm);\n}\n\n.fg-tree__node {\n display: flex;\n flex-direction: column;\n min-width: 0;\n outline: none;\n}\n\n.fg-tree__item {\n display: flex;\n align-items: center;\n gap: var(--wzl-space-xs);\n padding: calc(var(--wzl-space-xs) / 2) var(--wzl-space-xs);\n border-radius: var(--wzl-radius-sm);\n overflow: hidden;\n color: inherit;\n text-decoration: none;\n white-space: nowrap;\n cursor: pointer;\n}\n\n/* text-overflow does not reach a flex container's anonymous text box, so the label clips itself. */\n.fg-tree__label {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.fg-tree__item:hover {\n background: var(--wzl-surface-hover);\n}\n\n/* Sits after the label, which is the element that shrinks, so the tag keeps\n its width and the rows' tags line up down the column. */\n.fg-tree__item > .fg-tree__tag {\n flex: none;\n margin-inline-start: auto;\n}\n\n.fg-tree__tag {\n --badge-font-size: var(--wzl-font-size-2xs);\n}\n\n.fg-tree__libraries {\n display: flex;\n flex-wrap: wrap;\n gap: var(--wzl-space-xs);\n margin: 0;\n padding: 0;\n border: 0;\n}\n\n.fg-tree__libraries-legend {\n padding: 0;\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-sm);\n}\n\n/* A folder item holds its group, so its ring goes on its own row rather than around the subtree. */\n.fg-tree__story:focus-visible,\n.fg-tree__node:focus-visible > .fg-tree__folder {\n outline: var(--wzl-line-width) solid var(--wzl-accent);\n outline-offset: calc(-1 * var(--wzl-line-width));\n}\n\n.fg-tree__item[aria-current='true'],\n.fg-tree__node[aria-current='true'] > .fg-tree__folder {\n color: var(--wzl-secondary-fg);\n}\n\n/* Padded out to a hit target and pulled back by the same amount, except on the label's side, where the padding\n widens the gap to the label. */\n.fg-tree__fold {\n flex: none;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: calc(-1 * var(--wzl-space-xs));\n margin-inline-end: 0;\n padding: var(--wzl-space-xs);\n}\n\n.fg-tree__folder {\n font-weight: calc(var(--wzl-font-weight-normal) + 100);\n}\n\n.fg-tree__story {\n /* The CSS floor, which the browser rounds up to the lightest weight the face has. */\n font-weight: 100;\n /* Clears the folder rows' 13px fold mark, so a story's label lines up with its folder's. */\n padding-inline-start: calc(var(--wzl-space-xs) * 3 + 13px);\n}\n\n.lk-trial.fg-flash {\n outline: var(--wzl-line-width) solid var(--wzl-accent);\n outline-offset: calc(-1 * var(--wzl-line-width));\n animation: fg-flash 600ms ease-out forwards;\n}\n\n@keyframes fg-flash {\n from {\n outline-color: var(--wzl-accent);\n }\n to {\n outline-color: transparent;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .lk-trial.fg-flash {\n animation: none;\n }\n}\n\n.fg-css-vars {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-xs);\n}\n\n.fg-css-vars-focus {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-xs);\n min-width: 0;\n}\n\n.fg-css-vars__trial {\n margin: 0;\n overflow: hidden;\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-sm);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Held at the top while the list scrolls the aside under it. */\n.fg-css-vars__controls {\n position: sticky;\n top: 0;\n z-index: 1;\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-xs);\n padding-block-end: var(--wzl-space-xs);\n background: var(--wzl-surface);\n}\n\n.fg-css-vars__save {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--wzl-space-xs);\n}\n\n.fg-css-vars__notice {\n margin: 0;\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-css-vars__notice--saved {\n color: var(--wzl-fg-muted);\n}\n\n.fg-css-vars__notice--error {\n color: var(--wzl-danger);\n}\n\n.fg-css-vars__empty {\n margin: 0;\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-globals,\n.fg-globals__item {\n display: flex;\n align-items: center;\n gap: var(--wzl-space-xs);\n}\n\n.fg-globals__item {\n gap: 0;\n}\n\n.fg-globals__popover {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-sm);\n min-width: 14rem;\n}\n\n\n.fg-a11y,\n.fg-a11y-focus {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-xs);\n min-width: 0;\n}\n\n.fg-a11y__trial {\n margin: 0;\n overflow: hidden;\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-sm);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.fg-a11y__controls {\n display: flex;\n gap: var(--wzl-space-xs);\n}\n\n.fg-a11y__note,\n.fg-a11y__tally {\n margin: 0;\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-a11y__group {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-xs);\n}\n\n.fg-a11y__group-title {\n margin: 0;\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-a11y__findings,\n.fg-a11y__nodes {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-xs);\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.fg-a11y__finding {\n border-inline-start: 2px solid var(--wzl-border);\n padding-inline-start: var(--wzl-space-xs);\n}\n\n.fg-a11y__help {\n display: flex;\n align-items: baseline;\n gap: var(--wzl-space-xs);\n margin: 0;\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-a11y__impact {\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-xs);\n text-transform: uppercase;\n}\n\n.fg-a11y__impact[data-impact='serious'],\n.fg-a11y__impact[data-impact='critical'] {\n color: var(--wzl-danger);\n}\n\n.fg-a11y__nodes {\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-xs);\n word-break: break-all;\n}\n\n/* Get Info */\n\n.fg-info-dialog {\n /* Wide enough for the longest row a dossier carries — an absolute story file\n path — to sit on one line. */\n inline-size: min(52rem, 90vw);\n}\n\n.fg-info {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-md);\n}\n\n.fg-info__section {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-xs);\n}\n\n.fg-info__heading {\n margin: 0;\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-xs);\n font-weight: var(--wzl-font-weight-medium);\n text-transform: uppercase;\n letter-spacing: 0.04em;\n}\n\n.fg-info__doc {\n margin: 0;\n white-space: pre-line;\n}\n\n.fg-info__doc--component {\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-info__rows {\n display: grid;\n grid-template-columns: max-content 1fr;\n gap: var(--wzl-space-xs) var(--wzl-space-sm);\n margin: 0;\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-info__row {\n display: contents;\n}\n\n.fg-info__key {\n color: var(--wzl-fg-muted);\n text-align: end;\n}\n\n.fg-info__value {\n margin: 0;\n min-inline-size: 0;\n overflow-wrap: anywhere;\n}\n\n.fg-info__path {\n font-size: var(--wzl-font-size-xs);\n}\n\n.fg-info__args {\n inline-size: 100%;\n border-collapse: collapse;\n font-size: var(--wzl-font-size-sm);\n text-align: start;\n}\n\n.fg-info__args th,\n.fg-info__args td {\n padding: var(--wzl-space-xs) var(--wzl-space-xs);\n border-block-end: 1px solid var(--wzl-border);\n vertical-align: baseline;\n text-align: start;\n font-weight: var(--wzl-font-weight-normal);\n}\n\n.fg-info__args thead th {\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-xs);\n text-transform: uppercase;\n}\n\n.fg-info__arg-name {\n display: block;\n}\n\n.fg-info__arg-doc {\n display: block;\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-xs);\n}\n\n.fg-info__arg-kind {\n color: var(--wzl-fg-muted);\n}\n\n.fg-info__value-cell {\n overflow-wrap: anywhere;\n}\n\n.fg-info__empty {\n margin: 0;\n color: var(--wzl-fg-muted);\n font-size: var(--wzl-font-size-sm);\n}\n",".fg-transport {\n display: flex;\n align-items: center;\n gap: var(--wzl-space-6);\n min-inline-size: 0;\n}\n\n.fg-transport__scrub {\n inline-size: 16rem;\n min-inline-size: 6rem;\n flex: 1 1 16rem;\n}\n",".fg-index {\n box-sizing: border-box;\n max-width: 1200px;\n margin: 0 auto;\n padding: var(--wzl-space-lg);\n font-family: var(--wzl-font-ui);\n font-size: var(--wzl-font-size);\n color: var(--wzl-fg);\n}\n\n.fg-index__head {\n margin-bottom: calc(var(--wzl-space-lg) * 2);\n}\n\n.fg-index__path {\n margin: 0 0 var(--wzl-space-2);\n font-size: var(--wzl-font-size-lg);\n color: var(--wzl-fg-muted);\n}\n\n.fg-index__title {\n margin: 0;\n font-family: var(--wzl-panel-title-font);\n font-size: calc(var(--wzl-font-size-xl) * 1.6);\n font-weight: var(--wzl-font-weight-medium);\n letter-spacing: var(--wzl-panel-title-tracking);\n text-transform: var(--wzl-panel-title-case);\n}\n\n.fg-index__description,\n.fg-index-story__description {\n max-width: 72ch;\n margin: var(--wzl-space-4) 0 0;\n font-family: var(--wzl-font-body);\n line-height: 1.5;\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-story {\n padding-top: calc(var(--wzl-space-lg) * 1.5);\n margin-top: calc(var(--wzl-space-lg) * 1.5);\n border-top: var(--wzl-border-w) solid var(--wzl-border);\n}\n\n.fg-index-story__head {\n display: flex;\n align-items: center;\n gap: var(--wzl-space-6);\n}\n\n.fg-index-story__name {\n margin: 0;\n font-family: var(--wzl-panel-title-font);\n font-size: var(--wzl-font-size-xl);\n font-weight: var(--wzl-panel-title-weight);\n letter-spacing: var(--wzl-panel-title-tracking);\n text-transform: var(--wzl-panel-title-case);\n color: var(--wzl-panel-title-color);\n}\n\n.fg-index-cell {\n margin: var(--wzl-space-8) 0 0;\n width: fit-content;\n /* A fluid specimen (a slider, a tiled workspace) has no width of its own,\n so hugging it alone collapses the cell to its padding. */\n min-width: min(100%, 20rem);\n max-width: 100%;\n}\n\n.fg-index-cell__stage {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 96px;\n padding: var(--wzl-space-2);\n border: var(--wzl-border-w) solid var(--wzl-border);\n border-radius: var(--wzl-radius-md);\n background: var(--wzl-surface);\n overflow: auto;\n}\n\n/* A padded story sits top-left as it would on a page: the column's width, and\n none of the minimum height that gives a centered one presence. */\n.fg-index-cell--padded {\n width: auto;\n}\n\n.fg-index-cell--padded > .fg-index-cell__stage {\n display: block;\n min-height: 0;\n}\n\n.fg-index-cell--fullscreen {\n width: auto;\n}\n\n.fg-index-cell--fullscreen > .fg-index-cell__stage {\n display: block;\n height: 360px;\n padding: 0;\n}\n\n.fg-index-cell__label {\n margin-top: var(--wzl-space-3);\n font-family: var(--wzl-font-mono);\n font-size: var(--wzl-font-size-sm);\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-variants__row {\n margin-top: calc(var(--wzl-space-lg) * 1.25);\n}\n\n/* Set as the kit's panel titles are, at the small size. */\n.fg-index-variants__label {\n margin: 0;\n font-family: var(--wzl-panel-title-font);\n font-size: var(--wzl-font-size-sm);\n font-weight: var(--wzl-panel-title-weight);\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-variants__cells {\n display: flex;\n flex-wrap: wrap;\n align-items: flex-start;\n gap: var(--wzl-space-6);\n}\n\n.fg-index-variants__cells > .fg-index-cell {\n margin-top: var(--wzl-space-4);\n}\n\n.fg-index__library {\n margin-inline-end: var(--wzl-space-4);\n vertical-align: middle;\n}\n\n.fg-index__title-row {\n display: flex;\n align-items: center;\n gap: var(--wzl-space-6);\n}\n\n.fg-index-deps {\n display: grid;\n grid-template-columns: max-content 1fr;\n gap: var(--wzl-space-3) var(--wzl-space-8);\n margin: var(--wzl-space-8) 0 0;\n font-size: var(--wzl-font-size-sm);\n}\n\n.fg-index-deps__row {\n display: contents;\n}\n\n.fg-index-deps__label {\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-deps__value {\n margin: 0;\n}\n\n.fg-index-deps__list {\n display: flex;\n flex-wrap: wrap;\n gap: var(--wzl-space-2) var(--wzl-space-6);\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.fg-index-deps__link {\n color: var(--wzl-accent-fg);\n text-decoration: none;\n}\n\n.fg-index-deps__link:hover {\n text-decoration: underline;\n}\n\n.fg-index-deps__prefix,\n.fg-index-deps__empty,\n.fg-index-deps__none {\n color: var(--wzl-fg-muted);\n}\n\n.fg-index-deps__none {\n max-width: 72ch;\n margin: var(--wzl-space-8) 0 0;\n font-size: var(--wzl-font-size-sm);\n}\n"],"mappings":";AAAA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,eAAa;AACb,mBAAiB;AACjB,OAAK,IAAI;AACT,cAAY;AACZ,kBAAgB,IAAI;AACpB,cAAY,IAAI;AAChB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,8 +2,8 @@ import * as react from 'react';
2
2
  import { RefObject, ReactNode } from 'react';
3
3
  import { LabContribution, StorageAdapter, RenderContext, InstrumentList } from '@weasel-js/labkit';
4
4
  import { FrameImporters } from '../frame/index.js';
5
- import { j as IndexEntry, F as FrameSetup, e as DepGraph, L as LoadedStory, k as Layout, G as Globals, l as FromFrame, c as A11yReport, m as ToFrame, n as CssVarReport, o as CapturedPicture, V as Viewport } from '../FrameController-BH8xJHZ8.js';
6
- import { S as ShellConfig, a as GlobalDeclarations } from '../config-DoLWwEb2.js';
5
+ import { j as IndexEntry, F as FrameSetup, e as DepGraph, L as LoadedStory, k as Layout, G as Globals, l as FromFrame, c as A11yReport, m as ToFrame, n as CssVarReport, o as CapturedPicture, V as Viewport } from '../FrameController-CpcY0DNB.js';
6
+ import { S as ShellConfig, a as GlobalDeclarations } from '../config-jK7q7JuF.js';
7
7
  import '@weasel-js/labkit/config';
8
8
  import '@weasel-js/theme';
9
9
 
@@ -121,7 +121,7 @@ interface StoryRegistryOptions {
121
121
  importers?: FrameImporters;
122
122
  /** The frame config, applied to each story host in the document. */
123
123
  setup?: FrameSetup;
124
- load?: (mod: Record<string, unknown>, autoTitle: string, parameters?: Record<string, unknown>) => LoadedStory[];
124
+ load?: (mod: Record<string, unknown>, title: string, parameters?: Record<string, unknown>) => LoadedStory[];
125
125
  }
126
126
  /**
127
127
  * One instrument per story in `index`, each schema holding a `$globals` group for `globals`. The lab's global values