gsap-nuxt-module 1.1.2 → 1.1.4

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.
package/dist/module.json CHANGED
@@ -4,9 +4,9 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.0.0"
6
6
  },
7
- "version": "1.1.2",
7
+ "version": "1.1.4",
8
8
  "builder": {
9
- "@nuxt/module-builder": "0.8.4",
10
- "unbuild": "2.0.0"
9
+ "@nuxt/module-builder": "1.0.2",
10
+ "unbuild": "3.6.1"
11
11
  }
12
12
  }
package/dist/module.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { fileURLToPath } from 'node:url';
2
2
  import { defineNuxtModule, createResolver, addPlugin, addImportsDir } from '@nuxt/kit';
3
3
 
4
- const module = defineNuxtModule({
4
+ const module$1 = defineNuxtModule({
5
5
  meta: {
6
6
  name: "gsap-nuxt-module",
7
7
  configKey: "gsap",
@@ -24,4 +24,4 @@ const module = defineNuxtModule({
24
24
  }
25
25
  });
26
26
 
27
- export { module as default };
27
+ export { module$1 as default };
@@ -52,7 +52,7 @@ export declare const useScrollTrigger: () => {
52
52
  positionInViewport(element: Element | string, referencePoint?: string | number, horizontal?: boolean): number;
53
53
  refresh(safe?: boolean): void;
54
54
  register(core: typeof gsap): void;
55
- removeEventListener(event: "scrollStart" | "scrollEnd" | "refreshInit" | "refresh" | "matchMedia", callback: gsap.Callback): void;
55
+ removeEventListener(event: "scrollStart" | "scrollEnd" | "refreshInit" | "refresh" | "matchMedia" | "revert", callback: gsap.Callback): void;
56
56
  saveStyles(targets: gsap.DOMTarget): void;
57
57
  scrollerProxy(scroller: gsap.DOMTarget, vars?: ScrollTrigger.ScrollerProxyVars): void;
58
58
  snapDirectional(incrementOrArray: number | number[]): ScrollTrigger.SnapDirectionalFunc;
@@ -95,6 +95,7 @@ export declare const useSplitText: () => {
95
95
  readonly masks: Element[];
96
96
  readonly elements: Element[];
97
97
  readonly isSplit: boolean;
98
+ kill(): void;
98
99
  revert(): void;
99
100
  split(vars: SplitText.Vars): SplitText;
100
101
  };
@@ -217,6 +218,31 @@ export declare const useGSDevTools: () => {
217
218
  create(vars?: GSDevTools.Vars): GSDevTools;
218
219
  getById(id: string): GSDevTools | null;
219
220
  };
220
- export declare const useCustomEase: () => any;
221
- export declare const useCustomWiggle: () => any;
222
- export declare const useCustomBounce: () => any;
221
+ export declare const useCustomEase: () => {
222
+ new (id: string, data?: string | number[], config?: CustomEaseConfig): {
223
+ id: string;
224
+ ease: EaseFunction;
225
+ data: string | number[];
226
+ segment: number[];
227
+ setData(data?: string | number[], config?: CustomEaseConfig): /*elided*/ any;
228
+ getSVGData(config?: CustomEaseConfig): string;
229
+ };
230
+ create(id: string, data?: string | number[], config?: CustomEaseConfig): EaseFunction;
231
+ register(core: object): void;
232
+ get(id: string): EaseFunction;
233
+ getSVGData(ease: CustomEase | EaseFunction | string, config?: CustomEaseConfig): string;
234
+ };
235
+ export declare const useCustomWiggle: () => {
236
+ new (id: string, vars?: CustomWiggleVars): {
237
+ ease: EaseFunction;
238
+ };
239
+ create(id: string, vars?: CustomWiggleVars): EaseFunction;
240
+ register(core: object): void;
241
+ };
242
+ export declare const useCustomBounce: () => {
243
+ new (id: string, vars?: CustomBounceVars): {
244
+ ease: EaseFunction;
245
+ };
246
+ create(id: string, vars?: CustomBounceVars): EaseFunction;
247
+ register(core: object): void;
248
+ };
@@ -57,7 +57,7 @@ export declare const gsapPlugins: {
57
57
  positionInViewport(element: Element | string, referencePoint?: string | number, horizontal?: boolean): number;
58
58
  refresh(safe?: boolean): void;
59
59
  register(core: typeof gsap): void;
60
- removeEventListener(event: "scrollStart" | "scrollEnd" | "refreshInit" | "refresh" | "matchMedia", callback: gsap.Callback): void;
60
+ removeEventListener(event: "scrollStart" | "scrollEnd" | "refreshInit" | "refresh" | "matchMedia" | "revert", callback: gsap.Callback): void;
61
61
  saveStyles(targets: gsap.DOMTarget): void;
62
62
  scrollerProxy(scroller: gsap.DOMTarget, vars?: ScrollTrigger.ScrollerProxyVars): void;
63
63
  snapDirectional(incrementOrArray: number | number[]): ScrollTrigger.SnapDirectionalFunc;
@@ -106,6 +106,7 @@ export declare const gsapPlugins: {
106
106
  readonly masks: Element[];
107
107
  readonly elements: Element[];
108
108
  readonly isSplit: boolean;
109
+ kill(): void;
109
110
  revert(): void;
110
111
  split(vars: SplitText.Vars): SplitText;
111
112
  };
@@ -238,10 +239,35 @@ export declare const gsapPlugins: {
238
239
  create(vars?: GSDevTools.Vars): GSDevTools;
239
240
  getById(id: string): GSDevTools | null;
240
241
  }>;
241
- CustomEase: () => Promise<any>;
242
+ CustomEase: () => Promise<{
243
+ new (id: string, data?: string | number[], config?: CustomEaseConfig): {
244
+ id: string;
245
+ ease: EaseFunction;
246
+ data: string | number[];
247
+ segment: number[];
248
+ setData(data?: string | number[], config?: CustomEaseConfig): /*elided*/ any;
249
+ getSVGData(config?: CustomEaseConfig): string;
250
+ };
251
+ create(id: string, data?: string | number[], config?: CustomEaseConfig): EaseFunction;
252
+ register(core: object): void;
253
+ get(id: string): EaseFunction;
254
+ getSVGData(ease: CustomEase | EaseFunction | string, config?: CustomEaseConfig): string;
255
+ }>;
242
256
  RoughEase: () => Promise<gsap.RoughEase>;
243
257
  ExpoScaleEase: () => Promise<gsap.ExpoScaleEase>;
244
258
  SlowMo: () => Promise<gsap.SlowMo>;
245
- CustomBounce: () => Promise<any>;
246
- CustomWiggle: () => Promise<any>;
259
+ CustomBounce: () => Promise<{
260
+ new (id: string, vars?: CustomBounceVars): {
261
+ ease: EaseFunction;
262
+ };
263
+ create(id: string, vars?: CustomBounceVars): EaseFunction;
264
+ register(core: object): void;
265
+ }>;
266
+ CustomWiggle: () => Promise<{
267
+ new (id: string, vars?: CustomWiggleVars): {
268
+ ease: EaseFunction;
269
+ };
270
+ create(id: string, vars?: CustomWiggleVars): EaseFunction;
271
+ register(core: object): void;
272
+ }>;
247
273
  };
package/dist/types.d.mts CHANGED
@@ -1,7 +1,3 @@
1
- import type { NuxtModule } from '@nuxt/schema'
1
+ export { default } from './module.mjs'
2
2
 
3
- import type { default as Module } from './module.js'
4
-
5
- export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
-
7
- export { default } from './module.js'
3
+ export { type GSAPPluginName, type ModuleOptions } from './module.mjs'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gsap-nuxt-module",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "GSAP integration for Nuxt.",
5
5
  "repository": "LucaArgentieri/gsap-nuxt-module",
6
6
  "author": "Luca Argentieri",
@@ -13,13 +13,12 @@
13
13
  ],
14
14
  "exports": {
15
15
  ".": {
16
- "types": "./dist/types.d.ts",
17
16
  "import": "./dist/module.mjs",
18
- "require": "./dist/module.cjs"
17
+ "types": "./dist/types.d.mts"
19
18
  }
20
19
  },
21
- "main": "./dist/module.cjs",
22
- "types": "./dist/types.d.ts",
20
+ "main": "./dist/module.mjs",
21
+ "types": "./dist/types.d.mts",
23
22
  "files": [
24
23
  "dist"
25
24
  ],
@@ -36,19 +35,19 @@
36
35
  },
37
36
  "dependencies": {
38
37
  "@nuxt/kit": "^3.15.4",
39
- "gsap": "^3.13.0"
38
+ "gsap": "^3.14.1"
40
39
  },
41
40
  "devDependencies": {
42
41
  "@nuxt/devtools": "^2.1.0",
43
42
  "@nuxt/eslint-config": "^1.1.0",
44
- "@nuxt/module-builder": "^0.8.4",
43
+ "@nuxt/module-builder": "^1.0.1",
45
44
  "@nuxt/schema": "^3.15.4",
46
45
  "@nuxt/test-utils": "^3.17.0",
47
46
  "@types/node": "latest",
48
47
  "changelogen": "^0.6.0",
49
48
  "eslint": "^9.21.0",
50
49
  "nuxt": "^3.15.4",
51
- "typescript": "~5.7.3",
50
+ "typescript": "^5.9.3",
52
51
  "vitest": "^3.0.7",
53
52
  "vue-tsc": "^2.2.4"
54
53
  }
package/dist/module.cjs DELETED
@@ -1,5 +0,0 @@
1
- module.exports = function(...args) {
2
- return import('./module.mjs').then(m => m.default.call(this, ...args))
3
- }
4
- const _meta = module.exports.meta = require('./module.json')
5
- module.exports.getMeta = () => Promise.resolve(_meta)
package/dist/module.d.ts DELETED
@@ -1,11 +0,0 @@
1
- import * as _nuxt_schema from '@nuxt/schema';
2
- import { gsapPlugins } from '../dist/runtime/gsap-plugins.js';
3
-
4
- type GSAPPluginName = keyof typeof gsapPlugins;
5
- interface ModuleOptions {
6
- plugins?: GSAPPluginName[];
7
- }
8
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
9
-
10
- export { _default as default };
11
- export type { GSAPPluginName, ModuleOptions };
package/dist/types.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import type { NuxtModule } from '@nuxt/schema'
2
-
3
- import type { default as Module } from './module'
4
-
5
- export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
-
7
- export { default } from './module'