The minimalistic document archiving platform.
feat(documents): add document date (#943)
Corentin Thomasseta7b18cec6b0c
diff --git a/.changeset/khaki-crews-arrive.md b/.changeset/khaki-crews-arrive.mdnew file mode 100644index 00000000..90bf3c34--- /dev/null+++ b/.changeset/khaki-crews-arrive.md@@ -0,0 +1,5 @@+---+"@papra/app": patch+---++Add the document date property.diff --git a/apps/papra-client/package.json b/apps/papra-client/package.jsonindex 992ce22c..348e9028 100644--- a/apps/papra-client/package.json+++ b/apps/papra-client/package.json@@ -29,6 +29,7 @@"dependencies": {"@branchlet/core": "^1.0.0","@corentinth/chisels": "catalog:",+ "@corvu/calendar": "^0.1.2","@corvu/otp-field": "^0.1.4","@kobalte/core": "^0.13.10","@kobalte/utils": "^0.9.1",diff --git a/apps/papra-client/src/locales/de.dictionary.ts b/apps/papra-client/src/locales/de.dictionary.tsindex 3d6bb77e..9b81987d 100644--- a/apps/papra-client/src/locales/de.dictionary.ts+++ b/apps/papra-client/src/locales/de.dictionary.ts@@ -354,6 +354,9 @@ export const translations: Partial<TranslationsDictionary> = {'documents.info.created-at': 'Erstellt am','documents.info.updated-at': 'Aktualisiert am','documents.info.never': 'Nie',+ 'documents.info.document-date': 'Datum',+ 'documents.info.no-date': 'Kein Datum',+ 'documents.info.today': 'Heute','documents.rename.title': 'Dokument umbenennen','documents.rename.form.name.label': 'Name',diff --git a/apps/papra-client/src/locales/el.dictionary.ts b/apps/papra-client/src/locales/el.dictionary.tsindex d6100647..b3cdf376 100644--- a/apps/papra-client/src/locales/el.dictionary.ts+++ b/apps/papra-client/src/locales/el.dictionary.ts@@ -354,6 +354,9 @@ export const translations: Partial<TranslationsDictionary> = {'documents.info.created-at': 'Ημερομηνία δημιουργίας','documents.info.updated-at': 'Ημερομηνία ενημέρωσης','documents.info.never': 'Ποτέ',+ 'documents.info.document-date': 'Ημερομηνία',+ 'documents.info.no-date': 'Χωρίς ημερομηνία',+ 'documents.info.today': 'Σήμερα','documents.rename.title': 'Μετονομασία εγγράφου','documents.rename.form.name.label': 'Όνομα',diff --git a/apps/papra-client/src/locales/en.dictionary.ts b/apps/papra-client/src/locales/en.dictionary.tsindex a628302b..c89b6e1f 100644--- a/apps/papra-client/src/locales/en.dictionary.ts+++ b/apps/papra-client/src/locales/en.dictionary.ts@@ -352,6 +352,9 @@ export const translations = {'documents.info.created-at': 'Created','documents.info.updated-at': 'Updated','documents.info.never': 'Never',+ 'documents.info.document-date': 'Date',+ 'documents.info.no-date': 'No date',+ 'documents.info.today': 'Today','documents.rename.title': 'Rename document','documents.rename.form.name.label': 'Name',diff --git a/apps/papra-client/src/locales/es.dictionary.ts b/apps/papra-client/src/locales/es.dictionary.tsindex d964989b..3a7b78b6 100644--- a/apps/papra-client/src/locales/es.dictionary.ts+++ b/apps/papra-client/src/locales/es.dictionary.ts@@ -354,6 +354,9 @@ export const translations: Partial<TranslationsDictionary> = {'documents.info.created-at': 'Creado el','documents.info.updated-at': 'Actualizado el','documents.info.never': 'Nunca',+ 'documents.info.document-date': 'Fecha',+ 'documents.info.no-date': 'Sin fecha',+ 'documents.info.today': 'Hoy','documents.rename.title': 'Renombrar documento','documents.rename.form.name.label': 'Nombre',diff --git a/apps/papra-client/src/locales/fr.dictionary.ts b/apps/papra-client/src/locales/fr.dictionary.tsindex 237e52b7..4960d12e 100644--- a/apps/papra-client/src/locales/fr.dictionary.ts+++ b/apps/papra-client/src/locales/fr.dictionary.ts@@ -354,6 +354,9 @@ export const translations: Partial<TranslationsDictionary> = {'documents.info.created-at': 'Créé le','documents.info.updated-at': 'Mis à jour le','documents.info.never': 'Jamais',+ 'documents.info.document-date': 'Date',+ 'documents.info.no-date': 'Pas de date',+ 'documents.info.today': 'Aujourd\'hui','documents.rename.title': 'Renommer le document','documents.rename.form.name.label': 'Nom',diff --git a/apps/papra-client/src/locales/it.dictionary.ts b/apps/papra-client/src/locales/it.dictionary.tsindex 4a5a2586..faff3c61 100644--- a/apps/papra-client/src/locales/it.dictionary.ts+++ b/apps/papra-client/src/locales/it.dictionary.ts@@ -354,6 +354,9 @@ export const translations: Partial<TranslationsDictionary> = {'documents.info.created-at': 'Creato il','documents.info.updated-at': 'Aggiornato il','documents.info.never': 'Mai',+ 'documents.info.document-date': 'Data',+ 'documents.info.no-date': 'Nessuna data',+ 'documents.info.today': 'Oggi','documents.rename.title': 'Rinomina documento','documents.rename.form.name.label': 'Nome',diff --git a/apps/papra-client/src/locales/nl.dictionary.ts b/apps/papra-client/src/locales/nl.dictionary.tsindex ca28eb4c..23b35117 100644--- a/apps/papra-client/src/locales/nl.dictionary.ts+++ b/apps/papra-client/src/locales/nl.dictionary.ts@@ -354,6 +354,9 @@ export const translations: Partial<TranslationsDictionary> = {'documents.info.created-at': 'Aangemaakt op','documents.info.updated-at': 'Bijgewerkt op','documents.info.never': 'Nooit',+ 'documents.info.document-date': 'Datum',+ 'documents.info.no-date': 'Geen datum',+ 'documents.info.today': 'Vandaag','documents.rename.title': 'Document hernoemen','documents.rename.form.name.label': 'Naam',diff --git a/apps/papra-client/src/locales/pl.dictionary.ts b/apps/papra-client/src/locales/pl.dictionary.tsindex b5271e68..34d4a3f2 100644--- a/apps/papra-client/src/locales/pl.dictionary.ts+++ b/apps/papra-client/src/locales/pl.dictionary.ts@@ -354,6 +354,9 @@ export const translations: Partial<TranslationsDictionary> = {'documents.info.created-at': 'Utworzono','documents.info.updated-at': 'Zaktualizowano','documents.info.never': 'Nigdy',+ 'documents.info.document-date': 'Data',+ 'documents.info.no-date': 'Brak daty',+ 'documents.info.today': 'Dzisiaj','documents.rename.title': 'Zmień nazwę dokumentu','documents.rename.form.name.label': 'Nazwa',diff --git a/apps/papra-client/src/locales/pt-BR.dictionary.ts b/apps/papra-client/src/locales/pt-BR.dictionary.tsindex 54e8e9a0..4c47fdaf 100644--- a/apps/papra-client/src/locales/pt-BR.dictionary.ts+++ b/apps/papra-client/src/locales/pt-BR.dictionary.ts@@ -354,6 +354,9 @@ export const translations: Partial<TranslationsDictionary> = {'documents.info.created-at': 'Criado em','documents.info.updated-at': 'Atualizado em','documents.info.never': 'Nunca',+ 'documents.info.document-date': 'Data',+ 'documents.info.no-date': 'Sem data',+ 'documents.info.today': 'Hoje','documents.rename.title': 'Renomear documento','documents.rename.form.name.label': 'Nome',diff --git a/apps/papra-client/src/locales/pt.dictionary.ts b/apps/papra-client/src/locales/pt.dictionary.tsindex 89c80b3b..1e85ace7 100644--- a/apps/papra-client/src/locales/pt.dictionary.ts+++ b/apps/papra-client/src/locales/pt.dictionary.ts@@ -354,6 +354,9 @@ export const translations: Partial<TranslationsDictionary> = {'documents.info.created-at': 'Criado em','documents.info.updated-at': 'Atualizado em','documents.info.never': 'Nunca',+ 'documents.info.document-date': 'Data',+ 'documents.info.no-date': 'Sem data',+ 'documents.info.today': 'Hoje','documents.rename.title': 'Renomear documento','documents.rename.form.name.label': 'Nome',diff --git a/apps/papra-client/src/locales/ro.dictionary.ts b/apps/papra-client/src/locales/ro.dictionary.tsindex 4f486daf..1f7529d5 100644--- a/apps/papra-client/src/locales/ro.dictionary.ts+++ b/apps/papra-client/src/locales/ro.dictionary.ts@@ -354,6 +354,9 @@ export const translations: Partial<TranslationsDictionary> = {'documents.info.created-at': 'Creat la','documents.info.updated-at': 'Actualizat la','documents.info.never': 'Niciodată',+ 'documents.info.document-date': 'Data',+ 'documents.info.no-date': 'Fără dată',+ 'documents.info.today': 'Astăzi','documents.rename.title': 'Redenumește documentul','documents.rename.form.name.label': 'Nume',diff --git a/apps/papra-client/src/locales/ru.dictionary.ts b/apps/papra-client/src/locales/ru.dictionary.tsindex 0860c5c3..ace7e0df 100644--- a/apps/papra-client/src/locales/ru.dictionary.ts+++ b/apps/papra-client/src/locales/ru.dictionary.ts@@ -354,6 +354,9 @@ export const translations: Partial<TranslationsDictionary> = {'documents.info.created-at': 'Создан','documents.info.updated-at': 'Обновлён','documents.info.never': 'Никогда',+ 'documents.info.document-date': 'Дата',+ 'documents.info.no-date': 'Нет даты',+ 'documents.info.today': 'Сегодня','documents.rename.title': 'Переименовывание документа','documents.rename.form.name.label': 'Имя',diff --git a/apps/papra-client/src/locales/zh.dictionary.ts b/apps/papra-client/src/locales/zh.dictionary.tsindex 15e45889..9e4a6431 100644--- a/apps/papra-client/src/locales/zh.dictionary.ts+++ b/apps/papra-client/src/locales/zh.dictionary.ts@@ -354,6 +354,9 @@ export const translations: Partial<TranslationsDictionary> = {'documents.info.created-at': '创建时间','documents.info.updated-at': '更新时间','documents.info.never': '从不',+ 'documents.info.document-date': '日期',+ 'documents.info.no-date': '无日期',+ 'documents.info.today': '今天','documents.rename.title': '重命名文档','documents.rename.form.name.label': '名称',diff --git a/apps/papra-client/src/modules/demo/demo-api-mock.ts b/apps/papra-client/src/modules/demo/demo-api-mock.tsindex c1baa437..f4900a9c 100644--- a/apps/papra-client/src/modules/demo/demo-api-mock.ts+++ b/apps/papra-client/src/modules/demo/demo-api-mock.ts@@ -749,16 +749,17 @@ const inMemoryApiMock: Record<string, { handler: any }> = {assert(document, { status: 404 });- const { name, content } = body as { name?: string; content?: string };+ const { name, content, documentDate } = body as { name?: string; content?: string; documentDate?: string };const newDocument = {...document,...(name !== undefined && { name }),...(content !== undefined && { content }),+ ...(documentDate !== undefined && { documentDate: documentDate === null ? null : new Date(documentDate) }),updatedAt: new Date(),};- await documentStorage.setItem(`${organizationId}:${documentId}`, newDocument);+ await documentStorage.setItem(`${organizationId}:${documentId}`, newDocument as Document); // TODO: introduce a storage/serialized typereturn { document: newDocument };},diff --git a/apps/papra-client/src/modules/documents/components/document-date-picker.component.tsx b/apps/papra-client/src/modules/documents/components/document-date-picker.component.tsxnew file mode 100644index 00000000..711dab88--- /dev/null+++ b/apps/papra-client/src/modules/documents/components/document-date-picker.component.tsx@@ -0,0 +1,170 @@+import type { Document } from '../documents.types';+import Calendar from '@corvu/calendar';+import { useMutation } from '@tanstack/solid-query';+import { Show } from 'solid-js';+import { useI18n } from '@/modules/i18n/i18n.provider';+import { useI18nApiErrors } from '@/modules/shared/http/composables/i18n-api-errors';+import { Button } from '@/modules/ui/components/button';+import { CalendarGrid, CalendarNav } from '@/modules/ui/components/calendar';+import { Popover, PopoverContent, PopoverTrigger } from '@/modules/ui/components/popover';+import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/modules/ui/components/select';+import { createToast } from '@/modules/ui/components/sonner';+import { invalidateOrganizationDocumentsQuery } from '../documents.composables';+import { updateDocument } from '../documents.services';++const YEAR_RANGE_OFFSET = 50;++function getMonthOptions() {+ return Array.from({ length: 12 }, (_, i) => String(i));+}++function getYearOptions() {+ const currentYear = new Date().getFullYear();+ return Array.from({ length: YEAR_RANGE_OFFSET * 2 + 1 }, (_, i) => String(currentYear - YEAR_RANGE_OFFSET + i));+}++function formatMonthLabel(monthIndex: string) {+ return new Date(2024, Number(monthIndex), 1).toLocaleDateString(undefined, { month: 'long' });+}++function CalendarMonthYearHeader() {+ const context = Calendar.useContext<'single'>();++ const monthOptions = getMonthOptions();+ const yearOptions = getYearOptions();++ return (+ <div class="flex items-center justify-between">+ <CalendarNav action="prev-month">+ <div class="i-tabler-chevron-left size-4" />+ </CalendarNav>++ <div class="flex items-center">+ <Select+ value={String(context.month().getMonth())}+ onChange={value => value != null && context.setMonth(new Date(context.month().getFullYear(), Number(value), 1))}+ options={monthOptions}+ itemComponent={itemProps => (+ <SelectItem item={itemProps.item}>+ {formatMonthLabel(itemProps.item.rawValue)}+ </SelectItem>+ )}+ >+ <SelectTrigger class="border-none hover:bg-accent shadow-none text-sm font-medium gap-0" caretIcon={null}>+ <SelectValue<string>>{state => formatMonthLabel(state.selectedOption())}</SelectValue>+ </SelectTrigger>+ <SelectContent />+ </Select>++ <Select+ value={String(context.month().getFullYear())}+ onChange={value => value != null && context.setMonth(new Date(Number(value), context.month().getMonth(), 1))}+ options={yearOptions}+ itemComponent={itemProps => (+ <SelectItem item={itemProps.item}>+ {itemProps.item.rawValue}+ </SelectItem>+ )}+ >+ <SelectTrigger class="border-none hover:bg-accent shadow-none text-sm font-medium gap-0" caretIcon={null}>+ <SelectValue<string>>{state => state.selectedOption()}</SelectValue>+ </SelectTrigger>+ <SelectContent />+ </Select>+ </div>++ <CalendarNav action="next-month">+ <div class="i-tabler-chevron-right size-4" />+ </CalendarNav>+ </div>+ );+}++export function DocumentDatePicker(props: { document: Document; organizationId: string }) {+ const { t, formatDate } = useI18n();+ const { getErrorMessage } = useI18nApiErrors();++ const updateDateMutation = useMutation(() => ({+ mutationFn: (date: Date | null) => updateDocument({+ documentId: props.document.id,+ organizationId: props.organizationId,+ documentDate: date,+ }),+ onSuccess: async () => {+ await invalidateOrganizationDocumentsQuery({ organizationId: props.organizationId });+ },+ onError: (error) => {+ createToast({+ message: getErrorMessage({ error }),+ type: 'error',+ });+ },+ }));++ const handleDateChange = (date: Date | null) => {+ if (updateDateMutation.isPending) {+ return;+ }++ updateDateMutation.mutate(date);+ };++ return (+ <Popover>+ <PopoverTrigger+ as={Button}+ variant="ghost"+ class="flex items-center gap-2 group bg-transparent! p-0 h-auto text-left"+ disabled={updateDateMutation.isPending}+ >+ <Show+ when={props.document.documentDate}+ fallback={<span class="text-muted-foreground">{t('documents.info.no-date')}</span>}+ >+ {date => formatDate(date(), { dateStyle: 'medium' })}+ </Show>+ <div class="i-tabler-pencil size-4 text-muted-foreground group-hover:text-foreground transition-colors flex-shrink-0" />+ </PopoverTrigger>+ <PopoverContent class="w-auto p-3">+ <Calendar+ mode="single"+ value={props.document.documentDate ?? null}+ onValueChange={handleDateChange}+ fixedWeeks+ >+ {() => (+ <div class="flex">+ <div class="flex flex-col gap-2">+ <CalendarMonthYearHeader />+ <CalendarGrid />+ </div>++ <div class="flex flex-col gap-1 min-w-32 ml-2 border-l pl-2">+ <Button+ variant="ghost"+ size="sm"+ class="justify-start text-sm"+ onClick={() => handleDateChange(new Date())}+ disabled={updateDateMutation.isPending}+ >+ <div class="i-tabler-calendar-event size-4 mr-2 text-muted-foreground" />+ {t('documents.info.today')}+ </Button>+ <Button+ variant="ghost"+ size="sm"+ class="justify-start text-sm"+ onClick={() => handleDateChange(null)}+ disabled={updateDateMutation.isPending}+ >+ <div class="i-tabler-calendar-off size-4 mr-2 text-muted-foreground" />+ {t('documents.info.no-date')}+ </Button>+ </div>+ </div>+ )}+ </Calendar>+ </PopoverContent>+ </Popover>+ );+}diff --git a/apps/papra-client/src/modules/documents/documents.services.ts b/apps/papra-client/src/modules/documents/documents.services.tsindex 95b62f7f..1685160e 100644--- a/apps/papra-client/src/modules/documents/documents.services.ts+++ b/apps/papra-client/src/modules/documents/documents.services.ts@@ -177,16 +177,18 @@ export async function updateDocument({organizationId,content,name,+ documentDate,}: {documentId: string;organizationId: string;content?: string;name?: string;+ documentDate?: Date | null;}) {const { document } = await apiClient<{ document: AsDto<Document> }>({method: 'PATCH',path: `/api/organizations/${organizationId}/documents/${documentId}`,- body: { content, name },+ body: { content, name, documentDate },});return {diff --git a/apps/papra-client/src/modules/documents/documents.types.ts b/apps/papra-client/src/modules/documents/documents.types.tsindex 14a7e84d..06866b79 100644--- a/apps/papra-client/src/modules/documents/documents.types.ts+++ b/apps/papra-client/src/modules/documents/documents.types.ts@@ -10,6 +10,7 @@ export type Document = {originalSize: number;createdAt: Date;updatedAt?: Date;+ documentDate?: Date;isDeleted?: boolean;deletedAt?: Date;deletedBy?: string;diff --git a/apps/papra-client/src/modules/documents/pages/document.page.tsx b/apps/papra-client/src/modules/documents/pages/document.page.tsxindex 1f9d1b0e..4bdb0e1b 100644--- a/apps/papra-client/src/modules/documents/pages/document.page.tsx+++ b/apps/papra-client/src/modules/documents/pages/document.page.tsx@@ -17,6 +17,7 @@ import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from '@/moduleimport { Separator } from '@/modules/ui/components/separator';import { Tabs, TabsContent, TabsIndicator, TabsList, TabsTrigger } from '@/modules/ui/components/tabs';import { DocumentContentEditionPanel } from '../components/document-content-edition-panel.component';+import { DocumentDatePicker } from '../components/document-date-picker.component';import { DocumentPreview } from '../components/document-preview.component';import { DocumentOpenWithDropdownItems } from '../components/open-with.component';import { useRenameDocumentDialog } from '../components/rename-document-button.component';@@ -325,6 +326,11 @@ export const DocumentPage: Component = () => {value: formatBytes({ bytes: getDocument().originalSize, base: 1000 }),icon: 'i-tabler-weight',},+ {+ label: t('documents.info.document-date'),+ value: <DocumentDatePicker document={getDocument()} organizationId={params.organizationId} />,+ icon: 'i-tabler-calendar-event',+ },{label: t('documents.info.created-at'),value: formatRelativeTime(getDocument().createdAt),diff --git a/apps/papra-client/src/modules/shared/http/http-client.models.ts b/apps/papra-client/src/modules/shared/http/http-client.models.tsindex 09c8313b..fbfe22b0 100644--- a/apps/papra-client/src/modules/shared/http/http-client.models.ts+++ b/apps/papra-client/src/modules/shared/http/http-client.models.ts@@ -4,7 +4,7 @@ export function getFormData(pojo: Record<string, string | Blob>): FormData {return formData;}-type DateKeys = 'createdAt' | 'updatedAt' | 'deletedAt';+type DateKeys = 'createdAt' | 'updatedAt' | 'deletedAt' | 'documentDate';type CoerceDate<T> = T extends string | Date? Date@@ -28,5 +28,6 @@ export function coerceDates<T extends Record<string, any>>(obj: T): CoerceDates<...('lastTriggeredAt' in obj ? { lastTriggeredAt: toDate(obj.lastTriggeredAt) } : {}),...('lastUsedAt' in obj ? { lastUsedAt: toDate(obj.lastUsedAt) } : {}),...('scheduledPurgeAt' in obj ? { scheduledPurgeAt: toDate(obj.scheduledPurgeAt) } : {}),+ ...('documentDate' in obj ? { documentDate: toDate(obj.documentDate) } : {}),};}diff --git a/apps/papra-client/src/modules/ui/components/calendar.tsx b/apps/papra-client/src/modules/ui/components/calendar.tsxnew file mode 100644index 00000000..d68b6a35--- /dev/null+++ b/apps/papra-client/src/modules/ui/components/calendar.tsx@@ -0,0 +1,89 @@+import type { Component, ComponentProps } from 'solid-js';+import Calendar from '@corvu/calendar';+import { For } from 'solid-js';+import { cn } from '@/modules/shared/style/cn';++export { Calendar };++export const CalendarNav: Component<ComponentProps<typeof Calendar.Nav>> = (props) => {+ return (+ <Calendar.Nav+ {...props}+ class={cn(+ 'inline-flex items-center justify-center rounded-md size-7 hover:bg-accent hover:text-accent-foreground transition-colors',+ props.class,+ )}+ />+ );+};++export const CalendarHeadCell: Component<ComponentProps<typeof Calendar.HeadCell>> = (props) => {+ return (+ <Calendar.HeadCell+ {...props}+ class={cn(+ 'text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]',+ props.class,+ )}+ />+ );+};++export const CalendarCellTrigger: Component<ComponentProps<typeof Calendar.CellTrigger>> = (props) => {+ return (+ <Calendar.CellTrigger+ {...props}+ class={cn(+ 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm size-8 p-0 font-normal',+ 'hover:bg-accent hover:text-accent-foreground transition-colors',+ 'focus-visible:(outline-none ring-1.5 ring-ring)',+ 'data-[selected]:(bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground)',+ 'data-[today]:not([data-selected]):(bg-accent text-accent-foreground)',+ 'data-[disabled]:(text-muted-foreground opacity-50)',+ '[&:not([data-corvu-calendar-celltrigger])]:(text-muted-foreground opacity-50)',+ props.class,+ )}+ />+ );+};++export function CalendarGrid(props: {+ class?: string;+ formatDay?: (day: Date) => string;+ formatWeekday?: (day: Date) => string;+}) {+ const context = Calendar.useContext();++ return (+ <Calendar.Table class={cn('w-full border-collapse space-y-1', props.class)}>+ <thead>+ <tr class="flex">+ <For each={context.weekdays()}>+ {weekday => (+ <CalendarHeadCell>+ {props.formatWeekday?.(weekday) ?? weekday.toLocaleDateString(undefined, { weekday: 'short' }).slice(0, 2)}+ </CalendarHeadCell>+ )}+ </For>+ </tr>+ </thead>+ <tbody>+ <For each={context.weeks()}>+ {week => (+ <tr class="flex w-full mt-1">+ <For each={week}>+ {day => (+ <Calendar.Cell>+ <CalendarCellTrigger day={day}>+ {props.formatDay?.(day) ?? day.getDate()}+ </CalendarCellTrigger>+ </Calendar.Cell>+ )}+ </For>+ </tr>+ )}+ </For>+ </tbody>+ </Calendar.Table>+ );+}diff --git a/apps/papra-client/src/modules/ui/components/select.tsx b/apps/papra-client/src/modules/ui/components/select.tsxindex b22d2c7e..f59033a8 100644--- a/apps/papra-client/src/modules/ui/components/select.tsx+++ b/apps/papra-client/src/modules/ui/components/select.tsx@@ -77,7 +77,7 @@ export function SelectContent<T extends ValidComponent = 'div'>(props: Polymorph)}{...rest}>- <SelectPrimitive.Listbox class="p-1 focus-visible:outline-none" />+ <SelectPrimitive.Listbox class="p-1 focus-visible:outline-none max-h-60 overflow-y-auto" /></SelectPrimitive.Content></SelectPrimitive.Portal>);diff --git a/apps/papra-server/src/migrations/list/0017-documents-date.migration.ts b/apps/papra-server/src/migrations/list/0017-documents-date.migration.tsnew file mode 100644index 00000000..e24aea20--- /dev/null+++ b/apps/papra-server/src/migrations/list/0017-documents-date.migration.ts@@ -0,0 +1,23 @@+import type { Migration } from '../migrations.types';+import { sql } from 'drizzle-orm';++export const documentsDateMigration = {+ name: 'documents-date',++ up: async ({ db }) => {+ const tableInfo = await db.run(sql`PRAGMA table_info(documents)`);+ const existingColumns = tableInfo.rows.map(row => row.name);+ const hasColumn = (columnName: string) => existingColumns.includes(columnName);++ if (!hasColumn('document_date')) {+ await db.run(sql`ALTER TABLE documents ADD COLUMN document_date INTEGER`);+ }++ await db.run(sql`CREATE INDEX IF NOT EXISTS documents_organization_id_document_date_index ON documents(organization_id, document_date)`);+ },++ down: async ({ db }) => {+ await db.run(sql`DROP INDEX IF EXISTS documents_organization_id_document_date_index`);+ await db.run(sql`ALTER TABLE documents DROP COLUMN document_date`);+ },+} satisfies Migration;diff --git a/apps/papra-server/src/migrations/migrations.registry.test.ts b/apps/papra-server/src/migrations/migrations.registry.test.tsindex fbcd80ba..797296a8 100644--- a/apps/papra-server/src/migrations/migrations.registry.test.ts+++ b/apps/papra-server/src/migrations/migrations.registry.test.ts@@ -73,6 +73,7 @@ describe('migrations registry', () => {CREATE INDEX "auth_sessions_token_index" ON "auth_sessions" ("token");CREATE INDEX "auth_verifications_identifier_index" ON "auth_verifications" ("identifier");CREATE INDEX documents_file_encryption_kek_version_index ON documents (file_encryption_kek_version);+ CREATE INDEX documents_organization_id_document_date_index ON documents(organization_id, document_date);CREATE INDEX "documents_organization_id_is_deleted_created_at_index" ON "documents" ("organization_id","is_deleted","created_at");CREATE INDEX "documents_organization_id_is_deleted_index" ON "documents" ("organization_id","is_deleted");CREATE UNIQUE INDEX "documents_organization_id_original_sha256_hash_unique" ON "documents" ("organization_id","original_sha256_hash");@@ -99,7 +100,7 @@ describe('migrations registry', () => {CREATE TABLE "auth_two_factor" ( "id" text PRIMARY KEY NOT NULL, "created_at" integer NOT NULL, "updated_at" integer NOT NULL, "user_id" text, "secret" text, "backup_codes" text, FOREIGN KEY ("user_id") REFERENCES "users"("id") ON UPDATE cascade ON DELETE cascade );CREATE TABLE "auth_verifications" ( "id" text PRIMARY KEY NOT NULL, "created_at" integer NOT NULL, "updated_at" integer NOT NULL, "identifier" text NOT NULL, "value" text NOT NULL, "expires_at" integer NOT NULL );CREATE TABLE "document_activity_log" ( "id" text PRIMARY KEY NOT NULL, "created_at" integer NOT NULL, "document_id" text NOT NULL, "event" text NOT NULL, "event_data" text, "user_id" text, "tag_id" text, FOREIGN KEY ("document_id") REFERENCES "documents"("id") ON UPDATE cascade ON DELETE cascade, FOREIGN KEY ("user_id") REFERENCES "users"("id") ON UPDATE cascade ON DELETE set null, FOREIGN KEY ("tag_id") REFERENCES "tags"("id") ON UPDATE cascade ON DELETE set null );- CREATE TABLE "documents" ( "id" text PRIMARY KEY NOT NULL, "created_at" integer NOT NULL, "updated_at" integer NOT NULL, "is_deleted" integer DEFAULT false NOT NULL, "deleted_at" integer, "organization_id" text NOT NULL, "created_by" text, "deleted_by" text, "original_name" text NOT NULL, "original_size" integer DEFAULT 0 NOT NULL, "original_storage_key" text NOT NULL, "original_sha256_hash" text NOT NULL, "name" text NOT NULL, "mime_type" text NOT NULL, "content" text DEFAULT '' NOT NULL, file_encryption_key_wrapped TEXT, file_encryption_kek_version TEXT, file_encryption_algorithm TEXT, FOREIGN KEY ("organization_id") REFERENCES "organizations"("id") ON UPDATE cascade ON DELETE cascade, FOREIGN KEY ("created_by") REFERENCES "users"("id") ON UPDATE cascade ON DELETE set null, FOREIGN KEY ("deleted_by") REFERENCES "users"("id") ON UPDATE cascade ON DELETE set null );+ CREATE TABLE "documents" ( "id" text PRIMARY KEY NOT NULL, "created_at" integer NOT NULL, "updated_at" integer NOT NULL, "is_deleted" integer DEFAULT false NOT NULL, "deleted_at" integer, "organization_id" text NOT NULL, "created_by" text, "deleted_by" text, "original_name" text NOT NULL, "original_size" integer DEFAULT 0 NOT NULL, "original_storage_key" text NOT NULL, "original_sha256_hash" text NOT NULL, "name" text NOT NULL, "mime_type" text NOT NULL, "content" text DEFAULT '' NOT NULL, file_encryption_key_wrapped TEXT, file_encryption_kek_version TEXT, file_encryption_algorithm TEXT, document_date INTEGER, FOREIGN KEY ("organization_id") REFERENCES "organizations"("id") ON UPDATE cascade ON DELETE cascade, FOREIGN KEY ("created_by") REFERENCES "users"("id") ON UPDATE cascade ON DELETE set null, FOREIGN KEY ("deleted_by") REFERENCES "users"("id") ON UPDATE cascade ON DELETE set null );CREATE VIRTUAL TABLE documents_fts USING fts5( document_id, organization_id, name, content, prefix='2 3 4' );CREATE TABLE 'documents_fts_config'(k PRIMARY KEY, v) WITHOUT ROWID;CREATE TABLE 'documents_fts_content'(id INTEGER PRIMARY KEY, c0, c1, c2, c3);diff --git a/apps/papra-server/src/migrations/migrations.registry.ts b/apps/papra-server/src/migrations/migrations.registry.tsindex 42c5d49b..700c5209 100644--- a/apps/papra-server/src/migrations/migrations.registry.ts+++ b/apps/papra-server/src/migrations/migrations.registry.ts@@ -16,6 +16,7 @@ import { dropFts5TriggersMigration } from './list/0013-drop-fts-5-triggers.migraimport { twoFactorAuthenticationMigration } from './list/0014-two-factor-authentication.migration';import { indexDocumentsFtsIdsMigration } from './list/0015-index-documents-fts-ids.migration';import { caseInsensitiveTagNameUniqConstraintMigration } from './list/0016-case-insensitive-tag-name-uniq-constraint.migration';+import { documentsDateMigration } from './list/0017-documents-date.migration';export const migrations: Migration[] = [initialSchemaSetupMigration,@@ -34,4 +35,5 @@ export const migrations: Migration[] = [twoFactorAuthenticationMigration,indexDocumentsFtsIdsMigration,caseInsensitiveTagNameUniqConstraintMigration,+ documentsDateMigration,];diff --git a/apps/papra-server/src/modules/documents/document-search/events/sync-document-search.handlers.test.ts b/apps/papra-server/src/modules/documents/document-search/events/sync-document-search.handlers.test.tsindex be0ebbaa..ed451e6d 100644--- a/apps/papra-server/src/modules/documents/document-search/events/sync-document-search.handlers.test.ts+++ b/apps/papra-server/src/modules/documents/document-search/events/sync-document-search.handlers.test.ts@@ -56,8 +56,9 @@ describe('sync-document-search event handlers', () => {originalStorageKey: 'storage-key',originalSha256Hash: 'hash1',isDeleted: false,- createdAt: new Date(),- updatedAt: new Date(),+ createdAt: new Date('2026-01-01'),+ updatedAt: new Date('2026-01-02'),+ documentDate: new Date('2025-12-24'),createdBy: 'user-1',originalSize: 1024,deletedAt: null,@@ -99,8 +100,9 @@ describe('sync-document-search event handlers', () => {originalStorageKey: 'storage-key',originalSha256Hash: 'hash1',isDeleted: false,- createdAt: new Date(),- updatedAt: new Date(),+ createdAt: new Date('2026-01-01'),+ updatedAt: new Date('2026-01-02'),+ documentDate: new Date('2025-12-24'),createdBy: 'user-1',originalSize: 1024,deletedAt: null,@@ -233,8 +235,9 @@ describe('sync-document-search event handlers', () => {originalStorageKey: 'storage-key',originalSha256Hash: 'hash1',isDeleted: false,- createdAt: new Date(),- updatedAt: new Date(),+ createdAt: new Date('2026-01-01'),+ updatedAt: new Date('2026-01-02'),+ documentDate: new Date('2025-12-24'),createdBy: 'user-1',originalSize: 1024,deletedAt: null,diff --git a/apps/papra-server/src/modules/documents/documents.models.test.ts b/apps/papra-server/src/modules/documents/documents.models.test.tsindex 20dab2ee..b6d475c8 100644--- a/apps/papra-server/src/modules/documents/documents.models.test.ts+++ b/apps/papra-server/src/modules/documents/documents.models.test.ts@@ -79,6 +79,7 @@ describe('documents models', () => {isDeleted: false,createdAt: new Date('2025-01-01'),updatedAt: new Date('2025-01-01'),+ documentDate: new Date('2025-12-24'),},})).to.eql({content: 'Hello, world!',@@ -95,6 +96,7 @@ describe('documents models', () => {originalSha256Hash: '1234567890',originalSize: 100,updatedAt: new Date('2025-01-01'),+ documentDate: new Date('2025-12-24'),});});});diff --git a/apps/papra-server/src/modules/documents/documents.repository.ts b/apps/papra-server/src/modules/documents/documents.repository.tsindex 1f531b19..365ab5b1 100644--- a/apps/papra-server/src/modules/documents/documents.repository.ts+++ b/apps/papra-server/src/modules/documents/documents.repository.ts@@ -316,10 +316,10 @@ function getAllOrganizationUndeletedDocumentsIterator({ organizationId, batchSizreturn createIterator({ query, batchSize });}-async function updateDocument({ documentId, organizationId, name, content, db }: { documentId: string; organizationId: string; name?: string; content?: string; db: Database }) {+async function updateDocument({ documentId, organizationId, name, content, documentDate, db }: { documentId: string; organizationId: string; name?: string; content?: string; documentDate?: Date | null; db: Database }) {const [document] = await db.update(documentsTable)- .set(omitUndefined({ name, content }))+ .set(omitUndefined({ name, content, documentDate })).where(and(eq(documentsTable.id, documentId),diff --git a/apps/papra-server/src/modules/documents/documents.routes.ts b/apps/papra-server/src/modules/documents/documents.routes.tsindex 891a3723..d94a89ce 100644--- a/apps/papra-server/src/modules/documents/documents.routes.ts+++ b/apps/papra-server/src/modules/documents/documents.routes.ts@@ -394,8 +394,9 @@ function setupUpdateDocumentRoute({ app, db, eventServices }: RouteDefinitionConvalidateJsonBody(z.object({name: z.string().min(1).max(255).optional(),content: z.string().optional(),- }).refine(data => data.name !== undefined || data.content !== undefined, {- message: 'At least one of \'name\' or \'content\' must be provided',+ documentDate: z.coerce.date().nullable().optional(),+ }).refine(data => data.name !== undefined || data.content !== undefined || data.documentDate !== undefined, {+ message: 'At least one of \'name\', \'content\', or \'documentDate\' must be provided',})),async (context) => {const { userId } = getUser({ context });diff --git a/apps/papra-server/src/modules/documents/documents.table.ts b/apps/papra-server/src/modules/documents/documents.table.tsindex e59beb68..f5de8e1e 100644--- a/apps/papra-server/src/modules/documents/documents.table.ts+++ b/apps/papra-server/src/modules/documents/documents.table.ts@@ -19,6 +19,7 @@ export const documentsTable = sqliteTable('documents', {name: text('name').notNull(),mimeType: text('mime_type').notNull(),content: text('content').notNull().default(''),+ documentDate: integer('document_date', { mode: 'timestamp_ms' }),fileEncryptionKeyWrapped: text('file_encryption_key_wrapped'), // The wrapped encryption keyfileEncryptionKekVersion: text('file_encryption_kek_version'), // The key encryption key version used to encrypt the file encryption keydiff --git a/apps/papra-server/src/modules/documents/documents.usecases.test.ts b/apps/papra-server/src/modules/documents/documents.usecases.test.tsindex eb5746e1..e80cb99d 100644--- a/apps/papra-server/src/modules/documents/documents.usecases.test.ts+++ b/apps/papra-server/src/modules/documents/documents.usecases.test.ts@@ -932,6 +932,7 @@ describe('documents usecases', () => {isDeleted: false,mimeType: 'text/plain',name: 'new-name.txt',+ documentDate: null,organizationId: 'organization-1',originalName: 'file-1.txt',originalSha256Hash: 'hash',diff --git a/apps/papra-server/src/modules/documents/documents.usecases.ts b/apps/papra-server/src/modules/documents/documents.usecases.tsindex d48de24d..48806d0a 100644--- a/apps/papra-server/src/modules/documents/documents.usecases.ts+++ b/apps/papra-server/src/modules/documents/documents.usecases.ts@@ -605,6 +605,7 @@ export async function updateDocument({changes: {name?: string;content?: string;+ documentDate?: Date | null;};}) {// It throws if the document does not existdiff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex dea038bf..955ead2f 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -313,6 +313,9 @@ importers:'@corentinth/chisels':specifier: 'catalog:'version: 2.1.0+ '@corvu/calendar':+ specifier: ^0.1.2+ version: 0.1.2([email protected])'@corvu/otp-field':specifier: ^0.1.4version: 0.1.4([email protected])@@ -2005,6 +2008,11 @@ packages:'@corentinth/[email protected]':resolution: {integrity: sha512-NtOr6rEjsSp9bKUNkB0eAH04cFoXpiN9PmPLI0xEGq32g/qXlqp9vWHzr2Cc+Op8rHDjStuJxdWlD9iXTW7onA==}+ '@corvu/[email protected]':+ resolution: {integrity: sha512-Vbdns1iNNI0WTIwDZS7m9pHWtr/YTz7yrisXhHUCfl4mxDvb9W8MMmun651wiEjhL7+OrcNbbl2kTOmYSFIf4g==}+ peerDependencies:+ solid-js: ^1.8+'@corvu/[email protected]':resolution: {integrity: sha512-3eG7OoUt6CfVqGujIYfqImdrhGR/s4DpKr5ZQT10zzw3nawIlcwVpqoHTam0v4cgv+NXXvl6I8DoA3J+WgW2YA==}peerDependencies:@@ -2922,7 +2930,7 @@ packages:'@expo/[email protected]':resolution: {integrity: sha512-+Lla7nYSiHZirgK+U/uYzsLv/X+HaJienbD5AKX1UQZHYfWaP+9uuQluRB4GrEVWF0GZ7vEVp/jzaOT9k/SQlg==}- engines: {node: '>=0.10.0'}+ engines: {'0': node >=0.10.0}'@expo/[email protected]':resolution: {integrity: sha512-hY/OdRaJMs5WsVPuVSZ+RLH3VObJmL/pv5CGCHEZHN2PxZjSZSdctyKV8UcFBXTF0yIKNAJ9XLs1dlNYXHh4Cw==}@@ -3250,155 +3258,183 @@ packages:resolution: {integrity: sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==}cpu: [arm64]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==}cpu: [arm64]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==}cpu: [arm]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==}cpu: [arm]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==}cpu: [ppc64]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==}cpu: [riscv64]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==}cpu: [s390x]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==}cpu: [s390x]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==}cpu: [x64]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==}cpu: [x64]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==}cpu: [arm64]os: [linux]+ libc: [musl]'@img/[email protected]':resolution: {integrity: sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==}cpu: [arm64]os: [linux]+ libc: [musl]'@img/[email protected]':resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==}cpu: [x64]os: [linux]+ libc: [musl]'@img/[email protected]':resolution: {integrity: sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==}cpu: [x64]os: [linux]+ libc: [musl]'@img/[email protected]':resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==}engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}cpu: [arm64]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==}engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}cpu: [arm64]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==}engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}cpu: [arm]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==}engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}cpu: [arm]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==}engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}cpu: [ppc64]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==}engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}cpu: [riscv64]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==}engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}cpu: [s390x]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==}engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}cpu: [s390x]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==}engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}cpu: [x64]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==}engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}cpu: [x64]os: [linux]+ libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==}engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}cpu: [arm64]os: [linux]+ libc: [musl]'@img/[email protected]':resolution: {integrity: sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==}engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}cpu: [arm64]os: [linux]+ libc: [musl]'@img/[email protected]':resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==}engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}cpu: [x64]os: [linux]+ libc: [musl]'@img/[email protected]':resolution: {integrity: sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==}engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}cpu: [x64]os: [linux]+ libc: [musl]'@img/[email protected]':resolution: {integrity: sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==}@@ -3642,30 +3678,35 @@ packages:engines: {node: '>= 10'}cpu: [arm64]os: [linux]+ libc: [glibc]'@napi-rs/[email protected]':resolution: {integrity: sha512-lX0z2bNmnk1PGZ+0a9OZwI2lPPvWjRYzPqvEitXX7lspyLFrOzh2kcQiLL7bhyODN23QvfriqwYqp5GreSzVvA==}engines: {node: '>= 10'}cpu: [arm64]os: [linux]+ libc: [musl]'@napi-rs/[email protected]':resolution: {integrity: sha512-QDQgMElwxAoADsSR3UYvdTTQk5XOyD9J5kq15Z8XpGwpZOZsSE0zZ/X1JaOtS2x+HEZL6z1S6MF/1uhZFZb5ig==}engines: {node: '>= 10'}cpu: [riscv64]os: [linux]+ libc: [glibc]'@napi-rs/[email protected]':resolution: {integrity: sha512-wbzLJrTalQrpyrU1YRrO6w6pdr5vcebbJa+Aut5QfTaW9eEmMb1WFG6l1V+cCa5LdHmRr8bsvl0nJDU/IYDsmw==}engines: {node: '>= 10'}cpu: [x64]os: [linux]+ libc: [glibc]'@napi-rs/[email protected]':resolution: {integrity: sha512-xbfhYrUufoTAKvsEx2ZUN4jvACabIF0h1F5Ik1Rk4e/kQq6c+Dwa5QF0bGrfLhceLpzHT0pCMGMDeQKQrcUIyA==}engines: {node: '>= 10'}cpu: [x64]os: [linux]+ libc: [musl]'@napi-rs/[email protected]':resolution: {integrity: sha512-YQmHXBufFBdWqhx+ympeTPkMfs3RNxaOgWm59vyjpsub7Us07BwCcmu1N5kildhO8Fm0syoI2kHnzGkJBLSvsg==}@@ -4279,11 +4320,13 @@ packages:resolution: {integrity: sha512-oTDZVfqIAjLB2I1yTiLyyhfPPO6dky33sTblxTCpe+ZT55WizN3KDoBKJ4yXG8shI6I4bRShVu29Xg0yAjyQYw==}cpu: [arm64]os: [linux]+ libc: [glibc]'@rolldown/[email protected]':resolution: {integrity: sha512-duJ3IkEBj9Xe9NYW1n8Y3483VXHGi8zQ0ZsLbK8464EJUXLF7CXM8Ry+jkkUw+ZvA+Zu1E/+C6p2Y6T9el0C9g==}cpu: [arm64]os: [linux]+ libc: [musl]'@rolldown/[email protected]':resolution: {integrity: sha512-qdbmU5QSZ0uoLZBYMxiHsMQmizqtzFGTVPU5oyU1n0jU0Mo+mkSzqZuL8VBnjHOHzhVxZsoAGH9JjiRzCnoGVA==}@@ -4294,11 +4337,13 @@ packages:resolution: {integrity: sha512-H7+r34TSV8udB2gAsebFM/YuEeNCkPGEAGJ1JE7SgI9XML6FflqcdKfrRSneQFsPaom/gCEc1g0WW5MZ0O3blw==}cpu: [x64]os: [linux]+ libc: [glibc]'@rolldown/[email protected]':resolution: {integrity: sha512-zRm2YmzFVqbsmUsyyZnHfJrOlQUcWS/FJ5ZWL8Q1kZh5PnLBrTVZNpakIWwAxpN5gNEi9MmFd5YHocVJp8ps1Q==}cpu: [x64]os: [linux]+ libc: [musl]'@rolldown/[email protected]':resolution: {integrity: sha512-fM1eUIuHLsNJXRlWOuIIex1oBJ89I0skFWo5r/D3KSJ5gD9MBd3g4Hp+v1JGohvyFE+7ylnwRxSUyMEeYpA69A==}@@ -4366,56 +4411,67 @@ packages:resolution: {integrity: sha512-xRiOu9Of1FZ4SxVbB0iEDXc4ddIcjCv2aj03dmW8UrZIW7aIQ9jVJdLBIhxBI+MaTnGAKyvMwPwQnoOEvP7FgQ==}cpu: [arm]os: [linux]+ libc: [glibc]'@rollup/[email protected]':resolution: {integrity: sha512-FbhM2p9TJAmEIEhIgzR4soUcsW49e9veAQCziwbR+XWB2zqJ12b4i/+hel9yLiD8pLncDH4fKIPIbt5238341Q==}cpu: [arm]os: [linux]+ libc: [musl]'@rollup/[email protected]':resolution: {integrity: sha512-4n4gVwhPHR9q/g8lKCyz0yuaD0MvDf7dV4f9tHt0C73Mp8h38UCtSCSE6R9iBlTbXlmA8CjpsZoujhszefqueg==}cpu: [arm64]os: [linux]+ libc: [glibc]'@rollup/[email protected]':resolution: {integrity: sha512-u0n17nGA0nvi/11gcZKsjkLj1QIpAuPFQbR48Subo7SmZJnGxDpspyw2kbpuoQnyK+9pwf3pAoEXerJs/8Mi9g==}cpu: [arm64]os: [linux]+ libc: [musl]'@rollup/[email protected]':resolution: {integrity: sha512-0G2c2lpYtbTuXo8KEJkDkClE/+/2AFPdPAbmaHoE870foRFs4pBrDehilMcrSScrN/fB/1HTaWO4bqw+ewBzMQ==}cpu: [loong64]os: [linux]+ libc: [glibc]'@rollup/[email protected]':resolution: {integrity: sha512-teSACug1GyZHmPDv14VNbvZFX779UqWTsd7KtTM9JIZRDI5NUwYSIS30kzI8m06gOPB//jtpqlhmraQ68b5X2g==}cpu: [ppc64]os: [linux]+ libc: [glibc]'@rollup/[email protected]':resolution: {integrity: sha512-/MOEW3aHjjs1p4Pw1Xk4+3egRevx8Ji9N6HUIA1Ifh8Q+cg9dremvFCUbOX2Zebz80BwJIgCBUemjqhU5XI5Eg==}cpu: [riscv64]os: [linux]+ libc: [glibc]'@rollup/[email protected]':resolution: {integrity: sha512-1HHmsRyh845QDpEWzOFtMCph5Ts+9+yllCrREuBR/vg2RogAQGGBRC8lDPrPOMnrdOJ+mt1WLMOC2Kao/UwcvA==}cpu: [riscv64]os: [linux]+ libc: [musl]'@rollup/[email protected]':resolution: {integrity: sha512-seoeZp4L/6D1MUyjWkOMRU6/iLmCU2EjbMTyAG4oIOs1/I82Y5lTeaxW0KBfkUdHAWN7j25bpkt0rjnOgAcQcA==}cpu: [s390x]os: [linux]+ libc: [glibc]'@rollup/[email protected]':resolution: {integrity: sha512-Wi6AXf0k0L7E2gteNsNHUs7UMwCIhsCTs6+tqQ5GPwVRWMaflqGec4Sd8n6+FNFDw9vGcReqk2KzBDhCa1DLYg==}cpu: [x64]os: [linux]+ libc: [glibc]'@rollup/[email protected]':resolution: {integrity: sha512-dtBZYjDmCQ9hW+WgEkaffvRRCKm767wWhxsFW3Lw86VXz/uJRuD438/XvbZT//B96Vs8oTA8Q4A0AfHbrxP9zw==}cpu: [x64]os: [linux]+ libc: [musl]'@rollup/[email protected]':resolution: {integrity: sha512-1ox+GqgRWqaB1RnyZXL8PD6E5f7YyRUJYnCqKpNzxzP0TkaUh112NDrR9Tt+C8rJ4x5G9Mk8PQR3o7Ku2RKqKA==}@@ -5267,41 +5323,49 @@ packages:resolution: {integrity: sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==}cpu: [arm64]os: [linux]+ libc: [glibc]'@unrs/[email protected]':resolution: {integrity: sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==}cpu: [arm64]os: [linux]+ libc: [musl]'@unrs/[email protected]':resolution: {integrity: sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==}cpu: [ppc64]os: [linux]+ libc: [glibc]'@unrs/[email protected]':resolution: {integrity: sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==}cpu: [riscv64]os: [linux]+ libc: [glibc]'@unrs/[email protected]':resolution: {integrity: sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==}cpu: [riscv64]os: [linux]+ libc: [musl]'@unrs/[email protected]':resolution: {integrity: sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==}cpu: [s390x]os: [linux]+ libc: [glibc]'@unrs/[email protected]':resolution: {integrity: sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==}cpu: [x64]os: [linux]+ libc: [glibc]'@unrs/[email protected]':resolution: {integrity: sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==}cpu: [x64]os: [linux]+ libc: [musl]'@unrs/[email protected]':resolution: {integrity: sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==}@@ -8713,24 +8777,28 @@ packages:engines: {node: '>= 12.0.0'}cpu: [arm64]os: [linux]+ libc: [glibc]resolution: {integrity: sha512-5Vh9dGeblpTxWHpOx8iauV02popZDsCYMPIgiuw97OJ5uaDsL86cnqSFs5LZkG3ghHoX5isLgWzMs+eD1YzrnA==}engines: {node: '>= 12.0.0'}cpu: [arm64]os: [linux]+ libc: [musl]resolution: {integrity: sha512-Cfd46gdmj1vQ+lR6VRTTadNHu6ALuw2pKR9lYq4FnhvgBc4zWY1EtZcAc6EffShbb1MFrIPfLDXD6Xprbnni4w==}engines: {node: '>= 12.0.0'}cpu: [x64]os: [linux]+ libc: [glibc]resolution: {integrity: sha512-XJaLUUFXb6/QG2lGIW6aIk6jKdtjtcffUT0NKvIqhSBY3hh9Ch+1LCeH80dR9q9LBjG3ewbDjnumefsLsP6aiA==}engines: {node: '>= 12.0.0'}cpu: [x64]os: [linux]+ libc: [musl]resolution: {integrity: sha512-FZn+vaj7zLv//D/192WFFVA0RgHawIcHqLX9xuWiQt7P0PtdFEVaxgF9rjM/IRYHQXNnk61/H/gb2Ei+kUQ4xQ==}@@ -13721,6 +13789,17 @@ snapshots:nanostores: 1.0.1zod: 4.1.12+ '@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])':+ dependencies:+ '@better-auth/utils': 0.3.0+ '@better-fetch/fetch': 1.1.18+ '@standard-schema/spec': 1.0.0+ better-call: 1.1.5([email protected])+ jose: 6.1.0+ kysely: 0.28.8+ nanostores: 1.0.1+ zod: 4.1.12+'@better-auth/[email protected](@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))([email protected]([email protected]([email protected]))([email protected])([email protected])([email protected]([email protected])))([email protected])([email protected])([email protected]([email protected])([email protected]))([email protected]([email protected])([email protected](@babel/[email protected])(@react-native-community/[email protected]([email protected]))(@types/[email protected])([email protected])))':dependencies:'@better-auth/core': 1.4.6(@better-auth/[email protected])(@better-fetch/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])@@ -13734,9 +13813,9 @@ snapshots:expo-network: 8.0.8([email protected])([email protected])expo-web-browser: 15.0.9([email protected])([email protected](@babel/[email protected])(@react-native-community/[email protected]([email protected]))(@types/[email protected])([email protected]))- '@better-auth/[email protected](@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))':+ '@better-auth/[email protected](@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))':dependencies:- '@better-auth/core': 1.4.6(@better-auth/[email protected])(@better-fetch/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])+ '@better-auth/core': 1.4.6(@better-auth/[email protected])(@better-fetch/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])'@better-auth/utils': 0.3.0'@better-fetch/fetch': 1.1.18@@ -13980,6 +14059,11 @@ snapshots:'@corentinth/[email protected]': {}+ '@corvu/[email protected]([email protected])':+ dependencies:+ '@corvu/utils': 0.4.2([email protected])+ solid-js: 1.9.10+'@corvu/[email protected]([email protected])':dependencies:'@corvu/utils': 0.4.2([email protected])@@ -18447,13 +18531,13 @@ snapshots:[email protected]([email protected]([email protected]))([email protected])([email protected])([email protected]([email protected])):dependencies:- '@better-auth/core': 1.4.6(@better-auth/[email protected])(@better-fetch/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])- '@better-auth/telemetry': 1.4.6(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))+ '@better-auth/core': 1.4.6(@better-auth/[email protected])(@better-fetch/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])+ '@better-auth/telemetry': 1.4.6(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))'@better-auth/utils': 0.3.0'@better-fetch/fetch': 1.1.18'@noble/ciphers': 2.0.1'@noble/hashes': 2.0.1- better-call: 1.1.5([email protected])+ better-call: 1.1.5([email protected])defu: 6.1.4jose: 6.1.0kysely: 0.28.8@@ -19722,9 +19806,9 @@ snapshots:'@typescript-eslint/eslint-plugin': 8.54.0(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected])eslint: 9.39.2([email protected])- eslint-import-resolver-typescript: 3.10.1([email protected])([email protected]([email protected]))+ eslint-import-resolver-typescript: 3.10.1([email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected])))([email protected]([email protected]))- eslint-plugin-import: 2.32.0(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected]))+ eslint-plugin-import: 2.32.0(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected])))([email protected]([email protected])))([email protected]([email protected]))eslint-plugin-react: 7.37.5([email protected]([email protected]))eslint-plugin-react-hooks: 5.2.0([email protected]([email protected]))globals: 16.4.0@@ -19752,7 +19836,7 @@ snapshots:transitivePeerDependencies:- supports-color+ [email protected]([email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected])))([email protected]([email protected])):dependencies:'@nolyfill/is-core-module': 1.0.39debug: 4.4.3([email protected])@@ -19763,7 +19847,7 @@ snapshots:tinyglobby: 0.2.15unrs-resolver: 1.11.1optionalDependencies:- eslint-plugin-import: 2.32.0(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected]))+ eslint-plugin-import: 2.32.0(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected])))([email protected]([email protected])))([email protected]([email protected]))transitivePeerDependencies:- supports-color@@ -19777,14 +19861,14 @@ snapshots:dependencies:eslint: 9.39.2([email protected])- [email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected]([email protected])):+ [email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected])))([email protected]([email protected])))([email protected]([email protected])):dependencies:debug: 3.2.7optionalDependencies:eslint: 9.39.2([email protected])eslint-import-resolver-node: 0.3.9- eslint-import-resolver-typescript: 3.10.1([email protected])([email protected]([email protected]))+ eslint-import-resolver-typescript: 3.10.1([email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected])))([email protected]([email protected]))transitivePeerDependencies:- supports-color@@ -19832,7 +19916,7 @@ snapshots:dependencies:eslint: 9.39.2([email protected])- [email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected])):+ [email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected])))([email protected]([email protected])))([email protected]([email protected])):dependencies:'@rtsao/scc': 1.1.0array-includes: 3.1.9@@ -19843,7 +19927,7 @@ snapshots:doctrine: 2.1.0eslint: 9.39.2([email protected])eslint-import-resolver-node: 0.3.9- eslint-module-utils: 2.12.1(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected]([email protected]))+ eslint-module-utils: 2.12.1(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected])))([email protected]([email protected])))([email protected]([email protected]))hasown: 2.0.2is-core-module: 2.16.1is-glob: 4.0.3