@sveltejs/kit 1.0.0-next.35 → 1.0.0-next.350
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/README.md +12 -9
- package/assets/app/env.js +16 -0
- package/assets/app/navigation.js +24 -0
- package/assets/app/paths.js +1 -0
- package/assets/app/stores.js +97 -0
- package/assets/client/singletons.js +13 -0
- package/assets/client/start.js +1788 -0
- package/assets/components/error.svelte +18 -2
- package/assets/env.js +8 -0
- package/assets/paths.js +13 -0
- package/assets/server/index.js +3371 -0
- package/dist/chunks/constants.js +663 -0
- package/dist/chunks/filesystem.js +110 -0
- package/dist/chunks/index.js +1363 -0
- package/dist/chunks/index2.js +120 -0
- package/dist/chunks/index3.js +183 -0
- package/dist/chunks/index4.js +215 -0
- package/dist/chunks/index5.js +15748 -0
- package/dist/chunks/misc.js +78 -0
- package/dist/chunks/multipart-parser.js +444 -0
- package/dist/chunks/object.js +83 -0
- package/dist/chunks/plugin.js +555 -0
- package/dist/chunks/sync.js +856 -0
- package/dist/chunks/write_tsconfig.js +169 -0
- package/dist/cli.js +1028 -87
- package/dist/hooks.js +28 -0
- package/dist/node/polyfills.js +6654 -0
- package/dist/node.js +301 -0
- package/package.json +95 -55
- package/types/ambient.d.ts +307 -0
- package/types/index.d.ts +294 -0
- package/types/internal.d.ts +326 -0
- package/types/private.d.ts +235 -0
- package/CHANGELOG.md +0 -371
- package/assets/runtime/app/navigation.js +0 -23
- package/assets/runtime/app/navigation.js.map +0 -1
- package/assets/runtime/app/paths.js +0 -2
- package/assets/runtime/app/paths.js.map +0 -1
- package/assets/runtime/app/stores.js +0 -78
- package/assets/runtime/app/stores.js.map +0 -1
- package/assets/runtime/internal/singletons.js +0 -15
- package/assets/runtime/internal/singletons.js.map +0 -1
- package/assets/runtime/internal/start.js +0 -614
- package/assets/runtime/internal/start.js.map +0 -1
- package/assets/runtime/utils-85ebcc60.js +0 -18
- package/assets/runtime/utils-85ebcc60.js.map +0 -1
- package/dist/api.js +0 -28
- package/dist/api.js.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/create_app.js +0 -502
- package/dist/create_app.js.map +0 -1
- package/dist/index.js +0 -327
- package/dist/index.js.map +0 -1
- package/dist/index2.js +0 -3497
- package/dist/index2.js.map +0 -1
- package/dist/index3.js +0 -296
- package/dist/index3.js.map +0 -1
- package/dist/index4.js +0 -311
- package/dist/index4.js.map +0 -1
- package/dist/index5.js +0 -221
- package/dist/index5.js.map +0 -1
- package/dist/index6.js +0 -730
- package/dist/index6.js.map +0 -1
- package/dist/renderer.js +0 -2429
- package/dist/renderer.js.map +0 -1
- package/dist/standard.js +0 -100
- package/dist/standard.js.map +0 -1
- package/dist/utils.js +0 -61
- package/dist/utils.js.map +0 -1
package/CHANGELOG.md
DELETED
|
@@ -1,371 +0,0 @@
|
|
|
1
|
-
# @sveltejs/kit
|
|
2
|
-
|
|
3
|
-
## 1.0.0-next.35
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- Use Vite
|
|
8
|
-
- Fix Windows issues
|
|
9
|
-
- Preserve load context during navigation
|
|
10
|
-
- Return error from load
|
|
11
|
-
|
|
12
|
-
## 1.0.0-next.34
|
|
13
|
-
|
|
14
|
-
### Patch Changes
|
|
15
|
-
|
|
16
|
-
- Fix adapters and convert to ES modules
|
|
17
|
-
|
|
18
|
-
## 1.0.0-next.33
|
|
19
|
-
|
|
20
|
-
### Patch Changes
|
|
21
|
-
|
|
22
|
-
- 474070e: Better errors when modules cannot be found
|
|
23
|
-
|
|
24
|
-
## 1.0.0-next.32
|
|
25
|
-
|
|
26
|
-
### Patch Changes
|
|
27
|
-
|
|
28
|
-
- Convert everything to ESM
|
|
29
|
-
|
|
30
|
-
## 1.0.0-next.31
|
|
31
|
-
|
|
32
|
-
### Patch Changes
|
|
33
|
-
|
|
34
|
-
- b6c2434: app.js -> app.cjs
|
|
35
|
-
|
|
36
|
-
## 1.0.0-next.30
|
|
37
|
-
|
|
38
|
-
### Patch Changes
|
|
39
|
-
|
|
40
|
-
- 00cbaf6: Rename _.config.js to _.config.cjs
|
|
41
|
-
|
|
42
|
-
## 1.0.0-next.29
|
|
43
|
-
|
|
44
|
-
### Patch Changes
|
|
45
|
-
|
|
46
|
-
- 4c0edce: Use addEventListener instead of onload
|
|
47
|
-
|
|
48
|
-
## 1.0.0-next.28
|
|
49
|
-
|
|
50
|
-
### Patch Changes
|
|
51
|
-
|
|
52
|
-
- 4353025: Prevent infinite loop when fetching bad URLs inside error responses
|
|
53
|
-
- 2860065: Handle assets path when prerendering
|
|
54
|
-
|
|
55
|
-
## 1.0.0-next.27
|
|
56
|
-
|
|
57
|
-
### Patch Changes
|
|
58
|
-
|
|
59
|
-
- Fail build if prerender errors
|
|
60
|
-
- Hide logging behind --verbose option
|
|
61
|
-
|
|
62
|
-
## 1.0.0-next.26
|
|
63
|
-
|
|
64
|
-
### Patch Changes
|
|
65
|
-
|
|
66
|
-
- Fix svelte-announcer CSS
|
|
67
|
-
|
|
68
|
-
## 1.0.0-next.25
|
|
69
|
-
|
|
70
|
-
### Patch Changes
|
|
71
|
-
|
|
72
|
-
- Surface stack traces for endpoint/page rendering errors
|
|
73
|
-
|
|
74
|
-
## 1.0.0-next.24
|
|
75
|
-
|
|
76
|
-
### Patch Changes
|
|
77
|
-
|
|
78
|
-
- 26643df: Account for config.paths when prerendering
|
|
79
|
-
|
|
80
|
-
## 1.0.0-next.23
|
|
81
|
-
|
|
82
|
-
### Patch Changes
|
|
83
|
-
|
|
84
|
-
- 9b758aa: Upgrade to Snowpack 3
|
|
85
|
-
|
|
86
|
-
## 1.0.0-next.22
|
|
87
|
-
|
|
88
|
-
### Patch Changes
|
|
89
|
-
|
|
90
|
-
- bb68595: use readFileSync instead of createReadStream
|
|
91
|
-
|
|
92
|
-
## 1.0.0-next.21
|
|
93
|
-
|
|
94
|
-
### Patch Changes
|
|
95
|
-
|
|
96
|
-
- 217e4cc: Set paths to empty string before prerender
|
|
97
|
-
|
|
98
|
-
## 1.0.0-next.20
|
|
99
|
-
|
|
100
|
-
### Patch Changes
|
|
101
|
-
|
|
102
|
-
- ccf4aa7: Implement prerender config
|
|
103
|
-
|
|
104
|
-
## 1.0.0-next.19
|
|
105
|
-
|
|
106
|
-
### Patch Changes
|
|
107
|
-
|
|
108
|
-
- deda984: Make navigating store contain from and to properties
|
|
109
|
-
|
|
110
|
-
## 1.0.0-next.18
|
|
111
|
-
|
|
112
|
-
### Patch Changes
|
|
113
|
-
|
|
114
|
-
- c29b61e: Announce page changes
|
|
115
|
-
- 72da270: Reset focus properly
|
|
116
|
-
|
|
117
|
-
## 1.0.0-next.17
|
|
118
|
-
|
|
119
|
-
### Patch Changes
|
|
120
|
-
|
|
121
|
-
- f7dea55: Set process.env.NODE_ENV when invoking via the CLI
|
|
122
|
-
|
|
123
|
-
## 1.0.0-next.16
|
|
124
|
-
|
|
125
|
-
### Patch Changes
|
|
126
|
-
|
|
127
|
-
- Remove temporary logging
|
|
128
|
-
- Add sveltekit:prefetch and sveltekit:noscroll
|
|
129
|
-
|
|
130
|
-
## 1.0.0-next.15
|
|
131
|
-
|
|
132
|
-
### Patch Changes
|
|
133
|
-
|
|
134
|
-
- 6d1bb11: Fix AMP CSS
|
|
135
|
-
- d8b53af: Ignore $layout and $error files when finding static paths
|
|
136
|
-
- Better scroll tracking
|
|
137
|
-
|
|
138
|
-
## 1.0.0-next.14
|
|
139
|
-
|
|
140
|
-
### Patch Changes
|
|
141
|
-
|
|
142
|
-
- Fix dev loader
|
|
143
|
-
|
|
144
|
-
## 1.0.0-next.13
|
|
145
|
-
|
|
146
|
-
### Patch Changes
|
|
147
|
-
|
|
148
|
-
- 1ea4d6b: More robust CSS extraction
|
|
149
|
-
|
|
150
|
-
## 1.0.0-next.12
|
|
151
|
-
|
|
152
|
-
### Patch Changes
|
|
153
|
-
|
|
154
|
-
- e7c88dd: Tweak AMP validation screen
|
|
155
|
-
|
|
156
|
-
## 1.0.0-next.11
|
|
157
|
-
|
|
158
|
-
### Patch Changes
|
|
159
|
-
|
|
160
|
-
- a31f218: Fix SSR loader invalidation
|
|
161
|
-
|
|
162
|
-
## 1.0.0-next.10
|
|
163
|
-
|
|
164
|
-
### Patch Changes
|
|
165
|
-
|
|
166
|
-
- 8b14d29: Omit svelte-data scripts from AMP pages
|
|
167
|
-
|
|
168
|
-
## 1.0.0-next.9
|
|
169
|
-
|
|
170
|
-
### Patch Changes
|
|
171
|
-
|
|
172
|
-
- f5fa223: AMP support
|
|
173
|
-
- 47f2ee1: Always remove trailing slashes
|
|
174
|
-
- 1becb94: Replace preload with load
|
|
175
|
-
|
|
176
|
-
## 1.0.0-next.8
|
|
177
|
-
|
|
178
|
-
### Patch Changes
|
|
179
|
-
|
|
180
|
-
- 15dd751: Use meta http-equiv=refresh
|
|
181
|
-
- be7e031: Fix handling of static files
|
|
182
|
-
- ed6b8fd: Implement \$app/env
|
|
183
|
-
|
|
184
|
-
## 1.0.0-next.7
|
|
185
|
-
|
|
186
|
-
### Patch Changes
|
|
187
|
-
|
|
188
|
-
- 76705b0: make HMR work outside localhost
|
|
189
|
-
|
|
190
|
-
## 1.0.0-next.6
|
|
191
|
-
|
|
192
|
-
### Patch Changes
|
|
193
|
-
|
|
194
|
-
- 0e45255: Move options behind kit namespace, change paths -> kit.files
|
|
195
|
-
- fa7f2b2: Implement live bindings for SSR code
|
|
196
|
-
|
|
197
|
-
## 1.0.0-next.5
|
|
198
|
-
|
|
199
|
-
### Patch Changes
|
|
200
|
-
|
|
201
|
-
- Return dependencies from render
|
|
202
|
-
|
|
203
|
-
## 1.0.0-next.4
|
|
204
|
-
|
|
205
|
-
### Patch Changes
|
|
206
|
-
|
|
207
|
-
- af01b0d: Move renderer out of app assets folder
|
|
208
|
-
|
|
209
|
-
## 1.0.0-next.3
|
|
210
|
-
|
|
211
|
-
### Patch Changes
|
|
212
|
-
|
|
213
|
-
- Add paths to manifest, for static prerendering
|
|
214
|
-
|
|
215
|
-
## 1.0.0-next.2
|
|
216
|
-
|
|
217
|
-
### Patch Changes
|
|
218
|
-
|
|
219
|
-
- Fix typo causing misnamed assets folder
|
|
220
|
-
|
|
221
|
-
## 1.0.0-next.1
|
|
222
|
-
|
|
223
|
-
### Patch Changes
|
|
224
|
-
|
|
225
|
-
- a4bc090: Transform exported functions correctly
|
|
226
|
-
- 00bbf98: Fix nested layouts
|
|
227
|
-
|
|
228
|
-
## 0.0.31-next.0
|
|
229
|
-
|
|
230
|
-
### Patch Changes
|
|
231
|
-
|
|
232
|
-
- ffd7bba: Fix SSR cache invalidation
|
|
233
|
-
|
|
234
|
-
## 0.0.30
|
|
235
|
-
|
|
236
|
-
### Patch Changes
|
|
237
|
-
|
|
238
|
-
- Add back stores(), but with deprecation warning
|
|
239
|
-
- Rename stores.preloading to stores.navigating
|
|
240
|
-
- Rewrite routing logic
|
|
241
|
-
|
|
242
|
-
## 0.0.29
|
|
243
|
-
|
|
244
|
-
### Patch Changes
|
|
245
|
-
|
|
246
|
-
- 10872cc: Normalize request.query
|
|
247
|
-
|
|
248
|
-
## 0.0.28
|
|
249
|
-
|
|
250
|
-
### Patch Changes
|
|
251
|
-
|
|
252
|
-
- Add svelte-kit start command
|
|
253
|
-
|
|
254
|
-
## 0.0.27
|
|
255
|
-
|
|
256
|
-
### Patch Changes
|
|
257
|
-
|
|
258
|
-
- rename CLI to svelte-kit
|
|
259
|
-
- 0904e22: rename svelte CLI to svelte-kit
|
|
260
|
-
- Validate route responses
|
|
261
|
-
- Make paths and target configurable
|
|
262
|
-
|
|
263
|
-
## 0.0.26
|
|
264
|
-
|
|
265
|
-
### Patch Changes
|
|
266
|
-
|
|
267
|
-
- b475ed4: Overhaul adapter API - fixes #166
|
|
268
|
-
- Updated dependencies [b475ed4]
|
|
269
|
-
- @sveltejs/app-utils@0.0.18
|
|
270
|
-
|
|
271
|
-
## 0.0.25
|
|
272
|
-
|
|
273
|
-
### Patch Changes
|
|
274
|
-
|
|
275
|
-
- Updated dependencies [3bdf33b]
|
|
276
|
-
- @sveltejs/app-utils@0.0.17
|
|
277
|
-
|
|
278
|
-
## 0.0.24
|
|
279
|
-
|
|
280
|
-
### Patch Changes
|
|
281
|
-
|
|
282
|
-
- 67eaeea: Move app-utils stuff into subpackages
|
|
283
|
-
- 7f8df30: Move kit runtime code, expose via \$app aliases
|
|
284
|
-
- Updated dependencies [67eaeea]
|
|
285
|
-
- @sveltejs/app-utils@0.0.16
|
|
286
|
-
|
|
287
|
-
## 0.0.23
|
|
288
|
-
|
|
289
|
-
### Patch Changes
|
|
290
|
-
|
|
291
|
-
- a163000: Parse body on incoming requests
|
|
292
|
-
- a346eab: Copy over latest Sapper router code
|
|
293
|
-
- Updated dependencies [a163000]
|
|
294
|
-
- @sveltejs/app-utils@0.0.15
|
|
295
|
-
|
|
296
|
-
## 0.0.22
|
|
297
|
-
|
|
298
|
-
### Patch Changes
|
|
299
|
-
|
|
300
|
-
- Force bump version
|
|
301
|
-
|
|
302
|
-
## 0.0.21
|
|
303
|
-
|
|
304
|
-
### Patch Changes
|
|
305
|
-
|
|
306
|
-
- Build setup entry point
|
|
307
|
-
- Work around pkg.exports constraint
|
|
308
|
-
- Respond with 500s if render fails
|
|
309
|
-
- Updated dependencies [undefined]
|
|
310
|
-
- Updated dependencies [undefined]
|
|
311
|
-
- Updated dependencies [undefined]
|
|
312
|
-
- @sveltejs/app-utils@0.0.14
|
|
313
|
-
|
|
314
|
-
## 0.0.20
|
|
315
|
-
|
|
316
|
-
### Patch Changes
|
|
317
|
-
|
|
318
|
-
- Pass setup module to renderer
|
|
319
|
-
- Bump Snowpack version
|
|
320
|
-
- Updated dependencies [undefined]
|
|
321
|
-
- Updated dependencies [96c06d8]
|
|
322
|
-
- @sveltejs/app-utils@0.0.13
|
|
323
|
-
|
|
324
|
-
## 0.0.19
|
|
325
|
-
|
|
326
|
-
### Patch Changes
|
|
327
|
-
|
|
328
|
-
- fa9d7ce: Handle import.meta in SSR module loader
|
|
329
|
-
- 0320208: Rename 'server route' to 'endpoint'
|
|
330
|
-
- b9444d2: Update to Snowpack 2.15
|
|
331
|
-
- 5ca907c: Use shared mkdirp helper
|
|
332
|
-
- Updated dependencies [0320208]
|
|
333
|
-
- Updated dependencies [5ca907c]
|
|
334
|
-
- @sveltejs/app-utils@0.0.12
|
|
335
|
-
|
|
336
|
-
## 0.0.18
|
|
337
|
-
|
|
338
|
-
### Patch Changes
|
|
339
|
-
|
|
340
|
-
- Updated dependencies [undefined]
|
|
341
|
-
- @sveltejs/app-utils@0.0.11
|
|
342
|
-
|
|
343
|
-
## 0.0.17
|
|
344
|
-
|
|
345
|
-
### Patch Changes
|
|
346
|
-
|
|
347
|
-
- 19323e9: Update Snowpack
|
|
348
|
-
- Updated dependencies [19323e9]
|
|
349
|
-
- @sveltejs/app-utils@0.0.10
|
|
350
|
-
|
|
351
|
-
## 0.0.16
|
|
352
|
-
|
|
353
|
-
### Patch Changes
|
|
354
|
-
|
|
355
|
-
- Updated dependencies [90a98ae]
|
|
356
|
-
- @sveltejs/app-utils@0.0.9
|
|
357
|
-
|
|
358
|
-
## 0.0.15
|
|
359
|
-
|
|
360
|
-
### Patch Changes
|
|
361
|
-
|
|
362
|
-
- Updated dependencies [undefined]
|
|
363
|
-
- @sveltejs/app-utils@0.0.8
|
|
364
|
-
|
|
365
|
-
## 0.0.14
|
|
366
|
-
|
|
367
|
-
### Patch Changes
|
|
368
|
-
|
|
369
|
-
- various
|
|
370
|
-
- Updated dependencies [undefined]
|
|
371
|
-
- @sveltejs/app-utils@0.0.7
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { router, renderer } from '../internal/singletons.js';
|
|
2
|
-
import { g as get_base_uri } from '../utils-85ebcc60.js';
|
|
3
|
-
|
|
4
|
-
async function goto(href, opts) {
|
|
5
|
-
return router.goto(href, opts);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
function prefetch(href) {
|
|
9
|
-
return renderer.prefetch(new URL(href, get_base_uri(document)));
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
async function prefetchRoutes(pathnames) {
|
|
13
|
-
const path_routes = pathnames
|
|
14
|
-
? router.pages.filter((page) => pathnames.some((pathname) => page.pattern.test(pathname)))
|
|
15
|
-
: router.pages;
|
|
16
|
-
|
|
17
|
-
const promises = path_routes.map((r) => Promise.all(r.parts.map((load) => load())));
|
|
18
|
-
|
|
19
|
-
await Promise.all(promises);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { goto, prefetch, prefetchRoutes };
|
|
23
|
-
//# sourceMappingURL=navigation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.js","sources":["../../../src/runtime/app/navigation/index.js"],"sourcesContent":["import { router, renderer } from '../../internal/singletons';\nimport { get_base_uri } from '../../internal/utils';\n\nexport async function goto(href, opts) {\n\treturn router.goto(href, opts);\n}\n\nexport function prefetch(href) {\n\treturn renderer.prefetch(new URL(href, get_base_uri(document)));\n}\n\nexport async function prefetchRoutes(pathnames) {\n\tconst path_routes = pathnames\n\t\t? router.pages.filter((page) => pathnames.some((pathname) => page.pattern.test(pathname)))\n\t\t: router.pages;\n\n\tconst promises = path_routes.map((r) => Promise.all(r.parts.map((load) => load())));\n\n\tawait Promise.all(promises);\n}\n"],"names":[],"mappings":";;;AAGO,eAAe,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE;AACvC,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAChC,CAAC;AACD;AACO,SAAS,QAAQ,CAAC,IAAI,EAAE;AAC/B,CAAC,OAAO,QAAQ,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AACjE,CAAC;AACD;AACO,eAAe,cAAc,CAAC,SAAS,EAAE;AAChD,CAAC,MAAM,WAAW,GAAG,SAAS;AAC9B,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC5F,IAAI,MAAM,CAAC,KAAK,CAAC;AACjB;AACA,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AACrF;AACA,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC7B;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { getContext } from 'svelte';
|
|
2
|
-
|
|
3
|
-
// const ssr = (import.meta as any).env.SSR;
|
|
4
|
-
const ssr = typeof window === 'undefined'; // TODO why doesn't previous line work in build?
|
|
5
|
-
|
|
6
|
-
// TODO remove this (for 1.0? after 1.0?)
|
|
7
|
-
let warned = false;
|
|
8
|
-
function stores() {
|
|
9
|
-
if (!warned) {
|
|
10
|
-
console.error('stores() is deprecated; use getStores() instead');
|
|
11
|
-
warned = true;
|
|
12
|
-
}
|
|
13
|
-
return getStores();
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const getStores = () => {
|
|
17
|
-
const stores = getContext('__svelte__');
|
|
18
|
-
|
|
19
|
-
return {
|
|
20
|
-
page: {
|
|
21
|
-
subscribe: stores.page.subscribe
|
|
22
|
-
},
|
|
23
|
-
navigating: {
|
|
24
|
-
subscribe: stores.navigating.subscribe
|
|
25
|
-
},
|
|
26
|
-
get preloading() {
|
|
27
|
-
console.error('stores.preloading is deprecated; use stores.navigating instead');
|
|
28
|
-
return {
|
|
29
|
-
subscribe: stores.navigating.subscribe
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
session: stores.session
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const page = {
|
|
37
|
-
subscribe(fn) {
|
|
38
|
-
const store = getStores().page;
|
|
39
|
-
return store.subscribe(fn);
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const navigating = {
|
|
44
|
-
subscribe(fn) {
|
|
45
|
-
const store = getStores().navigating;
|
|
46
|
-
return store.subscribe(fn);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const error = (verb) => {
|
|
51
|
-
throw new Error(
|
|
52
|
-
ssr
|
|
53
|
-
? `Can only ${verb} session store in browser`
|
|
54
|
-
: `Cannot ${verb} session store before subscribing`
|
|
55
|
-
);
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const session = {
|
|
59
|
-
subscribe(fn) {
|
|
60
|
-
const store = getStores().session;
|
|
61
|
-
|
|
62
|
-
if (!ssr) {
|
|
63
|
-
session.set = store.set;
|
|
64
|
-
session.update = store.update;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return store.subscribe(fn);
|
|
68
|
-
},
|
|
69
|
-
set: (value) => {
|
|
70
|
-
error('set');
|
|
71
|
-
},
|
|
72
|
-
update: (updater) => {
|
|
73
|
-
error('update');
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export { getStores, navigating, page, session, stores };
|
|
78
|
-
//# sourceMappingURL=stores.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stores.js","sources":["../../../src/runtime/app/stores/index.js"],"sourcesContent":["import { getContext } from 'svelte';\n\n// const ssr = (import.meta as any).env.SSR;\nconst ssr = typeof window === 'undefined'; // TODO why doesn't previous line work in build?\n\n// TODO remove this (for 1.0? after 1.0?)\nlet warned = false;\nexport function stores() {\n\tif (!warned) {\n\t\tconsole.error('stores() is deprecated; use getStores() instead');\n\t\twarned = true;\n\t}\n\treturn getStores();\n}\n\nexport const getStores = () => {\n\tconst stores = getContext('__svelte__');\n\n\treturn {\n\t\tpage: {\n\t\t\tsubscribe: stores.page.subscribe\n\t\t},\n\t\tnavigating: {\n\t\t\tsubscribe: stores.navigating.subscribe\n\t\t},\n\t\tget preloading() {\n\t\t\tconsole.error('stores.preloading is deprecated; use stores.navigating instead');\n\t\t\treturn {\n\t\t\t\tsubscribe: stores.navigating.subscribe\n\t\t\t};\n\t\t},\n\t\tsession: stores.session\n\t};\n};\n\nexport const page = {\n\tsubscribe(fn) {\n\t\tconst store = getStores().page;\n\t\treturn store.subscribe(fn);\n\t}\n};\n\nexport const navigating = {\n\tsubscribe(fn) {\n\t\tconst store = getStores().navigating;\n\t\treturn store.subscribe(fn);\n\t}\n};\n\nconst error = (verb) => {\n\tthrow new Error(\n\t\tssr\n\t\t\t? `Can only ${verb} session store in browser`\n\t\t\t: `Cannot ${verb} session store before subscribing`\n\t);\n};\n\nexport const session = {\n\tsubscribe(fn) {\n\t\tconst store = getStores().session;\n\n\t\tif (!ssr) {\n\t\t\tsession.set = store.set;\n\t\t\tsession.update = store.update;\n\t\t}\n\n\t\treturn store.subscribe(fn);\n\t},\n\tset: (value) => {\n\t\terror('set');\n\t},\n\tupdate: (updater) => {\n\t\terror('update');\n\t}\n};\n"],"names":[],"mappings":";;AAEA;AACA,MAAM,GAAG,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC;AAC1C;AACA;AACA,IAAI,MAAM,GAAG,KAAK,CAAC;AACZ,SAAS,MAAM,GAAG;AACzB,CAAC,IAAI,CAAC,MAAM,EAAE;AACd,EAAE,OAAO,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;AACnE,EAAE,MAAM,GAAG,IAAI,CAAC;AAChB,EAAE;AACF,CAAC,OAAO,SAAS,EAAE,CAAC;AACpB,CAAC;AACD;AACY,MAAC,SAAS,GAAG,MAAM;AAC/B,CAAC,MAAM,MAAM,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;AACzC;AACA,CAAC,OAAO;AACR,EAAE,IAAI,EAAE;AACR,GAAG,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS;AACnC,GAAG;AACH,EAAE,UAAU,EAAE;AACd,GAAG,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC,SAAS;AACzC,GAAG;AACH,EAAE,IAAI,UAAU,GAAG;AACnB,GAAG,OAAO,CAAC,KAAK,CAAC,gEAAgE,CAAC,CAAC;AACnF,GAAG,OAAO;AACV,IAAI,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC,SAAS;AAC1C,IAAI,CAAC;AACL,GAAG;AACH,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO;AACzB,EAAE,CAAC;AACH,EAAE;AACF;AACY,MAAC,IAAI,GAAG;AACpB,CAAC,SAAS,CAAC,EAAE,EAAE;AACf,EAAE,MAAM,KAAK,GAAG,SAAS,EAAE,CAAC,IAAI,CAAC;AACjC,EAAE,OAAO,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;AAC7B,EAAE;AACF,EAAE;AACF;AACY,MAAC,UAAU,GAAG;AAC1B,CAAC,SAAS,CAAC,EAAE,EAAE;AACf,EAAE,MAAM,KAAK,GAAG,SAAS,EAAE,CAAC,UAAU,CAAC;AACvC,EAAE,OAAO,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;AAC7B,EAAE;AACF,EAAE;AACF;AACA,MAAM,KAAK,GAAG,CAAC,IAAI,KAAK;AACxB,CAAC,MAAM,IAAI,KAAK;AAChB,EAAE,GAAG;AACL,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,yBAAyB,CAAC;AAChD,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,iCAAiC,CAAC;AACtD,EAAE,CAAC;AACH,CAAC,CAAC;AACF;AACY,MAAC,OAAO,GAAG;AACvB,CAAC,SAAS,CAAC,EAAE,EAAE;AACf,EAAE,MAAM,KAAK,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC;AACpC;AACA,EAAE,IAAI,CAAC,GAAG,EAAE;AACZ,GAAG,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;AAC3B,GAAG,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;AACjC,GAAG;AACH;AACA,EAAE,OAAO,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;AAC7B,EAAE;AACF,CAAC,GAAG,EAAE,CAAC,KAAK,KAAK;AACjB,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;AACf,EAAE;AACF,CAAC,MAAM,EAAE,CAAC,OAAO,KAAK;AACtB,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;AAClB,EAAE;AACF;;;;"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
let router;
|
|
2
|
-
let renderer;
|
|
3
|
-
let base;
|
|
4
|
-
let assets;
|
|
5
|
-
|
|
6
|
-
function init(opts) {
|
|
7
|
-
({ router, renderer } = opts);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function set_paths(paths) {
|
|
11
|
-
({ base, assets } = paths);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { assets, base, init, renderer, router, set_paths };
|
|
15
|
-
//# sourceMappingURL=singletons.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"singletons.js","sources":["../../../src/runtime/internal/singletons.js"],"sourcesContent":["export let router;\nexport let renderer;\nexport let base;\nexport let assets;\n\nexport function init(opts) {\n\t({ router, renderer } = opts);\n}\n\nexport function set_paths(paths) {\n\t({ base, assets } = paths);\n}\n"],"names":[],"mappings":"AAAU,IAAC,OAAO;AACR,IAAC,SAAS;AACV,IAAC,KAAK;AACN,IAAC,OAAO;AAClB;AACO,SAAS,IAAI,CAAC,IAAI,EAAE;AAC3B,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE;AAC/B,CAAC;AACD;AACO,SAAS,SAAS,CAAC,KAAK,EAAE;AACjC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE;AAC5B;;;;"}
|