diff --git a/web/apps/web-ele/pnpm-lock.yaml b/web/apps/web-ele/pnpm-lock.yaml deleted file mode 100644 index d99dad3..0000000 --- a/web/apps/web-ele/pnpm-lock.yaml +++ /dev/null @@ -1,429 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - dependencies: - '@tiptap/core': - specifier: ^3.15.3 - version: 3.20.4(@tiptap/pm@3.20.4) - '@tiptap/extension-code-block-lowlight': - specifier: ^3.20.4 - version: 3.20.4(@tiptap/core@3.20.4(@tiptap/pm@3.20.4))(@tiptap/extension-code-block@3.20.4(@tiptap/core@3.20.4(@tiptap/pm@3.20.4))(@tiptap/pm@3.20.4))(@tiptap/pm@3.20.4)(highlight.js@11.11.1)(lowlight@3.3.0) - '@tiptap/pm': - specifier: ^3.15.3 - version: 3.20.4 - '@vben-core/menu-ui': - specifier: workspace:* - version: link:../../packages/@core/ui-kit/menu-ui - '@vben/access': - specifier: workspace:* - version: link:../../packages/effects/access - '@vben/common-ui': - specifier: workspace:* - version: link:../../packages/effects/common-ui - '@vben/constants': - specifier: workspace:* - version: link:../../packages/constants - '@vben/hooks': - specifier: workspace:* - version: link:../../packages/effects/hooks - '@vben/icons': - specifier: workspace:* - version: link:../../packages/icons - '@vben/layouts': - specifier: workspace:* - version: link:../../packages/effects/layouts - '@vben/locales': - specifier: workspace:* - version: link:../../packages/locales - '@vben/plugins': - specifier: workspace:* - version: link:../../packages/effects/plugins - '@vben/preferences': - specifier: workspace:* - version: link:../../packages/preferences - '@vben/request': - specifier: workspace:* - version: link:../../packages/effects/request - '@vben/stores': - specifier: workspace:* - version: link:../../packages/stores - '@vben/styles': - specifier: workspace:* - version: link:../../packages/styles - '@vben/types': - specifier: workspace:* - version: link:../../packages/types - '@vben/utils': - specifier: workspace:* - version: link:../../packages/utils - lowlight: - specifier: ^3.3.0 - version: 3.3.0 - -packages: - - '@remirror/core-constants@3.0.0': - resolution: {integrity: sha512-42aWfPrimMfDKDi4YegyS7x+/0tlzaqwPQCULLanv3DMIlu96KTJR0fM5isWX2UViOqlGnX6YFgqWepcX+XMNg==} - - '@tiptap/core@3.20.4': - resolution: {integrity: sha512-3i/DG89TFY/b34T5P+j35UcjYuB5d3+9K8u6qID+iUqNPiza015HPIZLuPfE5elNwVdV3EXIoPo0LLeBLgXXAg==} - peerDependencies: - '@tiptap/pm': ^3.20.4 - - '@tiptap/extension-code-block-lowlight@3.20.4': - resolution: {integrity: sha512-YE+OxuvQx3oXGzSkhRyQzCGXOWrVntdTUQgRfOu5Ky+ZtScPWCVsTwUP8SBGBQjqp3sbbBehZznipbUIpWWJDA==} - peerDependencies: - '@tiptap/core': ^3.20.4 - '@tiptap/extension-code-block': ^3.20.4 - '@tiptap/pm': ^3.20.4 - highlight.js: ^11 - lowlight: ^2 || ^3 - - '@tiptap/extension-code-block@3.20.4': - resolution: {integrity: sha512-Zlw3FrXTy01+o1yISeX/LC+iJeHA+ym602bMXGmtA6lyl7QSOSO7WExweJ6xeJGhbCjldwT5al6fkRAs8iGJZg==} - peerDependencies: - '@tiptap/core': ^3.20.4 - '@tiptap/pm': ^3.20.4 - - '@tiptap/pm@3.20.4': - resolution: {integrity: sha512-rCHYSBToilBEuI6PtjziHDdRkABH/XqwJ7dG4Amn/SD3yGiZKYCiEApQlTUS2zZeo8DsLeuqqqB4vEOeD4OEPg==} - - '@types/hast@3.0.4': - resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} - - '@types/linkify-it@5.0.0': - resolution: {integrity: sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==} - - '@types/markdown-it@14.1.2': - resolution: {integrity: sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==} - - '@types/mdurl@2.0.0': - resolution: {integrity: sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==} - - '@types/unist@3.0.3': - resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - - argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - - crelt@1.0.6: - resolution: {integrity: sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==} - - dequal@2.0.3: - resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} - engines: {node: '>=6'} - - devlop@1.1.0: - resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} - - entities@4.5.0: - resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} - engines: {node: '>=0.12'} - - escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - - highlight.js@11.11.1: - resolution: {integrity: sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==} - engines: {node: '>=12.0.0'} - - linkify-it@5.0.0: - resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} - - lowlight@3.3.0: - resolution: {integrity: sha512-0JNhgFoPvP6U6lE/UdVsSq99tn6DhjjpAj5MxG49ewd2mOBVtwWYIT8ClyABhq198aXXODMU6Ox8DrGy/CpTZQ==} - - markdown-it@14.1.1: - resolution: {integrity: sha512-BuU2qnTti9YKgK5N+IeMubp14ZUKUUw7yeJbkjtosvHiP0AZ5c8IAgEMk79D0eC8F23r4Ac/q8cAIFdm2FtyoA==} - hasBin: true - - mdurl@2.0.0: - resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} - - orderedmap@2.1.1: - resolution: {integrity: sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g==} - - prosemirror-changeset@2.4.0: - resolution: {integrity: sha512-LvqH2v7Q2SF6yxatuPP2e8vSUKS/L+xAU7dPDC4RMyHMhZoGDfBC74mYuyYF4gLqOEG758wajtyhNnsTkuhvng==} - - prosemirror-collab@1.3.1: - resolution: {integrity: sha512-4SnynYR9TTYaQVXd/ieUvsVV4PDMBzrq2xPUWutHivDuOshZXqQ5rGbZM84HEaXKbLdItse7weMGOUdDVcLKEQ==} - - prosemirror-commands@1.7.1: - resolution: {integrity: sha512-rT7qZnQtx5c0/y/KlYaGvtG411S97UaL6gdp6RIZ23DLHanMYLyfGBV5DtSnZdthQql7W+lEVbpSfwtO8T+L2w==} - - prosemirror-dropcursor@1.8.2: - resolution: {integrity: sha512-CCk6Gyx9+Tt2sbYk5NK0nB1ukHi2ryaRgadV/LvyNuO3ena1payM2z6Cg0vO1ebK8cxbzo41ku2DE5Axj1Zuiw==} - - prosemirror-gapcursor@1.4.1: - resolution: {integrity: sha512-pMdYaEnjNMSwl11yjEGtgTmLkR08m/Vl+Jj443167p9eB3HVQKhYCc4gmHVDsLPODfZfjr/MmirsdyZziXbQKw==} - - prosemirror-history@1.5.0: - resolution: {integrity: sha512-zlzTiH01eKA55UAf1MEjtssJeHnGxO0j4K4Dpx+gnmX9n+SHNlDqI2oO1Kv1iPN5B1dm5fsljCfqKF9nFL6HRg==} - - prosemirror-inputrules@1.5.1: - resolution: {integrity: sha512-7wj4uMjKaXWAQ1CDgxNzNtR9AlsuwzHfdFH1ygEHA2KHF2DOEaXl1CJfNPAKCg9qNEh4rum975QLaCiQPyY6Fw==} - - prosemirror-keymap@1.2.3: - resolution: {integrity: sha512-4HucRlpiLd1IPQQXNqeo81BGtkY8Ai5smHhKW9jjPKRc2wQIxksg7Hl1tTI2IfT2B/LgX6bfYvXxEpJl7aKYKw==} - - prosemirror-markdown@1.13.4: - resolution: {integrity: sha512-D98dm4cQ3Hs6EmjK500TdAOew4Z03EV71ajEFiWra3Upr7diytJsjF4mPV2dW+eK5uNectiRj0xFxYI9NLXDbw==} - - prosemirror-menu@1.3.0: - resolution: {integrity: sha512-TImyPXCHPcDsSka2/lwJ6WjTASr4re/qWq1yoTTuLOqfXucwF6VcRa2LWCkM/EyTD1UO3CUwiH8qURJoWJRxwg==} - - prosemirror-model@1.25.4: - resolution: {integrity: sha512-PIM7E43PBxKce8OQeezAs9j4TP+5yDpZVbuurd1h5phUxEKIu+G2a+EUZzIC5nS1mJktDJWzbqS23n1tsAf5QA==} - - prosemirror-schema-basic@1.2.4: - resolution: {integrity: sha512-ELxP4TlX3yr2v5rM7Sb70SqStq5NvI15c0j9j/gjsrO5vaw+fnnpovCLEGIcpeGfifkuqJwl4fon6b+KdrODYQ==} - - prosemirror-schema-list@1.5.1: - resolution: {integrity: sha512-927lFx/uwyQaGwJxLWCZRkjXG0p48KpMj6ueoYiu4JX05GGuGcgzAy62dfiV8eFZftgyBUvLx76RsMe20fJl+Q==} - - prosemirror-state@1.4.4: - resolution: {integrity: sha512-6jiYHH2CIGbCfnxdHbXZ12gySFY/fz/ulZE333G6bPqIZ4F+TXo9ifiR86nAHpWnfoNjOb3o5ESi7J8Uz1jXHw==} - - prosemirror-tables@1.8.5: - resolution: {integrity: sha512-V/0cDCsHKHe/tfWkeCmthNUcEp1IVO3p6vwN8XtwE9PZQLAZJigbw3QoraAdfJPir4NKJtNvOB8oYGKRl+t0Dw==} - - prosemirror-trailing-node@3.0.0: - resolution: {integrity: sha512-xiun5/3q0w5eRnGYfNlW1uU9W6x5MoFKWwq/0TIRgt09lv7Hcser2QYV8t4muXbEr+Fwo0geYn79Xs4GKywrRQ==} - peerDependencies: - prosemirror-model: ^1.22.1 - prosemirror-state: ^1.4.2 - prosemirror-view: ^1.33.8 - - prosemirror-transform@1.11.0: - resolution: {integrity: sha512-4I7Ce4KpygXb9bkiPS3hTEk4dSHorfRw8uI0pE8IhxlK2GXsqv5tIA7JUSxtSu7u8APVOTtbUBxTmnHIxVkIJw==} - - prosemirror-view@1.41.7: - resolution: {integrity: sha512-jUwKNCEIGiqdvhlS91/2QAg21e4dfU5bH2iwmSDQeosXJgKF7smG0YSplOWK0cjSNgIqXe7VXqo7EIfUFJdt3w==} - - punycode.js@2.3.1: - resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} - engines: {node: '>=6'} - - rope-sequence@1.3.4: - resolution: {integrity: sha512-UT5EDe2cu2E/6O4igUr5PSFs23nvvukicWHx6GnOPlHAiiYbzNuCRQCuiUdHJQcqKalLKlrYJnjY0ySGsXNQXQ==} - - uc.micro@2.1.0: - resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} - - w3c-keyname@2.2.8: - resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==} - -snapshots: - - '@remirror/core-constants@3.0.0': {} - - '@tiptap/core@3.20.4(@tiptap/pm@3.20.4)': - dependencies: - '@tiptap/pm': 3.20.4 - - '@tiptap/extension-code-block-lowlight@3.20.4(@tiptap/core@3.20.4(@tiptap/pm@3.20.4))(@tiptap/extension-code-block@3.20.4(@tiptap/core@3.20.4(@tiptap/pm@3.20.4))(@tiptap/pm@3.20.4))(@tiptap/pm@3.20.4)(highlight.js@11.11.1)(lowlight@3.3.0)': - dependencies: - '@tiptap/core': 3.20.4(@tiptap/pm@3.20.4) - '@tiptap/extension-code-block': 3.20.4(@tiptap/core@3.20.4(@tiptap/pm@3.20.4))(@tiptap/pm@3.20.4) - '@tiptap/pm': 3.20.4 - highlight.js: 11.11.1 - lowlight: 3.3.0 - - '@tiptap/extension-code-block@3.20.4(@tiptap/core@3.20.4(@tiptap/pm@3.20.4))(@tiptap/pm@3.20.4)': - dependencies: - '@tiptap/core': 3.20.4(@tiptap/pm@3.20.4) - '@tiptap/pm': 3.20.4 - - '@tiptap/pm@3.20.4': - dependencies: - prosemirror-changeset: 2.4.0 - prosemirror-collab: 1.3.1 - prosemirror-commands: 1.7.1 - prosemirror-dropcursor: 1.8.2 - prosemirror-gapcursor: 1.4.1 - prosemirror-history: 1.5.0 - prosemirror-inputrules: 1.5.1 - prosemirror-keymap: 1.2.3 - prosemirror-markdown: 1.13.4 - prosemirror-menu: 1.3.0 - prosemirror-model: 1.25.4 - prosemirror-schema-basic: 1.2.4 - prosemirror-schema-list: 1.5.1 - prosemirror-state: 1.4.4 - prosemirror-tables: 1.8.5 - prosemirror-trailing-node: 3.0.0(prosemirror-model@1.25.4)(prosemirror-state@1.4.4)(prosemirror-view@1.41.7) - prosemirror-transform: 1.11.0 - prosemirror-view: 1.41.7 - - '@types/hast@3.0.4': - dependencies: - '@types/unist': 3.0.3 - - '@types/linkify-it@5.0.0': {} - - '@types/markdown-it@14.1.2': - dependencies: - '@types/linkify-it': 5.0.0 - '@types/mdurl': 2.0.0 - - '@types/mdurl@2.0.0': {} - - '@types/unist@3.0.3': {} - - argparse@2.0.1: {} - - crelt@1.0.6: {} - - dequal@2.0.3: {} - - devlop@1.1.0: - dependencies: - dequal: 2.0.3 - - entities@4.5.0: {} - - escape-string-regexp@4.0.0: {} - - highlight.js@11.11.1: {} - - linkify-it@5.0.0: - dependencies: - uc.micro: 2.1.0 - - lowlight@3.3.0: - dependencies: - '@types/hast': 3.0.4 - devlop: 1.1.0 - highlight.js: 11.11.1 - - markdown-it@14.1.1: - dependencies: - argparse: 2.0.1 - entities: 4.5.0 - linkify-it: 5.0.0 - mdurl: 2.0.0 - punycode.js: 2.3.1 - uc.micro: 2.1.0 - - mdurl@2.0.0: {} - - orderedmap@2.1.1: {} - - prosemirror-changeset@2.4.0: - dependencies: - prosemirror-transform: 1.11.0 - - prosemirror-collab@1.3.1: - dependencies: - prosemirror-state: 1.4.4 - - prosemirror-commands@1.7.1: - dependencies: - prosemirror-model: 1.25.4 - prosemirror-state: 1.4.4 - prosemirror-transform: 1.11.0 - - prosemirror-dropcursor@1.8.2: - dependencies: - prosemirror-state: 1.4.4 - prosemirror-transform: 1.11.0 - prosemirror-view: 1.41.7 - - prosemirror-gapcursor@1.4.1: - dependencies: - prosemirror-keymap: 1.2.3 - prosemirror-model: 1.25.4 - prosemirror-state: 1.4.4 - prosemirror-view: 1.41.7 - - prosemirror-history@1.5.0: - dependencies: - prosemirror-state: 1.4.4 - prosemirror-transform: 1.11.0 - prosemirror-view: 1.41.7 - rope-sequence: 1.3.4 - - prosemirror-inputrules@1.5.1: - dependencies: - prosemirror-state: 1.4.4 - prosemirror-transform: 1.11.0 - - prosemirror-keymap@1.2.3: - dependencies: - prosemirror-state: 1.4.4 - w3c-keyname: 2.2.8 - - prosemirror-markdown@1.13.4: - dependencies: - '@types/markdown-it': 14.1.2 - markdown-it: 14.1.1 - prosemirror-model: 1.25.4 - - prosemirror-menu@1.3.0: - dependencies: - crelt: 1.0.6 - prosemirror-commands: 1.7.1 - prosemirror-history: 1.5.0 - prosemirror-state: 1.4.4 - - prosemirror-model@1.25.4: - dependencies: - orderedmap: 2.1.1 - - prosemirror-schema-basic@1.2.4: - dependencies: - prosemirror-model: 1.25.4 - - prosemirror-schema-list@1.5.1: - dependencies: - prosemirror-model: 1.25.4 - prosemirror-state: 1.4.4 - prosemirror-transform: 1.11.0 - - prosemirror-state@1.4.4: - dependencies: - prosemirror-model: 1.25.4 - prosemirror-transform: 1.11.0 - prosemirror-view: 1.41.7 - - prosemirror-tables@1.8.5: - dependencies: - prosemirror-keymap: 1.2.3 - prosemirror-model: 1.25.4 - prosemirror-state: 1.4.4 - prosemirror-transform: 1.11.0 - prosemirror-view: 1.41.7 - - prosemirror-trailing-node@3.0.0(prosemirror-model@1.25.4)(prosemirror-state@1.4.4)(prosemirror-view@1.41.7): - dependencies: - '@remirror/core-constants': 3.0.0 - escape-string-regexp: 4.0.0 - prosemirror-model: 1.25.4 - prosemirror-state: 1.4.4 - prosemirror-view: 1.41.7 - - prosemirror-transform@1.11.0: - dependencies: - prosemirror-model: 1.25.4 - - prosemirror-view@1.41.7: - dependencies: - prosemirror-model: 1.25.4 - prosemirror-state: 1.4.4 - prosemirror-transform: 1.11.0 - - punycode.js@2.3.1: {} - - rope-sequence@1.3.4: {} - - uc.micro@2.1.0: {} - - w3c-keyname@2.2.8: {} diff --git a/web/apps/web-ele/src/components/image-cropper/image-cropper.vue b/web/apps/web-ele/src/components/image-cropper/image-cropper.vue deleted file mode 100644 index f3dd49f..0000000 --- a/web/apps/web-ele/src/components/image-cropper/image-cropper.vue +++ /dev/null @@ -1,205 +0,0 @@ - - - - - diff --git a/web/apps/web-ele/src/components/image-cropper/index.ts b/web/apps/web-ele/src/components/image-cropper/index.ts deleted file mode 100644 index 08d102c..0000000 --- a/web/apps/web-ele/src/components/image-cropper/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default as ImageCropper } from './image-cropper.vue'; diff --git a/web/apps/web-ele/src/components/zq-form/ai-image-ocr/ai-image-ocr.vue b/web/apps/web-ele/src/components/zq-form/ai-image-ocr/ai-image-ocr.vue deleted file mode 100644 index 12d4bf3..0000000 --- a/web/apps/web-ele/src/components/zq-form/ai-image-ocr/ai-image-ocr.vue +++ /dev/null @@ -1,807 +0,0 @@ - - - - - diff --git a/web/apps/web-ele/src/components/zq-form/ai-image-ocr/index.ts b/web/apps/web-ele/src/components/zq-form/ai-image-ocr/index.ts deleted file mode 100644 index ae544e4..0000000 --- a/web/apps/web-ele/src/components/zq-form/ai-image-ocr/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default as AiImageOcr } from './ai-image-ocr.vue'; -export type { AiImageOcrEmits, AiImageOcrProps } from './types'; diff --git a/web/apps/web-ele/src/components/zq-form/ai-image-ocr/types.ts b/web/apps/web-ele/src/components/zq-form/ai-image-ocr/types.ts deleted file mode 100644 index 3e50ef1..0000000 --- a/web/apps/web-ele/src/components/zq-form/ai-image-ocr/types.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface AiImageOcrProps { - modelValue?: string | string[]; - multiple?: boolean; - placeholder?: string; - disabled?: boolean; - clearable?: boolean; - maxSize?: number; -} - -export interface AiImageOcrEmits { - (e: 'update:modelValue', value: string | string[] | undefined): void; - (e: 'change', value: string | string[] | undefined): void; - ( - e: 'ocr-success', - data: { extractedData: null | Record; rawText: string }, - ): void; - (e: 'fill-fields', data: Record): void; -} diff --git a/web/apps/web-ele/src/components/zq-form/notion-editor/NotionEditor.vue b/web/apps/web-ele/src/components/zq-form/notion-editor/NotionEditor.vue deleted file mode 100644 index fa3b3fb..0000000 --- a/web/apps/web-ele/src/components/zq-form/notion-editor/NotionEditor.vue +++ /dev/null @@ -1,1113 +0,0 @@ - - - - - diff --git a/web/apps/web-ele/src/components/zq-form/notion-editor/components/SlashCommandMenu.vue b/web/apps/web-ele/src/components/zq-form/notion-editor/components/SlashCommandMenu.vue deleted file mode 100644 index 8894a3c..0000000 --- a/web/apps/web-ele/src/components/zq-form/notion-editor/components/SlashCommandMenu.vue +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - - diff --git a/web/apps/web-ele/src/components/zq-form/notion-editor/components/TableHandles.vue b/web/apps/web-ele/src/components/zq-form/notion-editor/components/TableHandles.vue deleted file mode 100644 index ab3fbdd..0000000 --- a/web/apps/web-ele/src/components/zq-form/notion-editor/components/TableHandles.vue +++ /dev/null @@ -1,302 +0,0 @@ - - - - - diff --git a/web/apps/web-ele/src/components/zq-form/notion-editor/components/TableMenu.vue b/web/apps/web-ele/src/components/zq-form/notion-editor/components/TableMenu.vue deleted file mode 100644 index 65674ba..0000000 --- a/web/apps/web-ele/src/components/zq-form/notion-editor/components/TableMenu.vue +++ /dev/null @@ -1,320 +0,0 @@ - - - - - diff --git a/web/apps/web-ele/src/components/zq-form/notion-editor/extensions/slash-command.ts b/web/apps/web-ele/src/components/zq-form/notion-editor/extensions/slash-command.ts deleted file mode 100644 index b45c595..0000000 --- a/web/apps/web-ele/src/components/zq-form/notion-editor/extensions/slash-command.ts +++ /dev/null @@ -1,237 +0,0 @@ -import type { Instance as TippyInstance } from 'tippy.js'; - -import { Extension } from '@tiptap/core'; -import Suggestion from '@tiptap/suggestion'; -import { VueRenderer } from '@tiptap/vue-3'; -import tippy from 'tippy.js'; - -import SlashCommandMenu from '../components/SlashCommandMenu.vue'; - -export const SlashCommand = Extension.create({ - name: 'slashCommand', - - addOptions() { - return { - suggestion: { - char: '/', - startOfLine: false, - command: ({ editor, range, props }: any) => { - props.command({ editor, range }); - }, - }, - }; - }, - - addProseMirrorPlugins() { - return [ - Suggestion({ - editor: this.editor, - ...this.options.suggestion, - }), - ]; - }, -}); - -export function createSlashCommandSuggestion() { - return { - items: ({ query }: { query: string }) => { - const commands = [ - { - title: '正文', - description: '普通段落文本', - icon: 'Text', - command: ({ editor, range }: any) => { - editor.chain().focus().deleteRange(range).setParagraph().run(); - }, - }, - { - title: '标题 1', - description: '大标题', - icon: 'Heading1', - command: ({ editor, range }: any) => { - editor - .chain() - .focus() - .deleteRange(range) - .setNode('heading', { level: 1 }) - .run(); - }, - }, - { - title: '标题 2', - description: '中标题', - icon: 'Heading2', - command: ({ editor, range }: any) => { - editor - .chain() - .focus() - .deleteRange(range) - .setNode('heading', { level: 2 }) - .run(); - }, - }, - { - title: '标题 3', - description: '小标题', - icon: 'Heading3', - command: ({ editor, range }: any) => { - editor - .chain() - .focus() - .deleteRange(range) - .setNode('heading', { level: 3 }) - .run(); - }, - }, - { - title: '无序列表', - description: '创建无序列表', - icon: 'List', - command: ({ editor, range }: any) => { - editor.chain().focus().deleteRange(range).toggleBulletList().run(); - }, - }, - { - title: '有序列表', - description: '创建有序列表', - icon: 'ListOrdered', - command: ({ editor, range }: any) => { - editor.chain().focus().deleteRange(range).toggleOrderedList().run(); - }, - }, - { - title: '引用', - description: '创建引用块', - icon: 'Quote', - command: ({ editor, range }: any) => { - editor.chain().focus().deleteRange(range).toggleBlockquote().run(); - }, - }, - { - title: '代码块', - description: '创建代码块', - icon: 'Code', - command: ({ editor, range }: any) => { - editor.chain().focus().deleteRange(range).toggleCodeBlock().run(); - }, - }, - { - title: '分割线', - description: '插入分割线', - icon: 'Minus', - command: ({ editor, range }: any) => { - editor.chain().focus().deleteRange(range).setHorizontalRule().run(); - }, - }, - { - title: '表格', - description: '插入表格', - icon: 'Table', - command: ({ editor, range }: any) => { - editor - .chain() - .focus() - .deleteRange(range) - .insertTable({ rows: 3, cols: 3, withHeaderRow: true }) - .run(); - }, - }, - { - title: '加粗', - description: '加粗文本', - icon: 'Bold', - command: ({ editor, range }: any) => { - editor.chain().focus().deleteRange(range).toggleBold().run(); - }, - }, - { - title: '斜体', - description: '斜体文本', - icon: 'Italic', - command: ({ editor, range }: any) => { - editor.chain().focus().deleteRange(range).toggleItalic().run(); - }, - }, - { - title: '高亮', - description: '高亮文本', - icon: 'Highlighter', - command: ({ editor, range }: any) => { - editor - .chain() - .focus() - .deleteRange(range) - .toggleHighlight({ color: '#fef08a' }) - .run(); - }, - }, - ]; - - return commands.filter((item) => - item.title.toLowerCase().includes(query.toLowerCase()), - ); - }, - - render: () => { - let component: null | VueRenderer = null; - let popup: null | TippyInstance[] = null; - - return { - onStart: (props: any) => { - component = new VueRenderer(SlashCommandMenu, { - props, - editor: props.editor, - }); - - if (!props.clientRect) { - return; - } - - const referenceElement = document.createElement('div'); - const instances = tippy(referenceElement, { - getReferenceClientRect: props.clientRect, - appendTo: () => document.body, - content: component.element as HTMLElement, - showOnCreate: true, - interactive: true, - trigger: 'manual', - placement: 'bottom-start', - }); - popup = Array.isArray(instances) ? instances : [instances]; - }, - - onUpdate(props: any) { - if (!component) return; - - component.updateProps(props); - - if (!props.clientRect || !popup) { - return; - } - - popup[0]?.setProps({ - getReferenceClientRect: props.clientRect, - }); - }, - - onKeyDown(props: any) { - if (props.event.key === 'Escape') { - popup?.[0]?.hide(); - return true; - } - - return (component?.ref as any)?.onKeyDown(props); - }, - - onExit() { - if (popup) { - popup[0]?.destroy(); - } - if (component) { - component.destroy(); - } - }, - }; - }, - }; -} diff --git a/web/apps/web-ele/src/components/zq-form/notion-editor/index.ts b/web/apps/web-ele/src/components/zq-form/notion-editor/index.ts deleted file mode 100644 index 11d2a73..0000000 --- a/web/apps/web-ele/src/components/zq-form/notion-editor/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default as NotionEditor } from './NotionEditor.vue'; diff --git a/web/apps/web-ele/src/components/zq-form/rich-text-editor/extensions/ResizableImageComponent.vue b/web/apps/web-ele/src/components/zq-form/rich-text-editor/extensions/ResizableImageComponent.vue deleted file mode 100644 index db13a08..0000000 --- a/web/apps/web-ele/src/components/zq-form/rich-text-editor/extensions/ResizableImageComponent.vue +++ /dev/null @@ -1,654 +0,0 @@ - - - - - diff --git a/web/apps/web-ele/src/components/zq-form/rich-text-editor/extensions/ResizableVideoComponent.vue b/web/apps/web-ele/src/components/zq-form/rich-text-editor/extensions/ResizableVideoComponent.vue deleted file mode 100644 index cff1d82..0000000 --- a/web/apps/web-ele/src/components/zq-form/rich-text-editor/extensions/ResizableVideoComponent.vue +++ /dev/null @@ -1,536 +0,0 @@ - - - - - diff --git a/web/apps/web-ele/src/components/zq-form/rich-text-editor/extensions/attachment.ts b/web/apps/web-ele/src/components/zq-form/rich-text-editor/extensions/attachment.ts deleted file mode 100644 index 1809b22..0000000 --- a/web/apps/web-ele/src/components/zq-form/rich-text-editor/extensions/attachment.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { mergeAttributes, Node } from '@tiptap/core'; - -export interface AttachmentOptions { - HTMLAttributes: Record; -} - -export interface AttachmentAttributes { - id: string; - name: string; - size: number; - type: string; - url: string; -} - -declare module '@tiptap/core' { - interface Commands { - attachment: { - setAttachment: (options: AttachmentAttributes) => ReturnType; - }; - } -} - -export const Attachment = Node.create({ - name: 'attachment', - - group: 'block', - - atom: true, - - addOptions() { - return { - HTMLAttributes: {}, - }; - }, - - addAttributes() { - return { - id: { - default: null, - }, - name: { - default: null, - }, - size: { - default: 0, - }, - type: { - default: null, - }, - url: { - default: null, - }, - }; - }, - - parseHTML() { - return [ - { - tag: 'div[data-type="attachment"]', - }, - ]; - }, - - renderHTML({ HTMLAttributes }: { HTMLAttributes: Record }) { - const { id, name, size, type, url } = HTMLAttributes; - return [ - 'div', - mergeAttributes(this.options.HTMLAttributes, { - 'data-type': 'attachment', - 'data-id': id, - 'data-name': name, - 'data-size': size, - 'data-file-type': type, - 'data-url': url, - class: 'attachment-node', - }), - [ - 'a', - { - href: url, - target: '_blank', - download: name, - class: 'attachment-link', - }, - ['span', { class: 'attachment-icon' }, '📎'], - ['span', { class: 'attachment-name' }, name], - ['span', { class: 'attachment-size' }, formatFileSize(size)], - ], - ]; - }, - - addCommands() { - return { - setAttachment: - (options: AttachmentAttributes) => - ({ commands }: { commands: any }) => { - return commands.insertContent({ - type: this.name, - attrs: options, - }); - }, - }; - }, -}); - -// 格式化文件大小 -function formatFileSize(bytes: number): string { - if (bytes === 0) return '0 B'; - const k = 1024; - const sizes = ['B', 'KB', 'MB', 'GB']; - const i = Math.floor(Math.log(bytes) / Math.log(k)); - return `${Number.parseFloat((bytes / k ** i).toFixed(2))} ${sizes[i]}`; -} - -export default Attachment; diff --git a/web/apps/web-ele/src/components/zq-form/rich-text-editor/extensions/font-size.ts b/web/apps/web-ele/src/components/zq-form/rich-text-editor/extensions/font-size.ts deleted file mode 100644 index 2906c41..0000000 --- a/web/apps/web-ele/src/components/zq-form/rich-text-editor/extensions/font-size.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { Extension } from '@tiptap/core'; - -export interface FontSizeOptions { - types: string[]; -} - -declare module '@tiptap/core' { - interface Commands { - fontSize: { - setFontSize: (size: string) => ReturnType; - unsetFontSize: () => ReturnType; - }; - } -} - -export const FontSize = Extension.create({ - name: 'fontSize', - - addOptions() { - return { - types: ['textStyle'], - }; - }, - - addGlobalAttributes() { - return [ - { - types: this.options.types, - attributes: { - fontSize: { - default: null, - parseHTML: (element) => - element.style.fontSize?.replace(/['"]+/g, ''), - renderHTML: (attributes) => { - if (!attributes.fontSize) { - return {}; - } - - return { - style: `font-size: ${attributes.fontSize}`, - }; - }, - }, - }, - }, - ]; - }, - - addCommands() { - return { - setFontSize: - (fontSize) => - ({ chain }) => { - return chain().setMark('textStyle', { fontSize }).run(); - }, - unsetFontSize: - () => - ({ chain }) => { - return chain() - .setMark('textStyle', { fontSize: null }) - .removeEmptyTextStyle() - .run(); - }, - }; - }, -}); diff --git a/web/apps/web-ele/src/components/zq-form/rich-text-editor/extensions/resizable-image.ts b/web/apps/web-ele/src/components/zq-form/rich-text-editor/extensions/resizable-image.ts deleted file mode 100644 index 7fc661a..0000000 --- a/web/apps/web-ele/src/components/zq-form/rich-text-editor/extensions/resizable-image.ts +++ /dev/null @@ -1,57 +0,0 @@ -import Image from '@tiptap/extension-image'; -import { VueNodeViewRenderer } from '@tiptap/vue-3'; - -import ResizableImageComponent from './ResizableImageComponent.vue'; - -export const ResizableImage = Image.extend({ - name: 'resizableImage', - - addAttributes() { - return { - ...this.parent?.(), - width: { - default: null, - parseHTML: (element) => - element.getAttribute('width') || - element.style.width?.replace('px', ''), - renderHTML: (attributes) => { - if (!attributes.width) return {}; - return { width: attributes.width }; - }, - }, - height: { - default: null, - parseHTML: (element) => - element.getAttribute('height') || - element.style.height?.replace('px', ''), - renderHTML: (attributes) => { - if (!attributes.height) return {}; - return { height: attributes.height }; - }, - }, - alignment: { - default: 'center', - parseHTML: (element) => element.dataset.alignment || 'center', - renderHTML: (attributes) => { - const alignment = attributes.alignment || 'center'; - // 同时输出 data-alignment 和 style - const styleMap: Record = { - left: 'display: block; margin-left: 0; margin-right: auto;', - center: 'display: block; margin-left: auto; margin-right: auto;', - right: 'display: block; margin-left: auto; margin-right: 0;', - }; - return { - 'data-alignment': alignment, - style: styleMap[alignment] || styleMap.center, - }; - }, - }, - }; - }, - - addNodeView() { - return VueNodeViewRenderer(ResizableImageComponent as any); - }, -}); - -export default ResizableImage; diff --git a/web/apps/web-ele/src/components/zq-form/rich-text-editor/extensions/video.ts b/web/apps/web-ele/src/components/zq-form/rich-text-editor/extensions/video.ts deleted file mode 100644 index f086dcf..0000000 --- a/web/apps/web-ele/src/components/zq-form/rich-text-editor/extensions/video.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { mergeAttributes, Node } from '@tiptap/core'; -import { VueNodeViewRenderer } from '@tiptap/vue-3'; - -import ResizableVideoComponent from './ResizableVideoComponent.vue'; - -export interface VideoOptions { - HTMLAttributes: Record; - allowFullscreen: boolean; -} - -export interface VideoAttributes { - id?: string; - src: string; - width?: number | string; - height?: number | string; - alignment?: 'center' | 'left' | 'right'; - poster?: string; -} - -declare module '@tiptap/core' { - interface Commands { - video: { - setVideo: (options: VideoAttributes) => ReturnType; - }; - } -} - -export const Video = Node.create({ - name: 'video', - - group: 'block', - - atom: true, - - draggable: true, - - addOptions() { - return { - HTMLAttributes: {}, - allowFullscreen: true, - }; - }, - - addAttributes() { - return { - id: { - default: null, - }, - src: { - default: null, - }, - width: { - default: '100%', - }, - height: { - default: 'auto', - }, - alignment: { - default: 'center', - }, - poster: { - default: null, - }, - }; - }, - - parseHTML() { - return [ - { - tag: 'div[data-type="video"]', - }, - ]; - }, - - renderHTML({ HTMLAttributes }: { HTMLAttributes: Record }) { - const { id, src, width, poster, alignment } = HTMLAttributes; - - let marginStyle = 'margin-left: auto; margin-right: auto;'; - if (alignment === 'left') { - marginStyle = 'margin-right: auto;'; - } else if (alignment === 'right') { - marginStyle = 'margin-left: auto;'; - } - - return [ - 'div', - mergeAttributes(this.options.HTMLAttributes, { - 'data-type': 'video', - 'data-id': id, - class: 'video-node', - style: `max-width: ${typeof width === 'number' ? `${width}px` : width}; ${marginStyle}`, - }), - [ - 'video', - { - src, - controls: true, - poster, - style: 'width: 100%; height: auto; border-radius: 8px;', - }, - '您的浏览器不支持视频播放', - ], - ]; - }, - - addNodeView() { - return VueNodeViewRenderer(ResizableVideoComponent as any); - }, - - addCommands() { - return { - setVideo: - (options: VideoAttributes) => - ({ commands }: { commands: any }) => { - return commands.insertContent({ - type: this.name, - attrs: options, - }); - }, - }; - }, -}); - -export default Video; diff --git a/web/apps/web-ele/src/components/zq-form/rich-text-editor/index.ts b/web/apps/web-ele/src/components/zq-form/rich-text-editor/index.ts deleted file mode 100644 index bd96f30..0000000 --- a/web/apps/web-ele/src/components/zq-form/rich-text-editor/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default as RichTextEditor } from './rich-text-editor.vue'; -export type * from './types'; diff --git a/web/apps/web-ele/src/components/zq-form/rich-text-editor/rich-text-editor.vue b/web/apps/web-ele/src/components/zq-form/rich-text-editor/rich-text-editor.vue deleted file mode 100644 index cdbef1d..0000000 --- a/web/apps/web-ele/src/components/zq-form/rich-text-editor/rich-text-editor.vue +++ /dev/null @@ -1,1649 +0,0 @@ - - - - - diff --git a/web/apps/web-ele/src/components/zq-form/rich-text-editor/types.ts b/web/apps/web-ele/src/components/zq-form/rich-text-editor/types.ts deleted file mode 100644 index 75e7b4c..0000000 --- a/web/apps/web-ele/src/components/zq-form/rich-text-editor/types.ts +++ /dev/null @@ -1,82 +0,0 @@ -import type { Editor } from '@tiptap/vue-3'; - -export interface RichTextEditorProps { - /** 编辑器内容 (HTML 格式) */ - modelValue?: string; - /** 占位符 */ - placeholder?: string; - /** 是否禁用 */ - disabled?: boolean; - /** 是否只读 */ - readonly?: boolean; - /** 最小高度 */ - minHeight?: number | string; - /** 最大高度 */ - maxHeight?: number | string; - /** 是否显示工具栏 */ - showToolbar?: boolean; - /** 是否显示字数统计 */ - showWordCount?: boolean; - /** 最大字符数 */ - maxLength?: number; - /** 自定义工具栏配置 */ - toolbarConfig?: ToolbarConfig; -} - -export interface RichTextEditorEmits { - (e: 'update:modelValue', value: string): void; - (e: 'change', value: string): void; - (e: 'focus', event: FocusEvent): void; - (e: 'blur', event: FocusEvent): void; - (e: 'ready', editor: Editor): void; -} - -export interface ToolbarConfig { - /** 显示的工具组 */ - groups?: ToolbarGroup[]; - /** 插入功能细分控制 */ - insert?: { - attachment?: boolean; - image?: boolean; - link?: boolean; - table?: boolean; - video?: boolean; - }; -} - -export type ToolbarGroup = - | 'align' // 对齐方式 - | 'blockquote' // 引用 - | 'clear' // 清除格式 - | 'code' // 代码 - | 'color' // 文字颜色/背景色 - | 'divider' // 分割线 - | 'format' // 加粗/斜体/下划线/删除线 - | 'heading' // 标题 - | 'history' // 撤销/重做 - | 'indent' // 缩进 - | 'insert' // 插入链接/图片/表格/附件/视频 - | 'list'; // 列表 - -export const defaultToolbarGroups: ToolbarGroup[] = [ - 'history', - 'heading', - 'format', - 'color', - 'align', - 'list', - 'insert', - 'blockquote', - 'code', - 'divider', - 'clear', -]; - -/** 默认插入功能配置 - 基础功能默认开启 */ -export const defaultInsertConfig = { - link: true, - image: true, - table: true, - attachment: false, // 附件默认关闭 - video: false, // 视频默认关闭 -}; diff --git a/web/apps/web-ele/src/router/routes/modules/demos.ts b/web/apps/web-ele/src/router/routes/modules/demos.ts index 427c7c0..aebfc83 100644 --- a/web/apps/web-ele/src/router/routes/modules/demos.ts +++ b/web/apps/web-ele/src/router/routes/modules/demos.ts @@ -1,37 +1,5 @@ import type { RouteRecordRaw } from 'vue-router'; -// import { BasicLayout } from '#/layouts'; -// import { BookOpenText } from '@vben/icons'; - -const routes: RouteRecordRaw[] = [ - // { - // component: BasicLayout, - // meta: { - // icon: BookOpenText, - // order: 9999, - // title: '组件示例', - // }, - // name: 'Demos', - // path: '/demos', - // children: [ - // { - // meta: { - // title: 'Notion 编辑器', - // }, - // name: 'NotionEditorDemo', - // path: '/demos/notion-editor', - // component: () => import('#/views/demos/notion-editor.vue'), - // }, - // { - // meta: { - // title: '富文本编辑器', - // }, - // name: 'RichTextEditorDemo', - // path: '/demos/rich-text-editor', - // component: () => import('#/views/demos/rich-text-editor.vue'), - // }, - // ], - // }, -]; +const routes: RouteRecordRaw[] = []; export default routes; diff --git a/web/package.json b/web/package.json index 16c6bc6..b0ddb80 100644 --- a/web/package.json +++ b/web/package.json @@ -114,8 +114,6 @@ "overrides": { "@ast-grep/napi": "catalog:", "@ctrl/tinycolor": "catalog:", - "@tiptap/core": "^3.20.4", - "@tiptap/pm": "^3.20.4", "clsx": "catalog:", "esbuild": "0.25.3", "pinia": "catalog:", diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index e9f4b7a..7f175b9 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -505,8 +505,6 @@ catalogs: overrides: '@ast-grep/napi': ^0.37.0 '@ctrl/tinycolor': ^4.1.0 - '@tiptap/core': ^3.20.4 - '@tiptap/pm': ^3.20.4 clsx: ^2.1.1 esbuild: 0.25.3 pinia: ^3.0.3