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
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineComponent, createVNode } from 'vue';
|
|
2
|
+
import { useEditor } from 'slate-vue3';
|
|
3
|
+
import stdin_default$2 from '../../icon/icon.js';
|
|
4
|
+
import stdin_default$1 from '../button.js';
|
|
5
|
+
|
|
6
|
+
var stdin_default = defineComponent({
|
|
7
|
+
name: "CoEditorFormatIndent",
|
|
8
|
+
props: {
|
|
9
|
+
icon: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true
|
|
12
|
+
},
|
|
13
|
+
delta: {
|
|
14
|
+
type: Number,
|
|
15
|
+
required: true
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
setup(props) {
|
|
19
|
+
const editor = useEditor();
|
|
20
|
+
const onClick = () => {
|
|
21
|
+
editor.formatIndent(props.delta);
|
|
22
|
+
};
|
|
23
|
+
return () => {
|
|
24
|
+
return createVNode(stdin_default$1, {
|
|
25
|
+
"onClick": onClick
|
|
26
|
+
}, {
|
|
27
|
+
default: () => [createVNode(stdin_default$2, {
|
|
28
|
+
"name": props.icon
|
|
29
|
+
}, null)]
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export { stdin_default as default };
|
|
@@ -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,114 @@
|
|
|
1
|
+
import { defineComponent, computed, ref, reactive, createVNode, Fragment } from 'vue';
|
|
2
|
+
import { useEditor } from 'slate-vue3';
|
|
3
|
+
import { Node } from 'slate-vue3/core';
|
|
4
|
+
import stdin_default$2 from '../../icon/icon.js';
|
|
5
|
+
import stdin_default$1 from '../button.js';
|
|
6
|
+
import stdin_default$3 from '../../form-dialog/form-dialog.js';
|
|
7
|
+
import stdin_default$4 from '../../form/form.js';
|
|
8
|
+
import stdin_default$5 from '../../form/form-item.vue.js';
|
|
9
|
+
import { isPointingAt, getPointingOptions } from '../utils.js';
|
|
10
|
+
import { useLocale } from '../../../hooks/useLocale.js';
|
|
11
|
+
|
|
12
|
+
var stdin_default = defineComponent({
|
|
13
|
+
name: "CoEditorFormatLink",
|
|
14
|
+
setup() {
|
|
15
|
+
const {
|
|
16
|
+
t
|
|
17
|
+
} = useLocale();
|
|
18
|
+
const editor = useEditor();
|
|
19
|
+
const isActive = computed(() => isPointingAt(editor, "link"));
|
|
20
|
+
const onClick = () => {
|
|
21
|
+
if (!editor.selection) return;
|
|
22
|
+
const nodes = editor.nodes(getPointingOptions(editor, "link"));
|
|
23
|
+
const {
|
|
24
|
+
done,
|
|
25
|
+
value
|
|
26
|
+
} = nodes.next();
|
|
27
|
+
if (done) {
|
|
28
|
+
Object.assign(formModel, {
|
|
29
|
+
url: "",
|
|
30
|
+
target: "_blank",
|
|
31
|
+
text: editor.string(editor.selection)
|
|
32
|
+
});
|
|
33
|
+
} else {
|
|
34
|
+
const [node, path] = value;
|
|
35
|
+
const {
|
|
36
|
+
url,
|
|
37
|
+
target
|
|
38
|
+
} = node;
|
|
39
|
+
editor.select(path);
|
|
40
|
+
Object.assign(formModel, {
|
|
41
|
+
url,
|
|
42
|
+
target,
|
|
43
|
+
text: Node.string(node)
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
visible.value = true;
|
|
47
|
+
};
|
|
48
|
+
const visible = ref(false);
|
|
49
|
+
const formModel = reactive({
|
|
50
|
+
url: "",
|
|
51
|
+
text: "",
|
|
52
|
+
target: ""
|
|
53
|
+
});
|
|
54
|
+
const targetOptions = [{
|
|
55
|
+
label: t("co.editor.currentWindow"),
|
|
56
|
+
value: "_self"
|
|
57
|
+
}, {
|
|
58
|
+
label: t("co.editor.newWindow"),
|
|
59
|
+
value: "_blank"
|
|
60
|
+
}];
|
|
61
|
+
const onSubmit = () => {
|
|
62
|
+
if (!formModel.url.trim() || !formModel.text.trim()) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
editor.formatLink(formModel.url, formModel.target, formModel.text);
|
|
66
|
+
};
|
|
67
|
+
return () => {
|
|
68
|
+
return createVNode(Fragment, null, [createVNode(stdin_default$1, {
|
|
69
|
+
"active": isActive.value,
|
|
70
|
+
"onClick": onClick
|
|
71
|
+
}, {
|
|
72
|
+
default: () => [createVNode(stdin_default$2, {
|
|
73
|
+
"name": "co:link"
|
|
74
|
+
}, null)]
|
|
75
|
+
}), createVNode(stdin_default$3, {
|
|
76
|
+
"modelValue": visible.value,
|
|
77
|
+
"onUpdate:modelValue": $event => visible.value = $event,
|
|
78
|
+
"title": t("co.editor.insertLink"),
|
|
79
|
+
"width": "sm"
|
|
80
|
+
}, {
|
|
81
|
+
default: () => [createVNode(stdin_default$4, {
|
|
82
|
+
"model": formModel,
|
|
83
|
+
"label-width": "auto",
|
|
84
|
+
"submit": onSubmit
|
|
85
|
+
}, {
|
|
86
|
+
default: () => [createVNode(stdin_default$5, {
|
|
87
|
+
"modelValue": formModel.url,
|
|
88
|
+
"onUpdate:modelValue": $event => formModel.url = $event,
|
|
89
|
+
"prop": "url",
|
|
90
|
+
"label": "URL",
|
|
91
|
+
"fieldType": "input"
|
|
92
|
+
}, null), createVNode(stdin_default$5, {
|
|
93
|
+
"modelValue": formModel.text,
|
|
94
|
+
"onUpdate:modelValue": $event => formModel.text = $event,
|
|
95
|
+
"prop": "text",
|
|
96
|
+
"label": t("co.editor.displayedText"),
|
|
97
|
+
"fieldType": "input"
|
|
98
|
+
}, null), createVNode(stdin_default$5, {
|
|
99
|
+
"modelValue": formModel.target,
|
|
100
|
+
"onUpdate:modelValue": $event => formModel.target = $event,
|
|
101
|
+
"prop": "target",
|
|
102
|
+
"label": t("co.editor.openLinkAt"),
|
|
103
|
+
"fieldType": "select",
|
|
104
|
+
"fieldProps": {
|
|
105
|
+
options: targetOptions
|
|
106
|
+
}
|
|
107
|
+
}, null)]
|
|
108
|
+
})]
|
|
109
|
+
})]);
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
export { stdin_default as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { type ListType } from '../types';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
icon: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
format: {
|
|
9
|
+
type: PropType<ListType>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
icon: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
format: {
|
|
18
|
+
type: PropType<ListType>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineComponent, computed, createVNode } from 'vue';
|
|
2
|
+
import { useEditor } from 'slate-vue3';
|
|
3
|
+
import stdin_default$2 from '../../icon/icon.js';
|
|
4
|
+
import stdin_default$1 from '../button.js';
|
|
5
|
+
|
|
6
|
+
var stdin_default = defineComponent({
|
|
7
|
+
name: "CoEditorFormatList",
|
|
8
|
+
props: {
|
|
9
|
+
icon: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true
|
|
12
|
+
},
|
|
13
|
+
format: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
setup(props) {
|
|
19
|
+
const editor = useEditor();
|
|
20
|
+
const isListActive = computed(() => {
|
|
21
|
+
return editor.getListTypeAtStartPoint() === props.format;
|
|
22
|
+
});
|
|
23
|
+
const onClick = () => {
|
|
24
|
+
editor.formatList(props.format);
|
|
25
|
+
};
|
|
26
|
+
return () => {
|
|
27
|
+
return createVNode(stdin_default$1, {
|
|
28
|
+
"active": isListActive.value,
|
|
29
|
+
"onClick": onClick
|
|
30
|
+
}, {
|
|
31
|
+
default: () => [createVNode(stdin_default$2, {
|
|
32
|
+
"name": props.icon
|
|
33
|
+
}, null)]
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export { stdin_default as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
icon: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
format: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
icon: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
format: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineComponent, createVNode } from 'vue';
|
|
2
|
+
import { useEditor } from 'slate-vue3';
|
|
3
|
+
import stdin_default$2 from '../../icon/icon.js';
|
|
4
|
+
import stdin_default$1 from '../button.js';
|
|
5
|
+
import { useMarkActive } from '../hooks/useMarkActive.js';
|
|
6
|
+
|
|
7
|
+
var stdin_default = defineComponent({
|
|
8
|
+
name: "CoEditorFormatMark",
|
|
9
|
+
props: {
|
|
10
|
+
icon: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
format: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(props) {
|
|
20
|
+
const editor = useEditor();
|
|
21
|
+
const isMarkActive = useMarkActive(props.format);
|
|
22
|
+
const onClick = () => {
|
|
23
|
+
editor.formatMark(props.format);
|
|
24
|
+
};
|
|
25
|
+
return () => {
|
|
26
|
+
return createVNode(stdin_default$1, {
|
|
27
|
+
"active": isMarkActive.value,
|
|
28
|
+
"onClick": onClick
|
|
29
|
+
}, {
|
|
30
|
+
default: () => [createVNode(stdin_default$2, {
|
|
31
|
+
"name": props.icon
|
|
32
|
+
}, null)]
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export { stdin_default as default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
icon: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
delta: {
|
|
7
|
+
type: NumberConstructor;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
change: (size: string) => boolean;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
icon: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
delta: {
|
|
18
|
+
type: NumberConstructor;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{
|
|
22
|
+
onChange?: ((size: string) => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent, createVNode } from 'vue';
|
|
2
|
+
import { useEditor } from 'slate-vue3';
|
|
3
|
+
import stdin_default$1 from '../button.js';
|
|
4
|
+
import stdin_default$2 from '../../icon/icon.js';
|
|
5
|
+
import { isString } from '../../../utils/is.js';
|
|
6
|
+
|
|
7
|
+
var stdin_default = defineComponent({
|
|
8
|
+
name: "CoEditorFormatSizeDelta",
|
|
9
|
+
props: {
|
|
10
|
+
icon: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
delta: {
|
|
15
|
+
type: Number,
|
|
16
|
+
required: true
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
emits: {
|
|
20
|
+
change: size => isString(size)
|
|
21
|
+
},
|
|
22
|
+
setup(props, {
|
|
23
|
+
emit
|
|
24
|
+
}) {
|
|
25
|
+
const editor = useEditor();
|
|
26
|
+
const onClick = () => {
|
|
27
|
+
editor.formatSizeDelta(props.delta, numSize => {
|
|
28
|
+
emit("change", numSize + "px");
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
return () => {
|
|
32
|
+
return createVNode(stdin_default$1, {
|
|
33
|
+
"onClick": onClick
|
|
34
|
+
}, {
|
|
35
|
+
default: () => [createVNode(stdin_default$2, {
|
|
36
|
+
"name": props.icon
|
|
37
|
+
}, null)]
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export { stdin_default as default };
|
|
@@ -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,51 @@
|
|
|
1
|
+
import { defineComponent, computed, createVNode, Fragment } from 'vue';
|
|
2
|
+
import { useEditor } from 'slate-vue3';
|
|
3
|
+
import stdin_default$1 from './select.js';
|
|
4
|
+
import stdin_default$2 from './format-size-delta.js';
|
|
5
|
+
import { useMarkValue } from '../hooks/useMarkValue.js';
|
|
6
|
+
|
|
7
|
+
const sizes = ["8px", "10px", "12px", "14px", "16px", "18px", "20px", "24px", "32px", "40px", "48px", "56px", "64px", "72px"];
|
|
8
|
+
var stdin_default = defineComponent({
|
|
9
|
+
name: "CoEditorFormatSize",
|
|
10
|
+
setup() {
|
|
11
|
+
const list = computed(() => {
|
|
12
|
+
const sizeList = sizes.map(size => {
|
|
13
|
+
return {
|
|
14
|
+
label: size,
|
|
15
|
+
value: size
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
return [{
|
|
19
|
+
label: "\u9ED8\u8BA4\u5B57\u53F7",
|
|
20
|
+
value: ""
|
|
21
|
+
}, ...sizeList];
|
|
22
|
+
});
|
|
23
|
+
const editor = useEditor();
|
|
24
|
+
const current = useMarkValue("size");
|
|
25
|
+
const onChange = value => {
|
|
26
|
+
editor.formatSize(value);
|
|
27
|
+
};
|
|
28
|
+
const onDeltaChange = value => {
|
|
29
|
+
current.value = value;
|
|
30
|
+
};
|
|
31
|
+
return () => {
|
|
32
|
+
return createVNode(Fragment, null, [createVNode(stdin_default$1, {
|
|
33
|
+
"modelValue": current.value,
|
|
34
|
+
"onUpdate:modelValue": $event => current.value = $event,
|
|
35
|
+
"list": list.value,
|
|
36
|
+
"button-width": "100px",
|
|
37
|
+
"onChange": onChange
|
|
38
|
+
}, null), createVNode(stdin_default$2, {
|
|
39
|
+
"delta": -1,
|
|
40
|
+
"icon": "co:text-minus",
|
|
41
|
+
"onChange": onDeltaChange
|
|
42
|
+
}, null), createVNode(stdin_default$2, {
|
|
43
|
+
"delta": 1,
|
|
44
|
+
"icon": "co:text-plus",
|
|
45
|
+
"onChange": onDeltaChange
|
|
46
|
+
}, null)]);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export { stdin_default as default };
|
|
@@ -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,69 @@
|
|
|
1
|
+
import { defineComponent, ref, createVNode, Fragment, isVNode } from 'vue';
|
|
2
|
+
import { ElDialog, ElButton, ElInput } from 'element-plus';
|
|
3
|
+
import { useEditor } from 'slate-vue3';
|
|
4
|
+
import stdin_default$2 from '../../icon/icon.js';
|
|
5
|
+
import stdin_default$1 from '../button.js';
|
|
6
|
+
import { useLocale } from '../../../hooks/useLocale.js';
|
|
7
|
+
|
|
8
|
+
function _isSlot(s) {
|
|
9
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
10
|
+
}
|
|
11
|
+
var stdin_default = defineComponent({
|
|
12
|
+
name: "CoEditorFormatSource",
|
|
13
|
+
setup() {
|
|
14
|
+
const {
|
|
15
|
+
t
|
|
16
|
+
} = useLocale();
|
|
17
|
+
const editor = useEditor();
|
|
18
|
+
const visible = ref(false);
|
|
19
|
+
const value = ref("");
|
|
20
|
+
const onClick = () => {
|
|
21
|
+
value.value = editor.serialize();
|
|
22
|
+
visible.value = true;
|
|
23
|
+
};
|
|
24
|
+
const onCancel = () => {
|
|
25
|
+
visible.value = false;
|
|
26
|
+
};
|
|
27
|
+
const onConfirm = () => {
|
|
28
|
+
editor.setContent(value.value);
|
|
29
|
+
visible.value = false;
|
|
30
|
+
};
|
|
31
|
+
return () => {
|
|
32
|
+
return createVNode(Fragment, null, [createVNode(stdin_default$1, {
|
|
33
|
+
"onClick": onClick
|
|
34
|
+
}, {
|
|
35
|
+
default: () => [createVNode(stdin_default$2, {
|
|
36
|
+
"name": "co:repo-source-code"
|
|
37
|
+
}, null)]
|
|
38
|
+
}), createVNode(ElDialog, {
|
|
39
|
+
"title": t("co.editor.sourceCode"),
|
|
40
|
+
"modelValue": visible.value,
|
|
41
|
+
"onUpdate:modelValue": $event => visible.value = $event,
|
|
42
|
+
"width": "992px",
|
|
43
|
+
"style": "max-width: calc(100vw - 32px)"
|
|
44
|
+
}, {
|
|
45
|
+
default: () => createVNode(ElInput, {
|
|
46
|
+
"modelValue": value.value,
|
|
47
|
+
"onUpdate:modelValue": $event => value.value = $event,
|
|
48
|
+
"type": "textarea",
|
|
49
|
+
"rows": 26
|
|
50
|
+
}, null),
|
|
51
|
+
footer: () => {
|
|
52
|
+
let _slot, _slot2;
|
|
53
|
+
return createVNode(Fragment, null, [createVNode(ElButton, {
|
|
54
|
+
"onClick": onCancel
|
|
55
|
+
}, _isSlot(_slot = t("co.common.cancel")) ? _slot : {
|
|
56
|
+
default: () => [_slot]
|
|
57
|
+
}), createVNode(ElButton, {
|
|
58
|
+
"type": "primary",
|
|
59
|
+
"onClick": onConfirm
|
|
60
|
+
}, _isSlot(_slot2 = t("co.common.confirm")) ? _slot2 : {
|
|
61
|
+
default: () => [_slot2]
|
|
62
|
+
})]);
|
|
63
|
+
}
|
|
64
|
+
})]);
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export { stdin_default as default };
|
|
@@ -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,85 @@
|
|
|
1
|
+
import { defineComponent, ref, useTemplateRef, shallowRef, reactive, onMounted, createVNode, Fragment } from 'vue';
|
|
2
|
+
import stdin_default$1 from './format-table.style.js';
|
|
3
|
+
import stdin_default$2 from './picker.js';
|
|
4
|
+
import stdin_default$3 from '../button.js';
|
|
5
|
+
import stdin_default$4 from '../../icon/icon.js';
|
|
6
|
+
import { useEditor } from 'slate-vue3';
|
|
7
|
+
import { useComponentConfig } from '../../config-provider/config-provider.api.js';
|
|
8
|
+
|
|
9
|
+
var stdin_default = defineComponent({
|
|
10
|
+
name: "CoEditorFormatTable",
|
|
11
|
+
setup() {
|
|
12
|
+
const {
|
|
13
|
+
prefixCls
|
|
14
|
+
} = useComponentConfig("editor-format-table");
|
|
15
|
+
const {
|
|
16
|
+
hashId
|
|
17
|
+
} = stdin_default$1(prefixCls);
|
|
18
|
+
const editor = useEditor();
|
|
19
|
+
const count = 10;
|
|
20
|
+
const visible = ref(false);
|
|
21
|
+
const buttonRef = useTemplateRef("button");
|
|
22
|
+
const triggerTarget = shallowRef();
|
|
23
|
+
const grid = reactive({
|
|
24
|
+
row: 0,
|
|
25
|
+
col: 0
|
|
26
|
+
});
|
|
27
|
+
onMounted(() => {
|
|
28
|
+
triggerTarget.value = buttonRef.value?.el;
|
|
29
|
+
});
|
|
30
|
+
const onBtnClick = () => {
|
|
31
|
+
if (!visible.value) {
|
|
32
|
+
grid.row = 0;
|
|
33
|
+
grid.col = 0;
|
|
34
|
+
}
|
|
35
|
+
visible.value = !visible.value;
|
|
36
|
+
};
|
|
37
|
+
const onCellPointerOver = (row, col) => {
|
|
38
|
+
grid.row = row;
|
|
39
|
+
grid.col = col;
|
|
40
|
+
};
|
|
41
|
+
const onCellClick = (rowCount, columnCount) => {
|
|
42
|
+
editor.insertTable(rowCount, columnCount);
|
|
43
|
+
visible.value = false;
|
|
44
|
+
};
|
|
45
|
+
return () => {
|
|
46
|
+
return createVNode(stdin_default$2, {
|
|
47
|
+
"popperClass": [hashId.value, prefixCls.value],
|
|
48
|
+
"visible": visible.value,
|
|
49
|
+
"onUpdate:visible": $event => visible.value = $event,
|
|
50
|
+
"trigger-target": triggerTarget.value,
|
|
51
|
+
"nopadding": true
|
|
52
|
+
}, {
|
|
53
|
+
default: () => createVNode(stdin_default$3, {
|
|
54
|
+
"ref": "button",
|
|
55
|
+
"onClick": onBtnClick
|
|
56
|
+
}, {
|
|
57
|
+
default: () => [createVNode(stdin_default$4, {
|
|
58
|
+
"name": "co:table"
|
|
59
|
+
}, null)]
|
|
60
|
+
}),
|
|
61
|
+
content: () => createVNode(Fragment, null, [createVNode("div", {
|
|
62
|
+
"class": `${prefixCls.value}-grid`
|
|
63
|
+
}, [Array(count).fill(0).map((_, row) => {
|
|
64
|
+
return createVNode("div", {
|
|
65
|
+
"key": row,
|
|
66
|
+
"class": `${prefixCls.value}-row`
|
|
67
|
+
}, [Array(count).fill(0).map((_2, col) => {
|
|
68
|
+
return createVNode("div", {
|
|
69
|
+
"key": col,
|
|
70
|
+
"class": [`${prefixCls.value}-cell`, {
|
|
71
|
+
"is-selected": col <= grid.col && row <= grid.row
|
|
72
|
+
}],
|
|
73
|
+
"onPointerover": () => onCellPointerOver(row, col),
|
|
74
|
+
"onClick": () => onCellClick(row + 1, col + 1)
|
|
75
|
+
}, null);
|
|
76
|
+
})]);
|
|
77
|
+
})]), createVNode("div", {
|
|
78
|
+
"class": `${prefixCls.value}-count`
|
|
79
|
+
}, [`${grid.col}x${grid.row}`])])
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
export { stdin_default as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getSimpleStyleHook } from '
|
|
1
|
+
import { getSimpleStyleHook } from '../../theme/getSimpleStyleHook.js';
|
|
2
2
|
|
|
3
|
-
var stdin_default = getSimpleStyleHook("
|
|
3
|
+
var stdin_default = getSimpleStyleHook("CoEditorFormatTable", (token) => {
|
|
4
4
|
const { componentCls } = token;
|
|
5
5
|
return {
|
|
6
6
|
[componentCls]: {
|
|
@@ -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;
|