@editora/plugins 1.1.0 → 1.2.0

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./mentions.cjs.js"),t=require("./track-changes.cjs.js"),o=require("./version-diff.cjs.js"),l=require("./conditional-content.cjs.js"),r=require("./data-binding.cjs.js"),g=require("./content-rules.cjs.js"),u=require("./citations.cjs.js"),s=require("./approval-workflow.cjs.js"),c=require("./pii-redaction.cjs.js"),P=require("./smart-paste.cjs.js"),m=require("./blocks-library.cjs.js"),C=require("./doc-schema.cjs.js"),d=require("./translation-workflow.cjs.js"),M=require("./slash-commands.cjs.js"),p=require("./spell-check.cjs.js"),T=require("./a11y-checker.cjs.js"),q=require("./comments.cjs.js"),f=require("./merge-tag.cjs.js"),e=require("./template.cjs.js"),n=require("./MediaManagerPlugin.native-CycfjOi4.js"),i=require("./index-CtR8olYy.js"),k=require("./collaboration.cjs.js");exports.MentionPlugin=a.MentionPlugin;exports.TrackChangesPlugin=t.TrackChangesPlugin;exports.VersionDiffPlugin=o.VersionDiffPlugin;exports.ConditionalContentPlugin=l.ConditionalContentPlugin;exports.DataBindingPlugin=r.DataBindingPlugin;exports.ContentRulesPlugin=g.ContentRulesPlugin;exports.CitationsPlugin=u.CitationsPlugin;exports.ApprovalWorkflowPlugin=s.ApprovalWorkflowPlugin;exports.PIIRedactionPlugin=c.PIIRedactionPlugin;exports.SmartPastePlugin=P.SmartPastePlugin;exports.BlocksLibraryPlugin=m.BlocksLibraryPlugin;exports.DocSchemaPlugin=C.DocSchemaPlugin;exports.TranslationWorkflowPlugin=d.TranslationWorkflowPlugin;exports.SlashCommandsPlugin=M.SlashCommandsPlugin;exports.SpellCheckPlugin=p.SpellCheckPlugin;exports.A11yCheckerPlugin=T.A11yCheckerPlugin;exports.CommentsPlugin=q.CommentsPlugin;exports.MergeTagPlugin=f.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.MediaManagerPlugin=n.MediaManagerPlugin;exports.getMediaManagerConfig=n.getMediaManagerConfig;exports.setMediaManagerConfig=n.setMediaManagerConfig;exports.DocumentManagerPlugin=i.DocumentManagerPlugin;exports.getDocumentManagerConfig=i.getDocumentManagerConfig;exports.setDocumentManagerConfig=i.setDocumentManagerConfig;exports.CollaborationPlugin=k.CollaborationPlugin;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./mentions.cjs.js"),o=require("./track-changes.cjs.js"),r=require("./version-diff.cjs.js"),l=require("./conditional-content.cjs.js"),g=require("./data-binding.cjs.js"),u=require("./content-rules.cjs.js"),s=require("./citations.cjs.js"),m=require("./approval-workflow.cjs.js"),c=require("./pii-redaction.cjs.js"),P=require("./smart-paste.cjs.js"),C=require("./blocks-library.cjs.js"),d=require("./doc-schema.cjs.js"),T=require("./translation-workflow.cjs.js"),p=require("./slash-commands.cjs.js"),M=require("./spell-check.cjs.js"),h=require("./a11y-checker.cjs.js"),n=require("./comments.cjs.js"),f=require("./merge-tag.cjs.js"),e=require("./template.cjs.js"),t=require("./MediaManagerPlugin.native-CycfjOi4.js"),i=require("./index-CtR8olYy.js"),q=require("./collaboration.cjs.js");exports.MentionPlugin=a.MentionPlugin;exports.TrackChangesPlugin=o.TrackChangesPlugin;exports.VersionDiffPlugin=r.VersionDiffPlugin;exports.ConditionalContentPlugin=l.ConditionalContentPlugin;exports.DataBindingPlugin=g.DataBindingPlugin;exports.ContentRulesPlugin=u.ContentRulesPlugin;exports.CitationsPlugin=s.CitationsPlugin;exports.ApprovalWorkflowPlugin=m.ApprovalWorkflowPlugin;exports.PIIRedactionPlugin=c.PIIRedactionPlugin;exports.SmartPastePlugin=P.SmartPastePlugin;exports.BlocksLibraryPlugin=C.BlocksLibraryPlugin;exports.DocSchemaPlugin=d.DocSchemaPlugin;exports.TranslationWorkflowPlugin=T.TranslationWorkflowPlugin;exports.SlashCommandsPlugin=p.SlashCommandsPlugin;exports.SpellCheckPlugin=M.SpellCheckPlugin;exports.A11yCheckerPlugin=h.A11yCheckerPlugin;exports.CommentsPlugin=n.CommentsPlugin;exports.configureComments=n.configureComments;exports.getCommentThreads=n.getCommentThreads;exports.removeCommentThread=n.removeCommentThread;exports.setCommentThreads=n.setCommentThreads;exports.upsertCommentThread=n.upsertCommentThread;exports.MergeTagPlugin=f.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.MediaManagerPlugin=t.MediaManagerPlugin;exports.getMediaManagerConfig=t.getMediaManagerConfig;exports.setMediaManagerConfig=t.setMediaManagerConfig;exports.DocumentManagerPlugin=i.DocumentManagerPlugin;exports.getDocumentManagerConfig=i.getDocumentManagerConfig;exports.setDocumentManagerConfig=i.setDocumentManagerConfig;exports.CollaborationPlugin=q.CollaborationPlugin;
@@ -1,58 +1,63 @@
1
1
  import { MentionPlugin as r } from "./mentions.esm.js";
2
- import { TrackChangesPlugin as a } from "./track-changes.esm.js";
3
- import { VersionDiffPlugin as i } from "./version-diff.esm.js";
4
- import { ConditionalContentPlugin as l } from "./conditional-content.esm.js";
2
+ import { TrackChangesPlugin as n } from "./track-changes.esm.js";
3
+ import { VersionDiffPlugin as m } from "./version-diff.esm.js";
4
+ import { ConditionalContentPlugin as i } from "./conditional-content.esm.js";
5
5
  import { DataBindingPlugin as p } from "./data-binding.esm.js";
6
- import { ContentRulesPlugin as s } from "./content-rules.esm.js";
6
+ import { ContentRulesPlugin as f } from "./content-rules.esm.js";
7
7
  import { CitationsPlugin as P } from "./citations.esm.js";
8
8
  import { ApprovalWorkflowPlugin as C } from "./approval-workflow.esm.js";
9
- import { PIIRedactionPlugin as T } from "./pii-redaction.esm.js";
10
- import { SmartPastePlugin as d } from "./smart-paste.esm.js";
11
- import { BlocksLibraryPlugin as h } from "./blocks-library.esm.js";
9
+ import { PIIRedactionPlugin as d } from "./pii-redaction.esm.js";
10
+ import { SmartPastePlugin as c } from "./smart-paste.esm.js";
11
+ import { BlocksLibraryPlugin as D } from "./blocks-library.esm.js";
12
12
  import { DocSchemaPlugin as E } from "./doc-schema.esm.js";
13
13
  import { TranslationWorkflowPlugin as y } from "./translation-workflow.esm.js";
14
- import { SlashCommandsPlugin as B } from "./slash-commands.esm.js";
15
- import { SpellCheckPlugin as R } from "./spell-check.esm.js";
16
- import { A11yCheckerPlugin as v } from "./a11y-checker.esm.js";
17
- import { CommentsPlugin as L } from "./comments.esm.js";
18
- import { MergeTagPlugin as z } from "./merge-tag.esm.js";
19
- import { PREDEFINED_TEMPLATES as N, TemplatePlugin as V, addCustomTemplate as _, getAllTemplates as j, getTemplateCategories as q, getTemplatesByCategory as G, sanitizeTemplate as H, searchTemplates as J, validateTemplate as K } from "./template.esm.js";
20
- import { M as Q, g as U, s as X } from "./MediaManagerPlugin.native-DZrmcmnm.mjs";
21
- import { D as Z, g as $, s as ee } from "./index-Du_Ljqfz.mjs";
22
- import { CollaborationPlugin as re } from "./collaboration.esm.js";
14
+ import { SlashCommandsPlugin as v } from "./slash-commands.esm.js";
15
+ import { SpellCheckPlugin as I } from "./spell-check.esm.js";
16
+ import { A11yCheckerPlugin as b } from "./a11y-checker.esm.js";
17
+ import { CommentsPlugin as L, configureComments as W, getCommentThreads as z, removeCommentThread as F, setCommentThreads as N, upsertCommentThread as V } from "./comments.esm.js";
18
+ import { MergeTagPlugin as j } from "./merge-tag.esm.js";
19
+ import { PREDEFINED_TEMPLATES as G, TemplatePlugin as H, addCustomTemplate as J, getAllTemplates as K, getTemplateCategories as O, getTemplatesByCategory as Q, sanitizeTemplate as U, searchTemplates as X, validateTemplate as Y } from "./template.esm.js";
20
+ import { M as $, g as ee, s as oe } from "./MediaManagerPlugin.native-DZrmcmnm.mjs";
21
+ import { D as te, g as ne, s as ae } from "./index-Du_Ljqfz.mjs";
22
+ import { CollaborationPlugin as ge } from "./collaboration.esm.js";
23
23
  export {
24
- v as A11yCheckerPlugin,
24
+ b as A11yCheckerPlugin,
25
25
  C as ApprovalWorkflowPlugin,
26
- h as BlocksLibraryPlugin,
26
+ D as BlocksLibraryPlugin,
27
27
  P as CitationsPlugin,
28
- re as CollaborationPlugin,
28
+ ge as CollaborationPlugin,
29
29
  L as CommentsPlugin,
30
- l as ConditionalContentPlugin,
31
- s as ContentRulesPlugin,
30
+ i as ConditionalContentPlugin,
31
+ f as ContentRulesPlugin,
32
32
  p as DataBindingPlugin,
33
33
  E as DocSchemaPlugin,
34
- Z as DocumentManagerPlugin,
35
- Q as MediaManagerPlugin,
34
+ te as DocumentManagerPlugin,
35
+ $ as MediaManagerPlugin,
36
36
  r as MentionPlugin,
37
- z as MergeTagPlugin,
38
- T as PIIRedactionPlugin,
39
- N as PREDEFINED_TEMPLATES,
40
- B as SlashCommandsPlugin,
41
- d as SmartPastePlugin,
42
- R as SpellCheckPlugin,
43
- V as TemplatePlugin,
44
- a as TrackChangesPlugin,
37
+ j as MergeTagPlugin,
38
+ d as PIIRedactionPlugin,
39
+ G as PREDEFINED_TEMPLATES,
40
+ v as SlashCommandsPlugin,
41
+ c as SmartPastePlugin,
42
+ I as SpellCheckPlugin,
43
+ H as TemplatePlugin,
44
+ n as TrackChangesPlugin,
45
45
  y as TranslationWorkflowPlugin,
46
- i as VersionDiffPlugin,
47
- _ as addCustomTemplate,
48
- j as getAllTemplates,
49
- $ as getDocumentManagerConfig,
50
- U as getMediaManagerConfig,
51
- q as getTemplateCategories,
52
- G as getTemplatesByCategory,
53
- H as sanitizeTemplate,
54
- J as searchTemplates,
55
- ee as setDocumentManagerConfig,
56
- X as setMediaManagerConfig,
57
- K as validateTemplate
46
+ m as VersionDiffPlugin,
47
+ J as addCustomTemplate,
48
+ W as configureComments,
49
+ K as getAllTemplates,
50
+ z as getCommentThreads,
51
+ ne as getDocumentManagerConfig,
52
+ ee as getMediaManagerConfig,
53
+ O as getTemplateCategories,
54
+ Q as getTemplatesByCategory,
55
+ F as removeCommentThread,
56
+ U as sanitizeTemplate,
57
+ X as searchTemplates,
58
+ N as setCommentThreads,
59
+ ae as setDocumentManagerConfig,
60
+ oe as setMediaManagerConfig,
61
+ V as upsertCommentThread,
62
+ Y as validateTemplate
58
63
  };
package/dist/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./heading.cjs.js"),l=require("./bold.cjs.js"),o=require("./italic.cjs.js"),a=require("./underline.cjs.js"),u=require("./strikethrough.cjs.js"),g=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"),C=require("./CodePlugin.native-BwhZsI5v.js"),q=require("./table.cjs.js"),p=require("./font-size.cjs.js"),h=require("./format-painter.cjs.js"),k=require("./font-family.cjs.js"),f=require("./text-alignment.cjs.js"),M=require("./text-color.cjs.js"),T=require("./background-color.cjs.js"),b=require("./line-height.cjs.js"),S=require("./indent.cjs.js"),A=require("./direction.cjs.js"),v=require("./capitalization.cjs.js"),D=require("./math.cjs.js"),B=require("./special-characters.cjs.js"),E=require("./emojis.cjs.js"),F=require("./embed-iframe.cjs.js"),y=require("./anchor.cjs.js"),I=require("./mentions.cjs.js"),L=require("./track-changes.cjs.js"),R=require("./version-diff.cjs.js"),w=require("./conditional-content.cjs.js"),H=require("./data-binding.cjs.js"),z=require("./content-rules.cjs.js"),U=require("./citations.cjs.js"),x=require("./approval-workflow.cjs.js"),G=require("./pii-redaction.cjs.js"),W=require("./smart-paste.cjs.js"),_=require("./blocks-library.cjs.js"),j=require("./doc-schema.cjs.js"),N=require("./translation-workflow.cjs.js"),V=require("./slash-commands.cjs.js"),i=require("./MediaManagerPlugin.native-CycfjOi4.js"),O=require("./media-manager.cjs.js"),r=require("./index-CtR8olYy.js"),J=require("./preview.cjs.js"),K=require("./fullscreen.cjs.js"),Q=require("./print.cjs.js"),X=require("./page-break.cjs.js"),Y=require("./footnote.cjs.js"),Z=require("./code-sample.cjs.js"),$=require("./merge-tag.cjs.js"),e=require("./template.cjs.js"),ee=require("./comments.cjs.js"),ie=require("./collaboration.cjs.js"),ne=require("./spell-check.cjs.js"),re=require("./a11y-checker.cjs.js"),n=require("./shared-config.cjs.js");exports.HeadingPlugin=t.HeadingPlugin;exports.BoldPlugin=l.BoldPlugin;exports.ItalicPlugin=o.ItalicPlugin;exports.UnderlinePlugin=a.UnderlinePlugin;exports.StrikethroughPlugin=u.StrikethroughPlugin;exports.ListPlugin=g.ListPlugin;exports.ChecklistPlugin=s.ChecklistPlugin;exports.HistoryPlugin=P.HistoryPlugin;exports.LinkPlugin=c.LinkPlugin;exports.BlockquotePlugin=m.BlockquotePlugin;exports.ClearFormattingPlugin=d.ClearFormattingPlugin;exports.CodePlugin=C.CodePlugin;exports.TablePlugin=q.TablePlugin;exports.FontSizePlugin=p.FontSizePlugin;exports.FormatPainterPlugin=h.FormatPainterPlugin;exports.FontFamilyPlugin=k.FontFamilyPlugin;exports.TextAlignmentPlugin=f.TextAlignmentPlugin;exports.TextColorPlugin=M.TextColorPlugin;exports.BackgroundColorPlugin=T.BackgroundColorPlugin;exports.LineHeightPlugin=b.LineHeightPlugin;exports.IndentPlugin=S.IndentPlugin;exports.DirectionPlugin=A.DirectionPlugin;exports.CapitalizationPlugin=v.CapitalizationPlugin;exports.MathPlugin=D.MathPlugin;exports.SpecialCharactersPlugin=B.SpecialCharactersPlugin;exports.EmojisPlugin=E.EmojisPlugin;exports.EmbedIframePlugin=F.EmbedIframePlugin;exports.AnchorPlugin=y.AnchorPlugin;exports.MentionPlugin=I.MentionPlugin;exports.TrackChangesPlugin=L.TrackChangesPlugin;exports.VersionDiffPlugin=R.VersionDiffPlugin;exports.ConditionalContentPlugin=w.ConditionalContentPlugin;exports.DataBindingPlugin=H.DataBindingPlugin;exports.ContentRulesPlugin=z.ContentRulesPlugin;exports.CitationsPlugin=U.CitationsPlugin;exports.ApprovalWorkflowPlugin=x.ApprovalWorkflowPlugin;exports.PIIRedactionPlugin=G.PIIRedactionPlugin;exports.SmartPastePlugin=W.SmartPastePlugin;exports.BlocksLibraryPlugin=_.BlocksLibraryPlugin;exports.DocSchemaPlugin=j.DocSchemaPlugin;exports.TranslationWorkflowPlugin=N.TranslationWorkflowPlugin;exports.SlashCommandsPlugin=V.SlashCommandsPlugin;exports.MediaManagerPlugin=i.MediaManagerPlugin;exports.MediaUploadError=i.MediaUploadError;exports.createBase64Provider=i.createBase64Provider;exports.createCallbackProvider=i.createCallbackProvider;exports.createRestProvider=i.createRestProvider;exports.getMediaManagerConfig=i.getMediaManagerConfig;exports.parseEmbedUrl=i.parseEmbedUrl;exports.setMediaManagerConfig=i.setMediaManagerConfig;exports.mediaSlashItems=O.mediaSlashItems;exports.DocumentManagerPlugin=r.DocumentManagerPlugin;exports.getDocumentManagerConfig=r.getDocumentManagerConfig;exports.setDocumentManagerConfig=r.setDocumentManagerConfig;exports.PreviewPlugin=J.PreviewPlugin;exports.FullscreenPlugin=K.FullscreenPlugin;exports.PrintPlugin=Q.PrintPlugin;exports.PageBreakPlugin=X.PageBreakPlugin;exports.FootnotePlugin=Y.FootnotePlugin;exports.CodeSamplePlugin=Z.CodeSamplePlugin;exports.MergeTagPlugin=$.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=ee.CommentsPlugin;exports.CollaborationPlugin=ie.CollaborationPlugin;exports.SpellCheckPlugin=ne.SpellCheckPlugin;exports.A11yCheckerPlugin=re.A11yCheckerPlugin;exports.buildApiUrl=n.buildApiUrl;exports.getGlobalApiConfig=n.getGlobalApiConfig;exports.getGlobalApiHeaders=n.getGlobalApiHeaders;exports.setGlobalApiConfig=n.setGlobalApiConfig;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./heading.cjs.js"),o=require("./bold.cjs.js"),a=require("./italic.cjs.js"),u=require("./underline.cjs.js"),g=require("./strikethrough.cjs.js"),s=require("./list.cjs.js"),P=require("./checklist.cjs.js"),c=require("./history.cjs.js"),m=require("./link.cjs.js"),d=require("./blockquote.cjs.js"),C=require("./clear-formatting.cjs.js"),q=require("./CodePlugin.native-BwhZsI5v.js"),p=require("./table.cjs.js"),h=require("./font-size.cjs.js"),T=require("./format-painter.cjs.js"),k=require("./font-family.cjs.js"),f=require("./text-alignment.cjs.js"),M=require("./text-color.cjs.js"),b=require("./background-color.cjs.js"),S=require("./line-height.cjs.js"),v=require("./indent.cjs.js"),A=require("./direction.cjs.js"),D=require("./capitalization.cjs.js"),B=require("./math.cjs.js"),E=require("./special-characters.cjs.js"),F=require("./emojis.cjs.js"),y=require("./embed-iframe.cjs.js"),I=require("./anchor.cjs.js"),L=require("./mentions.cjs.js"),R=require("./track-changes.cjs.js"),w=require("./version-diff.cjs.js"),H=require("./conditional-content.cjs.js"),z=require("./data-binding.cjs.js"),U=require("./content-rules.cjs.js"),x=require("./citations.cjs.js"),G=require("./approval-workflow.cjs.js"),W=require("./pii-redaction.cjs.js"),_=require("./smart-paste.cjs.js"),j=require("./blocks-library.cjs.js"),N=require("./doc-schema.cjs.js"),V=require("./translation-workflow.cjs.js"),O=require("./slash-commands.cjs.js"),i=require("./MediaManagerPlugin.native-CycfjOi4.js"),J=require("./media-manager.cjs.js"),t=require("./index-CtR8olYy.js"),K=require("./preview.cjs.js"),Q=require("./fullscreen.cjs.js"),X=require("./print.cjs.js"),Y=require("./page-break.cjs.js"),Z=require("./footnote.cjs.js"),$=require("./code-sample.cjs.js"),ee=require("./merge-tag.cjs.js"),e=require("./template.cjs.js"),n=require("./comments.cjs.js"),ie=require("./collaboration.cjs.js"),ne=require("./spell-check.cjs.js"),re=require("./a11y-checker.cjs.js"),r=require("./shared-config.cjs.js");exports.HeadingPlugin=l.HeadingPlugin;exports.BoldPlugin=o.BoldPlugin;exports.ItalicPlugin=a.ItalicPlugin;exports.UnderlinePlugin=u.UnderlinePlugin;exports.StrikethroughPlugin=g.StrikethroughPlugin;exports.ListPlugin=s.ListPlugin;exports.ChecklistPlugin=P.ChecklistPlugin;exports.HistoryPlugin=c.HistoryPlugin;exports.LinkPlugin=m.LinkPlugin;exports.BlockquotePlugin=d.BlockquotePlugin;exports.ClearFormattingPlugin=C.ClearFormattingPlugin;exports.CodePlugin=q.CodePlugin;exports.TablePlugin=p.TablePlugin;exports.FontSizePlugin=h.FontSizePlugin;exports.FormatPainterPlugin=T.FormatPainterPlugin;exports.FontFamilyPlugin=k.FontFamilyPlugin;exports.TextAlignmentPlugin=f.TextAlignmentPlugin;exports.TextColorPlugin=M.TextColorPlugin;exports.BackgroundColorPlugin=b.BackgroundColorPlugin;exports.LineHeightPlugin=S.LineHeightPlugin;exports.IndentPlugin=v.IndentPlugin;exports.DirectionPlugin=A.DirectionPlugin;exports.CapitalizationPlugin=D.CapitalizationPlugin;exports.MathPlugin=B.MathPlugin;exports.SpecialCharactersPlugin=E.SpecialCharactersPlugin;exports.EmojisPlugin=F.EmojisPlugin;exports.EmbedIframePlugin=y.EmbedIframePlugin;exports.AnchorPlugin=I.AnchorPlugin;exports.MentionPlugin=L.MentionPlugin;exports.TrackChangesPlugin=R.TrackChangesPlugin;exports.VersionDiffPlugin=w.VersionDiffPlugin;exports.ConditionalContentPlugin=H.ConditionalContentPlugin;exports.DataBindingPlugin=z.DataBindingPlugin;exports.ContentRulesPlugin=U.ContentRulesPlugin;exports.CitationsPlugin=x.CitationsPlugin;exports.ApprovalWorkflowPlugin=G.ApprovalWorkflowPlugin;exports.PIIRedactionPlugin=W.PIIRedactionPlugin;exports.SmartPastePlugin=_.SmartPastePlugin;exports.BlocksLibraryPlugin=j.BlocksLibraryPlugin;exports.DocSchemaPlugin=N.DocSchemaPlugin;exports.TranslationWorkflowPlugin=V.TranslationWorkflowPlugin;exports.SlashCommandsPlugin=O.SlashCommandsPlugin;exports.MediaManagerPlugin=i.MediaManagerPlugin;exports.MediaUploadError=i.MediaUploadError;exports.createBase64Provider=i.createBase64Provider;exports.createCallbackProvider=i.createCallbackProvider;exports.createRestProvider=i.createRestProvider;exports.getMediaManagerConfig=i.getMediaManagerConfig;exports.parseEmbedUrl=i.parseEmbedUrl;exports.setMediaManagerConfig=i.setMediaManagerConfig;exports.mediaSlashItems=J.mediaSlashItems;exports.DocumentManagerPlugin=t.DocumentManagerPlugin;exports.getDocumentManagerConfig=t.getDocumentManagerConfig;exports.setDocumentManagerConfig=t.setDocumentManagerConfig;exports.PreviewPlugin=K.PreviewPlugin;exports.FullscreenPlugin=Q.FullscreenPlugin;exports.PrintPlugin=X.PrintPlugin;exports.PageBreakPlugin=Y.PageBreakPlugin;exports.FootnotePlugin=Z.FootnotePlugin;exports.CodeSamplePlugin=$.CodeSamplePlugin;exports.MergeTagPlugin=ee.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=n.CommentsPlugin;exports.configureComments=n.configureComments;exports.getCommentThreads=n.getCommentThreads;exports.removeCommentThread=n.removeCommentThread;exports.setCommentThreads=n.setCommentThreads;exports.upsertCommentThread=n.upsertCommentThread;exports.CollaborationPlugin=ie.CollaborationPlugin;exports.SpellCheckPlugin=ne.SpellCheckPlugin;exports.A11yCheckerPlugin=re.A11yCheckerPlugin;exports.buildApiUrl=r.buildApiUrl;exports.getGlobalApiConfig=r.getGlobalApiConfig;exports.getGlobalApiHeaders=r.getGlobalApiHeaders;exports.setGlobalApiConfig=r.setGlobalApiConfig;
package/dist/index.esm.js CHANGED
@@ -1,18 +1,18 @@
1
- import { HeadingPlugin as e } from "./heading.esm.js";
1
+ import { HeadingPlugin as r } from "./heading.esm.js";
2
2
  import { BoldPlugin as i } from "./bold.esm.js";
3
3
  import { ItalicPlugin as l } from "./italic.esm.js";
4
- import { UnderlinePlugin as g } from "./underline.esm.js";
4
+ import { UnderlinePlugin as m } from "./underline.esm.js";
5
5
  import { StrikethroughPlugin as p } from "./strikethrough.esm.js";
6
- import { ListPlugin as P } from "./list.esm.js";
6
+ import { ListPlugin as u } from "./list.esm.js";
7
7
  import { ChecklistPlugin as x } from "./checklist.esm.js";
8
8
  import { HistoryPlugin as C } from "./history.esm.js";
9
9
  import { LinkPlugin as c } from "./link.esm.js";
10
- import { BlockquotePlugin as M } from "./blockquote.esm.js";
10
+ import { BlockquotePlugin as h } from "./blockquote.esm.js";
11
11
  import { ClearFormattingPlugin as k } from "./clear-formatting.esm.js";
12
12
  import { C as A } from "./CodePlugin.native-CojLCp6C.mjs";
13
13
  import { TablePlugin as S } from "./table.esm.js";
14
14
  import { FontSizePlugin as B } from "./font-size.esm.js";
15
- import { FormatPainterPlugin as I } from "./format-painter.esm.js";
15
+ import { FormatPainterPlugin as v } from "./format-painter.esm.js";
16
16
  import { FontFamilyPlugin as y } from "./font-family.esm.js";
17
17
  import { TextAlignmentPlugin as H } from "./text-alignment.esm.js";
18
18
  import { TextColorPlugin as U } from "./text-color.esm.js";
@@ -25,43 +25,43 @@ import { MathPlugin as O } from "./math.esm.js";
25
25
  import { SpecialCharactersPlugin as X } from "./special-characters.esm.js";
26
26
  import { EmojisPlugin as Z } from "./emojis.esm.js";
27
27
  import { EmbedIframePlugin as oo } from "./embed-iframe.esm.js";
28
- import { AnchorPlugin as eo } from "./anchor.esm.js";
28
+ import { AnchorPlugin as ro } from "./anchor.esm.js";
29
29
  import { MentionPlugin as io } from "./mentions.esm.js";
30
30
  import { TrackChangesPlugin as lo } from "./track-changes.esm.js";
31
- import { VersionDiffPlugin as go } from "./version-diff.esm.js";
31
+ import { VersionDiffPlugin as mo } from "./version-diff.esm.js";
32
32
  import { ConditionalContentPlugin as po } from "./conditional-content.esm.js";
33
- import { DataBindingPlugin as Po } from "./data-binding.esm.js";
33
+ import { DataBindingPlugin as uo } from "./data-binding.esm.js";
34
34
  import { ContentRulesPlugin as xo } from "./content-rules.esm.js";
35
35
  import { CitationsPlugin as Co } from "./citations.esm.js";
36
36
  import { ApprovalWorkflowPlugin as To } from "./approval-workflow.esm.js";
37
- import { PIIRedactionPlugin as ho } from "./pii-redaction.esm.js";
37
+ import { PIIRedactionPlugin as Mo } from "./pii-redaction.esm.js";
38
38
  import { SmartPastePlugin as bo } from "./smart-paste.esm.js";
39
39
  import { BlocksLibraryPlugin as Do } from "./blocks-library.esm.js";
40
40
  import { DocSchemaPlugin as Eo } from "./doc-schema.esm.js";
41
41
  import { TranslationWorkflowPlugin as Fo } from "./translation-workflow.esm.js";
42
- import { SlashCommandsPlugin as vo } from "./slash-commands.esm.js";
42
+ import { SlashCommandsPlugin as Io } from "./slash-commands.esm.js";
43
43
  import { M as Lo, a as Ho, c as Ro, b as Uo, d as wo, g as zo, p as Go, s as Wo } from "./MediaManagerPlugin.native-DZrmcmnm.mjs";
44
44
  import { mediaSlashItems as qo } from "./media-manager.esm.js";
45
45
  import { D as Vo, g as _o, s as Jo } from "./index-Du_Ljqfz.mjs";
46
46
  import { PreviewPlugin as Oo } from "./preview.esm.js";
47
47
  import { FullscreenPlugin as Xo } from "./fullscreen.esm.js";
48
48
  import { PrintPlugin as Zo } from "./print.esm.js";
49
- import { PageBreakPlugin as or } from "./page-break.esm.js";
50
- import { FootnotePlugin as er } from "./footnote.esm.js";
51
- import { CodeSamplePlugin as ir } from "./code-sample.esm.js";
52
- import { MergeTagPlugin as lr } from "./merge-tag.esm.js";
53
- import { PREDEFINED_TEMPLATES as gr, TemplatePlugin as mr, addCustomTemplate as pr, getAllTemplates as fr, getTemplateCategories as Pr, getTemplatesByCategory as ur, sanitizeTemplate as xr, searchTemplates as sr, validateTemplate as Cr } from "./template.esm.js";
54
- import { CommentsPlugin as cr } from "./comments.esm.js";
55
- import { CollaborationPlugin as Mr } from "./collaboration.esm.js";
56
- import { SpellCheckPlugin as kr } from "./spell-check.esm.js";
57
- import { A11yCheckerPlugin as Ar } from "./a11y-checker.esm.js";
58
- import { buildApiUrl as Sr, getGlobalApiConfig as Er, getGlobalApiHeaders as Br, setGlobalApiConfig as Fr } from "./shared-config.esm.js";
49
+ import { PageBreakPlugin as oe } from "./page-break.esm.js";
50
+ import { FootnotePlugin as re } from "./footnote.esm.js";
51
+ import { CodeSamplePlugin as ie } from "./code-sample.esm.js";
52
+ import { MergeTagPlugin as le } from "./merge-tag.esm.js";
53
+ import { PREDEFINED_TEMPLATES as me, TemplatePlugin as ge, addCustomTemplate as pe, getAllTemplates as fe, getTemplateCategories as ue, getTemplatesByCategory as Pe, sanitizeTemplate as xe, searchTemplates as se, validateTemplate as Ce } from "./template.esm.js";
54
+ import { CommentsPlugin as ce, configureComments as Te, getCommentThreads as he, removeCommentThread as Me, setCommentThreads as ke, upsertCommentThread as be } from "./comments.esm.js";
55
+ import { CollaborationPlugin as De } from "./collaboration.esm.js";
56
+ import { SpellCheckPlugin as Ee } from "./spell-check.esm.js";
57
+ import { A11yCheckerPlugin as Fe } from "./a11y-checker.esm.js";
58
+ import { buildApiUrl as Ie, getGlobalApiConfig as ye, getGlobalApiHeaders as Le, setGlobalApiConfig as He } from "./shared-config.esm.js";
59
59
  export {
60
- Ar as A11yCheckerPlugin,
61
- eo as AnchorPlugin,
60
+ Fe as A11yCheckerPlugin,
61
+ ro as AnchorPlugin,
62
62
  To as ApprovalWorkflowPlugin,
63
63
  z as BackgroundColorPlugin,
64
- M as BlockquotePlugin,
64
+ h as BlockquotePlugin,
65
65
  Do as BlocksLibraryPlugin,
66
66
  i as BoldPlugin,
67
67
  J as CapitalizationPlugin,
@@ -69,12 +69,12 @@ export {
69
69
  Co as CitationsPlugin,
70
70
  k as ClearFormattingPlugin,
71
71
  A as CodePlugin,
72
- ir as CodeSamplePlugin,
73
- Mr as CollaborationPlugin,
74
- cr as CommentsPlugin,
72
+ ie as CodeSamplePlugin,
73
+ De as CollaborationPlugin,
74
+ ce as CommentsPlugin,
75
75
  po as ConditionalContentPlugin,
76
76
  xo as ContentRulesPlugin,
77
- Po as DataBindingPlugin,
77
+ uo as DataBindingPlugin,
78
78
  V as DirectionPlugin,
79
79
  Eo as DocSchemaPlugin,
80
80
  Vo as DocumentManagerPlugin,
@@ -82,57 +82,62 @@ export {
82
82
  Z as EmojisPlugin,
83
83
  y as FontFamilyPlugin,
84
84
  B as FontSizePlugin,
85
- er as FootnotePlugin,
86
- I as FormatPainterPlugin,
85
+ re as FootnotePlugin,
86
+ v as FormatPainterPlugin,
87
87
  Xo as FullscreenPlugin,
88
- e as HeadingPlugin,
88
+ r as HeadingPlugin,
89
89
  C as HistoryPlugin,
90
90
  q as IndentPlugin,
91
91
  l as ItalicPlugin,
92
92
  W as LineHeightPlugin,
93
93
  c as LinkPlugin,
94
- P as ListPlugin,
94
+ u as ListPlugin,
95
95
  O as MathPlugin,
96
96
  Lo as MediaManagerPlugin,
97
97
  Ho as MediaUploadError,
98
98
  io as MentionPlugin,
99
- lr as MergeTagPlugin,
100
- ho as PIIRedactionPlugin,
101
- gr as PREDEFINED_TEMPLATES,
102
- or as PageBreakPlugin,
99
+ le as MergeTagPlugin,
100
+ Mo as PIIRedactionPlugin,
101
+ me as PREDEFINED_TEMPLATES,
102
+ oe as PageBreakPlugin,
103
103
  Oo as PreviewPlugin,
104
104
  Zo as PrintPlugin,
105
- vo as SlashCommandsPlugin,
105
+ Io as SlashCommandsPlugin,
106
106
  bo as SmartPastePlugin,
107
107
  X as SpecialCharactersPlugin,
108
- kr as SpellCheckPlugin,
108
+ Ee as SpellCheckPlugin,
109
109
  p as StrikethroughPlugin,
110
110
  S as TablePlugin,
111
- mr as TemplatePlugin,
111
+ ge as TemplatePlugin,
112
112
  H as TextAlignmentPlugin,
113
113
  U as TextColorPlugin,
114
114
  lo as TrackChangesPlugin,
115
115
  Fo as TranslationWorkflowPlugin,
116
- g as UnderlinePlugin,
117
- go as VersionDiffPlugin,
118
- pr as addCustomTemplate,
119
- Sr as buildApiUrl,
116
+ m as UnderlinePlugin,
117
+ mo as VersionDiffPlugin,
118
+ pe as addCustomTemplate,
119
+ Ie as buildApiUrl,
120
+ Te as configureComments,
120
121
  Ro as createBase64Provider,
121
122
  Uo as createCallbackProvider,
122
123
  wo as createRestProvider,
123
- fr as getAllTemplates,
124
+ fe as getAllTemplates,
125
+ he as getCommentThreads,
124
126
  _o as getDocumentManagerConfig,
125
- Er as getGlobalApiConfig,
126
- Br as getGlobalApiHeaders,
127
+ ye as getGlobalApiConfig,
128
+ Le as getGlobalApiHeaders,
127
129
  zo as getMediaManagerConfig,
128
- Pr as getTemplateCategories,
129
- ur as getTemplatesByCategory,
130
+ ue as getTemplateCategories,
131
+ Pe as getTemplatesByCategory,
130
132
  qo as mediaSlashItems,
131
133
  Go as parseEmbedUrl,
132
- xr as sanitizeTemplate,
133
- sr as searchTemplates,
134
+ Me as removeCommentThread,
135
+ xe as sanitizeTemplate,
136
+ se as searchTemplates,
137
+ ke as setCommentThreads,
134
138
  Jo as setDocumentManagerConfig,
135
- Fr as setGlobalApiConfig,
139
+ He as setGlobalApiConfig,
136
140
  Wo as setMediaManagerConfig,
137
- Cr as validateTemplate
141
+ be as upsertCommentThread,
142
+ Ce as validateTemplate
138
143
  };
package/index.d.ts CHANGED
@@ -1116,7 +1116,69 @@ export function getTemplateCategories(): string[];
1116
1116
  export function searchTemplates(query: string): Template[];
1117
1117
  export function sanitizeTemplate(html: string): string;
1118
1118
  export function validateTemplate(template: Template): boolean;
1119
- export function CommentsPlugin(): Plugin;
1119
+ export interface CommentUser {
1120
+ /** Your own id for the person. When it is set on both the user and a comment's author, only that person can edit or delete the comment. */
1121
+ id?: string;
1122
+ name: string;
1123
+ /** URL of a picture (http, https, a data:image URL or a path on the page). Without one, or if it fails to load, the initials are shown. */
1124
+ avatar?: string;
1125
+ }
1126
+ export interface CommentReplyData {
1127
+ id: string;
1128
+ author: CommentUser;
1129
+ text: string;
1130
+ createdAt: string;
1131
+ editedAt?: string;
1132
+ }
1133
+ /** One discussion. Store it as it is and give it back with `setCommentThreads` or `initialThreads`. */
1134
+ export interface CommentThread {
1135
+ id: string;
1136
+ /** The `id` of the highlighted span in the document. Missing for a note about the whole document. */
1137
+ anchorId?: string;
1138
+ /** The text that was selected when the thread was started. */
1139
+ quote?: string;
1140
+ author: CommentUser;
1141
+ text: string;
1142
+ createdAt: string;
1143
+ editedAt?: string;
1144
+ resolved: boolean;
1145
+ resolvedAt?: string;
1146
+ resolvedBy?: CommentUser;
1147
+ replies: CommentReplyData[];
1148
+ }
1149
+ export type CommentsChangeReason = 'create' | 'reply' | 'edit' | 'resolve' | 'reopen' | 'delete' | 'document';
1150
+ export interface CommentsChange {
1151
+ reason: CommentsChangeReason;
1152
+ threadId?: string;
1153
+ }
1154
+ export interface CommentsOptions {
1155
+ /** Who is commenting. New comments, replies and resolutions are signed with this. Default: `{ name: 'User' }`. */
1156
+ currentUser?: CommentUser | string;
1157
+ /** Threads to show when the editor starts, for example the ones you saved with the document. */
1158
+ initialThreads?: CommentThread[];
1159
+ /**
1160
+ * Keep the comments in the browser's localStorage under this key: they are saved after every change and loaded
1161
+ * when the editor starts (they win over `initialThreads` when something is stored). The key must be yours alone,
1162
+ * one per document: editors that share a key share their comments. Only the comments are kept: save the
1163
+ * document's HTML as well (for example with the editor's `autosave`), or the highlights they belong to are gone.
1164
+ */
1165
+ storageKey?: string;
1166
+ /** Called after every change to the comments, with all of them. Store them here. */
1167
+ onChange?: (threads: CommentThread[], change: CommentsChange) => void;
1168
+ /** Whether `user` may edit or delete something `author` wrote. By default people can change their own comments when both have an id, and anyone can change anything when there are no ids. */
1169
+ canModify?: (author: CommentUser, user: CommentUser) => boolean;
1170
+ }
1171
+ export function CommentsPlugin(options?: CommentsOptions): Plugin;
1172
+ /** The comments of one editor as plain data to store. `target` is the editor element or anything inside it. */
1173
+ export function getCommentThreads(target: Element): CommentThread[];
1174
+ /** Show these threads in an editor in place of the ones it has. Does not call `onChange`. */
1175
+ export function setCommentThreads(target: Element, threads: CommentThread[]): void;
1176
+ /** Add or replace a single thread that arrived while the editor is open, without disturbing what the person is typing. Returns false when `thread` cannot be used. Does not call `onChange`. */
1177
+ export function upsertCommentThread(target: Element, thread: CommentThread): boolean;
1178
+ /** Take away a single thread that was deleted elsewhere. Returns false when the editor has no such thread. Does not call `onChange`. */
1179
+ export function removeCommentThread(target: Element, threadId: string): boolean;
1180
+ /** Give an editor the options `CommentsPlugin(options)` takes, when the plugin cannot know which editor is its own. */
1181
+ export function configureComments(target: Element, options: CommentsOptions): void;
1120
1182
  export function SpellCheckPlugin(): Plugin;
1121
1183
  export function A11yCheckerPlugin(): Plugin;
1122
1184
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@editora/plugins",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
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",