vevet 2.14.0 → 2.15.0
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/build/cdn/index.js +1 -1
- package/build/cjs/components/scroll/scrollable/ScrollEventsBase.js +11 -8
- package/build/cjs/version.js +1 -1
- package/build/es/components/scroll/scrollable/ScrollEventsBase.js +11 -8
- package/build/es/version.js +1 -1
- package/build/types/components/scroll/scrollable/ScrollEventsBase.d.ts +6 -0
- package/build/types/components/scroll/scrollable/ScrollEventsBase.d.ts.map +1 -1
- package/build/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/ts/components/scroll/scrollable/ScrollEventsBase.ts +17 -7
- package/src/ts/components/scroll/section/ScrollSectionProgress.ts +344 -344
- package/src/ts/version.ts +1 -1
|
@@ -51,7 +51,7 @@ var ScrollEventsBase = /** @class */ (function (_super) {
|
|
|
51
51
|
return _this;
|
|
52
52
|
}
|
|
53
53
|
ScrollEventsBase.prototype._getDefaultProp = function () {
|
|
54
|
-
return __assign(__assign({}, _super.prototype._getDefaultProp.call(this)), { container: window });
|
|
54
|
+
return __assign(__assign({}, _super.prototype._getDefaultProp.call(this)), { container: window, intersectionRoot: false });
|
|
55
55
|
};
|
|
56
56
|
Object.defineProperty(ScrollEventsBase.prototype, "scrollContainer", {
|
|
57
57
|
get: function () {
|
|
@@ -92,14 +92,17 @@ var ScrollEventsBase = /** @class */ (function (_super) {
|
|
|
92
92
|
* Used as a "root" for IntersectionObserver
|
|
93
93
|
*/
|
|
94
94
|
get: function () {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
if (this.prop.intersectionRoot === false) {
|
|
96
|
+
var scrollContainer = this.scrollContainer;
|
|
97
|
+
if (scrollContainer instanceof Window) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
if (scrollContainer instanceof Element) {
|
|
101
|
+
return scrollContainer;
|
|
102
|
+
}
|
|
103
|
+
return scrollContainer.outer;
|
|
101
104
|
}
|
|
102
|
-
return
|
|
105
|
+
return this.prop.intersectionRoot;
|
|
103
106
|
},
|
|
104
107
|
enumerable: false,
|
|
105
108
|
configurable: true
|
package/build/cjs/version.js
CHANGED
|
@@ -19,7 +19,7 @@ export class ScrollEventsBase extends Component {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
_getDefaultProp() {
|
|
22
|
-
return Object.assign(Object.assign({}, super._getDefaultProp()), { container: window });
|
|
22
|
+
return Object.assign(Object.assign({}, super._getDefaultProp()), { container: window, intersectionRoot: false });
|
|
23
23
|
}
|
|
24
24
|
get scrollContainer() {
|
|
25
25
|
return this._scrollContainer;
|
|
@@ -47,14 +47,17 @@ export class ScrollEventsBase extends Component {
|
|
|
47
47
|
* Used as a "root" for IntersectionObserver
|
|
48
48
|
*/
|
|
49
49
|
get intersectionRoot() {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
if (this.prop.intersectionRoot === false) {
|
|
51
|
+
const { scrollContainer } = this;
|
|
52
|
+
if (scrollContainer instanceof Window) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
if (scrollContainer instanceof Element) {
|
|
56
|
+
return scrollContainer;
|
|
57
|
+
}
|
|
58
|
+
return scrollContainer.outer;
|
|
56
59
|
}
|
|
57
|
-
return
|
|
60
|
+
return this.prop.intersectionRoot;
|
|
58
61
|
}
|
|
59
62
|
/**
|
|
60
63
|
* BoundingRect of 'scrollContainer'
|
package/build/es/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const version = '2.
|
|
1
|
+
const version = '2.15.0';
|
|
2
2
|
export default version;
|
|
@@ -11,6 +11,12 @@ export declare namespace NScrollEventsBase {
|
|
|
11
11
|
* @default window
|
|
12
12
|
*/
|
|
13
13
|
container?: string | Element | SmoothScroll | Window;
|
|
14
|
+
/**
|
|
15
|
+
* Intersection root element. If false, the element is found
|
|
16
|
+
* automatically
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
intersectionRoot?: false | null | Element;
|
|
14
20
|
}
|
|
15
21
|
/**
|
|
16
22
|
* Changeable properties
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollEventsBase.d.ts","sourceRoot":"","sources":["../../../../../src/ts/components/scroll/scrollable/ScrollEventsBase.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAI7D,yBAAiB,iBAAiB,CAAC;IAE/B;;OAEG;IACH,UAAiB,UAAW,SAAQ,UAAU,CAAC,UAAU;QACrD;;;WAGG;QACH,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,YAAY,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ScrollEventsBase.d.ts","sourceRoot":"","sources":["../../../../../src/ts/components/scroll/scrollable/ScrollEventsBase.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAI7D,yBAAiB,iBAAiB,CAAC;IAE/B;;OAEG;IACH,UAAiB,UAAW,SAAQ,UAAU,CAAC,UAAU;QACrD;;;WAGG;QACH,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,YAAY,GAAG,MAAM,CAAC;QACrD;;;;WAIG;QACH,gBAAgB,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,OAAO,CAAC;KAC7C;IAED;;OAEG;IACH,UAAiB,cAAe,SAAQ,UAAU,CAAC,cAAc;KAAI;IAErE;;OAEG;IACH,UAAiB,cAAe,SAAQ,UAAU,CAAC,cAAc;KAAI;IAErE;;OAEG;IACH,UAAiB,YAAY;QACzB,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAClB;CAEJ;AAID;;GAEG;AACH,8BAAsB,gBAAgB,CAClC,UAAU,SAAS,iBAAiB,CAAC,UAAU,GAAG,iBAAiB,CAAC,UAAU,EAC9E,cAAc,SAAS,iBAAiB,CAAC,cAAc,GAAG,iBAAiB,CAAC,cAAc,EAC1F,cAAc,SAAS,iBAAiB,CAAC,cAAc,GAAG,iBAAiB,CAAC,cAAc,CAC5F,SAAQ,SAAS,CACf,UAAU,EACV,cAAc,EACd,cAAc,CACjB;IACG,SAAS,CAAC,eAAe,CACrB,CAAC,SAAS,kBAAkB,CAAC,UAAU,GAAG,cAAc,CAAC,KACvD,CAAC;IAUP;;OAEG;IACH,SAAS,CAAC,gBAAgB,EAAE,OAAO,GAAG,YAAY,GAAG,MAAM,CAAC;IAC5D,IAAI,eAAe,kPAElB;IACD,IAAI,iBAAiB,yOAKpB;IAED;;OAEG;IACH,SAAS,KAAK,SAAS,YAStB;IAED;;OAEG;IACH,SAAS,KAAK,gBAAgB,YAY7B;IAED;;OAEG;IACH,SAAS,KAAK,uBAAuB,IAAK,iBAAiB,CAAC,YAAY,CAgBvE;gBAKG,WAAW,CAAC,EAAE,CAAC,UAAU,GAAG,cAAc,CAAC,EAC3C,IAAI,UAAO;CAgBlB"}
|
package/build/types/version.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -16,6 +16,12 @@ export namespace NScrollEventsBase {
|
|
|
16
16
|
* @default window
|
|
17
17
|
*/
|
|
18
18
|
container?: string | Element | SmoothScroll | Window;
|
|
19
|
+
/**
|
|
20
|
+
* Intersection root element. If false, the element is found
|
|
21
|
+
* automatically
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
intersectionRoot?: false | null | Element;
|
|
19
25
|
}
|
|
20
26
|
|
|
21
27
|
/**
|
|
@@ -60,6 +66,7 @@ export abstract class ScrollEventsBase <
|
|
|
60
66
|
return {
|
|
61
67
|
...super._getDefaultProp(),
|
|
62
68
|
container: window,
|
|
69
|
+
intersectionRoot: false,
|
|
63
70
|
};
|
|
64
71
|
}
|
|
65
72
|
|
|
@@ -97,14 +104,17 @@ export abstract class ScrollEventsBase <
|
|
|
97
104
|
* Used as a "root" for IntersectionObserver
|
|
98
105
|
*/
|
|
99
106
|
protected get intersectionRoot () {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
107
|
+
if (this.prop.intersectionRoot === false) {
|
|
108
|
+
const { scrollContainer } = this;
|
|
109
|
+
if (scrollContainer instanceof Window) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
if (scrollContainer instanceof Element) {
|
|
113
|
+
return scrollContainer;
|
|
114
|
+
}
|
|
115
|
+
return scrollContainer.outer;
|
|
103
116
|
}
|
|
104
|
-
|
|
105
|
-
return scrollContainer;
|
|
106
|
-
}
|
|
107
|
-
return scrollContainer.outer;
|
|
117
|
+
return this.prop.intersectionRoot;
|
|
108
118
|
}
|
|
109
119
|
|
|
110
120
|
/**
|