From 8b915007429e432d0a1a643c3b1fbed84c1b4226 Mon Sep 17 00:00:00 2001 From: Junior BERNARD Date: Fri, 15 Dec 2023 17:58:58 +0100 Subject: [PATCH] chore: #WB-2091, add extensions - audio - hyperlink image - linker - table-cell --- package-lock.json | 185 ++++++++++++++++++- package.json | 9 +- pnpm-lock.yaml | 71 +++++++ src/controllers/transformation-controller.ts | 45 ++--- 4 files changed, 283 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4fedc4d..6123972 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,20 +7,37 @@ "": { "name": "rich-content-transformer", "version": "0.0.1", + "hasInstallScript": true, "license": "ISC", "dependencies": { + "@edifice-tiptap-extensions/extension-attachment": "1.0.0-develop-b2school.1", + "@edifice-tiptap-extensions/extension-audio": "^1.0.0-develop-b2school.1", + "@edifice-tiptap-extensions/extension-hyperlink": "^1.0.0-develop-b2school.1", "@edifice-tiptap-extensions/extension-iframe": "^1.0.0-dev.1", + "@edifice-tiptap-extensions/extension-image": "^1.0.0-develop-b2school.1", + "@edifice-tiptap-extensions/extension-linker": "^1.0.0-develop-b2school.1", + "@edifice-tiptap-extensions/extension-mathjax": "1.0.0-develop-b2school.8", + "@edifice-tiptap-extensions/extension-table-cell": "^1.0.0-develop-b2school.1", + "@edifice-tiptap-extensions/extension-typosize": "1.0.0-develop-b2school.1", "@edifice-tiptap-extensions/extension-video": "^1.0.0-dev.1", "@tiptap/core": "^2.0.3", "@tiptap/extension-color": "^2.0.3", + "@tiptap/extension-font-family": "^2.1.7", + "@tiptap/extension-heading": "^2.1.7", + "@tiptap/extension-highlight": "^2.1.7", "@tiptap/extension-image": "^2.0.3", "@tiptap/extension-link": "^2.0.3", "@tiptap/extension-list-item": "^2.0.3", + "@tiptap/extension-subscript": "^2.1.7", + "@tiptap/extension-superscript": "^2.1.7", "@tiptap/extension-table": "^2.0.3", "@tiptap/extension-table-cell": "^2.0.3", "@tiptap/extension-table-header": "^2.0.3", "@tiptap/extension-table-row": "^2.0.3", + "@tiptap/extension-text-align": "^2.1.7", "@tiptap/extension-text-style": "^2.0.3", + "@tiptap/extension-typography": "^2.1.7", + "@tiptap/extension-underline": "^2.1.7", "@tiptap/html": "^2.0.3", "@tiptap/pm": "^2.0.3", "@tiptap/starter-kit": "^2.0.3", @@ -37,6 +54,9 @@ "concurrently": "^8.0.1", "nodemon": "^2.0.22", "typescript": "^5.0.4" + }, + "engines": { + "node": "16 || 18" } }, "node_modules/@ampproject/remapping": { @@ -392,6 +412,34 @@ "node": ">=6.9.0" } }, + "node_modules/@edifice-tiptap-extensions/extension-attachment": { + "version": "1.0.0-develop-b2school.1", + "resolved": "https://registry.npmjs.org/@edifice-tiptap-extensions/extension-attachment/-/extension-attachment-1.0.0-develop-b2school.1.tgz", + "integrity": "sha512-NcJ7EpA+YAfpI2QGRJ80BHfsjz5IsAchvol2BC2GNYcPyMTiGCoAhg+GoQqMkomJAcZLR/hYrKVJ8pxfRf1Kdg==", + "peerDependencies": { + "@tiptap/core": "2.0.3", + "@tiptap/pm": "2.0.3" + } + }, + "node_modules/@edifice-tiptap-extensions/extension-audio": { + "version": "1.0.0-develop-b2school.1", + "resolved": "https://registry.npmjs.org/@edifice-tiptap-extensions/extension-audio/-/extension-audio-1.0.0-develop-b2school.1.tgz", + "integrity": "sha512-xsm1RQBlEo7igFhLpzWajopPUrHjLOF6tuU0BytESDmnTc4osA3ngXYb2/yjHJ84Ib8cSp1NVWsgj2ryyusOQw==", + "peerDependencies": { + "@tiptap/core": "2.0.3", + "@tiptap/pm": "2.0.3" + } + }, + "node_modules/@edifice-tiptap-extensions/extension-hyperlink": { + "version": "1.0.0-develop-b2school.1", + "resolved": "https://registry.npmjs.org/@edifice-tiptap-extensions/extension-hyperlink/-/extension-hyperlink-1.0.0-develop-b2school.1.tgz", + "integrity": "sha512-LbnmZLn7k07jVMrWl0Tuysv7IezUHJOfDFAe45aE6CEXtxGErFxvXfRT/g5/BIuG+SgmnjjIfoLCYI3Icj65ig==", + "peerDependencies": { + "@tiptap/core": "2.0.3", + "@tiptap/extension-link": "2.0.3", + "@tiptap/pm": "2.0.3" + } + }, "node_modules/@edifice-tiptap-extensions/extension-iframe": { "version": "1.0.0-dev.1", "resolved": "https://registry.npmjs.org/@edifice-tiptap-extensions/extension-iframe/-/extension-iframe-1.0.0-dev.1.tgz", @@ -401,6 +449,52 @@ "@tiptap/pm": "2.0.3" } }, + "node_modules/@edifice-tiptap-extensions/extension-image": { + "version": "1.0.0-develop-b2school.1", + "resolved": "https://registry.npmjs.org/@edifice-tiptap-extensions/extension-image/-/extension-image-1.0.0-develop-b2school.1.tgz", + "integrity": "sha512-UCWOoAYYyr4DXnqGetElQv33vMZde6yMawnGJs8BuJEf22BHK0APGv8WdDy9B9hdV9YHV8sSoq9TP0sXoXizXw==", + "peerDependencies": { + "@tiptap/core": "2.0.3", + "@tiptap/pm": "2.0.3" + } + }, + "node_modules/@edifice-tiptap-extensions/extension-linker": { + "version": "1.0.0-develop-b2school.1", + "resolved": "https://registry.npmjs.org/@edifice-tiptap-extensions/extension-linker/-/extension-linker-1.0.0-develop-b2school.1.tgz", + "integrity": "sha512-S3aUY/vfiLsy15b3LOb1dd8h/QmFtnKnTafOMUy8z4iEBpsvC7hEoleTxoBr2HWfBw/AHmslmnTARvJM6Yiz2Q==", + "peerDependencies": { + "@tiptap/core": "2.0.3", + "@tiptap/extension-link": "2.0.3", + "@tiptap/pm": "2.0.3" + } + }, + "node_modules/@edifice-tiptap-extensions/extension-mathjax": { + "version": "1.0.0-develop-b2school.8", + "resolved": "https://registry.npmjs.org/@edifice-tiptap-extensions/extension-mathjax/-/extension-mathjax-1.0.0-develop-b2school.8.tgz", + "integrity": "sha512-4u7PB4MClGi+pIzaxlJAqa5dZ6K2/An4JyPLectCbMS6Kec3rY3Pzx1Re4aVmbAwMbskToxG5KtQMtZmilQPRQ==", + "peerDependencies": { + "@tiptap/core": "2.0.3", + "@tiptap/pm": "2.0.3" + } + }, + "node_modules/@edifice-tiptap-extensions/extension-table-cell": { + "version": "1.0.0-develop-b2school.1", + "resolved": "https://registry.npmjs.org/@edifice-tiptap-extensions/extension-table-cell/-/extension-table-cell-1.0.0-develop-b2school.1.tgz", + "integrity": "sha512-Mi5BHYyqUeixeH28A6A7GdnXOXfGPZfz5CB2f1UtnpnFgZT367S4FuipDt1mfJrBUD7AUm6p+X1iQgWg141ntQ==", + "peerDependencies": { + "@tiptap/core": "2.0.3", + "@tiptap/pm": "2.0.3" + } + }, + "node_modules/@edifice-tiptap-extensions/extension-typosize": { + "version": "1.0.0-develop-b2school.1", + "resolved": "https://registry.npmjs.org/@edifice-tiptap-extensions/extension-typosize/-/extension-typosize-1.0.0-develop-b2school.1.tgz", + "integrity": "sha512-VoU6hFklmEJh+ru65IkKv6s6zyC0yqd8uxoddsdsU9fLyLzKu6iEwJCPF3I7Stvxv8VwXBaL8xvOEaAtnZMiVA==", + "peerDependencies": { + "@tiptap/core": "2.0.3", + "@tiptap/pm": "2.0.3" + } + }, "node_modules/@edifice-tiptap-extensions/extension-video": { "version": "1.0.0-dev.1", "resolved": "https://registry.npmjs.org/@edifice-tiptap-extensions/extension-video/-/extension-video-1.0.0-dev.1.tgz", @@ -663,6 +757,19 @@ "@tiptap/pm": "^2.0.0" } }, + "node_modules/@tiptap/extension-font-family": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/@tiptap/extension-font-family/-/extension-font-family-2.1.13.tgz", + "integrity": "sha512-7v4fqPjWLQcdpL7PNUzDHWjn2kvybMjNIhUwbC7KbrEqKqPXn31q6vj4yG/YoFX2pUwdD7mEzii+x/e2dTWL5w==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.0.0", + "@tiptap/extension-text-style": "^2.0.0" + } + }, "node_modules/@tiptap/extension-gapcursor": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@tiptap/extension-gapcursor/-/extension-gapcursor-2.0.3.tgz", @@ -689,9 +796,21 @@ } }, "node_modules/@tiptap/extension-heading": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-2.0.3.tgz", - "integrity": "sha512-f0IEv5ms6aCzL80WeZ1qLCXTkRVwbpRr1qAETjg3gG4eoJN18+lZNOJYpyZy3P92C5KwF2T3Av00eFyVLIbb8Q==", + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-2.1.13.tgz", + "integrity": "sha512-PEmc19QLmlVUTiHWoF0hpgNTNPNU0nlaFmMKskzO+cx5Df4xvHmv/UqoIwp7/UFbPMkfVJT1ozQU7oD1IWn9Hg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.0.0" + } + }, + "node_modules/@tiptap/extension-highlight": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/@tiptap/extension-highlight/-/extension-highlight-2.1.13.tgz", + "integrity": "sha512-ZivjJma5WwPYcG0rpnynVDGis32OGdtpTwETEb+2OOjZBCBlyYQ4tcRk5gS3nzBAjLl/Qu84VVbawLhHXB6few==", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" @@ -814,6 +933,30 @@ "@tiptap/core": "^2.0.0" } }, + "node_modules/@tiptap/extension-subscript": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/@tiptap/extension-subscript/-/extension-subscript-2.1.13.tgz", + "integrity": "sha512-+kqK0P669Dsl/7IPSQNM/bN35Er45MKtHn8eQmudcLpFmBTsL6DlxG/080/Lqr49a6OLcefQfLaENz+QQVfBag==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.0.0" + } + }, + "node_modules/@tiptap/extension-superscript": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/@tiptap/extension-superscript/-/extension-superscript-2.1.13.tgz", + "integrity": "sha512-wZr9Ls7YYvzbVInBqqpQkn+/YwG3b78Rg3U1TldCcbg0IprwFyPsFHvu0NZnqYEG4MHhaF3F1sZRtPdZ0hDy8g==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.0.0" + } + }, "node_modules/@tiptap/extension-table": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@tiptap/extension-table/-/extension-table-2.0.3.tgz", @@ -875,6 +1018,18 @@ "@tiptap/core": "^2.0.0" } }, + "node_modules/@tiptap/extension-text-align": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/@tiptap/extension-text-align/-/extension-text-align-2.1.13.tgz", + "integrity": "sha512-ZmbGpi5FHGsWyzt+8DceXERr/Vwxhjpm2VKWZyFTVz8uNJVj+/ou196JQJZqxbp5VtKkS7UYujaO++G5eflb0Q==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.0.0" + } + }, "node_modules/@tiptap/extension-text-style": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@tiptap/extension-text-style/-/extension-text-style-2.0.3.tgz", @@ -887,6 +1042,30 @@ "@tiptap/core": "^2.0.0" } }, + "node_modules/@tiptap/extension-typography": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/@tiptap/extension-typography/-/extension-typography-2.1.13.tgz", + "integrity": "sha512-//90Gzkci4/77CCmdWYyRGTcMUvsQ64jv3mqlL+JqWgLCffMHvWPGKhPMgSzoyHRlAIIACMhxniRtB7HixhTHQ==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.0.0" + } + }, + "node_modules/@tiptap/extension-underline": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/@tiptap/extension-underline/-/extension-underline-2.1.13.tgz", + "integrity": "sha512-z0CNKPjcvU8TrUSTui1voM7owssyXE9WvEGhIZMHzWwlx2ZXY2/L5+Hh33X/LzSKB9OGf/g1HAuHxrPcYxFuAQ==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.0.0" + } + }, "node_modules/@tiptap/html": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@tiptap/html/-/html-2.0.3.tgz", diff --git a/package.json b/package.json index 108c6a3..0ebe428 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,13 @@ "type": "module", "dependencies": { "@edifice-tiptap-extensions/extension-attachment": "1.0.0-develop-b2school.1", + "@edifice-tiptap-extensions/extension-audio": "^1.0.0-develop-b2school.1", + "@edifice-tiptap-extensions/extension-hyperlink": "^1.0.0-develop-b2school.1", "@edifice-tiptap-extensions/extension-iframe": "^1.0.0-dev.1", + "@edifice-tiptap-extensions/extension-image": "^1.0.0-develop-b2school.1", + "@edifice-tiptap-extensions/extension-linker": "^1.0.0-develop-b2school.1", "@edifice-tiptap-extensions/extension-mathjax": "1.0.0-develop-b2school.8", + "@edifice-tiptap-extensions/extension-table-cell": "^1.0.0-develop-b2school.1", "@edifice-tiptap-extensions/extension-typosize": "1.0.0-develop-b2school.1", "@edifice-tiptap-extensions/extension-video": "^1.0.0-dev.1", "@tiptap/core": "^2.0.3", @@ -35,7 +40,7 @@ "prom-client": "^14.2.0" }, "name": "rich-content-transformer", - "version": "0.0.1", + "version": "0.0.2", "description": "Uses TipTap library to transform HTML to JSON and back", "main": "index.js", "scripts": { @@ -58,4 +63,4 @@ "engines": { "node": "16 || 18" } -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a1be8c9..d6391e6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,12 +8,27 @@ dependencies: '@edifice-tiptap-extensions/extension-attachment': specifier: 1.0.0-develop-b2school.1 version: 1.0.0-develop-b2school.1(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@edifice-tiptap-extensions/extension-audio': + specifier: ^1.0.0-develop-b2school.1 + version: 1.0.0-develop-b2school.1(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@edifice-tiptap-extensions/extension-hyperlink': + specifier: ^1.0.0-develop-b2school.1 + version: 1.0.0-develop-b2school.1(@tiptap/core@2.0.3)(@tiptap/extension-link@2.0.3)(@tiptap/pm@2.0.3) '@edifice-tiptap-extensions/extension-iframe': specifier: ^1.0.0-dev.1 version: 1.0.0-dev.1(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@edifice-tiptap-extensions/extension-image': + specifier: ^1.0.0-develop-b2school.1 + version: 1.0.0-develop-b2school.1(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@edifice-tiptap-extensions/extension-linker': + specifier: ^1.0.0-develop-b2school.1 + version: 1.0.0-develop-b2school.1(@tiptap/core@2.0.3)(@tiptap/extension-link@2.0.3)(@tiptap/pm@2.0.3) '@edifice-tiptap-extensions/extension-mathjax': specifier: 1.0.0-develop-b2school.8 version: 1.0.0-develop-b2school.8(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@edifice-tiptap-extensions/extension-table-cell': + specifier: ^1.0.0-develop-b2school.1 + version: 1.0.0-develop-b2school.1(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) '@edifice-tiptap-extensions/extension-typosize': specifier: 1.0.0-develop-b2school.1 version: 1.0.0-develop-b2school.1(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) @@ -385,6 +400,28 @@ packages: '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false + /@edifice-tiptap-extensions/extension-audio@1.0.0-develop-b2school.1(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-xsm1RQBlEo7igFhLpzWajopPUrHjLOF6tuU0BytESDmnTc4osA3ngXYb2/yjHJ84Ib8cSp1NVWsgj2ryyusOQw==} + peerDependencies: + '@tiptap/core': 2.0.3 + '@tiptap/pm': 2.0.3 + dependencies: + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) + dev: false + + /@edifice-tiptap-extensions/extension-hyperlink@1.0.0-develop-b2school.1(@tiptap/core@2.0.3)(@tiptap/extension-link@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-LbnmZLn7k07jVMrWl0Tuysv7IezUHJOfDFAe45aE6CEXtxGErFxvXfRT/g5/BIuG+SgmnjjIfoLCYI3Icj65ig==} + peerDependencies: + '@tiptap/core': 2.0.3 + '@tiptap/extension-link': 2.0.3 + '@tiptap/pm': 2.0.3 + dependencies: + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/extension-link': 2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) + dev: false + /@edifice-tiptap-extensions/extension-iframe@1.0.0-dev.1(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): resolution: {integrity: sha512-nRY7zd9wtA9Roes2cprwiNKzFL5kVjvP269z0E/8uaxve3qccr2YenqjFd/AmBo+Uh7N/cZKb3kx/NLkwqNtAQ==} peerDependencies: @@ -395,6 +432,28 @@ packages: '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false + /@edifice-tiptap-extensions/extension-image@1.0.0-develop-b2school.1(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-UCWOoAYYyr4DXnqGetElQv33vMZde6yMawnGJs8BuJEf22BHK0APGv8WdDy9B9hdV9YHV8sSoq9TP0sXoXizXw==} + peerDependencies: + '@tiptap/core': 2.0.3 + '@tiptap/pm': 2.0.3 + dependencies: + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) + dev: false + + /@edifice-tiptap-extensions/extension-linker@1.0.0-develop-b2school.1(@tiptap/core@2.0.3)(@tiptap/extension-link@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-S3aUY/vfiLsy15b3LOb1dd8h/QmFtnKnTafOMUy8z4iEBpsvC7hEoleTxoBr2HWfBw/AHmslmnTARvJM6Yiz2Q==} + peerDependencies: + '@tiptap/core': 2.0.3 + '@tiptap/extension-link': 2.0.3 + '@tiptap/pm': 2.0.3 + dependencies: + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/extension-link': 2.0.3(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) + dev: false + /@edifice-tiptap-extensions/extension-mathjax@1.0.0-develop-b2school.8(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): resolution: {integrity: sha512-4u7PB4MClGi+pIzaxlJAqa5dZ6K2/An4JyPLectCbMS6Kec3rY3Pzx1Re4aVmbAwMbskToxG5KtQMtZmilQPRQ==} peerDependencies: @@ -405,6 +464,16 @@ packages: '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) dev: false + /@edifice-tiptap-extensions/extension-table-cell@1.0.0-develop-b2school.1(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): + resolution: {integrity: sha512-Mi5BHYyqUeixeH28A6A7GdnXOXfGPZfz5CB2f1UtnpnFgZT367S4FuipDt1mfJrBUD7AUm6p+X1iQgWg141ntQ==} + peerDependencies: + '@tiptap/core': 2.0.3 + '@tiptap/pm': 2.0.3 + dependencies: + '@tiptap/core': 2.0.3(@tiptap/pm@2.0.3) + '@tiptap/pm': 2.0.3(@tiptap/core@2.0.3) + dev: false + /@edifice-tiptap-extensions/extension-typosize@1.0.0-develop-b2school.1(@tiptap/core@2.0.3)(@tiptap/pm@2.0.3): resolution: {integrity: sha512-VoU6hFklmEJh+ru65IkKv6s6zyC0yqd8uxoddsdsU9fLyLzKu6iEwJCPF3I7Stvxv8VwXBaL8xvOEaAtnZMiVA==} peerDependencies: @@ -992,6 +1061,7 @@ packages: /abab@2.0.6: resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} + deprecated: Use your platform's native atob() and btoa() methods instead dev: false /abbrev@1.1.1: @@ -1369,6 +1439,7 @@ packages: /domexception@4.0.0: resolution: {integrity: sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==} engines: {node: '>=12'} + deprecated: Use your platform's native DOMException instead dependencies: webidl-conversions: 7.0.0 dev: false diff --git a/src/controllers/transformation-controller.ts b/src/controllers/transformation-controller.ts index c65b4b6..320725c 100644 --- a/src/controllers/transformation-controller.ts +++ b/src/controllers/transformation-controller.ts @@ -1,31 +1,31 @@ -import { AuthenticatedRequest, ContentTransformerRequest, ContentTransformerResponse } from '../models/transformation-request.js'; import { Response } from 'express'; import { TransformationFormat } from '../models/format.js'; +import { AuthenticatedRequest, ContentTransformerRequest, ContentTransformerResponse } from '../models/transformation-request.js'; -import { generateHTML, generateJSON } from '@tiptap/html' import { generateText } from '@tiptap/core'; +import { generateHTML, generateJSON } from '@tiptap/html'; -import StarterKit from '@tiptap/starter-kit'; -import Image from '@tiptap/extension-image' -import { Color } from '@tiptap/extension-color' +import { Attachment } from '@edifice-tiptap-extensions/extension-attachment'; +import { Audio } from "@edifice-tiptap-extensions/extension-audio"; +import { IFrame } from '@edifice-tiptap-extensions/extension-iframe'; +import { Linker } from '@edifice-tiptap-extensions/extension-linker'; +import { MathJax } from '@edifice-tiptap-extensions/extension-mathjax'; +import { TableCell } from '@edifice-tiptap-extensions/extension-table-cell'; +import { TypoSize } from "@edifice-tiptap-extensions/extension-typosize"; +import { Video } from '@edifice-tiptap-extensions/extension-video'; +import { Color } from '@tiptap/extension-color'; +import FontFamily from "@tiptap/extension-font-family"; import Highlight from "@tiptap/extension-highlight"; import Subscript from "@tiptap/extension-subscript"; import Superscript from "@tiptap/extension-superscript"; -import ListItem from '@tiptap/extension-list-item' -import TextStyle, { TextStyleOptions } from '@tiptap/extension-text-style' -import Link from '@tiptap/extension-link' -import Table from '@tiptap/extension-table' -import TableCell from '@tiptap/extension-table-cell' -import TableHeader from '@tiptap/extension-table-header' -import TableRow from '@tiptap/extension-table-row' -import { TypoSize } from "@edifice-tiptap-extensions/extension-typosize"; +import Table from '@tiptap/extension-table'; +import TableHeader from '@tiptap/extension-table-header'; +import TableRow from '@tiptap/extension-table-row'; import TextAlign from "@tiptap/extension-text-align"; +import TextStyle from '@tiptap/extension-text-style'; import Typography from "@tiptap/extension-typography"; import Underline from "@tiptap/extension-underline"; -import { Video } from '@edifice-tiptap-extensions/extension-video' -import { IFrame } from '@edifice-tiptap-extensions/extension-iframe' -import { MathJax } from '@edifice-tiptap-extensions/extension-mathjax' -import { Attachment } from '@edifice-tiptap-extensions/extension-attachment' +import StarterKit from '@tiptap/starter-kit'; import { cleanHtmlCounter, cleanHtmlTimer, cleanJsonCounter, cleanJsonTimer, h2jCounter, h2jTimer, h2plainTextCounter, h2plainTextTimer, j2hCounter, j2hTimer, j2plainTextCounter, j2plainTextTimer, updateCounterAndTimer } from './metrics-controller.js'; @@ -39,8 +39,6 @@ const EXTENSIONS = [ Color, Subscript, Superscript, - Image, - Link, Table, TableRow, TableHeader, @@ -48,12 +46,15 @@ const EXTENSIONS = [ TextAlign.configure({ types: ["heading", "paragraph"], }), - Video, + Typography, + TypoSize, IFrame, + Video, + Linker, + FontFamily, MathJax, + Audio, Attachment, - Typography, - TypoSize, ] export function transformController(req: AuthenticatedRequest, res: Response, serviceVersion: number): Promise {