@editora/core 1.0.17 โ†’ 1.0.18

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/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./index-_eKRBZPq.js");class v{constructor(e){if(this.listeners=[],e instanceof l.PluginManager)this.pluginManager=e;else{const i=e;this.pluginManager=new l.PluginManager,i.plugins&&Array.isArray(i.plugins)&&i.plugins.forEach(n=>{this.pluginManager.register(n)}),i.element&&(this.domElement=i.element,this.setupDOMElement(i))}const t=this.pluginManager.buildSchema();this.state=l.EditorState.create(t),this.commands=this.pluginManager.getCommands()}setupDOMElement(e){this.domElement&&(e.enableToolbar!==!1&&e.toolbarElement?this.toolbarElement=e.toolbarElement:e.enableToolbar!==!1&&(this.toolbarElement=document.createElement("div"),this.toolbarElement.className="editora-toolbar-container",this.domElement.appendChild(this.toolbarElement)),this.contentElement=document.createElement("div"),this.contentElement.contentEditable="true",this.contentElement.className="editora-content",this.contentElement.style.minHeight="200px",this.contentElement.style.outline="none",this.contentElement.style.padding="12px",e.content&&(this.contentElement.innerHTML=e.content),this.domElement.appendChild(this.contentElement),this.contentElement.addEventListener("input",()=>{this.listeners.forEach(t=>t(this.state))}))}setupKeyboardShortcuts(e){const t={};e.forEach(i=>{i.shortcut&&(t[i.shortcut.toLowerCase()]=i.command)}),document.addEventListener("keydown",i=>{if(this.contentElement!==document.activeElement&&!(document.activeElement instanceof HTMLElement&&document.activeElement.contentEditable==="true"))return;const n=[];(i.ctrlKey||i.metaKey)&&n.push("ctrl"),i.shiftKey&&n.push("shift"),i.altKey&&n.push("alt");const o=i.key.toLowerCase(),s=n.length>0?`${n.join("+")}+${o}`:o,a=t[s];a&&(i.preventDefault(),this.execCommand(a))})}handleToolbarCommand(e,t){const n=this.pluginManager.getToolbarItems().find(o=>o.id&&o.id===e||o.command===e);n!=null&&n.command&&(t!==void 0?this.execCommand(n.command,t):this.execCommand(n.command))}setState(e){this.state=e,this.listeners.forEach(t=>t(e))}onChange(e){return this.listeners.push(e),()=>{this.listeners=this.listeners.filter(t=>t!==e)}}on(e,t){return e==="change"||e==="input"?this.onChange(t):()=>{}}getElement(){return this.contentElement||this.domElement||null}execCommand(e,t){const i=this.commands[e];if(!i)return console.warn(`Command not found: ${e}`),!1;let n;return t!==void 0?n=i(this.state,t):n=i(this.state),n instanceof Promise?(n.then(o=>{o&&typeof o=="object"&&"doc"in o&&"selection"in o&&this.setState(o)}).catch(o=>{console.error(`Async command failed: ${e}`,o)}),!0):n&&typeof n=="object"&&"doc"in n&&"selection"in n?(this.setState(n),!0):n!==!1&&n!=null}setContent(e){typeof e=="string"?this.contentElement&&(this.contentElement.innerHTML=e):this.setState(this.state.apply(e))}getContent(){return this.contentElement?this.contentElement.innerHTML:this.state.doc}destroy(){this.listeners=[],this.contentElement&&this.contentElement.removeEventListener("input",()=>{})}}class b{constructor(e){this.initialized=!1,this.plugin=e}initialize(e){var t,i;if(this.initialized)return console.warn(`Plugin "${this.plugin.name}" already initialized`),!1;try{return this.context=e,(t=this.plugin.context)!=null&&t.initialize&&this.plugin.context.initialize(),(i=this.plugin.context)!=null&&i.onEditorReady&&e.provider&&this.plugin.context.onEditorReady(e),this.initialized=!0,!0}catch(n){return console.error(`Failed to initialize plugin "${this.plugin.name}":`,n),!1}}destroy(){var e;if(!this.initialized)return!1;try{return(e=this.plugin.context)!=null&&e.destroy&&this.plugin.context.destroy(),this.initialized=!1,this.context=void 0,!0}catch(t){return console.error(`Failed to destroy plugin "${this.plugin.name}":`,t),!1}}executeCommand(e,...t){var i;if(!this.initialized)return console.warn(`Plugin "${this.plugin.name}" not initialized, cannot execute command "${e}"`),null;try{const n=(i=this.plugin.commands)==null?void 0:i[e];return n?n(...t):(console.warn(`Command "${e}" not found in plugin "${this.plugin.name}"`),null)}catch(n){return console.error(`Error executing command "${e}" in plugin "${this.plugin.name}":`,n),null}}getName(){return this.plugin.name}isInitialized(){return this.initialized}getPlugin(){return this.plugin}getContext(){return this.context}}function E(r){return new b(r)}function x(r={}){const{enabled:e=!1,provider:t="browser",apiUrl:i="",apiHeaders:n={},language:o="en",customDictionary:s=[],ignoreAllCaps:a=!0,ignoreNumbers:c=!0}=r;return{name:"spellcheck",context:{initialize:()=>{if(e)switch(console.log("[Spellcheck Plugin] Initialized",{provider:t,language:o}),t){case"browser":console.log("[Spellcheck] Using browser spellcheck");break;case"local":console.log("[Spellcheck] Using local dictionary (not implemented)");break;case"api":i?console.log("[Spellcheck] Using API:",i):console.warn("[Spellcheck] API provider selected but no apiUrl provided");break}},destroy:()=>{console.log("[Spellcheck Plugin] Destroyed")},onEditorReady:h=>{console.log("[Spellcheck Plugin] Editor ready")}},commands:{toggleSpellcheck:()=>(console.log("[Spellcheck] Toggle command (not implemented)"),null),addToDictionary:h=>(console.log("[Spellcheck] Add to dictionary:",h),null),checkSpelling:async()=>(console.log("[Spellcheck] Check spelling (not implemented)"),null)},toolbar:e?[{label:"Spellcheck",command:"toggleSpellcheck",icon:"Aa",type:"button"}]:[]}}function w(r={}){const{uploadUrl:e="",libraryUrl:t="",maxFileSize:i=10*1024*1024,allowedTypes:n=["image/jpeg","image/png","image/gif","image/webp"],headers:o={},withCredentials:s=!1,chunkSize:a=1024*1024,enableChunking:c=!0,onProgress:h,onError:u,onSuccess:H}=r;return{name:"media",context:{initialize:()=>{console.log("[Media Plugin] Initialized",{uploadUrl:e,libraryUrl:t,maxFileSize:i,allowedTypes:n}),e||console.warn("[Media] No uploadUrl provided - upload will not work")},destroy:()=>{console.log("[Media Plugin] Destroyed")},onEditorReady:d=>{console.log("[Media Plugin] Editor ready")}},commands:{insertImage:async d=>{if(console.log("[Media] Insert image command (not implemented)",d),!d)return console.log("[Media] No file provided - should open picker"),null;if(!n.includes(d.type)){const g=new Error(`File type ${d.type} not allowed`);return u==null||u(g),null}if(d.size>i){const g=new Error(`File size ${d.size} exceeds max ${i}`);return u==null||u(g),null}return null},openMediaLibrary:()=>(console.log("[Media] Open media library (not implemented)"),t||console.warn("[Media] No libraryUrl provided"),null),uploadMedia:async d=>(console.log("[Media] Upload media (not implemented)",{name:d.name,size:d.size,type:d.type}),null)},toolbar:[{label:"Image",command:"insertImage",icon:"๐Ÿ–ผ๏ธ",type:"button"},{label:"Media Library",command:"openMediaLibrary",icon:"๐Ÿ“",type:"button"}]}}class p{constructor(e,t={anchor:0,head:0}){this.doc=e,this.selection=t}getDocument(){return this.doc}setDocument(e){return new p(e,this.selection)}getSelection(){return{...this.selection}}setSelection(e){return new p(this.doc,e)}update(e,t){return new p(e||this.doc,t||this.selection)}getTextContent(){return""}isSelectionEmpty(){return this.selection.anchor===this.selection.head}}class m{constructor(e){this.config={closeOnEscape:!0,closeOnBackdrop:!0,...e},this.element=this.createElement(),this.attachEventListeners()}createElement(){const e=document.createElement("dialog");e.className="editora-dialog",this.config.width&&(e.style.width=this.config.width),this.config.height&&(e.style.height=this.config.height);const t=this.config.buttons&&this.config.buttons.length>0?this.config.buttons.map((i,n)=>`<button type="button" class="editora-btn ${i.type==="danger"?"editora-btn-danger":i.type==="primary"||i.primary?"editora-btn-primary":"editora-btn-cancel"}" data-dialog-button="${n}">${i.label}</button>`).join(""):`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./index-_eKRBZPq.js");class w{constructor(e){if(this.listeners=[],e instanceof l.PluginManager)this.pluginManager=e;else{const i=e;this.pluginManager=new l.PluginManager,i.plugins&&Array.isArray(i.plugins)&&i.plugins.forEach(n=>{this.pluginManager.register(n)}),i.element&&(this.domElement=i.element,this.setupDOMElement(i))}const t=this.pluginManager.buildSchema();this.state=l.EditorState.create(t),this.commands=this.pluginManager.getCommands()}setupDOMElement(e){this.domElement&&(e.enableToolbar!==!1&&e.toolbarElement?this.toolbarElement=e.toolbarElement:e.enableToolbar!==!1&&(this.toolbarElement=document.createElement("div"),this.toolbarElement.className="editora-toolbar-container",this.domElement.appendChild(this.toolbarElement)),this.contentElement=document.createElement("div"),this.contentElement.contentEditable="true",this.contentElement.className="editora-content",this.contentElement.style.minHeight="200px",this.contentElement.style.outline="none",this.contentElement.style.padding="12px",e.content&&(this.contentElement.innerHTML=e.content),this.domElement.appendChild(this.contentElement),this.contentElement.addEventListener("input",()=>{this.listeners.forEach(t=>t(this.state))}))}setupKeyboardShortcuts(e){const t={};e.forEach(i=>{i.shortcut&&(t[i.shortcut.toLowerCase()]=i.command)}),document.addEventListener("keydown",i=>{if(this.contentElement!==document.activeElement&&!(document.activeElement instanceof HTMLElement&&document.activeElement.contentEditable==="true"))return;const n=[];(i.ctrlKey||i.metaKey)&&n.push("ctrl"),i.shiftKey&&n.push("shift"),i.altKey&&n.push("alt");const o=i.key.toLowerCase(),s=n.length>0?`${n.join("+")}+${o}`:o,a=t[s];a&&(i.preventDefault(),this.execCommand(a))})}handleToolbarCommand(e,t){const n=this.pluginManager.getToolbarItems().find(o=>o.id&&o.id===e||o.command===e);n!=null&&n.command&&(t!==void 0?this.execCommand(n.command,t):this.execCommand(n.command))}setState(e){this.state=e,this.listeners.forEach(t=>t(e))}onChange(e){return this.listeners.push(e),()=>{this.listeners=this.listeners.filter(t=>t!==e)}}on(e,t){return e==="change"||e==="input"?this.onChange(t):()=>{}}getElement(){return this.contentElement||this.domElement||null}execCommand(e,t){const i=this.commands[e];if(!i)return console.warn(`Command not found: ${e}`),!1;let n;return t!==void 0?n=i(this.state,t):n=i(this.state),n instanceof Promise?(n.then(o=>{o&&typeof o=="object"&&"doc"in o&&"selection"in o&&this.setState(o)}).catch(o=>{console.error(`Async command failed: ${e}`,o)}),!0):n&&typeof n=="object"&&"doc"in n&&"selection"in n?(this.setState(n),!0):n!==!1&&n!=null}setContent(e){typeof e=="string"?this.contentElement&&(this.contentElement.innerHTML=e):this.setState(this.state.apply(e))}getContent(){return this.contentElement?this.contentElement.innerHTML:this.state.doc}destroy(){this.listeners=[],this.contentElement&&this.contentElement.removeEventListener("input",()=>{})}}class f{constructor(e){this.initialized=!1,this.plugin=e}initialize(e){var t,i;if(this.initialized)return console.warn(`Plugin "${this.plugin.name}" already initialized`),!1;try{return this.context=e,(t=this.plugin.context)!=null&&t.initialize&&this.plugin.context.initialize(),(i=this.plugin.context)!=null&&i.onEditorReady&&e.provider&&this.plugin.context.onEditorReady(e),this.initialized=!0,!0}catch(n){return console.error(`Failed to initialize plugin "${this.plugin.name}":`,n),!1}}destroy(){var e;if(!this.initialized)return!1;try{return(e=this.plugin.context)!=null&&e.destroy&&this.plugin.context.destroy(),this.initialized=!1,this.context=void 0,!0}catch(t){return console.error(`Failed to destroy plugin "${this.plugin.name}":`,t),!1}}executeCommand(e,...t){var i;if(!this.initialized)return console.warn(`Plugin "${this.plugin.name}" not initialized, cannot execute command "${e}"`),null;try{const n=(i=this.plugin.commands)==null?void 0:i[e];return n?n(...t):(console.warn(`Command "${e}" not found in plugin "${this.plugin.name}"`),null)}catch(n){return console.error(`Error executing command "${e}" in plugin "${this.plugin.name}":`,n),null}}getName(){return this.plugin.name}isInitialized(){return this.initialized}getPlugin(){return this.plugin}getContext(){return this.context}}function x(r){return new f(r)}const b=new Set;function y(r,e){b.has(r)||(b.add(r),console.warn(`[Editora] ${r} from @editora/core is a deprecated, non-functional scaffold: its commands and toolbar buttons do nothing. It will be removed in a future major release - use ${e} instead.`))}function S(r={}){y("SpellcheckPlugin","`SpellCheckPlugin` from @editora/spell-check");const{enabled:e=!1,provider:t="browser",apiUrl:i="",apiHeaders:n={},language:o="en",customDictionary:s=[],ignoreAllCaps:a=!0,ignoreNumbers:c=!0}=r;return{name:"spellcheck",context:{initialize:()=>{if(e)switch(console.log("[Spellcheck Plugin] Initialized",{provider:t,language:o}),t){case"browser":console.log("[Spellcheck] Using browser spellcheck");break;case"local":console.log("[Spellcheck] Using local dictionary (not implemented)");break;case"api":i?console.log("[Spellcheck] Using API:",i):console.warn("[Spellcheck] API provider selected but no apiUrl provided");break}},destroy:()=>{console.log("[Spellcheck Plugin] Destroyed")},onEditorReady:h=>{console.log("[Spellcheck Plugin] Editor ready")}},commands:{toggleSpellcheck:()=>(console.log("[Spellcheck] Toggle command (not implemented)"),null),addToDictionary:h=>(console.log("[Spellcheck] Add to dictionary:",h),null),checkSpelling:async()=>(console.log("[Spellcheck] Check spelling (not implemented)"),null)},toolbar:e?[{label:"Spellcheck",command:"toggleSpellcheck",icon:"Aa",type:"button"}]:[]}}function C(r={}){y("MediaPlugin","`MediaManagerPlugin` from @editora/media-manager");const{uploadUrl:e="",libraryUrl:t="",maxFileSize:i=10*1024*1024,allowedTypes:n=["image/jpeg","image/png","image/gif","image/webp"],headers:o={},withCredentials:s=!1,chunkSize:a=1024*1024,enableChunking:c=!0,onProgress:h,onError:u,onSuccess:D}=r;return{name:"media",context:{initialize:()=>{console.log("[Media Plugin] Initialized",{uploadUrl:e,libraryUrl:t,maxFileSize:i,allowedTypes:n}),e||console.warn("[Media] No uploadUrl provided - upload will not work")},destroy:()=>{console.log("[Media Plugin] Destroyed")},onEditorReady:d=>{console.log("[Media Plugin] Editor ready")}},commands:{insertImage:async d=>{if(console.log("[Media] Insert image command (not implemented)",d),!d)return console.log("[Media] No file provided - should open picker"),null;if(!n.includes(d.type)){const g=new Error(`File type ${d.type} not allowed`);return u==null||u(g),null}if(d.size>i){const g=new Error(`File size ${d.size} exceeds max ${i}`);return u==null||u(g),null}return null},openMediaLibrary:()=>(console.log("[Media] Open media library (not implemented)"),t||console.warn("[Media] No libraryUrl provided"),null),uploadMedia:async d=>(console.log("[Media] Upload media (not implemented)",{name:d.name,size:d.size,type:d.type}),null)},toolbar:[{label:"Image",command:"insertImage",icon:"๐Ÿ–ผ๏ธ",type:"button"},{label:"Media Library",command:"openMediaLibrary",icon:"๐Ÿ“",type:"button"}]}}class p{constructor(e,t={anchor:0,head:0}){this.doc=e,this.selection=t}getDocument(){return this.doc}setDocument(e){return new p(e,this.selection)}getSelection(){return{...this.selection}}setSelection(e){return new p(this.doc,e)}update(e,t){return new p(e||this.doc,t||this.selection)}getTextContent(){return""}isSelectionEmpty(){return this.selection.anchor===this.selection.head}}class m{constructor(e){this.config={closeOnEscape:!0,closeOnBackdrop:!0,...e},this.element=this.createElement(),this.attachEventListeners()}createElement(){const e=document.createElement("dialog");e.className="editora-dialog",this.config.width&&(e.style.width=this.config.width),this.config.height&&(e.style.height=this.config.height);const t=this.config.buttons&&this.config.buttons.length>0?this.config.buttons.map((i,n)=>`<button type="button" class="editora-btn ${i.type==="danger"?"editora-btn-danger":i.type==="primary"||i.primary?"editora-btn-primary":"editora-btn-cancel"}" data-dialog-button="${n}">${i.label}</button>`).join(""):`
2
2
  <button type="button" class="editora-btn editora-btn-cancel" data-dialog-default="cancel">Cancel</button>
3
3
  <button type="button" class="editora-btn editora-btn-primary" data-dialog-default="ok">OK</button>
4
4
  `;if(e.innerHTML=`
@@ -14,7 +14,7 @@
14
14
  ${t}
15
15
  </div>
16
16
  </div>
17
- `,typeof this.config.content!="string"){const i=e.querySelector(".editora-dialog-body");i&&(i.innerHTML="",i.appendChild(this.config.content))}return e}attachEventListeners(){const e=this.element.querySelector(".editora-dialog-close");if(e==null||e.addEventListener("click",()=>this.close()),this.config.buttons&&this.config.buttons.length>0)this.element.querySelectorAll("[data-dialog-button]").forEach(i=>{i.addEventListener("click",()=>{var s,a;const n=Number(i.getAttribute("data-dialog-button")),o=(s=this.config.buttons)==null?void 0:s[n];(a=o==null?void 0:o.onClick)==null||a.call(o)})});else{const t=this.element.querySelector('[data-dialog-default="cancel"]');t==null||t.addEventListener("click",()=>{var n,o;(o=(n=this.config).onCancel)==null||o.call(n),this.close()});const i=this.element.querySelector('[data-dialog-default="ok"]');i==null||i.addEventListener("click",()=>this.handleSubmit())}this.config.closeOnEscape&&this.element.addEventListener("cancel",t=>{t.preventDefault(),this.close()}),this.config.closeOnBackdrop&&this.element.addEventListener("click",t=>{const i=this.element.getBoundingClientRect();(t.clientX<i.left||t.clientX>i.right||t.clientY<i.top||t.clientY>i.bottom)&&this.close()})}handleSubmit(){var t,i,n,o;const e=this.element.querySelector("form");if(e){const s=new FormData(e);(i=(t=this.config).onSubmit)==null||i.call(t,s)}else{const s=this.element.querySelectorAll("input, select, textarea"),a=new FormData;s.forEach(c=>{c.name&&a.append(c.name,c.value)}),(o=(n=this.config).onSubmit)==null||o.call(n,a)}this.close()}show(){document.body.appendChild(this.element),this.element.showModal()}close(){this.element.close(),this.element.remove()}destroy(){this.close()}}class S{constructor(e){this.isOpen=!1,this.config=e,this.selectedValue=e.value,this.element=this.createElement(),this.attachEventListeners()}createElement(){const e=document.createElement("div");e.className="editora-dropdown",this.config.width&&(e.style.width=this.config.width);const t=this.config.options.find(n=>n.value===this.selectedValue),i=(t==null?void 0:t.label)||this.config.placeholder||"Select...";return e.innerHTML=`
17
+ `,typeof this.config.content!="string"){const i=e.querySelector(".editora-dialog-body");i&&(i.innerHTML="",i.appendChild(this.config.content))}return e}attachEventListeners(){const e=this.element.querySelector(".editora-dialog-close");if(e==null||e.addEventListener("click",()=>this.close()),this.config.buttons&&this.config.buttons.length>0)this.element.querySelectorAll("[data-dialog-button]").forEach(i=>{i.addEventListener("click",()=>{var s,a;const n=Number(i.getAttribute("data-dialog-button")),o=(s=this.config.buttons)==null?void 0:s[n];(a=o==null?void 0:o.onClick)==null||a.call(o)})});else{const t=this.element.querySelector('[data-dialog-default="cancel"]');t==null||t.addEventListener("click",()=>{var n,o;(o=(n=this.config).onCancel)==null||o.call(n),this.close()});const i=this.element.querySelector('[data-dialog-default="ok"]');i==null||i.addEventListener("click",()=>this.handleSubmit())}this.config.closeOnEscape&&this.element.addEventListener("cancel",t=>{t.preventDefault(),this.close()}),this.config.closeOnBackdrop&&this.element.addEventListener("click",t=>{const i=this.element.getBoundingClientRect();(t.clientX<i.left||t.clientX>i.right||t.clientY<i.top||t.clientY>i.bottom)&&this.close()})}handleSubmit(){var t,i,n,o;const e=this.element.querySelector("form");if(e){const s=new FormData(e);(i=(t=this.config).onSubmit)==null||i.call(t,s)}else{const s=this.element.querySelectorAll("input, select, textarea"),a=new FormData;s.forEach(c=>{c.name&&a.append(c.name,c.value)}),(o=(n=this.config).onSubmit)==null||o.call(n,a)}this.close()}show(){document.body.appendChild(this.element),this.element.showModal()}close(){this.element.close(),this.element.remove()}destroy(){this.close()}}class L{constructor(e){this.isOpen=!1,this.config=e,this.selectedValue=e.value,this.element=this.createElement(),this.attachEventListeners()}createElement(){const e=document.createElement("div");e.className="editora-dropdown",this.config.width&&(e.style.width=this.config.width);const t=this.config.options.find(n=>n.value===this.selectedValue),i=(t==null?void 0:t.label)||this.config.placeholder||"Select...";return e.innerHTML=`
18
18
  <button class="editora-dropdown-toggle" type="button">
19
19
  <span class="editora-dropdown-label">${i}</span>
20
20
  <span class="editora-dropdown-arrow">โ–ผ</span>
@@ -27,7 +27,7 @@
27
27
  </div>
28
28
  `).join("")}
29
29
  </div>
30
- `,e}attachEventListeners(){const e=this.element.querySelector(".editora-dropdown-toggle"),t=this.element.querySelector(".editora-dropdown-menu");e.addEventListener("click",n=>{n.stopPropagation(),this.isOpen=!this.isOpen,t.style.display=this.isOpen?"block":"none"}),this.element.querySelectorAll(".editora-dropdown-item").forEach(n=>{n.addEventListener("click",()=>{var s,a;const o=n.getAttribute("data-value");o&&(this.setValue(o),(a=(s=this.config).onChange)==null||a.call(s,o),this.close())})}),document.addEventListener("click",n=>{this.element.contains(n.target)||this.close()})}setValue(e){this.selectedValue=e;const t=this.config.options.find(n=>n.value===e),i=this.element.querySelector(".editora-dropdown-label");i&&t&&(i.textContent=t.label)}getValue(){return this.selectedValue}close(){this.isOpen=!1;const e=this.element.querySelector(".editora-dropdown-menu");e&&(e.style.display="none")}getElement(){return this.element}destroy(){this.element.remove()}}class C{constructor(e){this.defaultPresets=["#000000","#434343","#666666","#999999","#B7B7B7","#CCCCCC","#D9D9D9","#EFEFEF","#F3F3F3","#FFFFFF","#980000","#FF0000","#FF9900","#FFFF00","#00FF00","#00FFFF","#4A86E8","#0000FF","#9900FF","#FF00FF","#E6B8AF","#F4CCCC","#FCE5CD","#FFF2CC","#D9EAD3","#D0E0E3","#C9DAF8","#CFE2F3","#D9D2E9","#EAD1DC"],this.config={presetColors:this.defaultPresets,...e},this.selectedColor=e.value,this.element=this.createElement(),this.attachEventListeners()}createElement(){var t;const e=document.createElement("div");return e.className="editora-color-picker",e.innerHTML=`
30
+ `,e}attachEventListeners(){const e=this.element.querySelector(".editora-dropdown-toggle"),t=this.element.querySelector(".editora-dropdown-menu");e.addEventListener("click",n=>{n.stopPropagation(),this.isOpen=!this.isOpen,t.style.display=this.isOpen?"block":"none"}),this.element.querySelectorAll(".editora-dropdown-item").forEach(n=>{n.addEventListener("click",()=>{var s,a;const o=n.getAttribute("data-value");o&&(this.setValue(o),(a=(s=this.config).onChange)==null||a.call(s,o),this.close())})}),document.addEventListener("click",n=>{this.element.contains(n.target)||this.close()})}setValue(e){this.selectedValue=e;const t=this.config.options.find(n=>n.value===e),i=this.element.querySelector(".editora-dropdown-label");i&&t&&(i.textContent=t.label)}getValue(){return this.selectedValue}close(){this.isOpen=!1;const e=this.element.querySelector(".editora-dropdown-menu");e&&(e.style.display="none")}getElement(){return this.element}destroy(){this.element.remove()}}class k{constructor(e){this.defaultPresets=["#000000","#434343","#666666","#999999","#B7B7B7","#CCCCCC","#D9D9D9","#EFEFEF","#F3F3F3","#FFFFFF","#980000","#FF0000","#FF9900","#FFFF00","#00FF00","#00FFFF","#4A86E8","#0000FF","#9900FF","#FF00FF","#E6B8AF","#F4CCCC","#FCE5CD","#FFF2CC","#D9EAD3","#D0E0E3","#C9DAF8","#CFE2F3","#D9D2E9","#EAD1DC"],this.config={presetColors:this.defaultPresets,...e},this.selectedColor=e.value,this.element=this.createElement(),this.attachEventListeners()}createElement(){var t;const e=document.createElement("div");return e.className="editora-color-picker",e.innerHTML=`
31
31
  <div class="editora-color-picker-input">
32
32
  <input type="color" value="${this.selectedColor||"#000000"}" />
33
33
  <input type="text" value="${this.selectedColor||"#000000"}" placeholder="#000000" />
@@ -42,7 +42,7 @@
42
42
  ></button>
43
43
  `).join("")}
44
44
  </div>
45
- `,e}attachEventListeners(){const e=this.element.querySelector('input[type="color"]'),t=this.element.querySelector('input[type="text"]');e.addEventListener("input",n=>{var s,a;const o=n.target.value;t.value=o,this.selectedColor=o,(a=(s=this.config).onChange)==null||a.call(s,o)}),t.addEventListener("input",n=>{var s,a;const o=n.target.value;/^#[0-9A-Fa-f]{6}$/.test(o)&&(e.value=o,this.selectedColor=o,(a=(s=this.config).onChange)==null||a.call(s,o))}),this.element.querySelectorAll(".editora-color-preset").forEach(n=>{n.addEventListener("click",()=>{var s,a;const o=n.getAttribute("data-color");o&&(e.value=o,t.value=o,this.selectedColor=o,(a=(s=this.config).onChange)==null||a.call(s,o))})})}getValue(){return this.selectedColor}setValue(e){this.selectedColor=e;const t=this.element.querySelector('input[type="color"]'),i=this.element.querySelector('input[type="text"]');t&&(t.value=e),i&&(i.value=e)}getElement(){return this.element}destroy(){this.element.remove()}}class L{constructor(e){const{initialUrl:t="",initialText:i="",onSubmit:n,onCancel:o}=e;this.dialog=new m({title:"Insert/Edit Link",content:this.createFormHTML(t,i),onSubmit:s=>{const a=(s.get("url")||"").trim(),c=(s.get("text")||"").trim(),h=s.get("openInNewTab")==="on";if(!a){alert("Please enter a URL");return}n({url:a,text:c,openInNewTab:h}),this.dialog.close()},onCancel:()=>{o==null||o(),this.dialog.close()},width:"500px"})}createFormHTML(e,t){return`
45
+ `,e}attachEventListeners(){const e=this.element.querySelector('input[type="color"]'),t=this.element.querySelector('input[type="text"]');e.addEventListener("input",n=>{var s,a;const o=n.target.value;t.value=o,this.selectedColor=o,(a=(s=this.config).onChange)==null||a.call(s,o)}),t.addEventListener("input",n=>{var s,a;const o=n.target.value;/^#[0-9A-Fa-f]{6}$/.test(o)&&(e.value=o,this.selectedColor=o,(a=(s=this.config).onChange)==null||a.call(s,o))}),this.element.querySelectorAll(".editora-color-preset").forEach(n=>{n.addEventListener("click",()=>{var s,a;const o=n.getAttribute("data-color");o&&(e.value=o,t.value=o,this.selectedColor=o,(a=(s=this.config).onChange)==null||a.call(s,o))})})}getValue(){return this.selectedColor}setValue(e){this.selectedColor=e;const t=this.element.querySelector('input[type="color"]'),i=this.element.querySelector('input[type="text"]');t&&(t.value=e),i&&(i.value=e)}getElement(){return this.element}destroy(){this.element.remove()}}class T{constructor(e){const{initialUrl:t="",initialText:i="",onSubmit:n,onCancel:o}=e;this.dialog=new m({title:"Insert/Edit Link",content:this.createFormHTML(t,i),onSubmit:s=>{const a=(s.get("url")||"").trim(),c=(s.get("text")||"").trim(),h=s.get("openInNewTab")==="on";if(!a){alert("Please enter a URL");return}n({url:a,text:c,openInNewTab:h}),this.dialog.close()},onCancel:()=>{o==null||o(),this.dialog.close()},width:"500px"})}createFormHTML(e,t){return`
46
46
  <form class="link-dialog-form">
47
47
  <div class="form-group">
48
48
  <label for="link-url">URL</label>
@@ -90,7 +90,7 @@
90
90
  </button>
91
91
  </div>
92
92
  </form>
93
- `}escapeHtml(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}show(){this.dialog.show()}close(){this.dialog.close()}}class k{constructor(e){const{onSubmit:t,onCancel:i}=e;this.dialog=new m({title:"Insert Table",content:this.createFormHTML(),onSubmit:n=>{const o=parseInt(n.get("rows"),10),s=parseInt(n.get("cols"),10),a=n.get("headerRow")==="on";if(o<1||o>100){alert("Please enter a valid number of rows (1-100)");return}if(s<1||s>20){alert("Please enter a valid number of columns (1-20)");return}t({rows:o,cols:s,headerRow:a}),this.dialog.close()},onCancel:()=>{i==null||i(),this.dialog.close()},width:"400px"})}createFormHTML(){return`
93
+ `}escapeHtml(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}show(){this.dialog.show()}close(){this.dialog.close()}}class M{constructor(e){const{onSubmit:t,onCancel:i}=e;this.dialog=new m({title:"Insert Table",content:this.createFormHTML(),onSubmit:n=>{const o=parseInt(n.get("rows"),10),s=parseInt(n.get("cols"),10),a=n.get("headerRow")==="on";if(o<1||o>100){alert("Please enter a valid number of rows (1-100)");return}if(s<1||s>20){alert("Please enter a valid number of columns (1-20)");return}t({rows:o,cols:s,headerRow:a}),this.dialog.close()},onCancel:()=>{i==null||i(),this.dialog.close()},width:"400px"})}createFormHTML(){return`
94
94
  <form class="table-dialog-form">
95
95
  <div class="form-group">
96
96
  <label for="table-rows">Rows</label>
@@ -149,7 +149,7 @@
149
149
  </button>
150
150
  </div>
151
151
  </form>
152
- `}show(){this.dialog.show(),this.attachPreviewListeners()}close(){this.dialog.close()}attachPreviewListeners(){const e=document.querySelector(".table-dialog-form");if(!e)return;const t=e.querySelector("#table-rows"),i=e.querySelector("#table-cols"),n=e.querySelector("#table-header"),o=e.querySelector("#table-preview-content"),s=()=>{const a=parseInt((t==null?void 0:t.value)||"3",10),c=parseInt((i==null?void 0:i.value)||"3",10),h=n==null?void 0:n.checked;o&&(o.textContent=`${a} rows ร— ${c} columns${h?" with header":""}`)};t==null||t.addEventListener("input",s),i==null||i.addEventListener("input",s),n==null||n.addEventListener("change",s)}}class T{constructor(e){this.config=e;const{onSubmit:t,onCancel:i}=e;this.dialog=new m({title:"Insert Image",content:this.createFormHTML(),onSubmit:n=>{const o=(n.get("src")||"").trim(),s=(n.get("alt")||"").trim(),a=(n.get("width")||"").trim(),c=(n.get("height")||"").trim();if(!o){alert("Please enter an image URL or upload an image");return}t({src:o,alt:s,width:a||void 0,height:c||void 0}),this.dialog.close()},onCancel:()=>{i==null||i(),this.dialog.close()},width:"500px"})}createFormHTML(){return`
152
+ `}show(){this.dialog.show(),this.attachPreviewListeners()}close(){this.dialog.close()}attachPreviewListeners(){const e=document.querySelector(".table-dialog-form");if(!e)return;const t=e.querySelector("#table-rows"),i=e.querySelector("#table-cols"),n=e.querySelector("#table-header"),o=e.querySelector("#table-preview-content"),s=()=>{const a=parseInt((t==null?void 0:t.value)||"3",10),c=parseInt((i==null?void 0:i.value)||"3",10),h=n==null?void 0:n.checked;o&&(o.textContent=`${a} rows ร— ${c} columns${h?" with header":""}`)};t==null||t.addEventListener("input",s),i==null||i.addEventListener("input",s),n==null||n.addEventListener("change",s)}}class I{constructor(e){this.config=e;const{onSubmit:t,onCancel:i}=e;this.dialog=new m({title:"Insert Image",content:this.createFormHTML(),onSubmit:n=>{const o=(n.get("src")||"").trim(),s=(n.get("alt")||"").trim(),a=(n.get("width")||"").trim(),c=(n.get("height")||"").trim();if(!o){alert("Please enter an image URL or upload an image");return}t({src:o,alt:s,width:a||void 0,height:c||void 0}),this.dialog.close()},onCancel:()=>{i==null||i(),this.dialog.close()},width:"500px"})}createFormHTML(){return`
153
153
  <form class="image-dialog-form">
154
154
  ${this.config.allowUpload?`
155
155
  <div class="form-group">
@@ -223,7 +223,7 @@
223
223
  </button>
224
224
  </div>
225
225
  </form>
226
- `}show(){this.dialog.show(),this.attachImagePreview(),this.attachFileUpload()}close(){this.dialog.close()}attachImagePreview(){const e=document.querySelector(".image-dialog-form");if(!e)return;const t=e.querySelector("#image-src"),i=e.querySelector("#image-preview"),n=e.querySelector("#preview-img");t==null||t.addEventListener("input",()=>{const o=t.value.trim();o&&this.isValidImageUrl(o)?(n.src=o,i.style.display="block",n.onerror=()=>{i.style.display="none"}):i.style.display="none"})}attachFileUpload(){if(!this.config.allowUpload)return;const e=document.querySelector(".image-dialog-form");if(!e)return;const t=e.querySelector("#image-upload"),i=e.querySelector("#image-src");t==null||t.addEventListener("change",async n=>{var a;const o=(a=n.target.files)==null?void 0:a[0];if(!o)return;const s=new FileReader;s.onload=c=>{var u;const h=(u=c.target)==null?void 0:u.result;i.value=h,i.dispatchEvent(new Event("input"))},s.readAsDataURL(o)})}isValidImageUrl(e){try{return new URL(e),/\.(jpg|jpeg|png|gif|svg|webp|bmp)$/i.test(e)||e.startsWith("data:image/")}catch(t){return!1}}}class M{constructor(e){this.onSubmit=e.onSubmit;const t=this.createContent();this.dialog=new m({title:"Insert Math Equation",content:t,buttons:[{label:"Cancel",onClick:()=>this.dialog.close()},{label:"Insert",onClick:()=>this.handleSubmit(),primary:!0}]}),this.latexInput=t.querySelector("#math-latex"),this.previewDiv=t.querySelector("#math-preview"),this.displayTypeSelect=t.querySelector("#math-display-type"),this.latexInput.addEventListener("input",()=>this.updatePreview())}createContent(){const e=document.createElement("div");return e.className="math-dialog-content",e.style.minWidth="500px",e.innerHTML=`
226
+ `}show(){this.dialog.show(),this.attachImagePreview(),this.attachFileUpload()}close(){this.dialog.close()}attachImagePreview(){const e=document.querySelector(".image-dialog-form");if(!e)return;const t=e.querySelector("#image-src"),i=e.querySelector("#image-preview"),n=e.querySelector("#preview-img");t==null||t.addEventListener("input",()=>{const o=t.value.trim();o&&this.isValidImageUrl(o)?(n.src=o,i.style.display="block",n.onerror=()=>{i.style.display="none"}):i.style.display="none"})}attachFileUpload(){if(!this.config.allowUpload)return;const e=document.querySelector(".image-dialog-form");if(!e)return;const t=e.querySelector("#image-upload"),i=e.querySelector("#image-src");t==null||t.addEventListener("change",async n=>{var a;const o=(a=n.target.files)==null?void 0:a[0];if(!o)return;const s=new FileReader;s.onload=c=>{var u;const h=(u=c.target)==null?void 0:u.result;i.value=h,i.dispatchEvent(new Event("input"))},s.readAsDataURL(o)})}isValidImageUrl(e){try{return new URL(e),/\.(jpg|jpeg|png|gif|svg|webp|bmp)$/i.test(e)||e.startsWith("data:image/")}catch(t){return!1}}}class F{constructor(e){this.onSubmit=e.onSubmit;const t=this.createContent();this.dialog=new m({title:"Insert Math Equation",content:t,buttons:[{label:"Cancel",onClick:()=>this.dialog.close()},{label:"Insert",onClick:()=>this.handleSubmit(),primary:!0}]}),this.latexInput=t.querySelector("#math-latex"),this.previewDiv=t.querySelector("#math-preview"),this.displayTypeSelect=t.querySelector("#math-display-type"),this.latexInput.addEventListener("input",()=>this.updatePreview())}createContent(){const e=document.createElement("div");return e.className="math-dialog-content",e.style.minWidth="500px",e.innerHTML=`
227
227
  <style>
228
228
  .math-dialog-content {
229
229
  display: flex;
@@ -335,7 +335,7 @@
335
335
  <option value="block">Block (centered, new line)</option>
336
336
  </select>
337
337
  </div>
338
- `,e.querySelectorAll(".math-symbol-btn").forEach(i=>{i.addEventListener("click",n=>{n.preventDefault();const o=i.getAttribute("data-symbol");if(o&&this.latexInput){const s=this.latexInput.selectionStart,a=this.latexInput.selectionEnd,c=this.latexInput.value;this.latexInput.value=c.substring(0,s)+o+c.substring(a),this.latexInput.focus(),this.latexInput.selectionStart=this.latexInput.selectionEnd=s+o.length,this.updatePreview()}})}),e}updatePreview(){const e=this.latexInput.value.trim();if(!e){this.previewDiv.textContent="";return}const t=e.replace(/\\frac\{([^}]+)\}\{([^}]+)\}/g,"($1)/($2)").replace(/\^\{([^}]+)\}/g,"^$1").replace(/\_\{([^}]+)\}/g,"_$1").replace(/\\sqrt\{([^}]+)\}/g,"โˆš($1)").replace(/\\sum/g,"โˆ‘").replace(/\\int/g,"โˆซ").replace(/\\pi/g,"ฯ€").replace(/\\alpha/g,"ฮฑ").replace(/\\beta/g,"ฮฒ").replace(/\\gamma/g,"ฮณ").replace(/\\theta/g,"ฮธ").replace(/\\lambda/g,"ฮป").replace(/\\infty/g,"โˆž").replace(/\\leq/g,"โ‰ค").replace(/\\geq/g,"โ‰ฅ").replace(/\\neq/g,"โ‰ ");this.previewDiv.textContent=t}handleSubmit(){const e=this.latexInput.value.trim();if(!e){alert("Please enter a LaTeX expression.");return}const t=this.displayTypeSelect.value;this.onSubmit({latex:e,display:t}),this.dialog.close()}show(){this.dialog.show(),this.latexInput.value="",this.previewDiv.textContent="",this.displayTypeSelect.value="inline",setTimeout(()=>this.latexInput.focus(),100)}close(){this.dialog.close()}}class I{constructor(e){this.characters={common:["ยฉ","ยฎ","โ„ข","ยง","ยถ","โ€ ","โ€ก","โ€ข","โ€ฃ","โƒ","โ—ฆ","โ–ช","โ–ซ","โ—Š","โ—‹","โ—","โ–ก","โ– ","โ–ณ","โ–ฒ","โ–ฝ","โ–ผ","โ—‡","โ—†","โ˜…","โ˜†"],arrows:["โ†","โ†’","โ†‘","โ†“","โ†”","โ†•","โ‡","โ‡’","โ‡‘","โ‡“","โ‡”","โ‡•","โŸต","โŸถ","โŸท","โ†–","โ†—","โ†˜","โ†™","โ‡–","โ‡—","โ‡˜","โ‡™"],currency:["$","โ‚ฌ","ยฃ","ยฅ","โ‚น","โ‚ฝ","โ‚ฉ","โ‚ช","โ‚ฆ","เธฟ","โ‚ด","โ‚ก","โ‚ต","โ‚ธ","โ‚ซ","โ‚ฑ","โ‚ฒ","โ‚ณ","โ‚ญ"],math:["ยฑ","ร—","รท","=","โ‰ ","โ‰ˆ","โ‰ก","โ‰ค","โ‰ฅ","<",">","โˆž","โˆ‘","โˆ","โˆซ","โˆ‚","โˆš","โˆ›","โˆœ","ยฐ","โ€ฒ","โ€ณ","โˆ ","โˆŸ","โŠฅ","โˆฅ"],greek:["ฮฑ","ฮฒ","ฮณ","ฮด","ฮต","ฮถ","ฮท","ฮธ","ฮน","ฮบ","ฮป","ฮผ","ฮฝ","ฮพ","ฮฟ","ฯ€","ฯ","ฯƒ","ฯ„","ฯ…","ฯ†","ฯ‡","ฯˆ","ฯ‰","ฮ‘","ฮ’","ฮ“","ฮ”","ฮ•","ฮ–","ฮ—","ฮ˜"],punctuation:["โ€š","โ€ž","โ€œ","โ€","โ€˜","โ€™","ยซ","ยป","โ€น","โ€บ","โ€”","โ€“","โ€ฆ","ยท","ยก","ยฟ","โ€ฐ","โ€ฒ","โ€ณ","โ€ด"],superscript:["โฐ","ยน","ยฒ","ยณ","โด","โต","โถ","โท","โธ","โน","โบ","โป","โผ","โฝ","โพ","โฟ","โฑ"],subscript:["โ‚€","โ‚","โ‚‚","โ‚ƒ","โ‚„","โ‚…","โ‚†","โ‚‡","โ‚ˆ","โ‚‰","โ‚Š","โ‚‹","โ‚Œ","โ‚","โ‚Ž"]},this.onSelect=e.onSelect;const t=this.createContent();this.dialog=new m({title:"Insert Special Character",content:t,buttons:[{label:"Close",onClick:()=>this.dialog.close()}]}),this.searchInput=t.querySelector("#char-search"),this.categorySelect=t.querySelector("#char-category"),this.charactersGrid=t.querySelector("#char-grid"),this.searchInput.addEventListener("input",()=>this.filterCharacters()),this.categorySelect.addEventListener("change",()=>this.updateGrid()),this.updateGrid()}createContent(){const e=document.createElement("div");return e.className="character-dialog-content",e.style.minWidth="500px",e.innerHTML=`
338
+ `,e.querySelectorAll(".math-symbol-btn").forEach(i=>{i.addEventListener("click",n=>{n.preventDefault();const o=i.getAttribute("data-symbol");if(o&&this.latexInput){const s=this.latexInput.selectionStart,a=this.latexInput.selectionEnd,c=this.latexInput.value;this.latexInput.value=c.substring(0,s)+o+c.substring(a),this.latexInput.focus(),this.latexInput.selectionStart=this.latexInput.selectionEnd=s+o.length,this.updatePreview()}})}),e}updatePreview(){const e=this.latexInput.value.trim();if(!e){this.previewDiv.textContent="";return}const t=e.replace(/\\frac\{([^}]+)\}\{([^}]+)\}/g,"($1)/($2)").replace(/\^\{([^}]+)\}/g,"^$1").replace(/\_\{([^}]+)\}/g,"_$1").replace(/\\sqrt\{([^}]+)\}/g,"โˆš($1)").replace(/\\sum/g,"โˆ‘").replace(/\\int/g,"โˆซ").replace(/\\pi/g,"ฯ€").replace(/\\alpha/g,"ฮฑ").replace(/\\beta/g,"ฮฒ").replace(/\\gamma/g,"ฮณ").replace(/\\theta/g,"ฮธ").replace(/\\lambda/g,"ฮป").replace(/\\infty/g,"โˆž").replace(/\\leq/g,"โ‰ค").replace(/\\geq/g,"โ‰ฅ").replace(/\\neq/g,"โ‰ ");this.previewDiv.textContent=t}handleSubmit(){const e=this.latexInput.value.trim();if(!e){alert("Please enter a LaTeX expression.");return}const t=this.displayTypeSelect.value;this.onSubmit({latex:e,display:t}),this.dialog.close()}show(){this.dialog.show(),this.latexInput.value="",this.previewDiv.textContent="",this.displayTypeSelect.value="inline",setTimeout(()=>this.latexInput.focus(),100)}close(){this.dialog.close()}}class P{constructor(e){this.characters={common:["ยฉ","ยฎ","โ„ข","ยง","ยถ","โ€ ","โ€ก","โ€ข","โ€ฃ","โƒ","โ—ฆ","โ–ช","โ–ซ","โ—Š","โ—‹","โ—","โ–ก","โ– ","โ–ณ","โ–ฒ","โ–ฝ","โ–ผ","โ—‡","โ—†","โ˜…","โ˜†"],arrows:["โ†","โ†’","โ†‘","โ†“","โ†”","โ†•","โ‡","โ‡’","โ‡‘","โ‡“","โ‡”","โ‡•","โŸต","โŸถ","โŸท","โ†–","โ†—","โ†˜","โ†™","โ‡–","โ‡—","โ‡˜","โ‡™"],currency:["$","โ‚ฌ","ยฃ","ยฅ","โ‚น","โ‚ฝ","โ‚ฉ","โ‚ช","โ‚ฆ","เธฟ","โ‚ด","โ‚ก","โ‚ต","โ‚ธ","โ‚ซ","โ‚ฑ","โ‚ฒ","โ‚ณ","โ‚ญ"],math:["ยฑ","ร—","รท","=","โ‰ ","โ‰ˆ","โ‰ก","โ‰ค","โ‰ฅ","<",">","โˆž","โˆ‘","โˆ","โˆซ","โˆ‚","โˆš","โˆ›","โˆœ","ยฐ","โ€ฒ","โ€ณ","โˆ ","โˆŸ","โŠฅ","โˆฅ"],greek:["ฮฑ","ฮฒ","ฮณ","ฮด","ฮต","ฮถ","ฮท","ฮธ","ฮน","ฮบ","ฮป","ฮผ","ฮฝ","ฮพ","ฮฟ","ฯ€","ฯ","ฯƒ","ฯ„","ฯ…","ฯ†","ฯ‡","ฯˆ","ฯ‰","ฮ‘","ฮ’","ฮ“","ฮ”","ฮ•","ฮ–","ฮ—","ฮ˜"],punctuation:["โ€š","โ€ž","โ€œ","โ€","โ€˜","โ€™","ยซ","ยป","โ€น","โ€บ","โ€”","โ€“","โ€ฆ","ยท","ยก","ยฟ","โ€ฐ","โ€ฒ","โ€ณ","โ€ด"],superscript:["โฐ","ยน","ยฒ","ยณ","โด","โต","โถ","โท","โธ","โน","โบ","โป","โผ","โฝ","โพ","โฟ","โฑ"],subscript:["โ‚€","โ‚","โ‚‚","โ‚ƒ","โ‚„","โ‚…","โ‚†","โ‚‡","โ‚ˆ","โ‚‰","โ‚Š","โ‚‹","โ‚Œ","โ‚","โ‚Ž"]},this.onSelect=e.onSelect;const t=this.createContent();this.dialog=new m({title:"Insert Special Character",content:t,buttons:[{label:"Close",onClick:()=>this.dialog.close()}]}),this.searchInput=t.querySelector("#char-search"),this.categorySelect=t.querySelector("#char-category"),this.charactersGrid=t.querySelector("#char-grid"),this.searchInput.addEventListener("input",()=>this.filterCharacters()),this.categorySelect.addEventListener("change",()=>this.updateGrid()),this.updateGrid()}createContent(){const e=document.createElement("div");return e.className="character-dialog-content",e.style.minWidth="500px",e.innerHTML=`
339
339
  <style>
340
340
  .character-dialog-content {
341
341
  display: flex;
@@ -422,7 +422,7 @@
422
422
  <div class="char-info">
423
423
  Click any character to insert it into your document.
424
424
  </div>
425
- `,e}updateGrid(){const e=this.categorySelect.value;this.charactersGrid.innerHTML="";let t=[];e==="all"?t=Object.values(this.characters).flat():t=this.characters[e]||[],t.forEach(i=>{const n=document.createElement("button");n.className="char-button",n.textContent=i,n.title=`Insert ${i} (U+${i.charCodeAt(0).toString(16).toUpperCase()})`,n.addEventListener("click",o=>{o.preventDefault(),this.handleSelect(i)}),this.charactersGrid.appendChild(n)})}filterCharacters(){const e=this.searchInput.value.toLowerCase();this.charactersGrid.querySelectorAll(".char-button").forEach(i=>{const n=i.textContent||"",o=`u+${n.charCodeAt(0).toString(16)}`,s=!e||n.includes(e)||o.includes(e);i.style.display=s?"flex":"none"})}handleSelect(e){this.onSelect(e),this.dialog.close()}show(){this.dialog.show(),this.searchInput.value="",this.categorySelect.value="all",this.updateGrid(),setTimeout(()=>this.searchInput.focus(),100)}close(){this.dialog.close()}}class F{constructor(e){this.emojis={popular:["๐Ÿ˜€","๐Ÿ˜ƒ","๐Ÿ˜„","๐Ÿ˜","๐Ÿ˜Š","๐Ÿ˜","๐Ÿคฉ","๐Ÿ˜˜","๐Ÿ˜—","๐Ÿ˜š","๐Ÿ˜™","๐Ÿ™‚","๐Ÿค—","๐Ÿค”","๐Ÿคจ","๐Ÿ˜","๐Ÿ˜‘","๐Ÿ˜ถ","๐Ÿ™„","๐Ÿ˜","๐Ÿ‘","๐Ÿ‘Ž","๐Ÿ‘Œ","โœŒ๏ธ","๐Ÿคž","๐Ÿค","๐Ÿ‘","๐Ÿ™Œ","๐Ÿ‘‹","๐Ÿคš","โœ‹","๐Ÿ–๏ธ","๐Ÿ––","๐Ÿ‘Š","โœŠ","๐Ÿค›","๐Ÿคœ","๐Ÿ’ช"],smileys:["๐Ÿ˜€","๐Ÿ˜ƒ","๐Ÿ˜„","๐Ÿ˜","๐Ÿ˜†","๐Ÿ˜…","๐Ÿคฃ","๐Ÿ˜‚","๐Ÿ™‚","๐Ÿ™ƒ","๐Ÿ˜‰","๐Ÿ˜Š","๐Ÿ˜‡","๐Ÿฅฐ","๐Ÿ˜","๐Ÿคฉ","๐Ÿ˜˜","๐Ÿ˜—","๐Ÿ˜š","๐Ÿ˜™","๐Ÿ˜‹","๐Ÿ˜›","๐Ÿ˜œ","๐Ÿคช","๐Ÿ˜","๐Ÿค‘","๐Ÿค—","๐Ÿคญ","๐Ÿคซ","๐Ÿค”"],emotions:["๐Ÿ˜ณ","๐Ÿ˜ž","๐Ÿ˜Ÿ","๐Ÿ˜ ","๐Ÿ˜ก","๐Ÿคฌ","๐Ÿ˜”","๐Ÿ˜•","๐Ÿ™","๐Ÿ˜ฌ","๐Ÿฅบ","๐Ÿ˜ฃ","๐Ÿ˜–","๐Ÿ˜ซ","๐Ÿ˜ฉ","๐Ÿฅฑ","๐Ÿ˜ค","๐Ÿ˜ฎ","๐Ÿ˜ฑ","๐Ÿ˜จ","๐Ÿ˜ฐ","๐Ÿ˜ฅ","๐Ÿ˜ข","๐Ÿ˜ญ","๐Ÿ˜ช","๐Ÿ˜“","๐Ÿคค","๐Ÿ˜ด","๐Ÿ˜ท","๐Ÿค’"],gestures:["๐Ÿ‘","๐Ÿ‘Ž","๐Ÿ‘Œ","โœŒ๏ธ","๐Ÿคž","๐ŸคŸ","๐Ÿค˜","๐Ÿค™","๐Ÿ‘ˆ","๐Ÿ‘‰","๐Ÿ‘†","๐Ÿ‘‡","โ˜๏ธ","๐Ÿ‘‹","๐Ÿคš","โœ‹","๐Ÿ–๏ธ","๐Ÿ––","๐Ÿ‘","๐Ÿ™Œ","๐Ÿ‘","๐Ÿคฒ","๐Ÿค","๐Ÿ™","โœ๏ธ","๐Ÿ’…","๐Ÿคณ","๐Ÿ’ช","๐Ÿฆพ","๐Ÿฆฟ"],people:["๐Ÿ‘ถ","๐Ÿ‘ง","๐Ÿง’","๐Ÿ‘ฆ","๐Ÿ‘ฉ","๐Ÿง‘","๐Ÿ‘จ","๐Ÿ‘ต","๐Ÿง“","๐Ÿ‘ด","๐Ÿ‘ฒ","๐Ÿ‘ณ","๐Ÿง•","๐Ÿ‘ฎ","๐Ÿ‘ท","๐Ÿ’‚","๐Ÿ•ต๏ธ","๐Ÿ‘ฉโ€โš•๏ธ","๐Ÿ‘จโ€โš•๏ธ","๐Ÿ‘ฉโ€๐ŸŽ“","๐Ÿ‘จโ€๐ŸŽ“","๐Ÿ‘ฉโ€๐Ÿซ","๐Ÿ‘จโ€๐Ÿซ","๐Ÿ‘ฉโ€โš–๏ธ","๐Ÿ‘จโ€โš–๏ธ","๐Ÿ‘ฉโ€๐ŸŒพ","๐Ÿ‘จโ€๐ŸŒพ","๐Ÿ‘ฉโ€๐Ÿณ","๐Ÿ‘จโ€๐Ÿณ","๐Ÿ‘ฉโ€๐Ÿ”ง"],animals:["๐Ÿถ","๐Ÿฑ","๐Ÿญ","๐Ÿน","๐Ÿฐ","๐ŸฆŠ","๐Ÿป","๐Ÿผ","๐Ÿจ","๐Ÿฏ","๐Ÿฆ","๐Ÿฎ","๐Ÿท","๐Ÿธ","๐Ÿต","๐Ÿ™ˆ","๐Ÿ™‰","๐Ÿ™Š","๐Ÿ”","๐Ÿง","๐Ÿฆ","๐Ÿค","๐Ÿฃ","๐Ÿฅ","๐Ÿฆ†","๐Ÿฆ…","๐Ÿฆ‰","๐Ÿฆ‡","๐Ÿบ","๐Ÿ—"],nature:["๐ŸŒต","๐ŸŽ„","๐ŸŒฒ","๐ŸŒณ","๐ŸŒด","๐ŸŒฑ","๐ŸŒฟ","โ˜˜๏ธ","๐Ÿ€","๐ŸŽ","๐ŸŽ‹","๐Ÿƒ","๐Ÿ‚","๐Ÿ","๐Ÿ„","๐ŸŒพ","๐Ÿ’","๐ŸŒท","๐ŸŒน","๐Ÿฅ€","๐ŸŒบ","๐ŸŒธ","๐ŸŒผ","๐ŸŒป","๐ŸŒž","๐ŸŒ","๐ŸŒ›","๐ŸŒœ","โญ","๐ŸŒŸ"],food:["๐Ÿ","๐ŸŽ","๐Ÿ","๐ŸŠ","๐Ÿ‹","๐ŸŒ","๐Ÿ‰","๐Ÿ‡","๐Ÿ“","๐Ÿˆ","๐Ÿ’","๐Ÿ‘","๐Ÿฅญ","๐Ÿ","๐Ÿฅฅ","๐Ÿฅ","๐Ÿ…","๐Ÿ†","๐Ÿฅ‘","๐Ÿฅฆ","๐Ÿฅฌ","๐Ÿฅ’","๐ŸŒถ๏ธ","๐ŸŒฝ","๐Ÿฅ•","๐Ÿง„","๐Ÿง…","๐Ÿฅ”","๐Ÿ ","๐Ÿฅ"],objects:["โŒš","๐Ÿ“ฑ","๐Ÿ’ป","โŒจ๏ธ","๐Ÿ–ฅ๏ธ","๐Ÿ–จ๏ธ","๐Ÿ–ฑ๏ธ","๐Ÿ•น๏ธ","๐Ÿ’พ","๐Ÿ’ฟ","๐Ÿ“€","๐Ÿ“ท","๐Ÿ“น","๐ŸŽฅ","๐Ÿ“ž","โ˜Ž๏ธ","๐Ÿ“Ÿ","๐Ÿ“ ","๐Ÿ“บ","๐Ÿ“ป","๐ŸŽ™๏ธ","๐ŸŽš๏ธ","๐ŸŽ›๏ธ","๐Ÿงญ","โฑ๏ธ","โฐ","๐Ÿ“ก","๐Ÿ”‹","๐Ÿ”Œ","๐Ÿ’ก"],symbols:["โค๏ธ","๐Ÿงก","๐Ÿ’›","๐Ÿ’š","๐Ÿ’™","๐Ÿ’œ","๐Ÿ–ค","๐Ÿค","๐ŸคŽ","๐Ÿ’”","โฃ๏ธ","๐Ÿ’•","๐Ÿ’ž","๐Ÿ’“","๐Ÿ’—","๐Ÿ’–","๐Ÿ’˜","๐Ÿ’","โœจ","๐Ÿ’ซ","โญ","๐ŸŒŸ","โœ”๏ธ","โœ…","โŒ","โŽ","โž•","โž–","โœ–๏ธ","โž—"],activities:["โšฝ","๐Ÿ€","๐Ÿˆ","โšพ","๐ŸฅŽ","๐ŸŽพ","๐Ÿ","๐Ÿ‰","๐Ÿฅ","๐ŸŽฑ","๐Ÿช€","๐Ÿ“","๐Ÿธ","๐Ÿ’","๐Ÿ‘","๐Ÿฅ","๐Ÿ","๐Ÿชƒ","๐Ÿฅ…","โ›ณ","๐Ÿช","๐Ÿน","๐ŸŽฃ","๐Ÿคฟ","๐ŸฅŠ","๐Ÿฅ‹","๐ŸŽฝ","๐Ÿ›น","๐Ÿ›ผ","๐Ÿ›ท"]},this.onSelect=e.onSelect;const t=this.createContent();this.dialog=new m({title:"Insert Emoji",content:t,buttons:[{label:"Close",onClick:()=>this.dialog.close()}]}),this.searchInput=t.querySelector("#emoji-search"),this.categorySelect=t.querySelector("#emoji-category"),this.emojisGrid=t.querySelector("#emoji-grid"),this.searchInput.addEventListener("input",()=>this.filterEmojis()),this.categorySelect.addEventListener("change",()=>this.updateGrid()),this.updateGrid()}createContent(){const e=document.createElement("div");return e.className="emoji-dialog-content",e.style.minWidth="500px",e.innerHTML=`
425
+ `,e}updateGrid(){const e=this.categorySelect.value;this.charactersGrid.innerHTML="";let t=[];e==="all"?t=Object.values(this.characters).flat():t=this.characters[e]||[],t.forEach(i=>{const n=document.createElement("button");n.className="char-button",n.textContent=i,n.title=`Insert ${i} (U+${i.charCodeAt(0).toString(16).toUpperCase()})`,n.addEventListener("click",o=>{o.preventDefault(),this.handleSelect(i)}),this.charactersGrid.appendChild(n)})}filterCharacters(){const e=this.searchInput.value.toLowerCase();this.charactersGrid.querySelectorAll(".char-button").forEach(i=>{const n=i.textContent||"",o=`u+${n.charCodeAt(0).toString(16)}`,s=!e||n.includes(e)||o.includes(e);i.style.display=s?"flex":"none"})}handleSelect(e){this.onSelect(e),this.dialog.close()}show(){this.dialog.show(),this.searchInput.value="",this.categorySelect.value="all",this.updateGrid(),setTimeout(()=>this.searchInput.focus(),100)}close(){this.dialog.close()}}class q{constructor(e){this.emojis={popular:["๐Ÿ˜€","๐Ÿ˜ƒ","๐Ÿ˜„","๐Ÿ˜","๐Ÿ˜Š","๐Ÿ˜","๐Ÿคฉ","๐Ÿ˜˜","๐Ÿ˜—","๐Ÿ˜š","๐Ÿ˜™","๐Ÿ™‚","๐Ÿค—","๐Ÿค”","๐Ÿคจ","๐Ÿ˜","๐Ÿ˜‘","๐Ÿ˜ถ","๐Ÿ™„","๐Ÿ˜","๐Ÿ‘","๐Ÿ‘Ž","๐Ÿ‘Œ","โœŒ๏ธ","๐Ÿคž","๐Ÿค","๐Ÿ‘","๐Ÿ™Œ","๐Ÿ‘‹","๐Ÿคš","โœ‹","๐Ÿ–๏ธ","๐Ÿ––","๐Ÿ‘Š","โœŠ","๐Ÿค›","๐Ÿคœ","๐Ÿ’ช"],smileys:["๐Ÿ˜€","๐Ÿ˜ƒ","๐Ÿ˜„","๐Ÿ˜","๐Ÿ˜†","๐Ÿ˜…","๐Ÿคฃ","๐Ÿ˜‚","๐Ÿ™‚","๐Ÿ™ƒ","๐Ÿ˜‰","๐Ÿ˜Š","๐Ÿ˜‡","๐Ÿฅฐ","๐Ÿ˜","๐Ÿคฉ","๐Ÿ˜˜","๐Ÿ˜—","๐Ÿ˜š","๐Ÿ˜™","๐Ÿ˜‹","๐Ÿ˜›","๐Ÿ˜œ","๐Ÿคช","๐Ÿ˜","๐Ÿค‘","๐Ÿค—","๐Ÿคญ","๐Ÿคซ","๐Ÿค”"],emotions:["๐Ÿ˜ณ","๐Ÿ˜ž","๐Ÿ˜Ÿ","๐Ÿ˜ ","๐Ÿ˜ก","๐Ÿคฌ","๐Ÿ˜”","๐Ÿ˜•","๐Ÿ™","๐Ÿ˜ฌ","๐Ÿฅบ","๐Ÿ˜ฃ","๐Ÿ˜–","๐Ÿ˜ซ","๐Ÿ˜ฉ","๐Ÿฅฑ","๐Ÿ˜ค","๐Ÿ˜ฎ","๐Ÿ˜ฑ","๐Ÿ˜จ","๐Ÿ˜ฐ","๐Ÿ˜ฅ","๐Ÿ˜ข","๐Ÿ˜ญ","๐Ÿ˜ช","๐Ÿ˜“","๐Ÿคค","๐Ÿ˜ด","๐Ÿ˜ท","๐Ÿค’"],gestures:["๐Ÿ‘","๐Ÿ‘Ž","๐Ÿ‘Œ","โœŒ๏ธ","๐Ÿคž","๐ŸคŸ","๐Ÿค˜","๐Ÿค™","๐Ÿ‘ˆ","๐Ÿ‘‰","๐Ÿ‘†","๐Ÿ‘‡","โ˜๏ธ","๐Ÿ‘‹","๐Ÿคš","โœ‹","๐Ÿ–๏ธ","๐Ÿ––","๐Ÿ‘","๐Ÿ™Œ","๐Ÿ‘","๐Ÿคฒ","๐Ÿค","๐Ÿ™","โœ๏ธ","๐Ÿ’…","๐Ÿคณ","๐Ÿ’ช","๐Ÿฆพ","๐Ÿฆฟ"],people:["๐Ÿ‘ถ","๐Ÿ‘ง","๐Ÿง’","๐Ÿ‘ฆ","๐Ÿ‘ฉ","๐Ÿง‘","๐Ÿ‘จ","๐Ÿ‘ต","๐Ÿง“","๐Ÿ‘ด","๐Ÿ‘ฒ","๐Ÿ‘ณ","๐Ÿง•","๐Ÿ‘ฎ","๐Ÿ‘ท","๐Ÿ’‚","๐Ÿ•ต๏ธ","๐Ÿ‘ฉโ€โš•๏ธ","๐Ÿ‘จโ€โš•๏ธ","๐Ÿ‘ฉโ€๐ŸŽ“","๐Ÿ‘จโ€๐ŸŽ“","๐Ÿ‘ฉโ€๐Ÿซ","๐Ÿ‘จโ€๐Ÿซ","๐Ÿ‘ฉโ€โš–๏ธ","๐Ÿ‘จโ€โš–๏ธ","๐Ÿ‘ฉโ€๐ŸŒพ","๐Ÿ‘จโ€๐ŸŒพ","๐Ÿ‘ฉโ€๐Ÿณ","๐Ÿ‘จโ€๐Ÿณ","๐Ÿ‘ฉโ€๐Ÿ”ง"],animals:["๐Ÿถ","๐Ÿฑ","๐Ÿญ","๐Ÿน","๐Ÿฐ","๐ŸฆŠ","๐Ÿป","๐Ÿผ","๐Ÿจ","๐Ÿฏ","๐Ÿฆ","๐Ÿฎ","๐Ÿท","๐Ÿธ","๐Ÿต","๐Ÿ™ˆ","๐Ÿ™‰","๐Ÿ™Š","๐Ÿ”","๐Ÿง","๐Ÿฆ","๐Ÿค","๐Ÿฃ","๐Ÿฅ","๐Ÿฆ†","๐Ÿฆ…","๐Ÿฆ‰","๐Ÿฆ‡","๐Ÿบ","๐Ÿ—"],nature:["๐ŸŒต","๐ŸŽ„","๐ŸŒฒ","๐ŸŒณ","๐ŸŒด","๐ŸŒฑ","๐ŸŒฟ","โ˜˜๏ธ","๐Ÿ€","๐ŸŽ","๐ŸŽ‹","๐Ÿƒ","๐Ÿ‚","๐Ÿ","๐Ÿ„","๐ŸŒพ","๐Ÿ’","๐ŸŒท","๐ŸŒน","๐Ÿฅ€","๐ŸŒบ","๐ŸŒธ","๐ŸŒผ","๐ŸŒป","๐ŸŒž","๐ŸŒ","๐ŸŒ›","๐ŸŒœ","โญ","๐ŸŒŸ"],food:["๐Ÿ","๐ŸŽ","๐Ÿ","๐ŸŠ","๐Ÿ‹","๐ŸŒ","๐Ÿ‰","๐Ÿ‡","๐Ÿ“","๐Ÿˆ","๐Ÿ’","๐Ÿ‘","๐Ÿฅญ","๐Ÿ","๐Ÿฅฅ","๐Ÿฅ","๐Ÿ…","๐Ÿ†","๐Ÿฅ‘","๐Ÿฅฆ","๐Ÿฅฌ","๐Ÿฅ’","๐ŸŒถ๏ธ","๐ŸŒฝ","๐Ÿฅ•","๐Ÿง„","๐Ÿง…","๐Ÿฅ”","๐Ÿ ","๐Ÿฅ"],objects:["โŒš","๐Ÿ“ฑ","๐Ÿ’ป","โŒจ๏ธ","๐Ÿ–ฅ๏ธ","๐Ÿ–จ๏ธ","๐Ÿ–ฑ๏ธ","๐Ÿ•น๏ธ","๐Ÿ’พ","๐Ÿ’ฟ","๐Ÿ“€","๐Ÿ“ท","๐Ÿ“น","๐ŸŽฅ","๐Ÿ“ž","โ˜Ž๏ธ","๐Ÿ“Ÿ","๐Ÿ“ ","๐Ÿ“บ","๐Ÿ“ป","๐ŸŽ™๏ธ","๐ŸŽš๏ธ","๐ŸŽ›๏ธ","๐Ÿงญ","โฑ๏ธ","โฐ","๐Ÿ“ก","๐Ÿ”‹","๐Ÿ”Œ","๐Ÿ’ก"],symbols:["โค๏ธ","๐Ÿงก","๐Ÿ’›","๐Ÿ’š","๐Ÿ’™","๐Ÿ’œ","๐Ÿ–ค","๐Ÿค","๐ŸคŽ","๐Ÿ’”","โฃ๏ธ","๐Ÿ’•","๐Ÿ’ž","๐Ÿ’“","๐Ÿ’—","๐Ÿ’–","๐Ÿ’˜","๐Ÿ’","โœจ","๐Ÿ’ซ","โญ","๐ŸŒŸ","โœ”๏ธ","โœ…","โŒ","โŽ","โž•","โž–","โœ–๏ธ","โž—"],activities:["โšฝ","๐Ÿ€","๐Ÿˆ","โšพ","๐ŸฅŽ","๐ŸŽพ","๐Ÿ","๐Ÿ‰","๐Ÿฅ","๐ŸŽฑ","๐Ÿช€","๐Ÿ“","๐Ÿธ","๐Ÿ’","๐Ÿ‘","๐Ÿฅ","๐Ÿ","๐Ÿชƒ","๐Ÿฅ…","โ›ณ","๐Ÿช","๐Ÿน","๐ŸŽฃ","๐Ÿคฟ","๐ŸฅŠ","๐Ÿฅ‹","๐ŸŽฝ","๐Ÿ›น","๐Ÿ›ผ","๐Ÿ›ท"]},this.onSelect=e.onSelect;const t=this.createContent();this.dialog=new m({title:"Insert Emoji",content:t,buttons:[{label:"Close",onClick:()=>this.dialog.close()}]}),this.searchInput=t.querySelector("#emoji-search"),this.categorySelect=t.querySelector("#emoji-category"),this.emojisGrid=t.querySelector("#emoji-grid"),this.searchInput.addEventListener("input",()=>this.filterEmojis()),this.categorySelect.addEventListener("change",()=>this.updateGrid()),this.updateGrid()}createContent(){const e=document.createElement("div");return e.className="emoji-dialog-content",e.style.minWidth="500px",e.innerHTML=`
426
426
  <style>
427
427
  .emoji-dialog-content {
428
428
  display: flex;
@@ -512,5 +512,5 @@
512
512
  <div class="emoji-info">
513
513
  Click any emoji to insert it into your document.
514
514
  </div>
515
- `,e}updateGrid(){const e=this.categorySelect.value;this.emojisGrid.innerHTML="";let t=[];e==="all"?t=Object.values(this.emojis).flat():t=this.emojis[e]||[],t.forEach(i=>{const n=document.createElement("button");n.className="emoji-button",n.textContent=i,n.title=`Insert ${i}`,n.addEventListener("click",o=>{o.preventDefault(),this.handleSelect(i)}),this.emojisGrid.appendChild(n)})}filterEmojis(){const e=this.searchInput.value.toLowerCase();this.emojisGrid.querySelectorAll(".emoji-button").forEach(i=>{const n=i.textContent||"",o=!e||n.includes(e);i.style.display=o?"flex":"none"})}handleSelect(e){this.onSelect(e),this.dialog.close()}show(){this.dialog.show(),this.searchInput.value="",this.categorySelect.value="popular",this.updateGrid(),setTimeout(()=>this.searchInput.focus(),100)}close(){this.dialog.close()}}class f{constructor(e={}){this.changeListeners=[],this.options=e,this.engine=new l.EditorEngine({content:e.content,plugins:e.plugins||[],readonly:e.readonly}),e.onChange&&this.onChange(e.onChange),this.engine.on("change",()=>{const t=this.getHTML();this.changeListeners.forEach(i=>i(t))})}mount(e,t){this.contentElement=e,this.toolbarElement=t,this.contentElement.contentEditable=this.options.readonly?"false":"true",this.contentElement.className="rte-content",this.options.content&&(this.contentElement.innerHTML=this.options.content),this.options.toolbar!==!1&&this.toolbarElement&&(this.toolbar=new l.ToolbarRenderer({items:typeof this.options.toolbar=="string"?this.options.toolbar:void 0},this.options.plugins||[]),this.toolbar.setCommandHandler((i,n)=>{this.execCommand(i,n)}),this.toolbar.render(this.toolbarElement)),this.contentElement.addEventListener("input",()=>{const i=this.getHTML();this.changeListeners.forEach(n=>n(i))}),this.options.onInit&&this.options.onInit(this.getAPI())}getHTML(){var e;return((e=this.contentElement)==null?void 0:e.innerHTML)||""}setHTML(e){this.contentElement&&(this.contentElement.innerHTML=e)}execCommand(e,t){const i=this.engine.execCommand(e,t);return this.toolbar,i}focus(){var e;(e=this.contentElement)==null||e.focus()}blur(){var e;(e=this.contentElement)==null||e.blur()}onChange(e){return this.changeListeners.push(e),()=>{const t=this.changeListeners.indexOf(e);t>-1&&this.changeListeners.splice(t,1)}}registerCommand(e,t){if(typeof window!="undefined"){const i=window.__editorCommands||new Map;i.set(e,t),window.__editorCommands=i}}getState(){return{plugins:this.options.plugins,config:this.options,engine:this.engine.getState()}}getAPI(){var e;return{getHTML:()=>this.getHTML(),setHTML:t=>this.setHTML(t),execCommand:(t,i)=>this.execCommand(t,i),focus:()=>this.focus(),blur:()=>this.blur(),destroy:()=>this.destroy(),registerCommand:(t,i)=>this.registerCommand(t,i),onChange:t=>this.onChange(t),getState:()=>this.getState(),toolbar:{items:((e=this.options.plugins)==null?void 0:e.flatMap(t=>t.toolbar||[]))||[]}}}destroy(){var e;this.engine.destroy(),(e=this.toolbar)==null||e.destroy(),this.changeListeners=[],this.options.onDestroy&&this.options.onDestroy()}}function P(r){return new f(r)}class y{constructor(e){this.options=e,this.containerElement=e.element;const t=this.resolvePlugins(e.plugins);this.engine=new l.EditorEngine({content:e.content,plugins:t,readonly:e.readonly}),this.initializeDOM()}resolvePlugins(e){return e?typeof e=="string"?(console.warn("String-based plugin loading not yet implemented for VanillaAdapter"),[]):e:[]}initializeDOM(){this.containerElement.innerHTML="",this.containerElement.classList.add("editora-editor"),this.options.enableToolbar!==!1&&this.options.toolbar!==!1&&(this.toolbarElement=document.createElement("div"),this.toolbarElement.className="editora-toolbar-container",this.containerElement.appendChild(this.toolbarElement),this.toolbar=new l.ToolbarRenderer({items:typeof this.options.toolbar=="string"?this.options.toolbar:void 0},this.options.plugins||[]),this.toolbar.setCommandHandler((e,t)=>{this.execCommand(e,t)}),this.toolbar.render(this.toolbarElement)),this.contentElement=document.createElement("div"),this.contentElement.className="editora-content",this.contentElement.contentEditable=this.options.readonly?"false":"true",this.contentElement.style.minHeight="200px",this.contentElement.style.outline="none",this.contentElement.style.padding="12px",this.options.content&&(this.contentElement.innerHTML=this.options.content),this.containerElement.appendChild(this.contentElement),this.contentElement.addEventListener("input",()=>{this.containerElement.dispatchEvent(new CustomEvent("change",{detail:{html:this.getContent()}}))})}getContent(){var e;return((e=this.contentElement)==null?void 0:e.innerHTML)||""}setContent(e){this.contentElement&&(this.contentElement.innerHTML=e)}execCommand(e,t){return this.engine.execCommand(e,t)}focus(){var e;(e=this.contentElement)==null||e.focus()}on(e,t){const i=n=>{t(n.detail)};return this.containerElement.addEventListener(e,i),()=>{this.containerElement.removeEventListener(e,i)}}destroy(){var e;this.engine.destroy(),(e=this.toolbar)==null||e.destroy(),this.containerElement.innerHTML=""}}function q(r){return new y(r)}function j(){typeof window!="undefined"&&!customElements.get("editora-editor")&&customElements.define("editora-editor",l.RichTextEditorElement)}exports.CommandRegistry=l.CommandRegistry;exports.ConfigResolver=l.ConfigResolver;exports.EditorEngine=l.EditorEngine;exports.EditorState=l.EditorState;exports.FloatingToolbar=l.FloatingToolbar;exports.KeyboardShortcutManager=l.KeyboardShortcutManager;exports.PluginLoader=l.PluginLoader;exports.PluginManager=l.PluginManager;exports.RichTextEditorElement=l.RichTextEditorElement;exports.Schema=l.Schema;exports.StatusBar=l.StatusBar;exports.ToolbarRenderer=l.ToolbarRenderer;exports.calculateTextStats=l.calculateTextStats;exports.countLines=l.countLines;exports.getCursorPosition=l.getCursorPosition;exports.getSelectionInfo=l.getSelectionInfo;exports.getTextOffset=l.getTextOffset;exports.sanitizeHTML=l.sanitizeHTML;exports.sanitizeInputHTML=l.sanitizeInputHTML;exports.sanitizePastedHTML=l.sanitizePastedHTML;exports.CharacterDialog=I;exports.ColorPicker=C;exports.Dialog=m;exports.DocumentModel=p;exports.Dropdown=S;exports.Editor=v;exports.EmojiDialog=F;exports.ImageDialog=T;exports.LinkDialog=L;exports.MathDialog=M;exports.MediaPlugin=w;exports.PluginRuntime=b;exports.ReactAdapter=f;exports.SpellcheckPlugin=x;exports.TableDialog=k;exports.VanillaAdapter=y;exports.createEditor=q;exports.createPluginRuntime=E;exports.createReactAdapter=P;exports.initWebComponent=j;
515
+ `,e}updateGrid(){const e=this.categorySelect.value;this.emojisGrid.innerHTML="";let t=[];e==="all"?t=Object.values(this.emojis).flat():t=this.emojis[e]||[],t.forEach(i=>{const n=document.createElement("button");n.className="emoji-button",n.textContent=i,n.title=`Insert ${i}`,n.addEventListener("click",o=>{o.preventDefault(),this.handleSelect(i)}),this.emojisGrid.appendChild(n)})}filterEmojis(){const e=this.searchInput.value.toLowerCase();this.emojisGrid.querySelectorAll(".emoji-button").forEach(i=>{const n=i.textContent||"",o=!e||n.includes(e);i.style.display=o?"flex":"none"})}handleSelect(e){this.onSelect(e),this.dialog.close()}show(){this.dialog.show(),this.searchInput.value="",this.categorySelect.value="popular",this.updateGrid(),setTimeout(()=>this.searchInput.focus(),100)}close(){this.dialog.close()}}class v{constructor(e={}){this.changeListeners=[],this.options=e,this.engine=new l.EditorEngine({content:e.content,plugins:e.plugins||[],readonly:e.readonly}),e.onChange&&this.onChange(e.onChange),this.engine.on("change",()=>{const t=this.getHTML();this.changeListeners.forEach(i=>i(t))})}mount(e,t){this.contentElement=e,this.toolbarElement=t,this.contentElement.contentEditable=this.options.readonly?"false":"true",this.contentElement.className="rte-content",this.options.content&&(this.contentElement.innerHTML=this.options.content),this.options.toolbar!==!1&&this.toolbarElement&&(this.toolbar=new l.ToolbarRenderer({items:typeof this.options.toolbar=="string"?this.options.toolbar:void 0},this.options.plugins||[]),this.toolbar.setCommandHandler((i,n)=>{this.execCommand(i,n)}),this.toolbar.render(this.toolbarElement)),this.contentElement.addEventListener("input",()=>{const i=this.getHTML();this.changeListeners.forEach(n=>n(i))}),this.options.onInit&&this.options.onInit(this.getAPI())}getHTML(){var e;return((e=this.contentElement)==null?void 0:e.innerHTML)||""}setHTML(e){this.contentElement&&(this.contentElement.innerHTML=e)}execCommand(e,t){const i=this.engine.execCommand(e,t);return this.toolbar,i}focus(){var e;(e=this.contentElement)==null||e.focus()}blur(){var e;(e=this.contentElement)==null||e.blur()}onChange(e){return this.changeListeners.push(e),()=>{const t=this.changeListeners.indexOf(e);t>-1&&this.changeListeners.splice(t,1)}}registerCommand(e,t){if(typeof window!="undefined"){const i=window.__editorCommands||new Map;i.set(e,t),window.__editorCommands=i}}getState(){return{plugins:this.options.plugins,config:this.options,engine:this.engine.getState()}}getAPI(){var e;return{getHTML:()=>this.getHTML(),setHTML:t=>this.setHTML(t),execCommand:(t,i)=>this.execCommand(t,i),focus:()=>this.focus(),blur:()=>this.blur(),destroy:()=>this.destroy(),registerCommand:(t,i)=>this.registerCommand(t,i),onChange:t=>this.onChange(t),getState:()=>this.getState(),toolbar:{items:((e=this.options.plugins)==null?void 0:e.flatMap(t=>t.toolbar||[]))||[]}}}destroy(){var e;this.engine.destroy(),(e=this.toolbar)==null||e.destroy(),this.changeListeners=[],this.options.onDestroy&&this.options.onDestroy()}}function j(r){return new v(r)}class E{constructor(e){this.options=e,this.containerElement=e.element;const t=this.resolvePlugins(e.plugins);this.engine=new l.EditorEngine({content:e.content,plugins:t,readonly:e.readonly}),this.initializeDOM()}resolvePlugins(e){return e?typeof e=="string"?(console.warn("String-based plugin loading not yet implemented for VanillaAdapter"),[]):e:[]}initializeDOM(){this.containerElement.innerHTML="",this.containerElement.classList.add("editora-editor"),this.options.enableToolbar!==!1&&this.options.toolbar!==!1&&(this.toolbarElement=document.createElement("div"),this.toolbarElement.className="editora-toolbar-container",this.containerElement.appendChild(this.toolbarElement),this.toolbar=new l.ToolbarRenderer({items:typeof this.options.toolbar=="string"?this.options.toolbar:void 0},this.options.plugins||[]),this.toolbar.setCommandHandler((e,t)=>{this.execCommand(e,t)}),this.toolbar.render(this.toolbarElement)),this.contentElement=document.createElement("div"),this.contentElement.className="editora-content",this.contentElement.contentEditable=this.options.readonly?"false":"true",this.contentElement.style.minHeight="200px",this.contentElement.style.outline="none",this.contentElement.style.padding="12px",this.options.content&&(this.contentElement.innerHTML=this.options.content),this.containerElement.appendChild(this.contentElement),this.contentElement.addEventListener("input",()=>{this.containerElement.dispatchEvent(new CustomEvent("change",{detail:{html:this.getContent()}}))})}getContent(){var e;return((e=this.contentElement)==null?void 0:e.innerHTML)||""}setContent(e){this.contentElement&&(this.contentElement.innerHTML=e)}execCommand(e,t){return this.engine.execCommand(e,t)}focus(){var e;(e=this.contentElement)==null||e.focus()}on(e,t){const i=n=>{t(n.detail)};return this.containerElement.addEventListener(e,i),()=>{this.containerElement.removeEventListener(e,i)}}destroy(){var e;this.engine.destroy(),(e=this.toolbar)==null||e.destroy(),this.containerElement.innerHTML=""}}function $(r){return new E(r)}function H(){typeof window!="undefined"&&!customElements.get("editora-editor")&&customElements.define("editora-editor",l.RichTextEditorElement)}exports.CommandRegistry=l.CommandRegistry;exports.ConfigResolver=l.ConfigResolver;exports.EditorEngine=l.EditorEngine;exports.EditorState=l.EditorState;exports.FloatingToolbar=l.FloatingToolbar;exports.KeyboardShortcutManager=l.KeyboardShortcutManager;exports.PluginLoader=l.PluginLoader;exports.PluginManager=l.PluginManager;exports.RichTextEditorElement=l.RichTextEditorElement;exports.Schema=l.Schema;exports.StatusBar=l.StatusBar;exports.ToolbarRenderer=l.ToolbarRenderer;exports.calculateTextStats=l.calculateTextStats;exports.countLines=l.countLines;exports.getCursorPosition=l.getCursorPosition;exports.getSelectionInfo=l.getSelectionInfo;exports.getTextOffset=l.getTextOffset;exports.sanitizeHTML=l.sanitizeHTML;exports.sanitizeInputHTML=l.sanitizeInputHTML;exports.sanitizePastedHTML=l.sanitizePastedHTML;exports.CharacterDialog=P;exports.ColorPicker=k;exports.Dialog=m;exports.DocumentModel=p;exports.Dropdown=L;exports.Editor=w;exports.EmojiDialog=q;exports.ImageDialog=I;exports.LinkDialog=T;exports.MathDialog=F;exports.MediaPlugin=C;exports.PluginRuntime=f;exports.ReactAdapter=v;exports.SpellcheckPlugin=S;exports.TableDialog=M;exports.VanillaAdapter=E;exports.createEditor=$;exports.createPluginRuntime=x;exports.createReactAdapter=j;exports.initWebComponent=H;
516
516
  //# sourceMappingURL=index.cjs.js.map
package/dist/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
- import { P as g, E as y, a as b, T as f, R as v } from "./index-XsYC_KdJ.mjs";
2
- import { C as G, b as O, F as V, K, c as B, S as W, d as X, e as _, f as Y, g as J, h as Q, i as Z, s as ee, j as te, k as ie } from "./index-XsYC_KdJ.mjs";
3
- class L {
1
+ import { P as g, E, a as f, T as y, R as w } from "./index-XsYC_KdJ.mjs";
2
+ import { C as V, b as K, F as B, K as W, c as X, S as _, d as Y, e as J, f as Q, g as Z, h as ee, i as te, s as ie, j as ne, k as oe } from "./index-XsYC_KdJ.mjs";
3
+ class T {
4
4
  constructor(e) {
5
5
  if (this.listeners = [], e instanceof g)
6
6
  this.pluginManager = e;
@@ -11,7 +11,7 @@ class L {
11
11
  }), i.element && (this.domElement = i.element, this.setupDOMElement(i));
12
12
  }
13
13
  const t = this.pluginManager.buildSchema();
14
- this.state = y.create(t), this.commands = this.pluginManager.getCommands();
14
+ this.state = E.create(t), this.commands = this.pluginManager.getCommands();
15
15
  }
16
16
  setupDOMElement(e) {
17
17
  this.domElement && (e.enableToolbar !== !1 && e.toolbarElement ? this.toolbarElement = e.toolbarElement : e.enableToolbar !== !1 && (this.toolbarElement = document.createElement("div"), this.toolbarElement.className = "editora-toolbar-container", this.domElement.appendChild(this.toolbarElement)), this.contentElement = document.createElement("div"), this.contentElement.contentEditable = "true", this.contentElement.className = "editora-content", this.contentElement.style.minHeight = "200px", this.contentElement.style.outline = "none", this.contentElement.style.padding = "12px", e.content && (this.contentElement.innerHTML = e.content), this.domElement.appendChild(this.contentElement), this.contentElement.addEventListener("input", () => {
@@ -73,7 +73,7 @@ class L {
73
73
  });
74
74
  }
75
75
  }
76
- class E {
76
+ class x {
77
77
  constructor(e) {
78
78
  this.initialized = !1, this.plugin = e;
79
79
  }
@@ -142,10 +142,17 @@ class E {
142
142
  return this.context;
143
143
  }
144
144
  }
145
- function k(l) {
146
- return new E(l);
145
+ function I(l) {
146
+ return new x(l);
147
+ }
148
+ const b = /* @__PURE__ */ new Set();
149
+ function v(l, e) {
150
+ b.has(l) || (b.add(l), console.warn(
151
+ `[Editora] ${l} from @editora/core is a deprecated, non-functional scaffold: its commands and toolbar buttons do nothing. It will be removed in a future major release - use ${e} instead.`
152
+ ));
147
153
  }
148
- function T(l = {}) {
154
+ function M(l = {}) {
155
+ v("SpellcheckPlugin", "`SpellCheckPlugin` from @editora/spell-check");
149
156
  const {
150
157
  enabled: e = !1,
151
158
  provider: t = "browser",
@@ -198,7 +205,8 @@ function T(l = {}) {
198
205
  ] : []
199
206
  };
200
207
  }
201
- function I(l = {}) {
208
+ function F(l = {}) {
209
+ v("MediaPlugin", "`MediaManagerPlugin` from @editora/media-manager");
202
210
  const {
203
211
  uploadUrl: e = "",
204
212
  libraryUrl: t = "",
@@ -212,7 +220,7 @@ function I(l = {}) {
212
220
  enableChunking: r = !0,
213
221
  onProgress: d,
214
222
  onError: h,
215
- onSuccess: C
223
+ onSuccess: L
216
224
  } = l;
217
225
  return {
218
226
  name: "media",
@@ -391,7 +399,7 @@ class u {
391
399
  this.close();
392
400
  }
393
401
  }
394
- class M {
402
+ class q {
395
403
  constructor(e) {
396
404
  this.isOpen = !1, this.config = e, this.selectedValue = e.value, this.element = this.createElement(), this.attachEventListeners();
397
405
  }
@@ -448,7 +456,7 @@ class M {
448
456
  this.element.remove();
449
457
  }
450
458
  }
451
- class F {
459
+ class j {
452
460
  constructor(e) {
453
461
  this.defaultPresets = [
454
462
  "#000000",
@@ -539,7 +547,7 @@ class F {
539
547
  this.element.remove();
540
548
  }
541
549
  }
542
- class q {
550
+ class P {
543
551
  constructor(e) {
544
552
  const { initialUrl: t = "", initialText: i = "", onSubmit: n, onCancel: o } = e;
545
553
  this.dialog = new u({
@@ -621,7 +629,7 @@ class q {
621
629
  this.dialog.close();
622
630
  }
623
631
  }
624
- class j {
632
+ class $ {
625
633
  constructor(e) {
626
634
  const { onSubmit: t, onCancel: i } = e;
627
635
  this.dialog = new u({
@@ -723,7 +731,7 @@ class j {
723
731
  t == null || t.addEventListener("input", s), i == null || i.addEventListener("input", s), n == null || n.addEventListener("change", s);
724
732
  }
725
733
  }
726
- class $ {
734
+ class H {
727
735
  constructor(e) {
728
736
  this.config = e;
729
737
  const { onSubmit: t, onCancel: i } = e;
@@ -868,7 +876,7 @@ class $ {
868
876
  }
869
877
  }
870
878
  }
871
- class P {
879
+ class z {
872
880
  constructor(e) {
873
881
  this.onSubmit = e.onSubmit;
874
882
  const t = this.createContent();
@@ -1038,7 +1046,7 @@ class P {
1038
1046
  this.dialog.close();
1039
1047
  }
1040
1048
  }
1041
- class H {
1049
+ class A {
1042
1050
  constructor(e) {
1043
1051
  this.characters = {
1044
1052
  common: ["ยฉ", "ยฎ", "โ„ข", "ยง", "ยถ", "โ€ ", "โ€ก", "โ€ข", "โ€ฃ", "โƒ", "โ—ฆ", "โ–ช", "โ–ซ", "โ—Š", "โ—‹", "โ—", "โ–ก", "โ– ", "โ–ณ", "โ–ฒ", "โ–ฝ", "โ–ผ", "โ—‡", "โ—†", "โ˜…", "โ˜†"],
@@ -1181,7 +1189,7 @@ class H {
1181
1189
  this.dialog.close();
1182
1190
  }
1183
1191
  }
1184
- class z {
1192
+ class D {
1185
1193
  constructor(e) {
1186
1194
  this.emojis = {
1187
1195
  popular: ["๐Ÿ˜€", "๐Ÿ˜ƒ", "๐Ÿ˜„", "๐Ÿ˜", "๐Ÿ˜Š", "๐Ÿ˜", "๐Ÿคฉ", "๐Ÿ˜˜", "๐Ÿ˜—", "๐Ÿ˜š", "๐Ÿ˜™", "๐Ÿ™‚", "๐Ÿค—", "๐Ÿค”", "๐Ÿคจ", "๐Ÿ˜", "๐Ÿ˜‘", "๐Ÿ˜ถ", "๐Ÿ™„", "๐Ÿ˜", "๐Ÿ‘", "๐Ÿ‘Ž", "๐Ÿ‘Œ", "โœŒ๏ธ", "๐Ÿคž", "๐Ÿค", "๐Ÿ‘", "๐Ÿ™Œ", "๐Ÿ‘‹", "๐Ÿคš", "โœ‹", "๐Ÿ–๏ธ", "๐Ÿ––", "๐Ÿ‘Š", "โœŠ", "๐Ÿค›", "๐Ÿคœ", "๐Ÿ’ช"],
@@ -1330,9 +1338,9 @@ class z {
1330
1338
  this.dialog.close();
1331
1339
  }
1332
1340
  }
1333
- class x {
1341
+ class S {
1334
1342
  constructor(e = {}) {
1335
- this.changeListeners = [], this.options = e, this.engine = new b({
1343
+ this.changeListeners = [], this.options = e, this.engine = new f({
1336
1344
  content: e.content,
1337
1345
  plugins: e.plugins || [],
1338
1346
  readonly: e.readonly
@@ -1345,7 +1353,7 @@ class x {
1345
1353
  * Mount editor to DOM elements
1346
1354
  */
1347
1355
  mount(e, t) {
1348
- this.contentElement = e, this.toolbarElement = t, this.contentElement.contentEditable = this.options.readonly ? "false" : "true", this.contentElement.className = "rte-content", this.options.content && (this.contentElement.innerHTML = this.options.content), this.options.toolbar !== !1 && this.toolbarElement && (this.toolbar = new f(
1356
+ this.contentElement = e, this.toolbarElement = t, this.contentElement.contentEditable = this.options.readonly ? "false" : "true", this.contentElement.className = "rte-content", this.options.content && (this.contentElement.innerHTML = this.options.content), this.options.toolbar !== !1 && this.toolbarElement && (this.toolbar = new y(
1349
1357
  {
1350
1358
  items: typeof this.options.toolbar == "string" ? this.options.toolbar : void 0
1351
1359
  },
@@ -1447,14 +1455,14 @@ class x {
1447
1455
  this.engine.destroy(), (e = this.toolbar) == null || e.destroy(), this.changeListeners = [], this.options.onDestroy && this.options.onDestroy();
1448
1456
  }
1449
1457
  }
1450
- function A(l) {
1451
- return new x(l);
1458
+ function U(l) {
1459
+ return new S(l);
1452
1460
  }
1453
- class w {
1461
+ class C {
1454
1462
  constructor(e) {
1455
1463
  this.options = e, this.containerElement = e.element;
1456
1464
  const t = this.resolvePlugins(e.plugins);
1457
- this.engine = new b({
1465
+ this.engine = new f({
1458
1466
  content: e.content,
1459
1467
  plugins: t,
1460
1468
  readonly: e.readonly
@@ -1470,7 +1478,7 @@ class w {
1470
1478
  * Initialize DOM elements
1471
1479
  */
1472
1480
  initializeDOM() {
1473
- this.containerElement.innerHTML = "", this.containerElement.classList.add("editora-editor"), this.options.enableToolbar !== !1 && this.options.toolbar !== !1 && (this.toolbarElement = document.createElement("div"), this.toolbarElement.className = "editora-toolbar-container", this.containerElement.appendChild(this.toolbarElement), this.toolbar = new f(
1481
+ this.containerElement.innerHTML = "", this.containerElement.classList.add("editora-editor"), this.options.enableToolbar !== !1 && this.options.toolbar !== !1 && (this.toolbarElement = document.createElement("div"), this.toolbarElement.className = "editora-toolbar-container", this.containerElement.appendChild(this.toolbarElement), this.toolbar = new y(
1474
1482
  {
1475
1483
  items: typeof this.options.toolbar == "string" ? this.options.toolbar : void 0
1476
1484
  },
@@ -1528,52 +1536,52 @@ class w {
1528
1536
  this.engine.destroy(), (e = this.toolbar) == null || e.destroy(), this.containerElement.innerHTML = "";
1529
1537
  }
1530
1538
  }
1531
- function D(l) {
1532
- return new w(l);
1539
+ function R(l) {
1540
+ return new C(l);
1533
1541
  }
1534
- function U() {
1535
- typeof window != "undefined" && !customElements.get("editora-editor") && customElements.define("editora-editor", v);
1542
+ function N() {
1543
+ typeof window != "undefined" && !customElements.get("editora-editor") && customElements.define("editora-editor", w);
1536
1544
  }
1537
1545
  export {
1538
- H as CharacterDialog,
1539
- F as ColorPicker,
1540
- G as CommandRegistry,
1541
- O as ConfigResolver,
1546
+ A as CharacterDialog,
1547
+ j as ColorPicker,
1548
+ V as CommandRegistry,
1549
+ K as ConfigResolver,
1542
1550
  u as Dialog,
1543
1551
  m as DocumentModel,
1544
- M as Dropdown,
1545
- L as Editor,
1546
- b as EditorEngine,
1547
- y as EditorState,
1548
- z as EmojiDialog,
1549
- V as FloatingToolbar,
1550
- $ as ImageDialog,
1551
- K as KeyboardShortcutManager,
1552
- q as LinkDialog,
1553
- P as MathDialog,
1554
- I as MediaPlugin,
1555
- B as PluginLoader,
1552
+ q as Dropdown,
1553
+ T as Editor,
1554
+ f as EditorEngine,
1555
+ E as EditorState,
1556
+ D as EmojiDialog,
1557
+ B as FloatingToolbar,
1558
+ H as ImageDialog,
1559
+ W as KeyboardShortcutManager,
1560
+ P as LinkDialog,
1561
+ z as MathDialog,
1562
+ F as MediaPlugin,
1563
+ X as PluginLoader,
1556
1564
  g as PluginManager,
1557
- E as PluginRuntime,
1558
- x as ReactAdapter,
1559
- v as RichTextEditorElement,
1560
- W as Schema,
1561
- T as SpellcheckPlugin,
1562
- X as StatusBar,
1563
- j as TableDialog,
1564
- f as ToolbarRenderer,
1565
- w as VanillaAdapter,
1566
- _ as calculateTextStats,
1567
- Y as countLines,
1568
- D as createEditor,
1569
- k as createPluginRuntime,
1570
- A as createReactAdapter,
1571
- J as getCursorPosition,
1572
- Q as getSelectionInfo,
1573
- Z as getTextOffset,
1574
- U as initWebComponent,
1575
- ee as sanitizeHTML,
1576
- te as sanitizeInputHTML,
1577
- ie as sanitizePastedHTML
1565
+ x as PluginRuntime,
1566
+ S as ReactAdapter,
1567
+ w as RichTextEditorElement,
1568
+ _ as Schema,
1569
+ M as SpellcheckPlugin,
1570
+ Y as StatusBar,
1571
+ $ as TableDialog,
1572
+ y as ToolbarRenderer,
1573
+ C as VanillaAdapter,
1574
+ J as calculateTextStats,
1575
+ Q as countLines,
1576
+ R as createEditor,
1577
+ I as createPluginRuntime,
1578
+ U as createReactAdapter,
1579
+ Z as getCursorPosition,
1580
+ ee as getSelectionInfo,
1581
+ te as getTextOffset,
1582
+ N as initWebComponent,
1583
+ ie as sanitizeHTML,
1584
+ ne as sanitizeInputHTML,
1585
+ oe as sanitizePastedHTML
1578
1586
  };
1579
1587
  //# sourceMappingURL=index.esm.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@editora/core",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "description": "Framework-agnostic rich text editor core for React and web apps, built for enterprise editing workflows.",
5
5
  "author": "Ajay Kumar <ajaykr089@gmail.com>",
6
6
  "license": "MIT",