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.
- package/dist/vue-quill.umd.js +150 -167
- package/dist/vue-quill.umd.prod.js +2 -2
- package/package.json +1 -1
package/dist/vue-quill.umd.js
CHANGED
|
@@ -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:
|
|
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
|
-
|
|
19345
|
-
|
|
19346
|
-
|
|
19347
|
-
if (hasRequiredResizeAction) return ResizeAction;
|
|
19348
|
-
hasRequiredResizeAction = 1;
|
|
19344
|
+
Object.defineProperty(ResizeAction$1, "__esModule", {
|
|
19345
|
+
value: true
|
|
19346
|
+
});
|
|
19349
19347
|
|
|
19350
|
-
|
|
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
|
-
|
|
19350
|
+
var _Action2 = requireAction();
|
|
19355
19351
|
|
|
19356
|
-
|
|
19352
|
+
var _Action3 = _interopRequireDefault(_Action2);
|
|
19357
19353
|
|
|
19358
|
-
|
|
19354
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19359
19355
|
|
|
19360
|
-
|
|
19356
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19361
19357
|
|
|
19362
|
-
|
|
19358
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19363
19359
|
|
|
19364
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
19373
|
-
|
|
19366
|
+
var ResizeAction = function (_Action) {
|
|
19367
|
+
_inherits(ResizeAction, _Action);
|
|
19374
19368
|
|
|
19375
|
-
|
|
19376
|
-
|
|
19369
|
+
function ResizeAction(formatter) {
|
|
19370
|
+
_classCallCheck(this, ResizeAction);
|
|
19377
19371
|
|
|
19378
|
-
|
|
19372
|
+
var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
|
|
19379
19373
|
|
|
19380
|
-
|
|
19381
|
-
|
|
19382
|
-
|
|
19383
|
-
|
|
19384
|
-
|
|
19385
|
-
|
|
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
|
-
|
|
19388
|
-
|
|
19389
|
-
|
|
19381
|
+
if (!_this.formatter.currentSpec) {
|
|
19382
|
+
return;
|
|
19383
|
+
}
|
|
19390
19384
|
|
|
19391
|
-
|
|
19392
|
-
|
|
19393
|
-
|
|
19394
|
-
|
|
19385
|
+
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19386
|
+
if (!target) {
|
|
19387
|
+
return;
|
|
19388
|
+
}
|
|
19395
19389
|
|
|
19396
|
-
|
|
19390
|
+
var rect = target.getBoundingClientRect();
|
|
19397
19391
|
|
|
19398
|
-
|
|
19399
|
-
|
|
19400
|
-
|
|
19392
|
+
_this.dragStartX = event.clientX;
|
|
19393
|
+
_this.preDragWidth = rect.width;
|
|
19394
|
+
_this.targetRatio = rect.height / rect.width;
|
|
19401
19395
|
|
|
19402
|
-
|
|
19403
|
-
|
|
19404
|
-
|
|
19396
|
+
document.addEventListener('mousemove', _this.onDrag);
|
|
19397
|
+
document.addEventListener('mouseup', _this.onMouseUp);
|
|
19398
|
+
};
|
|
19405
19399
|
|
|
19406
|
-
|
|
19407
|
-
|
|
19408
|
-
|
|
19409
|
-
|
|
19400
|
+
_this.onDrag = function (event) {
|
|
19401
|
+
if (!_this.formatter.currentSpec) {
|
|
19402
|
+
return;
|
|
19403
|
+
}
|
|
19410
19404
|
|
|
19411
|
-
|
|
19412
|
-
|
|
19413
|
-
|
|
19414
|
-
|
|
19405
|
+
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19406
|
+
if (!target) {
|
|
19407
|
+
return;
|
|
19408
|
+
}
|
|
19415
19409
|
|
|
19416
|
-
|
|
19417
|
-
|
|
19410
|
+
var deltaX = event.clientX - _this.dragStartX;
|
|
19411
|
+
var newWidth = 0;
|
|
19418
19412
|
|
|
19419
|
-
|
|
19420
|
-
|
|
19421
|
-
|
|
19422
|
-
|
|
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
|
-
|
|
19419
|
+
var newHeight = _this.targetRatio * newWidth;
|
|
19426
19420
|
|
|
19427
|
-
|
|
19428
|
-
|
|
19421
|
+
target.setAttribute('width', '' + newWidth);
|
|
19422
|
+
target.setAttribute('height', '' + newHeight);
|
|
19429
19423
|
|
|
19430
|
-
|
|
19431
|
-
|
|
19424
|
+
_this.formatter.update();
|
|
19425
|
+
};
|
|
19432
19426
|
|
|
19433
|
-
|
|
19434
|
-
|
|
19435
|
-
|
|
19436
|
-
|
|
19437
|
-
|
|
19427
|
+
_this.onMouseUp = function () {
|
|
19428
|
+
_this.setCursor('');
|
|
19429
|
+
document.removeEventListener('mousemove', _this.onDrag);
|
|
19430
|
+
document.removeEventListener('mouseup', _this.onMouseUp);
|
|
19431
|
+
};
|
|
19438
19432
|
|
|
19439
|
-
|
|
19440
|
-
|
|
19441
|
-
|
|
19442
|
-
|
|
19443
|
-
|
|
19444
|
-
|
|
19445
|
-
|
|
19446
|
-
|
|
19447
|
-
|
|
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
|
-
|
|
19451
|
-
|
|
19452
|
-
|
|
19453
|
-
|
|
19454
|
-
|
|
19455
|
-
|
|
19456
|
-
|
|
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
|
-
|
|
19459
|
-
|
|
19460
|
-
|
|
19461
|
-
|
|
19462
|
-
|
|
19463
|
-
|
|
19464
|
-
|
|
19465
|
-
|
|
19466
|
-
|
|
19467
|
-
|
|
19468
|
-
|
|
19469
|
-
|
|
19470
|
-
|
|
19471
|
-
|
|
19472
|
-
|
|
19473
|
-
|
|
19474
|
-
|
|
19475
|
-
|
|
19476
|
-
|
|
19477
|
-
|
|
19478
|
-
|
|
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
|
-
|
|
19475
|
+
box.addEventListener('mousedown', this.onMouseDown);
|
|
19482
19476
|
|
|
19483
|
-
|
|
19484
|
-
|
|
19485
|
-
|
|
19486
|
-
|
|
19487
|
-
|
|
19488
|
-
|
|
19489
|
-
|
|
19490
|
-
|
|
19491
|
-
|
|
19492
|
-
|
|
19493
|
-
|
|
19494
|
-
|
|
19495
|
-
|
|
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
|
-
|
|
19500
|
-
|
|
19501
|
-
|
|
19502
|
-
|
|
19503
|
-
|
|
19504
|
-
|
|
19505
|
-
|
|
19506
|
-
|
|
19507
|
-
|
|
19508
|
-
|
|
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
|
-
|
|
19512
|
-
|
|
19513
|
-
|
|
19514
|
-
|
|
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
|
-
|
|
19521
|
-
|
|
19514
|
+
return ResizeAction;
|
|
19515
|
+
}(_Action3.default);
|
|
19522
19516
|
|
|
19523
|
-
|
|
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 =
|
|
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 =
|
|
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
|
-
|
|
20925
|
-
|
|
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);
|