cosey 0.9.4 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/components/audio-card/audio-card.js +1 -1
- package/components/close/close.js +1 -1
- package/components/col/col.api.d.ts +1 -1
- package/components/context-menu/content.js +1 -1
- package/components/dnd-sort/dnd-sort-item.js +1 -1
- package/components/editor/button-group.d.ts +2 -0
- package/components/editor/button-group.js +20 -0
- package/components/editor/button-select.d.ts +14 -0
- package/components/editor/button-select.js +51 -0
- package/components/editor/button-split.d.ts +25 -0
- package/components/editor/button-split.js +68 -0
- package/components/editor/button.d.ts +19 -0
- package/components/editor/button.js +40 -0
- package/components/editor/contents/content-code-block.d.ts +18 -0
- package/components/editor/contents/content-code-block.js +47 -0
- package/components/editor/contents/content-formula.d.ts +12 -0
- package/components/editor/contents/content-formula.js +48 -0
- package/components/editor/contents/content-formula.style.js +14 -0
- package/components/editor/contents/content-image.d.ts +29 -0
- package/components/editor/contents/content-image.js +89 -0
- package/components/editor/{components/list/list.style.d.ts → contents/content-image.style.d.ts} +1 -1
- package/components/editor/contents/content-image.style.js +20 -0
- package/components/editor/contents/content-link.d.ts +16 -0
- package/components/editor/contents/content-link.js +74 -0
- package/components/editor/contents/content-link.stye.d.ts +4 -0
- package/components/editor/contents/content-link.stye.js +17 -0
- package/components/editor/contents/content-list-item.d.ts +21 -0
- package/components/editor/contents/content-list-item.js +41 -0
- package/components/editor/contents/content-list-item.style.d.ts +4 -0
- package/components/editor/contents/content-list-item.style.js +52 -0
- package/components/editor/contents/content-placeholder.d.ts +2 -0
- package/components/editor/contents/content-placeholder.js +24 -0
- package/components/editor/contents/content-placeholder.style.d.ts +4 -0
- package/components/editor/contents/content-placeholder.style.js +19 -0
- package/components/editor/contents/content-table.d.ts +2 -0
- package/components/editor/contents/content-table.js +133 -0
- package/components/editor/contents/content-table.style.d.ts +4 -0
- package/components/editor/contents/content-table.style.js +21 -0
- package/components/editor/contents/content-video.d.ts +26 -0
- package/components/editor/contents/content-video.js +73 -0
- package/components/editor/contents/content-video.style.d.ts +4 -0
- package/components/editor/contents/content-video.style.js +20 -0
- package/components/editor/contents/resize.d.ts +37 -0
- package/components/editor/contents/resize.js +133 -0
- package/components/editor/{components/resize → contents}/resize.style.d.ts +1 -1
- package/components/editor/{components/resize → contents}/resize.style.js +14 -34
- package/components/editor/contents/upload.d.ts +17 -0
- package/components/editor/contents/upload.js +80 -0
- package/components/editor/contents/upload.style.d.ts +4 -0
- package/components/editor/contents/upload.style.js +38 -0
- package/components/editor/contents/widget-popover.d.ts +389 -0
- package/components/editor/contents/widget-popover.js +36 -0
- package/components/editor/contents/widget-popover.style.d.ts +4 -0
- package/components/editor/contents/widget-popover.style.js +15 -0
- package/components/editor/editor.api.d.ts +14 -6
- package/components/editor/editor.api.js +10 -6
- package/components/editor/editor.d.ts +15 -8
- package/components/editor/editor.js +178 -76
- package/components/editor/editor.style.d.ts +5 -1
- package/components/editor/editor.style.js +120 -253
- package/components/editor/{components/color-picker/color-picker.js → formats/color-picker.api.js} +3 -3
- package/components/editor/formats/color-picker.d.ts +20 -0
- package/components/editor/formats/color-picker.js +154 -0
- package/components/editor/{components/color-picker → formats}/color-picker.style.d.ts +1 -1
- package/components/editor/{components/color-picker → formats}/color-picker.style.js +1 -1
- package/components/editor/formats/format-align.d.ts +22 -0
- package/components/editor/formats/format-align.js +38 -0
- package/components/editor/formats/format-background.d.ts +2 -0
- package/components/editor/formats/format-background.js +60 -0
- package/components/editor/formats/format-block-quote.d.ts +2 -0
- package/components/editor/formats/format-block-quote.js +27 -0
- package/components/editor/formats/format-clear.d.ts +2 -0
- package/components/editor/formats/format-clear.js +25 -0
- package/components/editor/formats/format-code-block.d.ts +2 -0
- package/components/editor/formats/format-code-block.js +27 -0
- package/components/editor/formats/format-color.d.ts +2 -0
- package/components/editor/formats/format-color.js +59 -0
- package/components/editor/formats/format-font.d.ts +2 -0
- package/components/editor/formats/format-font.js +46 -0
- package/components/editor/formats/format-formula.d.ts +2 -0
- package/components/editor/formats/format-formula.js +133 -0
- package/components/editor/formats/format-heading.d.ts +2 -0
- package/components/editor/formats/format-heading.js +52 -0
- package/components/editor/formats/format-image.d.ts +2 -0
- package/components/editor/formats/format-image.js +140 -0
- package/components/editor/formats/format-indent.d.ts +20 -0
- package/components/editor/formats/format-indent.js +35 -0
- package/components/editor/formats/format-link.d.ts +2 -0
- package/components/editor/formats/format-link.js +114 -0
- package/components/editor/formats/format-list.d.ts +22 -0
- package/components/editor/formats/format-list.js +39 -0
- package/components/editor/formats/format-mark.d.ts +20 -0
- package/components/editor/formats/format-mark.js +38 -0
- package/components/editor/formats/format-size-delta.d.ts +24 -0
- package/components/editor/formats/format-size-delta.js +43 -0
- package/components/editor/formats/format-size.d.ts +2 -0
- package/components/editor/formats/format-size.js +51 -0
- package/components/editor/formats/format-source.d.ts +2 -0
- package/components/editor/formats/format-source.js +69 -0
- package/components/editor/formats/format-table.d.ts +2 -0
- package/components/editor/formats/format-table.js +85 -0
- package/components/editor/formats/format-table.style.d.ts +4 -0
- package/components/editor/{components/toolbar/formats/table.style.js → formats/format-table.style.js} +2 -2
- package/components/editor/formats/format-video.d.ts +2 -0
- package/components/editor/formats/format-video.js +117 -0
- package/components/editor/formats/picker.d.ts +45 -0
- package/components/editor/formats/picker.js +91 -0
- package/components/editor/{components/picker → formats}/picker.style.d.ts +1 -1
- package/components/editor/{components/picker → formats}/picker.style.js +1 -1
- package/components/editor/formats/select-list.d.ts +28 -0
- package/components/editor/formats/select-list.js +47 -0
- package/components/editor/formats/select-list.style.d.ts +4 -0
- package/components/editor/{components/list/list.style.js → formats/select-list.style.js} +2 -2
- package/components/editor/formats/select.d.ts +32 -0
- package/components/editor/formats/select.js +61 -0
- package/components/editor/hooks/useBlockValueActive.d.ts +1 -0
- package/components/editor/hooks/useBlockValueActive.js +21 -0
- package/components/editor/hooks/useFocus.d.ts +5 -0
- package/components/editor/hooks/useFocus.js +18 -0
- package/components/editor/{components/color-picker → hooks}/useHistoryColor.js +1 -1
- package/components/editor/hooks/useMarkActive.d.ts +1 -0
- package/components/editor/hooks/useMarkActive.js +13 -0
- package/components/editor/hooks/useMarkValue.d.ts +1 -0
- package/components/editor/hooks/useMarkValue.js +21 -0
- package/components/editor/index.d.ts +25 -13
- package/components/editor/index.js +3 -21
- package/components/editor/plugins/align.d.ts +8 -0
- package/components/editor/plugins/align.js +13 -0
- package/components/editor/plugins/background.d.ts +7 -0
- package/components/editor/plugins/background.js +19 -0
- package/components/editor/plugins/block-quote.d.ts +8 -0
- package/components/editor/plugins/block-quote.js +34 -0
- package/components/editor/plugins/clear.d.ts +7 -0
- package/components/editor/plugins/clear.js +53 -0
- package/components/editor/plugins/code-block.d.ts +13 -0
- package/components/editor/plugins/code-block.js +348 -0
- package/components/editor/plugins/color.d.ts +7 -0
- package/components/editor/plugins/color.js +21 -0
- package/components/editor/plugins/font.d.ts +7 -0
- package/components/editor/plugins/font.js +17 -0
- package/components/editor/plugins/formula.d.ts +11 -0
- package/components/editor/{components/toolbar/formats → plugins}/formula.js +50 -1
- package/components/editor/plugins/heading.d.ts +9 -0
- package/components/editor/plugins/heading.js +70 -0
- package/components/editor/plugins/html.d.ts +7 -0
- package/components/editor/plugins/html.js +30 -0
- package/components/editor/plugins/image.d.ts +8 -0
- package/components/editor/plugins/image.js +63 -0
- package/components/editor/plugins/indent.d.ts +7 -0
- package/components/editor/plugins/indent.js +47 -0
- package/components/editor/plugins/index.d.ts +2 -0
- package/components/editor/plugins/index.js +50 -0
- package/components/editor/plugins/keyboard.d.ts +41 -0
- package/components/editor/plugins/keyboard.js +120 -0
- package/components/editor/plugins/link.d.ts +8 -0
- package/components/editor/plugins/link.js +56 -0
- package/components/editor/plugins/list/deserialize.d.ts +3 -0
- package/components/editor/plugins/list/deserialize.js +106 -0
- package/components/editor/plugins/list/format.d.ts +3 -0
- package/components/editor/plugins/list/format.js +155 -0
- package/components/editor/plugins/list/indent.d.ts +2 -0
- package/components/editor/plugins/list/indent.js +38 -0
- package/components/editor/plugins/list/index.d.ts +10 -0
- package/components/editor/plugins/list/index.js +61 -0
- package/components/editor/plugins/list/insert-break.d.ts +2 -0
- package/components/editor/plugins/list/insert-break.js +19 -0
- package/components/editor/plugins/list/normalize.d.ts +3 -0
- package/components/editor/plugins/list/normalize.js +168 -0
- package/components/editor/plugins/list/serialize.d.ts +3 -0
- package/components/editor/plugins/list/serialize.js +63 -0
- package/components/editor/plugins/list/utils.d.ts +6 -0
- package/components/editor/plugins/list/utils.js +24 -0
- package/components/editor/plugins/mark.d.ts +7 -0
- package/components/editor/plugins/mark.js +27 -0
- package/components/editor/plugins/render.d.ts +11 -0
- package/components/editor/plugins/render.js +54 -0
- package/components/editor/plugins/serialize.d.ts +10 -0
- package/components/editor/plugins/serialize.js +342 -0
- package/components/editor/plugins/size.d.ts +8 -0
- package/components/editor/plugins/size.js +47 -0
- package/components/editor/plugins/table.d.ts +21 -0
- package/components/editor/plugins/table.js +702 -0
- package/components/editor/plugins/video.d.ts +8 -0
- package/components/editor/plugins/video.js +40 -0
- package/components/editor/toolbar.d.ts +2 -0
- package/components/editor/toolbar.js +20 -0
- package/components/editor/types.d.ts +194 -0
- package/components/editor/types.js +55 -0
- package/components/editor/usePopoverContainer.d.ts +8 -0
- package/components/editor/usePopoverContainer.js +31 -0
- package/components/editor/utils.d.ts +77 -0
- package/components/editor/utils.js +165 -0
- package/components/field/components/checkbox-group/checkbox-group.vue.js +1 -1
- package/components/field/components/editor/editor.d.ts +16 -0
- package/components/field/components/editor/editor.vue.d.ts +4 -0
- package/components/field/components/editor/editor.vue.js +21 -0
- package/components/field/components/password/password.vue.js +1 -1
- package/components/field/components/select/select.vue.js +1 -1
- package/components/field/field.api.d.ts +3 -0
- package/components/field/field.api.js +18 -16
- package/components/file-card/file-card.js +1 -1
- package/components/form/form-item.vue.js +2 -2
- package/components/form/form.api.d.ts +3 -3
- package/components/form/form.api.js +1 -1
- package/components/form/form.d.ts +6 -6
- package/components/form/index.d.ts +17 -17
- package/components/form/useBubbleTemplate.js +1 -1
- package/components/form-dialog/form-dialog.api.js +1 -1
- package/components/form-dialog/form-dialog.d.ts +5 -5
- package/components/form-drawer/form-drawer.d.ts +5 -5
- package/components/form-drawer/index.d.ts +15 -15
- package/components/form-group/form-group.api.d.ts +9 -4
- package/components/form-group/form-group.api.js +4 -1
- package/components/form-group/form-group.d.ts +8 -2
- package/components/form-group/form-group.js +13 -3
- package/components/form-group/form-group.style.js +5 -0
- package/components/form-group/index.d.ts +12 -3
- package/components/form-list/index.d.ts +5 -5
- package/components/form-query/form-query.d.ts +5 -5
- package/components/form-query/form-query.js +1 -1
- package/components/form-query/index.d.ts +15 -15
- package/components/highlight/highlight.api.d.ts +30 -12
- package/components/highlight/highlight.api.js +3 -19
- package/components/highlight/highlight.d.ts +7 -3
- package/components/highlight/highlight.js +4 -5
- package/components/highlight/highlight.style.js +285 -50
- package/components/highlight/index.d.ts +15 -6
- package/components/highlight/index.js +1 -1
- package/components/icon/icon.api.d.ts +11 -0
- package/components/icon/icon.api.js +10 -0
- package/components/icon/icon.d.ts +16 -5
- package/components/icon/icon.js +59 -0
- package/components/icon/icon.style.d.ts +4 -0
- package/components/icon/{style/index.js → icon.style.js} +1 -1
- package/components/icon/index.d.ts +24 -7
- package/components/icon/index.js +2 -1
- package/components/iconify-icon/iconify-icon.api.d.ts +15 -0
- package/components/iconify-icon/iconify-icon.api.js +20 -0
- package/components/iconify-icon/iconify-icon.d.ts +21 -6
- package/components/iconify-icon/iconify-icon.js +22 -8
- package/components/iconify-icon/index.d.ts +37 -4
- package/components/iconify-icon/index.js +2 -2
- package/components/index.d.ts +1 -0
- package/components/index.js +5 -4
- package/components/input-number-range/index.d.ts +39 -30
- package/components/input-number-range/input-number-range.api.d.ts +10 -10
- package/components/input-number-range/input-number-range.d.ts +23 -20
- package/components/input-number-range/input-number-range.js +1 -1
- package/components/snug-menu/snug-menu-item.vue.js +2 -2
- package/components/stack-dialog/index.d.ts +3 -3
- package/components/stack-dialog/stack-dialog.d.ts +1 -1
- package/components/svg-icon/index.d.ts +16 -4
- package/components/svg-icon/index.js +2 -1
- package/components/svg-icon/svg-icon.api.d.ts +7 -0
- package/components/svg-icon/svg-icon.api.js +7 -0
- package/components/svg-icon/svg-icon.d.ts +10 -3
- package/components/svg-icon/svg-icon.js +18 -0
- package/components/table/index.d.ts +12 -12
- package/components/table/table-column/table-column.js +1 -1
- package/components/table/table-export/table-export.d.ts +5 -5
- package/components/table/table-query/table-query.d.ts +5 -5
- package/components/table/table.d.ts +5 -5
- package/components/table/table.js +1 -1
- package/components/table/table.vue.d.ts +7 -7
- package/components/table/table.vue.js +5 -5
- package/components/table-action/item.js +1 -1
- package/components/toggle/toggle.js +1 -1
- package/components/upload/index.d.ts +3 -4
- package/components/upload/index.js +0 -1
- package/components/upload/upload-item.js +1 -1
- package/components/upload/upload.api.d.ts +2 -2
- package/components/upload/upload.d.ts +2 -2
- package/components/upload/upload.js +4 -4
- package/components/video-card/video-card.js +1 -1
- package/config/root-config-provider.js +2 -2
- package/{components/upload-context.d.ts → config/upload.d.ts} +2 -2
- package/{components/upload-context.js → config/upload.js} +3 -3
- package/hooks/index.d.ts +2 -0
- package/hooks/index.js +2 -0
- package/hooks/useObjectUrl.d.ts +2 -0
- package/hooks/useObjectUrl.js +27 -0
- package/hooks/useSingleUpload.d.ts +15 -0
- package/hooks/useSingleUpload.js +64 -0
- package/layout/layout-menu/style/index.js +1 -1
- package/locale/lang/ar.d.ts +2 -0
- package/locale/lang/ar.js +3 -1
- package/locale/lang/en.d.ts +2 -0
- package/locale/lang/en.js +3 -1
- package/locale/lang/zh-cn.d.ts +2 -0
- package/locale/lang/zh-cn.js +3 -1
- package/package.json +11 -7
- package/utils/array.d.ts +1 -1
- package/utils/browser.d.ts +1 -0
- package/utils/browser.js +3 -2
- package/utils/file.d.ts +5 -0
- package/utils/file.js +24 -1
- package/utils/index.js +2 -2
- package/utils/url.d.ts +4 -0
- package/utils/url.js +10 -0
- package/components/editor/components/button-group.vue.d.ts +0 -12
- package/components/editor/components/button-group.vue.js +0 -19
- package/components/editor/components/button.vue.d.ts +0 -17
- package/components/editor/components/button.vue.js +0 -35
- package/components/editor/components/color-picker/color-picker.vue.d.ts +0 -23
- package/components/editor/components/color-picker/color-picker.vue.js +0 -181
- package/components/editor/components/list/list.d.ts +0 -6
- package/components/editor/components/list/list.vue.d.ts +0 -11
- package/components/editor/components/list/list.vue.js +0 -51
- package/components/editor/components/picker/picker.vue.d.ts +0 -25
- package/components/editor/components/picker/picker.vue.js +0 -95
- package/components/editor/components/resize/resize.d.ts +0 -23
- package/components/editor/components/resize/resize.js +0 -88
- package/components/editor/components/resize/resize.vue.d.ts +0 -2
- package/components/editor/components/resize/resize.vue.js +0 -204
- package/components/editor/components/select-button.vue.d.ts +0 -15
- package/components/editor/components/select-button.vue.js +0 -46
- package/components/editor/components/select.vue.d.ts +0 -14
- package/components/editor/components/select.vue.js +0 -67
- package/components/editor/components/split-button.vue.d.ts +0 -22
- package/components/editor/components/split-button.vue.js +0 -69
- package/components/editor/components/table-toolbar/table-toolbar.style.d.ts +0 -4
- package/components/editor/components/table-toolbar/table-toolbar.style.js +0 -22
- package/components/editor/components/table-toolbar/table-toolbar.vue.d.ts +0 -2
- package/components/editor/components/table-toolbar/table-toolbar.vue.js +0 -182
- package/components/editor/components/toolbar/formats/align.vue.d.ts +0 -5
- package/components/editor/components/toolbar/formats/align.vue.js +0 -52
- package/components/editor/components/toolbar/formats/background.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/background.vue.js +0 -70
- package/components/editor/components/toolbar/formats/blockquote.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/blockquote.vue.js +0 -39
- package/components/editor/components/toolbar/formats/bold.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/bold.vue.js +0 -39
- package/components/editor/components/toolbar/formats/clean.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/clean.vue.js +0 -26
- package/components/editor/components/toolbar/formats/code-block.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/code-block.vue.js +0 -39
- package/components/editor/components/toolbar/formats/code.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/code.vue.js +0 -39
- package/components/editor/components/toolbar/formats/color.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/color.vue.js +0 -69
- package/components/editor/components/toolbar/formats/font.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/font.vue.js +0 -59
- package/components/editor/components/toolbar/formats/formula.d.ts +0 -4
- package/components/editor/components/toolbar/formats/formula.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/formula.vue.js +0 -154
- package/components/editor/components/toolbar/formats/header.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/header.vue.js +0 -68
- package/components/editor/components/toolbar/formats/image.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/image.vue.js +0 -26
- package/components/editor/components/toolbar/formats/indent.vue.d.ts +0 -5
- package/components/editor/components/toolbar/formats/indent.vue.js +0 -36
- package/components/editor/components/toolbar/formats/italic.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/italic.vue.js +0 -39
- package/components/editor/components/toolbar/formats/link.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/link.vue.js +0 -218
- package/components/editor/components/toolbar/formats/list.vue.d.ts +0 -5
- package/components/editor/components/toolbar/formats/list.vue.js +0 -50
- package/components/editor/components/toolbar/formats/script.vue.d.ts +0 -5
- package/components/editor/components/toolbar/formats/script.vue.js +0 -50
- package/components/editor/components/toolbar/formats/size-delta.vue.d.ts +0 -5
- package/components/editor/components/toolbar/formats/size-delta.vue.js +0 -79
- package/components/editor/components/toolbar/formats/size.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/size.vue.js +0 -56
- package/components/editor/components/toolbar/formats/source.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/source.vue.js +0 -78
- package/components/editor/components/toolbar/formats/strike.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/strike.vue.js +0 -39
- package/components/editor/components/toolbar/formats/strikethrough.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/strikethrough.vue.js +0 -39
- package/components/editor/components/toolbar/formats/table.style.d.ts +0 -4
- package/components/editor/components/toolbar/formats/table.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/table.vue.js +0 -100
- package/components/editor/components/toolbar/formats/underline.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/underline.vue.js +0 -39
- package/components/editor/components/toolbar/formats/video.vue.d.ts +0 -2
- package/components/editor/components/toolbar/formats/video.vue.js +0 -123
- package/components/editor/components/toolbar/toolbar.d.ts +0 -36
- package/components/editor/components/toolbar/toolbar.js +0 -137
- package/components/editor/components/toolbar/toolbar.vue.d.ts +0 -3
- package/components/editor/components/toolbar/toolbar.vue.js +0 -130
- package/components/editor/components/toolbar/toolbarContext.d.ts +0 -8
- package/components/editor/components/toolbar/toolbarContext.js +0 -3
- package/components/editor/formats/align.d.ts +0 -2
- package/components/editor/formats/align.js +0 -6
- package/components/editor/formats/font.d.ts +0 -7
- package/components/editor/formats/font.js +0 -36
- package/components/editor/formats/formula.d.ts +0 -9
- package/components/editor/formats/formula.js +0 -29
- package/components/editor/formats/image.d.ts +0 -13
- package/components/editor/formats/image.js +0 -46
- package/components/editor/formats/indent.d.ts +0 -10
- package/components/editor/formats/indent.js +0 -37
- package/components/editor/formats/kbd.d.ts +0 -7
- package/components/editor/formats/kbd.js +0 -13
- package/components/editor/formats/link.d.ts +0 -28
- package/components/editor/formats/link.js +0 -51
- package/components/editor/formats/list.d.ts +0 -13
- package/components/editor/formats/list.js +0 -57
- package/components/editor/formats/size.d.ts +0 -3
- package/components/editor/formats/size.js +0 -9
- package/components/editor/formats/video.d.ts +0 -16
- package/components/editor/formats/video.js +0 -44
- package/components/editor/modules/custom-list.d.ts +0 -5
- package/components/editor/modules/custom-list.js +0 -23
- package/components/editor/modules/image-uploader/formats/image-loading.d.ts +0 -16
- package/components/editor/modules/image-uploader/formats/image-loading.js +0 -31
- package/components/editor/modules/image-uploader/formats/image-loading.style.d.ts +0 -2
- package/components/editor/modules/image-uploader/formats/image-loading.style.js +0 -46
- package/components/editor/modules/image-uploader/image-uploader.d.ts +0 -18
- package/components/editor/modules/image-uploader/image-uploader.js +0 -134
- package/components/editor/modules/syntax/index.d.ts +0 -2
- package/components/editor/modules/syntax/index.js +0 -1
- package/components/editor/modules/syntax/syntaxOptions.d.ts +0 -8
- package/components/editor/modules/syntax/syntaxOptions.js +0 -23
- package/components/editor/quill.d.ts +0 -1
- package/components/editor/quill.js +0 -33
- package/components/editor/quillContext.d.ts +0 -6
- package/components/editor/quillContext.js +0 -3
- package/components/icon/icon.vue.d.ts +0 -13
- package/components/icon/icon.vue.js +0 -76
- package/components/iconify-icon/iconify-icon.vue.d.ts +0 -3
- package/components/iconify-icon/iconify-icon.vue.js +0 -38
- package/components/svg-icon/svg-icon.vue.d.ts +0 -3
- package/components/svg-icon/svg-icon.vue.js +0 -29
- /package/components/{icon/style/index.d.ts → editor/contents/content-formula.style.d.ts} +0 -0
- /package/components/editor/{components/color-picker/color-picker.d.ts → formats/color-picker.api.d.ts} +0 -0
- /package/components/editor/{components/picker/picker.d.ts → formats/picker.api.d.ts} +0 -0
- /package/components/editor/{components/picker/picker.js → formats/picker.api.js} +0 -0
- /package/components/editor/{components/color-picker → hooks}/useHistoryColor.d.ts +0 -0
- /package/components/{editor/components/list/list.js → field/components/editor/editor.js} +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { withInstall } from '../utils.js';
|
|
2
2
|
import stdin_default$1 from './upload.js';
|
|
3
3
|
export { uploadEmits, uploadItemEmits, uploadItemProps, uploadProps, uploadSlots } from './upload.api.js';
|
|
4
|
-
export { useUpload, useUploadProvide } from '../upload-context.js';
|
|
5
4
|
|
|
6
5
|
const _Upload = withInstall(stdin_default$1);
|
|
7
6
|
var stdin_default = _Upload;
|
|
@@ -2,7 +2,7 @@ import { defineComponent, computed, createVNode, Transition, isVNode } from 'vue
|
|
|
2
2
|
import { ElProgress, ElButton } from 'element-plus';
|
|
3
3
|
import { uploadItemEmits, uploadItemProps } from './upload.api.js';
|
|
4
4
|
import { MediaCard as _MediaCard } from '../media-card/index.js';
|
|
5
|
-
import stdin_default$1 from '../icon/icon.
|
|
5
|
+
import stdin_default$1 from '../icon/icon.js';
|
|
6
6
|
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
7
7
|
import { useLocale } from '../../hooks/useLocale.js';
|
|
8
8
|
import { isString } from '../../utils/is.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type AxiosRequestConfig } from 'axios';
|
|
2
2
|
import { type MediaCardBaseProps } from '../media-card';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { ExtractPropTypes, PropType, SlotsType } from 'vue';
|
|
4
|
+
import { type UploadContext } from '../../config/upload';
|
|
5
5
|
export type UploadFileStatus = 'unready' | 'ready' | 'loading' | 'success' | 'error';
|
|
6
6
|
export interface UploadFile {
|
|
7
7
|
status: UploadFileStatus;
|
|
@@ -34,7 +34,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
34
34
|
default: "large";
|
|
35
35
|
};
|
|
36
36
|
request: {
|
|
37
|
-
type: import("vue").PropType<import("
|
|
37
|
+
type: import("vue").PropType<import("../../config/upload").UploadContext["request"]>;
|
|
38
38
|
};
|
|
39
39
|
requestConfig: {
|
|
40
40
|
type: import("vue").PropType<import("axios").AxiosRequestConfig>;
|
|
@@ -82,7 +82,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
82
82
|
default: "large";
|
|
83
83
|
};
|
|
84
84
|
request: {
|
|
85
|
-
type: import("vue").PropType<import("
|
|
85
|
+
type: import("vue").PropType<import("../../config/upload").UploadContext["request"]>;
|
|
86
86
|
};
|
|
87
87
|
requestConfig: {
|
|
88
88
|
type: import("vue").PropType<import("axios").AxiosRequestConfig>;
|
|
@@ -3,9 +3,9 @@ import { uploadEmits, uploadSlots, uploadProps } from './upload.api.js';
|
|
|
3
3
|
import { useFormItem, CHANGE_EVENT, ElMessage } from 'element-plus';
|
|
4
4
|
import stdin_default$2 from './upload-item.js';
|
|
5
5
|
import { TransitionGroup as _TransitionGroup } from '../transition-group/index.js';
|
|
6
|
-
import stdin_default$3 from '../icon/icon.
|
|
6
|
+
import stdin_default$3 from '../icon/icon.js';
|
|
7
7
|
import stdin_default$1 from './upload.style.js';
|
|
8
|
-
import {
|
|
8
|
+
import { injectUploadConfig } from '../../config/upload.js';
|
|
9
9
|
import { getFileType, chooseFiles } from '../../utils/file.js';
|
|
10
10
|
import { useLocale } from '../../hooks/useLocale.js';
|
|
11
11
|
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
@@ -37,7 +37,7 @@ var stdin_default = defineComponent({
|
|
|
37
37
|
} = stdin_default$1(prefixCls);
|
|
38
38
|
const {
|
|
39
39
|
request
|
|
40
|
-
} =
|
|
40
|
+
} = injectUploadConfig() || {};
|
|
41
41
|
const mergedLimit = computed(() => props.single ? 1 : props.limit);
|
|
42
42
|
const mergedMultiple = computed(() => props.single ? false : props.multiple);
|
|
43
43
|
const fileList = ref([]);
|
|
@@ -48,7 +48,7 @@ var stdin_default = defineComponent({
|
|
|
48
48
|
} = useFormItem();
|
|
49
49
|
watch(() => props.modelValue, () => {
|
|
50
50
|
if (props.validateEvent) {
|
|
51
|
-
formItem?.validate?.(CHANGE_EVENT).catch(
|
|
51
|
+
formItem?.validate?.(CHANGE_EVENT).catch(debugWarn);
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
watch(() => props.modelValue, newValue => {
|
|
@@ -2,7 +2,7 @@ import { defineComponent, ref, createVNode, Fragment, mergeProps } from 'vue';
|
|
|
2
2
|
import { videoCardEmits, videoCardProps } from './video-card.api.js';
|
|
3
3
|
import { useLockscreen } from 'element-plus';
|
|
4
4
|
import stdin_default$3 from '../video-viewer/video-viewer.js';
|
|
5
|
-
import stdin_default$2 from '../icon/icon.
|
|
5
|
+
import stdin_default$2 from '../icon/icon.js';
|
|
6
6
|
import stdin_default$1 from './video-card.style.js';
|
|
7
7
|
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
8
8
|
|
|
@@ -6,8 +6,8 @@ import stdin_default$1 from './nprogress.style.js';
|
|
|
6
6
|
import 'element-plus/dist/index.css';
|
|
7
7
|
import 'element-plus/theme-chalk/dark/css-vars.css';
|
|
8
8
|
import { ElConfigProvider } from 'element-plus';
|
|
9
|
+
import { provideUploadConfig } from './upload.js';
|
|
9
10
|
import { useColorSchemeProvide } from '../hooks/useColorScheme.js';
|
|
10
|
-
import { useUploadProvide } from '../components/upload-context.js';
|
|
11
11
|
import { containerContextKey } from '../components/container/container.api.js';
|
|
12
12
|
import { useStackDialogProvide } from '../components/stack-dialog/stack-dialog.api.js';
|
|
13
13
|
import { ConfigProvider as _ConfigProvider } from '../components/config-provider/index.js';
|
|
@@ -37,7 +37,7 @@ var stdin_default = defineComponent({
|
|
|
37
37
|
const apiConfig = useGlobalConfig()?.api;
|
|
38
38
|
if (apiConfig) {
|
|
39
39
|
const uploadApi = apiConfig.upload?.();
|
|
40
|
-
|
|
40
|
+
provideUploadConfig({
|
|
41
41
|
request: uploadApi
|
|
42
42
|
});
|
|
43
43
|
}
|
|
@@ -2,5 +2,5 @@ import type { AxiosRequestConfig } from 'axios';
|
|
|
2
2
|
export interface UploadContext {
|
|
3
3
|
request?: (data: Blob, config?: AxiosRequestConfig, extra?: Record<PropertyKey, any>) => Promise<string>;
|
|
4
4
|
}
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
5
|
+
export declare const provideUploadConfig: (context: UploadContext) => void;
|
|
6
|
+
export declare const injectUploadConfig: () => UploadContext | null;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { inject, provide } from 'vue';
|
|
2
2
|
|
|
3
3
|
const uploadContextKey = Symbol("uploadContext");
|
|
4
|
-
const
|
|
4
|
+
const provideUploadConfig = (context) => {
|
|
5
5
|
provide(uploadContextKey, context);
|
|
6
6
|
};
|
|
7
|
-
const
|
|
7
|
+
const injectUploadConfig = () => {
|
|
8
8
|
return inject(uploadContextKey, null);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
export {
|
|
11
|
+
export { injectUploadConfig, provideUploadConfig };
|
package/hooks/index.d.ts
CHANGED
package/hooks/index.js
CHANGED
|
@@ -21,3 +21,5 @@ export { useOptionalComponent } from './useOptionalComponent.js';
|
|
|
21
21
|
export { useMounted } from './useMounted.js';
|
|
22
22
|
export { useDir } from './useDir.js';
|
|
23
23
|
export { defaultProps, useProps } from './useProps.js';
|
|
24
|
+
export { useSingleUpload } from './useSingleUpload.js';
|
|
25
|
+
export { useObjectUrl } from './useObjectUrl.js';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { shallowRef, onBeforeUnmount, watch, toValue, readonly } from 'vue';
|
|
2
|
+
|
|
3
|
+
function useObjectUrl(file) {
|
|
4
|
+
const url = shallowRef();
|
|
5
|
+
const revoke = () => {
|
|
6
|
+
if (url.value) {
|
|
7
|
+
URL.revokeObjectURL(url.value);
|
|
8
|
+
}
|
|
9
|
+
url.value = void 0;
|
|
10
|
+
};
|
|
11
|
+
onBeforeUnmount(() => {
|
|
12
|
+
revoke();
|
|
13
|
+
});
|
|
14
|
+
watch(
|
|
15
|
+
() => toValue(file),
|
|
16
|
+
(file2) => {
|
|
17
|
+
revoke();
|
|
18
|
+
if (file2) {
|
|
19
|
+
url.value = URL.createObjectURL(file2);
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{ immediate: true }
|
|
23
|
+
);
|
|
24
|
+
return readonly(url);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { useObjectUrl };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import { AxiosRequestConfig } from 'axios';
|
|
3
|
+
type UploadStatus = 'unsent' | 'senting' | 'success' | 'error';
|
|
4
|
+
interface UseUploadOptions {
|
|
5
|
+
onProgress?: (progress: number) => void;
|
|
6
|
+
onSuccess?: (url: string) => void;
|
|
7
|
+
onError?: (err: any) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function useSingleUpload(file: MaybeRefOrGetter<File | undefined | null>, options?: UseUploadOptions, requestConfig?: AxiosRequestConfig<any>, requestExtra?: Record<PropertyKey, any>): {
|
|
10
|
+
sent: () => Promise<void>;
|
|
11
|
+
cancel: () => void;
|
|
12
|
+
status: Readonly<import("vue").Ref<UploadStatus, UploadStatus>>;
|
|
13
|
+
progress: Readonly<import("vue").Ref<number, number>>;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ref, readonly, toValue } from 'vue';
|
|
2
|
+
import { injectUploadConfig } from '../config/upload.js';
|
|
3
|
+
import { warningOnce } from '../utils/warning.js';
|
|
4
|
+
|
|
5
|
+
function useSingleUpload(file, options = {}, requestConfig, requestExtra) {
|
|
6
|
+
const { onProgress, onSuccess, onError } = options;
|
|
7
|
+
const status = ref("unsent");
|
|
8
|
+
const progress = ref(0);
|
|
9
|
+
const { request } = injectUploadConfig() || {};
|
|
10
|
+
if (!request) {
|
|
11
|
+
warningOnce(!!request, 'The "request" api is required.');
|
|
12
|
+
}
|
|
13
|
+
let controller = null;
|
|
14
|
+
const cancel = () => {
|
|
15
|
+
if (status.value === "senting") {
|
|
16
|
+
controller?.abort();
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const sent = async () => {
|
|
20
|
+
try {
|
|
21
|
+
const _file = toValue(file);
|
|
22
|
+
if (!_file) {
|
|
23
|
+
throw new Error("file is required");
|
|
24
|
+
}
|
|
25
|
+
status.value = "senting";
|
|
26
|
+
progress.value = 0;
|
|
27
|
+
controller = new AbortController();
|
|
28
|
+
const url = await new Promise((resolve, reject) => {
|
|
29
|
+
return request?.(
|
|
30
|
+
_file,
|
|
31
|
+
{
|
|
32
|
+
...requestConfig,
|
|
33
|
+
signal: controller.signal,
|
|
34
|
+
onUploadProgress(event) {
|
|
35
|
+
if (event.total) {
|
|
36
|
+
progress.value = Math.floor(event.loaded / event.total * 100);
|
|
37
|
+
onProgress?.(progress.value);
|
|
38
|
+
}
|
|
39
|
+
requestConfig?.onUploadProgress?.(event);
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
requestExtra
|
|
43
|
+
).then((url2) => {
|
|
44
|
+
resolve(url2);
|
|
45
|
+
}).catch((err) => {
|
|
46
|
+
reject(err);
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
status.value = "success";
|
|
50
|
+
onSuccess?.(url);
|
|
51
|
+
} catch (err) {
|
|
52
|
+
status.value = "error";
|
|
53
|
+
onError?.(err);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
return {
|
|
57
|
+
sent,
|
|
58
|
+
cancel,
|
|
59
|
+
status: readonly(status),
|
|
60
|
+
progress: readonly(progress)
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { useSingleUpload };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getTruncateStyle } from '../../../components/style/mixins.js';
|
|
2
1
|
import { getSimpleStyleHook } from '../../../components/theme/getSimpleStyleHook.js';
|
|
2
|
+
import { getTruncateStyle } from '../../../components/style/mixins.js';
|
|
3
3
|
|
|
4
4
|
var stdin_default = getSimpleStyleHook("CoLayoutMenu", (token) => {
|
|
5
5
|
const { componentCls } = token;
|
package/locale/lang/ar.d.ts
CHANGED
|
@@ -48,12 +48,14 @@ declare const _default: {
|
|
|
48
48
|
edit: string;
|
|
49
49
|
insert: string;
|
|
50
50
|
link: string;
|
|
51
|
+
insertLink: string;
|
|
51
52
|
currentWindow: string;
|
|
52
53
|
newWindow: string;
|
|
53
54
|
sourceCode: string;
|
|
54
55
|
width: string;
|
|
55
56
|
height: string;
|
|
56
57
|
video: string;
|
|
58
|
+
image: string;
|
|
57
59
|
};
|
|
58
60
|
table: {
|
|
59
61
|
export: string;
|
package/locale/lang/ar.js
CHANGED
|
@@ -51,12 +51,14 @@ var stdin_default = {
|
|
|
51
51
|
edit: "\u062A\u0639\u062F\u064A\u0644",
|
|
52
52
|
insert: "\u0625\u062F\u0631\u0627\u062C",
|
|
53
53
|
link: "\u0631\u0627\u0628\u0637",
|
|
54
|
+
insertLink: "\u0625\u062F\u0631\u0627\u062C \u0631\u0627\u0628\u0637",
|
|
54
55
|
currentWindow: "\u0627\u0644\u0646\u0627\u0641\u0630\u0629 \u0627\u0644\u062D\u0627\u0644\u064A\u0629",
|
|
55
56
|
newWindow: "\u0646\u0627\u0641\u0630\u0629 \u062C\u062F\u064A\u062F\u0629",
|
|
56
57
|
sourceCode: "\u0627\u0644\u0643\u0648\u062F \u0627\u0644\u0645\u0635\u062F\u0631\u064A",
|
|
57
58
|
width: "\u0627\u0644\u0639\u0631\u0636",
|
|
58
59
|
height: "\u0627\u0644\u0627\u0631\u062A\u0641\u0627\u0639",
|
|
59
|
-
video: "\u0641\u064A\u062F\u064A\u0648"
|
|
60
|
+
video: "\u0641\u064A\u062F\u064A\u0648",
|
|
61
|
+
image: "\u0635\u0648\u0631\u0629"
|
|
60
62
|
},
|
|
61
63
|
table: {
|
|
62
64
|
export: "\u062A\u0635\u062F\u064A\u0631",
|
package/locale/lang/en.d.ts
CHANGED
|
@@ -48,12 +48,14 @@ declare const _default: {
|
|
|
48
48
|
edit: string;
|
|
49
49
|
insert: string;
|
|
50
50
|
link: string;
|
|
51
|
+
insertLink: string;
|
|
51
52
|
currentWindow: string;
|
|
52
53
|
newWindow: string;
|
|
53
54
|
sourceCode: string;
|
|
54
55
|
width: string;
|
|
55
56
|
height: string;
|
|
56
57
|
video: string;
|
|
58
|
+
image: string;
|
|
57
59
|
};
|
|
58
60
|
table: {
|
|
59
61
|
export: string;
|
package/locale/lang/en.js
CHANGED
|
@@ -51,12 +51,14 @@ var stdin_default = {
|
|
|
51
51
|
edit: "Edit",
|
|
52
52
|
insert: "Insert",
|
|
53
53
|
link: "Link",
|
|
54
|
+
insertLink: "Insert link",
|
|
54
55
|
currentWindow: "Current window",
|
|
55
56
|
newWindow: "New window",
|
|
56
57
|
sourceCode: "Source code",
|
|
57
58
|
width: "Width",
|
|
58
59
|
height: "Height",
|
|
59
|
-
video: "Video"
|
|
60
|
+
video: "Video",
|
|
61
|
+
image: "Image"
|
|
60
62
|
},
|
|
61
63
|
table: {
|
|
62
64
|
export: "Export",
|
package/locale/lang/zh-cn.d.ts
CHANGED
|
@@ -48,12 +48,14 @@ declare const _default: {
|
|
|
48
48
|
edit: string;
|
|
49
49
|
insert: string;
|
|
50
50
|
link: string;
|
|
51
|
+
insertLink: string;
|
|
51
52
|
currentWindow: string;
|
|
52
53
|
newWindow: string;
|
|
53
54
|
sourceCode: string;
|
|
54
55
|
width: string;
|
|
55
56
|
height: string;
|
|
56
57
|
video: string;
|
|
58
|
+
image: string;
|
|
57
59
|
};
|
|
58
60
|
table: {
|
|
59
61
|
export: string;
|
package/locale/lang/zh-cn.js
CHANGED
|
@@ -51,12 +51,14 @@ var stdin_default = {
|
|
|
51
51
|
edit: "\u7F16\u8F91",
|
|
52
52
|
insert: "\u63D2\u5165",
|
|
53
53
|
link: "\u94FE\u63A5",
|
|
54
|
+
insertLink: "\u63D2\u5165\u94FE\u63A5",
|
|
54
55
|
currentWindow: "\u5F53\u524D\u7A97\u53E3",
|
|
55
56
|
newWindow: "\u65B0\u7A97\u53E3",
|
|
56
57
|
sourceCode: "\u6E90\u7801",
|
|
57
58
|
width: "\u5BBD\u5EA6",
|
|
58
59
|
height: "\u9AD8\u5EA6",
|
|
59
|
-
video: "\u89C6\u9891"
|
|
60
|
+
video: "\u89C6\u9891",
|
|
61
|
+
image: "\u56FE\u7247"
|
|
60
62
|
},
|
|
61
63
|
table: {
|
|
62
64
|
export: "\u5BFC\u51FA",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cosey",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "基于 Vue3 + vite 的后台管理系统框架",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@casl/ability": "^6.7.3",
|
|
13
|
-
"@cosey/icons": "^0.1.
|
|
13
|
+
"@cosey/icons": "^0.1.7",
|
|
14
14
|
"@ctrl/tinycolor": "^4.1.0",
|
|
15
15
|
"@element-plus/icons-vue": "^2.3.1",
|
|
16
16
|
"@emotion/hash": "^0.9.2",
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
"@floating-ui/dom": "^1.6.13",
|
|
19
19
|
"@gunny/persist": "^1.0.2",
|
|
20
20
|
"@iconify/types": "^2.0.0",
|
|
21
|
+
"@types/is-hotkey": "^0.1.10",
|
|
21
22
|
"@types/nprogress": "^0.2.3",
|
|
23
|
+
"@types/prismjs": "^1.26.5",
|
|
22
24
|
"@types/stylis": "^4.2.7",
|
|
23
25
|
"@vue/shared": "^3.5.13",
|
|
24
26
|
"@vueuse/core": "^13.2.0",
|
|
@@ -28,14 +30,15 @@
|
|
|
28
30
|
"dayjs": "^1.11.13",
|
|
29
31
|
"echarts": "^5.6.0",
|
|
30
32
|
"element-plus": "^2.11.4",
|
|
31
|
-
"
|
|
33
|
+
"is-hotkey": "^0.2.0",
|
|
32
34
|
"jszip": "^3.10.1",
|
|
33
35
|
"katex": "^0.16.22",
|
|
34
36
|
"lodash-es": "^4.17.21",
|
|
35
37
|
"mime": "^4.0.7",
|
|
36
38
|
"nprogress": "^0.2.0",
|
|
37
39
|
"pinia": "^3.0.2",
|
|
38
|
-
"
|
|
40
|
+
"prismjs": "^1.30.0",
|
|
41
|
+
"slate-vue3": "^0.8.0",
|
|
39
42
|
"stylis": "^4.3.6",
|
|
40
43
|
"svga": "^2.1.1",
|
|
41
44
|
"vue": "^3.5.21",
|
|
@@ -44,7 +47,7 @@
|
|
|
44
47
|
},
|
|
45
48
|
"peerDependencies": {
|
|
46
49
|
"@casl/ability": "^6.7.3",
|
|
47
|
-
"@cosey/icons": "^0.1.
|
|
50
|
+
"@cosey/icons": "^0.1.7",
|
|
48
51
|
"@ctrl/tinycolor": "^4.1.0",
|
|
49
52
|
"@element-plus/icons-vue": "^2.3.1",
|
|
50
53
|
"@emotion/hash": "^0.9.2",
|
|
@@ -61,14 +64,15 @@
|
|
|
61
64
|
"dayjs": "^1.11.13",
|
|
62
65
|
"echarts": "^5.6.0",
|
|
63
66
|
"element-plus": "^2.10.4",
|
|
64
|
-
"
|
|
67
|
+
"is-hotkey": "^0.2.0",
|
|
65
68
|
"jszip": "^3.10.1",
|
|
66
69
|
"katex": "^0.16.22",
|
|
67
70
|
"lodash-es": "^4.17.21",
|
|
68
71
|
"mime": "^4.0.7",
|
|
69
72
|
"nprogress": "^0.2.0",
|
|
70
73
|
"pinia": "^3.0.2",
|
|
71
|
-
"
|
|
74
|
+
"prismjs": "^1.30.0",
|
|
75
|
+
"slate-vue3": "^0.8.0",
|
|
72
76
|
"stylis": "^4.3.6",
|
|
73
77
|
"svga": "^2.1.1",
|
|
74
78
|
"vue": "^3.5.21",
|
package/utils/array.d.ts
CHANGED
package/utils/browser.d.ts
CHANGED
package/utils/browser.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
function getControlKey() {
|
|
2
|
-
return
|
|
2
|
+
return IS_APPLE ? "\u2318" : "Ctrl";
|
|
3
3
|
}
|
|
4
|
+
const IS_APPLE = typeof navigator !== "undefined" && /Mac OS X/.test(navigator.userAgent);
|
|
4
5
|
|
|
5
|
-
export { getControlKey };
|
|
6
|
+
export { IS_APPLE, getControlKey };
|
package/utils/file.d.ts
CHANGED
|
@@ -20,3 +20,8 @@ export declare function readAsArrayBuffer(file: File): Promise<ArrayBuffer>;
|
|
|
20
20
|
export declare function downloadAttachment(response: AxiosResponse, options?: {
|
|
21
21
|
filename?: string;
|
|
22
22
|
}): void;
|
|
23
|
+
export declare const imageExtensions: string[];
|
|
24
|
+
/**
|
|
25
|
+
* 判断是否为图片地址
|
|
26
|
+
*/
|
|
27
|
+
export declare function isImageUrl(url: string): boolean;
|
package/utils/file.js
CHANGED
|
@@ -89,5 +89,28 @@ function downloadAttachment(response, options) {
|
|
|
89
89
|
window.URL.revokeObjectURL(link.href);
|
|
90
90
|
}, 100);
|
|
91
91
|
}
|
|
92
|
+
const imageExtensions = [
|
|
93
|
+
"jpg",
|
|
94
|
+
"jpeg",
|
|
95
|
+
"png",
|
|
96
|
+
"gif",
|
|
97
|
+
"webp",
|
|
98
|
+
"bmp",
|
|
99
|
+
"heic",
|
|
100
|
+
"heif",
|
|
101
|
+
"tiff",
|
|
102
|
+
"tif",
|
|
103
|
+
"svg",
|
|
104
|
+
"eps",
|
|
105
|
+
"ico"
|
|
106
|
+
];
|
|
107
|
+
function isImageUrl(url) {
|
|
108
|
+
try {
|
|
109
|
+
const ext = new URL(url).pathname.split(".").pop();
|
|
110
|
+
return !!ext && imageExtensions.includes(ext);
|
|
111
|
+
} catch {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
92
115
|
|
|
93
|
-
export { chooseFiles, downloadAttachment, getFileType, readAsArrayBuffer, readAsDataURL };
|
|
116
|
+
export { chooseFiles, downloadAttachment, getFileType, imageExtensions, isImageUrl, readAsArrayBuffer, readAsDataURL };
|
package/utils/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { arrayMove, isShallowEqual, omitUniqueKey, toArray } from './array.js';
|
|
2
2
|
export { getCssVarProp } from './bem.js';
|
|
3
|
-
export { getControlKey } from './browser.js';
|
|
3
|
+
export { IS_APPLE, getControlKey } from './browser.js';
|
|
4
4
|
export { getLabelByValue, getTreeLabelByValue } from './collection.js';
|
|
5
5
|
export { addPxUnit, cssObjectToString, getContextBoxWidth, getDir, getStyle, setStyle } from './css.js';
|
|
6
6
|
export { DATE_FORMAT, DATE_TIME_FORMAT, MONTH_FORMAT, TIME_FORMAT, YEAR_FORMAT, formatAsBasicDateTime, formatToDate, formatToDateTime, getDayjs } from './date.js';
|
|
7
7
|
export { exportExcel, flatColumns } from './excel/index.js';
|
|
8
|
-
export { chooseFiles, downloadAttachment, getFileType, readAsArrayBuffer, readAsDataURL } from './file.js';
|
|
8
|
+
export { chooseFiles, downloadAttachment, getFileType, imageExtensions, isImageUrl, readAsArrayBuffer, readAsDataURL } from './file.js';
|
|
9
9
|
export { isBoolean, isEmpty, isFunction, isNullish, isNumber, isObject, isPlainObject, isPrimitive, isString, isThenable, isUndefined } from './is.js';
|
|
10
10
|
export { minmax } from './number.js';
|
|
11
11
|
export { deepAssign, initObject, omitObject, omitUndefined, uniformAssign } from './object.js';
|
package/utils/url.d.ts
ADDED
package/utils/url.js
ADDED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
declare var __VLS_1: {};
|
|
2
|
-
type __VLS_Slots = {} & {
|
|
3
|
-
default?: (props: typeof __VLS_1) => any;
|
|
4
|
-
};
|
|
5
|
-
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
-
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
7
|
-
export default _default;
|
|
8
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
9
|
-
new (): {
|
|
10
|
-
$slots: S;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, normalizeClass, unref, renderSlot } from 'vue';
|
|
2
|
-
import { useComponentConfig } from '../../config-provider/config-provider.api.js';
|
|
3
|
-
|
|
4
|
-
var stdin_default = /* @__PURE__ */defineComponent({
|
|
5
|
-
__name: "button-group",
|
|
6
|
-
setup(__props) {
|
|
7
|
-
const {
|
|
8
|
-
prefixCls
|
|
9
|
-
} = useComponentConfig("editor-button");
|
|
10
|
-
return (_ctx, _cache) => {
|
|
11
|
-
return openBlock(), createElementBlock("div", {
|
|
12
|
-
class: normalizeClass(`${unref(prefixCls)}-group`)
|
|
13
|
-
}, [renderSlot(_ctx.$slots, "default")], 2
|
|
14
|
-
/* CLASS */);
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
export { stdin_default as default };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
active?: boolean;
|
|
3
|
-
};
|
|
4
|
-
declare var __VLS_1: {};
|
|
5
|
-
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof __VLS_1) => any;
|
|
7
|
-
};
|
|
8
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
9
|
-
el: Readonly<import("vue").ShallowRef<HTMLButtonElement | null>>;
|
|
10
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
-
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
12
|
-
export default _default;
|
|
13
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
-
new (): {
|
|
15
|
-
$slots: S;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { defineComponent, useTemplateRef, createElementBlock, openBlock, normalizeClass, unref, renderSlot } from 'vue';
|
|
2
|
-
import { useComponentConfig } from '../../config-provider/config-provider.api.js';
|
|
3
|
-
|
|
4
|
-
var stdin_default = /* @__PURE__ */defineComponent({
|
|
5
|
-
__name: "button",
|
|
6
|
-
props: {
|
|
7
|
-
active: {
|
|
8
|
-
type: Boolean,
|
|
9
|
-
required: false
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
setup(__props, {
|
|
13
|
-
expose: __expose
|
|
14
|
-
}) {
|
|
15
|
-
const {
|
|
16
|
-
prefixCls
|
|
17
|
-
} = useComponentConfig("editor-button");
|
|
18
|
-
const buttonRef = useTemplateRef("button");
|
|
19
|
-
__expose({
|
|
20
|
-
el: buttonRef
|
|
21
|
-
});
|
|
22
|
-
return (_ctx, _cache) => {
|
|
23
|
-
return openBlock(), createElementBlock("button", {
|
|
24
|
-
ref: "button",
|
|
25
|
-
type: "button",
|
|
26
|
-
class: normalizeClass([unref(prefixCls), {
|
|
27
|
-
"is-active": _ctx.active
|
|
28
|
-
}])
|
|
29
|
-
}, [renderSlot(_ctx.$slots, "default")], 2
|
|
30
|
-
/* CLASS */);
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
export { stdin_default as default };
|