svg-scroll-draw 2.15.2 → 2.16.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 (128) hide show
  1. package/README.md +19 -16
  2. package/dist/angular/index.cjs +2 -2
  3. package/dist/angular/index.d.mts +7 -238
  4. package/dist/angular/index.d.ts +7 -238
  5. package/dist/angular/index.mjs +1 -3
  6. package/dist/aos/index.cjs +2 -2
  7. package/dist/aos/index.mjs +1 -2
  8. package/dist/aos/react/index.cjs +2 -2
  9. package/dist/aos/react/index.d.mts +1 -33
  10. package/dist/aos/react/index.d.ts +1 -33
  11. package/dist/aos/react/index.mjs +1 -2
  12. package/dist/astro/index.cjs +2 -2
  13. package/dist/astro/index.d.mts +4 -146
  14. package/dist/astro/index.d.ts +4 -146
  15. package/dist/astro/index.mjs +1 -3
  16. package/dist/cdn/aos.global.js +2 -2
  17. package/dist/cdn/scrollreveal.global.js +2 -2
  18. package/dist/cdn/svg-scroll-draw.dev.global.js +51 -39
  19. package/dist/cdn/svg-scroll-draw.global.js +2 -2
  20. package/dist/cdn/vivus.global.js +1 -1
  21. package/dist/chunk-4DOJSIEQ.mjs +1 -0
  22. package/dist/chunk-4MH5SQTH.mjs +1 -0
  23. package/dist/chunk-4T5R3ZTL.mjs +2 -0
  24. package/dist/chunk-5PJEKEEP.mjs +1 -0
  25. package/dist/chunk-AJ22VSHC.mjs +1 -0
  26. package/dist/chunk-BCV4RAIX.mjs +1 -0
  27. package/dist/chunk-DM6EDKWH.mjs +1 -0
  28. package/dist/chunk-E4M2PB7B.mjs +1 -0
  29. package/dist/chunk-JC5BD4RB.mjs +1 -0
  30. package/dist/chunk-KBFWDHF4.mjs +1 -0
  31. package/dist/chunk-KGAJQP2N.mjs +2 -0
  32. package/dist/chunk-LFSU6LR3.mjs +1 -0
  33. package/dist/chunk-OJFWQ6CU.mjs +1 -0
  34. package/dist/chunk-OMI46IXL.mjs +2 -0
  35. package/dist/chunk-OWMO2S3V.mjs +1 -0
  36. package/dist/chunk-PEFR3ZB7.mjs +1 -0
  37. package/dist/chunk-QJ4H2HW3.mjs +1 -0
  38. package/dist/chunk-SNCRC6BA.mjs +1 -0
  39. package/dist/chunk-WDIHLRZZ.mjs +3 -0
  40. package/dist/chunk-WQZKXAXK.mjs +2 -0
  41. package/dist/chunk-YWKPTYSG.mjs +1 -0
  42. package/dist/chunk-YZV4Z3EQ.mjs +1 -0
  43. package/dist/cinematic/index.cjs +1 -1
  44. package/dist/cinematic/index.mjs +1 -2
  45. package/dist/devtools/index.mjs +1 -1
  46. package/dist/engine-6AXEX8CL.d.ts +57 -0
  47. package/dist/engine-Ci08nM91.d.mts +57 -0
  48. package/dist/group/index.cjs +2 -2
  49. package/dist/group/index.d.mts +4 -205
  50. package/dist/group/index.d.ts +4 -205
  51. package/dist/group/index.mjs +1 -3
  52. package/dist/horizontal/index.cjs +1 -1
  53. package/dist/horizontal/index.d.mts +1 -33
  54. package/dist/horizontal/index.d.ts +1 -33
  55. package/dist/horizontal/index.mjs +1 -1
  56. package/dist/index-BDGQEK6X.d.mts +15 -0
  57. package/dist/index-BVuNgQSd.d.ts +14 -0
  58. package/dist/index-CGR7pSOR.d.mts +14 -0
  59. package/dist/index-DxjUOIbK.d.ts +15 -0
  60. package/dist/index.cjs +3 -3
  61. package/dist/index.d.mts +8 -292
  62. package/dist/index.d.ts +8 -292
  63. package/dist/index.mjs +1 -4
  64. package/dist/nuxt/index.cjs +2 -2
  65. package/dist/nuxt/index.d.mts +7 -505
  66. package/dist/nuxt/index.d.ts +7 -505
  67. package/dist/nuxt/index.mjs +1 -3
  68. package/dist/pin/index.cjs +1 -1
  69. package/dist/pin/index.mjs +1 -1
  70. package/dist/progress/index.cjs +1 -1
  71. package/dist/progress/index.d.mts +1 -33
  72. package/dist/progress/index.d.ts +1 -33
  73. package/dist/progress/index.mjs +1 -1
  74. package/dist/react/index.cjs +2 -2
  75. package/dist/react/index.d.mts +5 -210
  76. package/dist/react/index.d.ts +5 -210
  77. package/dist/react/index.mjs +1 -3
  78. package/dist/reveal/index.cjs +1 -1
  79. package/dist/reveal/index.d.mts +10 -8
  80. package/dist/reveal/index.d.ts +10 -8
  81. package/dist/reveal/index.mjs +1 -1
  82. package/dist/scroll-draw-BlJfbTDv.d.ts +5 -0
  83. package/dist/scroll-draw-CNlq4Z_L.d.mts +5 -0
  84. package/dist/scrollreveal/index.cjs +2 -2
  85. package/dist/scrollreveal/index.mjs +1 -2
  86. package/dist/scrollreveal/react/index.cjs +2 -2
  87. package/dist/scrollreveal/react/index.d.mts +1 -36
  88. package/dist/scrollreveal/react/index.d.ts +1 -36
  89. package/dist/scrollreveal/react/index.mjs +1 -2
  90. package/dist/snap/index.cjs +1 -1
  91. package/dist/snap/index.d.mts +1 -1
  92. package/dist/snap/index.d.ts +1 -1
  93. package/dist/snap/index.mjs +1 -1
  94. package/dist/solid/index.cjs +2 -2
  95. package/dist/solid/index.d.mts +6 -238
  96. package/dist/solid/index.d.ts +6 -238
  97. package/dist/solid/index.mjs +1 -3
  98. package/dist/svelte/index.cjs +2 -2
  99. package/dist/svelte/index.d.mts +6 -238
  100. package/dist/svelte/index.d.ts +6 -238
  101. package/dist/svelte/index.mjs +1 -3
  102. package/dist/text/index.cjs +1 -1
  103. package/dist/text/index.d.mts +1 -33
  104. package/dist/text/index.d.ts +1 -33
  105. package/dist/text/index.mjs +1 -1
  106. package/dist/timeline/index.cjs +7 -7
  107. package/dist/timeline/index.d.mts +1 -29
  108. package/dist/timeline/index.d.ts +1 -29
  109. package/dist/timeline/index.mjs +11 -11
  110. package/dist/types-DHU1zNEw.d.mts +147 -0
  111. package/dist/types-DHU1zNEw.d.ts +147 -0
  112. package/dist/video/index.cjs +1 -1
  113. package/dist/video/index.d.mts +1 -33
  114. package/dist/video/index.d.ts +1 -33
  115. package/dist/video/index.mjs +1 -1
  116. package/dist/vivus/index.cjs +2 -2
  117. package/dist/vivus/index.mjs +1 -2
  118. package/dist/vivus/react/index.cjs +2 -1
  119. package/dist/vivus/react/index.d.mts +1 -99
  120. package/dist/vivus/react/index.d.ts +1 -99
  121. package/dist/vivus/react/index.mjs +1 -1
  122. package/dist/vue/index.cjs +2 -2
  123. package/dist/vue/index.d.mts +6 -211
  124. package/dist/vue/index.d.ts +6 -211
  125. package/dist/vue/index.mjs +1 -3
  126. package/dist/web-component/index.cjs +2 -2
  127. package/dist/web-component/index.mjs +1 -3
  128. package/package.json +1 -1
@@ -1,508 +1,10 @@
1
- import * as vue from 'vue';
1
+ export { ScrollAnimate, ScrollCounter, ScrollDraw, ScrollText, ScrollVideo, useScrollAnimate, useScrollCounter, useScrollDraw, useScrollText, useScrollVideo } from '../vue/index.mjs';
2
+ export { a as ScrollDrawOptions } from '../types-DHU1zNEw.mjs';
2
3
  import { App } from 'vue';
3
-
4
- type EasingName = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'spring' | 'bounce' | 'elastic';
5
- type PresetName = 'sketch' | 'reveal' | 'typewriter' | 'cinematic' | 'spring';
6
- interface TriggerConfig {
7
- start?: string;
8
- end?: string;
9
- }
10
- interface ScrollDrawOptions {
11
- /**
12
- * Apply a named preset as the base configuration. User-supplied options
13
- * always override the preset. Available presets:
14
- * - `'sketch'` — staggered ease-in draw, pencil feel
15
- * - `'reveal'` — fade + ease-out, draws once on viewport entry
16
- * - `'typewriter'` — fast linear draw with stagger
17
- * - `'cinematic'` — slow ease-in-out with fade, dramatic entrance
18
- * - `'spring'` — spring easing, bouncy organic feel
19
- */
20
- preset?: PresetName;
21
- selector?: string;
22
- speed?: number;
23
- fade?: boolean;
24
- easing?: EasingName | ((t: number) => number);
25
- trigger?: TriggerConfig;
26
- stagger?: number;
27
- direction?: 'forward' | 'reverse';
28
- once?: boolean;
29
- debug?: boolean;
30
- /** Scroll axis to track. 'y' (default) for vertical, 'x' for horizontal. */
31
- axis?: 'x' | 'y';
32
- /** CSS selector or Element for a custom scroll container (default: window). */
33
- scrollContainer?: string | Element;
34
- /** Automatically reverse the animation when the user scrolls back up. */
35
- autoReverse?: boolean;
36
- /** Delay in milliseconds before the engine starts observing. */
37
- delay?: number;
38
- /** Animate stroke color. Single string = static override. Tuple = interpolate from → to. */
39
- strokeColor?: string | [string, string];
40
- /** Animate stroke width. Single number = static override. Tuple = interpolate from → to. */
41
- strokeWidth?: number | [number, number];
42
- /** Animate fill opacity. Single number = static override. Tuple [from, to] = interpolate as the path draws. Use [0, 1] to flood fill in sync with the stroke draw. */
43
- fillOpacity?: number | [number, number];
44
- /**
45
- * Reveal the container using CSS clip-path instead of stroke-dashoffset.
46
- * Works on any content — SVG, images, text, divs.
47
- *
48
- * Pass a direction string to control which edge the reveal starts from,
49
- * or `true` as shorthand for `'left'`.
50
- *
51
- * Values: `'left' | 'right' | 'top' | 'bottom' | 'center'`
52
- */
53
- clip?: boolean | 'left' | 'right' | 'top' | 'bottom' | 'center';
54
- /** Fire callbacks at specific progress thresholds (0–1). Resets on replay(). */
55
- waypoints?: Record<number, () => void>;
56
- /** Scale animation speed by scroll velocity — faster scrolling = faster draw. Pass a number to control sensitivity (default 1). */
57
- velocityScale?: boolean | number;
58
- /** IntersectionObserver threshold (0–1). Default 0. */
59
- threshold?: number;
60
- /** IntersectionObserver rootMargin. Default "0px". */
61
- rootMargin?: string;
62
- /** Repeat the animation N times after completion. Use 'infinite' to loop forever. */
63
- repeat?: number | 'infinite';
64
- /** Milliseconds to wait between repeats. Default 0. */
65
- repeatDelay?: number;
66
- /**
67
- * Target path `d` attribute to morph toward as the animation progresses.
68
- * Paths must have compatible command structures (same number of numeric tokens).
69
- *
70
- * Only applies to `<path>` elements — silently no-ops on `<rect>`, `<circle>`,
71
- * `<line>`, and other SVG shape elements.
72
- */
73
- morphTo?: string;
74
- onProgress?: (alpha: number) => void;
75
- onStart?: () => void;
76
- onComplete?: () => void;
77
- /** Fires when scroll position enters the trigger zone (scrolling forward). */
78
- onEnter?: () => void;
79
- /** Fires when scroll position exits the trigger zone at the end (scrolling forward). */
80
- onLeave?: () => void;
81
- /** Fires when scroll position re-enters the trigger zone from the end (scrolling back). */
82
- onEnterBack?: () => void;
83
- /** Fires when scroll position exits the trigger zone at the start (scrolling back). */
84
- onLeaveBack?: () => void;
85
- /**
86
- * Trigger the animation when the element enters the viewport instead of
87
- * tying it to scroll position. The draw runs over `duration` milliseconds,
88
- * replaying each time the element re-enters the viewport (use `once: true`
89
- * to play only the first time).
90
- *
91
- * All visual options work in autoplay mode — `easing`, `stagger`, `fade`,
92
- * `strokeColor`, `strokeWidth`, `fillOpacity`, `clip`, `morphTo`, `waypoints`,
93
- * `repeat`, `repeatDelay`, `onStart`, `onComplete`, `onProgress`, etc.
94
- *
95
- * The full instance API (`pause`, `resume`, `seek`, `replay`, `getProgress`)
96
- * also works — `seek(0.5)` pauses at 50% of the duration.
97
- */
98
- autoplay?: boolean;
99
- /**
100
- * Duration of the autoplay animation in milliseconds. Only used when
101
- * `autoplay: true`. Default `1000`.
102
- */
103
- duration?: number;
104
- /**
105
- * Use the browser's native CSS scroll-driven animation
106
- * (`animation-timeline: view()`) when the configuration is simple enough and
107
- * the browser supports it. This runs the draw entirely on the compositor —
108
- * zero per-frame JavaScript, zero scroll/resize listeners.
109
- *
110
- * Falls back to the JS engine automatically when unsupported or when the
111
- * config uses a feature native CSS can't express (callbacks, stagger, morph,
112
- * velocity scaling, custom triggers, `once`, custom easing functions, etc.).
113
- *
114
- * - `undefined` / `true` (default): use native when eligible.
115
- * - `false`: always use the JS engine.
116
- */
117
- native?: boolean;
118
- }
119
-
120
- interface ScrollAnimateOptions {
121
- props: Record<string, string | number | [string | number, string | number]>;
122
- trigger?: TriggerConfig;
123
- easing?: EasingName | ((t: number) => number);
124
- speed?: number;
125
- once?: boolean;
126
- axis?: 'x' | 'y';
127
- scrollContainer?: string | Element;
128
- native?: boolean;
129
- /**
130
- * Scale animation speed by scroll velocity — faster scrolling = faster animation.
131
- * Pass `true` for default sensitivity (1) or a number to control it.
132
- * Higher values = more dramatic speed-up. Default sensitivity: 1.
133
- */
134
- velocityScale?: boolean | number;
135
- /**
136
- * Honour `prefers-reduced-motion: reduce` by applying the final state and not
137
- * animating. Default: `true`.
138
- *
139
- * Set to `false` only when the movement is *scroll-linked scrubbing* rather
140
- * than autonomous motion — it advances solely as the user scrolls, 1:1 with
141
- * their input, so it is direct manipulation rather than something that plays at
142
- * them. `scrollHorizontal` sets this, because jumping to the final state there
143
- * would leave every panel but the last unreachable inside the sticky
144
- * `overflow: hidden` container.
145
- */
146
- respectReducedMotion?: boolean;
147
- /**
148
- * Element whose geometry defines the trigger window, when that is not the
149
- * element being animated. Defaults to the animated element.
150
- *
151
- * Needed whenever the animated element cannot supply the scroll length itself —
152
- * the case that matters is a `position: sticky` stage, where the pinned element
153
- * is exactly one viewport tall and all of the scroll room belongs to its
154
- * container. Resolving `top top` → `bottom bottom` against the pinned element
155
- * there yields tStart === tEnd, a zero-length window, and no movement at all.
156
- *
157
- * Setting this disables the native CSS fast path: `animation-timeline: view()`
158
- * always measures the element the animation is attached to, so it cannot express
159
- * a separate subject.
160
- */
161
- triggerElement?: Element;
162
- onProgress?: (alpha: number) => void;
163
- onComplete?: () => void;
164
- /** Fires when scroll enters the trigger zone (scrolling forward). */
165
- onEnter?: () => void;
166
- /** Fires when scroll exits the trigger zone at the end (scrolling forward). */
167
- onLeave?: () => void;
168
- /** Fires when scroll re-enters the trigger zone from the end (scrolling back). */
169
- onEnterBack?: () => void;
170
- /** Fires when scroll exits the trigger zone at the start (scrolling back). */
171
- onLeaveBack?: () => void;
172
- }
173
-
174
- interface ScrollCounterOptions {
175
- from?: number;
176
- to: number;
177
- format?: (value: number) => string;
178
- easing?: EasingName | ((t: number) => number);
179
- trigger?: TriggerConfig;
180
- once?: boolean;
181
- decimals?: number;
182
- onComplete?: () => void;
183
- }
184
-
185
- interface ScrollVideoOptions {
186
- trigger?: TriggerConfig;
187
- from?: number;
188
- to?: number;
189
- easing?: EasingName | ((t: number) => number);
190
- once?: boolean;
191
- axis?: 'x' | 'y';
192
- preload?: 'auto' | 'metadata';
193
- onReady?: () => void;
194
- onComplete?: () => void;
195
- onProgress?: (alpha: number) => void;
196
- }
197
-
198
- interface ScrollTextOptions {
199
- split?: 'chars' | 'words' | 'lines';
200
- stagger?: number;
201
- easing?: EasingName | ((t: number) => number);
202
- from?: {
203
- opacity?: number;
204
- y?: number;
205
- x?: number;
206
- rotate?: number;
207
- scale?: number;
208
- };
209
- trigger?: TriggerConfig;
210
- once?: boolean;
211
- onComplete?: () => void;
212
- }
213
-
214
- /** Composable — attach to any container ref. */
215
- declare function useScrollDraw(options?: ScrollDrawOptions): vue.Ref<HTMLElement | null, HTMLElement | null>;
216
- /** Component — wraps children in a <div> and initialises the engine. */
217
- declare const ScrollDraw: vue.DefineComponent<vue.ExtractPropTypes<{
218
- selector: {
219
- type: StringConstructor;
220
- };
221
- speed: {
222
- type: NumberConstructor;
223
- };
224
- fade: {
225
- type: BooleanConstructor;
226
- };
227
- stagger: {
228
- type: NumberConstructor;
229
- };
230
- easing: {
231
- type: (StringConstructor | FunctionConstructor)[];
232
- };
233
- direction: {
234
- type: () => "forward" | "reverse";
235
- };
236
- trigger: {
237
- type: ObjectConstructor;
238
- };
239
- onProgress: {
240
- type: FunctionConstructor;
241
- };
242
- onStart: {
243
- type: FunctionConstructor;
244
- };
245
- onComplete: {
246
- type: FunctionConstructor;
247
- };
248
- once: {
249
- type: BooleanConstructor;
250
- };
251
- debug: {
252
- type: BooleanConstructor;
253
- };
254
- }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
255
- [key: string]: any;
256
- }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
257
- selector: {
258
- type: StringConstructor;
259
- };
260
- speed: {
261
- type: NumberConstructor;
262
- };
263
- fade: {
264
- type: BooleanConstructor;
265
- };
266
- stagger: {
267
- type: NumberConstructor;
268
- };
269
- easing: {
270
- type: (StringConstructor | FunctionConstructor)[];
271
- };
272
- direction: {
273
- type: () => "forward" | "reverse";
274
- };
275
- trigger: {
276
- type: ObjectConstructor;
277
- };
278
- onProgress: {
279
- type: FunctionConstructor;
280
- };
281
- onStart: {
282
- type: FunctionConstructor;
283
- };
284
- onComplete: {
285
- type: FunctionConstructor;
286
- };
287
- once: {
288
- type: BooleanConstructor;
289
- };
290
- debug: {
291
- type: BooleanConstructor;
292
- };
293
- }>> & Readonly<{}>, {
294
- fade: boolean;
295
- once: boolean;
296
- debug: boolean;
297
- }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
298
- /**
299
- * Composable — call with a full options object and bind the returned ref to
300
- * whichever element you want to animate.
301
- *
302
- * @example
303
- * <script setup>
304
- * import { useScrollAnimate } from 'svg-scroll-draw/vue';
305
- * const el = useScrollAnimate({ props: { opacity: [0, 1] }, easing: 'ease-out', once: true });
306
- * </script>
307
- * <div :ref="el">...</div>
308
- */
309
- declare function useScrollAnimate(options: ScrollAnimateOptions): vue.Ref<HTMLElement | null, HTMLElement | null>;
310
- /**
311
- * Component — accepts a single `:options` prop and wraps children in a <div>.
312
- *
313
- * @example
314
- * <ScrollAnimate :options="{ props: { opacity: [0, 1] }, easing: 'ease-out' }">
315
- * <div>...</div>
316
- * </ScrollAnimate>
317
- */
318
- declare const ScrollAnimate: vue.DefineComponent<vue.ExtractPropTypes<{
319
- options: {
320
- type: () => ScrollAnimateOptions;
321
- required: true;
322
- };
323
- }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
324
- [key: string]: any;
325
- }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
326
- options: {
327
- type: () => ScrollAnimateOptions;
328
- required: true;
329
- };
330
- }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
331
- /**
332
- * Composable — returns a ref to bind to a span/element that will count up on scroll.
333
- *
334
- * @example
335
- * <script setup>
336
- * import { useScrollCounter } from 'svg-scroll-draw/vue';
337
- * const el = useScrollCounter({ to: 1000, easing: 'ease-out', once: true });
338
- * </script>
339
- * <span :ref="el" />
340
- */
341
- declare function useScrollCounter(options: ScrollCounterOptions): vue.Ref<HTMLElement | null, HTMLElement | null>;
342
- /**
343
- * Component — renders a <span> that counts from `from` to `to` on scroll.
344
- *
345
- * @example
346
- * <ScrollCounter :to="1250000" :format="n => '$' + Math.round(n).toLocaleString()" />
347
- */
348
- declare const ScrollCounter: vue.DefineComponent<vue.ExtractPropTypes<{
349
- to: {
350
- type: NumberConstructor;
351
- required: true;
352
- };
353
- from: {
354
- type: NumberConstructor;
355
- };
356
- format: {
357
- type: () => ScrollCounterOptions["format"];
358
- };
359
- easing: {
360
- type: (StringConstructor | FunctionConstructor)[];
361
- };
362
- trigger: {
363
- type: ObjectConstructor;
364
- };
365
- once: {
366
- type: BooleanConstructor;
367
- };
368
- decimals: {
369
- type: NumberConstructor;
370
- };
371
- onComplete: {
372
- type: FunctionConstructor;
373
- };
374
- }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
375
- [key: string]: any;
376
- }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
377
- to: {
378
- type: NumberConstructor;
379
- required: true;
380
- };
381
- from: {
382
- type: NumberConstructor;
383
- };
384
- format: {
385
- type: () => ScrollCounterOptions["format"];
386
- };
387
- easing: {
388
- type: (StringConstructor | FunctionConstructor)[];
389
- };
390
- trigger: {
391
- type: ObjectConstructor;
392
- };
393
- once: {
394
- type: BooleanConstructor;
395
- };
396
- decimals: {
397
- type: NumberConstructor;
398
- };
399
- onComplete: {
400
- type: FunctionConstructor;
401
- };
402
- }>> & Readonly<{}>, {
403
- once: boolean;
404
- }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
405
- /**
406
- * Composable — returns a ref to bind to a <video> element.
407
- *
408
- * @example
409
- * <script setup>
410
- * import { useScrollVideo } from 'svg-scroll-draw/vue';
411
- * const vid = useScrollVideo({ trigger: { start: 'top top', end: 'bottom top' } });
412
- * </script>
413
- * <video :ref="vid" src="..." muted playsinline preload="auto" />
414
- */
415
- declare function useScrollVideo(options?: ScrollVideoOptions): vue.Ref<HTMLVideoElement | null, HTMLVideoElement | null>;
416
- /**
417
- * Component — renders a <video> scrubbed by scroll position.
418
- *
419
- * @example
420
- * <ScrollVideo src="/hero.mp4" :options="{ trigger: { start: 'top top', end: 'bottom top' } }" />
421
- */
422
- declare const ScrollVideo: vue.DefineComponent<vue.ExtractPropTypes<{
423
- src: {
424
- type: StringConstructor;
425
- required: true;
426
- };
427
- options: {
428
- type: () => ScrollVideoOptions;
429
- };
430
- muted: {
431
- type: BooleanConstructor;
432
- default: boolean;
433
- };
434
- playsInline: {
435
- type: BooleanConstructor;
436
- default: boolean;
437
- };
438
- class: {
439
- type: StringConstructor;
440
- };
441
- }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
442
- [key: string]: any;
443
- }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
444
- src: {
445
- type: StringConstructor;
446
- required: true;
447
- };
448
- options: {
449
- type: () => ScrollVideoOptions;
450
- };
451
- muted: {
452
- type: BooleanConstructor;
453
- default: boolean;
454
- };
455
- playsInline: {
456
- type: BooleanConstructor;
457
- default: boolean;
458
- };
459
- class: {
460
- type: StringConstructor;
461
- };
462
- }>> & Readonly<{}>, {
463
- muted: boolean;
464
- playsInline: boolean;
465
- }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
466
- /**
467
- * Composable — returns a ref to bind to any text element; splits and animates on scroll.
468
- *
469
- * @example
470
- * <script setup>
471
- * import { useScrollText } from 'svg-scroll-draw/vue';
472
- * const el = useScrollText({ split: 'words', stagger: 0.05, once: true });
473
- * </script>
474
- * <h2 :ref="el">Animate on scroll.</h2>
475
- */
476
- declare function useScrollText(options?: ScrollTextOptions): vue.Ref<HTMLElement | null, HTMLElement | null>;
477
- /**
478
- * Component — wraps text content in a <p> (or any tag) and animates it on scroll.
479
- *
480
- * @example
481
- * <ScrollText :options="{ split: 'words', stagger: 0.05 }" tag="h2">
482
- * Animate on scroll.
483
- * </ScrollText>
484
- */
485
- declare const ScrollText: vue.DefineComponent<vue.ExtractPropTypes<{
486
- options: {
487
- type: () => ScrollTextOptions;
488
- };
489
- tag: {
490
- type: StringConstructor;
491
- default: string;
492
- };
493
- }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
494
- [key: string]: any;
495
- }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
496
- options: {
497
- type: () => ScrollTextOptions;
498
- };
499
- tag: {
500
- type: StringConstructor;
501
- default: string;
502
- };
503
- }>> & Readonly<{}>, {
504
- tag: string;
505
- }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
4
+ export { S as ScrollAnimateOptions } from '../engine-Ci08nM91.mjs';
5
+ export { S as ScrollCounterOptions } from '../index-BDGQEK6X.mjs';
6
+ export { ScrollTextOptions } from '../text/index.mjs';
7
+ export { ScrollVideoOptions } from '../video/index.mjs';
506
8
 
507
9
  /**
508
10
  * Nuxt 3 integration for svg-scroll-draw.
@@ -539,4 +41,4 @@ declare function createScrollDrawPlugin(): {
539
41
  install(app: App): void;
540
42
  };
541
43
 
542
- export { ScrollAnimate, type ScrollAnimateOptions, ScrollCounter, type ScrollCounterOptions, ScrollDraw, type ScrollDrawOptions, ScrollText, type ScrollTextOptions, ScrollVideo, type ScrollVideoOptions, createScrollDrawPlugin, useScrollAnimate, useScrollCounter, useScrollDraw, useScrollText, useScrollVideo };
44
+ export { createScrollDrawPlugin };