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
package/README.md
CHANGED
|
@@ -68,5 +68,12 @@ Cosey 基于 element-plus 并补充了众多组件,意在使开发者更加专
|
|
|
68
68
|
- 打包案例 `npm run build`
|
|
69
69
|
- 打包文档 `npm run docs:build`
|
|
70
70
|
- 部署案例和文档 `npm run cosey:deploy`
|
|
71
|
-
- 暂存提交代码
|
|
72
71
|
- 更新 `create-cosey` 中 `cosey` 包的版本
|
|
72
|
+
|
|
73
|
+
## 推送代码流程
|
|
74
|
+
|
|
75
|
+
- 暂存提交代码
|
|
76
|
+
- 打标签 `npm run tag`
|
|
77
|
+
- 生成更新日志 `npm run changelog`
|
|
78
|
+
- 暂存、提交 changelog `git commit -a -m 'chore: changelog'`
|
|
79
|
+
- 推送
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, createVNode, Fragment, mergeProps } from 'vue';
|
|
2
2
|
import { useLockscreen } from 'element-plus';
|
|
3
3
|
import { audioCardEmits, audioCardProps } from './audio-card.api.js';
|
|
4
|
-
import stdin_default$2 from '../icon/icon.
|
|
4
|
+
import stdin_default$2 from '../icon/icon.js';
|
|
5
5
|
import stdin_default$3 from '../audio-viewer/audio-viewer.js';
|
|
6
6
|
import stdin_default$1 from './audio-card.style.js';
|
|
7
7
|
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createVNode } from 'vue';
|
|
2
|
-
import stdin_default$2 from '../icon/icon.
|
|
2
|
+
import stdin_default$2 from '../icon/icon.js';
|
|
3
3
|
import stdin_default$1 from './close.style.js';
|
|
4
4
|
import { closeEmits } from './close.api.js';
|
|
5
5
|
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createVNode, mergeProps } from 'vue';
|
|
2
|
-
import stdin_default$1 from '../icon/icon.
|
|
2
|
+
import stdin_default$1 from '../icon/icon.js';
|
|
3
3
|
import { contextMenuContentProps } from './content.api.js';
|
|
4
4
|
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, reactive, toRef, createVNode, mergeProps } from 'vue';
|
|
2
2
|
import { dndSortItemSlots, dndSortItemProps } from './dnd-sort-item.api.js';
|
|
3
3
|
import { useDndSortItem } from './useDndSortItem.js';
|
|
4
|
-
import stdin_default$2 from '../icon/icon.
|
|
4
|
+
import stdin_default$2 from '../icon/icon.js';
|
|
5
5
|
import stdin_default$1 from './dnd-sort.style.js';
|
|
6
6
|
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
7
7
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineComponent, createVNode } from 'vue';
|
|
2
|
+
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
3
|
+
|
|
4
|
+
var stdin_default = defineComponent({
|
|
5
|
+
name: "CoEditorButtonGroup",
|
|
6
|
+
setup(_, {
|
|
7
|
+
slots
|
|
8
|
+
}) {
|
|
9
|
+
const {
|
|
10
|
+
prefixCls
|
|
11
|
+
} = useComponentConfig("editor-button-group");
|
|
12
|
+
return () => {
|
|
13
|
+
return createVNode("div", {
|
|
14
|
+
"class": `${prefixCls.value}`
|
|
15
|
+
}, [slots.default?.()]);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export { stdin_default as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
width: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
};
|
|
5
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
click: (event: MouseEvent) => boolean;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
|
+
width: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
};
|
|
11
|
+
}>> & Readonly<{
|
|
12
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { defineComponent, useTemplateRef, inject, onMounted, createVNode } from 'vue';
|
|
2
|
+
import stdin_default$1 from '../icon/icon.js';
|
|
3
|
+
import { pickerContextKey } from './formats/picker.api.js';
|
|
4
|
+
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
5
|
+
|
|
6
|
+
var stdin_default = defineComponent({
|
|
7
|
+
name: "CoEditorButtonSelect",
|
|
8
|
+
props: {
|
|
9
|
+
width: {
|
|
10
|
+
type: String
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
emits: {
|
|
14
|
+
click: event => event instanceof MouseEvent
|
|
15
|
+
},
|
|
16
|
+
setup(props, {
|
|
17
|
+
slots,
|
|
18
|
+
emit
|
|
19
|
+
}) {
|
|
20
|
+
const {
|
|
21
|
+
prefixCls
|
|
22
|
+
} = useComponentConfig("editor-button");
|
|
23
|
+
const buttonRef = useTemplateRef("button");
|
|
24
|
+
const pickerContext = inject(pickerContextKey, null);
|
|
25
|
+
onMounted(() => {
|
|
26
|
+
if (pickerContext) {
|
|
27
|
+
pickerContext.triggerTarget.value = buttonRef.value;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
return () => {
|
|
31
|
+
return createVNode("button", {
|
|
32
|
+
"ref": "button",
|
|
33
|
+
"type": "button",
|
|
34
|
+
"class": [prefixCls.value, `${prefixCls.value}-select`],
|
|
35
|
+
"style": {
|
|
36
|
+
width: props.width
|
|
37
|
+
},
|
|
38
|
+
"onMousedown": event => event.preventDefault(),
|
|
39
|
+
"onClick": event => emit("click", event)
|
|
40
|
+
}, [createVNode("div", {
|
|
41
|
+
"class": [`${prefixCls.value}-text`]
|
|
42
|
+
}, [slots.default?.()]), createVNode(stdin_default$1, {
|
|
43
|
+
"class": `${prefixCls.value}-arrow`,
|
|
44
|
+
"name": "co:chevron-down",
|
|
45
|
+
"size": "lg"
|
|
46
|
+
}, null)]);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export { stdin_default as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
chevronActive: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
};
|
|
5
|
+
active: {
|
|
6
|
+
type: BooleanConstructor;
|
|
7
|
+
};
|
|
8
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
click: (event: MouseEvent) => boolean;
|
|
10
|
+
'chevron-click': (event: MouseEvent) => boolean;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
chevronActive: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
};
|
|
15
|
+
active: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
};
|
|
18
|
+
}>> & Readonly<{
|
|
19
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
20
|
+
"onChevron-click"?: ((event: MouseEvent) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
active: boolean;
|
|
23
|
+
chevronActive: boolean;
|
|
24
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { defineComponent, useTemplateRef, inject, onMounted, createVNode, mergeProps } from 'vue';
|
|
2
|
+
import { pickerContextKey } from './formats/picker.api.js';
|
|
3
|
+
import stdin_default$1 from './button.js';
|
|
4
|
+
import stdin_default$2 from '../icon/icon.js';
|
|
5
|
+
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
6
|
+
|
|
7
|
+
var stdin_default = defineComponent({
|
|
8
|
+
name: "CoEditorButtonSplit",
|
|
9
|
+
props: {
|
|
10
|
+
chevronActive: {
|
|
11
|
+
type: Boolean
|
|
12
|
+
},
|
|
13
|
+
active: {
|
|
14
|
+
type: Boolean
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
emits: {
|
|
18
|
+
click: event => event instanceof MouseEvent,
|
|
19
|
+
"chevron-click": event => event instanceof MouseEvent
|
|
20
|
+
},
|
|
21
|
+
setup(props, {
|
|
22
|
+
slots,
|
|
23
|
+
emit
|
|
24
|
+
}) {
|
|
25
|
+
const {
|
|
26
|
+
prefixCls
|
|
27
|
+
} = useComponentConfig("editor-button");
|
|
28
|
+
const onBtnClick = event => {
|
|
29
|
+
emit("click", event);
|
|
30
|
+
};
|
|
31
|
+
const onChevronClick = event => {
|
|
32
|
+
emit("chevron-click", event);
|
|
33
|
+
};
|
|
34
|
+
const chevronButtonRef = useTemplateRef("chevronButton");
|
|
35
|
+
const pickerContext = inject(pickerContextKey, null);
|
|
36
|
+
onMounted(() => {
|
|
37
|
+
if (pickerContext) {
|
|
38
|
+
pickerContext.triggerTarget.value = chevronButtonRef.value.el;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
return () => {
|
|
42
|
+
return createVNode("div", {
|
|
43
|
+
"class": [`${prefixCls.value}-split`, {
|
|
44
|
+
"is-active": props.chevronActive
|
|
45
|
+
}]
|
|
46
|
+
}, [createVNode(stdin_default$1, mergeProps({
|
|
47
|
+
"active": props.active
|
|
48
|
+
}, {
|
|
49
|
+
onClick: onBtnClick
|
|
50
|
+
}), {
|
|
51
|
+
default: () => [slots.default?.()]
|
|
52
|
+
}), createVNode(stdin_default$1, {
|
|
53
|
+
"ref": "chevronButton",
|
|
54
|
+
"active": props.chevronActive,
|
|
55
|
+
"class": `${prefixCls.value}-chevron`,
|
|
56
|
+
"onClick": onChevronClick
|
|
57
|
+
}, {
|
|
58
|
+
default: () => [createVNode(stdin_default$2, {
|
|
59
|
+
"class": `${prefixCls.value}-arrow`,
|
|
60
|
+
"name": "co:chevron-down",
|
|
61
|
+
"size": "lg"
|
|
62
|
+
}, null)]
|
|
63
|
+
})]);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export { stdin_default as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface EditorButtonExpose {
|
|
2
|
+
el?: HTMLButtonElement;
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
active: {
|
|
6
|
+
type: BooleanConstructor;
|
|
7
|
+
};
|
|
8
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
click: (event: MouseEvent) => boolean;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
active: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{
|
|
15
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
active: boolean;
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineComponent, useTemplateRef, createVNode } from 'vue';
|
|
2
|
+
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
3
|
+
|
|
4
|
+
var stdin_default = defineComponent({
|
|
5
|
+
name: "CoEditorButton",
|
|
6
|
+
props: {
|
|
7
|
+
active: {
|
|
8
|
+
type: Boolean
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
emits: {
|
|
12
|
+
click: event => event instanceof MouseEvent
|
|
13
|
+
},
|
|
14
|
+
setup(props, {
|
|
15
|
+
slots,
|
|
16
|
+
emit,
|
|
17
|
+
expose
|
|
18
|
+
}) {
|
|
19
|
+
const {
|
|
20
|
+
prefixCls
|
|
21
|
+
} = useComponentConfig("editor-button");
|
|
22
|
+
const buttonRef = useTemplateRef("button");
|
|
23
|
+
expose({
|
|
24
|
+
el: buttonRef
|
|
25
|
+
});
|
|
26
|
+
return () => {
|
|
27
|
+
return createVNode("button", {
|
|
28
|
+
"ref": "button",
|
|
29
|
+
"type": "button",
|
|
30
|
+
"class": [prefixCls.value, {
|
|
31
|
+
"is-active": props.active
|
|
32
|
+
}],
|
|
33
|
+
"onClick": event => emit("click", event),
|
|
34
|
+
"onMousedown": event => event.preventDefault()
|
|
35
|
+
}, [slots.default?.()]);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export { stdin_default as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
value: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
'update:value': (value: string) => boolean;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
value: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
}>> & Readonly<{
|
|
14
|
+
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
value: string;
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineComponent, useModel, createVNode } from 'vue';
|
|
2
|
+
import { useEditor, useElement } from 'slate-vue3';
|
|
3
|
+
import { DOMEditor } from 'slate-vue3/dom';
|
|
4
|
+
import { languageOptions } from '../plugins/code-block.js';
|
|
5
|
+
import { isString } from '../../../utils/is.js';
|
|
6
|
+
|
|
7
|
+
var stdin_default = defineComponent({
|
|
8
|
+
name: "CoEditorContentCodeBlock",
|
|
9
|
+
props: {
|
|
10
|
+
value: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: "text"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
emits: {
|
|
16
|
+
"update:value": value => isString(value)
|
|
17
|
+
},
|
|
18
|
+
setup(props, {
|
|
19
|
+
slots
|
|
20
|
+
}) {
|
|
21
|
+
const innerValue = useModel(props, "value");
|
|
22
|
+
const editor = useEditor();
|
|
23
|
+
const element = useElement();
|
|
24
|
+
const onChange = e => {
|
|
25
|
+
innerValue.value = e.target.value;
|
|
26
|
+
const path = DOMEditor.findPath(editor, element.value);
|
|
27
|
+
editor.setNodes({
|
|
28
|
+
language: innerValue.value
|
|
29
|
+
}, {
|
|
30
|
+
at: path
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
return () => {
|
|
34
|
+
return createVNode("pre", {
|
|
35
|
+
"class": `language-${innerValue.value}`
|
|
36
|
+
}, [createVNode("select", {
|
|
37
|
+
"value": innerValue.value,
|
|
38
|
+
"contenteditable": false,
|
|
39
|
+
"onChange": onChange
|
|
40
|
+
}, [languageOptions.map(option => createVNode("option", {
|
|
41
|
+
"value": option.value
|
|
42
|
+
}, [option.label]))]), createVNode("div", null, [slots.default?.()])]);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export { stdin_default as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
formula: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
|
+
formula: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineComponent, computed, createVNode } from 'vue';
|
|
2
|
+
import katex from 'katex';
|
|
3
|
+
import { useEditor, useElement } from 'slate-vue3';
|
|
4
|
+
import { Range } from 'slate-vue3/core';
|
|
5
|
+
import { DOMEditor } from 'slate-vue3/dom';
|
|
6
|
+
import stdin_default$1 from './content-formula.style.js';
|
|
7
|
+
import { useComponentConfig } from '../../config-provider/config-provider.api.js';
|
|
8
|
+
|
|
9
|
+
var stdin_default = defineComponent({
|
|
10
|
+
name: "CoEditorContentFormula",
|
|
11
|
+
props: {
|
|
12
|
+
formula: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
setup(props, {
|
|
18
|
+
slots
|
|
19
|
+
}) {
|
|
20
|
+
const {
|
|
21
|
+
prefixCls
|
|
22
|
+
} = useComponentConfig("editor-content-formula", props);
|
|
23
|
+
const {
|
|
24
|
+
hashId
|
|
25
|
+
} = stdin_default$1(prefixCls);
|
|
26
|
+
const mathml = computed(() => katex.renderToString(props.formula, {
|
|
27
|
+
throwOnError: false,
|
|
28
|
+
output: "mathml"
|
|
29
|
+
}));
|
|
30
|
+
const editor = useEditor();
|
|
31
|
+
const element = useElement();
|
|
32
|
+
const isActive = computed(() => {
|
|
33
|
+
return !!(editor.selection && Range.isCollapsed(editor.selection) && Range.surrounds(editor.range(DOMEditor.findPath(editor, element.value)), editor.selection));
|
|
34
|
+
});
|
|
35
|
+
return () => {
|
|
36
|
+
return createVNode("span", {
|
|
37
|
+
"class": [hashId.value, prefixCls.value, {
|
|
38
|
+
"is-active": isActive.value
|
|
39
|
+
}]
|
|
40
|
+
}, [createVNode("span", {
|
|
41
|
+
"innerHTML": mathml.value,
|
|
42
|
+
"contenteditable": false
|
|
43
|
+
}, null), slots.default?.()]);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export { stdin_default as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getSimpleStyleHook } from '../../theme/getSimpleStyleHook.js';
|
|
2
|
+
|
|
3
|
+
var stdin_default = getSimpleStyleHook("CoEditorContentFormula", (token) => {
|
|
4
|
+
const { componentCls } = token;
|
|
5
|
+
return {
|
|
6
|
+
[componentCls]: {
|
|
7
|
+
"&.is-active": {
|
|
8
|
+
outline: `2px solid ${token.colorPrimaryBorder}`
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export { stdin_default as default };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
url: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
};
|
|
6
|
+
width: {
|
|
7
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
8
|
+
};
|
|
9
|
+
height: {
|
|
10
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
11
|
+
};
|
|
12
|
+
file: {
|
|
13
|
+
type: PropType<File>;
|
|
14
|
+
};
|
|
15
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
url: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
};
|
|
19
|
+
width: {
|
|
20
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
21
|
+
};
|
|
22
|
+
height: {
|
|
23
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
24
|
+
};
|
|
25
|
+
file: {
|
|
26
|
+
type: PropType<File>;
|
|
27
|
+
};
|
|
28
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { defineComponent, computed, createVNode } from 'vue';
|
|
2
|
+
import { useEditor, useElement } from 'slate-vue3';
|
|
3
|
+
import { Range } from 'slate-vue3/core';
|
|
4
|
+
import { DOMEditor } from 'slate-vue3/dom';
|
|
5
|
+
import stdin_default$2 from './resize.js';
|
|
6
|
+
import stdin_default$3 from './upload.js';
|
|
7
|
+
import stdin_default$1 from './content-image.style.js';
|
|
8
|
+
import { useObjectUrl } from '../../../hooks/useObjectUrl.js';
|
|
9
|
+
import { useComponentConfig } from '../../config-provider/config-provider.api.js';
|
|
10
|
+
|
|
11
|
+
var stdin_default = defineComponent({
|
|
12
|
+
name: "CoEditorContentImage",
|
|
13
|
+
props: {
|
|
14
|
+
url: {
|
|
15
|
+
type: String
|
|
16
|
+
},
|
|
17
|
+
width: {
|
|
18
|
+
type: [String, Number]
|
|
19
|
+
},
|
|
20
|
+
height: {
|
|
21
|
+
type: [String, Number]
|
|
22
|
+
},
|
|
23
|
+
file: {
|
|
24
|
+
type: Object
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
setup(props, {
|
|
28
|
+
slots
|
|
29
|
+
}) {
|
|
30
|
+
const {
|
|
31
|
+
prefixCls
|
|
32
|
+
} = useComponentConfig("editor-content-image", props);
|
|
33
|
+
const {
|
|
34
|
+
hashId
|
|
35
|
+
} = stdin_default$1(prefixCls);
|
|
36
|
+
const editor = useEditor();
|
|
37
|
+
const element = useElement();
|
|
38
|
+
const objectUrl = useObjectUrl(() => props.file);
|
|
39
|
+
const mergedUrl = computed(() => props.url || objectUrl.value);
|
|
40
|
+
const isActive = computed(() => {
|
|
41
|
+
return !!(editor.selection && Range.isCollapsed(editor.selection) && Range.surrounds(editor.range(DOMEditor.findPath(editor, element.value)), editor.selection));
|
|
42
|
+
});
|
|
43
|
+
const onClick = () => {
|
|
44
|
+
editor.select(DOMEditor.findPath(editor, element.value));
|
|
45
|
+
};
|
|
46
|
+
const onResize = ({
|
|
47
|
+
width,
|
|
48
|
+
height
|
|
49
|
+
}) => {
|
|
50
|
+
editor.setNodes({
|
|
51
|
+
width,
|
|
52
|
+
height
|
|
53
|
+
}, {
|
|
54
|
+
at: DOMEditor.findPath(editor, element.value)
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
const onSuccess = url => {
|
|
58
|
+
editor.setNodes({
|
|
59
|
+
url,
|
|
60
|
+
file: void 0
|
|
61
|
+
}, {
|
|
62
|
+
at: DOMEditor.findPath(editor, element.value)
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
return () => {
|
|
66
|
+
return createVNode("div", {
|
|
67
|
+
"class": [hashId.value, prefixCls.value, {
|
|
68
|
+
"is-active": isActive.value
|
|
69
|
+
}],
|
|
70
|
+
"onClick": onClick
|
|
71
|
+
}, [createVNode("div", {
|
|
72
|
+
"class": [`${prefixCls.value}-wrapper`],
|
|
73
|
+
"contenteditable": false
|
|
74
|
+
}, [createVNode("img", {
|
|
75
|
+
"src": mergedUrl.value,
|
|
76
|
+
"width": props.width,
|
|
77
|
+
"height": props.height
|
|
78
|
+
}, null), createVNode(stdin_default$2, {
|
|
79
|
+
"visible": isActive.value,
|
|
80
|
+
"onResize": onResize
|
|
81
|
+
}, null), props.file && createVNode(stdin_default$3, {
|
|
82
|
+
"file": props.file,
|
|
83
|
+
"onSuccess": onSuccess
|
|
84
|
+
}, null)]), slots.default?.()]);
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
export { stdin_default as default };
|
package/components/editor/{components/list/list.style.d.ts → contents/content-image.style.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { getSimpleStyleHook } from '../../theme/getSimpleStyleHook.js';
|
|
2
|
+
|
|
3
|
+
var stdin_default = getSimpleStyleHook("CoEditorContentImage", (token) => {
|
|
4
|
+
const { componentCls } = token;
|
|
5
|
+
return {
|
|
6
|
+
[componentCls]: {
|
|
7
|
+
display: "inline-flex",
|
|
8
|
+
margin: 1,
|
|
9
|
+
"&.is-active": {
|
|
10
|
+
outline: `2px solid ${token.colorPrimaryBorder}`
|
|
11
|
+
},
|
|
12
|
+
[`${componentCls}-wrapper`]: {
|
|
13
|
+
position: "relative",
|
|
14
|
+
display: "inline-flex"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export { stdin_default as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
url: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
};
|
|
5
|
+
target: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
};
|
|
8
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
url: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
};
|
|
12
|
+
target: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
};
|
|
15
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
16
|
+
export default _default;
|