vue2-premium-bbl-editor 1.2.5 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.2.6] - 2025-01-19
9
+
10
+ ### 🐛 Bug Fixes
11
+
12
+ #### ImageModal Upload URL Fix
13
+ - **Fixed uploaded URL not being used**: ImageModal now correctly uses the uploaded URL from uploadHandler instead of falling back to blob URL
14
+ - **Improved upload logic**: Fixed condition that was checking for uploadManager when using uploadHandler
15
+ - **Enhanced URL insertion**: Upload results now properly insert the API-returned URL instead of local blob URL
16
+ - **Better upload detection**: Simplified logic to check for uploadedUrl regardless of upload method
17
+
18
+ #### Technical Improvements
19
+ - Fixed insertImage method to prioritize uploadedUrl over local blob URL
20
+ - Improved upload success detection for both uploadManager and uploadHandler workflows
21
+ - Enhanced debugging with clearer console logs for upload URL usage
22
+
8
23
  ## [1.2.5] - 2025-01-19
9
24
 
10
25
  ### 🐛 Bug Fixes
@@ -161,6 +161,17 @@ module.exports = require("@tiptap/extension-code");
161
161
  /* unused harmony reexport * */
162
162
 
163
163
 
164
+ /***/ }),
165
+
166
+ /***/ "2e48":
167
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
168
+
169
+ "use strict";
170
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ImageModal_vue_vue_type_style_index_0_id_76b0e5d0_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f07d");
171
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ImageModal_vue_vue_type_style_index_0_id_76b0e5d0_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ImageModal_vue_vue_type_style_index_0_id_76b0e5d0_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
172
+ /* unused harmony reexport * */
173
+
174
+
164
175
  /***/ }),
165
176
 
166
177
  /***/ "2f31":
@@ -566,13 +577,6 @@ webpackEmptyContext.id = "de6e";
566
577
 
567
578
  /***/ }),
568
579
 
569
- /***/ "e487":
570
- /***/ (function(module, exports, __webpack_require__) {
571
-
572
- // extracted by mini-css-extract-plugin
573
-
574
- /***/ }),
575
-
576
580
  /***/ "e59b":
577
581
  /***/ (function(module, exports, __webpack_require__) {
578
582
 
@@ -2800,6 +2804,13 @@ if (typeof window !== 'undefined' && window.Vue) {
2800
2804
 
2801
2805
 
2802
2806
 
2807
+ /***/ }),
2808
+
2809
+ /***/ "f07d":
2810
+ /***/ (function(module, exports, __webpack_require__) {
2811
+
2812
+ // extracted by mini-css-extract-plugin
2813
+
2803
2814
  /***/ }),
2804
2815
 
2805
2816
  /***/ "f24c":
@@ -19404,12 +19415,12 @@ var VideoBubbleMenu_component = normalizeComponent(
19404
19415
  )
19405
19416
 
19406
19417
  /* harmony default export */ var VideoBubbleMenu = (VideoBubbleMenu_component.exports);
19407
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5dbcdb77-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Modals/ImageModal.vue?vue&type=template&id=85da3900&scoped=true
19408
- var ImageModalvue_type_template_id_85da3900_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.visible)?_c('div',{staticClass:"upload-modal-overlay",on:{"click":_vm.handleOverlayClick}},[_c('div',{staticClass:"upload-modal",on:{"click":function($event){$event.stopPropagation();}}},[_c('div',{staticClass:"modal-header"},[_c('h3',[_vm._v("Insert Image")]),_c('button',{staticClass:"close-btn",on:{"click":_vm.close}},[_vm._v("×")])]),_c('div',{staticClass:"modal-body"},[_c('div',{staticClass:"tab-buttons"},[_c('button',{class:['tab-btn', { active: _vm.activeTab === 'upload' }],on:{"click":function($event){_vm.activeTab = 'upload'}}},[_vm._v(" Upload File ")]),_c('button',{class:['tab-btn', { active: _vm.activeTab === 'url' }],on:{"click":function($event){_vm.activeTab = 'url'}}},[_vm._v(" From URL ")])]),(_vm.activeTab === 'upload')?_c('div',{staticClass:"tab-content"},[(!_vm.previewUrl)?_c('div',{staticClass:"drop-zone",class:{ 'drag-over': _vm.isDragOver },on:{"click":function($event){return _vm.$refs.fileInput.click()},"dragover":function($event){$event.preventDefault();_vm.isDragOver = true},"dragleave":function($event){_vm.isDragOver = false},"drop":function($event){$event.preventDefault();return _vm.handleDrop.apply(null, arguments)}}},[_c('div',{staticClass:"drop-zone-icon"},[_vm._v("📁")]),_c('div',{staticClass:"drop-zone-title"},[_vm._v("Drop image here or click to browse")]),_c('div',{staticClass:"drop-zone-subtitle"},[_vm._v("Supports: JPG, PNG, GIF, WebP (max 10MB)")]),_c('input',{ref:"fileInput",staticStyle:{"display":"none"},attrs:{"type":"file","accept":"image/*"},on:{"change":_vm.handleFileSelect}})]):_c('div',{staticClass:"preview-container"},[_c('img',{staticClass:"preview-image",attrs:{"src":_vm.previewUrl,"alt":"Preview"}}),_c('div',{staticClass:"preview-info"},[_c('div',{staticClass:"preview-filename"},[_vm._v(_vm._s(_vm.selectedFile && _vm.selectedFile.name))]),_c('div',{staticClass:"preview-size"},[_vm._v(_vm._s(_vm.formatFileSize(_vm.selectedFile && _vm.selectedFile.size)))])]),(!_vm.isUploading && !_vm.uploadError && _vm.uploadedUrl)?_c('div',{staticClass:"upload-success"},[_vm._m(0)]):_vm._e(),(_vm.isUploading)?_c('div',{staticClass:"upload-progress"},[_c('div',{staticClass:"progress-bar"},[_c('div',{staticClass:"progress-fill",style:({ width: _vm.uploadProgress + '%' })})]),_c('div',{staticClass:"progress-text"},[_vm._v("Uploading... "+_vm._s(_vm.uploadProgress)+"%")])]):_vm._e(),(_vm.uploadError)?_c('div',{staticClass:"upload-error"},[_c('div',{staticClass:"error-message"},[_c('span',{staticClass:"error-icon"},[_vm._v("⚠️")]),_vm._v(" "+_vm._s(_vm.uploadError)+" ")]),_c('div',{staticClass:"error-actions"},[_c('button',{staticClass:"retry-btn",on:{"click":_vm.retryUpload}},[_vm._v("Try Again")]),_c('button',{staticClass:"local-btn",on:{"click":_vm.insertLocalImage}},[_vm._v("Use Local File")])])]):_vm._e(),(!_vm.isUploading && !_vm.uploadError)?_c('button',{staticClass:"change-btn",on:{"click":_vm.changeFile}},[_vm._v("Change Image")]):_vm._e()])]):_vm._e(),(_vm.activeTab === 'url')?_c('div',{staticClass:"tab-content"},[_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.imageUrl),expression:"imageUrl"}],staticClass:"url-input",attrs:{"type":"url","placeholder":"https://example.com/image.jpg"},domProps:{"value":(_vm.imageUrl)},on:{"input":function($event){if($event.target.composing){ return; }_vm.imageUrl=$event.target.value}}}),_c('div',{staticClass:"url-help"},[_vm._v("Enter a direct link to an image file")])]):_vm._e()]),_c('div',{staticClass:"modal-footer"},[_c('button',{staticClass:"cancel-btn",on:{"click":_vm.close}},[_vm._v("Cancel")]),_c('button',{staticClass:"insert-btn",attrs:{"disabled":_vm.isUploading || (_vm.activeTab === 'upload' && !_vm.selectedFile) || (_vm.activeTab === 'url' && !_vm.imageUrl.trim())},on:{"click":_vm.insertImage}},[(_vm.isUploading)?_c('span',[_vm._v("Uploading...")]):_c('span',[_vm._v("Insert Image")])])])])]):_vm._e()}
19409
- var ImageModalvue_type_template_id_85da3900_scoped_true_staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"success-message"},[_c('span',{staticClass:"success-icon"},[_vm._v("✅")]),_vm._v(" Upload complete! Ready to insert. ")])}]
19418
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5dbcdb77-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Modals/ImageModal.vue?vue&type=template&id=76b0e5d0&scoped=true
19419
+ var ImageModalvue_type_template_id_76b0e5d0_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.visible)?_c('div',{staticClass:"upload-modal-overlay",on:{"click":_vm.handleOverlayClick}},[_c('div',{staticClass:"upload-modal",on:{"click":function($event){$event.stopPropagation();}}},[_c('div',{staticClass:"modal-header"},[_c('h3',[_vm._v("Insert Image")]),_c('button',{staticClass:"close-btn",on:{"click":_vm.close}},[_vm._v("×")])]),_c('div',{staticClass:"modal-body"},[_c('div',{staticClass:"tab-buttons"},[_c('button',{class:['tab-btn', { active: _vm.activeTab === 'upload' }],on:{"click":function($event){_vm.activeTab = 'upload'}}},[_vm._v(" Upload File ")]),_c('button',{class:['tab-btn', { active: _vm.activeTab === 'url' }],on:{"click":function($event){_vm.activeTab = 'url'}}},[_vm._v(" From URL ")])]),(_vm.activeTab === 'upload')?_c('div',{staticClass:"tab-content"},[(!_vm.previewUrl)?_c('div',{staticClass:"drop-zone",class:{ 'drag-over': _vm.isDragOver },on:{"click":function($event){return _vm.$refs.fileInput.click()},"dragover":function($event){$event.preventDefault();_vm.isDragOver = true},"dragleave":function($event){_vm.isDragOver = false},"drop":function($event){$event.preventDefault();return _vm.handleDrop.apply(null, arguments)}}},[_c('div',{staticClass:"drop-zone-icon"},[_vm._v("📁")]),_c('div',{staticClass:"drop-zone-title"},[_vm._v("Drop image here or click to browse")]),_c('div',{staticClass:"drop-zone-subtitle"},[_vm._v("Supports: JPG, PNG, GIF, WebP (max 10MB)")]),_c('input',{ref:"fileInput",staticStyle:{"display":"none"},attrs:{"type":"file","accept":"image/*"},on:{"change":_vm.handleFileSelect}})]):_c('div',{staticClass:"preview-container"},[_c('img',{staticClass:"preview-image",attrs:{"src":_vm.previewUrl,"alt":"Preview"}}),_c('div',{staticClass:"preview-info"},[_c('div',{staticClass:"preview-filename"},[_vm._v(_vm._s(_vm.selectedFile && _vm.selectedFile.name))]),_c('div',{staticClass:"preview-size"},[_vm._v(_vm._s(_vm.formatFileSize(_vm.selectedFile && _vm.selectedFile.size)))])]),(!_vm.isUploading && !_vm.uploadError && _vm.uploadedUrl)?_c('div',{staticClass:"upload-success"},[_vm._m(0)]):_vm._e(),(_vm.isUploading)?_c('div',{staticClass:"upload-progress"},[_c('div',{staticClass:"progress-bar"},[_c('div',{staticClass:"progress-fill",style:({ width: _vm.uploadProgress + '%' })})]),_c('div',{staticClass:"progress-text"},[_vm._v("Uploading... "+_vm._s(_vm.uploadProgress)+"%")])]):_vm._e(),(_vm.uploadError)?_c('div',{staticClass:"upload-error"},[_c('div',{staticClass:"error-message"},[_c('span',{staticClass:"error-icon"},[_vm._v("⚠️")]),_vm._v(" "+_vm._s(_vm.uploadError)+" ")]),_c('div',{staticClass:"error-actions"},[_c('button',{staticClass:"retry-btn",on:{"click":_vm.retryUpload}},[_vm._v("Try Again")]),_c('button',{staticClass:"local-btn",on:{"click":_vm.insertLocalImage}},[_vm._v("Use Local File")])])]):_vm._e(),(!_vm.isUploading && !_vm.uploadError)?_c('button',{staticClass:"change-btn",on:{"click":_vm.changeFile}},[_vm._v("Change Image")]):_vm._e()])]):_vm._e(),(_vm.activeTab === 'url')?_c('div',{staticClass:"tab-content"},[_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.imageUrl),expression:"imageUrl"}],staticClass:"url-input",attrs:{"type":"url","placeholder":"https://example.com/image.jpg"},domProps:{"value":(_vm.imageUrl)},on:{"input":function($event){if($event.target.composing){ return; }_vm.imageUrl=$event.target.value}}}),_c('div',{staticClass:"url-help"},[_vm._v("Enter a direct link to an image file")])]):_vm._e()]),_c('div',{staticClass:"modal-footer"},[_c('button',{staticClass:"cancel-btn",on:{"click":_vm.close}},[_vm._v("Cancel")]),_c('button',{staticClass:"insert-btn",attrs:{"disabled":_vm.isUploading || (_vm.activeTab === 'upload' && !_vm.selectedFile) || (_vm.activeTab === 'url' && !_vm.imageUrl.trim())},on:{"click":_vm.insertImage}},[(_vm.isUploading)?_c('span',[_vm._v("Uploading...")]):_c('span',[_vm._v("Insert Image")])])])])]):_vm._e()}
19420
+ var ImageModalvue_type_template_id_76b0e5d0_scoped_true_staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"success-message"},[_c('span',{staticClass:"success-icon"},[_vm._v("✅")]),_vm._v(" Upload complete! Ready to insert. ")])}]
19410
19421
 
19411
19422
 
19412
- // CONCATENATED MODULE: ./src/components/Modals/ImageModal.vue?vue&type=template&id=85da3900&scoped=true
19423
+ // CONCATENATED MODULE: ./src/components/Modals/ImageModal.vue?vue&type=template&id=76b0e5d0&scoped=true
19413
19424
 
19414
19425
  // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/babel-loader/lib??ref--15!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Modals/ImageModal.vue?vue&type=script&lang=js
19415
19426
  function _regenerator() {
@@ -19830,16 +19841,16 @@ function _asyncToGenerator(n) {
19830
19841
  });
19831
19842
  _this4.close();
19832
19843
  } else if (_this4.activeTab === 'upload' && _this4.selectedFile) {
19833
- // If there's an upload manager and upload was successful, use the uploaded URL
19834
- if (_this4.uploadManager && _this4.uploadedUrl) {
19844
+ // If upload was successful (either via uploadManager or uploadHandler), use the uploaded URL
19845
+ if (_this4.uploadedUrl) {
19835
19846
  _this4.insertImageWithSrc(_this4.uploadedUrl);
19836
- } else if (!_this4.uploadManager) {
19837
- // No API upload, just insert the local file
19847
+ } else if (!_this4.uploadManager && !_this4.uploadHandler) {
19848
+ // No upload system available, just insert the local file
19838
19849
  src = URL.createObjectURL(_this4.selectedFile);
19839
19850
  console.log('Using local object URL:', src);
19840
19851
  _this4.insertImageWithSrc(src);
19841
19852
  } else {
19842
- // Upload manager exists but no uploaded URL yet - use local preview
19853
+ // Upload system exists but no uploaded URL yet - use local preview
19843
19854
  console.log('Using local preview URL:', _this4.previewUrl);
19844
19855
  _this4.insertImageWithSrc(_this4.previewUrl);
19845
19856
  }
@@ -20035,8 +20046,8 @@ function _asyncToGenerator(n) {
20035
20046
  });
20036
20047
  // CONCATENATED MODULE: ./src/components/Modals/ImageModal.vue?vue&type=script&lang=js
20037
20048
  /* harmony default export */ var Modals_ImageModalvue_type_script_lang_js = (ImageModalvue_type_script_lang_js);
20038
- // EXTERNAL MODULE: ./src/components/Modals/ImageModal.vue?vue&type=style&index=0&id=85da3900&prod&scoped=true&lang=css
20039
- var ImageModalvue_type_style_index_0_id_85da3900_prod_scoped_true_lang_css = __webpack_require__("fc39");
20049
+ // EXTERNAL MODULE: ./src/components/Modals/ImageModal.vue?vue&type=style&index=0&id=76b0e5d0&prod&scoped=true&lang=css
20050
+ var ImageModalvue_type_style_index_0_id_76b0e5d0_prod_scoped_true_lang_css = __webpack_require__("2e48");
20040
20051
 
20041
20052
  // CONCATENATED MODULE: ./src/components/Modals/ImageModal.vue
20042
20053
 
@@ -20049,11 +20060,11 @@ var ImageModalvue_type_style_index_0_id_85da3900_prod_scoped_true_lang_css = __w
20049
20060
 
20050
20061
  var ImageModal_component = normalizeComponent(
20051
20062
  Modals_ImageModalvue_type_script_lang_js,
20052
- ImageModalvue_type_template_id_85da3900_scoped_true_render,
20053
- ImageModalvue_type_template_id_85da3900_scoped_true_staticRenderFns,
20063
+ ImageModalvue_type_template_id_76b0e5d0_scoped_true_render,
20064
+ ImageModalvue_type_template_id_76b0e5d0_scoped_true_staticRenderFns,
20054
20065
  false,
20055
20066
  null,
20056
- "85da3900",
20067
+ "76b0e5d0",
20057
20068
  null
20058
20069
 
20059
20070
  )
@@ -23781,17 +23792,6 @@ if (typeof window !== 'undefined' && window.Vue) {
23781
23792
 
23782
23793
 
23783
23794
 
23784
- /***/ }),
23785
-
23786
- /***/ "fc39":
23787
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
23788
-
23789
- "use strict";
23790
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ImageModal_vue_vue_type_style_index_0_id_85da3900_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("e487");
23791
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ImageModal_vue_vue_type_style_index_0_id_85da3900_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ImageModal_vue_vue_type_style_index_0_id_85da3900_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
23792
- /* unused harmony reexport * */
23793
-
23794
-
23795
23795
  /***/ })
23796
23796
 
23797
23797
  /******/ });