@lisergia/core 11.0.0 → 13.0.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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +22 -0
- package/dist/index.cjs +10 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -1
- package/package.json +2 -2
- package/src/App.ts +5 -1
- package/src/Page.ts +1 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @lisergia/core@
|
|
3
|
+
> @lisergia/core@11.0.0 build
|
|
4
4
|
> tsup src/index.ts --format cjs,esm --dts
|
|
5
5
|
|
|
6
6
|
[1G[0K[34mCLI[39m Building entry: src/index.ts
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
[34mCLI[39m Target: node16
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
12
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m15.83 KB[39m
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 17ms
|
|
14
|
+
[32mESM[39m [1mdist/index.js [22m[32m13.64 KB[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 18ms
|
|
16
16
|
DTS Build start
|
|
17
|
-
DTS ⚡️ Build success in
|
|
18
|
-
DTS dist/index.d.cts 5.
|
|
19
|
-
DTS dist/index.d.ts 5.
|
|
17
|
+
DTS ⚡️ Build success in 783ms
|
|
18
|
+
DTS dist/index.d.cts 5.76 KB
|
|
19
|
+
DTS dist/index.d.ts 5.76 KB
|
|
20
20
|
[1G[0K⠙[1G[0K
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @lisergia/core
|
|
2
2
|
|
|
3
|
+
## 13.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- Add missing ScrollTrigger dependency.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @lisergia/config-tsconfig@13.0.0
|
|
13
|
+
|
|
14
|
+
## 12.0.0
|
|
15
|
+
|
|
16
|
+
### Major Changes
|
|
17
|
+
|
|
18
|
+
- Fix hashchange and popstate conflict.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
- @lisergia/config-tsconfig@12.0.0
|
|
24
|
+
|
|
3
25
|
## 11.0.0
|
|
4
26
|
|
|
5
27
|
### Major Changes
|
package/dist/index.cjs
CHANGED
|
@@ -426,7 +426,10 @@ var ApplicationManager = class extends Component {
|
|
|
426
426
|
//
|
|
427
427
|
// Pop State.
|
|
428
428
|
//
|
|
429
|
-
onPopState() {
|
|
429
|
+
onPopState(event) {
|
|
430
|
+
if (event.state === null) {
|
|
431
|
+
return event.preventDefault();
|
|
432
|
+
}
|
|
430
433
|
this.onRouteChangeRequest({
|
|
431
434
|
href: document.location.pathname,
|
|
432
435
|
pushState: false
|
|
@@ -454,6 +457,7 @@ var Application = new ApplicationManager();
|
|
|
454
457
|
// src/Page.ts
|
|
455
458
|
var import_lenis = __toESM(require("lenis"), 1);
|
|
456
459
|
var import_mobx3 = require("mobx");
|
|
460
|
+
var import_gsap = __toESM(require("gsap"), 1);
|
|
457
461
|
var import_tempus = __toESM(require("tempus"), 1);
|
|
458
462
|
var Page = class extends Component {
|
|
459
463
|
datasets = [];
|
|
@@ -539,7 +543,12 @@ var Page = class extends Component {
|
|
|
539
543
|
wrapper: this.element,
|
|
540
544
|
...this.scrollOptions
|
|
541
545
|
});
|
|
546
|
+
import_gsap.default.ticker.add((time) => {
|
|
547
|
+
this.lenis.raf(time * 1e3);
|
|
548
|
+
});
|
|
549
|
+
import_gsap.default.ticker.lagSmoothing(0);
|
|
542
550
|
this.lenis.on("scroll", (event) => {
|
|
551
|
+
ScrollTrigger.update();
|
|
543
552
|
this.onScroll(event.scroll);
|
|
544
553
|
this.emitter.emit("scroll", event);
|
|
545
554
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -168,7 +168,7 @@ declare class ApplicationManager extends Component {
|
|
|
168
168
|
response: string;
|
|
169
169
|
pushState: boolean;
|
|
170
170
|
}): Promise<void>;
|
|
171
|
-
onPopState(): void;
|
|
171
|
+
onPopState(event: PopStateEvent): void;
|
|
172
172
|
get scroll(): number;
|
|
173
173
|
addEventListeners(): void;
|
|
174
174
|
removeEventListeners(): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -168,7 +168,7 @@ declare class ApplicationManager extends Component {
|
|
|
168
168
|
response: string;
|
|
169
169
|
pushState: boolean;
|
|
170
170
|
}): Promise<void>;
|
|
171
|
-
onPopState(): void;
|
|
171
|
+
onPopState(event: PopStateEvent): void;
|
|
172
172
|
get scroll(): number;
|
|
173
173
|
addEventListeners(): void;
|
|
174
174
|
removeEventListeners(): void;
|
package/dist/index.js
CHANGED
|
@@ -383,7 +383,10 @@ var ApplicationManager = class extends Component {
|
|
|
383
383
|
//
|
|
384
384
|
// Pop State.
|
|
385
385
|
//
|
|
386
|
-
onPopState() {
|
|
386
|
+
onPopState(event) {
|
|
387
|
+
if (event.state === null) {
|
|
388
|
+
return event.preventDefault();
|
|
389
|
+
}
|
|
387
390
|
this.onRouteChangeRequest({
|
|
388
391
|
href: document.location.pathname,
|
|
389
392
|
pushState: false
|
|
@@ -411,6 +414,7 @@ var Application = new ApplicationManager();
|
|
|
411
414
|
// src/Page.ts
|
|
412
415
|
import Lenis from "lenis";
|
|
413
416
|
import { makeObservable as makeObservable2, observable as observable2 } from "mobx";
|
|
417
|
+
import GSAP from "gsap";
|
|
414
418
|
import Tempus from "tempus";
|
|
415
419
|
var Page = class extends Component {
|
|
416
420
|
datasets = [];
|
|
@@ -496,7 +500,12 @@ var Page = class extends Component {
|
|
|
496
500
|
wrapper: this.element,
|
|
497
501
|
...this.scrollOptions
|
|
498
502
|
});
|
|
503
|
+
GSAP.ticker.add((time) => {
|
|
504
|
+
this.lenis.raf(time * 1e3);
|
|
505
|
+
});
|
|
506
|
+
GSAP.ticker.lagSmoothing(0);
|
|
499
507
|
this.lenis.on("scroll", (event) => {
|
|
508
|
+
ScrollTrigger.update();
|
|
500
509
|
this.onScroll(event.scroll);
|
|
501
510
|
this.emitter.emit("scroll", event);
|
|
502
511
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lisergia/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dev": "tsup src/index.ts --format cjs,esm --dts --watch"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@lisergia/config-tsconfig": "
|
|
12
|
+
"@lisergia/config-tsconfig": "13.0.0",
|
|
13
13
|
"auto-bind": "^5.0.1",
|
|
14
14
|
"gsap": "^3.13.0",
|
|
15
15
|
"lenis": "^1.3.1",
|
package/src/App.ts
CHANGED
|
@@ -264,7 +264,11 @@ export class ApplicationManager extends Component {
|
|
|
264
264
|
//
|
|
265
265
|
// Pop State.
|
|
266
266
|
//
|
|
267
|
-
onPopState() {
|
|
267
|
+
onPopState(event: PopStateEvent) {
|
|
268
|
+
if (event.state === null) {
|
|
269
|
+
return event.preventDefault()
|
|
270
|
+
}
|
|
271
|
+
|
|
268
272
|
this.onRouteChangeRequest({
|
|
269
273
|
href: document.location.pathname,
|
|
270
274
|
pushState: false,
|
package/src/Page.ts
CHANGED