@editora/plugins 1.0.13 → 1.0.15

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/index.esm.js CHANGED
@@ -2,7 +2,7 @@ import { HeadingPlugin as e } 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
4
  import { UnderlinePlugin as m } from "./underline.esm.js";
5
- import { StrikethroughPlugin as a } from "./strikethrough.esm.js";
5
+ import { StrikethroughPlugin as p } from "./strikethrough.esm.js";
6
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";
@@ -10,118 +10,120 @@ import { LinkPlugin as d } from "./link.esm.js";
10
10
  import { BlockquotePlugin as h } from "./blockquote.esm.js";
11
11
  import { ClearFormattingPlugin as k } from "./clear-formatting.esm.js";
12
12
  import { CodePlugin as D } from "./code.esm.js";
13
- import { TablePlugin as b } from "./table.esm.js";
14
- import { FontSizePlugin as E } from "./font-size.esm.js";
15
- import { FontFamilyPlugin as y } from "./font-family.esm.js";
16
- import { TextAlignmentPlugin as L } from "./text-alignment.esm.js";
17
- import { TextColorPlugin as v } from "./text-color.esm.js";
18
- import { BackgroundColorPlugin as z } from "./background-color.esm.js";
19
- import { LineHeightPlugin as R } from "./line-height.esm.js";
20
- import { IndentPlugin as W } from "./indent.esm.js";
21
- import { DirectionPlugin as q } from "./direction.esm.js";
22
- import { CapitalizationPlugin as V } from "./capitalization.esm.js";
23
- import { MathPlugin as J } from "./math.esm.js";
24
- import { SpecialCharactersPlugin as O } from "./special-characters.esm.js";
25
- import { EmojisPlugin as X } from "./emojis.esm.js";
26
- import { EmbedIframePlugin as Z } from "./embed-iframe.esm.js";
27
- import { AnchorPlugin as oo } from "./anchor.esm.js";
28
- import { MentionPlugin as eo } from "./mentions.esm.js";
29
- import { TrackChangesPlugin as io } from "./track-changes.esm.js";
30
- import { VersionDiffPlugin as lo } from "./version-diff.esm.js";
31
- import { ConditionalContentPlugin as mo } from "./conditional-content.esm.js";
32
- import { DataBindingPlugin as ao } from "./data-binding.esm.js";
33
- import { ContentRulesPlugin as uo } from "./content-rules.esm.js";
34
- import { CitationsPlugin as xo } from "./citations.esm.js";
35
- import { ApprovalWorkflowPlugin as Co } from "./approval-workflow.esm.js";
36
- import { PIIRedactionPlugin as To } from "./pii-redaction.esm.js";
37
- import { SmartPastePlugin as Mo } from "./smart-paste.esm.js";
38
- import { BlocksLibraryPlugin as Ao } from "./blocks-library.esm.js";
39
- import { DocSchemaPlugin as So } from "./doc-schema.esm.js";
40
- import { TranslationWorkflowPlugin as Bo } from "./translation-workflow.esm.js";
41
- import { SlashCommandsPlugin as Fo } from "./slash-commands.esm.js";
42
- import { MediaManagerPlugin as Io, getMediaManagerConfig as Lo, setMediaManagerConfig as Ho } from "./media-manager.esm.js";
43
- import { D as wo, g as zo, s as Go } from "./index-BFsKNTTj.mjs";
44
- import { PreviewPlugin as Uo } from "./preview.esm.js";
45
- import { FullscreenPlugin as jo } from "./fullscreen.esm.js";
46
- import { PrintPlugin as No } from "./print.esm.js";
47
- import { PageBreakPlugin as _o } from "./page-break.esm.js";
48
- import { FootnotePlugin as Ko } from "./footnote.esm.js";
49
- import { CodeSamplePlugin as Qo } from "./code-sample.esm.js";
50
- import { MergeTagPlugin as Yo } from "./merge-tag.esm.js";
51
- import { PREDEFINED_TEMPLATES as $o, TemplatePlugin as or, addCustomTemplate as rr, getAllTemplates as er, getTemplateCategories as tr, getTemplatesByCategory as ir, sanitizeTemplate as nr, searchTemplates as lr, validateTemplate as gr } from "./template.esm.js";
52
- import { CommentsPlugin as pr } from "./comments.esm.js";
53
- import { SpellCheckPlugin as fr } from "./spell-check.esm.js";
54
- import { A11yCheckerPlugin as Pr } from "./a11y-checker.esm.js";
55
- import { buildApiUrl as sr, getGlobalApiConfig as Cr, getGlobalApiHeaders as cr, setGlobalApiConfig as dr } from "./shared-config.esm.js";
13
+ import { TablePlugin as F } from "./table.esm.js";
14
+ import { FontSizePlugin as B } from "./font-size.esm.js";
15
+ import { FormatPainterPlugin as y } from "./format-painter.esm.js";
16
+ import { FontFamilyPlugin as L } from "./font-family.esm.js";
17
+ import { TextAlignmentPlugin as v } from "./text-alignment.esm.js";
18
+ import { TextColorPlugin as z } from "./text-color.esm.js";
19
+ import { BackgroundColorPlugin as R } from "./background-color.esm.js";
20
+ import { LineHeightPlugin as W } from "./line-height.esm.js";
21
+ import { IndentPlugin as q } from "./indent.esm.js";
22
+ import { DirectionPlugin as V } from "./direction.esm.js";
23
+ import { CapitalizationPlugin as J } from "./capitalization.esm.js";
24
+ import { MathPlugin as O } from "./math.esm.js";
25
+ import { SpecialCharactersPlugin as X } from "./special-characters.esm.js";
26
+ import { EmojisPlugin as Z } from "./emojis.esm.js";
27
+ import { EmbedIframePlugin as oo } from "./embed-iframe.esm.js";
28
+ import { AnchorPlugin as eo } from "./anchor.esm.js";
29
+ import { MentionPlugin as io } from "./mentions.esm.js";
30
+ import { TrackChangesPlugin as lo } from "./track-changes.esm.js";
31
+ import { VersionDiffPlugin as mo } from "./version-diff.esm.js";
32
+ import { ConditionalContentPlugin as po } from "./conditional-content.esm.js";
33
+ import { DataBindingPlugin as uo } from "./data-binding.esm.js";
34
+ import { ContentRulesPlugin as xo } from "./content-rules.esm.js";
35
+ import { CitationsPlugin as Co } from "./citations.esm.js";
36
+ import { ApprovalWorkflowPlugin as To } from "./approval-workflow.esm.js";
37
+ import { PIIRedactionPlugin as Mo } from "./pii-redaction.esm.js";
38
+ import { SmartPastePlugin as Ao } from "./smart-paste.esm.js";
39
+ import { BlocksLibraryPlugin as So } from "./blocks-library.esm.js";
40
+ import { DocSchemaPlugin as bo } from "./doc-schema.esm.js";
41
+ import { TranslationWorkflowPlugin as Eo } from "./translation-workflow.esm.js";
42
+ import { SlashCommandsPlugin as Io } from "./slash-commands.esm.js";
43
+ import { MediaManagerPlugin as Ho, getMediaManagerConfig as vo, setMediaManagerConfig as wo } from "./media-manager.esm.js";
44
+ import { D as Go, g as Ro, s as Uo } from "./index-BFsKNTTj.mjs";
45
+ import { PreviewPlugin as jo } from "./preview.esm.js";
46
+ import { FullscreenPlugin as No } from "./fullscreen.esm.js";
47
+ import { PrintPlugin as _o } from "./print.esm.js";
48
+ import { PageBreakPlugin as Ko } from "./page-break.esm.js";
49
+ import { FootnotePlugin as Qo } from "./footnote.esm.js";
50
+ import { CodeSamplePlugin as Yo } from "./code-sample.esm.js";
51
+ import { MergeTagPlugin as $o } from "./merge-tag.esm.js";
52
+ import { PREDEFINED_TEMPLATES as rr, TemplatePlugin as er, addCustomTemplate as tr, getAllTemplates as ir, getTemplateCategories as nr, getTemplatesByCategory as lr, sanitizeTemplate as gr, searchTemplates as mr, validateTemplate as ar } from "./template.esm.js";
53
+ import { CommentsPlugin as fr } from "./comments.esm.js";
54
+ import { SpellCheckPlugin as Pr } from "./spell-check.esm.js";
55
+ import { A11yCheckerPlugin as sr } from "./a11y-checker.esm.js";
56
+ import { buildApiUrl as cr, getGlobalApiConfig as dr, getGlobalApiHeaders as Tr, setGlobalApiConfig as hr } from "./shared-config.esm.js";
56
57
  export {
57
- Pr as A11yCheckerPlugin,
58
- oo as AnchorPlugin,
59
- Co as ApprovalWorkflowPlugin,
60
- z as BackgroundColorPlugin,
58
+ sr as A11yCheckerPlugin,
59
+ eo as AnchorPlugin,
60
+ To as ApprovalWorkflowPlugin,
61
+ R as BackgroundColorPlugin,
61
62
  h as BlockquotePlugin,
62
- Ao as BlocksLibraryPlugin,
63
+ So as BlocksLibraryPlugin,
63
64
  i as BoldPlugin,
64
- V as CapitalizationPlugin,
65
+ J as CapitalizationPlugin,
65
66
  x as ChecklistPlugin,
66
- xo as CitationsPlugin,
67
+ Co as CitationsPlugin,
67
68
  k as ClearFormattingPlugin,
68
69
  D as CodePlugin,
69
- Qo as CodeSamplePlugin,
70
- pr as CommentsPlugin,
71
- mo as ConditionalContentPlugin,
72
- uo as ContentRulesPlugin,
73
- ao as DataBindingPlugin,
74
- q as DirectionPlugin,
75
- So as DocSchemaPlugin,
76
- wo as DocumentManagerPlugin,
77
- Z as EmbedIframePlugin,
78
- X as EmojisPlugin,
79
- y as FontFamilyPlugin,
80
- E as FontSizePlugin,
81
- Ko as FootnotePlugin,
82
- jo as FullscreenPlugin,
70
+ Yo as CodeSamplePlugin,
71
+ fr as CommentsPlugin,
72
+ po as ConditionalContentPlugin,
73
+ xo as ContentRulesPlugin,
74
+ uo as DataBindingPlugin,
75
+ V as DirectionPlugin,
76
+ bo as DocSchemaPlugin,
77
+ Go as DocumentManagerPlugin,
78
+ oo as EmbedIframePlugin,
79
+ Z as EmojisPlugin,
80
+ L as FontFamilyPlugin,
81
+ B as FontSizePlugin,
82
+ Qo as FootnotePlugin,
83
+ y as FormatPainterPlugin,
84
+ No as FullscreenPlugin,
83
85
  e as HeadingPlugin,
84
86
  C as HistoryPlugin,
85
- W as IndentPlugin,
87
+ q as IndentPlugin,
86
88
  l as ItalicPlugin,
87
- R as LineHeightPlugin,
89
+ W as LineHeightPlugin,
88
90
  d as LinkPlugin,
89
91
  u as ListPlugin,
90
- J as MathPlugin,
91
- Io as MediaManagerPlugin,
92
- eo as MentionPlugin,
93
- Yo as MergeTagPlugin,
94
- To as PIIRedactionPlugin,
95
- $o as PREDEFINED_TEMPLATES,
96
- _o as PageBreakPlugin,
97
- Uo as PreviewPlugin,
98
- No as PrintPlugin,
99
- Fo as SlashCommandsPlugin,
100
- Mo as SmartPastePlugin,
101
- O as SpecialCharactersPlugin,
102
- fr as SpellCheckPlugin,
103
- a as StrikethroughPlugin,
104
- b as TablePlugin,
105
- or as TemplatePlugin,
106
- L as TextAlignmentPlugin,
107
- v as TextColorPlugin,
108
- io as TrackChangesPlugin,
109
- Bo as TranslationWorkflowPlugin,
92
+ O as MathPlugin,
93
+ Ho as MediaManagerPlugin,
94
+ io as MentionPlugin,
95
+ $o as MergeTagPlugin,
96
+ Mo as PIIRedactionPlugin,
97
+ rr as PREDEFINED_TEMPLATES,
98
+ Ko as PageBreakPlugin,
99
+ jo as PreviewPlugin,
100
+ _o as PrintPlugin,
101
+ Io as SlashCommandsPlugin,
102
+ Ao as SmartPastePlugin,
103
+ X as SpecialCharactersPlugin,
104
+ Pr as SpellCheckPlugin,
105
+ p as StrikethroughPlugin,
106
+ F as TablePlugin,
107
+ er as TemplatePlugin,
108
+ v as TextAlignmentPlugin,
109
+ z as TextColorPlugin,
110
+ lo as TrackChangesPlugin,
111
+ Eo as TranslationWorkflowPlugin,
110
112
  m as UnderlinePlugin,
111
- lo as VersionDiffPlugin,
112
- rr as addCustomTemplate,
113
- sr as buildApiUrl,
114
- er as getAllTemplates,
115
- zo as getDocumentManagerConfig,
116
- Cr as getGlobalApiConfig,
117
- cr as getGlobalApiHeaders,
118
- Lo as getMediaManagerConfig,
119
- tr as getTemplateCategories,
120
- ir as getTemplatesByCategory,
121
- nr as sanitizeTemplate,
122
- lr as searchTemplates,
123
- Go as setDocumentManagerConfig,
124
- dr as setGlobalApiConfig,
125
- Ho as setMediaManagerConfig,
126
- gr as validateTemplate
113
+ mo as VersionDiffPlugin,
114
+ tr as addCustomTemplate,
115
+ cr as buildApiUrl,
116
+ ir as getAllTemplates,
117
+ Ro as getDocumentManagerConfig,
118
+ dr as getGlobalApiConfig,
119
+ Tr as getGlobalApiHeaders,
120
+ vo as getMediaManagerConfig,
121
+ nr as getTemplateCategories,
122
+ lr as getTemplatesByCategory,
123
+ gr as sanitizeTemplate,
124
+ mr as searchTemplates,
125
+ Uo as setDocumentManagerConfig,
126
+ hr as setGlobalApiConfig,
127
+ wo as setMediaManagerConfig,
128
+ ar as validateTemplate
127
129
  };
package/index.d.ts CHANGED
@@ -834,6 +834,40 @@ export interface Template {
834
834
  tags?: string[];
835
835
  }
836
836
 
837
+ export interface FormatPainterPluginOptions {
838
+ ignoredFormats?: string[];
839
+ keepActiveAfterMouseApply?: boolean;
840
+ }
841
+
842
+ export interface FormatPainterSnapshot {
843
+ inline: {
844
+ marks: Partial<Record<"bold" | "italic" | "underline" | "strikethrough", boolean>>;
845
+ styles: Record<string, string>;
846
+ };
847
+ block: {
848
+ tagName: string;
849
+ styles: Record<string, string>;
850
+ attrs: Record<string, string>;
851
+ } | null;
852
+ list: {
853
+ tagName: "ul" | "ol";
854
+ styles: Record<string, string>;
855
+ attrs: Record<string, string>;
856
+ itemAttrs: Record<string, string>;
857
+ } | null;
858
+ table: {
859
+ table: {
860
+ styles: Record<string, string>;
861
+ attrs: Record<string, string>;
862
+ } | null;
863
+ cell: {
864
+ styles: Record<string, string>;
865
+ attrs: Record<string, string>;
866
+ } | null;
867
+ } | null;
868
+ ignoredFormats: string[];
869
+ }
870
+
837
871
  export function HeadingPlugin(): Plugin;
838
872
  export function BoldPlugin(): Plugin;
839
873
  export function ItalicPlugin(): Plugin;
@@ -849,6 +883,7 @@ export function CodePlugin(): Plugin;
849
883
  export function TablePlugin(): Plugin;
850
884
  export function FontSizePlugin(): Plugin;
851
885
  export function FontFamilyPlugin(): Plugin;
886
+ export function FormatPainterPlugin(options?: FormatPainterPluginOptions): Plugin;
852
887
  export function TextAlignmentPlugin(): Plugin;
853
888
  export function TextColorPlugin(): Plugin;
854
889
  export function BackgroundColorPlugin(): Plugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@editora/plugins",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
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",
@@ -234,6 +234,12 @@
234
234
  "require": "./dist/font-size.cjs.js",
235
235
  "default": "./dist/font-size.esm.js"
236
236
  },
237
+ "./format-painter": {
238
+ "types": "./index.d.ts",
239
+ "import": "./dist/format-painter.esm.js",
240
+ "require": "./dist/format-painter.cjs.js",
241
+ "default": "./dist/format-painter.esm.js"
242
+ },
237
243
  "./footnote": {
238
244
  "types": "./index.d.ts",
239
245
  "import": "./dist/footnote.esm.js",
@@ -419,17 +425,18 @@
419
425
  "test:blocks-library": "node ../../node_modules/jest/bin/jest.js -c ./jest.config.cjs --watchman=false --runTestsByPath ./blocks-library/src/BlocksLibraryPlugin.native.test.js",
420
426
  "test:doc-schema": "node ../../node_modules/jest/bin/jest.js -c ./jest.config.cjs --watchman=false --runTestsByPath ./doc-schema/src/DocSchemaPlugin.native.test.js",
421
427
  "test:translation-workflow": "node ../../node_modules/jest/bin/jest.js -c ./jest.config.cjs --watchman=false --runTestsByPath ./translation-workflow/src/TranslationWorkflowPlugin.native.test.js",
422
- "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"
428
+ "test:format-painter": "node -r ../../node_modules/ts-node/register ./format-painter/src/FormatPainterPlugin.native.test.js",
429
+ "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 test:format-painter && npm run build"
423
430
  },
424
431
  "peerDependencies": {
425
- "@editora/core": "^1.0.10"
432
+ "@editora/core": "^1.0.12"
426
433
  },
427
434
  "dependencies": {
428
435
  "katex": "^0.16.27",
429
436
  "mathjax": "^3.2.2"
430
437
  },
431
438
  "devDependencies": {
432
- "@editora/core": "^1.0.10",
439
+ "@editora/core": "^1.0.12",
433
440
  "@types/katex": "^0.16.8",
434
441
  "typescript": "^5.0.0",
435
442
  "vite": "^4.5.14"