@editora/plugins 1.0.8 → 1.0.10
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 +27 -0
- package/dist/_commonjsHelpers-6763f629.js +1 -0
- package/dist/_commonjsHelpers-c5d32002.mjs +30 -0
- package/dist/a11y-checker.cjs.js +12 -12
- package/dist/a11y-checker.esm.js +98 -80
- package/dist/anchor.cjs.js +12 -12
- package/dist/anchor.esm.js +128 -115
- package/dist/anchoredPopover-33f1358d.mjs +109 -0
- package/dist/anchoredPopover-8151d535.js +1 -0
- package/dist/approval-workflow.cjs.js +447 -0
- package/dist/approval-workflow.esm.js +1111 -0
- package/dist/background-color.cjs.js +2 -2
- package/dist/background-color.esm.js +68 -55
- package/dist/blockquote.esm.js +2 -1
- package/dist/blocks-library.cjs.js +442 -0
- package/dist/blocks-library.esm.js +1384 -0
- package/dist/capitalization.esm.js +2 -1
- package/dist/checklist.cjs.js +1 -1
- package/dist/checklist.esm.js +82 -58
- package/dist/citations.cjs.js +548 -0
- package/dist/citations.esm.js +1530 -0
- package/dist/clear-formatting.cjs.js +1 -1
- package/dist/clear-formatting.esm.js +33 -27
- package/dist/code-sample.cjs.js +14 -14
- package/dist/code-sample.esm.js +93 -82
- package/dist/code.cjs.js +32 -32
- package/dist/code.esm.js +653 -594
- package/dist/comments.cjs.js +6 -6
- package/dist/comments.esm.js +158 -116
- package/dist/conditional-content.cjs.js +626 -0
- package/dist/conditional-content.esm.js +1421 -0
- package/dist/content-rules.cjs.js +408 -0
- package/dist/content-rules.esm.js +1147 -0
- package/dist/data-binding.cjs.js +321 -0
- package/dist/data-binding.esm.js +953 -0
- package/dist/direction.esm.js +18 -9
- package/dist/doc-schema.cjs.js +398 -0
- package/dist/doc-schema.esm.js +1378 -0
- package/dist/document-manager.cjs.js +1 -1
- package/dist/document-manager.esm.js +5 -4
- package/dist/documentManager-25b6203c.mjs +9122 -0
- package/dist/documentManager-b69e7054.js +17 -0
- package/dist/{editorContainerHelpers-C7kdWnS0.mjs → editorContainerHelpers-69585c07.mjs} +2 -1
- package/dist/embed-iframe.cjs.js +4 -4
- package/dist/embed-iframe.esm.js +81 -73
- package/dist/emojis.cjs.js +8 -8
- package/dist/emojis.esm.js +77 -65
- package/dist/enterprise.cjs.js +1 -0
- package/dist/enterprise.esm.js +58 -0
- package/dist/font-family.cjs.js +1 -1
- package/dist/font-family.esm.js +47 -39
- package/dist/font-size.cjs.js +1 -1
- package/dist/font-size.esm.js +53 -37
- package/dist/footnote.cjs.js +2 -2
- package/dist/footnote.esm.js +117 -76
- package/dist/history.cjs.js +1 -1
- package/dist/history.esm.js +92 -70
- package/dist/html2canvas.esm-09133e29.js +22 -0
- package/dist/{html2canvas.esm-BWVIUcAF.mjs → html2canvas.esm-1a1724a1.mjs} +225 -141
- package/dist/indent.cjs.js +1 -1
- package/dist/indent.esm.js +24 -12
- package/dist/index-656d224b.js +231 -0
- package/dist/index-6a8c48bb.js +1 -0
- package/dist/index-d027b7e2.mjs +16859 -0
- package/dist/{index-BFsKNTTj.mjs → index-f04538f2.mjs} +71 -70
- package/dist/index.cjs.js +1 -1
- package/dist/index.es-730f2d98.mjs +5775 -0
- package/dist/index.es-dd40173b.js +18 -0
- package/dist/index.esm.js +124 -93
- package/dist/italic.cjs.js +1 -1
- package/dist/italic.esm.js +9 -8
- package/dist/jspdf.es.min-90db2c97.js +243 -0
- package/dist/{jspdf.es.min-DQCoX5yh.mjs → jspdf.es.min-c36a4fd8.mjs} +4682 -3658
- package/dist/line-height.cjs.js +1 -1
- package/dist/line-height.esm.js +24 -11
- package/dist/link.cjs.js +5 -5
- package/dist/link.esm.js +30 -24
- package/dist/list.cjs.js +1 -1
- package/dist/list.esm.js +25 -20
- package/dist/lite.cjs.js +1 -1
- package/dist/lite.esm.js +61 -59
- package/dist/math.cjs.js +21 -21
- package/dist/math.esm.js +146 -139
- package/dist/media-manager.cjs.js +38 -38
- package/dist/media-manager.esm.js +325 -308
- package/dist/mentions.cjs.js +105 -0
- package/dist/mentions.esm.js +774 -0
- package/dist/merge-tag.cjs.js +2 -2
- package/dist/merge-tag.esm.js +216 -177
- package/dist/page-break.cjs.js +2 -2
- package/dist/page-break.esm.js +67 -51
- package/dist/pii-redaction.cjs.js +436 -0
- package/dist/pii-redaction.esm.js +1447 -0
- package/dist/preview.cjs.js +3 -3
- package/dist/preview.esm.js +37 -32
- package/dist/print.cjs.js +4 -4
- package/dist/print.esm.js +20 -17
- package/dist/{purify.es-DHhaBdbu.mjs → purify.es-35a15df8.mjs} +19 -9
- package/dist/{purify.es-T2a3nLiC.js → purify.es-a8d731c6.js} +1 -1
- package/dist/slash-commands.cjs.js +90 -0
- package/dist/slash-commands.esm.js +788 -0
- package/dist/smart-paste.cjs.js +398 -0
- package/dist/smart-paste.esm.js +1444 -0
- package/dist/special-characters.cjs.js +7 -7
- package/dist/special-characters.esm.js +69 -61
- package/dist/spell-check.cjs.js +5 -5
- package/dist/spell-check.esm.js +123 -97
- package/dist/strikethrough.cjs.js +1 -1
- package/dist/strikethrough.esm.js +19 -14
- package/dist/style.css +1 -0
- package/dist/table.cjs.js +4 -4
- package/dist/table.esm.js +225 -191
- package/dist/template.cjs.js +11 -11
- package/dist/template.esm.js +153 -124
- package/dist/text-alignment.cjs.js +1 -1
- package/dist/text-alignment.esm.js +27 -21
- package/dist/text-color.cjs.js +3 -3
- package/dist/text-color.esm.js +87 -70
- package/dist/track-changes.cjs.js +77 -0
- package/dist/track-changes.esm.js +817 -0
- package/dist/translation-workflow.cjs.js +626 -0
- package/dist/translation-workflow.esm.js +1794 -0
- package/dist/version-diff.cjs.js +362 -0
- package/dist/version-diff.esm.js +797 -0
- package/index.d.ts +798 -0
- package/package.json +114 -9
- package/dist/_commonjsHelpers-BH3jXuIh.js +0 -1
- package/dist/_commonjsHelpers-ByX85dGu.mjs +0 -33
- package/dist/anchoredPopover-BzqGPOAE.js +0 -1
- package/dist/anchoredPopover-Dts0IrgU.mjs +0 -106
- package/dist/documentManager-CTqRftU8.mjs +0 -8369
- package/dist/documentManager-Jf0RbSks.js +0 -17
- package/dist/html2canvas.esm-B5qzocYs.js +0 -5
- package/dist/index-CvJk4DKa.js +0 -221
- package/dist/index-D3CycEFU.mjs +0 -16543
- package/dist/index-tqLTHcO6.js +0 -1
- package/dist/index.es-CE_A4QSm.js +0 -5
- package/dist/index.es-DQ78mYYo.mjs +0 -6665
- package/dist/jspdf.es.min-BoS80556.js +0 -77
- package/dist/plugins.css +0 -1
- /package/dist/{editorContainerHelpers-CFbfiOJI.js → editorContainerHelpers-36b8ddf3.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getGlobalApiConfig as
|
|
2
|
-
const
|
|
1
|
+
import { getGlobalApiConfig as s, buildApiUrl as u, getGlobalApiHeaders as p } from "./shared-config.esm.js";
|
|
2
|
+
const g = () => ({
|
|
3
3
|
name: "document-manager",
|
|
4
4
|
toolbar: [
|
|
5
5
|
{
|
|
@@ -23,93 +23,94 @@ const m = () => ({
|
|
|
23
23
|
],
|
|
24
24
|
commands: {
|
|
25
25
|
importWord: () => {
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
29
|
-
let
|
|
30
|
-
for (;
|
|
31
|
-
if (
|
|
32
|
-
const i =
|
|
26
|
+
const a = () => {
|
|
27
|
+
const e = window.getSelection();
|
|
28
|
+
if (e && e.rangeCount > 0) {
|
|
29
|
+
let r = e.getRangeAt(0).startContainer;
|
|
30
|
+
for (; r && r !== document.body; ) {
|
|
31
|
+
if (r.nodeType === Node.ELEMENT_NODE) {
|
|
32
|
+
const i = r;
|
|
33
33
|
if (i.getAttribute("contenteditable") === "true")
|
|
34
34
|
return i;
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
r = r.parentNode;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
const n = document.activeElement;
|
|
40
|
-
if (n
|
|
40
|
+
if ((n == null ? void 0 : n.getAttribute("contenteditable")) === "true")
|
|
41
41
|
return n;
|
|
42
|
-
const
|
|
43
|
-
return
|
|
44
|
-
},
|
|
45
|
-
return
|
|
46
|
-
|
|
42
|
+
const o = n == null ? void 0 : n.closest('[contenteditable="true"]');
|
|
43
|
+
return o || document.querySelector('[contenteditable="true"]');
|
|
44
|
+
}, t = document.createElement("input");
|
|
45
|
+
return t.type = "file", t.accept = ".docx", t.onchange = async (e) => {
|
|
46
|
+
var o;
|
|
47
|
+
const n = (o = e.target.files) == null ? void 0 : o[0];
|
|
47
48
|
if (n)
|
|
48
49
|
try {
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
51
|
-
const { importFromWord:
|
|
52
|
-
|
|
50
|
+
const r = a();
|
|
51
|
+
if (r) {
|
|
52
|
+
const { importFromWord: i } = await import("./documentManager-25b6203c.mjs"), c = await i(n);
|
|
53
|
+
r.innerHTML = c, r.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
53
54
|
}
|
|
54
|
-
} catch (
|
|
55
|
-
console.error("Import failed:",
|
|
55
|
+
} catch (r) {
|
|
56
|
+
console.error("Import failed:", r), alert("Failed to import Word document. Please check the console for details.");
|
|
56
57
|
}
|
|
57
|
-
},
|
|
58
|
+
}, t.click(), !0;
|
|
58
59
|
},
|
|
59
60
|
exportWord: async () => {
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
63
|
-
let
|
|
64
|
-
for (;
|
|
65
|
-
if (
|
|
66
|
-
return
|
|
67
|
-
|
|
61
|
+
const a = () => {
|
|
62
|
+
const t = window.getSelection();
|
|
63
|
+
if (t && t.rangeCount > 0) {
|
|
64
|
+
let o = t.getRangeAt(0).startContainer;
|
|
65
|
+
for (; o && o !== document.body; ) {
|
|
66
|
+
if (o.nodeType === Node.ELEMENT_NODE && o.getAttribute("contenteditable") === "true")
|
|
67
|
+
return o;
|
|
68
|
+
o = o.parentNode;
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
|
-
const
|
|
71
|
-
return
|
|
71
|
+
const e = document.activeElement;
|
|
72
|
+
return (e == null ? void 0 : e.getAttribute("contenteditable")) === "true" ? e : (e == null ? void 0 : e.closest('[contenteditable="true"]')) || document.querySelector('[contenteditable="true"]');
|
|
72
73
|
};
|
|
73
74
|
try {
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
const
|
|
77
|
-
await n(
|
|
75
|
+
const t = a();
|
|
76
|
+
if (t) {
|
|
77
|
+
const e = t.innerHTML, { exportToWord: n } = await import("./documentManager-25b6203c.mjs");
|
|
78
|
+
await n(e, "document.docx");
|
|
78
79
|
}
|
|
79
80
|
return !0;
|
|
80
|
-
} catch (
|
|
81
|
-
return console.error("Export failed:",
|
|
81
|
+
} catch (t) {
|
|
82
|
+
return console.error("Export failed:", t), alert("Failed to export to Word. Please check the console for details."), !1;
|
|
82
83
|
}
|
|
83
84
|
},
|
|
84
85
|
exportPdf: async () => {
|
|
85
|
-
const
|
|
86
|
-
const
|
|
87
|
-
if (
|
|
88
|
-
let
|
|
89
|
-
for (;
|
|
90
|
-
if (
|
|
91
|
-
return
|
|
92
|
-
|
|
86
|
+
const a = () => {
|
|
87
|
+
const t = window.getSelection();
|
|
88
|
+
if (t && t.rangeCount > 0) {
|
|
89
|
+
let o = t.getRangeAt(0).startContainer;
|
|
90
|
+
for (; o && o !== document.body; ) {
|
|
91
|
+
if (o.nodeType === Node.ELEMENT_NODE && o.getAttribute("contenteditable") === "true")
|
|
92
|
+
return o;
|
|
93
|
+
o = o.parentNode;
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
|
-
const
|
|
96
|
-
return
|
|
96
|
+
const e = document.activeElement;
|
|
97
|
+
return (e == null ? void 0 : e.getAttribute("contenteditable")) === "true" ? e : (e == null ? void 0 : e.closest('[contenteditable="true"]')) || document.querySelector('[contenteditable="true"]');
|
|
97
98
|
};
|
|
98
99
|
try {
|
|
99
|
-
const
|
|
100
|
-
if (
|
|
101
|
-
const
|
|
102
|
-
await n(
|
|
100
|
+
const t = a();
|
|
101
|
+
if (t) {
|
|
102
|
+
const e = t.innerHTML, { exportToPdf: n } = await import("./documentManager-25b6203c.mjs");
|
|
103
|
+
await n(e, "document.pdf", t);
|
|
103
104
|
} else
|
|
104
105
|
console.error("PDF Export: No editor element found"), alert("No active editor found. Please click in the editor area first.");
|
|
105
106
|
return !0;
|
|
106
|
-
} catch (
|
|
107
|
-
return console.error("PDF Export: Export failed:",
|
|
107
|
+
} catch (t) {
|
|
108
|
+
return console.error("PDF Export: Export failed:", t), alert("Failed to export to PDF. Please check the console for details."), !1;
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
},
|
|
111
112
|
keymap: {}
|
|
112
|
-
}),
|
|
113
|
+
}), h = {
|
|
113
114
|
apiEndpoints: {
|
|
114
115
|
exportWord: "/documents/export-word"
|
|
115
116
|
},
|
|
@@ -121,25 +122,25 @@ const m = () => ({
|
|
|
121
122
|
useClientSideFallback: !0
|
|
122
123
|
// Enable fallback by default
|
|
123
124
|
};
|
|
124
|
-
let l = { ...
|
|
125
|
-
function
|
|
126
|
-
l = { ...l, ...
|
|
125
|
+
let l = { ...h };
|
|
126
|
+
function m(a) {
|
|
127
|
+
l = { ...l, ...a };
|
|
127
128
|
}
|
|
128
|
-
function
|
|
129
|
+
function d() {
|
|
129
130
|
return { ...l };
|
|
130
131
|
}
|
|
131
|
-
function v(
|
|
132
|
-
const
|
|
133
|
-
return
|
|
132
|
+
function v(a) {
|
|
133
|
+
const t = d(), e = s(), n = t.apiUrl || e.apiUrl;
|
|
134
|
+
return u(n, t.apiEndpoints[a]);
|
|
134
135
|
}
|
|
135
|
-
function
|
|
136
|
-
const
|
|
137
|
-
return { ...
|
|
136
|
+
function b() {
|
|
137
|
+
const a = p(), e = d().headers || {};
|
|
138
|
+
return { ...a, ...e };
|
|
138
139
|
}
|
|
139
140
|
export {
|
|
140
|
-
|
|
141
|
+
g as D,
|
|
141
142
|
v as a,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
b,
|
|
144
|
+
d as g,
|
|
145
|
+
m as s
|
|
145
146
|
};
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./heading.cjs.js"),r=require("./bold.cjs.js"),o=require("./italic.cjs.js"),u=require("./underline.cjs.js"),g=require("./strikethrough.cjs.js"),a=require("./list.cjs.js"),s=require("./checklist.cjs.js"),P=require("./history.cjs.js"),c=require("./link.cjs.js"),m=require("./blockquote.cjs.js"),d=require("./clear-formatting.cjs.js"),q=require("./code.cjs.js"),C=require("./table.cjs.js"),p=require("./font-size.cjs.js"),h=require("./font-family.cjs.js"),k=require("./text-alignment.cjs.js"),T=require("./text-color.cjs.js"),f=require("./background-color.cjs.js"),M=require("./line-height.cjs.js"),b=require("./indent.cjs.js"),S=require("./direction.cjs.js"),A=require("./capitalization.cjs.js"),D=require("./math.cjs.js"),y=require("./special-characters.cjs.js"),B=require("./emojis.cjs.js"),F=require("./embed-iframe.cjs.js"),E=require("./anchor.cjs.js"),I=require("./mentions.cjs.js"),v=require("./track-changes.cjs.js"),L=require("./version-diff.cjs.js"),w=require("./conditional-content.cjs.js"),H=require("./data-binding.cjs.js"),z=require("./content-rules.cjs.js"),R=require("./citations.cjs.js"),x=require("./approval-workflow.cjs.js"),G=require("./pii-redaction.cjs.js"),W=require("./smart-paste.cjs.js"),j=require("./blocks-library.cjs.js"),U=require("./doc-schema.cjs.js"),_=require("./translation-workflow.cjs.js"),N=require("./slash-commands.cjs.js"),n=require("./media-manager.cjs.js"),t=require("./index-6a8c48bb.js"),V=require("./preview.cjs.js"),O=require("./fullscreen.cjs.js"),J=require("./print.cjs.js"),K=require("./page-break.cjs.js"),Q=require("./footnote.cjs.js"),X=require("./code-sample.cjs.js"),Y=require("./merge-tag.cjs.js"),e=require("./template.cjs.js"),Z=require("./comments.cjs.js"),$=require("./spell-check.cjs.js"),ee=require("./a11y-checker.cjs.js"),i=require("./shared-config.cjs.js");require("./editorContainerHelpers-36b8ddf3.js");require("./anchoredPopover-8151d535.js");require("./purify.es-a8d731c6.js");exports.HeadingPlugin=l.HeadingPlugin;exports.BoldPlugin=r.BoldPlugin;exports.ItalicPlugin=o.ItalicPlugin;exports.UnderlinePlugin=u.UnderlinePlugin;exports.StrikethroughPlugin=g.StrikethroughPlugin;exports.ListPlugin=a.ListPlugin;exports.ChecklistPlugin=s.ChecklistPlugin;exports.HistoryPlugin=P.HistoryPlugin;exports.LinkPlugin=c.LinkPlugin;exports.BlockquotePlugin=m.BlockquotePlugin;exports.ClearFormattingPlugin=d.ClearFormattingPlugin;exports.CodePlugin=q.CodePlugin;exports.TablePlugin=C.TablePlugin;exports.FontSizePlugin=p.FontSizePlugin;exports.FontFamilyPlugin=h.FontFamilyPlugin;exports.TextAlignmentPlugin=k.TextAlignmentPlugin;exports.TextColorPlugin=T.TextColorPlugin;exports.BackgroundColorPlugin=f.BackgroundColorPlugin;exports.LineHeightPlugin=M.LineHeightPlugin;exports.IndentPlugin=b.IndentPlugin;exports.DirectionPlugin=S.DirectionPlugin;exports.CapitalizationPlugin=A.CapitalizationPlugin;exports.MathPlugin=D.MathPlugin;exports.SpecialCharactersPlugin=y.SpecialCharactersPlugin;exports.EmojisPlugin=B.EmojisPlugin;exports.EmbedIframePlugin=F.EmbedIframePlugin;exports.AnchorPlugin=E.AnchorPlugin;exports.MentionPlugin=I.MentionPlugin;exports.TrackChangesPlugin=v.TrackChangesPlugin;exports.VersionDiffPlugin=L.VersionDiffPlugin;exports.ConditionalContentPlugin=w.ConditionalContentPlugin;exports.DataBindingPlugin=H.DataBindingPlugin;exports.ContentRulesPlugin=z.ContentRulesPlugin;exports.CitationsPlugin=R.CitationsPlugin;exports.ApprovalWorkflowPlugin=x.ApprovalWorkflowPlugin;exports.PIIRedactionPlugin=G.PIIRedactionPlugin;exports.SmartPastePlugin=W.SmartPastePlugin;exports.BlocksLibraryPlugin=j.BlocksLibraryPlugin;exports.DocSchemaPlugin=U.DocSchemaPlugin;exports.TranslationWorkflowPlugin=_.TranslationWorkflowPlugin;exports.SlashCommandsPlugin=N.SlashCommandsPlugin;exports.MediaManagerPlugin=n.MediaManagerPlugin;exports.getMediaManagerConfig=n.getMediaManagerConfig;exports.setMediaManagerConfig=n.setMediaManagerConfig;exports.DocumentManagerPlugin=t.DocumentManagerPlugin;exports.getDocumentManagerConfig=t.getDocumentManagerConfig;exports.setDocumentManagerConfig=t.setDocumentManagerConfig;exports.PreviewPlugin=V.PreviewPlugin;exports.FullscreenPlugin=O.FullscreenPlugin;exports.PrintPlugin=J.PrintPlugin;exports.PageBreakPlugin=K.PageBreakPlugin;exports.FootnotePlugin=Q.FootnotePlugin;exports.CodeSamplePlugin=X.CodeSamplePlugin;exports.MergeTagPlugin=Y.MergeTagPlugin;exports.PREDEFINED_TEMPLATES=e.PREDEFINED_TEMPLATES;exports.TemplatePlugin=e.TemplatePlugin;exports.addCustomTemplate=e.addCustomTemplate;exports.getAllTemplates=e.getAllTemplates;exports.getTemplateCategories=e.getTemplateCategories;exports.getTemplatesByCategory=e.getTemplatesByCategory;exports.sanitizeTemplate=e.sanitizeTemplate;exports.searchTemplates=e.searchTemplates;exports.validateTemplate=e.validateTemplate;exports.CommentsPlugin=Z.CommentsPlugin;exports.SpellCheckPlugin=$.SpellCheckPlugin;exports.A11yCheckerPlugin=ee.A11yCheckerPlugin;exports.buildApiUrl=i.buildApiUrl;exports.getGlobalApiConfig=i.getGlobalApiConfig;exports.getGlobalApiHeaders=i.getGlobalApiHeaders;exports.setGlobalApiConfig=i.setGlobalApiConfig;
|