@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.
Files changed (139) hide show
  1. package/README.md +1 -1
  2. package/dist/_commonjsHelpers-BH3jXuIh.js +1 -0
  3. package/dist/_commonjsHelpers-ByX85dGu.mjs +33 -0
  4. package/dist/a11y-checker.cjs.js +12 -12
  5. package/dist/a11y-checker.esm.js +80 -98
  6. package/dist/anchor.cjs.js +12 -12
  7. package/dist/anchor.esm.js +115 -128
  8. package/dist/anchoredPopover-BzqGPOAE.js +1 -0
  9. package/dist/anchoredPopover-Dts0IrgU.mjs +106 -0
  10. package/dist/approval-workflow.cjs.js +40 -40
  11. package/dist/approval-workflow.esm.js +208 -249
  12. package/dist/background-color.cjs.js +2 -2
  13. package/dist/background-color.esm.js +55 -68
  14. package/dist/blockquote.esm.js +1 -2
  15. package/dist/blocks-library.cjs.js +45 -45
  16. package/dist/blocks-library.esm.js +178 -245
  17. package/dist/capitalization.esm.js +1 -2
  18. package/dist/checklist.cjs.js +1 -1
  19. package/dist/checklist.esm.js +58 -82
  20. package/dist/citations.cjs.js +37 -37
  21. package/dist/citations.esm.js +439 -512
  22. package/dist/clear-formatting.cjs.js +1 -1
  23. package/dist/clear-formatting.esm.js +27 -33
  24. package/dist/code-sample.cjs.js +14 -14
  25. package/dist/code-sample.esm.js +82 -93
  26. package/dist/code.cjs.js +119 -42
  27. package/dist/code.esm.js +2560 -760
  28. package/dist/comments.cjs.js +6 -6
  29. package/dist/comments.esm.js +116 -158
  30. package/dist/conditional-content.cjs.js +90 -90
  31. package/dist/conditional-content.esm.js +371 -432
  32. package/dist/content-rules.cjs.js +7 -7
  33. package/dist/content-rules.esm.js +105 -159
  34. package/dist/data-binding.cjs.js +46 -46
  35. package/dist/data-binding.esm.js +328 -368
  36. package/dist/direction.esm.js +9 -18
  37. package/dist/doc-schema.cjs.js +29 -29
  38. package/dist/doc-schema.esm.js +240 -308
  39. package/dist/document-manager.cjs.js +1 -1
  40. package/dist/document-manager.esm.js +4 -5
  41. package/dist/documentManager-CTqRftU8.mjs +8369 -0
  42. package/dist/documentManager-Jf0RbSks.js +17 -0
  43. package/dist/{editorContainerHelpers-69585c07.mjs → editorContainerHelpers-C7kdWnS0.mjs} +1 -2
  44. package/dist/embed-iframe.cjs.js +4 -4
  45. package/dist/embed-iframe.esm.js +73 -81
  46. package/dist/emojis.cjs.js +8 -8
  47. package/dist/emojis.esm.js +65 -77
  48. package/dist/enterprise.cjs.js +1 -1
  49. package/dist/enterprise.esm.js +54 -56
  50. package/dist/font-family.cjs.js +1 -1
  51. package/dist/font-family.esm.js +39 -47
  52. package/dist/font-size.cjs.js +1 -1
  53. package/dist/font-size.esm.js +37 -53
  54. package/dist/footnote.cjs.js +2 -2
  55. package/dist/footnote.esm.js +76 -117
  56. package/dist/history.cjs.js +1 -1
  57. package/dist/history.esm.js +70 -92
  58. package/dist/html2canvas.esm-B5qzocYs.js +5 -0
  59. package/dist/{html2canvas.esm-1a1724a1.mjs → html2canvas.esm-BWVIUcAF.mjs} +141 -225
  60. package/dist/indent.cjs.js +1 -1
  61. package/dist/indent.esm.js +12 -24
  62. package/dist/{index-f04538f2.mjs → index-BFsKNTTj.mjs} +70 -71
  63. package/dist/index-CvJk4DKa.js +221 -0
  64. package/dist/index-D3CycEFU.mjs +16543 -0
  65. package/dist/index-tqLTHcO6.js +1 -0
  66. package/dist/index.cjs.js +1 -1
  67. package/dist/index.es-CE_A4QSm.js +5 -0
  68. package/dist/index.es-DQ78mYYo.mjs +6665 -0
  69. package/dist/index.esm.js +125 -128
  70. package/dist/italic.cjs.js +1 -1
  71. package/dist/italic.esm.js +8 -9
  72. package/dist/jspdf.es.min-BoS80556.js +77 -0
  73. package/dist/{jspdf.es.min-c36a4fd8.mjs → jspdf.es.min-DQCoX5yh.mjs} +3658 -4682
  74. package/dist/line-height.cjs.js +1 -1
  75. package/dist/line-height.esm.js +11 -24
  76. package/dist/link.cjs.js +5 -5
  77. package/dist/link.esm.js +24 -30
  78. package/dist/list.cjs.js +1 -1
  79. package/dist/list.esm.js +20 -25
  80. package/dist/lite.cjs.js +1 -1
  81. package/dist/lite.esm.js +59 -61
  82. package/dist/math.cjs.js +21 -21
  83. package/dist/math.esm.js +139 -146
  84. package/dist/media-manager.cjs.js +31 -31
  85. package/dist/media-manager.esm.js +285 -300
  86. package/dist/mentions.cjs.js +9 -9
  87. package/dist/mentions.esm.js +238 -286
  88. package/dist/merge-tag.cjs.js +2 -2
  89. package/dist/merge-tag.esm.js +177 -216
  90. package/dist/page-break.cjs.js +2 -2
  91. package/dist/page-break.esm.js +33 -49
  92. package/dist/pii-redaction.cjs.js +19 -19
  93. package/dist/pii-redaction.esm.js +393 -463
  94. package/dist/plugins.css +1 -0
  95. package/dist/preview.esm.js +5 -10
  96. package/dist/print.cjs.js +4 -4
  97. package/dist/print.esm.js +17 -20
  98. package/dist/{purify.es-35a15df8.mjs → purify.es-DHhaBdbu.mjs} +9 -19
  99. package/dist/{purify.es-a8d731c6.js → purify.es-T2a3nLiC.js} +1 -1
  100. package/dist/slash-commands.cjs.js +2 -2
  101. package/dist/slash-commands.esm.js +39 -75
  102. package/dist/smart-paste.cjs.js +27 -27
  103. package/dist/smart-paste.esm.js +280 -336
  104. package/dist/special-characters.cjs.js +7 -7
  105. package/dist/special-characters.esm.js +61 -69
  106. package/dist/spell-check.cjs.js +5 -5
  107. package/dist/spell-check.esm.js +97 -123
  108. package/dist/strikethrough.cjs.js +1 -1
  109. package/dist/strikethrough.esm.js +14 -19
  110. package/dist/table.cjs.js +4 -4
  111. package/dist/table.esm.js +191 -225
  112. package/dist/template.cjs.js +21 -20
  113. package/dist/template.esm.js +715 -196
  114. package/dist/text-alignment.cjs.js +1 -1
  115. package/dist/text-alignment.esm.js +21 -27
  116. package/dist/text-color.cjs.js +3 -3
  117. package/dist/text-color.esm.js +70 -87
  118. package/dist/track-changes.cjs.js +2 -2
  119. package/dist/track-changes.esm.js +100 -162
  120. package/dist/translation-workflow.cjs.js +74 -74
  121. package/dist/translation-workflow.esm.js +602 -678
  122. package/dist/version-diff.cjs.js +14 -14
  123. package/dist/version-diff.esm.js +128 -157
  124. package/package.json +1 -1
  125. package/dist/_commonjsHelpers-6763f629.js +0 -1
  126. package/dist/_commonjsHelpers-c5d32002.mjs +0 -30
  127. package/dist/anchoredPopover-33f1358d.mjs +0 -109
  128. package/dist/anchoredPopover-8151d535.js +0 -1
  129. package/dist/documentManager-25b6203c.mjs +0 -9122
  130. package/dist/documentManager-b69e7054.js +0 -17
  131. package/dist/html2canvas.esm-09133e29.js +0 -22
  132. package/dist/index-656d224b.js +0 -231
  133. package/dist/index-6a8c48bb.js +0 -1
  134. package/dist/index-d027b7e2.mjs +0 -16859
  135. package/dist/index.es-730f2d98.mjs +0 -5775
  136. package/dist/index.es-dd40173b.js +0 -18
  137. package/dist/jspdf.es.min-90db2c97.js +0 -243
  138. package/dist/style.css +0 -1
  139. /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.10",
3
+ "version": "1.0.12",
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;