pxx-vue-quill 1.0.99 → 1.0.101

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