pxx-vue-quill 1.0.133 → 1.0.135

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-10T08:37:03.218Z
10
+ * Date: 2025-09-10T09:01:46.360Z
11
11
  */
12
12
  (function (global, factory) {
13
13
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
@@ -19340,190 +19340,182 @@
19340
19340
  return AlignAction;
19341
19341
  }
19342
19342
 
19343
- var ResizeAction = {};
19343
+ var ResizeAction$1 = {};
19344
19344
 
19345
- var hasRequiredResizeAction;
19346
-
19347
- function requireResizeAction () {
19348
- if (hasRequiredResizeAction) return ResizeAction;
19349
- hasRequiredResizeAction = 1;
19350
-
19351
- Object.defineProperty(ResizeAction, "__esModule", {
19352
- value: true
19353
- });
19345
+ Object.defineProperty(ResizeAction$1, "__esModule", {
19346
+ value: true
19347
+ });
19354
19348
 
19355
- 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; }; }();
19349
+ 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; }; }();
19356
19350
 
19357
- var _Action2 = requireAction();
19351
+ var _Action2 = requireAction();
19358
19352
 
19359
- var _Action3 = _interopRequireDefault(_Action2);
19353
+ var _Action3 = _interopRequireDefault(_Action2);
19360
19354
 
19361
- var _BlotFormatter = requireBlotFormatter();
19355
+ var _BlotFormatter = requireBlotFormatter();
19362
19356
 
19363
- _interopRequireDefault(_BlotFormatter);
19357
+ _interopRequireDefault(_BlotFormatter);
19364
19358
 
19365
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19359
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19366
19360
 
19367
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19361
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19368
19362
 
19369
- 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; }
19363
+ 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; }
19370
19364
 
19371
- 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; }
19365
+ 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; }
19372
19366
 
19373
- var ResizeAction$1 = function (_Action) {
19374
- _inherits(ResizeAction, _Action);
19367
+ var ResizeAction = function (_Action) {
19368
+ _inherits(ResizeAction, _Action);
19375
19369
 
19376
- function ResizeAction(formatter) {
19377
- _classCallCheck(this, ResizeAction);
19370
+ function ResizeAction(formatter) {
19371
+ _classCallCheck(this, ResizeAction);
19378
19372
 
19379
- var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
19373
+ var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
19380
19374
 
19381
- _this.onMouseDown = function (event) {
19382
- if (!(event.target instanceof HTMLElement)) {
19383
- return;
19384
- }
19385
- _this.dragHandle = event.target;
19386
- _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);
19387
19381
 
19388
- if (!_this.formatter.currentSpec) {
19389
- return;
19390
- }
19382
+ if (!_this.formatter.currentSpec) {
19383
+ return;
19384
+ }
19391
19385
 
19392
- var target = _this.formatter.currentSpec.getTargetElement();
19393
- if (!target) {
19394
- return;
19395
- }
19386
+ var target = _this.formatter.currentSpec.getTargetElement();
19387
+ if (!target) {
19388
+ return;
19389
+ }
19396
19390
 
19397
- var rect = target.getBoundingClientRect();
19391
+ var rect = target.getBoundingClientRect();
19398
19392
 
19399
- _this.dragStartX = event.clientX;
19400
- _this.preDragWidth = rect.width;
19401
- _this.targetRatio = rect.height / rect.width;
19393
+ _this.dragStartX = event.clientX;
19394
+ _this.preDragWidth = rect.width;
19395
+ _this.targetRatio = rect.height / rect.width;
19402
19396
 
19403
- document.addEventListener('mousemove', _this.onDrag);
19404
- document.addEventListener('mouseup', _this.onMouseUp);
19405
- };
19397
+ document.addEventListener('mousemove', _this.onDrag);
19398
+ document.addEventListener('mouseup', _this.onMouseUp);
19399
+ };
19406
19400
 
19407
- _this.onDrag = function (event) {
19408
- if (!_this.formatter.currentSpec) {
19409
- return;
19410
- }
19401
+ _this.onDrag = function (event) {
19402
+ if (!_this.formatter.currentSpec) {
19403
+ return;
19404
+ }
19411
19405
 
19412
- var target = _this.formatter.currentSpec.getTargetElement();
19413
- if (!target) {
19414
- return;
19415
- }
19406
+ var target = _this.formatter.currentSpec.getTargetElement();
19407
+ if (!target) {
19408
+ return;
19409
+ }
19416
19410
 
19417
- var deltaX = event.clientX - _this.dragStartX;
19418
- var newWidth = 0;
19411
+ var deltaX = event.clientX - _this.dragStartX;
19412
+ var newWidth = 0;
19419
19413
 
19420
- if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
19421
- newWidth = Math.round(_this.preDragWidth - deltaX);
19422
- } else {
19423
- newWidth = Math.round(_this.preDragWidth + deltaX);
19424
- }
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
+ }
19425
19419
 
19426
- var newHeight = _this.targetRatio * newWidth;
19420
+ var newHeight = _this.targetRatio * newWidth;
19427
19421
 
19428
- target.setAttribute('width', '' + newWidth);
19429
- target.setAttribute('height', '' + newHeight);
19422
+ target.setAttribute('width', '' + newWidth);
19423
+ target.setAttribute('height', '' + newHeight);
19430
19424
 
19431
- _this.formatter.update();
19432
- };
19425
+ _this.formatter.update();
19426
+ };
19433
19427
 
19434
- _this.onMouseUp = function () {
19435
- _this.setCursor('');
19436
- document.removeEventListener('mousemove', _this.onDrag);
19437
- document.removeEventListener('mouseup', _this.onMouseUp);
19438
- };
19428
+ _this.onMouseUp = function () {
19429
+ _this.setCursor('');
19430
+ document.removeEventListener('mousemove', _this.onDrag);
19431
+ document.removeEventListener('mouseup', _this.onMouseUp);
19432
+ };
19439
19433
 
19440
- _this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
19441
- _this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
19442
- _this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
19443
- _this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
19444
- _this.dragHandle = null;
19445
- _this.dragStartX = 0;
19446
- _this.preDragWidth = 0;
19447
- _this.targetRatio = 0;
19448
- return _this;
19449
- }
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
+ }
19450
19444
 
19451
- _createClass(ResizeAction, [{
19452
- key: 'onCreate',
19453
- value: function onCreate() {
19454
- this.formatter.overlay.appendChild(this.topLeftHandle);
19455
- this.formatter.overlay.appendChild(this.topRightHandle);
19456
- this.formatter.overlay.appendChild(this.bottomRightHandle);
19457
- this.formatter.overlay.appendChild(this.bottomLeftHandle);
19445
+ _createClass(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);
19458
19452
 
19459
- this.repositionHandles(this.formatter.options.resize.handleStyle);
19460
- }
19461
- }, {
19462
- key: 'onDestroy',
19463
- value: function onDestroy() {
19464
- this.setCursor('');
19465
- this.formatter.overlay.removeChild(this.topLeftHandle);
19466
- this.formatter.overlay.removeChild(this.topRightHandle);
19467
- this.formatter.overlay.removeChild(this.bottomRightHandle);
19468
- this.formatter.overlay.removeChild(this.bottomLeftHandle);
19469
- }
19470
- }, {
19471
- key: 'createHandle',
19472
- value: function createHandle(position, cursor) {
19473
- var box = document.createElement('div');
19474
- box.classList.add(this.formatter.options.resize.handleClassName);
19475
- box.setAttribute('data-position', position);
19476
- box.style.cursor = cursor;
19477
-
19478
- if (this.formatter.options.resize.handleStyle) {
19479
- Object.assign(box.style, this.formatter.options.resize.handleStyle);
19480
- }
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
+ }
19481
19475
 
19482
- box.addEventListener('mousedown', this.onMouseDown);
19476
+ box.addEventListener('mousedown', this.onMouseDown);
19483
19477
 
19484
- return box;
19485
- }
19486
- }, {
19487
- key: 'repositionHandles',
19488
- value: function repositionHandles(handleStyle) {
19489
- var handleXOffset = '0px';
19490
- var handleYOffset = '0px';
19491
- if (handleStyle) {
19492
- if (handleStyle.width) {
19493
- handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
19494
- }
19495
- if (handleStyle.height) {
19496
- handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
19497
- }
19498
- }
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
+ }
19499
19493
 
19500
- Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
19501
- Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
19502
- Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
19503
- Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
19504
- }
19505
- }, {
19506
- key: 'setCursor',
19507
- value: function setCursor(value) {
19508
- if (document.body) {
19509
- document.body.style.cursor = value;
19510
- }
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
+ }
19511
19505
 
19512
- if (this.formatter.currentSpec) {
19513
- var target = this.formatter.currentSpec.getOverlayElement();
19514
- if (target) {
19515
- target.style.cursor = value;
19516
- }
19517
- }
19518
- }
19519
- }]);
19506
+ if (this.formatter.currentSpec) {
19507
+ var target = this.formatter.currentSpec.getOverlayElement();
19508
+ if (target) {
19509
+ target.style.cursor = value;
19510
+ }
19511
+ }
19512
+ }
19513
+ }]);
19520
19514
 
19521
- return ResizeAction;
19522
- }(_Action3.default);
19515
+ return ResizeAction;
19516
+ }(_Action3.default);
19523
19517
 
19524
- ResizeAction.default = ResizeAction$1;
19525
- return ResizeAction;
19526
- }
19518
+ ResizeAction$1.default = ResizeAction;
19527
19519
 
19528
19520
  var DeleteAction = {};
19529
19521
 
@@ -19630,7 +19622,7 @@
19630
19622
 
19631
19623
  var _AlignAction2 = _interopRequireDefault(_AlignAction);
19632
19624
 
19633
- var _ResizeAction = requireResizeAction();
19625
+ var _ResizeAction = ResizeAction$1;
19634
19626
 
19635
19627
  var _ResizeAction2 = _interopRequireDefault(_ResizeAction);
19636
19628
 
@@ -19762,148 +19754,156 @@
19762
19754
 
19763
19755
  var IframeVideoSpec = {};
19764
19756
 
19765
- var UnclickableBlotSpec$1 = {};
19757
+ var UnclickableBlotSpec = {};
19766
19758
 
19767
- Object.defineProperty(UnclickableBlotSpec$1, "__esModule", {
19768
- value: true
19769
- });
19759
+ var hasRequiredUnclickableBlotSpec;
19770
19760
 
19771
- 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; }; }();
19761
+ function requireUnclickableBlotSpec () {
19762
+ if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
19763
+ hasRequiredUnclickableBlotSpec = 1;
19772
19764
 
19773
- var _BlotSpec2 = requireBlotSpec();
19765
+ Object.defineProperty(UnclickableBlotSpec, "__esModule", {
19766
+ value: true
19767
+ });
19774
19768
 
19775
- var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
19769
+ 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; }; }();
19776
19770
 
19777
- var _BlotFormatter = requireBlotFormatter();
19771
+ var _BlotSpec2 = requireBlotSpec();
19778
19772
 
19779
- _interopRequireDefault(_BlotFormatter);
19773
+ var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
19780
19774
 
19781
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19775
+ var _BlotFormatter = requireBlotFormatter();
19782
19776
 
19783
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19777
+ _interopRequireDefault(_BlotFormatter);
19784
19778
 
19785
- 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; }
19779
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19786
19780
 
19787
- 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; }
19781
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19788
19782
 
19789
- var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
19790
- var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
19783
+ 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; }
19791
19784
 
19792
- var UnclickableBlotSpec = function (_BlotSpec) {
19793
- _inherits(UnclickableBlotSpec, _BlotSpec);
19785
+ 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; }
19794
19786
 
19795
- function UnclickableBlotSpec(formatter, selector) {
19796
- _classCallCheck(this, UnclickableBlotSpec);
19787
+ var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
19788
+ var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
19797
19789
 
19798
- var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
19790
+ var UnclickableBlotSpec$1 = function (_BlotSpec) {
19791
+ _inherits(UnclickableBlotSpec, _BlotSpec);
19799
19792
 
19800
- _this.onTextChange = function () {
19801
- Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
19802
- unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
19803
- unclickable.addEventListener('mouseenter', _this.onMouseEnter);
19804
- });
19805
- };
19793
+ function UnclickableBlotSpec(formatter, selector) {
19794
+ _classCallCheck(this, UnclickableBlotSpec);
19806
19795
 
19807
- _this.onMouseEnter = function (event) {
19808
- var unclickable = event.target;
19809
- if (!(unclickable instanceof HTMLElement)) {
19810
- return;
19811
- }
19796
+ var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
19812
19797
 
19813
- _this.nextUnclickable = unclickable;
19814
- _this.repositionProxyImage(_this.nextUnclickable);
19815
- };
19798
+ _this.onTextChange = function () {
19799
+ Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
19800
+ unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
19801
+ unclickable.addEventListener('mouseenter', _this.onMouseEnter);
19802
+ });
19803
+ };
19816
19804
 
19817
- _this.onProxyImageClick = function () {
19818
- _this.unclickable = _this.nextUnclickable;
19819
- _this.nextUnclickable = null;
19820
- _this.formatter.show(_this);
19821
- _this.hideProxyImage();
19822
- };
19805
+ _this.onMouseEnter = function (event) {
19806
+ var unclickable = event.target;
19807
+ if (!(unclickable instanceof HTMLElement)) {
19808
+ return;
19809
+ }
19823
19810
 
19824
- _this.selector = selector;
19825
- _this.unclickable = null;
19826
- _this.nextUnclickable = null;
19827
- return _this;
19828
- }
19811
+ _this.nextUnclickable = unclickable;
19812
+ _this.repositionProxyImage(_this.nextUnclickable);
19813
+ };
19829
19814
 
19830
- _createClass(UnclickableBlotSpec, [{
19831
- key: 'init',
19832
- value: function init() {
19833
- if (document.body) {
19834
- /*
19835
- it's important that this is attached to the body instead of the root quill element.
19836
- this prevents the click event from overlapping with ImageSpec
19837
- */
19838
- document.body.appendChild(this.createProxyImage());
19839
- }
19815
+ _this.onProxyImageClick = function () {
19816
+ _this.unclickable = _this.nextUnclickable;
19817
+ _this.nextUnclickable = null;
19818
+ _this.formatter.show(_this);
19819
+ _this.hideProxyImage();
19820
+ };
19840
19821
 
19841
- this.hideProxyImage();
19842
- this.proxyImage.addEventListener('click', this.onProxyImageClick);
19843
- this.formatter.quill.on('text-change', this.onTextChange);
19844
- }
19845
- }, {
19846
- key: 'getTargetElement',
19847
- value: function getTargetElement() {
19848
- return this.unclickable;
19849
- }
19850
- }, {
19851
- key: 'getOverlayElement',
19852
- value: function getOverlayElement() {
19853
- return this.unclickable;
19854
- }
19855
- }, {
19856
- key: 'onHide',
19857
- value: function onHide() {
19858
- this.hideProxyImage();
19859
- this.nextUnclickable = null;
19860
- this.unclickable = null;
19861
- }
19862
- }, {
19863
- key: 'createProxyImage',
19864
- value: function createProxyImage() {
19865
- var canvas = document.createElement('canvas');
19866
- var context = canvas.getContext('2d');
19867
- context.globalAlpha = 0;
19868
- context.fillRect(0, 0, 1, 1);
19869
-
19870
- this.proxyImage = document.createElement('img');
19871
- this.proxyImage.src = canvas.toDataURL('image/png');
19872
- this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
19873
-
19874
- Object.assign(this.proxyImage.style, {
19875
- position: 'absolute',
19876
- margin: '0'
19877
- });
19822
+ _this.selector = selector;
19823
+ _this.unclickable = null;
19824
+ _this.nextUnclickable = null;
19825
+ return _this;
19826
+ }
19878
19827
 
19879
- return this.proxyImage;
19880
- }
19881
- }, {
19882
- key: 'hideProxyImage',
19883
- value: function hideProxyImage() {
19884
- Object.assign(this.proxyImage.style, {
19885
- display: 'none'
19886
- });
19887
- }
19888
- }, {
19889
- key: 'repositionProxyImage',
19890
- value: function repositionProxyImage(unclickable) {
19891
- var rect = unclickable.getBoundingClientRect();
19892
-
19893
- Object.assign(this.proxyImage.style, {
19894
- display: 'block',
19895
- left: rect.left + window.pageXOffset + 'px',
19896
- top: rect.top + window.pageYOffset + 'px',
19897
- width: rect.width + 'px',
19898
- height: rect.height + 'px'
19899
- });
19900
- }
19901
- }]);
19828
+ _createClass(UnclickableBlotSpec, [{
19829
+ key: 'init',
19830
+ value: function init() {
19831
+ if (document.body) {
19832
+ /*
19833
+ it's important that this is attached to the body instead of the root quill element.
19834
+ this prevents the click event from overlapping with ImageSpec
19835
+ */
19836
+ document.body.appendChild(this.createProxyImage());
19837
+ }
19902
19838
 
19903
- return UnclickableBlotSpec;
19904
- }(_BlotSpec3.default);
19839
+ this.hideProxyImage();
19840
+ this.proxyImage.addEventListener('click', this.onProxyImageClick);
19841
+ this.formatter.quill.on('text-change', this.onTextChange);
19842
+ }
19843
+ }, {
19844
+ key: 'getTargetElement',
19845
+ value: function getTargetElement() {
19846
+ return this.unclickable;
19847
+ }
19848
+ }, {
19849
+ key: 'getOverlayElement',
19850
+ value: function getOverlayElement() {
19851
+ return this.unclickable;
19852
+ }
19853
+ }, {
19854
+ key: 'onHide',
19855
+ value: function onHide() {
19856
+ this.hideProxyImage();
19857
+ this.nextUnclickable = null;
19858
+ this.unclickable = null;
19859
+ }
19860
+ }, {
19861
+ key: 'createProxyImage',
19862
+ value: function createProxyImage() {
19863
+ var canvas = document.createElement('canvas');
19864
+ var context = canvas.getContext('2d');
19865
+ context.globalAlpha = 0;
19866
+ context.fillRect(0, 0, 1, 1);
19867
+
19868
+ this.proxyImage = document.createElement('img');
19869
+ this.proxyImage.src = canvas.toDataURL('image/png');
19870
+ this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
19871
+
19872
+ Object.assign(this.proxyImage.style, {
19873
+ position: 'absolute',
19874
+ margin: '0'
19875
+ });
19876
+
19877
+ return this.proxyImage;
19878
+ }
19879
+ }, {
19880
+ key: 'hideProxyImage',
19881
+ value: function hideProxyImage() {
19882
+ Object.assign(this.proxyImage.style, {
19883
+ display: 'none'
19884
+ });
19885
+ }
19886
+ }, {
19887
+ key: 'repositionProxyImage',
19888
+ value: function repositionProxyImage(unclickable) {
19889
+ var rect = unclickable.getBoundingClientRect();
19890
+
19891
+ Object.assign(this.proxyImage.style, {
19892
+ display: 'block',
19893
+ left: rect.left + window.pageXOffset + 'px',
19894
+ top: rect.top + window.pageYOffset + 'px',
19895
+ width: rect.width + 'px',
19896
+ height: rect.height + 'px'
19897
+ });
19898
+ }
19899
+ }]);
19900
+
19901
+ return UnclickableBlotSpec;
19902
+ }(_BlotSpec3.default);
19905
19903
 
19906
- UnclickableBlotSpec$1.default = UnclickableBlotSpec;
19904
+ UnclickableBlotSpec.default = UnclickableBlotSpec$1;
19905
+ return UnclickableBlotSpec;
19906
+ }
19907
19907
 
19908
19908
  var hasRequiredIframeVideoSpec;
19909
19909
 
@@ -19915,7 +19915,7 @@
19915
19915
  value: true
19916
19916
  });
19917
19917
 
19918
- var _UnclickableBlotSpec2 = UnclickableBlotSpec$1;
19918
+ var _UnclickableBlotSpec2 = requireUnclickableBlotSpec();
19919
19919
 
19920
19920
  var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
19921
19921
 
@@ -20115,7 +20115,7 @@
20115
20115
  }
20116
20116
  });
20117
20117
 
20118
- var _ResizeAction = requireResizeAction();
20118
+ var _ResizeAction = ResizeAction$1;
20119
20119
 
20120
20120
  Object.defineProperty(exports, 'ResizeAction', {
20121
20121
  enumerable: true,
@@ -20142,7 +20142,7 @@
20142
20142
  }
20143
20143
  });
20144
20144
 
20145
- var _UnclickableBlotSpec = UnclickableBlotSpec$1;
20145
+ var _UnclickableBlotSpec = requireUnclickableBlotSpec();
20146
20146
 
20147
20147
  Object.defineProperty(exports, 'UnclickableBlotSpec', {
20148
20148
  enumerable: true,
@@ -20237,11 +20237,14 @@
20237
20237
  }
20238
20238
  };
20239
20239
  const registerBlotFormatter = () => {
20240
+ var _a;
20240
20241
  if (!enableImageResize) {
20241
20242
  return;
20242
20243
  }
20243
20244
  try {
20244
- Quill.register('modules/blotFormatter', BlotFormatter);
20245
+ if (!((_a = Quill.imports) === null || _a === void 0 ? void 0 : _a['modules/blotFormatter'])) {
20246
+ Quill.register('modules/blotFormatter', BlotFormatter);
20247
+ }
20245
20248
  }
20246
20249
  catch (error) {
20247
20250
  console.warn('注册BlotFormatter模块时出错:', error);
@@ -20593,6 +20596,12 @@
20593
20596
  const toolbarClickHandler = (event) => {
20594
20597
  var _a;
20595
20598
  const target = event.target;
20599
+ const isCustomLinkClick = target.closest('.ql-custom-link') ||
20600
+ target.closest('.custom-link-input') ||
20601
+ target.closest('.custom-link-btn');
20602
+ if (isCustomLinkClick) {
20603
+ return;
20604
+ }
20596
20605
  const clickedEditorContainer = target.closest('.quill-editor-container');
20597
20606
  if (clickedEditorContainer) {
20598
20607
  const currentEditorContainer = (_a = editor.value) === null || _a === void 0 ? void 0 : _a.closest('.quill-editor-container');
@@ -20609,8 +20618,14 @@
20609
20618
  };
20610
20619
  addClickHandler(toolbarClickHandler);
20611
20620
  addClickHandler(handleBlotFormatterClick);
20612
- addClickHandler(() => {
20613
- handleCustomLink(false);
20621
+ addClickHandler((event) => {
20622
+ const target = event.target;
20623
+ const isCustomLinkClick = target.closest('.ql-custom-link') ||
20624
+ target.closest('.custom-link-input') ||
20625
+ target.closest('.custom-link-btn');
20626
+ if (!isCustomLinkClick) {
20627
+ handleCustomLink(false);
20628
+ }
20614
20629
  });
20615
20630
  updateHistoryState();
20616
20631
  const toolbarDom = (_a = quill.getModule('toolbar')) === null || _a === void 0 ? void 0 : _a.container;