@procore/text-editor 0.0.3 → 0.1.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.
- package/CHANGELOG.md +7 -0
- package/README.md +1 -22
- package/codemod/__fixtures__/src/components/MultilineFormRichText.tsx +2 -1
- package/codemod/text-editor-migrate.js +54 -0
- package/codemod/text-editor-migrate.test.js +9 -0
- package/dist/TextEditor/TextEditor.d.ts +1 -1
- package/dist/TextEditor/TextEditor.js +81 -36
- package/dist/TextEditor/TextEditor.js.map +1 -1
- package/dist/TextEditor/TextEditor.styles.js +1 -1
- package/dist/TextEditor/TextEditor.types.d.ts +32 -31
- package/dist/TextEditor/TextEditor.types.js.map +1 -1
- package/dist/TextEditor/textEditorTheming/textEditorTheming.styles.js +2 -1
- package/dist/TextEditor/textEditorTheming/textEditorTheming.styles.js.map +1 -1
- package/dist/TextEditor/utils/config.js +3 -3
- package/dist/TextEditor/utils/config.js.map +1 -1
- package/dist/TextEditor/utils/index.d.ts +0 -1
- package/dist/TextEditor/utils/index.js +0 -1
- package/dist/TextEditor/utils/index.js.map +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/_typedoc/TextEditor/TextEditor.types.json +51 -51
- package/dist/_typedoc/TextEditor/TextEditorProvider.types.json +2 -2
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +3 -3
- package/dist/_typedoc/deprecations.json +1 -1
- package/package.json +7 -6
- package/dist/TextEditor/utils/plugins.d.ts +0 -7
- package/dist/TextEditor/utils/plugins.js +0 -184
- package/dist/TextEditor/utils/plugins.js.map +0 -1
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
8
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
11
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
12
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
|
-
import { Alignment, Autoformat, AutoLink, Autosave, BlockQuote, Bold, Bookmark, Code, CodeBlock, Emoji, FindAndReplace, FontBackgroundColor, FontColor, FontSize, Fullscreen, Heading, Highlight, HorizontalLine, Image, Indent, Italic, Link, List, MediaEmbed, PageBreak, RemoveFormat, RestrictedEditingModeEditing, ShowBlocks, SourceEditing, SpecialCharacters, Strikethrough, Subscript, Superscript, Table, TextPartLanguage, Underline, WordCount } from 'ckeditor5';
|
|
14
|
-
import { PasteAsTextPlugin } from '../plugins/PasteAsTextPlugin';
|
|
15
|
-
import { PastePlugin } from '../plugins/PastePlugin';
|
|
16
|
-
|
|
17
|
-
/** Maps TinyMCE string plugin names to CKEditor plugin objects */
|
|
18
|
-
var PLUGINS_MAP = {
|
|
19
|
-
bold: Bold,
|
|
20
|
-
italic: Italic,
|
|
21
|
-
underline: Underline,
|
|
22
|
-
strikethrough: Strikethrough,
|
|
23
|
-
list: List,
|
|
24
|
-
lists: List,
|
|
25
|
-
advlist: List,
|
|
26
|
-
link: Link,
|
|
27
|
-
table: Table,
|
|
28
|
-
image: Image,
|
|
29
|
-
imagetools: Image,
|
|
30
|
-
alignment: Alignment,
|
|
31
|
-
fontsize: FontSize,
|
|
32
|
-
fontcolor: FontColor,
|
|
33
|
-
fontbackgroundcolor: FontBackgroundColor,
|
|
34
|
-
indent: Indent,
|
|
35
|
-
autolink: AutoLink,
|
|
36
|
-
anchor: Bookmark,
|
|
37
|
-
autosave: Autosave,
|
|
38
|
-
charmap: SpecialCharacters,
|
|
39
|
-
code: Code,
|
|
40
|
-
codesample: CodeBlock,
|
|
41
|
-
directionality: TextPartLanguage,
|
|
42
|
-
emoticons: Emoji,
|
|
43
|
-
fullscreen: Fullscreen,
|
|
44
|
-
hr: HorizontalLine,
|
|
45
|
-
media: MediaEmbed,
|
|
46
|
-
noneditable: RestrictedEditingModeEditing,
|
|
47
|
-
pagebreak: PageBreak,
|
|
48
|
-
searchreplace: FindAndReplace,
|
|
49
|
-
textpattern: Autoformat,
|
|
50
|
-
visualblocks: ShowBlocks,
|
|
51
|
-
wordcount: WordCount,
|
|
52
|
-
blockquote: BlockQuote,
|
|
53
|
-
subscript: Subscript,
|
|
54
|
-
superscript: Superscript,
|
|
55
|
-
heading: Heading,
|
|
56
|
-
headings: Heading,
|
|
57
|
-
highlight: Highlight,
|
|
58
|
-
removeformat: RemoveFormat,
|
|
59
|
-
source: SourceEditing,
|
|
60
|
-
sourceedit: SourceEditing,
|
|
61
|
-
autoformat: Autoformat,
|
|
62
|
-
nonbreaking: SpecialCharacters,
|
|
63
|
-
paste: PastePlugin,
|
|
64
|
-
pastetext: PasteAsTextPlugin,
|
|
65
|
-
pasteastext: PasteAsTextPlugin,
|
|
66
|
-
// Part of CKEditor core
|
|
67
|
-
autoresize: null,
|
|
68
|
-
spellchecker: null,
|
|
69
|
-
tabfocus: null
|
|
70
|
-
};
|
|
71
|
-
var UNSUPPORTED_PLUGINS = [
|
|
72
|
-
// Would need custom implementation
|
|
73
|
-
'help', 'visualchars', 'insertdatetime', 'save', 'template',
|
|
74
|
-
// Not directly supported
|
|
75
|
-
'importcss',
|
|
76
|
-
// CKEditor uses explicit style definitions instead of scanning styles for classes
|
|
77
|
-
'print',
|
|
78
|
-
// Could be substituted with ExportPdf, but needs cloud services
|
|
79
|
-
'preview',
|
|
80
|
-
// Could be substituted with ExportPdf, but needs cloud services
|
|
81
|
-
'toc',
|
|
82
|
-
// Would need TableOfContents premium plugin
|
|
83
|
-
|
|
84
|
-
// Has been removed in TinyMCE 6
|
|
85
|
-
'bbcode', 'colorpicker', 'contextmenu', 'fullpage', 'legacyoutput'];
|
|
86
|
-
|
|
87
|
-
/** Maps TinyMCE toolbar button names to CKEditor command names */
|
|
88
|
-
var TOOLBAR_MAP = {
|
|
89
|
-
link: 'link',
|
|
90
|
-
table: 'insertTable',
|
|
91
|
-
image: 'insertImageViaUrl',
|
|
92
|
-
blockquote: 'blockQuote',
|
|
93
|
-
code: 'code',
|
|
94
|
-
codesample: 'codeBlock',
|
|
95
|
-
hr: 'horizontalLine',
|
|
96
|
-
media: 'mediaEmbed',
|
|
97
|
-
pagebreak: 'pageBreak',
|
|
98
|
-
subscript: 'subscript',
|
|
99
|
-
superscript: 'superscript',
|
|
100
|
-
removeformat: 'removeFormat',
|
|
101
|
-
heading: 'heading',
|
|
102
|
-
headings: 'heading',
|
|
103
|
-
highlight: 'highlight',
|
|
104
|
-
charmap: 'specialCharacters',
|
|
105
|
-
searchreplace: 'findAndReplace',
|
|
106
|
-
source: 'sourceEditing',
|
|
107
|
-
sourceedit: 'sourceEditing',
|
|
108
|
-
visualblocks: 'showBlocks',
|
|
109
|
-
wordcount: 'wordCount',
|
|
110
|
-
emoticons: 'emoji',
|
|
111
|
-
fullscreen: 'fullscreen',
|
|
112
|
-
anchor: 'bookmark',
|
|
113
|
-
toc: 'tableOfContents'
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
/** Gets CKEditor plugin objects from TinyMCE string plugin names */
|
|
117
|
-
export var getPluginsFromStringArray = function getPluginsFromStringArray() {
|
|
118
|
-
var pluginNames = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
119
|
-
var unsupportedPlugins = pluginNames.filter(function (name) {
|
|
120
|
-
return UNSUPPORTED_PLUGINS.includes(name.toLowerCase());
|
|
121
|
-
});
|
|
122
|
-
if (unsupportedPlugins.length) {
|
|
123
|
-
var pluginsList = unsupportedPlugins.join(', ');
|
|
124
|
-
throw new Error("The following editor plugins are not supported: ".concat(pluginsList, "."));
|
|
125
|
-
}
|
|
126
|
-
var plugins = pluginNames.map(function (name) {
|
|
127
|
-
return PLUGINS_MAP[name.toLowerCase()];
|
|
128
|
-
}).filter(function (plugin, index, array) {
|
|
129
|
-
return plugin !== null &&
|
|
130
|
-
// Remove duplicates
|
|
131
|
-
array.indexOf(plugin) === index;
|
|
132
|
-
});
|
|
133
|
-
return plugins;
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
/** Gets toolbar items that should be added for the given string plugin names. */
|
|
137
|
-
export var getToolbarItemsFromStringArray = function getToolbarItemsFromStringArray() {
|
|
138
|
-
var pluginNames = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
139
|
-
return pluginNames.map(function (name) {
|
|
140
|
-
return TOOLBAR_MAP[name.toLowerCase()];
|
|
141
|
-
}).filter(Boolean);
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
/** Enhances an editor config by adding plugins and toolbar items from TinyMCE string array */
|
|
145
|
-
export var addPluginsFromStringArray = function addPluginsFromStringArray(config) {
|
|
146
|
-
var pluginNames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
147
|
-
if (!pluginNames.length) {
|
|
148
|
-
return config;
|
|
149
|
-
}
|
|
150
|
-
var additionalPlugins = getPluginsFromStringArray(pluginNames);
|
|
151
|
-
var additionalToolbarItems = getToolbarItemsFromStringArray(pluginNames);
|
|
152
|
-
var currentPlugins = config.plugins || [];
|
|
153
|
-
var enhancedPlugins = Array.from(new Set([].concat(_toConsumableArray(currentPlugins), _toConsumableArray(additionalPlugins))));
|
|
154
|
-
var currentToolbar = Array.isArray(config.toolbar) ? config.toolbar : [];
|
|
155
|
-
var enhancedToolbar = currentToolbar;
|
|
156
|
-
if (additionalToolbarItems.length > 0) {
|
|
157
|
-
// Remove undo/redo buttons temporarily
|
|
158
|
-
var toolbarWithoutUndo = currentToolbar.filter(function (item) {
|
|
159
|
-
return item !== 'undo' && item !== 'redo';
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
// Combine toolbar items
|
|
163
|
-
var combinedItems = [].concat(_toConsumableArray(toolbarWithoutUndo), _toConsumableArray(additionalToolbarItems), ['|', 'undo', 'redo']);
|
|
164
|
-
|
|
165
|
-
// Deduplicate items while preserving separators
|
|
166
|
-
var seenButtons = new Set();
|
|
167
|
-
enhancedToolbar = combinedItems.filter(function (item) {
|
|
168
|
-
if (item === '|') {
|
|
169
|
-
return true;
|
|
170
|
-
}
|
|
171
|
-
var itemKey = typeof item === 'string' ? item : JSON.stringify(item);
|
|
172
|
-
if (seenButtons.has(itemKey)) {
|
|
173
|
-
return false;
|
|
174
|
-
}
|
|
175
|
-
seenButtons.add(itemKey);
|
|
176
|
-
return true;
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
return _objectSpread(_objectSpread({}, config), {}, {
|
|
180
|
-
plugins: enhancedPlugins,
|
|
181
|
-
toolbar: enhancedToolbar
|
|
182
|
-
});
|
|
183
|
-
};
|
|
184
|
-
//# sourceMappingURL=plugins.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.js","names":["Alignment","Autoformat","AutoLink","Autosave","BlockQuote","Bold","Bookmark","Code","CodeBlock","Emoji","FindAndReplace","FontBackgroundColor","FontColor","FontSize","Fullscreen","Heading","Highlight","HorizontalLine","Image","Indent","Italic","Link","List","MediaEmbed","PageBreak","RemoveFormat","RestrictedEditingModeEditing","ShowBlocks","SourceEditing","SpecialCharacters","Strikethrough","Subscript","Superscript","Table","TextPartLanguage","Underline","WordCount","PasteAsTextPlugin","PastePlugin","PLUGINS_MAP","bold","italic","underline","strikethrough","list","lists","advlist","link","table","image","imagetools","alignment","fontsize","fontcolor","fontbackgroundcolor","indent","autolink","anchor","autosave","charmap","code","codesample","directionality","emoticons","fullscreen","hr","media","noneditable","pagebreak","searchreplace","textpattern","visualblocks","wordcount","blockquote","subscript","superscript","heading","headings","highlight","removeformat","source","sourceedit","autoformat","nonbreaking","paste","pastetext","pasteastext","autoresize","spellchecker","tabfocus","UNSUPPORTED_PLUGINS","TOOLBAR_MAP","toc","getPluginsFromStringArray","pluginNames","arguments","length","undefined","unsupportedPlugins","filter","name","includes","toLowerCase","pluginsList","join","Error","concat","plugins","map","plugin","index","array","indexOf","getToolbarItemsFromStringArray","Boolean","addPluginsFromStringArray","config","additionalPlugins","additionalToolbarItems","currentPlugins","enhancedPlugins","Array","from","Set","_toConsumableArray","currentToolbar","isArray","toolbar","enhancedToolbar","toolbarWithoutUndo","item","combinedItems","seenButtons","itemKey","JSON","stringify","has","add","_objectSpread"],"sources":["../../../src/TextEditor/utils/plugins.ts"],"sourcesContent":["import type { EditorConfig, Plugin } from 'ckeditor5'\nimport {\n Alignment,\n Autoformat,\n AutoLink,\n Autosave,\n BlockQuote,\n Bold,\n Bookmark,\n Code,\n CodeBlock,\n Emoji,\n FindAndReplace,\n FontBackgroundColor,\n FontColor,\n FontSize,\n Fullscreen,\n Heading,\n Highlight,\n HorizontalLine,\n Image,\n Indent,\n Italic,\n Link,\n List,\n MediaEmbed,\n PageBreak,\n RemoveFormat,\n RestrictedEditingModeEditing,\n ShowBlocks,\n SourceEditing,\n SpecialCharacters,\n Strikethrough,\n Subscript,\n Superscript,\n Table,\n TextPartLanguage,\n Underline,\n WordCount,\n} from 'ckeditor5'\n\nimport { PasteAsTextPlugin } from '../plugins/PasteAsTextPlugin'\nimport { PastePlugin } from '../plugins/PastePlugin'\n\n/** Maps TinyMCE string plugin names to CKEditor plugin objects */\nconst PLUGINS_MAP: Record<string, typeof Plugin | null> = {\n bold: Bold,\n italic: Italic,\n underline: Underline,\n strikethrough: Strikethrough,\n list: List,\n lists: List,\n advlist: List,\n link: Link,\n table: Table,\n image: Image,\n imagetools: Image,\n alignment: Alignment,\n fontsize: FontSize,\n fontcolor: FontColor,\n fontbackgroundcolor: FontBackgroundColor,\n indent: Indent,\n autolink: AutoLink,\n anchor: Bookmark,\n autosave: Autosave,\n charmap: SpecialCharacters,\n code: Code,\n codesample: CodeBlock,\n directionality: TextPartLanguage,\n emoticons: Emoji,\n fullscreen: Fullscreen,\n hr: HorizontalLine,\n media: MediaEmbed,\n noneditable: RestrictedEditingModeEditing,\n pagebreak: PageBreak,\n searchreplace: FindAndReplace,\n textpattern: Autoformat,\n visualblocks: ShowBlocks,\n wordcount: WordCount,\n blockquote: BlockQuote,\n subscript: Subscript,\n superscript: Superscript,\n heading: Heading,\n headings: Heading,\n highlight: Highlight,\n removeformat: RemoveFormat,\n source: SourceEditing,\n sourceedit: SourceEditing,\n autoformat: Autoformat,\n nonbreaking: SpecialCharacters,\n paste: PastePlugin,\n pastetext: PasteAsTextPlugin,\n pasteastext: PasteAsTextPlugin,\n\n // Part of CKEditor core\n autoresize: null,\n spellchecker: null,\n tabfocus: null,\n}\n\nconst UNSUPPORTED_PLUGINS = [\n // Would need custom implementation\n 'help',\n 'visualchars',\n 'insertdatetime',\n 'save',\n 'template',\n\n // Not directly supported\n 'importcss', // CKEditor uses explicit style definitions instead of scanning styles for classes\n 'print', // Could be substituted with ExportPdf, but needs cloud services\n 'preview', // Could be substituted with ExportPdf, but needs cloud services\n 'toc', // Would need TableOfContents premium plugin\n\n // Has been removed in TinyMCE 6\n 'bbcode',\n 'colorpicker',\n 'contextmenu',\n 'fullpage',\n 'legacyoutput',\n]\n\n/** Maps TinyMCE toolbar button names to CKEditor command names */\nconst TOOLBAR_MAP: Record<string, string> = {\n link: 'link',\n table: 'insertTable',\n image: 'insertImageViaUrl',\n blockquote: 'blockQuote',\n code: 'code',\n codesample: 'codeBlock',\n hr: 'horizontalLine',\n media: 'mediaEmbed',\n pagebreak: 'pageBreak',\n subscript: 'subscript',\n superscript: 'superscript',\n removeformat: 'removeFormat',\n heading: 'heading',\n headings: 'heading',\n highlight: 'highlight',\n charmap: 'specialCharacters',\n searchreplace: 'findAndReplace',\n source: 'sourceEditing',\n sourceedit: 'sourceEditing',\n visualblocks: 'showBlocks',\n wordcount: 'wordCount',\n emoticons: 'emoji',\n fullscreen: 'fullscreen',\n anchor: 'bookmark',\n toc: 'tableOfContents',\n}\n\n/** Gets CKEditor plugin objects from TinyMCE string plugin names */\nexport const getPluginsFromStringArray = (pluginNames: string[] = []) => {\n const unsupportedPlugins = pluginNames.filter((name) =>\n UNSUPPORTED_PLUGINS.includes(name.toLowerCase())\n )\n if (unsupportedPlugins.length) {\n const pluginsList = unsupportedPlugins.join(', ')\n throw new Error(\n `The following editor plugins are not supported: ${pluginsList}.`\n )\n }\n\n const plugins = pluginNames\n .map((name) => PLUGINS_MAP[name.toLowerCase()])\n .filter(\n (plugin, index, array) =>\n plugin !== null &&\n // Remove duplicates\n array.indexOf(plugin) === index\n )\n return plugins as (typeof Plugin)[]\n}\n\n/** Gets toolbar items that should be added for the given string plugin names. */\nexport const getToolbarItemsFromStringArray = (pluginNames: string[] = []) => {\n return pluginNames\n .map((name) => TOOLBAR_MAP[name.toLowerCase()])\n .filter(Boolean)\n}\n\n/** Enhances an editor config by adding plugins and toolbar items from TinyMCE string array */\nexport const addPluginsFromStringArray = (\n config: EditorConfig,\n pluginNames: string[] = []\n): EditorConfig => {\n if (!pluginNames.length) {\n return config\n }\n const additionalPlugins = getPluginsFromStringArray(pluginNames)\n const additionalToolbarItems = getToolbarItemsFromStringArray(pluginNames)\n\n const currentPlugins = config.plugins || []\n const enhancedPlugins = Array.from(\n new Set([...currentPlugins, ...additionalPlugins])\n )\n\n const currentToolbar = Array.isArray(config.toolbar) ? config.toolbar : []\n\n let enhancedToolbar = currentToolbar\n if (additionalToolbarItems.length > 0) {\n // Remove undo/redo buttons temporarily\n const toolbarWithoutUndo = currentToolbar.filter(\n (item) => item !== 'undo' && item !== 'redo'\n )\n\n // Combine toolbar items\n const combinedItems = [\n ...toolbarWithoutUndo,\n ...additionalToolbarItems,\n '|',\n 'undo',\n 'redo',\n ]\n\n // Deduplicate items while preserving separators\n const seenButtons = new Set<string>()\n enhancedToolbar = combinedItems.filter((item) => {\n if (item === '|') {\n return true\n }\n const itemKey = typeof item === 'string' ? item : JSON.stringify(item)\n if (seenButtons.has(itemKey)) {\n return false\n }\n seenButtons.add(itemKey)\n return true\n })\n }\n return {\n ...config,\n plugins: enhancedPlugins,\n toolbar: enhancedToolbar,\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA,SACEA,SAAS,EACTC,UAAU,EACVC,QAAQ,EACRC,QAAQ,EACRC,UAAU,EACVC,IAAI,EACJC,QAAQ,EACRC,IAAI,EACJC,SAAS,EACTC,KAAK,EACLC,cAAc,EACdC,mBAAmB,EACnBC,SAAS,EACTC,QAAQ,EACRC,UAAU,EACVC,OAAO,EACPC,SAAS,EACTC,cAAc,EACdC,KAAK,EACLC,MAAM,EACNC,MAAM,EACNC,IAAI,EACJC,IAAI,EACJC,UAAU,EACVC,SAAS,EACTC,YAAY,EACZC,4BAA4B,EAC5BC,UAAU,EACVC,aAAa,EACbC,iBAAiB,EACjBC,aAAa,EACbC,SAAS,EACTC,WAAW,EACXC,KAAK,EACLC,gBAAgB,EAChBC,SAAS,EACTC,SAAS,QACJ,WAAW;AAElB,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,WAAW,QAAQ,wBAAwB;;AAEpD;AACA,IAAMC,WAAiD,GAAG;EACxDC,IAAI,EAAEnC,IAAI;EACVoC,MAAM,EAAErB,MAAM;EACdsB,SAAS,EAAEP,SAAS;EACpBQ,aAAa,EAAEb,aAAa;EAC5Bc,IAAI,EAAEtB,IAAI;EACVuB,KAAK,EAAEvB,IAAI;EACXwB,OAAO,EAAExB,IAAI;EACbyB,IAAI,EAAE1B,IAAI;EACV2B,KAAK,EAAEf,KAAK;EACZgB,KAAK,EAAE/B,KAAK;EACZgC,UAAU,EAAEhC,KAAK;EACjBiC,SAAS,EAAEnD,SAAS;EACpBoD,QAAQ,EAAEvC,QAAQ;EAClBwC,SAAS,EAAEzC,SAAS;EACpB0C,mBAAmB,EAAE3C,mBAAmB;EACxC4C,MAAM,EAAEpC,MAAM;EACdqC,QAAQ,EAAEtD,QAAQ;EAClBuD,MAAM,EAAEnD,QAAQ;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