crelte 0.5.7 → 0.5.9
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/blocks/Blocks.d.ts +36 -0
- package/dist/blocks/Blocks.d.ts.map +1 -1
- package/dist/blocks/Blocks.js +42 -0
- package/dist/blocks/Blocks.svelte +2 -16
- package/dist/blocks/Blocks.svelte.d.ts +20 -37
- package/dist/blocks/Blocks.svelte.d.ts.map +1 -1
- package/dist/blocks/index.d.ts +2 -2
- package/dist/blocks/index.d.ts.map +1 -1
- package/dist/blocks/index.js +2 -2
- package/dist/cookies/ServerCookies.d.ts +1 -1
- package/dist/cookies/ServerCookies.js +1 -1
- package/dist/cookies/index.d.ts +1 -1
- package/dist/crelte.d.ts +21 -10
- package/dist/crelte.d.ts.map +1 -1
- package/dist/index.d.ts +19 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -13
- package/dist/init/client.d.ts +2 -2
- package/dist/init/client.d.ts.map +1 -1
- package/dist/init/client.js +3 -2
- package/dist/init/server.d.ts +7 -6
- package/dist/init/server.d.ts.map +1 -1
- package/dist/init/server.js +6 -6
- package/dist/loadData/Globals.d.ts +3 -3
- package/dist/loadData/Globals.js +3 -3
- package/dist/loadData/loadData.d.ts +8 -18
- package/dist/loadData/loadData.d.ts.map +1 -1
- package/dist/loadData/loadData.js +2 -2
- package/dist/node/index.d.ts +5 -0
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +84 -35
- package/dist/plugins/Events.d.ts +4 -4
- package/dist/plugins/Plugins.d.ts +2 -2
- package/dist/plugins/index.d.ts +2 -3
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +2 -1
- package/dist/queries/Queries.d.ts +9 -0
- package/dist/queries/Queries.d.ts.map +1 -1
- package/dist/queries/Queries.js +29 -17
- package/dist/queries/QueryError.d.ts +2 -0
- package/dist/queries/QueryError.d.ts.map +1 -1
- package/dist/queries/QueryError.js +6 -1
- package/dist/queries/gql.d.ts +2 -2
- package/dist/queries/gql.js +2 -2
- package/dist/queries/index.d.ts +7 -5
- package/dist/queries/index.d.ts.map +1 -1
- package/dist/queries/vars.d.ts +7 -7
- package/dist/queries/vars.d.ts.map +1 -1
- package/dist/queries/vars.js +10 -8
- package/dist/routing/LoadRunner.d.ts +1 -1
- package/dist/routing/LoadRunner.js +1 -1
- package/dist/routing/index.d.ts +4 -4
- package/dist/routing/index.d.ts.map +1 -1
- package/dist/routing/route/BaseRoute.d.ts +25 -25
- package/dist/routing/route/BaseRoute.js +24 -24
- package/dist/routing/route/Request.d.ts +4 -4
- package/dist/routing/route/Request.js +4 -4
- package/dist/routing/route/Route.d.ts +2 -2
- package/dist/routing/route/Route.js +2 -2
- package/dist/routing/router/BaseRouter.d.ts +4 -4
- package/dist/routing/router/BaseRouter.js +3 -3
- package/dist/routing/router/ClientRouter.d.ts +1 -1
- package/dist/routing/router/ClientRouter.js +1 -1
- package/dist/routing/router/Router.d.ts +27 -25
- package/dist/routing/router/Router.d.ts.map +1 -1
- package/dist/routing/router/Router.js +24 -21
- package/dist/routing/router/ServerRouter.d.ts +1 -1
- package/dist/routing/router/ServerRouter.js +1 -1
- package/dist/server/CrelteServer.d.ts +5 -5
- package/dist/server/CrelteServer.d.ts.map +1 -1
- package/dist/server/CrelteServer.js +4 -4
- package/dist/server/Request.d.ts +7 -1
- package/dist/server/Request.d.ts.map +1 -1
- package/dist/server/Request.js +7 -1
- package/dist/server/ServerRouter.d.ts +1 -1
- package/dist/server/ServerRouter.d.ts.map +1 -1
- package/dist/server/index.d.ts +4 -4
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/queries/queries.d.ts.map +1 -1
- package/dist/server/queries/queries.js +14 -1
- package/dist/server/queries/routes.d.ts +10 -1
- package/dist/server/queries/routes.d.ts.map +1 -1
- package/dist/server/queries/routes.js +22 -5
- package/dist/server/shared.d.ts +7 -13
- package/dist/server/shared.d.ts.map +1 -1
- package/dist/server/shared.js +14 -16
- package/dist/ssr/SsrCache.d.ts +56 -4
- package/dist/ssr/SsrCache.d.ts.map +1 -1
- package/dist/ssr/SsrCache.js +94 -20
- package/dist/std/index.d.ts +13 -0
- package/dist/std/index.d.ts.map +1 -1
- package/dist/std/index.js +13 -0
- package/dist/std/rand/index.d.ts +34 -0
- package/dist/std/rand/index.d.ts.map +1 -0
- package/dist/std/rand/index.js +45 -0
- package/dist/std/rand/internal.d.ts +8 -0
- package/dist/std/rand/internal.d.ts.map +1 -0
- package/dist/std/rand/internal.js +15 -0
- package/dist/std/stores/Writable.d.ts +1 -1
- package/dist/std/stores/Writable.js +1 -1
- package/dist/translations/index.d.ts +28 -0
- package/dist/translations/index.d.ts.map +1 -0
- package/dist/translations/index.js +31 -0
- package/dist/translations/loadTranslations.d.ts +23 -0
- package/dist/translations/loadTranslations.d.ts.map +1 -0
- package/dist/translations/loadTranslations.js +26 -0
- package/dist/translations/loader/GlobalLoader.d.ts +34 -0
- package/dist/translations/loader/GlobalLoader.d.ts.map +1 -0
- package/dist/translations/loader/GlobalLoader.js +45 -0
- package/dist/translations/loader/fileLoader/ClientFileLoader.d.ts +10 -0
- package/dist/translations/loader/fileLoader/ClientFileLoader.d.ts.map +1 -0
- package/dist/translations/loader/fileLoader/ClientFileLoader.js +24 -0
- package/dist/translations/loader/fileLoader/NodeFileLoader.d.ts +9 -0
- package/dist/translations/loader/fileLoader/NodeFileLoader.d.ts.map +1 -0
- package/dist/translations/loader/fileLoader/NodeFileLoader.js +21 -0
- package/dist/translations/loader/fileLoader/fileLoader.d.ts +5 -0
- package/dist/translations/loader/fileLoader/fileLoader.d.ts.map +1 -0
- package/dist/translations/loader/fileLoader/fileLoader.js +16 -0
- package/dist/translations/loader/index.d.ts +7 -0
- package/dist/translations/loader/index.d.ts.map +1 -0
- package/dist/translations/loader/index.js +1 -0
- package/dist/translations/translationsPlugin.d.ts +64 -0
- package/dist/translations/translationsPlugin.d.ts.map +1 -0
- package/dist/translations/translationsPlugin.js +110 -0
- package/dist/translations/utils.d.ts +8 -0
- package/dist/translations/utils.d.ts.map +1 -0
- package/dist/translations/utils.js +15 -0
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +30 -38
- package/package.json +9 -1
- package/src/blocks/Blocks.svelte +4 -63
- package/src/blocks/Blocks.ts +53 -0
- package/src/blocks/index.ts +2 -2
- package/src/cookies/ServerCookies.ts +1 -1
- package/src/cookies/index.ts +1 -1
- package/src/crelte.ts +21 -10
- package/src/index.ts +19 -14
- package/src/init/client.ts +3 -2
- package/src/init/server.ts +14 -8
- package/src/loadData/Globals.ts +3 -3
- package/src/loadData/loadData.ts +8 -18
- package/src/node/index.ts +100 -39
- package/src/plugins/Events.ts +4 -4
- package/src/plugins/Plugins.ts +2 -2
- package/src/plugins/index.ts +2 -3
- package/src/queries/Queries.ts +35 -18
- package/src/queries/QueryError.ts +10 -1
- package/src/queries/gql.ts +2 -2
- package/src/queries/index.ts +7 -4
- package/src/queries/vars.ts +12 -8
- package/src/routing/LoadRunner.ts +1 -1
- package/src/routing/index.ts +13 -3
- package/src/routing/route/BaseRoute.ts +25 -25
- package/src/routing/route/Request.ts +4 -4
- package/src/routing/route/Route.ts +2 -2
- package/src/routing/router/BaseRouter.ts +4 -4
- package/src/routing/router/ClientRouter.ts +1 -1
- package/src/routing/router/Router.ts +28 -25
- package/src/routing/router/ServerRouter.ts +1 -1
- package/src/server/CrelteServer.ts +5 -5
- package/src/server/Request.ts +7 -1
- package/src/server/ServerRouter.ts +1 -2
- package/src/server/index.ts +17 -3
- package/src/server/queries/queries.ts +21 -3
- package/src/server/queries/routes.ts +41 -10
- package/src/server/shared.ts +28 -33
- package/src/ssr/SsrCache.ts +104 -22
- package/src/std/index.ts +14 -0
- package/src/std/rand/index.ts +55 -0
- package/src/std/rand/internal.ts +17 -0
- package/src/std/stores/Writable.ts +1 -1
- package/src/translations/index.ts +56 -0
- package/src/translations/loadTranslations.ts +33 -0
- package/src/translations/loader/GlobalLoader.ts +62 -0
- package/src/translations/loader/fileLoader/ClientFileLoader.ts +40 -0
- package/src/translations/loader/fileLoader/NodeFileLoader.ts +32 -0
- package/src/translations/loader/fileLoader/fileLoader.ts +19 -0
- package/src/translations/loader/index.ts +8 -0
- package/src/translations/translationsPlugin.ts +145 -0
- package/src/translations/utils.ts +17 -0
- package/src/vite/index.ts +43 -39
package/dist/blocks/Blocks.d.ts
CHANGED
|
@@ -36,6 +36,42 @@ export declare class BlockModules {
|
|
|
36
36
|
*/
|
|
37
37
|
load(requiredModules: Set<string>): Promise<Map<string, Module>>;
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Create a BlockModules instance from modules
|
|
41
|
+
*
|
|
42
|
+
* #### Example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const mods = blockModules(
|
|
45
|
+
* import.meta.glob('./contentDetail/*.svelte', { eager: true })
|
|
46
|
+
);
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* #### Example with alias
|
|
50
|
+
* ```ts
|
|
51
|
+
* const mods = blockModules(
|
|
52
|
+
* import.meta.glob('./contentDetail/*.svelte'),
|
|
53
|
+
* {
|
|
54
|
+
* alias: {
|
|
55
|
+
* fakename: 'filename',
|
|
56
|
+
* }
|
|
57
|
+
* }
|
|
58
|
+
* );
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export declare function blockModules(modules: Record<string, AsyncModule>, opts?: BlockModulesOptions): BlockModules;
|
|
62
|
+
/**
|
|
63
|
+
* Load blocks data
|
|
64
|
+
*
|
|
65
|
+
* #### Example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const mods = blockModules(import.meta.glob('./contentDetail/*.svelte'));
|
|
68
|
+
*
|
|
69
|
+
* export const loadData = {
|
|
70
|
+
* blocks: (cr, entry) => loadBlocksData(cr, entry.blocks, mods)
|
|
71
|
+
* };
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
export declare function loadBlocksData(cr: CrelteRequest, blocks: any[], modules: BlockModules): Promise<Blocks>;
|
|
39
75
|
/**
|
|
40
76
|
* Creates a new Blocks instance
|
|
41
77
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blocks.d.ts","sourceRoot":"","sources":["../../src/blocks/Blocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,MAAM,WAAW,MAAM;IACtB,uBAAuB;IACvB,OAAO,EAAE,GAAG,CAAC;IAEb,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE3B,iEAAiE;IACjE,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,QAAQ,CAAC,EAAE,CACV,EAAE,EAAE,aAAa,EACjB,KAAK,EAAE,GAAG,EACV,IAAI,EAAE,YAAY,KACd,OAAO,CAAC,GAAG,CAAC,CAAC;CAClB;AAED,MAAM,MAAM,YAAY,GAAG;IAC1B;;;;;;OAMG;IACH,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC;AAE3D,MAAM,MAAM,mBAAmB,GAAG;IACjC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B,CAAC;AAEF,qBAAa,YAAY;IACxB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAClC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAG1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EACpC,IAAI,GAAE,mBAAwB;IAgC/B;;;;OAIG;IACG,IAAI,CAAC,eAAe,EAAE,GAAG,CAAC,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G,CAAC,MAAM,EAAE,MAAM,CAAC;IAMjD,QAAQ,CAAC,EAAE,EAAE,aAAa;IAkBhC,IAAI,IAAI;QAAE,GAAG,EAAE,GAAG,CAAC;QAAC,KAAK,EAAE,GAAG,CAAA;KAAE,EAAE;CAclC"}
|
package/dist/blocks/Blocks.js
CHANGED
|
@@ -42,6 +42,48 @@ export class BlockModules {
|
|
|
42
42
|
return new Map([...requiredModules.keys()].map((mod, i) => [mod, loaded[i]]));
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Create a BlockModules instance from modules
|
|
47
|
+
*
|
|
48
|
+
* #### Example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const mods = blockModules(
|
|
51
|
+
* import.meta.glob('./contentDetail/*.svelte', { eager: true })
|
|
52
|
+
);
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* #### Example with alias
|
|
56
|
+
* ```ts
|
|
57
|
+
* const mods = blockModules(
|
|
58
|
+
* import.meta.glob('./contentDetail/*.svelte'),
|
|
59
|
+
* {
|
|
60
|
+
* alias: {
|
|
61
|
+
* fakename: 'filename',
|
|
62
|
+
* }
|
|
63
|
+
* }
|
|
64
|
+
* );
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export function blockModules(modules, opts = {}) {
|
|
68
|
+
return new BlockModules(modules, opts);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Load blocks data
|
|
72
|
+
*
|
|
73
|
+
* #### Example
|
|
74
|
+
* ```ts
|
|
75
|
+
* const mods = blockModules(import.meta.glob('./contentDetail/*.svelte'));
|
|
76
|
+
*
|
|
77
|
+
* export const loadData = {
|
|
78
|
+
* blocks: (cr, entry) => loadBlocksData(cr, entry.blocks, mods)
|
|
79
|
+
* };
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
export async function loadBlocksData(cr, blocks, modules) {
|
|
83
|
+
const nBlocks = await newBlocks(blocks, modules);
|
|
84
|
+
await nBlocks.loadData(cr);
|
|
85
|
+
return nBlocks;
|
|
86
|
+
}
|
|
45
87
|
/**
|
|
46
88
|
* Creates a new Blocks instance
|
|
47
89
|
*
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
BlockModules,
|
|
4
|
-
newBlocks
|
|
5
|
-
} from "./Blocks.js";
|
|
6
|
-
export function blockModules(modules, opts = {}) {
|
|
7
|
-
return new BlockModules(modules, opts);
|
|
8
|
-
}
|
|
9
|
-
export async function loadBlocksData(cr, blocks, modules) {
|
|
10
|
-
const nBlocks = await newBlocks(blocks, modules);
|
|
11
|
-
await nBlocks.loadData(cr);
|
|
12
|
-
return nBlocks;
|
|
13
|
-
}
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<script lang="ts">export let blocks;
|
|
1
|
+
<script lang="ts">import { BlocksInstance } from "./index.js";
|
|
2
|
+
export let blocks;
|
|
17
3
|
</script>
|
|
18
4
|
|
|
19
5
|
{#each blocks.each() as { mod, props }}
|
|
@@ -1,40 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
* }
|
|
22
|
-
* );
|
|
23
|
-
*/
|
|
24
|
-
export declare function blockModules(modules: Record<string, AsyncModule>, opts?: BlockModulesOptions): BlockModules;
|
|
25
|
-
/**
|
|
26
|
-
* Load blocks data
|
|
27
|
-
*
|
|
28
|
-
* ## Example
|
|
29
|
-
* ```ts
|
|
30
|
-
* const mods = blockModules(import.meta.glob('./contentDetail/*.svelte'));
|
|
31
|
-
*
|
|
32
|
-
* export const loadData = {
|
|
33
|
-
* blocks: (cr, entry) => loadBlocksData(cr, entry.blocks, mods)
|
|
34
|
-
* };
|
|
35
|
-
*/
|
|
36
|
-
export declare function loadBlocksData(cr: CrelteRequest, blocks: any[], modules: BlockModules): Promise<Blocks>;
|
|
37
|
-
declare const Blocks: any;
|
|
1
|
+
import { BlocksInstance } from './index.js';
|
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: Props & {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
12
|
+
};
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
14
|
+
}
|
|
15
|
+
declare const Blocks: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
blocks: BlocksInstance;
|
|
18
|
+
}, {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
}, {}, {}, string>;
|
|
38
21
|
type Blocks = InstanceType<typeof Blocks>;
|
|
39
22
|
export default Blocks;
|
|
40
23
|
//# sourceMappingURL=Blocks.svelte.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blocks.svelte.d.ts","sourceRoot":"","sources":["../../src/blocks/Blocks.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Blocks.svelte.d.ts","sourceRoot":"","sources":["../../src/blocks/Blocks.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AA6C5C,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,MAAM;IACpM,KAAK,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IAC9G,YAAY,CAAC,EAAE,QAAQ,CAAC;CAC3B;AAKD,QAAA,MAAM,MAAM;;YAVD,cAAc;;;kBAUyF,CAAC;AACjG,KAAK,MAAM,GAAG,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC;AAC5C,eAAe,MAAM,CAAC"}
|
package/dist/blocks/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import Blocks
|
|
1
|
+
import Blocks from './Blocks.svelte';
|
|
2
2
|
import type { BlockModules, BlockModulesOptions, AsyncModule, Module, BlockOptions } from './Blocks.js';
|
|
3
3
|
import type BlocksInstance from './Blocks.js';
|
|
4
|
-
import { newBlocks } from './Blocks.js';
|
|
4
|
+
import { newBlocks, blockModules, loadBlocksData } from './Blocks.js';
|
|
5
5
|
export type { BlocksInstance, BlockModules, BlockModulesOptions, AsyncModule, Module, BlockOptions, };
|
|
6
6
|
export { newBlocks, Blocks, blockModules, loadBlocksData };
|
|
7
7
|
export default Blocks;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/blocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/blocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,EACX,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,MAAM,EACN,YAAY,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,cAAc,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEtE,YAAY,EACX,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,MAAM,EACN,YAAY,GACZ,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAE3D,eAAe,MAAM,CAAC"}
|
package/dist/blocks/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Blocks
|
|
2
|
-
import { newBlocks } from './Blocks.js';
|
|
1
|
+
import Blocks from './Blocks.svelte';
|
|
2
|
+
import { newBlocks, blockModules, loadBlocksData } from './Blocks.js';
|
|
3
3
|
export { newBlocks, Blocks, blockModules, loadBlocksData };
|
|
4
4
|
export default Blocks;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Cookies, RemoveOptions, SetOptions } from './index.js';
|
|
2
2
|
import { type SetCookie } from './utils.js';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* #### Warning
|
|
5
5
|
* This is not stable and should only be used internally by crelte
|
|
6
6
|
*/
|
|
7
7
|
export default class ServerCookies implements Cookies {
|
package/dist/cookies/index.d.ts
CHANGED
package/dist/crelte.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import Site from './routing/Site.js';
|
|
|
8
8
|
import Queries, { Query, QueryOptions } from './queries/Queries.js';
|
|
9
9
|
import { Readable } from './std/stores/index.js';
|
|
10
10
|
import { Entry } from './loadData/index.js';
|
|
11
|
+
/** The type for the app.config object */
|
|
11
12
|
export type Config = {
|
|
12
13
|
/**
|
|
13
14
|
* Preload pages on mouse over
|
|
@@ -47,7 +48,7 @@ export declare function configWithDefaults(config?: Config): Required<Config>;
|
|
|
47
48
|
* In svelte contexts for each of these functions and classes there
|
|
48
49
|
* should be a getter function like `getCrelte()` or `getRouter()`.
|
|
49
50
|
*
|
|
50
|
-
*
|
|
51
|
+
* #### Note
|
|
51
52
|
* Plugins and other instances could modify this type, so when extending cloning
|
|
52
53
|
* or similar use the spread operator instead of naming all "properties".
|
|
53
54
|
*/
|
|
@@ -100,7 +101,7 @@ export type Crelte = {
|
|
|
100
101
|
/**
|
|
101
102
|
* returns the frontend url with an optional path
|
|
102
103
|
*
|
|
103
|
-
*
|
|
104
|
+
* #### Note
|
|
104
105
|
* On the client this will always be the current origin
|
|
105
106
|
* and on the server it will be the from the env `FRONTEND_URL` env
|
|
106
107
|
* variable
|
|
@@ -109,14 +110,14 @@ export type Crelte = {
|
|
|
109
110
|
/**
|
|
110
111
|
* returns the backend url with an optional path
|
|
111
112
|
*
|
|
112
|
-
*
|
|
113
|
+
* #### Note
|
|
113
114
|
* For the origin the `ENDPOINT_URL` env variable is used
|
|
114
115
|
*/
|
|
115
116
|
backendUrl(path?: string): URL;
|
|
116
117
|
/**
|
|
117
118
|
* returns a store which contains a globalSet
|
|
118
119
|
*
|
|
119
|
-
*
|
|
120
|
+
* #### Note
|
|
120
121
|
* This only works in loadData, in loadGlobalData this will
|
|
121
122
|
* always return null. In that context you should use
|
|
122
123
|
* `CrelteRequest.getGlobalAsync`
|
|
@@ -126,7 +127,7 @@ export type Crelte = {
|
|
|
126
127
|
* returns a new CrelteRequest instance either with the current
|
|
127
128
|
* route or a provided one
|
|
128
129
|
*
|
|
129
|
-
*
|
|
130
|
+
* #### Note
|
|
130
131
|
* This is useful if you want to create a stateful crelte
|
|
131
132
|
* to use in loadData context
|
|
132
133
|
*/
|
|
@@ -147,7 +148,7 @@ export type Crelte = {
|
|
|
147
148
|
* In svelte contexts for each of these functions and classes there
|
|
148
149
|
* should be a getter function like `getCrelte()` or `getRouter()`.
|
|
149
150
|
*
|
|
150
|
-
*
|
|
151
|
+
* #### Note
|
|
151
152
|
* Plugins and other instances could modify this type, so when extending cloning
|
|
152
153
|
* or similar use the spread operator instead of naming all "properties".
|
|
153
154
|
*/
|
|
@@ -159,13 +160,23 @@ export type CrelteWithRoute = Crelte & {
|
|
|
159
160
|
/**
|
|
160
161
|
* returns a store which contains a globalSet
|
|
161
162
|
*
|
|
162
|
-
*
|
|
163
|
+
* #### Note
|
|
163
164
|
* This only works in loadData, in loadGlobalData this will
|
|
164
165
|
* always return null. In that context you should use
|
|
165
166
|
* `CrelteRequest.getGlobalAsync`
|
|
166
167
|
*/
|
|
167
168
|
getGlobal<T = any>(name: string): Readable<T> | null;
|
|
168
169
|
};
|
|
170
|
+
/**
|
|
171
|
+
* This is Crelte a container of useful features and functions.
|
|
172
|
+
*
|
|
173
|
+
* In svelte contexts for each of these functions and classes there
|
|
174
|
+
* should be a getter function like `getCrelte()` or `getRouter()`.
|
|
175
|
+
*
|
|
176
|
+
* #### Note
|
|
177
|
+
* Plugins and other instances could modify this type, so when extending cloning
|
|
178
|
+
* or similar use the spread operator instead of naming all "properties".
|
|
179
|
+
*/
|
|
169
180
|
export type CrelteRequest = Crelte & {
|
|
170
181
|
/**
|
|
171
182
|
* The current request
|
|
@@ -174,7 +185,7 @@ export type CrelteRequest = Crelte & {
|
|
|
174
185
|
/**
|
|
175
186
|
* Easy access to this.req.site
|
|
176
187
|
*
|
|
177
|
-
*
|
|
188
|
+
* #### Note
|
|
178
189
|
* The site might not always match with the current route
|
|
179
190
|
* but be the site default site or one that matches the
|
|
180
191
|
* users language.
|
|
@@ -183,7 +194,7 @@ export type CrelteRequest = Crelte & {
|
|
|
183
194
|
/**
|
|
184
195
|
* returns a globalSet
|
|
185
196
|
*
|
|
186
|
-
*
|
|
197
|
+
* #### Note
|
|
187
198
|
* This only works in loadData, in loadGlobalData this will
|
|
188
199
|
* always return null. In that context you should use
|
|
189
200
|
* `.getGlobalAsync`
|
|
@@ -192,7 +203,7 @@ export type CrelteRequest = Crelte & {
|
|
|
192
203
|
/**
|
|
193
204
|
* Get a globalSet and wait until it is loaded
|
|
194
205
|
*
|
|
195
|
-
*
|
|
206
|
+
* #### Note
|
|
196
207
|
* This is only useful in loadGlobalData in all other cases
|
|
197
208
|
* you can use `.getGlobal` which does not return a Promise
|
|
198
209
|
*/
|
package/dist/crelte.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crelte.d.ts","sourceRoot":"","sources":["../src/crelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,OAAO,OAAO,EAAE,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,KAAK,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,OAAO,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAG5C,MAAM,MAAM,MAAM,GAAG;IACpB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;OAGG;IACH,cAAc,CAAC,EAAE,O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,OAAO,EACP,MAAM,EACN,OAAO,EACP,MAAM,EACN,OAAO,EACP,OAAO,GACP,EAAE;IACF,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CACjB,GAAG,MAAM,CAwBT;AAED,wBAAgB,eAAe,CAC9B,MAAM,EAAE,MAAM,EACd,GAAG,CAAC,EAAE,KAAK,GAAG,OAAO,GACnB,aAAa,CAkBf"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,53 +7,54 @@ import { Entry, LoadData, LoadDataArray, LoadDataFn, LoadDataObj } from './loadD
|
|
|
7
7
|
import Queries from './queries/Queries.js';
|
|
8
8
|
import { Readable } from './std/stores/index.js';
|
|
9
9
|
export { type Crelte, type CrelteWithRoute, type CrelteRequest, type Config, type LoadData, type LoadDataFn, type LoadDataObj, type LoadDataArray, };
|
|
10
|
+
/** The type for the app.init function */
|
|
10
11
|
export type Init = (crelte: Crelte) => void;
|
|
11
12
|
/**
|
|
12
13
|
* Get Crelte from the current context
|
|
13
14
|
*
|
|
14
|
-
*
|
|
15
|
+
* #### Note
|
|
15
16
|
* This only works during component initialisation.
|
|
16
17
|
*/
|
|
17
18
|
export declare function getCrelte(): CrelteWithRoute;
|
|
18
19
|
/**
|
|
19
20
|
* Get the router from the current context
|
|
20
21
|
*
|
|
21
|
-
*
|
|
22
|
+
* #### Note
|
|
22
23
|
* This only works during component initialisation.
|
|
23
24
|
*/
|
|
24
25
|
export declare function getRouter(): Router;
|
|
25
26
|
/**
|
|
26
27
|
* Get the SSR cache from the current context
|
|
27
28
|
*
|
|
28
|
-
*
|
|
29
|
+
* #### Note
|
|
29
30
|
* This only works during component initialisation.
|
|
30
31
|
*/
|
|
31
32
|
export declare function getSsrCache(): SsrCache;
|
|
32
33
|
/**
|
|
33
34
|
* Get the Queries from the current context
|
|
34
35
|
*
|
|
35
|
-
*
|
|
36
|
+
* #### Note
|
|
36
37
|
* This only works during component initialisation.
|
|
37
38
|
*/
|
|
38
39
|
export declare function getQueries(): Queries;
|
|
39
40
|
/**
|
|
40
41
|
* Get a store with the current route
|
|
41
42
|
*
|
|
42
|
-
*
|
|
43
|
+
* #### Note
|
|
43
44
|
* This only works during component initialisation.
|
|
44
45
|
*/
|
|
45
46
|
export declare function getRoute(): Readable<Route>;
|
|
46
47
|
/**
|
|
47
48
|
* Get a store with the current site
|
|
48
49
|
*
|
|
49
|
-
*
|
|
50
|
+
* #### Note
|
|
50
51
|
* This only works during component initialisation.
|
|
51
52
|
*/
|
|
52
53
|
export declare function getSite(): Readable<Site>;
|
|
53
54
|
/**
|
|
54
55
|
* Get a store with the current entry
|
|
55
56
|
*
|
|
56
|
-
*
|
|
57
|
+
* #### Note
|
|
57
58
|
* This only works during component initialisation.
|
|
58
59
|
*/
|
|
59
60
|
export declare function getEntry(): Readable<Entry>;
|
|
@@ -62,7 +63,7 @@ export declare function getEntry(): Readable<Entry>;
|
|
|
62
63
|
* All env variables need to start with VITE_
|
|
63
64
|
* except ENDPOINT_URL, CRAFT_WEB_URL and FRONTEND_URL
|
|
64
65
|
*
|
|
65
|
-
*
|
|
66
|
+
* #### Note
|
|
66
67
|
* This only works during component initialisation.
|
|
67
68
|
*/
|
|
68
69
|
export declare function getEnv(name: 'ENDPOINT_URL'): string;
|
|
@@ -72,42 +73,46 @@ export declare function getEnv(name: string): string | null;
|
|
|
72
73
|
/**
|
|
73
74
|
* returns a store which indicates if the a page is loading
|
|
74
75
|
*
|
|
75
|
-
*
|
|
76
|
+
* #### Note
|
|
76
77
|
* This only works during component initialisation.
|
|
77
78
|
*/
|
|
78
79
|
export declare function getLoading(): Readable<boolean>;
|
|
79
80
|
/**
|
|
80
81
|
* returns a store which indicates the loading progress between 0 and 1
|
|
81
82
|
*
|
|
82
|
-
*
|
|
83
|
+
* #### Note
|
|
83
84
|
* This only works during component initialisation.
|
|
84
85
|
*/
|
|
85
86
|
export declare function getLoadingProgress(): Readable<number>;
|
|
86
87
|
/**
|
|
87
88
|
* returns a store which contains a globalSet
|
|
88
89
|
*
|
|
89
|
-
*
|
|
90
|
+
* #### Note
|
|
90
91
|
* This only works during component initialisation.
|
|
91
92
|
*/
|
|
92
93
|
export declare function getGlobal<T = any>(name: string): Readable<T> | null;
|
|
93
94
|
/**
|
|
94
95
|
* returns the cookies instance
|
|
95
96
|
*
|
|
96
|
-
*
|
|
97
|
+
* #### Note
|
|
97
98
|
* This only works during component initialisation.
|
|
98
99
|
*/
|
|
99
100
|
export declare function getCookies(): Cookies;
|
|
100
101
|
/**
|
|
101
102
|
* Listen for route changes
|
|
102
103
|
*
|
|
103
|
-
*
|
|
104
|
+
* route: {@link Route}
|
|
105
|
+
*
|
|
106
|
+
* #### Note
|
|
104
107
|
* This only works during component initialisation.
|
|
105
108
|
*/
|
|
106
109
|
export declare function onRoute(fn: (route: Route) => void): void;
|
|
107
110
|
/**
|
|
108
111
|
* Listen for requests
|
|
109
112
|
*
|
|
110
|
-
*
|
|
113
|
+
* cr: {@link CrelteRequest}
|
|
114
|
+
*
|
|
115
|
+
* #### Note
|
|
111
116
|
* This only works during component initialisation.
|
|
112
117
|
*/
|
|
113
118
|
export declare function onRequest(fn: (cr: CrelteRequest) => void): void;
|
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,EAAE,KAAK,KAAK,EAAE,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EACN,KAAK,MA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AK,IAAI,QAIxD"}
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ function innerGetCrelte() {
|
|
|
5
5
|
/**
|
|
6
6
|
* Get Crelte from the current context
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* #### Note
|
|
9
9
|
* This only works during component initialisation.
|
|
10
10
|
*/
|
|
11
11
|
export function getCrelte() {
|
|
@@ -24,7 +24,7 @@ export function getCrelte() {
|
|
|
24
24
|
/**
|
|
25
25
|
* Get the router from the current context
|
|
26
26
|
*
|
|
27
|
-
*
|
|
27
|
+
* #### Note
|
|
28
28
|
* This only works during component initialisation.
|
|
29
29
|
*/
|
|
30
30
|
export function getRouter() {
|
|
@@ -33,7 +33,7 @@ export function getRouter() {
|
|
|
33
33
|
/**
|
|
34
34
|
* Get the SSR cache from the current context
|
|
35
35
|
*
|
|
36
|
-
*
|
|
36
|
+
* #### Note
|
|
37
37
|
* This only works during component initialisation.
|
|
38
38
|
*/
|
|
39
39
|
export function getSsrCache() {
|
|
@@ -42,7 +42,7 @@ export function getSsrCache() {
|
|
|
42
42
|
/**
|
|
43
43
|
* Get the Queries from the current context
|
|
44
44
|
*
|
|
45
|
-
*
|
|
45
|
+
* #### Note
|
|
46
46
|
* This only works during component initialisation.
|
|
47
47
|
*/
|
|
48
48
|
export function getQueries() {
|
|
@@ -51,7 +51,7 @@ export function getQueries() {
|
|
|
51
51
|
/**
|
|
52
52
|
* Get a store with the current route
|
|
53
53
|
*
|
|
54
|
-
*
|
|
54
|
+
* #### Note
|
|
55
55
|
* This only works during component initialisation.
|
|
56
56
|
*/
|
|
57
57
|
export function getRoute() {
|
|
@@ -60,7 +60,7 @@ export function getRoute() {
|
|
|
60
60
|
/**
|
|
61
61
|
* Get a store with the current site
|
|
62
62
|
*
|
|
63
|
-
*
|
|
63
|
+
* #### Note
|
|
64
64
|
* This only works during component initialisation.
|
|
65
65
|
*/
|
|
66
66
|
export function getSite() {
|
|
@@ -69,7 +69,7 @@ export function getSite() {
|
|
|
69
69
|
/**
|
|
70
70
|
* Get a store with the current entry
|
|
71
71
|
*
|
|
72
|
-
*
|
|
72
|
+
* #### Note
|
|
73
73
|
* This only works during component initialisation.
|
|
74
74
|
*/
|
|
75
75
|
export function getEntry() {
|
|
@@ -81,7 +81,7 @@ export function getEnv(name) {
|
|
|
81
81
|
/**
|
|
82
82
|
* returns a store which indicates if the a page is loading
|
|
83
83
|
*
|
|
84
|
-
*
|
|
84
|
+
* #### Note
|
|
85
85
|
* This only works during component initialisation.
|
|
86
86
|
*/
|
|
87
87
|
export function getLoading() {
|
|
@@ -90,7 +90,7 @@ export function getLoading() {
|
|
|
90
90
|
/**
|
|
91
91
|
* returns a store which indicates the loading progress between 0 and 1
|
|
92
92
|
*
|
|
93
|
-
*
|
|
93
|
+
* #### Note
|
|
94
94
|
* This only works during component initialisation.
|
|
95
95
|
*/
|
|
96
96
|
export function getLoadingProgress() {
|
|
@@ -99,7 +99,7 @@ export function getLoadingProgress() {
|
|
|
99
99
|
/**
|
|
100
100
|
* returns a store which contains a globalSet
|
|
101
101
|
*
|
|
102
|
-
*
|
|
102
|
+
* #### Note
|
|
103
103
|
* This only works during component initialisation.
|
|
104
104
|
*/
|
|
105
105
|
export function getGlobal(name) {
|
|
@@ -108,7 +108,7 @@ export function getGlobal(name) {
|
|
|
108
108
|
/**
|
|
109
109
|
* returns the cookies instance
|
|
110
110
|
*
|
|
111
|
-
*
|
|
111
|
+
* #### Note
|
|
112
112
|
* This only works during component initialisation.
|
|
113
113
|
*/
|
|
114
114
|
export function getCookies() {
|
|
@@ -117,7 +117,9 @@ export function getCookies() {
|
|
|
117
117
|
/**
|
|
118
118
|
* Listen for route changes
|
|
119
119
|
*
|
|
120
|
-
*
|
|
120
|
+
* route: {@link Route}
|
|
121
|
+
*
|
|
122
|
+
* #### Note
|
|
121
123
|
* This only works during component initialisation.
|
|
122
124
|
*/
|
|
123
125
|
export function onRoute(fn) {
|
|
@@ -127,7 +129,9 @@ export function onRoute(fn) {
|
|
|
127
129
|
/**
|
|
128
130
|
* Listen for requests
|
|
129
131
|
*
|
|
130
|
-
*
|
|
132
|
+
* cr: {@link CrelteRequest}
|
|
133
|
+
*
|
|
134
|
+
* #### Note
|
|
131
135
|
* This only works during component initialisation.
|
|
132
136
|
*/
|
|
133
137
|
export function onRequest(fn) {
|
package/dist/init/client.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ export type MainData = {
|
|
|
10
10
|
/**
|
|
11
11
|
* The main function to start the client side rendering
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
* ```
|
|
13
|
+
* #### Example
|
|
14
|
+
* ```js
|
|
15
15
|
* import * as app from './App.svelte';
|
|
16
16
|
* import * as errorPage from './Error.svelte';
|
|
17
17
|
* import entryQuery from './queries/entry.graphql';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/init/client.ts"],"names":[],"mappings":"AAsBA;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACtB,4BAA4B;IAC5B,GAAG,EAAE,GAAG,CAAC;IACT,8BAA8B;IAC9B,SAAS,EAAE,GAAG,CAAC;CACf,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,IAAI,CAAC,IAAI,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/init/client.ts"],"names":[],"mappings":"AAsBA;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACtB,4BAA4B;IAC5B,GAAG,EAAE,GAAG,CAAC;IACT,8BAA8B;IAC9B,SAAS,EAAE,GAAG,CAAC;CACf,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,IAAI,CAAC,IAAI,EAAE,QAAQ,iBA6JxC"}
|
package/dist/init/client.js
CHANGED
|
@@ -14,8 +14,8 @@ import { Writable } from '../std/stores/index.js';
|
|
|
14
14
|
/**
|
|
15
15
|
* The main function to start the client side rendering
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
* ```
|
|
17
|
+
* #### Example
|
|
18
|
+
* ```js
|
|
19
19
|
* import * as app from './App.svelte';
|
|
20
20
|
* import * as errorPage from './Error.svelte';
|
|
21
21
|
* import entryQuery from './queries/entry.graphql';
|
|
@@ -35,6 +35,7 @@ export async function main(data) {
|
|
|
35
35
|
// they should be added to App.svelte and removed from here
|
|
36
36
|
const config = configWithDefaults(data.app.config ?? {});
|
|
37
37
|
const ssrCache = new SsrCache();
|
|
38
|
+
ssrCache.z_importFromHead();
|
|
38
39
|
// since cors could cause an issue we wan't to override the FRONTEND_URL
|
|
39
40
|
// env variable, since the server will be reachable on any domain
|
|
40
41
|
// which the frontend also gets served from
|