pxx-vue-quill 1.0.103 → 1.0.104

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-10T02:20:30.800Z
10
+ * Date: 2025-09-10T02:22:02.488Z
11
11
  */
12
12
  (function (global, factory) {
13
13
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
@@ -18993,11 +18993,11 @@
18993
18993
  value: true
18994
18994
  });
18995
18995
 
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; }; }();
18996
+ 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; }; }();
18997
18997
 
18998
18998
  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
18999
 
19000
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19000
+ function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19001
19001
 
19002
19002
  var LEFT_ALIGN = 'left';
19003
19003
  var CENTER_ALIGN = 'center';
@@ -19008,7 +19008,7 @@
19008
19008
  var _this = this,
19009
19009
  _alignments;
19010
19010
 
19011
- _classCallCheck(this, DefaultAligner);
19011
+ _classCallCheck$1(this, DefaultAligner);
19012
19012
 
19013
19013
  this.applyStyle = options.aligner.applyStyle;
19014
19014
  this.alignAttribute = options.attribute;
@@ -19036,7 +19036,7 @@
19036
19036
  }), _alignments);
19037
19037
  }
19038
19038
 
19039
- _createClass(DefaultAligner, [{
19039
+ _createClass$1(DefaultAligner, [{
19040
19040
  key: 'getAlignments',
19041
19041
  value: function getAlignments() {
19042
19042
  var _this2 = this;
@@ -19339,190 +19339,182 @@
19339
19339
  return AlignAction;
19340
19340
  }
19341
19341
 
19342
- var ResizeAction = {};
19342
+ var ResizeAction$1 = {};
19343
19343
 
19344
- var hasRequiredResizeAction;
19345
-
19346
- function requireResizeAction () {
19347
- if (hasRequiredResizeAction) return ResizeAction;
19348
- hasRequiredResizeAction = 1;
19344
+ Object.defineProperty(ResizeAction$1, "__esModule", {
19345
+ value: true
19346
+ });
19349
19347
 
19350
- Object.defineProperty(ResizeAction, "__esModule", {
19351
- value: true
19352
- });
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; }; }();
19353
19349
 
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; }; }();
19350
+ var _Action2 = requireAction();
19355
19351
 
19356
- var _Action2 = requireAction();
19352
+ var _Action3 = _interopRequireDefault(_Action2);
19357
19353
 
19358
- var _Action3 = _interopRequireDefault(_Action2);
19354
+ var _BlotFormatter = requireBlotFormatter();
19359
19355
 
19360
- var _BlotFormatter = requireBlotFormatter();
19356
+ _interopRequireDefault(_BlotFormatter);
19361
19357
 
19362
- _interopRequireDefault(_BlotFormatter);
19358
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19363
19359
 
19364
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19365
-
19366
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19360
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19367
19361
 
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; }
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; }
19369
19363
 
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; }
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; }
19371
19365
 
19372
- var ResizeAction$1 = function (_Action) {
19373
- _inherits(ResizeAction, _Action);
19366
+ var ResizeAction = function (_Action) {
19367
+ _inherits(ResizeAction, _Action);
19374
19368
 
19375
- function ResizeAction(formatter) {
19376
- _classCallCheck(this, ResizeAction);
19369
+ function ResizeAction(formatter) {
19370
+ _classCallCheck(this, ResizeAction);
19377
19371
 
19378
- var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
19372
+ var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
19379
19373
 
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);
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);
19386
19380
 
19387
- if (!_this.formatter.currentSpec) {
19388
- return;
19389
- }
19381
+ if (!_this.formatter.currentSpec) {
19382
+ return;
19383
+ }
19390
19384
 
19391
- var target = _this.formatter.currentSpec.getTargetElement();
19392
- if (!target) {
19393
- return;
19394
- }
19385
+ var target = _this.formatter.currentSpec.getTargetElement();
19386
+ if (!target) {
19387
+ return;
19388
+ }
19395
19389
 
19396
- var rect = target.getBoundingClientRect();
19390
+ var rect = target.getBoundingClientRect();
19397
19391
 
19398
- _this.dragStartX = event.clientX;
19399
- _this.preDragWidth = rect.width;
19400
- _this.targetRatio = rect.height / rect.width;
19392
+ _this.dragStartX = event.clientX;
19393
+ _this.preDragWidth = rect.width;
19394
+ _this.targetRatio = rect.height / rect.width;
19401
19395
 
19402
- document.addEventListener('mousemove', _this.onDrag);
19403
- document.addEventListener('mouseup', _this.onMouseUp);
19404
- };
19396
+ document.addEventListener('mousemove', _this.onDrag);
19397
+ document.addEventListener('mouseup', _this.onMouseUp);
19398
+ };
19405
19399
 
19406
- _this.onDrag = function (event) {
19407
- if (!_this.formatter.currentSpec) {
19408
- return;
19409
- }
19400
+ _this.onDrag = function (event) {
19401
+ if (!_this.formatter.currentSpec) {
19402
+ return;
19403
+ }
19410
19404
 
19411
- var target = _this.formatter.currentSpec.getTargetElement();
19412
- if (!target) {
19413
- return;
19414
- }
19405
+ var target = _this.formatter.currentSpec.getTargetElement();
19406
+ if (!target) {
19407
+ return;
19408
+ }
19415
19409
 
19416
- var deltaX = event.clientX - _this.dragStartX;
19417
- var newWidth = 0;
19410
+ var deltaX = event.clientX - _this.dragStartX;
19411
+ var newWidth = 0;
19418
19412
 
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
- }
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
+ }
19424
19418
 
19425
- var newHeight = _this.targetRatio * newWidth;
19419
+ var newHeight = _this.targetRatio * newWidth;
19426
19420
 
19427
- target.setAttribute('width', '' + newWidth);
19428
- target.setAttribute('height', '' + newHeight);
19421
+ target.setAttribute('width', '' + newWidth);
19422
+ target.setAttribute('height', '' + newHeight);
19429
19423
 
19430
- _this.formatter.update();
19431
- };
19424
+ _this.formatter.update();
19425
+ };
19432
19426
 
19433
- _this.onMouseUp = function () {
19434
- _this.setCursor('');
19435
- document.removeEventListener('mousemove', _this.onDrag);
19436
- document.removeEventListener('mouseup', _this.onMouseUp);
19437
- };
19427
+ _this.onMouseUp = function () {
19428
+ _this.setCursor('');
19429
+ document.removeEventListener('mousemove', _this.onDrag);
19430
+ document.removeEventListener('mouseup', _this.onMouseUp);
19431
+ };
19438
19432
 
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
- }
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
+ }
19449
19443
 
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);
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);
19457
19451
 
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
- }
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
+ }
19480
19474
 
19481
- box.addEventListener('mousedown', this.onMouseDown);
19475
+ box.addEventListener('mousedown', this.onMouseDown);
19482
19476
 
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
- }
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
+ }
19498
19492
 
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
- }
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
+ }
19510
19504
 
19511
- if (this.formatter.currentSpec) {
19512
- var target = this.formatter.currentSpec.getOverlayElement();
19513
- if (target) {
19514
- target.style.cursor = value;
19515
- }
19516
- }
19517
- }
19518
- }]);
19505
+ if (this.formatter.currentSpec) {
19506
+ var target = this.formatter.currentSpec.getOverlayElement();
19507
+ if (target) {
19508
+ target.style.cursor = value;
19509
+ }
19510
+ }
19511
+ }
19512
+ }]);
19519
19513
 
19520
- return ResizeAction;
19521
- }(_Action3.default);
19514
+ return ResizeAction;
19515
+ }(_Action3.default);
19522
19516
 
19523
- ResizeAction.default = ResizeAction$1;
19524
- return ResizeAction;
19525
- }
19517
+ ResizeAction$1.default = ResizeAction;
19526
19518
 
19527
19519
  var DeleteAction = {};
19528
19520
 
@@ -19629,7 +19621,7 @@
19629
19621
 
19630
19622
  var _AlignAction2 = _interopRequireDefault(_AlignAction);
19631
19623
 
19632
- var _ResizeAction = requireResizeAction();
19624
+ var _ResizeAction = ResizeAction$1;
19633
19625
 
19634
19626
  var _ResizeAction2 = _interopRequireDefault(_ResizeAction);
19635
19627
 
@@ -20122,7 +20114,7 @@
20122
20114
  }
20123
20115
  });
20124
20116
 
20125
- var _ResizeAction = requireResizeAction();
20117
+ var _ResizeAction = ResizeAction$1;
20126
20118
 
20127
20119
  Object.defineProperty(exports, 'ResizeAction', {
20128
20120
  enumerable: true,
@@ -20921,19 +20913,10 @@
20921
20913
  addLinkClickListener();
20922
20914
  const toolbarClickHandler = (event) => {
20923
20915
  const target = event.target;
20924
- const clickedEditorContainer = target.closest('.quill-editor-container');
20925
- if (clickedEditorContainer) {
20926
- const currentEditorContainer = editor.value && editor.value.closest('.quill-editor-container');
20927
- if (clickedEditorContainer === currentEditorContainer) {
20928
- controlToolbarVisible(true);
20929
- }
20930
- else {
20931
- controlToolbarVisible(false);
20932
- }
20933
- }
20934
- else {
20935
- controlToolbarVisible(false);
20916
+ if (target.closest('.quill-editor-container')) {
20917
+ return;
20936
20918
  }
20919
+ controlToolbarVisible(false);
20937
20920
  };
20938
20921
  addClickHandler(toolbarClickHandler);
20939
20922
  addClickHandler(handleBlotFormatterClick);