Skip to content

Commit

Permalink
chore: add type check and upgrade packages
Browse files Browse the repository at this point in the history
  • Loading branch information
yanglbme committed Sep 18, 2024
1 parent 8e93889 commit 00be7eb
Show file tree
Hide file tree
Showing 71 changed files with 1,933 additions and 1,437 deletions.
2,864 changes: 1,680 additions & 1,184 deletions package-lock.json

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dev": "vite --host",
"build": "run-p type-check \"build:only {@}\" --",
"build:only": "vite build",
"build:h5-netlify": "cross-env SERVER_ENV=NETLIFY vite build",
"build:h5-netlify": "cross-env SERVER_ENV=NETLIFY type-check vite build",
"build:cli": "npm run build && npm run shx rm -rf md-cli/dist && npm run shx rm -rf dist/**/*.map && npm run shx cp -r dist md-cli/ && cd md-cli && npm run pack",
"build:analyze": "cross-env ANALYZE=true vite build",
"preview": "npm run build && vite preview",
Expand All @@ -19,8 +19,8 @@
},
"dependencies": {
"@element-plus/icons-vue": "^2.3.1",
"@vueuse/core": "^11.0.1",
"axios": "^1.7.4",
"@vueuse/core": "^11.1.0",
"axios": "^1.7.7",
"buffer-from": "^1.1.2",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
Expand All @@ -29,54 +29,54 @@
"cos-js-sdk-v5": "^1.8.4",
"crypto-js": "^4.2.0",
"csstype": "^3.1.3",
"element-plus": "^2.8.0",
"es-toolkit": "^1.16.0",
"element-plus": "^2.8.3",
"es-toolkit": "^1.19.0",
"form-data": "4.0.0",
"highlight.js": "^11.10.0",
"juice": "^8.0.0",
"lucide-vue-next": "^0.428.0",
"marked": "^14.1.1",
"mermaid": "^11.1.0",
"juice": "^11.0.0",
"lucide-vue-next": "^0.441.0",
"marked": "^14.1.2",
"mermaid": "^11.2.1",
"minio": "7.1.3",
"node-fetch": "^3.3.2",
"pinia": "^2.2.2",
"qiniu-js": "^3.4.2",
"radix-vue": "^1.9.4",
"radix-vue": "^1.9.5",
"tailwind-merge": "^2.5.2",
"tailwindcss-animate": "^1.0.7",
"tiny-oss": "^0.5.1",
"uuid": "^10.0.0",
"vue": "^3.4.38"
"vue": "^3.5.6"
},
"devDependencies": {
"@antfu/eslint-config": "2.26.0",
"@antfu/eslint-config": "3.6.2",
"@types/buffer-from": "^1.1.3",
"@types/codemirror": "^5.60.15",
"@types/crypto-js": "^4.2.2",
"@types/node": "^22.4.1",
"@types/node": "^22.5.5",
"@types/uuid": "^10.0.0",
"@unocss/eslint-plugin": "^0.62.2",
"@vitejs/plugin-vue": "^5.1.2",
"@unocss/eslint-plugin": "^0.62.4",
"@vitejs/plugin-vue": "^5.1.3",
"autoprefixer": "^10.4.20",
"cross-env": "^7.0.3",
"eslint": "^9.9.0",
"eslint": "^9.10.0",
"eslint-plugin-format": "^0.1.2",
"less": "^4.2.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.41",
"postcss": "^8.4.47",
"prettier": "^3.3.3",
"rollup-plugin-visualizer": "^5.12.0",
"shx": "^0.3.4",
"simple-git-hooks": "^2.11.1",
"tailwindcss": "^3.4.10",
"typescript": "^5.5.4",
"unocss": "^0.62.2",
"unplugin-auto-import": "^0.18.2",
"tailwindcss": "^3.4.12",
"typescript": "^5.6.2",
"unocss": "^0.62.4",
"unplugin-auto-import": "^0.18.3",
"unplugin-vue-components": "^0.27.4",
"vite": "^5.4.2",
"vite": "^5.4.6",
"vite-plugin-node-polyfills": "^0.22.0",
"vite-plugin-vue-devtools": "^7.3.9",
"vue-tsc": "^2.0.29"
"vite-plugin-vue-devtools": "^7.4.5",
"vue-tsc": "^2.1.6"
},
"simple-git-hooks": {
"pre-commit": "npx lint-staged"
Expand Down
4 changes: 2 additions & 2 deletions src/components/CodemirrorEditor/CssEditor.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script setup lang="ts">
import { ElMessage, ElMessageBox } from 'element-plus'
import { useDisplayStore, useStore } from '@/stores'
import { ElMessage, ElMessageBox } from 'element-plus'
const store = useStore()
const displayStore = useDisplayStore()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script setup lang="ts">
import { TableIcon, UploadCloudIcon } from 'lucide-vue-next'
import {
MenubarContent,
MenubarItem,
MenubarMenu,
MenubarTrigger,
} from '@/components/ui/menubar'
import { useDisplayStore } from '@/stores'
import { TableIcon, UploadCloudIcon } from 'lucide-vue-next'
const { toggleShowInsertFormDialog, toggleShowUploadImgDialog } = useDisplayStore()
</script>
Expand Down
4 changes: 2 additions & 2 deletions src/components/CodemirrorEditor/EditorHeader/FileDropdown.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script setup lang="ts">
import { storeToRefs } from 'pinia'
import { useStore } from '@/stores'
import { storeToRefs } from 'pinia'
const store = useStore()
const {
Expand Down
9 changes: 5 additions & 4 deletions src/components/CodemirrorEditor/EditorHeader/PostInfo.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<script setup lang="ts">
import { ref } from 'vue'
import { storeToRefs } from 'pinia'
import {
Dialog,
DialogContent,
DialogFooter,
DialogHeader,
DialogTitle,
} from '@/components/ui/dialog'
import { useStore } from '@/stores'
import { storeToRefs } from 'pinia'
import { ref } from 'vue'
const store = useStore()
const { output } = storeToRefs(store)
Expand All @@ -31,7 +31,8 @@ function prePost() {
thumb: document.querySelector<HTMLImageElement>(`#output img`)?.src,
title: [1, 2, 3, 4, 5, 6]
.map(h => document.querySelector(`#output h${h}`)!)
.filter(h => h)[0].textContent,
.filter(h => h)[0]
.textContent,
desc: document.querySelector(`#output p`)!.textContent,
content: output.value,
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<script setup lang="ts">
import { ref } from 'vue'
import { storeToRefs } from 'pinia'
import StyleOptionMenu from './StyleOptionMenu.vue'
import {
HoverCard,
HoverCardContent,
Expand All @@ -16,7 +12,11 @@ import {
legendOptions,
themeOptions,
} from '@/config'
import { useDisplayStore, useStore } from '@/stores'
import { storeToRefs } from 'pinia'
import { ref } from 'vue'
import StyleOptionMenu from './StyleOptionMenu.vue'
const store = useStore()
const { toggleShowCssEditor } = useDisplayStore()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script setup lang="ts">
import type { IConfigOption } from '@/types'
import {
MenubarItem,
MenubarSub,
MenubarSubContent,
MenubarSubTrigger,
} from '@/components/ui/menubar'
import type { IConfigOption } from '@/types'
const props = defineProps<{
title: string
Expand Down
58 changes: 29 additions & 29 deletions src/components/CodemirrorEditor/EditorHeader/index.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
<script setup lang="ts">
import { nextTick } from 'vue'
import { storeToRefs } from 'pinia'
import { ElNotification } from 'element-plus'
import { Moon, Paintbrush, Sun } from 'lucide-vue-next'
import { Button } from '@/components/ui/button'
import {
Menubar,
MenubarContent,
MenubarItem,
MenubarMenu,
MenubarSeparator,
MenubarShortcut,
MenubarTrigger,
} from '@/components/ui/menubar'
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from '@/components/ui/select'
import PostInfo from './PostInfo.vue'
import FileDropdown from './FileDropdown.vue'
import HelpDropdown from './HelpDropdown.vue'
import StyleDropdown from './StyleDropdown.vue'
import EditDropdown from './EditDropdown.vue'
import {
altSign,
codeBlockThemeOptions,
Expand All @@ -21,29 +30,20 @@ import {
shiftSign,
themeOptions,
} from '@/config'
import { useDisplayStore, useStore } from '@/stores'
import { mergeCss, solveWeChatImage } from '@/utils'
import { ElNotification } from 'element-plus'
import { Moon, Paintbrush, Sun } from 'lucide-vue-next'
import { storeToRefs } from 'pinia'
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from '@/components/ui/select'
import {
Menubar,
MenubarContent,
MenubarItem,
MenubarMenu,
MenubarSeparator,
MenubarShortcut,
MenubarTrigger,
} from '@/components/ui/menubar'
import { nextTick } from 'vue'
import EditDropdown from './EditDropdown.vue'
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'
import { Button } from '@/components/ui/button'
import FileDropdown from './FileDropdown.vue'
import HelpDropdown from './HelpDropdown.vue'
import { mergeCss, solveWeChatImage } from '@/utils'
import { useDisplayStore, useStore } from '@/stores'
import PostInfo from './PostInfo.vue'
import StyleDropdown from './StyleDropdown.vue'
const emit = defineEmits([`addFormat`, `formatContent`, `startCopy`, `endCopy`])
Expand Down
4 changes: 2 additions & 2 deletions src/components/CodemirrorEditor/InsertFormDialog.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<script setup lang="ts">
import { ref, toRaw } from 'vue'
import {
Dialog,
DialogContent,
DialogFooter,
DialogHeader,
DialogTitle,
} from '@/components/ui/dialog'
import { useDisplayStore, useStore } from '@/stores'
import { createTable } from '@/utils'
import { ref, toRaw } from 'vue'
const store = useStore()
const displayStore = useDisplayStore()
Expand Down
12 changes: 6 additions & 6 deletions src/components/CodemirrorEditor/UploadImgDialog.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script setup lang="ts">
import { nextTick, onBeforeMount, ref, watch } from 'vue'
import { ElMessage } from 'element-plus'
import { UploadFilled } from '@element-plus/icons-vue'
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog'
import { useDisplayStore } from '@/stores'
import { checkImage, removeLeft } from '@/utils'
import { UploadFilled } from '@element-plus/icons-vue'
import CodeMirror from 'codemirror'
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog'
import { checkImage, removeLeft } from '@/utils'
import { useDisplayStore } from '@/stores'
import { ElMessage } from 'element-plus'
import { nextTick, onBeforeMount, ref, watch } from 'vue'
const emit = defineEmits([`uploadImage`])
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/button/Button.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { Primitive, type PrimitiveProps } from 'radix-vue'
import { type ButtonVariants, buttonVariants } from '.'
import { cn } from '@/lib/utils'
interface Props extends PrimitiveProps {
variant?: ButtonVariants[`variant`]
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/button/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type VariantProps, cva } from 'class-variance-authority'
import { cva, type VariantProps } from 'class-variance-authority'

export { default as Button } from './Button.vue'

Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/context-menu/ContextMenu.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { ContextMenuRoot, useForwardPropsEmits } from 'radix-vue'
import type { ContextMenuRootEmits, ContextMenuRootProps } from 'radix-vue'
import { ContextMenuRoot, useForwardPropsEmits } from 'radix-vue'
const props = defineProps<ContextMenuRootProps>()
const emits = defineEmits<ContextMenuRootEmits>()
Expand Down
6 changes: 3 additions & 3 deletions src/components/ui/context-menu/ContextMenuCheckboxItem.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<script setup lang="ts">
import { type HTMLAttributes, computed } from 'vue'
import { cn } from '@/lib/utils'
import { Check } from 'lucide-vue-next'
import {
ContextMenuCheckboxItem,
type ContextMenuCheckboxItemEmits,
type ContextMenuCheckboxItemProps,
ContextMenuItemIndicator,
useForwardPropsEmits,
} from 'radix-vue'
import { Check } from 'lucide-vue-next'
import { cn } from '@/lib/utils'
import { computed, type HTMLAttributes } from 'vue'
const props = defineProps<ContextMenuCheckboxItemProps & { class?: HTMLAttributes[`class`] }>()
const emits = defineEmits<ContextMenuCheckboxItemEmits>()
Expand Down
4 changes: 2 additions & 2 deletions src/components/ui/context-menu/ContextMenuContent.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script setup lang="ts">
import { type HTMLAttributes, computed } from 'vue'
import { cn } from '@/lib/utils'
import {
ContextMenuContent,
type ContextMenuContentEmits,
type ContextMenuContentProps,
ContextMenuPortal,
useForwardPropsEmits,
} from 'radix-vue'
import { cn } from '@/lib/utils'
import { computed, type HTMLAttributes } from 'vue'
const props = defineProps<ContextMenuContentProps & { class?: HTMLAttributes[`class`] }>()
const emits = defineEmits<ContextMenuContentEmits>()
Expand Down
4 changes: 2 additions & 2 deletions src/components/ui/context-menu/ContextMenuItem.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script setup lang="ts">
import { type HTMLAttributes, computed } from 'vue'
import { cn } from '@/lib/utils'
import {
ContextMenuItem,
type ContextMenuItemEmits,
type ContextMenuItemProps,
useForwardPropsEmits,
} from 'radix-vue'
import { cn } from '@/lib/utils'
import { computed, type HTMLAttributes } from 'vue'
const props = defineProps<ContextMenuItemProps & { class?: HTMLAttributes[`class`], inset?: boolean }>()
const emits = defineEmits<ContextMenuItemEmits>()
Expand Down
4 changes: 2 additions & 2 deletions src/components/ui/context-menu/ContextMenuLabel.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { type HTMLAttributes, computed } from 'vue'
import { ContextMenuLabel, type ContextMenuLabelProps } from 'radix-vue'
import { cn } from '@/lib/utils'
import { ContextMenuLabel, type ContextMenuLabelProps } from 'radix-vue'
import { computed, type HTMLAttributes } from 'vue'
const props = defineProps<ContextMenuLabelProps & { class?: HTMLAttributes[`class`], inset?: boolean }>()
Expand Down
Loading

0 comments on commit 00be7eb

Please sign in to comment.