@sheinx/base 3.5.4-beta.1 → 3.5.4-beta.2
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/cjs/sticky/sticky.js +3 -3
- package/esm/sticky/sticky.js +3 -3
- package/package.json +2 -2
package/cjs/sticky/sticky.js
CHANGED
|
@@ -245,7 +245,7 @@ var Sticky = function Sticky(props) {
|
|
|
245
245
|
cancelFixedObserver();
|
|
246
246
|
context.fixedObserver = new IntersectionObserver(handleFixedInter, {
|
|
247
247
|
root: null,
|
|
248
|
-
rootMargin: "
|
|
248
|
+
rootMargin: "".concat(-(top || 0), "px 0px ").concat(-(bottom || 0), "px 0px"),
|
|
249
249
|
threshold: 1.0
|
|
250
250
|
});
|
|
251
251
|
};
|
|
@@ -281,7 +281,7 @@ var Sticky = function Sticky(props) {
|
|
|
281
281
|
if (window.IntersectionObserver) {
|
|
282
282
|
var observer = new IntersectionObserver(handleTargetPosition, {
|
|
283
283
|
root: context.target,
|
|
284
|
-
rootMargin: "
|
|
284
|
+
rootMargin: "".concat(-(top || 0), "px 0px ").concat(-(bottom || 0), "px 0px"),
|
|
285
285
|
threshold: 1.0
|
|
286
286
|
});
|
|
287
287
|
context.targetObserver = observer;
|
|
@@ -299,7 +299,7 @@ var Sticky = function Sticky(props) {
|
|
|
299
299
|
cancelParentObserver();
|
|
300
300
|
context.parentObserver = new IntersectionObserver(handleParentVisible, {
|
|
301
301
|
root: context.target,
|
|
302
|
-
rootMargin: "
|
|
302
|
+
rootMargin: "".concat(-(top || 0), "px 0px ").concat(-(bottom || 0), "px 0px"),
|
|
303
303
|
threshold: 0
|
|
304
304
|
});
|
|
305
305
|
context.parentObserver.observe(props.parent);
|
package/esm/sticky/sticky.js
CHANGED
|
@@ -239,7 +239,7 @@ var Sticky = function Sticky(props) {
|
|
|
239
239
|
cancelFixedObserver();
|
|
240
240
|
context.fixedObserver = new IntersectionObserver(handleFixedInter, {
|
|
241
241
|
root: null,
|
|
242
|
-
rootMargin: "
|
|
242
|
+
rootMargin: "".concat(-(top || 0), "px 0px ").concat(-(bottom || 0), "px 0px"),
|
|
243
243
|
threshold: 1.0
|
|
244
244
|
});
|
|
245
245
|
};
|
|
@@ -275,7 +275,7 @@ var Sticky = function Sticky(props) {
|
|
|
275
275
|
if (window.IntersectionObserver) {
|
|
276
276
|
var observer = new IntersectionObserver(handleTargetPosition, {
|
|
277
277
|
root: context.target,
|
|
278
|
-
rootMargin: "
|
|
278
|
+
rootMargin: "".concat(-(top || 0), "px 0px ").concat(-(bottom || 0), "px 0px"),
|
|
279
279
|
threshold: 1.0
|
|
280
280
|
});
|
|
281
281
|
context.targetObserver = observer;
|
|
@@ -293,7 +293,7 @@ var Sticky = function Sticky(props) {
|
|
|
293
293
|
cancelParentObserver();
|
|
294
294
|
context.parentObserver = new IntersectionObserver(handleParentVisible, {
|
|
295
295
|
root: context.target,
|
|
296
|
-
rootMargin: "
|
|
296
|
+
rootMargin: "".concat(-(top || 0), "px 0px ").concat(-(bottom || 0), "px 0px"),
|
|
297
297
|
threshold: 0
|
|
298
298
|
});
|
|
299
299
|
context.parentObserver.observe(props.parent);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheinx/base",
|
|
3
|
-
"version": "3.5.4-beta.
|
|
3
|
+
"version": "3.5.4-beta.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"module": "./esm/index.js",
|
|
11
11
|
"typings": "./cjs/index.d.ts",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@sheinx/hooks": "3.5.4-beta.
|
|
13
|
+
"@sheinx/hooks": "3.5.4-beta.2",
|
|
14
14
|
"immer": "^10.0.0",
|
|
15
15
|
"classnames": "^2.0.0",
|
|
16
16
|
"@shined/reactive": "^0.1.3-alpha.0"
|