Fixed missing Tiptap types

X-Lovable-Edit-ID: edt-773b14e3-c811-49ed-a991-540dd55a307f
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-22 17:39:21 +00:00
co-authored by renee-png
5 changed files with 14 additions and 12 deletions
BIN
View File
Binary file not shown.
+2
View File
@@ -49,7 +49,9 @@
"@tanstack/react-router": "^1.168.0",
"@tanstack/react-start": "^1.167.14",
"@tanstack/router-plugin": "^1.167.10",
"@tiptap/extension-heading": "^3.22.4",
"@tiptap/extension-image": "^3.22.3",
"@tiptap/extension-paragraph": "^3.22.4",
"@tiptap/extension-table": "^3.22.3",
"@tiptap/extension-table-cell": "^3.22.3",
"@tiptap/extension-table-header": "^3.22.3",
+6 -6
View File
@@ -100,13 +100,13 @@ const PaddedParagraph = Paragraph.extend({
...this.parent?.(),
indent: {
default: 0,
parseHTML: (el) => {
parseHTML: (el: HTMLElement) => {
const pl = (el as HTMLElement).style.paddingLeft;
if (!pl) return 0;
const n = parseInt(pl, 10);
return isNaN(n) ? 0 : n;
},
renderHTML: (attrs) => {
renderHTML: (attrs: { indent?: number }) => {
const i = Number(attrs.indent ?? 0);
if (!i) return {};
return { style: `padding-left: ${i}px` };
@@ -114,8 +114,8 @@ const PaddedParagraph = Paragraph.extend({
},
caption: {
default: false,
parseHTML: (el) => (el as HTMLElement).getAttribute("data-caption") === "true",
renderHTML: (attrs) =>
parseHTML: (el: HTMLElement) => (el as HTMLElement).getAttribute("data-caption") === "true",
renderHTML: (attrs: { caption?: boolean }) =>
attrs.caption
? {
"data-caption": "true",
@@ -135,13 +135,13 @@ const PaddedHeading = Heading.extend({
...this.parent?.(),
indent: {
default: 0,
parseHTML: (el) => {
parseHTML: (el: HTMLElement) => {
const pl = (el as HTMLElement).style.paddingLeft;
if (!pl) return 0;
const n = parseInt(pl, 10);
return isNaN(n) ? 0 : n;
},
renderHTML: (attrs) => {
renderHTML: (attrs: { indent?: number }) => {
const i = Number(attrs.indent ?? 0);
if (!i) return {};
return { style: `padding-left: ${i}px` };
+2 -2
View File
@@ -49,7 +49,7 @@ function PleadingsIndex() {
description="Create Florida pleadings and reuse saved pleadings as templates."
actions={
<Button asChild>
<Link to="/documents/pleading/new">
<Link to="/documents/pleading/new" search={{}}>
<Gavel className="h-4 w-4 mr-2" /> New Pleading
</Link>
</Button>
@@ -57,7 +57,7 @@ function PleadingsIndex() {
/>
<div className="grid md:grid-cols-2 gap-4 mb-8">
<Link to="/documents/pleading/new">
<Link to="/documents/pleading/new" search={{}}>
<Card className="hover:border-primary/40 transition-colors cursor-pointer h-full">
<CardContent className="p-5 flex items-start gap-3">
<div className="h-10 w-10 rounded-md bg-primary/10 text-primary flex items-center justify-center"><Gavel className="h-5 w-5" /></div>
+4 -4
View File
@@ -187,7 +187,7 @@ function Dashboard() {
<CardContent className="space-y-1">
{recentPayments.length === 0 && <p className="text-sm text-muted-foreground">No payment requests yet.</p>}
{recentPayments.map((p) => (
<Link key={p.id} to="/pay/$id" params={{ id: p.id }}
<Link key={p.id} to="/pay/$id" params={{ id: p.id }} search={{}}
className="flex items-center justify-between py-2.5 px-2 rounded-md hover:bg-muted/60 -mx-2">
<div className="min-w-0">
<div className="text-sm font-medium truncate">{p.recipient_name}</div>
@@ -230,15 +230,15 @@ function Dashboard() {
</CardHeader>
<CardContent>
<div className="grid grid-cols-3 gap-3">
<Link to="/tasks" className="rounded-lg p-4 bg-amber-500/10 hover:opacity-80 transition-opacity">
<Link to="/tasks" search={{}} className="rounded-lg p-4 bg-amber-500/10 hover:opacity-80 transition-opacity">
<div className="text-xs text-muted-foreground">Due today</div>
<div className="font-serif text-2xl">{myTasks.dueToday}</div>
</Link>
<Link to="/tasks" className="rounded-lg p-4 bg-destructive/10 hover:opacity-80 transition-opacity">
<Link to="/tasks" search={{}} className="rounded-lg p-4 bg-destructive/10 hover:opacity-80 transition-opacity">
<div className="text-xs text-muted-foreground">Overdue</div>
<div className="font-serif text-2xl">{myTasks.overdue}</div>
</Link>
<Link to="/tasks" className="rounded-lg p-4 bg-muted/40 hover:opacity-80 transition-opacity">
<Link to="/tasks" search={{}} className="rounded-lg p-4 bg-muted/40 hover:opacity-80 transition-opacity">
<div className="text-xs text-muted-foreground">Incomplete</div>
<div className="font-serif text-2xl">{myTasks.incomplete}</div>
</Link>