pxx-vue-quill 1.0.122 → 1.0.124

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Copyright (c) 2025 Pxx-Team
9
9
  * Released under the MIT license
10
- * Date: 2025-09-10T04:28:14.557Z
10
+ * Date: 2025-09-10T06:17:09.563Z
11
11
  */
12
12
  (function (global, factory) {
13
13
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
@@ -18769,44 +18769,52 @@
18769
18769
 
18770
18770
  var require$$0 = /*@__PURE__*/getAugmentedNamespace(es);
18771
18771
 
18772
- var Action$1 = {};
18772
+ var Action = {};
18773
18773
 
18774
- Object.defineProperty(Action$1, "__esModule", {
18775
- value: true
18776
- });
18774
+ var hasRequiredAction;
18777
18775
 
18778
- var _createClass$3 = 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; }; }();
18776
+ function requireAction () {
18777
+ if (hasRequiredAction) return Action;
18778
+ hasRequiredAction = 1;
18779
18779
 
18780
- var _BlotFormatter$2 = requireBlotFormatter();
18780
+ Object.defineProperty(Action, "__esModule", {
18781
+ value: true
18782
+ });
18781
18783
 
18782
- _interopRequireDefault$2(_BlotFormatter$2);
18784
+ 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; }; }();
18783
18785
 
18784
- function _interopRequireDefault$2(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18786
+ var _BlotFormatter = requireBlotFormatter();
18785
18787
 
18786
- function _classCallCheck$3(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18788
+ _interopRequireDefault(_BlotFormatter);
18787
18789
 
18788
- var Action = function () {
18789
- function Action(formatter) {
18790
- _classCallCheck$3(this, Action);
18790
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18791
18791
 
18792
- this.formatter = formatter;
18793
- }
18792
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18794
18793
 
18795
- _createClass$3(Action, [{
18796
- key: 'onCreate',
18797
- value: function onCreate() {}
18798
- }, {
18799
- key: 'onDestroy',
18800
- value: function onDestroy() {}
18801
- }, {
18802
- key: 'onUpdate',
18803
- value: function onUpdate() {}
18804
- }]);
18794
+ var Action$1 = function () {
18795
+ function Action(formatter) {
18796
+ _classCallCheck(this, Action);
18805
18797
 
18806
- return Action;
18807
- }();
18798
+ this.formatter = formatter;
18799
+ }
18800
+
18801
+ _createClass(Action, [{
18802
+ key: 'onCreate',
18803
+ value: function onCreate() {}
18804
+ }, {
18805
+ key: 'onDestroy',
18806
+ value: function onDestroy() {}
18807
+ }, {
18808
+ key: 'onUpdate',
18809
+ value: function onUpdate() {}
18810
+ }]);
18808
18811
 
18809
- Action$1.default = Action;
18812
+ return Action;
18813
+ }();
18814
+
18815
+ Action.default = Action$1;
18816
+ return Action;
18817
+ }
18810
18818
 
18811
18819
  var hasRequiredBlotFormatter;
18812
18820
 
@@ -18828,7 +18836,7 @@
18828
18836
 
18829
18837
  var _Options2 = _interopRequireDefault(_Options);
18830
18838
 
18831
- var _Action = Action$1;
18839
+ var _Action = requireAction();
18832
18840
 
18833
18841
  _interopRequireDefault(_Action);
18834
18842
 
@@ -18986,11 +18994,11 @@
18986
18994
  value: true
18987
18995
  });
18988
18996
 
18989
- var _createClass$2 = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
18997
+ 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; }; }();
18990
18998
 
18991
18999
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
18992
19000
 
18993
- function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19001
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18994
19002
 
18995
19003
  var LEFT_ALIGN = 'left';
18996
19004
  var CENTER_ALIGN = 'center';
@@ -19001,7 +19009,7 @@
19001
19009
  var _this = this,
19002
19010
  _alignments;
19003
19011
 
19004
- _classCallCheck$2(this, DefaultAligner);
19012
+ _classCallCheck(this, DefaultAligner);
19005
19013
 
19006
19014
  this.applyStyle = options.aligner.applyStyle;
19007
19015
  this.alignAttribute = options.attribute;
@@ -19029,7 +19037,7 @@
19029
19037
  }), _alignments);
19030
19038
  }
19031
19039
 
19032
- _createClass$2(DefaultAligner, [{
19040
+ _createClass(DefaultAligner, [{
19033
19041
  key: 'getAlignments',
19034
19042
  value: function getAlignments() {
19035
19043
  var _this2 = this;
@@ -19267,7 +19275,7 @@
19267
19275
 
19268
19276
  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; }; }();
19269
19277
 
19270
- var _Action2 = Action$1;
19278
+ var _Action2 = requireAction();
19271
19279
 
19272
19280
  var _Action3 = _interopRequireDefault(_Action2);
19273
19281
 
@@ -19332,182 +19340,190 @@
19332
19340
  return AlignAction;
19333
19341
  }
19334
19342
 
19335
- var ResizeAction$1 = {};
19343
+ var ResizeAction = {};
19336
19344
 
19337
- Object.defineProperty(ResizeAction$1, "__esModule", {
19338
- value: true
19339
- });
19345
+ var hasRequiredResizeAction;
19340
19346
 
19341
- 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; }; }();
19347
+ function requireResizeAction () {
19348
+ if (hasRequiredResizeAction) return ResizeAction;
19349
+ hasRequiredResizeAction = 1;
19342
19350
 
19343
- var _Action2 = Action$1;
19351
+ Object.defineProperty(ResizeAction, "__esModule", {
19352
+ value: true
19353
+ });
19344
19354
 
19345
- var _Action3 = _interopRequireDefault$1(_Action2);
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; }; }();
19346
19356
 
19347
- var _BlotFormatter$1 = requireBlotFormatter();
19357
+ var _Action2 = requireAction();
19348
19358
 
19349
- _interopRequireDefault$1(_BlotFormatter$1);
19359
+ var _Action3 = _interopRequireDefault(_Action2);
19350
19360
 
19351
- function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19361
+ var _BlotFormatter = requireBlotFormatter();
19352
19362
 
19353
- function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19363
+ _interopRequireDefault(_BlotFormatter);
19354
19364
 
19355
- function _possibleConstructorReturn$1(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
19365
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19356
19366
 
19357
- function _inherits$1(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
19367
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19358
19368
 
19359
- var ResizeAction = function (_Action) {
19360
- _inherits$1(ResizeAction, _Action);
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; }
19361
19370
 
19362
- function ResizeAction(formatter) {
19363
- _classCallCheck$1(this, ResizeAction);
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; }
19364
19372
 
19365
- var _this = _possibleConstructorReturn$1(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
19373
+ var ResizeAction$1 = function (_Action) {
19374
+ _inherits(ResizeAction, _Action);
19366
19375
 
19367
- _this.onMouseDown = function (event) {
19368
- if (!(event.target instanceof HTMLElement)) {
19369
- return;
19370
- }
19371
- _this.dragHandle = event.target;
19372
- _this.setCursor(_this.dragHandle.style.cursor);
19376
+ function ResizeAction(formatter) {
19377
+ _classCallCheck(this, ResizeAction);
19373
19378
 
19374
- if (!_this.formatter.currentSpec) {
19375
- return;
19376
- }
19379
+ var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
19377
19380
 
19378
- var target = _this.formatter.currentSpec.getTargetElement();
19379
- if (!target) {
19380
- return;
19381
- }
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);
19382
19387
 
19383
- var rect = target.getBoundingClientRect();
19388
+ if (!_this.formatter.currentSpec) {
19389
+ return;
19390
+ }
19384
19391
 
19385
- _this.dragStartX = event.clientX;
19386
- _this.preDragWidth = rect.width;
19387
- _this.targetRatio = rect.height / rect.width;
19392
+ var target = _this.formatter.currentSpec.getTargetElement();
19393
+ if (!target) {
19394
+ return;
19395
+ }
19388
19396
 
19389
- document.addEventListener('mousemove', _this.onDrag);
19390
- document.addEventListener('mouseup', _this.onMouseUp);
19391
- };
19397
+ var rect = target.getBoundingClientRect();
19392
19398
 
19393
- _this.onDrag = function (event) {
19394
- if (!_this.formatter.currentSpec) {
19395
- return;
19396
- }
19399
+ _this.dragStartX = event.clientX;
19400
+ _this.preDragWidth = rect.width;
19401
+ _this.targetRatio = rect.height / rect.width;
19397
19402
 
19398
- var target = _this.formatter.currentSpec.getTargetElement();
19399
- if (!target) {
19400
- return;
19401
- }
19403
+ document.addEventListener('mousemove', _this.onDrag);
19404
+ document.addEventListener('mouseup', _this.onMouseUp);
19405
+ };
19402
19406
 
19403
- var deltaX = event.clientX - _this.dragStartX;
19404
- var newWidth = 0;
19407
+ _this.onDrag = function (event) {
19408
+ if (!_this.formatter.currentSpec) {
19409
+ return;
19410
+ }
19405
19411
 
19406
- if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
19407
- newWidth = Math.round(_this.preDragWidth - deltaX);
19408
- } else {
19409
- newWidth = Math.round(_this.preDragWidth + deltaX);
19410
- }
19412
+ var target = _this.formatter.currentSpec.getTargetElement();
19413
+ if (!target) {
19414
+ return;
19415
+ }
19411
19416
 
19412
- var newHeight = _this.targetRatio * newWidth;
19417
+ var deltaX = event.clientX - _this.dragStartX;
19418
+ var newWidth = 0;
19413
19419
 
19414
- target.setAttribute('width', '' + newWidth);
19415
- target.setAttribute('height', '' + newHeight);
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
+ }
19416
19425
 
19417
- _this.formatter.update();
19418
- };
19426
+ var newHeight = _this.targetRatio * newWidth;
19419
19427
 
19420
- _this.onMouseUp = function () {
19421
- _this.setCursor('');
19422
- document.removeEventListener('mousemove', _this.onDrag);
19423
- document.removeEventListener('mouseup', _this.onMouseUp);
19424
- };
19428
+ target.setAttribute('width', '' + newWidth);
19429
+ target.setAttribute('height', '' + newHeight);
19425
19430
 
19426
- _this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
19427
- _this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
19428
- _this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
19429
- _this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
19430
- _this.dragHandle = null;
19431
- _this.dragStartX = 0;
19432
- _this.preDragWidth = 0;
19433
- _this.targetRatio = 0;
19434
- return _this;
19435
- }
19431
+ _this.formatter.update();
19432
+ };
19436
19433
 
19437
- _createClass$1(ResizeAction, [{
19438
- key: 'onCreate',
19439
- value: function onCreate() {
19440
- this.formatter.overlay.appendChild(this.topLeftHandle);
19441
- this.formatter.overlay.appendChild(this.topRightHandle);
19442
- this.formatter.overlay.appendChild(this.bottomRightHandle);
19443
- this.formatter.overlay.appendChild(this.bottomLeftHandle);
19434
+ _this.onMouseUp = function () {
19435
+ _this.setCursor('');
19436
+ document.removeEventListener('mousemove', _this.onDrag);
19437
+ document.removeEventListener('mouseup', _this.onMouseUp);
19438
+ };
19444
19439
 
19445
- this.repositionHandles(this.formatter.options.resize.handleStyle);
19446
- }
19447
- }, {
19448
- key: 'onDestroy',
19449
- value: function onDestroy() {
19450
- this.setCursor('');
19451
- this.formatter.overlay.removeChild(this.topLeftHandle);
19452
- this.formatter.overlay.removeChild(this.topRightHandle);
19453
- this.formatter.overlay.removeChild(this.bottomRightHandle);
19454
- this.formatter.overlay.removeChild(this.bottomLeftHandle);
19455
- }
19456
- }, {
19457
- key: 'createHandle',
19458
- value: function createHandle(position, cursor) {
19459
- var box = document.createElement('div');
19460
- box.classList.add(this.formatter.options.resize.handleClassName);
19461
- box.setAttribute('data-position', position);
19462
- box.style.cursor = cursor;
19463
-
19464
- if (this.formatter.options.resize.handleStyle) {
19465
- Object.assign(box.style, this.formatter.options.resize.handleStyle);
19466
- }
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
+ }
19467
19450
 
19468
- box.addEventListener('mousedown', this.onMouseDown);
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);
19469
19458
 
19470
- return box;
19471
- }
19472
- }, {
19473
- key: 'repositionHandles',
19474
- value: function repositionHandles(handleStyle) {
19475
- var handleXOffset = '0px';
19476
- var handleYOffset = '0px';
19477
- if (handleStyle) {
19478
- if (handleStyle.width) {
19479
- handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
19480
- }
19481
- if (handleStyle.height) {
19482
- handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
19483
- }
19484
- }
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
+ }
19485
19481
 
19486
- Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
19487
- Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
19488
- Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
19489
- Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
19490
- }
19491
- }, {
19492
- key: 'setCursor',
19493
- value: function setCursor(value) {
19494
- if (document.body) {
19495
- document.body.style.cursor = value;
19496
- }
19482
+ box.addEventListener('mousedown', this.onMouseDown);
19497
19483
 
19498
- if (this.formatter.currentSpec) {
19499
- var target = this.formatter.currentSpec.getOverlayElement();
19500
- if (target) {
19501
- target.style.cursor = value;
19502
- }
19503
- }
19504
- }
19505
- }]);
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
+ }
19506
19499
 
19507
- return ResizeAction;
19508
- }(_Action3.default);
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
+ }
19509
19511
 
19510
- ResizeAction$1.default = ResizeAction;
19512
+ if (this.formatter.currentSpec) {
19513
+ var target = this.formatter.currentSpec.getOverlayElement();
19514
+ if (target) {
19515
+ target.style.cursor = value;
19516
+ }
19517
+ }
19518
+ }
19519
+ }]);
19520
+
19521
+ return ResizeAction;
19522
+ }(_Action3.default);
19523
+
19524
+ ResizeAction.default = ResizeAction$1;
19525
+ return ResizeAction;
19526
+ }
19511
19527
 
19512
19528
  var DeleteAction = {};
19513
19529
 
@@ -19527,7 +19543,7 @@
19527
19543
 
19528
19544
  var _quill2 = _interopRequireDefault(_quill);
19529
19545
 
19530
- var _Action2 = Action$1;
19546
+ var _Action2 = requireAction();
19531
19547
 
19532
19548
  var _Action3 = _interopRequireDefault(_Action2);
19533
19549
 
@@ -19606,7 +19622,7 @@
19606
19622
 
19607
19623
  _interopRequireDefault(_BlotFormatter);
19608
19624
 
19609
- var _Action = Action$1;
19625
+ var _Action = requireAction();
19610
19626
 
19611
19627
  _interopRequireDefault(_Action);
19612
19628
 
@@ -19614,7 +19630,7 @@
19614
19630
 
19615
19631
  var _AlignAction2 = _interopRequireDefault(_AlignAction);
19616
19632
 
19617
- var _ResizeAction = ResizeAction$1;
19633
+ var _ResizeAction = requireResizeAction();
19618
19634
 
19619
19635
  var _ResizeAction2 = _interopRequireDefault(_ResizeAction);
19620
19636
 
@@ -19746,148 +19762,156 @@
19746
19762
 
19747
19763
  var IframeVideoSpec = {};
19748
19764
 
19749
- var UnclickableBlotSpec$1 = {};
19765
+ var UnclickableBlotSpec = {};
19750
19766
 
19751
- Object.defineProperty(UnclickableBlotSpec$1, "__esModule", {
19752
- value: true
19753
- });
19767
+ var hasRequiredUnclickableBlotSpec;
19754
19768
 
19755
- 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; }; }();
19769
+ function requireUnclickableBlotSpec () {
19770
+ if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
19771
+ hasRequiredUnclickableBlotSpec = 1;
19756
19772
 
19757
- var _BlotSpec2 = requireBlotSpec();
19773
+ Object.defineProperty(UnclickableBlotSpec, "__esModule", {
19774
+ value: true
19775
+ });
19758
19776
 
19759
- var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
19777
+ 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; }; }();
19760
19778
 
19761
- var _BlotFormatter = requireBlotFormatter();
19779
+ var _BlotSpec2 = requireBlotSpec();
19762
19780
 
19763
- _interopRequireDefault(_BlotFormatter);
19781
+ var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
19764
19782
 
19765
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19783
+ var _BlotFormatter = requireBlotFormatter();
19766
19784
 
19767
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19785
+ _interopRequireDefault(_BlotFormatter);
19768
19786
 
19769
- 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; }
19787
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19770
19788
 
19771
- 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; }
19789
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19772
19790
 
19773
- var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
19774
- var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
19791
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
19775
19792
 
19776
- var UnclickableBlotSpec = function (_BlotSpec) {
19777
- _inherits(UnclickableBlotSpec, _BlotSpec);
19793
+ 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; }
19778
19794
 
19779
- function UnclickableBlotSpec(formatter, selector) {
19780
- _classCallCheck(this, UnclickableBlotSpec);
19795
+ var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
19796
+ var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
19781
19797
 
19782
- var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
19798
+ var UnclickableBlotSpec$1 = function (_BlotSpec) {
19799
+ _inherits(UnclickableBlotSpec, _BlotSpec);
19783
19800
 
19784
- _this.onTextChange = function () {
19785
- Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
19786
- unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
19787
- unclickable.addEventListener('mouseenter', _this.onMouseEnter);
19788
- });
19789
- };
19801
+ function UnclickableBlotSpec(formatter, selector) {
19802
+ _classCallCheck(this, UnclickableBlotSpec);
19790
19803
 
19791
- _this.onMouseEnter = function (event) {
19792
- var unclickable = event.target;
19793
- if (!(unclickable instanceof HTMLElement)) {
19794
- return;
19795
- }
19804
+ var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
19796
19805
 
19797
- _this.nextUnclickable = unclickable;
19798
- _this.repositionProxyImage(_this.nextUnclickable);
19799
- };
19806
+ _this.onTextChange = function () {
19807
+ Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
19808
+ unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
19809
+ unclickable.addEventListener('mouseenter', _this.onMouseEnter);
19810
+ });
19811
+ };
19800
19812
 
19801
- _this.onProxyImageClick = function () {
19802
- _this.unclickable = _this.nextUnclickable;
19803
- _this.nextUnclickable = null;
19804
- _this.formatter.show(_this);
19805
- _this.hideProxyImage();
19806
- };
19813
+ _this.onMouseEnter = function (event) {
19814
+ var unclickable = event.target;
19815
+ if (!(unclickable instanceof HTMLElement)) {
19816
+ return;
19817
+ }
19807
19818
 
19808
- _this.selector = selector;
19809
- _this.unclickable = null;
19810
- _this.nextUnclickable = null;
19811
- return _this;
19812
- }
19819
+ _this.nextUnclickable = unclickable;
19820
+ _this.repositionProxyImage(_this.nextUnclickable);
19821
+ };
19813
19822
 
19814
- _createClass(UnclickableBlotSpec, [{
19815
- key: 'init',
19816
- value: function init() {
19817
- if (document.body) {
19818
- /*
19819
- it's important that this is attached to the body instead of the root quill element.
19820
- this prevents the click event from overlapping with ImageSpec
19821
- */
19822
- document.body.appendChild(this.createProxyImage());
19823
- }
19823
+ _this.onProxyImageClick = function () {
19824
+ _this.unclickable = _this.nextUnclickable;
19825
+ _this.nextUnclickable = null;
19826
+ _this.formatter.show(_this);
19827
+ _this.hideProxyImage();
19828
+ };
19824
19829
 
19825
- this.hideProxyImage();
19826
- this.proxyImage.addEventListener('click', this.onProxyImageClick);
19827
- this.formatter.quill.on('text-change', this.onTextChange);
19828
- }
19829
- }, {
19830
- key: 'getTargetElement',
19831
- value: function getTargetElement() {
19832
- return this.unclickable;
19833
- }
19834
- }, {
19835
- key: 'getOverlayElement',
19836
- value: function getOverlayElement() {
19837
- return this.unclickable;
19838
- }
19839
- }, {
19840
- key: 'onHide',
19841
- value: function onHide() {
19842
- this.hideProxyImage();
19843
- this.nextUnclickable = null;
19844
- this.unclickable = null;
19845
- }
19846
- }, {
19847
- key: 'createProxyImage',
19848
- value: function createProxyImage() {
19849
- var canvas = document.createElement('canvas');
19850
- var context = canvas.getContext('2d');
19851
- context.globalAlpha = 0;
19852
- context.fillRect(0, 0, 1, 1);
19853
-
19854
- this.proxyImage = document.createElement('img');
19855
- this.proxyImage.src = canvas.toDataURL('image/png');
19856
- this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
19857
-
19858
- Object.assign(this.proxyImage.style, {
19859
- position: 'absolute',
19860
- margin: '0'
19861
- });
19830
+ _this.selector = selector;
19831
+ _this.unclickable = null;
19832
+ _this.nextUnclickable = null;
19833
+ return _this;
19834
+ }
19862
19835
 
19863
- return this.proxyImage;
19864
- }
19865
- }, {
19866
- key: 'hideProxyImage',
19867
- value: function hideProxyImage() {
19868
- Object.assign(this.proxyImage.style, {
19869
- display: 'none'
19870
- });
19871
- }
19872
- }, {
19873
- key: 'repositionProxyImage',
19874
- value: function repositionProxyImage(unclickable) {
19875
- var rect = unclickable.getBoundingClientRect();
19876
-
19877
- Object.assign(this.proxyImage.style, {
19878
- display: 'block',
19879
- left: rect.left + window.pageXOffset + 'px',
19880
- top: rect.top + window.pageYOffset + 'px',
19881
- width: rect.width + 'px',
19882
- height: rect.height + 'px'
19883
- });
19884
- }
19885
- }]);
19836
+ _createClass(UnclickableBlotSpec, [{
19837
+ key: 'init',
19838
+ value: function init() {
19839
+ if (document.body) {
19840
+ /*
19841
+ it's important that this is attached to the body instead of the root quill element.
19842
+ this prevents the click event from overlapping with ImageSpec
19843
+ */
19844
+ document.body.appendChild(this.createProxyImage());
19845
+ }
19846
+
19847
+ this.hideProxyImage();
19848
+ this.proxyImage.addEventListener('click', this.onProxyImageClick);
19849
+ this.formatter.quill.on('text-change', this.onTextChange);
19850
+ }
19851
+ }, {
19852
+ key: 'getTargetElement',
19853
+ value: function getTargetElement() {
19854
+ return this.unclickable;
19855
+ }
19856
+ }, {
19857
+ key: 'getOverlayElement',
19858
+ value: function getOverlayElement() {
19859
+ return this.unclickable;
19860
+ }
19861
+ }, {
19862
+ key: 'onHide',
19863
+ value: function onHide() {
19864
+ this.hideProxyImage();
19865
+ this.nextUnclickable = null;
19866
+ this.unclickable = null;
19867
+ }
19868
+ }, {
19869
+ key: 'createProxyImage',
19870
+ value: function createProxyImage() {
19871
+ var canvas = document.createElement('canvas');
19872
+ var context = canvas.getContext('2d');
19873
+ context.globalAlpha = 0;
19874
+ context.fillRect(0, 0, 1, 1);
19875
+
19876
+ this.proxyImage = document.createElement('img');
19877
+ this.proxyImage.src = canvas.toDataURL('image/png');
19878
+ this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
19879
+
19880
+ Object.assign(this.proxyImage.style, {
19881
+ position: 'absolute',
19882
+ margin: '0'
19883
+ });
19886
19884
 
19887
- return UnclickableBlotSpec;
19888
- }(_BlotSpec3.default);
19885
+ return this.proxyImage;
19886
+ }
19887
+ }, {
19888
+ key: 'hideProxyImage',
19889
+ value: function hideProxyImage() {
19890
+ Object.assign(this.proxyImage.style, {
19891
+ display: 'none'
19892
+ });
19893
+ }
19894
+ }, {
19895
+ key: 'repositionProxyImage',
19896
+ value: function repositionProxyImage(unclickable) {
19897
+ var rect = unclickable.getBoundingClientRect();
19889
19898
 
19890
- UnclickableBlotSpec$1.default = UnclickableBlotSpec;
19899
+ Object.assign(this.proxyImage.style, {
19900
+ display: 'block',
19901
+ left: rect.left + window.pageXOffset + 'px',
19902
+ top: rect.top + window.pageYOffset + 'px',
19903
+ width: rect.width + 'px',
19904
+ height: rect.height + 'px'
19905
+ });
19906
+ }
19907
+ }]);
19908
+
19909
+ return UnclickableBlotSpec;
19910
+ }(_BlotSpec3.default);
19911
+
19912
+ UnclickableBlotSpec.default = UnclickableBlotSpec$1;
19913
+ return UnclickableBlotSpec;
19914
+ }
19891
19915
 
19892
19916
  var hasRequiredIframeVideoSpec;
19893
19917
 
@@ -19899,7 +19923,7 @@
19899
19923
  value: true
19900
19924
  });
19901
19925
 
19902
- var _UnclickableBlotSpec2 = UnclickableBlotSpec$1;
19926
+ var _UnclickableBlotSpec2 = requireUnclickableBlotSpec();
19903
19927
 
19904
19928
  var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
19905
19929
 
@@ -20054,7 +20078,7 @@
20054
20078
  }
20055
20079
  });
20056
20080
 
20057
- var _Action = Action$1;
20081
+ var _Action = requireAction();
20058
20082
 
20059
20083
  Object.defineProperty(exports, 'Action', {
20060
20084
  enumerable: true,
@@ -20099,7 +20123,7 @@
20099
20123
  }
20100
20124
  });
20101
20125
 
20102
- var _ResizeAction = ResizeAction$1;
20126
+ var _ResizeAction = requireResizeAction();
20103
20127
 
20104
20128
  Object.defineProperty(exports, 'ResizeAction', {
20105
20129
  enumerable: true,
@@ -20126,7 +20150,7 @@
20126
20150
  }
20127
20151
  });
20128
20152
 
20129
- var _UnclickableBlotSpec = UnclickableBlotSpec$1;
20153
+ var _UnclickableBlotSpec = requireUnclickableBlotSpec();
20130
20154
 
20131
20155
  Object.defineProperty(exports, 'UnclickableBlotSpec', {
20132
20156
  enumerable: true,
@@ -20531,9 +20555,6 @@
20531
20555
  var _a;
20532
20556
  if (!editor.value)
20533
20557
  return;
20534
- if (props.enableImageResize) {
20535
- registerBlotFormatter();
20536
- }
20537
20558
  options = composeOptions();
20538
20559
  setIcons();
20539
20560
  quill = new Quill(editor.value, options);
@@ -20541,6 +20562,9 @@
20541
20562
  setLinkQuill(quill);
20542
20563
  controlToolbarVisible(false);
20543
20564
  setContents(props.content);
20565
+ if (props.enableImageResize) {
20566
+ registerBlotFormatter();
20567
+ }
20544
20568
  quill.on('text-change', handleTextChange);
20545
20569
  quill.on('selection-change', handleSelectionChange);
20546
20570
  quill.on('editor-change', handleEditorChange);