import { packageContext } from 'kody:runtime' import { form, route } from 'remix/routes' // Hosted apps live under a mount (/packages/). Prefixing the contract // keeps every href(), redirect, and form action inside it. export const routes = route(packageContext?.appBasePath ?? '', { home: '/', galleries: '/galleries', gallery: '/galleries/:slug', photo: '/galleries/:slug/:photoId', about: '/about', contact: form('contact'), // `.` is a route delimiter, so the file name is captured as width + ext. media: '/media/:photoId/:width.:ext', sitemap: '/sitemap.xml', robots: '/robots.txt', preview: '/preview', previewExit: '/preview/exit', health: '/health', })