chore: restructure into monorepo, bump to v11.0.0
Extracts the core logic from the SvelteKit app into three independently
publishable workspace packages under packages/:
- @ewanc26/atproto — AT Protocol service layer; all functions now accept
`did` as an explicit argument rather than reading PUBLIC_ATPROTO_DID
- @ewanc26/utils — shared utility and formatting functions
- @ewanc26/ui — Svelte component library (cards, UI primitives, stores,
SEO, theme config, helpers)
src/lib is now a thin shim layer: app-specific components (Header, Footer,
ColorThemeToggle) and DID-bound service wrappers remain local; everything
else re-exports from the packages above.
Build changes:
- pnpm workspace configured for all packages
- vite.config.ts uses resolve.alias to point package names directly at
TypeScript source, so no pre-build step is needed for pnpm dev
- prebuild hook runs pnpm --filter '@ewanc26/*' build before vite build
- packages build with tsc (dropped tsup to avoid esbuild postinstall issues)
- server.fs.allow extended to cover packages/ for Vite's strict mode
Fixes along the way:
- Corrected relative import depth in packages/ui LinkCard.svelte
- Added $state() to DynamicLinks reactive variables (Svelte 5 runes)
- Added `as string` casts for optional URI fields in atproto/posts.ts
- Kept local DynamicLinks and BlueskyPostCard (use DID-bound wrappers)
Closes #5