@editora/plugins 1.0.2 → 1.0.5
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 +30 -5
- package/dist/a11y-checker.cjs.js +109 -0
- package/dist/a11y-checker.esm.js +509 -0
- package/dist/anchor.cjs.js +176 -0
- package/dist/anchor.esm.js +400 -0
- package/dist/background-color.cjs.js +218 -0
- package/dist/background-color.esm.js +482 -0
- package/dist/blockquote.cjs.js +1 -0
- package/dist/blockquote.esm.js +47 -0
- package/dist/bold.cjs.js +1 -0
- package/dist/bold.esm.js +44 -0
- package/dist/capitalization.cjs.js +1 -0
- package/dist/capitalization.esm.js +78 -0
- package/dist/checklist.cjs.js +1 -0
- package/dist/checklist.esm.js +305 -0
- package/dist/clear-formatting.cjs.js +1 -0
- package/dist/clear-formatting.esm.js +138 -0
- package/dist/code-sample.cjs.js +161 -0
- package/dist/code-sample.esm.js +381 -0
- package/dist/code.cjs.js +606 -0
- package/dist/code.esm.js +2164 -0
- package/dist/colorSelectionApply-C0iOfMWb.js +1 -0
- package/dist/colorSelectionApply-D8r_gV32.mjs +63 -0
- package/dist/comments.cjs.js +354 -0
- package/dist/comments.esm.js +692 -0
- package/dist/direction.cjs.js +1 -0
- package/dist/direction.esm.js +129 -0
- package/dist/document-manager.cjs.js +1 -0
- package/dist/document-manager.esm.js +6 -0
- package/dist/{documentManager-CYC9totK.mjs → documentManager-DRUc1-Cs.mjs} +3 -3
- package/dist/{documentManager-BGlu3WRB.js → documentManager-_tQQfQi9.js} +3 -3
- package/dist/editorContainerHelpers-C7kdWnS0.mjs +26 -0
- package/dist/editorContainerHelpers-CFbfiOJI.js +1 -0
- package/dist/embed-iframe.cjs.js +361 -0
- package/dist/embed-iframe.esm.js +556 -0
- package/dist/emojis.cjs.js +284 -0
- package/dist/emojis.esm.js +1080 -0
- package/dist/font-family.cjs.js +1 -0
- package/dist/font-family.esm.js +152 -0
- package/dist/font-size.cjs.js +1 -0
- package/dist/font-size.esm.js +278 -0
- package/dist/footnote.cjs.js +85 -0
- package/dist/footnote.esm.js +397 -0
- package/dist/fullscreen.cjs.js +1 -0
- package/dist/fullscreen.esm.js +73 -0
- package/dist/heading.cjs.js +1 -0
- package/dist/heading.esm.js +63 -0
- package/dist/history.cjs.js +1 -0
- package/dist/history.esm.js +246 -0
- package/dist/indent.cjs.js +1 -0
- package/dist/indent.esm.js +146 -0
- package/dist/index-Bskk414V.mjs +145 -0
- package/dist/index-D3pJyAsj.js +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/{index.es-B-to-4j4.js → index.es-Cz1qItab.js} +1 -1
- package/dist/{index.es-BbXJ7tyO.mjs → index.es-DEcRmSTY.mjs} +1 -1
- package/dist/index.esm.js +89 -49
- package/dist/italic.cjs.js +1 -0
- package/dist/italic.esm.js +40 -0
- package/dist/line-height.cjs.js +1 -0
- package/dist/line-height.esm.js +145 -0
- package/dist/link.cjs.js +138 -0
- package/dist/link.esm.js +276 -0
- package/dist/list.cjs.js +1 -0
- package/dist/list.esm.js +102 -0
- package/dist/lite.cjs.js +1 -0
- package/dist/lite.esm.js +61 -0
- package/dist/math.cjs.js +45 -0
- package/dist/math.esm.js +249 -0
- package/dist/media-manager.cjs.js +619 -0
- package/dist/media-manager.esm.js +994 -0
- package/dist/merge-tag.cjs.js +93 -0
- package/dist/merge-tag.esm.js +412 -0
- package/dist/page-break.cjs.js +72 -0
- package/dist/page-break.esm.js +295 -0
- package/dist/plugins.css +1 -1
- package/dist/preview.cjs.js +230 -0
- package/dist/preview.esm.js +321 -0
- package/dist/print.cjs.js +254 -0
- package/dist/print.esm.js +309 -0
- package/dist/purify.es-DHhaBdbu.mjs +470 -0
- package/dist/purify.es-T2a3nLiC.js +3 -0
- package/dist/shared-config.cjs.js +1 -0
- package/dist/shared-config.esm.js +30 -0
- package/dist/special-characters.cjs.js +257 -0
- package/dist/special-characters.esm.js +772 -0
- package/dist/spell-check.cjs.js +512 -0
- package/dist/spell-check.esm.js +1013 -0
- package/dist/strikethrough.cjs.js +1 -0
- package/dist/strikethrough.esm.js +71 -0
- package/dist/table.cjs.js +35 -0
- package/dist/table.esm.js +477 -0
- package/dist/template.cjs.js +356 -0
- package/dist/template.esm.js +560 -0
- package/dist/text-alignment.cjs.js +1 -0
- package/dist/text-alignment.esm.js +105 -0
- package/dist/text-color.cjs.js +300 -0
- package/dist/text-color.esm.js +507 -0
- package/dist/underline.cjs.js +1 -0
- package/dist/underline.esm.js +34 -0
- package/index.d.ts +62 -0
- package/package.json +220 -7
- package/LICENSE +0 -21
- package/dist/index-BbORIHoM.mjs +0 -11763
- package/dist/index-C-OCBS_6.js +0 -3753
|
@@ -0,0 +1,692 @@
|
|
|
1
|
+
const C = /* @__PURE__ */ new WeakMap();
|
|
2
|
+
let x = null, S = !1, k = 0;
|
|
3
|
+
const E = "User";
|
|
4
|
+
function h(e) {
|
|
5
|
+
return k += 1, `${e}-${Date.now()}-${k}`;
|
|
6
|
+
}
|
|
7
|
+
function v(e) {
|
|
8
|
+
if (!e) return null;
|
|
9
|
+
const t = e instanceof Element ? e : e.parentElement;
|
|
10
|
+
return t ? t.closest("[data-editora-editor]") || t.closest(".rte-editor") || t.closest(".editora-editor") : null;
|
|
11
|
+
}
|
|
12
|
+
function w(e, t) {
|
|
13
|
+
return t.contains(e.commonAncestorContainer);
|
|
14
|
+
}
|
|
15
|
+
function I() {
|
|
16
|
+
if (typeof window < "u") {
|
|
17
|
+
const o = window.__editoraCommandEditorRoot;
|
|
18
|
+
if (o instanceof HTMLElement) {
|
|
19
|
+
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);
|
|
20
|
+
if (a)
|
|
21
|
+
return x = a, window.__editoraCommandEditorRoot = null, a;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const e = document.activeElement, t = e ? v(e) : null;
|
|
25
|
+
if (t) return t;
|
|
26
|
+
const r = window.getSelection();
|
|
27
|
+
if (r && r.rangeCount > 0) {
|
|
28
|
+
const o = v(
|
|
29
|
+
r.getRangeAt(0).commonAncestorContainer
|
|
30
|
+
);
|
|
31
|
+
if (o) return o;
|
|
32
|
+
}
|
|
33
|
+
return x;
|
|
34
|
+
}
|
|
35
|
+
function B(e) {
|
|
36
|
+
const t = C.get(e);
|
|
37
|
+
if (t) return t;
|
|
38
|
+
const r = {
|
|
39
|
+
root: e,
|
|
40
|
+
comments: /* @__PURE__ */ new Map(),
|
|
41
|
+
panelVisible: !1,
|
|
42
|
+
panelElement: null,
|
|
43
|
+
expandedComments: /* @__PURE__ */ new Set(),
|
|
44
|
+
replyTexts: {},
|
|
45
|
+
savedSelection: null,
|
|
46
|
+
newCommentText: "",
|
|
47
|
+
selectionChangeListener: null
|
|
48
|
+
};
|
|
49
|
+
return C.set(e, r), r;
|
|
50
|
+
}
|
|
51
|
+
function f() {
|
|
52
|
+
const e = I();
|
|
53
|
+
return e ? (x = e, B(e)) : null;
|
|
54
|
+
}
|
|
55
|
+
function T(e) {
|
|
56
|
+
const t = window.getSelection();
|
|
57
|
+
if (!t || t.rangeCount === 0 || t.isCollapsed) return null;
|
|
58
|
+
const r = t.getRangeAt(0);
|
|
59
|
+
return w(r, e) ? r.cloneRange() : null;
|
|
60
|
+
}
|
|
61
|
+
function R(e, t) {
|
|
62
|
+
if (!t.anchorId) return;
|
|
63
|
+
const r = e.root.querySelector(`#${t.anchorId}`);
|
|
64
|
+
r && r.classList.toggle("rte-comment-anchor-resolved", t.resolved);
|
|
65
|
+
}
|
|
66
|
+
function b(e, t, r) {
|
|
67
|
+
const o = e.comments.get(t);
|
|
68
|
+
if (!o || !o.anchorId) return;
|
|
69
|
+
const a = e.root.querySelector(`#${o.anchorId}`);
|
|
70
|
+
a && a.classList.toggle("highlighted", r);
|
|
71
|
+
}
|
|
72
|
+
function $(e, t, r) {
|
|
73
|
+
t.onclick = (o) => {
|
|
74
|
+
o.preventDefault(), o.stopPropagation(), x = e.root, e.expandedComments.add(r), y(e, !0), m(e);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function q(e) {
|
|
78
|
+
const t = e.parentNode;
|
|
79
|
+
if (t) {
|
|
80
|
+
for (; e.firstChild; )
|
|
81
|
+
t.insertBefore(e.firstChild, e);
|
|
82
|
+
e.remove();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function y(e, t) {
|
|
86
|
+
F(), H(e), e.panelVisible = t, e.root.setAttribute("data-rte-comments-open", t ? "true" : "false"), e.panelElement && (e.panelElement.classList.toggle("is-open", t), e.panelElement.setAttribute("aria-hidden", t ? "false" : "true")), t ? N(e) : z(e);
|
|
87
|
+
}
|
|
88
|
+
function H(e) {
|
|
89
|
+
if (e.panelElement) return;
|
|
90
|
+
const t = document.createElement("aside");
|
|
91
|
+
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;
|
|
92
|
+
}
|
|
93
|
+
function N(e) {
|
|
94
|
+
e.selectionChangeListener || (e.selectionChangeListener = () => {
|
|
95
|
+
const t = window.getSelection();
|
|
96
|
+
if (!t || t.rangeCount === 0 || t.isCollapsed) return;
|
|
97
|
+
const r = t.getRangeAt(0);
|
|
98
|
+
w(r, e.root) && (e.savedSelection = r.cloneRange(), x = e.root);
|
|
99
|
+
}, document.addEventListener("selectionchange", e.selectionChangeListener));
|
|
100
|
+
}
|
|
101
|
+
function z(e) {
|
|
102
|
+
e.selectionChangeListener && (document.removeEventListener("selectionchange", e.selectionChangeListener), e.selectionChangeListener = null);
|
|
103
|
+
}
|
|
104
|
+
function V(e) {
|
|
105
|
+
return Array.from(e.comments.values()).sort(
|
|
106
|
+
(t, r) => r.createdAt.localeCompare(t.createdAt)
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
function A(e) {
|
|
110
|
+
return new Date(e).toLocaleString();
|
|
111
|
+
}
|
|
112
|
+
function M(e, t) {
|
|
113
|
+
const r = e.expandedComments.has(t.id), o = document.createElement("article");
|
|
114
|
+
o.className = `rte-comment-item${t.resolved ? " resolved" : ""}`, o.innerHTML = `
|
|
115
|
+
<header class="rte-comment-header">
|
|
116
|
+
<div class="rte-comment-meta">
|
|
117
|
+
<strong class="rte-comment-author">${t.author}</strong>
|
|
118
|
+
<time class="rte-comment-date">${A(t.createdAt)}</time>
|
|
119
|
+
</div>
|
|
120
|
+
<button class="rte-comment-expand" type="button" aria-label="Toggle details">
|
|
121
|
+
${r ? "▾" : "▸"}
|
|
122
|
+
</button>
|
|
123
|
+
</header>
|
|
124
|
+
<div class="rte-comment-text"></div>
|
|
125
|
+
${t.selectedText ? `<blockquote class="rte-comment-selection">${t.selectedText}</blockquote>` : ""}
|
|
126
|
+
<section class="rte-comment-expanded${r ? " show" : ""}"></section>
|
|
127
|
+
`;
|
|
128
|
+
const a = o.querySelector(".rte-comment-text");
|
|
129
|
+
a && (a.textContent = t.text), o.querySelector(".rte-comment-expand")?.addEventListener("click", () => {
|
|
130
|
+
e.expandedComments.has(t.id) ? e.expandedComments.delete(t.id) : e.expandedComments.add(t.id), m(e);
|
|
131
|
+
});
|
|
132
|
+
const p = o.querySelector(".rte-comment-expanded");
|
|
133
|
+
if (p && r) {
|
|
134
|
+
if (t.replies.length > 0) {
|
|
135
|
+
const n = document.createElement("div");
|
|
136
|
+
n.className = "rte-comment-replies", t.replies.forEach((s) => {
|
|
137
|
+
const l = document.createElement("div");
|
|
138
|
+
l.className = "rte-comment-reply", l.innerHTML = `
|
|
139
|
+
<div class="rte-comment-reply-header">
|
|
140
|
+
<strong>${s.author}</strong>
|
|
141
|
+
<time>${A(s.createdAt)}</time>
|
|
142
|
+
</div>
|
|
143
|
+
<div class="rte-comment-reply-text"></div>
|
|
144
|
+
`;
|
|
145
|
+
const u = l.querySelector(".rte-comment-reply-text");
|
|
146
|
+
u && (u.textContent = s.text), n.appendChild(l);
|
|
147
|
+
}), p.appendChild(n);
|
|
148
|
+
}
|
|
149
|
+
if (!t.resolved) {
|
|
150
|
+
const n = document.createElement("div");
|
|
151
|
+
n.className = "rte-comment-reply-composer", n.innerHTML = `
|
|
152
|
+
<textarea class="rte-comment-reply-textarea" rows="2" placeholder="Reply..."></textarea>
|
|
153
|
+
<button type="button" class="rte-comment-btn primary">Reply</button>
|
|
154
|
+
`;
|
|
155
|
+
const s = n.querySelector(
|
|
156
|
+
".rte-comment-reply-textarea"
|
|
157
|
+
), l = n.querySelector(
|
|
158
|
+
".rte-comment-btn.primary"
|
|
159
|
+
);
|
|
160
|
+
if (s && l) {
|
|
161
|
+
s.value = e.replyTexts[t.id] || "";
|
|
162
|
+
const u = () => {
|
|
163
|
+
const g = !!s.value.trim();
|
|
164
|
+
l.disabled = !g;
|
|
165
|
+
};
|
|
166
|
+
u(), s.addEventListener("input", () => {
|
|
167
|
+
e.replyTexts[t.id] = s.value, u();
|
|
168
|
+
}), l.addEventListener("click", () => {
|
|
169
|
+
const g = s.value.trim();
|
|
170
|
+
g && (_(t.id, E, g), e.replyTexts[t.id] = "", m(e));
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
p.appendChild(n);
|
|
174
|
+
}
|
|
175
|
+
const i = document.createElement("div");
|
|
176
|
+
if (i.className = "rte-comment-actions", t.anchorId) {
|
|
177
|
+
const n = document.createElement("button");
|
|
178
|
+
n.type = "button", n.className = "rte-comment-btn ghost", n.textContent = "Jump to text", n.onclick = () => {
|
|
179
|
+
const s = e.root.querySelector(`#${t.anchorId}`);
|
|
180
|
+
s && (s.scrollIntoView({ behavior: "smooth", block: "center", inline: "nearest" }), b(e, t.id, !0), window.setTimeout(() => b(e, t.id, !1), 1200));
|
|
181
|
+
}, i.appendChild(n);
|
|
182
|
+
}
|
|
183
|
+
if (t.resolved) {
|
|
184
|
+
const n = document.createElement("button");
|
|
185
|
+
n.type = "button", n.className = "rte-comment-btn ghost", n.textContent = "Reopen", n.onclick = () => j(t.id), i.appendChild(n);
|
|
186
|
+
} else {
|
|
187
|
+
const n = document.createElement("button");
|
|
188
|
+
n.type = "button", n.className = "rte-comment-btn success", n.textContent = "Resolve", n.onclick = () => O(t.id, E), i.appendChild(n);
|
|
189
|
+
}
|
|
190
|
+
const c = document.createElement("button");
|
|
191
|
+
c.type = "button", c.className = "rte-comment-btn danger", c.textContent = "Delete", c.onclick = () => P(t.id), i.appendChild(c), p.appendChild(i);
|
|
192
|
+
}
|
|
193
|
+
return o.addEventListener("mouseenter", () => b(e, t.id, !0)), o.addEventListener("mouseleave", () => b(e, t.id, !1)), o;
|
|
194
|
+
}
|
|
195
|
+
function m(e) {
|
|
196
|
+
const t = e || f();
|
|
197
|
+
if (!t?.panelElement) return;
|
|
198
|
+
const r = V(t);
|
|
199
|
+
t.panelElement.innerHTML = `
|
|
200
|
+
<div class="rte-comments-header">
|
|
201
|
+
<div>
|
|
202
|
+
<h3>Comments (${r.length})</h3>
|
|
203
|
+
<p>Select text and add comments, or add a general note.</p>
|
|
204
|
+
</div>
|
|
205
|
+
<button class="rte-comments-close" type="button" aria-label="Close comments panel">✕</button>
|
|
206
|
+
</div>
|
|
207
|
+
<div class="rte-comments-composer">
|
|
208
|
+
<textarea class="new-comment-textarea" rows="3" placeholder="Add a comment..."></textarea>
|
|
209
|
+
<div class="rte-comments-composer-actions">
|
|
210
|
+
<button class="rte-comment-btn primary add-comment-btn" type="button">Add Comment</button>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
${r.length === 0 ? '<div class="rte-comments-empty">No comments yet.</div>' : '<div class="rte-comments-list"></div>'}
|
|
214
|
+
`, t.panelElement.querySelector(".rte-comments-close")?.addEventListener("click", () => {
|
|
215
|
+
y(t, !1);
|
|
216
|
+
});
|
|
217
|
+
const a = t.panelElement.querySelector(
|
|
218
|
+
".new-comment-textarea"
|
|
219
|
+
), d = t.panelElement.querySelector(
|
|
220
|
+
".add-comment-btn"
|
|
221
|
+
);
|
|
222
|
+
if (a && d) {
|
|
223
|
+
a.value = t.newCommentText;
|
|
224
|
+
const i = () => {
|
|
225
|
+
const c = !!a.value.trim();
|
|
226
|
+
d.disabled = !c;
|
|
227
|
+
};
|
|
228
|
+
i(), a.addEventListener("input", () => {
|
|
229
|
+
t.newCommentText = a.value, i();
|
|
230
|
+
}), a.addEventListener("keydown", (c) => {
|
|
231
|
+
(c.ctrlKey || c.metaKey) && c.key === "Enter" && (c.preventDefault(), d.click());
|
|
232
|
+
}), d.addEventListener("click", () => {
|
|
233
|
+
const c = a.value.trim();
|
|
234
|
+
if (!c) return;
|
|
235
|
+
const n = !!t.savedSelection;
|
|
236
|
+
D(E, c, !n), t.newCommentText = "", m(t);
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
const p = t.panelElement.querySelector(".rte-comments-list");
|
|
240
|
+
p && r.forEach((i) => {
|
|
241
|
+
p.appendChild(M(t, i));
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
function L() {
|
|
245
|
+
S || (S = !0, document.addEventListener("focusin", (e) => {
|
|
246
|
+
const t = v(e.target);
|
|
247
|
+
t && (x = t);
|
|
248
|
+
}), document.addEventListener("selectionchange", () => {
|
|
249
|
+
const e = window.getSelection();
|
|
250
|
+
if (!e || e.rangeCount === 0) return;
|
|
251
|
+
const t = e.getRangeAt(0), r = v(t.commonAncestorContainer);
|
|
252
|
+
if (!r) return;
|
|
253
|
+
x = r;
|
|
254
|
+
const o = C.get(r);
|
|
255
|
+
!o || e.isCollapsed || w(t, r) && (o.savedSelection = t.cloneRange());
|
|
256
|
+
}));
|
|
257
|
+
}
|
|
258
|
+
function D(e, t, r = !1) {
|
|
259
|
+
const o = f();
|
|
260
|
+
if (!o) return "";
|
|
261
|
+
const a = t.trim();
|
|
262
|
+
if (!a) return "";
|
|
263
|
+
if (r) {
|
|
264
|
+
const l = h("comment");
|
|
265
|
+
return o.comments.set(l, {
|
|
266
|
+
id: l,
|
|
267
|
+
anchorId: "",
|
|
268
|
+
selectedText: "",
|
|
269
|
+
author: e,
|
|
270
|
+
text: a,
|
|
271
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
272
|
+
resolved: !1,
|
|
273
|
+
replies: []
|
|
274
|
+
}), m(o), l;
|
|
275
|
+
}
|
|
276
|
+
const d = o.savedSelection || T(o.root);
|
|
277
|
+
if (!d || !w(d, o.root)) return "";
|
|
278
|
+
const p = d.toString().trim();
|
|
279
|
+
if (!p) return "";
|
|
280
|
+
const i = h("comment"), c = h("comment-anchor"), n = document.createElement("span");
|
|
281
|
+
n.id = c, n.className = "rte-comment-anchor", n.setAttribute("data-comment-id", i), n.setAttribute("title", "Commented text");
|
|
282
|
+
try {
|
|
283
|
+
const l = d.cloneRange(), u = l.extractContents();
|
|
284
|
+
if (!u.textContent?.trim()) return "";
|
|
285
|
+
n.appendChild(u), l.insertNode(n);
|
|
286
|
+
} catch {
|
|
287
|
+
return "";
|
|
288
|
+
}
|
|
289
|
+
return $(o, n, i), o.comments.set(i, {
|
|
290
|
+
id: i,
|
|
291
|
+
anchorId: c,
|
|
292
|
+
selectedText: p,
|
|
293
|
+
author: e,
|
|
294
|
+
text: a,
|
|
295
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
296
|
+
resolved: !1,
|
|
297
|
+
replies: []
|
|
298
|
+
}), o.savedSelection = null, window.getSelection()?.removeAllRanges(), m(o), i;
|
|
299
|
+
}
|
|
300
|
+
function O(e, t) {
|
|
301
|
+
const r = f();
|
|
302
|
+
if (!r) return;
|
|
303
|
+
const o = r.comments.get(e);
|
|
304
|
+
o && (o.resolved = !0, o.resolvedBy = t, o.resolvedAt = (/* @__PURE__ */ new Date()).toISOString(), R(r, o), m(r));
|
|
305
|
+
}
|
|
306
|
+
function j(e) {
|
|
307
|
+
const t = f();
|
|
308
|
+
if (!t) return;
|
|
309
|
+
const r = t.comments.get(e);
|
|
310
|
+
r && (r.resolved = !1, r.resolvedBy = void 0, r.resolvedAt = void 0, R(t, r), m(t));
|
|
311
|
+
}
|
|
312
|
+
function P(e) {
|
|
313
|
+
const t = f();
|
|
314
|
+
if (!t) return;
|
|
315
|
+
const r = t.comments.get(e);
|
|
316
|
+
if (r) {
|
|
317
|
+
if (r.anchorId) {
|
|
318
|
+
const o = t.root.querySelector(`#${r.anchorId}`);
|
|
319
|
+
o && q(o);
|
|
320
|
+
}
|
|
321
|
+
t.comments.delete(e), t.expandedComments.delete(e), delete t.replyTexts[e], m(t);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
function _(e, t, r) {
|
|
325
|
+
const o = f();
|
|
326
|
+
if (!o) return;
|
|
327
|
+
const a = o.comments.get(e);
|
|
328
|
+
if (!a) return;
|
|
329
|
+
const d = r.trim();
|
|
330
|
+
d && (a.replies.push({
|
|
331
|
+
id: h("reply"),
|
|
332
|
+
author: t,
|
|
333
|
+
text: d,
|
|
334
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
335
|
+
}), m(o));
|
|
336
|
+
}
|
|
337
|
+
function F() {
|
|
338
|
+
if (document.getElementById("rte-comments-panel-styles")) return;
|
|
339
|
+
const e = document.createElement("style");
|
|
340
|
+
e.id = "rte-comments-panel-styles", e.textContent = `
|
|
341
|
+
.rte-comments-panel {
|
|
342
|
+
--rte-comments-panel-width: min(360px, 42vw);
|
|
343
|
+
position: absolute;
|
|
344
|
+
top: 0;
|
|
345
|
+
right: 0;
|
|
346
|
+
bottom: 0;
|
|
347
|
+
width: var(--rte-comments-panel-width);
|
|
348
|
+
display: flex;
|
|
349
|
+
flex-direction: column;
|
|
350
|
+
background: var(--rte-color-bg-primary, #ffffff);
|
|
351
|
+
color: var(--rte-color-text-primary, #111827);
|
|
352
|
+
border-left: 1px solid var(--rte-color-border, #d1d5db);
|
|
353
|
+
box-shadow: -12px 0 28px rgba(15, 23, 42, 0.2);
|
|
354
|
+
transform: translateX(100%);
|
|
355
|
+
opacity: 0;
|
|
356
|
+
pointer-events: none;
|
|
357
|
+
transition: transform 180ms ease, opacity 180ms ease;
|
|
358
|
+
z-index: 55;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.rte-comments-panel.is-open {
|
|
362
|
+
transform: translateX(0);
|
|
363
|
+
opacity: 1;
|
|
364
|
+
pointer-events: auto;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
[data-rte-comments-open="true"] :is(.rte-toolbar, .editora-toolbar, .rte-content, .editora-content, .editora-statusbar, .editora-statusbar-container) {
|
|
368
|
+
margin-right: var(--rte-comments-panel-width);
|
|
369
|
+
transition: margin-right 180ms ease;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.rte-comments-header {
|
|
373
|
+
display: flex;
|
|
374
|
+
justify-content: space-between;
|
|
375
|
+
align-items: flex-start;
|
|
376
|
+
gap: 12px;
|
|
377
|
+
padding: 14px 14px 12px;
|
|
378
|
+
border-bottom: 1px solid var(--rte-color-border-light, #e5e7eb);
|
|
379
|
+
background: var(--rte-color-bg-secondary, #f8fafc);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.rte-comments-header h3 {
|
|
383
|
+
margin: 0;
|
|
384
|
+
font-size: 15px;
|
|
385
|
+
line-height: 1.2;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.rte-comments-header p {
|
|
389
|
+
margin: 6px 0 0;
|
|
390
|
+
font-size: 12px;
|
|
391
|
+
color: var(--rte-color-text-muted, #64748b);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.rte-comments-close {
|
|
395
|
+
border: 1px solid var(--rte-color-border, #d1d5db);
|
|
396
|
+
background: transparent;
|
|
397
|
+
color: var(--rte-color-text-secondary, #475569);
|
|
398
|
+
border-radius: 6px;
|
|
399
|
+
width: 30px;
|
|
400
|
+
height: 30px;
|
|
401
|
+
cursor: pointer;
|
|
402
|
+
font-size: 16px;
|
|
403
|
+
line-height: 1;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.rte-comments-close:hover {
|
|
407
|
+
background: var(--rte-color-bg-hover, #f1f5f9);
|
|
408
|
+
color: var(--rte-color-text-primary, #0f172a);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.rte-comments-composer {
|
|
412
|
+
display: flex;
|
|
413
|
+
flex-direction: column;
|
|
414
|
+
gap: 8px;
|
|
415
|
+
padding: 12px 14px;
|
|
416
|
+
border-bottom: 1px solid var(--rte-color-border-light, #e5e7eb);
|
|
417
|
+
background: var(--rte-color-bg-secondary, #f8fafc);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.new-comment-textarea,
|
|
421
|
+
.rte-comment-reply-textarea {
|
|
422
|
+
width: 100%;
|
|
423
|
+
resize: vertical;
|
|
424
|
+
min-height: 62px;
|
|
425
|
+
font-family: inherit;
|
|
426
|
+
font-size: 13px;
|
|
427
|
+
line-height: 1.35;
|
|
428
|
+
border: 1px solid var(--rte-color-border, #d1d5db);
|
|
429
|
+
border-radius: 8px;
|
|
430
|
+
background: var(--rte-color-bg-primary, #ffffff);
|
|
431
|
+
color: var(--rte-color-text-primary, #0f172a);
|
|
432
|
+
padding: 8px 10px;
|
|
433
|
+
outline: none;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.new-comment-textarea:focus,
|
|
437
|
+
.rte-comment-reply-textarea:focus {
|
|
438
|
+
border-color: var(--rte-color-border-focus, #2563eb);
|
|
439
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--rte-color-border-focus, #2563eb) 20%, transparent);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.rte-comments-composer-actions {
|
|
443
|
+
display: flex;
|
|
444
|
+
justify-content: flex-end;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.rte-comments-list {
|
|
448
|
+
flex: 1;
|
|
449
|
+
overflow: auto;
|
|
450
|
+
padding: 12px;
|
|
451
|
+
display: flex;
|
|
452
|
+
flex-direction: column;
|
|
453
|
+
gap: 10px;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.rte-comments-empty {
|
|
457
|
+
padding: 18px 14px;
|
|
458
|
+
color: var(--rte-color-text-muted, #64748b);
|
|
459
|
+
font-size: 13px;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.rte-comment-item {
|
|
463
|
+
border: 1px solid var(--rte-color-border-light, #e5e7eb);
|
|
464
|
+
border-radius: 10px;
|
|
465
|
+
background: var(--rte-color-bg-primary, #ffffff);
|
|
466
|
+
padding: 10px;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.rte-comment-item.resolved {
|
|
470
|
+
opacity: 0.74;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.rte-comment-header {
|
|
474
|
+
display: flex;
|
|
475
|
+
align-items: flex-start;
|
|
476
|
+
justify-content: space-between;
|
|
477
|
+
gap: 8px;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.rte-comment-meta {
|
|
481
|
+
display: flex;
|
|
482
|
+
flex-direction: column;
|
|
483
|
+
gap: 2px;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.rte-comment-author {
|
|
487
|
+
font-size: 13px;
|
|
488
|
+
color: var(--rte-color-text-primary, #0f172a);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.rte-comment-date {
|
|
492
|
+
font-size: 11px;
|
|
493
|
+
color: var(--rte-color-text-muted, #64748b);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.rte-comment-expand {
|
|
497
|
+
border: none;
|
|
498
|
+
background: transparent;
|
|
499
|
+
cursor: pointer;
|
|
500
|
+
color: var(--rte-color-text-secondary, #475569);
|
|
501
|
+
font-size: 16px;
|
|
502
|
+
line-height: 1;
|
|
503
|
+
padding: 0;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.rte-comment-text {
|
|
507
|
+
margin-top: 8px;
|
|
508
|
+
font-size: 13px;
|
|
509
|
+
line-height: 1.45;
|
|
510
|
+
color: var(--rte-color-text-primary, #0f172a);
|
|
511
|
+
white-space: pre-wrap;
|
|
512
|
+
word-break: break-word;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.rte-comment-selection {
|
|
516
|
+
margin: 8px 0 0;
|
|
517
|
+
border-left: 3px solid var(--rte-color-primary, #2563eb);
|
|
518
|
+
background: var(--rte-color-bg-secondary, #f8fafc);
|
|
519
|
+
color: var(--rte-color-text-secondary, #475569);
|
|
520
|
+
padding: 6px 8px;
|
|
521
|
+
border-radius: 6px;
|
|
522
|
+
font-size: 12px;
|
|
523
|
+
font-style: italic;
|
|
524
|
+
white-space: pre-wrap;
|
|
525
|
+
word-break: break-word;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.rte-comment-expanded {
|
|
529
|
+
display: none;
|
|
530
|
+
margin-top: 10px;
|
|
531
|
+
padding-top: 10px;
|
|
532
|
+
border-top: 1px solid var(--rte-color-border-light, #e5e7eb);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.rte-comment-expanded.show {
|
|
536
|
+
display: block;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.rte-comment-replies {
|
|
540
|
+
display: flex;
|
|
541
|
+
flex-direction: column;
|
|
542
|
+
gap: 8px;
|
|
543
|
+
margin-bottom: 10px;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.rte-comment-reply {
|
|
547
|
+
border: 1px solid var(--rte-color-border-light, #e5e7eb);
|
|
548
|
+
border-radius: 8px;
|
|
549
|
+
padding: 8px;
|
|
550
|
+
background: var(--rte-color-bg-secondary, #f8fafc);
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.rte-comment-reply-header {
|
|
554
|
+
display: flex;
|
|
555
|
+
justify-content: space-between;
|
|
556
|
+
gap: 8px;
|
|
557
|
+
margin-bottom: 4px;
|
|
558
|
+
font-size: 11px;
|
|
559
|
+
color: var(--rte-color-text-muted, #64748b);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.rte-comment-reply-text {
|
|
563
|
+
font-size: 12px;
|
|
564
|
+
color: var(--rte-color-text-secondary, #334155);
|
|
565
|
+
white-space: pre-wrap;
|
|
566
|
+
word-break: break-word;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.rte-comment-reply-composer {
|
|
570
|
+
display: flex;
|
|
571
|
+
flex-direction: column;
|
|
572
|
+
gap: 8px;
|
|
573
|
+
margin-bottom: 10px;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
.rte-comment-actions {
|
|
577
|
+
display: flex;
|
|
578
|
+
justify-content: flex-end;
|
|
579
|
+
flex-wrap: wrap;
|
|
580
|
+
gap: 6px;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
.rte-comment-btn {
|
|
584
|
+
border: 1px solid var(--rte-color-border, #d1d5db);
|
|
585
|
+
border-radius: 7px;
|
|
586
|
+
padding: 5px 9px;
|
|
587
|
+
font-size: 12px;
|
|
588
|
+
cursor: pointer;
|
|
589
|
+
background: var(--rte-color-bg-primary, #ffffff);
|
|
590
|
+
color: var(--rte-color-text-secondary, #334155);
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.rte-comment-btn:hover {
|
|
594
|
+
background: var(--rte-color-bg-hover, #f1f5f9);
|
|
595
|
+
color: var(--rte-color-text-primary, #0f172a);
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
.rte-comment-btn:disabled {
|
|
599
|
+
opacity: 0.5;
|
|
600
|
+
cursor: not-allowed;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.rte-comment-btn.primary {
|
|
604
|
+
border-color: var(--rte-color-primary, #2563eb);
|
|
605
|
+
background: var(--rte-color-primary, #2563eb);
|
|
606
|
+
color: var(--rte-color-text-inverse, #ffffff);
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
.rte-comment-btn.primary:hover {
|
|
610
|
+
background: var(--rte-color-primary-hover, #1d4ed8);
|
|
611
|
+
border-color: var(--rte-color-primary-hover, #1d4ed8);
|
|
612
|
+
color: var(--rte-color-text-inverse, #ffffff);
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
.rte-comment-btn.success {
|
|
616
|
+
border-color: color-mix(in srgb, var(--rte-color-success, #15803d) 60%, transparent);
|
|
617
|
+
color: var(--rte-color-success, #15803d);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.rte-comment-btn.danger {
|
|
621
|
+
border-color: color-mix(in srgb, var(--rte-color-danger, #b91c1c) 60%, transparent);
|
|
622
|
+
color: var(--rte-color-danger, #b91c1c);
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
.rte-comment-anchor {
|
|
626
|
+
background: rgba(250, 204, 21, 0.34);
|
|
627
|
+
border-bottom: 2px solid rgba(217, 119, 6, 0.75);
|
|
628
|
+
border-radius: 2px;
|
|
629
|
+
cursor: pointer;
|
|
630
|
+
transition: outline-color 120ms ease, box-shadow 120ms ease;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.rte-comment-anchor.rte-comment-anchor-resolved {
|
|
634
|
+
background: rgba(148, 163, 184, 0.2);
|
|
635
|
+
border-bottom-color: rgba(100, 116, 139, 0.6);
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.rte-comment-anchor.highlighted {
|
|
639
|
+
outline: 2px solid var(--rte-color-primary, #2563eb);
|
|
640
|
+
outline-offset: 2px;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
:is([theme="dark"], [data-theme="dark"], .dark, .editora-theme-dark) .rte-comments-panel {
|
|
644
|
+
box-shadow: -14px 0 30px rgba(0, 0, 0, 0.45);
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
@media (max-width: 900px) {
|
|
648
|
+
.rte-comments-panel {
|
|
649
|
+
--rte-comments-panel-width: min(420px, 100%);
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
[data-rte-comments-open="true"] :is(.rte-toolbar, .editora-toolbar, .rte-content, .editora-content, .editora-statusbar, .editora-statusbar-container) {
|
|
653
|
+
margin-right: 0;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
`, document.head.appendChild(e);
|
|
657
|
+
}
|
|
658
|
+
const Z = () => ({
|
|
659
|
+
name: "comments",
|
|
660
|
+
toolbar: [
|
|
661
|
+
{
|
|
662
|
+
label: "Add Comment",
|
|
663
|
+
command: "addComment",
|
|
664
|
+
type: "button",
|
|
665
|
+
icon: '<svg fill="#000000" width="24px" height="24px" viewBox="0 0 32 32" id="icon" xmlns="http://www.w3.org/2000/svg"><defs><style>.cls-1{fill:none;}</style></defs><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 class="cls-1" width="32" height="32"></rect></svg>'
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
label: "Show / Hide Comments",
|
|
669
|
+
command: "toggleComments",
|
|
670
|
+
type: "button",
|
|
671
|
+
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>'
|
|
672
|
+
}
|
|
673
|
+
],
|
|
674
|
+
commands: {
|
|
675
|
+
addComment: () => {
|
|
676
|
+
L();
|
|
677
|
+
const e = f();
|
|
678
|
+
return e ? (e.savedSelection = T(e.root), e.savedSelection && window.getSelection()?.removeAllRanges(), y(e, !0), m(e), e.panelElement?.querySelector(
|
|
679
|
+
".new-comment-textarea"
|
|
680
|
+
)?.focus({ preventScroll: !0 }), !0) : !1;
|
|
681
|
+
},
|
|
682
|
+
toggleComments: () => {
|
|
683
|
+
L();
|
|
684
|
+
const e = f();
|
|
685
|
+
return e ? (y(e, !e.panelVisible), e.panelVisible && m(e), !0) : !1;
|
|
686
|
+
}
|
|
687
|
+
},
|
|
688
|
+
keymap: {}
|
|
689
|
+
});
|
|
690
|
+
export {
|
|
691
|
+
Z as CommentsPlugin
|
|
692
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=new Set(["P","DIV","H1","H2","H3","H4","H5","H6","LI","BLOCKQUOTE","PRE"]),l=e=>f.has(e.tagName)&&e.getAttribute("contenteditable")!=="true",h=()=>{const e=window.getSelection();if(e&&e.rangeCount>0){let t=e.getRangeAt(0).startContainer;for(;t&&t!==document.body;){if(t.nodeType===Node.ELEMENT_NODE){const r=t;if(r.getAttribute("contenteditable")==="true")return r}t=t.parentNode}}const n=document.activeElement;if(n){if(n.getAttribute("contenteditable")==="true")return n;const t=n.closest('[contenteditable="true"]');if(t)return t}return document.querySelector('[contenteditable="true"]')},u=e=>{let n=e;for(;n&&n!==document.body;){if(n.nodeType===Node.ELEMENT_NODE){const t=n;if(l(t))return t;if(t.getAttribute("contenteditable")==="true")break}n=n.parentNode}return null},C=(e,n)=>{const t=[],r=new Set,i=o=>{!o||r.has(o)||n.contains(o)&&l(o)&&(r.add(o),t.push(o))};if(e.collapsed)return i(u(e.startContainer)),t;const s=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const d=o;if(!l(d))return NodeFilter.FILTER_SKIP;if(typeof e.intersectsNode=="function")return e.intersectsNode(d)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP;const a=document.createRange();return a.selectNodeContents(d),e.compareBoundaryPoints(Range.END_TO_START,a)>0&&e.compareBoundaryPoints(Range.START_TO_END,a)<0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let c=s.nextNode();for(;c;)i(c),c=s.nextNode();return t.length===0&&i(u(e.commonAncestorContainer)),t},T=(e,n)=>{if(n===e.innerHTML)return;const t=window.execEditorCommand||window.executeEditorCommand;if(typeof t=="function")try{t("recordDomTransaction",e,n,e.innerHTML)}catch{}},g=e=>{const n=h();if(!n)return!1;const t=window.getSelection();if(!t||t.rangeCount===0)return!1;const r=t.getRangeAt(0);if(!n.contains(r.commonAncestorContainer))return!1;const i=C(r,n);if(i.length===0)return!1;const s=n.innerHTML;return i.forEach(c=>{e==="rtl"?c.setAttribute("dir","rtl"):c.removeAttribute("dir")}),T(n,s),n.dispatchEvent(new Event("input",{bubbles:!0})),!0},p=()=>({name:"direction",toolbar:[{label:"Left to Right",command:"setDirectionLTR",icon:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M21 18H3M21 18L18 21M21 18L18 15M13 3V12M13 3H7M13 3C13.4596 3 13.9148 3.0776 14.3394 3.22836C14.764 3.37913 15.1499 3.6001 15.4749 3.87868C15.7999 4.15726 16.0577 4.48797 16.2336 4.85195C16.4095 5.21593 16.5 5.60603 16.5 6C16.5 6.39397 16.4095 6.78407 16.2336 7.14805C16.0577 7.51203 15.7999 7.84274 15.4749 8.12132C15.1499 8.3999 14.764 8.62087 14.3394 8.77164C13.9148 8.9224 13.4596 9 13 9V3ZM9 3V12" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path> </g></svg>',shortcut:"Mod-Shift-l"},{label:"Right to Left",command:"setDirectionRTL",icon:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M3 18H21M3 18L6 21M3 18L6 15M11 12V3H17M15 3V12M10.5 3C10.0404 3 9.58525 3.0776 9.16061 3.22836C8.73597 3.37913 8.35013 3.6001 8.02513 3.87868C7.70012 4.15726 7.44231 4.48797 7.26642 4.85195C7.09053 5.21593 7 5.60603 7 6C7 6.39397 7.09053 6.78407 7.26642 7.14805C7.44231 7.51203 7.70012 7.84274 8.02513 8.12132C8.35013 8.3999 8.73597 8.62087 9.16061 8.77164C9.58525 8.9224 10.0404 9 10.5 9L10.5 3Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path> </g></svg>',shortcut:"Mod-Shift-r"}],commands:{setDirectionLTR:()=>{try{return g(null)}catch(e){return console.error("Failed to set LTR direction:",e),!1}},setDirectionRTL:()=>{try{return g("rtl")}catch(e){return console.error("Failed to set RTL direction:",e),!1}}},keymap:{"Mod-Shift-l":"setDirectionLTR","Mod-Shift-r":"setDirectionRTL"}});exports.DirectionPlugin=p;
|