@lisergia/core 17.0.0 → 18.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 +6 -6
- package/CHANGELOG.md +11 -0
- package/dist/index.cjs +4 -2
- package/dist/index.js +4 -2
- package/package.json +2 -2
- package/src/App.ts +8 -5
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @lisergia/core@
|
|
3
|
+
> @lisergia/core@17.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
|
+
[32mESM[39m [1mdist/index.js [22m[32m13.91 KB[39m
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 41ms
|
|
14
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m16.15 KB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 41ms
|
|
16
16
|
DTS Build start
|
|
17
|
-
DTS ⚡️ Build success in
|
|
17
|
+
DTS ⚡️ Build success in 763ms
|
|
18
18
|
DTS dist/index.d.cts 5.82 KB
|
|
19
19
|
DTS dist/index.d.ts 5.82 KB
|
|
20
20
|
[1G[0K⠙[1G[0K
|
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -406,8 +406,8 @@ var ApplicationManager = class extends Component {
|
|
|
406
406
|
nextPage = {};
|
|
407
407
|
async onRequest({ href, response, pushState }) {
|
|
408
408
|
var _a, _b;
|
|
409
|
-
|
|
410
|
-
|
|
409
|
+
let domParser = new DOMParser();
|
|
410
|
+
let dom = domParser.parseFromString(response, "text/html");
|
|
411
411
|
const html = dom.querySelector("html");
|
|
412
412
|
const app = dom.querySelector(".app");
|
|
413
413
|
this.nextPage = {
|
|
@@ -427,6 +427,8 @@ var ApplicationManager = class extends Component {
|
|
|
427
427
|
window.history.pushState({}, this.nextPage.title, href);
|
|
428
428
|
}
|
|
429
429
|
this.routeHistory.push(href);
|
|
430
|
+
domParser = null;
|
|
431
|
+
dom = null;
|
|
430
432
|
}
|
|
431
433
|
//
|
|
432
434
|
// Pop State.
|
package/dist/index.js
CHANGED
|
@@ -363,8 +363,8 @@ var ApplicationManager = class extends Component {
|
|
|
363
363
|
nextPage = {};
|
|
364
364
|
async onRequest({ href, response, pushState }) {
|
|
365
365
|
var _a, _b;
|
|
366
|
-
|
|
367
|
-
|
|
366
|
+
let domParser = new DOMParser();
|
|
367
|
+
let dom = domParser.parseFromString(response, "text/html");
|
|
368
368
|
const html = dom.querySelector("html");
|
|
369
369
|
const app = dom.querySelector(".app");
|
|
370
370
|
this.nextPage = {
|
|
@@ -384,6 +384,8 @@ var ApplicationManager = class extends Component {
|
|
|
384
384
|
window.history.pushState({}, this.nextPage.title, href);
|
|
385
385
|
}
|
|
386
386
|
this.routeHistory.push(href);
|
|
387
|
+
domParser = null;
|
|
388
|
+
dom = null;
|
|
387
389
|
}
|
|
388
390
|
//
|
|
389
391
|
// Pop State.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lisergia/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.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": "18.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
|
@@ -238,16 +238,16 @@ export class ApplicationManager extends Component {
|
|
|
238
238
|
} = {}
|
|
239
239
|
|
|
240
240
|
async onRequest({ href, response, pushState }: { href: string; response: string; pushState: boolean }) {
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
let domParser: DOMParser | null = new DOMParser()
|
|
242
|
+
let dom: Document | null = domParser.parseFromString(response, 'text/html')
|
|
243
243
|
|
|
244
|
-
const html = dom
|
|
245
|
-
const app = dom
|
|
244
|
+
const html = dom!.querySelector('html')!
|
|
245
|
+
const app = dom!.querySelector('.app')!
|
|
246
246
|
|
|
247
247
|
this.nextPage = {
|
|
248
248
|
element: app,
|
|
249
249
|
template: html.dataset.template ?? this.template,
|
|
250
|
-
title: dom
|
|
250
|
+
title: dom!.title ?? document.title,
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
if (this.transition) {
|
|
@@ -266,6 +266,9 @@ export class ApplicationManager extends Component {
|
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
this.routeHistory.push(href)
|
|
269
|
+
|
|
270
|
+
domParser = null
|
|
271
|
+
dom = null
|
|
269
272
|
}
|
|
270
273
|
|
|
271
274
|
//
|