@editora/plugins 1.0.7 → 1.0.9

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 (91) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +72 -4
  3. package/dist/_commonjsHelpers-BH3jXuIh.js +1 -0
  4. package/dist/_commonjsHelpers-ByX85dGu.mjs +33 -0
  5. package/dist/anchor.cjs.js +11 -11
  6. package/dist/anchor.esm.js +130 -107
  7. package/dist/anchoredPopover-BzqGPOAE.js +1 -0
  8. package/dist/anchoredPopover-Dts0IrgU.mjs +106 -0
  9. package/dist/approval-workflow.cjs.js +447 -0
  10. package/dist/approval-workflow.esm.js +1070 -0
  11. package/dist/background-color.cjs.js +3 -3
  12. package/dist/background-color.esm.js +116 -119
  13. package/dist/blocks-library.cjs.js +442 -0
  14. package/dist/blocks-library.esm.js +1317 -0
  15. package/dist/citations.cjs.js +548 -0
  16. package/dist/citations.esm.js +1457 -0
  17. package/dist/code.cjs.js +82 -102
  18. package/dist/code.esm.js +1172 -662
  19. package/dist/comments.cjs.js +10 -10
  20. package/dist/comments.esm.js +195 -177
  21. package/dist/conditional-content.cjs.js +626 -0
  22. package/dist/conditional-content.esm.js +1360 -0
  23. package/dist/content-rules.cjs.js +408 -0
  24. package/dist/content-rules.esm.js +1093 -0
  25. package/dist/data-binding.cjs.js +321 -0
  26. package/dist/data-binding.esm.js +913 -0
  27. package/dist/doc-schema.cjs.js +398 -0
  28. package/dist/doc-schema.esm.js +1310 -0
  29. package/dist/document-manager.cjs.js +1 -1
  30. package/dist/document-manager.esm.js +1 -1
  31. package/dist/documentManager-CTqRftU8.mjs +8369 -0
  32. package/dist/documentManager-Jf0RbSks.js +17 -0
  33. package/dist/embed-iframe.cjs.js +2 -2
  34. package/dist/embed-iframe.esm.js +8 -5
  35. package/dist/emojis.cjs.js +64 -39
  36. package/dist/emojis.esm.js +133 -104
  37. package/dist/enterprise.cjs.js +1 -0
  38. package/dist/enterprise.esm.js +56 -0
  39. package/dist/html2canvas.esm-B5qzocYs.js +5 -0
  40. package/dist/html2canvas.esm-BWVIUcAF.mjs +4802 -0
  41. package/dist/{index-Bskk414V.mjs → index-BFsKNTTj.mjs} +50 -50
  42. package/dist/index-CvJk4DKa.js +221 -0
  43. package/dist/index-D3CycEFU.mjs +16543 -0
  44. package/dist/index-tqLTHcO6.js +1 -0
  45. package/dist/index.cjs.js +1 -1
  46. package/dist/{index.es-Cz1qItab.js → index.es-CE_A4QSm.js} +5 -5
  47. package/dist/{index.es-DEcRmSTY.mjs → index.es-DQ78mYYo.mjs} +4 -3
  48. package/dist/index.esm.js +111 -75
  49. package/dist/jspdf.es.min-BoS80556.js +77 -0
  50. package/dist/jspdf.es.min-DQCoX5yh.mjs +7889 -0
  51. package/dist/link.cjs.js +6 -6
  52. package/dist/link.esm.js +41 -39
  53. package/dist/math.cjs.js +21 -21
  54. package/dist/math.esm.js +151 -112
  55. package/dist/media-manager.cjs.js +15 -15
  56. package/dist/media-manager.esm.js +227 -206
  57. package/dist/mentions.cjs.js +105 -0
  58. package/dist/mentions.esm.js +726 -0
  59. package/dist/merge-tag.cjs.js +44 -12
  60. package/dist/merge-tag.esm.js +368 -241
  61. package/dist/page-break.cjs.js +2 -2
  62. package/dist/page-break.esm.js +85 -77
  63. package/dist/pii-redaction.cjs.js +436 -0
  64. package/dist/pii-redaction.esm.js +1377 -0
  65. package/dist/preview.cjs.js +3 -3
  66. package/dist/preview.esm.js +29 -29
  67. package/dist/slash-commands.cjs.js +90 -0
  68. package/dist/slash-commands.esm.js +752 -0
  69. package/dist/smart-paste.cjs.js +398 -0
  70. package/dist/smart-paste.esm.js +1388 -0
  71. package/dist/special-characters.cjs.js +83 -45
  72. package/dist/special-characters.esm.js +149 -100
  73. package/dist/spell-check.cjs.js +9 -9
  74. package/dist/spell-check.esm.js +235 -216
  75. package/dist/template.cjs.js +14 -14
  76. package/dist/template.esm.js +157 -131
  77. package/dist/text-color.cjs.js +9 -9
  78. package/dist/text-color.esm.js +131 -115
  79. package/dist/track-changes.cjs.js +77 -0
  80. package/dist/track-changes.esm.js +755 -0
  81. package/dist/translation-workflow.cjs.js +626 -0
  82. package/dist/translation-workflow.esm.js +1718 -0
  83. package/dist/version-diff.cjs.js +362 -0
  84. package/dist/version-diff.esm.js +768 -0
  85. package/index.d.ts +849 -1
  86. package/package.json +105 -6
  87. package/dist/colorSelectionApply-C0iOfMWb.js +0 -1
  88. package/dist/colorSelectionApply-D8r_gV32.mjs +0 -63
  89. package/dist/documentManager-DRUc1-Cs.mjs +0 -37581
  90. package/dist/documentManager-_tQQfQi9.js +0 -317
  91. package/dist/index-D3pJyAsj.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@editora/plugins",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "40+ Free Premium Plugins for Editora Rich Text Editor. Table editor, code formatting, accessibility, math, media, and more. Free enterprise plugin collection.",
5
5
  "author": "Ajay Kumar <ajaykr089@gmail.com>",
6
6
  "license": "MIT",
@@ -54,6 +54,12 @@
54
54
  "require": "./dist/lite.cjs.js",
55
55
  "default": "./dist/lite.esm.js"
56
56
  },
57
+ "./enterprise": {
58
+ "types": "./index.d.ts",
59
+ "import": "./dist/enterprise.esm.js",
60
+ "require": "./dist/enterprise.cjs.js",
61
+ "default": "./dist/enterprise.esm.js"
62
+ },
57
63
  "./shared-config": {
58
64
  "types": "./index.d.ts",
59
65
  "import": "./dist/shared-config.esm.js",
@@ -72,6 +78,24 @@
72
78
  "require": "./dist/anchor.cjs.js",
73
79
  "default": "./dist/anchor.esm.js"
74
80
  },
81
+ "./approval-workflow": {
82
+ "types": "./index.d.ts",
83
+ "import": "./dist/approval-workflow.esm.js",
84
+ "require": "./dist/approval-workflow.cjs.js",
85
+ "default": "./dist/approval-workflow.esm.js"
86
+ },
87
+ "./pii-redaction": {
88
+ "types": "./index.d.ts",
89
+ "import": "./dist/pii-redaction.esm.js",
90
+ "require": "./dist/pii-redaction.cjs.js",
91
+ "default": "./dist/pii-redaction.esm.js"
92
+ },
93
+ "./smart-paste": {
94
+ "types": "./index.d.ts",
95
+ "import": "./dist/smart-paste.esm.js",
96
+ "require": "./dist/smart-paste.cjs.js",
97
+ "default": "./dist/smart-paste.esm.js"
98
+ },
75
99
  "./background-color": {
76
100
  "types": "./index.d.ts",
77
101
  "import": "./dist/background-color.esm.js",
@@ -84,6 +108,12 @@
84
108
  "require": "./dist/blockquote.cjs.js",
85
109
  "default": "./dist/blockquote.esm.js"
86
110
  },
111
+ "./blocks-library": {
112
+ "types": "./index.d.ts",
113
+ "import": "./dist/blocks-library.esm.js",
114
+ "require": "./dist/blocks-library.cjs.js",
115
+ "default": "./dist/blocks-library.esm.js"
116
+ },
87
117
  "./bold": {
88
118
  "types": "./index.d.ts",
89
119
  "import": "./dist/bold.esm.js",
@@ -96,6 +126,42 @@
96
126
  "require": "./dist/capitalization.cjs.js",
97
127
  "default": "./dist/capitalization.esm.js"
98
128
  },
129
+ "./conditional-content": {
130
+ "types": "./index.d.ts",
131
+ "import": "./dist/conditional-content.esm.js",
132
+ "require": "./dist/conditional-content.cjs.js",
133
+ "default": "./dist/conditional-content.esm.js"
134
+ },
135
+ "./content-rules": {
136
+ "types": "./index.d.ts",
137
+ "import": "./dist/content-rules.esm.js",
138
+ "require": "./dist/content-rules.cjs.js",
139
+ "default": "./dist/content-rules.esm.js"
140
+ },
141
+ "./citations": {
142
+ "types": "./index.d.ts",
143
+ "import": "./dist/citations.esm.js",
144
+ "require": "./dist/citations.cjs.js",
145
+ "default": "./dist/citations.esm.js"
146
+ },
147
+ "./data-binding": {
148
+ "types": "./index.d.ts",
149
+ "import": "./dist/data-binding.esm.js",
150
+ "require": "./dist/data-binding.cjs.js",
151
+ "default": "./dist/data-binding.esm.js"
152
+ },
153
+ "./doc-schema": {
154
+ "types": "./index.d.ts",
155
+ "import": "./dist/doc-schema.esm.js",
156
+ "require": "./dist/doc-schema.cjs.js",
157
+ "default": "./dist/doc-schema.esm.js"
158
+ },
159
+ "./translation-workflow": {
160
+ "types": "./index.d.ts",
161
+ "import": "./dist/translation-workflow.esm.js",
162
+ "require": "./dist/translation-workflow.cjs.js",
163
+ "default": "./dist/translation-workflow.esm.js"
164
+ },
99
165
  "./checklist": {
100
166
  "types": "./index.d.ts",
101
167
  "import": "./dist/checklist.esm.js",
@@ -228,6 +294,12 @@
228
294
  "require": "./dist/media-manager.cjs.js",
229
295
  "default": "./dist/media-manager.esm.js"
230
296
  },
297
+ "./mentions": {
298
+ "types": "./index.d.ts",
299
+ "import": "./dist/mentions.esm.js",
300
+ "require": "./dist/mentions.cjs.js",
301
+ "default": "./dist/mentions.esm.js"
302
+ },
231
303
  "./merge-tag": {
232
304
  "types": "./index.d.ts",
233
305
  "import": "./dist/merge-tag.esm.js",
@@ -264,6 +336,12 @@
264
336
  "require": "./dist/spell-check.cjs.js",
265
337
  "default": "./dist/spell-check.esm.js"
266
338
  },
339
+ "./slash-commands": {
340
+ "types": "./index.d.ts",
341
+ "import": "./dist/slash-commands.esm.js",
342
+ "require": "./dist/slash-commands.cjs.js",
343
+ "default": "./dist/slash-commands.esm.js"
344
+ },
267
345
  "./strikethrough": {
268
346
  "types": "./index.d.ts",
269
347
  "import": "./dist/strikethrough.esm.js",
@@ -276,6 +354,18 @@
276
354
  "require": "./dist/table.cjs.js",
277
355
  "default": "./dist/table.esm.js"
278
356
  },
357
+ "./track-changes": {
358
+ "types": "./index.d.ts",
359
+ "import": "./dist/track-changes.esm.js",
360
+ "require": "./dist/track-changes.cjs.js",
361
+ "default": "./dist/track-changes.esm.js"
362
+ },
363
+ "./version-diff": {
364
+ "types": "./index.d.ts",
365
+ "import": "./dist/version-diff.esm.js",
366
+ "require": "./dist/version-diff.cjs.js",
367
+ "default": "./dist/version-diff.esm.js"
368
+ },
279
369
  "./template": {
280
370
  "types": "./index.d.ts",
281
371
  "import": "./dist/template.esm.js",
@@ -311,20 +401,29 @@
311
401
  ],
312
402
  "scripts": {
313
403
  "build": "vite build",
314
- "typecheck:build": "tsc -p tsconfig.build.json --noEmit",
404
+ "typecheck:build": "node ../../node_modules/typescript/bin/tsc -p tsconfig.build.json --noEmit",
315
405
  "dev": "vite build --watch",
316
406
  "clean": "rm -rf dist",
317
- "prepublishOnly": "npm run typecheck:build && npm run build"
407
+ "prepublishOnly": "npm run typecheck:build && npm run build",
408
+ "test:content-rules": "node ../../node_modules/jest/bin/jest.js -c ./jest.config.cjs --watchman=false --runTestsByPath ./content-rules/src/ContentRulesPlugin.native.test.js",
409
+ "test:citations": "node ../../node_modules/jest/bin/jest.js -c ./jest.config.cjs --watchman=false --runTestsByPath ./citations/src/CitationsPlugin.native.test.js",
410
+ "test:approval-workflow": "node ../../node_modules/jest/bin/jest.js -c ./jest.config.cjs --watchman=false --runTestsByPath ./approval-workflow/src/ApprovalWorkflowPlugin.native.test.js",
411
+ "test:pii-redaction": "node ../../node_modules/jest/bin/jest.js -c ./jest.config.cjs --watchman=false --runTestsByPath ./pii-redaction/src/PIIRedactionPlugin.native.test.js",
412
+ "test:smart-paste": "node ../../node_modules/jest/bin/jest.js -c ./jest.config.cjs --watchman=false --runTestsByPath ./smart-paste/src/SmartPastePlugin.native.test.js",
413
+ "test:blocks-library": "node ../../node_modules/jest/bin/jest.js -c ./jest.config.cjs --watchman=false --runTestsByPath ./blocks-library/src/BlocksLibraryPlugin.native.test.js",
414
+ "test:doc-schema": "node ../../node_modules/jest/bin/jest.js -c ./jest.config.cjs --watchman=false --runTestsByPath ./doc-schema/src/DocSchemaPlugin.native.test.js",
415
+ "test:translation-workflow": "node ../../node_modules/jest/bin/jest.js -c ./jest.config.cjs --watchman=false --runTestsByPath ./translation-workflow/src/TranslationWorkflowPlugin.native.test.js",
416
+ "verify:citations": "npm run typecheck:build && npm run test:citations && npm run test:content-rules && npm run test:approval-workflow && npm run test:pii-redaction && npm run test:smart-paste && npm run test:blocks-library && npm run test:doc-schema && npm run test:translation-workflow && npm run build"
318
417
  },
319
418
  "peerDependencies": {
320
- "@editora/core": "^1.0.6"
419
+ "@editora/core": "^1.0.7"
321
420
  },
322
421
  "dependencies": {
323
422
  "katex": "^0.16.27",
324
423
  "mathjax": "^3.2.2"
325
424
  },
326
425
  "devDependencies": {
327
- "@editora/core": "^1.0.6",
426
+ "@editora/core": "^1.0.8",
328
427
  "@types/katex": "^0.16.8",
329
428
  "typescript": "^5.0.0",
330
429
  "vite": "^7.3.1"
@@ -332,5 +431,5 @@
332
431
  "publishConfig": {
333
432
  "access": "public"
334
433
  },
335
- "gitHead": "694494db58b809f0dcf24501696284faa1ab68a5"
434
+ "gitHead": "80e0808ae4909de63b8e0f1dd915b06b33a8ed44"
336
435
  }
@@ -1 +0,0 @@
1
- "use strict";const u="p,div,li,ul,ol,table,thead,tbody,tfoot,tr,td,th,h1,h2,h3,h4,h5,h6,blockquote,pre";function i(e){return!!e.cloneContents().querySelector(u)}function s(e,t){return(e?.nodeType===Node.ELEMENT_NODE?e:e?.parentElement??null)?.closest('[contenteditable="true"]')||t()?.querySelector('[contenteditable="true"]')||document.querySelector('[contenteditable="true"]')}function c(e,t){const n=s(e,t);n&&n.dispatchEvent(new Event("input",{bubbles:!0}))}function f(e,t){let o=e.startContainer.nodeType===Node.TEXT_NODE?e.startContainer.parentElement:e.startContainer;for(;o&&o!==document.body;){if(o.classList.contains(t)){const a=document.createRange();if(a.selectNodeContents(o),a.compareBoundaryPoints(Range.START_TO_START,e)<=0&&a.compareBoundaryPoints(Range.END_TO_END,e)>=0)return o}o=o.parentElement}return null}function m(e){try{if(e.savedRange){const r=window.getSelection();r&&(r.removeAllRanges(),r.addRange(e.savedRange.cloneRange()))}const t=window.getSelection();if(!t||t.rangeCount===0||t.isCollapsed)return!1;const n=t.getRangeAt(0);if(n.collapsed)return!1;const o=f(n,e.className);if(o)return e.styleProperty==="backgroundColor"?o.style.backgroundColor=e.color:o.style.color=e.color,c(o,e.getActiveEditorRoot),!0;s(n.commonAncestorContainer,e.getActiveEditorRoot)?.focus({preventScroll:!0});try{document.execCommand("styleWithCSS",!1,"true")}catch{}let l=!1;if(e.commands.forEach(r=>{l||(l=document.execCommand(r,!1,e.color))}),!l&&!i(n)){const r=document.createElement("span");e.styleProperty==="backgroundColor"?r.style.backgroundColor=e.color:r.style.color=e.color,r.className=e.className;const d=n.extractContents();r.appendChild(d),n.insertNode(r),n.setStartAfter(r),n.collapse(!0),t.removeAllRanges(),t.addRange(n),l=!0}return l?(c(n.commonAncestorContainer,e.getActiveEditorRoot),!0):(e.warnMessage&&console.warn(e.warnMessage),!1)}catch(t){return e.warnMessage?console.error(e.warnMessage,t):console.error("[ColorApply] Failed to apply color",t),!1}}exports.applyColorToSelection=m;
@@ -1,63 +0,0 @@
1
- const u = "p,div,li,ul,ol,table,thead,tbody,tfoot,tr,td,th,h1,h2,h3,h4,h5,h6,blockquote,pre";
2
- function i(e) {
3
- return !!e.cloneContents().querySelector(u);
4
- }
5
- function s(e, t) {
6
- return (e?.nodeType === Node.ELEMENT_NODE ? e : e?.parentElement ?? null)?.closest('[contenteditable="true"]') || t()?.querySelector('[contenteditable="true"]') || document.querySelector('[contenteditable="true"]');
7
- }
8
- function c(e, t) {
9
- const n = s(e, t);
10
- n && n.dispatchEvent(new Event("input", { bubbles: !0 }));
11
- }
12
- function f(e, t) {
13
- let o = e.startContainer.nodeType === Node.TEXT_NODE ? e.startContainer.parentElement : e.startContainer;
14
- for (; o && o !== document.body; ) {
15
- if (o.classList.contains(t)) {
16
- const l = document.createRange();
17
- if (l.selectNodeContents(o), l.compareBoundaryPoints(Range.START_TO_START, e) <= 0 && l.compareBoundaryPoints(Range.END_TO_END, e) >= 0)
18
- return o;
19
- }
20
- o = o.parentElement;
21
- }
22
- return null;
23
- }
24
- function m(e) {
25
- try {
26
- if (e.savedRange) {
27
- const r = window.getSelection();
28
- r && (r.removeAllRanges(), r.addRange(e.savedRange.cloneRange()));
29
- }
30
- const t = window.getSelection();
31
- if (!t || t.rangeCount === 0 || t.isCollapsed)
32
- return !1;
33
- const n = t.getRangeAt(0);
34
- if (n.collapsed)
35
- return !1;
36
- const o = f(n, e.className);
37
- if (o)
38
- return e.styleProperty === "backgroundColor" ? o.style.backgroundColor = e.color : o.style.color = e.color, c(o, e.getActiveEditorRoot), !0;
39
- s(
40
- n.commonAncestorContainer,
41
- e.getActiveEditorRoot
42
- )?.focus({ preventScroll: !0 });
43
- try {
44
- document.execCommand("styleWithCSS", !1, "true");
45
- } catch {
46
- }
47
- let a = !1;
48
- if (e.commands.forEach((r) => {
49
- a || (a = document.execCommand(r, !1, e.color));
50
- }), !a && !i(n)) {
51
- const r = document.createElement("span");
52
- e.styleProperty === "backgroundColor" ? r.style.backgroundColor = e.color : r.style.color = e.color, r.className = e.className;
53
- const d = n.extractContents();
54
- r.appendChild(d), n.insertNode(r), n.setStartAfter(r), n.collapse(!0), t.removeAllRanges(), t.addRange(n), a = !0;
55
- }
56
- return a ? (c(n.commonAncestorContainer, e.getActiveEditorRoot), !0) : (e.warnMessage && console.warn(e.warnMessage), !1);
57
- } catch (t) {
58
- return e.warnMessage ? console.error(e.warnMessage, t) : console.error("[ColorApply] Failed to apply color", t), !1;
59
- }
60
- }
61
- export {
62
- m as a
63
- };