/** * Generates the TqMotion wrapper around framer-motion. Motion is a CONTAINER * widget: it renders its children inside a `` and animates them * according to the same semantic contract used by the SolidJS canvas renderer * (see packages/renderer motion-runtime) — preset/easing/keyframe logic is kept * identical so the published site matches the canvas. * * Triggers: on-load (initial/animate), in-view (useInView-driven + a standing * in-viewport failsafe so content is never trapped at opacity:0 — any element * that is genuinely on screen reveals even if the IntersectionObserver never * reports it), scroll (scroll-linked: useScroll progress — windowed by * scrollOffset, optionally useSpring-smoothed by scrub — interpolates the FULL * from/to state onto the element, matching the canvas runtime), hover * (whileHover), tap (whileTap). `stagger` descends through grid/list wrappers to the real * repeated items (e.g. cards) and cascades THOSE with a per-child * delay — not the lone grid block — matching the canvas renderer. When ANY node it * would wrap comes from a runtime / (build-time opaque, so * its items can't be wrapped individually), it degrades to a single GROUP animation * rather than wrapping that node in a lone block — that block would sit between the * grid/flex container and its items and collapse them into one cell. That holds * whether the repeater is the container's only child or sits beside static siblings. * Honors prefers-reduced-motion. framer-motion * requires React 18 — the Next project plugin bumps react/react-dom accordingly. * * ## ⛔ A STAGGER MUST NOT ADD A DOM NODE (run c133d485, "How the Appointment Works") * * The cascade used to wrap every target in its own ``. The canvas does * the opposite: `runMotion` writes the tween straight onto the target elements' * inline style and adds NOTHING to the tree. So the published DOM gained a box the * canvas never had, sitting exactly between a layout container and its items — and * every declaration the author aimed at those items stopped reaching the boxes the * container was laying out: * * ```html *
*
…
x4 * ``` * * published as `.process-rail > div > .process-step-card`, so the flex items were * the anonymous wrappers (`flex: 0 1 auto`), `flex-basis: 380px` reached nothing, * each wrapper shrink-wrapped to its copy's max-content — 1500px — and the rail * measured 6096px against a 1056px viewport. Measured live on the deployed site. * The same wrapper is why `:nth-child()` dies once published (see * `bake-structural-pseudo-classes.ts` in the generation service). * * The cascade is therefore applied IN PLACE: each target is cloned with the * animated CSS on its own `style`, driven by a CSS transition whose delay carries * the per-index offset. Same curves, same keyframes, same order — and the * published tree is the canvas tree. Two shapes fall back to the single group * animation rather than re-introducing a wrapper: a target that is not a plain DOM * element (a component is free to drop an injected `style`), and a `repeat` other * than 0 (a CSS transition plays exactly once). */ export declare const generateMotionComponentCode: () => string; //# sourceMappingURL=motion-component.d.ts.map