Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/dep-updates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'leroa': patch
---

Update dependencies to latest versions and patch security vulnerabilities.
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
"@eslint/js": "10.0.1",
"@fontsource-variable/geist": "5.3.0",
"@internationalized/date": "3.12.4",
"@lucide/svelte": "1.72.0",
"@sveltejs/adapter-node": "6.0.2",
"@sveltejs/kit": "3.2.0",
"@lucide/svelte": "1.77.0",
"@sveltejs/adapter-node": "6.0.5",
"@sveltejs/kit": "3.4.0",
"@sveltejs/vite-plugin-svelte": "7.3.1",
"@tailwindcss/vite": "4.3.5",
"@tanstack/table-core": "8.21.3",
"@tanstack/table-core": "^8.21.3",
"@types/node": "26.6.6",
"@types/nodemailer": "8.0.2",
"auth": "1.7.23",
"auth": "1.7.27",
"bits-ui": "2.21.0",
"cn": "0.5.2",
"drizzle-kit": "0.31.11",
Expand All @@ -46,49 +46,49 @@
"eslint-plugin-svelte": "3.24.1",
"formsnap": "2.1.0",
"globals": "17.14.0",
"layerchart": "2.10.1",
"layerchart": "2.11.0",
"mode-watcher": "1.1.0",
"paneforge": "1.0.2",
"prettier": "3.10.1",
"prettier-plugin-svelte": "4.1.1",
"prettier-plugin-svelte": "4.2.0",
"prettier-plugin-tailwindcss": "0.8.1",
"shadcn-svelte": "1.8.1",
"svelte": "5.57.3",
"svelte": "5.59.1",
"svelte-check": "4.7.8",
"svelte-sonner": "1.2.3",
"sveltekit-superforms": "3.1.0",
"tailwind-variants": "4.0.2",
"tailwindcss": "4.3.5",
"tw-animate-css": "1.4.0",
"typescript": "6.0.3",
"typescript-eslint": "8.72.2",
"typescript": "^6.0.3",
"typescript-eslint": "8.73.0",
"vaul-svelte": "1.0.0-next.7",
"vite": "8.3.8",
"vitest": "5.1.0"
"vitest": "5.1.1"
},
"imports": {
"#lib": "./src/lib/index.js",
"#lib/*": "./src/lib/*"
},
"dependencies": {
"@better-auth/api-key": "^1.7.23",
"@better-auth/passkey": "^1.7.23",
"@better-auth/sso": "^1.7.23",
"@better-auth/api-key": "^1.7.27",
"@better-auth/passkey": "^1.7.27",
"@better-auth/sso": "^1.7.27",
"@leroa/integration-sdk": "workspace:*",
"@shadcn-svelte/primitives": "^0.0.1",
"@sveltejs/adapter-vercel": "^7.0.3",
"better-auth": "^1.7.23",
"@sveltejs/adapter-vercel": "^7.0.5",
"better-auth": "^1.7.27",
"country-flag-icons": "^1.6.20",
"drizzle-orm": "^0.45.4",
"nodemailer": "^10.5.0",
"nodemailer": "^10.6.1",
"pdf-lib": "1.17.1",
"postgres": "^4.1.1",
"runed": "^0.38.0",
"shiki": "^4.6.0",
"stripe": "~23.1.0",
"stripe": "~23.2.0",
"svelte-tel-input": "^4.3.4",
"svelte-toolbelt": "^0.13.0",
"unpdf": "^2.1.0",
"unpdf": "^2.2.1",
"valibot": "^1.5.0"
},
"engines": {
Expand Down
1,050 changes: 537 additions & 513 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/lib/components/app/ai-summary.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@

<Card.Root>
<Card.Header>
<Card.Title class="flex items-center gap-1.5 text-sm"
><Sparkles class="size-4 text-muted-foreground" /> AI summary</Card.Title
>
<Card.Title class="flex items-center gap-1.5 text-sm">
<Sparkles class="size-4 text-muted-foreground" /> AI summary
</Card.Title>
{#if ran}
<Card.Action>
<Button size="icon" variant="ghost" disabled={loading} onclick={run} aria-label="Refresh">
Expand Down
11 changes: 6 additions & 5 deletions src/lib/components/app/announcement-dialog.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@
<form onsubmit={submit} class="space-y-5">
<Modal.Header>
<Modal.Title>New announcement</Modal.Title>
<Modal.Description
>Shown in the resident portal for residents on an active lease. Use it for building
notices like water shut-offs, pest control or events.</Modal.Description
>
<Modal.Description>
Shown in the resident portal for residents on an active lease. Use it for building notices
like water shut-offs, pest control or events.
</Modal.Description>
</Modal.Header>
<Field.Field>
<Field.Label>Send to</Field.Label>
Expand Down Expand Up @@ -109,8 +109,9 @@
<Button
type="submit"
disabled={pending || !subject.trim() || !body.trim() || audience?.residents === 0}
>{pending ? 'Sending…' : 'Send announcement'}</Button
>
{pending ? 'Sending…' : 'Send announcement'}
</Button>
</Modal.Footer>
</form>
</Modal.Content>
Expand Down
12 changes: 6 additions & 6 deletions src/lib/components/app/api-permissions-editor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
<div class="flex flex-wrap items-center justify-between gap-2">
<span class="text-sm font-medium">Permissions</span>
<div class="flex gap-1">
<Button type="button" size="sm" variant="ghost" onclick={() => (value = everything('read'))}
>Read-only</Button
>
<Button type="button" size="sm" variant="ghost" onclick={() => (value = everything('write'))}
>Full access</Button
>
<Button type="button" size="sm" variant="ghost" onclick={() => (value = everything('read'))}>
Read-only
</Button>
<Button type="button" size="sm" variant="ghost" onclick={() => (value = everything('write'))}>
Full access
</Button>
<Button type="button" size="sm" variant="ghost" onclick={() => (value = {})}>Clear</Button>
</div>
</div>
Expand Down
28 changes: 15 additions & 13 deletions src/lib/components/app/app-sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,22 @@
tooltipContent={`${item.label} G ${item.key.toUpperCase()}`}
>
{#snippet child({ props })}
<a href={item.href} data-tour={item.href} {...props}
><item.icon /><span>{item.label}</span></a
>
<a href={item.href} data-tour={item.href} {...props}>
<item.icon /><span>{item.label}</span>
</a>
{/snippet}
</Sidebar.MenuButton>
{#if item.href === '/messages' && unread.current}
<Sidebar.MenuBadge
class="bg-primary text-primary-foreground peer-hover/menu-button:text-primary-foreground peer-data-[active=true]/menu-button:text-primary-foreground"
aria-label="{unread.current} unread">{unread.current}</Sidebar.MenuBadge
aria-label="{unread.current} unread"
>
{unread.current}
</Sidebar.MenuBadge>
{:else if item.href === '/leasing' && leasing.current}
<Sidebar.MenuBadge aria-label="{leasing.current} leads need attention"
>{leasing.current}</Sidebar.MenuBadge
>
<Sidebar.MenuBadge aria-label="{leasing.current} leads need attention">
{leasing.current}
</Sidebar.MenuBadge>
{/if}
</Sidebar.MenuItem>
{/each}
Expand All @@ -130,19 +132,19 @@
<Sidebar.MenuItem>
<Sidebar.MenuButton tooltipContent="Tenant portal">
{#snippet child({ props })}
<a href="/portal" target="_blank" {...props}
><ExternalLink /><span>Tenant portal</span></a
>
<a href="/portal" target="_blank" {...props}>
<ExternalLink /><span>Tenant portal</span>
</a>
{/snippet}
</Sidebar.MenuButton>
</Sidebar.MenuItem>
{#each secondaryNav as item (item.href)}
<Sidebar.MenuItem>
<Sidebar.MenuButton isActive={isActive(item.href)} tooltipContent={item.label}>
{#snippet child({ props })}
<a href={item.href} data-tour={item.href} {...props}
><item.icon /><span>{item.label}</span></a
>
<a href={item.href} data-tour={item.href} {...props}>
<item.icon /><span>{item.label}</span>
</a>
{/snippet}
</Sidebar.MenuButton>
</Sidebar.MenuItem>
Expand Down
97 changes: 51 additions & 46 deletions src/lib/components/app/assets-view.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -194,29 +194,31 @@
<button
type="button"
class="font-medium hover:underline"
onclick={() => (selectedId = a.id)}>{a.name}</button
onclick={() => (selectedId = a.id)}
>
{a.name}
</button>
<p class="text-xs text-muted-foreground sm:hidden">
{a.propertyName}{a.unitName ? ` · ${a.unitName}` : ''}
</p>
<span class="mt-1 inline-block"><StatusBadge status={a.kind} /></span>
</Table.Cell>
<Table.Cell class="hidden sm:table-cell"
>{a.propertyName}{a.unitName ? ` · ${a.unitName}` : ''}</Table.Cell
>
<Table.Cell class="hidden md:table-cell"
>{[a.make, a.model].filter(Boolean).join(' ') || '—'}</Table.Cell
>
<Table.Cell class="hidden whitespace-nowrap sm:table-cell"
><span class={warranty(a).tone}>{warranty(a).label}</span></Table.Cell
>
<Table.Cell class="hidden lg:table-cell"
>{a.jobCount}{a.openTickets ? ` (${a.openTickets} open)` : ''}</Table.Cell
>
<Table.Cell class="hidden sm:table-cell">
{a.propertyName}{a.unitName ? ` · ${a.unitName}` : ''}
</Table.Cell>
<Table.Cell class="hidden md:table-cell">
{[a.make, a.model].filter(Boolean).join(' ') || '—'}
</Table.Cell>
<Table.Cell class="hidden whitespace-nowrap sm:table-cell">
<span class={warranty(a).tone}>{warranty(a).label}</span>
</Table.Cell>
<Table.Cell class="hidden lg:table-cell">
{a.jobCount}{a.openTickets ? ` (${a.openTickets} open)` : ''}
</Table.Cell>
<Table.Cell>
<Button variant="ghost" size="icon" title="Edit" onclick={() => (editing = a)}
><Pencil /></Button
>
<Button variant="ghost" size="icon" title="Edit" onclick={() => (editing = a)}>
<Pencil />
</Button>
</Table.Cell>
</Table.Row>
{/each}
Expand All @@ -229,9 +231,9 @@
<Sheet.Content class="w-full gap-0 sm:max-w-md">
{#if detail}
<Sheet.Header>
<Sheet.Description
>{detail.property?.name}{detail.unit ? ` · ${detail.unit.name}` : ''}</Sheet.Description
>
<Sheet.Description>
{detail.property?.name}{detail.unit ? ` · ${detail.unit.name}` : ''}
</Sheet.Description>
<Sheet.Title class="text-lg">{detail.name}</Sheet.Title>
</Sheet.Header>
<div class="space-y-4 overflow-y-auto px-4 pb-4">
Expand Down Expand Up @@ -263,18 +265,19 @@
</dl>
{#if detail.notes}<p class="text-sm whitespace-pre-wrap">{detail.notes}</p>{/if}
<div class="flex flex-wrap gap-2">
<Button size="sm" variant="outline" onclick={() => (addingWork = true)}
><Wrench /> New work order</Button
>
<Button size="sm" variant="outline" onclick={() => (addingWork = true)}>
<Wrench /> New work order
</Button>
<Button
size="sm"
variant="outline"
onclick={() => (editing = assets.find((x) => x.id === detail!.id) ?? null)}
><Pencil /> Edit</Button
>
<Button size="sm" variant="ghost" onclick={() => archive(detail)}
>{detail.archivedAt ? 'Restore' : 'Archive'}</Button
>
<Pencil /> Edit
</Button>
<Button size="sm" variant="ghost" onclick={() => archive(detail)}>
{detail.archivedAt ? 'Restore' : 'Archive'}
</Button>
</div>
<section aria-label="Service history">
<h3 class="mb-2 text-sm font-medium">Service history</h3>
Expand All @@ -290,9 +293,9 @@
>
<StatusBadge status={h.status} />
<span class="min-w-0 flex-1 truncate">#{h.number} {h.title}</span>
{#if h.costAmount != null}<span class="text-xs tabular-nums"
>{formatMoney(h.costAmount)}</span
>{/if}
{#if h.costAmount != null}<span class="text-xs tabular-nums">
{formatMoney(h.costAmount)}
</span>{/if}
<span class="text-xs text-muted-foreground">{formatRelative(h.createdAt)}</span>
</a>
</li>
Expand Down Expand Up @@ -326,10 +329,11 @@
<Field.Label>Kind</Field.Label>
<Select.Root type="single" bind:value={fKind}>
<Select.Trigger class="w-full">{KIND_LABEL[fKind]}</Select.Trigger>
<Select.Content class="max-h-72"
>{#each assetKinds as k (k)}<Select.Item value={k}>{KIND_LABEL[k]}</Select.Item
>{/each}</Select.Content
>
<Select.Content class="max-h-72">
{#each assetKinds as k (k)}<Select.Item value={k}>
{KIND_LABEL[k]}
</Select.Item>{/each}
</Select.Content>
</Select.Root>
</Field.Field>
</div>
Expand All @@ -342,21 +346,22 @@
onValueChange={() => (fUnit = '')}
disabled={!!editing}
>
<Select.Trigger class="w-full"
>{selName(properties, fProperty) ?? 'Select'}</Select.Trigger
>
<Select.Content class="max-h-72"
>{#each properties as p (p.id)}<Select.Item value={p.id}>{p.name}</Select.Item
>{/each}</Select.Content
>
<Select.Trigger class="w-full">
{selName(properties, fProperty) ?? 'Select'}
</Select.Trigger>
<Select.Content class="max-h-72">
{#each properties as p (p.id)}<Select.Item value={p.id}>
{p.name}
</Select.Item>{/each}
</Select.Content>
</Select.Root>
</Field.Field>
<Field.Field>
<Field.Label>Unit</Field.Label>
<Select.Root type="single" bind:value={fUnit} disabled={!fProperty}>
<Select.Trigger class="w-full"
>{selName(propUnits, fUnit) ?? 'Common area'}</Select.Trigger
>
<Select.Trigger class="w-full">
{selName(propUnits, fUnit) ?? 'Common area'}
</Select.Trigger>
<Select.Content class="max-h-72">
<Select.Item value="">Common area</Select.Item>
{#each propUnits as u (u.id)}<Select.Item value={u.id}>{u.name}</Select.Item>{/each}
Expand Down Expand Up @@ -405,9 +410,9 @@
</Field.Group>
<Modal.Footer>
<Button type="button" variant="ghost" onclick={() => setDialog(false)}>Cancel</Button>
<Button type="submit" disabled={pending || !fName.trim() || !fProperty}
>{pending ? 'Saving…' : editing ? 'Save' : 'Add asset'}</Button
>
<Button type="submit" disabled={pending || !fName.trim() || !fProperty}>
{pending ? 'Saving…' : editing ? 'Save' : 'Add asset'}
</Button>
</Modal.Footer>
</form>
</Modal.Content>
Expand Down
Loading
Loading