@plotdb/quill 1.0.0 → 1.0.1
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/babel.config.cjs +12 -0
- package/package.json +2 -1
- package/scripts/babel-svg-inline-import.cjs +44 -0
- package/scripts/build +20 -0
- package/src/types.d.ts +6 -0
- package/webpack.common.cjs +69 -0
- package/webpack.config.cjs +42 -0
- package/blots/block.d.ts +0 -34
- package/blots/block.js +0 -182
- package/blots/block.js.map +0 -1
- package/blots/break.d.ts +0 -8
- package/blots/break.js +0 -21
- package/blots/break.js.map +0 -1
- package/blots/container.d.ts +0 -4
- package/blots/container.js +0 -4
- package/blots/container.js.map +0 -1
- package/blots/cursor.d.ts +0 -26
- package/blots/cursor.js +0 -170
- package/blots/cursor.js.map +0 -1
- package/blots/embed.d.ts +0 -18
- package/blots/embed.js +0 -72
- package/blots/embed.js.map +0 -1
- package/blots/inline.d.ts +0 -12
- package/blots/inline.js +0 -48
- package/blots/inline.js.map +0 -1
- package/blots/scroll.d.ts +0 -49
- package/blots/scroll.js +0 -349
- package/blots/scroll.js.map +0 -1
- package/blots/text.d.ts +0 -5
- package/blots/text.js +0 -16
- package/blots/text.js.map +0 -1
- package/core/composition.d.ts +0 -12
- package/core/composition.js +0 -44
- package/core/composition.js.map +0 -1
- package/core/editor.d.ts +0 -28
- package/core/editor.js +0 -404
- package/core/editor.js.map +0 -1
- package/core/emitter.d.ts +0 -33
- package/core/emitter.js +0 -78
- package/core/emitter.js.map +0 -1
- package/core/instances.d.ts +0 -3
- package/core/instances.js +0 -2
- package/core/instances.js.map +0 -1
- package/core/logger.d.ts +0 -7
- package/core/logger.js +0 -24
- package/core/logger.js.map +0 -1
- package/core/module.d.ts +0 -8
- package/core/module.js +0 -10
- package/core/module.js.map +0 -1
- package/core/quill.d.ts +0 -218
- package/core/quill.js +0 -630
- package/core/quill.js.map +0 -1
- package/core/selection.d.ts +0 -74
- package/core/selection.js +0 -374
- package/core/selection.js.map +0 -1
- package/core/theme.d.ts +0 -32
- package/core/theme.js +0 -28
- package/core/theme.js.map +0 -1
- package/core/utils/createRegistryWithFormats.d.ts +0 -5
- package/core/utils/createRegistryWithFormats.js +0 -29
- package/core/utils/createRegistryWithFormats.js.map +0 -1
- package/core/utils/scrollRectIntoView.d.ts +0 -11
- package/core/utils/scrollRectIntoView.js +0 -110
- package/core/utils/scrollRectIntoView.js.map +0 -1
- package/core.d.ts +0 -7
- package/core.js +0 -37
- package/core.js.map +0 -1
- package/dist/quill.bubble.css +0 -10
- package/dist/quill.bubble.css.map +0 -1
- package/dist/quill.core.css +0 -10
- package/dist/quill.core.css.map +0 -1
- package/dist/quill.core.js +0 -3
- package/dist/quill.core.js.LICENSE.txt +0 -7
- package/dist/quill.core.js.map +0 -1
- package/dist/quill.js +0 -3
- package/dist/quill.js.LICENSE.txt +0 -7
- package/dist/quill.js.map +0 -1
- package/dist/quill.snow.css +0 -10
- package/dist/quill.snow.css.map +0 -1
- package/formats/align.d.ts +0 -5
- package/formats/align.js +0 -10
- package/formats/align.js.map +0 -1
- package/formats/background.d.ts +0 -5
- package/formats/background.js +0 -10
- package/formats/background.js.map +0 -1
- package/formats/blockquote.d.ts +0 -6
- package/formats/blockquote.js +0 -7
- package/formats/blockquote.js.map +0 -1
- package/formats/bold.d.ts +0 -11
- package/formats/bold.js +0 -19
- package/formats/bold.js.map +0 -1
- package/formats/code.d.ts +0 -15
- package/formats/code.js +0 -44
- package/formats/code.js.map +0 -1
- package/formats/color.d.ts +0 -7
- package/formats/color.js +0 -18
- package/formats/color.js.map +0 -1
- package/formats/direction.d.ts +0 -5
- package/formats/direction.js +0 -10
- package/formats/direction.js.map +0 -1
- package/formats/font.d.ts +0 -7
- package/formats/font.js +0 -14
- package/formats/font.js.map +0 -1
- package/formats/formula.d.ts +0 -10
- package/formats/formula.js +0 -34
- package/formats/formula.js.map +0 -1
- package/formats/header.d.ts +0 -7
- package/formats/header.js +0 -10
- package/formats/header.js.map +0 -1
- package/formats/image.d.ts +0 -13
- package/formats/image.js +0 -44
- package/formats/image.js.map +0 -1
- package/formats/indent.d.ts +0 -8
- package/formats/indent.js +0 -30
- package/formats/indent.js.map +0 -1
- package/formats/italic.d.ts +0 -6
- package/formats/italic.js +0 -7
- package/formats/italic.js.map +0 -1
- package/formats/link.d.ts +0 -13
- package/formats/link.js +0 -36
- package/formats/link.js.map +0 -1
- package/formats/list.d.ts +0 -13
- package/formats/list.js +0 -50
- package/formats/list.js.map +0 -1
- package/formats/script.d.ts +0 -8
- package/formats/script.js +0 -21
- package/formats/script.js.map +0 -1
- package/formats/size.d.ts +0 -4
- package/formats/size.js +0 -11
- package/formats/size.js.map +0 -1
- package/formats/strike.d.ts +0 -6
- package/formats/strike.js +0 -7
- package/formats/strike.js.map +0 -1
- package/formats/table.d.ts +0 -45
- package/formats/table.js +0 -176
- package/formats/table.js.map +0 -1
- package/formats/underline.d.ts +0 -6
- package/formats/underline.js +0 -7
- package/formats/underline.js.map +0 -1
- package/formats/video.d.ts +0 -14
- package/formats/video.js +0 -49
- package/formats/video.js.map +0 -1
- package/modules/clipboard.d.ts +0 -43
- package/modules/clipboard.js +0 -477
- package/modules/clipboard.js.map +0 -1
- package/modules/history.d.ts +0 -36
- package/modules/history.js +0 -178
- package/modules/history.js.map +0 -1
- package/modules/input.d.ts +0 -10
- package/modules/input.js +0 -83
- package/modules/input.js.map +0 -1
- package/modules/keyboard.d.ts +0 -58
- package/modules/keyboard.js +0 -713
- package/modules/keyboard.js.map +0 -1
- package/modules/normalizeExternalHTML/index.d.ts +0 -2
- package/modules/normalizeExternalHTML/index.js +0 -12
- package/modules/normalizeExternalHTML/index.js.map +0 -1
- package/modules/normalizeExternalHTML/normalizers/googleDocs.d.ts +0 -1
- package/modules/normalizeExternalHTML/normalizers/googleDocs.js +0 -24
- package/modules/normalizeExternalHTML/normalizers/googleDocs.js.map +0 -1
- package/modules/normalizeExternalHTML/normalizers/msWord.d.ts +0 -1
- package/modules/normalizeExternalHTML/normalizers/msWord.js +0 -87
- package/modules/normalizeExternalHTML/normalizers/msWord.js.map +0 -1
- package/modules/syntax.d.ts +0 -50
- package/modules/syntax.js +0 -332
- package/modules/syntax.js.map +0 -1
- package/modules/table.d.ts +0 -20
- package/modules/table.js +0 -125
- package/modules/table.js.map +0 -1
- package/modules/tableEmbed.d.ts +0 -27
- package/modules/tableEmbed.js +0 -209
- package/modules/tableEmbed.js.map +0 -1
- package/modules/toolbar.d.ts +0 -24
- package/modules/toolbar.js +0 -265
- package/modules/toolbar.js.map +0 -1
- package/modules/uiNode.d.ts +0 -19
- package/modules/uiNode.js +0 -95
- package/modules/uiNode.js.map +0 -1
- package/modules/uploader.d.ts +0 -15
- package/modules/uploader.js +0 -69
- package/modules/uploader.js.map +0 -1
- package/quill.d.ts +0 -5
- package/quill.js +0 -82
- package/quill.js.map +0 -1
- package/themes/base.d.ts +0 -35
- package/themes/base.js +0 -257
- package/themes/base.js.map +0 -1
- package/themes/bubble.d.ts +0 -18
- package/themes/bubble.js +0 -114
- package/themes/bubble.js.map +0 -1
- package/themes/snow.d.ts +0 -9
- package/themes/snow.js +0 -122
- package/themes/snow.js.map +0 -1
- package/types.d.js +0 -2
- package/types.d.js.map +0 -1
- package/ui/color-picker.d.ts +0 -7
- package/ui/color-picker.js +0 -30
- package/ui/color-picker.js.map +0 -1
- package/ui/icon-picker.d.ts +0 -7
- package/ui/icon-picker.js +0 -22
- package/ui/icon-picker.js.map +0 -1
- package/ui/icons.d.ts +0 -49
- package/ui/icons.js +0 -82
- package/ui/icons.js.map +0 -1
- package/ui/picker.d.ts +0 -16
- package/ui/picker.js +0 -171
- package/ui/picker.js.map +0 -1
- package/ui/tooltip.d.ts +0 -12
- package/ui/tooltip.js +0 -56
- package/ui/tooltip.js.map +0 -1
- /package/{assets → src/assets}/base.styl +0 -0
- /package/{assets → src/assets}/bubble/toolbar.styl +0 -0
- /package/{assets → src/assets}/bubble/tooltip.styl +0 -0
- /package/{assets → src/assets}/bubble.styl +0 -0
- /package/{assets → src/assets}/core.styl +0 -0
- /package/{assets → src/assets}/favicon.png +0 -0
- /package/{assets → src/assets}/icons/align-center.svg +0 -0
- /package/{assets → src/assets}/icons/align-justify.svg +0 -0
- /package/{assets → src/assets}/icons/align-left.svg +0 -0
- /package/{assets → src/assets}/icons/align-right.svg +0 -0
- /package/{assets → src/assets}/icons/attachment.svg +0 -0
- /package/{assets → src/assets}/icons/audio.svg +0 -0
- /package/{assets → src/assets}/icons/authorship.svg +0 -0
- /package/{assets → src/assets}/icons/background.svg +0 -0
- /package/{assets → src/assets}/icons/blockquote.svg +0 -0
- /package/{assets → src/assets}/icons/bold.svg +0 -0
- /package/{assets → src/assets}/icons/clean.svg +0 -0
- /package/{assets → src/assets}/icons/code.svg +0 -0
- /package/{assets → src/assets}/icons/color.svg +0 -0
- /package/{assets → src/assets}/icons/comment.svg +0 -0
- /package/{assets → src/assets}/icons/direction-ltr.svg +0 -0
- /package/{assets → src/assets}/icons/direction-rtl.svg +0 -0
- /package/{assets → src/assets}/icons/dropdown.svg +0 -0
- /package/{assets → src/assets}/icons/embed.svg +0 -0
- /package/{assets → src/assets}/icons/emoji.svg +0 -0
- /package/{assets → src/assets}/icons/float-center.svg +0 -0
- /package/{assets → src/assets}/icons/float-full.svg +0 -0
- /package/{assets → src/assets}/icons/float-left.svg +0 -0
- /package/{assets → src/assets}/icons/float-right.svg +0 -0
- /package/{assets → src/assets}/icons/font.svg +0 -0
- /package/{assets → src/assets}/icons/formula.svg +0 -0
- /package/{assets → src/assets}/icons/hashtag.svg +0 -0
- /package/{assets → src/assets}/icons/header-2.svg +0 -0
- /package/{assets → src/assets}/icons/header-3.svg +0 -0
- /package/{assets → src/assets}/icons/header-4.svg +0 -0
- /package/{assets → src/assets}/icons/header-5.svg +0 -0
- /package/{assets → src/assets}/icons/header-6.svg +0 -0
- /package/{assets → src/assets}/icons/header.svg +0 -0
- /package/{assets → src/assets}/icons/horizontal-rule.svg +0 -0
- /package/{assets → src/assets}/icons/image.svg +0 -0
- /package/{assets → src/assets}/icons/indent.svg +0 -0
- /package/{assets → src/assets}/icons/italic.svg +0 -0
- /package/{assets → src/assets}/icons/link.svg +0 -0
- /package/{assets → src/assets}/icons/list-bullet.svg +0 -0
- /package/{assets → src/assets}/icons/list-check.svg +0 -0
- /package/{assets → src/assets}/icons/list-ordered.svg +0 -0
- /package/{assets → src/assets}/icons/map.svg +0 -0
- /package/{assets → src/assets}/icons/mention.svg +0 -0
- /package/{assets → src/assets}/icons/more.svg +0 -0
- /package/{assets → src/assets}/icons/outdent.svg +0 -0
- /package/{assets → src/assets}/icons/redo.svg +0 -0
- /package/{assets → src/assets}/icons/size-decrease.svg +0 -0
- /package/{assets → src/assets}/icons/size-increase.svg +0 -0
- /package/{assets → src/assets}/icons/size.svg +0 -0
- /package/{assets → src/assets}/icons/spacing.svg +0 -0
- /package/{assets → src/assets}/icons/speech.svg +0 -0
- /package/{assets → src/assets}/icons/strike.svg +0 -0
- /package/{assets → src/assets}/icons/subscript.svg +0 -0
- /package/{assets → src/assets}/icons/superscript.svg +0 -0
- /package/{assets → src/assets}/icons/table-border-all.svg +0 -0
- /package/{assets → src/assets}/icons/table-border-bottom.svg +0 -0
- /package/{assets → src/assets}/icons/table-border-left.svg +0 -0
- /package/{assets → src/assets}/icons/table-border-none.svg +0 -0
- /package/{assets → src/assets}/icons/table-border-outside.svg +0 -0
- /package/{assets → src/assets}/icons/table-border-right.svg +0 -0
- /package/{assets → src/assets}/icons/table-border-top.svg +0 -0
- /package/{assets → src/assets}/icons/table-delete-cells.svg +0 -0
- /package/{assets → src/assets}/icons/table-delete-columns.svg +0 -0
- /package/{assets → src/assets}/icons/table-delete-rows.svg +0 -0
- /package/{assets → src/assets}/icons/table-insert-cells.svg +0 -0
- /package/{assets → src/assets}/icons/table-insert-columns.svg +0 -0
- /package/{assets → src/assets}/icons/table-insert-rows.svg +0 -0
- /package/{assets → src/assets}/icons/table-merge-cells.svg +0 -0
- /package/{assets → src/assets}/icons/table-unmerge-cells.svg +0 -0
- /package/{assets → src/assets}/icons/table.svg +0 -0
- /package/{assets → src/assets}/icons/underline.svg +0 -0
- /package/{assets → src/assets}/icons/undo.svg +0 -0
- /package/{assets → src/assets}/icons/video.svg +0 -0
- /package/{assets → src/assets}/snow/toolbar.styl +0 -0
- /package/{assets → src/assets}/snow/tooltip.styl +0 -0
- /package/{assets → src/assets}/snow.styl +0 -0
package/ui/icons.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
const alignLeftIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"3\" x2=\"15\" y1=\"9\" y2=\"9\"/><line class=\"ql-stroke\" x1=\"3\" x2=\"13\" y1=\"14\" y2=\"14\"/><line class=\"ql-stroke\" x1=\"3\" x2=\"9\" y1=\"4\" y2=\"4\"/></svg>";
|
|
2
|
-
const alignCenterIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"15\" x2=\"3\" y1=\"9\" y2=\"9\"/><line class=\"ql-stroke\" x1=\"14\" x2=\"4\" y1=\"14\" y2=\"14\"/><line class=\"ql-stroke\" x1=\"12\" x2=\"6\" y1=\"4\" y2=\"4\"/></svg>";
|
|
3
|
-
const alignRightIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"15\" x2=\"3\" y1=\"9\" y2=\"9\"/><line class=\"ql-stroke\" x1=\"15\" x2=\"5\" y1=\"14\" y2=\"14\"/><line class=\"ql-stroke\" x1=\"15\" x2=\"9\" y1=\"4\" y2=\"4\"/></svg>";
|
|
4
|
-
const alignJustifyIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"15\" x2=\"3\" y1=\"9\" y2=\"9\"/><line class=\"ql-stroke\" x1=\"15\" x2=\"3\" y1=\"14\" y2=\"14\"/><line class=\"ql-stroke\" x1=\"15\" x2=\"3\" y1=\"4\" y2=\"4\"/></svg>";
|
|
5
|
-
const backgroundIcon = "<svg viewbox=\"0 0 18 18\"><g class=\"ql-fill ql-color-label\"><polygon points=\"6 6.868 6 6 5 6 5 7 5.942 7 6 6.868\"/><rect height=\"1\" width=\"1\" x=\"4\" y=\"4\"/><polygon points=\"6.817 5 6 5 6 6 6.38 6 6.817 5\"/><rect height=\"1\" width=\"1\" x=\"2\" y=\"6\"/><rect height=\"1\" width=\"1\" x=\"3\" y=\"5\"/><rect height=\"1\" width=\"1\" x=\"4\" y=\"7\"/><polygon points=\"4 11.439 4 11 3 11 3 12 3.755 12 4 11.439\"/><rect height=\"1\" width=\"1\" x=\"2\" y=\"12\"/><rect height=\"1\" width=\"1\" x=\"2\" y=\"9\"/><rect height=\"1\" width=\"1\" x=\"2\" y=\"15\"/><polygon points=\"4.63 10 4 10 4 11 4.192 11 4.63 10\"/><rect height=\"1\" width=\"1\" x=\"3\" y=\"8\"/><path d=\"M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z\"/><path d=\"M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z\"/><path d=\"M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z\"/><rect height=\"1\" width=\"1\" x=\"12\" y=\"2\"/><rect height=\"1\" width=\"1\" x=\"11\" y=\"3\"/><path d=\"M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z\"/><rect height=\"1\" width=\"1\" x=\"2\" y=\"3\"/><rect height=\"1\" width=\"1\" x=\"6\" y=\"2\"/><rect height=\"1\" width=\"1\" x=\"3\" y=\"2\"/><rect height=\"1\" width=\"1\" x=\"5\" y=\"3\"/><rect height=\"1\" width=\"1\" x=\"9\" y=\"2\"/><rect height=\"1\" width=\"1\" x=\"15\" y=\"14\"/><polygon points=\"13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174\"/><rect height=\"1\" width=\"1\" x=\"13\" y=\"7\"/><rect height=\"1\" width=\"1\" x=\"15\" y=\"5\"/><rect height=\"1\" width=\"1\" x=\"14\" y=\"6\"/><rect height=\"1\" width=\"1\" x=\"15\" y=\"8\"/><rect height=\"1\" width=\"1\" x=\"14\" y=\"9\"/><path d=\"M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z\"/><rect height=\"1\" width=\"1\" x=\"14\" y=\"3\"/><polygon points=\"12 6.868 12 6 11.62 6 12 6.868\"/><rect height=\"1\" width=\"1\" x=\"15\" y=\"2\"/><rect height=\"1\" width=\"1\" x=\"12\" y=\"5\"/><rect height=\"1\" width=\"1\" x=\"13\" y=\"4\"/><polygon points=\"12.933 9 13 9 13 8 12.495 8 12.933 9\"/><rect height=\"1\" width=\"1\" x=\"9\" y=\"14\"/><rect height=\"1\" width=\"1\" x=\"8\" y=\"15\"/><path d=\"M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z\"/><rect height=\"1\" width=\"1\" x=\"5\" y=\"15\"/><path d=\"M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z\"/><rect height=\"1\" width=\"1\" x=\"11\" y=\"15\"/><path d=\"M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z\"/><rect height=\"1\" width=\"1\" x=\"14\" y=\"15\"/><rect height=\"1\" width=\"1\" x=\"15\" y=\"11\"/></g><polyline class=\"ql-stroke\" points=\"5.5 13 9 5 12.5 13\"/><line class=\"ql-stroke\" x1=\"11.63\" x2=\"6.38\" y1=\"11\" y2=\"11\"/></svg>";
|
|
6
|
-
const blockquoteIcon = "<svg viewbox=\"0 0 18 18\"><rect class=\"ql-fill ql-stroke\" height=\"3\" width=\"3\" x=\"4\" y=\"5\"/><rect class=\"ql-fill ql-stroke\" height=\"3\" width=\"3\" x=\"11\" y=\"5\"/><path class=\"ql-even ql-fill ql-stroke\" d=\"M7,8c0,4.031-3,5-3,5\"/><path class=\"ql-even ql-fill ql-stroke\" d=\"M14,8c0,4.031-3,5-3,5\"/></svg>";
|
|
7
|
-
const boldIcon = "<svg viewbox=\"0 0 18 18\"><path class=\"ql-stroke\" d=\"M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z\"/><path class=\"ql-stroke\" d=\"M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z\"/></svg>";
|
|
8
|
-
const cleanIcon = "<svg class=\"\" viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"5\" x2=\"13\" y1=\"3\" y2=\"3\"/><line class=\"ql-stroke\" x1=\"6\" x2=\"9.35\" y1=\"12\" y2=\"3\"/><line class=\"ql-stroke\" x1=\"11\" x2=\"15\" y1=\"11\" y2=\"15\"/><line class=\"ql-stroke\" x1=\"15\" x2=\"11\" y1=\"11\" y2=\"15\"/><rect class=\"ql-fill\" height=\"1\" rx=\"0.5\" ry=\"0.5\" width=\"7\" x=\"2\" y=\"14\"/></svg>";
|
|
9
|
-
const codeIcon = "<svg viewbox=\"0 0 18 18\"><polyline class=\"ql-even ql-stroke\" points=\"5 7 3 9 5 11\"/><polyline class=\"ql-even ql-stroke\" points=\"13 7 15 9 13 11\"/><line class=\"ql-stroke\" x1=\"10\" x2=\"8\" y1=\"5\" y2=\"13\"/></svg>";
|
|
10
|
-
const colorIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-color-label ql-stroke ql-transparent\" x1=\"3\" x2=\"15\" y1=\"15\" y2=\"15\"/><polyline class=\"ql-stroke\" points=\"5.5 11 9 3 12.5 11\"/><line class=\"ql-stroke\" x1=\"11.63\" x2=\"6.38\" y1=\"9\" y2=\"9\"/></svg>";
|
|
11
|
-
const directionLeftToRightIcon = "<svg viewbox=\"0 0 18 18\"><polygon class=\"ql-stroke ql-fill\" points=\"3 11 5 9 3 7 3 11\"/><line class=\"ql-stroke ql-fill\" x1=\"15\" x2=\"11\" y1=\"4\" y2=\"4\"/><path class=\"ql-fill\" d=\"M11,3a3,3,0,0,0,0,6h1V3H11Z\"/><rect class=\"ql-fill\" height=\"11\" width=\"1\" x=\"11\" y=\"4\"/><rect class=\"ql-fill\" height=\"11\" width=\"1\" x=\"13\" y=\"4\"/></svg>";
|
|
12
|
-
const directionRightToLeftIcon = "<svg viewbox=\"0 0 18 18\"><polygon class=\"ql-stroke ql-fill\" points=\"15 12 13 10 15 8 15 12\"/><line class=\"ql-stroke ql-fill\" x1=\"9\" x2=\"5\" y1=\"4\" y2=\"4\"/><path class=\"ql-fill\" d=\"M5,3A3,3,0,0,0,5,9H6V3H5Z\"/><rect class=\"ql-fill\" height=\"11\" width=\"1\" x=\"5\" y=\"4\"/><rect class=\"ql-fill\" height=\"11\" width=\"1\" x=\"7\" y=\"4\"/></svg>";
|
|
13
|
-
const formulaIcon = "<svg viewbox=\"0 0 18 18\"><path class=\"ql-fill\" d=\"M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z\"/><rect class=\"ql-fill\" height=\"1.6\" rx=\"0.8\" ry=\"0.8\" width=\"5\" x=\"5.15\" y=\"6.2\"/><path class=\"ql-fill\" d=\"M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z\"/></svg>";
|
|
14
|
-
const headerIcon = "<svg viewBox=\"0 0 18 18\"><path class=\"ql-fill\" d=\"M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z\"/></svg>";
|
|
15
|
-
const header2Icon = "<svg viewBox=\"0 0 18 18\"><path class=\"ql-fill\" d=\"M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z\"/></svg>";
|
|
16
|
-
const header3Icon = "<svg viewBox=\"0 0 18 18\"><path class=\"ql-fill\" d=\"M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z\"/></svg>";
|
|
17
|
-
const header4Icon = "<svg viewBox=\"0 0 18 18\"><path class=\"ql-fill\" d=\"M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z\"/></svg>";
|
|
18
|
-
const header5Icon = "<svg viewBox=\"0 0 18 18\"><path class=\"ql-fill\" d=\"M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z\"/></svg>";
|
|
19
|
-
const header6Icon = "<svg viewBox=\"0 0 18 18\"><path class=\"ql-fill\" d=\"M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z\"/></svg>";
|
|
20
|
-
const italicIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"7\" x2=\"13\" y1=\"4\" y2=\"4\"/><line class=\"ql-stroke\" x1=\"5\" x2=\"11\" y1=\"14\" y2=\"14\"/><line class=\"ql-stroke\" x1=\"8\" x2=\"10\" y1=\"14\" y2=\"4\"/></svg>";
|
|
21
|
-
const imageIcon = "<svg viewbox=\"0 0 18 18\"><rect class=\"ql-stroke\" height=\"10\" width=\"12\" x=\"3\" y=\"4\"/><circle class=\"ql-fill\" cx=\"6\" cy=\"7\" r=\"1\"/><polyline class=\"ql-even ql-fill\" points=\"5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12\"/></svg>";
|
|
22
|
-
const indentIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"3\" x2=\"15\" y1=\"14\" y2=\"14\"/><line class=\"ql-stroke\" x1=\"3\" x2=\"15\" y1=\"4\" y2=\"4\"/><line class=\"ql-stroke\" x1=\"9\" x2=\"15\" y1=\"9\" y2=\"9\"/><polyline class=\"ql-fill ql-stroke\" points=\"3 7 3 11 5 9 3 7\"/></svg>";
|
|
23
|
-
const outdentIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"3\" x2=\"15\" y1=\"14\" y2=\"14\"/><line class=\"ql-stroke\" x1=\"3\" x2=\"15\" y1=\"4\" y2=\"4\"/><line class=\"ql-stroke\" x1=\"9\" x2=\"15\" y1=\"9\" y2=\"9\"/><polyline class=\"ql-stroke\" points=\"5 7 5 11 3 9 5 7\"/></svg>";
|
|
24
|
-
const linkIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"7\" x2=\"11\" y1=\"7\" y2=\"11\"/><path class=\"ql-even ql-stroke\" d=\"M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z\"/><path class=\"ql-even ql-stroke\" d=\"M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z\"/></svg>";
|
|
25
|
-
const listBulletIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"6\" x2=\"15\" y1=\"4\" y2=\"4\"/><line class=\"ql-stroke\" x1=\"6\" x2=\"15\" y1=\"9\" y2=\"9\"/><line class=\"ql-stroke\" x1=\"6\" x2=\"15\" y1=\"14\" y2=\"14\"/><line class=\"ql-stroke\" x1=\"3\" x2=\"3\" y1=\"4\" y2=\"4\"/><line class=\"ql-stroke\" x1=\"3\" x2=\"3\" y1=\"9\" y2=\"9\"/><line class=\"ql-stroke\" x1=\"3\" x2=\"3\" y1=\"14\" y2=\"14\"/></svg>";
|
|
26
|
-
const listCheckIcon = "<svg class=\"\" viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"9\" x2=\"15\" y1=\"4\" y2=\"4\"/><polyline class=\"ql-stroke\" points=\"3 4 4 5 6 3\"/><line class=\"ql-stroke\" x1=\"9\" x2=\"15\" y1=\"14\" y2=\"14\"/><polyline class=\"ql-stroke\" points=\"3 14 4 15 6 13\"/><line class=\"ql-stroke\" x1=\"9\" x2=\"15\" y1=\"9\" y2=\"9\"/><polyline class=\"ql-stroke\" points=\"3 9 4 10 6 8\"/></svg>";
|
|
27
|
-
const listOrderedIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"7\" x2=\"15\" y1=\"4\" y2=\"4\"/><line class=\"ql-stroke\" x1=\"7\" x2=\"15\" y1=\"9\" y2=\"9\"/><line class=\"ql-stroke\" x1=\"7\" x2=\"15\" y1=\"14\" y2=\"14\"/><line class=\"ql-stroke ql-thin\" x1=\"2.5\" x2=\"4.5\" y1=\"5.5\" y2=\"5.5\"/><path class=\"ql-fill\" d=\"M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z\"/><path class=\"ql-stroke ql-thin\" d=\"M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156\"/><path class=\"ql-stroke ql-thin\" d=\"M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109\"/></svg>";
|
|
28
|
-
const subscriptIcon = "<svg viewbox=\"0 0 18 18\"><path class=\"ql-fill\" d=\"M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z\"/><path class=\"ql-fill\" d=\"M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z\"/></svg>";
|
|
29
|
-
const superscriptIcon = "<svg viewbox=\"0 0 18 18\"><path class=\"ql-fill\" d=\"M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z\"/><path class=\"ql-fill\" d=\"M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z\"/></svg>";
|
|
30
|
-
const strikeIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke ql-thin\" x1=\"15.5\" x2=\"2.5\" y1=\"8.5\" y2=\"9.5\"/><path class=\"ql-fill\" d=\"M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z\"/><path class=\"ql-fill\" d=\"M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z\"/></svg>";
|
|
31
|
-
const tableIcon = "<svg viewbox=\"0 0 18 18\"><rect class=\"ql-stroke\" height=\"12\" width=\"12\" x=\"3\" y=\"3\"/><rect class=\"ql-fill\" height=\"2\" width=\"3\" x=\"5\" y=\"5\"/><rect class=\"ql-fill\" height=\"2\" width=\"4\" x=\"9\" y=\"5\"/><g class=\"ql-fill ql-transparent\"><rect height=\"2\" width=\"3\" x=\"5\" y=\"8\"/><rect height=\"2\" width=\"4\" x=\"9\" y=\"8\"/><rect height=\"2\" width=\"3\" x=\"5\" y=\"11\"/><rect height=\"2\" width=\"4\" x=\"9\" y=\"11\"/></g></svg>";
|
|
32
|
-
const underlineIcon = "<svg viewbox=\"0 0 18 18\"><path class=\"ql-stroke\" d=\"M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3\"/><rect class=\"ql-fill\" height=\"1\" rx=\"0.5\" ry=\"0.5\" width=\"12\" x=\"3\" y=\"15\"/></svg>";
|
|
33
|
-
const videoIcon = "<svg viewbox=\"0 0 18 18\"><rect class=\"ql-stroke\" height=\"12\" width=\"12\" x=\"3\" y=\"3\"/><rect class=\"ql-fill\" height=\"12\" width=\"1\" x=\"5\" y=\"3\"/><rect class=\"ql-fill\" height=\"12\" width=\"1\" x=\"12\" y=\"3\"/><rect class=\"ql-fill\" height=\"2\" width=\"8\" x=\"5\" y=\"8\"/><rect class=\"ql-fill\" height=\"1\" width=\"3\" x=\"3\" y=\"5\"/><rect class=\"ql-fill\" height=\"1\" width=\"3\" x=\"3\" y=\"7\"/><rect class=\"ql-fill\" height=\"1\" width=\"3\" x=\"3\" y=\"10\"/><rect class=\"ql-fill\" height=\"1\" width=\"3\" x=\"3\" y=\"12\"/><rect class=\"ql-fill\" height=\"1\" width=\"3\" x=\"12\" y=\"5\"/><rect class=\"ql-fill\" height=\"1\" width=\"3\" x=\"12\" y=\"7\"/><rect class=\"ql-fill\" height=\"1\" width=\"3\" x=\"12\" y=\"10\"/><rect class=\"ql-fill\" height=\"1\" width=\"3\" x=\"12\" y=\"12\"/></svg>";
|
|
34
|
-
export default {
|
|
35
|
-
align: {
|
|
36
|
-
'': alignLeftIcon,
|
|
37
|
-
center: alignCenterIcon,
|
|
38
|
-
right: alignRightIcon,
|
|
39
|
-
justify: alignJustifyIcon
|
|
40
|
-
},
|
|
41
|
-
background: backgroundIcon,
|
|
42
|
-
blockquote: blockquoteIcon,
|
|
43
|
-
bold: boldIcon,
|
|
44
|
-
clean: cleanIcon,
|
|
45
|
-
code: codeIcon,
|
|
46
|
-
'code-block': codeIcon,
|
|
47
|
-
color: colorIcon,
|
|
48
|
-
direction: {
|
|
49
|
-
'': directionLeftToRightIcon,
|
|
50
|
-
rtl: directionRightToLeftIcon
|
|
51
|
-
},
|
|
52
|
-
formula: formulaIcon,
|
|
53
|
-
header: {
|
|
54
|
-
'1': headerIcon,
|
|
55
|
-
'2': header2Icon,
|
|
56
|
-
'3': header3Icon,
|
|
57
|
-
'4': header4Icon,
|
|
58
|
-
'5': header5Icon,
|
|
59
|
-
'6': header6Icon
|
|
60
|
-
},
|
|
61
|
-
italic: italicIcon,
|
|
62
|
-
image: imageIcon,
|
|
63
|
-
indent: {
|
|
64
|
-
'+1': indentIcon,
|
|
65
|
-
'-1': outdentIcon
|
|
66
|
-
},
|
|
67
|
-
link: linkIcon,
|
|
68
|
-
list: {
|
|
69
|
-
bullet: listBulletIcon,
|
|
70
|
-
check: listCheckIcon,
|
|
71
|
-
ordered: listOrderedIcon
|
|
72
|
-
},
|
|
73
|
-
script: {
|
|
74
|
-
sub: subscriptIcon,
|
|
75
|
-
super: superscriptIcon
|
|
76
|
-
},
|
|
77
|
-
strike: strikeIcon,
|
|
78
|
-
table: tableIcon,
|
|
79
|
-
underline: underlineIcon,
|
|
80
|
-
video: videoIcon
|
|
81
|
-
};
|
|
82
|
-
//# sourceMappingURL=icons.js.map
|
package/ui/icons.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icons.js","names":["align","alignLeftIcon","center","alignCenterIcon","right","alignRightIcon","justify","alignJustifyIcon","background","backgroundIcon","blockquote","blockquoteIcon","bold","boldIcon","clean","cleanIcon","code","codeIcon","color","colorIcon","direction","directionLeftToRightIcon","rtl","directionRightToLeftIcon","formula","formulaIcon","header","headerIcon","header2Icon","header3Icon","header4Icon","header5Icon","header6Icon","italic","italicIcon","image","imageIcon","indent","indentIcon","outdentIcon","link","linkIcon","list","bullet","listBulletIcon","check","listCheckIcon","ordered","listOrderedIcon","script","sub","subscriptIcon","super","superscriptIcon","strike","strikeIcon","table","tableIcon","underline","underlineIcon","video","videoIcon"],"sources":["../../src/ui/icons.ts"],"sourcesContent":["import alignLeftIcon from '../assets/icons/align-left.svg';\nimport alignCenterIcon from '../assets/icons/align-center.svg';\nimport alignRightIcon from '../assets/icons/align-right.svg';\nimport alignJustifyIcon from '../assets/icons/align-justify.svg';\nimport backgroundIcon from '../assets/icons/background.svg';\nimport blockquoteIcon from '../assets/icons/blockquote.svg';\nimport boldIcon from '../assets/icons/bold.svg';\nimport cleanIcon from '../assets/icons/clean.svg';\nimport codeIcon from '../assets/icons/code.svg';\nimport colorIcon from '../assets/icons/color.svg';\nimport directionLeftToRightIcon from '../assets/icons/direction-ltr.svg';\nimport directionRightToLeftIcon from '../assets/icons/direction-rtl.svg';\nimport formulaIcon from '../assets/icons/formula.svg';\nimport headerIcon from '../assets/icons/header.svg';\nimport header2Icon from '../assets/icons/header-2.svg';\nimport header3Icon from '../assets/icons/header-3.svg';\nimport header4Icon from '../assets/icons/header-4.svg';\nimport header5Icon from '../assets/icons/header-5.svg';\nimport header6Icon from '../assets/icons/header-6.svg';\nimport italicIcon from '../assets/icons/italic.svg';\nimport imageIcon from '../assets/icons/image.svg';\nimport indentIcon from '../assets/icons/indent.svg';\nimport outdentIcon from '../assets/icons/outdent.svg';\nimport linkIcon from '../assets/icons/link.svg';\nimport listBulletIcon from '../assets/icons/list-bullet.svg';\nimport listCheckIcon from '../assets/icons/list-check.svg';\nimport listOrderedIcon from '../assets/icons/list-ordered.svg';\nimport subscriptIcon from '../assets/icons/subscript.svg';\nimport superscriptIcon from '../assets/icons/superscript.svg';\nimport strikeIcon from '../assets/icons/strike.svg';\nimport tableIcon from '../assets/icons/table.svg';\nimport underlineIcon from '../assets/icons/underline.svg';\nimport videoIcon from '../assets/icons/video.svg';\n\nexport default {\n align: {\n '': alignLeftIcon,\n center: alignCenterIcon,\n right: alignRightIcon,\n justify: alignJustifyIcon,\n },\n background: backgroundIcon,\n blockquote: blockquoteIcon,\n bold: boldIcon,\n clean: cleanIcon,\n code: codeIcon,\n 'code-block': codeIcon,\n color: colorIcon,\n direction: {\n '': directionLeftToRightIcon,\n rtl: directionRightToLeftIcon,\n },\n formula: formulaIcon,\n header: {\n '1': headerIcon,\n '2': header2Icon,\n '3': header3Icon,\n '4': header4Icon,\n '5': header5Icon,\n '6': header6Icon,\n },\n italic: italicIcon,\n image: imageIcon,\n indent: {\n '+1': indentIcon,\n '-1': outdentIcon,\n },\n link: linkIcon,\n list: {\n bullet: listBulletIcon,\n check: listCheckIcon,\n ordered: listOrderedIcon,\n },\n script: {\n sub: subscriptIcon,\n super: superscriptIcon,\n },\n strike: strikeIcon,\n table: tableIcon,\n underline: underlineIcon,\n video: videoIcon,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,eAAe;EACbA,KAAK,EAAE;IACL,EAAE,EAAEC,aAAa;IACjBC,MAAM,EAAEC,eAAe;IACvBC,KAAK,EAAEC,cAAc;IACrBC,OAAO,EAAEC;EACX,CAAC;EACDC,UAAU,EAAEC,cAAc;EAC1BC,UAAU,EAAEC,cAAc;EAC1BC,IAAI,EAAEC,QAAQ;EACdC,KAAK,EAAEC,SAAS;EAChBC,IAAI,EAAEC,QAAQ;EACd,YAAY,EAAEA,QAAQ;EACtBC,KAAK,EAAEC,SAAS;EAChBC,SAAS,EAAE;IACT,EAAE,EAAEC,wBAAwB;IAC5BC,GAAG,EAAEC;EACP,CAAC;EACDC,OAAO,EAAEC,WAAW;EACpBC,MAAM,EAAE;IACN,GAAG,EAAEC,UAAU;IACf,GAAG,EAAEC,WAAW;IAChB,GAAG,EAAEC,WAAW;IAChB,GAAG,EAAEC,WAAW;IAChB,GAAG,EAAEC,WAAW;IAChB,GAAG,EAAEC;EACP,CAAC;EACDC,MAAM,EAAEC,UAAU;EAClBC,KAAK,EAAEC,SAAS;EAChBC,MAAM,EAAE;IACN,IAAI,EAAEC,UAAU;IAChB,IAAI,EAAEC;EACR,CAAC;EACDC,IAAI,EAAEC,QAAQ;EACdC,IAAI,EAAE;IACJC,MAAM,EAAEC,cAAc;IACtBC,KAAK,EAAEC,aAAa;IACpBC,OAAO,EAAEC;EACX,CAAC;EACDC,MAAM,EAAE;IACNC,GAAG,EAAEC,aAAa;IAClBC,KAAK,EAAEC;EACT,CAAC;EACDC,MAAM,EAAEC,UAAU;EAClBC,KAAK,EAAEC,SAAS;EAChBC,SAAS,EAAEC,aAAa;EACxBC,KAAK,EAAEC;AACT,CAAC","ignoreList":[]}
|
package/ui/picker.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare class Picker {
|
|
2
|
-
select: HTMLSelectElement;
|
|
3
|
-
container: HTMLElement;
|
|
4
|
-
label: HTMLElement;
|
|
5
|
-
constructor(select: HTMLSelectElement);
|
|
6
|
-
togglePicker(): void;
|
|
7
|
-
buildItem(option: HTMLOptionElement): HTMLSpanElement;
|
|
8
|
-
buildLabel(): HTMLSpanElement;
|
|
9
|
-
buildOptions(): void;
|
|
10
|
-
buildPicker(): void;
|
|
11
|
-
escape(): void;
|
|
12
|
-
close(): void;
|
|
13
|
-
selectItem(item: HTMLElement | null, trigger?: boolean): void;
|
|
14
|
-
update(): void;
|
|
15
|
-
}
|
|
16
|
-
export default Picker;
|
package/ui/picker.js
DELETED
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
const DropdownIcon = "<svg viewbox=\"0 0 18 18\"><polygon class=\"ql-stroke\" points=\"7 11 9 13 11 11 7 11\"/><polygon class=\"ql-stroke\" points=\"7 7 9 5 11 7 7 7\"/></svg>";
|
|
2
|
-
let optionsCounter = 0;
|
|
3
|
-
function toggleAriaAttribute(element, attribute) {
|
|
4
|
-
element.setAttribute(attribute, `${!(element.getAttribute(attribute) === 'true')}`);
|
|
5
|
-
}
|
|
6
|
-
class Picker {
|
|
7
|
-
constructor(select) {
|
|
8
|
-
this.select = select;
|
|
9
|
-
this.container = document.createElement('span');
|
|
10
|
-
this.buildPicker();
|
|
11
|
-
this.select.style.display = 'none';
|
|
12
|
-
// @ts-expect-error Fix me later
|
|
13
|
-
this.select.parentNode.insertBefore(this.container, this.select);
|
|
14
|
-
this.label.addEventListener('mousedown', () => {
|
|
15
|
-
this.togglePicker();
|
|
16
|
-
});
|
|
17
|
-
this.label.addEventListener('keydown', event => {
|
|
18
|
-
switch (event.key) {
|
|
19
|
-
case 'Enter':
|
|
20
|
-
this.togglePicker();
|
|
21
|
-
break;
|
|
22
|
-
case 'Escape':
|
|
23
|
-
this.escape();
|
|
24
|
-
event.preventDefault();
|
|
25
|
-
break;
|
|
26
|
-
default:
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
this.select.addEventListener('change', this.update.bind(this));
|
|
30
|
-
}
|
|
31
|
-
togglePicker() {
|
|
32
|
-
this.container.classList.toggle('ql-expanded');
|
|
33
|
-
// Toggle aria-expanded and aria-hidden to make the picker accessible
|
|
34
|
-
toggleAriaAttribute(this.label, 'aria-expanded');
|
|
35
|
-
// @ts-expect-error
|
|
36
|
-
toggleAriaAttribute(this.options, 'aria-hidden');
|
|
37
|
-
}
|
|
38
|
-
buildItem(option) {
|
|
39
|
-
const item = document.createElement('span');
|
|
40
|
-
// @ts-expect-error
|
|
41
|
-
item.tabIndex = '0';
|
|
42
|
-
item.setAttribute('role', 'button');
|
|
43
|
-
item.classList.add('ql-picker-item');
|
|
44
|
-
const value = option.getAttribute('value');
|
|
45
|
-
if (value) {
|
|
46
|
-
item.setAttribute('data-value', value);
|
|
47
|
-
}
|
|
48
|
-
if (option.textContent) {
|
|
49
|
-
item.setAttribute('data-label', option.textContent);
|
|
50
|
-
}
|
|
51
|
-
item.addEventListener('click', () => {
|
|
52
|
-
this.selectItem(item, true);
|
|
53
|
-
});
|
|
54
|
-
item.addEventListener('keydown', event => {
|
|
55
|
-
switch (event.key) {
|
|
56
|
-
case 'Enter':
|
|
57
|
-
this.selectItem(item, true);
|
|
58
|
-
event.preventDefault();
|
|
59
|
-
break;
|
|
60
|
-
case 'Escape':
|
|
61
|
-
this.escape();
|
|
62
|
-
event.preventDefault();
|
|
63
|
-
break;
|
|
64
|
-
default:
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
return item;
|
|
68
|
-
}
|
|
69
|
-
buildLabel() {
|
|
70
|
-
const label = document.createElement('span');
|
|
71
|
-
label.classList.add('ql-picker-label');
|
|
72
|
-
label.innerHTML = DropdownIcon;
|
|
73
|
-
// @ts-expect-error
|
|
74
|
-
label.tabIndex = '0';
|
|
75
|
-
label.setAttribute('role', 'button');
|
|
76
|
-
label.setAttribute('aria-expanded', 'false');
|
|
77
|
-
this.container.appendChild(label);
|
|
78
|
-
return label;
|
|
79
|
-
}
|
|
80
|
-
buildOptions() {
|
|
81
|
-
const options = document.createElement('span');
|
|
82
|
-
options.classList.add('ql-picker-options');
|
|
83
|
-
|
|
84
|
-
// Don't want screen readers to read this until options are visible
|
|
85
|
-
options.setAttribute('aria-hidden', 'true');
|
|
86
|
-
// @ts-expect-error
|
|
87
|
-
options.tabIndex = '-1';
|
|
88
|
-
|
|
89
|
-
// Need a unique id for aria-controls
|
|
90
|
-
options.id = `ql-picker-options-${optionsCounter}`;
|
|
91
|
-
optionsCounter += 1;
|
|
92
|
-
this.label.setAttribute('aria-controls', options.id);
|
|
93
|
-
|
|
94
|
-
// @ts-expect-error
|
|
95
|
-
this.options = options;
|
|
96
|
-
Array.from(this.select.options).forEach(option => {
|
|
97
|
-
const item = this.buildItem(option);
|
|
98
|
-
options.appendChild(item);
|
|
99
|
-
if (option.selected === true) {
|
|
100
|
-
this.selectItem(item);
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
this.container.appendChild(options);
|
|
104
|
-
}
|
|
105
|
-
buildPicker() {
|
|
106
|
-
Array.from(this.select.attributes).forEach(item => {
|
|
107
|
-
this.container.setAttribute(item.name, item.value);
|
|
108
|
-
});
|
|
109
|
-
this.container.classList.add('ql-picker');
|
|
110
|
-
this.label = this.buildLabel();
|
|
111
|
-
this.buildOptions();
|
|
112
|
-
}
|
|
113
|
-
escape() {
|
|
114
|
-
// Close menu and return focus to trigger label
|
|
115
|
-
this.close();
|
|
116
|
-
// Need setTimeout for accessibility to ensure that the browser executes
|
|
117
|
-
// focus on the next process thread and after any DOM content changes
|
|
118
|
-
setTimeout(() => this.label.focus(), 1);
|
|
119
|
-
}
|
|
120
|
-
close() {
|
|
121
|
-
this.container.classList.remove('ql-expanded');
|
|
122
|
-
this.label.setAttribute('aria-expanded', 'false');
|
|
123
|
-
// @ts-expect-error
|
|
124
|
-
this.options.setAttribute('aria-hidden', 'true');
|
|
125
|
-
}
|
|
126
|
-
selectItem(item) {
|
|
127
|
-
let trigger = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
128
|
-
const selected = this.container.querySelector('.ql-selected');
|
|
129
|
-
if (item === selected) return;
|
|
130
|
-
if (selected != null) {
|
|
131
|
-
selected.classList.remove('ql-selected');
|
|
132
|
-
}
|
|
133
|
-
if (item == null) return;
|
|
134
|
-
item.classList.add('ql-selected');
|
|
135
|
-
// @ts-expect-error Fix me later
|
|
136
|
-
this.select.selectedIndex = Array.from(item.parentNode.children).indexOf(item);
|
|
137
|
-
if (item.hasAttribute('data-value')) {
|
|
138
|
-
// @ts-expect-error Fix me later
|
|
139
|
-
this.label.setAttribute('data-value', item.getAttribute('data-value'));
|
|
140
|
-
} else {
|
|
141
|
-
this.label.removeAttribute('data-value');
|
|
142
|
-
}
|
|
143
|
-
if (item.hasAttribute('data-label')) {
|
|
144
|
-
// @ts-expect-error Fix me later
|
|
145
|
-
this.label.setAttribute('data-label', item.getAttribute('data-label'));
|
|
146
|
-
} else {
|
|
147
|
-
this.label.removeAttribute('data-label');
|
|
148
|
-
}
|
|
149
|
-
if (trigger) {
|
|
150
|
-
this.select.dispatchEvent(new Event('change'));
|
|
151
|
-
this.close();
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
update() {
|
|
155
|
-
let option;
|
|
156
|
-
if (this.select.selectedIndex > -1) {
|
|
157
|
-
const item =
|
|
158
|
-
// @ts-expect-error Fix me later
|
|
159
|
-
this.container.querySelector('.ql-picker-options').children[this.select.selectedIndex];
|
|
160
|
-
option = this.select.options[this.select.selectedIndex];
|
|
161
|
-
// @ts-expect-error
|
|
162
|
-
this.selectItem(item);
|
|
163
|
-
} else {
|
|
164
|
-
this.selectItem(null);
|
|
165
|
-
}
|
|
166
|
-
const isActive = option != null && option !== this.select.querySelector('option[selected]');
|
|
167
|
-
this.label.classList.toggle('ql-active', isActive);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
export default Picker;
|
|
171
|
-
//# sourceMappingURL=picker.js.map
|
package/ui/picker.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"picker.js","names":["optionsCounter","toggleAriaAttribute","element","attribute","setAttribute","getAttribute","Picker","constructor","select","container","document","createElement","buildPicker","style","display","parentNode","insertBefore","label","addEventListener","togglePicker","event","key","escape","preventDefault","update","bind","classList","toggle","options","buildItem","option","item","tabIndex","add","value","textContent","selectItem","buildLabel","innerHTML","DropdownIcon","appendChild","buildOptions","id","Array","from","forEach","selected","attributes","name","close","setTimeout","focus","remove","trigger","arguments","length","undefined","querySelector","selectedIndex","children","indexOf","hasAttribute","removeAttribute","dispatchEvent","Event","isActive"],"sources":["../../src/ui/picker.ts"],"sourcesContent":["import DropdownIcon from '../assets/icons/dropdown.svg';\n\nlet optionsCounter = 0;\n\nfunction toggleAriaAttribute(element: HTMLElement, attribute: string) {\n element.setAttribute(\n attribute,\n `${!(element.getAttribute(attribute) === 'true')}`,\n );\n}\n\nclass Picker {\n select: HTMLSelectElement;\n container: HTMLElement;\n label: HTMLElement;\n\n constructor(select: HTMLSelectElement) {\n this.select = select;\n this.container = document.createElement('span');\n this.buildPicker();\n this.select.style.display = 'none';\n // @ts-expect-error Fix me later\n this.select.parentNode.insertBefore(this.container, this.select);\n\n this.label.addEventListener('mousedown', () => {\n this.togglePicker();\n });\n this.label.addEventListener('keydown', (event) => {\n switch (event.key) {\n case 'Enter':\n this.togglePicker();\n break;\n case 'Escape':\n this.escape();\n event.preventDefault();\n break;\n default:\n }\n });\n this.select.addEventListener('change', this.update.bind(this));\n }\n\n togglePicker() {\n this.container.classList.toggle('ql-expanded');\n // Toggle aria-expanded and aria-hidden to make the picker accessible\n toggleAriaAttribute(this.label, 'aria-expanded');\n // @ts-expect-error\n toggleAriaAttribute(this.options, 'aria-hidden');\n }\n\n buildItem(option: HTMLOptionElement) {\n const item = document.createElement('span');\n // @ts-expect-error\n item.tabIndex = '0';\n item.setAttribute('role', 'button');\n item.classList.add('ql-picker-item');\n const value = option.getAttribute('value');\n if (value) {\n item.setAttribute('data-value', value);\n }\n if (option.textContent) {\n item.setAttribute('data-label', option.textContent);\n }\n item.addEventListener('click', () => {\n this.selectItem(item, true);\n });\n item.addEventListener('keydown', (event) => {\n switch (event.key) {\n case 'Enter':\n this.selectItem(item, true);\n event.preventDefault();\n break;\n case 'Escape':\n this.escape();\n event.preventDefault();\n break;\n default:\n }\n });\n\n return item;\n }\n\n buildLabel() {\n const label = document.createElement('span');\n label.classList.add('ql-picker-label');\n label.innerHTML = DropdownIcon;\n // @ts-expect-error\n label.tabIndex = '0';\n label.setAttribute('role', 'button');\n label.setAttribute('aria-expanded', 'false');\n this.container.appendChild(label);\n return label;\n }\n\n buildOptions() {\n const options = document.createElement('span');\n options.classList.add('ql-picker-options');\n\n // Don't want screen readers to read this until options are visible\n options.setAttribute('aria-hidden', 'true');\n // @ts-expect-error\n options.tabIndex = '-1';\n\n // Need a unique id for aria-controls\n options.id = `ql-picker-options-${optionsCounter}`;\n optionsCounter += 1;\n this.label.setAttribute('aria-controls', options.id);\n\n // @ts-expect-error\n this.options = options;\n\n Array.from(this.select.options).forEach((option) => {\n const item = this.buildItem(option);\n options.appendChild(item);\n if (option.selected === true) {\n this.selectItem(item);\n }\n });\n this.container.appendChild(options);\n }\n\n buildPicker() {\n Array.from(this.select.attributes).forEach((item) => {\n this.container.setAttribute(item.name, item.value);\n });\n this.container.classList.add('ql-picker');\n this.label = this.buildLabel();\n this.buildOptions();\n }\n\n escape() {\n // Close menu and return focus to trigger label\n this.close();\n // Need setTimeout for accessibility to ensure that the browser executes\n // focus on the next process thread and after any DOM content changes\n setTimeout(() => this.label.focus(), 1);\n }\n\n close() {\n this.container.classList.remove('ql-expanded');\n this.label.setAttribute('aria-expanded', 'false');\n // @ts-expect-error\n this.options.setAttribute('aria-hidden', 'true');\n }\n\n selectItem(item: HTMLElement | null, trigger = false) {\n const selected = this.container.querySelector('.ql-selected');\n if (item === selected) return;\n if (selected != null) {\n selected.classList.remove('ql-selected');\n }\n if (item == null) return;\n item.classList.add('ql-selected');\n // @ts-expect-error Fix me later\n this.select.selectedIndex = Array.from(item.parentNode.children).indexOf(\n item,\n );\n if (item.hasAttribute('data-value')) {\n // @ts-expect-error Fix me later\n this.label.setAttribute('data-value', item.getAttribute('data-value'));\n } else {\n this.label.removeAttribute('data-value');\n }\n if (item.hasAttribute('data-label')) {\n // @ts-expect-error Fix me later\n this.label.setAttribute('data-label', item.getAttribute('data-label'));\n } else {\n this.label.removeAttribute('data-label');\n }\n if (trigger) {\n this.select.dispatchEvent(new Event('change'));\n this.close();\n }\n }\n\n update() {\n let option;\n if (this.select.selectedIndex > -1) {\n const item =\n // @ts-expect-error Fix me later\n this.container.querySelector('.ql-picker-options').children[\n this.select.selectedIndex\n ];\n option = this.select.options[this.select.selectedIndex];\n // @ts-expect-error\n this.selectItem(item);\n } else {\n this.selectItem(null);\n }\n const isActive =\n option != null &&\n option !== this.select.querySelector('option[selected]');\n this.label.classList.toggle('ql-active', isActive);\n }\n}\n\nexport default Picker;\n"],"mappings":";AAEA,IAAIA,cAAc,GAAG,CAAC;AAEtB,SAASC,mBAAmBA,CAACC,OAAoB,EAAEC,SAAiB,EAAE;EACpED,OAAO,CAACE,YAAY,CAClBD,SAAS,EACR,GAAE,EAAED,OAAO,CAACG,YAAY,CAACF,SAAS,CAAC,KAAK,MAAM,CAAE,EACnD,CAAC;AACH;AAEA,MAAMG,MAAM,CAAC;EAKXC,WAAWA,CAACC,MAAyB,EAAE;IACrC,IAAI,CAACA,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACC,SAAS,GAAGC,QAAQ,CAACC,aAAa,CAAC,MAAM,CAAC;IAC/C,IAAI,CAACC,WAAW,CAAC,CAAC;IAClB,IAAI,CAACJ,MAAM,CAACK,KAAK,CAACC,OAAO,GAAG,MAAM;IAClC;IACA,IAAI,CAACN,MAAM,CAACO,UAAU,CAACC,YAAY,CAAC,IAAI,CAACP,SAAS,EAAE,IAAI,CAACD,MAAM,CAAC;IAEhE,IAAI,CAACS,KAAK,CAACC,gBAAgB,CAAC,WAAW,EAAE,MAAM;MAC7C,IAAI,CAACC,YAAY,CAAC,CAAC;IACrB,CAAC,CAAC;IACF,IAAI,CAACF,KAAK,CAACC,gBAAgB,CAAC,SAAS,EAAGE,KAAK,IAAK;MAChD,QAAQA,KAAK,CAACC,GAAG;QACf,KAAK,OAAO;UACV,IAAI,CAACF,YAAY,CAAC,CAAC;UACnB;QACF,KAAK,QAAQ;UACX,IAAI,CAACG,MAAM,CAAC,CAAC;UACbF,KAAK,CAACG,cAAc,CAAC,CAAC;UACtB;QACF;MACF;IACF,CAAC,CAAC;IACF,IAAI,CAAC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Q,CACzD,IAAI,CAACnD,MAAM,CAACkD,aAAa,CAC1B;MACH5B,MAAM,GAAG,IAAI,CAACtB,MAAM,CAACoB,OAAO,CAAC,IAAI,CAACpB,MAAM,CAACkD,aAAa,CAAC;MACvD;MACA,IAAI,CAACtB,UAAU,CAACL,IAAI,CAAC;IACvB,CAAC,MAAM;MACL,IAAI,CAACK,UAAU,CAAC,IAAI,CAAC;IACvB;IACA,MAAM6B,QAAQ,GACZnC,MAAM,IAAI,IAAI,IACdA,MAAM,KAAK,IAAI,CAACtB,MAAM,CAACiD,aAAa,CAAC,kBAAkB,CAAC;IAC1D,IAAI,CAACxC,KAAK,CAACS,SAAS,CAACC,MAAM,CAAC,WAAW,EAAEsC,QAAQ,CAAC;EACpD;AACF;AAEA,eAAe3D,MAAM","ignoreList":[]}
|
package/ui/tooltip.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type Quill from '../core.js';
|
|
2
|
-
import type { Bounds } from '../core/selection.js';
|
|
3
|
-
declare class Tooltip {
|
|
4
|
-
quill: Quill;
|
|
5
|
-
boundsContainer: HTMLElement;
|
|
6
|
-
root: HTMLDivElement;
|
|
7
|
-
constructor(quill: Quill, boundsContainer?: HTMLElement);
|
|
8
|
-
hide(): void;
|
|
9
|
-
position(reference: Bounds): number;
|
|
10
|
-
show(): void;
|
|
11
|
-
}
|
|
12
|
-
export default Tooltip;
|
package/ui/tooltip.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
const isScrollable = el => {
|
|
2
|
-
const {
|
|
3
|
-
overflowY
|
|
4
|
-
} = getComputedStyle(el, null);
|
|
5
|
-
return overflowY !== 'visible' && overflowY !== 'clip';
|
|
6
|
-
};
|
|
7
|
-
class Tooltip {
|
|
8
|
-
constructor(quill, boundsContainer) {
|
|
9
|
-
this.quill = quill;
|
|
10
|
-
this.boundsContainer = boundsContainer || document.body;
|
|
11
|
-
this.root = quill.addContainer('ql-tooltip');
|
|
12
|
-
// @ts-expect-error
|
|
13
|
-
this.root.innerHTML = this.constructor.TEMPLATE;
|
|
14
|
-
if (isScrollable(this.quill.root)) {
|
|
15
|
-
this.quill.root.addEventListener('scroll', () => {
|
|
16
|
-
this.root.style.marginTop = `${-1 * this.quill.root.scrollTop}px`;
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
this.hide();
|
|
20
|
-
}
|
|
21
|
-
hide() {
|
|
22
|
-
this.root.classList.add('ql-hidden');
|
|
23
|
-
}
|
|
24
|
-
position(reference) {
|
|
25
|
-
const left = reference.left + reference.width / 2 - this.root.offsetWidth / 2;
|
|
26
|
-
// root.scrollTop should be 0 if scrollContainer !== root
|
|
27
|
-
const top = reference.bottom + this.quill.root.scrollTop;
|
|
28
|
-
this.root.style.left = `${left}px`;
|
|
29
|
-
this.root.style.top = `${top}px`;
|
|
30
|
-
this.root.classList.remove('ql-flip');
|
|
31
|
-
const containerBounds = this.boundsContainer.getBoundingClientRect();
|
|
32
|
-
const rootBounds = this.root.getBoundingClientRect();
|
|
33
|
-
let shift = 0;
|
|
34
|
-
if (rootBounds.right > containerBounds.right) {
|
|
35
|
-
shift = containerBounds.right - rootBounds.right;
|
|
36
|
-
this.root.style.left = `${left + shift}px`;
|
|
37
|
-
}
|
|
38
|
-
if (rootBounds.left < containerBounds.left) {
|
|
39
|
-
shift = containerBounds.left - rootBounds.left;
|
|
40
|
-
this.root.style.left = `${left + shift}px`;
|
|
41
|
-
}
|
|
42
|
-
if (rootBounds.bottom > containerBounds.bottom) {
|
|
43
|
-
const height = rootBounds.bottom - rootBounds.top;
|
|
44
|
-
const verticalShift = reference.bottom - reference.top + height;
|
|
45
|
-
this.root.style.top = `${top - verticalShift}px`;
|
|
46
|
-
this.root.classList.add('ql-flip');
|
|
47
|
-
}
|
|
48
|
-
return shift;
|
|
49
|
-
}
|
|
50
|
-
show() {
|
|
51
|
-
this.root.classList.remove('ql-editing');
|
|
52
|
-
this.root.classList.remove('ql-hidden');
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
export default Tooltip;
|
|
56
|
-
//# sourceMappingURL=tooltip.js.map
|
package/ui/tooltip.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","names":["isScrollable","el","overflowY","getComputedStyle","Tooltip","constructor","quill","boundsContainer","document","body","root","addContainer","innerHTML","TEMPLATE","addEventListener","style","marginTop","scrollTop","hide","classList","add","position","reference","left","width","offsetWidth","top","bottom","remove","containerBounds","getBoundingClientRect","rootBounds","shift","right","height","verticalShift","show"],"sources":["../../src/ui/tooltip.ts"],"sourcesContent":["import type Quill from '../core.js';\nimport type { Bounds } from '../core/selection.js';\n\nconst isScrollable = (el: Element) => {\n const { overflowY } = getComputedStyle(el, null);\n return overflowY !== 'visible' && overflowY !== 'clip';\n};\n\nclass Tooltip {\n quill: Quill;\n boundsContainer: HTMLElement;\n root: HTMLDivElement;\n\n constructor(quill: Quill, boundsContainer?: HTMLElement) {\n this.quill = quill;\n this.boundsContainer = boundsContainer || document.body;\n this.root = quill.addContainer('ql-tooltip');\n // @ts-expect-error\n this.root.innerHTML = this.constructor.TEMPLATE;\n if (isScrollable(this.quill.root)) {\n this.quill.root.addEventListener('scroll', () => {\n this.root.style.marginTop = `${-1 * this.quill.root.scrollTop}px`;\n });\n }\n this.hide();\n }\n\n hide() {\n this.root.classList.add('ql-hidden');\n }\n\n position(reference: Bounds) {\n const left =\n reference.left + reference.width / 2 - this.root.offsetWidth / 2;\n // root.scrollTop should be 0 if scrollContainer !== root\n const top = reference.bottom + this.quill.root.scrollTop;\n this.root.style.left = `${left}px`;\n this.root.style.top = `${top}px`;\n this.root.classList.remove('ql-flip');\n const containerBounds = this.boundsContainer.getBoundingClientRect();\n const rootBounds = this.root.getBoundingClientRect();\n let shift = 0;\n if (rootBounds.right > containerBounds.right) {\n shift = containerBounds.right - rootBounds.right;\n this.root.style.left = `${left + shift}px`;\n }\n if (rootBounds.left < containerBounds.left) {\n shift = containerBounds.left - rootBounds.left;\n this.root.style.left = `${left + shift}px`;\n }\n if (rootBounds.bottom > containerBounds.bottom) {\n const height = rootBounds.bottom - rootBounds.top;\n const verticalShift = reference.bottom - reference.top + height;\n this.root.style.top = `${top - verticalShift}px`;\n this.root.classList.add('ql-flip');\n }\n return shift;\n }\n\n show() {\n this.root.classList.remove('ql-editing');\n this.root.classList.remove('ql-hidden');\n }\n}\n\nexport default Tooltip;\n"],"mappings":"AAGA,MAAMA,YAAY,GAAIC,EAAW,IAAK;EACpC,MAAM;IAAEC;EAAU,CAAC,GAAGC,gBAAgB,CAACF,EAAE,EAAE,IAAI,CAAC;EAChD,OAAOC,SAAS,KAAK,SAAS,IAAIA,SAAS,KAAK,MAAM;AACxD,CAAC;AAED,MAAME,OAAO,CAAC;EAKZC,WAAWA,CAACC,KAAY,EAAEC,eAA6B,EAAE;IACvD,IAAI,CAACD,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACC,eAAe,GAAGA,eAAe,IAAIC,QAAQ,CAACC,IAAI;IACvD,IAAI,CAACC,IAAI,GAAGJ,KAAK,CAACK,YAAY,CAAC,YAAY,CAAC;IAC5C;IACA,IAAI,CAACD,IAAI,CAACE,SAAS,GAAG,IAAI,CAACP,WAAW,CAACQ,QAAQ;IAC/C,IAAIb,YAAY,CAAC,IAAI,CAACM,KAAK,CAACI,IAAI,CAAC,EAAE;MACjC,IAAI,CAACJ,KAAK,CAACI,IAAI,CAACI,gBAAgB,CAAC,QAAQ,EAAE,MAAM;QAC/C,IAAI,CAACJ,IAAI,CAACK,KAAK,CAACC,SAAS,GAAI,GAAE,CAAC,CAAC,GAAG,IAAI,CAACV,KAAK,CAACI,IAAI,CAACO,SAAU,IAAG;MACnE,CAAC,CAAC;IACJ;IACA,IAAI,CAACC,IAAI,CAAC,CAAC;EACb;EAEAA,IAAIA,CAAA,EAAG;IACL,IAAI,CAACR,IAAI,CAACS,SAAS,CAACC,GAAG,CAAC,WAAW,CAAC;EACtC;EAEAC,QAAQA,CAACC,SAAiB,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SAAS,CAACK,MAAM,GAAGL,SAAS,CAACI,GAAG,GAAGQ,MAAM;MAC/D,IAAI,CAACxB,IAAI,CAACK,KAAK,CAACW,GAAG,GAAI,GAAEA,GAAG,GAAGS,aAAc,IAAG;MAChD,IAAI,CAACzB,IAAI,CAACS,SAAS,CAACC,GAAG,CAAC,SAAS,CAAC;IACpC;IACA,OAAOY,KAAK;EACd;EAEAI,IAAIA,CAAA,EAAG;IACL,IAAI,CAAC1B,IAAI,CAACS,SAAS,CAACS,MAAM,CAAC,YAAY,CAAC;IACxC,IAAI,CAAClB,IAAI,CAACS,SAAS,CAACS,MAAM,CAAC,WAAW,CAAC;EACzC;AACF;AAEA,eAAexB,OAAO","ignoreList":[]}
|
|
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
|