The VS Code of video editing, built for agents.
TypeScript
Integrate ShadowsSettings into Inspector and enhance ShadowInspector functionality
konstantin-paulus77c99430a7c7
diff --git a/apps/web/src/components/sidebar-right/inspector/inspector.tsx b/apps/web/src/components/sidebar-right/inspector/inspector.tsxindex 9c759ac8..6c326999 100644--- a/apps/web/src/components/sidebar-right/inspector/inspector.tsx+++ b/apps/web/src/components/sidebar-right/inspector/inspector.tsx@@ -32,7 +32,7 @@ import { LayoutPanel } from "./layout";import { TextPanel } from "./text";// import { FillsSettings } from "./fills";import { StrokesSettings } from "./strokes";-// import { ShadowsSettings } from "./shadows";+import { ShadowsSettings } from "./shadows";// import { EffectsSettings } from "./effects";// import { AnimationsSettings } from "./animations";// import { TransitionSettings } from "./transition";@@ -157,9 +157,9 @@ export function Inspector() {<StrokesSettings selection={nodes()} /></Show>- {/* <Show when={includesTarget("shape", "text", "scene", "caption")}>+ <Show when={includesTarget("shape", "text", "scene", "caption")}><ShadowsSettings selection={nodes()} />- </Show> */}+ </Show>{/* <Show when={includesTarget("shape", "text", "scene", "caption")}><EffectsSettings selection={nodes()} />diff --git a/apps/web/src/components/sidebar-right/inspector/shadow-inspector.tsx b/apps/web/src/components/sidebar-right/inspector/shadow-inspector.tsxindex c6cf3ef1..826a9842 100644--- a/apps/web/src/components/sidebar-right/inspector/shadow-inspector.tsx+++ b/apps/web/src/components/sidebar-right/inspector/shadow-inspector.tsx@@ -2,7 +2,7 @@* License, v. 2.0. If a copy of the MPL was not distributed with this* file, You can obtain one at http://mozilla.org/MPL/2.0/. */-import { createSignal } from 'solid-js';+import { createSignal } from "solid-js";import { Button } from "@/components/ui/button";import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";import { Icon } from "@/components/ui/icon";@@ -10,73 +10,85 @@ import {FloatingInspector,FloatingInspectorContent,FloatingInspectorHeader,- FloatingInspectorTitle,FloatingInspectorSeparator,+ FloatingInspectorTitle,} from "@/components/ui/floating-inspector";import { ControlRow } from "@/components/ui/control-group";import { ColorOpacityRow } from "@/components/ui/color-opacity-row";import { ColorOpacityPicker } from "@/components/ui/color-opacity-picker";import { ControlledTextField } from "@/components/ui/text-field";import { IncrementDecrementControl } from "@/components/ui/increment-decrement-control";-import { useEntityState, setComponent } from "@/components/engine";-import { useEngine } from "@/context/engine";-import { Keyframe } from "@/components/ui/keyframe-bitecs";+import { Keyframe } from "@/components/ui/keyframe";+import { useWorld } from "@diffusionstudio/koota-solid";+import { Computed, colorToHex } from "@diffusionstudio/runtime";+import { useDerived, useEditor } from "@/engine/hooks";+import { syncKeyframe } from "@/engine/keyframes";++import type { Entity } from "koota";+/** `<shadow>`'s defaults; a control left at one of these unsets its prop. */+const DEFAULT_OPACITY = 1;+const DEFAULT_OFFSET = 0;+const DEFAULT_BLUR = 0;type ShadowInspectorProps = {- onClose(): void;+ shadow: Entity;anchorRef: HTMLElement;- nodeEid: number;- shadowEid: number;+ onClose(): void;};+/**+ * One `<shadow>`: its paint (color and opacity) and how it is cast (offset+ * and blur). A shadow is a solid color and takes no paint children, so the+ * color half is the color picker alone, with no gradient or asset tab.+ */export function ShadowInspector(props: ShadowInspectorProps) {- let colorRowRef: HTMLDivElement | undefined;+ const world = useWorld();+ const editor = useEditor();- const { world } = useEngine();- const c = world.components;+ let colorRowRef: HTMLDivElement | undefined;- const [isColorPickerOpen, setIsColorPickerOpen] = createSignal(false);+ const [pickingColor, setPickingColor] = createSignal(false);- const color = useEntityState(c.Computed.color, props.shadowEid, 0x000000);- const opacity = useEntityState(c.Computed.opacity, props.shadowEid, 0.25);- const offsetX = useEntityState(c.Computed.offsetX, props.shadowEid, 0);- const offsetY = useEntityState(c.Computed.offsetY, props.shadowEid, 4);- const blur = useEntityState(c.Computed.blur, props.shadowEid, 0);+ const color = useDerived(() => props.shadow.get(Computed)?.color ?? 0);+ const opacity = useDerived(() => props.shadow.get(Computed)?.opacity ?? DEFAULT_OPACITY);+ const offsetX = useDerived(() => props.shadow.get(Computed)?.offsetX ?? DEFAULT_OFFSET);+ const offsetY = useDerived(() => props.shadow.get(Computed)?.offsetY ?? DEFAULT_OFFSET);+ const blur = useDerived(() => props.shadow.get(Computed)?.blur ?? DEFAULT_BLUR);- const updateColor = (color: number) => {- setComponent(world, props.shadowEid, c.Color, color);- };- const updateOpacity = (opacity: number) => {- setComponent(world, props.shadowEid, c.Appearance, { opacity });+ /** A shadow's color is required, never unset. */+ const editColor = (value: number) => {+ const hex = colorToHex(value);+ editor.editProperty(props.shadow, "color", hex);+ syncKeyframe(world, editor, props.shadow, "color", hex);};- const updateOffsetX = (x: number) => {- setComponent(world, props.shadowEid, c.Offset, { x });++ const editOpacity = (value: number) => {+ const next = Math.round(value * 100) / 100;+ editor.editProperty(props.shadow, "opacity", next === DEFAULT_OPACITY ? false : next);+ syncKeyframe(world, editor, props.shadow, "opacity", next);};- const updateOffsetY = (y: number) => {- setComponent(world, props.shadowEid, c.Offset, { y });++ const editOffset = (axis: "offsetX" | "offsetY", value: number) => {+ editor.editProperty(props.shadow, axis, value === DEFAULT_OFFSET ? false : value);+ syncKeyframe(world, editor, props.shadow, axis, value);};- const updateBlur = (blur: number) => {- setComponent(world, props.shadowEid, c.Blur, blur);++ const editBlur = (value: number) => {+ editor.editProperty(props.shadow, "blur", value === DEFAULT_BLUR ? false : value);+ syncKeyframe(world, editor, props.shadow, "blur", value);};const handleClose = () => {- setIsColorPickerOpen(false);+ setPickingColor(false);props.onClose();};-return (<>- <FloatingInspector- open={true}- anchorRef={props.anchorRef}- width={248}- >+ <FloatingInspector open anchorRef={props.anchorRef} width={248}><FloatingInspectorHeader class="items-center justify-between">- <FloatingInspectorTitle>- Drop Shadow- </FloatingInspectorTitle>+ <FloatingInspectorTitle>Drop Shadow</FloatingInspectorTitle><Tooltip><TooltipTriggeras={Button}@@ -95,12 +107,11 @@ export function ShadowInspector(props: ShadowInspectorProps) {<ControlRow label="Color" ref={colorRowRef}><ColorOpacityRowcolor={color()}- onChangeColor={updateColor}+ onChangeColor={editColor}opacity={opacity()}- onChangeOpacity={updateOpacity}- onStartTransaction={() => world.history.startTransaction("Edit shadow opacity")}- onEndTransaction={() => world.history.commitTransaction()}- onClick={() => setIsColorPickerOpen(true)}+ onChangeOpacity={editOpacity}+ onClick={() => setPickingColor(true)}+ keyframe={<Keyframe target={props.shadow} property="opacity" />}/></ControlRow>@@ -109,20 +120,20 @@ export function ShadowInspector(props: ShadowInspectorProps) {<ControlledTextFieldicon={<Icon name="prop-x-position" class="size-6" />}value={offsetX()}- onNumber={updateOffsetX}+ onNumber={(value) => editOffset("offsetX", value)}autoSelectsliderEnabledlimitEvents- keyframe={<Keyframe target={props.shadowEid} property="offset.x" />}+ keyframe={<Keyframe target={props.shadow} property="offsetX" />}/><ControlledTextFieldicon={<Icon name="prop-y-position" class="size-6" />}value={offsetY()}- onNumber={updateOffsetY}+ onNumber={(value) => editOffset("offsetY", value)}autoSelectsliderEnabledlimitEvents- keyframe={<Keyframe target={props.shadowEid} property="offset.y" />}+ keyframe={<Keyframe target={props.shadow} property="offsetY" />}/></div></ControlRow>@@ -131,15 +142,15 @@ export function ShadowInspector(props: ShadowInspectorProps) {<div class="grid grid-cols-2 gap-2"><ControlledTextFieldvalue={blur()}- onNumber={updateBlur}+ onNumber={editBlur}min={0}autoSelectlimitEvents- keyframe={<Keyframe target={props.shadowEid} property="blur" />}+ keyframe={<Keyframe target={props.shadow} property="blur" />}/><IncrementDecrementControl- onDecrement={() => updateBlur(Math.max(0, blur() - 1))}- onIncrement={() => updateBlur(blur() + 1)}+ onDecrement={() => editBlur(Math.max(0, blur() - 1))}+ onIncrement={() => editBlur(blur() + 1)}decrementLabel="Decrease blur"incrementLabel="Increase blur"/>@@ -148,11 +159,7 @@ export function ShadowInspector(props: ShadowInspectorProps) {</FloatingInspectorContent></FloatingInspector>- <FloatingInspector- open={isColorPickerOpen}- anchorRef={() => colorRowRef}- offset={26}- >+ <FloatingInspector open={pickingColor} anchorRef={() => colorRowRef} offset={26}><FloatingInspectorHeader><FloatingInspectorTitle>Color</FloatingInspectorTitle><div class="ml-auto">@@ -162,7 +169,7 @@ export function ShadowInspector(props: ShadowInspectorProps) {size="icon"variant="ghost"class="text-muted-foreground"- onClick={() => setIsColorPickerOpen(false)}+ onClick={() => setPickingColor(false)}><Icon name="close-remove" class="size-6" /></TooltipTrigger>@@ -174,10 +181,9 @@ export function ShadowInspector(props: ShadowInspectorProps) {<ColorOpacityPickercolor={color()}opacity={opacity()}- onColorChange={updateColor}- onOpacityChange={updateOpacity}- onBeginChange={(label) => world.history.startTransaction(label)}- onEndChange={() => world.history.commitTransaction()}+ onColorChange={editColor}+ onOpacityChange={editOpacity}+ keyframeTarget={props.shadow}/></FloatingInspectorContent></FloatingInspector>diff --git a/apps/web/src/components/sidebar-right/inspector/shadows.tsx b/apps/web/src/components/sidebar-right/inspector/shadows.tsxindex 7832409a..23043d18 100644--- a/apps/web/src/components/sidebar-right/inspector/shadows.tsx+++ b/apps/web/src/components/sidebar-right/inspector/shadows.tsx@@ -2,13 +2,9 @@* License, v. 2.0. If a copy of the MPL was not distributed with this* file, You can obtain one at http://mozilla.org/MPL/2.0/. */+import { For, Show, createMemo, createSignal } from "solid-js";import { Button } from "@/components/ui/button";import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";-import { For, Show, createSignal } from 'solid-js';-import { Icon } from '@/components/ui/icon';-import { ItemRow } from "@/components/ui/item-row";-import { PanelSection } from '@/components/ui/panel-section';-import { ShadowInspector } from './shadow-inspector';import {ContextMenu,ContextMenuContent,@@ -16,57 +12,149 @@ import {ContextMenuSeparator,ContextMenuTrigger,} from "@/components/ui/context-menu";-import { getSiblingEntities, useEntityState, useEntityTag, createEntity, deleteEntity, type EngineWorld, addComponent, appendChild, removeComponent, setComponent } from "@/components/engine";-import { useEngine } from "@/context/engine";-import { colorToHex } from "@/utils/color";-import { hasComponent } from 'bitecs';-+import { Icon } from "@/components/ui/icon";+import { ItemRow } from "@/components/ui/item-row";+import { PanelSection } from "@/components/ui/panel-section";+import { useHas } from "@diffusionstudio/koota-solid";+import { Shadow as ShadowElement } from "@diffusionstudio/reconciler";+import { Cache, Computed, Hidden, colorToHex } from "@diffusionstudio/runtime";+import { useDerived, useEditor } from "@/engine/hooks";+import { ShadowInspector } from "./shadow-inspector";++import type { Entity } from "koota";++/**+ * What "Add shadow" authors. `<shadow>`'s own defaults are all zero, which+ * draws the silhouette back onto itself, so a shadow added from the panel+ * says where it sits and how soft it is.+ */const DEFAULT_SHADOW = {- color: 0x000000,+ color: "#000000",opacity: 0.25,blur: 4,- offsetX: 0,offsetY: 4,};-type ShadowRowProps = {- nodeEid: number;- shadowEid: number;- onInspectorChange(shadowEid: number | null): void;-}+// Stable identity, so a node without shadows does not resample every tick.+const NO_SHADOWS: Entity[] = [];-function ShadowRow(props: ShadowRowProps) {- const { world } = useEngine();- const c = world.components;- const colorNum = useEntityState(c.Computed.color, props.shadowEid, 0x000000);- const hidden = useEntityTag(c.Hidden, props.shadowEid);+type ShadowsSettingsProps = {+ selection: Entity[];+};- const color = () => colorToHex(colorNum()).replace('#', '');- const toggleHidden = () => {- if (hasComponent(world, props.shadowEid, c.Hidden)) {- removeComponent(world, props.shadowEid, c.Hidden);+/**+ * The `<shadow>` children of the selected node, in paint order (the list is+ * shown topmost first, so the last element in the file is the first row).+ * A row opens the shadow's own inspector; what it shows is the color, since+ * that is the one thing a shadow always says.+ */+export function ShadowsSettings(props: ShadowsSettingsProps) {+ const editor = useEditor();+ const entity = () => props.selection[0]!;++ let anchorRef!: HTMLDivElement;++ const [picked, setPicked] = createSignal<Entity>();++ // Cache is derived state, written without change events.+ const shadows = useDerived(() => entity().get(Cache)?.shadows ?? NO_SHADOWS);++ const handleAppendShadow = () => {+ editor.insertElement(entity(), () => (+ <ShadowElement+ color={DEFAULT_SHADOW.color}+ opacity={DEFAULT_SHADOW.opacity}+ blur={DEFAULT_SHADOW.blur}+ offsetY={DEFAULT_SHADOW.offsetY}+ />+ ));+ };++ // Read back off the list, so removing a shadow closes the inspector on it.+ const editing = createMemo(() => {+ const shadow = picked();+ return shadow !== undefined && shadows().includes(shadow) ? shadow : undefined;+ });++ /**+ * Swaps `shadow` with its neighbour, later in the file (`direction` 1, on+ * top) or earlier. Written as a swap because a move needs an anchor:+ * `reparent` appends without one, and refuses an append into the parent the+ * element already has.+ */+ const handleReorderShadow = (shadow: Entity, direction: number) => {+ const siblings = shadows();+ const index = siblings.indexOf(shadow);+ const target = index + direction;+ if (index === -1 || target < 0 || target >= siblings.length) return;++ if (direction > 0) {+ editor.reparent(siblings[target]!, entity(), shadow);} else {- addComponent(world, props.shadowEid, c.Hidden);+ editor.reparent(shadow, entity(), siblings[target]!);}};- const handleRemoveShadow = () => {- deleteEntity(world, props.shadowEid);- props.onInspectorChange(null);- };+ return (+ <>+ <PanelSection+ title="Shadow"+ ref={anchorRef}+ actions={+ <Tooltip>+ <TooltipTrigger+ as={Button}+ size="icon"+ variant="ghost"+ class="text-muted-foreground"+ onClick={handleAppendShadow}+ >+ <Icon name="plus-add" />+ </TooltipTrigger>+ <TooltipContent>Add shadow</TooltipContent>+ </Tooltip>+ }+ >+ <For each={shadows().toReversed()}>+ {(shadow) => (+ <ShadowRow+ shadow={shadow}+ onSelect={() => setPicked(shadow)}+ onRemove={() => editor.remove(shadow)}+ onMoveUp={() => handleReorderShadow(shadow, 1)}+ onMoveDown={() => handleReorderShadow(shadow, -1)}+ />+ )}+ </For>+ </PanelSection>- const handleOpenInspector = () => props.onInspectorChange(props.shadowEid);-- const reorderShadow = (world: EngineWorld, direction: number) => {- const shadows = getSiblingEntities(world, props.shadowEid, c.Shadow);- const index = shadows.indexOf(props.shadowEid);- const newIndex = index + direction;- if (newIndex >= 0 && newIndex < shadows.length) {- shadows.splice(newIndex, 0, shadows.splice(index, 1)[0]);- for (const [index, eid] of shadows.entries()) {- setComponent(world, eid, c.ItemIndex, index);- }- }+ <Show when={editing() !== undefined}>+ <ShadowInspector+ shadow={editing()!}+ anchorRef={anchorRef}+ onClose={() => setPicked(undefined)}+ />+ </Show>+ </>+ );+}++type ShadowRowProps = {+ shadow: Entity;+ onSelect(): void;+ onRemove(): void;+ onMoveUp(): void;+ onMoveDown(): void;+};++function ShadowRow(props: ShadowRowProps) {+ const editor = useEditor();++ const color = useDerived(() => props.shadow.get(Computed)?.color ?? 0);+ const hidden = useHas(() => props.shadow, Hidden);++ const toggleHidden = () => {+ editor.editProperty(props.shadow, "hidden", !hidden());};return (@@ -74,9 +162,9 @@ function ShadowRow(props: ShadowRowProps) {<ContextMenuTrigger><ItemRowlabel="Shadow"- value={color()}+ value={colorToHex(color()).replace("#", "")}icon={<Icon name="color-grade" />}- onClick={handleOpenInspector}+ onClick={props.onSelect}disabled={hidden()}><Tooltip>@@ -85,7 +173,7 @@ function ShadowRow(props: ShadowRowProps) {size="icon"variant="ghost"class="text-muted-foreground"- onClick={handleRemoveShadow}+ onClick={props.onRemove}><Icon name="close-remove-small" /></TooltipTrigger>@@ -94,90 +182,15 @@ function ShadowRow(props: ShadowRowProps) {</ItemRow></ContextMenuTrigger><ContextMenuContent>- <ContextMenuItem onSelect={() => reorderShadow(world, 1)}>- Move Up- </ContextMenuItem>- <ContextMenuItem onSelect={() => reorderShadow(world, -1)}>- Move Down- </ContextMenuItem>+ <ContextMenuItem onSelect={props.onMoveUp}>Move Up</ContextMenuItem>+ <ContextMenuItem onSelect={props.onMoveDown}>Move Down</ContextMenuItem><ContextMenuSeparator /><ContextMenuItem onSelect={toggleHidden}>{hidden() ? "Unhide" : "Hide"}</ContextMenuItem><ContextMenuSeparator />- <ContextMenuItem onSelect={handleRemoveShadow}>- Remove- </ContextMenuItem>+ <ContextMenuItem onSelect={props.onRemove}>Remove</ContextMenuItem></ContextMenuContent></ContextMenu>);}--type ShadowSettingsProps = {- selection: Set<number>;-};--export function ShadowsSettings(props: ShadowSettingsProps) {- const { world } = useEngine();- const c = world.components;-- const [inspectingShadow, setInspectingShadow] = createSignal<number | null>(null);-- let anchorRef: HTMLDivElement | undefined;-- const eid = () => props.selection.values().next().value!;- const shadows = useEntityState(c.Cache.shadows, eid, []);-- const handleAddShadow = () => {- world.history.transaction('Add shadow', () => {- const shadowEid = createEntity(world);- addComponent(world, shadowEid, c.Shadow);- setComponent(world, shadowEid, c.Color, DEFAULT_SHADOW.color);- setComponent(world, shadowEid, c.Appearance, { opacity: DEFAULT_SHADOW.opacity });- setComponent(world, shadowEid, c.Blur, DEFAULT_SHADOW.blur);- setComponent(world, shadowEid, c.Offset, { x: DEFAULT_SHADOW.offsetX, y: DEFAULT_SHADOW.offsetY });- appendChild(world, shadowEid, eid());- });- };-- return (- <>- <PanelSection- title="Shadow"- ref={anchorRef}- actions={- <Tooltip>- <TooltipTrigger- as={Button}- size="icon"- variant="ghost"- class="text-muted-foreground"- onClick={handleAddShadow}- >- <Icon name="plus-add" />- </TooltipTrigger>- <TooltipContent>Add shadow</TooltipContent>- </Tooltip>- }- >- <For each={shadows().toReversed()}>- {(shadowEid: number) => (- <ShadowRow- shadowEid={shadowEid}- nodeEid={eid()}- onInspectorChange={setInspectingShadow}- />- )}- </For>- </PanelSection>- <Show when={inspectingShadow()}>- <ShadowInspector- onClose={() => setInspectingShadow(null)}- anchorRef={anchorRef!}- nodeEid={eid()}- shadowEid={inspectingShadow()!}- />- </Show>- </>- );-}diff --git a/packages/runtime/MIGRATION.md b/packages/runtime/MIGRATION.mdindex abf44928..36aa3239 100644--- a/packages/runtime/MIGRATION.md+++ b/packages/runtime/MIGRATION.md@@ -76,7 +76,7 @@ Done:| Draw tools + toolbar (armed tool is the `Tool` world trait) | `components/canvas/draw-overlay.tsx` || Input, HUD, camera, alignment | `engine/input/`, `engine/hud/`, `engine/align.ts` || Project config (per-scene export settings in package.json) | `engine/project-config.ts` |-| Panels: header, background, scene template, asset info, time, appearance, alignment, export, layout, text, strokes | `components/sidebar-right/inspector/` |+| Panels: header, background, scene template, asset info, time, appearance, alignment, export, layout, text, strokes, shadows | `components/sidebar-right/inspector/` || Local font families (web fonts and loading are the runtime's) | `engine/fonts.ts` (`getLocalFonts`) |Hosted JSX surface is `COMPOSITION_TAGS` (`packages/jsx/src/source.ts`): the structural tags, the media tags, `<captions>`, the paint family, `<stroke>`, `<shadow>`, `<effect>`, `<animation>`, `<keyframeTrack>`/`<keyframe>`, `<html>`/`<surface>`. `mask` is a `<rect>` prop, not a tag.@@ -95,10 +95,12 @@ Conventions worth repeating when migrating the next panel:- Reordering siblings is a swap through `editor.reparent`, not an index write: `ItemIndex` is the document's to assign (`insertNode` renumbers the whole sibling list), and a move needs an anchor, since `reparent` appends without one and refuses an append into the parent the element already has. So "move later" moves the *next* sibling in front of this one.- A shared control that knows *which* prop it edits keyframes it itself, off an `Entity` (`ColorOpacityPicker`'s `keyframeTarget`, now koota's); only a control that cannot know takes the diamond as a slot (`ControlledTextField`, `ColorOpacityRow`). Moving one of these moves it whole: the bitecs panels still calling it lose their diamonds until they migrate, and its recent-colors palette now queries the koota world for them too (both providers are mounted).-Still on bitecs: transform, caption-settings, fills, shadows, effects, animations, transition, masks, audio, interpolation panels; the timeline's keyframe layer; the whole timeline UI.+Still on bitecs: transform, caption-settings, fills, effects, animations, transition, masks, audio, interpolation panels; the timeline's keyframe layer; the whole timeline UI.The stroke panel moved with the model: `StrokeStyle` is the stroke's, not the node's (as `<stroke width join cap miterLimit>` always was), so Weight/Join/Miter sit under each stroke's row instead of once per node. `<stroke>` is a solid paint that takes no paint children, so its picker is the color one alone, with no gradient or asset tab and no `FillPicker` behind it. `cap` still has no control (it shows only on open paths, and there are no icons for it).+The shadow panel kept the shape it had: a row per `<shadow>` opening a floating inspector, since nothing in the shadow model moved the way the stroke's line style did. The one thing it says that the file does not is what "Add shadow" authors (`opacity` 0.25, `blur` 4, `offsetY` 4): `<shadow>`'s own defaults are all zero, which casts the silhouette back onto itself, so a shadow added from the panel has to spell out where it sits. Every control unsets at the prop's default (0 for the offsets and the blur, 1 for opacity); `color` is required and always written.+Two deliberate departures from the old text panel: `letterSpacing` is shown in px (the trait's unit and the prop's; the bitecs panel showed the same number as a percentage), and the font a text is set in — family, weight, size — is written out plainly rather than unset at its default, since a font is what a text *is* and not a modifier of it. `<captions>` has no host yet, so the caption half of the panel is unreachable and was carried over as it stood.**Left stale on purpose** (deferred to a docs/examples pass): the eight `examples/*.tsx` still open with `<rect scene="...">` and no `<stage>`, so `tsc -p examples --noEmit` fails on them, and `reference/jsx/*` still describes the pre-`<stage>` model and `key` as the `syncTo` target. `reference/jsx` is stale as a whole; patching rows piecemeal would hide that.