@opentiny/fluent-editor 3.20.2 → 3.20.3
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/package.json +3 -3
- package/dist/package.json +0 -52
- package/scripts/pre-release.js +0 -34
- package/src/assets/better-table.scss +0 -367
- package/src/assets/common.scss +0 -279
- package/src/assets/counter.scss +0 -19
- package/src/assets/custom-image.scss +0 -20
- package/src/assets/editor.scss +0 -365
- package/src/assets/emoji/emoji.scss +0 -461
- package/src/assets/emoji/style.scss +0 -252
- package/src/assets/fileBar.scss +0 -116
- package/src/assets/font.scss +0 -36
- package/src/assets/fullscreen.scss +0 -21
- package/src/assets/iconfont/iconfont.ttf +0 -0
- package/src/assets/iconfont/iconfont.woff +0 -0
- package/src/assets/iconfont/iconfont.woff2 +0 -0
- package/src/assets/image1.png +0 -0
- package/src/assets/lineHeight.scss +0 -16
- package/src/assets/link.scss +0 -130
- package/src/assets/mention.scss +0 -48
- package/src/assets/screenshot.scss +0 -78
- package/src/assets/size.scss +0 -13
- package/src/assets/style.scss +0 -39
- package/src/assets/tasklist.scss +0 -76
- package/src/assets/toolbar.scss +0 -416
- package/src/attributors/font-size.ts +0 -6
- package/src/attributors/font-style.ts +0 -6
- package/src/attributors/index.ts +0 -4
- package/src/attributors/line-height.ts +0 -6
- package/src/attributors/text-indent.ts +0 -6
- package/src/config/base64-image.ts +0 -8
- package/src/config/editor.config.ts +0 -88
- package/src/config/editor.utils.ts +0 -199
- package/src/config/i18n/en-us.ts +0 -106
- package/src/config/i18n/zh-cn.ts +0 -104
- package/src/config/icons.config.ts +0 -297
- package/src/config/index.ts +0 -171
- package/src/config/types/additional-toolbar-item.interface.ts +0 -8
- package/src/config/types/content-change.interface.ts +0 -13
- package/src/config/types/content-save.interface.ts +0 -6
- package/src/config/types/counter-option.interface.ts +0 -9
- package/src/config/types/editor-config.interface.ts +0 -22
- package/src/config/types/editor-modules.interface.ts +0 -41
- package/src/config/types/file-operation.interface.ts +0 -12
- package/src/config/types/focus-change.interface.ts +0 -4
- package/src/config/types/fullscreen-module.interface.ts +0 -4
- package/src/config/types/help-panel-item.interface.ts +0 -5
- package/src/config/types/help-panel-option.interface.ts +0 -7
- package/src/config/types/image-module.interface.ts +0 -3
- package/src/config/types/image-upload.interface.ts +0 -7
- package/src/config/types/index.ts +0 -22
- package/src/config/types/load-on-demand-module.interface.ts +0 -5
- package/src/config/types/mention-module.interface.ts +0 -8
- package/src/config/types/paste-change.interface.ts +0 -6
- package/src/config/types/quick-menu-module.interface.ts +0 -3
- package/src/config/types/range.interface.ts +0 -4
- package/src/config/types/registry-options.interface.ts +0 -5
- package/src/config/types/selection-change.interface.ts +0 -8
- package/src/config/types/toolbar-item.interface.ts +0 -13
- package/src/config/types/type.ts +0 -5
- package/src/config/types/validate-error.interface.ts +0 -11
- package/src/counter/index.ts +0 -69
- package/src/custom-clipboard.ts +0 -633
- package/src/custom-image/BlotFormatter.ts +0 -167
- package/src/custom-image/Options.ts +0 -150
- package/src/custom-image/actions/Action.ts +0 -13
- package/src/custom-image/actions/CustomResizeAction.ts +0 -207
- package/src/custom-image/actions/DeleteAction.ts +0 -29
- package/src/custom-image/image.ts +0 -118
- package/src/custom-image/specs/BlotSpec.ts +0 -30
- package/src/custom-image/specs/CustomImageSpec.ts +0 -139
- package/src/custom-image/specs/ImageSpec.ts +0 -33
- package/src/custom-uploader.ts +0 -199
- package/src/emoji/emoji-list/index.ts +0 -1
- package/src/emoji/emoji-list/people.ts +0 -111
- package/src/emoji/emoji-list.ts +0 -9
- package/src/emoji/emoji-map.ts +0 -9
- package/src/emoji/formats/emoji-blot.ts +0 -54
- package/src/emoji/index.ts +0 -5
- package/src/emoji/modules/emoji.ts +0 -318
- package/src/emoji/modules/toolbar-emoji.ts +0 -182
- package/src/emoji/utils.ts +0 -15
- package/src/file/formats/file.ts +0 -67
- package/src/file/index.ts +0 -38
- package/src/file/modules/file-bar.ts +0 -146
- package/src/fluent-editor.ts +0 -164
- package/src/format-painter/index.ts +0 -79
- package/src/global-link/constants.ts +0 -3
- package/src/global-link/formats/customer-widget-link.ts +0 -36
- package/src/global-link/formats/doc-link.ts +0 -55
- package/src/global-link/formats/wiki-link.ts +0 -45
- package/src/global-link/formats/work-item-link.ts +0 -47
- package/src/global-link/global-link-panel.ts +0 -20
- package/src/global-link/index.ts +0 -165
- package/src/global-link/utils/createTable.ts +0 -54
- package/src/index.ts +0 -5
- package/src/link/formats/link.ts +0 -44
- package/src/link/index.ts +0 -35
- package/src/link/modules/tooltip.ts +0 -318
- package/src/mention/Mention.ts +0 -406
- package/src/mention/MentionLink.ts +0 -51
- package/src/mention/constants.ts +0 -3
- package/src/quick-menu/index.ts +0 -100
- package/src/screenshot/index.ts +0 -231
- package/src/soft-break/index.ts +0 -34
- package/src/strike/index.ts +0 -16
- package/src/syntax/index.ts +0 -35
- package/src/table/better-table.ts +0 -553
- package/src/table/formats/header.ts +0 -129
- package/src/table/formats/list.ts +0 -229
- package/src/table/formats/table.ts +0 -1272
- package/src/table/modules/table-column-tool.ts +0 -492
- package/src/table/modules/table-operation-menu.ts +0 -584
- package/src/table/modules/table-scroll-bar.ts +0 -248
- package/src/table/modules/table-selection.ts +0 -387
- package/src/table/table-config.ts +0 -42
- package/src/table/utils/index.ts +0 -62
- package/src/table/utils/node-matchers.ts +0 -359
- package/src/toolbar/better-picker.ts +0 -370
- package/src/toolbar/index.ts +0 -180
- package/src/utils/debounce.ts +0 -149
- package/src/utils/image.ts +0 -22
- package/src/utils/method.ts +0 -82
- package/src/utils/scroll-lock.ts +0 -52
- package/src/video/index.ts +0 -62
- package/tsconfig.json +0 -26
- package/vite.config.theme.ts +0 -20
- package/vite.config.ts +0 -56
- /package/{dist/README.md → README.md} +0 -0
- /package/{dist/es → es}/attributors/font-size.es.js +0 -0
- /package/{dist/es → es}/attributors/font-size.es.js.map +0 -0
- /package/{dist/es → es}/attributors/font-style.es.js +0 -0
- /package/{dist/es → es}/attributors/font-style.es.js.map +0 -0
- /package/{dist/es → es}/attributors/index.es.js +0 -0
- /package/{dist/es → es}/attributors/index.es.js.map +0 -0
- /package/{dist/es → es}/attributors/line-height.es.js +0 -0
- /package/{dist/es → es}/attributors/line-height.es.js.map +0 -0
- /package/{dist/es → es}/attributors/text-indent.es.js +0 -0
- /package/{dist/es → es}/attributors/text-indent.es.js.map +0 -0
- /package/{dist/es → es}/config/base64-image.es.js +0 -0
- /package/{dist/es → es}/config/base64-image.es.js.map +0 -0
- /package/{dist/es → es}/config/editor.config.es.js +0 -0
- /package/{dist/es → es}/config/editor.config.es.js.map +0 -0
- /package/{dist/es → es}/config/editor.utils.es.js +0 -0
- /package/{dist/es → es}/config/editor.utils.es.js.map +0 -0
- /package/{dist/es → es}/config/i18n/en-us.es.js +0 -0
- /package/{dist/es → es}/config/i18n/en-us.es.js.map +0 -0
- /package/{dist/es → es}/config/i18n/zh-cn.es.js +0 -0
- /package/{dist/es → es}/config/i18n/zh-cn.es.js.map +0 -0
- /package/{dist/es → es}/config/icons.config.es.js +0 -0
- /package/{dist/es → es}/config/icons.config.es.js.map +0 -0
- /package/{dist/es → es}/config/index.es.js +0 -0
- /package/{dist/es → es}/config/index.es.js.map +0 -0
- /package/{dist/es → es}/config/types/additional-toolbar-item.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/additional-toolbar-item.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/content-change.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/content-change.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/content-save.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/content-save.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/counter-option.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/counter-option.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/editor-config.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/editor-config.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/editor-modules.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/editor-modules.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/file-operation.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/file-operation.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/focus-change.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/focus-change.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/fullscreen-module.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/fullscreen-module.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/help-panel-item.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/help-panel-item.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/help-panel-option.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/help-panel-option.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/image-module.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/image-module.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/image-upload.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/image-upload.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/index.es.js +0 -0
- /package/{dist/es → es}/config/types/index.es.js.map +0 -0
- /package/{dist/es → es}/config/types/load-on-demand-module.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/load-on-demand-module.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/mention-module.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/mention-module.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/paste-change.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/paste-change.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/quick-menu-module.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/quick-menu-module.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/range.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/range.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/registry-options.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/registry-options.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/selection-change.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/selection-change.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/toolbar-item.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/toolbar-item.interface.es.js.map +0 -0
- /package/{dist/es → es}/config/types/type.es.js +0 -0
- /package/{dist/es → es}/config/types/type.es.js.map +0 -0
- /package/{dist/es → es}/config/types/validate-error.interface.es.js +0 -0
- /package/{dist/es → es}/config/types/validate-error.interface.es.js.map +0 -0
- /package/{dist/es → es}/counter/index.es.js +0 -0
- /package/{dist/es → es}/counter/index.es.js.map +0 -0
- /package/{dist/es → es}/custom-clipboard.es.js +0 -0
- /package/{dist/es → es}/custom-clipboard.es.js.map +0 -0
- /package/{dist/es → es}/custom-image/BlotFormatter.es.js +0 -0
- /package/{dist/es → es}/custom-image/BlotFormatter.es.js.map +0 -0
- /package/{dist/es → es}/custom-image/Options.es.js +0 -0
- /package/{dist/es → es}/custom-image/Options.es.js.map +0 -0
- /package/{dist/es → es}/custom-image/actions/Action.es.js +0 -0
- /package/{dist/es → es}/custom-image/actions/Action.es.js.map +0 -0
- /package/{dist/es → es}/custom-image/actions/CustomResizeAction.es.js +0 -0
- /package/{dist/es → es}/custom-image/actions/CustomResizeAction.es.js.map +0 -0
- /package/{dist/es → es}/custom-image/actions/DeleteAction.es.js +0 -0
- /package/{dist/es → es}/custom-image/actions/DeleteAction.es.js.map +0 -0
- /package/{dist/es → es}/custom-image/image.es.js +0 -0
- /package/{dist/es → es}/custom-image/image.es.js.map +0 -0
- /package/{dist/es → es}/custom-image/specs/BlotSpec.es.js +0 -0
- /package/{dist/es → es}/custom-image/specs/BlotSpec.es.js.map +0 -0
- /package/{dist/es → es}/custom-image/specs/CustomImageSpec.es.js +0 -0
- /package/{dist/es → es}/custom-image/specs/CustomImageSpec.es.js.map +0 -0
- /package/{dist/es → es}/custom-image/specs/ImageSpec.es.js +0 -0
- /package/{dist/es → es}/custom-image/specs/ImageSpec.es.js.map +0 -0
- /package/{dist/es → es}/custom-uploader.es.js +0 -0
- /package/{dist/es → es}/custom-uploader.es.js.map +0 -0
- /package/{dist/es → es}/emoji/emoji-list/index.es.js +0 -0
- /package/{dist/es → es}/emoji/emoji-list/index.es.js.map +0 -0
- /package/{dist/es → es}/emoji/emoji-list/people.es.js +0 -0
- /package/{dist/es → es}/emoji/emoji-list/people.es.js.map +0 -0
- /package/{dist/es → es}/emoji/emoji-list.es.js +0 -0
- /package/{dist/es → es}/emoji/emoji-list.es.js.map +0 -0
- /package/{dist/es → es}/emoji/emoji-map.es.js +0 -0
- /package/{dist/es → es}/emoji/emoji-map.es.js.map +0 -0
- /package/{dist/es → es}/emoji/formats/emoji-blot.es.js +0 -0
- /package/{dist/es → es}/emoji/formats/emoji-blot.es.js.map +0 -0
- /package/{dist/es → es}/emoji/index.es.js +0 -0
- /package/{dist/es → es}/emoji/index.es.js.map +0 -0
- /package/{dist/es → es}/emoji/modules/emoji.es.js +0 -0
- /package/{dist/es → es}/emoji/modules/emoji.es.js.map +0 -0
- /package/{dist/es → es}/emoji/modules/toolbar-emoji.es.js +0 -0
- /package/{dist/es → es}/emoji/modules/toolbar-emoji.es.js.map +0 -0
- /package/{dist/es → es}/emoji/utils.es.js +0 -0
- /package/{dist/es → es}/emoji/utils.es.js.map +0 -0
- /package/{dist/es → es}/file/formats/file.es.js +0 -0
- /package/{dist/es → es}/file/formats/file.es.js.map +0 -0
- /package/{dist/es → es}/file/index.es.js +0 -0
- /package/{dist/es → es}/file/index.es.js.map +0 -0
- /package/{dist/es → es}/file/modules/file-bar.es.js +0 -0
- /package/{dist/es → es}/file/modules/file-bar.es.js.map +0 -0
- /package/{dist/es → es}/fluent-editor.es.js +0 -0
- /package/{dist/es → es}/fluent-editor.es.js.map +0 -0
- /package/{dist/es → es}/format-painter/index.es.js +0 -0
- /package/{dist/es → es}/format-painter/index.es.js.map +0 -0
- /package/{dist/es → es}/global-link/constants.es.js +0 -0
- /package/{dist/es → es}/global-link/constants.es.js.map +0 -0
- /package/{dist/es → es}/global-link/formats/customer-widget-link.es.js +0 -0
- /package/{dist/es → es}/global-link/formats/customer-widget-link.es.js.map +0 -0
- /package/{dist/es → es}/global-link/formats/doc-link.es.js +0 -0
- /package/{dist/es → es}/global-link/formats/doc-link.es.js.map +0 -0
- /package/{dist/es → es}/global-link/formats/wiki-link.es.js +0 -0
- /package/{dist/es → es}/global-link/formats/wiki-link.es.js.map +0 -0
- /package/{dist/es → es}/global-link/formats/work-item-link.es.js +0 -0
- /package/{dist/es → es}/global-link/formats/work-item-link.es.js.map +0 -0
- /package/{dist/es → es}/global-link/global-link-panel.es.js +0 -0
- /package/{dist/es → es}/global-link/global-link-panel.es.js.map +0 -0
- /package/{dist/es → es}/global-link/index.es.js +0 -0
- /package/{dist/es → es}/global-link/index.es.js.map +0 -0
- /package/{dist/es → es}/global-link/utils/createTable.es.js +0 -0
- /package/{dist/es → es}/global-link/utils/createTable.es.js.map +0 -0
- /package/{dist/es → es}/index.es.js +0 -0
- /package/{dist/es → es}/index.es.js.map +0 -0
- /package/{dist/es → es}/link/formats/link.es.js +0 -0
- /package/{dist/es → es}/link/formats/link.es.js.map +0 -0
- /package/{dist/es → es}/link/index.es.js +0 -0
- /package/{dist/es → es}/link/index.es.js.map +0 -0
- /package/{dist/es → es}/link/modules/tooltip.es.js +0 -0
- /package/{dist/es → es}/link/modules/tooltip.es.js.map +0 -0
- /package/{dist/es → es}/mention/Mention.es.js +0 -0
- /package/{dist/es → es}/mention/Mention.es.js.map +0 -0
- /package/{dist/es → es}/mention/MentionLink.es.js +0 -0
- /package/{dist/es → es}/mention/MentionLink.es.js.map +0 -0
- /package/{dist/es → es}/mention/constants.es.js +0 -0
- /package/{dist/es → es}/mention/constants.es.js.map +0 -0
- /package/{dist/es → es}/quick-menu/index.es.js +0 -0
- /package/{dist/es → es}/quick-menu/index.es.js.map +0 -0
- /package/{dist/es → es}/screenshot/index.es.js +0 -0
- /package/{dist/es → es}/screenshot/index.es.js.map +0 -0
- /package/{dist/es → es}/soft-break/index.es.js +0 -0
- /package/{dist/es → es}/soft-break/index.es.js.map +0 -0
- /package/{dist/es → es}/strike/index.es.js +0 -0
- /package/{dist/es → es}/strike/index.es.js.map +0 -0
- /package/{dist/es → es}/syntax/index.es.js +0 -0
- /package/{dist/es → es}/syntax/index.es.js.map +0 -0
- /package/{dist/es → es}/table/better-table.es.js +0 -0
- /package/{dist/es → es}/table/better-table.es.js.map +0 -0
- /package/{dist/es → es}/table/formats/header.es.js +0 -0
- /package/{dist/es → es}/table/formats/header.es.js.map +0 -0
- /package/{dist/es → es}/table/formats/list.es.js +0 -0
- /package/{dist/es → es}/table/formats/list.es.js.map +0 -0
- /package/{dist/es → es}/table/formats/table.es.js +0 -0
- /package/{dist/es → es}/table/formats/table.es.js.map +0 -0
- /package/{dist/es → es}/table/modules/table-column-tool.es.js +0 -0
- /package/{dist/es → es}/table/modules/table-column-tool.es.js.map +0 -0
- /package/{dist/es → es}/table/modules/table-operation-menu.es.js +0 -0
- /package/{dist/es → es}/table/modules/table-operation-menu.es.js.map +0 -0
- /package/{dist/es → es}/table/modules/table-scroll-bar.es.js +0 -0
- /package/{dist/es → es}/table/modules/table-scroll-bar.es.js.map +0 -0
- /package/{dist/es → es}/table/modules/table-selection.es.js +0 -0
- /package/{dist/es → es}/table/modules/table-selection.es.js.map +0 -0
- /package/{dist/es → es}/table/table-config.es.js +0 -0
- /package/{dist/es → es}/table/table-config.es.js.map +0 -0
- /package/{dist/es → es}/table/utils/index.es.js +0 -0
- /package/{dist/es → es}/table/utils/index.es.js.map +0 -0
- /package/{dist/es → es}/table/utils/node-matchers.es.js +0 -0
- /package/{dist/es → es}/table/utils/node-matchers.es.js.map +0 -0
- /package/{dist/es → es}/toolbar/better-picker.es.js +0 -0
- /package/{dist/es → es}/toolbar/better-picker.es.js.map +0 -0
- /package/{dist/es → es}/toolbar/index.es.js +0 -0
- /package/{dist/es → es}/toolbar/index.es.js.map +0 -0
- /package/{dist/es → es}/utils/debounce.es.js +0 -0
- /package/{dist/es → es}/utils/debounce.es.js.map +0 -0
- /package/{dist/es → es}/utils/image.es.js +0 -0
- /package/{dist/es → es}/utils/image.es.js.map +0 -0
- /package/{dist/es → es}/utils/method.es.js +0 -0
- /package/{dist/es → es}/utils/method.es.js.map +0 -0
- /package/{dist/es → es}/utils/scroll-lock.es.js +0 -0
- /package/{dist/es → es}/utils/scroll-lock.es.js.map +0 -0
- /package/{dist/es → es}/video/index.es.js +0 -0
- /package/{dist/es → es}/video/index.es.js.map +0 -0
- /package/{dist/lib → lib}/attributors/font-size.cjs.js +0 -0
- /package/{dist/lib → lib}/attributors/font-size.cjs.js.map +0 -0
- /package/{dist/lib → lib}/attributors/font-style.cjs.js +0 -0
- /package/{dist/lib → lib}/attributors/font-style.cjs.js.map +0 -0
- /package/{dist/lib → lib}/attributors/index.cjs.js +0 -0
- /package/{dist/lib → lib}/attributors/index.cjs.js.map +0 -0
- /package/{dist/lib → lib}/attributors/line-height.cjs.js +0 -0
- /package/{dist/lib → lib}/attributors/line-height.cjs.js.map +0 -0
- /package/{dist/lib → lib}/attributors/text-indent.cjs.js +0 -0
- /package/{dist/lib → lib}/attributors/text-indent.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/base64-image.cjs.js +0 -0
- /package/{dist/lib → lib}/config/base64-image.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/editor.config.cjs.js +0 -0
- /package/{dist/lib → lib}/config/editor.config.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/editor.utils.cjs.js +0 -0
- /package/{dist/lib → lib}/config/editor.utils.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/i18n/en-us.cjs.js +0 -0
- /package/{dist/lib → lib}/config/i18n/en-us.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/i18n/zh-cn.cjs.js +0 -0
- /package/{dist/lib → lib}/config/i18n/zh-cn.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/icons.config.cjs.js +0 -0
- /package/{dist/lib → lib}/config/icons.config.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/index.cjs.js +0 -0
- /package/{dist/lib → lib}/config/index.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/additional-toolbar-item.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/additional-toolbar-item.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/content-change.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/content-change.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/content-save.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/content-save.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/counter-option.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/counter-option.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/editor-config.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/editor-config.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/editor-modules.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/editor-modules.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/file-operation.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/file-operation.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/focus-change.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/focus-change.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/fullscreen-module.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/fullscreen-module.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/help-panel-item.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/help-panel-item.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/help-panel-option.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/help-panel-option.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/image-module.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/image-module.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/image-upload.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/image-upload.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/index.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/index.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/load-on-demand-module.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/load-on-demand-module.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/mention-module.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/mention-module.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/paste-change.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/paste-change.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/quick-menu-module.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/quick-menu-module.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/range.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/range.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/registry-options.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/registry-options.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/selection-change.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/selection-change.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/toolbar-item.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/toolbar-item.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/type.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/type.cjs.js.map +0 -0
- /package/{dist/lib → lib}/config/types/validate-error.interface.cjs.js +0 -0
- /package/{dist/lib → lib}/config/types/validate-error.interface.cjs.js.map +0 -0
- /package/{dist/lib → lib}/counter/index.cjs.js +0 -0
- /package/{dist/lib → lib}/counter/index.cjs.js.map +0 -0
- /package/{dist/lib → lib}/custom-clipboard.cjs.js +0 -0
- /package/{dist/lib → lib}/custom-clipboard.cjs.js.map +0 -0
- /package/{dist/lib → lib}/custom-image/BlotFormatter.cjs.js +0 -0
- /package/{dist/lib → lib}/custom-image/BlotFormatter.cjs.js.map +0 -0
- /package/{dist/lib → lib}/custom-image/Options.cjs.js +0 -0
- /package/{dist/lib → lib}/custom-image/Options.cjs.js.map +0 -0
- /package/{dist/lib → lib}/custom-image/actions/Action.cjs.js +0 -0
- /package/{dist/lib → lib}/custom-image/actions/Action.cjs.js.map +0 -0
- /package/{dist/lib → lib}/custom-image/actions/CustomResizeAction.cjs.js +0 -0
- /package/{dist/lib → lib}/custom-image/actions/CustomResizeAction.cjs.js.map +0 -0
- /package/{dist/lib → lib}/custom-image/actions/DeleteAction.cjs.js +0 -0
- /package/{dist/lib → lib}/custom-image/actions/DeleteAction.cjs.js.map +0 -0
- /package/{dist/lib → lib}/custom-image/image.cjs.js +0 -0
- /package/{dist/lib → lib}/custom-image/image.cjs.js.map +0 -0
- /package/{dist/lib → lib}/custom-image/specs/BlotSpec.cjs.js +0 -0
- /package/{dist/lib → lib}/custom-image/specs/BlotSpec.cjs.js.map +0 -0
- /package/{dist/lib → lib}/custom-image/specs/CustomImageSpec.cjs.js +0 -0
- /package/{dist/lib → lib}/custom-image/specs/CustomImageSpec.cjs.js.map +0 -0
- /package/{dist/lib → lib}/custom-image/specs/ImageSpec.cjs.js +0 -0
- /package/{dist/lib → lib}/custom-image/specs/ImageSpec.cjs.js.map +0 -0
- /package/{dist/lib → lib}/custom-uploader.cjs.js +0 -0
- /package/{dist/lib → lib}/custom-uploader.cjs.js.map +0 -0
- /package/{dist/lib → lib}/emoji/emoji-list/index.cjs.js +0 -0
- /package/{dist/lib → lib}/emoji/emoji-list/index.cjs.js.map +0 -0
- /package/{dist/lib → lib}/emoji/emoji-list/people.cjs.js +0 -0
- /package/{dist/lib → lib}/emoji/emoji-list/people.cjs.js.map +0 -0
- /package/{dist/lib → lib}/emoji/emoji-list.cjs.js +0 -0
- /package/{dist/lib → lib}/emoji/emoji-list.cjs.js.map +0 -0
- /package/{dist/lib → lib}/emoji/emoji-map.cjs.js +0 -0
- /package/{dist/lib → lib}/emoji/emoji-map.cjs.js.map +0 -0
- /package/{dist/lib → lib}/emoji/formats/emoji-blot.cjs.js +0 -0
- /package/{dist/lib → lib}/emoji/formats/emoji-blot.cjs.js.map +0 -0
- /package/{dist/lib → lib}/emoji/index.cjs.js +0 -0
- /package/{dist/lib → lib}/emoji/index.cjs.js.map +0 -0
- /package/{dist/lib → lib}/emoji/modules/emoji.cjs.js +0 -0
- /package/{dist/lib → lib}/emoji/modules/emoji.cjs.js.map +0 -0
- /package/{dist/lib → lib}/emoji/modules/toolbar-emoji.cjs.js +0 -0
- /package/{dist/lib → lib}/emoji/modules/toolbar-emoji.cjs.js.map +0 -0
- /package/{dist/lib → lib}/emoji/utils.cjs.js +0 -0
- /package/{dist/lib → lib}/emoji/utils.cjs.js.map +0 -0
- /package/{dist/lib → lib}/file/formats/file.cjs.js +0 -0
- /package/{dist/lib → lib}/file/formats/file.cjs.js.map +0 -0
- /package/{dist/lib → lib}/file/index.cjs.js +0 -0
- /package/{dist/lib → lib}/file/index.cjs.js.map +0 -0
- /package/{dist/lib → lib}/file/modules/file-bar.cjs.js +0 -0
- /package/{dist/lib → lib}/file/modules/file-bar.cjs.js.map +0 -0
- /package/{dist/lib → lib}/fluent-editor.cjs.js +0 -0
- /package/{dist/lib → lib}/fluent-editor.cjs.js.map +0 -0
- /package/{dist/lib → lib}/format-painter/index.cjs.js +0 -0
- /package/{dist/lib → lib}/format-painter/index.cjs.js.map +0 -0
- /package/{dist/lib → lib}/global-link/constants.cjs.js +0 -0
- /package/{dist/lib → lib}/global-link/constants.cjs.js.map +0 -0
- /package/{dist/lib → lib}/global-link/formats/customer-widget-link.cjs.js +0 -0
- /package/{dist/lib → lib}/global-link/formats/customer-widget-link.cjs.js.map +0 -0
- /package/{dist/lib → lib}/global-link/formats/doc-link.cjs.js +0 -0
- /package/{dist/lib → lib}/global-link/formats/doc-link.cjs.js.map +0 -0
- /package/{dist/lib → lib}/global-link/formats/wiki-link.cjs.js +0 -0
- /package/{dist/lib → lib}/global-link/formats/wiki-link.cjs.js.map +0 -0
- /package/{dist/lib → lib}/global-link/formats/work-item-link.cjs.js +0 -0
- /package/{dist/lib → lib}/global-link/formats/work-item-link.cjs.js.map +0 -0
- /package/{dist/lib → lib}/global-link/global-link-panel.cjs.js +0 -0
- /package/{dist/lib → lib}/global-link/global-link-panel.cjs.js.map +0 -0
- /package/{dist/lib → lib}/global-link/index.cjs.js +0 -0
- /package/{dist/lib → lib}/global-link/index.cjs.js.map +0 -0
- /package/{dist/lib → lib}/global-link/utils/createTable.cjs.js +0 -0
- /package/{dist/lib → lib}/global-link/utils/createTable.cjs.js.map +0 -0
- /package/{dist/lib → lib}/index.cjs.js +0 -0
- /package/{dist/lib → lib}/index.cjs.js.map +0 -0
- /package/{dist/lib → lib}/link/formats/link.cjs.js +0 -0
- /package/{dist/lib → lib}/link/formats/link.cjs.js.map +0 -0
- /package/{dist/lib → lib}/link/index.cjs.js +0 -0
- /package/{dist/lib → lib}/link/index.cjs.js.map +0 -0
- /package/{dist/lib → lib}/link/modules/tooltip.cjs.js +0 -0
- /package/{dist/lib → lib}/link/modules/tooltip.cjs.js.map +0 -0
- /package/{dist/lib → lib}/mention/Mention.cjs.js +0 -0
- /package/{dist/lib → lib}/mention/Mention.cjs.js.map +0 -0
- /package/{dist/lib → lib}/mention/MentionLink.cjs.js +0 -0
- /package/{dist/lib → lib}/mention/MentionLink.cjs.js.map +0 -0
- /package/{dist/lib → lib}/mention/constants.cjs.js +0 -0
- /package/{dist/lib → lib}/mention/constants.cjs.js.map +0 -0
- /package/{dist/lib → lib}/quick-menu/index.cjs.js +0 -0
- /package/{dist/lib → lib}/quick-menu/index.cjs.js.map +0 -0
- /package/{dist/lib → lib}/screenshot/index.cjs.js +0 -0
- /package/{dist/lib → lib}/screenshot/index.cjs.js.map +0 -0
- /package/{dist/lib → lib}/soft-break/index.cjs.js +0 -0
- /package/{dist/lib → lib}/soft-break/index.cjs.js.map +0 -0
- /package/{dist/lib → lib}/strike/index.cjs.js +0 -0
- /package/{dist/lib → lib}/strike/index.cjs.js.map +0 -0
- /package/{dist/lib → lib}/syntax/index.cjs.js +0 -0
- /package/{dist/lib → lib}/syntax/index.cjs.js.map +0 -0
- /package/{dist/lib → lib}/table/better-table.cjs.js +0 -0
- /package/{dist/lib → lib}/table/better-table.cjs.js.map +0 -0
- /package/{dist/lib → lib}/table/formats/header.cjs.js +0 -0
- /package/{dist/lib → lib}/table/formats/header.cjs.js.map +0 -0
- /package/{dist/lib → lib}/table/formats/list.cjs.js +0 -0
- /package/{dist/lib → lib}/table/formats/list.cjs.js.map +0 -0
- /package/{dist/lib → lib}/table/formats/table.cjs.js +0 -0
- /package/{dist/lib → lib}/table/formats/table.cjs.js.map +0 -0
- /package/{dist/lib → lib}/table/modules/table-column-tool.cjs.js +0 -0
- /package/{dist/lib → lib}/table/modules/table-column-tool.cjs.js.map +0 -0
- /package/{dist/lib → lib}/table/modules/table-operation-menu.cjs.js +0 -0
- /package/{dist/lib → lib}/table/modules/table-operation-menu.cjs.js.map +0 -0
- /package/{dist/lib → lib}/table/modules/table-scroll-bar.cjs.js +0 -0
- /package/{dist/lib → lib}/table/modules/table-scroll-bar.cjs.js.map +0 -0
- /package/{dist/lib → lib}/table/modules/table-selection.cjs.js +0 -0
- /package/{dist/lib → lib}/table/modules/table-selection.cjs.js.map +0 -0
- /package/{dist/lib → lib}/table/table-config.cjs.js +0 -0
- /package/{dist/lib → lib}/table/table-config.cjs.js.map +0 -0
- /package/{dist/lib → lib}/table/utils/index.cjs.js +0 -0
- /package/{dist/lib → lib}/table/utils/index.cjs.js.map +0 -0
- /package/{dist/lib → lib}/table/utils/node-matchers.cjs.js +0 -0
- /package/{dist/lib → lib}/table/utils/node-matchers.cjs.js.map +0 -0
- /package/{dist/lib → lib}/toolbar/better-picker.cjs.js +0 -0
- /package/{dist/lib → lib}/toolbar/better-picker.cjs.js.map +0 -0
- /package/{dist/lib → lib}/toolbar/index.cjs.js +0 -0
- /package/{dist/lib → lib}/toolbar/index.cjs.js.map +0 -0
- /package/{dist/lib → lib}/utils/debounce.cjs.js +0 -0
- /package/{dist/lib → lib}/utils/debounce.cjs.js.map +0 -0
- /package/{dist/lib → lib}/utils/image.cjs.js +0 -0
- /package/{dist/lib → lib}/utils/image.cjs.js.map +0 -0
- /package/{dist/lib → lib}/utils/method.cjs.js +0 -0
- /package/{dist/lib → lib}/utils/method.cjs.js.map +0 -0
- /package/{dist/lib → lib}/utils/scroll-lock.cjs.js +0 -0
- /package/{dist/lib → lib}/utils/scroll-lock.cjs.js.map +0 -0
- /package/{dist/lib → lib}/video/index.cjs.js +0 -0
- /package/{dist/lib → lib}/video/index.cjs.js.map +0 -0
- /package/{dist/style.css → style.css} +0 -0
package/src/utils/image.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export function imgToBase64(imageUrl: string) {
|
|
2
|
-
return new Promise<string>((resolve, reject) => {
|
|
3
|
-
const canvas = document.createElement('canvas')
|
|
4
|
-
const img = new Image()
|
|
5
|
-
img.crossOrigin = 'Anonymous'
|
|
6
|
-
img.src = imageUrl
|
|
7
|
-
img.onload = function () {
|
|
8
|
-
const ctx = canvas.getContext('2d')
|
|
9
|
-
if (ctx) {
|
|
10
|
-
canvas.height = img.height
|
|
11
|
-
canvas.width = img.width
|
|
12
|
-
ctx.clearRect(0, 0, canvas.width, canvas.height)
|
|
13
|
-
ctx.drawImage(img, 0, 0)
|
|
14
|
-
const dataURL = canvas.toDataURL('image/png', 1)
|
|
15
|
-
resolve(dataURL)
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
img.onerror = function () {
|
|
19
|
-
reject(new Error(`Could not load image at ${imageUrl}`))
|
|
20
|
-
}
|
|
21
|
-
})
|
|
22
|
-
}
|
package/src/utils/method.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/** Detect free variable `global` from Node.js. */
|
|
2
|
-
const freeGlobal
|
|
3
|
-
= typeof global === 'object'
|
|
4
|
-
&& global !== null
|
|
5
|
-
&& global.Object === Object
|
|
6
|
-
&& global
|
|
7
|
-
|
|
8
|
-
/** Detect free variable `globalThis` */
|
|
9
|
-
const freeGlobalThis
|
|
10
|
-
= typeof globalThis === 'object'
|
|
11
|
-
&& globalThis !== null
|
|
12
|
-
&& globalThis.Object == Object
|
|
13
|
-
&& globalThis
|
|
14
|
-
|
|
15
|
-
/** Detect free variable `self`. */
|
|
16
|
-
const freeSelf
|
|
17
|
-
= typeof self === 'object' && self !== null && self.Object === Object && self
|
|
18
|
-
|
|
19
|
-
/** Used as a reference to the global object. */
|
|
20
|
-
export const root
|
|
21
|
-
= freeGlobalThis || freeGlobal || freeSelf || new Function('return this')()
|
|
22
|
-
|
|
23
|
-
export function isObject(value) {
|
|
24
|
-
const type = typeof value
|
|
25
|
-
return value != null && (type === 'object' || type === 'function')
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function compareArray(arr1, arr2) {
|
|
29
|
-
if (arr1.length !== arr2.length) {
|
|
30
|
-
return false
|
|
31
|
-
}
|
|
32
|
-
for (let i = 0; i < arr1.length; i++) {
|
|
33
|
-
if (arr1[i] !== arr2[i]) {
|
|
34
|
-
return false
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return true
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export function compareObject(object1, object2) {
|
|
41
|
-
const o1keys = Object.keys(object1)
|
|
42
|
-
const o2keys = Object.keys(object2)
|
|
43
|
-
if (o2keys.length !== o1keys.length) return false
|
|
44
|
-
for (let i = 0; i <= o1keys.length - 1; i++) {
|
|
45
|
-
const key = o1keys[i]
|
|
46
|
-
if (!o2keys.includes(key)) return false
|
|
47
|
-
if (!compare(object2[key], object1[key])) return false
|
|
48
|
-
}
|
|
49
|
-
return true
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export function compare(value, other) {
|
|
53
|
-
if (value === other) {
|
|
54
|
-
return true
|
|
55
|
-
}
|
|
56
|
-
if (Array.isArray(value) && Array.isArray(other)) {
|
|
57
|
-
return compareArray(value, other)
|
|
58
|
-
}
|
|
59
|
-
if (value instanceof Function || other instanceof Function) {
|
|
60
|
-
return false
|
|
61
|
-
}
|
|
62
|
-
if (value instanceof Object && other instanceof Object) {
|
|
63
|
-
return compareObject(value, other)
|
|
64
|
-
}
|
|
65
|
-
return false
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export function unshiftString(str: string, targetLength: number, addString: string): string {
|
|
69
|
-
targetLength = targetLength > 0 ? targetLength : 0
|
|
70
|
-
addString = String((typeof addString !== 'undefined' && typeof addString !== 'object') ? addString : ' ')
|
|
71
|
-
str = (str === undefined || str === null) ? '' : String(str)
|
|
72
|
-
if (str.length >= targetLength) {
|
|
73
|
-
return String(str)
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
targetLength = targetLength - str.length
|
|
77
|
-
if (targetLength > addString.length) {
|
|
78
|
-
addString += addString.repeat(targetLength / addString.length)
|
|
79
|
-
}
|
|
80
|
-
return addString.slice(0, targetLength) + String(str)
|
|
81
|
-
}
|
|
82
|
-
}
|
package/src/utils/scroll-lock.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
let scrollBarWidth: number
|
|
2
|
-
export function getScrollBarWidth({ target = document.body } = {}): number {
|
|
3
|
-
if (scrollBarWidth !== undefined) return scrollBarWidth
|
|
4
|
-
|
|
5
|
-
const outer = document.createElement('div')
|
|
6
|
-
outer.className = 'scroll__wrap'
|
|
7
|
-
outer.style.visibility = 'hidden'
|
|
8
|
-
outer.style.width = '100px'
|
|
9
|
-
outer.style.position = 'absolute'
|
|
10
|
-
outer.style.top = '-9999px'
|
|
11
|
-
target.appendChild(outer)
|
|
12
|
-
|
|
13
|
-
const widthNoScroll = outer.offsetWidth
|
|
14
|
-
outer.style.overflow = 'scroll'
|
|
15
|
-
|
|
16
|
-
const inner = document.createElement('div')
|
|
17
|
-
inner.style.width = '100%'
|
|
18
|
-
outer.appendChild(inner)
|
|
19
|
-
|
|
20
|
-
const widthWithScroll = inner.offsetWidth
|
|
21
|
-
outer.parentNode?.removeChild(outer)
|
|
22
|
-
scrollBarWidth = widthNoScroll - widthWithScroll
|
|
23
|
-
|
|
24
|
-
return scrollBarWidth
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export function lockScroll({ target = document.body } = {}) {
|
|
28
|
-
let scrollBarWidth = 0
|
|
29
|
-
let originWidth = '0'
|
|
30
|
-
|
|
31
|
-
const clockClass = 'scroll--lock'
|
|
32
|
-
|
|
33
|
-
const cleanLock = () => {
|
|
34
|
-
target && (target.style.width = originWidth)
|
|
35
|
-
target.classList.remove(clockClass)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const hasHiddenClass = target.classList.contains(clockClass)
|
|
39
|
-
if (!hasHiddenClass) {
|
|
40
|
-
originWidth = target.style.width
|
|
41
|
-
}
|
|
42
|
-
scrollBarWidth = getScrollBarWidth({ target })
|
|
43
|
-
const hasOverflow = (target === document.body ? document.documentElement : target).clientHeight < target.scrollHeight
|
|
44
|
-
const overflowY = window.getComputedStyle(target).overflowY
|
|
45
|
-
// only when the scrollbar exists needs to reduce width
|
|
46
|
-
if (scrollBarWidth > 0 && (hasOverflow || overflowY === 'scroll') && !hasHiddenClass) {
|
|
47
|
-
target.style.width = `calc(100% - ${scrollBarWidth}px)`
|
|
48
|
-
}
|
|
49
|
-
target.classList.add(clockClass)
|
|
50
|
-
|
|
51
|
-
return cleanLock
|
|
52
|
-
}
|
package/src/video/index.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { Parchment as TypeParchment } from 'quill'
|
|
2
|
-
import Quill from 'quill'
|
|
3
|
-
import { sanitize } from '../config/editor.utils'
|
|
4
|
-
|
|
5
|
-
const BlockEmbed = Quill.imports['blots/block/embed'] as TypeParchment.BlotConstructor
|
|
6
|
-
const VIDEO_ATTRIBUTES = ['id', 'title', 'src']
|
|
7
|
-
|
|
8
|
-
class Video extends BlockEmbed {
|
|
9
|
-
static blotName: string
|
|
10
|
-
static tagName: string
|
|
11
|
-
static SANITIZED_URL: string
|
|
12
|
-
static PROTOCOL_WHITELIST: string[]
|
|
13
|
-
static className: string
|
|
14
|
-
statics: any
|
|
15
|
-
domNode: any
|
|
16
|
-
|
|
17
|
-
static sanitize(url) {
|
|
18
|
-
return sanitize(url, this.PROTOCOL_WHITELIST) ? url : this.SANITIZED_URL
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
static create(value) {
|
|
22
|
-
const node = super.create(value) as HTMLElement
|
|
23
|
-
node.setAttribute('contenteditable', 'false')
|
|
24
|
-
node.setAttribute('controls', 'controls')
|
|
25
|
-
VIDEO_ATTRIBUTES.forEach((key) => {
|
|
26
|
-
if (value[key]) {
|
|
27
|
-
switch (key) {
|
|
28
|
-
case 'src':{ const src = Video.sanitize(value[key])
|
|
29
|
-
node.setAttribute(key, src)
|
|
30
|
-
break
|
|
31
|
-
}
|
|
32
|
-
case 'title': {
|
|
33
|
-
node.setAttribute(key, value[key])
|
|
34
|
-
break
|
|
35
|
-
}
|
|
36
|
-
default: {
|
|
37
|
-
node.dataset[key] = value[key]
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
})
|
|
42
|
-
return node
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
static value(domNode) {
|
|
46
|
-
const formats: any = {}
|
|
47
|
-
VIDEO_ATTRIBUTES.forEach((key) => {
|
|
48
|
-
const value = domNode.getAttribute(key) || domNode.dataset[key]
|
|
49
|
-
if (value) {
|
|
50
|
-
formats[key] = value
|
|
51
|
-
}
|
|
52
|
-
})
|
|
53
|
-
return formats
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
Video.blotName = 'video'
|
|
57
|
-
Video.tagName = 'VIDEO'
|
|
58
|
-
Video.SANITIZED_URL = 'about:blank'
|
|
59
|
-
Video.PROTOCOL_WHITELIST = ['http', 'https']
|
|
60
|
-
Video.className = 'ql-video-item'
|
|
61
|
-
|
|
62
|
-
export default Video
|
package/tsconfig.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es2017",
|
|
4
|
-
"jsx": "preserve",
|
|
5
|
-
"lib": ["esnext", "dom"],
|
|
6
|
-
|
|
7
|
-
"experimentalDecorators": true,
|
|
8
|
-
"baseUrl": "./",
|
|
9
|
-
"module": "esnext",
|
|
10
|
-
"moduleResolution": "node",
|
|
11
|
-
"resolveJsonModule": true,
|
|
12
|
-
"types": ["vite/client", "@types/node", "@types/jest", "quill/quill.d.ts", "quill/core.d.ts"],
|
|
13
|
-
"strict": true,
|
|
14
|
-
// 不允许this有隐式的any类型
|
|
15
|
-
"strictNullChecks": false,
|
|
16
|
-
"noImplicitAny": false, // 不允许隐式的any类型
|
|
17
|
-
"noImplicitThis": false,
|
|
18
|
-
// "outDir": "./dist/out-tsc",
|
|
19
|
-
"declaration": false,
|
|
20
|
-
"downlevelIteration": true,
|
|
21
|
-
"importHelpers": true,
|
|
22
|
-
"sourceMap": true,
|
|
23
|
-
"allowSyntheticDefaultImports": true,
|
|
24
|
-
"esModuleInterop": true // 不允许把null、undefined赋值给其他类型的变量
|
|
25
|
-
}
|
|
26
|
-
}
|
package/vite.config.theme.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { resolve } from 'node:path'
|
|
2
|
-
import { defineConfig } from 'vite'
|
|
3
|
-
|
|
4
|
-
export default defineConfig({
|
|
5
|
-
build: {
|
|
6
|
-
sourcemap: false,
|
|
7
|
-
minify: false,
|
|
8
|
-
rollupOptions: {
|
|
9
|
-
input: 'src/assets/style.scss',
|
|
10
|
-
treeshake: false,
|
|
11
|
-
preserveEntrySignatures: 'strict',
|
|
12
|
-
output: {
|
|
13
|
-
dir: resolve(__dirname, 'dist'),
|
|
14
|
-
assetFileNames: 'style.css',
|
|
15
|
-
preserveModules: true,
|
|
16
|
-
preserveModulesRoot: resolve(__dirname, 'src/assets'),
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
})
|
package/vite.config.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from 'node:fs'
|
|
2
|
-
import { resolve } from 'node:path'
|
|
3
|
-
import * as glob from 'glob'
|
|
4
|
-
import { defineConfig } from 'vite'
|
|
5
|
-
|
|
6
|
-
interface Manifest {
|
|
7
|
-
version: string
|
|
8
|
-
dependencies?: Record<string, string>
|
|
9
|
-
peerDependencies?: Record<string, string>
|
|
10
|
-
}
|
|
11
|
-
export function getPackageManifest(pkgPath: string): Manifest {
|
|
12
|
-
return JSON.parse(readFileSync(pkgPath, 'utf8')) as Manifest
|
|
13
|
-
}
|
|
14
|
-
export function rollupExternalFromPackage(pkgPath: string) {
|
|
15
|
-
const { dependencies, peerDependencies } = getPackageManifest(pkgPath)
|
|
16
|
-
const dependenciesKeys = Object.keys(dependencies ?? {})
|
|
17
|
-
const peerDependenciesKeys = Object.keys(peerDependencies ?? {})
|
|
18
|
-
|
|
19
|
-
return (id: string) => {
|
|
20
|
-
const packages = new Set([...peerDependenciesKeys, ...dependenciesKeys])
|
|
21
|
-
return Array.from(packages).some(pkg => id === pkg || id.startsWith(`${pkg}/`))
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function rollupOutput(target: string, format: string): any {
|
|
26
|
-
return {
|
|
27
|
-
format: target,
|
|
28
|
-
entryFileNames: `[name].${target}.js`,
|
|
29
|
-
preserveModules: true,
|
|
30
|
-
dir: resolve(__dirname, 'dist', format),
|
|
31
|
-
preserveModulesRoot: resolve(__dirname, 'src'),
|
|
32
|
-
exports: 'named',
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const input = glob.sync('./src/**/*.ts', {
|
|
37
|
-
cwd: __dirname,
|
|
38
|
-
absolute: true,
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
export default defineConfig({
|
|
42
|
-
build: {
|
|
43
|
-
sourcemap: true,
|
|
44
|
-
minify: false,
|
|
45
|
-
rollupOptions: {
|
|
46
|
-
input,
|
|
47
|
-
treeshake: false,
|
|
48
|
-
preserveEntrySignatures: 'allow-extension',
|
|
49
|
-
external: rollupExternalFromPackage(resolve(__dirname, 'package.json')),
|
|
50
|
-
output: [
|
|
51
|
-
rollupOutput('es', 'es'),
|
|
52
|
-
rollupOutput('cjs', 'lib'),
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
}
|
|
56
|
-
})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|