rune-scroller 0.1.6 → 0.1.8

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.
@@ -0,0 +1,16 @@
1
+ import type { Snippet } from 'svelte';
2
+ import type { AnimationType } from './animations';
3
+ interface Props {
4
+ animation?: AnimationType;
5
+ threshold?: number;
6
+ rootMargin?: string;
7
+ offset?: number;
8
+ duration?: number;
9
+ delay?: number;
10
+ repeat?: boolean;
11
+ children: Snippet;
12
+ [key: string]: any;
13
+ }
14
+ declare const RuneScroller: import("svelte").Component<Props, {}, "">;
15
+ type RuneScroller = ReturnType<typeof RuneScroller>;
16
+ export default RuneScroller;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  export type { RuneScrollerOptions, AnimateOptions, IntersectionOptions, UseIntersectionReturn } from './types';
2
2
  export type { AnimationType } from './animations';
3
- export { runeScroller as default } from './runeScroller.svelte.ts';
4
- export { default as RuneScroller } from './runeScroller.svelte';
5
- export { animate } from './animate.svelte';
6
- export { useIntersection, useIntersectionOnce } from './useIntersection.svelte';
3
+ export { runeScroller as default } from './runeScroller.svelte.js';
4
+ export { animate } from './animate.svelte.js';
5
+ export { useIntersection, useIntersectionOnce } from './useIntersection.svelte.js';
7
6
  export { calculateRootMargin } from './animations';
package/dist/index.js CHANGED
@@ -1,10 +1,8 @@
1
1
  // Main action (default export)
2
- export { runeScroller as default } from './runeScroller.svelte.ts';
3
- // Component
4
- export { default as RuneScroller } from './runeScroller.svelte';
2
+ export { runeScroller as default } from './runeScroller.svelte.js';
5
3
  // Alternative actions
6
- export { animate } from './animate.svelte';
4
+ export { animate } from './animate.svelte.js';
7
5
  // Composables
8
- export { useIntersection, useIntersectionOnce } from './useIntersection.svelte';
6
+ export { useIntersection, useIntersectionOnce } from './useIntersection.svelte.js';
9
7
  // Utilities
10
8
  export { calculateRootMargin } from './animations';
@@ -1,16 +1,24 @@
1
- import type { Snippet } from 'svelte';
2
- import type { AnimationType } from './animations';
3
- interface Props {
4
- animation?: AnimationType;
5
- threshold?: number;
6
- rootMargin?: string;
7
- offset?: number;
8
- duration?: number;
9
- delay?: number;
10
- repeat?: boolean;
11
- children: Snippet;
12
- [key: string]: any;
13
- }
14
- declare const RuneScroller: import("svelte").Component<Props, {}, "">;
15
- type RuneScroller = ReturnType<typeof RuneScroller>;
16
- export default RuneScroller;
1
+ import type { RuneScrollerOptions } from './types';
2
+ /**
3
+ * Action pour animer un élément au scroll avec un sentinel invisible juste en dessous
4
+ * @param element - L'élément à animer
5
+ * @param options - Options d'animation (animation type, duration, et repeat)
6
+ * @returns Objet action Svelte
7
+ *
8
+ * @example
9
+ * ```svelte
10
+ * <!-- Animation une seule fois -->
11
+ * <div use:runeScroller={{ animation: 'fade-in-up', duration: 1000 }}>
12
+ * Content
13
+ * </div>
14
+ *
15
+ * <!-- Animation répétée à chaque scroll -->
16
+ * <div use:runeScroller={{ animation: 'fade-in-up', duration: 1000, repeat: true }}>
17
+ * Content
18
+ * </div>
19
+ * ```
20
+ */
21
+ export declare function runeScroller(element: HTMLElement, options?: RuneScrollerOptions): {
22
+ update(newOptions?: RuneScrollerOptions): void;
23
+ destroy(): void;
24
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rune-scroller",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Lightweight, high-performance scroll animations for Svelte 5. ~2KB bundle, zero dependencies.",
5
5
  "type": "module",
6
6
  "sideEffects": false,