@editora/plugins 1.0.22 → 1.1.0
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/{CodePlugin.native-CKJo7IFG.js → CodePlugin.native-BwhZsI5v.js} +11 -11
- package/dist/{CodePlugin.native-D8gGxB8i.mjs → CodePlugin.native-CojLCp6C.mjs} +61 -53
- package/dist/MediaManagerPlugin.native-CycfjOi4.js +1841 -0
- package/dist/MediaManagerPlugin.native-DZrmcmnm.mjs +4688 -0
- package/dist/a11y-checker.cjs.js +3 -3
- package/dist/a11y-checker.esm.js +6 -4
- package/dist/anchor.cjs.js +4 -4
- package/dist/anchor.esm.js +19 -18
- package/dist/anchoredPopover-BNJ8e7j-.mjs +128 -0
- package/dist/anchoredPopover-Cygmit_o.js +1 -0
- package/dist/approval-workflow.cjs.js +7 -7
- package/dist/approval-workflow.esm.js +55 -54
- package/dist/background-color.cjs.js +2 -2
- package/dist/background-color.esm.js +72 -67
- package/dist/blocks-library.cjs.js +18 -19
- package/dist/blocks-library.esm.js +41 -42
- package/dist/citations.cjs.js +4 -4
- package/dist/citations.esm.js +50 -50
- package/dist/code-sample.cjs.js +10 -10
- package/dist/code-sample.esm.js +4 -4
- package/dist/code.cjs.js +1 -1
- package/dist/code.esm.js +1 -1
- package/dist/comments.cjs.js +23 -11
- package/dist/comments.esm.js +167 -149
- package/dist/conditional-content.cjs.js +2 -2
- package/dist/conditional-content.esm.js +2 -2
- package/dist/confirmDialog-D3S8BhIM.js +42 -0
- package/dist/confirmDialog-DR4c8j6S.mjs +87 -0
- package/dist/content-rules.cjs.js +6 -6
- package/dist/content-rules.esm.js +51 -51
- package/dist/data-binding.cjs.js +2 -2
- package/dist/data-binding.esm.js +2 -2
- package/dist/dialogHelpers-BbwpIXD9.mjs +183 -0
- package/dist/dialogHelpers-BxSQ7A6M.js +12 -0
- package/dist/document-manager.cjs.js +1 -1
- package/dist/document-manager.esm.js +1 -1
- package/dist/{documentManager-BL98a7YZ.mjs → documentManager-BFjGIeI8.mjs} +793 -781
- package/dist/{documentManager-r8t7yZEd.js → documentManager-C9d17K5W.js} +10 -10
- package/dist/embed-iframe.cjs.js +6 -6
- package/dist/embed-iframe.esm.js +6 -6
- package/dist/emojis.cjs.js +5 -5
- package/dist/emojis.esm.js +3 -3
- package/dist/enterprise.cjs.js +1 -1
- package/dist/enterprise.esm.js +12 -12
- package/dist/format-painter.cjs.js +1 -1
- package/dist/format-painter.esm.js +172 -151
- package/dist/heading.cjs.js +1 -1
- package/dist/heading.esm.js +96 -83
- package/dist/history.cjs.js +1 -1
- package/dist/history.esm.js +176 -97
- package/dist/{index-D5xugkYA.js → index-CtR8olYy.js} +2 -2
- package/dist/{index-B-VitI3v.mjs → index-Du_Ljqfz.mjs} +36 -35
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +90 -83
- package/dist/katex-Cc3-mvOY.js +257 -0
- package/dist/katex-DoRnZ_sp.mjs +11682 -0
- package/dist/katex.min--Ws3c9be.mjs +5 -0
- package/dist/katex.min-Dk2VscxB.js +2 -0
- package/dist/link.cjs.js +3 -3
- package/dist/link.esm.js +3 -3
- package/dist/list.cjs.js +1 -1
- package/dist/list.esm.js +140 -52
- package/dist/math.cjs.js +14 -14
- package/dist/math.esm.js +149 -136
- package/dist/media-manager.cjs.js +1 -619
- package/dist/media-manager.esm.js +30 -1017
- package/dist/mentions.cjs.js +12 -12
- package/dist/mentions.esm.js +149 -143
- package/dist/merge-tag.cjs.js +5 -3
- package/dist/merge-tag.esm.js +5 -3
- package/dist/notify-BkbzMopb.js +32 -0
- package/dist/notify-zOp-mUOJ.mjs +59 -0
- package/dist/pii-redaction.cjs.js +1 -1
- package/dist/pii-redaction.esm.js +1 -1
- package/dist/preview.cjs.js +1 -1
- package/dist/preview.esm.js +1 -1
- package/dist/shared-config.cjs.js +1 -1
- package/dist/shared-config.esm.js +14 -14
- package/dist/slash-commands.cjs.js +5 -5
- package/dist/slash-commands.esm.js +259 -236
- package/dist/smart-paste.cjs.js +1 -1
- package/dist/smart-paste.esm.js +1 -1
- package/dist/special-characters.cjs.js +3 -3
- package/dist/special-characters.esm.js +3 -3
- package/dist/spell-check.cjs.js +9 -9
- package/dist/spell-check.esm.js +288 -251
- package/dist/table.cjs.js +14 -14
- package/dist/table.esm.js +175 -154
- package/dist/template.cjs.js +5 -3
- package/dist/template.esm.js +15 -13
- package/dist/text-color.cjs.js +4 -4
- package/dist/text-color.esm.js +38 -34
- package/dist/translation-workflow.cjs.js +9 -9
- package/dist/translation-workflow.esm.js +98 -95
- package/dist/version-diff.cjs.js +4 -4
- package/dist/version-diff.esm.js +36 -36
- package/index.d.ts +183 -2
- package/package.json +6 -5
- package/dist/anchoredPopover-Bg-ey7Yo.js +0 -1
- package/dist/anchoredPopover-D_JbjvdA.mjs +0 -111
- package/dist/dialogHelpers-5d5BuOCW.mjs +0 -39
- package/dist/dialogHelpers-zU6zpMIA.js +0 -12
package/dist/comments.cjs.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const N=require("./historyHelpers-Cu8Pk7m1.js"),y=new WeakMap;let x=null,
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const T=require("./dialogHelpers-BxSQ7A6M.js"),N=require("./historyHelpers-Cu8Pk7m1.js"),y=new WeakMap;let x=null,H=!1,q=0;const R="User";function S(e){return q+=1,`${e}-${Date.now()}-${q}`}function g(e){if(!e)return null;const t=e instanceof Element?e:e.parentElement;return t?t.closest("[data-editora-editor]")||t.closest(".rte-editor")||t.closest(".editora-editor"):null}function B(e){const t=e?.editorElement||e?.contentElement||null;if(!(t instanceof HTMLElement))return;const r=t.closest("[data-editora-editor], .rte-editor, .editora-editor, editora-editor")||(t.matches("[data-editora-editor], .rte-editor, .editora-editor, editora-editor")?t:null);r&&(x=r)}function k(e,t){return t.contains(e.commonAncestorContainer)}function D(){if(typeof window<"u"){const o=window.__editoraCommandEditorRoot;if(o instanceof HTMLElement){const a=o.closest("[data-editora-editor], .rte-editor, .editora-editor, editora-editor")||(o.matches("[data-editora-editor], .rte-editor, .editora-editor, editora-editor")?o:null);if(a)return x=a,window.__editoraCommandEditorRoot=null,a}}const e=document.activeElement,t=e?g(e):null;if(t)return t;const r=window.getSelection();if(r&&r.rangeCount>0){const o=g(r.getRangeAt(0).commonAncestorContainer);if(o)return o}return x}function $(e){const t=y.get(e);if(t)return t;const r={root:e,comments:new Map,panelVisible:!1,panelElement:null,expandedComments:new Set,replyTexts:{},savedSelection:null,newCommentText:"",selectionChangeListener:null};return y.set(e,r),r}function u(){const e=D();return e?(x=e,$(e)):null}function V(e){const t=window.getSelection();if(!t||t.rangeCount===0||t.isCollapsed)return null;const r=t.getRangeAt(0);return k(r,e)?r.cloneRange():null}function P(e){return e.root.querySelector(".rte-content")||e.root.querySelector("[contenteditable]")}function C(e,t){return t.anchorId?e.root.querySelector(`[id="${t.anchorId}"]`):null}function O(e){const t=[];return e.comments.forEach(r=>{if(r.anchorId){const o=C(e,r);if(!o)return;r.resolved=o.classList.contains("rte-comment-anchor-resolved")}t.push(r)}),t}function A(e,t){const r=P(e),o=r?r.innerHTML:"",a=t();return r&&r.innerHTML!==o&&(N.recordDomHistory(r,o),r.dispatchEvent(new Event("input",{bubbles:!0}))),a}function I(e,t){const r=C(e,t);r&&r.classList.toggle("rte-comment-anchor-resolved",t.resolved)}function E(e,t,r){const o=e.comments.get(t);if(!o)return;const a=C(e,o);a&&a.classList.toggle("highlighted",r)}function _(e){const t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);e.remove()}}function w(e,t){if(e.panelVisible=t,t){ee(),j(e),e.root.setAttribute("data-rte-comments-open","true"),e.panelElement&&(e.panelElement.classList.add("is-open"),e.panelElement.setAttribute("aria-hidden","false")),F(e),T.focusPanel(e.panelElement);return}if(e.root.removeAttribute("data-rte-comments-open"),Z(e),e.panelElement){const r=T.panelHasFocus(e.panelElement);e.panelElement.remove(),e.panelElement=null,r&&e.root.querySelector('[contenteditable="true"]')?.focus({preventScroll:!0})}}function j(e){if(e.panelElement)return;const t=document.createElement("aside");t.className="rte-comments-panel",t.setAttribute("role","complementary"),t.setAttribute("aria-label","Comments"),t.setAttribute("aria-hidden","true"),window.getComputedStyle(e.root).position==="static"&&(e.root.style.position="relative"),e.root.appendChild(t),e.panelElement=t}function F(e){e.selectionChangeListener||(e.selectionChangeListener=()=>{const t=window.getSelection();if(!t||t.rangeCount===0||t.isCollapsed)return;const r=t.getRangeAt(0);k(r,e.root)&&(e.savedSelection=r.cloneRange(),x=e.root)},document.addEventListener("selectionchange",e.selectionChangeListener))}function Z(e){e.selectionChangeListener&&(document.removeEventListener("selectionchange",e.selectionChangeListener),e.selectionChangeListener=null)}function K(e){return O(e).sort((t,r)=>r.createdAt.localeCompare(t.createdAt))}function M(e){return new Date(e).toLocaleString()}function U(e,t){const r=e.expandedComments.has(t.id),o=document.createElement("article");o.className=`rte-comment-item${t.resolved?" resolved":""}`,o.innerHTML=`
|
|
2
2
|
<header class="rte-comment-header">
|
|
3
3
|
<div class="rte-comment-meta">
|
|
4
4
|
<strong class="rte-comment-author"></strong>
|
|
5
|
-
<time class="rte-comment-date">${
|
|
5
|
+
<time class="rte-comment-date">${M(t.createdAt)}</time>
|
|
6
6
|
</div>
|
|
7
7
|
<button class="rte-comment-expand" type="button" aria-label="Toggle details">
|
|
8
8
|
${r?"▾":"▸"}
|
|
@@ -11,16 +11,16 @@
|
|
|
11
11
|
<div class="rte-comment-text"></div>
|
|
12
12
|
${t.selectedText?'<blockquote class="rte-comment-selection"></blockquote>':""}
|
|
13
13
|
<section class="rte-comment-expanded${r?" show":""}"></section>
|
|
14
|
-
`;const
|
|
14
|
+
`;const a=o.querySelector(".rte-comment-author");a&&(a.textContent=t.author);const c=o.querySelector(".rte-comment-text");c&&(c.textContent=t.text);const p=o.querySelector(".rte-comment-selection");p&&(p.textContent=t.selectedText),o.querySelector(".rte-comment-expand")?.addEventListener("click",()=>{e.expandedComments.has(t.id)?e.expandedComments.delete(t.id):e.expandedComments.add(t.id),s(e)});const d=o.querySelector(".rte-comment-expanded");if(d&&r){if(t.replies.length>0){const n=document.createElement("div");n.className="rte-comment-replies",t.replies.forEach(l=>{const m=document.createElement("div");m.className="rte-comment-reply",m.innerHTML=`
|
|
15
15
|
<div class="rte-comment-reply-header">
|
|
16
16
|
<strong class="rte-comment-reply-author"></strong>
|
|
17
|
-
<time>${
|
|
17
|
+
<time>${M(l.createdAt)}</time>
|
|
18
18
|
</div>
|
|
19
19
|
<div class="rte-comment-reply-text"></div>
|
|
20
|
-
`;const v=m.querySelector(".rte-comment-reply-author");v&&(v.textContent=
|
|
20
|
+
`;const v=m.querySelector(".rte-comment-reply-author");v&&(v.textContent=l.author);const b=m.querySelector(".rte-comment-reply-text");b&&(b.textContent=l.text),n.appendChild(m)}),d.appendChild(n)}if(!t.resolved){const n=document.createElement("div");n.className="rte-comment-reply-composer",n.innerHTML=`
|
|
21
21
|
<textarea class="rte-comment-reply-textarea" rows="2" placeholder="Reply..."></textarea>
|
|
22
22
|
<button type="button" class="rte-comment-btn primary">Reply</button>
|
|
23
|
-
`;const
|
|
23
|
+
`;const l=n.querySelector(".rte-comment-reply-textarea"),m=n.querySelector(".rte-comment-btn.primary");if(l&&m){l.value=e.replyTexts[t.id]||"";const v=()=>{const b=!!l.value.trim();m.disabled=!b};v(),l.addEventListener("input",()=>{e.replyTexts[t.id]=l.value,v()}),m.addEventListener("click",()=>{const b=l.value.trim();b&&(Y(t.id,R,b),e.replyTexts[t.id]="",s(e))})}d.appendChild(n)}const i=document.createElement("div");if(i.className="rte-comment-actions",t.anchorId){const n=document.createElement("button");n.type="button",n.className="rte-comment-btn ghost",n.textContent="Jump to text",n.onclick=()=>{const l=C(e,t);l&&(l.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}),E(e,t.id,!0),window.setTimeout(()=>E(e,t.id,!1),1200))},i.appendChild(n)}if(t.resolved){const n=document.createElement("button");n.type="button",n.className="rte-comment-btn ghost",n.textContent="Reopen",n.onclick=()=>J(t.id),i.appendChild(n)}else{const n=document.createElement("button");n.type="button",n.className="rte-comment-btn success",n.textContent="Resolve",n.onclick=()=>G(t.id,R),i.appendChild(n)}const h=document.createElement("button");h.type="button",h.className="rte-comment-btn danger",h.textContent="Delete",h.onclick=()=>Q(t.id),i.appendChild(h),d.appendChild(i)}return o.addEventListener("mouseenter",()=>E(e,t.id,!0)),o.addEventListener("mouseleave",()=>E(e,t.id,!1)),o}function s(e){const t=e||u();if(!t?.panelElement)return;const r=K(t),o=t.panelElement;T.keepPanelFocus(o,()=>{o.innerHTML=`
|
|
24
24
|
<div class="rte-comments-header">
|
|
25
25
|
<div>
|
|
26
26
|
<h3>Comments (${r.length})</h3>
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
</div>
|
|
36
36
|
</div>
|
|
37
37
|
${r.length===0?'<div class="rte-comments-empty">No comments yet.</div>':'<div class="rte-comments-list"></div>'}
|
|
38
|
-
|
|
38
|
+
`}),t.panelElement.querySelector(".rte-comments-close")?.addEventListener("click",()=>{w(t,!1),(!t.root.contains(document.activeElement)||document.activeElement===document.body)&&t.root.querySelector('[contenteditable="true"]')?.focus({preventScroll:!0})});const c=t.panelElement.querySelector(".new-comment-textarea"),p=t.panelElement.querySelector(".add-comment-btn");if(c&&p){c.value=t.newCommentText;const d=()=>{const i=!!c.value.trim();p.disabled=!i};d(),c.addEventListener("input",()=>{t.newCommentText=c.value,d()}),c.addEventListener("keydown",i=>{(i.ctrlKey||i.metaKey)&&i.key==="Enter"&&(i.preventDefault(),p.click())}),p.addEventListener("click",()=>{const i=c.value.trim();if(!i)return;const h=!!t.savedSelection;X(R,i,!h),t.newCommentText="",s(t)})}const f=t.panelElement.querySelector(".rte-comments-list");f&&r.forEach(d=>{f.appendChild(U(t,d))})}const L=new WeakMap;function W(e){L.has(e)||L.set(e,window.setTimeout(()=>{L.delete(e),e.panelVisible&&s(e)},120))}function z(){H||(H=!0,document.addEventListener("focusin",e=>{const t=g(e.target);t&&(x=t)}),document.addEventListener("click",e=>{const r=(e.target instanceof Element?e.target:null)?.closest(".rte-comment-anchor");if(!r)return;const o=g(r),a=o?y.get(o):null,c=r.getAttribute("data-comment-id");!a||!c||!a.comments.has(c)||(e.preventDefault(),e.stopPropagation(),x=a.root,a.expandedComments.add(c),w(a,!0),s(a))}),document.addEventListener("input",e=>{const t=e.target instanceof Element?e.target:null;if(!t||t.closest(".rte-comments-panel"))return;const r=g(t),o=r?y.get(r):null;o?.panelVisible&&W(o)}),document.addEventListener("selectionchange",()=>{const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0),r=g(t.commonAncestorContainer);if(!r)return;x=r;const o=y.get(r);!o||e.isCollapsed||k(t,r)&&(o.savedSelection=t.cloneRange())}),document.addEventListener("keydown",e=>{if(e.key!=="Escape")return;const t=u();!t||!t.panelVisible||(e.preventDefault(),e.stopPropagation(),w(t,!1))},!0))}function X(e,t,r=!1){const o=u();if(!o)return"";const a=t.trim();if(!a)return"";if(r){const l=S("comment");return o.comments.set(l,{id:l,anchorId:"",selectedText:"",author:e,text:a,createdAt:new Date().toISOString(),resolved:!1,replies:[]}),s(o),l}const c=o.savedSelection||V(o.root);if(!c||!k(c,o.root))return"";const p=c.toString().trim();if(!p)return"";const f=S("comment"),d=S("comment-anchor"),i=document.createElement("span");return i.id=d,i.className="rte-comment-anchor",i.setAttribute("data-comment-id",f),i.setAttribute("title","Commented text"),A(o,()=>{try{const l=c.cloneRange(),m=l.extractContents();return m.textContent?.trim()?(i.appendChild(m),l.insertNode(i),!0):!1}catch{return!1}})?(o.comments.set(f,{id:f,anchorId:d,selectedText:p,author:e,text:a,createdAt:new Date().toISOString(),resolved:!1,replies:[]}),o.savedSelection=null,window.getSelection()?.removeAllRanges(),s(o),f):""}function G(e,t){const r=u();if(!r)return;const o=r.comments.get(e);o&&(o.resolved=!0,o.resolvedBy=t,o.resolvedAt=new Date().toISOString(),A(r,()=>I(r,o)),s(r))}function J(e){const t=u();if(!t)return;const r=t.comments.get(e);r&&(r.resolved=!1,r.resolvedBy=void 0,r.resolvedAt=void 0,A(t,()=>I(t,r)),s(t))}function Q(e){const t=u();if(!t)return;const r=t.comments.get(e);if(r){if(r.anchorId){const o=C(t,r);o&&A(t,()=>_(o))}else t.comments.delete(e),t.expandedComments.delete(e),delete t.replyTexts[e];s(t)}}function Y(e,t,r){const o=u();if(!o)return;const a=o.comments.get(e);if(!a)return;const c=r.trim();c&&(a.replies.push({id:S("reply"),author:t,text:c,createdAt:new Date().toISOString()}),s(o))}function ee(){if(document.getElementById("rte-comments-panel-styles"))return;const e=document.createElement("style");e.id="rte-comments-panel-styles",e.textContent=`
|
|
39
39
|
.rte-comments-panel {
|
|
40
40
|
--rte-comments-panel-width: min(360px, 42vw);
|
|
41
41
|
position: absolute;
|
|
@@ -53,7 +53,9 @@
|
|
|
53
53
|
opacity: 0;
|
|
54
54
|
pointer-events: none;
|
|
55
55
|
transition: transform 180ms ease, opacity 180ms ease;
|
|
56
|
-
z-index:
|
|
56
|
+
/* Above the editor's sticky toolbar (z-index 100): on a narrow screen the panel lies over the editor, and
|
|
57
|
+
under the toolbar its header, and the button that closes it, could not be clicked. */
|
|
58
|
+
z-index: 110;
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
.rte-comments-panel.is-open {
|
|
@@ -62,7 +64,16 @@
|
|
|
62
64
|
pointer-events: auto;
|
|
63
65
|
}
|
|
64
66
|
|
|
65
|
-
|
|
67
|
+
/* The panel's width is set on the editor itself, not only on the panel: the toolbar and the text make room for the
|
|
68
|
+
panel with a margin of that width, and a variable set on the panel is not visible to them (the margin was
|
|
69
|
+
silently 0, so the panel lay over the toolbar and the text and its header could not be reached). */
|
|
70
|
+
[data-rte-comments-open="true"] {
|
|
71
|
+
--rte-comments-panel-width: min(360px, 42vw);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* The toolbar's wrapper is the element that is as wide as the editor, and it sits above the panel (it is sticky,
|
|
75
|
+
z-index 100): it has to give up the panel's width too, or its empty right-hand end covers the panel's header. */
|
|
76
|
+
[data-rte-comments-open="true"] :is(.rte-toolbar-wrapper, .rte-toolbar:not(.rte-toolbar-wrapper .rte-toolbar), .editora-toolbar, .rte-content, .editora-content, .editora-statusbar, .editora-statusbar-container) {
|
|
66
77
|
margin-right: var(--rte-comments-panel-width);
|
|
67
78
|
transition: margin-right 180ms ease;
|
|
68
79
|
}
|
|
@@ -343,12 +354,13 @@
|
|
|
343
354
|
}
|
|
344
355
|
|
|
345
356
|
@media (max-width: 900px) {
|
|
357
|
+
[data-rte-comments-open="true"],
|
|
346
358
|
.rte-comments-panel {
|
|
347
359
|
--rte-comments-panel-width: min(420px, 100%);
|
|
348
360
|
}
|
|
349
361
|
|
|
350
|
-
[data-rte-comments-open="true"] :is(.rte-toolbar, .editora-toolbar, .rte-content, .editora-content, .editora-statusbar, .editora-statusbar-container) {
|
|
362
|
+
[data-rte-comments-open="true"] :is(.rte-toolbar-wrapper, .rte-toolbar:not(.rte-toolbar-wrapper .rte-toolbar), .editora-toolbar, .rte-content, .editora-content, .editora-statusbar, .editora-statusbar-container) {
|
|
351
363
|
margin-right: 0;
|
|
352
364
|
}
|
|
353
365
|
}
|
|
354
|
-
`,document.head.appendChild(e)}const
|
|
366
|
+
`,document.head.appendChild(e)}const te=()=>({name:"comments",toolbar:[{label:"Add Comment",command:"addComment",type:"button",icon:'<svg fill="#000000" width="24px" height="24px" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><title>add-comment</title><path d="M17.74,30,16,29l4-7h6a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2H6A2,2,0,0,0,4,8V20a2,2,0,0,0,2,2h9v2H6a4,4,0,0,1-4-4V8A4,4,0,0,1,6,4H26a4,4,0,0,1,4,4V20a4,4,0,0,1-4,4H21.16Z"></path><polygon points="17 9 15 9 15 13 11 13 11 15 15 15 15 19 17 19 17 15 21 15 21 13 17 13 17 9"></polygon><rect fill="none" width="32" height="32"></rect></svg>'},{label:"Show / Hide Comments",command:"toggleComments",type:"button",icon:'<svg width="24px" height="24px" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16 1H4V11H8L10 13L12 11H16V1Z" fill="#000000"></path><path d="M2 5V13H7.17157L8.70711 14.5355L7.29289 15.9497L6.34315 15H0V5H2Z" fill="#000000"></path></svg>'}],commands:{addComment:(e,t)=>{B(t),z();const r=u();return r?(r.savedSelection=V(r.root),r.savedSelection&&window.getSelection()?.removeAllRanges(),w(r,!0),s(r),r.panelElement?.querySelector(".new-comment-textarea")?.focus({preventScroll:!0}),!0):!1},toggleComments:(e,t)=>{B(t),z();const r=u();return r?(w(r,!r.panelVisible),r.panelVisible&&s(r),!0):!1}},keymap:{}});exports.CommentsPlugin=te;
|