@lisergia/core 15.0.0 → 16.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 +5 -5
- package/CHANGELOG.md +11 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/package.json +2 -2
- package/src/App.ts +10 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @lisergia/core@
|
|
3
|
+
> @lisergia/core@15.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
|
-
[32mCJS[39m [1mdist/index.cjs [22m[32m16.00 KB[39m
|
|
13
|
-
[32mCJS[39m ⚡️ Build success in 34ms
|
|
14
12
|
[32mESM[39m [1mdist/index.js [22m[32m13.77 KB[39m
|
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 131ms
|
|
14
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m15.99 KB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 131ms
|
|
16
16
|
DTS Build start
|
|
17
|
-
DTS ⚡️ Build success in
|
|
17
|
+
DTS ⚡️ Build success in 840ms
|
|
18
18
|
DTS dist/index.d.cts 5.76 KB
|
|
19
19
|
DTS dist/index.d.ts 5.76 KB
|
|
20
20
|
[1G[0K⠙[1G[0K
|
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -403,6 +403,7 @@ var ApplicationManager = class extends Component {
|
|
|
403
403
|
nextPage = {};
|
|
404
404
|
async onRequest({ href, response, pushState }) {
|
|
405
405
|
var _a, _b;
|
|
406
|
+
console.log(pushState, href);
|
|
406
407
|
const domParser = new DOMParser();
|
|
407
408
|
const dom = domParser.parseFromString(response, "text/html");
|
|
408
409
|
const html = dom.querySelector("html");
|
|
@@ -440,8 +441,7 @@ var ApplicationManager = class extends Component {
|
|
|
440
441
|
// Scroll.
|
|
441
442
|
//
|
|
442
443
|
get scroll() {
|
|
443
|
-
|
|
444
|
-
return ((_a = this.currentPage) == null ? void 0 : _a.scroll) ?? 0;
|
|
444
|
+
return this.currentPage.scroll ?? 0;
|
|
445
445
|
}
|
|
446
446
|
//
|
|
447
447
|
// Listeners.
|
package/dist/index.js
CHANGED
|
@@ -360,6 +360,7 @@ var ApplicationManager = class extends Component {
|
|
|
360
360
|
nextPage = {};
|
|
361
361
|
async onRequest({ href, response, pushState }) {
|
|
362
362
|
var _a, _b;
|
|
363
|
+
console.log(pushState, href);
|
|
363
364
|
const domParser = new DOMParser();
|
|
364
365
|
const dom = domParser.parseFromString(response, "text/html");
|
|
365
366
|
const html = dom.querySelector("html");
|
|
@@ -397,8 +398,7 @@ var ApplicationManager = class extends Component {
|
|
|
397
398
|
// Scroll.
|
|
398
399
|
//
|
|
399
400
|
get scroll() {
|
|
400
|
-
|
|
401
|
-
return ((_a = this.currentPage) == null ? void 0 : _a.scroll) ?? 0;
|
|
401
|
+
return this.currentPage.scroll ?? 0;
|
|
402
402
|
}
|
|
403
403
|
//
|
|
404
404
|
// Listeners.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lisergia/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.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": "16.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
|
@@ -43,6 +43,7 @@ export class ApplicationManager extends Component {
|
|
|
43
43
|
|
|
44
44
|
// Route Information.
|
|
45
45
|
route: observable,
|
|
46
|
+
routeHistory: observable,
|
|
46
47
|
|
|
47
48
|
// Template Information.
|
|
48
49
|
template: observable,
|
|
@@ -204,13 +205,15 @@ export class ApplicationManager extends Component {
|
|
|
204
205
|
// Navigate.
|
|
205
206
|
//
|
|
206
207
|
route: string = window.location.pathname
|
|
208
|
+
routeHistory: Array<string> = [this.route]
|
|
209
|
+
routePushState: boolean = true
|
|
207
210
|
|
|
208
211
|
onRouteChange({ oldValue, newValue }: IValueDidChange<string>) {
|
|
209
212
|
const href = newValue.replace(window.location.origin, '')
|
|
210
213
|
|
|
211
214
|
this.onRouteChangeRequest({
|
|
212
215
|
href,
|
|
213
|
-
pushState:
|
|
216
|
+
pushState: this.routePushState,
|
|
214
217
|
})
|
|
215
218
|
}
|
|
216
219
|
|
|
@@ -261,6 +264,8 @@ export class ApplicationManager extends Component {
|
|
|
261
264
|
if (pushState) {
|
|
262
265
|
window.history.pushState({}, this.nextPage.title!, href)
|
|
263
266
|
}
|
|
267
|
+
|
|
268
|
+
this.routeHistory.push(href)
|
|
264
269
|
}
|
|
265
270
|
|
|
266
271
|
//
|
|
@@ -271,17 +276,16 @@ export class ApplicationManager extends Component {
|
|
|
271
276
|
return event.preventDefault()
|
|
272
277
|
}
|
|
273
278
|
|
|
274
|
-
this.
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
})
|
|
279
|
+
this.routePushState = false
|
|
280
|
+
this.route = document.location.pathname
|
|
281
|
+
this.routePushState = false
|
|
278
282
|
}
|
|
279
283
|
|
|
280
284
|
//
|
|
281
285
|
// Scroll.
|
|
282
286
|
//
|
|
283
287
|
get scroll() {
|
|
284
|
-
return this.currentPage
|
|
288
|
+
return this.currentPage!.scroll ?? 0
|
|
285
289
|
}
|
|
286
290
|
|
|
287
291
|
//
|