From 55827f9594b1d2db86db39250c4b0179b8e195be Mon Sep 17 00:00:00 2001 From: ln-dev7 Date: Fri, 8 May 2026 10:08:02 +0100 Subject: [PATCH 1/2] chore: resync jsrepo registry items for curved-loop and text-pressure --- static/r/curved-loop.json | 2 +- static/r/text-pressure.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/static/r/curved-loop.json b/static/r/curved-loop.json index df352cf..1a74257 100644 --- a/static/r/curved-loop.json +++ b/static/r/curved-loop.json @@ -9,7 +9,7 @@ "type": "registry:component", "path": "CurvedLoop.svelte", "target": "$lib/components/svelte-bits/CurvedLoop.svelte", - "content": "\n\n\n\t\n\t\t{text}\n\t\t\n\t\t\t\n\t\t\n\t\t{#if ready}\n\t\t\t\n\t\t\t\t{totalText}\n\t\t\t\n\t\t{/if}\n\t\n\n\n\n" + "content": "\n\n\n\n\t\n\t\t{text}\n\t\t\n\t\t\t\n\t\t\n\t\t{#if ready}\n\t\t\t\n\t\t\t\t{totalText}\n\t\t\t\n\t\t{/if}\n\t\n\n\n\n" } ], "registryDependencies": [], diff --git a/static/r/text-pressure.json b/static/r/text-pressure.json index 065a2f3..ae813b4 100644 --- a/static/r/text-pressure.json +++ b/static/r/text-pressure.json @@ -9,7 +9,7 @@ "type": "registry:component", "path": "TextPressure.svelte", "target": "$lib/components/svelte-bits/TextPressure.svelte", - "content": "\n\n
\n\t\n\t\t{#each chars as char, i (i)}\n\t\t\t\n\t\t\t\t{char}\n\t\t\t\n\t\t{/each}\n\t\n
\n\n\n" + "content": "\n\n
\n\t\n\t\t{#each chars as char, i (i)}\n\t\t\t\n\t\t\t\t{char}\n\t\t\t\n\t\t{/each}\n\t\n
\n\n\n" } ], "registryDependencies": [], From 48bd5453861bf01478f3669cf27f07c4e64165d7 Mon Sep 17 00:00:00 2001 From: ln-dev7 Date: Fri, 8 May 2026 10:08:10 +0100 Subject: [PATCH 2/2] feat: add Scroll Velocity component MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Port of react-bits ScrollVelocity to Svelte 5 — a multi-row marquee whose horizontal scroll speed is augmented by spring-smoothed page-scroll velocity. --- .../docs/pages/ScrollVelocityDemo.svelte | 201 ++++++++++++++++++ src/lib/components/docs/pages/demoRegistry.ts | 1 + .../ScrollVelocity/ScrollVelocity.svelte | 157 ++++++++++++++ src/lib/constants/categories.ts | 1 + static/r/registry.json | 30 +++ static/r/scroll-velocity.json | 17 ++ 6 files changed, 407 insertions(+) create mode 100644 src/lib/components/docs/pages/ScrollVelocityDemo.svelte create mode 100644 src/lib/components/library/TextAnimations/ScrollVelocity/ScrollVelocity.svelte create mode 100644 static/r/scroll-velocity.json diff --git a/src/lib/components/docs/pages/ScrollVelocityDemo.svelte b/src/lib/components/docs/pages/ScrollVelocityDemo.svelte new file mode 100644 index 0000000..7519114 --- /dev/null +++ b/src/lib/components/docs/pages/ScrollVelocityDemo.svelte @@ -0,0 +1,201 @@ + + +Scroll Velocity - svelte-bits + +

Scroll Velocity

+ + + {#snippet preview()} +
+ replay++} /> + {#key replay} +
+ +
+ {/key} +
+ {/snippet} + {#snippet code()} + + {/snippet} + {#snippet customize()} + + { + velocity = v; + replay++; + }} + /> + { + numCopies = v; + replay++; + }} + /> + { + damping = v; + replay++; + }} + /> + { + stiffness = v; + replay++; + }} + /> + + {/snippet} + {#snippet propTable()} + + {/snippet} +
diff --git a/src/lib/components/docs/pages/demoRegistry.ts b/src/lib/components/docs/pages/demoRegistry.ts index 8fde416..b69d810 100644 --- a/src/lib/components/docs/pages/demoRegistry.ts +++ b/src/lib/components/docs/pages/demoRegistry.ts @@ -136,4 +136,5 @@ export const DOC_PAGE_REGISTRY: Record = { 'rotating-text': () => import('./RotatingTextDemo.svelte'), 'scroll-reveal': () => import('./ScrollRevealDemo.svelte'), 'ascii-text': () => import('./ASCIITextDemo.svelte'), + 'scroll-velocity': () => import('./ScrollVelocityDemo.svelte'), }; diff --git a/src/lib/components/library/TextAnimations/ScrollVelocity/ScrollVelocity.svelte b/src/lib/components/library/TextAnimations/ScrollVelocity/ScrollVelocity.svelte new file mode 100644 index 0000000..e0a1160 --- /dev/null +++ b/src/lib/components/library/TextAnimations/ScrollVelocity/ScrollVelocity.svelte @@ -0,0 +1,157 @@ + + + +
+ {#each texts as text, i (i)} +
+
+ {#each Array.from({ length: Math.max(numCopies, 1) }, (_, j) => j) as j (j)} + {#if j === 0} + {text}  + {:else} + {text}  + {/if} + {/each} +
+
+ {/each} +
+ + diff --git a/src/lib/constants/categories.ts b/src/lib/constants/categories.ts index ac60360..ac38359 100644 --- a/src/lib/constants/categories.ts +++ b/src/lib/constants/categories.ts @@ -307,6 +307,7 @@ export const IMPLEMENTED_DEMOS = new Set([ 'rotating-text', 'scroll-reveal', 'ascii-text', + 'scroll-velocity', ]); // Helper: is this subcategory label fully ported? diff --git a/static/r/registry.json b/static/r/registry.json index e450096..87c0032 100644 --- a/static/r/registry.json +++ b/static/r/registry.json @@ -1906,6 +1906,21 @@ } ] }, + { + "name": "decrypted-text", + "title": "Decrypted Text", + "description": "Scrambled-character reveal effect that decrypts a string on hover, click, or scroll-into-view, with sequential or random iteration modes.", + "type": "registry:component", + "dependencies": [], + "registryDependencies": [], + "files": [ + { + "type": "registry:component", + "path": "DecryptedText.svelte", + "target": "$lib/components/svelte-bits/DecryptedText.svelte" + } + ] + }, { "name": "falling-text", "title": "Falling Text", @@ -2044,6 +2059,21 @@ } ] }, + { + "name": "scroll-velocity", + "title": "Scroll Velocity", + "description": "Multi-row marquee that scrolls horizontally at a base velocity and accelerates with spring-smoothed page-scroll movement.", + "type": "registry:component", + "dependencies": [], + "registryDependencies": [], + "files": [ + { + "type": "registry:component", + "path": "ScrollVelocity.svelte", + "target": "$lib/components/svelte-bits/ScrollVelocity.svelte" + } + ] + }, { "name": "shiny-text", "title": "Shiny Text", diff --git a/static/r/scroll-velocity.json b/static/r/scroll-velocity.json new file mode 100644 index 0000000..4b5aa89 --- /dev/null +++ b/static/r/scroll-velocity.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "scroll-velocity", + "title": "Scroll Velocity", + "description": "Multi-row marquee that scrolls horizontally at a base velocity and accelerates with spring-smoothed page-scroll movement.", + "type": "registry:component", + "files": [ + { + "type": "registry:component", + "path": "ScrollVelocity.svelte", + "target": "$lib/components/svelte-bits/ScrollVelocity.svelte", + "content": "\n\n
\n\t{#each texts as text, i (i)}\n\t\t
\n\t\t\t
\n\t\t\t\t{#each Array.from({ length: Math.max(numCopies, 1) }, (_, j) => j) as j (j)}\n\t\t\t\t\t{#if j === 0}\n\t\t\t\t\t\t{text} \n\t\t\t\t\t{:else}\n\t\t\t\t\t\t{text} \n\t\t\t\t\t{/if}\n\t\t\t\t{/each}\n\t\t\t
\n\t\t
\n\t{/each}\n
\n\n\n" + } + ], + "registryDependencies": [], + "dependencies": [] +} \ No newline at end of file