pxx-vue-quill 1.0.4 → 1.0.5

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,9 +7,9 @@
7
7
  *
8
8
  * Copyright (c) 2025 Pxx-Team
9
9
  * Released under the MIT license
10
- * Date: 2025-08-21T01:58:08.326Z
10
+ * Date: 2025-08-21T03:23:56.124Z
11
11
  */
12
- import { defineComponent, onMounted, onBeforeUnmount, ref, watch, nextTick, h } from 'vue';
12
+ import { defineComponent, onMounted, onBeforeUnmount, ref, computed, watch, nextTick, h } from 'vue';
13
13
 
14
14
  var global$1 = (typeof global !== "undefined" ? global :
15
15
  typeof self !== "undefined" ? self :
@@ -18780,11 +18780,11 @@ Object.defineProperty(DefaultAligner$1, "__esModule", {
18780
18780
  value: true
18781
18781
  });
18782
18782
 
18783
- 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
+ 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; }; }();
18784
18784
 
18785
18785
  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; }
18786
18786
 
18787
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18787
+ function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18788
18788
 
18789
18789
  var LEFT_ALIGN = 'left';
18790
18790
  var CENTER_ALIGN = 'center';
@@ -18795,7 +18795,7 @@ var DefaultAligner = function () {
18795
18795
  var _this = this,
18796
18796
  _alignments;
18797
18797
 
18798
- _classCallCheck(this, DefaultAligner);
18798
+ _classCallCheck$2(this, DefaultAligner);
18799
18799
 
18800
18800
  this.applyStyle = options.aligner.applyStyle;
18801
18801
  this.alignAttribute = options.attribute;
@@ -18823,7 +18823,7 @@ var DefaultAligner = function () {
18823
18823
  }), _alignments);
18824
18824
  }
18825
18825
 
18826
- _createClass(DefaultAligner, [{
18826
+ _createClass$2(DefaultAligner, [{
18827
18827
  key: 'getAlignments',
18828
18828
  value: function getAlignments() {
18829
18829
  var _this2 = this;
@@ -19126,190 +19126,182 @@ function requireAlignAction () {
19126
19126
  return AlignAction;
19127
19127
  }
19128
19128
 
19129
- var ResizeAction = {};
19130
-
19131
- var hasRequiredResizeAction;
19129
+ var ResizeAction$1 = {};
19132
19130
 
19133
- function requireResizeAction () {
19134
- if (hasRequiredResizeAction) return ResizeAction;
19135
- hasRequiredResizeAction = 1;
19136
-
19137
- Object.defineProperty(ResizeAction, "__esModule", {
19138
- value: true
19139
- });
19131
+ Object.defineProperty(ResizeAction$1, "__esModule", {
19132
+ value: true
19133
+ });
19140
19134
 
19141
- 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; }; }();
19135
+ 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; }; }();
19142
19136
 
19143
- var _Action2 = requireAction();
19137
+ var _Action2 = requireAction();
19144
19138
 
19145
- var _Action3 = _interopRequireDefault(_Action2);
19139
+ var _Action3 = _interopRequireDefault$1(_Action2);
19146
19140
 
19147
- var _BlotFormatter = requireBlotFormatter();
19141
+ var _BlotFormatter$1 = requireBlotFormatter();
19148
19142
 
19149
- _interopRequireDefault(_BlotFormatter);
19143
+ _interopRequireDefault$1(_BlotFormatter$1);
19150
19144
 
19151
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19145
+ function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19152
19146
 
19153
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19147
+ function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19154
19148
 
19155
- 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; }
19149
+ 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; }
19156
19150
 
19157
- 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; }
19151
+ 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; }
19158
19152
 
19159
- var ResizeAction$1 = function (_Action) {
19160
- _inherits(ResizeAction, _Action);
19153
+ var ResizeAction = function (_Action) {
19154
+ _inherits$1(ResizeAction, _Action);
19161
19155
 
19162
- function ResizeAction(formatter) {
19163
- _classCallCheck(this, ResizeAction);
19156
+ function ResizeAction(formatter) {
19157
+ _classCallCheck$1(this, ResizeAction);
19164
19158
 
19165
- var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
19159
+ var _this = _possibleConstructorReturn$1(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
19166
19160
 
19167
- _this.onMouseDown = function (event) {
19168
- if (!(event.target instanceof HTMLElement)) {
19169
- return;
19170
- }
19171
- _this.dragHandle = event.target;
19172
- _this.setCursor(_this.dragHandle.style.cursor);
19161
+ _this.onMouseDown = function (event) {
19162
+ if (!(event.target instanceof HTMLElement)) {
19163
+ return;
19164
+ }
19165
+ _this.dragHandle = event.target;
19166
+ _this.setCursor(_this.dragHandle.style.cursor);
19173
19167
 
19174
- if (!_this.formatter.currentSpec) {
19175
- return;
19176
- }
19168
+ if (!_this.formatter.currentSpec) {
19169
+ return;
19170
+ }
19177
19171
 
19178
- var target = _this.formatter.currentSpec.getTargetElement();
19179
- if (!target) {
19180
- return;
19181
- }
19172
+ var target = _this.formatter.currentSpec.getTargetElement();
19173
+ if (!target) {
19174
+ return;
19175
+ }
19182
19176
 
19183
- var rect = target.getBoundingClientRect();
19177
+ var rect = target.getBoundingClientRect();
19184
19178
 
19185
- _this.dragStartX = event.clientX;
19186
- _this.preDragWidth = rect.width;
19187
- _this.targetRatio = rect.height / rect.width;
19179
+ _this.dragStartX = event.clientX;
19180
+ _this.preDragWidth = rect.width;
19181
+ _this.targetRatio = rect.height / rect.width;
19188
19182
 
19189
- document.addEventListener('mousemove', _this.onDrag);
19190
- document.addEventListener('mouseup', _this.onMouseUp);
19191
- };
19183
+ document.addEventListener('mousemove', _this.onDrag);
19184
+ document.addEventListener('mouseup', _this.onMouseUp);
19185
+ };
19192
19186
 
19193
- _this.onDrag = function (event) {
19194
- if (!_this.formatter.currentSpec) {
19195
- return;
19196
- }
19187
+ _this.onDrag = function (event) {
19188
+ if (!_this.formatter.currentSpec) {
19189
+ return;
19190
+ }
19197
19191
 
19198
- var target = _this.formatter.currentSpec.getTargetElement();
19199
- if (!target) {
19200
- return;
19201
- }
19192
+ var target = _this.formatter.currentSpec.getTargetElement();
19193
+ if (!target) {
19194
+ return;
19195
+ }
19202
19196
 
19203
- var deltaX = event.clientX - _this.dragStartX;
19204
- var newWidth = 0;
19197
+ var deltaX = event.clientX - _this.dragStartX;
19198
+ var newWidth = 0;
19205
19199
 
19206
- if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
19207
- newWidth = Math.round(_this.preDragWidth - deltaX);
19208
- } else {
19209
- newWidth = Math.round(_this.preDragWidth + deltaX);
19210
- }
19200
+ if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
19201
+ newWidth = Math.round(_this.preDragWidth - deltaX);
19202
+ } else {
19203
+ newWidth = Math.round(_this.preDragWidth + deltaX);
19204
+ }
19211
19205
 
19212
- var newHeight = _this.targetRatio * newWidth;
19206
+ var newHeight = _this.targetRatio * newWidth;
19213
19207
 
19214
- target.setAttribute('width', '' + newWidth);
19215
- target.setAttribute('height', '' + newHeight);
19208
+ target.setAttribute('width', '' + newWidth);
19209
+ target.setAttribute('height', '' + newHeight);
19216
19210
 
19217
- _this.formatter.update();
19218
- };
19211
+ _this.formatter.update();
19212
+ };
19219
19213
 
19220
- _this.onMouseUp = function () {
19221
- _this.setCursor('');
19222
- document.removeEventListener('mousemove', _this.onDrag);
19223
- document.removeEventListener('mouseup', _this.onMouseUp);
19224
- };
19214
+ _this.onMouseUp = function () {
19215
+ _this.setCursor('');
19216
+ document.removeEventListener('mousemove', _this.onDrag);
19217
+ document.removeEventListener('mouseup', _this.onMouseUp);
19218
+ };
19225
19219
 
19226
- _this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
19227
- _this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
19228
- _this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
19229
- _this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
19230
- _this.dragHandle = null;
19231
- _this.dragStartX = 0;
19232
- _this.preDragWidth = 0;
19233
- _this.targetRatio = 0;
19234
- return _this;
19235
- }
19220
+ _this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
19221
+ _this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
19222
+ _this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
19223
+ _this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
19224
+ _this.dragHandle = null;
19225
+ _this.dragStartX = 0;
19226
+ _this.preDragWidth = 0;
19227
+ _this.targetRatio = 0;
19228
+ return _this;
19229
+ }
19236
19230
 
19237
- _createClass(ResizeAction, [{
19238
- key: 'onCreate',
19239
- value: function onCreate() {
19240
- this.formatter.overlay.appendChild(this.topLeftHandle);
19241
- this.formatter.overlay.appendChild(this.topRightHandle);
19242
- this.formatter.overlay.appendChild(this.bottomRightHandle);
19243
- this.formatter.overlay.appendChild(this.bottomLeftHandle);
19231
+ _createClass$1(ResizeAction, [{
19232
+ key: 'onCreate',
19233
+ value: function onCreate() {
19234
+ this.formatter.overlay.appendChild(this.topLeftHandle);
19235
+ this.formatter.overlay.appendChild(this.topRightHandle);
19236
+ this.formatter.overlay.appendChild(this.bottomRightHandle);
19237
+ this.formatter.overlay.appendChild(this.bottomLeftHandle);
19244
19238
 
19245
- this.repositionHandles(this.formatter.options.resize.handleStyle);
19246
- }
19247
- }, {
19248
- key: 'onDestroy',
19249
- value: function onDestroy() {
19250
- this.setCursor('');
19251
- this.formatter.overlay.removeChild(this.topLeftHandle);
19252
- this.formatter.overlay.removeChild(this.topRightHandle);
19253
- this.formatter.overlay.removeChild(this.bottomRightHandle);
19254
- this.formatter.overlay.removeChild(this.bottomLeftHandle);
19255
- }
19256
- }, {
19257
- key: 'createHandle',
19258
- value: function createHandle(position, cursor) {
19259
- var box = document.createElement('div');
19260
- box.classList.add(this.formatter.options.resize.handleClassName);
19261
- box.setAttribute('data-position', position);
19262
- box.style.cursor = cursor;
19263
-
19264
- if (this.formatter.options.resize.handleStyle) {
19265
- Object.assign(box.style, this.formatter.options.resize.handleStyle);
19266
- }
19239
+ this.repositionHandles(this.formatter.options.resize.handleStyle);
19240
+ }
19241
+ }, {
19242
+ key: 'onDestroy',
19243
+ value: function onDestroy() {
19244
+ this.setCursor('');
19245
+ this.formatter.overlay.removeChild(this.topLeftHandle);
19246
+ this.formatter.overlay.removeChild(this.topRightHandle);
19247
+ this.formatter.overlay.removeChild(this.bottomRightHandle);
19248
+ this.formatter.overlay.removeChild(this.bottomLeftHandle);
19249
+ }
19250
+ }, {
19251
+ key: 'createHandle',
19252
+ value: function createHandle(position, cursor) {
19253
+ var box = document.createElement('div');
19254
+ box.classList.add(this.formatter.options.resize.handleClassName);
19255
+ box.setAttribute('data-position', position);
19256
+ box.style.cursor = cursor;
19257
+
19258
+ if (this.formatter.options.resize.handleStyle) {
19259
+ Object.assign(box.style, this.formatter.options.resize.handleStyle);
19260
+ }
19267
19261
 
19268
- box.addEventListener('mousedown', this.onMouseDown);
19262
+ box.addEventListener('mousedown', this.onMouseDown);
19269
19263
 
19270
- return box;
19271
- }
19272
- }, {
19273
- key: 'repositionHandles',
19274
- value: function repositionHandles(handleStyle) {
19275
- var handleXOffset = '0px';
19276
- var handleYOffset = '0px';
19277
- if (handleStyle) {
19278
- if (handleStyle.width) {
19279
- handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
19280
- }
19281
- if (handleStyle.height) {
19282
- handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
19283
- }
19284
- }
19264
+ return box;
19265
+ }
19266
+ }, {
19267
+ key: 'repositionHandles',
19268
+ value: function repositionHandles(handleStyle) {
19269
+ var handleXOffset = '0px';
19270
+ var handleYOffset = '0px';
19271
+ if (handleStyle) {
19272
+ if (handleStyle.width) {
19273
+ handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
19274
+ }
19275
+ if (handleStyle.height) {
19276
+ handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
19277
+ }
19278
+ }
19285
19279
 
19286
- Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
19287
- Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
19288
- Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
19289
- Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
19290
- }
19291
- }, {
19292
- key: 'setCursor',
19293
- value: function setCursor(value) {
19294
- if (document.body) {
19295
- document.body.style.cursor = value;
19296
- }
19280
+ Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
19281
+ Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
19282
+ Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
19283
+ Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
19284
+ }
19285
+ }, {
19286
+ key: 'setCursor',
19287
+ value: function setCursor(value) {
19288
+ if (document.body) {
19289
+ document.body.style.cursor = value;
19290
+ }
19297
19291
 
19298
- if (this.formatter.currentSpec) {
19299
- var target = this.formatter.currentSpec.getOverlayElement();
19300
- if (target) {
19301
- target.style.cursor = value;
19302
- }
19303
- }
19304
- }
19305
- }]);
19292
+ if (this.formatter.currentSpec) {
19293
+ var target = this.formatter.currentSpec.getOverlayElement();
19294
+ if (target) {
19295
+ target.style.cursor = value;
19296
+ }
19297
+ }
19298
+ }
19299
+ }]);
19306
19300
 
19307
- return ResizeAction;
19308
- }(_Action3.default);
19301
+ return ResizeAction;
19302
+ }(_Action3.default);
19309
19303
 
19310
- ResizeAction.default = ResizeAction$1;
19311
- return ResizeAction;
19312
- }
19304
+ ResizeAction$1.default = ResizeAction;
19313
19305
 
19314
19306
  var DeleteAction = {};
19315
19307
 
@@ -19416,7 +19408,7 @@ function requireBlotSpec () {
19416
19408
 
19417
19409
  var _AlignAction2 = _interopRequireDefault(_AlignAction);
19418
19410
 
19419
- var _ResizeAction = requireResizeAction();
19411
+ var _ResizeAction = ResizeAction$1;
19420
19412
 
19421
19413
  var _ResizeAction2 = _interopRequireDefault(_ResizeAction);
19422
19414
 
@@ -19548,156 +19540,148 @@ function requireImageSpec () {
19548
19540
 
19549
19541
  var IframeVideoSpec = {};
19550
19542
 
19551
- var UnclickableBlotSpec = {};
19552
-
19553
- var hasRequiredUnclickableBlotSpec;
19543
+ var UnclickableBlotSpec$1 = {};
19554
19544
 
19555
- function requireUnclickableBlotSpec () {
19556
- if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
19557
- hasRequiredUnclickableBlotSpec = 1;
19558
-
19559
- Object.defineProperty(UnclickableBlotSpec, "__esModule", {
19560
- value: true
19561
- });
19562
-
19563
- 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; }; }();
19545
+ Object.defineProperty(UnclickableBlotSpec$1, "__esModule", {
19546
+ value: true
19547
+ });
19564
19548
 
19565
- var _BlotSpec2 = requireBlotSpec();
19549
+ 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; }; }();
19566
19550
 
19567
- var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
19551
+ var _BlotSpec2 = requireBlotSpec();
19568
19552
 
19569
- var _BlotFormatter = requireBlotFormatter();
19553
+ var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
19570
19554
 
19571
- _interopRequireDefault(_BlotFormatter);
19555
+ var _BlotFormatter = requireBlotFormatter();
19572
19556
 
19573
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19557
+ _interopRequireDefault(_BlotFormatter);
19574
19558
 
19575
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19559
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19576
19560
 
19577
- 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; }
19561
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19578
19562
 
19579
- 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; }
19563
+ 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; }
19580
19564
 
19581
- var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
19582
- var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
19565
+ 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; }
19583
19566
 
19584
- var UnclickableBlotSpec$1 = function (_BlotSpec) {
19585
- _inherits(UnclickableBlotSpec, _BlotSpec);
19567
+ var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
19568
+ var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
19586
19569
 
19587
- function UnclickableBlotSpec(formatter, selector) {
19588
- _classCallCheck(this, UnclickableBlotSpec);
19570
+ var UnclickableBlotSpec = function (_BlotSpec) {
19571
+ _inherits(UnclickableBlotSpec, _BlotSpec);
19589
19572
 
19590
- var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
19573
+ function UnclickableBlotSpec(formatter, selector) {
19574
+ _classCallCheck(this, UnclickableBlotSpec);
19591
19575
 
19592
- _this.onTextChange = function () {
19593
- Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
19594
- unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
19595
- unclickable.addEventListener('mouseenter', _this.onMouseEnter);
19596
- });
19597
- };
19576
+ var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
19598
19577
 
19599
- _this.onMouseEnter = function (event) {
19600
- var unclickable = event.target;
19601
- if (!(unclickable instanceof HTMLElement)) {
19602
- return;
19603
- }
19578
+ _this.onTextChange = function () {
19579
+ Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
19580
+ unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
19581
+ unclickable.addEventListener('mouseenter', _this.onMouseEnter);
19582
+ });
19583
+ };
19604
19584
 
19605
- _this.nextUnclickable = unclickable;
19606
- _this.repositionProxyImage(_this.nextUnclickable);
19607
- };
19585
+ _this.onMouseEnter = function (event) {
19586
+ var unclickable = event.target;
19587
+ if (!(unclickable instanceof HTMLElement)) {
19588
+ return;
19589
+ }
19608
19590
 
19609
- _this.onProxyImageClick = function () {
19610
- _this.unclickable = _this.nextUnclickable;
19611
- _this.nextUnclickable = null;
19612
- _this.formatter.show(_this);
19613
- _this.hideProxyImage();
19614
- };
19591
+ _this.nextUnclickable = unclickable;
19592
+ _this.repositionProxyImage(_this.nextUnclickable);
19593
+ };
19615
19594
 
19616
- _this.selector = selector;
19617
- _this.unclickable = null;
19618
- _this.nextUnclickable = null;
19619
- return _this;
19620
- }
19595
+ _this.onProxyImageClick = function () {
19596
+ _this.unclickable = _this.nextUnclickable;
19597
+ _this.nextUnclickable = null;
19598
+ _this.formatter.show(_this);
19599
+ _this.hideProxyImage();
19600
+ };
19621
19601
 
19622
- _createClass(UnclickableBlotSpec, [{
19623
- key: 'init',
19624
- value: function init() {
19625
- if (document.body) {
19626
- /*
19627
- it's important that this is attached to the body instead of the root quill element.
19628
- this prevents the click event from overlapping with ImageSpec
19629
- */
19630
- document.body.appendChild(this.createProxyImage());
19631
- }
19602
+ _this.selector = selector;
19603
+ _this.unclickable = null;
19604
+ _this.nextUnclickable = null;
19605
+ return _this;
19606
+ }
19632
19607
 
19633
- this.hideProxyImage();
19634
- this.proxyImage.addEventListener('click', this.onProxyImageClick);
19635
- this.formatter.quill.on('text-change', this.onTextChange);
19636
- }
19637
- }, {
19638
- key: 'getTargetElement',
19639
- value: function getTargetElement() {
19640
- return this.unclickable;
19641
- }
19642
- }, {
19643
- key: 'getOverlayElement',
19644
- value: function getOverlayElement() {
19645
- return this.unclickable;
19646
- }
19647
- }, {
19648
- key: 'onHide',
19649
- value: function onHide() {
19650
- this.hideProxyImage();
19651
- this.nextUnclickable = null;
19652
- this.unclickable = null;
19653
- }
19654
- }, {
19655
- key: 'createProxyImage',
19656
- value: function createProxyImage() {
19657
- var canvas = document.createElement('canvas');
19658
- var context = canvas.getContext('2d');
19659
- context.globalAlpha = 0;
19660
- context.fillRect(0, 0, 1, 1);
19661
-
19662
- this.proxyImage = document.createElement('img');
19663
- this.proxyImage.src = canvas.toDataURL('image/png');
19664
- this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
19665
-
19666
- Object.assign(this.proxyImage.style, {
19667
- position: 'absolute',
19668
- margin: '0'
19669
- });
19608
+ _createClass(UnclickableBlotSpec, [{
19609
+ key: 'init',
19610
+ value: function init() {
19611
+ if (document.body) {
19612
+ /*
19613
+ it's important that this is attached to the body instead of the root quill element.
19614
+ this prevents the click event from overlapping with ImageSpec
19615
+ */
19616
+ document.body.appendChild(this.createProxyImage());
19617
+ }
19670
19618
 
19671
- return this.proxyImage;
19672
- }
19673
- }, {
19674
- key: 'hideProxyImage',
19675
- value: function hideProxyImage() {
19676
- Object.assign(this.proxyImage.style, {
19677
- display: 'none'
19678
- });
19679
- }
19680
- }, {
19681
- key: 'repositionProxyImage',
19682
- value: function repositionProxyImage(unclickable) {
19683
- var rect = unclickable.getBoundingClientRect();
19619
+ this.hideProxyImage();
19620
+ this.proxyImage.addEventListener('click', this.onProxyImageClick);
19621
+ this.formatter.quill.on('text-change', this.onTextChange);
19622
+ }
19623
+ }, {
19624
+ key: 'getTargetElement',
19625
+ value: function getTargetElement() {
19626
+ return this.unclickable;
19627
+ }
19628
+ }, {
19629
+ key: 'getOverlayElement',
19630
+ value: function getOverlayElement() {
19631
+ return this.unclickable;
19632
+ }
19633
+ }, {
19634
+ key: 'onHide',
19635
+ value: function onHide() {
19636
+ this.hideProxyImage();
19637
+ this.nextUnclickable = null;
19638
+ this.unclickable = null;
19639
+ }
19640
+ }, {
19641
+ key: 'createProxyImage',
19642
+ value: function createProxyImage() {
19643
+ var canvas = document.createElement('canvas');
19644
+ var context = canvas.getContext('2d');
19645
+ context.globalAlpha = 0;
19646
+ context.fillRect(0, 0, 1, 1);
19647
+
19648
+ this.proxyImage = document.createElement('img');
19649
+ this.proxyImage.src = canvas.toDataURL('image/png');
19650
+ this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
19651
+
19652
+ Object.assign(this.proxyImage.style, {
19653
+ position: 'absolute',
19654
+ margin: '0'
19655
+ });
19684
19656
 
19685
- Object.assign(this.proxyImage.style, {
19686
- display: 'block',
19687
- left: rect.left + window.pageXOffset + 'px',
19688
- top: rect.top + window.pageYOffset + 'px',
19689
- width: rect.width + 'px',
19690
- height: rect.height + 'px'
19691
- });
19692
- }
19693
- }]);
19657
+ return this.proxyImage;
19658
+ }
19659
+ }, {
19660
+ key: 'hideProxyImage',
19661
+ value: function hideProxyImage() {
19662
+ Object.assign(this.proxyImage.style, {
19663
+ display: 'none'
19664
+ });
19665
+ }
19666
+ }, {
19667
+ key: 'repositionProxyImage',
19668
+ value: function repositionProxyImage(unclickable) {
19669
+ var rect = unclickable.getBoundingClientRect();
19670
+
19671
+ Object.assign(this.proxyImage.style, {
19672
+ display: 'block',
19673
+ left: rect.left + window.pageXOffset + 'px',
19674
+ top: rect.top + window.pageYOffset + 'px',
19675
+ width: rect.width + 'px',
19676
+ height: rect.height + 'px'
19677
+ });
19678
+ }
19679
+ }]);
19694
19680
 
19695
- return UnclickableBlotSpec;
19696
- }(_BlotSpec3.default);
19681
+ return UnclickableBlotSpec;
19682
+ }(_BlotSpec3.default);
19697
19683
 
19698
- UnclickableBlotSpec.default = UnclickableBlotSpec$1;
19699
- return UnclickableBlotSpec;
19700
- }
19684
+ UnclickableBlotSpec$1.default = UnclickableBlotSpec;
19701
19685
 
19702
19686
  var hasRequiredIframeVideoSpec;
19703
19687
 
@@ -19709,7 +19693,7 @@ function requireIframeVideoSpec () {
19709
19693
  value: true
19710
19694
  });
19711
19695
 
19712
- var _UnclickableBlotSpec2 = requireUnclickableBlotSpec();
19696
+ var _UnclickableBlotSpec2 = UnclickableBlotSpec$1;
19713
19697
 
19714
19698
  var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
19715
19699
 
@@ -19909,7 +19893,7 @@ function requireOptions () {
19909
19893
  }
19910
19894
  });
19911
19895
 
19912
- var _ResizeAction = requireResizeAction();
19896
+ var _ResizeAction = ResizeAction$1;
19913
19897
 
19914
19898
  Object.defineProperty(exports, 'ResizeAction', {
19915
19899
  enumerable: true,
@@ -19936,7 +19920,7 @@ function requireOptions () {
19936
19920
  }
19937
19921
  });
19938
19922
 
19939
- var _UnclickableBlotSpec = requireUnclickableBlotSpec();
19923
+ var _UnclickableBlotSpec = UnclickableBlotSpec$1;
19940
19924
 
19941
19925
  Object.defineProperty(exports, 'UnclickableBlotSpec', {
19942
19926
  enumerable: true,
@@ -19989,7 +19973,11 @@ const QuillEditor = defineComponent({
19989
19973
  minHeight: {
19990
19974
  type: Number,
19991
19975
  required: false,
19992
- default: 90,
19976
+ default: 40,
19977
+ },
19978
+ needBorder: {
19979
+ type: Boolean,
19980
+ default: true,
19993
19981
  },
19994
19982
  theme: {
19995
19983
  type: String,
@@ -20052,6 +20040,11 @@ const QuillEditor = defineComponent({
20052
20040
  let quill;
20053
20041
  let options;
20054
20042
  const editor = ref();
20043
+ const editorStyleFilter = computed(() => {
20044
+ return {
20045
+ minHeight: `${props.minHeight}px`,
20046
+ };
20047
+ });
20055
20048
  // Register Module if not already registered
20056
20049
  const registerModule = (moduleName, module) => {
20057
20050
  // For Quill 1.x, we can't check if module is already registered
@@ -20325,12 +20318,13 @@ const QuillEditor = defineComponent({
20325
20318
  getText,
20326
20319
  setText,
20327
20320
  reinit,
20321
+ editorStyleFilter,
20328
20322
  };
20329
20323
  },
20330
20324
  render() {
20331
20325
  var _a, _b;
20332
20326
  return [
20333
- h('div', { class: 'quill-editor-container', style: { minHeight: `${this.$props.minHeight}px` } }, [
20327
+ h('div', { class: `quill-editor-container ${this.$props.needBorder ? 'need-border' : ''}`, style: this.editorStyleFilter }, [
20334
20328
  (_b = (_a = this.$slots).toolbar) === null || _b === void 0 ? void 0 : _b.call(_a),
20335
20329
  h('div', { ref: 'editor', ...this.$attrs }),
20336
20330
  ]),