@editora/plugins 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_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 +32 -32
- package/dist/code.esm.js +501 -506
- 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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editora/plugins",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "Enterprise plugin suite for Editora rich text editor in React and web apps, including tables, media, workflow, and compliance tooling.",
|
|
5
5
|
"author": "Ajay Kumar <ajaykr089@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var u=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function l(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function o(){return this instanceof o?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}),t}exports.commonjsGlobal=u;exports.getAugmentedNamespace=l;exports.getDefaultExportFromCjs=f;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
var u = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
-
function f(e) {
|
|
3
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
-
}
|
|
5
|
-
function l(e) {
|
|
6
|
-
if (e.__esModule)
|
|
7
|
-
return e;
|
|
8
|
-
var r = e.default;
|
|
9
|
-
if (typeof r == "function") {
|
|
10
|
-
var t = function o() {
|
|
11
|
-
return this instanceof o ? Reflect.construct(r, arguments, this.constructor) : r.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
t.prototype = r.prototype;
|
|
14
|
-
} else
|
|
15
|
-
t = {};
|
|
16
|
-
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
|
|
17
|
-
var n = Object.getOwnPropertyDescriptor(e, o);
|
|
18
|
-
Object.defineProperty(t, o, n.get ? n : {
|
|
19
|
-
enumerable: !0,
|
|
20
|
-
get: function() {
|
|
21
|
-
return e[o];
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}), t;
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
l as a,
|
|
28
|
-
u as c,
|
|
29
|
-
f as g
|
|
30
|
-
};
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
const b = "p,div,li,ul,ol,table,thead,tbody,tfoot,tr,td,th,h1,h2,h3,h4,h5,h6,blockquote,pre";
|
|
2
|
-
function p(e) {
|
|
3
|
-
return !!e.cloneContents().querySelector(b);
|
|
4
|
-
}
|
|
5
|
-
function v(e, n) {
|
|
6
|
-
var o;
|
|
7
|
-
const t = (e == null ? void 0 : e.nodeType) === Node.ELEMENT_NODE ? e : (e == null ? void 0 : e.parentElement) ?? null;
|
|
8
|
-
return (t == null ? void 0 : t.closest('[contenteditable="true"]')) || ((o = n()) == null ? void 0 : o.querySelector('[contenteditable="true"]')) || document.querySelector('[contenteditable="true"]');
|
|
9
|
-
}
|
|
10
|
-
function C(e, n) {
|
|
11
|
-
const t = v(e, n);
|
|
12
|
-
t && t.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
13
|
-
}
|
|
14
|
-
function A(e, n) {
|
|
15
|
-
let o = e.startContainer.nodeType === Node.TEXT_NODE ? e.startContainer.parentElement : e.startContainer;
|
|
16
|
-
for (; o && o !== document.body; ) {
|
|
17
|
-
if (o.classList.contains(n)) {
|
|
18
|
-
const r = document.createRange();
|
|
19
|
-
if (r.selectNodeContents(o), r.compareBoundaryPoints(Range.START_TO_START, e) <= 0 && r.compareBoundaryPoints(Range.END_TO_END, e) >= 0)
|
|
20
|
-
return o;
|
|
21
|
-
}
|
|
22
|
-
o = o.parentElement;
|
|
23
|
-
}
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
function N(e) {
|
|
27
|
-
try {
|
|
28
|
-
if (e.savedRange) {
|
|
29
|
-
const c = window.getSelection();
|
|
30
|
-
c && (c.removeAllRanges(), c.addRange(e.savedRange.cloneRange()));
|
|
31
|
-
}
|
|
32
|
-
const n = window.getSelection();
|
|
33
|
-
if (!n || n.rangeCount === 0 || n.isCollapsed)
|
|
34
|
-
return !1;
|
|
35
|
-
const t = n.getRangeAt(0);
|
|
36
|
-
if (t.collapsed)
|
|
37
|
-
return !1;
|
|
38
|
-
const o = A(t, e.className);
|
|
39
|
-
if (o)
|
|
40
|
-
return e.styleProperty === "backgroundColor" ? o.style.backgroundColor = e.color : o.style.color = e.color, C(o, e.getActiveEditorRoot), !0;
|
|
41
|
-
const r = v(
|
|
42
|
-
t.commonAncestorContainer,
|
|
43
|
-
e.getActiveEditorRoot
|
|
44
|
-
);
|
|
45
|
-
r == null || r.focus({ preventScroll: !0 });
|
|
46
|
-
try {
|
|
47
|
-
document.execCommand("styleWithCSS", !1, "true");
|
|
48
|
-
} catch {
|
|
49
|
-
}
|
|
50
|
-
let l = !1;
|
|
51
|
-
if (e.commands.forEach((c) => {
|
|
52
|
-
l || (l = document.execCommand(c, !1, e.color));
|
|
53
|
-
}), !l && !p(t)) {
|
|
54
|
-
const c = document.createElement("span");
|
|
55
|
-
e.styleProperty === "backgroundColor" ? c.style.backgroundColor = e.color : c.style.color = e.color, c.className = e.className;
|
|
56
|
-
const a = t.extractContents();
|
|
57
|
-
c.appendChild(a), t.insertNode(c), t.setStartAfter(c), t.collapse(!0), n.removeAllRanges(), n.addRange(t), l = !0;
|
|
58
|
-
}
|
|
59
|
-
return l ? (C(t.commonAncestorContainer, e.getActiveEditorRoot), !0) : (e.warnMessage && console.warn(e.warnMessage), !1);
|
|
60
|
-
} catch (n) {
|
|
61
|
-
return e.warnMessage ? console.error(e.warnMessage, n) : console.error("[ColorApply] Failed to apply color", n), !1;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
function T({
|
|
65
|
-
popover: e,
|
|
66
|
-
anchor: n,
|
|
67
|
-
onClose: t,
|
|
68
|
-
gap: o = 6,
|
|
69
|
-
margin: r = 8,
|
|
70
|
-
zIndex: l = 1e4
|
|
71
|
-
}) {
|
|
72
|
-
e.style.position = "fixed", e.style.zIndex = `${l}`, e.style.visibility = "hidden";
|
|
73
|
-
const c = () => {
|
|
74
|
-
if (!e.isConnected || !n.isConnected) {
|
|
75
|
-
t();
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
const s = n.getBoundingClientRect();
|
|
79
|
-
if (s.width === 0 && s.height === 0) {
|
|
80
|
-
t();
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
const i = e.getBoundingClientRect(), w = i.width || e.offsetWidth || 220, f = i.height || e.offsetHeight || 260, y = window.innerWidth, E = window.innerHeight;
|
|
84
|
-
let u = s.left, d = s.bottom + o;
|
|
85
|
-
if (u + w > y - r && (u = y - w - r), u = Math.max(r, u), d + f > E - r) {
|
|
86
|
-
const g = s.top - f - o;
|
|
87
|
-
g >= r ? d = g : d = Math.max(r, E - f - r);
|
|
88
|
-
}
|
|
89
|
-
d < r && (d = r), e.style.left = `${Math.round(u)}px`, e.style.top = `${Math.round(d)}px`, e.style.visibility = "visible";
|
|
90
|
-
}, a = () => {
|
|
91
|
-
c();
|
|
92
|
-
}, h = (s) => {
|
|
93
|
-
const i = s.target;
|
|
94
|
-
i && (e.contains(i) || n.contains(i) || t());
|
|
95
|
-
}, m = (s) => {
|
|
96
|
-
s.key === "Escape" && t();
|
|
97
|
-
};
|
|
98
|
-
window.addEventListener("resize", a), window.addEventListener("scroll", a, !0), document.addEventListener("keydown", m);
|
|
99
|
-
const R = window.requestAnimationFrame(() => {
|
|
100
|
-
document.addEventListener("mousedown", h, !0);
|
|
101
|
-
});
|
|
102
|
-
return c(), { reposition: c, destroy: () => {
|
|
103
|
-
window.cancelAnimationFrame(R), window.removeEventListener("resize", a), window.removeEventListener("scroll", a, !0), document.removeEventListener("keydown", m), document.removeEventListener("mousedown", h, !0);
|
|
104
|
-
} };
|
|
105
|
-
}
|
|
106
|
-
export {
|
|
107
|
-
N as a,
|
|
108
|
-
T as b
|
|
109
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const b="p,div,li,ul,ol,table,thead,tbody,tfoot,tr,td,th,h1,h2,h3,h4,h5,h6,blockquote,pre";function p(e){return!!e.cloneContents().querySelector(b)}function v(e,n){var o;const t=(e==null?void 0:e.nodeType)===Node.ELEMENT_NODE?e:(e==null?void 0:e.parentElement)??null;return(t==null?void 0:t.closest('[contenteditable="true"]'))||((o=n())==null?void 0:o.querySelector('[contenteditable="true"]'))||document.querySelector('[contenteditable="true"]')}function C(e,n){const t=v(e,n);t&&t.dispatchEvent(new Event("input",{bubbles:!0}))}function A(e,n){let o=e.startContainer.nodeType===Node.TEXT_NODE?e.startContainer.parentElement:e.startContainer;for(;o&&o!==document.body;){if(o.classList.contains(n)){const r=document.createRange();if(r.selectNodeContents(o),r.compareBoundaryPoints(Range.START_TO_START,e)<=0&&r.compareBoundaryPoints(Range.END_TO_END,e)>=0)return o}o=o.parentElement}return null}function S(e){try{if(e.savedRange){const c=window.getSelection();c&&(c.removeAllRanges(),c.addRange(e.savedRange.cloneRange()))}const n=window.getSelection();if(!n||n.rangeCount===0||n.isCollapsed)return!1;const t=n.getRangeAt(0);if(t.collapsed)return!1;const o=A(t,e.className);if(o)return e.styleProperty==="backgroundColor"?o.style.backgroundColor=e.color:o.style.color=e.color,C(o,e.getActiveEditorRoot),!0;const r=v(t.commonAncestorContainer,e.getActiveEditorRoot);r==null||r.focus({preventScroll:!0});try{document.execCommand("styleWithCSS",!1,"true")}catch{}let l=!1;if(e.commands.forEach(c=>{l||(l=document.execCommand(c,!1,e.color))}),!l&&!p(t)){const c=document.createElement("span");e.styleProperty==="backgroundColor"?c.style.backgroundColor=e.color:c.style.color=e.color,c.className=e.className;const a=t.extractContents();c.appendChild(a),t.insertNode(c),t.setStartAfter(c),t.collapse(!0),n.removeAllRanges(),n.addRange(t),l=!0}return l?(C(t.commonAncestorContainer,e.getActiveEditorRoot),!0):(e.warnMessage&&console.warn(e.warnMessage),!1)}catch(n){return e.warnMessage?console.error(e.warnMessage,n):console.error("[ColorApply] Failed to apply color",n),!1}}function T({popover:e,anchor:n,onClose:t,gap:o=6,margin:r=8,zIndex:l=1e4}){e.style.position="fixed",e.style.zIndex=`${l}`,e.style.visibility="hidden";const c=()=>{if(!e.isConnected||!n.isConnected){t();return}const s=n.getBoundingClientRect();if(s.width===0&&s.height===0){t();return}const i=e.getBoundingClientRect(),y=i.width||e.offsetWidth||220,f=i.height||e.offsetHeight||260,w=window.innerWidth,E=window.innerHeight;let u=s.left,d=s.bottom+o;if(u+y>w-r&&(u=w-y-r),u=Math.max(r,u),d+f>E-r){const g=s.top-f-o;g>=r?d=g:d=Math.max(r,E-f-r)}d<r&&(d=r),e.style.left=`${Math.round(u)}px`,e.style.top=`${Math.round(d)}px`,e.style.visibility="visible"},a=()=>{c()},h=s=>{const i=s.target;i&&(e.contains(i)||n.contains(i)||t())},m=s=>{s.key==="Escape"&&t()};window.addEventListener("resize",a),window.addEventListener("scroll",a,!0),document.addEventListener("keydown",m);const R=window.requestAnimationFrame(()=>{document.addEventListener("mousedown",h,!0)});return c(),{reposition:c,destroy:()=>{window.cancelAnimationFrame(R),window.removeEventListener("resize",a),window.removeEventListener("scroll",a,!0),document.removeEventListener("keydown",m),document.removeEventListener("mousedown",h,!0)}}}exports.applyColorToSelection=S;exports.attachAnchoredPopover=T;
|