crelte 0.2.1 → 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/routing/Router.js +1 -1
- package/package.json +5 -1
- package/src/cookies/ServerCookies.ts +4 -0
- package/src/cookies/internal.ts +3 -0
- package/src/routing/Router.ts +5 -5
|
@@ -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/routing/Router.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Listeners } from 'crelte-std/sync';
|
|
|
5
5
|
import Request from './Request.js';
|
|
6
6
|
const defaultRouterOpts = {
|
|
7
7
|
preloadOnMouseOver: false,
|
|
8
|
-
|
|
8
|
+
debugTiming: false,
|
|
9
9
|
};
|
|
10
10
|
// Make sure route and nextRoute are not the same object as _inner.route
|
|
11
11
|
export default class Router {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "crelte",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"author": "Crelte <support@crelte.com>",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -60,6 +60,10 @@
|
|
|
60
60
|
"types": "./dist/cookies/index.d.ts",
|
|
61
61
|
"default": "./dist/cookies/index.js"
|
|
62
62
|
},
|
|
63
|
+
"./cookies/internal": {
|
|
64
|
+
"types": "./dist/cookies/internal.d.ts",
|
|
65
|
+
"default": "./dist/cookies/internal.js"
|
|
66
|
+
},
|
|
63
67
|
"./blocks": {
|
|
64
68
|
"types": "./dist/blocks/index.d.ts",
|
|
65
69
|
"default": "./dist/blocks/index.js"
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Cookies, SetOptions } from './index.js';
|
|
2
2
|
import { parseCookies, type SetCookie, setCookieToString } from './utils.js';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* ## Warning
|
|
6
|
+
* This is not stable and should only be used internally by crelte
|
|
7
|
+
*/
|
|
4
8
|
export default class ServerCookies implements Cookies {
|
|
5
9
|
requestCookies: Map<string, string>;
|
|
6
10
|
setCookies: Map<string, SetCookie>;
|
package/src/routing/Router.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type RouterOptions = {
|
|
|
14
14
|
|
|
15
15
|
const defaultRouterOpts = {
|
|
16
16
|
preloadOnMouseOver: false,
|
|
17
|
-
|
|
17
|
+
debugTiming: false,
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
type LoadedMore = {
|
|
@@ -117,9 +117,9 @@ export default class Router {
|
|
|
117
117
|
this._onRequest = new Listeners();
|
|
118
118
|
|
|
119
119
|
this._internal = {
|
|
120
|
-
onLoaded: () => {},
|
|
121
|
-
onNothingLoaded: () => {},
|
|
122
|
-
onLoad: () => {},
|
|
120
|
+
onLoaded: () => { },
|
|
121
|
+
onNothingLoaded: () => { },
|
|
122
|
+
onLoad: () => { },
|
|
123
123
|
domReady: req => this.inner.domReady(req),
|
|
124
124
|
initClient: () => this._initClient(),
|
|
125
125
|
initServer: (url, acceptLang) => this._initServer(url, acceptLang),
|
|
@@ -356,7 +356,7 @@ export default class Router {
|
|
|
356
356
|
const prom: Promise<ServerInited> = new Promise(resolve => {
|
|
357
357
|
this._internal.onLoaded = (success, req, ready) => {
|
|
358
358
|
const props = ready();
|
|
359
|
-
this._internal.onLoaded = () => {};
|
|
359
|
+
this._internal.onLoaded = () => { };
|
|
360
360
|
|
|
361
361
|
resolve({
|
|
362
362
|
success,
|