@motion.page/sdk 0.1.5 → 1.0.1
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/README.md +6 -8
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/dist/triggers/CursorTrigger.d.ts +6 -2
- package/dist/types/index.d.ts +0 -2
- package/package.json +1 -5
|
@@ -37,7 +37,7 @@ export declare class CursorTrigger extends BaseTrigger<CursorConfig> {
|
|
|
37
37
|
constructor(timeline: Timeline, config: CursorConfig);
|
|
38
38
|
private _parseStateConfig;
|
|
39
39
|
/**
|
|
40
|
-
* Set up the cursor:
|
|
40
|
+
* Set up the cursor: create container, create setters, attach listeners, start ticker.
|
|
41
41
|
*
|
|
42
42
|
* Architecture (mirrors original GSAP cursor):
|
|
43
43
|
* - Container (_element): position:fixed, zero-size, moved via x/y QuickSetters
|
|
@@ -49,7 +49,11 @@ export declare class CursorTrigger extends BaseTrigger<CursorConfig> {
|
|
|
49
49
|
* Tear down the cursor: remove ticker, restore native cursor, remove listeners.
|
|
50
50
|
*/
|
|
51
51
|
protected _onDisable(): void;
|
|
52
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Create the cursor container element and append it to document.body.
|
|
54
|
+
* The SDK always owns this container; it is removed in _onDisable().
|
|
55
|
+
*/
|
|
56
|
+
private _createContainer;
|
|
53
57
|
private _applyProperties;
|
|
54
58
|
private _createStateTimelines;
|
|
55
59
|
/**
|
package/dist/types/index.d.ts
CHANGED
|
@@ -332,8 +332,6 @@ export interface CursorSqueezeConfig {
|
|
|
332
332
|
* Main cursor configuration
|
|
333
333
|
*/
|
|
334
334
|
export interface CursorConfig {
|
|
335
|
-
/** Target element selector or element for the cursor container */
|
|
336
|
-
target?: string | Element;
|
|
337
335
|
/** Cursor type. Default: 'basic' */
|
|
338
336
|
type?: 'basic' | 'text' | 'media';
|
|
339
337
|
/** Smoothing factor (0 = most delay/smoothing, 1 = instant). Default: 0.25 */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@motion.page/sdk",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "High-performance CSS animation SDK with scroll, hover, gesture, and cursor triggers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
"jsdom": "^27.3.0",
|
|
33
33
|
"typescript": "^5.3.0"
|
|
34
34
|
},
|
|
35
|
-
"peerDependencies": {},
|
|
36
35
|
"keywords": [
|
|
37
36
|
"animation",
|
|
38
37
|
"gsap",
|
|
@@ -45,8 +44,5 @@
|
|
|
45
44
|
"author": "Motion.page",
|
|
46
45
|
"license": "FSL-1.1-Apache-2.0",
|
|
47
46
|
"homepage": "https://motion.page",
|
|
48
|
-
"engines": {
|
|
49
|
-
"node": ">=18"
|
|
50
|
-
},
|
|
51
47
|
"sideEffects": true
|
|
52
48
|
}
|