/** * @file canvas-lib.tsx — dev-server-bundled canvas library * @scope apps/studio/canvas-lib.tsx * Ships with the dev-server install; resolved at canvas build time * via the `@maude/canvas-lib` virtual specifier. Per DDR-025, this * is the single source of truth — no project-side copy. * @purpose Shared primitives + helpers + hooks for every TSX canvas * (UI mocks + DS specimens). Imported via the virtual module * specifier `@maude/canvas-lib`, which the dev-server's Bun.build * resolver maps to this file. On /design:handoff the used exports * are AST-inlined into the emitted registry-item so the consumer * never sees the `@maude/canvas-lib` specifier. * * Exports (cold-reader cheat sheet): * * Frame envelope ───────────────────────────────────────────────────────── * DesignCanvas Root wrapper.
holding a * transformable
world plane. * DCArtboard children inside the world are absolutely * positioned in world coords; pan/zoom (Phase 4 T2) * applies a single transform to the world plane. * DCSection Group label. Inside DesignCanvas it collapses to a * transparent wrapper (DCArtboard children take their * own world coords); standalone it keeps the legacy *
/

chrome for specimens. * DCArtboard Bordered artboard with SKU strip header. Inside * DesignCanvas it absolutely-positions itself in world * coords resolved from meta.layout (or default grid). * Standalone it renders a fixed-size block at its given * width/height (specimens / legacy uses). * DCPostIt