crelte 0.2.0 → 0.2.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/dist/cookies/ServerCookies.d.ts +4 -0
- package/dist/cookies/ServerCookies.d.ts.map +1 -1
- package/dist/cookies/ServerCookies.js +4 -0
- package/dist/cookies/internal.d.ts +3 -0
- package/dist/cookies/internal.d.ts.map +1 -0
- package/dist/cookies/internal.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/init/client.d.ts.map +1 -1
- package/dist/init/client.js +6 -0
- package/dist/routing/InnerRouter.d.ts +21 -15
- package/dist/routing/InnerRouter.d.ts.map +1 -1
- package/dist/routing/InnerRouter.js +76 -49
- package/dist/routing/Request.d.ts +6 -0
- package/dist/routing/Request.d.ts.map +1 -1
- package/dist/routing/Request.js +6 -0
- package/dist/routing/Route.d.ts +40 -17
- package/dist/routing/Route.d.ts.map +1 -1
- package/dist/routing/Route.js +69 -41
- package/dist/routing/Router.d.ts +30 -8
- package/dist/routing/Router.d.ts.map +1 -1
- package/dist/routing/Router.js +81 -20
- package/package.json +5 -1
- package/src/cookies/ServerCookies.ts +4 -0
- package/src/cookies/internal.ts +3 -0
- package/src/index.ts +9 -0
- package/src/init/client.ts +9 -0
- package/src/routing/InnerRouter.ts +81 -57
- package/src/routing/Request.ts +8 -0
- package/src/routing/Route.ts +91 -52
- package/src/routing/Router.ts +100 -27
- package/LICENSE.md +0 -41
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Cookies, SetOptions } from './index.js';
|
|
2
2
|
import { type SetCookie } from './utils.js';
|
|
3
|
+
/**
|
|
4
|
+
* ## Warning
|
|
5
|
+
* This is not stable and should only be used internally by crelte
|
|
6
|
+
*/
|
|
3
7
|
export default class ServerCookies implements Cookies {
|
|
4
8
|
requestCookies: Map<string, string>;
|
|
5
9
|
setCookies: Map<string, SetCookie>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerCookies.d.ts","sourceRoot":"","sources":["../../../../src/cookies/ServerCookies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAgB,KAAK,SAAS,EAAqB,MAAM,YAAY,CAAC;AAE7E,MAAM,CAAC,OAAO,OAAO,aAAc,YAAW,OAAO;IACpD,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;;IAOnC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAM5B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAUhC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI;IAIzD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI1B,qBAAqB,IAAI,MAAM,EAAE;CAKjC"}
|
|
1
|
+
{"version":3,"file":"ServerCookies.d.ts","sourceRoot":"","sources":["../../../../src/cookies/ServerCookies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAgB,KAAK,SAAS,EAAqB,MAAM,YAAY,CAAC;AAE7E;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,aAAc,YAAW,OAAO;IACpD,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;;IAOnC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAM5B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAUhC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI;IAIzD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI1B,qBAAqB,IAAI,MAAM,EAAE;CAKjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../src/cookies/internal.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -91,6 +91,7 @@ export declare function getGlobal<T extends GlobalData>(name: string): Global<T>
|
|
|
91
91
|
* This only works during component initialisation.
|
|
92
92
|
*/
|
|
93
93
|
export declare function getCookies(): Cookies;
|
|
94
|
+
export declare function onRoute(fn: (route: Route, crelte: Crelte) => void): void;
|
|
94
95
|
/**
|
|
95
96
|
* Listen for requests
|
|
96
97
|
*
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,oBAAoB,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,MAAM,EAAE,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mB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AAE,cAAc,GAAG,MAAM,CAAC;AACrD,wBAAgB,MAAM,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAAC;AACtD,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAKpD;;;;;GAKG;AACH,wBAAgB,UAAU,IAAI,QAAQ,CAAC,OAAO,CAAC,CAE9C;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAErD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,UAAU,EAC7C,IAAI,EAAE,MAAM,GACV,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAElB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,IAAI,OAAO,CAEpC;AAED,wBAAgB,OAAO,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,QAOjE;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,aAAa,KAAK,IAAI,QAOxD"}
|
package/dist/index.js
CHANGED
|
@@ -95,6 +95,13 @@ export function getGlobal(name) {
|
|
|
95
95
|
export function getCookies() {
|
|
96
96
|
return getCrelte().cookies;
|
|
97
97
|
}
|
|
98
|
+
export function onRoute(fn) {
|
|
99
|
+
const crelte = getCrelte();
|
|
100
|
+
const rmListener = crelte.router.onRoute(route => {
|
|
101
|
+
fn(route, crelte);
|
|
102
|
+
});
|
|
103
|
+
onDestroy(rmListener);
|
|
104
|
+
}
|
|
98
105
|
/**
|
|
99
106
|
* Listen for requests
|
|
100
107
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/init/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAKrD;;GAEG;AACH,MAAM,MAAM,Q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AAI,EAAE,QAAQ,QA0IlC"}
|
package/dist/init/client.js
CHANGED
|
@@ -128,6 +128,12 @@ export function main(data) {
|
|
|
128
128
|
}
|
|
129
129
|
await render();
|
|
130
130
|
};
|
|
131
|
+
crelte.router._internal.onNothingLoaded = async (req, ready) => {
|
|
132
|
+
crelte.globals._updateSiteId(req.site.id);
|
|
133
|
+
ready();
|
|
134
|
+
await tick();
|
|
135
|
+
crelte.router._internal.domReady(req);
|
|
136
|
+
};
|
|
131
137
|
crelte.router._internal.initClient();
|
|
132
138
|
}
|
|
133
139
|
function handleLoadError(e) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Site, { SiteFromGraphQl } from './Site.js';
|
|
2
2
|
import History from './History.js';
|
|
3
3
|
import Request, { RequestOptions } from './Request.js';
|
|
4
|
-
import Route
|
|
4
|
+
import Route from './Route.js';
|
|
5
5
|
export type InnerRouterOpts = {
|
|
6
6
|
preloadOnMouseOver: boolean;
|
|
7
7
|
};
|
|
@@ -56,9 +56,10 @@ export default class InnerRouter {
|
|
|
56
56
|
*/
|
|
57
57
|
siteById(id: number): Site | null;
|
|
58
58
|
/**
|
|
59
|
-
* Resolve a url or Route and convert it to a
|
|
59
|
+
* Resolve a url or Route and convert it to a Request
|
|
60
60
|
*
|
|
61
61
|
* @param target
|
|
62
|
+
* @param opts, any option present will override the value in target
|
|
62
63
|
* @return Returns null if the url does not match our host (the protocol get's ignored)
|
|
63
64
|
*/
|
|
64
65
|
targetToRequest(target: string | URL | Route | Request, opts?: RequestOptions): Request;
|
|
@@ -71,12 +72,16 @@ export default class InnerRouter {
|
|
|
71
72
|
routeFromUrl(fullUrl: URL): Route;
|
|
72
73
|
listen(): void;
|
|
73
74
|
/**
|
|
74
|
-
* Open
|
|
75
|
+
* Open a new route
|
|
75
76
|
*
|
|
76
77
|
* @param route a route object or an url or uri, never input the same route object again
|
|
77
78
|
* @param pushState if true pushed the state to the window.history
|
|
79
|
+
*
|
|
80
|
+
* ## Important
|
|
81
|
+
* Make sure a req always has the correct origin,
|
|
82
|
+
* `push` and `replace` will cause this function to throw an error
|
|
78
83
|
*/
|
|
79
|
-
open(
|
|
84
|
+
open(req: Request): void;
|
|
80
85
|
/**
|
|
81
86
|
* Sets a route
|
|
82
87
|
*
|
|
@@ -85,24 +90,25 @@ export default class InnerRouter {
|
|
|
85
90
|
*
|
|
86
91
|
* @param req
|
|
87
92
|
*/
|
|
88
|
-
setRoute(req: Request): void;
|
|
93
|
+
setRoute(req: Request, preventOnRoute?: boolean): void;
|
|
89
94
|
/**
|
|
90
|
-
* This pushes
|
|
91
|
-
* or currentSiteId change
|
|
95
|
+
* This pushes a new route to the history
|
|
92
96
|
*
|
|
93
|
-
*
|
|
94
|
-
* (search argument) and then call pushState
|
|
97
|
+
* @param req, never input the same route object again
|
|
95
98
|
*
|
|
96
|
-
*
|
|
99
|
+
* ## Important
|
|
100
|
+
* Make sure the route has the correct origin
|
|
97
101
|
*/
|
|
98
|
-
|
|
102
|
+
push(req: Request, preventOnRoute?: boolean): void;
|
|
99
103
|
/**
|
|
100
|
-
* This replaces the
|
|
101
|
-
*
|
|
104
|
+
* This replaces the current route
|
|
105
|
+
*
|
|
106
|
+
* @param req, never input the same route object again
|
|
102
107
|
*
|
|
103
|
-
*
|
|
108
|
+
* ## Important
|
|
109
|
+
* Make sure the route has the correct origin
|
|
104
110
|
*/
|
|
105
|
-
|
|
111
|
+
replace(req: Request): void;
|
|
106
112
|
/**
|
|
107
113
|
* Preload a url
|
|
108
114
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InnerRouter.d.ts","sourceRoot":"","sources":["../../../../src/routing/InnerRouter.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,OAAO,OAAO,EAAE,EAAa,cAAc,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,
|
|
1
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,OAAO,EAAE,GAAG,GAAG,KAAK;IAgCjC,MAAM;IA6FN;;;;;;;;;OASG;IACH,IAAI,CAAC,GAAG,EAAE,OAAO;IAuCjB;;;;;;;OAOG;IACH,QAAQ,CAAC,GAAG,EAAE,OAAO,EAAE,cAAc,UAAQ;IAM7C;;;;;;;OAOG;IACH,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,cAAc,UAAQ;IAsBzC;;;;;;;OAOG;IACH,OAAO,CAAC,GAAG,EAAE,OAAO;IAsBpB;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,GAAG,KAAK,GAAG,OAAO;IAW9C,QAAQ,CAAC,GAAG,EAAE,OAAO;CAsErB"}
|
|
@@ -51,11 +51,8 @@ export default class InnerRouter {
|
|
|
51
51
|
const req = this.targetToRequest(window.location.href);
|
|
52
52
|
req._fillFromState(window.history.state);
|
|
53
53
|
req.origin = 'init';
|
|
54
|
-
if (req.search.get('x-craft-live-preview')) {
|
|
55
|
-
req.origin = 'live-preview-init';
|
|
56
|
-
}
|
|
57
54
|
window.history.scrollRestoration = 'manual';
|
|
58
|
-
this.
|
|
55
|
+
this.setRoute(req);
|
|
59
56
|
}
|
|
60
57
|
/**
|
|
61
58
|
* Initializes the router when running on the server.
|
|
@@ -114,9 +111,10 @@ export default class InnerRouter {
|
|
|
114
111
|
return this.sites.find(s => s.id === id) ?? null;
|
|
115
112
|
}
|
|
116
113
|
/**
|
|
117
|
-
* Resolve a url or Route and convert it to a
|
|
114
|
+
* Resolve a url or Route and convert it to a Request
|
|
118
115
|
*
|
|
119
116
|
* @param target
|
|
117
|
+
* @param opts, any option present will override the value in target
|
|
120
118
|
* @return Returns null if the url does not match our host (the protocol get's ignored)
|
|
121
119
|
*/
|
|
122
120
|
targetToRequest(target, opts = {}) {
|
|
@@ -185,11 +183,18 @@ export default class InnerRouter {
|
|
|
185
183
|
if (!link.href.startsWith('http'))
|
|
186
184
|
return;
|
|
187
185
|
e.preventDefault();
|
|
188
|
-
const
|
|
189
|
-
|
|
186
|
+
const req = this.targetToRequest(link.href, { origin: 'click' });
|
|
187
|
+
const routeEq = this.route && this.route.eqUrl(req) && this.route.eqSearch(req);
|
|
188
|
+
// the route is the same don't do anything
|
|
189
|
+
// or maybe scroll the page to the hash? todo
|
|
190
|
+
if (routeEq && this.route?.eqHash(req))
|
|
190
191
|
return;
|
|
191
|
-
|
|
192
|
-
|
|
192
|
+
// this means the hash did not match, so we wan't to just scroll but not load
|
|
193
|
+
// data
|
|
194
|
+
if (routeEq) {
|
|
195
|
+
req.disableLoadData = true;
|
|
196
|
+
}
|
|
197
|
+
this.open(req);
|
|
193
198
|
});
|
|
194
199
|
if (this.preloadOnMouseOver) {
|
|
195
200
|
let currentMouseOver = null;
|
|
@@ -228,7 +233,7 @@ export default class InnerRouter {
|
|
|
228
233
|
return;
|
|
229
234
|
// use the latest state
|
|
230
235
|
this.history.replaceState(this.route._toState());
|
|
231
|
-
if (current.
|
|
236
|
+
if (current.inLivePreview()) {
|
|
232
237
|
sessionStorage.setItem('live-preview-scroll',
|
|
233
238
|
// use the latest scrollY
|
|
234
239
|
this.route.scrollY + '');
|
|
@@ -240,24 +245,26 @@ export default class InnerRouter {
|
|
|
240
245
|
window.addEventListener('popstate', async (e) => {
|
|
241
246
|
if (!('route' in e.state))
|
|
242
247
|
return;
|
|
243
|
-
const
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
// for the scrollY in our open call so we just clear the current
|
|
248
|
-
// route since it is now already the new route
|
|
249
|
-
this.route = null;
|
|
250
|
-
this.open(route, {}, false);
|
|
248
|
+
const req = this.targetToRequest(window.location.href);
|
|
249
|
+
req._fillFromState(e.state);
|
|
250
|
+
req.origin = 'pop';
|
|
251
|
+
this.setRoute(req);
|
|
251
252
|
});
|
|
252
253
|
}
|
|
253
254
|
/**
|
|
254
|
-
* Open
|
|
255
|
+
* Open a new route
|
|
255
256
|
*
|
|
256
257
|
* @param route a route object or an url or uri, never input the same route object again
|
|
257
258
|
* @param pushState if true pushed the state to the window.history
|
|
259
|
+
*
|
|
260
|
+
* ## Important
|
|
261
|
+
* Make sure a req always has the correct origin,
|
|
262
|
+
* `push` and `replace` will cause this function to throw an error
|
|
258
263
|
*/
|
|
259
|
-
open(
|
|
260
|
-
|
|
264
|
+
open(req) {
|
|
265
|
+
if (['push', 'replace'].includes(req.origin)) {
|
|
266
|
+
throw new Error('Do not use open with push or replace');
|
|
267
|
+
}
|
|
261
268
|
const current = this.route;
|
|
262
269
|
if (current) {
|
|
263
270
|
// if the scrollY would still be updated we clear the timeout
|
|
@@ -281,15 +288,10 @@ export default class InnerRouter {
|
|
|
281
288
|
this.history.open(req);
|
|
282
289
|
return;
|
|
283
290
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
this.
|
|
287
|
-
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
else {
|
|
291
|
-
this.setRoute(req);
|
|
292
|
-
}
|
|
291
|
+
req.index = (current?.index ?? 0) + 1;
|
|
292
|
+
this.onRoute(req, () => {
|
|
293
|
+
this.push(req, true);
|
|
294
|
+
});
|
|
293
295
|
}
|
|
294
296
|
/**
|
|
295
297
|
* Sets a route
|
|
@@ -299,34 +301,56 @@ export default class InnerRouter {
|
|
|
299
301
|
*
|
|
300
302
|
* @param req
|
|
301
303
|
*/
|
|
302
|
-
setRoute(req) {
|
|
304
|
+
setRoute(req, preventOnRoute = false) {
|
|
303
305
|
this.route = req.toRoute();
|
|
304
|
-
|
|
306
|
+
if (!preventOnRoute)
|
|
307
|
+
this.onRoute(req, () => { });
|
|
305
308
|
}
|
|
306
309
|
/**
|
|
307
|
-
* This pushes
|
|
308
|
-
* or currentSiteId change
|
|
310
|
+
* This pushes a new route to the history
|
|
309
311
|
*
|
|
310
|
-
*
|
|
311
|
-
* (search argument) and then call pushState
|
|
312
|
+
* @param req, never input the same route object again
|
|
312
313
|
*
|
|
313
|
-
*
|
|
314
|
+
* ## Important
|
|
315
|
+
* Make sure the route has the correct origin
|
|
314
316
|
*/
|
|
315
|
-
|
|
316
|
-
const url =
|
|
317
|
-
|
|
318
|
-
|
|
317
|
+
push(req, preventOnRoute = false) {
|
|
318
|
+
const url = req.url;
|
|
319
|
+
// todo a push should also store the previous scrollY
|
|
320
|
+
let nReq = req;
|
|
321
|
+
if (req.scrollY === null) {
|
|
322
|
+
// if there is no scrollY stored we store the current scrollY
|
|
323
|
+
// since a push does not cause a scroll top
|
|
324
|
+
// todo: probably should refactor something probably
|
|
325
|
+
// should not be here
|
|
326
|
+
nReq = req.clone();
|
|
327
|
+
nReq.scrollY = this.history.scrollY();
|
|
328
|
+
}
|
|
329
|
+
this.history.pushState(nReq._toState(), url.pathname + url.search + url.hash);
|
|
330
|
+
this.setRoute(req, preventOnRoute);
|
|
319
331
|
}
|
|
320
332
|
/**
|
|
321
|
-
* This replaces the
|
|
322
|
-
* or currentSiteId change
|
|
333
|
+
* This replaces the current route
|
|
323
334
|
*
|
|
324
|
-
* @param
|
|
335
|
+
* @param req, never input the same route object again
|
|
336
|
+
*
|
|
337
|
+
* ## Important
|
|
338
|
+
* Make sure the route has the correct origin
|
|
325
339
|
*/
|
|
326
|
-
|
|
327
|
-
const url =
|
|
328
|
-
|
|
329
|
-
|
|
340
|
+
replace(req) {
|
|
341
|
+
const url = req.url;
|
|
342
|
+
let nReq = req;
|
|
343
|
+
if (req.scrollY === null) {
|
|
344
|
+
// if there is no scrollY stored we store the current scrollY
|
|
345
|
+
// since a replace does not cause a scrollTo and we wan't
|
|
346
|
+
// history back to work as intended
|
|
347
|
+
// todo: probably should refactor something probably
|
|
348
|
+
// should not be here
|
|
349
|
+
nReq = req.clone();
|
|
350
|
+
nReq.scrollY = this.history.scrollY();
|
|
351
|
+
}
|
|
352
|
+
this.history.replaceState(nReq._toState(), url.pathname + url.search + url.hash);
|
|
353
|
+
this.setRoute(req);
|
|
330
354
|
}
|
|
331
355
|
/**
|
|
332
356
|
* Preload a url
|
|
@@ -351,7 +375,7 @@ export default class InnerRouter {
|
|
|
351
375
|
let scrollTo = null;
|
|
352
376
|
// if the route is a live preview init and we have a scrollY stored
|
|
353
377
|
// scroll to that
|
|
354
|
-
if (req.
|
|
378
|
+
if (req.inLivePreview()) {
|
|
355
379
|
const scrollY = sessionStorage.getItem('live-preview-scroll');
|
|
356
380
|
if (scrollY) {
|
|
357
381
|
scrollTo = {
|
|
@@ -381,6 +405,9 @@ export default class InnerRouter {
|
|
|
381
405
|
behavior: 'instant',
|
|
382
406
|
};
|
|
383
407
|
}
|
|
408
|
+
// make sure push and replace don't cause a scroll if it is not intended
|
|
409
|
+
if (!scrollTo && (req.origin === 'push' || req.origin === 'replace'))
|
|
410
|
+
return;
|
|
384
411
|
// scroll to the top if nothing else matches
|
|
385
412
|
if (!scrollTo) {
|
|
386
413
|
scrollTo = {
|
|
@@ -9,6 +9,7 @@ export type RequestOptions = {
|
|
|
9
9
|
index?: number;
|
|
10
10
|
origin?: RouteOrigin;
|
|
11
11
|
disableScroll?: boolean;
|
|
12
|
+
disableLoadData?: boolean;
|
|
12
13
|
statusCode?: number;
|
|
13
14
|
};
|
|
14
15
|
/**
|
|
@@ -22,6 +23,11 @@ export default class Request extends Route {
|
|
|
22
23
|
* @default false
|
|
23
24
|
*/
|
|
24
25
|
disableScroll: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Disable loading data
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
disableLoadData: boolean;
|
|
25
31
|
/**
|
|
26
32
|
* The Status code that should be returned for a redirect
|
|
27
33
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Request.d.ts","sourceRoot":"","sources":["../../../../src/routing/Request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B;;GAE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AI,CAAC;IAE1B,cAAc;IACd,cAAc,EAAE,aAAa,CAAC;IAE9B;;OAEG;gBACS,GAAG,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAE,cAAmB;IASpE;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,GAAE,cAAmB;IASxD;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,WAAW,IAAI,WAAW;IAI1B;;OAEG;IACH,KAAK;IAUL;;OAEG;IACH,OAAO;IAQP,cAAc;IACd,WAAW,CAAC,IAAI,GAAE,cAAmB;CAOrC;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,OAAO,CAElD;AAED,cAAM,aAAa;IAClB,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,WAAW,CAAC;;IAQlB,MAAM,IAAI,OAAO;IAIjB,GAAG,IAAI,WAAW;IAclB,cAAc;IACd,MAAM;IAQN,cAAc;IACd,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC;CAGzB;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB;;;;;OAKG;IACH,KAAK,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAE9B;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC"}
|
package/dist/routing/Request.js
CHANGED
|
@@ -11,6 +11,11 @@ export default class Request extends Route {
|
|
|
11
11
|
* @default false
|
|
12
12
|
*/
|
|
13
13
|
disableScroll;
|
|
14
|
+
/**
|
|
15
|
+
* Disable loading data
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
disableLoadData;
|
|
14
19
|
/**
|
|
15
20
|
* The Status code that should be returned for a redirect
|
|
16
21
|
*/
|
|
@@ -23,6 +28,7 @@ export default class Request extends Route {
|
|
|
23
28
|
constructor(url, site, opts = {}) {
|
|
24
29
|
super(url, site, opts);
|
|
25
30
|
this.disableScroll = opts.disableScroll ?? false;
|
|
31
|
+
this.disableLoadData = opts.disableLoadData ?? false;
|
|
26
32
|
this.statusCode = opts.statusCode ?? null;
|
|
27
33
|
this._renderBarrier = new RenderBarrier();
|
|
28
34
|
}
|
package/dist/routing/Route.d.ts
CHANGED
|
@@ -10,17 +10,18 @@ export type RouteOptions = {
|
|
|
10
10
|
*
|
|
11
11
|
* - `'init'`: is set on the first page load
|
|
12
12
|
* - `'manual'`: is set when a route is triggered manually via `Router.open`
|
|
13
|
-
* - `'live-preview-init'`: is set on the first page load in live preview mode
|
|
14
13
|
* - `'click'`: is set when a route is triggered by a click event
|
|
15
14
|
* - `'pop'`: is set when a route is triggered by a popstate event (back/forward)
|
|
15
|
+
* - `'replace'`: is set when a route is replaced via `Router.replaceState`
|
|
16
|
+
* - `'push'`: is set when a route is pushed via `Router.pushState`
|
|
17
|
+
*
|
|
18
|
+
* ## Note
|
|
19
|
+
* `replace` and `push` will not call loadData
|
|
16
20
|
*/
|
|
17
|
-
export type RouteOrigin = 'init' | '
|
|
21
|
+
export type RouteOrigin = 'init' | 'manual' | 'click' | 'pop' | 'replace' | 'push';
|
|
18
22
|
/**
|
|
19
23
|
* A Route contains information about the current page for example the url and
|
|
20
|
-
* the site
|
|
21
|
-
*
|
|
22
|
-
* ## Note
|
|
23
|
-
* Never update the route directly, clone it before
|
|
24
|
+
* the site
|
|
24
25
|
*/
|
|
25
26
|
export default class Route {
|
|
26
27
|
/**
|
|
@@ -40,6 +41,13 @@ export default class Route {
|
|
|
40
41
|
site: Site;
|
|
41
42
|
/**
|
|
42
43
|
* The scroll position of the current route
|
|
44
|
+
*
|
|
45
|
+
* ## Note
|
|
46
|
+
* This does not have to represent the current scroll position
|
|
47
|
+
* should more be used internally.
|
|
48
|
+
*
|
|
49
|
+
* It might be useful for a new request to specify the wanted
|
|
50
|
+
* scroll position
|
|
43
51
|
*/
|
|
44
52
|
scrollY: number | null;
|
|
45
53
|
/**
|
|
@@ -112,17 +120,6 @@ export default class Route {
|
|
|
112
120
|
* ```
|
|
113
121
|
*/
|
|
114
122
|
get hash(): string;
|
|
115
|
-
/**
|
|
116
|
-
* Returns if the site matches the url
|
|
117
|
-
*/
|
|
118
|
-
siteMatches(): boolean;
|
|
119
|
-
/**
|
|
120
|
-
* Checks if the route is equal to another route
|
|
121
|
-
*
|
|
122
|
-
* This checks all properties of the url but search params do not have to be
|
|
123
|
-
* in the same order
|
|
124
|
-
*/
|
|
125
|
-
eq(route: Route): boolean;
|
|
126
123
|
/**
|
|
127
124
|
* Checks if there are previous routes which would allow it to go back
|
|
128
125
|
*/
|
|
@@ -151,6 +148,32 @@ export default class Route {
|
|
|
151
148
|
* ```
|
|
152
149
|
*/
|
|
153
150
|
setSearchParam(key: string, value?: string | number | null): void;
|
|
151
|
+
inLivePreview(): boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Returns if the site matches the url
|
|
154
|
+
*/
|
|
155
|
+
siteMatches(): boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Checks if the route is equal to another route
|
|
158
|
+
*
|
|
159
|
+
* This checks all properties of the url but search params do not have to be
|
|
160
|
+
* in the same order
|
|
161
|
+
*/
|
|
162
|
+
eq(route: Route | null): boolean | null;
|
|
163
|
+
/**
|
|
164
|
+
* Checks if the route is equal to another route
|
|
165
|
+
*
|
|
166
|
+
* This does not check the search params or hash
|
|
167
|
+
*/
|
|
168
|
+
eqUrl(route: Route | null): boolean | null;
|
|
169
|
+
/**
|
|
170
|
+
* Checks if the search params are equal to another route
|
|
171
|
+
*/
|
|
172
|
+
eqSearch(route: Route | null): boolean | null;
|
|
173
|
+
/**
|
|
174
|
+
* Checks if the hash is equal to another route
|
|
175
|
+
*/
|
|
176
|
+
eqHash(route: Route | null): boolean | null;
|
|
154
177
|
/**
|
|
155
178
|
* Create a copy of the request
|
|
156
179
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Route.d.ts","sourceRoot":"","sources":["../../../../src/routing/Route.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,MAAM,MAAM,YAAY,GAAG;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"Route.d.ts","sourceRoot":"","sources":["../../../../src/routing/Route.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,MAAM,MAAM,YAAY,GAAG;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,WAAW,GACpB,MAAM,GACN,QAAQ,GACR,OAAO,GACP,KAAK,GACL,SAAS,GACT,MAAM,CAAC;AAEV;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,KAAK;IACzB;;OAEG;IACH,GAAG,EAAE,GAAG,CAAC;IAET;;;;;;;;;OASG;IACH,IAAI,EAAE,IAAI,CAAC;IAEX;;;;;;;;;OASG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,EAAE,WAAW,CAAC;IAEpB;;OAEG;gBACS,GAAG,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAE,YAAiB;IASlE;;;;;;;;;;;;;;;OAeG;IACH,IAAI,GAAG,IAAI,MAAM,CAQhB;IAED;;;;;;;;;;;;;;;OAeG;IACH,IAAI,OAAO,IAAI,MAAM,CAIpB;IAED;;;;;;;;;;;OAWG;IACH,IAAI,MAAM,IAAI,eAAe,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