pxx-vue-quill 1.0.91 → 1.0.92

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-08T13:52:15.208Z
10
+ * Date: 2025-09-08T14:19:47.300Z
11
11
  */
12
12
  (function (global, factory) {
13
13
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
@@ -18683,52 +18683,44 @@
18683
18683
 
18684
18684
  var require$$0 = /*@__PURE__*/getAugmentedNamespace(es);
18685
18685
 
18686
- var Action = {};
18686
+ var Action$1 = {};
18687
18687
 
18688
- var hasRequiredAction;
18689
-
18690
- function requireAction () {
18691
- if (hasRequiredAction) return Action;
18692
- hasRequiredAction = 1;
18693
-
18694
- Object.defineProperty(Action, "__esModule", {
18695
- value: true
18696
- });
18688
+ Object.defineProperty(Action$1, "__esModule", {
18689
+ value: true
18690
+ });
18697
18691
 
18698
- 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; }; }();
18692
+ 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; }; }();
18699
18693
 
18700
- var _BlotFormatter = requireBlotFormatter();
18694
+ var _BlotFormatter$1 = requireBlotFormatter();
18701
18695
 
18702
- _interopRequireDefault(_BlotFormatter);
18696
+ _interopRequireDefault$1(_BlotFormatter$1);
18703
18697
 
18704
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18698
+ function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18705
18699
 
18706
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18700
+ function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18707
18701
 
18708
- var Action$1 = function () {
18709
- function Action(formatter) {
18710
- _classCallCheck(this, Action);
18702
+ var Action = function () {
18703
+ function Action(formatter) {
18704
+ _classCallCheck$2(this, Action);
18711
18705
 
18712
- this.formatter = formatter;
18713
- }
18706
+ this.formatter = formatter;
18707
+ }
18714
18708
 
18715
- _createClass(Action, [{
18716
- key: 'onCreate',
18717
- value: function onCreate() {}
18718
- }, {
18719
- key: 'onDestroy',
18720
- value: function onDestroy() {}
18721
- }, {
18722
- key: 'onUpdate',
18723
- value: function onUpdate() {}
18724
- }]);
18709
+ _createClass$2(Action, [{
18710
+ key: 'onCreate',
18711
+ value: function onCreate() {}
18712
+ }, {
18713
+ key: 'onDestroy',
18714
+ value: function onDestroy() {}
18715
+ }, {
18716
+ key: 'onUpdate',
18717
+ value: function onUpdate() {}
18718
+ }]);
18725
18719
 
18726
- return Action;
18727
- }();
18720
+ return Action;
18721
+ }();
18728
18722
 
18729
- Action.default = Action$1;
18730
- return Action;
18731
- }
18723
+ Action$1.default = Action;
18732
18724
 
18733
18725
  var hasRequiredBlotFormatter;
18734
18726
 
@@ -18750,7 +18742,7 @@
18750
18742
 
18751
18743
  var _Options2 = _interopRequireDefault(_Options);
18752
18744
 
18753
- var _Action = requireAction();
18745
+ var _Action = Action$1;
18754
18746
 
18755
18747
  _interopRequireDefault(_Action);
18756
18748
 
@@ -19189,7 +19181,7 @@
19189
19181
 
19190
19182
  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; }; }();
19191
19183
 
19192
- var _Action2 = requireAction();
19184
+ var _Action2 = Action$1;
19193
19185
 
19194
19186
  var _Action3 = _interopRequireDefault(_Action2);
19195
19187
 
@@ -19254,190 +19246,182 @@
19254
19246
  return AlignAction;
19255
19247
  }
19256
19248
 
19257
- var ResizeAction = {};
19249
+ var ResizeAction$1 = {};
19258
19250
 
19259
- var hasRequiredResizeAction;
19260
-
19261
- function requireResizeAction () {
19262
- if (hasRequiredResizeAction) return ResizeAction;
19263
- hasRequiredResizeAction = 1;
19264
-
19265
- Object.defineProperty(ResizeAction, "__esModule", {
19266
- value: true
19267
- });
19251
+ Object.defineProperty(ResizeAction$1, "__esModule", {
19252
+ value: true
19253
+ });
19268
19254
 
19269
- 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; }; }();
19255
+ 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; }; }();
19270
19256
 
19271
- var _Action2 = requireAction();
19257
+ var _Action2 = Action$1;
19272
19258
 
19273
- var _Action3 = _interopRequireDefault(_Action2);
19259
+ var _Action3 = _interopRequireDefault(_Action2);
19274
19260
 
19275
- var _BlotFormatter = requireBlotFormatter();
19261
+ var _BlotFormatter = requireBlotFormatter();
19276
19262
 
19277
- _interopRequireDefault(_BlotFormatter);
19263
+ _interopRequireDefault(_BlotFormatter);
19278
19264
 
19279
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19265
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19280
19266
 
19281
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19267
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19282
19268
 
19283
- 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; }
19269
+ 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; }
19284
19270
 
19285
- 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; }
19271
+ 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; }
19286
19272
 
19287
- var ResizeAction$1 = function (_Action) {
19288
- _inherits(ResizeAction, _Action);
19273
+ var ResizeAction = function (_Action) {
19274
+ _inherits(ResizeAction, _Action);
19289
19275
 
19290
- function ResizeAction(formatter) {
19291
- _classCallCheck(this, ResizeAction);
19276
+ function ResizeAction(formatter) {
19277
+ _classCallCheck(this, ResizeAction);
19292
19278
 
19293
- var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
19279
+ var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
19294
19280
 
19295
- _this.onMouseDown = function (event) {
19296
- if (!(event.target instanceof HTMLElement)) {
19297
- return;
19298
- }
19299
- _this.dragHandle = event.target;
19300
- _this.setCursor(_this.dragHandle.style.cursor);
19281
+ _this.onMouseDown = function (event) {
19282
+ if (!(event.target instanceof HTMLElement)) {
19283
+ return;
19284
+ }
19285
+ _this.dragHandle = event.target;
19286
+ _this.setCursor(_this.dragHandle.style.cursor);
19301
19287
 
19302
- if (!_this.formatter.currentSpec) {
19303
- return;
19304
- }
19288
+ if (!_this.formatter.currentSpec) {
19289
+ return;
19290
+ }
19305
19291
 
19306
- var target = _this.formatter.currentSpec.getTargetElement();
19307
- if (!target) {
19308
- return;
19309
- }
19292
+ var target = _this.formatter.currentSpec.getTargetElement();
19293
+ if (!target) {
19294
+ return;
19295
+ }
19310
19296
 
19311
- var rect = target.getBoundingClientRect();
19297
+ var rect = target.getBoundingClientRect();
19312
19298
 
19313
- _this.dragStartX = event.clientX;
19314
- _this.preDragWidth = rect.width;
19315
- _this.targetRatio = rect.height / rect.width;
19299
+ _this.dragStartX = event.clientX;
19300
+ _this.preDragWidth = rect.width;
19301
+ _this.targetRatio = rect.height / rect.width;
19316
19302
 
19317
- document.addEventListener('mousemove', _this.onDrag);
19318
- document.addEventListener('mouseup', _this.onMouseUp);
19319
- };
19303
+ document.addEventListener('mousemove', _this.onDrag);
19304
+ document.addEventListener('mouseup', _this.onMouseUp);
19305
+ };
19320
19306
 
19321
- _this.onDrag = function (event) {
19322
- if (!_this.formatter.currentSpec) {
19323
- return;
19324
- }
19307
+ _this.onDrag = function (event) {
19308
+ if (!_this.formatter.currentSpec) {
19309
+ return;
19310
+ }
19325
19311
 
19326
- var target = _this.formatter.currentSpec.getTargetElement();
19327
- if (!target) {
19328
- return;
19329
- }
19312
+ var target = _this.formatter.currentSpec.getTargetElement();
19313
+ if (!target) {
19314
+ return;
19315
+ }
19330
19316
 
19331
- var deltaX = event.clientX - _this.dragStartX;
19332
- var newWidth = 0;
19317
+ var deltaX = event.clientX - _this.dragStartX;
19318
+ var newWidth = 0;
19333
19319
 
19334
- if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
19335
- newWidth = Math.round(_this.preDragWidth - deltaX);
19336
- } else {
19337
- newWidth = Math.round(_this.preDragWidth + deltaX);
19338
- }
19320
+ if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
19321
+ newWidth = Math.round(_this.preDragWidth - deltaX);
19322
+ } else {
19323
+ newWidth = Math.round(_this.preDragWidth + deltaX);
19324
+ }
19339
19325
 
19340
- var newHeight = _this.targetRatio * newWidth;
19326
+ var newHeight = _this.targetRatio * newWidth;
19341
19327
 
19342
- target.setAttribute('width', '' + newWidth);
19343
- target.setAttribute('height', '' + newHeight);
19328
+ target.setAttribute('width', '' + newWidth);
19329
+ target.setAttribute('height', '' + newHeight);
19344
19330
 
19345
- _this.formatter.update();
19346
- };
19331
+ _this.formatter.update();
19332
+ };
19347
19333
 
19348
- _this.onMouseUp = function () {
19349
- _this.setCursor('');
19350
- document.removeEventListener('mousemove', _this.onDrag);
19351
- document.removeEventListener('mouseup', _this.onMouseUp);
19352
- };
19334
+ _this.onMouseUp = function () {
19335
+ _this.setCursor('');
19336
+ document.removeEventListener('mousemove', _this.onDrag);
19337
+ document.removeEventListener('mouseup', _this.onMouseUp);
19338
+ };
19353
19339
 
19354
- _this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
19355
- _this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
19356
- _this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
19357
- _this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
19358
- _this.dragHandle = null;
19359
- _this.dragStartX = 0;
19360
- _this.preDragWidth = 0;
19361
- _this.targetRatio = 0;
19362
- return _this;
19363
- }
19340
+ _this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
19341
+ _this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
19342
+ _this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
19343
+ _this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
19344
+ _this.dragHandle = null;
19345
+ _this.dragStartX = 0;
19346
+ _this.preDragWidth = 0;
19347
+ _this.targetRatio = 0;
19348
+ return _this;
19349
+ }
19364
19350
 
19365
- _createClass(ResizeAction, [{
19366
- key: 'onCreate',
19367
- value: function onCreate() {
19368
- this.formatter.overlay.appendChild(this.topLeftHandle);
19369
- this.formatter.overlay.appendChild(this.topRightHandle);
19370
- this.formatter.overlay.appendChild(this.bottomRightHandle);
19371
- this.formatter.overlay.appendChild(this.bottomLeftHandle);
19351
+ _createClass(ResizeAction, [{
19352
+ key: 'onCreate',
19353
+ value: function onCreate() {
19354
+ this.formatter.overlay.appendChild(this.topLeftHandle);
19355
+ this.formatter.overlay.appendChild(this.topRightHandle);
19356
+ this.formatter.overlay.appendChild(this.bottomRightHandle);
19357
+ this.formatter.overlay.appendChild(this.bottomLeftHandle);
19372
19358
 
19373
- this.repositionHandles(this.formatter.options.resize.handleStyle);
19374
- }
19375
- }, {
19376
- key: 'onDestroy',
19377
- value: function onDestroy() {
19378
- this.setCursor('');
19379
- this.formatter.overlay.removeChild(this.topLeftHandle);
19380
- this.formatter.overlay.removeChild(this.topRightHandle);
19381
- this.formatter.overlay.removeChild(this.bottomRightHandle);
19382
- this.formatter.overlay.removeChild(this.bottomLeftHandle);
19383
- }
19384
- }, {
19385
- key: 'createHandle',
19386
- value: function createHandle(position, cursor) {
19387
- var box = document.createElement('div');
19388
- box.classList.add(this.formatter.options.resize.handleClassName);
19389
- box.setAttribute('data-position', position);
19390
- box.style.cursor = cursor;
19391
-
19392
- if (this.formatter.options.resize.handleStyle) {
19393
- Object.assign(box.style, this.formatter.options.resize.handleStyle);
19394
- }
19359
+ this.repositionHandles(this.formatter.options.resize.handleStyle);
19360
+ }
19361
+ }, {
19362
+ key: 'onDestroy',
19363
+ value: function onDestroy() {
19364
+ this.setCursor('');
19365
+ this.formatter.overlay.removeChild(this.topLeftHandle);
19366
+ this.formatter.overlay.removeChild(this.topRightHandle);
19367
+ this.formatter.overlay.removeChild(this.bottomRightHandle);
19368
+ this.formatter.overlay.removeChild(this.bottomLeftHandle);
19369
+ }
19370
+ }, {
19371
+ key: 'createHandle',
19372
+ value: function createHandle(position, cursor) {
19373
+ var box = document.createElement('div');
19374
+ box.classList.add(this.formatter.options.resize.handleClassName);
19375
+ box.setAttribute('data-position', position);
19376
+ box.style.cursor = cursor;
19377
+
19378
+ if (this.formatter.options.resize.handleStyle) {
19379
+ Object.assign(box.style, this.formatter.options.resize.handleStyle);
19380
+ }
19395
19381
 
19396
- box.addEventListener('mousedown', this.onMouseDown);
19382
+ box.addEventListener('mousedown', this.onMouseDown);
19397
19383
 
19398
- return box;
19399
- }
19400
- }, {
19401
- key: 'repositionHandles',
19402
- value: function repositionHandles(handleStyle) {
19403
- var handleXOffset = '0px';
19404
- var handleYOffset = '0px';
19405
- if (handleStyle) {
19406
- if (handleStyle.width) {
19407
- handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
19408
- }
19409
- if (handleStyle.height) {
19410
- handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
19411
- }
19412
- }
19384
+ return box;
19385
+ }
19386
+ }, {
19387
+ key: 'repositionHandles',
19388
+ value: function repositionHandles(handleStyle) {
19389
+ var handleXOffset = '0px';
19390
+ var handleYOffset = '0px';
19391
+ if (handleStyle) {
19392
+ if (handleStyle.width) {
19393
+ handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
19394
+ }
19395
+ if (handleStyle.height) {
19396
+ handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
19397
+ }
19398
+ }
19413
19399
 
19414
- Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
19415
- Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
19416
- Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
19417
- Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
19418
- }
19419
- }, {
19420
- key: 'setCursor',
19421
- value: function setCursor(value) {
19422
- if (document.body) {
19423
- document.body.style.cursor = value;
19424
- }
19400
+ Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
19401
+ Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
19402
+ Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
19403
+ Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
19404
+ }
19405
+ }, {
19406
+ key: 'setCursor',
19407
+ value: function setCursor(value) {
19408
+ if (document.body) {
19409
+ document.body.style.cursor = value;
19410
+ }
19425
19411
 
19426
- if (this.formatter.currentSpec) {
19427
- var target = this.formatter.currentSpec.getOverlayElement();
19428
- if (target) {
19429
- target.style.cursor = value;
19430
- }
19431
- }
19432
- }
19433
- }]);
19412
+ if (this.formatter.currentSpec) {
19413
+ var target = this.formatter.currentSpec.getOverlayElement();
19414
+ if (target) {
19415
+ target.style.cursor = value;
19416
+ }
19417
+ }
19418
+ }
19419
+ }]);
19434
19420
 
19435
- return ResizeAction;
19436
- }(_Action3.default);
19421
+ return ResizeAction;
19422
+ }(_Action3.default);
19437
19423
 
19438
- ResizeAction.default = ResizeAction$1;
19439
- return ResizeAction;
19440
- }
19424
+ ResizeAction$1.default = ResizeAction;
19441
19425
 
19442
19426
  var DeleteAction = {};
19443
19427
 
@@ -19457,7 +19441,7 @@
19457
19441
 
19458
19442
  var _quill2 = _interopRequireDefault(_quill);
19459
19443
 
19460
- var _Action2 = requireAction();
19444
+ var _Action2 = Action$1;
19461
19445
 
19462
19446
  var _Action3 = _interopRequireDefault(_Action2);
19463
19447
 
@@ -19536,7 +19520,7 @@
19536
19520
 
19537
19521
  _interopRequireDefault(_BlotFormatter);
19538
19522
 
19539
- var _Action = requireAction();
19523
+ var _Action = Action$1;
19540
19524
 
19541
19525
  _interopRequireDefault(_Action);
19542
19526
 
@@ -19544,7 +19528,7 @@
19544
19528
 
19545
19529
  var _AlignAction2 = _interopRequireDefault(_AlignAction);
19546
19530
 
19547
- var _ResizeAction = requireResizeAction();
19531
+ var _ResizeAction = ResizeAction$1;
19548
19532
 
19549
19533
  var _ResizeAction2 = _interopRequireDefault(_ResizeAction);
19550
19534
 
@@ -19676,148 +19660,156 @@
19676
19660
 
19677
19661
  var IframeVideoSpec = {};
19678
19662
 
19679
- var UnclickableBlotSpec$1 = {};
19663
+ var UnclickableBlotSpec = {};
19680
19664
 
19681
- Object.defineProperty(UnclickableBlotSpec$1, "__esModule", {
19682
- value: true
19683
- });
19665
+ var hasRequiredUnclickableBlotSpec;
19684
19666
 
19685
- 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; }; }();
19667
+ function requireUnclickableBlotSpec () {
19668
+ if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
19669
+ hasRequiredUnclickableBlotSpec = 1;
19686
19670
 
19687
- var _BlotSpec2 = requireBlotSpec();
19671
+ Object.defineProperty(UnclickableBlotSpec, "__esModule", {
19672
+ value: true
19673
+ });
19688
19674
 
19689
- var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
19675
+ 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; }; }();
19690
19676
 
19691
- var _BlotFormatter = requireBlotFormatter();
19677
+ var _BlotSpec2 = requireBlotSpec();
19692
19678
 
19693
- _interopRequireDefault(_BlotFormatter);
19679
+ var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
19694
19680
 
19695
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19681
+ var _BlotFormatter = requireBlotFormatter();
19696
19682
 
19697
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19683
+ _interopRequireDefault(_BlotFormatter);
19698
19684
 
19699
- 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; }
19685
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19700
19686
 
19701
- 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; }
19687
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19702
19688
 
19703
- var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
19704
- var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
19689
+ 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; }
19705
19690
 
19706
- var UnclickableBlotSpec = function (_BlotSpec) {
19707
- _inherits(UnclickableBlotSpec, _BlotSpec);
19691
+ 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; }
19708
19692
 
19709
- function UnclickableBlotSpec(formatter, selector) {
19710
- _classCallCheck(this, UnclickableBlotSpec);
19693
+ var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
19694
+ var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
19711
19695
 
19712
- var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
19696
+ var UnclickableBlotSpec$1 = function (_BlotSpec) {
19697
+ _inherits(UnclickableBlotSpec, _BlotSpec);
19713
19698
 
19714
- _this.onTextChange = function () {
19715
- Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
19716
- unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
19717
- unclickable.addEventListener('mouseenter', _this.onMouseEnter);
19718
- });
19719
- };
19699
+ function UnclickableBlotSpec(formatter, selector) {
19700
+ _classCallCheck(this, UnclickableBlotSpec);
19720
19701
 
19721
- _this.onMouseEnter = function (event) {
19722
- var unclickable = event.target;
19723
- if (!(unclickable instanceof HTMLElement)) {
19724
- return;
19725
- }
19702
+ var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
19726
19703
 
19727
- _this.nextUnclickable = unclickable;
19728
- _this.repositionProxyImage(_this.nextUnclickable);
19729
- };
19704
+ _this.onTextChange = function () {
19705
+ Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
19706
+ unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
19707
+ unclickable.addEventListener('mouseenter', _this.onMouseEnter);
19708
+ });
19709
+ };
19730
19710
 
19731
- _this.onProxyImageClick = function () {
19732
- _this.unclickable = _this.nextUnclickable;
19733
- _this.nextUnclickable = null;
19734
- _this.formatter.show(_this);
19735
- _this.hideProxyImage();
19736
- };
19711
+ _this.onMouseEnter = function (event) {
19712
+ var unclickable = event.target;
19713
+ if (!(unclickable instanceof HTMLElement)) {
19714
+ return;
19715
+ }
19737
19716
 
19738
- _this.selector = selector;
19739
- _this.unclickable = null;
19740
- _this.nextUnclickable = null;
19741
- return _this;
19742
- }
19717
+ _this.nextUnclickable = unclickable;
19718
+ _this.repositionProxyImage(_this.nextUnclickable);
19719
+ };
19743
19720
 
19744
- _createClass(UnclickableBlotSpec, [{
19745
- key: 'init',
19746
- value: function init() {
19747
- if (document.body) {
19748
- /*
19749
- it's important that this is attached to the body instead of the root quill element.
19750
- this prevents the click event from overlapping with ImageSpec
19751
- */
19752
- document.body.appendChild(this.createProxyImage());
19753
- }
19721
+ _this.onProxyImageClick = function () {
19722
+ _this.unclickable = _this.nextUnclickable;
19723
+ _this.nextUnclickable = null;
19724
+ _this.formatter.show(_this);
19725
+ _this.hideProxyImage();
19726
+ };
19754
19727
 
19755
- this.hideProxyImage();
19756
- this.proxyImage.addEventListener('click', this.onProxyImageClick);
19757
- this.formatter.quill.on('text-change', this.onTextChange);
19758
- }
19759
- }, {
19760
- key: 'getTargetElement',
19761
- value: function getTargetElement() {
19762
- return this.unclickable;
19763
- }
19764
- }, {
19765
- key: 'getOverlayElement',
19766
- value: function getOverlayElement() {
19767
- return this.unclickable;
19768
- }
19769
- }, {
19770
- key: 'onHide',
19771
- value: function onHide() {
19772
- this.hideProxyImage();
19773
- this.nextUnclickable = null;
19774
- this.unclickable = null;
19775
- }
19776
- }, {
19777
- key: 'createProxyImage',
19778
- value: function createProxyImage() {
19779
- var canvas = document.createElement('canvas');
19780
- var context = canvas.getContext('2d');
19781
- context.globalAlpha = 0;
19782
- context.fillRect(0, 0, 1, 1);
19783
-
19784
- this.proxyImage = document.createElement('img');
19785
- this.proxyImage.src = canvas.toDataURL('image/png');
19786
- this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
19787
-
19788
- Object.assign(this.proxyImage.style, {
19789
- position: 'absolute',
19790
- margin: '0'
19791
- });
19728
+ _this.selector = selector;
19729
+ _this.unclickable = null;
19730
+ _this.nextUnclickable = null;
19731
+ return _this;
19732
+ }
19792
19733
 
19793
- return this.proxyImage;
19794
- }
19795
- }, {
19796
- key: 'hideProxyImage',
19797
- value: function hideProxyImage() {
19798
- Object.assign(this.proxyImage.style, {
19799
- display: 'none'
19800
- });
19801
- }
19802
- }, {
19803
- key: 'repositionProxyImage',
19804
- value: function repositionProxyImage(unclickable) {
19805
- var rect = unclickable.getBoundingClientRect();
19806
-
19807
- Object.assign(this.proxyImage.style, {
19808
- display: 'block',
19809
- left: rect.left + window.pageXOffset + 'px',
19810
- top: rect.top + window.pageYOffset + 'px',
19811
- width: rect.width + 'px',
19812
- height: rect.height + 'px'
19813
- });
19814
- }
19815
- }]);
19734
+ _createClass(UnclickableBlotSpec, [{
19735
+ key: 'init',
19736
+ value: function init() {
19737
+ if (document.body) {
19738
+ /*
19739
+ it's important that this is attached to the body instead of the root quill element.
19740
+ this prevents the click event from overlapping with ImageSpec
19741
+ */
19742
+ document.body.appendChild(this.createProxyImage());
19743
+ }
19744
+
19745
+ this.hideProxyImage();
19746
+ this.proxyImage.addEventListener('click', this.onProxyImageClick);
19747
+ this.formatter.quill.on('text-change', this.onTextChange);
19748
+ }
19749
+ }, {
19750
+ key: 'getTargetElement',
19751
+ value: function getTargetElement() {
19752
+ return this.unclickable;
19753
+ }
19754
+ }, {
19755
+ key: 'getOverlayElement',
19756
+ value: function getOverlayElement() {
19757
+ return this.unclickable;
19758
+ }
19759
+ }, {
19760
+ key: 'onHide',
19761
+ value: function onHide() {
19762
+ this.hideProxyImage();
19763
+ this.nextUnclickable = null;
19764
+ this.unclickable = null;
19765
+ }
19766
+ }, {
19767
+ key: 'createProxyImage',
19768
+ value: function createProxyImage() {
19769
+ var canvas = document.createElement('canvas');
19770
+ var context = canvas.getContext('2d');
19771
+ context.globalAlpha = 0;
19772
+ context.fillRect(0, 0, 1, 1);
19773
+
19774
+ this.proxyImage = document.createElement('img');
19775
+ this.proxyImage.src = canvas.toDataURL('image/png');
19776
+ this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
19777
+
19778
+ Object.assign(this.proxyImage.style, {
19779
+ position: 'absolute',
19780
+ margin: '0'
19781
+ });
19816
19782
 
19817
- return UnclickableBlotSpec;
19818
- }(_BlotSpec3.default);
19783
+ return this.proxyImage;
19784
+ }
19785
+ }, {
19786
+ key: 'hideProxyImage',
19787
+ value: function hideProxyImage() {
19788
+ Object.assign(this.proxyImage.style, {
19789
+ display: 'none'
19790
+ });
19791
+ }
19792
+ }, {
19793
+ key: 'repositionProxyImage',
19794
+ value: function repositionProxyImage(unclickable) {
19795
+ var rect = unclickable.getBoundingClientRect();
19819
19796
 
19820
- UnclickableBlotSpec$1.default = UnclickableBlotSpec;
19797
+ Object.assign(this.proxyImage.style, {
19798
+ display: 'block',
19799
+ left: rect.left + window.pageXOffset + 'px',
19800
+ top: rect.top + window.pageYOffset + 'px',
19801
+ width: rect.width + 'px',
19802
+ height: rect.height + 'px'
19803
+ });
19804
+ }
19805
+ }]);
19806
+
19807
+ return UnclickableBlotSpec;
19808
+ }(_BlotSpec3.default);
19809
+
19810
+ UnclickableBlotSpec.default = UnclickableBlotSpec$1;
19811
+ return UnclickableBlotSpec;
19812
+ }
19821
19813
 
19822
19814
  var hasRequiredIframeVideoSpec;
19823
19815
 
@@ -19829,7 +19821,7 @@
19829
19821
  value: true
19830
19822
  });
19831
19823
 
19832
- var _UnclickableBlotSpec2 = UnclickableBlotSpec$1;
19824
+ var _UnclickableBlotSpec2 = requireUnclickableBlotSpec();
19833
19825
 
19834
19826
  var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
19835
19827
 
@@ -19984,7 +19976,7 @@
19984
19976
  }
19985
19977
  });
19986
19978
 
19987
- var _Action = requireAction();
19979
+ var _Action = Action$1;
19988
19980
 
19989
19981
  Object.defineProperty(exports, 'Action', {
19990
19982
  enumerable: true,
@@ -20029,7 +20021,7 @@
20029
20021
  }
20030
20022
  });
20031
20023
 
20032
- var _ResizeAction = requireResizeAction();
20024
+ var _ResizeAction = ResizeAction$1;
20033
20025
 
20034
20026
  Object.defineProperty(exports, 'ResizeAction', {
20035
20027
  enumerable: true,
@@ -20056,7 +20048,7 @@
20056
20048
  }
20057
20049
  });
20058
20050
 
20059
- var _UnclickableBlotSpec = UnclickableBlotSpec$1;
20051
+ var _UnclickableBlotSpec = requireUnclickableBlotSpec();
20060
20052
 
20061
20053
  Object.defineProperty(exports, 'UnclickableBlotSpec', {
20062
20054
  enumerable: true,
@@ -20332,27 +20324,33 @@
20332
20324
  }
20333
20325
  }
20334
20326
  };
20335
- const setIcons = async () => {
20336
- const icons = await Quill.import('ui/icons');
20337
- icons['bold'] = boldSVG;
20338
- icons['italic'] = italicSVG;
20339
- icons['underline'] = underlineSVG;
20340
- icons['more'] = moreSVG;
20341
- icons['link'] = linkSVG;
20342
- icons['undo'] = undoSVG;
20343
- icons['redo'] = redoSVG;
20344
- icons['ocr'] = ocrSVG;
20345
- icons['math'] = mathSVG;
20346
- icons['image'] = imageSVG;
20347
- return icons;
20327
+ const setIcons = () => {
20328
+ try {
20329
+ const icons = Quill.import('ui/icons');
20330
+ if (icons) {
20331
+ icons['bold'] = boldSVG;
20332
+ icons['italic'] = italicSVG;
20333
+ icons['underline'] = underlineSVG;
20334
+ icons['more'] = moreSVG;
20335
+ icons['link'] = linkSVG;
20336
+ icons['undo'] = undoSVG;
20337
+ icons['redo'] = redoSVG;
20338
+ icons['ocr'] = ocrSVG;
20339
+ icons['math'] = mathSVG;
20340
+ icons['image'] = imageSVG;
20341
+ }
20342
+ }
20343
+ catch (error) {
20344
+ console.warn('设置图标时出错:', error);
20345
+ }
20348
20346
  };
20349
- const initialize = async () => {
20347
+ const initialize = () => {
20350
20348
  var _a, _b;
20351
20349
  if (!editor.value)
20352
20350
  return;
20353
20351
  registerBlotFormatter();
20354
20352
  options = composeOptions();
20355
- await setIcons();
20353
+ setIcons();
20356
20354
  quill = new Quill(editor.value, options);
20357
20355
  setQuill(quill);
20358
20356
  const toolbar = (_a = quill === null || quill === void 0 ? void 0 : quill.getModule('toolbar')) === null || _a === void 0 ? void 0 : _a.container;