···11+import type { ParamMatcher } from '@sveltejs/kit';
22+33+import { isDid } from '$lib/types/identity';
44+55+export const match = isDid satisfies ParamMatcher;
+7
src/params/didOrHandle.ts
···11+import type { ParamMatcher } from '@sveltejs/kit';
22+33+import { isDid, isHandle, type Did, type Handle } from '$lib/types/identity';
44+55+export const match = ((param: string): param is Did | Handle => {
66+ return isDid(param) || isHandle(param);
77+}) satisfies ParamMatcher;
+5
src/params/handle.ts
···11+import type { ParamMatcher } from '@sveltejs/kit';
22+33+import { isHandle } from '$lib/types/identity';
44+55+export const match = isHandle satisfies ParamMatcher;
+5
src/params/rkey.ts
···11+import type { ParamMatcher } from '@sveltejs/kit';
22+33+import { isRecordKey } from '$lib/types/rkey';
44+55+export const match = isRecordKey satisfies ParamMatcher;
+5
src/params/tid.ts
···11+import type { ParamMatcher } from '@sveltejs/kit';
22+33+import { isTid } from '$lib/types/rkey';
44+55+export const match = isTid satisfies ParamMatcher;
···11+import { dev } from '$app/environment';
22+33+export const csr = dev;
static/favicon.png
This is a binary file and will not be displayed.
+21
svelte.config.js
···11+import adapter from '@sveltejs/adapter-cloudflare';
22+import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
33+44+/** @type {import('@sveltejs/kit').Config} */
55+const config = {
66+ // Consult https://svelte.dev/docs/kit/integrations
77+ // for more information about preprocessors
88+ preprocess: vitePreprocess(),
99+ compilerOptions: {
1010+ runes: true,
1111+ },
1212+1313+ kit: {
1414+ // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
1515+ // If your environment is not supported, or you settled on a specific environment, switch out the adapter.
1616+ // See https://svelte.dev/docs/kit/adapters for more information about adapters.
1717+ adapter: adapter(),
1818+ },
1919+};
2020+2121+export default config;
+19
tsconfig.json
···11+{
22+ "extends": "./.svelte-kit/tsconfig.json",
33+ "compilerOptions": {
44+ "allowJs": true,
55+ "checkJs": true,
66+ "esModuleInterop": true,
77+ "forceConsistentCasingInFileNames": true,
88+ "resolveJsonModule": true,
99+ "skipLibCheck": true,
1010+ "sourceMap": true,
1111+ "strict": true,
1212+ "moduleResolution": "bundler"
1313+ }
1414+ // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
1515+ // except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
1616+ //
1717+ // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
1818+ // from the referenced tsconfig.json - TypeScript does not merge them in
1919+}
+6
vite.config.ts
···11+import { sveltekit } from '@sveltejs/kit/vite';
22+import { defineConfig } from 'vite';
33+44+export default defineConfig({
55+ plugins: [sveltekit()]
66+});