@vueup/vue-quill 1.5.1 → 1.5.2

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * VueQuill @vueup/vue-quill v1.5.1
2
+ * VueQuill @vueup/vue-quill v1.5.2
3
3
  * https://vueup.github.io/vue-quill/
4
4
  *
5
5
  * Includes quill v2.0.2 || >=2.0.4 <3
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Copyright (c) 2026 Ahmad Luthfi Masruri
9
9
  * Released under the MIT license
10
- * Date: 2026-06-02T03:36:43.438Z
10
+ * Date: 2026-06-02T23:50:41.596Z
11
11
  */
12
12
  import Delta from 'quill-delta';
13
13
  export { default as Delta } from 'quill-delta';
@@ -96,6 +96,55 @@ const Quill = new Proxy(function QuillProxy() { }, {
96
96
  },
97
97
  });
98
98
 
99
+ const quillRegistrationPathPrefixes = new Set([
100
+ 'attributors',
101
+ 'blots',
102
+ 'formats',
103
+ 'modules',
104
+ 'themes',
105
+ 'ui',
106
+ ]);
107
+ const isQuillRegistrationPath = (name) => {
108
+ const [prefix] = name.split('/');
109
+ return quillRegistrationPathPrefixes.has(prefix);
110
+ };
111
+ const getModuleRegistrationName = (name) => {
112
+ return isQuillRegistrationPath(name) ? name : `modules/${name}`;
113
+ };
114
+ const getModuleOptionName = (name) => {
115
+ const registrationName = getModuleRegistrationName(name);
116
+ const modulePrefix = 'modules/';
117
+ return registrationName.startsWith(modulePrefix)
118
+ ? registrationName.slice(modulePrefix.length)
119
+ : undefined;
120
+ };
121
+ const globalRegistryPathPrefixes = new Set(['attributors', 'blots', 'formats']);
122
+ const usesParchmentRegistry = (name) => {
123
+ const [prefix] = name.split('/');
124
+ return globalRegistryPathPrefixes.has(prefix);
125
+ };
126
+ const getModuleOptions = (modules) => {
127
+ var _a;
128
+ const modulesOption = {};
129
+ const registrations = Array.isArray(modules) ? modules : [modules];
130
+ for (const module of registrations) {
131
+ const optionName = getModuleOptionName(module.name);
132
+ if (optionName)
133
+ modulesOption[optionName] = (_a = module.options) !== null && _a !== void 0 ? _a : {};
134
+ }
135
+ return Object.keys(modulesOption).length > 0 ? modulesOption : undefined;
136
+ };
137
+ const registerModule = (Quill, module, registry) => {
138
+ const moduleName = getModuleRegistrationName(module.name);
139
+ const quillImports = Quill.imports;
140
+ if (!quillImports || !(moduleName in quillImports)) {
141
+ Quill.register(moduleName, module.module);
142
+ }
143
+ if (registry && usesParchmentRegistry(moduleName)) {
144
+ registry.register(module.module);
145
+ }
146
+ };
147
+
99
148
  const QuillEditor = defineComponent({
100
149
  name: 'QuillEditor',
101
150
  inheritAttrs: false,
@@ -179,14 +228,6 @@ const QuillEditor = defineComponent({
179
228
  let quill;
180
229
  let options;
181
230
  const editor = ref();
182
- // Register Module if not already registered
183
- const registerModule = (Quill, moduleName, module) => {
184
- const quillImports = Quill.imports;
185
- if (quillImports && moduleName in quillImports) {
186
- return;
187
- }
188
- Quill.register(moduleName, module);
189
- };
190
231
  // Initialize Quill
191
232
  const initialize = async () => {
192
233
  var _a, _b;
@@ -201,11 +242,11 @@ const QuillEditor = defineComponent({
201
242
  if (props.modules) {
202
243
  if (Array.isArray(props.modules)) {
203
244
  for (const module of props.modules) {
204
- registerModule(Quill, `modules/${module.name}`, module.module);
245
+ registerModule(Quill, module, options.registry);
205
246
  }
206
247
  }
207
248
  else {
208
- registerModule(Quill, `modules/${props.modules.name}`, props.modules.module);
249
+ registerModule(Quill, props.modules, options.registry);
209
250
  }
210
251
  }
211
252
  // Create new Quill instance
@@ -259,20 +300,10 @@ const QuillEditor = defineComponent({
259
300
  };
260
301
  }
261
302
  if (props.modules) {
262
- const modules = (() => {
263
- var _a, _b;
264
- const modulesOption = {};
265
- if (Array.isArray(props.modules)) {
266
- for (const module of props.modules) {
267
- modulesOption[module.name] = (_a = module.options) !== null && _a !== void 0 ? _a : {};
268
- }
269
- }
270
- else {
271
- modulesOption[props.modules.name] = (_b = props.modules.options) !== null && _b !== void 0 ? _b : {};
272
- }
273
- return modulesOption;
274
- })();
275
- clientOptions.modules = Object.assign({}, clientOptions.modules, modules);
303
+ const modules = getModuleOptions(props.modules);
304
+ if (modules) {
305
+ clientOptions.modules = Object.assign({}, clientOptions.modules, modules);
306
+ }
276
307
  }
277
308
  return Object.assign({}, props.globalOptions, props.options, clientOptions);
278
309
  };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * VueQuill @vueup/vue-quill v1.5.1
2
+ * VueQuill @vueup/vue-quill v1.5.2
3
3
  * https://vueup.github.io/vue-quill/
4
4
  *
5
5
  * Includes quill v2.0.2 || >=2.0.4 <3
@@ -7,6 +7,6 @@
7
7
  *
8
8
  * Copyright (c) 2026 Ahmad Luthfi Masruri
9
9
  * Released under the MIT license
10
- * Date: 2026-06-02T03:36:43.438Z
10
+ * Date: 2026-06-02T23:50:41.596Z
11
11
  */
12
- import e from"quill-delta";export{default as Delta}from"quill-delta";import{defineComponent as t,h as o,onMounted as n,onBeforeUnmount as l,ref as r,watch as i,nextTick as a}from"vue";const s={essential:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}],["blockquote","code-block","link"],[{color:[]},"clean"]],minimal:[[{header:1},{header:2}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}]],full:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["link","video","image"],["clean"]]};let u,d,c=[];const b=()=>"undefined"!=typeof document,m=async()=>{if(u)return u;if(!b())throw new Error("@vueup/vue-quill: Quill can only be loaded in a browser environment.");return null!=d||(d=import("quill").then(({default:e})=>(u=e,(e=>{const t=c;c=[];for(const o of t)e.register(...o)})(e),e))),d},p=()=>u,f=()=>{if(u)return u;throw new Error("@vueup/vue-quill: Quill is not loaded yet. Use loadQuill() in a browser-only lifecycle hook, or access the Quill instance from the ready event.")},v=new Proxy(function(){},{get(e,t){if("register"===t)return(...e)=>{if(u)return u.register(...e);c.push(e),b()&&m()};const o=f(),n=o[t];return"function"==typeof n?n.bind(o):n},construct:(e,t)=>new(f())(...t)}),h=t({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:e=>["delta","html","text"].includes(e)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:e=>["snow","bubble",""].includes(e)},toolbar:{type:[String,Array,Object,Boolean],required:!1,default:void 0,validator:e=>"boolean"==typeof e?!1===e:"string"!=typeof e||""===e||("#"===e.charAt(0)||-1!==Object.keys(s).indexOf(e))},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(t,o)=>{n(()=>{c=!1,f()}),l(()=>{u=null,c=!0});let u,d,c=!1;const b=r(),p=(e,t,o)=>{const n=e.imports;n&&t in n||e.register(t,o)},f=async()=>{var e,n;if(!b.value)return;const l=b.value,r=await m();if(!c&&b.value&&b.value===l){if(d=v(),t.modules)if(Array.isArray(t.modules))for(const e of t.modules)p(r,`modules/${e.name}`,e.module);else p(r,`modules/${t.modules.name}`,t.modules.module);u=new r(b.value,d),C(t.content),u.on("text-change",O),u.on("selection-change",q),u.on("editor-change",x),"bubble"!==t.theme&&b.value.classList.remove("ql-bubble"),"snow"!==t.theme&&b.value.classList.remove("ql-snow"),null===(n=null===(e=y())||void 0===e?void 0:e.container)||void 0===n||n.addEventListener("mousedown",e=>{e.preventDefault()}),o.emit("ready",u)}},v=()=>{const e={};if(""!==t.theme&&(e.theme=t.theme),t.readOnly&&(e.readOnly=t.readOnly),t.placeholder&&(e.placeholder=t.placeholder),!1===t.toolbar?e.modules={toolbar:!1}:t.toolbar&&""!==t.toolbar&&(e.modules={toolbar:(()=>{if("object"==typeof t.toolbar)return t.toolbar;if("string"==typeof t.toolbar){return"#"===t.toolbar.charAt(0)?t.toolbar:s[t.toolbar]}})()}),t.modules){const o=(()=>{var e,o;const n={};if(Array.isArray(t.modules))for(const l of t.modules)n[l.name]=null!==(e=l.options)&&void 0!==e?e:{};else n[t.modules.name]=null!==(o=t.modules.options)&&void 0!==o?o:{};return n})();e.modules=Object.assign({},e.modules,o)}return Object.assign({},t.globalOptions,t.options,e)},h=e=>"object"==typeof e&&e?e.slice():e,y=()=>null==u?void 0:u.getModule("toolbar");let g;const w=e=>{if(typeof g==typeof e){if(e===g)return!0;if("object"==typeof e&&e&&"object"==typeof g&&g)return t=g.diff(e),!Object.values(t.ops).some(e=>!e.retain||1!==Object.keys(e).length)}var t;return!1},O=(e,n,l)=>{g=h(j()),w(t.content)||o.emit("update:content",g),o.emit("textChange",{delta:e,oldContents:n,source:l})},T=r(),q=(e,t,n)=>{T.value=!!(null==u?void 0:u.hasFocus()),o.emit("selectionChange",{range:e,oldRange:t,source:n})};i(T,e=>{o.emit(e?"focus":"blur",b)});const x=(...e)=>{"text-change"===e[0]&&o.emit("editorChange",{name:e[0],delta:e[1],oldContents:e[2],source:e[3]}),"selection-change"===e[0]&&o.emit("editorChange",{name:e[0],range:e[1],oldRange:e[2],source:e[3]})},j=(e,o)=>"html"===t.contentType?L():"text"===t.contentType?k(e,o):null==u?void 0:u.getContents(e,o),C=(o,n="api")=>{const l=o||("delta"===t.contentType?new e:"");"html"===t.contentType?S(l):"text"===t.contentType?A(l,n):null==u||u.setContents(l,n),g=h(l)},k=(e,t)=>{var o;return null!==(o=null==u?void 0:u.getText(e,t))&&void 0!==o?o:""},A=(e,t="api")=>{null==u||u.setText(e,t)},L=()=>{var e;return null!==(e=null==u?void 0:u.root.innerHTML)&&void 0!==e?e:""},S=e=>{u&&(u.root.innerHTML=e)};return i(()=>t.content,e=>{if(!u||!e||w(e))return;const t=u.getSelection();t&&a(()=>null==u?void 0:u.setSelection(t)),C(e)},{deep:!0}),i(()=>t.enable,e=>{u&&u.enable(e)}),{editor:b,getEditor:()=>b.value,getToolbar:()=>{var e;return null===(e=y())||void 0===e?void 0:e.container},getQuill:()=>{if(u)return u;throw'The quill editor hasn\'t been instantiated yet,\n make sure to call this method when the editor ready\n or use v-on:ready="onReady(quill)" event instead.'},getContents:j,setContents:C,getHTML:L,setHTML:S,pasteHTML:(e,t="api")=>{const o=null==u?void 0:u.clipboard.convert({html:e});o&&(null==u||u.setContents(o,t))},focus:()=>{null==u||u.focus()},getText:k,setText:A,reinit:()=>{a(()=>{var e,t;!o.slots.toolbar&&u&&(null===(t=null===(e=y())||void 0===e?void 0:e.container)||void 0===t||t.remove()),f()})}}},render(){var e,t;return[null===(t=(e=this.$slots).toolbar)||void 0===t?void 0:t.call(e),o("div",{ref:"editor",...this.$attrs})]}});export{v as Quill,h as QuillEditor,p as getLoadedQuill,m as loadQuill};
12
+ import e from"quill-delta";export{default as Delta}from"quill-delta";import{defineComponent as t,h as o,onMounted as n,onBeforeUnmount as l,ref as r,watch as i,nextTick as a}from"vue";const s={essential:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}],["blockquote","code-block","link"],[{color:[]},"clean"]],minimal:[[{header:1},{header:2}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}]],full:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["link","video","image"],["clean"]]};let u,d,c=[];const b=()=>"undefined"!=typeof document,m=async()=>{if(u)return u;if(!b())throw new Error("@vueup/vue-quill: Quill can only be loaded in a browser environment.");return null!=d||(d=import("quill").then(({default:e})=>(u=e,(e=>{const t=c;c=[];for(const o of t)e.register(...o)})(e),e))),d},p=()=>u,f=()=>{if(u)return u;throw new Error("@vueup/vue-quill: Quill is not loaded yet. Use loadQuill() in a browser-only lifecycle hook, or access the Quill instance from the ready event.")},v=new Proxy(function(){},{get(e,t){if("register"===t)return(...e)=>{if(u)return u.register(...e);c.push(e),b()&&m()};const o=f(),n=o[t];return"function"==typeof n?n.bind(o):n},construct:(e,t)=>new(f())(...t)}),h=new Set(["attributors","blots","formats","modules","themes","ui"]),y=e=>(e=>{const[t]=e.split("/");return h.has(t)})(e)?e:`modules/${e}`,g=e=>{const t=y(e),o="modules/";return t.startsWith(o)?t.slice(8):void 0},w=new Set(["attributors","blots","formats"]),O=(e,t,o)=>{const n=y(t.name),l=e.imports;l&&n in l||e.register(n,t.module),o&&(e=>{const[t]=e.split("/");return w.has(t)})(n)&&o.register(t.module)},T=t({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:e=>["delta","html","text"].includes(e)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:e=>["snow","bubble",""].includes(e)},toolbar:{type:[String,Array,Object,Boolean],required:!1,default:void 0,validator:e=>"boolean"==typeof e?!1===e:"string"!=typeof e||""===e||("#"===e.charAt(0)||-1!==Object.keys(s).indexOf(e))},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(t,o)=>{n(()=>{c=!1,p()}),l(()=>{u=null,c=!0});let u,d,c=!1;const b=r(),p=async()=>{var e,n;if(!b.value)return;const l=b.value,r=await m();if(!c&&b.value&&b.value===l){if(d=f(),t.modules)if(Array.isArray(t.modules))for(const e of t.modules)O(r,e,d.registry);else O(r,t.modules,d.registry);u=new r(b.value,d),k(t.content),u.on("text-change",T),u.on("selection-change",j),u.on("editor-change",x),"bubble"!==t.theme&&b.value.classList.remove("ql-bubble"),"snow"!==t.theme&&b.value.classList.remove("ql-snow"),null===(n=null===(e=h())||void 0===e?void 0:e.container)||void 0===n||n.addEventListener("mousedown",e=>{e.preventDefault()}),o.emit("ready",u)}},f=()=>{const e={};if(""!==t.theme&&(e.theme=t.theme),t.readOnly&&(e.readOnly=t.readOnly),t.placeholder&&(e.placeholder=t.placeholder),!1===t.toolbar?e.modules={toolbar:!1}:t.toolbar&&""!==t.toolbar&&(e.modules={toolbar:(()=>{if("object"==typeof t.toolbar)return t.toolbar;if("string"==typeof t.toolbar){return"#"===t.toolbar.charAt(0)?t.toolbar:s[t.toolbar]}})()}),t.modules){const o=(e=>{var t;const o={},n=Array.isArray(e)?e:[e];for(const l of n){const e=g(l.name);e&&(o[e]=null!==(t=l.options)&&void 0!==t?t:{})}return Object.keys(o).length>0?o:void 0})(t.modules);o&&(e.modules=Object.assign({},e.modules,o))}return Object.assign({},t.globalOptions,t.options,e)},v=e=>"object"==typeof e&&e?e.slice():e,h=()=>null==u?void 0:u.getModule("toolbar");let y;const w=e=>{if(typeof y==typeof e){if(e===y)return!0;if("object"==typeof e&&e&&"object"==typeof y&&y)return t=y.diff(e),!Object.values(t.ops).some(e=>!e.retain||1!==Object.keys(e).length)}var t;return!1},T=(e,n,l)=>{y=v(C()),w(t.content)||o.emit("update:content",y),o.emit("textChange",{delta:e,oldContents:n,source:l})},q=r(),j=(e,t,n)=>{q.value=!!(null==u?void 0:u.hasFocus()),o.emit("selectionChange",{range:e,oldRange:t,source:n})};i(q,e=>{o.emit(e?"focus":"blur",b)});const x=(...e)=>{"text-change"===e[0]&&o.emit("editorChange",{name:e[0],delta:e[1],oldContents:e[2],source:e[3]}),"selection-change"===e[0]&&o.emit("editorChange",{name:e[0],range:e[1],oldRange:e[2],source:e[3]})},C=(e,o)=>"html"===t.contentType?L():"text"===t.contentType?S(e,o):null==u?void 0:u.getContents(e,o),k=(o,n="api")=>{const l=o||("delta"===t.contentType?new e:"");"html"===t.contentType?M(l):"text"===t.contentType?A(l,n):null==u||u.setContents(l,n),y=v(l)},S=(e,t)=>{var o;return null!==(o=null==u?void 0:u.getText(e,t))&&void 0!==o?o:""},A=(e,t="api")=>{null==u||u.setText(e,t)},L=()=>{var e;return null!==(e=null==u?void 0:u.root.innerHTML)&&void 0!==e?e:""},M=e=>{u&&(u.root.innerHTML=e)};return i(()=>t.content,e=>{if(!u||!e||w(e))return;const t=u.getSelection();t&&a(()=>null==u?void 0:u.setSelection(t)),k(e)},{deep:!0}),i(()=>t.enable,e=>{u&&u.enable(e)}),{editor:b,getEditor:()=>b.value,getToolbar:()=>{var e;return null===(e=h())||void 0===e?void 0:e.container},getQuill:()=>{if(u)return u;throw'The quill editor hasn\'t been instantiated yet,\n make sure to call this method when the editor ready\n or use v-on:ready="onReady(quill)" event instead.'},getContents:C,setContents:k,getHTML:L,setHTML:M,pasteHTML:(e,t="api")=>{const o=null==u?void 0:u.clipboard.convert({html:e});o&&(null==u||u.setContents(o,t))},focus:()=>{null==u||u.focus()},getText:S,setText:A,reinit:()=>{a(()=>{var e,t;!o.slots.toolbar&&u&&(null===(t=null===(e=h())||void 0===e?void 0:e.container)||void 0===t||t.remove()),p()})}}},render(){var e,t;return[null===(t=(e=this.$slots).toolbar)||void 0===t?void 0:t.call(e),o("div",{ref:"editor",...this.$attrs})]}});export{v as Quill,T as QuillEditor,p as getLoadedQuill,m as loadQuill};
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * VueQuill @vueup/vue-quill v1.5.1
2
+ * VueQuill @vueup/vue-quill v1.5.2
3
3
  * https://vueup.github.io/vue-quill/
4
4
  *
5
5
  * Includes quill v2.0.2 || >=2.0.4 <3
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Copyright (c) 2026 Ahmad Luthfi Masruri
9
9
  * Released under the MIT license
10
- * Date: 2026-06-02T03:36:43.438Z
10
+ * Date: 2026-06-02T23:50:41.596Z
11
11
  */
12
12
  (function (global, factory) {
13
13
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
@@ -5600,6 +5600,55 @@
5600
5600
  },
5601
5601
  });
5602
5602
 
5603
+ const quillRegistrationPathPrefixes = new Set([
5604
+ 'attributors',
5605
+ 'blots',
5606
+ 'formats',
5607
+ 'modules',
5608
+ 'themes',
5609
+ 'ui',
5610
+ ]);
5611
+ const isQuillRegistrationPath = (name) => {
5612
+ const [prefix] = name.split('/');
5613
+ return quillRegistrationPathPrefixes.has(prefix);
5614
+ };
5615
+ const getModuleRegistrationName = (name) => {
5616
+ return isQuillRegistrationPath(name) ? name : `modules/${name}`;
5617
+ };
5618
+ const getModuleOptionName = (name) => {
5619
+ const registrationName = getModuleRegistrationName(name);
5620
+ const modulePrefix = 'modules/';
5621
+ return registrationName.startsWith(modulePrefix)
5622
+ ? registrationName.slice(modulePrefix.length)
5623
+ : undefined;
5624
+ };
5625
+ const globalRegistryPathPrefixes = new Set(['attributors', 'blots', 'formats']);
5626
+ const usesParchmentRegistry = (name) => {
5627
+ const [prefix] = name.split('/');
5628
+ return globalRegistryPathPrefixes.has(prefix);
5629
+ };
5630
+ const getModuleOptions = (modules) => {
5631
+ var _a;
5632
+ const modulesOption = {};
5633
+ const registrations = Array.isArray(modules) ? modules : [modules];
5634
+ for (const module of registrations) {
5635
+ const optionName = getModuleOptionName(module.name);
5636
+ if (optionName)
5637
+ modulesOption[optionName] = (_a = module.options) !== null && _a !== void 0 ? _a : {};
5638
+ }
5639
+ return Object.keys(modulesOption).length > 0 ? modulesOption : undefined;
5640
+ };
5641
+ const registerModule = (Quill, module, registry) => {
5642
+ const moduleName = getModuleRegistrationName(module.name);
5643
+ const quillImports = Quill.imports;
5644
+ if (!quillImports || !(moduleName in quillImports)) {
5645
+ Quill.register(moduleName, module.module);
5646
+ }
5647
+ if (registry && usesParchmentRegistry(moduleName)) {
5648
+ registry.register(module.module);
5649
+ }
5650
+ };
5651
+
5603
5652
  const QuillEditor = vue.defineComponent({
5604
5653
  name: 'QuillEditor',
5605
5654
  inheritAttrs: false,
@@ -5683,14 +5732,6 @@
5683
5732
  let quill;
5684
5733
  let options;
5685
5734
  const editor = vue.ref();
5686
- // Register Module if not already registered
5687
- const registerModule = (Quill, moduleName, module) => {
5688
- const quillImports = Quill.imports;
5689
- if (quillImports && moduleName in quillImports) {
5690
- return;
5691
- }
5692
- Quill.register(moduleName, module);
5693
- };
5694
5735
  // Initialize Quill
5695
5736
  const initialize = async () => {
5696
5737
  var _a, _b;
@@ -5705,11 +5746,11 @@
5705
5746
  if (props.modules) {
5706
5747
  if (Array.isArray(props.modules)) {
5707
5748
  for (const module of props.modules) {
5708
- registerModule(Quill, `modules/${module.name}`, module.module);
5749
+ registerModule(Quill, module, options.registry);
5709
5750
  }
5710
5751
  }
5711
5752
  else {
5712
- registerModule(Quill, `modules/${props.modules.name}`, props.modules.module);
5753
+ registerModule(Quill, props.modules, options.registry);
5713
5754
  }
5714
5755
  }
5715
5756
  // Create new Quill instance
@@ -5763,20 +5804,10 @@
5763
5804
  };
5764
5805
  }
5765
5806
  if (props.modules) {
5766
- const modules = (() => {
5767
- var _a, _b;
5768
- const modulesOption = {};
5769
- if (Array.isArray(props.modules)) {
5770
- for (const module of props.modules) {
5771
- modulesOption[module.name] = (_a = module.options) !== null && _a !== void 0 ? _a : {};
5772
- }
5773
- }
5774
- else {
5775
- modulesOption[props.modules.name] = (_b = props.modules.options) !== null && _b !== void 0 ? _b : {};
5776
- }
5777
- return modulesOption;
5778
- })();
5779
- clientOptions.modules = Object.assign({}, clientOptions.modules, modules);
5807
+ const modules = getModuleOptions(props.modules);
5808
+ if (modules) {
5809
+ clientOptions.modules = Object.assign({}, clientOptions.modules, modules);
5810
+ }
5780
5811
  }
5781
5812
  return Object.assign({}, props.globalOptions, props.options, clientOptions);
5782
5813
  };
@@ -7948,7 +7979,7 @@
7948
7979
  var Promise$1 = getNative(root, 'Promise');
7949
7980
 
7950
7981
  /* Built-in method references that are verified to be native. */
7951
- var Set = getNative(root, 'Set');
7982
+ var Set$1 = getNative(root, 'Set');
7952
7983
 
7953
7984
  /** `Object#toString` result references. */
7954
7985
  var mapTag$4 = '[object Map]',
@@ -7963,7 +7994,7 @@
7963
7994
  var dataViewCtorString = toSource(DataView),
7964
7995
  mapCtorString = toSource(Map),
7965
7996
  promiseCtorString = toSource(Promise$1),
7966
- setCtorString = toSource(Set),
7997
+ setCtorString = toSource(Set$1),
7967
7998
  weakMapCtorString = toSource(WeakMap$1);
7968
7999
 
7969
8000
  /**
@@ -7979,7 +8010,7 @@
7979
8010
  if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$3) ||
7980
8011
  (Map && getTag(new Map) != mapTag$4) ||
7981
8012
  (Promise$1 && getTag(Promise$1.resolve()) != promiseTag) ||
7982
- (Set && getTag(new Set) != setTag$4) ||
8013
+ (Set$1 && getTag(new Set$1) != setTag$4) ||
7983
8014
  (WeakMap$1 && getTag(new WeakMap$1) != weakMapTag$1)) {
7984
8015
  getTag = function(value) {
7985
8016
  var result = baseGetTag(value),