toiljs 0.0.7 → 0.0.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/build/backend/.tsbuildinfo +1 -1
- package/build/cli/.tsbuildinfo +1 -1
- package/build/cli/configure.d.ts +1 -0
- package/build/cli/configure.js +85 -20
- package/build/cli/create.d.ts +1 -0
- package/build/cli/create.js +18 -7
- package/build/cli/features.d.ts +2 -0
- package/build/cli/features.js +22 -0
- package/build/cli/index.js +8 -0
- package/build/client/.tsbuildinfo +1 -1
- package/build/client/components/Form.d.ts +12 -0
- package/build/client/components/Form.js +23 -0
- package/build/client/components/Image.d.ts +13 -0
- package/build/client/components/Image.js +22 -0
- package/build/client/components/Script.d.ts +13 -0
- package/build/client/components/Script.js +68 -0
- package/build/client/components/Slot.d.ts +6 -0
- package/build/client/components/Slot.js +6 -0
- package/build/client/dev/error-overlay.d.ts +20 -0
- package/build/client/dev/error-overlay.js +123 -0
- package/build/client/head/head.d.ts +2 -0
- package/build/client/head/head.js +17 -2
- package/build/client/head/metadata.d.ts +29 -0
- package/build/client/head/metadata.js +38 -0
- package/build/client/index.d.ts +15 -3
- package/build/client/index.js +8 -2
- package/build/client/navigation/navigation.d.ts +3 -0
- package/build/client/navigation/navigation.js +42 -1
- package/build/client/routing/Router.d.ts +1 -0
- package/build/client/routing/Router.js +56 -34
- package/build/client/routing/action.d.ts +17 -0
- package/build/client/routing/action.js +55 -0
- package/build/client/routing/hooks.d.ts +1 -0
- package/build/client/routing/hooks.js +6 -7
- package/build/client/routing/loader.d.ts +10 -2
- package/build/client/routing/loader.js +83 -24
- package/build/client/routing/mount.d.ts +1 -1
- package/build/client/routing/mount.js +12 -4
- package/build/client/routing/slot-context.d.ts +2 -0
- package/build/client/routing/slot-context.js +2 -0
- package/build/client/types.d.ts +1 -0
- package/build/compiler/.tsbuildinfo +1 -1
- package/build/compiler/config.d.ts +10 -0
- package/build/compiler/config.js +5 -1
- package/build/compiler/docs.js +26 -26
- package/build/compiler/fonts.d.ts +4 -0
- package/build/compiler/fonts.js +64 -0
- package/build/compiler/generate.js +67 -32
- package/build/compiler/image-report.d.ts +2 -0
- package/build/compiler/image-report.js +62 -0
- package/build/compiler/plugin.js +1 -1
- package/build/compiler/prerender.d.ts +7 -0
- package/build/compiler/prerender.js +111 -0
- package/build/compiler/routes.d.ts +3 -0
- package/build/compiler/routes.js +50 -5
- package/build/compiler/seo.d.ts +70 -0
- package/build/compiler/seo.js +221 -0
- package/build/compiler/vite.js +13 -1
- package/build/io/.tsbuildinfo +1 -1
- package/build/shared/.tsbuildinfo +1 -1
- package/examples/basic/client/404.tsx +1 -1
- package/examples/basic/client/components/Header.tsx +38 -0
- package/examples/basic/client/components/HoneycombBackground.tsx +86 -18
- package/examples/basic/client/global-error.tsx +3 -3
- package/examples/basic/client/layout.tsx +2 -33
- package/examples/basic/client/public/images/test_image.webp +0 -0
- package/examples/basic/client/routes/about.tsx +8 -0
- package/examples/basic/client/routes/get-started.tsx +1 -1
- package/examples/basic/client/routes/index.tsx +8 -1
- package/examples/basic/client/routes/io.tsx +1 -1
- package/examples/basic/client/routes/loader-demo/index.tsx +29 -1
- package/examples/basic/client/routes/test.tsx +8 -0
- package/examples/basic/client/styles/main.css +48 -1
- package/package.json +8 -6
- package/presets/eslint.js +7 -4
- package/presets/tsconfig.json +1 -1
- package/src/backend/index.ts +1 -1
- package/src/cli/configure.ts +102 -21
- package/src/cli/create.ts +25 -9
- package/src/cli/features.ts +33 -1
- package/src/cli/index.ts +10 -1
- package/src/cli/ui.ts +1 -1
- package/src/cli/validate.ts +1 -1
- package/src/client/components/Form.tsx +65 -0
- package/src/client/components/Image.tsx +89 -0
- package/src/client/components/Script.tsx +113 -0
- package/src/client/components/Slot.tsx +21 -0
- package/src/client/dev/error-overlay.tsx +197 -0
- package/src/client/head/head.ts +28 -3
- package/src/client/head/metadata.ts +92 -0
- package/src/client/index.ts +20 -3
- package/src/client/navigation/Link.tsx +1 -1
- package/src/client/navigation/navigation.ts +74 -4
- package/src/client/navigation/prefetch.ts +2 -2
- package/src/client/routing/Router.tsx +128 -62
- package/src/client/routing/action.ts +122 -0
- package/src/client/routing/error-boundary.tsx +1 -1
- package/src/client/routing/hooks.ts +17 -23
- package/src/client/routing/loader.ts +158 -35
- package/src/client/routing/mount.tsx +25 -3
- package/src/client/routing/slot-context.ts +7 -0
- package/src/client/types.ts +6 -4
- package/src/compiler/config.ts +40 -3
- package/src/compiler/docs.ts +26 -26
- package/src/compiler/fonts.ts +87 -0
- package/src/compiler/generate.ts +69 -31
- package/src/compiler/image-report.ts +85 -0
- package/src/compiler/plugin.ts +2 -2
- package/src/compiler/prerender.ts +130 -0
- package/src/compiler/routes.ts +62 -7
- package/src/compiler/seo.ts +356 -0
- package/src/compiler/vite.ts +21 -4
- package/src/io/FastSet.ts +1 -1
- package/src/io/index.ts +1 -1
- package/src/io/types.ts +1 -1
- package/src/server/index.ts +1 -1
- package/src/server/main.ts +1 -1
- package/src/shared/index.ts +1 -1
- package/test/dom/Image.test.tsx +46 -0
- package/test/dom/Script.test.tsx +45 -0
- package/test/dom/action.test.tsx +129 -0
- package/test/dom/error-overlay.test.tsx +44 -0
- package/test/dom/loader.test.tsx +121 -0
- package/test/dom/revalidate.test.tsx +38 -0
- package/test/dom/route-head.test.tsx +34 -0
- package/test/dom/router-loading.test.tsx +44 -0
- package/test/dom/slot.test.tsx +109 -0
- package/test/dom/view-transitions.test.tsx +51 -0
- package/test/features.test.ts +31 -0
- package/test/fonts.test.ts +26 -0
- package/test/metadata.test.ts +41 -0
- package/test/prerender.test.ts +46 -0
- package/test/routes.test.ts +20 -1
- package/test/seo.test.ts +142 -0
- package/examples/basic/client/template.tsx +0 -7
package/build/cli/features.js
CHANGED
|
@@ -71,6 +71,28 @@ export function setStyleImports(source, f) {
|
|
|
71
71
|
const tail = lines.slice(insertAt).join('\n');
|
|
72
72
|
return `${head}\n\n${block}\n${tail}`.replace(/\n{3,}/g, '\n\n');
|
|
73
73
|
}
|
|
74
|
+
export function defaultConfigSource(images) {
|
|
75
|
+
return ("import { defineConfig } from 'toiljs/compiler';\n\n" +
|
|
76
|
+
'export default defineConfig({\n' +
|
|
77
|
+
' client: {\n' +
|
|
78
|
+
' // Optimize images at build time (resize/compress imported images).\n' +
|
|
79
|
+
` images: ${String(images)},\n` +
|
|
80
|
+
' },\n' +
|
|
81
|
+
'});\n');
|
|
82
|
+
}
|
|
83
|
+
export function setConfigImages(source, enabled) {
|
|
84
|
+
const value = String(enabled);
|
|
85
|
+
if (/\bimages\s*:\s*(?:true|false)/.test(source)) {
|
|
86
|
+
return source.replace(/\bimages\s*:\s*(?:true|false)/, `images: ${value}`);
|
|
87
|
+
}
|
|
88
|
+
if (/\bclient\s*:\s*\{/.test(source)) {
|
|
89
|
+
return source.replace(/\bclient\s*:\s*\{/, `client: {\n images: ${value},`);
|
|
90
|
+
}
|
|
91
|
+
if (/defineConfig\(\s*\{/.test(source)) {
|
|
92
|
+
return source.replace(/defineConfig\(\s*\{/, `defineConfig({\n client: { images: ${value} },`);
|
|
93
|
+
}
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
74
96
|
export function detectPreprocessor(deps) {
|
|
75
97
|
if ('sass' in deps)
|
|
76
98
|
return 'sass';
|
package/build/cli/index.js
CHANGED
|
@@ -46,6 +46,12 @@ function parseArgs(argv) {
|
|
|
46
46
|
case '--no-ai':
|
|
47
47
|
flags.ai = false;
|
|
48
48
|
break;
|
|
49
|
+
case '--images':
|
|
50
|
+
flags.images = true;
|
|
51
|
+
break;
|
|
52
|
+
case '--no-images':
|
|
53
|
+
flags.images = false;
|
|
54
|
+
break;
|
|
49
55
|
case '--install':
|
|
50
56
|
flags.install = true;
|
|
51
57
|
break;
|
|
@@ -110,6 +116,7 @@ async function main() {
|
|
|
110
116
|
preprocessor: flags.preprocessor,
|
|
111
117
|
tailwind: flags.tailwind,
|
|
112
118
|
ai: flags.ai,
|
|
119
|
+
images: flags.images,
|
|
113
120
|
install: flags.install,
|
|
114
121
|
git: flags.git,
|
|
115
122
|
pm: flags.pm,
|
|
@@ -123,6 +130,7 @@ async function main() {
|
|
|
123
130
|
root: flags.root,
|
|
124
131
|
preprocessor: flags.preprocessor,
|
|
125
132
|
tailwind: flags.tailwind,
|
|
133
|
+
images: flags.images,
|
|
126
134
|
install: flags.install,
|
|
127
135
|
cwd: process.cwd(),
|
|
128
136
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.es2024.d.ts","../../node_modules/typescript/lib/lib.es2025.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../node_modules/typescript/lib/lib.es2025.collection.d.ts","../../node_modules/typescript/lib/lib.es2025.float16.d.ts","../../node_modules/typescript/lib/lib.es2025.intl.d.ts","../../node_modules/typescript/lib/lib.es2025.iterator.d.ts","../../node_modules/typescript/lib/lib.es2025.promise.d.ts","../../node_modules/typescript/lib/lib.es2025.regexp.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.date.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.error.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.esnext.temporal.d.ts","../../node_modules/typescript/lib/lib.esnext.typedarrays.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/react/index.d.ts","../../node_modules/@types/react/jsx-runtime.d.ts","../../node_modules/@types/react-dom/client.d.ts","../../src/client/navigation/scroll.ts","../../src/client/types.ts","../../src/client/navigation/navigation.ts","../../src/client/routing/match.ts","../../src/client/navigation/prefetch.ts","../../src/client/routing/error-boundary.tsx","../../src/client/routing/loader.ts","../../src/client/routing/params-context.ts","../../src/client/routing/hooks.ts","../../src/client/routing/lazy.ts","../../src/client/routing/router.tsx","../../src/client/routing/mount.tsx","../../src/client/navigation/link.tsx","../../src/client/navigation/navlink.tsx","../../src/client/channel/channel.ts","../../src/client/head/head.ts","../../src/client/index.ts"],"fileIdsList":[[92],[90,91],[92,93],[93,96,97,98,99,101,103,105,106,107,108,109,110],[92,93,96,97,99],[93,95,96],[92,93,103,107],[93,96,98],[93],[92,93,96],[92,93,96,97,98,99,101,102],[92,93,96,97,98],[93,94,96,97,99,105],[92,93,98],[92,93,95,96,97,98,100,101,102,103,104]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","impliedFormat":1},{"version":"1e9332c23e9a907175e0ffc6a49e236f97b48838cc8aec9ce7e4cec21e544b65","impliedFormat":1},{"version":"3753fbc1113dc511214802a2342280a8b284ab9094f6420e7aa171e868679f91","impliedFormat":1},{"version":"999ca32883495a866aa5737fe1babc764a469e4cde6ee6b136a4b9ae68853e4b","impliedFormat":1},{"version":"17f13ecb98cbc39243f2eee1f16d45cd8ec4706b03ee314f1915f1a8b42f6984","impliedFormat":1},{"version":"d6b1eba8496bdd0eed6fc8a685768fe01b2da4a0388b5fe7df558290bffcf32f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","affectsGlobalScope":true,"impliedFormat":1},{"version":"0bd714129fca875f7d4c477a1a392200b0bcd13fb2e80928cd334b63830ea047","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2c9037ae6cd2c52d80ceef0b3c5ffdb488627d71529cf4f63776daf11161c9a","affectsGlobalScope":true,"impliedFormat":1},{"version":"135d5cf4d345f59f1a9caadfafcd858d3d9cc68290db616cc85797224448cccc","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc238c3f81c2984751932b6aab223cd5b830e0ac6cad76389e5e9d2ffc03287d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4a07f9b76d361f572620927e5735b77d6d2101c23cdd94383eb5b706e7b36357","affectsGlobalScope":true,"impliedFormat":1},{"version":"7c4e8dc6ab834cc6baa0227e030606d29e3e8449a9f67cdf5605ea5493c4db29","affectsGlobalScope":true,"impliedFormat":1},{"version":"de7ba0fd02e06cd9a5bd4ab441ed0e122735786e67dde1e849cced1cd8b46b78","affectsGlobalScope":true,"impliedFormat":1},{"version":"6148e4e88d720a06855071c3db02069434142a8332cf9c182cda551adedf3156","affectsGlobalScope":true,"impliedFormat":1},{"version":"d63dba625b108316a40c95a4425f8d4294e0deeccfd6c7e59d819efa19e23409","affectsGlobalScope":true,"impliedFormat":1},{"version":"0568d6befee03dd435bed4fc25c4e46865b24bdcb8c563fdc21f580a2c301904","affectsGlobalScope":true,"impliedFormat":1},{"version":"30d62269b05b584741f19a5369852d5d34895aa2ac4fd948956f886d15f9cc0d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f128dae7c44d8f35ee42e0a437000a57c9f06cc04f8b4fb42eebf44954d53dc8","affectsGlobalScope":true,"impliedFormat":1},{"version":"ffbe6d7b295306b2ba88030f65b74c107d8d99bdcf596ea99c62a02f606108b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"996fb27b15277369c68a4ba46ed138b4e9e839a02fb4ec756f7997629242fd9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"79b712591b270d4778c89706ca2cfc56ddb8c3f895840e477388f1710dc5eda9","affectsGlobalScope":true,"impliedFormat":1},{"version":"20884846cef428b992b9bd032e70a4ef88e349263f63aeddf04dda837a7dba26","affectsGlobalScope":true,"impliedFormat":1},{"version":"5fcab789c73a97cd43828ee3cc94a61264cf24d4c44472ce64ced0e0f148bdb2","affectsGlobalScope":true,"impliedFormat":1},{"version":"db59a81f070c1880ad645b2c0275022baa6a0c4f0acdc58d29d349c6efcf0903","affectsGlobalScope":true,"impliedFormat":1},{"version":"673294292640f5722b700e7d814e17aaf7d93f83a48a2c9b38f33cbc940ad8b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"d786b48f934cbca483b3c6d0a798cb43bbb4ada283e76fb22c28e53ae05b9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ecb8e347cb6b2a8927c09b86263663289418df375f5e68e11a0ae683776978f","affectsGlobalScope":true,"impliedFormat":1},{"version":"142efd4ce210576f777dc34df121777be89eda476942d6d6663b03dcb53be3ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"379bc41580c2d774f82e828c70308f24a005b490c25ba34d679d84bcf05c3d9d","affectsGlobalScope":true,"impliedFormat":1},{"version":"ed484fb2aa8a1a23d0277056ec3336e0a0b52f9b8d6a961f338a642faf43235d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ffedae1d1c2d53fdbca1c96d3c7dda544281f7d262f99b6880634f8fd8d9820","affectsGlobalScope":true,"impliedFormat":1},{"version":"83a730b125d477dd264df8ba479afab27a3dae7152b005c214ab94dc7ee44fd3","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},{"version":"7e29f41b158de217f94cb9676bf9cbd0cd9b5a46e1985141ed36e075c52bf6ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"bd7dee3446a5b94651d58000ddfda40296f073e9372891f65003a524b4620697","impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"bc03c3c352f689e38c0ddd50c39b1e65d59273991bfc8858a9e3c0ebb79c023b","impliedFormat":1},{"version":"ee8a149229af2834098b2776d0de116b0ead67ecefb18d06ef9638ad0ebe7286","signature":"2b2db01796f774852b44cacad054f31b9e63a3c4ed787d12c1dd75c75e602bef"},{"version":"3d0fa60fa41b7006654b88d60ca09f0276d63d00f12adaedc87b9a569315dee8","signature":"2fd1e3d213b59f5811462fc92334b3181fc0c4ca81416a2c094a77f9ea767f05"},{"version":"ea409f34b0e9ada29efa6a916d00ccea03b31063bbd5cfbc4296ca79693a6702","signature":"af71906c793629e2fafa484abe4c1da3978fd9473e01320f42b2f37a5510ed8c"},{"version":"4545a2b4483788cc65b488100c61f20ebdb08c22c7344572885ec14826d2f24b","signature":"b9f112f8e9a593f362dd5f434f8f997385dd62f15e2d2fb6d316e5d0d9942a51"},{"version":"488471e75a4cb636dcc2316d57fdd3d8bc51a974bd01488d9c9e9e5a9c7b9d1f","signature":"09d6078412069edc1a6faad02c5846365d560ea26b03f0cd960137bd30ae4df9","affectsGlobalScope":true},{"version":"a8d9211eab44f7cb13502dcd4c3e8499730005cc721e8bcfa50364393dd4930f","signature":"9382f138465c4775c54940f2a3d4334a083a6fc9a622a7c926c5f8233228cbae"},{"version":"79ff21c841f9ff92f33776bae02d6a2ac5c0d788935322db99ecee14b53425c1","signature":"27b266bca63ea07d9ee3b89b1db810edce779ddeb51cefacdd1a8c514466fd06"},{"version":"b823a47f674739ef4f8930b4fc7961da84deed0125827758c3eccf6b0f667943","signature":"c8525f0be940a19f3d03f06b6e43d4bea21ba910db62fb5024ecc671bcc23932"},{"version":"ad676f7fc7e3b420e58878cdd6aa15190a462481ddb571c630093652ee9a3385","signature":"41940ee0ac490301ff33a411c18d7e38dd4db5030e2cdf7774c081574ac4bf91"},{"version":"b344d5ea5bc36bef1134760ef821888da449e01299a7a70251d5655aee8630e9","signature":"c6384012cac726d5b05237d2bd2c9c9da0893feaf54ab1dd0042fe141b9e5bd8"},{"version":"033d63315fb95bf237d50bf43f477afcfd635f48c13deebf499be3dbe2ae1c0a","signature":"dbdc80bc661dfa19a717956262c9d2e8a4cfda54b04eff8f2c80805d04993d07"},{"version":"4f248aff76feaf1251f79b7d33cc8b900746931fcdfce11db4525a5c391e4288","signature":"a893e0340974b84b6e7b17d0b4a810f5f8583453c750afef2712f7c0d03e6a7e"},{"version":"de689459b169728b40b1f74458ad8aa202505424e5f8163fe64c6ee8d83543fc","signature":"5cf43ceac60fba7927af9ce9b27fb6031854fc923263b78c353fb986857218b9"},{"version":"8bec5d913b66865ea88ced047c96b2f048c8343ca8e142e8c37942f6f9d62a35","signature":"0caa217adbbdb001facd9aeb363fa2a446eabbeb4e5af2c1f2c3d1ef4bbffc6e"},{"version":"934d2d6e26d57425550744e36443449d1d1d7e2e5d91e03afb1ca27290d4a158","signature":"bbaa85a96900ee24d770ce38f7807d2d3cc2ca203e223cd4080447680910992e"},{"version":"6ff12fe177bb2840a479ebb97058c5a3307212b75823c62a5229722357e5d843","signature":"931a7114fa2f626f8dfb69c1a932335300d72faf3e231f307976f66a46fc8dae"},{"version":"7aefa32bb563cec35db358fbbc11032273b267222cea678fcef6efd91ed47a1b","signature":"cf149f9c953fb946a052b218c22424d7ebfad7b1f9e6940f1adecd4b5475136a"}],"root":[[95,111]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"alwaysStrict":true,"declaration":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":4,"module":99,"noImplicitAny":true,"outDir":"./","preserveConstEnums":true,"removeComments":true,"rootDir":"../../src/client","skipLibCheck":true,"sourceMap":false,"strict":true,"strictBindCallApply":true,"strictFunctionTypes":true,"strictNullChecks":true,"strictPropertyInitialization":true,"suppressImplicitAnyIndexErrors":false,"target":99,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[[94,1],[92,2],[93,1],[109,3],[110,3],[111,4],[107,5],[97,6],[108,7],[99,8],[95,9],[100,10],[103,11],[104,10],[101,12],[98,9],[106,13],[102,14],[105,15],[96,3]],"version":"6.0.3"}
|
|
1
|
+
{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.es2024.d.ts","../../node_modules/typescript/lib/lib.es2025.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../node_modules/typescript/lib/lib.es2025.collection.d.ts","../../node_modules/typescript/lib/lib.es2025.float16.d.ts","../../node_modules/typescript/lib/lib.es2025.intl.d.ts","../../node_modules/typescript/lib/lib.es2025.iterator.d.ts","../../node_modules/typescript/lib/lib.es2025.promise.d.ts","../../node_modules/typescript/lib/lib.es2025.regexp.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.date.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.error.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.esnext.temporal.d.ts","../../node_modules/typescript/lib/lib.esnext.typedarrays.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/react/index.d.ts","../../node_modules/@types/react/jsx-runtime.d.ts","../../node_modules/@types/react-dom/client.d.ts","../../src/client/dev/error-overlay.tsx","../../node_modules/@types/react-dom/index.d.ts","../../src/client/navigation/scroll.ts","../../src/client/types.ts","../../src/client/navigation/navigation.ts","../../src/client/routing/match.ts","../../src/client/navigation/prefetch.ts","../../src/client/routing/error-boundary.tsx","../../src/client/head/head.ts","../../src/client/head/metadata.ts","../../src/client/routing/loader.ts","../../src/client/routing/params-context.ts","../../src/client/routing/hooks.ts","../../src/client/routing/lazy.ts","../../src/client/routing/slot-context.ts","../../src/client/routing/router.tsx","../../src/client/routing/mount.tsx","../../src/client/navigation/link.tsx","../../src/client/navigation/navlink.tsx","../../src/client/routing/action.ts","../../src/client/channel/channel.ts","../../src/client/components/image.tsx","../../src/client/components/script.tsx","../../src/client/components/form.tsx","../../src/client/components/slot.tsx","../../src/client/index.ts"],"fileIdsList":[[92],[90,91],[92,93],[92,93,114],[92,93,109],[93,100,103],[93,98,99,100,101,103,104,105,107,110,111,112,113,114,115,116,117,118,119],[92,93,98,99,101],[92,93,96,97,98],[92,93,107,112],[93,98,100],[93],[92,93,98,99,105],[92,93,98],[92,93,98,99,100,101,105,106],[92,93,98,99,100,103,104],[93,94,95,98,99,101,110],[92,93,100],[92,93,97,98,99,100,102,103,105,106,107,108,109]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","impliedFormat":1},{"version":"1e9332c23e9a907175e0ffc6a49e236f97b48838cc8aec9ce7e4cec21e544b65","impliedFormat":1},{"version":"3753fbc1113dc511214802a2342280a8b284ab9094f6420e7aa171e868679f91","impliedFormat":1},{"version":"999ca32883495a866aa5737fe1babc764a469e4cde6ee6b136a4b9ae68853e4b","impliedFormat":1},{"version":"17f13ecb98cbc39243f2eee1f16d45cd8ec4706b03ee314f1915f1a8b42f6984","impliedFormat":1},{"version":"d6b1eba8496bdd0eed6fc8a685768fe01b2da4a0388b5fe7df558290bffcf32f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","affectsGlobalScope":true,"impliedFormat":1},{"version":"0bd714129fca875f7d4c477a1a392200b0bcd13fb2e80928cd334b63830ea047","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2c9037ae6cd2c52d80ceef0b3c5ffdb488627d71529cf4f63776daf11161c9a","affectsGlobalScope":true,"impliedFormat":1},{"version":"135d5cf4d345f59f1a9caadfafcd858d3d9cc68290db616cc85797224448cccc","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc238c3f81c2984751932b6aab223cd5b830e0ac6cad76389e5e9d2ffc03287d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4a07f9b76d361f572620927e5735b77d6d2101c23cdd94383eb5b706e7b36357","affectsGlobalScope":true,"impliedFormat":1},{"version":"7c4e8dc6ab834cc6baa0227e030606d29e3e8449a9f67cdf5605ea5493c4db29","affectsGlobalScope":true,"impliedFormat":1},{"version":"de7ba0fd02e06cd9a5bd4ab441ed0e122735786e67dde1e849cced1cd8b46b78","affectsGlobalScope":true,"impliedFormat":1},{"version":"6148e4e88d720a06855071c3db02069434142a8332cf9c182cda551adedf3156","affectsGlobalScope":true,"impliedFormat":1},{"version":"d63dba625b108316a40c95a4425f8d4294e0deeccfd6c7e59d819efa19e23409","affectsGlobalScope":true,"impliedFormat":1},{"version":"0568d6befee03dd435bed4fc25c4e46865b24bdcb8c563fdc21f580a2c301904","affectsGlobalScope":true,"impliedFormat":1},{"version":"30d62269b05b584741f19a5369852d5d34895aa2ac4fd948956f886d15f9cc0d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f128dae7c44d8f35ee42e0a437000a57c9f06cc04f8b4fb42eebf44954d53dc8","affectsGlobalScope":true,"impliedFormat":1},{"version":"ffbe6d7b295306b2ba88030f65b74c107d8d99bdcf596ea99c62a02f606108b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"996fb27b15277369c68a4ba46ed138b4e9e839a02fb4ec756f7997629242fd9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"79b712591b270d4778c89706ca2cfc56ddb8c3f895840e477388f1710dc5eda9","affectsGlobalScope":true,"impliedFormat":1},{"version":"20884846cef428b992b9bd032e70a4ef88e349263f63aeddf04dda837a7dba26","affectsGlobalScope":true,"impliedFormat":1},{"version":"5fcab789c73a97cd43828ee3cc94a61264cf24d4c44472ce64ced0e0f148bdb2","affectsGlobalScope":true,"impliedFormat":1},{"version":"db59a81f070c1880ad645b2c0275022baa6a0c4f0acdc58d29d349c6efcf0903","affectsGlobalScope":true,"impliedFormat":1},{"version":"673294292640f5722b700e7d814e17aaf7d93f83a48a2c9b38f33cbc940ad8b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"d786b48f934cbca483b3c6d0a798cb43bbb4ada283e76fb22c28e53ae05b9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ecb8e347cb6b2a8927c09b86263663289418df375f5e68e11a0ae683776978f","affectsGlobalScope":true,"impliedFormat":1},{"version":"142efd4ce210576f777dc34df121777be89eda476942d6d6663b03dcb53be3ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"379bc41580c2d774f82e828c70308f24a005b490c25ba34d679d84bcf05c3d9d","affectsGlobalScope":true,"impliedFormat":1},{"version":"ed484fb2aa8a1a23d0277056ec3336e0a0b52f9b8d6a961f338a642faf43235d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ffedae1d1c2d53fdbca1c96d3c7dda544281f7d262f99b6880634f8fd8d9820","affectsGlobalScope":true,"impliedFormat":1},{"version":"83a730b125d477dd264df8ba479afab27a3dae7152b005c214ab94dc7ee44fd3","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},{"version":"7e29f41b158de217f94cb9676bf9cbd0cd9b5a46e1985141ed36e075c52bf6ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"bd7dee3446a5b94651d58000ddfda40296f073e9372891f65003a524b4620697","impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"bc03c3c352f689e38c0ddd50c39b1e65d59273991bfc8858a9e3c0ebb79c023b","impliedFormat":1},{"version":"b67e06170394a344f1ccc387cae700680cca78bb859c0a52be80ff58fba2b253","signature":"9f8a4a6f0fa33835fe10847c3313103535a4aa19ab49260497e23bb938197acc"},{"version":"be1cc4d94ea60cbe567bc29ed479d42587bf1e6cba490f123d329976b0fe4ee5","impliedFormat":1},{"version":"ee8a149229af2834098b2776d0de116b0ead67ecefb18d06ef9638ad0ebe7286","signature":"2b2db01796f774852b44cacad054f31b9e63a3c4ed787d12c1dd75c75e602bef"},{"version":"1684064f1b0252907917f0c1a684ac3e2f2cb0b83f88d3362e38d3f3cf74b8ad","signature":"d86aae3a61fb2a3734379428044eefd6b048996f3a1a1cd7e57bb94d3d36b02b"},{"version":"10401d7a6c4ded98d79969e15073c84513bf1207d39db79573dd96eae6f2b360","signature":"07a133f6bd32dbfd81aa6cbbd0eed2b4e26c920cb00508a58506897ef443f17f"},{"version":"4545a2b4483788cc65b488100c61f20ebdb08c22c7344572885ec14826d2f24b","signature":"b9f112f8e9a593f362dd5f434f8f997385dd62f15e2d2fb6d316e5d0d9942a51"},{"version":"d46f90a72c5370fdf90115c2c3a3c1b6f344cbac30e176eb92a083823233b2bb","signature":"09d6078412069edc1a6faad02c5846365d560ea26b03f0cd960137bd30ae4df9","affectsGlobalScope":true},{"version":"4ffbc79d3bf30be74fd9258569c6012cdbfee5a9249fed04b8e9072bcebd29e9","signature":"9382f138465c4775c54940f2a3d4334a083a6fc9a622a7c926c5f8233228cbae"},{"version":"d71d9e2726f1aae28ab20fb3d5c68a8650d8318c75a4d9831dc2a5346cd63ba4","signature":"2100acdf9780bbfaa7c7c41109ea60464c7e17af1fb6ab3aa89e860ad1c3f350"},{"version":"6983e75e16b4526e1af5d3d9e9e346628e555f560ce8b80ef64e540c18be75a4","signature":"008b61907cfba2dd062cbbf6aa6b790714c9f10bbbeff1af4cac610e3bcf688f"},{"version":"564dfb7b5db8da37501a9bc4a5bda849817d061fcbd02d4c811211d238836261","signature":"197426b39a1ee9b5dc05020bd7285c804a9c57358104677cdd68986edb7ecf0b"},{"version":"b823a47f674739ef4f8930b4fc7961da84deed0125827758c3eccf6b0f667943","signature":"c8525f0be940a19f3d03f06b6e43d4bea21ba910db62fb5024ecc671bcc23932"},{"version":"2c0cbb2ed8f231d80a32f595fe0adbd906c081e42848adc652b0df12c1c8d287","signature":"b47403a7e6e239e43bf3b91e224e38b4c8345da2dc9967a2a1682996e1d48829"},{"version":"b344d5ea5bc36bef1134760ef821888da449e01299a7a70251d5655aee8630e9","signature":"c6384012cac726d5b05237d2bd2c9c9da0893feaf54ab1dd0042fe141b9e5bd8"},{"version":"8ff6ca449f20c1d1bc8338fa1017ca8b45d0766cab6fa11e7fce8aa670cbd80c","signature":"994bfb8326dca5c985462ba74b5c64146aef0e3ea7bbbbf265ad426d884fbc9e"},{"version":"77115c7ceff79d31107af36683dc422ca54e6b44520b9756b7771b530b31b8d1","signature":"00dd4ce0458ebf64e2e0617d4bc04f3a9a569bc388f3a20c1c4416d465e99245"},{"version":"5889d61cffb3a390c141cce41c0b115302ab5a5760533839f106c41f07671a3d","signature":"e5f0e0e21621bb3e87958857cc9695abf011fb257bd249abd42ae97b3b61e1d0"},{"version":"72c523c9b0127251b64147e37068b9cbdd179dc4449a96e23c181e30c5c0d019","signature":"5cf43ceac60fba7927af9ce9b27fb6031854fc923263b78c353fb986857218b9"},{"version":"8bec5d913b66865ea88ced047c96b2f048c8343ca8e142e8c37942f6f9d62a35","signature":"0caa217adbbdb001facd9aeb363fa2a446eabbeb4e5af2c1f2c3d1ef4bbffc6e"},{"version":"5a86d3602f726666a25128f4710406135d5a52dcba3c1b47d6c5f244490e706b","signature":"63bfd9f3fbbcb2dc649dd7303b9fdcf5680c25e217228a5abe005674bfc8bed5"},{"version":"934d2d6e26d57425550744e36443449d1d1d7e2e5d91e03afb1ca27290d4a158","signature":"bbaa85a96900ee24d770ce38f7807d2d3cc2ca203e223cd4080447680910992e"},{"version":"a650fb96a89259216aba12555fc6774235188f2d0a0730c5fb64e0783f360b82","signature":"7302ddfa6ab62295a7ad2cf47cc8b933be587d161d5b818aba3e85d7af69e59e"},{"version":"f4d4df48a8a99b91545aaed8ad1beaaef5c314aa5d8d55029d80910960dc93a5","signature":"d9ce1372a43589027af010d0293b17099bf27089071c6d12ce30eb94b70191af"},{"version":"296c26ce70323317972ec25f9d5cfe79cb99f576423c81798f906d52e7c48432","signature":"dbb3eab27a108491f80873c1031ddc0b1a16c47f4c32e2ec2e70b83e9cee161b"},{"version":"49ccdd12861c01e002d1278b952c68ae68c8f8d73f7148f6fd62fe266c607b09","signature":"8aec088c8b901c6fe9e7fe22785892138849af77a640d12b7015ec52a95aa27c"},{"version":"f592e84ce2f73d6b30f83f62abf096b6591b27ee7b45b6232eccc00c28cd6325","signature":"d8c2f798462fc3da86e02a8e0ad1f45d98ea0c66d40c34c0790d9abc563ee5d7"}],"root":[95,[97,120]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"alwaysStrict":true,"declaration":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":4,"module":99,"noImplicitAny":true,"outDir":"./","preserveConstEnums":true,"removeComments":true,"rootDir":"../../src/client","skipLibCheck":true,"sourceMap":false,"strict":true,"strictBindCallApply":true,"strictFunctionTypes":true,"strictNullChecks":true,"strictPropertyInitialization":true,"suppressImplicitAnyIndexErrors":false,"target":99,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[[94,1],[96,1],[92,2],[93,1],[115,3],[118,4],[116,3],[117,3],[119,5],[95,3],[103,3],[104,6],[120,7],[112,8],[99,9],[113,10],[101,11],[97,12],[114,13],[102,14],[107,15],[108,14],[105,16],[100,12],[111,17],[106,18],[110,19],[109,3],[98,3]],"version":"6.0.3"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type ActionState, type RevalidateTarget } from '../routing/action.js';
|
|
3
|
+
export interface FormProps {
|
|
4
|
+
action: (data: FormData) => void | Promise<void>;
|
|
5
|
+
revalidate?: RevalidateTarget;
|
|
6
|
+
onSuccess?: () => void;
|
|
7
|
+
onError?: (error: unknown) => void;
|
|
8
|
+
resetOnSuccess?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
children?: ReactNode | ((state: ActionState<void>) => ReactNode);
|
|
11
|
+
}
|
|
12
|
+
export declare function Form({ action, revalidate, onSuccess, onError, resetOnSuccess, className, children, }: FormProps): ReactNode;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef } from 'react';
|
|
3
|
+
import { useAction } from '../routing/action.js';
|
|
4
|
+
export function Form({ action, revalidate, onSuccess, onError, resetOnSuccess = false, className, children, }) {
|
|
5
|
+
const formRef = useRef(null);
|
|
6
|
+
const handle = useAction((data) => action(data), {
|
|
7
|
+
revalidate,
|
|
8
|
+
onError,
|
|
9
|
+
onSuccess: () => {
|
|
10
|
+
if (resetOnSuccess)
|
|
11
|
+
formRef.current?.reset();
|
|
12
|
+
onSuccess?.();
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
const onSubmit = (event) => {
|
|
16
|
+
event.preventDefault();
|
|
17
|
+
formRef.current = event.currentTarget;
|
|
18
|
+
void handle.run(new FormData(event.currentTarget));
|
|
19
|
+
};
|
|
20
|
+
return (_jsx("form", { ref: formRef, className: className, onSubmit: onSubmit, children: typeof children === 'function'
|
|
21
|
+
? children({ pending: handle.pending, error: handle.error, data: handle.data })
|
|
22
|
+
: children }));
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type CSSProperties, type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
export interface ImageProps extends Omit<ComponentPropsWithRef<'img'>, 'loading' | 'placeholder' | 'width' | 'height'> {
|
|
3
|
+
src: string;
|
|
4
|
+
alt: string;
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
fill?: boolean;
|
|
8
|
+
objectFit?: CSSProperties['objectFit'];
|
|
9
|
+
priority?: boolean;
|
|
10
|
+
placeholder?: 'empty' | 'blur';
|
|
11
|
+
blurDataURL?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function Image(props: ImageProps): ReactNode;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
export function Image(props) {
|
|
4
|
+
const { src, alt, width, height, fill = false, objectFit, priority = false, placeholder = 'empty', blurDataURL, style, onLoad, ...rest } = props;
|
|
5
|
+
const [loaded, setLoaded] = useState(false);
|
|
6
|
+
const showBlur = placeholder === 'blur' && blurDataURL !== undefined && !loaded;
|
|
7
|
+
const layoutStyle = fill
|
|
8
|
+
? { position: 'absolute', inset: 0, width: '100%', height: '100%' }
|
|
9
|
+
: {};
|
|
10
|
+
const blurStyle = showBlur
|
|
11
|
+
? {
|
|
12
|
+
backgroundImage: `url(${blurDataURL})`,
|
|
13
|
+
backgroundSize: 'cover',
|
|
14
|
+
backgroundPosition: 'center',
|
|
15
|
+
filter: 'blur(20px)',
|
|
16
|
+
}
|
|
17
|
+
: {};
|
|
18
|
+
return (_jsx("img", { ...rest, src: src, alt: alt, width: fill ? undefined : width, height: fill ? undefined : height, loading: priority ? 'eager' : 'lazy', decoding: "async", fetchPriority: priority ? 'high' : 'auto', onLoad: (event) => {
|
|
19
|
+
setLoaded(true);
|
|
20
|
+
onLoad?.(event);
|
|
21
|
+
}, style: { ...layoutStyle, objectFit, ...blurStyle, ...style } }));
|
|
22
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type ScriptStrategy = 'beforeInteractive' | 'afterInteractive' | 'lazyOnload';
|
|
3
|
+
export interface ScriptProps {
|
|
4
|
+
src?: string;
|
|
5
|
+
strategy?: ScriptStrategy;
|
|
6
|
+
id?: string;
|
|
7
|
+
type?: string;
|
|
8
|
+
onLoad?: () => void;
|
|
9
|
+
onReady?: () => void;
|
|
10
|
+
onError?: (error: unknown) => void;
|
|
11
|
+
children?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function Script(props: ScriptProps): ReactNode;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
const registry = new Map();
|
|
3
|
+
function inject(props, key) {
|
|
4
|
+
const { src, type, onLoad, onReady, onError, children } = props;
|
|
5
|
+
const el = document.createElement('script');
|
|
6
|
+
el.dataset.toilScript = key;
|
|
7
|
+
if (type !== undefined)
|
|
8
|
+
el.type = type;
|
|
9
|
+
if (src !== undefined) {
|
|
10
|
+
el.src = src;
|
|
11
|
+
el.async = true;
|
|
12
|
+
el.addEventListener('load', () => {
|
|
13
|
+
registry.set(key, 'ready');
|
|
14
|
+
onLoad?.();
|
|
15
|
+
onReady?.();
|
|
16
|
+
});
|
|
17
|
+
el.addEventListener('error', (event) => {
|
|
18
|
+
registry.delete(key);
|
|
19
|
+
onError?.(event);
|
|
20
|
+
});
|
|
21
|
+
document.head.appendChild(el);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
el.textContent = children ?? '';
|
|
25
|
+
document.head.appendChild(el);
|
|
26
|
+
registry.set(key, 'ready');
|
|
27
|
+
onLoad?.();
|
|
28
|
+
onReady?.();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export function Script(props) {
|
|
32
|
+
const { src, id, strategy = 'afterInteractive', onReady } = props;
|
|
33
|
+
const key = id ?? src;
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (key === undefined) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const state = registry.get(key);
|
|
39
|
+
if (state === 'ready') {
|
|
40
|
+
onReady?.();
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (state === 'loading') {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
registry.set(key, 'loading');
|
|
47
|
+
const run = () => {
|
|
48
|
+
inject(props, key);
|
|
49
|
+
};
|
|
50
|
+
if (strategy === 'lazyOnload') {
|
|
51
|
+
if (document.readyState === 'complete') {
|
|
52
|
+
const idle = window.requestIdleCallback?.bind(window);
|
|
53
|
+
if (idle)
|
|
54
|
+
idle(run);
|
|
55
|
+
else
|
|
56
|
+
setTimeout(run, 0);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
window.addEventListener('load', run, { once: true });
|
|
60
|
+
}
|
|
61
|
+
return () => {
|
|
62
|
+
window.removeEventListener('load', run);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
run();
|
|
66
|
+
}, [key, strategy]);
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Component, type ErrorInfo, type ReactNode } from 'react';
|
|
2
|
+
export declare function isDevMode(): boolean;
|
|
3
|
+
export declare function initDevErrorOverlay(): void;
|
|
4
|
+
interface BoundaryProps {
|
|
5
|
+
readonly children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
interface BoundaryState {
|
|
8
|
+
readonly crashed: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare class DevErrorBoundary extends Component<BoundaryProps, BoundaryState> {
|
|
11
|
+
state: BoundaryState;
|
|
12
|
+
private unsubscribe;
|
|
13
|
+
static getDerivedStateFromError(): BoundaryState;
|
|
14
|
+
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
15
|
+
componentDidMount(): void;
|
|
16
|
+
componentWillUnmount(): void;
|
|
17
|
+
render(): ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare function DevErrorOverlay(): ReactNode;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Component, useSyncExternalStore, } from 'react';
|
|
3
|
+
let current = null;
|
|
4
|
+
const listeners = new Set();
|
|
5
|
+
function emit() {
|
|
6
|
+
for (const listener of listeners)
|
|
7
|
+
listener();
|
|
8
|
+
}
|
|
9
|
+
function setDevError(next) {
|
|
10
|
+
current = next;
|
|
11
|
+
emit();
|
|
12
|
+
}
|
|
13
|
+
function subscribe(listener) {
|
|
14
|
+
listeners.add(listener);
|
|
15
|
+
return () => {
|
|
16
|
+
listeners.delete(listener);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export function isDevMode() {
|
|
20
|
+
try {
|
|
21
|
+
return Boolean(import.meta.env?.DEV);
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
let windowBound = false;
|
|
28
|
+
export function initDevErrorOverlay() {
|
|
29
|
+
if (windowBound || typeof window === 'undefined')
|
|
30
|
+
return;
|
|
31
|
+
windowBound = true;
|
|
32
|
+
window.addEventListener('error', (event) => {
|
|
33
|
+
if (event.error instanceof Error)
|
|
34
|
+
setDevError({ error: event.error, source: 'window' });
|
|
35
|
+
});
|
|
36
|
+
window.addEventListener('unhandledrejection', (event) => {
|
|
37
|
+
const reason = event.reason;
|
|
38
|
+
const error = reason instanceof Error ? reason : new Error(String(reason));
|
|
39
|
+
setDevError({ error, source: 'unhandledrejection' });
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
export class DevErrorBoundary extends Component {
|
|
43
|
+
state = { crashed: false };
|
|
44
|
+
unsubscribe;
|
|
45
|
+
static getDerivedStateFromError() {
|
|
46
|
+
return { crashed: true };
|
|
47
|
+
}
|
|
48
|
+
componentDidCatch(error, info) {
|
|
49
|
+
setDevError({ error, componentStack: info.componentStack ?? undefined, source: 'render' });
|
|
50
|
+
}
|
|
51
|
+
componentDidMount() {
|
|
52
|
+
this.unsubscribe = subscribe(() => {
|
|
53
|
+
if (current === null && this.state.crashed)
|
|
54
|
+
this.setState({ crashed: false });
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
componentWillUnmount() {
|
|
58
|
+
this.unsubscribe?.();
|
|
59
|
+
}
|
|
60
|
+
render() {
|
|
61
|
+
return this.state.crashed ? null : this.props.children;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const overlayStyle = {
|
|
65
|
+
position: 'fixed',
|
|
66
|
+
inset: 0,
|
|
67
|
+
zIndex: 2147483647,
|
|
68
|
+
background: 'rgba(8, 8, 12, 0.88)',
|
|
69
|
+
color: '#f5f6fa',
|
|
70
|
+
font: '13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace',
|
|
71
|
+
padding: '2rem',
|
|
72
|
+
overflow: 'auto',
|
|
73
|
+
display: 'flex',
|
|
74
|
+
justifyContent: 'center',
|
|
75
|
+
alignItems: 'flex-start',
|
|
76
|
+
};
|
|
77
|
+
const panelStyle = {
|
|
78
|
+
maxWidth: 900,
|
|
79
|
+
width: '100%',
|
|
80
|
+
background: '#15151c',
|
|
81
|
+
border: '1px solid #ef4444',
|
|
82
|
+
borderRadius: 10,
|
|
83
|
+
padding: '1.25rem 1.5rem',
|
|
84
|
+
boxShadow: '0 12px 48px rgba(0,0,0,0.5)',
|
|
85
|
+
};
|
|
86
|
+
const titleStyle = {
|
|
87
|
+
margin: 0,
|
|
88
|
+
color: '#ff6b6b',
|
|
89
|
+
fontSize: '1rem',
|
|
90
|
+
fontWeight: 700,
|
|
91
|
+
wordBreak: 'break-word',
|
|
92
|
+
};
|
|
93
|
+
const preStyle = {
|
|
94
|
+
whiteSpace: 'pre-wrap',
|
|
95
|
+
wordBreak: 'break-word',
|
|
96
|
+
margin: '0.75rem 0 0',
|
|
97
|
+
color: '#c8cee0',
|
|
98
|
+
};
|
|
99
|
+
const buttonStyle = {
|
|
100
|
+
font: 'inherit',
|
|
101
|
+
color: '#f5f6fa',
|
|
102
|
+
background: '#2a2a36',
|
|
103
|
+
border: '1px solid #3a3a48',
|
|
104
|
+
borderRadius: 6,
|
|
105
|
+
padding: '0.4em 1em',
|
|
106
|
+
cursor: 'pointer',
|
|
107
|
+
marginRight: '0.5rem',
|
|
108
|
+
};
|
|
109
|
+
const SOURCE_LABEL = {
|
|
110
|
+
render: 'Render error',
|
|
111
|
+
window: 'Uncaught error',
|
|
112
|
+
unhandledrejection: 'Unhandled promise rejection',
|
|
113
|
+
};
|
|
114
|
+
export function DevErrorOverlay() {
|
|
115
|
+
const devError = useSyncExternalStore(subscribe, () => current, () => null);
|
|
116
|
+
if (!devError)
|
|
117
|
+
return null;
|
|
118
|
+
return (_jsx("div", { style: overlayStyle, role: "alert", children: _jsxs("div", { style: panelStyle, children: [_jsxs("p", { style: titleStyle, children: [SOURCE_LABEL[devError.source], ", ", devError.error.name, ": ", devError.error.message] }), devError.error.stack !== undefined && _jsx("pre", { style: preStyle, children: devError.error.stack }), devError.componentStack !== undefined && (_jsx("pre", { style: { ...preStyle, color: '#8b9ab4' }, children: devError.componentStack })), _jsxs("div", { style: { marginTop: '1.25rem' }, children: [_jsx("button", { type: "button", style: buttonStyle, onClick: () => {
|
|
119
|
+
setDevError(null);
|
|
120
|
+
}, children: "Dismiss" }), _jsx("button", { type: "button", style: buttonStyle, onClick: () => {
|
|
121
|
+
window.location.reload();
|
|
122
|
+
}, children: "Reload" })] })] }) }));
|
|
123
|
+
}
|
|
@@ -24,3 +24,5 @@ export declare function mergeHead(specs: readonly HeadSpec[]): ResolvedHead;
|
|
|
24
24
|
export declare function useHead(spec: HeadSpec): void;
|
|
25
25
|
export declare function useTitle(title: string): void;
|
|
26
26
|
export declare function Head(props: HeadSpec): null;
|
|
27
|
+
export declare function setRouteHead(spec: HeadSpec | null): void;
|
|
28
|
+
export declare function useRouteHead(spec: HeadSpec | undefined): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect } from 'react';
|
|
1
|
+
import { useEffect, useLayoutEffect } from 'react';
|
|
2
2
|
function metaKey(m) {
|
|
3
3
|
if (m.name !== undefined)
|
|
4
4
|
return `name:${m.name}`;
|
|
@@ -30,6 +30,7 @@ const entries = new Map();
|
|
|
30
30
|
let order = [];
|
|
31
31
|
let seq = 0;
|
|
32
32
|
let baseTitle = null;
|
|
33
|
+
let routeHead = null;
|
|
33
34
|
function setAttrs(el, attrs) {
|
|
34
35
|
el.setAttribute('data-toil-head', '');
|
|
35
36
|
for (const [key, value] of Object.entries(attrs)) {
|
|
@@ -42,7 +43,8 @@ function apply() {
|
|
|
42
43
|
return;
|
|
43
44
|
if (baseTitle === null)
|
|
44
45
|
baseTitle = document.title;
|
|
45
|
-
const
|
|
46
|
+
const specs = [routeHead, ...order.map((id) => entries.get(id))];
|
|
47
|
+
const resolved = mergeHead(specs.filter((s) => !!s));
|
|
46
48
|
document.title = resolved.title ?? baseTitle;
|
|
47
49
|
for (const stale of document.head.querySelectorAll('[data-toil-head]'))
|
|
48
50
|
stale.remove();
|
|
@@ -85,3 +87,16 @@ export function Head(props) {
|
|
|
85
87
|
useHead(props);
|
|
86
88
|
return null;
|
|
87
89
|
}
|
|
90
|
+
export function setRouteHead(spec) {
|
|
91
|
+
routeHead = spec;
|
|
92
|
+
apply();
|
|
93
|
+
}
|
|
94
|
+
export function useRouteHead(spec) {
|
|
95
|
+
const json = spec ? JSON.stringify(spec) : '';
|
|
96
|
+
useLayoutEffect(() => {
|
|
97
|
+
setRouteHead(json ? JSON.parse(json) : null);
|
|
98
|
+
return () => {
|
|
99
|
+
setRouteHead(null);
|
|
100
|
+
};
|
|
101
|
+
}, [json]);
|
|
102
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { HeadSpec, LinkTag, MetaTag } from './head.js';
|
|
2
|
+
import type { RouteParams } from '../routing/match.js';
|
|
3
|
+
export interface OpenGraph {
|
|
4
|
+
readonly title?: string;
|
|
5
|
+
readonly description?: string;
|
|
6
|
+
readonly type?: string;
|
|
7
|
+
readonly url?: string;
|
|
8
|
+
readonly image?: string;
|
|
9
|
+
readonly siteName?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface Metadata {
|
|
12
|
+
readonly title?: string;
|
|
13
|
+
readonly titleTemplate?: string;
|
|
14
|
+
readonly description?: string;
|
|
15
|
+
readonly keywords?: string | readonly string[];
|
|
16
|
+
readonly canonical?: string;
|
|
17
|
+
readonly robots?: string;
|
|
18
|
+
readonly themeColor?: string;
|
|
19
|
+
readonly openGraph?: OpenGraph;
|
|
20
|
+
readonly meta?: readonly MetaTag[];
|
|
21
|
+
readonly link?: readonly LinkTag[];
|
|
22
|
+
}
|
|
23
|
+
export interface GenerateMetadataArgs<T = unknown> {
|
|
24
|
+
readonly params: RouteParams;
|
|
25
|
+
readonly searchParams: URLSearchParams;
|
|
26
|
+
readonly data: T;
|
|
27
|
+
}
|
|
28
|
+
export type GenerateMetadata<T = unknown> = (args: GenerateMetadataArgs<T>) => Metadata | Promise<Metadata>;
|
|
29
|
+
export declare function resolveMetadata(metadata: Metadata): HeadSpec;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export function resolveMetadata(metadata) {
|
|
2
|
+
const meta = [];
|
|
3
|
+
if (metadata.description !== undefined) {
|
|
4
|
+
meta.push({ name: 'description', content: metadata.description });
|
|
5
|
+
}
|
|
6
|
+
if (metadata.keywords !== undefined) {
|
|
7
|
+
const content = typeof metadata.keywords === 'string' ? metadata.keywords : metadata.keywords.join(', ');
|
|
8
|
+
meta.push({ name: 'keywords', content });
|
|
9
|
+
}
|
|
10
|
+
if (metadata.robots !== undefined)
|
|
11
|
+
meta.push({ name: 'robots', content: metadata.robots });
|
|
12
|
+
if (metadata.themeColor !== undefined) {
|
|
13
|
+
meta.push({ name: 'theme-color', content: metadata.themeColor });
|
|
14
|
+
}
|
|
15
|
+
const og = metadata.openGraph;
|
|
16
|
+
if (og) {
|
|
17
|
+
const pairs = [
|
|
18
|
+
['og:title', og.title],
|
|
19
|
+
['og:description', og.description],
|
|
20
|
+
['og:type', og.type],
|
|
21
|
+
['og:url', og.url],
|
|
22
|
+
['og:image', og.image],
|
|
23
|
+
['og:site_name', og.siteName],
|
|
24
|
+
];
|
|
25
|
+
for (const [property, content] of pairs) {
|
|
26
|
+
if (content !== undefined)
|
|
27
|
+
meta.push({ property, content });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (metadata.meta)
|
|
31
|
+
meta.push(...metadata.meta);
|
|
32
|
+
const link = [];
|
|
33
|
+
if (metadata.canonical !== undefined)
|
|
34
|
+
link.push({ rel: 'canonical', href: metadata.canonical });
|
|
35
|
+
if (metadata.link)
|
|
36
|
+
link.push(...metadata.link);
|
|
37
|
+
return { title: metadata.title, titleTemplate: metadata.titleTemplate, meta, link };
|
|
38
|
+
}
|