@opentiny/fluent-editor 4.0.0-alpha.15 → 4.0.0-alpha.16
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 +88 -88
- package/es/attributors/line-height.es.js.map +1 -1
- package/es/config/base64-image.es.js.map +1 -1
- package/es/config/editor.config.es.js.map +1 -1
- package/es/config/editor.utils.es.js.map +1 -1
- package/es/config/i18n/en-us.es.js.map +1 -1
- package/es/config/i18n/zh-cn.es.js.map +1 -1
- package/es/config/index.es.js.map +1 -1
- package/es/core/fluent-editor.es.js.map +1 -1
- package/es/fluent-editor.es.js.map +1 -1
- package/es/formats/emoji.es.js.map +1 -1
- package/es/formats/soft-break.es.js.map +1 -1
- package/es/formats/strike.es.js.map +1 -1
- package/es/formats/video.es.js.map +1 -1
- package/es/modules/ai/constants.es.js.map +1 -1
- package/es/modules/ai/icons.es.js.map +1 -1
- package/es/modules/ai/index.es.js.map +1 -1
- package/es/modules/collaborative-editing/awareness/awareness.es.js.map +1 -1
- package/es/modules/collaborative-editing/awareness/y-indexeddb.es.js.map +1 -1
- package/es/modules/collaborative-editing/collaborative-editing.es.js.map +1 -1
- package/es/modules/collaborative-editing/module.es.js.map +1 -1
- package/es/modules/collaborative-editing/provider/providerRegistry.es.js.map +1 -1
- package/es/modules/collaborative-editing/provider/webrtc.es.js.map +1 -1
- package/es/modules/collaborative-editing/provider/websocket.es.js.map +1 -1
- package/es/modules/counter.es.js.map +1 -1
- package/es/modules/custom-clipboard.es.js.map +1 -1
- package/es/modules/custom-image/actions/action.es.js.map +1 -1
- package/es/modules/custom-image/actions/custom-resize-action.es.js.map +1 -1
- package/es/modules/custom-image/actions/delete-action.es.js.map +1 -1
- package/es/modules/custom-image/blot-formatter.es.js.map +1 -1
- package/es/modules/custom-image/image.es.js.map +1 -1
- package/es/modules/custom-image/options.es.js.map +1 -1
- package/es/modules/custom-image/specs/blot-spec.es.js.map +1 -1
- package/es/modules/custom-image/specs/custom-image-spec.es.js.map +1 -1
- package/es/modules/custom-image/specs/image-spec.es.js.map +1 -1
- package/es/modules/divider.es.js.map +1 -1
- package/es/modules/emoji.es.js.map +1 -1
- package/es/modules/file/formats/file.es.js.map +1 -1
- package/es/modules/file/modules/file-bar.es.js.map +1 -1
- package/es/modules/file/modules/file-module.es.js.map +1 -1
- package/es/modules/flow-chart/config-utils.es.js.map +1 -1
- package/es/modules/flow-chart/formats/flow-chart-blot.es.js.map +1 -1
- package/es/modules/flow-chart/i18n/en-us.es.js.map +1 -1
- package/es/modules/flow-chart/i18n/index.es.js.map +1 -1
- package/es/modules/flow-chart/i18n/zh-cn.es.js.map +1 -1
- package/es/modules/flow-chart/icons.es.js.map +1 -1
- package/es/modules/flow-chart/index.es.js.map +1 -1
- package/es/modules/flow-chart/modules/context-menu.es.js.map +1 -1
- package/es/modules/flow-chart/modules/control-panel.es.js.map +1 -1
- package/es/modules/flow-chart/modules/custom-resize-action.es.js.map +1 -1
- package/es/modules/link/formats/link.es.js.map +1 -1
- package/es/modules/link/modules/tooltip.es.js.map +1 -1
- package/es/modules/mathlive/formats.es.js.map +1 -1
- package/es/modules/mathlive/tooltip.es.js.map +1 -1
- package/es/modules/mention/constants.es.js.map +1 -1
- package/es/modules/mention/mention-link.es.js.map +1 -1
- package/es/modules/mention/mention.es.js.map +1 -1
- package/es/modules/mind-map/config-utils.es.js.map +1 -1
- package/es/modules/mind-map/formats/mind-map-blot.es.js.map +1 -1
- package/es/modules/mind-map/i18n/en-us.es.js.map +1 -1
- package/es/modules/mind-map/i18n/index.es.js.map +1 -1
- package/es/modules/mind-map/i18n/zh-cn.es.js.map +1 -1
- package/es/modules/mind-map/icons.es.js.map +1 -1
- package/es/modules/mind-map/index.es.js.map +1 -1
- package/es/modules/mind-map/modules/context-menu.es.js.map +1 -1
- package/es/modules/mind-map/modules/control-panel.es.js.map +1 -1
- package/es/modules/mind-map/modules/custom-resize-action.es.js.map +1 -1
- package/es/modules/syntax.es.js.map +1 -1
- package/es/modules/toolbar/better-picker.es.js.map +1 -1
- package/es/themes/snow.es.js.map +1 -1
- package/es/tools/screenshot.es.js.map +1 -1
- package/es/ui/icons.config.es.js.map +1 -1
- package/es/ui/icons.es.js.map +1 -1
- package/es/utils/debounce.es.js.map +1 -1
- package/es/utils/merge.es.js.map +1 -1
- package/es/utils/method.es.js.map +1 -1
- package/lib/attributors/line-height.cjs.js.map +1 -1
- package/lib/config/base64-image.cjs.js.map +1 -1
- package/lib/config/editor.config.cjs.js.map +1 -1
- package/lib/config/editor.utils.cjs.js.map +1 -1
- package/lib/config/i18n/en-us.cjs.js.map +1 -1
- package/lib/config/i18n/zh-cn.cjs.js.map +1 -1
- package/lib/config/index.cjs.js.map +1 -1
- package/lib/core/fluent-editor.cjs.js.map +1 -1
- package/lib/fluent-editor.cjs.js.map +1 -1
- package/lib/formats/emoji.cjs.js.map +1 -1
- package/lib/formats/soft-break.cjs.js.map +1 -1
- package/lib/formats/strike.cjs.js.map +1 -1
- package/lib/formats/video.cjs.js.map +1 -1
- package/lib/modules/ai/constants.cjs.js.map +1 -1
- package/lib/modules/ai/icons.cjs.js.map +1 -1
- package/lib/modules/ai/index.cjs.js.map +1 -1
- package/lib/modules/collaborative-editing/awareness/awareness.cjs.js.map +1 -1
- package/lib/modules/collaborative-editing/awareness/y-indexeddb.cjs.js.map +1 -1
- package/lib/modules/collaborative-editing/collaborative-editing.cjs.js.map +1 -1
- package/lib/modules/collaborative-editing/module.cjs.js.map +1 -1
- package/lib/modules/collaborative-editing/provider/providerRegistry.cjs.js.map +1 -1
- package/lib/modules/collaborative-editing/provider/webrtc.cjs.js.map +1 -1
- package/lib/modules/collaborative-editing/provider/websocket.cjs.js.map +1 -1
- package/lib/modules/counter.cjs.js.map +1 -1
- package/lib/modules/custom-clipboard.cjs.js.map +1 -1
- package/lib/modules/custom-image/actions/action.cjs.js.map +1 -1
- package/lib/modules/custom-image/actions/custom-resize-action.cjs.js.map +1 -1
- package/lib/modules/custom-image/actions/delete-action.cjs.js.map +1 -1
- package/lib/modules/custom-image/blot-formatter.cjs.js.map +1 -1
- package/lib/modules/custom-image/image.cjs.js.map +1 -1
- package/lib/modules/custom-image/options.cjs.js.map +1 -1
- package/lib/modules/custom-image/specs/blot-spec.cjs.js.map +1 -1
- package/lib/modules/custom-image/specs/custom-image-spec.cjs.js.map +1 -1
- package/lib/modules/custom-image/specs/image-spec.cjs.js.map +1 -1
- package/lib/modules/divider.cjs.js.map +1 -1
- package/lib/modules/emoji.cjs.js.map +1 -1
- package/lib/modules/file/formats/file.cjs.js.map +1 -1
- package/lib/modules/file/modules/file-bar.cjs.js.map +1 -1
- package/lib/modules/file/modules/file-module.cjs.js.map +1 -1
- package/lib/modules/flow-chart/config-utils.cjs.js.map +1 -1
- package/lib/modules/flow-chart/formats/flow-chart-blot.cjs.js.map +1 -1
- package/lib/modules/flow-chart/i18n/en-us.cjs.js.map +1 -1
- package/lib/modules/flow-chart/i18n/index.cjs.js.map +1 -1
- package/lib/modules/flow-chart/i18n/zh-cn.cjs.js.map +1 -1
- package/lib/modules/flow-chart/icons.cjs.js.map +1 -1
- package/lib/modules/flow-chart/index.cjs.js.map +1 -1
- package/lib/modules/flow-chart/modules/context-menu.cjs.js.map +1 -1
- package/lib/modules/flow-chart/modules/control-panel.cjs.js.map +1 -1
- package/lib/modules/flow-chart/modules/custom-resize-action.cjs.js.map +1 -1
- package/lib/modules/link/formats/link.cjs.js.map +1 -1
- package/lib/modules/link/modules/tooltip.cjs.js.map +1 -1
- package/lib/modules/mathlive/formats.cjs.js.map +1 -1
- package/lib/modules/mathlive/tooltip.cjs.js.map +1 -1
- package/lib/modules/mention/constants.cjs.js.map +1 -1
- package/lib/modules/mention/mention-link.cjs.js.map +1 -1
- package/lib/modules/mention/mention.cjs.js.map +1 -1
- package/lib/modules/mind-map/config-utils.cjs.js.map +1 -1
- package/lib/modules/mind-map/formats/mind-map-blot.cjs.js.map +1 -1
- package/lib/modules/mind-map/i18n/en-us.cjs.js.map +1 -1
- package/lib/modules/mind-map/i18n/index.cjs.js.map +1 -1
- package/lib/modules/mind-map/i18n/zh-cn.cjs.js.map +1 -1
- package/lib/modules/mind-map/icons.cjs.js.map +1 -1
- package/lib/modules/mind-map/index.cjs.js.map +1 -1
- package/lib/modules/mind-map/modules/context-menu.cjs.js.map +1 -1
- package/lib/modules/mind-map/modules/control-panel.cjs.js.map +1 -1
- package/lib/modules/mind-map/modules/custom-resize-action.cjs.js.map +1 -1
- package/lib/modules/syntax.cjs.js.map +1 -1
- package/lib/modules/toolbar/better-picker.cjs.js.map +1 -1
- package/lib/themes/snow.cjs.js.map +1 -1
- package/lib/tools/screenshot.cjs.js.map +1 -1
- package/lib/ui/icons.cjs.js.map +1 -1
- package/lib/ui/icons.config.cjs.js.map +1 -1
- package/lib/utils/debounce.cjs.js.map +1 -1
- package/lib/utils/merge.cjs.js.map +1 -1
- package/lib/utils/method.cjs.js.map +1 -1
- package/package.json +1 -1
- package/patches/quill@2.0.3.patch +33 -33
- package/scripts/apply-patches.cjs +248 -248
- package/types/attributors/font-size.d.ts +1 -1
- package/types/attributors/font-style.d.ts +1 -1
- package/types/attributors/index.d.ts +4 -4
- package/types/attributors/line-height.d.ts +1 -1
- package/types/attributors/text-indent.d.ts +1 -1
- package/types/config/base64-image.d.ts +2 -2
- package/types/config/editor.config.d.ts +55 -55
- package/types/config/editor.utils.d.ts +40 -40
- package/types/config/i18n/en-us.d.ts +125 -125
- package/types/config/i18n/zh-cn.d.ts +125 -125
- package/types/config/index.d.ts +7 -7
- package/types/config/types/editor-config.interface.d.ts +11 -12
- package/types/config/types/editor-modules.interface.d.ts +38 -39
- package/types/config/types/index.d.ts +3 -3
- package/types/config/types/type.d.ts +2 -2
- package/types/core/fluent-editor.d.ts +10 -11
- package/types/fluent-editor.d.ts +1 -2
- package/types/formats/emoji.d.ts +7 -8
- package/types/formats/index.d.ts +4 -4
- package/types/formats/soft-break.d.ts +11 -12
- package/types/formats/strike.d.ts +7 -8
- package/types/formats/video.d.ts +12 -13
- package/types/index.d.ts +7 -8
- package/types/modules/ai/constants.d.ts +30 -30
- package/types/modules/ai/icons.d.ts +21 -21
- package/types/modules/ai/index.d.ts +93 -94
- package/types/modules/ai/types.d.ts +16 -16
- package/types/modules/collaborative-editing/awareness/awareness.d.ts +25 -26
- package/types/modules/collaborative-editing/awareness/index.d.ts +2 -2
- package/types/modules/collaborative-editing/awareness/y-indexeddb.d.ts +2 -3
- package/types/modules/collaborative-editing/collaborative-editing.d.ts +20 -21
- package/types/modules/collaborative-editing/index.d.ts +2 -2
- package/types/modules/collaborative-editing/module.d.ts +10 -11
- package/types/modules/collaborative-editing/provider/index.d.ts +3 -3
- package/types/modules/collaborative-editing/provider/providerRegistry.d.ts +24 -25
- package/types/modules/collaborative-editing/provider/webrtc.d.ts +33 -34
- package/types/modules/collaborative-editing/provider/websocket.d.ts +37 -38
- package/types/modules/collaborative-editing/types.d.ts +45 -46
- package/types/modules/counter.d.ts +21 -22
- package/types/modules/custom-clipboard.d.ts +23 -24
- package/types/modules/custom-image/actions/{Action.d.ts → action.d.ts} +7 -8
- package/types/modules/custom-image/actions/custom-resize-action.d.ts +22 -23
- package/types/modules/custom-image/actions/delete-action.d.ts +5 -6
- package/types/modules/custom-image/actions/image-toolbar-buttons.d.ts +15 -16
- package/types/modules/custom-image/actions/index.d.ts +6 -6
- package/types/modules/custom-image/actions/toolbar-action.d.ts +7 -8
- package/types/modules/custom-image/actions/toolbar.d.ts +16 -17
- package/types/modules/custom-image/blot-formatter.d.ts +19 -20
- package/types/modules/custom-image/image.d.ts +26 -27
- package/types/modules/custom-image/index.d.ts +4 -4
- package/types/modules/custom-image/{Options.d.ts → options.d.ts} +45 -46
- package/types/modules/custom-image/specs/blot-spec.d.ts +10 -11
- package/types/modules/custom-image/specs/custom-image-spec.d.ts +15 -16
- package/types/modules/custom-image/specs/image-spec.d.ts +7 -8
- package/types/modules/custom-image/specs/index.d.ts +3 -3
- package/types/modules/custom-uploader.d.ts +37 -38
- package/types/modules/divider.d.ts +7 -8
- package/types/modules/emoji.d.ts +35 -36
- package/types/modules/file/formats/file.d.ts +17 -18
- package/types/modules/file/index.d.ts +3 -3
- package/types/modules/file/modules/file-bar.d.ts +14 -14
- package/types/modules/file/modules/file-module.d.ts +7 -8
- package/types/modules/flow-chart/config-utils.d.ts +9 -10
- package/types/modules/flow-chart/formats/flow-chart-blot.d.ts +40 -41
- package/types/modules/flow-chart/i18n/en-us.d.ts +26 -26
- package/types/modules/flow-chart/i18n/index.d.ts +1 -1
- package/types/modules/flow-chart/i18n/zh-cn.d.ts +26 -26
- package/types/modules/flow-chart/icons.d.ts +12 -12
- package/types/modules/flow-chart/index.d.ts +8 -9
- package/types/modules/flow-chart/modules/context-menu.d.ts +1 -2
- package/types/modules/flow-chart/modules/control-panel.d.ts +1 -2
- package/types/modules/flow-chart/modules/custom-resize-action.d.ts +22 -22
- package/types/modules/flow-chart/options.d.ts +29 -29
- package/types/modules/i18n.d.ts +13 -14
- package/types/modules/index.d.ts +18 -18
- package/types/modules/link/formats/link.d.ts +14 -15
- package/types/modules/link/index.d.ts +2 -2
- package/types/modules/link/modules/tooltip.d.ts +25 -26
- package/types/modules/mathlive/formats.d.ts +20 -21
- package/types/modules/mathlive/index.d.ts +3 -3
- package/types/modules/mathlive/module.d.ts +7 -8
- package/types/modules/mathlive/tooltip.d.ts +14 -15
- package/types/modules/mention/constants.d.ts +3 -3
- package/types/modules/mention/index.d.ts +2 -2
- package/types/modules/mention/mention-link.d.ts +14 -15
- package/types/modules/mention/{Mention.d.ts → mention.d.ts} +52 -53
- package/types/modules/mind-map/config-utils.d.ts +11 -12
- package/types/modules/mind-map/formats/mind-map-blot.d.ts +41 -42
- package/types/modules/mind-map/i18n/en-us.d.ts +25 -25
- package/types/modules/mind-map/i18n/index.d.ts +1 -1
- package/types/modules/mind-map/i18n/zh-cn.d.ts +25 -25
- package/types/modules/mind-map/icons.d.ts +21 -21
- package/types/modules/mind-map/index.d.ts +8 -9
- package/types/modules/mind-map/modules/context-menu.d.ts +1 -2
- package/types/modules/mind-map/modules/control-panel.d.ts +1 -2
- package/types/modules/mind-map/modules/custom-resize-action.d.ts +23 -23
- package/types/modules/mind-map/options.d.ts +27 -27
- package/types/modules/shortcut-key/index.d.ts +67 -68
- package/types/modules/syntax.d.ts +12 -13
- package/types/modules/table-up/index.d.ts +32 -33
- package/types/modules/toolbar/better-picker.d.ts +13 -14
- package/types/modules/toolbar/better-toolbar.d.ts +6 -7
- package/types/modules/toolbar/index.d.ts +3 -3
- package/types/modules/toolbar/toolbar-tip.d.ts +7 -8
- package/types/themes/snow.d.ts +9 -10
- package/types/tools/format-painter.d.ts +12 -13
- package/types/tools/fullscreen.d.ts +4 -5
- package/types/tools/screenshot.d.ts +17 -18
- package/types/ui/icons.config.d.ts +40 -40
- package/types/ui/icons.d.ts +6 -6
- package/types/utils/debounce.d.ts +6 -6
- package/types/utils/image.d.ts +1 -1
- package/types/utils/is.d.ts +6 -6
- package/types/utils/merge.d.ts +7 -7
- package/types/utils/method.d.ts +6 -6
- package/types/utils/scroll-lock.d.ts +6 -6
- package/types/config/types/additional-toolbar-item.interface.d.ts +0 -8
- package/types/config/types/content-change.interface.d.ts +0 -13
- package/types/config/types/content-save.interface.d.ts +0 -6
- package/types/config/types/counter-option.interface.d.ts +0 -9
- package/types/config/types/editor-toolbar.interface.d.ts +0 -6
- package/types/config/types/file-operation.interface.d.ts +0 -12
- package/types/config/types/focus-change.interface.d.ts +0 -4
- package/types/config/types/fullscreen-module.interface.d.ts +0 -4
- package/types/config/types/help-panel-item.interface.d.ts +0 -5
- package/types/config/types/help-panel-option.interface.d.ts +0 -7
- package/types/config/types/image-module.interface.d.ts +0 -3
- package/types/config/types/image-upload.interface.d.ts +0 -7
- package/types/config/types/load-on-demand-module.interface.d.ts +0 -5
- package/types/config/types/mention-module.interface.d.ts +0 -8
- package/types/config/types/paste-change.interface.d.ts +0 -6
- package/types/config/types/quick-menu-module.interface.d.ts +0 -3
- package/types/config/types/range.interface.d.ts +0 -4
- package/types/config/types/registry-options.interface.d.ts +0 -5
- package/types/config/types/selection-change.interface.d.ts +0 -8
- package/types/config/types/toolbar-item.interface.d.ts +0 -13
- package/types/config/types/validate-error.interface.d.ts +0 -13
- package/types/modules/custom-image/BlotFormatter.d.ts +0 -29
- package/types/modules/custom-image/actions/CustomResizeAction.d.ts +0 -24
- package/types/modules/custom-image/actions/DeleteAction.d.ts +0 -7
- package/types/modules/custom-image/image-bar.d.ts +0 -15
- package/types/modules/custom-image/specs/BlotSpec.d.ts +0 -13
- package/types/modules/custom-image/specs/CustomImageSpec.d.ts +0 -21
- package/types/modules/custom-image/specs/ImageSpec.d.ts +0 -10
- package/types/modules/emoji/emoji-list/index.d.ts +0 -1
- package/types/modules/emoji/emoji-list/people.d.ts +0 -1
- package/types/modules/emoji/emoji-list.d.ts +0 -2
- package/types/modules/emoji/emoji-map.d.ts +0 -2
- package/types/modules/emoji/emoji-sprite.d.ts +0 -1
- package/types/modules/emoji/formats/emoji-blot.d.ts +0 -13
- package/types/modules/emoji/index.d.ts +0 -10
- package/types/modules/emoji/modules/emoji.d.ts +0 -38
- package/types/modules/emoji/modules/toolbar-emoji.d.ts +0 -8
- package/types/modules/emoji/utils.d.ts +0 -1
- package/types/modules/global-link/constants.d.ts +0 -3
- package/types/modules/global-link/formats/customer-widget-link.d.ts +0 -14
- package/types/modules/global-link/formats/doc-link.d.ts +0 -17
- package/types/modules/global-link/formats/wiki-link.d.ts +0 -16
- package/types/modules/global-link/formats/work-item-link.d.ts +0 -16
- package/types/modules/global-link/global-link-panel.d.ts +0 -19
- package/types/modules/global-link/index.d.ts +0 -18
- package/types/modules/global-link/utils/createTable.d.ts +0 -1
- package/types/modules/mention/MentionLink.d.ts +0 -16
- package/types/modules/quick-menu.d.ts +0 -22
- package/types/modules/table/better-table.d.ts +0 -35
- package/types/modules/table/formats/header.d.ts +0 -23
- package/types/modules/table/formats/list.d.ts +0 -34
- package/types/modules/table/formats/table.d.ts +0 -147
- package/types/modules/table/modules/table-column-tool.d.ts +0 -23
- package/types/modules/table/modules/table-operation-menu.d.ts +0 -38
- package/types/modules/table/modules/table-scroll-bar.d.ts +0 -33
- package/types/modules/table/modules/table-selection.d.ts +0 -37
- package/types/modules/table/modules/table-selector.d.ts +0 -22
- package/types/modules/table/table-config.d.ts +0 -38
- package/types/modules/table/utils/index.d.ts +0 -17
- package/types/modules/table/utils/node-matchers.d.ts +0 -9
|
@@ -6,49 +6,48 @@ import { WebrtcProvider } from 'y-webrtc';
|
|
|
6
6
|
import { WebsocketProvider } from 'y-websocket';
|
|
7
7
|
import { AwarenessOptions } from './awareness';
|
|
8
8
|
import { WebRTCProviderOptions, WebsocketProviderOptions } from './provider';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
export
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
9
|
+
import type * as Y from 'yjs';
|
|
10
|
+
export interface ProviderEventHandlers {
|
|
11
|
+
onConnect?: () => void;
|
|
12
|
+
onDisconnect?: () => void;
|
|
13
|
+
onError?: (error: Error) => void;
|
|
14
|
+
onSyncChange?: (isSynced: boolean) => void;
|
|
15
|
+
}
|
|
16
|
+
export interface BaseYjsProviderConfig extends ProviderEventHandlers {
|
|
17
|
+
options: Record<string, any>;
|
|
18
|
+
type: string;
|
|
19
|
+
}
|
|
20
|
+
export type WebRTCProviderConfig = BaseYjsProviderConfig & {
|
|
21
|
+
options: WebRTCProviderOptions;
|
|
22
|
+
type: 'webrtc';
|
|
23
|
+
};
|
|
24
|
+
export type WebsocketProviderConfig = BaseYjsProviderConfig & {
|
|
25
|
+
options: WebsocketProviderOptions;
|
|
26
|
+
type: 'websocket';
|
|
27
|
+
};
|
|
28
|
+
export type CustomProviderConfig = BaseYjsProviderConfig & {
|
|
29
|
+
options: Record<string, any>;
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
|
32
|
+
export type CursorsConfig = boolean | object;
|
|
33
|
+
export interface CollaborativeEditingDeps {
|
|
34
|
+
Y: typeof Y;
|
|
35
|
+
Awareness: typeof Awareness;
|
|
36
|
+
QuillBinding: typeof QuillBinding;
|
|
37
|
+
QuillCursors: typeof QuillCursors;
|
|
38
|
+
WebsocketProvider?: typeof WebsocketProvider;
|
|
39
|
+
WebrtcProvider?: typeof WebrtcProvider;
|
|
40
|
+
IndexeddbPersistence?: typeof IndexeddbPersistence;
|
|
41
|
+
}
|
|
42
|
+
export interface YjsOptions {
|
|
43
|
+
ydoc?: Y.Doc;
|
|
44
|
+
provider: (WebRTCProviderConfig | WebsocketProviderConfig | CustomProviderConfig);
|
|
45
|
+
awareness?: AwarenessOptions;
|
|
46
|
+
offline?: boolean;
|
|
47
|
+
cursors?: CursorsConfig;
|
|
48
|
+
deps?: CollaborativeEditingDeps;
|
|
49
|
+
onConnect?: () => void;
|
|
50
|
+
onDisconnect?: () => void;
|
|
51
|
+
onError?: (error: Error) => void;
|
|
52
|
+
onSyncChange?: (isSynced: boolean) => void;
|
|
53
|
+
}
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import { AnyFunction } from '../config';
|
|
2
2
|
import { default as FluentEditor } from '../fluent-editor';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
options: ICounterOption;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
3
|
+
export interface ICounterOption {
|
|
4
|
+
format?: 'text' | 'html';
|
|
5
|
+
unit?: 'word' | 'char';
|
|
6
|
+
count?: number;
|
|
7
|
+
template?: string | AnyFunction;
|
|
8
|
+
errorTemplate?: string | AnyFunction;
|
|
9
|
+
}
|
|
10
|
+
export default class Counter {
|
|
11
|
+
quill: FluentEditor;
|
|
12
|
+
container: HTMLDivElement;
|
|
13
|
+
options: ICounterOption;
|
|
14
|
+
constructor(quill: FluentEditor, options: ICounterOption);
|
|
15
|
+
resolveOptions(options: ICounterOption): {
|
|
16
|
+
format: string;
|
|
17
|
+
unit: string;
|
|
18
|
+
template: string;
|
|
19
|
+
count: number;
|
|
20
|
+
} & ICounterOption;
|
|
21
|
+
renderCount: () => void;
|
|
22
|
+
getContentLength(format: any): number;
|
|
23
|
+
}
|
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
import { default as TypeClipboard } from 'quill/modules/clipboard';
|
|
2
2
|
import { default as FluentEditor } from '../fluent-editor';
|
|
3
|
-
|
|
4
|
-
declare
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
export {};
|
|
3
|
+
declare const Clipboard: typeof TypeClipboard;
|
|
4
|
+
export declare class CustomClipboard extends Clipboard {
|
|
5
|
+
quill: FluentEditor;
|
|
6
|
+
prepareMatching(container: HTMLElement, nodeMatches: any): any[][];
|
|
7
|
+
onCaptureCopy(e: any, isCut?: boolean): void;
|
|
8
|
+
onCapturePaste(e: ClipboardEvent): void;
|
|
9
|
+
onPaste(range: any, { html, text, files: clipboardFiles, rtf }: {
|
|
10
|
+
html: any;
|
|
11
|
+
text: any;
|
|
12
|
+
files: any;
|
|
13
|
+
rtf: any;
|
|
14
|
+
}): void;
|
|
15
|
+
files2urls(files: File[], placeholders: any, originalUrls: any, pastedDelta: any, imageIndexs: any): Promise<unknown[]>;
|
|
16
|
+
flipFilesArray(filesArr: any): any[][];
|
|
17
|
+
convertHexToBase64(hexString: any): string;
|
|
18
|
+
extractImageDataFromRtf(rtfData: any): any[];
|
|
19
|
+
extractFilesFromDelta(delta: any, clipboardFiles: any, hexImages?: any): Promise<any[]>;
|
|
20
|
+
getImgSelection(delta: any, imageIndex: any): {
|
|
21
|
+
index: number;
|
|
22
|
+
length: number;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { BlotFormatter } from '../blot-formatter';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
formatter: BlotFormatter;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
2
|
+
export declare class Action {
|
|
3
|
+
formatter: BlotFormatter;
|
|
4
|
+
constructor(formatter: BlotFormatter);
|
|
5
|
+
onCreate(): void;
|
|
6
|
+
onDestroy(): void;
|
|
7
|
+
onUpdate(): void;
|
|
8
|
+
}
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import { Action } from './action';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
2
|
+
export declare class CustomResizeAction extends Action {
|
|
3
|
+
topLeftHandle: HTMLElement;
|
|
4
|
+
topRightHandle: HTMLElement;
|
|
5
|
+
bottomRightHandle: HTMLElement;
|
|
6
|
+
bottomLeftHandle: HTMLElement;
|
|
7
|
+
dragHandle: HTMLElement;
|
|
8
|
+
dragStartX: number;
|
|
9
|
+
preDragWidth: number;
|
|
10
|
+
targetRatio: number;
|
|
11
|
+
maxWidth: number;
|
|
12
|
+
minWidth: number;
|
|
13
|
+
constructor(formatter: any);
|
|
14
|
+
onCreate(): void;
|
|
15
|
+
onDestroy(): void;
|
|
16
|
+
createHandle(position: string, cursor: string): HTMLElement;
|
|
17
|
+
repositionHandles(handleStyle: any): void;
|
|
18
|
+
setCursor(value: string): void;
|
|
19
|
+
onMouseDown: (event: MouseEvent) => void;
|
|
20
|
+
findTd: (node: HTMLElement, level: number) => any;
|
|
21
|
+
onDrag: (event: MouseEvent) => void;
|
|
22
|
+
onMouseUp: () => void;
|
|
23
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Action } from './action';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
2
|
+
export declare class DeleteAction extends Action {
|
|
3
|
+
onCreate(): void;
|
|
4
|
+
onDestroy(): void;
|
|
5
|
+
onKeyUp: (event: any) => void;
|
|
6
|
+
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { ToolbarButtonOptions, ToolButtonOption } from '../options';
|
|
2
|
-
|
|
3
|
-
export declare
|
|
4
|
-
export declare
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
2
|
+
export declare const ALIGN_ATTR = "data-align";
|
|
3
|
+
export declare function setAlignStyle(el: HTMLElement, display: string | null, float: string | null, margin: string | null): void;
|
|
4
|
+
export declare const alignmentHandler: {
|
|
5
|
+
left: (el: HTMLElement, toolbarButtons: ImageToolbarButtons) => void;
|
|
6
|
+
center: (el: HTMLElement, toolbarButtons: ImageToolbarButtons) => void;
|
|
7
|
+
right: (el: HTMLElement, toolbarButtons: ImageToolbarButtons) => void;
|
|
8
|
+
download: (el: HTMLImageElement, toolbarButtons: ImageToolbarButtons) => void;
|
|
9
|
+
copy: (el: HTMLImageElement, toolbarButtons: ImageToolbarButtons) => Promise<void>;
|
|
10
|
+
};
|
|
11
|
+
export declare class ImageToolbarButtons {
|
|
12
|
+
buttons: Record<string, ToolButtonOption>;
|
|
13
|
+
constructor(options: ToolbarButtonOptions);
|
|
14
|
+
getItems(): ToolButtonOption[];
|
|
15
|
+
clear(el: HTMLElement): void;
|
|
16
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './action';
|
|
2
|
-
export * from './custom-resize-action';
|
|
3
|
-
export * from './delete-action';
|
|
4
|
-
export * from './image-toolbar-buttons';
|
|
5
|
-
export * from './toolbar';
|
|
6
|
-
export * from './toolbar-action';
|
|
1
|
+
export * from './action';
|
|
2
|
+
export * from './custom-resize-action';
|
|
3
|
+
export * from './delete-action';
|
|
4
|
+
export * from './image-toolbar-buttons';
|
|
5
|
+
export * from './toolbar';
|
|
6
|
+
export * from './toolbar-action';
|
|
@@ -2,11 +2,10 @@ import { BlotFormatter } from '../blot-formatter';
|
|
|
2
2
|
import { Action } from './action';
|
|
3
3
|
import { ImageToolbarButtons } from './image-toolbar-buttons';
|
|
4
4
|
import { ImageToolbar } from './toolbar';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
5
|
+
export declare class ImageToolbarAction extends Action {
|
|
6
|
+
toolbar: ImageToolbar;
|
|
7
|
+
buttons: ImageToolbarButtons;
|
|
8
|
+
constructor(formatter: BlotFormatter);
|
|
9
|
+
onCreate(): void;
|
|
10
|
+
onDestroy(): void;
|
|
11
|
+
}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { BlotFormatter } from '../blot-formatter';
|
|
2
2
|
import { ToolButtonOption } from '../options';
|
|
3
3
|
import { ImageToolbarButtons } from './image-toolbar-buttons';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
4
|
+
export declare class ImageToolbar {
|
|
5
|
+
toolbar?: HTMLElement;
|
|
6
|
+
buttons: HTMLElement[];
|
|
7
|
+
constructor();
|
|
8
|
+
create(formatter: BlotFormatter, toolButton: ImageToolbarButtons): HTMLElement;
|
|
9
|
+
destroy(): void;
|
|
10
|
+
getElement(): HTMLElement;
|
|
11
|
+
addToolbarStyle(formatter: BlotFormatter, toolbar: HTMLElement): void;
|
|
12
|
+
addButtonStyle(button: HTMLElement, index: number, formatter: BlotFormatter): void;
|
|
13
|
+
addButtons(formatter: BlotFormatter, toolbar: HTMLElement, toolButton: ImageToolbarButtons): void;
|
|
14
|
+
preselectButton(button: HTMLElement, toolButtonOption: ToolButtonOption, formatter: BlotFormatter, toolButton: ImageToolbarButtons): void;
|
|
15
|
+
onButtonClick(button: HTMLElement, formatter: BlotFormatter, toolButtonOption: ToolButtonOption, toolButton: ImageToolbarButtons): void;
|
|
16
|
+
clickButton(button: HTMLElement, target: HTMLImageElement, formatter: BlotFormatter, toolButtonOption: ToolButtonOption, toolButton: ImageToolbarButtons): void;
|
|
17
|
+
selectButton(formatter: BlotFormatter, button: HTMLElement): void;
|
|
18
|
+
deselectButton(formatter: BlotFormatter, button: HTMLElement): void;
|
|
19
|
+
}
|
|
@@ -2,23 +2,22 @@ import { default as FluentEditor } from '../../core/fluent-editor';
|
|
|
2
2
|
import { Action } from './actions';
|
|
3
3
|
import { BlotFormatterOptions } from './options';
|
|
4
4
|
import { BlotSpec } from './specs';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
5
|
+
export declare class BlotFormatter {
|
|
6
|
+
quill: FluentEditor;
|
|
7
|
+
options: BlotFormatterOptions;
|
|
8
|
+
currentSpec: BlotSpec;
|
|
9
|
+
specs: BlotSpec[];
|
|
10
|
+
overlay: HTMLElement;
|
|
11
|
+
actions: Action[];
|
|
12
|
+
observer: MutationObserver;
|
|
13
|
+
static register(): void;
|
|
14
|
+
constructor(quill: FluentEditor, options?: Partial<BlotFormatterOptions>);
|
|
15
|
+
show(spec: BlotSpec): void;
|
|
16
|
+
hide(): void;
|
|
17
|
+
update(): void;
|
|
18
|
+
createActions(spec: BlotSpec): void;
|
|
19
|
+
destroyActions(): void;
|
|
20
|
+
repositionOverlay(): void;
|
|
21
|
+
setUserSelect(value: string): void;
|
|
22
|
+
onClick: () => void;
|
|
23
|
+
}
|
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
import { Parchment as TypeParchment } from 'quill';
|
|
2
2
|
import { default as TypeEmbed } from 'quill/blots/embed';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
static
|
|
13
|
-
static
|
|
14
|
-
static
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
static
|
|
18
|
-
static
|
|
19
|
-
static
|
|
20
|
-
static
|
|
21
|
-
static
|
|
22
|
-
static
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
wrap(
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
export {};
|
|
3
|
+
declare const Embed: typeof TypeEmbed;
|
|
4
|
+
export type ImageValue = string | {
|
|
5
|
+
src: string;
|
|
6
|
+
align?: string;
|
|
7
|
+
height?: number;
|
|
8
|
+
width?: number;
|
|
9
|
+
};
|
|
10
|
+
export declare class CustomImage extends Embed {
|
|
11
|
+
static blotName: string;
|
|
12
|
+
static tagName: string;
|
|
13
|
+
static ID_SEED: number;
|
|
14
|
+
static allowInvalidUrl: boolean;
|
|
15
|
+
domNode: HTMLElement;
|
|
16
|
+
static setOptions(allowInvalidUrl: boolean): void;
|
|
17
|
+
static create(value: ImageValue): HTMLElement;
|
|
18
|
+
static formats(domNode: HTMLElement): {};
|
|
19
|
+
static match(url: string): boolean;
|
|
20
|
+
static register(): void;
|
|
21
|
+
static sanitize(url: string): string;
|
|
22
|
+
static value(domNode: HTMLElement): any;
|
|
23
|
+
format(name: string, value: any): void;
|
|
24
|
+
unWrap(): void;
|
|
25
|
+
wrap(name: string, value?: any): TypeParchment.Parent;
|
|
26
|
+
wrap(wrapper: TypeParchment.Parent): TypeParchment.Parent;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './actions';
|
|
2
|
-
export * from './blot-formatter';
|
|
3
|
-
export * from './image';
|
|
4
|
-
export * from './specs';
|
|
1
|
+
export * from './actions';
|
|
2
|
+
export * from './blot-formatter';
|
|
3
|
+
export * from './image';
|
|
4
|
+
export * from './specs';
|
|
@@ -1,48 +1,47 @@
|
|
|
1
1
|
import { ImageToolbar, ImageToolbarButtons } from './actions';
|
|
2
2
|
import { BlotSpec } from './specs';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
export declare const
|
|
43
|
-
export declare const
|
|
44
|
-
export declare const
|
|
45
|
-
export declare const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
export default DefaultOptions;
|
|
3
|
+
export interface OverlayOptions {
|
|
4
|
+
className: string;
|
|
5
|
+
style: Record<string, string>;
|
|
6
|
+
}
|
|
7
|
+
export interface ResizeOptions {
|
|
8
|
+
handleClassName: string;
|
|
9
|
+
handleStyle: Record<string, string>;
|
|
10
|
+
}
|
|
11
|
+
export interface ToolButtonOption {
|
|
12
|
+
name: string;
|
|
13
|
+
icon: string;
|
|
14
|
+
isActive?: (el: HTMLElement) => boolean;
|
|
15
|
+
apply: (this: ImageToolbar, el: HTMLImageElement, toolbarButtons: ImageToolbarButtons) => void;
|
|
16
|
+
}
|
|
17
|
+
export interface ToolbarButtonOptions {
|
|
18
|
+
buttons: Record<string, ToolButtonOption | boolean>;
|
|
19
|
+
}
|
|
20
|
+
export interface ToolbarOptions extends ToolbarButtonOptions {
|
|
21
|
+
mainClassName: string;
|
|
22
|
+
mainStyle: Record<string, unknown>;
|
|
23
|
+
buttonClassName: string;
|
|
24
|
+
addButtonSelectStyle: boolean;
|
|
25
|
+
buttonStyle: Record<string, unknown>;
|
|
26
|
+
svgStyle: Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
export interface BlotFormatterOptionsInput {
|
|
29
|
+
specs: typeof BlotSpec[];
|
|
30
|
+
overlay: Partial<OverlayOptions>;
|
|
31
|
+
resize: Partial<ResizeOptions>;
|
|
32
|
+
toolbar: Partial<ToolbarOptions>;
|
|
33
|
+
}
|
|
34
|
+
export interface BlotFormatterOptions {
|
|
35
|
+
specs: typeof BlotSpec[];
|
|
36
|
+
overlay: OverlayOptions;
|
|
37
|
+
resize: ResizeOptions;
|
|
38
|
+
toolbar: ToolbarOptions;
|
|
39
|
+
allowInvalidUrl: boolean;
|
|
40
|
+
}
|
|
41
|
+
export declare const LEFT_ALIGN = "align-left";
|
|
42
|
+
export declare const CENTER_ALIGN = "align-center";
|
|
43
|
+
export declare const RIGHT_ALIGN = "align-right";
|
|
44
|
+
export declare const COPY = "copy";
|
|
45
|
+
export declare const DOWNLOAD = "download";
|
|
46
|
+
declare const DefaultOptions: BlotFormatterOptions;
|
|
47
|
+
export default DefaultOptions;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { BlotFormatter } from '../blot-formatter';
|
|
2
2
|
import { CustomResizeAction, DeleteAction, ImageToolbarAction } from '../actions';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
formatter: BlotFormatter;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
3
|
+
export declare class BlotSpec {
|
|
4
|
+
formatter: BlotFormatter;
|
|
5
|
+
constructor(formatter: BlotFormatter);
|
|
6
|
+
init(): void;
|
|
7
|
+
getActions(): (typeof ImageToolbarAction | typeof CustomResizeAction | typeof DeleteAction)[];
|
|
8
|
+
getTargetElement(): HTMLElement | null;
|
|
9
|
+
getOverlayElement(): HTMLElement;
|
|
10
|
+
setSelection(): void;
|
|
11
|
+
onHide(): void;
|
|
12
|
+
}
|