The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
Marketing and Kinetic: eight more code-drawn templates open to everyone
Adarsh73850dc25257
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.mdindex 9a214fea..0224a23e 100644--- a/docs/ARCHITECTURE.md+++ b/docs/ARCHITECTURE.md@@ -426,9 +426,9 @@ Each studio keeps its data and pure planner in `src/lib/`, its server module inMotion graphics drawn by code, in the brand's own fonts and colours, with the words exactly as typed. A **scene** is a pure function of a **recipe** (JSON: scene, seed, size, fps, length, the typed fields, the brand, the person's own files, control values, export settings) and an absolute time: `scene.plan(input)` lays the text out once (`layout.ts`: balanced lines, never cut, never re-cased, never split mid-word; a field that doesn't fit is reported as `overflow` and blocks the render) and builds a timeline of cues (`tween.ts`, on the named curves in `ease.ts`: Bézier, closed-form springs), and `plan.evaluate(t)` gives a display list (`display.ts`: groups with transforms, clips, masks and blends; rects, ellipses, paths with stroke trim, text runs, images) in design units (1080 on the short side, `sizes.ts`). Randomness is a hash of the seed and a key (`random.ts`); there is no clock, DOM or `Math.random` in `src/lib/motion`, so any frame can be seeked in any order (`tests/motion-scenes.test.ts`). `camera2d.ts` is a 2.5D camera with parallax by depth. The browser half: `draw.ts` (`drawDisplayList`, the only code that draws a list, and SVG logo outlines read with the browser's SVG engine), `fonts.ts` (an export waits for the brand font or stops), `player.tsx` (the live preview: absolute time on animation frames, pauses off screen or in a hidden tab, rest frame for reduced motion, a smaller backing store on slow devices), `render.ts` (`renderClip`: frame i at i / fps, motion blur from shutter samples never across a cut, as many per frame as its fastest edge needs (`listTravel` in `display.ts`: one for a frame that barely moves, up to 48), WebCodecs H.264 MP4 from the canvas itself, else VP8 WebM, else the recorder) and `save.ts` (`saveMotionResult`: `POST /api/uploads` sent with `x-fuobe-kinetic: 1`, which any account may send for an MP4 or WebM clip or a PNG poster, within its space and upload limits, since no model makes them; then `POST /api/generations/local` with model `local-motion`, op `motion` and the recipe in `params.extra.motion`; nothing is downloaded from the page). Phase 1 ships the end card's five styles (`scenes/end-card/`: Draw-on, Rise, Iris, Split, Glint), whose rest frame is the still card's own layout (`planEndCard` and `renderEndCard` use the same `endCardRest` and drawer). The rest layout sizes type from the frame's short side, keeps a tall card's bottom fifth clear, and sets the words and pill in the kit colour that reads best on the brand colour (`cardColours`). Each style opens a few frames into its motion (`lead`), is readable by about 0.9 s of a 2.5 s card (`settled`), then a slow push-in (`CAMERA_FROM`, the `drift` curve) comes home on the last frame (`rest`, the poster); `signature` is the frame the style chooser shows. A saved clip carries its poster in `output.meta.poster`. Click to Ad joins the rendered card after the ad: in the cloud with its silent track and `merge-videos`, on the open engine with `oss-join-sound1`, which re-encodes the ad at 25 fps (the still card's `oss-append-endcard` copies the ad's picture instead); the open path has not yet been run end to end on a GPU.-**The Kinetic page (`/kinetic`, `src/app/(studio)/kinetic/page.tsx`, `src/components/kinetic/*`).** A static page whose studio runs in the browser (the address names a `scene`, an end card's `style`, or `from=<result>` to remix a saved one). `src/lib/motion/kinetic-catalog.ts` is the bundled scene list (the ten code templates, their slugs, which take a clip, and their motion groups from `kinetic-groups.ts`: every event of every scene in exactly one named group); `edit.ts` holds the editor's pure parts (shot windows, motion groups retimed by a monotone warp and a rate held inside their shot, the camera's clock, parameter tracks, the extra camera that always comes home on the last frame, presets worked out from the values, never stored); `finish.ts` the grade and seeded grain; `video-layer.ts` the person's own clip under the words (five scenes). The recipe gains optional `motion`, `finish`, `camera`, `look`, `groups`, `tracks`, `layers.video`, 60 fps and `export.quality` (`v` stays 1; a recipe without them draws exactly as before, `tests/motion-identity.test.ts`). The two scene wrappers (`marketingScene`, `endCardScene`) apply them, so no scene file changes. Saves: a clip (`kinetic`), a frame, a 9-frame contact sheet and versions (`kinetic-frame`, `kinetic-sheet`, `kinetic-version`, PNG pictures) through `save.ts`; undo and redo last the visit, a draft stays in the browser. `/api/generations/local` records each Kinetic result with its pixel size (a picture's own header must match its recipe). The Canvas "Kinetic" node (`components/canvas/kinetic-node.tsx`) renders in the owner's tab once per Table row and feeds Output nodes: it waits for the upstream nodes its run started, renders one node at a time per tab, skips a row that fails, keeps what it made even when stopped, and reuses a row by what it was made from.+**The Kinetic page (`/kinetic`, `src/app/(studio)/kinetic/page.tsx`, `src/components/kinetic/*`).** A static page whose studio runs in the browser (the address names a `scene`, an end card's `style`, or `from=<result>` to remix a saved one). `src/lib/motion/kinetic-catalog.ts` is the bundled scene list (the eighteen code templates, their slugs, which take a clip, and their motion groups from `kinetic-groups.ts`: every event of every scene in exactly one named group); `edit.ts` holds the editor's pure parts (shot windows, motion groups retimed by a monotone warp and a rate held inside their shot, the camera's clock, parameter tracks, the extra camera that always comes home on the last frame, presets worked out from the values, never stored); `finish.ts` the grade and seeded grain; `video-layer.ts` the person's own clip under the words (five scenes). The recipe gains optional `motion`, `finish`, `camera`, `look`, `groups`, `tracks`, `layers.video`, 60 fps and `export.quality` (`v` stays 1; a recipe without them draws exactly as before, `tests/motion-identity.test.ts`). The two scene wrappers (`marketingScene`, `endCardScene`) apply them, so no scene file changes. Saves: a clip (`kinetic`), a frame, a 9-frame contact sheet and versions (`kinetic-frame`, `kinetic-sheet`, `kinetic-version`, PNG pictures) through `save.ts`; undo and redo last the visit, a draft stays in the browser. `/api/generations/local` records each Kinetic result with its pixel size (a picture's own header must match its recipe). The Canvas "Kinetic" node (`components/canvas/kinetic-node.tsx`) renders in the owner's tab once per Table row and feeds Output nodes: it waits for the upstream nodes its run started, renders one node at a time per tab, skips a row that fails, keeps what it made even when stopped, and reuses a row by what it was made from.-**Marketing templates drawn by code.** Ten Marketing Studio templates are Kinetic Motion scenes instead of model prompts (`render: "code"` in `catalog/marketing.ts`, with their `scene`, typed `fields` and `easy` choices): Kinetic Headline, Line-Art Reveal, Logo Sting, Feature Cards, Dashboard Zoom, Retro Starburst, and the new Offer Badge, Big Number, Five-Star Quote and Logo End Card (the five end-card styles as its Style choice). The scenes are in `src/lib/motion/scenes/marketing/` (`kit.ts`: the light, dark and brand-colour looks from the kit with every word at 4.5:1 or more, the safe area, the pace, the tabular rolling counter, `*stars*` that mark a highlighted word and are never drawn); `outline.ts` traces a cut-out picture's edge from its transparency (marching squares, then Ramer–Douglas–Peucker) for Line-Art Reveal, and a photo without one gets a traced frame. `template.ts` turns what the template's panel holds (words, choices, size, length 5–15 s, brand, picture) into the recipe; `showcase.ts` holds the fictional brands each template opens with. The panel (`components/marketing/kinetic-template.tsx` with `components/motion/{fields,easy-chips,brand-row,made-strip}.tsx`) replaces the composer for these templates: anyone can type and play, Save renders in the tab and records the clip as `feature: "marketing-kinetic"` through `save.ts` (the same upload rule as any file; a guest gets the sign-up card and an account with neither its own GPU nor a key the Connect card before anything renders), and "Made with this template" lists the saved clips, which open in the result viewer. Their covers are rendered by the engine itself: `scripts/kinetic/render-covers.mjs` plays each showcase on the development-only page `/dev/kinetic-covers` and writes cover masters (`meta.json` `rest`: `"end"`, or the seconds of the moment the words are all set), then `pnpm eval:covers --templates` versions them into `public/previews/templates/marketing/`.+**Marketing templates drawn by code.** Eighteen Marketing Studio templates are Kinetic Motion scenes instead of model prompts (`render: "code"` in `catalog/marketing.ts`, with their `scene`, typed `fields` and `easy` choices): Kinetic Headline, Line-Art Reveal, Logo Sting, Feature Cards, Dashboard Zoom, Retro Starburst, Offer Badge, Big Number, Five-Star Quote and Logo End Card (the five end-card styles as its Style choice), and the poster templates Midnight Drop, Nocturne, Season Finale, Prism Stage, Marquee, Runway Titles, Stat Stack and Kind Words. The scenes are in `src/lib/motion/scenes/marketing/` (`kit.ts`: the light, dark and brand-colour looks from the kit with every word at 4.5:1 or more, the safe area, the pace, the tabular rolling counter, `*stars*` that mark a highlighted word and are never drawn); `outline.ts` traces a cut-out picture's edge from its transparency (marching squares, then Ramer–Douglas–Peucker) for Line-Art Reveal, and a photo without one gets a traced frame. `template.ts` turns what the template's panel holds (words, choices, size, length 5–15 s, brand, picture) into the recipe; `showcase.ts` holds the fictional brands each template opens with. The panel (`components/marketing/kinetic-template.tsx` with `components/motion/{fields,easy-chips,brand-row,made-strip}.tsx`) replaces the composer for these templates: anyone can type and play, Save renders in the tab and records the clip as `feature: "marketing-kinetic"` through `save.ts` (the same upload rule as any file; a guest gets the sign-up card and an account with neither its own GPU nor a key the Connect card before anything renders), and "Made with this template" lists the saved clips, which open in the result viewer. Their covers are rendered by the engine itself: `scripts/kinetic/render-covers.mjs` plays each showcase on the development-only page `/dev/kinetic-covers` and writes cover masters (`meta.json` `rest`: `"end"`, or the seconds of the moment the words are all set), then `pnpm eval:covers --templates` versions them into `public/previews/templates/marketing/`.## ComfyUI workflow library (`workflows/comfyui/`, `scripts/comfy/`)diff --git a/src/lib/catalog/marketing.ts b/src/lib/catalog/marketing.tsindex 6a5748de..2061c5cc 100644--- a/src/lib/catalog/marketing.ts+++ b/src/lib/catalog/marketing.ts@@ -425,10 +425,10 @@ export const TEMPLATES: MarketingTemplate[] = [t("m2-comic-panels", "Comic Panels", "motion-2d", { scene: "split", hue: 50, hue2: 0 }, "Pop-art comic panels flip one after another, each showing the product from a new angle with halftone dots and bold outlines", { duration: 5 }),t("m2-retro-starburst", "Retro Starburst", "motion-2d", { scene: "burst", hue: 25, hue2: 330 }, "A rotating retro starburst background in warm colours while the product spins slowly in the centre, groovy 70s motion graphics", code("marketing/starburst", [field("headline", "Headline", 40, 2), field("badge", "Badge", 12, 2), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { picture: "product", aspect: "9:16" })),t("m2-offer-badge", "Offer Badge", "motion-2d", { scene: "badge", hue: 350, hue2: 40 }, "A starburst offer badge pops and turns, the product slides in under it and the call to action follows", code("marketing/offer-badge", [field("offer", "Offer", 14, 2), field("headline", "Headline", 40, 2), field("cta", "Call to action", 24), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { picture: "product", aspect: "9:16" })),- t("m2-midnight-drop", "Midnight Drop", "motion-2d", { scene: "kinetic", hue: 15, hue2: 0, dark: true }, "A launch countdown: the drop's name cuts in huge, the countdown flips into place tile by tile and the time and call to action follow on a dark field of moving light", { ...code("marketing/drop-countdown", [field("headline", "Drop name", 28, 2), field("count", "Countdown", 12, 1, "Type it as it should read, e.g. 03:12:45"), field("when", "When", 32), field("cta", "Call to action", 24), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { aspect: "9:16" }), ownerOnly: true }),- t("m2-nocturne", "Nocturne", "motion-2d", { scene: "noir", hue: 40, hue2: 270, dark: true }, "A fragrance reveal: ribbons of light cross a night field, the bottle rises into a pool of light and a fine serif name settles over it", { ...code("marketing/fragrance-reveal", [field("headline", "Name", 40, 2), field("line", "Line", 60, 2), field("cta", "Call to action", 24), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { picture: "product", aspect: "9:16" }), ownerOnly: true }),- t("m2-season-finale", "Season Finale", "motion-2d", { scene: "type", hue: 8, hue2: 30 }, "An editorial sale poster: a fashion photo, the sale in huge condensed type that bleeds off the frame, the offer on a highlighter and a tilted pill", { ...code("marketing/editorial-sale", [field("headline", "Headline", 24, 2), field("offer", "Offer", 28, 2), field("cta", "Call to action", 24), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { picture: "photo", aspect: "4:5" }), ownerOnly: true }),- t("m2-prism-stage", "Prism Stage", "motion-2d", { scene: "pedestal", hue: 150, hue2: 45, dark: true }, "A glass product spotlight: the product stands on a glass plinth inside rings of light while its name and a short line set beside it", { ...code("marketing/glass-spotlight", [field("headline", "Headline", 40, 2), field("line", "Line", 60, 2), field("cta", "Call to action", 24), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { picture: "product", aspect: "4:5" }), ownerOnly: true }),+ t("m2-midnight-drop", "Midnight Drop", "motion-2d", { scene: "kinetic", hue: 15, hue2: 0, dark: true }, "A launch countdown: the drop's name cuts in huge, the countdown flips into place tile by tile and the time and call to action follow on a dark field of moving light", code("marketing/drop-countdown", [field("headline", "Drop name", 28, 2), field("count", "Countdown", 12, 1, "Type it as it should read, e.g. 03:12:45"), field("when", "When", 32), field("cta", "Call to action", 24), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { aspect: "9:16" })),+ t("m2-nocturne", "Nocturne", "motion-2d", { scene: "noir", hue: 40, hue2: 270, dark: true }, "A fragrance reveal: ribbons of light cross a night field, the bottle rises into a pool of light and a fine serif name settles over it", code("marketing/fragrance-reveal", [field("headline", "Name", 40, 2), field("line", "Line", 60, 2), field("cta", "Call to action", 24), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { picture: "product", aspect: "9:16" })),+ t("m2-season-finale", "Season Finale", "motion-2d", { scene: "type", hue: 8, hue2: 30 }, "An editorial sale poster: a fashion photo, the sale in huge condensed type that bleeds off the frame, the offer on a highlighter and a tilted pill", code("marketing/editorial-sale", [field("headline", "Headline", 24, 2), field("offer", "Offer", 28, 2), field("cta", "Call to action", 24), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { picture: "photo", aspect: "4:5" })),+ t("m2-prism-stage", "Prism Stage", "motion-2d", { scene: "pedestal", hue: 150, hue2: 45, dark: true }, "A glass product spotlight: the product stands on a glass plinth inside rings of light while its name and a short line set beside it", code("marketing/glass-spotlight", [field("headline", "Headline", 40, 2), field("line", "Line", 60, 2), field("cta", "Call to action", 24), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { picture: "product", aspect: "4:5" })),t("m2-grid-shuffle", "Grid Shuffle", "motion-2d", { scene: "cards", hue: 200, hue2: 280 }, "A Swiss-style grid of colour tiles shuffles and slides; one tile opens to reveal the product, crisp geometric transitions", { duration: 5 }),// Motion · hypermotion@@ -446,8 +446,8 @@ export const TEMPLATES: MarketingTemplate[] = [t("mm-riso-loop", "Riso Loop", "motion-mixed", { scene: "type", hue: 350, hue2: 210 }, "Risograph-print look with grain and slight misregistration; the product cycles through two-colour duotone frames"),t("mm-y2k-desktop", "Y2K Desktop", "motion-mixed", { scene: "cards", hue: 190, hue2: 300 }, "A Y2K computer desktop: pop-up windows, chrome icons and a cursor open a window that shows the product"),t("mm-clay-diorama", "Clay Diorama", "motion-mixed", { scene: "pedestal", hue: 20, hue2: 140 }, "Claymation diorama: tiny clay props and a little set animate in stop motion around the real product"),- t("mm-marquee", "Marquee", "motion-mixed", { scene: "noir", hue: 280, hue2: 30, dark: true }, "An event announcement: a night photo, the event's name lit up in big warm type, the date, the place and the call to action set on the grid", { ...code("marketing/announcement", [field("headline", "Event", 32, 2), field("when", "When", 40), field("place", "Where", 48), field("cta", "Call to action", 24), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { picture: "photo", aspect: "9:16" }), ownerOnly: true }),- t("mm-runway-titles", "Runway Titles", "motion-mixed", { scene: "model", hue: 40, hue2: 20 }, "Fashion lookbook titles: a full-bleed editorial photo, a giant title cut in letter by letter with a script word laid over it and tiny facts in the corners", { ...code("marketing/lookbook", [field("headline", "Title", 28, 2), field("accent", "Script word", 20), field("line", "Line", 48), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { picture: "photo", aspect: "4:5" }), ownerOnly: true }),+ t("mm-marquee", "Marquee", "motion-mixed", { scene: "noir", hue: 280, hue2: 30, dark: true }, "An event announcement: a night photo, the event's name lit up in big warm type, the date, the place and the call to action set on the grid", code("marketing/announcement", [field("headline", "Event", 32, 2), field("when", "When", 40), field("place", "Where", 48), field("cta", "Call to action", 24), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { picture: "photo", aspect: "9:16" })),+ t("mm-runway-titles", "Runway Titles", "motion-mixed", { scene: "model", hue: 40, hue2: 20 }, "Fashion lookbook titles: a full-bleed editorial photo, a giant title cut in letter by letter with a script word laid over it and tiny facts in the corners", code("marketing/lookbook", [field("headline", "Title", 28, 2), field("accent", "Script word", 20), field("line", "Line", 48), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { picture: "photo", aspect: "4:5" })),t("mm-halftone-collage", "Halftone Collage", "motion-mixed", { scene: "split", hue: 0, hue2: 50 }, "Halftone street-poster collage: cut-out shapes and the product slide in with punchy, rhythmic cuts"),// Motion · SaaS@@ -459,8 +459,8 @@ export const TEMPLATES: MarketingTemplate[] = [t("ms-end-card", "Logo End Card", "motion-saas", { scene: "headline", hue: 160, hue2: 45, dark: true }, "An animated end card: the logo draws on, the line rises and the call-to-action pill pops", code("end-card/draw-on", [field("product", "Line", 60, 2), field("cta", "Call to action", 24), field("website", "Web address", 40)], { aspect: "9:16", duration: 4, lengths: { min: 2, max: 5, default: 4 }, easy: [{ id: "style", label: "Style", scene: "end-card", choices: [{ id: "draw-on", label: "Draw-on" }, { id: "rise", label: "Rise" }, { id: "iris", label: "Iris" }, { id: "split", label: "Split" }, { id: "glint", label: "Glint" }] }, { id: "mark", label: "Mark", choices: [{ id: "logo", label: "Logo" }, { id: "name", label: "Name" }] }] })),t("ms-dashboard-zoom", "Dashboard Zoom", "motion-saas", { scene: "cards", hue: 160, hue2: 220, dark: true }, "The camera pushes into a sleek dark dashboard; charts animate up and a key number counts to its value", code("marketing/stat-dashboard", [field("stat", "Key number", 16, 1, "Type it as it should read, e.g. $1,284,000"), field("label", "What it measures", 60, 2), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { aspect: "4:5" })),t("ms-feature-cards", "Feature Cards", "motion-saas", { scene: "cards", hue: 250, hue2: 200 }, "Clean SaaS motion design: rounded feature cards fly in and stack, each one highlighting a benefit, soft gradients and smooth easing", code("marketing/feature-cards", [field("headline", "Headline", 60, 2), field("point1", "First benefit", 60, 2), field("point2", "Second benefit", 60, 2), field("point3", "Third benefit", 60, 2), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { aspect: "4:5" })),- t("ms-stat-stack", "Stat Stack", "motion-saas", { scene: "headline", hue: 220, hue2: 15 }, "Three big numbers stacked on an editorial grid, each rolling up to its value with its label, the brand signing off at the foot", { ...code("marketing/stat-stack", [field("stat1", "First number", 10, 1, "Type it as it should read, e.g. 98%"), field("label1", "What it measures", 40), field("stat2", "Second number", 10), field("label2", "What it measures", 40), field("stat3", "Third number", 10), field("label3", "What it measures", 40), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { aspect: "4:5" }), ownerOnly: true }),- t("ms-kind-words", "Kind Words", "motion-saas", { scene: "stars", hue: 210, hue2: 40 }, "A testimonial carousel: three customers' words slide through one after another on cards, each with its stars and name", { ...code("marketing/testimonials", [field("quote1", "First quote", 120, 3), field("name1", "Name", 40), field("quote2", "Second quote", 120, 3), field("name2", "Name", 40), field("quote3", "Third quote", 120, 3), field("name3", "Name", 40), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { aspect: "4:5" }), ownerOnly: true }),+ t("ms-stat-stack", "Stat Stack", "motion-saas", { scene: "headline", hue: 220, hue2: 15 }, "Three big numbers stacked on an editorial grid, each rolling up to its value with its label, the brand signing off at the foot", code("marketing/stat-stack", [field("stat1", "First number", 10, 1, "Type it as it should read, e.g. 98%"), field("label1", "What it measures", 40), field("stat2", "Second number", 10), field("label2", "What it measures", 40), field("stat3", "Third number", 10), field("label3", "What it measures", 40), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { aspect: "4:5" })),+ t("ms-kind-words", "Kind Words", "motion-saas", { scene: "stars", hue: 210, hue2: 40 }, "A testimonial carousel: three customers' words slide through one after another on cards, each with its stars and name", code("marketing/testimonials", [field("quote1", "First quote", 120, 3), field("name1", "Name", 40), field("quote2", "Second quote", 120, 3), field("name2", "Name", 40), field("quote3", "Third quote", 120, 3), field("name3", "Name", 40), field("website", "Web address", 40), field("note", "Corner note", 24, 1, "A small fact for the corner, e.g. Collection 07 or Est. 2019")], { aspect: "4:5" })),// UGC · talking headt("ugc-honest-review", "Honest Review", "ugc-talking", { scene: "selfie", hue: 25, hue2: 200 }, "A relaxed, honest review straight to the phone camera: what they liked, one small catch and why they'd still buy it again", { setting: "bedroom" }),diff --git a/src/lib/motion/kinetic-catalog.ts b/src/lib/motion/kinetic-catalog.tsindex 9e3724fb..fecdfc27 100644--- a/src/lib/motion/kinetic-catalog.ts+++ b/src/lib/motion/kinetic-catalog.ts@@ -13,7 +13,25 @@ import type { ScenePlan } from "./scene";import { SHOWCASES, showcaseRecipe } from "./showcase";import { initialState, templateLengths, templateRecipe, templateSizes, type TemplateBrand } from "./template";-export type KineticSlug = "kinetic-headline" | "line-reveal" | "logo-sting" | "feature-cards" | "stat-dashboard" | "starburst" | "offer-badge" | "big-number" | "quote" | "end-card";+export type KineticSlug =+ | "kinetic-headline"+ | "line-reveal"+ | "logo-sting"+ | "feature-cards"+ | "stat-dashboard"+ | "starburst"+ | "offer-badge"+ | "big-number"+ | "quote"+ | "end-card"+ | "drop-countdown"+ | "fragrance-reveal"+ | "editorial-sale"+ | "glass-spotlight"+ | "announcement"+ | "lookbook"+ | "stat-stack"+ | "testimonials";export interface KineticEntry {slug: KineticSlug;@@ -39,6 +57,14 @@ const ORDER: { slug: KineticSlug; template: string; blurb: string }[] = [{ slug: "logo-sting", template: "ms-logo-sting", blurb: "Your name comes into focus in polished metal, and your mark lands last." },{ slug: "feature-cards", template: "ms-feature-cards", blurb: "Three cards slide in under a big headline, one benefit each." },{ slug: "stat-dashboard", template: "ms-dashboard-zoom", blurb: "The camera pushes into a dashboard as a key number counts up." },+ { slug: "drop-countdown", template: "m2-midnight-drop", blurb: "Your drop's name cuts in huge, then a countdown flips into place tile by tile." },+ { slug: "fragrance-reveal", template: "m2-nocturne", blurb: "Ribbons of light cross the night as your bottle rises under a fine serif name." },+ { slug: "editorial-sale", template: "m2-season-finale", blurb: "Your sale in huge type beside a fashion photo, the offer on a highlighter." },+ { slug: "glass-spotlight", template: "m2-prism-stage", blurb: "Your product stands on a glass plinth in rings of light, its name beside it." },+ { slug: "announcement", template: "mm-marquee", blurb: "Your event's name lights up over a night photo, with the date and place." },+ { slug: "lookbook", template: "mm-runway-titles", blurb: "A giant title cuts in letter by letter over a full-bleed fashion photo." },+ { slug: "stat-stack", template: "ms-stat-stack", blurb: "Three big numbers roll up on an editorial grid, each with its label." },+ { slug: "testimonials", template: "ms-kind-words", blurb: "Three customers' words slide through on cards, each with its stars and name." },{ slug: "line-reveal", template: "m2-line-reveal", blurb: "One line draws your product, then the real product fills in." },{ slug: "starburst", template: "m2-retro-starburst", blurb: "A retro starburst turns behind your product and headline." },{ slug: "offer-badge", template: "m2-offer-badge", blurb: "An offer badge lands beside your product under a bold headline." },diff --git a/tests/__snapshots__/home-studios.html b/tests/__snapshots__/home-studios.htmlindex 91f34b73..e1e26760 100644--- a/tests/__snapshots__/home-studios.html+++ b/tests/__snapshots__/home-studios.html@@ -105,7 +105,7 @@</svg></span></p>-<p class="mt-0.5 text-[12px] leading-snug text-muted-foreground">From a product link to a finished ad. 88 ad templates.</p>+<p class="mt-0.5 text-[12px] leading-snug text-muted-foreground">From a product link to a finished ad. 96 ad templates.</p></div></a></div>diff --git a/tests/e2e/kinetic-page.mjs b/tests/e2e/kinetic-page.mjsindex 027df26e..173daf63 100644--- a/tests/e2e/kinetic-page.mjs+++ b/tests/e2e/kinetic-page.mjs@@ -6,7 +6,7 @@//// KINETIC_PORT moves the app (and the stand-in to the next port).//-// Guest (390 and 1440, light and dark): the opening screen shows the four examples and the ten scenes; an example opens+// Guest (390 and 1440, light and dark): the opening screen shows the four examples and every scene; an example opens// the editor and its preview plays; Easy and Pro work; a Motion preset reads "Custom" after a slider move, and Undo and// Redo bring it back and forth; Save, Save frame and Save version each open the sign-up card before any upload.// Owner: Big Number with the Film look, a Slow push and a retimed group, saved at 60 fps (its MP4 has duration × 60@@ -175,7 +175,7 @@ try {await gp.goto("/kinetic", { waitUntil: "load", timeout: 240_000 });await gp.locator("[data-kinetic-picker]:visible").first().waitFor({ timeout: 120_000 });check((await gp.locator("[data-kinetic-examples] [data-kinetic-tile]").count()) === 4, `guest ${name}: four examples`);- check((await gp.locator("[data-kinetic-scenes] [data-kinetic-tile]").count()) === 10, `guest ${name}: all ten scenes`);+ check((await gp.locator("[data-kinetic-scenes] [data-kinetic-tile]").count()) === 18, `guest ${name}: all eighteen scenes`);check((await gp.locator("[data-kinetic-made-strip]").count()) === 0, `guest ${name}: no Made in Kinetic strip`);await layout(gp, `guest ${name}`, "picker", false);await gp.screenshot({ path: path.join(out, `guest-picker-${name}.png`), fullPage: true });diff --git a/tests/e2e/kinetic-webkit.mjs b/tests/e2e/kinetic-webkit.mjsindex 952a9ab1..f7e463e4 100644--- a/tests/e2e/kinetic-webkit.mjs+++ b/tests/e2e/kinetic-webkit.mjs@@ -137,7 +137,7 @@ try {await gp.goto("/kinetic", { waitUntil: "load", timeout: 120_000 });await gp.locator("[data-kinetic-picker]:visible").first().waitFor({ timeout: 60_000 });check((await gp.locator("[data-kinetic-examples] [data-kinetic-tile]").count()) === 4, `guest ${name}: four examples`);- check((await gp.locator("[data-kinetic-scenes] [data-kinetic-tile]").count()) === 10, `guest ${name}: all ten scenes`);+ check((await gp.locator("[data-kinetic-scenes] [data-kinetic-tile]").count()) === 18, `guest ${name}: all eighteen scenes`);// The examples are drawn by the engine (a canvas each, not blank).await gp.waitForFunction(() => document.querySelectorAll("[data-kinetic-examples] canvas").length === 4, null, { timeout: 60_000 }).catch(() => {});await gp.waitForTimeout(1500);diff --git a/tests/kinetic-catalog.test.ts b/tests/kinetic-catalog.test.tsindex 7cafcb72..d91b7a63 100644--- a/tests/kinetic-catalog.test.ts+++ b/tests/kinetic-catalog.test.ts@@ -8,12 +8,33 @@ import { templateLengths, templateSizes } from "@/lib/motion/template";import { templateCover } from "@/lib/template-covers";import { measure, RASTER_LOGO } from "./helpers/motion";-// The scene list bundled with /kinetic: ten scenes from the code templates (the owner-only ones join later), and every-// animation step of every scene in exactly one named motion group (so no visitor ever sees an internal id).+// The scene list bundled with /kinetic: a scene for every code template a visitor sees, and every animation step of+// every scene in exactly one named motion group (so no visitor ever sees an internal id).describe("the Kinetic scene catalogue", () => {- it("has the ten scenes with their slugs and every template field", () => {- expect(KINETIC_SLUGS.sort()).toEqual(["big-number", "end-card", "feature-cards", "kinetic-headline", "line-reveal", "logo-sting", "offer-badge", "quote", "starburst", "stat-dashboard"]);+ it("has the eighteen scenes with their slugs and every template field", () => {+ expect([...KINETIC_SLUGS].sort()).toEqual(+ [+ "announcement",+ "big-number",+ "drop-countdown",+ "editorial-sale",+ "end-card",+ "feature-cards",+ "fragrance-reveal",+ "glass-spotlight",+ "kinetic-headline",+ "line-reveal",+ "logo-sting",+ "lookbook",+ "offer-badge",+ "quote",+ "starburst",+ "stat-dashboard",+ "stat-stack",+ "testimonials",+ ].sort(),+ );const code = TEMPLATES.filter((t) => t.render === "code" && !t.ownerOnly).map((t) => t.id);expect(KINETIC_SCENES.map((e) => e.template).sort()).toEqual([...code].sort());for (const e of KINETIC_SCENES) {diff --git a/tests/kinetic-poster-editor.test.ts b/tests/kinetic-poster-editor.test.tsindex 1c745980..7a569d90 100644--- a/tests/kinetic-poster-editor.test.ts+++ b/tests/kinetic-poster-editor.test.ts@@ -9,8 +9,8 @@ import { initialState, templateRecipe } from "@/lib/motion/template";import { measure, RASTER_LOGO } from "./helpers/motion";// The poster scenes inside Kinetic's editor and the gallery: the brand's own fonts when the person picks them, the-// Pro controls (pace, camera, finish), a gallery cover's clip that opens on its finished poster, and the new templates-// kept to the owner until they are ready.+// Pro controls (pace, camera, finish), a gallery cover's clip that opens on its finished poster, and every code template+// open to everyone.const tpl = (id: string) => TEMPLATES.find((t) => t.id === id)!;const plan = async (r: Recipe) => (await loadScene(r.scene)).plan({ recipe: r, measure, logo: RASTER_LOGO, images: { product: { w: 800, h: 1024 }, photo: { w: 1024, h: 1536 } }, outlines: { product: null } });@@ -62,19 +62,21 @@ describe("gallery covers", () => {});});-describe("owner-only templates", () => {- it("are listed and opened for the owner alone", () => {- const hidden = TEMPLATES.filter((t) => t.ownerOnly).map((t) => t.id);- expect(hidden.length).toBeGreaterThan(0);- for (const id of hidden) expect(tpl(id).render, id).toBe("code");+describe("who sees the code templates", () => {+ it("lists and opens every one of them for everyone", () => {+ const code = TEMPLATES.filter((t) => t.render === "code").map((t) => t.id);+ expect(code.length).toBeGreaterThanOrEqual(18);const guest = templatesFor("all", "all").map((t) => t.id);- const owner = templatesFor("all", "all", true).map((t) => t.id);- for (const id of hidden) {- expect(guest).not.toContain(id);- expect(owner).toContain(id);- expect(visibleTemplate(tpl(id), false)).toBe(false);+ for (const id of code) {+ expect(guest, id).toContain(id);+ expect(visibleTemplate(tpl(id), false), id).toBe(true);}- // The ten Kinetic templates and the Logo End Card stay open to everyone.- for (const id of ["ms-kinetic-headline", "ms-big-number", "ms-end-card", "ms-five-star-quote", "ms-logo-sting", "ms-feature-cards", "ms-dashboard-zoom", "m2-line-reveal", "m2-retro-starburst", "m2-offer-badge"]) expect(guest, id).toContain(id);+ for (const id of ["m2-midnight-drop", "m2-nocturne", "m2-season-finale", "m2-prism-stage", "mm-marquee", "mm-runway-titles", "ms-stat-stack", "ms-kind-words"]) expect(guest, id).toContain(id);+ });++ it("still keeps a template marked for the owner to the owner", () => {+ const held = { ...tpl("ms-stat-stack"), ownerOnly: true as const };+ expect(visibleTemplate(held, false)).toBe(false);+ expect(visibleTemplate(held, true)).toBe(true);});});