@editora/plugins 1.0.10 → 1.0.12
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/README.md +1 -1
- package/dist/_commonjsHelpers-BH3jXuIh.js +1 -0
- package/dist/_commonjsHelpers-ByX85dGu.mjs +33 -0
- package/dist/a11y-checker.cjs.js +12 -12
- package/dist/a11y-checker.esm.js +80 -98
- package/dist/anchor.cjs.js +12 -12
- package/dist/anchor.esm.js +115 -128
- package/dist/anchoredPopover-BzqGPOAE.js +1 -0
- package/dist/anchoredPopover-Dts0IrgU.mjs +106 -0
- package/dist/approval-workflow.cjs.js +40 -40
- package/dist/approval-workflow.esm.js +208 -249
- package/dist/background-color.cjs.js +2 -2
- package/dist/background-color.esm.js +55 -68
- package/dist/blockquote.esm.js +1 -2
- package/dist/blocks-library.cjs.js +45 -45
- package/dist/blocks-library.esm.js +178 -245
- package/dist/capitalization.esm.js +1 -2
- package/dist/checklist.cjs.js +1 -1
- package/dist/checklist.esm.js +58 -82
- package/dist/citations.cjs.js +37 -37
- package/dist/citations.esm.js +439 -512
- package/dist/clear-formatting.cjs.js +1 -1
- package/dist/clear-formatting.esm.js +27 -33
- package/dist/code-sample.cjs.js +14 -14
- package/dist/code-sample.esm.js +82 -93
- package/dist/code.cjs.js +119 -42
- package/dist/code.esm.js +2560 -760
- package/dist/comments.cjs.js +6 -6
- package/dist/comments.esm.js +116 -158
- package/dist/conditional-content.cjs.js +90 -90
- package/dist/conditional-content.esm.js +371 -432
- package/dist/content-rules.cjs.js +7 -7
- package/dist/content-rules.esm.js +105 -159
- package/dist/data-binding.cjs.js +46 -46
- package/dist/data-binding.esm.js +328 -368
- package/dist/direction.esm.js +9 -18
- package/dist/doc-schema.cjs.js +29 -29
- package/dist/doc-schema.esm.js +240 -308
- package/dist/document-manager.cjs.js +1 -1
- package/dist/document-manager.esm.js +4 -5
- package/dist/documentManager-CTqRftU8.mjs +8369 -0
- package/dist/documentManager-Jf0RbSks.js +17 -0
- package/dist/{editorContainerHelpers-69585c07.mjs → editorContainerHelpers-C7kdWnS0.mjs} +1 -2
- package/dist/embed-iframe.cjs.js +4 -4
- package/dist/embed-iframe.esm.js +73 -81
- package/dist/emojis.cjs.js +8 -8
- package/dist/emojis.esm.js +65 -77
- package/dist/enterprise.cjs.js +1 -1
- package/dist/enterprise.esm.js +54 -56
- package/dist/font-family.cjs.js +1 -1
- package/dist/font-family.esm.js +39 -47
- package/dist/font-size.cjs.js +1 -1
- package/dist/font-size.esm.js +37 -53
- package/dist/footnote.cjs.js +2 -2
- package/dist/footnote.esm.js +76 -117
- package/dist/history.cjs.js +1 -1
- package/dist/history.esm.js +70 -92
- package/dist/html2canvas.esm-B5qzocYs.js +5 -0
- package/dist/{html2canvas.esm-1a1724a1.mjs → html2canvas.esm-BWVIUcAF.mjs} +141 -225
- package/dist/indent.cjs.js +1 -1
- package/dist/indent.esm.js +12 -24
- package/dist/{index-f04538f2.mjs → index-BFsKNTTj.mjs} +70 -71
- package/dist/index-CvJk4DKa.js +221 -0
- package/dist/index-D3CycEFU.mjs +16543 -0
- package/dist/index-tqLTHcO6.js +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es-CE_A4QSm.js +5 -0
- package/dist/index.es-DQ78mYYo.mjs +6665 -0
- package/dist/index.esm.js +125 -128
- package/dist/italic.cjs.js +1 -1
- package/dist/italic.esm.js +8 -9
- package/dist/jspdf.es.min-BoS80556.js +77 -0
- package/dist/{jspdf.es.min-c36a4fd8.mjs → jspdf.es.min-DQCoX5yh.mjs} +3658 -4682
- package/dist/line-height.cjs.js +1 -1
- package/dist/line-height.esm.js +11 -24
- package/dist/link.cjs.js +5 -5
- package/dist/link.esm.js +24 -30
- package/dist/list.cjs.js +1 -1
- package/dist/list.esm.js +20 -25
- package/dist/lite.cjs.js +1 -1
- package/dist/lite.esm.js +59 -61
- package/dist/math.cjs.js +21 -21
- package/dist/math.esm.js +139 -146
- package/dist/media-manager.cjs.js +31 -31
- package/dist/media-manager.esm.js +285 -300
- package/dist/mentions.cjs.js +9 -9
- package/dist/mentions.esm.js +238 -286
- package/dist/merge-tag.cjs.js +2 -2
- package/dist/merge-tag.esm.js +177 -216
- package/dist/page-break.cjs.js +2 -2
- package/dist/page-break.esm.js +33 -49
- package/dist/pii-redaction.cjs.js +19 -19
- package/dist/pii-redaction.esm.js +393 -463
- package/dist/plugins.css +1 -0
- package/dist/preview.esm.js +5 -10
- package/dist/print.cjs.js +4 -4
- package/dist/print.esm.js +17 -20
- package/dist/{purify.es-35a15df8.mjs → purify.es-DHhaBdbu.mjs} +9 -19
- package/dist/{purify.es-a8d731c6.js → purify.es-T2a3nLiC.js} +1 -1
- package/dist/slash-commands.cjs.js +2 -2
- package/dist/slash-commands.esm.js +39 -75
- package/dist/smart-paste.cjs.js +27 -27
- package/dist/smart-paste.esm.js +280 -336
- package/dist/special-characters.cjs.js +7 -7
- package/dist/special-characters.esm.js +61 -69
- package/dist/spell-check.cjs.js +5 -5
- package/dist/spell-check.esm.js +97 -123
- package/dist/strikethrough.cjs.js +1 -1
- package/dist/strikethrough.esm.js +14 -19
- package/dist/table.cjs.js +4 -4
- package/dist/table.esm.js +191 -225
- package/dist/template.cjs.js +21 -20
- package/dist/template.esm.js +715 -196
- package/dist/text-alignment.cjs.js +1 -1
- package/dist/text-alignment.esm.js +21 -27
- package/dist/text-color.cjs.js +3 -3
- package/dist/text-color.esm.js +70 -87
- package/dist/track-changes.cjs.js +2 -2
- package/dist/track-changes.esm.js +100 -162
- package/dist/translation-workflow.cjs.js +74 -74
- package/dist/translation-workflow.esm.js +602 -678
- package/dist/version-diff.cjs.js +14 -14
- package/dist/version-diff.esm.js +128 -157
- package/package.json +1 -1
- package/dist/_commonjsHelpers-6763f629.js +0 -1
- package/dist/_commonjsHelpers-c5d32002.mjs +0 -30
- package/dist/anchoredPopover-33f1358d.mjs +0 -109
- package/dist/anchoredPopover-8151d535.js +0 -1
- package/dist/documentManager-25b6203c.mjs +0 -9122
- package/dist/documentManager-b69e7054.js +0 -17
- package/dist/html2canvas.esm-09133e29.js +0 -22
- package/dist/index-656d224b.js +0 -231
- package/dist/index-6a8c48bb.js +0 -1
- package/dist/index-d027b7e2.mjs +0 -16859
- package/dist/index.es-730f2d98.mjs +0 -5775
- package/dist/index.es-dd40173b.js +0 -18
- package/dist/jspdf.es.min-90db2c97.js +0 -243
- package/dist/style.css +0 -1
- /package/dist/{editorContainerHelpers-36b8ddf3.js → editorContainerHelpers-CFbfiOJI.js} +0 -0
package/dist/embed-iframe.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=[{label:"Inline Value",value:"inline"},{label:"Responsive - 21x9",value:"21x9"},{label:"Responsive - 16x9",value:"16x9"},{label:"Responsive - 4x3",value:"4x3"},{label:"Responsive - 1x1",value:"1x1"}],m='[data-theme="dark"], .dark, .editora-theme-dark',u=new WeakMap,l=e=>(u.has(e)||u.set(e,{dialogElement:null,escapeHandler:null,activeTab:"general",formData:{src:"",selectedSize:"inline",width:"100%",height:"400px",constrainProportions:!0,name:"",title:"",longDescription:"",descriptionUrl:"",showBorder:!0,enableScrollbar:!0}}),u.get(e));function v(e){return e?.matches(m)||e?.closest(m)||document.activeElement?.closest(m)?!0:document.body.matches(m)||document.documentElement.matches(m)}const x=()=>({name:"embedIframe",toolbar:[{label:"Embed Content",command:"openEmbedIframeDialog",icon:'<svg width="24" height="24" focusable="false"><path d="M19 6V5H5v14h2A13 13 0 0 1 19 6Zm0 1.4c-.8.8-1.6 2.4-2.2 4.6H19V7.4Zm0 5.6h-2.4c-.4 1.8-.6 3.8-.6 6h3v-6Zm-4 6c0-2.2.2-4.2.6-6H13c-.7 1.8-1.1 3.8-1.1 6h3Zm-4 0c0-2.2.4-4.2 1-6H9.6A12 12 0 0 0 8 19h3ZM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 0 0-4 4.5h2.2Zm-3.4 0a12 12 0 0 1 2.8-4 12 12 0 0 0-5 4h2.2Z" fill-rule="nonzero"></path></svg>',shortcut:"Mod-Shift-e",type:"button"}],commands:{openEmbedIframeDialog:e=>(y(e),!0)},keymap:{"Mod-Shift-e":"openEmbedIframeDialog"}});function y(e){if(!e){const o=document.activeElement;o&&o.closest("[data-editora-editor]")&&(e=o.closest("[data-editora-editor]"))}if(e||(e=document.querySelector("[data-editora-editor]")),!e){console.warn("Editor element not found");return}const t=l(e);t.formData={src:"",selectedSize:"inline",width:"100%",height:"400px",constrainProportions:!0,name:"",title:"",longDescription:"",descriptionUrl:"",showBorder:!0,enableScrollbar:!0},t.activeTab="general";const a=document.createElement("div");a.className="rte-dialog-overlay rte-embed-iframe-overlay",v(e)&&a.classList.add("rte-theme-dark"),a.onclick=()=>f(e);const r=document.createElement("div");r.className="rte-dialog-content embed-iframe-dialog",r.onclick=o=>o.stopPropagation(),r.innerHTML=`
|
|
2
2
|
<div class="rte-dialog-header">
|
|
3
3
|
<h3>Embed Iframe</h3>
|
|
4
4
|
<button class="rte-dialog-close">×</button>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<div class="rte-form-group">
|
|
19
19
|
<label class="rte-form-label">Size</label>
|
|
20
20
|
<select class="rte-form-select" id="iframe-size">
|
|
21
|
-
${
|
|
21
|
+
${g.map(o=>`<option value="${o.value}">${o.label}</option>`).join("")}
|
|
22
22
|
</select>
|
|
23
23
|
</div>
|
|
24
24
|
<div class="rte-form-row" id="dimensions-row">
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
<button type="button" class="rte-btn rte-btn-secondary" id="cancel-btn">Cancel</button>
|
|
73
73
|
<button type="submit" class="rte-btn rte-btn-primary" id="save-btn">Save</button>
|
|
74
74
|
</div>
|
|
75
|
-
`,a.appendChild(r),document.body.appendChild(a),t.dialogElement=a,t.escapeHandler=o=>{o.key==="Escape"&&(o.preventDefault(),o.stopPropagation(),
|
|
75
|
+
`,a.appendChild(r),document.body.appendChild(a),t.dialogElement=a,t.escapeHandler=o=>{o.key==="Escape"&&(o.preventDefault(),o.stopPropagation(),f(e))},document.addEventListener("keydown",t.escapeHandler,!0),k(r,e),z(),setTimeout(()=>{r.querySelector("#iframe-src")?.focus()},100)}function k(e,t){l(t),e.querySelector(".rte-dialog-close")?.addEventListener("click",()=>f(t)),e.querySelectorAll(".rte-tab-button").forEach(i=>{i.addEventListener("click",n=>{const c=n.target.getAttribute("data-tab");c&&w(e,c,t)})}),e.querySelector("#iframe-size")?.addEventListener("change",i=>S(e,i.target.value,t));const r=e.querySelector("#iframe-width"),o=e.querySelector("#iframe-height");r?.addEventListener("input",i=>D(e,i.target.value,t)),o?.addEventListener("input",i=>q(e,i.target.value,t)),e.querySelector("#constrain-btn")?.addEventListener("click",()=>E(e,t)),e.querySelector("#cancel-btn")?.addEventListener("click",()=>f(t)),e.querySelector("#save-btn")?.addEventListener("click",()=>L(e,t))}function w(e,t,a){const r=l(a);r.activeTab=t,e.querySelectorAll(".rte-tab-button").forEach(o=>{o.classList.toggle("active",o.getAttribute("data-tab")===t)}),e.querySelectorAll(".rte-tab-panel").forEach(o=>{o.style.display=o.getAttribute("data-panel")===t?"block":"none"})}function S(e,t,a){const r=l(a);r.formData.selectedSize=t;const o=e.querySelector("#dimensions-row"),i=e.querySelector("#iframe-width"),n=e.querySelector("#iframe-height");t==="inline"?(o.style.display="flex",i.value="100%",n.value="400px",r.formData.width="100%",r.formData.height="400px"):(o.style.display="none",r.formData.width="100%",r.formData.height="auto")}function D(e,t,a){const r=l(a);if(r.formData.width=t,r.formData.constrainProportions&&r.formData.selectedSize==="inline"){const o=parseFloat(t);if(!isNaN(o)){const i=o*9/16;r.formData.height=`${i}px`;const n=e.querySelector("#iframe-height");n&&(n.value=r.formData.height)}}}function q(e,t,a){const r=l(a);if(r.formData.height=t,r.formData.constrainProportions&&r.formData.selectedSize==="inline"){const o=parseFloat(t);if(!isNaN(o)){const i=o*16/9;r.formData.width=`${i}px`;const n=e.querySelector("#iframe-width");n&&(n.value=r.formData.width)}}}function E(e,t){const a=l(t);a.formData.constrainProportions=!a.formData.constrainProportions;const r=e.querySelector("#constrain-btn");r&&(r.textContent=a.formData.constrainProportions?"🔒":"🔓",r.className=`rte-constrain-btn ${a.formData.constrainProportions?"locked":"unlocked"}`,r.title=a.formData.constrainProportions?"Unlock proportions":"Lock proportions")}function L(e,t){const a=l(t),r=e.querySelector("#iframe-src")?.value.trim();if(!r){alert("Please enter a source URL");return}if(!r.startsWith("https://")&&!r.startsWith("http://")){alert("Please enter a valid URL starting with https:// or http://");return}const o=e.querySelector("#iframe-name")?.value.trim(),i=e.querySelector("#iframe-title")?.value.trim(),n=e.querySelector("#iframe-longdesc")?.value.trim();e.querySelector("#iframe-desc-url")?.value.trim();const c=e.querySelector("#iframe-border")?.checked??!0,p=e.querySelector("#iframe-scrollbar")?.checked??!0;let s=a.formData.width,d=a.formData.height;a.formData.selectedSize!=="inline"&&(s="100%",d="auto"),I(t,{src:r,width:s,height:d,aspectRatio:a.formData.selectedSize,name:o||void 0,title:i||void 0,longDescription:n||void 0,showBorder:c,enableScrollbar:p}),f(t)}function I(e,t){const a=e.querySelector('[contenteditable="true"]');a&&(a.focus(),setTimeout(()=>{const r=[`src="${t.src}"`,`width="${t.width}"`,`height="${t.height}"`,"allowfullscreen",`frameborder="${t.showBorder?"1":"0"}"`,`scrolling="${t.enableScrollbar?"auto":"no"}"`];t.name&&r.push(`name="${t.name}"`),t.title&&r.push(`title="${t.title}"`),t.longDescription&&r.push(`longdesc="${t.longDescription}"`);const o=[];t.aspectRatio!=="inline"&&o.push(`rte-iframe-${t.aspectRatio}`);const i=o.length>0?`class="${o.join(" ")}"`:"",n=`data-aspect-ratio="${t.aspectRatio}"`,c=`<iframe ${r.join(" ")} ${i} ${n}></iframe>`;if(!document.execCommand("insertHTML",!1,c)){const s=window.getSelection();if(s&&s.rangeCount>0){const d=s.getRangeAt(0);d.deleteContents();const b=document.createElement("div");b.innerHTML=c;const h=document.createDocumentFragment();for(;b.firstChild;)h.appendChild(b.firstChild);d.insertNode(h)}}},10))}function f(e){const t=l(e);t.escapeHandler&&(document.removeEventListener("keydown",t.escapeHandler,!0),t.escapeHandler=null),t.dialogElement&&(t.dialogElement.remove(),t.dialogElement=null)}function z(){if(document.getElementById("embed-iframe-dialog-styles"))return;const e=document.createElement("style");e.id="embed-iframe-dialog-styles",e.textContent=`
|
|
76
76
|
/* Embed Iframe Dialog Styles */
|
|
77
77
|
.embed-iframe-dialog {
|
|
78
78
|
max-width: 600px;
|
|
@@ -358,4 +358,4 @@
|
|
|
358
358
|
width: 100%;
|
|
359
359
|
height: 100%;
|
|
360
360
|
}
|
|
361
|
-
`,document.head.appendChild(e)}exports.EmbedIframePlugin=
|
|
361
|
+
`,document.head.appendChild(e)}exports.EmbedIframePlugin=x;
|
package/dist/embed-iframe.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const
|
|
1
|
+
const g = [
|
|
2
2
|
{ label: "Inline Value", value: "inline" },
|
|
3
3
|
{ label: "Responsive - 21x9", value: "21x9" },
|
|
4
4
|
{ label: "Responsive - 16x9", value: "16x9" },
|
|
5
5
|
{ label: "Responsive - 4x3", value: "4x3" },
|
|
6
6
|
{ label: "Responsive - 1x1", value: "1x1" }
|
|
7
|
-
],
|
|
7
|
+
], m = '[data-theme="dark"], .dark, .editora-theme-dark', u = /* @__PURE__ */ new WeakMap(), l = (e) => (u.has(e) || u.set(e, {
|
|
8
8
|
dialogElement: null,
|
|
9
9
|
escapeHandler: null,
|
|
10
10
|
activeTab: "general",
|
|
@@ -21,14 +21,11 @@ const S = [
|
|
|
21
21
|
showBorder: !0,
|
|
22
22
|
enableScrollbar: !0
|
|
23
23
|
}
|
|
24
|
-
}),
|
|
25
|
-
function
|
|
26
|
-
|
|
27
|
-
return !0;
|
|
28
|
-
const t = document.activeElement;
|
|
29
|
-
return t != null && t.closest(u) ? !0 : document.body.matches(u) || document.documentElement.matches(u);
|
|
24
|
+
}), u.get(e));
|
|
25
|
+
function v(e) {
|
|
26
|
+
return e?.matches(m) || e?.closest(m) || document.activeElement?.closest(m) ? !0 : document.body.matches(m) || document.documentElement.matches(m);
|
|
30
27
|
}
|
|
31
|
-
const
|
|
28
|
+
const I = () => ({
|
|
32
29
|
name: "embedIframe",
|
|
33
30
|
toolbar: [
|
|
34
31
|
{
|
|
@@ -40,13 +37,13 @@ const T = () => ({
|
|
|
40
37
|
}
|
|
41
38
|
],
|
|
42
39
|
commands: {
|
|
43
|
-
openEmbedIframeDialog: (e) => (
|
|
40
|
+
openEmbedIframeDialog: (e) => (x(e), !0)
|
|
44
41
|
},
|
|
45
42
|
keymap: {
|
|
46
43
|
"Mod-Shift-e": "openEmbedIframeDialog"
|
|
47
44
|
}
|
|
48
45
|
});
|
|
49
|
-
function
|
|
46
|
+
function x(e) {
|
|
50
47
|
if (!e) {
|
|
51
48
|
const o = document.activeElement;
|
|
52
49
|
o && o.closest("[data-editora-editor]") && (e = o.closest("[data-editora-editor]"));
|
|
@@ -55,7 +52,7 @@ function q(e) {
|
|
|
55
52
|
console.warn("Editor element not found");
|
|
56
53
|
return;
|
|
57
54
|
}
|
|
58
|
-
const t =
|
|
55
|
+
const t = l(e);
|
|
59
56
|
t.formData = {
|
|
60
57
|
src: "",
|
|
61
58
|
selectedSize: "inline",
|
|
@@ -70,7 +67,7 @@ function q(e) {
|
|
|
70
67
|
enableScrollbar: !0
|
|
71
68
|
}, t.activeTab = "general";
|
|
72
69
|
const a = document.createElement("div");
|
|
73
|
-
a.className = "rte-dialog-overlay rte-embed-iframe-overlay",
|
|
70
|
+
a.className = "rte-dialog-overlay rte-embed-iframe-overlay", v(e) && a.classList.add("rte-theme-dark"), a.onclick = () => f(e);
|
|
74
71
|
const r = document.createElement("div");
|
|
75
72
|
r.className = "rte-dialog-content embed-iframe-dialog", r.onclick = (o) => o.stopPropagation(), r.innerHTML = `
|
|
76
73
|
<div class="rte-dialog-header">
|
|
@@ -92,7 +89,7 @@ function q(e) {
|
|
|
92
89
|
<div class="rte-form-group">
|
|
93
90
|
<label class="rte-form-label">Size</label>
|
|
94
91
|
<select class="rte-form-select" id="iframe-size">
|
|
95
|
-
${
|
|
92
|
+
${g.map((o) => `<option value="${o.value}">${o.label}</option>`).join("")}
|
|
96
93
|
</select>
|
|
97
94
|
</div>
|
|
98
95
|
<div class="rte-form-row" id="dimensions-row">
|
|
@@ -147,72 +144,67 @@ function q(e) {
|
|
|
147
144
|
<button type="submit" class="rte-btn rte-btn-primary" id="save-btn">Save</button>
|
|
148
145
|
</div>
|
|
149
146
|
`, a.appendChild(r), document.body.appendChild(a), t.dialogElement = a, t.escapeHandler = (o) => {
|
|
150
|
-
o.key === "Escape" && (o.preventDefault(), o.stopPropagation(),
|
|
151
|
-
}, document.addEventListener("keydown", t.escapeHandler, !0),
|
|
152
|
-
|
|
153
|
-
(o = r.querySelector("#iframe-src")) == null || o.focus();
|
|
147
|
+
o.key === "Escape" && (o.preventDefault(), o.stopPropagation(), f(e));
|
|
148
|
+
}, document.addEventListener("keydown", t.escapeHandler, !0), y(r, e), z(), setTimeout(() => {
|
|
149
|
+
r.querySelector("#iframe-src")?.focus();
|
|
154
150
|
}, 100);
|
|
155
151
|
}
|
|
156
|
-
function
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
c && $(e, c, t);
|
|
152
|
+
function y(e, t) {
|
|
153
|
+
l(t), e.querySelector(".rte-dialog-close")?.addEventListener("click", () => f(t)), e.querySelectorAll(".rte-tab-button").forEach((i) => {
|
|
154
|
+
i.addEventListener("click", (n) => {
|
|
155
|
+
const c = n.target.getAttribute("data-tab");
|
|
156
|
+
c && k(e, c, t);
|
|
162
157
|
});
|
|
163
|
-
});
|
|
164
|
-
const a = e.querySelector("#iframe-size");
|
|
165
|
-
a == null || a.addEventListener("change", (n) => C(e, n.target.value, t));
|
|
158
|
+
}), e.querySelector("#iframe-size")?.addEventListener("change", (i) => w(e, i.target.value, t));
|
|
166
159
|
const r = e.querySelector("#iframe-width"), o = e.querySelector("#iframe-height");
|
|
167
|
-
r
|
|
160
|
+
r?.addEventListener("input", (i) => S(e, i.target.value, t)), o?.addEventListener("input", (i) => D(e, i.target.value, t)), e.querySelector("#constrain-btn")?.addEventListener("click", () => q(e, t)), e.querySelector("#cancel-btn")?.addEventListener("click", () => f(t)), e.querySelector("#save-btn")?.addEventListener("click", () => E(e, t));
|
|
168
161
|
}
|
|
169
|
-
function
|
|
170
|
-
const r =
|
|
162
|
+
function k(e, t, a) {
|
|
163
|
+
const r = l(a);
|
|
171
164
|
r.activeTab = t, e.querySelectorAll(".rte-tab-button").forEach((o) => {
|
|
172
165
|
o.classList.toggle("active", o.getAttribute("data-tab") === t);
|
|
173
166
|
}), e.querySelectorAll(".rte-tab-panel").forEach((o) => {
|
|
174
167
|
o.style.display = o.getAttribute("data-panel") === t ? "block" : "none";
|
|
175
168
|
});
|
|
176
169
|
}
|
|
177
|
-
function
|
|
178
|
-
const r =
|
|
170
|
+
function w(e, t, a) {
|
|
171
|
+
const r = l(a);
|
|
179
172
|
r.formData.selectedSize = t;
|
|
180
|
-
const o = e.querySelector("#dimensions-row"),
|
|
181
|
-
t === "inline" ? (o.style.display = "flex",
|
|
173
|
+
const o = e.querySelector("#dimensions-row"), i = e.querySelector("#iframe-width"), n = e.querySelector("#iframe-height");
|
|
174
|
+
t === "inline" ? (o.style.display = "flex", i.value = "100%", n.value = "400px", r.formData.width = "100%", r.formData.height = "400px") : (o.style.display = "none", r.formData.width = "100%", r.formData.height = "auto");
|
|
182
175
|
}
|
|
183
|
-
function
|
|
184
|
-
const r =
|
|
176
|
+
function S(e, t, a) {
|
|
177
|
+
const r = l(a);
|
|
185
178
|
if (r.formData.width = t, r.formData.constrainProportions && r.formData.selectedSize === "inline") {
|
|
186
179
|
const o = parseFloat(t);
|
|
187
180
|
if (!isNaN(o)) {
|
|
188
|
-
const
|
|
189
|
-
r.formData.height = `${
|
|
190
|
-
const
|
|
191
|
-
|
|
181
|
+
const i = o * 9 / 16;
|
|
182
|
+
r.formData.height = `${i}px`;
|
|
183
|
+
const n = e.querySelector("#iframe-height");
|
|
184
|
+
n && (n.value = r.formData.height);
|
|
192
185
|
}
|
|
193
186
|
}
|
|
194
187
|
}
|
|
195
|
-
function
|
|
196
|
-
const r =
|
|
188
|
+
function D(e, t, a) {
|
|
189
|
+
const r = l(a);
|
|
197
190
|
if (r.formData.height = t, r.formData.constrainProportions && r.formData.selectedSize === "inline") {
|
|
198
191
|
const o = parseFloat(t);
|
|
199
192
|
if (!isNaN(o)) {
|
|
200
|
-
const
|
|
201
|
-
r.formData.width = `${
|
|
202
|
-
const
|
|
203
|
-
|
|
193
|
+
const i = o * 16 / 9;
|
|
194
|
+
r.formData.width = `${i}px`;
|
|
195
|
+
const n = e.querySelector("#iframe-width");
|
|
196
|
+
n && (n.value = r.formData.width);
|
|
204
197
|
}
|
|
205
198
|
}
|
|
206
199
|
}
|
|
207
|
-
function
|
|
208
|
-
const a =
|
|
200
|
+
function q(e, t) {
|
|
201
|
+
const a = l(t);
|
|
209
202
|
a.formData.constrainProportions = !a.formData.constrainProportions;
|
|
210
203
|
const r = e.querySelector("#constrain-btn");
|
|
211
204
|
r && (r.textContent = a.formData.constrainProportions ? "🔒" : "🔓", r.className = `rte-constrain-btn ${a.formData.constrainProportions ? "locked" : "unlocked"}`, r.title = a.formData.constrainProportions ? "Unlock proportions" : "Lock proportions");
|
|
212
205
|
}
|
|
213
|
-
function
|
|
214
|
-
|
|
215
|
-
const a = s(t), r = (b = e.querySelector("#iframe-src")) == null ? void 0 : b.value.trim();
|
|
206
|
+
function E(e, t) {
|
|
207
|
+
const a = l(t), r = e.querySelector("#iframe-src")?.value.trim();
|
|
216
208
|
if (!r) {
|
|
217
209
|
alert("Please enter a source URL");
|
|
218
210
|
return;
|
|
@@ -221,22 +213,23 @@ function I(e, t) {
|
|
|
221
213
|
alert("Please enter a valid URL starting with https:// or http://");
|
|
222
214
|
return;
|
|
223
215
|
}
|
|
224
|
-
const o =
|
|
225
|
-
|
|
226
|
-
|
|
216
|
+
const o = e.querySelector("#iframe-name")?.value.trim(), i = e.querySelector("#iframe-title")?.value.trim(), n = e.querySelector("#iframe-longdesc")?.value.trim();
|
|
217
|
+
e.querySelector("#iframe-desc-url")?.value.trim();
|
|
218
|
+
const c = e.querySelector("#iframe-border")?.checked ?? !0, p = e.querySelector("#iframe-scrollbar")?.checked ?? !0;
|
|
219
|
+
let s = a.formData.width, d = a.formData.height;
|
|
220
|
+
a.formData.selectedSize !== "inline" && (s = "100%", d = "auto"), L(t, {
|
|
227
221
|
src: r,
|
|
228
|
-
width:
|
|
229
|
-
height:
|
|
222
|
+
width: s,
|
|
223
|
+
height: d,
|
|
230
224
|
aspectRatio: a.formData.selectedSize,
|
|
231
225
|
name: o || void 0,
|
|
232
|
-
title:
|
|
233
|
-
longDescription:
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
}), p(t);
|
|
226
|
+
title: i || void 0,
|
|
227
|
+
longDescription: n || void 0,
|
|
228
|
+
showBorder: c,
|
|
229
|
+
enableScrollbar: p
|
|
230
|
+
}), f(t);
|
|
238
231
|
}
|
|
239
|
-
function
|
|
232
|
+
function L(e, t) {
|
|
240
233
|
const a = e.querySelector('[contenteditable="true"]');
|
|
241
234
|
a && (a.focus(), setTimeout(() => {
|
|
242
235
|
const r = [
|
|
@@ -250,29 +243,28 @@ function P(e, t) {
|
|
|
250
243
|
t.name && r.push(`name="${t.name}"`), t.title && r.push(`title="${t.title}"`), t.longDescription && r.push(`longdesc="${t.longDescription}"`);
|
|
251
244
|
const o = [];
|
|
252
245
|
t.aspectRatio !== "inline" && o.push(`rte-iframe-${t.aspectRatio}`);
|
|
253
|
-
const
|
|
254
|
-
if (!document.execCommand("insertHTML", !1,
|
|
255
|
-
const
|
|
256
|
-
if (
|
|
257
|
-
const
|
|
258
|
-
|
|
259
|
-
const
|
|
260
|
-
|
|
261
|
-
const
|
|
262
|
-
for (;
|
|
263
|
-
|
|
264
|
-
|
|
246
|
+
const i = o.length > 0 ? `class="${o.join(" ")}"` : "", n = `data-aspect-ratio="${t.aspectRatio}"`, c = `<iframe ${r.join(" ")} ${i} ${n}></iframe>`;
|
|
247
|
+
if (!document.execCommand("insertHTML", !1, c)) {
|
|
248
|
+
const s = window.getSelection();
|
|
249
|
+
if (s && s.rangeCount > 0) {
|
|
250
|
+
const d = s.getRangeAt(0);
|
|
251
|
+
d.deleteContents();
|
|
252
|
+
const b = document.createElement("div");
|
|
253
|
+
b.innerHTML = c;
|
|
254
|
+
const h = document.createDocumentFragment();
|
|
255
|
+
for (; b.firstChild; )
|
|
256
|
+
h.appendChild(b.firstChild);
|
|
257
|
+
d.insertNode(h);
|
|
265
258
|
}
|
|
266
259
|
}
|
|
267
260
|
}, 10));
|
|
268
261
|
}
|
|
269
|
-
function
|
|
270
|
-
const t =
|
|
262
|
+
function f(e) {
|
|
263
|
+
const t = l(e);
|
|
271
264
|
t.escapeHandler && (document.removeEventListener("keydown", t.escapeHandler, !0), t.escapeHandler = null), t.dialogElement && (t.dialogElement.remove(), t.dialogElement = null);
|
|
272
265
|
}
|
|
273
|
-
function
|
|
274
|
-
if (document.getElementById("embed-iframe-dialog-styles"))
|
|
275
|
-
return;
|
|
266
|
+
function z() {
|
|
267
|
+
if (document.getElementById("embed-iframe-dialog-styles")) return;
|
|
276
268
|
const e = document.createElement("style");
|
|
277
269
|
e.id = "embed-iframe-dialog-styles", e.textContent = `
|
|
278
270
|
/* Embed Iframe Dialog Styles */
|
|
@@ -563,5 +555,5 @@ function R() {
|
|
|
563
555
|
`, document.head.appendChild(e);
|
|
564
556
|
}
|
|
565
557
|
export {
|
|
566
|
-
|
|
558
|
+
I as EmbedIframePlugin
|
|
567
559
|
};
|
package/dist/emojis.cjs.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p={all:{name:"All",emojis:["❤️","💔","💙","💚","💛","🖤","🤍","🤎","✔️","❌","☑️","❗","❓","⚠️","💯","➕","➖","✖️","➗","♻️","⚡","🔥","✨","⭐","⭕","🚫","😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😍","😘","😎","🤓","😐","😑","😬","🙄","😏","😌","🤩","🥳","🤔","😴","😭","😢","😡","🤯","👍","👎","👌","✌️","🤞","🙏","👏","🙌","💪","🐶","🐱","🐭","🐹","🐰","🦊","🐻","🐼","🐨","🐯","🦁","🐮","🐷","🐸","🐵","🐔","🐧","🐦","🦆","🦅","🦄","🐝","🦋","🌲","🌳","🌴","🌵","🌸","🌼","🌻","☀️","🌙","⭐","🌈","🌧️","❄️","🌊","🍎","🍌","🍉","🍇","🍓","🍒","🍍","🥭","🍐","🍊","🍋","🍑","🥝","🥑","🍔","🍟","🍕","🌭","🥪","🌮","🌯","🍣","🍜","🍰","🧁","🍩","🍪","🍫","☕","🍵","🥤","🍺","🍷","🍸","🍹","🥂","⚽","🏀","🏈","⚾","🎾","🏐","🏉","🎮","🎯","🎳","🎲","♟️","🏃","🚴","🏊","🏋️","🧘","🎸","🎹","🥁","🎺","🎤","🏆","🥇","🚗","🚕","🚌","🚎","🚓","🚑","🚒","✈️","🚀","🚁","🚤","🛳️","🚢","🏠","🏢","🏬","🏫","🏥","🏰","🗼","🗽","⛩️","🕌","🌍","🌎","🌏","🏖️","🏝️","📱","💻","🖥️","⌨️","🖱️","📷","📸","🎥","📹","📚","📖","📝","📄","📂","🔒","🔑","🗝️","💡","🔦","🕯️","🧰","🛠️","🔧","⚙️","📦","💳","💰","🔋","🔌","🇮🇳","🇺🇸","🇬🇧","🇨🇦","🇦🇺","🇩🇪","🇫🇷","🇪🇸","🇮🇹","🇯🇵","🇰🇷","🇨🇳","🇧🇷","🇲🇽","🇷🇺","🇿🇦","🇳🇿"]},symbols:{name:"Symbols",emojis:["❤️","💔","💙","💚","💛","🖤","🤍","🤎","✔️","❌","☑️","❗","❓","⚠️","💯","➕","➖","✖️","➗","♻️","⚡","🔥","✨","⭐","⭕","🚫","⬆️","⬇️","⬅️","➡️","🔄","🔁","🔀","🔔","🔕","⏰","⌛","⏳"]},people:{name:"People",emojis:["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😍","😘","😎","🤓","😐","😑","😬","🙄","😏","😌","🤩","🥳","🤔","😴","😭","😢","😡","🤯","👍","👎","👌","✌️","🤞","🙏","👏","🙌","💪"]},"animals-nature":{name:"Animals & Nature",emojis:["🐶","🐱","🐭","🐹","🐰","🦊","🐻","🐼","🐨","🐯","🦁","🐮","🐷","🐸","🐵","🐔","🐧","🐦","🦆","🦅","🦄","🐝","🦋","🌲","🌳","🌴","🌵","🌸","🌼","🌻","☀️","🌙","⭐","🌈","🌧️","❄️","🌊"]},"food-drink":{name:"Food & Drink",emojis:["🍎","🍌","🍉","🍇","🍓","🍒","🍍","🥭","🍐","🍊","🍋","🍑","🥝","🥑","🍔","🍟","🍕","🌭","🥪","🌮","🌯","🍣","🍜","🍰","🧁","🍩","🍪","🍫","☕","🍵","🥤","🍺","🍷","🍸","🍹","🥂"]},activity:{name:"Activity",emojis:["⚽","🏀","🏈","⚾","🎾","🏐","🏉","🎮","🎯","🎳","🎲","♟️","🏃","🚴","🏊","🏋️","🧘","🎸","🎹","🥁","🎺","🎤","🏆","🥇","🥈","🥉"]},"travel-places":{name:"Travel & Places",emojis:["🚗","🚕","🚌","🚎","🚓","🚑","🚒","✈️","🚀","🚁","🚤","🛳️","🚢","🏠","🏢","🏬","🏫","🏥","🏰","🗼","🗽","⛩️","🕌","🌍","🌎","🌏","🏖️","🏝️"]},objects:{name:"Objects",emojis:["📱","💻","🖥️","⌨️","🖱️","📷","📸","🎥","📹","📚","📖","📝","📄","📂","🔒","🔑","🗝️","💡","🔦","🕯️","🧰","🛠️","🔧","⚙️","📦","💳","💰","🔋","🔌"]},flags:{name:"Flags",emojis:["🇮🇳","🇺🇸","🇬🇧","🇨🇦","🇦🇺","🇩🇪","🇫🇷","🇪🇸","🇮🇹","🇯🇵","🇰🇷","🇨🇳","🇧🇷","🇲🇽","🇷🇺","🇿🇦","🇳🇿"]}},
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p={all:{name:"All",emojis:["❤️","💔","💙","💚","💛","🖤","🤍","🤎","✔️","❌","☑️","❗","❓","⚠️","💯","➕","➖","✖️","➗","♻️","⚡","🔥","✨","⭐","⭕","🚫","😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😍","😘","😎","🤓","😐","😑","😬","🙄","😏","😌","🤩","🥳","🤔","😴","😭","😢","😡","🤯","👍","👎","👌","✌️","🤞","🙏","👏","🙌","💪","🐶","🐱","🐭","🐹","🐰","🦊","🐻","🐼","🐨","🐯","🦁","🐮","🐷","🐸","🐵","🐔","🐧","🐦","🦆","🦅","🦄","🐝","🦋","🌲","🌳","🌴","🌵","🌸","🌼","🌻","☀️","🌙","⭐","🌈","🌧️","❄️","🌊","🍎","🍌","🍉","🍇","🍓","🍒","🍍","🥭","🍐","🍊","🍋","🍑","🥝","🥑","🍔","🍟","🍕","🌭","🥪","🌮","🌯","🍣","🍜","🍰","🧁","🍩","🍪","🍫","☕","🍵","🥤","🍺","🍷","🍸","🍹","🥂","⚽","🏀","🏈","⚾","🎾","🏐","🏉","🎮","🎯","🎳","🎲","♟️","🏃","🚴","🏊","🏋️","🧘","🎸","🎹","🥁","🎺","🎤","🏆","🥇","🚗","🚕","🚌","🚎","🚓","🚑","🚒","✈️","🚀","🚁","🚤","🛳️","🚢","🏠","🏢","🏬","🏫","🏥","🏰","🗼","🗽","⛩️","🕌","🌍","🌎","🌏","🏖️","🏝️","📱","💻","🖥️","⌨️","🖱️","📷","📸","🎥","📹","📚","📖","📝","📄","📂","🔒","🔑","🗝️","💡","🔦","🕯️","🧰","🛠️","🔧","⚙️","📦","💳","💰","🔋","🔌","🇮🇳","🇺🇸","🇬🇧","🇨🇦","🇦🇺","🇩🇪","🇫🇷","🇪🇸","🇮🇹","🇯🇵","🇰🇷","🇨🇳","🇧🇷","🇲🇽","🇷🇺","🇿🇦","🇳🇿"]},symbols:{name:"Symbols",emojis:["❤️","💔","💙","💚","💛","🖤","🤍","🤎","✔️","❌","☑️","❗","❓","⚠️","💯","➕","➖","✖️","➗","♻️","⚡","🔥","✨","⭐","⭕","🚫","⬆️","⬇️","⬅️","➡️","🔄","🔁","🔀","🔔","🔕","⏰","⌛","⏳"]},people:{name:"People",emojis:["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😍","😘","😎","🤓","😐","😑","😬","🙄","😏","😌","🤩","🥳","🤔","😴","😭","😢","😡","🤯","👍","👎","👌","✌️","🤞","🙏","👏","🙌","💪"]},"animals-nature":{name:"Animals & Nature",emojis:["🐶","🐱","🐭","🐹","🐰","🦊","🐻","🐼","🐨","🐯","🦁","🐮","🐷","🐸","🐵","🐔","🐧","🐦","🦆","🦅","🦄","🐝","🦋","🌲","🌳","🌴","🌵","🌸","🌼","🌻","☀️","🌙","⭐","🌈","🌧️","❄️","🌊"]},"food-drink":{name:"Food & Drink",emojis:["🍎","🍌","🍉","🍇","🍓","🍒","🍍","🥭","🍐","🍊","🍋","🍑","🥝","🥑","🍔","🍟","🍕","🌭","🥪","🌮","🌯","🍣","🍜","🍰","🧁","🍩","🍪","🍫","☕","🍵","🥤","🍺","🍷","🍸","🍹","🥂"]},activity:{name:"Activity",emojis:["⚽","🏀","🏈","⚾","🎾","🏐","🏉","🎮","🎯","🎳","🎲","♟️","🏃","🚴","🏊","🏋️","🧘","🎸","🎹","🥁","🎺","🎤","🏆","🥇","🥈","🥉"]},"travel-places":{name:"Travel & Places",emojis:["🚗","🚕","🚌","🚎","🚓","🚑","🚒","✈️","🚀","🚁","🚤","🛳️","🚢","🏠","🏢","🏬","🏫","🏥","🏰","🗼","🗽","⛩️","🕌","🌍","🌎","🌏","🏖️","🏝️"]},objects:{name:"Objects",emojis:["📱","💻","🖥️","⌨️","🖱️","📷","📸","🎥","📹","📚","📖","📝","📄","📂","🔒","🔑","🗝️","💡","🔦","🕯️","🧰","🛠️","🔧","⚙️","📦","💳","💰","🔋","🔌"]},flags:{name:"Flags",emojis:["🇮🇳","🇺🇸","🇬🇧","🇨🇦","🇦🇺","🇩🇪","🇫🇷","🇪🇸","🇮🇹","🇯🇵","🇰🇷","🇨🇳","🇧🇷","🇲🇽","🇷🇺","🇿🇦","🇳🇿"]}},x={"💙":"blue heart","💚":"green heart","💛":"yellow heart","🖤":"black heart","🤍":"white heart","🤎":"brown heart","☑️":"check box with check","🔴":"red circle","🟢":"green circle","🟡":"yellow circle","🔵":"blue circle","⬆️":"up arrow","⬇️":"down arrow","⬅️":"left arrow","➡️":"right arrow","🔄":"counterclockwise arrows","🔁":"repeat button","🔀":"shuffle tracks","🔔":"bell","🔕":"muted bell","⏰":"alarm clock","⏳":"hourglass not done","⌛":"hourglass done","♠️":"spade suit","♥️":"heart suit","♦️":"diamond suit","♣️":"club suit","🚫":"prohibited","⭕":"hollow red circle","❎":"cross mark button","😐":"neutral face","😑":"expressionless face","😬":"grimacing face","🙄":"face with rolling eyes","😏":"smirking face","😌":"relieved face","🤩":"star struck","😜":"winking face with tongue","😝":"squinting face with tongue","🤪":"zany face","😢":"crying face","😥":"sad but relieved face","😓":"downcast face with sweat","😱":"face screaming in fear","😨":"fearful face","🤗":"hugging face","🤭":"face with hand over mouth","🤫":"shushing face","🤥":"lying face","👌":"ok hand","✌️":"victory hand","🤞":"crossed fingers","🙌":"raising hands","💪":"flexed biceps","🐔":"chicken","🐧":"penguin","🐦":"bird","🐤":"baby chick","🦆":"duck","🦅":"eagle","🐺":"wolf","🦄":"unicorn","🐝":"honeybee","🐞":"lady beetle","🦋":"butterfly","🐢":"turtle","🐍":"snake","🦖":"t-rex","🌿":"herb","🍀":"four leaf clover","🍁":"maple leaf","🍂":"fallen leaf","🌊":"water wave","❄️":"snowflake","☁️":"cloud","⛈️":"cloud with lightning and rain","🌪️":"tornado","🍐":"pear","🍊":"tangerine","🍋":"lemon","🍑":"peach","🥝":"kiwi fruit","🥑":"avocado","🍆":"eggplant","🌽":"ear of corn","🥕":"carrot","🥔":"potato","🍞":"bread","🥐":"croissant","🥖":"baguette bread","🧀":"cheese wedge","🍖":"meat on bone","🍗":"poultry leg","🥩":"cut of meat","🍦":"soft ice cream","🍨":"ice cream","🍫":"chocolate bar","🍬":"candy","🥛":"glass of milk","🧃":"beverage box","🍹":"tropical drink","🥂":"clinking glasses","🏓":"ping pong","🥊":"boxing glove","🥋":"martial arts uniform","⛳":"flag in hole","🏹":"bow and arrow","🎿":"skis","⛷️":"skier","🏂":"snowboarder","🎤":"microphone","🎬":"clapper board","🎨":"artist palette","🧩":"puzzle piece","🪀":"yo-yo","🚇":"metro","🚉":"station","🚊":"tram","🚝":"monorail","🛻":"pickup truck","🚐":"minibus","🗺️":"world map","🧭":"compass","⛰️":"mountain","🏔️":"snow capped mountain","🌋":"volcano","🏜️":"desert","🏕️":"camping","🏙️":"cityscape","🌆":"city at dusk","🌃":"night with stars","📦":"package","📫":"closed mailbox with raised flag","📬":"open mailbox with raised flag","📭":"open mailbox with lowered flag","🧾":"receipt","💳":"credit card","💰":"money bag","🪙":"coin","🔋":"battery","🔌":"electric plug","🧯":"fire extinguisher","🪜":"ladder","🪞":"mirror","🧹":"broom","🧸":"teddy bear"};let g=null,s="all",u="",n=null,l=null,d=null;const k='[data-theme="dark"], .dark, .editora-theme-dark',w=()=>({name:"emojis",toolbar:[{label:"Insert Emoji",command:"openEmojiDialog",icon:'<svg width="24" height="24" focusable="false"><path d="M9 11c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1Zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1Zm-3 5.5c2.1 0 4-1.5 4.4-3.5H7.6c.5 2 2.3 3.5 4.4 3.5ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 14.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13Z" fill-rule="nonzero"></path></svg>',shortcut:"Mod-Shift-j",type:"button"}],commands:{openEmojiDialog:(t,r)=>{const e=r?.contentElement||b();return e?(y(e),!0):!1},insertEmoji:(t,r)=>{if(!t)return!1;const e=r?.contentElement||b();if(!e)return!1;try{return v(t,e),!0}catch{return!1}}},keymap:{"Mod-Shift-j":"openEmojiDialog"}});function y(t){m(),s="all",u="";const r=window.getSelection();l=null,r&&r.rangeCount>0&&t.contains(r.anchorNode)&&(l=r.getRangeAt(0).cloneRange());const e=document.createElement("div");e.className="emojis-overlay",S(t)&&e.classList.add("rte-ui-theme-dark"),e.onclick=m;const o=document.createElement("div");o.className="emojis-dialog",o.setAttribute("role","dialog"),o.setAttribute("aria-modal","true"),o.onclick=a=>a.stopPropagation();const i=Object.keys(p);o.innerHTML=`
|
|
2
2
|
<div class="rte-dialog-header emojis-header">
|
|
3
3
|
<h3>Insert Emojis</h3>
|
|
4
4
|
<button class="rte-dialog-close emojis-close">×</button>
|
|
5
5
|
</div>
|
|
6
6
|
<div class="rte-dialog-body emojis-content">
|
|
7
7
|
<div class="emojis-tabs">
|
|
8
|
-
${
|
|
9
|
-
<button class="emojis-tab ${
|
|
10
|
-
${p[
|
|
8
|
+
${i.map(a=>`
|
|
9
|
+
<button class="emojis-tab ${a===s?"active":""}" data-category="${a}">
|
|
10
|
+
${p[a].name}
|
|
11
11
|
</button>
|
|
12
12
|
`).join("")}
|
|
13
13
|
</div>
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
/>
|
|
26
26
|
</div>
|
|
27
27
|
<div class="emojis-grid" id="emojis-grid">
|
|
28
|
-
${
|
|
28
|
+
${j(s,u)}
|
|
29
29
|
</div>
|
|
30
30
|
</div>
|
|
31
31
|
</div>
|
|
32
|
-
`,e.appendChild(o),document.body.appendChild(e),g=e,d=
|
|
32
|
+
`,e.appendChild(o),document.body.appendChild(e),g=e,d=a=>{a.key==="Escape"&&(a.preventDefault(),a.stopPropagation(),m())},document.addEventListener("keydown",d,!0),E(o,t),A(),requestAnimationFrame(()=>{o.querySelector("#emoji-search-input")?.focus()})}function E(t,r){t.querySelector(".emojis-close")?.addEventListener("click",m),t.querySelectorAll(".emojis-tab").forEach(i=>{i.addEventListener("click",a=>{const c=a.target.getAttribute("data-category");c&&z(t,c)})}),t.querySelector("#emoji-search-input")?.addEventListener("input",i=>{u=i.target.value,n!==null&&window.clearTimeout(n),n=window.setTimeout(()=>{n=null,h(t)},90)}),t.querySelector("#emojis-grid")?.addEventListener("click",i=>{const c=i.target.closest(".emojis-item");if(!c)return;const f=c.getAttribute("data-emoji")||c.textContent?.trim()||"";f&&(v(f,r),m())})}function z(t,r){s=r,t.querySelectorAll(".emojis-tab").forEach(e=>{e.classList.toggle("active",e.getAttribute("data-category")===r)}),h(t)}function h(t){const r=t.querySelector("#emojis-grid");r&&(r.innerHTML=j(s,u))}function j(t,r){let e=p[t].emojis;return r.trim()&&(e=e.filter(o=>o.toLowerCase().includes(r.toLowerCase())?!0:(x[o]||"").toLowerCase().includes(r.toLowerCase()))),e.length===0&&r.trim()?`<div class="emojis-no-results">No emojis found for "${r}"</div>`:e.map((o,i)=>`
|
|
33
33
|
<button
|
|
34
34
|
class="emojis-item"
|
|
35
35
|
title="Insert ${o}"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
>
|
|
38
38
|
${o}
|
|
39
39
|
</button>
|
|
40
|
-
`).join("")}function m(){d&&(document.removeEventListener("keydown",d,!0),d=null),n!==null&&(window.clearTimeout(n),n=null),g&&(g.remove(),g=null)}function
|
|
40
|
+
`).join("")}function m(){d&&(document.removeEventListener("keydown",d,!0),d=null),n!==null&&(window.clearTimeout(n),n=null),g&&(g.remove(),g=null)}function v(t,r){r.focus();let e=window.getSelection();if(l&&(e?.removeAllRanges(),e?.addRange(l),l=null),e=window.getSelection(),e&&e.rangeCount>0){const o=e.getRangeAt(0);o.deleteContents();const i=document.createTextNode(t);o.insertNode(i),o.setStartAfter(i),o.setEndAfter(i),e.removeAllRanges(),e.addRange(o)}}function b(){const t=window.getSelection();if(t&&t.rangeCount>0){const e=t.anchorNode,i=(e instanceof HTMLElement?e:e?.parentElement)?.closest(".editora-content, .rte-content");if(i)return i}const r=document.activeElement;return r&&(r.classList.contains("editora-content")||r.classList.contains("rte-content"))?r:document.querySelector(".editora-content, .rte-content")}function S(t){const r=t||b();return r?!!r.closest(k):!1}function A(){if(document.getElementById("emojis-dialog-styles"))return;const t=document.createElement("style");t.id="emojis-dialog-styles",t.textContent=`
|
|
41
41
|
.emojis-overlay {
|
|
42
42
|
--rte-emoji-overlay-bg: rgba(15, 23, 36, 0.56);
|
|
43
43
|
--rte-emoji-dialog-bg: #ffffff;
|
|
@@ -306,4 +306,4 @@
|
|
|
306
306
|
font-size: 16px;
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
`,document.head.appendChild(
|
|
309
|
+
`,document.head.appendChild(t)}exports.EmojisPlugin=w;
|