From dbd5200d9643be15f6d9b522cbd1bcf3b51bda11 Mon Sep 17 00:00:00 2001 From: andersonsouza Date: Fri, 13 Mar 2026 17:27:13 -0300 Subject: [PATCH] feat: add TableKit extension for enhanced table support and update dependencies to version 3.20.1 --- package-lock.json | 46 ++++++++++++++++++++---------------- package.json | 1 + src/lib/tiptap-extensions.ts | 3 +++ 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index 26f367b..76173db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "@tiptap/core": "^3.18.0", "@tiptap/extension-image": "^3.18.0", "@tiptap/extension-link": "^3.18.0", + "@tiptap/extension-table": "^3.18.0", "@tiptap/html": "^3.18.0", "@tiptap/starter-kit": "^3.18.0", "@types/jsdom": "^27.0.0", @@ -157,7 +158,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=18" }, @@ -196,7 +196,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=18" } @@ -322,17 +321,16 @@ "license": "MIT" }, "node_modules/@tiptap/core": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-3.18.0.tgz", - "integrity": "sha512-Gczd4GbK1DNgy/QUPElMVozoa0GW9mW8E31VIi7Q4a9PHHz8PcrxPmuWwtJ2q0PF8MWpOSLuBXoQTWaXZRPRnQ==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-3.20.1.tgz", + "integrity": "sha512-SwkPEWIfaDEZjC8SEIi4kZjqIYUbRgLUHUuQezo5GbphUNC8kM1pi3C3EtoOPtxXrEbY6e4pWEzW54Pcrd+rVA==", "license": "MIT", - "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/pm": "^3.18.0" + "@tiptap/pm": "^3.20.1" } }, "node_modules/@tiptap/extension-blockquote": { @@ -528,7 +526,6 @@ "resolved": "https://registry.npmjs.org/@tiptap/extension-list/-/extension-list-3.18.0.tgz", "integrity": "sha512-9lQBo45HNqIFcLEHAk+CY3W51eMMxIJjWbthm2CwEWr4PB3+922YELlvq8JcLH1nVFkBVpmBFmQe/GxgnCkzwQ==", "license": "MIT", - "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -603,6 +600,20 @@ "@tiptap/core": "^3.18.0" } }, + "node_modules/@tiptap/extension-table": { + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table/-/extension-table-3.20.1.tgz", + "integrity": "sha512-y2o1De3P/FH80nst1D9pYSwtRvxF87WkNAYGurqCkZ6SjwFq1Ifeh9eY+o79R6SCwcfpvQRytCYd+Yw9o5XAtA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^3.20.1", + "@tiptap/pm": "^3.20.1" + } + }, "node_modules/@tiptap/extension-text": { "version": "3.18.0", "resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-3.18.0.tgz", @@ -634,7 +645,6 @@ "resolved": "https://registry.npmjs.org/@tiptap/extensions/-/extensions-3.18.0.tgz", "integrity": "sha512-uSRIE9HGshBN6NRFR3LX2lZqBLvX92SgU5A9AvUbJD4MqU63E+HdruJnRjsVlX3kPrmbIDowxrzXlUcg3K0USQ==", "license": "MIT", - "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -660,11 +670,10 @@ } }, "node_modules/@tiptap/pm": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-3.18.0.tgz", - "integrity": "sha512-8RoI5gW0xBVCsuxahpK8vx7onAw6k2/uR3hbGBBnH+HocDMaAZKot3nTyY546ij8ospIC1mnQ7k4BhVUZesZDQ==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-3.20.1.tgz", + "integrity": "sha512-6kCiGLvpES4AxcEuOhb7HR7/xIeJWMjZlb6J7e8zpiIh5BoQc7NoRdctsnmFEjZvC19bIasccshHQ7H2zchWqw==", "license": "MIT", - "peer": true, "dependencies": { "prosemirror-changeset": "^2.3.0", "prosemirror-collab": "^1.3.1", @@ -789,13 +798,15 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/@types/whatwg-mimetype/-/whatwg-mimetype-3.0.2.tgz", "integrity": "sha512-c2AKvDT8ToxLIOUlN51gTiHXflsfIFisS4pO7pDPoKouJCESkhZnEy623gwP9laCy5lnLDAw1vAzu2vM2YLOrA==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@types/ws": { "version": "8.18.1", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", "license": "MIT", + "peer": true, "dependencies": { "@types/node": "*" } @@ -1268,7 +1279,6 @@ "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", "license": "MIT", - "peer": true, "dependencies": { "accepts": "^2.0.0", "body-parser": "^2.2.1", @@ -2152,7 +2162,6 @@ "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.25.4.tgz", "integrity": "sha512-PIM7E43PBxKce8OQeezAs9j4TP+5yDpZVbuurd1h5phUxEKIu+G2a+EUZzIC5nS1mJktDJWzbqS23n1tsAf5QA==", "license": "MIT", - "peer": true, "dependencies": { "orderedmap": "^2.0.0" } @@ -2182,7 +2191,6 @@ "resolved": "https://registry.npmjs.org/prosemirror-state/-/prosemirror-state-1.4.4.tgz", "integrity": "sha512-6jiYHH2CIGbCfnxdHbXZ12gySFY/fz/ulZE333G6bPqIZ4F+TXo9ifiR86nAHpWnfoNjOb3o5ESi7J8Uz1jXHw==", "license": "MIT", - "peer": true, "dependencies": { "prosemirror-model": "^1.0.0", "prosemirror-transform": "^1.0.0", @@ -2231,7 +2239,6 @@ "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.41.5.tgz", "integrity": "sha512-UDQbIPnDrjE8tqUBbPmCOZgtd75htE6W3r0JCmY9bL6W1iemDM37MZEKC49d+tdQ0v/CKx4gjxLoLsfkD2NiZA==", "license": "MIT", - "peer": true, "dependencies": { "prosemirror-model": "^1.20.0", "prosemirror-state": "^1.0.0", @@ -2672,6 +2679,7 @@ "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", "license": "MIT", + "peer": true, "engines": { "node": ">=12" } @@ -2797,7 +2805,6 @@ "resolved": "https://registry.npmjs.org/yjs/-/yjs-13.6.29.tgz", "integrity": "sha512-kHqDPdltoXH+X4w1lVmMtddE3Oeqq48nM40FD5ojTd8xYhQpzIDcfE2keMSU5bAgRPJBe225WTUdyUgj1DtbiQ==", "license": "MIT", - "peer": true, "dependencies": { "lib0": "^0.2.99" }, @@ -2815,7 +2822,6 @@ "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/package.json b/package.json index 5b972a0..fbf75c5 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "@tiptap/core": "^3.18.0", "@tiptap/extension-image": "^3.18.0", "@tiptap/extension-link": "^3.18.0", + "@tiptap/extension-table": "^3.18.0", "@tiptap/html": "^3.18.0", "@tiptap/starter-kit": "^3.18.0", "@types/jsdom": "^27.0.0", diff --git a/src/lib/tiptap-extensions.ts b/src/lib/tiptap-extensions.ts index a8929fc..9f0914f 100644 --- a/src/lib/tiptap-extensions.ts +++ b/src/lib/tiptap-extensions.ts @@ -1,9 +1,11 @@ import StarterKit from "@tiptap/starter-kit"; import Image from "@tiptap/extension-image"; import Link from "@tiptap/extension-link"; +import { TableKit } from "@tiptap/extension-table"; // Define extensions compatible with standard Markdown features // We use the default Tiptap extensions to handle basic content +// TableKit is required for generateJSON to parse HTML tables from marked (GFM tables) export const tiptapExtensions = [ StarterKit.configure({ // Explicitly enable features that might be disabled in some contexts @@ -16,4 +18,5 @@ export const tiptapExtensions = [ Link.configure({ openOnClick: false, }), + TableKit, ]; -- 2.49.1