pxx-vue-quill 1.0.120 → 1.0.121

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.
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Copyright (c) 2025 Pxx-Team
9
9
  * Released under the MIT license
10
- * Date: 2025-09-10T04:17:16.482Z
10
+ * Date: 2025-09-10T04:26:49.295Z
11
11
  */
12
12
  (function (global, factory) {
13
13
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
@@ -18650,6 +18650,7 @@
18650
18650
  }, [
18651
18651
  vue.h('input', {
18652
18652
  type: 'text',
18653
+ class: 'custom-link-input',
18653
18654
  value: localLinkUrl.value,
18654
18655
  placeholder: '请输入链接',
18655
18656
  onInput: (e) => {
@@ -18993,11 +18994,11 @@
18993
18994
  value: true
18994
18995
  });
18995
18996
 
18996
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
18997
+ var _createClass$2 = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
18997
18998
 
18998
18999
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
18999
19000
 
19000
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19001
+ function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19001
19002
 
19002
19003
  var LEFT_ALIGN = 'left';
19003
19004
  var CENTER_ALIGN = 'center';
@@ -19008,7 +19009,7 @@
19008
19009
  var _this = this,
19009
19010
  _alignments;
19010
19011
 
19011
- _classCallCheck(this, DefaultAligner);
19012
+ _classCallCheck$2(this, DefaultAligner);
19012
19013
 
19013
19014
  this.applyStyle = options.aligner.applyStyle;
19014
19015
  this.alignAttribute = options.attribute;
@@ -19036,7 +19037,7 @@
19036
19037
  }), _alignments);
19037
19038
  }
19038
19039
 
19039
- _createClass(DefaultAligner, [{
19040
+ _createClass$2(DefaultAligner, [{
19040
19041
  key: 'getAlignments',
19041
19042
  value: function getAlignments() {
19042
19043
  var _this2 = this;
@@ -19339,190 +19340,182 @@
19339
19340
  return AlignAction;
19340
19341
  }
19341
19342
 
19342
- var ResizeAction = {};
19343
+ var ResizeAction$1 = {};
19343
19344
 
19344
- var hasRequiredResizeAction;
19345
+ Object.defineProperty(ResizeAction$1, "__esModule", {
19346
+ value: true
19347
+ });
19345
19348
 
19346
- function requireResizeAction () {
19347
- if (hasRequiredResizeAction) return ResizeAction;
19348
- hasRequiredResizeAction = 1;
19349
+ var _createClass$1 = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
19349
19350
 
19350
- Object.defineProperty(ResizeAction, "__esModule", {
19351
- value: true
19352
- });
19351
+ var _Action2 = requireAction();
19353
19352
 
19354
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
19353
+ var _Action3 = _interopRequireDefault$1(_Action2);
19355
19354
 
19356
- var _Action2 = requireAction();
19355
+ var _BlotFormatter$1 = requireBlotFormatter();
19357
19356
 
19358
- var _Action3 = _interopRequireDefault(_Action2);
19357
+ _interopRequireDefault$1(_BlotFormatter$1);
19359
19358
 
19360
- var _BlotFormatter = requireBlotFormatter();
19359
+ function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19361
19360
 
19362
- _interopRequireDefault(_BlotFormatter);
19361
+ function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19363
19362
 
19364
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19363
+ function _possibleConstructorReturn$1(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
19365
19364
 
19366
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19367
-
19368
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
19365
+ function _inherits$1(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
19369
19366
 
19370
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
19371
-
19372
- var ResizeAction$1 = function (_Action) {
19373
- _inherits(ResizeAction, _Action);
19367
+ var ResizeAction = function (_Action) {
19368
+ _inherits$1(ResizeAction, _Action);
19374
19369
 
19375
- function ResizeAction(formatter) {
19376
- _classCallCheck(this, ResizeAction);
19370
+ function ResizeAction(formatter) {
19371
+ _classCallCheck$1(this, ResizeAction);
19377
19372
 
19378
- var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
19373
+ var _this = _possibleConstructorReturn$1(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
19379
19374
 
19380
- _this.onMouseDown = function (event) {
19381
- if (!(event.target instanceof HTMLElement)) {
19382
- return;
19383
- }
19384
- _this.dragHandle = event.target;
19385
- _this.setCursor(_this.dragHandle.style.cursor);
19375
+ _this.onMouseDown = function (event) {
19376
+ if (!(event.target instanceof HTMLElement)) {
19377
+ return;
19378
+ }
19379
+ _this.dragHandle = event.target;
19380
+ _this.setCursor(_this.dragHandle.style.cursor);
19386
19381
 
19387
- if (!_this.formatter.currentSpec) {
19388
- return;
19389
- }
19382
+ if (!_this.formatter.currentSpec) {
19383
+ return;
19384
+ }
19390
19385
 
19391
- var target = _this.formatter.currentSpec.getTargetElement();
19392
- if (!target) {
19393
- return;
19394
- }
19386
+ var target = _this.formatter.currentSpec.getTargetElement();
19387
+ if (!target) {
19388
+ return;
19389
+ }
19395
19390
 
19396
- var rect = target.getBoundingClientRect();
19391
+ var rect = target.getBoundingClientRect();
19397
19392
 
19398
- _this.dragStartX = event.clientX;
19399
- _this.preDragWidth = rect.width;
19400
- _this.targetRatio = rect.height / rect.width;
19393
+ _this.dragStartX = event.clientX;
19394
+ _this.preDragWidth = rect.width;
19395
+ _this.targetRatio = rect.height / rect.width;
19401
19396
 
19402
- document.addEventListener('mousemove', _this.onDrag);
19403
- document.addEventListener('mouseup', _this.onMouseUp);
19404
- };
19397
+ document.addEventListener('mousemove', _this.onDrag);
19398
+ document.addEventListener('mouseup', _this.onMouseUp);
19399
+ };
19405
19400
 
19406
- _this.onDrag = function (event) {
19407
- if (!_this.formatter.currentSpec) {
19408
- return;
19409
- }
19401
+ _this.onDrag = function (event) {
19402
+ if (!_this.formatter.currentSpec) {
19403
+ return;
19404
+ }
19410
19405
 
19411
- var target = _this.formatter.currentSpec.getTargetElement();
19412
- if (!target) {
19413
- return;
19414
- }
19406
+ var target = _this.formatter.currentSpec.getTargetElement();
19407
+ if (!target) {
19408
+ return;
19409
+ }
19415
19410
 
19416
- var deltaX = event.clientX - _this.dragStartX;
19417
- var newWidth = 0;
19411
+ var deltaX = event.clientX - _this.dragStartX;
19412
+ var newWidth = 0;
19418
19413
 
19419
- if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
19420
- newWidth = Math.round(_this.preDragWidth - deltaX);
19421
- } else {
19422
- newWidth = Math.round(_this.preDragWidth + deltaX);
19423
- }
19414
+ if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
19415
+ newWidth = Math.round(_this.preDragWidth - deltaX);
19416
+ } else {
19417
+ newWidth = Math.round(_this.preDragWidth + deltaX);
19418
+ }
19424
19419
 
19425
- var newHeight = _this.targetRatio * newWidth;
19420
+ var newHeight = _this.targetRatio * newWidth;
19426
19421
 
19427
- target.setAttribute('width', '' + newWidth);
19428
- target.setAttribute('height', '' + newHeight);
19422
+ target.setAttribute('width', '' + newWidth);
19423
+ target.setAttribute('height', '' + newHeight);
19429
19424
 
19430
- _this.formatter.update();
19431
- };
19425
+ _this.formatter.update();
19426
+ };
19432
19427
 
19433
- _this.onMouseUp = function () {
19434
- _this.setCursor('');
19435
- document.removeEventListener('mousemove', _this.onDrag);
19436
- document.removeEventListener('mouseup', _this.onMouseUp);
19437
- };
19428
+ _this.onMouseUp = function () {
19429
+ _this.setCursor('');
19430
+ document.removeEventListener('mousemove', _this.onDrag);
19431
+ document.removeEventListener('mouseup', _this.onMouseUp);
19432
+ };
19438
19433
 
19439
- _this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
19440
- _this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
19441
- _this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
19442
- _this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
19443
- _this.dragHandle = null;
19444
- _this.dragStartX = 0;
19445
- _this.preDragWidth = 0;
19446
- _this.targetRatio = 0;
19447
- return _this;
19448
- }
19434
+ _this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
19435
+ _this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
19436
+ _this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
19437
+ _this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
19438
+ _this.dragHandle = null;
19439
+ _this.dragStartX = 0;
19440
+ _this.preDragWidth = 0;
19441
+ _this.targetRatio = 0;
19442
+ return _this;
19443
+ }
19449
19444
 
19450
- _createClass(ResizeAction, [{
19451
- key: 'onCreate',
19452
- value: function onCreate() {
19453
- this.formatter.overlay.appendChild(this.topLeftHandle);
19454
- this.formatter.overlay.appendChild(this.topRightHandle);
19455
- this.formatter.overlay.appendChild(this.bottomRightHandle);
19456
- this.formatter.overlay.appendChild(this.bottomLeftHandle);
19445
+ _createClass$1(ResizeAction, [{
19446
+ key: 'onCreate',
19447
+ value: function onCreate() {
19448
+ this.formatter.overlay.appendChild(this.topLeftHandle);
19449
+ this.formatter.overlay.appendChild(this.topRightHandle);
19450
+ this.formatter.overlay.appendChild(this.bottomRightHandle);
19451
+ this.formatter.overlay.appendChild(this.bottomLeftHandle);
19457
19452
 
19458
- this.repositionHandles(this.formatter.options.resize.handleStyle);
19459
- }
19460
- }, {
19461
- key: 'onDestroy',
19462
- value: function onDestroy() {
19463
- this.setCursor('');
19464
- this.formatter.overlay.removeChild(this.topLeftHandle);
19465
- this.formatter.overlay.removeChild(this.topRightHandle);
19466
- this.formatter.overlay.removeChild(this.bottomRightHandle);
19467
- this.formatter.overlay.removeChild(this.bottomLeftHandle);
19468
- }
19469
- }, {
19470
- key: 'createHandle',
19471
- value: function createHandle(position, cursor) {
19472
- var box = document.createElement('div');
19473
- box.classList.add(this.formatter.options.resize.handleClassName);
19474
- box.setAttribute('data-position', position);
19475
- box.style.cursor = cursor;
19476
-
19477
- if (this.formatter.options.resize.handleStyle) {
19478
- Object.assign(box.style, this.formatter.options.resize.handleStyle);
19479
- }
19453
+ this.repositionHandles(this.formatter.options.resize.handleStyle);
19454
+ }
19455
+ }, {
19456
+ key: 'onDestroy',
19457
+ value: function onDestroy() {
19458
+ this.setCursor('');
19459
+ this.formatter.overlay.removeChild(this.topLeftHandle);
19460
+ this.formatter.overlay.removeChild(this.topRightHandle);
19461
+ this.formatter.overlay.removeChild(this.bottomRightHandle);
19462
+ this.formatter.overlay.removeChild(this.bottomLeftHandle);
19463
+ }
19464
+ }, {
19465
+ key: 'createHandle',
19466
+ value: function createHandle(position, cursor) {
19467
+ var box = document.createElement('div');
19468
+ box.classList.add(this.formatter.options.resize.handleClassName);
19469
+ box.setAttribute('data-position', position);
19470
+ box.style.cursor = cursor;
19471
+
19472
+ if (this.formatter.options.resize.handleStyle) {
19473
+ Object.assign(box.style, this.formatter.options.resize.handleStyle);
19474
+ }
19480
19475
 
19481
- box.addEventListener('mousedown', this.onMouseDown);
19476
+ box.addEventListener('mousedown', this.onMouseDown);
19482
19477
 
19483
- return box;
19484
- }
19485
- }, {
19486
- key: 'repositionHandles',
19487
- value: function repositionHandles(handleStyle) {
19488
- var handleXOffset = '0px';
19489
- var handleYOffset = '0px';
19490
- if (handleStyle) {
19491
- if (handleStyle.width) {
19492
- handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
19493
- }
19494
- if (handleStyle.height) {
19495
- handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
19496
- }
19497
- }
19478
+ return box;
19479
+ }
19480
+ }, {
19481
+ key: 'repositionHandles',
19482
+ value: function repositionHandles(handleStyle) {
19483
+ var handleXOffset = '0px';
19484
+ var handleYOffset = '0px';
19485
+ if (handleStyle) {
19486
+ if (handleStyle.width) {
19487
+ handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
19488
+ }
19489
+ if (handleStyle.height) {
19490
+ handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
19491
+ }
19492
+ }
19498
19493
 
19499
- Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
19500
- Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
19501
- Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
19502
- Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
19503
- }
19504
- }, {
19505
- key: 'setCursor',
19506
- value: function setCursor(value) {
19507
- if (document.body) {
19508
- document.body.style.cursor = value;
19509
- }
19494
+ Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
19495
+ Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
19496
+ Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
19497
+ Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
19498
+ }
19499
+ }, {
19500
+ key: 'setCursor',
19501
+ value: function setCursor(value) {
19502
+ if (document.body) {
19503
+ document.body.style.cursor = value;
19504
+ }
19510
19505
 
19511
- if (this.formatter.currentSpec) {
19512
- var target = this.formatter.currentSpec.getOverlayElement();
19513
- if (target) {
19514
- target.style.cursor = value;
19515
- }
19516
- }
19517
- }
19518
- }]);
19506
+ if (this.formatter.currentSpec) {
19507
+ var target = this.formatter.currentSpec.getOverlayElement();
19508
+ if (target) {
19509
+ target.style.cursor = value;
19510
+ }
19511
+ }
19512
+ }
19513
+ }]);
19519
19514
 
19520
- return ResizeAction;
19521
- }(_Action3.default);
19515
+ return ResizeAction;
19516
+ }(_Action3.default);
19522
19517
 
19523
- ResizeAction.default = ResizeAction$1;
19524
- return ResizeAction;
19525
- }
19518
+ ResizeAction$1.default = ResizeAction;
19526
19519
 
19527
19520
  var DeleteAction = {};
19528
19521
 
@@ -19629,7 +19622,7 @@
19629
19622
 
19630
19623
  var _AlignAction2 = _interopRequireDefault(_AlignAction);
19631
19624
 
19632
- var _ResizeAction = requireResizeAction();
19625
+ var _ResizeAction = ResizeAction$1;
19633
19626
 
19634
19627
  var _ResizeAction2 = _interopRequireDefault(_ResizeAction);
19635
19628
 
@@ -19761,156 +19754,148 @@
19761
19754
 
19762
19755
  var IframeVideoSpec = {};
19763
19756
 
19764
- var UnclickableBlotSpec = {};
19765
-
19766
- var hasRequiredUnclickableBlotSpec;
19757
+ var UnclickableBlotSpec$1 = {};
19767
19758
 
19768
- function requireUnclickableBlotSpec () {
19769
- if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
19770
- hasRequiredUnclickableBlotSpec = 1;
19771
-
19772
- Object.defineProperty(UnclickableBlotSpec, "__esModule", {
19773
- value: true
19774
- });
19775
-
19776
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
19759
+ Object.defineProperty(UnclickableBlotSpec$1, "__esModule", {
19760
+ value: true
19761
+ });
19777
19762
 
19778
- var _BlotSpec2 = requireBlotSpec();
19763
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
19779
19764
 
19780
- var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
19765
+ var _BlotSpec2 = requireBlotSpec();
19781
19766
 
19782
- var _BlotFormatter = requireBlotFormatter();
19767
+ var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
19783
19768
 
19784
- _interopRequireDefault(_BlotFormatter);
19769
+ var _BlotFormatter = requireBlotFormatter();
19785
19770
 
19786
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19771
+ _interopRequireDefault(_BlotFormatter);
19787
19772
 
19788
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19773
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19789
19774
 
19790
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
19775
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19791
19776
 
19792
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
19777
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
19793
19778
 
19794
- var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
19795
- var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
19779
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
19796
19780
 
19797
- var UnclickableBlotSpec$1 = function (_BlotSpec) {
19798
- _inherits(UnclickableBlotSpec, _BlotSpec);
19781
+ var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
19782
+ var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
19799
19783
 
19800
- function UnclickableBlotSpec(formatter, selector) {
19801
- _classCallCheck(this, UnclickableBlotSpec);
19784
+ var UnclickableBlotSpec = function (_BlotSpec) {
19785
+ _inherits(UnclickableBlotSpec, _BlotSpec);
19802
19786
 
19803
- var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
19787
+ function UnclickableBlotSpec(formatter, selector) {
19788
+ _classCallCheck(this, UnclickableBlotSpec);
19804
19789
 
19805
- _this.onTextChange = function () {
19806
- Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
19807
- unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
19808
- unclickable.addEventListener('mouseenter', _this.onMouseEnter);
19809
- });
19810
- };
19790
+ var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
19811
19791
 
19812
- _this.onMouseEnter = function (event) {
19813
- var unclickable = event.target;
19814
- if (!(unclickable instanceof HTMLElement)) {
19815
- return;
19816
- }
19792
+ _this.onTextChange = function () {
19793
+ Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
19794
+ unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
19795
+ unclickable.addEventListener('mouseenter', _this.onMouseEnter);
19796
+ });
19797
+ };
19817
19798
 
19818
- _this.nextUnclickable = unclickable;
19819
- _this.repositionProxyImage(_this.nextUnclickable);
19820
- };
19799
+ _this.onMouseEnter = function (event) {
19800
+ var unclickable = event.target;
19801
+ if (!(unclickable instanceof HTMLElement)) {
19802
+ return;
19803
+ }
19821
19804
 
19822
- _this.onProxyImageClick = function () {
19823
- _this.unclickable = _this.nextUnclickable;
19824
- _this.nextUnclickable = null;
19825
- _this.formatter.show(_this);
19826
- _this.hideProxyImage();
19827
- };
19805
+ _this.nextUnclickable = unclickable;
19806
+ _this.repositionProxyImage(_this.nextUnclickable);
19807
+ };
19828
19808
 
19829
- _this.selector = selector;
19830
- _this.unclickable = null;
19831
- _this.nextUnclickable = null;
19832
- return _this;
19833
- }
19809
+ _this.onProxyImageClick = function () {
19810
+ _this.unclickable = _this.nextUnclickable;
19811
+ _this.nextUnclickable = null;
19812
+ _this.formatter.show(_this);
19813
+ _this.hideProxyImage();
19814
+ };
19834
19815
 
19835
- _createClass(UnclickableBlotSpec, [{
19836
- key: 'init',
19837
- value: function init() {
19838
- if (document.body) {
19839
- /*
19840
- it's important that this is attached to the body instead of the root quill element.
19841
- this prevents the click event from overlapping with ImageSpec
19842
- */
19843
- document.body.appendChild(this.createProxyImage());
19844
- }
19816
+ _this.selector = selector;
19817
+ _this.unclickable = null;
19818
+ _this.nextUnclickable = null;
19819
+ return _this;
19820
+ }
19845
19821
 
19846
- this.hideProxyImage();
19847
- this.proxyImage.addEventListener('click', this.onProxyImageClick);
19848
- this.formatter.quill.on('text-change', this.onTextChange);
19849
- }
19850
- }, {
19851
- key: 'getTargetElement',
19852
- value: function getTargetElement() {
19853
- return this.unclickable;
19854
- }
19855
- }, {
19856
- key: 'getOverlayElement',
19857
- value: function getOverlayElement() {
19858
- return this.unclickable;
19859
- }
19860
- }, {
19861
- key: 'onHide',
19862
- value: function onHide() {
19863
- this.hideProxyImage();
19864
- this.nextUnclickable = null;
19865
- this.unclickable = null;
19866
- }
19867
- }, {
19868
- key: 'createProxyImage',
19869
- value: function createProxyImage() {
19870
- var canvas = document.createElement('canvas');
19871
- var context = canvas.getContext('2d');
19872
- context.globalAlpha = 0;
19873
- context.fillRect(0, 0, 1, 1);
19874
-
19875
- this.proxyImage = document.createElement('img');
19876
- this.proxyImage.src = canvas.toDataURL('image/png');
19877
- this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
19878
-
19879
- Object.assign(this.proxyImage.style, {
19880
- position: 'absolute',
19881
- margin: '0'
19882
- });
19822
+ _createClass(UnclickableBlotSpec, [{
19823
+ key: 'init',
19824
+ value: function init() {
19825
+ if (document.body) {
19826
+ /*
19827
+ it's important that this is attached to the body instead of the root quill element.
19828
+ this prevents the click event from overlapping with ImageSpec
19829
+ */
19830
+ document.body.appendChild(this.createProxyImage());
19831
+ }
19883
19832
 
19884
- return this.proxyImage;
19885
- }
19886
- }, {
19887
- key: 'hideProxyImage',
19888
- value: function hideProxyImage() {
19889
- Object.assign(this.proxyImage.style, {
19890
- display: 'none'
19891
- });
19892
- }
19893
- }, {
19894
- key: 'repositionProxyImage',
19895
- value: function repositionProxyImage(unclickable) {
19896
- var rect = unclickable.getBoundingClientRect();
19833
+ this.hideProxyImage();
19834
+ this.proxyImage.addEventListener('click', this.onProxyImageClick);
19835
+ this.formatter.quill.on('text-change', this.onTextChange);
19836
+ }
19837
+ }, {
19838
+ key: 'getTargetElement',
19839
+ value: function getTargetElement() {
19840
+ return this.unclickable;
19841
+ }
19842
+ }, {
19843
+ key: 'getOverlayElement',
19844
+ value: function getOverlayElement() {
19845
+ return this.unclickable;
19846
+ }
19847
+ }, {
19848
+ key: 'onHide',
19849
+ value: function onHide() {
19850
+ this.hideProxyImage();
19851
+ this.nextUnclickable = null;
19852
+ this.unclickable = null;
19853
+ }
19854
+ }, {
19855
+ key: 'createProxyImage',
19856
+ value: function createProxyImage() {
19857
+ var canvas = document.createElement('canvas');
19858
+ var context = canvas.getContext('2d');
19859
+ context.globalAlpha = 0;
19860
+ context.fillRect(0, 0, 1, 1);
19861
+
19862
+ this.proxyImage = document.createElement('img');
19863
+ this.proxyImage.src = canvas.toDataURL('image/png');
19864
+ this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
19865
+
19866
+ Object.assign(this.proxyImage.style, {
19867
+ position: 'absolute',
19868
+ margin: '0'
19869
+ });
19897
19870
 
19898
- Object.assign(this.proxyImage.style, {
19899
- display: 'block',
19900
- left: rect.left + window.pageXOffset + 'px',
19901
- top: rect.top + window.pageYOffset + 'px',
19902
- width: rect.width + 'px',
19903
- height: rect.height + 'px'
19904
- });
19905
- }
19906
- }]);
19871
+ return this.proxyImage;
19872
+ }
19873
+ }, {
19874
+ key: 'hideProxyImage',
19875
+ value: function hideProxyImage() {
19876
+ Object.assign(this.proxyImage.style, {
19877
+ display: 'none'
19878
+ });
19879
+ }
19880
+ }, {
19881
+ key: 'repositionProxyImage',
19882
+ value: function repositionProxyImage(unclickable) {
19883
+ var rect = unclickable.getBoundingClientRect();
19884
+
19885
+ Object.assign(this.proxyImage.style, {
19886
+ display: 'block',
19887
+ left: rect.left + window.pageXOffset + 'px',
19888
+ top: rect.top + window.pageYOffset + 'px',
19889
+ width: rect.width + 'px',
19890
+ height: rect.height + 'px'
19891
+ });
19892
+ }
19893
+ }]);
19907
19894
 
19908
- return UnclickableBlotSpec;
19909
- }(_BlotSpec3.default);
19895
+ return UnclickableBlotSpec;
19896
+ }(_BlotSpec3.default);
19910
19897
 
19911
- UnclickableBlotSpec.default = UnclickableBlotSpec$1;
19912
- return UnclickableBlotSpec;
19913
- }
19898
+ UnclickableBlotSpec$1.default = UnclickableBlotSpec;
19914
19899
 
19915
19900
  var hasRequiredIframeVideoSpec;
19916
19901
 
@@ -19922,7 +19907,7 @@
19922
19907
  value: true
19923
19908
  });
19924
19909
 
19925
- var _UnclickableBlotSpec2 = requireUnclickableBlotSpec();
19910
+ var _UnclickableBlotSpec2 = UnclickableBlotSpec$1;
19926
19911
 
19927
19912
  var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
19928
19913
 
@@ -20122,7 +20107,7 @@
20122
20107
  }
20123
20108
  });
20124
20109
 
20125
- var _ResizeAction = requireResizeAction();
20110
+ var _ResizeAction = ResizeAction$1;
20126
20111
 
20127
20112
  Object.defineProperty(exports, 'ResizeAction', {
20128
20113
  enumerable: true,
@@ -20149,7 +20134,7 @@
20149
20134
  }
20150
20135
  });
20151
20136
 
20152
- var _UnclickableBlotSpec = requireUnclickableBlotSpec();
20137
+ var _UnclickableBlotSpec = UnclickableBlotSpec$1;
20153
20138
 
20154
20139
  Object.defineProperty(exports, 'UnclickableBlotSpec', {
20155
20140
  enumerable: true,
@@ -20201,32 +20186,6 @@
20201
20186
  removeQuillBlotFormatter();
20202
20187
  }
20203
20188
  };
20204
- const handleGlobalKeyup = (event) => {
20205
- var _a;
20206
- if (event.keyCode !== 46 && event.keyCode !== 8)
20207
- return;
20208
- const blotFormatter = (_a = quillRef.value) === null || _a === void 0 ? void 0 : _a.getModule('blotFormatter');
20209
- if (!blotFormatter || !blotFormatter.currentSpec)
20210
- return;
20211
- const target = event.target;
20212
- if (!editor.value || !editor.value.contains(target)) {
20213
- event.stopImmediatePropagation();
20214
- event.preventDefault();
20215
- return;
20216
- }
20217
- const allEditors = document.querySelectorAll('.quill-editor-container');
20218
- allEditors.forEach(editorElement => {
20219
- if (editorElement !== editor.value) {
20220
- const otherQuill = editorElement.__quill;
20221
- if (otherQuill && otherQuill !== quillRef.value) {
20222
- const otherBlotFormatter = otherQuill.getModule('blotFormatter');
20223
- if (otherBlotFormatter && otherBlotFormatter.currentSpec) {
20224
- otherBlotFormatter.hide();
20225
- }
20226
- }
20227
- }
20228
- });
20229
- };
20230
20189
  const configureBlotFormatter = () => {
20231
20190
  if (!quillRef.value)
20232
20191
  return;
@@ -20293,11 +20252,9 @@
20293
20252
  };
20294
20253
  vue.onMounted(() => {
20295
20254
  window.addEventListener('click', handleGlobalClick, true);
20296
- window.addEventListener('keyup', handleGlobalKeyup, true);
20297
20255
  });
20298
20256
  vue.onBeforeUnmount(() => {
20299
20257
  window.removeEventListener('click', handleGlobalClick, true);
20300
- window.removeEventListener('keyup', handleGlobalKeyup, true);
20301
20258
  removeQuillBlotFormatter();
20302
20259
  });
20303
20260
  const setQuill = (quillInstance) => {
@@ -20308,7 +20265,6 @@
20308
20265
  setQuill,
20309
20266
  removeQuillBlotFormatter,
20310
20267
  handleGlobalClick,
20311
- handleGlobalKeyup,
20312
20268
  configureBlotFormatter,
20313
20269
  applyImageStyle,
20314
20270
  registerBlotFormatter,