@motion.page/sdk 1.0.3 → 1.0.5
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/core/Animation.d.ts +6 -0
- package/dist/core/Timeline.d.ts +12 -1
- package/dist/easing/index.d.ts +1 -0
- package/dist/index.cjs +15 -15
- package/dist/index.cjs.map +12 -12
- package/dist/index.js +15 -15
- package/dist/index.js.map +12 -12
- package/dist/triggers/PinManager.d.ts +25 -1
- package/dist/utils/TextSplitter.d.ts +8 -0
- package/package.json +1 -1
|
@@ -40,6 +40,9 @@ export declare class PinManager {
|
|
|
40
40
|
private _fixedLeft;
|
|
41
41
|
private _width;
|
|
42
42
|
private _fixedBreakingAncestors;
|
|
43
|
+
private _isBodyPin;
|
|
44
|
+
private _originalHtmlHeight;
|
|
45
|
+
private _originalHtmlOverflow;
|
|
43
46
|
constructor(id: number);
|
|
44
47
|
/**
|
|
45
48
|
* Setup pinning for an element
|
|
@@ -98,6 +101,20 @@ export declare class PinManager {
|
|
|
98
101
|
bottom: number;
|
|
99
102
|
right: number;
|
|
100
103
|
} | null;
|
|
104
|
+
/**
|
|
105
|
+
* Whether this manager is using the body-pin strategy (html height extension).
|
|
106
|
+
*/
|
|
107
|
+
isBodyPin(): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Temporarily reset html.style.height to its original (pre-pin) value so that
|
|
110
|
+
* callers can measure the body's natural height without the inflation caused
|
|
111
|
+
* by the pin spacing. Returns a restore function that re-applies the current
|
|
112
|
+
* (inflated) height. No-op for non-body pins.
|
|
113
|
+
*
|
|
114
|
+
* Used by ScrollTrigger.refresh() before _calculateTriggerPositions() so
|
|
115
|
+
* trigger positions are derived from the body's real content height.
|
|
116
|
+
*/
|
|
117
|
+
suspendHtmlHeight(): (() => void) | null;
|
|
101
118
|
/**
|
|
102
119
|
* Check if using fixed pin strategy
|
|
103
120
|
*/
|
|
@@ -144,7 +161,14 @@ export declare class PinManager {
|
|
|
144
161
|
*/
|
|
145
162
|
private _restoreFixedBreakingAncestors;
|
|
146
163
|
/**
|
|
147
|
-
* Resolve pinSpacing config to a concrete value
|
|
164
|
+
* Resolve pinSpacing config to a concrete value.
|
|
165
|
+
*
|
|
166
|
+
* Auto-detection rules (when pinSpacing is undefined or true):
|
|
167
|
+
* - Body pin: scroll room is handled via documentElement height, not a spacer.
|
|
168
|
+
* Return false so the (non-existent) spacer gets no extra padding/margin.
|
|
169
|
+
* - Flex parent: GSAP parity — a flex container reflows automatically around a
|
|
170
|
+
* fixed child via the spacer's dimensions; extra padding would double-count.
|
|
171
|
+
* - Everything else: default to 'padding' (adds pinDistance as padding-bottom).
|
|
148
172
|
*/
|
|
149
173
|
private _resolvePinSpacing;
|
|
150
174
|
/**
|
|
@@ -67,6 +67,14 @@ export declare class TextSplitter {
|
|
|
67
67
|
* The wrapper clips content so animating y:'100%' creates a reveal effect.
|
|
68
68
|
*/
|
|
69
69
|
private static _applyMaskWrappers;
|
|
70
|
+
/**
|
|
71
|
+
* Detect if the split element uses `background-clip: text` (gradient text)
|
|
72
|
+
* and propagate the gradient through all generated spans so text stays visible.
|
|
73
|
+
*
|
|
74
|
+
* Without this, inline-block split spans inherit `-webkit-text-fill-color: transparent`
|
|
75
|
+
* but NOT the parent's gradient background, making the text invisible.
|
|
76
|
+
*/
|
|
77
|
+
private static _propagateGradientText;
|
|
70
78
|
/**
|
|
71
79
|
* Revert element to original content
|
|
72
80
|
*/
|