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