svg-scroll-draw 1.7.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +394 -94
  2. package/dist/angular/index.cjs +3 -3
  3. package/dist/angular/index.d.mts +178 -9
  4. package/dist/angular/index.d.ts +178 -9
  5. package/dist/angular/index.mjs +3 -3
  6. package/dist/astro/index.cjs +3 -3
  7. package/dist/astro/index.d.mts +70 -1
  8. package/dist/astro/index.d.ts +70 -1
  9. package/dist/astro/index.mjs +3 -3
  10. package/dist/cdn/svg-scroll-draw.global.js +3 -3
  11. package/dist/devtools/index.cjs +1 -0
  12. package/dist/devtools/index.d.mts +12 -0
  13. package/dist/devtools/index.d.ts +12 -0
  14. package/dist/devtools/index.mjs +1 -0
  15. package/dist/group/index.cjs +3 -3
  16. package/dist/group/index.d.mts +72 -1
  17. package/dist/group/index.d.ts +72 -1
  18. package/dist/group/index.mjs +3 -3
  19. package/dist/index.cjs +4 -4
  20. package/dist/index.d.mts +35 -1
  21. package/dist/index.d.ts +35 -1
  22. package/dist/index.mjs +4 -4
  23. package/dist/nuxt/index.cjs +3 -3
  24. package/dist/nuxt/index.d.mts +270 -5
  25. package/dist/nuxt/index.d.ts +270 -5
  26. package/dist/nuxt/index.mjs +3 -3
  27. package/dist/react/index.cjs +3 -3
  28. package/dist/react/index.d.mts +84 -1
  29. package/dist/react/index.d.ts +84 -1
  30. package/dist/react/index.mjs +3 -3
  31. package/dist/solid/index.cjs +3 -3
  32. package/dist/solid/index.d.mts +155 -1
  33. package/dist/solid/index.d.ts +155 -1
  34. package/dist/solid/index.mjs +3 -3
  35. package/dist/svelte/index.cjs +3 -3
  36. package/dist/svelte/index.d.mts +167 -10
  37. package/dist/svelte/index.d.ts +167 -10
  38. package/dist/svelte/index.mjs +3 -3
  39. package/dist/text/index.cjs +1 -0
  40. package/dist/text/index.d.mts +37 -0
  41. package/dist/text/index.d.ts +37 -0
  42. package/dist/text/index.mjs +1 -0
  43. package/dist/video/index.cjs +1 -0
  44. package/dist/video/index.d.mts +34 -0
  45. package/dist/video/index.d.ts +34 -0
  46. package/dist/video/index.mjs +1 -0
  47. package/dist/vue/index.cjs +3 -3
  48. package/dist/vue/index.d.mts +262 -1
  49. package/dist/vue/index.d.ts +262 -1
  50. package/dist/vue/index.mjs +3 -3
  51. package/package.json +16 -1
@@ -109,6 +109,59 @@ interface ScrollDrawOptions {
109
109
  native?: boolean;
110
110
  }
111
111
 
112
+ interface ScrollAnimateOptions {
113
+ props: Record<string, string | number | [string | number, string | number]>;
114
+ trigger?: TriggerConfig;
115
+ easing?: EasingName | ((t: number) => number);
116
+ speed?: number;
117
+ once?: boolean;
118
+ axis?: 'x' | 'y';
119
+ scrollContainer?: string | Element;
120
+ native?: boolean;
121
+ onProgress?: (alpha: number) => void;
122
+ onComplete?: () => void;
123
+ }
124
+
125
+ interface ScrollCounterOptions {
126
+ from?: number;
127
+ to: number;
128
+ format?: (value: number) => string;
129
+ easing?: EasingName | ((t: number) => number);
130
+ trigger?: TriggerConfig;
131
+ once?: boolean;
132
+ decimals?: number;
133
+ onComplete?: () => void;
134
+ }
135
+
136
+ interface ScrollVideoOptions {
137
+ trigger?: TriggerConfig;
138
+ from?: number;
139
+ to?: number;
140
+ easing?: EasingName | ((t: number) => number);
141
+ once?: boolean;
142
+ axis?: 'x' | 'y';
143
+ preload?: 'auto' | 'metadata';
144
+ onReady?: () => void;
145
+ onComplete?: () => void;
146
+ onProgress?: (alpha: number) => void;
147
+ }
148
+
149
+ interface ScrollTextOptions {
150
+ split?: 'chars' | 'words' | 'lines';
151
+ stagger?: number;
152
+ easing?: EasingName | ((t: number) => number);
153
+ from?: {
154
+ opacity?: number;
155
+ y?: number;
156
+ x?: number;
157
+ rotate?: number;
158
+ scale?: number;
159
+ };
160
+ trigger?: TriggerConfig;
161
+ once?: boolean;
162
+ onComplete?: () => void;
163
+ }
164
+
112
165
  /** Composable — attach to any container ref. */
113
166
  declare function useScrollDraw(options?: ScrollDrawOptions): vue.Ref<HTMLElement | null, HTMLElement | null>;
114
167
  /** Component — wraps children in a <div> and initialises the engine. */
@@ -193,16 +246,226 @@ declare const ScrollDraw: vue.DefineComponent<vue.ExtractPropTypes<{
193
246
  once: boolean;
194
247
  debug: boolean;
195
248
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
249
+ /**
250
+ * Composable — call with a full options object and bind the returned ref to
251
+ * whichever element you want to animate.
252
+ *
253
+ * @example
254
+ * <script setup>
255
+ * import { useScrollAnimate } from 'svg-scroll-draw/vue';
256
+ * const el = useScrollAnimate({ props: { opacity: [0, 1] }, easing: 'ease-out', once: true });
257
+ * </script>
258
+ * <div :ref="el">...</div>
259
+ */
260
+ declare function useScrollAnimate(options: ScrollAnimateOptions): vue.Ref<HTMLElement | null, HTMLElement | null>;
261
+ /**
262
+ * Component — accepts a single `:options` prop and wraps children in a <div>.
263
+ *
264
+ * @example
265
+ * <ScrollAnimate :options="{ props: { opacity: [0, 1] }, easing: 'ease-out' }">
266
+ * <div>...</div>
267
+ * </ScrollAnimate>
268
+ */
269
+ declare const ScrollAnimate: vue.DefineComponent<vue.ExtractPropTypes<{
270
+ options: {
271
+ type: () => ScrollAnimateOptions;
272
+ required: true;
273
+ };
274
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
275
+ [key: string]: any;
276
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
277
+ options: {
278
+ type: () => ScrollAnimateOptions;
279
+ required: true;
280
+ };
281
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
282
+ /**
283
+ * Composable — returns a ref to bind to a span/element that will count up on scroll.
284
+ *
285
+ * @example
286
+ * <script setup>
287
+ * import { useScrollCounter } from 'svg-scroll-draw/vue';
288
+ * const el = useScrollCounter({ to: 1000, easing: 'ease-out', once: true });
289
+ * </script>
290
+ * <span :ref="el" />
291
+ */
292
+ declare function useScrollCounter(options: ScrollCounterOptions): vue.Ref<HTMLElement | null, HTMLElement | null>;
293
+ /**
294
+ * Component — renders a <span> that counts from `from` to `to` on scroll.
295
+ *
296
+ * @example
297
+ * <ScrollCounter :to="1250000" :format="n => '$' + Math.round(n).toLocaleString()" />
298
+ */
299
+ declare const ScrollCounter: vue.DefineComponent<vue.ExtractPropTypes<{
300
+ to: {
301
+ type: NumberConstructor;
302
+ required: true;
303
+ };
304
+ from: {
305
+ type: NumberConstructor;
306
+ };
307
+ format: {
308
+ type: () => ScrollCounterOptions["format"];
309
+ };
310
+ easing: {
311
+ type: (StringConstructor | FunctionConstructor)[];
312
+ };
313
+ trigger: {
314
+ type: ObjectConstructor;
315
+ };
316
+ once: {
317
+ type: BooleanConstructor;
318
+ };
319
+ decimals: {
320
+ type: NumberConstructor;
321
+ };
322
+ onComplete: {
323
+ type: FunctionConstructor;
324
+ };
325
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
326
+ [key: string]: any;
327
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
328
+ to: {
329
+ type: NumberConstructor;
330
+ required: true;
331
+ };
332
+ from: {
333
+ type: NumberConstructor;
334
+ };
335
+ format: {
336
+ type: () => ScrollCounterOptions["format"];
337
+ };
338
+ easing: {
339
+ type: (StringConstructor | FunctionConstructor)[];
340
+ };
341
+ trigger: {
342
+ type: ObjectConstructor;
343
+ };
344
+ once: {
345
+ type: BooleanConstructor;
346
+ };
347
+ decimals: {
348
+ type: NumberConstructor;
349
+ };
350
+ onComplete: {
351
+ type: FunctionConstructor;
352
+ };
353
+ }>> & Readonly<{}>, {
354
+ once: boolean;
355
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
356
+ /**
357
+ * Composable — returns a ref to bind to a <video> element.
358
+ *
359
+ * @example
360
+ * <script setup>
361
+ * import { useScrollVideo } from 'svg-scroll-draw/vue';
362
+ * const vid = useScrollVideo({ trigger: { start: 'top top', end: 'bottom top' } });
363
+ * </script>
364
+ * <video :ref="vid" src="..." muted playsinline preload="auto" />
365
+ */
366
+ declare function useScrollVideo(options?: ScrollVideoOptions): vue.Ref<HTMLVideoElement | null, HTMLVideoElement | null>;
367
+ /**
368
+ * Component — renders a <video> scrubbed by scroll position.
369
+ *
370
+ * @example
371
+ * <ScrollVideo src="/hero.mp4" :options="{ trigger: { start: 'top top', end: 'bottom top' } }" />
372
+ */
373
+ declare const ScrollVideo: vue.DefineComponent<vue.ExtractPropTypes<{
374
+ src: {
375
+ type: StringConstructor;
376
+ required: true;
377
+ };
378
+ options: {
379
+ type: () => ScrollVideoOptions;
380
+ };
381
+ muted: {
382
+ type: BooleanConstructor;
383
+ default: boolean;
384
+ };
385
+ playsInline: {
386
+ type: BooleanConstructor;
387
+ default: boolean;
388
+ };
389
+ class: {
390
+ type: StringConstructor;
391
+ };
392
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
393
+ [key: string]: any;
394
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
395
+ src: {
396
+ type: StringConstructor;
397
+ required: true;
398
+ };
399
+ options: {
400
+ type: () => ScrollVideoOptions;
401
+ };
402
+ muted: {
403
+ type: BooleanConstructor;
404
+ default: boolean;
405
+ };
406
+ playsInline: {
407
+ type: BooleanConstructor;
408
+ default: boolean;
409
+ };
410
+ class: {
411
+ type: StringConstructor;
412
+ };
413
+ }>> & Readonly<{}>, {
414
+ muted: boolean;
415
+ playsInline: boolean;
416
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
417
+ /**
418
+ * Composable — returns a ref to bind to any text element; splits and animates on scroll.
419
+ *
420
+ * @example
421
+ * <script setup>
422
+ * import { useScrollText } from 'svg-scroll-draw/vue';
423
+ * const el = useScrollText({ split: 'words', stagger: 0.05, once: true });
424
+ * </script>
425
+ * <h2 :ref="el">Animate on scroll.</h2>
426
+ */
427
+ declare function useScrollText(options?: ScrollTextOptions): vue.Ref<HTMLElement | null, HTMLElement | null>;
428
+ /**
429
+ * Component — wraps text content in a <p> (or any tag) and animates it on scroll.
430
+ *
431
+ * @example
432
+ * <ScrollText :options="{ split: 'words', stagger: 0.05 }" tag="h2">
433
+ * Animate on scroll.
434
+ * </ScrollText>
435
+ */
436
+ declare const ScrollText: vue.DefineComponent<vue.ExtractPropTypes<{
437
+ options: {
438
+ type: () => ScrollTextOptions;
439
+ };
440
+ tag: {
441
+ type: StringConstructor;
442
+ default: string;
443
+ };
444
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
445
+ [key: string]: any;
446
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
447
+ options: {
448
+ type: () => ScrollTextOptions;
449
+ };
450
+ tag: {
451
+ type: StringConstructor;
452
+ default: string;
453
+ };
454
+ }>> & Readonly<{}>, {
455
+ tag: string;
456
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
196
457
 
197
458
  /**
198
459
  * Nuxt 3 integration for svg-scroll-draw.
199
460
  *
200
- * Re-exports the Vue composable and component for direct use, plus a
201
- * plugin factory for global auto-registration.
461
+ * Re-exports all Vue composables and components (v1 + v2) for direct use,
462
+ * plus a plugin factory for global auto-registration.
202
463
  *
203
464
  * ## Option A — Import per component (recommended)
204
465
  * ```ts
205
466
  * import { useScrollDraw, ScrollDraw } from 'svg-scroll-draw/nuxt';
467
+ * import { useScrollAnimate, ScrollAnimate } from 'svg-scroll-draw/nuxt';
468
+ * import { useScrollText, useScrollCounter } from 'svg-scroll-draw/nuxt';
206
469
  * ```
207
470
  *
208
471
  * ## Option B — Global auto-registration via Nuxt plugin
@@ -214,15 +477,17 @@ declare const ScrollDraw: vue.DefineComponent<vue.ExtractPropTypes<{
214
477
  * });
215
478
  * ```
216
479
  *
217
- * Then use <ScrollDraw> globally with no imports.
480
+ * Then use <ScrollDraw>, <ScrollAnimate>, <ScrollCounter>, etc. globally.
218
481
  */
219
482
 
220
483
  /**
221
- * Vue plugin that globally registers the <ScrollDraw> component.
484
+ * Vue plugin that globally registers all svg-scroll-draw components.
222
485
  * Pass to nuxtApp.vueApp.use() inside a Nuxt plugin.
486
+ *
487
+ * Registers: <ScrollDraw>, <ScrollAnimate>, <ScrollCounter>, <ScrollVideo>, <ScrollText>
223
488
  */
224
489
  declare function createScrollDrawPlugin(): {
225
490
  install(app: App): void;
226
491
  };
227
492
 
228
- export { ScrollDraw, type ScrollDrawOptions, createScrollDrawPlugin, useScrollDraw };
493
+ export { ScrollAnimate, type ScrollAnimateOptions, ScrollCounter, type ScrollCounterOptions, ScrollDraw, type ScrollDrawOptions, ScrollText, type ScrollTextOptions, ScrollVideo, type ScrollVideoOptions, createScrollDrawPlugin, useScrollAnimate, useScrollCounter, useScrollDraw, useScrollText, useScrollVideo };
@@ -109,6 +109,59 @@ interface ScrollDrawOptions {
109
109
  native?: boolean;
110
110
  }
111
111
 
112
+ interface ScrollAnimateOptions {
113
+ props: Record<string, string | number | [string | number, string | number]>;
114
+ trigger?: TriggerConfig;
115
+ easing?: EasingName | ((t: number) => number);
116
+ speed?: number;
117
+ once?: boolean;
118
+ axis?: 'x' | 'y';
119
+ scrollContainer?: string | Element;
120
+ native?: boolean;
121
+ onProgress?: (alpha: number) => void;
122
+ onComplete?: () => void;
123
+ }
124
+
125
+ interface ScrollCounterOptions {
126
+ from?: number;
127
+ to: number;
128
+ format?: (value: number) => string;
129
+ easing?: EasingName | ((t: number) => number);
130
+ trigger?: TriggerConfig;
131
+ once?: boolean;
132
+ decimals?: number;
133
+ onComplete?: () => void;
134
+ }
135
+
136
+ interface ScrollVideoOptions {
137
+ trigger?: TriggerConfig;
138
+ from?: number;
139
+ to?: number;
140
+ easing?: EasingName | ((t: number) => number);
141
+ once?: boolean;
142
+ axis?: 'x' | 'y';
143
+ preload?: 'auto' | 'metadata';
144
+ onReady?: () => void;
145
+ onComplete?: () => void;
146
+ onProgress?: (alpha: number) => void;
147
+ }
148
+
149
+ interface ScrollTextOptions {
150
+ split?: 'chars' | 'words' | 'lines';
151
+ stagger?: number;
152
+ easing?: EasingName | ((t: number) => number);
153
+ from?: {
154
+ opacity?: number;
155
+ y?: number;
156
+ x?: number;
157
+ rotate?: number;
158
+ scale?: number;
159
+ };
160
+ trigger?: TriggerConfig;
161
+ once?: boolean;
162
+ onComplete?: () => void;
163
+ }
164
+
112
165
  /** Composable — attach to any container ref. */
113
166
  declare function useScrollDraw(options?: ScrollDrawOptions): vue.Ref<HTMLElement | null, HTMLElement | null>;
114
167
  /** Component — wraps children in a <div> and initialises the engine. */
@@ -193,16 +246,226 @@ declare const ScrollDraw: vue.DefineComponent<vue.ExtractPropTypes<{
193
246
  once: boolean;
194
247
  debug: boolean;
195
248
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
249
+ /**
250
+ * Composable — call with a full options object and bind the returned ref to
251
+ * whichever element you want to animate.
252
+ *
253
+ * @example
254
+ * <script setup>
255
+ * import { useScrollAnimate } from 'svg-scroll-draw/vue';
256
+ * const el = useScrollAnimate({ props: { opacity: [0, 1] }, easing: 'ease-out', once: true });
257
+ * </script>
258
+ * <div :ref="el">...</div>
259
+ */
260
+ declare function useScrollAnimate(options: ScrollAnimateOptions): vue.Ref<HTMLElement | null, HTMLElement | null>;
261
+ /**
262
+ * Component — accepts a single `:options` prop and wraps children in a <div>.
263
+ *
264
+ * @example
265
+ * <ScrollAnimate :options="{ props: { opacity: [0, 1] }, easing: 'ease-out' }">
266
+ * <div>...</div>
267
+ * </ScrollAnimate>
268
+ */
269
+ declare const ScrollAnimate: vue.DefineComponent<vue.ExtractPropTypes<{
270
+ options: {
271
+ type: () => ScrollAnimateOptions;
272
+ required: true;
273
+ };
274
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
275
+ [key: string]: any;
276
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
277
+ options: {
278
+ type: () => ScrollAnimateOptions;
279
+ required: true;
280
+ };
281
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
282
+ /**
283
+ * Composable — returns a ref to bind to a span/element that will count up on scroll.
284
+ *
285
+ * @example
286
+ * <script setup>
287
+ * import { useScrollCounter } from 'svg-scroll-draw/vue';
288
+ * const el = useScrollCounter({ to: 1000, easing: 'ease-out', once: true });
289
+ * </script>
290
+ * <span :ref="el" />
291
+ */
292
+ declare function useScrollCounter(options: ScrollCounterOptions): vue.Ref<HTMLElement | null, HTMLElement | null>;
293
+ /**
294
+ * Component — renders a <span> that counts from `from` to `to` on scroll.
295
+ *
296
+ * @example
297
+ * <ScrollCounter :to="1250000" :format="n => '$' + Math.round(n).toLocaleString()" />
298
+ */
299
+ declare const ScrollCounter: vue.DefineComponent<vue.ExtractPropTypes<{
300
+ to: {
301
+ type: NumberConstructor;
302
+ required: true;
303
+ };
304
+ from: {
305
+ type: NumberConstructor;
306
+ };
307
+ format: {
308
+ type: () => ScrollCounterOptions["format"];
309
+ };
310
+ easing: {
311
+ type: (StringConstructor | FunctionConstructor)[];
312
+ };
313
+ trigger: {
314
+ type: ObjectConstructor;
315
+ };
316
+ once: {
317
+ type: BooleanConstructor;
318
+ };
319
+ decimals: {
320
+ type: NumberConstructor;
321
+ };
322
+ onComplete: {
323
+ type: FunctionConstructor;
324
+ };
325
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
326
+ [key: string]: any;
327
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
328
+ to: {
329
+ type: NumberConstructor;
330
+ required: true;
331
+ };
332
+ from: {
333
+ type: NumberConstructor;
334
+ };
335
+ format: {
336
+ type: () => ScrollCounterOptions["format"];
337
+ };
338
+ easing: {
339
+ type: (StringConstructor | FunctionConstructor)[];
340
+ };
341
+ trigger: {
342
+ type: ObjectConstructor;
343
+ };
344
+ once: {
345
+ type: BooleanConstructor;
346
+ };
347
+ decimals: {
348
+ type: NumberConstructor;
349
+ };
350
+ onComplete: {
351
+ type: FunctionConstructor;
352
+ };
353
+ }>> & Readonly<{}>, {
354
+ once: boolean;
355
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
356
+ /**
357
+ * Composable — returns a ref to bind to a <video> element.
358
+ *
359
+ * @example
360
+ * <script setup>
361
+ * import { useScrollVideo } from 'svg-scroll-draw/vue';
362
+ * const vid = useScrollVideo({ trigger: { start: 'top top', end: 'bottom top' } });
363
+ * </script>
364
+ * <video :ref="vid" src="..." muted playsinline preload="auto" />
365
+ */
366
+ declare function useScrollVideo(options?: ScrollVideoOptions): vue.Ref<HTMLVideoElement | null, HTMLVideoElement | null>;
367
+ /**
368
+ * Component — renders a <video> scrubbed by scroll position.
369
+ *
370
+ * @example
371
+ * <ScrollVideo src="/hero.mp4" :options="{ trigger: { start: 'top top', end: 'bottom top' } }" />
372
+ */
373
+ declare const ScrollVideo: vue.DefineComponent<vue.ExtractPropTypes<{
374
+ src: {
375
+ type: StringConstructor;
376
+ required: true;
377
+ };
378
+ options: {
379
+ type: () => ScrollVideoOptions;
380
+ };
381
+ muted: {
382
+ type: BooleanConstructor;
383
+ default: boolean;
384
+ };
385
+ playsInline: {
386
+ type: BooleanConstructor;
387
+ default: boolean;
388
+ };
389
+ class: {
390
+ type: StringConstructor;
391
+ };
392
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
393
+ [key: string]: any;
394
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
395
+ src: {
396
+ type: StringConstructor;
397
+ required: true;
398
+ };
399
+ options: {
400
+ type: () => ScrollVideoOptions;
401
+ };
402
+ muted: {
403
+ type: BooleanConstructor;
404
+ default: boolean;
405
+ };
406
+ playsInline: {
407
+ type: BooleanConstructor;
408
+ default: boolean;
409
+ };
410
+ class: {
411
+ type: StringConstructor;
412
+ };
413
+ }>> & Readonly<{}>, {
414
+ muted: boolean;
415
+ playsInline: boolean;
416
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
417
+ /**
418
+ * Composable — returns a ref to bind to any text element; splits and animates on scroll.
419
+ *
420
+ * @example
421
+ * <script setup>
422
+ * import { useScrollText } from 'svg-scroll-draw/vue';
423
+ * const el = useScrollText({ split: 'words', stagger: 0.05, once: true });
424
+ * </script>
425
+ * <h2 :ref="el">Animate on scroll.</h2>
426
+ */
427
+ declare function useScrollText(options?: ScrollTextOptions): vue.Ref<HTMLElement | null, HTMLElement | null>;
428
+ /**
429
+ * Component — wraps text content in a <p> (or any tag) and animates it on scroll.
430
+ *
431
+ * @example
432
+ * <ScrollText :options="{ split: 'words', stagger: 0.05 }" tag="h2">
433
+ * Animate on scroll.
434
+ * </ScrollText>
435
+ */
436
+ declare const ScrollText: vue.DefineComponent<vue.ExtractPropTypes<{
437
+ options: {
438
+ type: () => ScrollTextOptions;
439
+ };
440
+ tag: {
441
+ type: StringConstructor;
442
+ default: string;
443
+ };
444
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
445
+ [key: string]: any;
446
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
447
+ options: {
448
+ type: () => ScrollTextOptions;
449
+ };
450
+ tag: {
451
+ type: StringConstructor;
452
+ default: string;
453
+ };
454
+ }>> & Readonly<{}>, {
455
+ tag: string;
456
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
196
457
 
197
458
  /**
198
459
  * Nuxt 3 integration for svg-scroll-draw.
199
460
  *
200
- * Re-exports the Vue composable and component for direct use, plus a
201
- * plugin factory for global auto-registration.
461
+ * Re-exports all Vue composables and components (v1 + v2) for direct use,
462
+ * plus a plugin factory for global auto-registration.
202
463
  *
203
464
  * ## Option A — Import per component (recommended)
204
465
  * ```ts
205
466
  * import { useScrollDraw, ScrollDraw } from 'svg-scroll-draw/nuxt';
467
+ * import { useScrollAnimate, ScrollAnimate } from 'svg-scroll-draw/nuxt';
468
+ * import { useScrollText, useScrollCounter } from 'svg-scroll-draw/nuxt';
206
469
  * ```
207
470
  *
208
471
  * ## Option B — Global auto-registration via Nuxt plugin
@@ -214,15 +477,17 @@ declare const ScrollDraw: vue.DefineComponent<vue.ExtractPropTypes<{
214
477
  * });
215
478
  * ```
216
479
  *
217
- * Then use <ScrollDraw> globally with no imports.
480
+ * Then use <ScrollDraw>, <ScrollAnimate>, <ScrollCounter>, etc. globally.
218
481
  */
219
482
 
220
483
  /**
221
- * Vue plugin that globally registers the <ScrollDraw> component.
484
+ * Vue plugin that globally registers all svg-scroll-draw components.
222
485
  * Pass to nuxtApp.vueApp.use() inside a Nuxt plugin.
486
+ *
487
+ * Registers: <ScrollDraw>, <ScrollAnimate>, <ScrollCounter>, <ScrollVideo>, <ScrollText>
223
488
  */
224
489
  declare function createScrollDrawPlugin(): {
225
490
  install(app: App): void;
226
491
  };
227
492
 
228
- export { ScrollDraw, type ScrollDrawOptions, createScrollDrawPlugin, useScrollDraw };
493
+ export { ScrollAnimate, type ScrollAnimateOptions, ScrollCounter, type ScrollCounterOptions, ScrollDraw, type ScrollDrawOptions, ScrollText, type ScrollTextOptions, ScrollVideo, type ScrollVideoOptions, createScrollDrawPlugin, useScrollAnimate, useScrollCounter, useScrollDraw, useScrollText, useScrollVideo };