From 7809838c05bad7b10cd5d00b77c078536bb026eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Mon, 15 Jun 2026 16:31:27 -0400 Subject: [PATCH 1/7] feat(registry): add Code Animations catalog section + 6 blocks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a "Code Animations" catalog section with six self-contained, deterministic code-animation blocks for building beautiful code-snippet videos: code-morph, code-snippet-flight, code-typing, code-diff, code-highlight, code-scroll. Each block reuses Shiki Magic Move's tokenizer + diff (baked at author time) and drives the motion as a paused GSAP timeline the engine seeks per frame — no CSS transitions, no render-time network. They group separately from the static code-snippet themes via a dedicated code-animation tag. - registry: 6 blocks (html + registry-item.json) + registry.json entries - catalog: 6 docs pages + a Code Animations nav group - studio: new code-animation block category (resolveBlockCategory keys on the code-animation tag; existing code-snippet themes are untouched) - generator: groupForItem maps code-animation -> Code Animations --- docs/catalog/blocks/code-diff.mdx | 44 + docs/catalog/blocks/code-highlight.mdx | 44 + docs/catalog/blocks/code-morph.mdx | 44 + docs/catalog/blocks/code-scroll.mdx | 44 + docs/catalog/blocks/code-snippet-flight.mdx | 44 + docs/catalog/blocks/code-typing.mdx | 44 + docs/docs.json | 11 + packages/core/src/registry/types.ts | 5 +- packages/studio/src/utils/blockCategories.ts | 4 +- registry/blocks/code-diff/code-diff.html | 1042 ++++++++++ registry/blocks/code-diff/registry-item.json | 24 + .../blocks/code-highlight/code-highlight.html | 985 +++++++++ .../blocks/code-highlight/registry-item.json | 24 + registry/blocks/code-morph/code-morph.html | 1431 +++++++++++++ registry/blocks/code-morph/registry-item.json | 24 + registry/blocks/code-scroll/code-scroll.html | 1795 +++++++++++++++++ .../blocks/code-scroll/registry-item.json | 24 + .../code-snippet-flight.html | 887 ++++++++ .../code-snippet-flight/registry-item.json | 24 + registry/blocks/code-typing/code-typing.html | 977 +++++++++ .../blocks/code-typing/registry-item.json | 24 + registry/registry.json | 24 + scripts/generate-catalog-pages.ts | 21 +- 23 files changed, 7579 insertions(+), 11 deletions(-) create mode 100644 docs/catalog/blocks/code-diff.mdx create mode 100644 docs/catalog/blocks/code-highlight.mdx create mode 100644 docs/catalog/blocks/code-morph.mdx create mode 100644 docs/catalog/blocks/code-scroll.mdx create mode 100644 docs/catalog/blocks/code-snippet-flight.mdx create mode 100644 docs/catalog/blocks/code-typing.mdx create mode 100644 registry/blocks/code-diff/code-diff.html create mode 100644 registry/blocks/code-diff/registry-item.json create mode 100644 registry/blocks/code-highlight/code-highlight.html create mode 100644 registry/blocks/code-highlight/registry-item.json create mode 100644 registry/blocks/code-morph/code-morph.html create mode 100644 registry/blocks/code-morph/registry-item.json create mode 100644 registry/blocks/code-scroll/code-scroll.html create mode 100644 registry/blocks/code-scroll/registry-item.json create mode 100644 registry/blocks/code-snippet-flight/code-snippet-flight.html create mode 100644 registry/blocks/code-snippet-flight/registry-item.json create mode 100644 registry/blocks/code-typing/code-typing.html create mode 100644 registry/blocks/code-typing/registry-item.json diff --git a/docs/catalog/blocks/code-diff.mdx b/docs/catalog/blocks/code-diff.mdx new file mode 100644 index 0000000000..d17740fa81 --- /dev/null +++ b/docs/catalog/blocks/code-diff.mdx @@ -0,0 +1,44 @@ +--- +title: "Code Diff" +description: "An edit shown as a colored diff — removed lines collapse in red, added lines expand in green." +--- + +# Code Diff + +An edit shown as a colored diff — removed lines collapse in red, added lines expand in green. + +`code` `code-animation` `diff` `developer` + +