@opentiny/fluent-editor 3.23.1 → 3.23.2
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 +102 -101
- package/es/attributors/font-style.es.js +1 -1
- package/es/attributors/font-style.es.js.map +1 -1
- 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/icons.config.es.js.map +1 -1
- package/es/config/index.es.js.map +1 -1
- package/es/counter/index.es.js.map +1 -1
- package/es/custom-clipboard.es.js.map +1 -1
- package/es/custom-image/BlotFormatter.es.js.map +1 -1
- package/es/custom-image/Options.es.js.map +1 -1
- package/es/custom-image/actions/Action.es.js.map +1 -1
- package/es/custom-image/actions/CustomResizeAction.es.js.map +1 -1
- package/es/custom-image/actions/DeleteAction.es.js.map +1 -1
- package/es/custom-image/image.es.js +1 -1
- package/es/custom-image/image.es.js.map +1 -1
- package/es/custom-image/specs/BlotSpec.es.js.map +1 -1
- package/es/custom-image/specs/CustomImageSpec.es.js.map +1 -1
- package/es/custom-image/specs/ImageSpec.es.js.map +1 -1
- package/es/custom-uploader.es.js.map +1 -1
- package/es/emoji/emoji-list/people.es.js.map +1 -1
- package/es/emoji/emoji-list.es.js.map +1 -1
- package/es/emoji/emoji-map.es.js.map +1 -1
- package/es/emoji/formats/emoji-blot.es.js.map +1 -1
- package/es/emoji/index.es.js.map +1 -1
- package/es/emoji/modules/emoji.es.js.map +1 -1
- package/es/emoji/modules/toolbar-emoji.es.js.map +1 -1
- package/es/emoji/utils.es.js.map +1 -1
- package/es/file/formats/file.es.js.map +1 -1
- package/es/file/index.es.js.map +1 -1
- package/es/file/modules/file-bar.es.js.map +1 -1
- package/es/fluent-editor.es.js +1 -0
- package/es/fluent-editor.es.js.map +1 -1
- package/es/global-link/constants.es.js.map +1 -1
- package/es/global-link/formats/customer-widget-link.es.js.map +1 -1
- package/es/global-link/formats/doc-link.es.js.map +1 -1
- package/es/global-link/formats/wiki-link.es.js.map +1 -1
- package/es/global-link/formats/work-item-link.es.js.map +1 -1
- package/es/global-link/index.es.js.map +1 -1
- package/es/global-link/utils/createTable.es.js.map +1 -1
- package/es/link/formats/link.es.js.map +1 -1
- package/es/link/index.es.js.map +1 -1
- package/es/link/modules/tooltip.es.js.map +1 -1
- package/es/mathlive/formats.es.js +3 -32
- package/es/mathlive/formats.es.js.map +1 -1
- package/es/mathlive/index.es.js +23 -6
- package/es/mathlive/index.es.js.map +1 -1
- package/es/mathlive/tooltip.es.js +5 -5
- package/es/mathlive/tooltip.es.js.map +1 -1
- package/es/mention/Mention.es.js.map +1 -1
- package/es/mention/MentionLink.es.js.map +1 -1
- package/es/mention/constants.es.js.map +1 -1
- package/es/quick-menu/index.es.js.map +1 -1
- package/es/screenshot/index.es.js.map +1 -1
- package/es/soft-break/index.es.js.map +1 -1
- package/es/strike/index.es.js.map +1 -1
- package/es/syntax/index.es.js.map +1 -1
- package/es/table/better-table.es.js.map +1 -1
- package/es/table/formats/header.es.js.map +1 -1
- package/es/table/formats/list.es.js.map +1 -1
- package/es/table/formats/table.es.js.map +1 -1
- package/es/table/modules/table-column-tool.es.js.map +1 -1
- package/es/table/modules/table-operation-menu.es.js +16 -12
- package/es/table/modules/table-operation-menu.es.js.map +1 -1
- package/es/table/modules/table-scroll-bar.es.js.map +1 -1
- package/es/table/modules/table-selection.es.js.map +1 -1
- package/es/table/table-config.es.js.map +1 -1
- package/es/table/utils/index.es.js.map +1 -1
- package/es/table/utils/node-matchers.es.js.map +1 -1
- package/es/toolbar/better-picker.es.js.map +1 -1
- package/es/toolbar/index.es.js.map +1 -1
- package/es/utils/debounce.es.js.map +1 -1
- package/es/utils/method.es.js.map +1 -1
- package/es/video/index.es.js.map +1 -1
- package/lib/attributors/font-style.cjs.js +1 -1
- package/lib/attributors/font-style.cjs.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/icons.config.cjs.js.map +1 -1
- package/lib/config/index.cjs.js.map +1 -1
- package/lib/counter/index.cjs.js.map +1 -1
- package/lib/custom-clipboard.cjs.js.map +1 -1
- package/lib/custom-image/BlotFormatter.cjs.js.map +1 -1
- package/lib/custom-image/Options.cjs.js.map +1 -1
- package/lib/custom-image/actions/Action.cjs.js.map +1 -1
- package/lib/custom-image/actions/CustomResizeAction.cjs.js.map +1 -1
- package/lib/custom-image/actions/DeleteAction.cjs.js.map +1 -1
- package/lib/custom-image/image.cjs.js +1 -1
- package/lib/custom-image/image.cjs.js.map +1 -1
- package/lib/custom-image/specs/BlotSpec.cjs.js.map +1 -1
- package/lib/custom-image/specs/CustomImageSpec.cjs.js.map +1 -1
- package/lib/custom-image/specs/ImageSpec.cjs.js.map +1 -1
- package/lib/custom-uploader.cjs.js.map +1 -1
- package/lib/emoji/emoji-list/people.cjs.js.map +1 -1
- package/lib/emoji/emoji-list.cjs.js.map +1 -1
- package/lib/emoji/emoji-map.cjs.js.map +1 -1
- package/lib/emoji/formats/emoji-blot.cjs.js.map +1 -1
- package/lib/emoji/index.cjs.js.map +1 -1
- package/lib/emoji/modules/emoji.cjs.js.map +1 -1
- package/lib/emoji/modules/toolbar-emoji.cjs.js.map +1 -1
- package/lib/emoji/utils.cjs.js.map +1 -1
- package/lib/file/formats/file.cjs.js.map +1 -1
- package/lib/file/index.cjs.js.map +1 -1
- package/lib/file/modules/file-bar.cjs.js.map +1 -1
- package/lib/fluent-editor.cjs.js +1 -0
- package/lib/fluent-editor.cjs.js.map +1 -1
- package/lib/global-link/constants.cjs.js.map +1 -1
- package/lib/global-link/formats/customer-widget-link.cjs.js.map +1 -1
- package/lib/global-link/formats/doc-link.cjs.js.map +1 -1
- package/lib/global-link/formats/wiki-link.cjs.js.map +1 -1
- package/lib/global-link/formats/work-item-link.cjs.js.map +1 -1
- package/lib/global-link/index.cjs.js.map +1 -1
- package/lib/global-link/utils/createTable.cjs.js.map +1 -1
- package/lib/link/formats/link.cjs.js.map +1 -1
- package/lib/link/index.cjs.js.map +1 -1
- package/lib/link/modules/tooltip.cjs.js.map +1 -1
- package/lib/mathlive/formats.cjs.js +3 -32
- package/lib/mathlive/formats.cjs.js.map +1 -1
- package/lib/mathlive/index.cjs.js +22 -5
- package/lib/mathlive/index.cjs.js.map +1 -1
- package/lib/mathlive/tooltip.cjs.js +6 -6
- package/lib/mathlive/tooltip.cjs.js.map +1 -1
- package/lib/mention/Mention.cjs.js.map +1 -1
- package/lib/mention/MentionLink.cjs.js.map +1 -1
- package/lib/mention/constants.cjs.js.map +1 -1
- package/lib/quick-menu/index.cjs.js.map +1 -1
- package/lib/screenshot/index.cjs.js.map +1 -1
- package/lib/soft-break/index.cjs.js.map +1 -1
- package/lib/strike/index.cjs.js.map +1 -1
- package/lib/syntax/index.cjs.js.map +1 -1
- package/lib/table/better-table.cjs.js.map +1 -1
- package/lib/table/formats/header.cjs.js.map +1 -1
- package/lib/table/formats/list.cjs.js.map +1 -1
- package/lib/table/formats/table.cjs.js.map +1 -1
- package/lib/table/modules/table-column-tool.cjs.js.map +1 -1
- package/lib/table/modules/table-operation-menu.cjs.js +16 -12
- package/lib/table/modules/table-operation-menu.cjs.js.map +1 -1
- package/lib/table/modules/table-scroll-bar.cjs.js.map +1 -1
- package/lib/table/modules/table-selection.cjs.js.map +1 -1
- package/lib/table/table-config.cjs.js.map +1 -1
- package/lib/table/utils/index.cjs.js.map +1 -1
- package/lib/table/utils/node-matchers.cjs.js.map +1 -1
- package/lib/toolbar/better-picker.cjs.js.map +1 -1
- package/lib/toolbar/index.cjs.js.map +1 -1
- package/lib/utils/debounce.cjs.js.map +1 -1
- package/lib/utils/method.cjs.js.map +1 -1
- package/lib/video/index.cjs.js.map +1 -1
- package/package.json +57 -57
- package/style.css +3 -37
- 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 +3 -3
- package/types/config/editor.config.d.ts +225 -225
- package/types/config/editor.utils.d.ts +42 -42
- package/types/config/i18n/en-us.d.ts +106 -106
- package/types/config/i18n/zh-cn.d.ts +106 -106
- package/types/config/icons.config.d.ts +34 -34
- package/types/config/index.d.ts +8 -8
- package/types/config/types/additional-toolbar-item.interface.d.ts +6 -7
- package/types/config/types/content-change.interface.d.ts +13 -13
- package/types/config/types/content-save.interface.d.ts +6 -6
- package/types/config/types/counter-option.interface.d.ts +7 -8
- package/types/config/types/editor-config.interface.d.ts +18 -19
- package/types/config/types/editor-modules.interface.d.ts +29 -30
- package/types/config/types/editor-toolbar.interface.d.ts +3 -4
- package/types/config/types/file-operation.interface.d.ts +10 -11
- package/types/config/types/focus-change.interface.d.ts +4 -4
- package/types/config/types/fullscreen-module.interface.d.ts +4 -4
- package/types/config/types/help-panel-item.interface.d.ts +5 -5
- package/types/config/types/help-panel-option.interface.d.ts +5 -6
- package/types/config/types/image-module.interface.d.ts +3 -3
- package/types/config/types/image-upload.interface.d.ts +5 -6
- package/types/config/types/index.d.ts +23 -23
- package/types/config/types/load-on-demand-module.interface.d.ts +5 -5
- package/types/config/types/mention-module.interface.d.ts +8 -8
- package/types/config/types/paste-change.interface.d.ts +4 -5
- package/types/config/types/quick-menu-module.interface.d.ts +3 -3
- package/types/config/types/range.interface.d.ts +4 -4
- package/types/config/types/registry-options.interface.d.ts +5 -5
- package/types/config/types/selection-change.interface.d.ts +6 -7
- package/types/config/types/toolbar-item.interface.d.ts +13 -13
- package/types/config/types/type.d.ts +3 -4
- package/types/config/types/validate-error.interface.d.ts +13 -13
- package/types/counter/index.d.ts +14 -15
- package/types/custom-clipboard.d.ts +26 -27
- package/types/custom-image/BlotFormatter.d.ts +20 -21
- package/types/custom-image/Options.d.ts +36 -36
- package/types/custom-image/actions/Action.d.ts +7 -7
- package/types/custom-image/actions/CustomResizeAction.d.ts +22 -23
- package/types/custom-image/actions/DeleteAction.d.ts +5 -6
- package/types/custom-image/image.d.ts +28 -28
- package/types/custom-image/specs/BlotSpec.d.ts +10 -11
- package/types/custom-image/specs/CustomImageSpec.d.ts +17 -18
- package/types/custom-image/specs/ImageSpec.d.ts +8 -9
- package/types/custom-uploader.d.ts +28 -29
- package/types/emoji/emoji-list/index.d.ts +1 -1
- package/types/emoji/emoji-list/people.d.ts +1 -1
- package/types/emoji/emoji-list.d.ts +2 -2
- package/types/emoji/emoji-map.d.ts +2 -2
- package/types/emoji/formats/emoji-blot.d.ts +13 -13
- package/types/emoji/index.d.ts +6 -7
- package/types/emoji/modules/emoji.d.ts +38 -38
- package/types/emoji/modules/toolbar-emoji.d.ts +8 -8
- package/types/emoji/utils.d.ts +1 -1
- package/types/file/formats/file.d.ts +15 -15
- package/types/file/index.d.ts +9 -10
- package/types/file/modules/file-bar.d.ts +14 -14
- package/types/fluent-editor.d.ts +12 -13
- package/types/format-painter/index.d.ts +13 -14
- package/types/fullscreen/handler.d.ts +1 -2
- package/types/global-link/constants.d.ts +3 -3
- package/types/global-link/formats/customer-widget-link.d.ts +14 -14
- package/types/global-link/formats/doc-link.d.ts +17 -17
- package/types/global-link/formats/wiki-link.d.ts +16 -16
- package/types/global-link/formats/work-item-link.d.ts +16 -16
- package/types/global-link/global-link-panel.d.ts +17 -18
- package/types/global-link/index.d.ts +18 -18
- package/types/global-link/utils/createTable.d.ts +1 -1
- package/types/index.d.ts +2 -3
- package/types/link/formats/link.d.ts +14 -15
- package/types/link/index.d.ts +6 -6
- package/types/link/modules/tooltip.d.ts +31 -32
- package/types/mathlive/formats.d.ts +20 -26
- package/types/mathlive/index.d.ts +7 -7
- package/types/mathlive/tooltip.d.ts +16 -15
- package/types/mention/Mention.d.ts +53 -54
- package/types/mention/MentionLink.d.ts +14 -15
- package/types/mention/constants.d.ts +3 -3
- package/types/quick-menu/index.d.ts +20 -21
- package/types/screenshot/index.d.ts +17 -18
- package/types/soft-break/index.d.ts +14 -14
- package/types/strike/index.d.ts +7 -7
- package/types/syntax/index.d.ts +12 -13
- package/types/table/better-table.d.ts +24 -25
- package/types/table/formats/header.d.ts +22 -22
- package/types/table/formats/list.d.ts +34 -34
- package/types/table/formats/table.d.ts +145 -146
- package/types/table/modules/table-column-tool.d.ts +23 -23
- package/types/table/modules/table-operation-menu.d.ts +38 -38
- package/types/table/modules/table-scroll-bar.d.ts +33 -33
- package/types/table/modules/table-selection.d.ts +37 -37
- package/types/table/table-config.d.ts +38 -38
- package/types/table/utils/index.d.ts +17 -17
- package/types/table/utils/node-matchers.d.ts +9 -9
- package/types/toolbar/better-picker.d.ts +1 -1
- package/types/toolbar/index.d.ts +7 -8
- package/types/toolbar/toolbar-tip.d.ts +6 -7
- package/types/utils/debounce.d.ts +6 -6
- package/types/utils/image.d.ts +1 -1
- package/types/utils/is.d.ts +2 -2
- package/types/utils/method.d.ts +6 -6
- package/types/utils/scroll-lock.d.ts +6 -6
- package/types/video/index.d.ts +14 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../../src/toolbar/index.ts"],"sourcesContent":["import type TypeToolbar from 'quill/modules/toolbar'\r\nimport Quill from 'quill'\r\nimport { isNullOrUndefined } from '../config/editor.utils'\r\nimport './better-picker'\r\n\r\nconst Delta = Quill.import('delta')\r\nconst Parchment = Quill.import('parchment')\r\nconst levels = ['error', 'warn', 'log', 'info'] as const\r\nlet level = 'warn' as const\r\n\r\nfunction debuglogger(method: typeof levels[number], ...args) {\r\n if (levels.indexOf(method) <= levels.indexOf(level)) {\r\n console[method](...args) // eslint-disable-line no-console\r\n }\r\n}\r\n\r\nfunction namespace(ns) {\r\n return levels.reduce((logger, method) => {\r\n logger[method] = debuglogger.bind(console, method, ns)\r\n return logger\r\n }, {} as Record<typeof levels[number], (...args: any) => void>)\r\n}\r\n\r\nnamespace.level = (newLevel) => {\r\n level = newLevel\r\n}\r\ndebuglogger.level = namespace.level\r\nconst debug = namespace('quill:toolbar')\r\n\r\nconst Toolbar = Quill.import('modules/toolbar') as typeof TypeToolbar\r\n// let oldClean = Toolbar.DEFAULTS.handlers.clean\r\n\r\nclass BetterToolbar extends Toolbar {\r\n update(range) {\r\n const formats = isNullOrUndefined(range) ? {} : this.quill.getFormat(range) as Record<string, any>\r\n this.controls.forEach((pair) => {\r\n const [format, input] = pair\r\n if (input.tagName === 'SELECT') {\r\n const select = input as HTMLSelectElement\r\n let option\r\n if (isNullOrUndefined(range)) {\r\n option = null\r\n }\r\n else if (isNullOrUndefined(formats[format])) {\r\n option = select.querySelector('option[selected]')\r\n }\r\n else if (!Array.isArray(formats[format])) {\r\n let value = format === 'header' ? formats[format].value : formats[format]\r\n if (typeof value === 'string') {\r\n value = value.replace(/\"/g, '\\\\\"')\r\n }\r\n option = select.querySelector(`option[value=\"${value}\"]`)\r\n }\r\n if (isNullOrUndefined(option)) {\r\n select.value = '' // TODO make configurable?\r\n select.selectedIndex = -1\r\n }\r\n else {\r\n option.selected = true\r\n }\r\n }\r\n else if (isNullOrUndefined(range)) {\r\n input.classList.remove('ql-active')\r\n }\r\n else if (input.hasAttribute('value')) {\r\n // both being null should match (default values)\r\n // '1' should match with 1 (headers)\r\n let isActive\r\n = formats[format] === input.getAttribute('value')\r\n || (!isNullOrUndefined(formats[format])\r\n && (formats[format].value === input.getAttribute('value')\r\n || formats[format].toString() === input.getAttribute('value')))\r\n || (isNullOrUndefined(formats[format]) && !input.getAttribute('value'))\r\n\r\n if (!isActive) {\r\n const checkFormat = formats[format]\r\n if (checkFormat === 'checked' || checkFormat === 'unchecked') {\r\n isActive = input.getAttribute('value') === 'check'\r\n }\r\n }\r\n\r\n if (isActive) {\r\n input.classList.add('ql-active')\r\n }\r\n else {\r\n input.classList.remove('ql-active')\r\n }\r\n }\r\n else {\r\n if (!isNullOrUndefined(formats[format])) {\r\n input.classList.add('ql-active')\r\n }\r\n else {\r\n input.classList.remove('ql-active')\r\n }\r\n }\r\n })\r\n }\r\n\r\n attach(input: HTMLElement) {\r\n let format = Array.from(input.classList).find((className) => {\r\n return className.indexOf('ql-') === 0\r\n })\r\n if (!format) return\r\n format = format.slice('ql-'.length)\r\n\r\n if (input.tagName === 'BUTTON') {\r\n input.setAttribute('type', 'button')\r\n }\r\n\r\n if (this.handlers[format] == null && this.quill.scroll.query(format) == null) {\r\n debug.warn('ignoring attaching to nonexistent format', format, input)\r\n return\r\n }\r\n\r\n const eventName = input.tagName === 'SELECT' ? 'change' : 'click'\r\n input.addEventListener(eventName, (e) => {\r\n let value: boolean | string\r\n\r\n if (input.tagName === 'SELECT') {\r\n const select = input as HTMLSelectElement\r\n if (select.selectedIndex < 0) return\r\n const selected = select.options[select.selectedIndex]\r\n\r\n if (selected.hasAttribute('selected')) {\r\n value = false\r\n }\r\n else {\r\n value = selected.value || false\r\n }\r\n }\r\n else {\r\n const button = input as HTMLButtonElement\r\n if (button.classList.contains('ql-active')) {\r\n value = false\r\n }\r\n else {\r\n value = button.value || !button.hasAttribute('value')\r\n }\r\n e.preventDefault()\r\n }\r\n\r\n this.quill.focus({ preventScroll: format === 'screenshot' })\r\n const [range] = this.quill.selection.getRange()\r\n if (this.handlers[format] != null) {\r\n // @ts-ignore\r\n if (!isNullOrUndefined(window.quillIsIntable) && window.quillIsIntable === true && (format === 'blockquote' || format === 'code-block' || format === 'list' || format === 'indent' || format === 'clean')) {\r\n return\r\n }\r\n this.handlers[format].call(this, value)\r\n }\r\n else if (\r\n // @ts-ignore\r\n this.quill.scroll.query(format).prototype instanceof Parchment.EmbedBlot\r\n ) {\r\n value = prompt(`Enter ${format}`)\r\n if (!value) return\r\n this.quill.updateContents(\r\n new Delta()\r\n .retain(range.index)\r\n .delete(range.length)\r\n .insert({ [format]: value }),\r\n Quill.sources.USER,\r\n )\r\n }\r\n else {\r\n // @ts-ignore\r\n if (!isNullOrUndefined(window.quillIsIntable) && window.quillIsIntable === true && (format === 'blockquote' || format === 'code-block' || format === 'list' || format === 'indent' || format === 'clean')) {\r\n return\r\n }\r\n this.quill.format(format, value, Quill.sources.USER)\r\n }\r\n\r\n this.update(range)\r\n })\r\n this.controls.push([format, input])\r\n }\r\n}\r\n\r\nexport default BetterToolbar\r\nexport * from './toolbar-tip'\r\n"],"names":["isNullOrUndefined"],"mappings":";;;;;;AAKA,MAAM,QAAQ,MAAM,OAAO,OAAO;AAClC,MAAM,YAAY,MAAM,OAAO,WAAW;AAC1C,MAAM,SAAS,CAAC,SAAS,QAAQ,OAAO,MAAM;AAC9C,IAAI,QAAQ;AAEZ,SAAS,YAAY,WAAkC,MAAM;AAC3D,MAAI,OAAO,QAAQ,MAAM,KAAK,OAAO,QAAQ,KAAK,GAAG;AAC3C,YAAA,MAAM,EAAE,GAAG,IAAI;AAAA,EACzB;AACF;AAEA,SAAS,UAAU,IAAI;AACrB,SAAO,OAAO,OAAO,CAAC,QAAQ,WAAW;AACvC,WAAO,MAAM,IAAI,YAAY,KAAK,SAAS,QAAQ,EAAE;AAC9C,WAAA;AAAA,EACT,GAAG,CAA2D,CAAA;AAChE;AAEA,UAAU,QAAQ,CAAC,aAAa;AACtB,UAAA;AACV;AACA,YAAY,QAAQ,UAAU;AAC9B,MAAM,QAAQ,UAAU,eAAe;AAEvC,MAAM,UAAU,MAAM,OAAO,iBAAiB;AAG9C,MAAM,sBAAsB,QAAQ;AAAA,EAClC,OAAO,OAAO;AACN,UAAA,UAAUA,+BAAkB,KAAK,IAAI,CAAA,IAAK,KAAK,MAAM,UAAU,KAAK;AACrE,SAAA,SAAS,QAAQ,CAAC,SAAS;AACxB,YAAA,CAAC,QAAQ,KAAK,IAAI;AACpB,UAAA,MAAM,YAAY,UAAU;AAC9B,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KAAK,IAAI,KAAK,MAAM,UAAU;AACrC,UAAI,KAAK,SAAS,MAAM,KAAK,MAAM;AAEjC,YAAI,CAACA,aAAkB,kBAAA,OAAO,cAAc,KAAK,OAAO,mBAAmB,SAAS,WAAW,gBAAgB,WAAW,gBAAgB,WAAW,UAAU,WAAW,YAAY,WAAW,UAAU;AACzM;AAAA,QACF;AACA,aAAK,SAAS,MAAM,EAAE,KAAK,MAAM,KAAK;AAAA,MAAA;AAAA;AAAA,QAItC,KAAK,MAAM,OAAO,MAAM,MAAM,EAAE,qBAAqB,UAAU;AAAA,QAC/D;AACQ,gBAAA,OAAO,SAAS,MAAM,EAAE;AAChC,YAAI,CAAC,MAAO;AACZ,aAAK,MAAM;AAAA,UACT,IAAI,MAAM,EACP,OAAO,MAAM,KAAK,EAClB,OAAO,MAAM,MAAM,EACnB,OAAO,EAAE,CAAC,MAAM,GAAG,OAAO;AAAA,UAC7B,MAAM,QAAQ;AAAA,QAAA;AAAA,MAChB,OAEG;AAEH,YAAI,CAACA,aAAkB,kBAAA,OAAO,cAAc,KAAK,OAAO,mBAAmB,SAAS,WAAW,gBAAgB,WAAW,gBAAgB,WAAW,UAAU,WAAW,YAAY,WAAW,UAAU;AACzM;AAAA,QACF;AACA,aAAK,MAAM,OAAO,QAAQ,OAAO,MAAM,QAAQ,IAAI;AAAA,MACrD;AAEA,WAAK,OAAO,KAAK;AAAA,IAAA,CAClB;AACD,SAAK,SAAS,KAAK,CAAC,QAAQ,KAAK,CAAC;AAAA,EACpC;AACF;;;"}
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../src/toolbar/index.ts"],"sourcesContent":["import type TypeToolbar from 'quill/modules/toolbar'\nimport Quill from 'quill'\nimport { isNullOrUndefined } from '../config/editor.utils'\nimport './better-picker'\n\nconst Delta = Quill.import('delta')\nconst Parchment = Quill.import('parchment')\nconst levels = ['error', 'warn', 'log', 'info'] as const\nlet level = 'warn' as const\n\nfunction debuglogger(method: typeof levels[number], ...args) {\n if (levels.indexOf(method) <= levels.indexOf(level)) {\n console[method](...args) // eslint-disable-line no-console\n }\n}\n\nfunction namespace(ns) {\n return levels.reduce((logger, method) => {\n logger[method] = debuglogger.bind(console, method, ns)\n return logger\n }, {} as Record<typeof levels[number], (...args: any) => void>)\n}\n\nnamespace.level = (newLevel) => {\n level = newLevel\n}\ndebuglogger.level = namespace.level\nconst debug = namespace('quill:toolbar')\n\nconst Toolbar = Quill.import('modules/toolbar') as typeof TypeToolbar\n// let oldClean = Toolbar.DEFAULTS.handlers.clean\n\nclass BetterToolbar extends Toolbar {\n update(range) {\n const formats = isNullOrUndefined(range) ? {} : this.quill.getFormat(range) as Record<string, any>\n this.controls.forEach((pair) => {\n const [format, input] = pair\n if (input.tagName === 'SELECT') {\n const select = input as HTMLSelectElement\n let option\n if (isNullOrUndefined(range)) {\n option = null\n }\n else if (isNullOrUndefined(formats[format])) {\n option = select.querySelector('option[selected]')\n }\n else if (!Array.isArray(formats[format])) {\n let value = format === 'header' ? formats[format].value : formats[format]\n if (typeof value === 'string') {\n value = value.replace(/\"/g, '\\\\\"')\n }\n option = select.querySelector(`option[value=\"${value}\"]`)\n }\n if (isNullOrUndefined(option)) {\n select.value = '' // TODO make configurable?\n select.selectedIndex = -1\n }\n else {\n option.selected = true\n }\n }\n else if (isNullOrUndefined(range)) {\n input.classList.remove('ql-active')\n }\n else if (input.hasAttribute('value')) {\n // both being null should match (default values)\n // '1' should match with 1 (headers)\n let isActive\n = formats[format] === input.getAttribute('value')\n || (!isNullOrUndefined(formats[format])\n && (formats[format].value === input.getAttribute('value')\n || formats[format].toString() === input.getAttribute('value')))\n || (isNullOrUndefined(formats[format]) && !input.getAttribute('value'))\n\n if (!isActive) {\n const checkFormat = formats[format]\n if (checkFormat === 'checked' || checkFormat === 'unchecked') {\n isActive = input.getAttribute('value') === 'check'\n }\n }\n\n if (isActive) {\n input.classList.add('ql-active')\n }\n else {\n input.classList.remove('ql-active')\n }\n }\n else {\n if (!isNullOrUndefined(formats[format])) {\n input.classList.add('ql-active')\n }\n else {\n input.classList.remove('ql-active')\n }\n }\n })\n }\n\n attach(input: HTMLElement) {\n let format = Array.from(input.classList).find((className) => {\n return className.indexOf('ql-') === 0\n })\n if (!format) return\n format = format.slice('ql-'.length)\n\n if (input.tagName === 'BUTTON') {\n input.setAttribute('type', 'button')\n }\n\n if (this.handlers[format] == null && this.quill.scroll.query(format) == null) {\n debug.warn('ignoring attaching to nonexistent format', format, input)\n return\n }\n\n const eventName = input.tagName === 'SELECT' ? 'change' : 'click'\n input.addEventListener(eventName, (e) => {\n let value: boolean | string\n\n if (input.tagName === 'SELECT') {\n const select = input as HTMLSelectElement\n if (select.selectedIndex < 0) return\n const selected = select.options[select.selectedIndex]\n\n if (selected.hasAttribute('selected')) {\n value = false\n }\n else {\n value = selected.value || false\n }\n }\n else {\n const button = input as HTMLButtonElement\n if (button.classList.contains('ql-active')) {\n value = false\n }\n else {\n value = button.value || !button.hasAttribute('value')\n }\n e.preventDefault()\n }\n\n this.quill.focus({ preventScroll: format === 'screenshot' })\n const [range] = this.quill.selection.getRange()\n if (this.handlers[format] != null) {\n // @ts-ignore\n if (!isNullOrUndefined(window.quillIsIntable) && window.quillIsIntable === true && (format === 'blockquote' || format === 'code-block' || format === 'list' || format === 'indent' || format === 'clean')) {\n return\n }\n this.handlers[format].call(this, value)\n }\n else if (\n // @ts-ignore\n this.quill.scroll.query(format).prototype instanceof Parchment.EmbedBlot\n ) {\n value = prompt(`Enter ${format}`)\n if (!value) return\n this.quill.updateContents(\n new Delta()\n .retain(range.index)\n .delete(range.length)\n .insert({ [format]: value }),\n Quill.sources.USER,\n )\n }\n else {\n // @ts-ignore\n if (!isNullOrUndefined(window.quillIsIntable) && window.quillIsIntable === true && (format === 'blockquote' || format === 'code-block' || format === 'list' || format === 'indent' || format === 'clean')) {\n return\n }\n this.quill.format(format, value, Quill.sources.USER)\n }\n\n this.update(range)\n })\n this.controls.push([format, input])\n }\n}\n\nexport default BetterToolbar\nexport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,EAAE,qBAAqB,UAAU;AAAA,QAC/D;AACQ,gBAAA,OAAO,SAAS,MAAM,EAAE;AAChC,YAAI,CAAC,MAAO;AACZ,aAAK,MAAM;AAAA,UACT,IAAI,MAAM,EACP,OAAO,MAAM,KAAK,EAClB,OAAO,MAAM,MAAM,EACnB,OAAO,EAAE,CAAC,MAAM,GAAG,OAAO;AAAA,UAC7B,MAAM,QAAQ;AAAA,QAAA;AAAA,MAChB,OAEG;AAEH,YAAI,CAACA,aAAkB,kBAAA,OAAO,cAAc,KAAK,OAAO,mBAAmB,SAAS,WAAW,gBAAgB,WAAW,gBAAgB,WAAW,UAAU,WAAW,YAAY,WAAW,UAAU;AACzM;AAAA,QACF;AACA,aAAK,MAAM,OAAO,QAAQ,OAAO,MAAM,QAAQ,IAAI;AAAA,MACrD;AAEA,WAAK,OAAO,KAAK;AAAA,IAAA,CAClB;AACD,SAAK,SAAS,KAAK,CAAC,QAAQ,KAAK,CAAC;AAAA,EACpC;AACF;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debounce.cjs.js","sources":["../../../src/utils/debounce.ts"],"sourcesContent":["import { isObject } from './is'\
|
|
1
|
+
{"version":3,"file":"debounce.cjs.js","sources":["../../../src/utils/debounce.ts"],"sourcesContent":["import { isObject } from './is'\nimport { root } from './method'\n\nexport function debounce(func, wait, options = undefined) {\n let lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime\n\n let lastInvokeTime = 0\n let leading = false\n let maxing = false\n let trailing = true\n\n // Bypass `requestAnimationFrame` by explicitly setting `wait=0`.\n const useRAF = (!wait && wait !== 0 && typeof root.requestAnimationFrame === 'function')\n\n if (typeof func !== 'function') {\n throw new TypeError('Expected a function')\n }\n wait = +wait || 0\n if (isObject(options)) {\n leading = !!options.leading\n maxing = 'maxWait' in options\n maxWait = maxing ? Math.max(+options.maxWait || 0, wait) : maxWait\n trailing = 'trailing' in options ? !!options.trailing : trailing\n }\n\n function invokeFunc(time) {\n const args = lastArgs\n const thisArg = lastThis\n\n lastArgs = lastThis = undefined\n lastInvokeTime = time\n result = func.apply(thisArg, args)\n return result\n }\n\n function startTimer(pendingFunc, wait) {\n if (useRAF) {\n root.cancelAnimationFrame(timerId)\n return root.requestAnimationFrame(pendingFunc)\n }\n return setTimeout(pendingFunc, wait)\n }\n\n function cancelTimer(id) {\n if (useRAF) {\n return root.cancelAnimationFrame(id)\n }\n clearTimeout(id)\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time\n // Start the timer for the trailing edge.\n timerId = startTimer(timerExpired, wait)\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result\n }\n\n function remainingWait(time) {\n const timeSinceLastCall = time - lastCallTime\n const timeSinceLastInvoke = time - lastInvokeTime\n const timeWaiting = wait - timeSinceLastCall\n\n return maxing\n ? Math.min(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting\n }\n\n function shouldInvoke(time) {\n const timeSinceLastCall = time - lastCallTime\n const timeSinceLastInvoke = time - lastInvokeTime\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait)\n || (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait))\n }\n\n function timerExpired() {\n const time = Date.now()\n if (shouldInvoke(time)) {\n return trailingEdge(time)\n }\n // Restart the timer.\n timerId = startTimer(timerExpired, remainingWait(time))\n }\n\n function trailingEdge(time) {\n timerId = undefined\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time)\n }\n lastArgs = lastThis = undefined\n return result\n }\n\n function cancel() {\n if (timerId !== undefined) {\n cancelTimer(timerId)\n }\n lastInvokeTime = 0\n lastArgs = lastCallTime = lastThis = timerId = undefined\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(Date.now())\n }\n\n function pending() {\n return timerId !== undefined\n }\n\n function debounced(...args) {\n const time = Date.now()\n const isInvoking = shouldInvoke(time)\n\n lastArgs = args\n lastThis = this\n lastCallTime = time\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime)\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = startTimer(timerExpired, wait)\n return invokeFunc(lastCallTime)\n }\n }\n if (timerId === undefined) {\n timerId = startTimer(timerExpired, wait)\n }\n return result\n }\n debounced.cancel = cancel\n debounced.flush = flush\n debounced.pending = pending\n return debounced\n}\n"],"names":["root","isObject","wait"],"mappings":";;;;AAGO,SAAS,SAAS,MAAM,MAAM,UAAU,QAAW;AACxD,MAAI,UACF,UACA,SACA,QACA,SACA;AAEF,MAAI,iBAAiB;AACrB,MAAI,UAAU;AACd,MAAI,SAAS;AACb,MAAI,WAAW;AAGf,QAAM,SAAU,CAAC,QAAQ,SAAS,KAAK,OAAOA,YAAK,0BAA0B;AAEzE,MAAA,OAAO,SAAS,YAAY;AACxB,UAAA,IAAI,UAAU,qBAAqB;AAAA,EAC3C;AACA,SAAO,CAAC,QAAQ;AACZ,MAAAC,GAAAA,SAAS,OAAO,GAAG;AACX,cAAA,CAAC,CAAC,QAAQ;AACpB,aAAS,aAAa;AACZ,cAAA,SAAS,KAAK,IAAI,CAAC,QAAQ,WAAW,GAAG,IAAI,IAAI;AAC3D,eAAW,cAAc,UAAU,CAAC,CAAC,QAAQ,WAAW;AAAA,EAC1D;AAEA,WAAS,WAAW,MAAM;AACxB,UAAM,OAAO;AACb,UAAM,UAAU;AAEhB,eAAW,WAAW;AACL,qBAAA;AACR,aAAA,KAAK,MAAM,SAAS,IAAI;AAC1B,WAAA;AAAA,EACT;AAES,WAAA,WAAW,aAAaC,OAAM;AACrC,QAAI,QAAQ;AACVF,kBAAK,qBAAqB,OAAO;AAC1B,aAAAA,OAAA,KAAK,sBAAsB,WAAW;AAAA,IAC/C;AACO,WAAA,WAAW,aAAaE,KAAI;AAAA,EACr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mBAAA;AAEf,QAAI,YAAY;AACd,UAAI,YAAY,QAAW;AACzB,eAAO,YAAY,YAAY;AAAA,MACjC;AACA,UAAI,QAAQ;AAEA,kBAAA,WAAW,cAAc,IAAI;AACvC,eAAO,WAAW,YAAY;AAAA,MAChC;AAAA,IACF;AACA,QAAI,YAAY,QAAW;AACf,gBAAA,WAAW,cAAc,IAAI;AAAA,IACzC;AACO,WAAA;AAAA,EACT;AACA,YAAU,SAAS;AACnB,YAAU,QAAQ;AAClB,YAAU,UAAU;AACb,SAAA;AACT;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method.cjs.js","sources":["../../../src/utils/method.ts"],"sourcesContent":["/** Detect free variable `global` from Node.js. */\
|
|
1
|
+
{"version":3,"file":"method.cjs.js","sources":["../../../src/utils/method.ts"],"sourcesContent":["/** Detect free variable `global` from Node.js. */\nconst freeGlobal\n = typeof global === 'object'\n && global !== null\n && global.Object === Object\n && global\n\n/** Detect free variable `globalThis` */\nconst freeGlobalThis\n = typeof globalThis === 'object'\n && globalThis !== null\n && globalThis.Object == Object\n && globalThis\n\n/** Detect free variable `self`. */\nconst freeSelf\n = typeof self === 'object' && self !== null && self.Object === Object && self\n\n/** Used as a reference to the global object. */\nexport const root\n = freeGlobalThis || freeGlobal || freeSelf || new Function('return this')()\n\nexport function compareArray(arr1, arr2) {\n if (arr1.length !== arr2.length) {\n return false\n }\n for (let i = 0; i < arr1.length; i++) {\n if (arr1[i] !== arr2[i]) {\n return false\n }\n }\n return true\n}\n\nexport function compareObject(object1, object2) {\n const o1keys = Object.keys(object1)\n const o2keys = Object.keys(object2)\n if (o2keys.length !== o1keys.length) return false\n for (let i = 0; i <= o1keys.length - 1; i++) {\n const key = o1keys[i]\n if (!o2keys.includes(key)) return false\n if (!compare(object2[key], object1[key])) return false\n }\n return true\n}\n\nexport function compare(value, other) {\n if (value === other) {\n return true\n }\n if (Array.isArray(value) && Array.isArray(other)) {\n return compareArray(value, other)\n }\n if (value instanceof Function || other instanceof Function) {\n return false\n }\n if (value instanceof Object && other instanceof Object) {\n return compareObject(value, other)\n }\n return false\n}\n\nexport function unshiftString(str: string, targetLength: number, addString: string): string {\n targetLength = targetLength > 0 ? targetLength : 0\n addString = String((typeof addString !== 'undefined' && typeof addString !== 'object') ? addString : ' ')\n str = (str === undefined || str === null) ? '' : String(str)\n if (str.length >= targetLength) {\n return String(str)\n }\n else {\n targetLength = targetLength - str.length\n if (targetLength > addString.length) {\n addString += addString.repeat(targetLength / addString.length)\n }\n return addString.slice(0, targetLength) + String(str)\n }\n}\n"],"names":[],"mappings":";;AACA,MAAM,aACF,OAAO,WAAW,YACjB,WAAW,QACX,OAAO,WAAW,UAClB;AAGL,MAAM,iBACF,OAAO,eAAe,YACrB,eAAe,QACf,WAAW,UAAU,UACrB;AAGL,MAAM,WACF,OAAO,SAAS,YAAY,SAAS,QAAQ,KAAK,WAAW,UAAU;AAGpE,MAAM,OACT,kBAAkB,cAAc,YAAY,IAAI,SAAS,aAAa,EAAE;AAE5D,SAAA,aAAa,MAAM,MAAM;AACnC,MAAA,KAAK,WAAW,KAAK,QAAQ;AACxB,WAAA;AAAA,EACT;AACA,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,QAAI,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG;AAChB,aAAA;AAAA,IACT;AAAA,EACF;AACO,SAAA;AACT;AAEgB,SAAA,cAAc,SAAS,SAAS;AACxC,QAAA,SAAS,OAAO,KAAK,OAAO;AAC5B,QAAA,SAAS,OAAO,KAAK,OAAO;AAClC,MAAI,OAAO,WAAW,OAAO,OAAe,QAAA;AAC5C,WAAS,IAAI,GAAG,KAAK,OAAO,SAAS,GAAG,KAAK;AACrC,UAAA,MAAM,OAAO,CAAC;AACpB,QAAI,CAAC,OAAO,SAAS,GAAG,EAAU,QAAA;AAC9B,QAAA,CAAC,QAAQ,QAAQ,GAAG,GAAG,QAAQ,GAAG,CAAC,EAAU,QAAA;AAAA,EACnD;AACO,SAAA;AACT;AAEgB,SAAA,QAAQ,OAAO,OAAO;AACpC,MAAI,UAAU,OAAO;AACZ,WAAA;AAAA,EACT;AACA,MAAI,MAAM,QAAQ,KAAK,KAAK,MAAM,QAAQ,KAAK,GAAG;AACzC,WAAA,aAAa,OAAO,KAAK;AAAA,EAClC;AACI,MAAA,iBAAiB,YAAY,iBAAiB,UAAU;AACnD,WAAA;AAAA,EACT;AACI,MAAA,iBAAiB,UAAU,iBAAiB,QAAQ;AAC/C,WAAA,cAAc,OAAO,KAAK;AAAA,EACnC;AACO,SAAA;AACT;AAEgB,SAAA,cAAc,KAAa,cAAsB,WAA2B;AAC3E,iBAAA,eAAe,IAAI,eAAe;AACrC,cAAA,OAAQ,OAAO,cAAc,eAAe,OAAO,cAAc,WAAY,YAAY,GAAG;AACxG,QAAO,QAAQ,UAAa,QAAQ,OAAQ,KAAK,OAAO,GAAG;AACvD,MAAA,IAAI,UAAU,cAAc;AAC9B,WAAO,OAAO,GAAG;AAAA,EAAA,OAEd;AACH,mBAAe,eAAe,IAAI;AAC9B,QAAA,eAAe,UAAU,QAAQ;AACnC,mBAAa,UAAU,OAAO,eAAe,UAAU,MAAM;AAAA,IAC/D;AACA,WAAO,UAAU,MAAM,GAAG,YAAY,IAAI,OAAO,GAAG;AAAA,EACtD;AACF;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../../src/video/index.ts"],"sourcesContent":["import type { Parchment as TypeParchment } from 'quill'\
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../src/video/index.ts"],"sourcesContent":["import type { Parchment as TypeParchment } from 'quill'\nimport Quill from 'quill'\nimport { sanitize } from '../config/editor.utils'\n\nconst BlockEmbed = Quill.imports['blots/block/embed'] as TypeParchment.BlotConstructor\nconst VIDEO_ATTRIBUTES = ['id', 'title', 'src']\n\nclass Video extends BlockEmbed {\n static blotName: string\n static tagName: string\n static SANITIZED_URL: string\n static PROTOCOL_WHITELIST: string[]\n static className: string\n statics: any\n domNode: any\n\n static sanitize(url) {\n return sanitize(url, this.PROTOCOL_WHITELIST) ? url : this.SANITIZED_URL\n }\n\n static create(value) {\n const node = super.create(value) as HTMLElement\n node.setAttribute('contenteditable', 'false')\n node.setAttribute('controls', 'controls')\n VIDEO_ATTRIBUTES.forEach((key) => {\n if (value[key]) {\n switch (key) {\n case 'src':{ const src = Video.sanitize(value[key])\n node.setAttribute(key, src)\n break\n }\n case 'title': {\n node.setAttribute(key, value[key])\n break\n }\n default: {\n node.dataset[key] = value[key]\n }\n }\n }\n })\n return node\n }\n\n static value(domNode) {\n const formats: any = {}\n VIDEO_ATTRIBUTES.forEach((key) => {\n const value = domNode.getAttribute(key) || domNode.dataset[key]\n if (value) {\n formats[key] = value\n }\n })\n return formats\n }\n}\nVideo.blotName = 'video'\nVideo.tagName = 'VIDEO'\nVideo.SANITIZED_URL = 'about:blank'\nVideo.PROTOCOL_WHITELIST = ['http', 'https']\nVideo.className = 'ql-video-item'\n\nexport default Video\n"],"names":["sanitize"],"mappings":";;;;AAIA,MAAM,aAAa,MAAM,QAAQ,mBAAmB;AACpD,MAAM,mBAAmB,CAAC,MAAM,SAAS,KAAK;AAE9C,MAAM,cAAc,WAAW;AAAA,EAS7B,OAAO,SAAS,KAAK;AACnB,WAAOA,aAAAA,SAAS,KAAK,KAAK,kBAAkB,IAAI,MAAM,KAAK;AAAA,EAC7D;AAAA,EAEA,OAAO,OAAO,OAAO;AACb,UAAA,OAAO,MAAM,OAAO,KAAK;AAC1B,SAAA,aAAa,mBAAmB,OAAO;AACvC,SAAA,aAAa,YAAY,UAAU;AACvB,qBAAA,QAAQ,CAAC,QAAQ;AAC5B,UAAA,MAAM,GAAG,GAAG;AACd,gBAAQ,KAAK;AAAA,UACX,KAAK,OAAM;AAAE,kBAAM,MAAM,MAAM,SAAS,MAAM,GAAG,CAAC;AAC3C,iBAAA,aAAa,KAAK,GAAG;AAC1B;AAAA,UACF;AAAA,UACA,KAAK,SAAS;AACZ,iBAAK,aAAa,KAAK,MAAM,GAAG,CAAC;AACjC;AAAA,UACF;AAAA,UACA,SAAS;AACP,iBAAK,QAAQ,GAAG,IAAI,MAAM,GAAG;AAAA,UAC/B;AAAA,QACF;AAAA,MACF;AAAA,IAAA,CACD;AACM,WAAA;AAAA,EACT;AAAA,EAEA,OAAO,MAAM,SAAS;AACpB,UAAM,UAAe,CAAA;AACJ,qBAAA,QAAQ,CAAC,QAAQ;AAChC,YAAM,QAAQ,QAAQ,aAAa,GAAG,KAAK,QAAQ,QAAQ,GAAG;AAC9D,UAAI,OAAO;AACT,gBAAQ,GAAG,IAAI;AAAA,MACjB;AAAA,IAAA,CACD;AACM,WAAA;AAAA,EACT;AACF;AACA,MAAM,WAAW;AACjB,MAAM,UAAU;AAChB,MAAM,gBAAgB;AACtB,MAAM,qBAAqB,CAAC,QAAQ,OAAO;AAC3C,MAAM,YAAY;;"}
|
package/package.json
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@opentiny/fluent-editor",
|
|
3
|
-
"version": "3.23.
|
|
4
|
-
"description": "A rich text editor based on Quill 2.0, which extends rich modules and formats on the basis of Quill. It's powerful and out-of-the-box.",
|
|
5
|
-
"author": "OpenTiny Team",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"homepage": "https://opentiny.github.io/fluent-editor/",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git@github.com:opentiny/fluent-editor.git"
|
|
11
|
-
},
|
|
12
|
-
"bugs": {
|
|
13
|
-
"url": "https://github.com/opentiny/fluent-editor/issues"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"editor",
|
|
17
|
-
"rich-text-editor",
|
|
18
|
-
"rich-text",
|
|
19
|
-
"wysiwyg",
|
|
20
|
-
"wysiwyg-editor",
|
|
21
|
-
"quill",
|
|
22
|
-
"opentiny",
|
|
23
|
-
"fluent-editor"
|
|
24
|
-
],
|
|
25
|
-
"main": "lib/index.cjs.js",
|
|
26
|
-
"module": "es/index.es.js",
|
|
27
|
-
"types": "types/index.d.ts",
|
|
28
|
-
"scripts": {
|
|
29
|
-
"start": "vite build && vite",
|
|
30
|
-
"dev": "vite",
|
|
31
|
-
"build": "pnpm build:theme && vite build && node scripts/pre-release.js",
|
|
32
|
-
"build:theme": "vite build --config vite.config.theme.ts",
|
|
33
|
-
"test": "jest"
|
|
34
|
-
},
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"lodash-es": "^4.17.15",
|
|
37
|
-
"quill": "^2.0.0",
|
|
38
|
-
"quill-toolbar-tip": "^0.0.4"
|
|
39
|
-
},
|
|
40
|
-
"devDependencies": {
|
|
41
|
-
"@types/jest": "^26.0.23",
|
|
42
|
-
"commander": "^6.2.0",
|
|
43
|
-
"glob": "^11.0.0",
|
|
44
|
-
"highlight.js": "^10.2.0",
|
|
45
|
-
"html2canvas": "^1.4.1",
|
|
46
|
-
"jest": "^26.6.3",
|
|
47
|
-
"mathlive": "^0.101.0",
|
|
48
|
-
"parchment": "^3.0.0",
|
|
49
|
-
"sass": "^1.47.0",
|
|
50
|
-
"shelljs": "^0.8.4",
|
|
51
|
-
"ts-jest": "^26.5.6",
|
|
52
|
-
"ts-node": "^9.1.1",
|
|
53
|
-
"typescript": "^4.9.5",
|
|
54
|
-
"vite": "^5.0.0",
|
|
55
|
-
"vite-plugin-dts": "^4.3.0"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@opentiny/fluent-editor",
|
|
3
|
+
"version": "3.23.2",
|
|
4
|
+
"description": "A rich text editor based on Quill 2.0, which extends rich modules and formats on the basis of Quill. It's powerful and out-of-the-box.",
|
|
5
|
+
"author": "OpenTiny Team",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://opentiny.github.io/fluent-editor/",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git@github.com:opentiny/fluent-editor.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/opentiny/fluent-editor/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"editor",
|
|
17
|
+
"rich-text-editor",
|
|
18
|
+
"rich-text",
|
|
19
|
+
"wysiwyg",
|
|
20
|
+
"wysiwyg-editor",
|
|
21
|
+
"quill",
|
|
22
|
+
"opentiny",
|
|
23
|
+
"fluent-editor"
|
|
24
|
+
],
|
|
25
|
+
"main": "lib/index.cjs.js",
|
|
26
|
+
"module": "es/index.es.js",
|
|
27
|
+
"types": "types/index.d.ts",
|
|
28
|
+
"scripts": {
|
|
29
|
+
"start": "vite build && vite",
|
|
30
|
+
"dev": "vite",
|
|
31
|
+
"build": "pnpm build:theme && vite build && node scripts/pre-release.js",
|
|
32
|
+
"build:theme": "vite build --config vite.config.theme.ts",
|
|
33
|
+
"test": "jest"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"lodash-es": "^4.17.15",
|
|
37
|
+
"quill": "^2.0.0",
|
|
38
|
+
"quill-toolbar-tip": "^0.0.4"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/jest": "^26.0.23",
|
|
42
|
+
"commander": "^6.2.0",
|
|
43
|
+
"glob": "^11.0.0",
|
|
44
|
+
"highlight.js": "^10.2.0",
|
|
45
|
+
"html2canvas": "^1.4.1",
|
|
46
|
+
"jest": "^26.6.3",
|
|
47
|
+
"mathlive": "^0.101.0",
|
|
48
|
+
"parchment": "^3.0.0",
|
|
49
|
+
"sass": "^1.47.0",
|
|
50
|
+
"shelljs": "^0.8.4",
|
|
51
|
+
"ts-jest": "^26.5.6",
|
|
52
|
+
"ts-node": "^9.1.1",
|
|
53
|
+
"typescript": "^4.9.5",
|
|
54
|
+
"vite": "^5.0.0",
|
|
55
|
+
"vite-plugin-dts": "^4.3.0"
|
|
56
|
+
}
|
|
57
|
+
}
|
package/style.css
CHANGED
|
@@ -3626,9 +3626,9 @@ li.unchecked > .ql-ui {
|
|
|
3626
3626
|
display: none;
|
|
3627
3627
|
}
|
|
3628
3628
|
.ql-tooltip.math-field-tooltip {
|
|
3629
|
-
border: none
|
|
3630
|
-
z-index: 10
|
|
3631
|
-
padding: 0
|
|
3629
|
+
border: none;
|
|
3630
|
+
z-index: 10;
|
|
3631
|
+
padding: 0;
|
|
3632
3632
|
}
|
|
3633
3633
|
.ql-tooltip.math-field-tooltip::before {
|
|
3634
3634
|
display: none;
|
|
@@ -4919,38 +4919,4 @@ li.unchecked > .ql-ui {
|
|
|
4919
4919
|
}
|
|
4920
4920
|
.image-preview__overlay .icon-maxmize:before {
|
|
4921
4921
|
content: url('data:image/svg+xml;utf8,<svg t="1642681601748" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2834" width="20" height="20"><path d="M460.8 940.8h-320l262.4-262.4c12.8-12.8 12.8-38.4 0-51.2-12.8-19.2-38.4-19.2-57.6 0l-262.4 262.4v-345.6c0-19.2-19.2-38.4-38.4-38.4s-38.4 19.2-38.4 38.4v364.8c0 51.2 38.4 115.2 96 115.2h358.4c19.2 0 38.4-19.2 38.4-38.4 0-25.6-19.2-44.8-38.4-44.8zM940.8 6.4h-377.6c-19.2 0-38.4 19.2-38.4 38.4s19.2 38.4 38.4 38.4h320l-268.8 262.4c-12.8 12.8-12.8 38.4 0 57.6 19.2 12.8 44.8 12.8 57.6 0l262.4-262.4v320c0 19.2 19.2 38.4 38.4 38.4s38.4-19.2 38.4-38.4v-352c6.4-64-25.6-102.4-70.4-102.4z" p-id="2835"></path></svg>');
|
|
4922
|
-
}
|
|
4923
|
-
/* Set content font-families */
|
|
4924
|
-
.ql-font-songti {
|
|
4925
|
-
font-family: "宋体", "SimSun";
|
|
4926
|
-
}
|
|
4927
|
-
.ql-font-yahei {
|
|
4928
|
-
font-family: "微软雅黑", "Microsoft YaHei";
|
|
4929
|
-
}
|
|
4930
|
-
.ql-font-kaiti {
|
|
4931
|
-
font-family: "楷体", "楷体_GB2312", "SimKa";
|
|
4932
|
-
}
|
|
4933
|
-
.ql-font-heiti {
|
|
4934
|
-
font-family: "黑体", "SimHei";
|
|
4935
|
-
}
|
|
4936
|
-
.ql-font-lishu {
|
|
4937
|
-
font-family: "隶书", "SimLi";
|
|
4938
|
-
}
|
|
4939
|
-
.ql-font-mono {
|
|
4940
|
-
font-family: "andale mono";
|
|
4941
|
-
}
|
|
4942
|
-
.ql-font-arial {
|
|
4943
|
-
font-family: arial, helvetica, sans-serif;
|
|
4944
|
-
}
|
|
4945
|
-
.ql-font-arialblack {
|
|
4946
|
-
font-family: "arial black", "avant garde";
|
|
4947
|
-
}
|
|
4948
|
-
.ql-font-comic {
|
|
4949
|
-
font-family: "comic sans ms";
|
|
4950
|
-
}
|
|
4951
|
-
.ql-font-impact {
|
|
4952
|
-
font-family: "impact", "chicago";
|
|
4953
|
-
}
|
|
4954
|
-
.ql-font-times {
|
|
4955
|
-
font-family: "times new roman";
|
|
4956
4922
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SizeStyle: import('parchment').StyleAttributor;
|
|
1
|
+
export declare const SizeStyle: import('parchment').StyleAttributor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const FontStyle: import('parchment').
|
|
1
|
+
export declare const FontStyle: import('parchment').ClassAttributor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './font-size';
|
|
2
|
-
export * from './font-style';
|
|
3
|
-
export * from './line-height';
|
|
4
|
-
export * from './text-indent';
|
|
1
|
+
export * from './font-size';
|
|
2
|
+
export * from './font-style';
|
|
3
|
+
export * from './line-height';
|
|
4
|
+
export * from './text-indent';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LineHeightStyle: import('parchment').StyleAttributor;
|
|
1
|
+
export declare const LineHeightStyle: import('parchment').StyleAttributor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const TextIndentStyle: import('parchment').StyleAttributor;
|
|
1
|
+
export declare const TextIndentStyle: import('parchment').StyleAttributor;
|