diff --git a/components.d.ts b/components.d.ts new file mode 100644 index 0000000..daef8e5 --- /dev/null +++ b/components.d.ts @@ -0,0 +1,16 @@ +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// Generated by unplugin-vue-components +// Read more: https://github.com/vuejs/core/pull/3399 +import '@vue/runtime-core' + +export {} + +declare module '@vue/runtime-core' { + export interface GlobalComponents { + BubbleMenu: typeof import('./src/components/Tiptap/BubbleMenu.vue')['default'] + CommandsList: typeof import('./src/components/Tiptap/CommandsList.vue')['default'] + Editor: typeof import('./src/components/Tiptap/Editor.vue')['default'] + } +} diff --git a/package.json b/package.json index acbce65..4cfed48 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "sass": "^1.60.0", "tailwindcss": "^3.3.1", "typescript": "^5.0.3", + "unplugin-vue-components": "^0.24.1", "vite": "^4.2.1", "vue-tsc": "^1.2.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 759a45e..f273135 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -93,9 +93,6 @@ devDependencies: postcss: specifier: ^8.4.21 version: 8.4.21 - postcss-import: - specifier: ^15.1.0 - version: 15.1.0(postcss@8.4.21) sass: specifier: ^1.60.0 version: 1.60.0 @@ -105,6 +102,9 @@ devDependencies: typescript: specifier: ^5.0.3 version: 5.0.3 + unplugin-vue-components: + specifier: ^0.24.1 + version: 0.24.1(vue@3.2.47) vite: specifier: ^4.2.1 version: 4.2.1(sass@1.60.0) @@ -219,7 +219,6 @@ packages: /@antfu/utils@0.7.2: resolution: {integrity: sha512-vy9fM3pIxZmX07dL+VX1aZe7ynZ+YyB0jY+jE6r3hOK6GNY2t6W8rzpFC4tgpbXUYABkFQwgJq2XYXlxbXAI0g==} - dev: false /@babel/code-frame@7.18.6: resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} @@ -555,6 +554,10 @@ packages: - supports-color dev: false + /@jridgewell/sourcemap-codec@1.4.14: + resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} + dev: true + /@linaria/core@3.0.0-beta.13: resolution: {integrity: sha512-3zEi5plBCOsEzUneRVuQb+2SAx3qaC1dj0FfFAI6zIJQoDWu0dlSwKijMRack7oO9tUWrchfj3OkKQAd1LBdVg==} dev: false @@ -642,6 +645,20 @@ packages: type-fest: 2.19.0 dev: false + /@rollup/pluginutils@5.0.2: + resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@types/estree': 1.0.0 + estree-walker: 2.0.2 + picomatch: 2.3.1 + dev: true + /@tailwindcss/typography@0.5.9(tailwindcss@3.3.1): resolution: {integrity: sha512-t8Sg3DyynFysV9f4JDOVISGsjazNb48AeIYQwcL+Bsq5uf4RYL75C1giZ43KISjeDGBaTN3Kxh7Xj/vRSMJUUg==} peerDependencies: @@ -974,6 +991,10 @@ packages: vue: 3.2.47 dev: false + /@types/estree@1.0.0: + resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==} + dev: true + /@types/hast@2.3.4: resolution: {integrity: sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==} dependencies: @@ -3186,6 +3207,13 @@ packages: dependencies: sourcemap-codec: 1.4.8 + /magic-string@0.30.0: + resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.14 + dev: true + /make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} dev: false @@ -3298,6 +3326,13 @@ packages: brace-expansion: 2.0.1 dev: true + /minimatch@7.4.3: + resolution: {integrity: sha512-5UB4yYusDtkRPbRiy1cqZ1IpGNcJCGlEMG17RKzPddpyiPKoCdwohbED8g4QXT0ewCt8LTkQXuljsUfQ3FKM4A==} + engines: {node: '>=10'} + dependencies: + brace-expansion: 2.0.1 + dev: true + /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: true @@ -3626,18 +3661,6 @@ packages: read-cache: 1.0.0 resolve: 1.22.1 - /postcss-import@15.1.0(postcss@8.4.21): - resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} - engines: {node: '>=14.0.0'} - peerDependencies: - postcss: ^8.0.0 - dependencies: - postcss: 8.4.21 - postcss-value-parser: 4.2.0 - read-cache: 1.0.0 - resolve: 1.22.1 - dev: true - /postcss-js@4.0.1(postcss@8.4.21): resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} engines: {node: ^12 || ^14 || >= 16} @@ -4412,6 +4435,44 @@ packages: '@types/unist': 2.0.6 dev: true + /unplugin-vue-components@0.24.1(vue@3.2.47): + resolution: {integrity: sha512-T3A8HkZoIE1Cja95xNqolwza0yD5IVlgZZ1PVAGvVCx8xthmjsv38xWRCtHtwl+rvZyL9uif42SRkDGw9aCfMA==} + engines: {node: '>=14'} + peerDependencies: + '@babel/parser': ^7.15.8 + '@nuxt/kit': ^3.2.2 + vue: 2 || 3 + peerDependenciesMeta: + '@babel/parser': + optional: true + '@nuxt/kit': + optional: true + dependencies: + '@antfu/utils': 0.7.2 + '@rollup/pluginutils': 5.0.2 + chokidar: 3.5.3 + debug: 4.3.4 + fast-glob: 3.2.12 + local-pkg: 0.4.3 + magic-string: 0.30.0 + minimatch: 7.4.3 + resolve: 1.22.1 + unplugin: 1.3.1 + vue: 3.2.47 + transitivePeerDependencies: + - rollup + - supports-color + dev: true + + /unplugin@1.3.1: + resolution: {integrity: sha512-h4uUTIvFBQRxUKS2Wjys6ivoeofGhxzTe2sRWlooyjHXVttcVfV/JiavNd3d4+jty0SVV0dxGw9AkY9MwiaCEw==} + dependencies: + acorn: 8.8.2 + chokidar: 3.5.3 + webpack-sources: 3.2.3 + webpack-virtual-modules: 0.5.0 + dev: true + /update-browserslist-db@1.0.10(browserslist@4.21.5): resolution: {integrity: sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==} hasBin: true @@ -4537,6 +4598,15 @@ packages: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: false + /webpack-sources@3.2.3: + resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} + engines: {node: '>=10.13.0'} + dev: true + + /webpack-virtual-modules@0.5.0: + resolution: {integrity: sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==} + dev: true + /whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} dependencies: diff --git a/src/App.vue b/src/App.vue index 29efc48..9f0b0a4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,7 +1,3 @@ - - diff --git a/src/components/Tiptap/Editor.vue b/src/components/Tiptap/Editor.vue index e158fa9..a524c00 100644 --- a/src/components/Tiptap/Editor.vue +++ b/src/components/Tiptap/Editor.vue @@ -21,7 +21,6 @@ import go from 'highlight.js/lib/languages/go' import rust from 'highlight.js/lib/languages/rust' import suggestion from './suggestion' -import BubbleMenu from './BubbleMenu.vue' import Commands from './commands' lowlight.registerLanguage('html', html) diff --git a/vite.config.ts b/vite.config.ts index 7a05c32..fd69391 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,5 +1,6 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +import Components from 'unplugin-vue-components/vite' import tailwindcss from 'tailwindcss' import autoprefixer from 'autoprefixer' import tailwindConfig from './tailwind.config' @@ -11,5 +12,10 @@ export default defineConfig({ plugins: [tailwindcss(tailwindConfig), autoprefixer()], }, }, - plugins: [vue()], + plugins: [ + vue(), + Components({ + dts: true, + }), + ], })