@procore/text-editor 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/.jest/ckeditorMock.js +67 -0
  2. package/.jest/esToolkitMock.js +23 -0
  3. package/.jest/setupTests.js +33 -0
  4. package/.jest/styleMock.js +1 -0
  5. package/.jest/svgTransform.js +10 -0
  6. package/.jest/translationFileMock.js +4 -0
  7. package/.jest/translationMock.js +12 -0
  8. package/LICENSE +84 -0
  9. package/README.md +107 -0
  10. package/codemod/__fixtures__/hammer.config.mjs +15 -0
  11. package/codemod/__fixtures__/jest.config.js +6 -0
  12. package/codemod/__fixtures__/procore.config.js +12 -0
  13. package/codemod/__fixtures__/src/components/ComplexEditor.tsx +21 -0
  14. package/codemod/__fixtures__/src/components/FormWithRichText.tsx +10 -0
  15. package/codemod/__fixtures__/src/components/MultilineFormRichText.tsx +14 -0
  16. package/codemod/__fixtures__/src/components/NoTextEditor.tsx +11 -0
  17. package/codemod/__fixtures__/src/components/ReadOnlyRichText.tsx +10 -0
  18. package/codemod/__fixtures__/src/components/SimpleEditor.tsx +11 -0
  19. package/codemod/__fixtures__/src/components/TypeImportEditor.tsx +17 -0
  20. package/codemod/text-editor-migrate.js +509 -0
  21. package/codemod/text-editor-migrate.test.js +225 -0
  22. package/dist/TextEditor/EditorError.js +9 -0
  23. package/dist/TextEditor/EditorError.js.map +1 -0
  24. package/dist/TextEditor/StickyToolbar/index.js +2 -0
  25. package/dist/TextEditor/StickyToolbar/index.js.map +1 -0
  26. package/dist/TextEditor/StickyToolbar/useStickyToolbar.js +59 -0
  27. package/dist/TextEditor/StickyToolbar/useStickyToolbar.js.map +1 -0
  28. package/dist/TextEditor/StickyToolbar/useStickyToolbar.types.js +2 -0
  29. package/dist/TextEditor/StickyToolbar/useStickyToolbar.types.js.map +1 -0
  30. package/dist/TextEditor/TextEditor.js +226 -0
  31. package/dist/TextEditor/TextEditor.js.map +1 -0
  32. package/dist/TextEditor/TextEditor.styles.js +26 -0
  33. package/dist/TextEditor/TextEditor.styles.js.map +1 -0
  34. package/dist/TextEditor/TextEditor.types.js +2 -0
  35. package/dist/TextEditor/TextEditor.types.js.map +1 -0
  36. package/dist/TextEditor/TextEditorProvider.js +17 -0
  37. package/dist/TextEditor/TextEditorProvider.js.map +1 -0
  38. package/dist/TextEditor/TextEditorProvider.types.js +2 -0
  39. package/dist/TextEditor/TextEditorProvider.types.js.map +1 -0
  40. package/dist/TextEditor/index.js +4 -0
  41. package/dist/TextEditor/index.js.map +1 -0
  42. package/dist/TextEditor/license_key.js +3 -0
  43. package/dist/TextEditor/license_key.js.map +1 -0
  44. package/dist/TextEditor/plugins/CutPlugin/CutCommand.js +99 -0
  45. package/dist/TextEditor/plugins/CutPlugin/CutCommand.js.map +1 -0
  46. package/dist/TextEditor/plugins/CutPlugin/CutPlugin.js +56 -0
  47. package/dist/TextEditor/plugins/CutPlugin/CutPlugin.js.map +1 -0
  48. package/dist/TextEditor/plugins/CutPlugin/index.js +2 -0
  49. package/dist/TextEditor/plugins/CutPlugin/index.js.map +1 -0
  50. package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.js +40 -0
  51. package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.js.map +1 -0
  52. package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/index.js +2 -0
  53. package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/index.js.map +1 -0
  54. package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextCommand.js +86 -0
  55. package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextCommand.js.map +1 -0
  56. package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextPlugin.js +56 -0
  57. package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextPlugin.js.map +1 -0
  58. package/dist/TextEditor/plugins/PasteAsTextPlugin/index.js +2 -0
  59. package/dist/TextEditor/plugins/PasteAsTextPlugin/index.js.map +1 -0
  60. package/dist/TextEditor/plugins/PastePlugin/PasteCommand.js +149 -0
  61. package/dist/TextEditor/plugins/PastePlugin/PasteCommand.js.map +1 -0
  62. package/dist/TextEditor/plugins/PastePlugin/PastePlugin.js +56 -0
  63. package/dist/TextEditor/plugins/PastePlugin/PastePlugin.js.map +1 -0
  64. package/dist/TextEditor/plugins/PastePlugin/index.js +2 -0
  65. package/dist/TextEditor/plugins/PastePlugin/index.js.map +1 -0
  66. package/dist/TextEditor/plugins/TabSpacesPlugin/TabSpacesPlugin.js +87 -0
  67. package/dist/TextEditor/plugins/TabSpacesPlugin/TabSpacesPlugin.js.map +1 -0
  68. package/dist/TextEditor/plugins/TabSpacesPlugin/index.js +2 -0
  69. package/dist/TextEditor/plugins/TabSpacesPlugin/index.js.map +1 -0
  70. package/dist/TextEditor/textEditorTheming/icons.js +24 -0
  71. package/dist/TextEditor/textEditorTheming/icons.js.map +1 -0
  72. package/dist/TextEditor/textEditorTheming/index.js +2 -0
  73. package/dist/TextEditor/textEditorTheming/index.js.map +1 -0
  74. package/dist/TextEditor/textEditorTheming/textEditorTheming.styles.js +10 -0
  75. package/dist/TextEditor/textEditorTheming/textEditorTheming.styles.js.map +1 -0
  76. package/dist/TextEditor/useCKEditorCss.js +36 -0
  77. package/dist/TextEditor/useCKEditorCss.js.map +1 -0
  78. package/dist/TextEditor/useTabAsNavigation.js +29 -0
  79. package/dist/TextEditor/useTabAsNavigation.js.map +1 -0
  80. package/dist/TextEditor/utils/config.js +179 -0
  81. package/dist/TextEditor/utils/config.js.map +1 -0
  82. package/dist/TextEditor/utils/index.js +3 -0
  83. package/dist/TextEditor/utils/index.js.map +1 -0
  84. package/dist/TextEditor/utils/locale.js +102 -0
  85. package/dist/TextEditor/utils/locale.js.map +1 -0
  86. package/dist/TextEditor/utils/plugins.js +184 -0
  87. package/dist/TextEditor/utils/plugins.js.map +1 -0
  88. package/dist/TextEditorOutput/TextEditorOutput.js +29 -0
  89. package/dist/TextEditorOutput/TextEditorOutput.js.map +1 -0
  90. package/dist/TextEditorOutput/TextEditorOutput.styles.js +6 -0
  91. package/dist/TextEditorOutput/TextEditorOutput.styles.js.map +1 -0
  92. package/dist/TextEditorOutput/TextEditorOutput.types.js +2 -0
  93. package/dist/TextEditorOutput/TextEditorOutput.types.js.map +1 -0
  94. package/dist/TextEditorOutput/TextEditorOutput.utils.js +59 -0
  95. package/dist/TextEditorOutput/TextEditorOutput.utils.js.map +1 -0
  96. package/dist/TextEditorOutput/index.js +2 -0
  97. package/dist/TextEditorOutput/index.js.map +1 -0
  98. package/dist/_storyHelpers/constants.js +48 -0
  99. package/dist/_storyHelpers/constants.js.map +1 -0
  100. package/dist/_typedoc/TextEditor/TextEditor.types.json +227 -0
  101. package/dist/_typedoc/TextEditor/TextEditorProvider.types.json +28 -0
  102. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +38 -0
  103. package/dist/_typedoc/deprecations.json +1 -0
  104. package/dist/_utils/propsTypedoc.js +4 -0
  105. package/dist/_utils/propsTypedoc.js.map +1 -0
  106. package/dist/codemod/__fixtures__/src/components/ComplexEditor.d.ts +2 -0
  107. package/dist/codemod/__fixtures__/src/components/FormWithRichText.d.ts +2 -0
  108. package/dist/codemod/__fixtures__/src/components/MultilineFormRichText.d.ts +2 -0
  109. package/dist/codemod/__fixtures__/src/components/NoTextEditor.d.ts +2 -0
  110. package/dist/codemod/__fixtures__/src/components/ReadOnlyRichText.d.ts +2 -0
  111. package/dist/codemod/__fixtures__/src/components/SimpleEditor.d.ts +2 -0
  112. package/dist/codemod/__fixtures__/src/components/TypeImportEditor.d.ts +2 -0
  113. package/dist/index.js +3 -0
  114. package/dist/index.js.map +1 -0
  115. package/dist/src/TextEditor/EditorError.d.ts +2 -0
  116. package/dist/src/TextEditor/StickyToolbar/index.d.ts +2 -0
  117. package/dist/src/TextEditor/StickyToolbar/useStickyToolbar.d.ts +2 -0
  118. package/dist/src/TextEditor/StickyToolbar/useStickyToolbar.types.d.ts +8 -0
  119. package/dist/src/TextEditor/TextEditor.d.ts +44 -0
  120. package/dist/src/TextEditor/TextEditor.styles.d.ts +7 -0
  121. package/dist/src/TextEditor/TextEditor.types.d.ts +155 -0
  122. package/dist/src/TextEditor/TextEditorProvider.d.ts +4 -0
  123. package/dist/src/TextEditor/TextEditorProvider.types.d.ts +14 -0
  124. package/dist/src/TextEditor/index.d.ts +4 -0
  125. package/dist/src/TextEditor/license_key.d.ts +2 -0
  126. package/dist/src/TextEditor/plugins/CutPlugin/CutCommand.d.ts +5 -0
  127. package/dist/src/TextEditor/plugins/CutPlugin/CutPlugin.d.ts +5 -0
  128. package/dist/src/TextEditor/plugins/CutPlugin/index.d.ts +1 -0
  129. package/dist/src/TextEditor/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.d.ts +5 -0
  130. package/dist/src/TextEditor/plugins/IndentPaddingToMarginPlugin/index.d.ts +1 -0
  131. package/dist/src/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextCommand.d.ts +5 -0
  132. package/dist/src/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextPlugin.d.ts +5 -0
  133. package/dist/src/TextEditor/plugins/PasteAsTextPlugin/index.d.ts +1 -0
  134. package/dist/src/TextEditor/plugins/PastePlugin/PasteCommand.d.ts +5 -0
  135. package/dist/src/TextEditor/plugins/PastePlugin/PastePlugin.d.ts +5 -0
  136. package/dist/src/TextEditor/plugins/PastePlugin/index.d.ts +1 -0
  137. package/dist/src/TextEditor/plugins/TabSpacesPlugin/TabSpacesPlugin.d.ts +6 -0
  138. package/dist/src/TextEditor/plugins/TabSpacesPlugin/index.d.ts +1 -0
  139. package/dist/src/TextEditor/textEditorTheming/icons.d.ts +23 -0
  140. package/dist/src/TextEditor/textEditorTheming/index.d.ts +1 -0
  141. package/dist/src/TextEditor/textEditorTheming/textEditorTheming.styles.d.ts +2 -0
  142. package/dist/src/TextEditor/useCKEditorCss.d.ts +3 -0
  143. package/dist/src/TextEditor/useTabAsNavigation.d.ts +11 -0
  144. package/dist/src/TextEditor/utils/config.d.ts +3 -0
  145. package/dist/src/TextEditor/utils/index.d.ts +2 -0
  146. package/dist/src/TextEditor/utils/locale.d.ts +3 -0
  147. package/dist/src/TextEditor/utils/plugins.d.ts +7 -0
  148. package/dist/src/TextEditorOutput/TextEditorOutput.d.ts +8 -0
  149. package/dist/src/TextEditorOutput/TextEditorOutput.styles.d.ts +2 -0
  150. package/dist/src/TextEditorOutput/TextEditorOutput.types.d.ts +21 -0
  151. package/dist/src/TextEditorOutput/TextEditorOutput.utils.d.ts +2 -0
  152. package/dist/src/TextEditorOutput/index.d.ts +2 -0
  153. package/dist/src/_storyHelpers/constants.d.ts +14 -0
  154. package/dist/src/_utils/propsTypedoc.d.ts +3 -0
  155. package/dist/src/index.d.ts +2 -0
  156. package/dist/src/stories/util.d.ts +21 -0
  157. package/dist/stories/util.js +86 -0
  158. package/dist/stories/util.js.map +1 -0
  159. package/jestConfig.d.ts +1 -0
  160. package/jestConfig.js +66 -0
  161. package/package.json +146 -0
@@ -0,0 +1,4 @@
1
+ export { TextEditor } from './TextEditor';
2
+ export * from './TextEditor.types';
3
+ export { TextEditorProvider } from './TextEditorProvider';
4
+ export type { TextEditorProviderProps } from './TextEditorProvider.types';
@@ -0,0 +1,2 @@
1
+ export declare const DEV_CK_EDITOR_LICENSE_KEY = "eyJhbGciOiJFUzI1NiJ9.eyJleHAiOjE3NzQzOTY3OTksImp0aSI6IjE5OGE3YzVmLTkzMDEtNDI4ZC04MDBkLTI3ODQzMWNjMWFhNyIsImRpc3RyaWJ1dGlvbkNoYW5uZWwiOlsic2giLCJkcnVwYWwiXSwid2hpdGVMYWJlbCI6dHJ1ZSwibGljZW5zZVR5cGUiOiJkZXZlbG9wbWVudCIsImZlYXR1cmVzIjpbIkRSVVAiLCJETyIsIkZQIiwiU0MiLCJUT0MiLCJUUEwiLCJQT0UiLCJDQyIsIk1GIiwiU0VFIiwiRUNIIiwiRUlTIiwiTUxMIl0sInZjIjoiOGExYzM1YzkifQ.aWj6JvSWU5pe23uotIIJAtM0vo6Rc4bDUuKIJPCwEI4F70gtB5MrR3-fBI8dQpBUDhe5vL7wFBq0EdoCdMJ9TQ";
2
+ export declare const CK_EDITOR_LICENSE_KEY = "eyJhbGciOiJFUzI1NiJ9.eyJleHAiOjE3NzQzOTY3OTksImp0aSI6ImEyOTVlM2M0LTdlNzMtNDBiNC1hNWI3LTZhNmNmNDFkYzlkNiIsImRpc3RyaWJ1dGlvbkNoYW5uZWwiOlsic2giLCJkcnVwYWwiXSwid2hpdGVMYWJlbCI6dHJ1ZSwiZmVhdHVyZXMiOlsiRFJVUCIsIkRPIiwiRlAiLCJTQyIsIlRPQyIsIlRQTCIsIlBPRSIsIkNDIiwiTUYiLCJTRUUiLCJFQ0giLCJFSVMiLCJNTEwiXSwidmMiOiI4MzU4Nzg0NyJ9.IP1OzVjd-e297egGXW2SnaAmQFl1flhb0kYSv1M4JlKkrmbcVhJLSHvtV5jiwVTegeBkSQZyO6r-1E4OJ-O76g";
@@ -0,0 +1,5 @@
1
+ import { Command } from 'ckeditor5';
2
+ export declare class CutCommand extends Command {
3
+ execute(): Promise<void>;
4
+ refresh(): void;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { Plugin } from 'ckeditor5';
2
+ export declare class CutPlugin extends Plugin {
3
+ static get pluginName(): string;
4
+ init(): void;
5
+ }
@@ -0,0 +1 @@
1
+ export * from './CutPlugin';
@@ -0,0 +1,5 @@
1
+ import { Plugin } from 'ckeditor5';
2
+ export declare class IndentPaddingToMarginPlugin extends Plugin {
3
+ static get pluginName(): string;
4
+ init(): void;
5
+ }
@@ -0,0 +1 @@
1
+ export * from './IndentPaddingToMarginPlugin';
@@ -0,0 +1,5 @@
1
+ import { Command } from 'ckeditor5';
2
+ export declare class PasteAsTextCommand extends Command {
3
+ execute(): Promise<void>;
4
+ refresh(): void;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { Plugin } from 'ckeditor5';
2
+ export declare class PasteAsTextPlugin extends Plugin {
3
+ static get pluginName(): string;
4
+ init(): void;
5
+ }
@@ -0,0 +1 @@
1
+ export * from './PasteAsTextPlugin';
@@ -0,0 +1,5 @@
1
+ import { Command } from 'ckeditor5';
2
+ export declare class PasteCommand extends Command {
3
+ execute(): Promise<void>;
4
+ refresh(): void;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { Plugin } from 'ckeditor5';
2
+ export declare class PastePlugin extends Plugin {
3
+ static get pluginName(): string;
4
+ init(): void;
5
+ }
@@ -0,0 +1 @@
1
+ export * from './PastePlugin';
@@ -0,0 +1,6 @@
1
+ import { Plugin, Widget } from 'ckeditor5';
2
+ export declare class TabSpacesPlugin extends Plugin {
3
+ static get requires(): (typeof Widget)[];
4
+ static get pluginName(): string;
5
+ init(): void;
6
+ }
@@ -0,0 +1 @@
1
+ export * from './TabSpacesPlugin';
@@ -0,0 +1,23 @@
1
+ export declare const alignCenterIcon = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M5,5 L19,5 C19.5522847,5 20,5.44771525 20,6 L20,6 C20,6.55228475 19.5522847,7 19,7 L5,7 C4.44771525,7 4,6.55228475 4,6 L4,6 C4,5.44771525 4.44771525,5 5,5 Z M8,9 L16,9 C16.5522847,9 17,9.44771525 17,10 L17,10 C17,10.5522847 16.5522847,11 16,11 L8,11 C7.44771525,11 7,10.5522847 7,10 L7,10 C7,9.44771525 7.44771525,9 8,9 Z M8,17 L16,17 C16.5522847,17 17,17.4477153 17,18 L17,18 C17,18.5522847 16.5522847,19 16,19 L8,19 C7.44771525,19 7,18.5522847 7,18 L7,18 C7,17.4477153 7.44771525,17 8,17 Z M5,13 L19,13 C19.5522847,13 20,13.4477153 20,14 L20,14 C20,14.5522847 19.5522847,15 19,15 L5,15 C4.44771525,15 4,14.5522847 4,14 L4,14 C4,13.4477153 4.44771525,13 5,13 Z\" fill=\"#000000\"></path>\n </g>\n</svg>";
2
+ export declare const alignLeftIcon = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M5,5 L19,5 C19.5522847,5 20,5.44771525 20,6 L20,6 C20,6.55228475 19.5522847,7 19,7 L5,7 C4.44771525,7 4,6.55228475 4,6 L4,6 C4,5.44771525 4.44771525,5 5,5 Z M5,9 L13,9 C13.5522847,9 14,9.44771525 14,10 L14,10 C14,10.5522847 13.5522847,11 13,11 L5,11 C4.44771525,11 4,10.5522847 4,10 L4,10 C4,9.44771525 4.44771525,9 5,9 Z M5,17 L13,17 C13.5522847,17 14,17.4477153 14,18 L14,18 C14,18.5522847 13.5522847,19 13,19 L5,19 C4.44771525,19 4,18.5522847 4,18 L4,18 C4,17.4477153 4.44771525,17 5,17 Z M5,13 L19,13 C19.5522847,13 20,13.4477153 20,14 L20,14 C20,14.5522847 19.5522847,15 19,15 L5,15 C4.44771525,15 4,14.5522847 4,14 L4,14 C4,13.4477153 4.44771525,13 5,13 Z\" fill=\"#000000\"></path>\n </g>\n</svg>";
3
+ export declare const alignRightIcon = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M5,5 L19,5 C19.5522847,5 20,5.44771525 20,6 L20,6 C20,6.55228475 19.5522847,7 19,7 L5,7 C4.44771525,7 4,6.55228475 4,6 L4,6 C4,5.44771525 4.44771525,5 5,5 Z M11,9 L19,9 C19.5522847,9 20,9.44771525 20,10 L20,10 C20,10.5522847 19.5522847,11 19,11 L11,11 C10.4477153,11 10,10.5522847 10,10 L10,10 C10,9.44771525 10.4477153,9 11,9 Z M11,17 L19,17 C19.5522847,17 20,17.4477153 20,18 L20,18 C20,18.5522847 19.5522847,19 19,19 L11,19 C10.4477153,19 10,18.5522847 10,18 L10,18 C10,17.4477153 10.4477153,17 11,17 Z M5,13 L19,13 C19.5522847,13 20,13.4477153 20,14 L20,14 C20,14.5522847 19.5522847,15 19,15 L5,15 C4.44771525,15 4,14.5522847 4,14 L4,14 C4,13.4477153 4.44771525,13 5,13 Z\" fill=\"#000000\"></path>\n </g>\n</svg>";
4
+ export declare const boldIcon = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M7.76133457,19 C7.50799997,19 7.32133517,18.9400006 7.20133457,18.82 C7.08133397,18.6999994 7.02133457,18.5133346 7.02133457,18.26 L7.001297,5.74 C7.001297,5.473332 7.08133397,5.2833339 7.20133457,5.17 C7.32133517,5.0566661 7.50799997,5 7.76133457,5 L12.78,5 C14.3400078,5 15.5033295,5.3166635 16.27,5.95 C17.0366705,6.5833365 17.42,7.4466612 17.42,8.54 C17.42,9.20667 17.2100021,9.8233305 16.79,10.39 C16.3699979,10.9566695 15.8533364,11.3533322 15.24,11.58 L15.26,11.66 C15.6466686,11.726667 16.0533312,11.9066652 16.48,12.2 C16.9066688,12.4933348 17.2666652,12.8766643 17.56,13.35 C17.8533348,13.8233357 18,14.359997 18,14.96 C18,16.2800066 17.5733376,17.2833299 16.72,17.97 C15.8666624,18.6566701 14.6000084,19 12.92,19 L7.76133457,19 Z M12.7296055,10.74 C13.4167255,10.74 13.9671144,10.5700017 14.3807887,10.23 C14.794463,9.8899983 15.001297,9.4600026 15.001297,8.94 C15.001297,7.7933276 14.2440741,7.22 12.7296055,7.22 L9.28,7.22 L9.28,10.74 L12.7296055,10.74 Z M13.319535,16.76 C14.0451201,16.76 14.603254,16.5900017 14.9939537,16.25 C15.3846533,15.9099983 15.5800002,15.4266698 15.5800002,14.8 C15.5800002,14.2133304 15.3567466,13.7633349 14.9102327,13.45 C14.4637189,13.1366651 13.8218648,12.98 12.9846513,12.98 L9.28,12.98 L9.28,16.76 L13.319535,16.76 Z\" fill=\"#000000\"></path>\n </g>\n</svg>";
5
+ export declare const cutIcon = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M17.921875,15.078125 C18.5572948,15.7135448 18.911458,16.4453084 18.984375,17.2734375 C19.057292,18.1015666 18.8281277,18.7812473 18.296875,19.3125 C18.0677072,19.5416678 17.7994807,19.7135411 17.4921875,19.828125 C17.1848943,19.9427089 16.864585,20 16.53125,20 C16.1145813,20 15.6901063,19.9088551 15.2578125,19.7265625 C14.8255187,19.5442699 14.4270852,19.2760434 14.0625,18.921875 C13.6458313,18.5052063 13.3489592,18.0390651 13.171875,17.5234375 C12.9947908,17.0078099 12.942708,16.5104191 13.015625,16.03125 L12,15 L10.984375,16.03125 C11.057292,16.5104191 11.0052092,17.0078099 10.828125,17.5234375 C10.6510408,18.0390651 10.3541687,18.5052063 9.9375,18.921875 C9.57291484,19.2760434 9.17448133,19.5442699 8.7421875,19.7265625 C8.30989367,19.9088551 7.88541875,20 7.46875,20 C7.135415,20 6.8151057,19.9427089 6.5078125,19.828125 C6.2005193,19.7135411 5.93229281,19.5416678 5.703125,19.3125 C5.17187234,18.7812473 4.94270797,18.1015666 5.015625,17.2734375 C5.08854203,16.4453084 5.44270516,15.7135448 6.078125,15.078125 C6.43229344,14.7239566 6.82812281,14.4557301 7.265625,14.2734375 C7.70312719,14.0911449 8.13020625,14 8.546875,14 L9,14 L10,13 L6.015625,9 C5.76562375,8.74999875 5.57812563,8.44791844 5.453125,8.09375 C5.32812437,7.73958156 5.265625,7.37500188 5.265625,7 C5.265625,6.62499813 5.32812437,6.26041844 5.453125,5.90625 C5.57812563,5.55208156 5.76562375,5.25000125 6.015625,5 L12,11 L17.984375,5 C18.2343763,5.25000125 18.4218744,5.55208156 18.546875,5.90625 C18.6718756,6.26041844 18.734375,6.62499813 18.734375,7 C18.734375,7.37500188 18.6718756,7.73958156 18.546875,8.09375 C18.4218744,8.44791844 18.2343763,8.74999875 17.984375,9 L14,13 L15,14 L15.453125,14 C15.8697938,14 16.2968728,14.0911449 16.734375,14.2734375 C17.1718772,14.4557301 17.5677066,14.7239566 17.921875,15.078125 Z M9.515625,17.21875 C9.56770859,17.0937494 9.60937484,16.9661465 9.640625,16.8359375 C9.67187516,16.7057285 9.6875,16.5781256 9.6875,16.453125 C9.6875,16.3385411 9.66666688,16.2057299 9.625,16.0546875 C9.58333312,15.9036451 9.50000062,15.7656256 9.375,15.640625 C9.24999937,15.5156244 9.11197992,15.4322919 8.9609375,15.390625 C8.80989508,15.3489581 8.67187562,15.328125 8.546875,15.328125 C8.42187437,15.328125 8.29687562,15.3437498 8.171875,15.375 C8.04687437,15.4062502 7.92187563,15.4479164 7.796875,15.5 C7.65104094,15.5625003 7.51302148,15.6380204 7.3828125,15.7265625 C7.25260352,15.8151046 7.13020891,15.9166661 7.015625,16.03125 C6.90104109,16.1458339 6.80208375,16.2656244 6.71875,16.390625 C6.63541625,16.5156256 6.56250031,16.6510409 6.5,16.796875 C6.44791641,16.9218756 6.40625016,17.0468744 6.375,17.171875 C6.34374984,17.2968756 6.328125,17.4218744 6.328125,17.546875 C6.328125,17.6614589 6.34895812,17.7942701 6.390625,17.9453125 C6.43229187,18.0963549 6.51562437,18.2343744 6.640625,18.359375 C6.76562563,18.4843756 6.90364508,18.5677081 7.0546875,18.609375 C7.20572992,18.6510419 7.34374937,18.671875 7.46875,18.671875 C7.58333391,18.671875 7.70572852,18.6562502 7.8359375,18.625 C7.96614648,18.5937498 8.09374937,18.5520836 8.21875,18.5 C8.36458406,18.4374997 8.49999937,18.3619796 8.625,18.2734375 C8.75000062,18.1848954 8.86979109,18.0833339 8.984375,17.96875 C9.09895891,17.8645828 9.20052039,17.7473965 9.2890625,17.6171875 C9.37760461,17.4869785 9.45312469,17.3541673 9.515625,17.21875 Z M12,14.421875 C12.3854186,14.421875 12.7161445,14.2838555 12.9921875,14.0078125 C13.2682305,13.7317695 13.40625,13.3958353 13.40625,13 C13.40625,12.6145814 13.2682305,12.2838555 12.9921875,12.0078125 C12.7161445,11.7317695 12.3854186,11.59375 12,11.59375 C11.6145814,11.59375 11.2838555,11.7317695 11.0078125,12.0078125 C10.7317695,12.2838555 10.59375,12.6145814 10.59375,13 C10.59375,13.3958353 10.7317695,13.7317695 11.0078125,14.0078125 C11.2838555,14.2838555 11.6145814,14.421875 12,14.421875 Z M17.359375,18.359375 C17.4843756,18.2343744 17.5677081,18.0963549 17.609375,17.9453125 C17.6510419,17.7942701 17.671875,17.6614589 17.671875,17.546875 C17.671875,17.4218744 17.6562502,17.2968756 17.625,17.171875 C17.5937498,17.0468744 17.5520836,16.9218756 17.5,16.796875 C17.4374997,16.6510409 17.3645838,16.5156256 17.28125,16.390625 C17.1979162,16.2656244 17.0989589,16.1458339 16.984375,16.03125 C16.8697911,15.9166661 16.7473965,15.8151046 16.6171875,15.7265625 C16.4869785,15.6380204 16.3489591,15.5625003 16.203125,15.5 C16.0781244,15.4479164 15.9531256,15.4062502 15.828125,15.375 C15.7031244,15.3437498 15.5781256,15.328125 15.453125,15.328125 C15.3281244,15.328125 15.1901049,15.3489581 15.0390625,15.390625 C14.8880201,15.4322919 14.7500006,15.5156244 14.625,15.640625 C14.4999994,15.7656256 14.4166669,15.9036451 14.375,16.0546875 C14.3333331,16.2057299 14.3125,16.3385411 14.3125,16.453125 C14.3125,16.5781256 14.3281248,16.7057285 14.359375,16.8359375 C14.3906252,16.9661465 14.4322914,17.0937494 14.484375,17.21875 C14.5468753,17.3541673 14.6223954,17.4869785 14.7109375,17.6171875 C14.7994796,17.7473965 14.9010411,17.8645828 15.015625,17.96875 C15.1302089,18.0833339 15.2499994,18.1848954 15.375,18.2734375 C15.5000006,18.3619796 15.6354159,18.4374997 15.78125,18.5 C15.9062506,18.5520836 16.0338535,18.5937498 16.1640625,18.625 C16.2942715,18.6562502 16.4166661,18.671875 16.53125,18.671875 C16.6562506,18.671875 16.7942701,18.6510419 16.9453125,18.609375 C17.0963549,18.5677081 17.2343744,18.4843756 17.359375,18.359375 Z\" fill=\"#000000\"></path>\n </g>\n</svg>";
6
+ export declare const fontSizeIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"><path d=\"M420-160v-520H200v-120h560v120H540v520H420Z\"/></svg>";
7
+ export declare const bgColorIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n <g id=\"highlight-bg-color\" fill=\"none\" fill-rule=\"evenodd\">\n <rect class=\"tox-icon-highlight-bg-color__color\" width=\"18\" height=\"3\" x=\"3\" y=\"18\" fill=\"#000\"/>\n <path id=\"Shape\" fill=\"#000\" fill-rule=\"nonzero\" d=\"M7.7 16.72L3 16.72 6.35 13.38 5.56 12.59 10.15 8 14.29 12.14 10.15 16.28C9.95218632 16.4717833 9.63781368 16.4717833 9.44 16.28L8.79 15.62 7.7 16.72zM12.79 9.23893424L11 7.44893424 13.93 4.54893424C14.6734185 3.81702192 15.8665815 3.81702192 16.61 4.54893424L18.01 5.99893424C18.7473378 6.74012196 18.7473378 7.93774653 18.01 8.67893424L15.11 11.5789342 13.32 9.77893424 12.79 9.23893424\"/>\n </g>\n</svg>";
8
+ export declare const imageIcon = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M5,15.7393398 L8.26966991,12.4696699 C8.56256313,12.1767767 9.03743687,12.1767767 9.33033009,12.4696699 L11.9,15.0393398 L16.0030032,10.9363366 C16.2958965,10.6434434 16.7707702,10.6434434 17.0636634,10.9363366 L19,12.8726732 L19,5 L5,5 L5,15.7393398 Z M5,17.8606602 L5,19 L7.93933983,19 L10.8393398,16.1 L8.8,14.0606602 L5,17.8606602 Z M19,14.9939935 L16.5333333,12.5273268 L10.0606602,19 L19,19 L19,14.9939935 Z M4,3 L20,3 C20.5522847,3 21,3.44771525 21,4 L21,20 C21,20.5522847 20.5522847,21 20,21 L4,21 C3.44771525,21 3,20.5522847 3,20 L3,4 C3,3.44771525 3.44771525,3 4,3 Z M10,11 C11.1045695,11 12,10.1045695 12,9 C12,7.8954305 11.1045695,7 10,7 C8.8954305,7 8,7.8954305 8,9 C8,10.1045695 8.8954305,11 10,11 Z\" fill=\"#000000\" fill-rule=\"nonzero\"></path>\n </g>\n</svg>";
9
+ export declare const indentIcon = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M7,5 L19,5 C19.5522847,5 20,5.44771525 20,6 L20,6 C20,6.55228475 19.5522847,7 19,7 L7,7 C6.44771525,7 6,6.55228475 6,6 L6,6 C6,5.44771525 6.44771525,5 7,5 Z M12,9 L19,9 C19.5522847,9 20,9.44771525 20,10 L20,10 C20,10.5522847 19.5522847,11 19,11 L12,11 C11.4477153,11 11,10.5522847 11,10 L11,10 C11,9.44771525 11.4477153,9 12,9 Z M12,13 L19,13 C19.5522847,13 20,13.4477153 20,14 L20,14 C20,14.5522847 19.5522847,15 19,15 L12,15 C11.4477153,15 11,14.5522847 11,14 L11,14 C11,13.4477153 11.4477153,13 12,13 Z M7,17 L19,17 C19.5522847,17 20,17.4477153 20,18 C20,18.5522847 19.5522847,19 19,19 L7,19 C6.44771525,19 6,18.5522847 6,18 C6,17.4477153 6.44771525,17 7,17 Z M4.44540608,13.1679497 L6.19733064,12 L4.44540608,10.8320503 C3.98587739,10.5256978 3.86170352,9.90482849 4.16805598,9.4452998 C4.47440844,8.98577112 5.09527778,8.86159725 5.55480647,9.16794971 L8.55480647,11.1679497 C9.14853954,11.5637718 9.14853954,12.4362282 8.55480647,12.8320503 L5.55480647,14.8320503 C5.09527778,15.1384028 4.47440844,15.0142289 4.16805598,14.5547002 C3.86170352,14.0951715 3.98587739,13.4743022 4.44540608,13.1679497 Z\" fill=\"#000000\"></path>\n </g>\n</svg>";
10
+ export declare const italicIcon = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M16.7460938,4.72265625 L16.5703125,5.5625 L16.3066406,5.5625 C15.6686166,5.5625 15.2096368,5.6829415 14.9296875,5.92382812 C14.6497382,6.16471475 14.460938,6.52278408 14.3632812,6.99804688 L12.2929688,16.8027344 C12.2343747,17.0826837 12.2050781,17.2682287 12.2050781,17.359375 C12.2050781,17.8932318 12.6868441,18.1601562 13.6503906,18.1601562 L13.9042969,18.1601562 L13.7285156,19 L7.90820312,19 L8.06445312,18.1601562 L8.328125,18.1601562 C9.43490137,18.1601562 10.0891917,17.6816454 10.2910156,16.7246094 L12.3710938,6.91992188 C12.4231773,6.6725248 12.4492188,6.48697979 12.4492188,6.36328125 C12.4492188,5.82942441 11.9674527,5.5625 11.0039062,5.5625 L10.75,5.5625 L10.9257812,4.72265625 L16.7460938,4.72265625 Z\" fill=\"#000000\"></path>\n </g>\n</svg>";
11
+ export declare const linkIcon = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g transform=\"translate(3.000000, 3.000000)\" fill=\"#000000\" fill-rule=\"nonzero\">\n <path d=\"M3.19,9.345 C3.56860324,8.96738132 4.18139676,8.96738132 4.56,9.345 C4.7414263,9.52619538 4.84336998,9.7720877 4.84336998,10.0285 C4.84336998,10.2849123 4.7414263,10.5308046 4.56,10.712 L2.505,12.764 C2.14184108,13.1264311 1.93775923,13.6184301 1.93775923,14.1315 C1.93775923,14.6445699 2.14184108,15.1365689 2.505,15.499 C3.26220647,16.2542374 4.48779353,16.2542374 5.245,15.499 L10.039,10.712 C10.2204263,10.5308046 10.32237,10.2849123 10.32237,10.0285 C10.32237,9.7720877 10.2204263,9.52619538 10.039,9.345 C9.85726729,9.16376439 9.75512902,8.9176576 9.75512902,8.661 C9.75512902,8.4043424 9.85726729,8.15823561 10.039,7.977 C10.4176032,7.59938132 11.0303968,7.59938132 11.409,7.977 C11.9538916,8.5206667 12.2601117,9.25877256 12.2601117,10.0285 C12.2601117,10.7982274 11.9538916,11.5363333 11.409,12.08 L6.614,16.867 C5.09981452,18.3780248 2.64818548,18.3780248 1.134,16.867 C0.407682162,16.1421379 -0.000481544301,15.1581397 -0.000481544301,14.132 C-0.000481544301,13.1058603 0.407682162,12.1218621 1.134,11.397 L3.19,9.344 L3.19,9.345 Z M14.81,8.655 C14.4313968,9.03261868 13.8186032,9.03261868 13.44,8.655 C13.2585737,8.47380462 13.15663,8.2279123 13.15663,7.9715 C13.15663,7.7150877 13.2585737,7.46919538 13.44,7.288 L15.495,5.236 C15.8581589,4.87356893 16.0622408,4.38156986 16.0622408,3.8685 C16.0622408,3.35543014 15.8581589,2.86343107 15.495,2.501 C14.7377935,1.74576265 13.5122065,1.74576265 12.755,2.501 L7.962,7.288 C7.7805737,7.46919538 7.67863002,7.7150877 7.67863002,7.9715 C7.67863002,8.2279123 7.7805737,8.47380462 7.962,8.655 C8.14373271,8.83623561 8.24587098,9.0823424 8.24587098,9.339 C8.24587098,9.5956576 8.14373271,9.84176439 7.962,10.023 C7.58339676,10.4006187 6.97060324,10.4006187 6.592,10.023 C6.0471084,9.4793333 5.74088831,8.74122744 5.74088831,7.9715 C5.74088831,7.20177256 6.0471084,6.4636667 6.592,5.92 L11.387,1.133 C12.9011855,-0.378024781 15.3528145,-0.378024781 16.867,1.133 C17.5933178,1.85786214 18.0014815,2.84186028 18.0014815,3.868 C18.0014815,4.89413972 17.5933178,5.87813786 16.867,6.603 L14.81,8.656 L14.81,8.655 Z\"></path>\n </g>\n </g>\n</svg>";
12
+ export declare const orderedListIcon = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M10,17 L18,17 C18.5522847,17 19,17.4477153 19,18 L19,18 C19,18.5522847 18.5522847,19 18,19 L10,19 C9.44771525,19 9,18.5522847 9,18 L9,18 C9,17.4477153 9.44771525,17 10,17 Z M10,11 L18,11 C18.5522847,11 19,11.4477153 19,12 L19,12 C19,12.5522847 18.5522847,13 18,13 L10,13 C9.44771525,13 9,12.5522847 9,12 L9,12 C9,11.4477153 9.44771525,11 10,11 Z M10,5 L18,5 C18.5522847,5 19,5.44771525 19,6 L19,6 C19,6.55228475 18.5522847,7 18,7 L10,7 C9.44771525,7 9,6.55228475 9,6 L9,6 C9,5.44771525 9.44771525,5 10,5 Z M6,4 L6,7.5 C6,7.77614237 5.77614237,8 5.5,8 L5.5,8 C5.22385763,8 5,7.77614237 5,7.5 L5,5 L4.5,5 C4.22385763,5 4,4.77614237 4,4.5 L4,4.5 C4,4.22385763 4.22385763,4 4.5,4 L6,4 Z M5,12.7875 L5,12.7875 C5,12.9048605 5.09513949,13 5.2125,13 L6.5,13 C6.77614237,13 7,13.2238576 7,13.5 L7,13.5 C7,13.7761424 6.77614237,14 6.5,14 L4.9125,14 C4.40854017,14 4,13.5914598 4,13.0875 L4,12.8680005 C4,12.4511559 4.25857283,12.0780352 4.64887656,11.9316713 L5.78599318,11.5052526 C5.91471976,11.4569801 6,11.3339207 6,11.1964406 L6,11.1964406 C6,11.0757331 5.90214724,10.9778804 5.78143974,10.9778804 C5.77818164,10.9778804 5.77492395,10.9779532 5.77166911,10.9780989 L4.52816128,11.0337449 C4.24922709,11.046227 4.01298752,10.8302248 4.00050543,10.5512907 C4.00016852,10.5437618 4,10.5362263 4,10.5286898 L4,10.5286898 C4,10.2367025 4.2367025,10 4.52868984,10 L6.0875,10 C6.59145983,10 7,10.4085402 7,10.9125 L7,11.1319995 C7,11.5488441 6.74142717,11.9219648 6.35112344,12.0683287 L5.19896995,12.5003863 C5.07928815,12.5452669 5,12.6596798 5,12.7875 Z M7,17 L7,19 C7,19.5522847 6.55228475,20 6,20 L4.50248984,20 C4.22497236,20 4,19.7750276 4,19.4975102 L4,19.4975102 C4,19.2199927 4.22497236,18.9950203 4.50248984,18.9950203 L5.70248984,18.9950203 C5.86680016,18.9950203 6,18.8618205 6,18.6975102 L6,18.6975102 C6,18.5331998 5.86680016,18.4 5.70248984,18.4 L4.4,18.4 C4.1790861,18.4 4,18.2209139 4,18 L4,18 C4,17.7790861 4.1790861,17.6 4.4,17.6 L5.70203192,17.6 C5.86659515,17.6 6,17.4665951 6,17.3020319 L6,17.3020319 C6,17.1374687 5.86659515,17.0040638 5.70203192,17.0040638 L4.50203192,17.0040638 C4.22476735,17.0040638 4,16.7792965 4,16.5020319 L4,16.5020319 C4,16.2247673 4.22476735,16 4.50203192,16 L6,16 C6.55228475,16 7,16.4477153 7,17 Z\" fill=\"#000000\"></path>\n </g>\n</svg>";
13
+ export declare const outdentIcon = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M7,5 L19,5 C19.5522847,5 20,5.44771525 20,6 L20,6 C20,6.55228475 19.5522847,7 19,7 L7,7 C6.44771525,7 6,6.55228475 6,6 L6,6 C6,5.44771525 6.44771525,5 7,5 Z M12,9 L19,9 C19.5522847,9 20,9.44771525 20,10 L20,10 C20,10.5522847 19.5522847,11 19,11 L12,11 C11.4477153,11 11,10.5522847 11,10 L11,10 C11,9.44771525 11.4477153,9 12,9 Z M12,13 L19,13 C19.5522847,13 20,13.4477153 20,14 L20,14 C20,14.5522847 19.5522847,15 19,15 L12,15 C11.4477153,15 11,14.5522847 11,14 L11,14 C11,13.4477153 11.4477153,13 12,13 Z M7,17 L19,17 C19.5522847,17 20,17.4477153 20,18 C20,18.5522847 19.5522847,19 19,19 L7,19 C6.44771525,19 6,18.5522847 6,18 C6,17.4477153 6.44771525,17 7,17 Z M8.5547002,13.1679497 C9.01422888,13.4743022 9.13840275,14.0951715 8.83205029,14.5547002 C8.52569784,15.0142289 7.90482849,15.1384028 7.4452998,14.8320503 L4.4452998,12.8320503 C3.85156673,12.4362282 3.85156673,11.5637718 4.4452998,11.1679497 L7.4452998,9.16794971 C7.90482849,8.86159725 8.52569784,8.98577112 8.83205029,9.4452998 C9.13840275,9.90482849 9.01422888,10.5256978 8.5547002,10.8320503 L6.80277564,12 L8.5547002,13.1679497 Z\" fill=\"#000000\"></path>\n </g>\n</svg>";
14
+ export declare const pasteIcon = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M18,9 L18,5 L16,5 L16,6 C16,6.55228475 15.5522847,7 15,7 L9,7 C8.44771525,7 8,6.55228475 8,6 L8,5 L6,5 L6,18 L9,18 L9,9 L18,9 Z M9,20 L6,20 C4.9,20 4,19.1 4,18 L4,5 C4,3.9 4.9,3 6,3 L9.18,3 C9.6,1.84 10.7,1 12,1 C13.3,1 14.4,1.84 14.82,3 L18,3 C19.1,3 20,3.9 20,5 L20,9 L21,9 L21,21 L9,21 L9,20 Z M10.5,10.5 L10.5,19.5 L19.5,19.5 L19.5,10.5 L10.5,10.5 Z M12,3 C11.45,3 11,3.45 11,4 C11,4.55 11.45,5 12,5 C12.55,5 13,4.55 13,4 C13,3.45 12.55,3 12,3 Z\" fill=\"#000000\" fill-rule=\"nonzero\"></path>\n </g>\n</svg>";
15
+ export declare const pasteAsTextIcon = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M18,9 L18,5 L16,5 L16,6 C16,6.55228475 15.5522847,7 15,7 L9,7 C8.44771525,7 8,6.55228475 8,6 L8,5 L6,5 L6,18 L9,18 L9,9 L18,9 Z M9,20 L6,20 C4.9,20 4,19.1 4,18 L4,5 C4,3.9 4.9,3 6,3 L9.18,3 C9.6,1.84 10.7,1 12,1 C13.3,1 14.4,1.84 14.82,3 L18,3 C19.1,3 20,3.9 20,5 L20,9 L21,9 L21,21 L9,21 L9,20 Z M10.5,10.5 L10.5,19.5 L19.5,19.5 L19.5,10.5 L10.5,10.5 Z M12,3 C11.45,3 11,3.45 11,4 C11,4.55 11.45,5 12,5 C12.55,5 13,4.55 13,4 C13,3.45 12.55,3 12,3 Z M12,12 L18,12 L18,14 L17.5,14 L17,13 L16,13 L16,17 L16.75,17 L16.75,18 L13.25,18 L13.25,17 L14,17 L14,13 L13,13 L12.5,14 L12,14 L12,12 Z\" fill=\"#000000\" fill-rule=\"nonzero\"></path>\n </g>\n</svg>";
16
+ export declare const redoIcon = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M17.5857864,10 L12.0005018,10 C9.23048858,10 7.60637642,11.3649338 7.14696791,13.5346149 C6.74530564,15.4315738 7.40530592,17.487955 8.50614036,18.1393994 C8.98143697,18.4206672 9.13872838,19.0339838 8.85746057,19.5092804 C8.57619275,19.984577 7.96287611,20.1418684 7.48757951,19.8606006 C5.56719616,18.7241691 4.62522821,15.7892534 5.19034843,13.1203201 C5.8424824,10.0404407 8.27036918,8 12.0005018,8 L17.5857864,8 L14.2928932,4.70710678 C13.9023689,4.31658249 13.9023689,3.68341751 14.2928932,3.29289322 C14.6834175,2.90236893 15.3165825,2.90236893 15.7071068,3.29289322 L20.6884642,8.27425068 C20.8806461,8.45648695 21.0005018,8.71424658 21.0005018,9 C21.0005018,9.28575342 20.8806461,9.54351305 20.6884642,9.72574932 L15.7071068,14.7071068 C15.3165825,15.0976311 14.6834175,15.0976311 14.2928932,14.7071068 C13.9023689,14.3165825 13.9023689,13.6834175 14.2928932,13.2928932 L17.5857864,10 Z\" fill=\"#000000\" fill-rule=\"nonzero\"></path>\n </g>\n</svg>";
17
+ export declare const strikeThroughIcon = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M15.6,8.5 C15.1075019,7.83550117 14.6680853,7.3860845 14.28175,7.15175 C13.7022471,6.80024824 13,6.6 12.301,6.6 C9.6,6.6 9.5,8.34399819 9.5,8.705 C9.5,10.3191181 11.275,10.7081325 12.7,11 C17.089,11.8989518 17.3115,13.8105 17.3,14.9 C17.2851124,16.3104413 16.6,19 12.3,19 C9.4,19 7.75358956,17.5353347 7,16.4285 L8.539,15.2885 C8.88100171,15.8775029 10.08986,17.369 12.244,17.369 C13.831235,17.369 14.6730134,16.9033659 15.1225,16.12925 C15.6106774,15.2885 15.4928729,14.0368422 14.36725,13.45025 C13.6927466,13.0987482 12.8,12.8031236 11.5,12.5 C10.4660496,12.2589117 7.6,11.7 7.6,8.9 C7.6,6 10.2784657,5 12.3865,5 C15.2970223,5 16.6,6.6 17.1,7.4 L15.6,8.5 Z\" fill=\"#000000\"></path>\n <path d=\"M5,11 L19,11 C19.5522847,11 20,11.4477153 20,12 C20,12.5522847 19.5522847,13 19,13 L5,13 C4.44771525,13 4,12.5522847 4,12 C4,11.4477153 4.44771525,11 5,11 Z\" fill=\"#000000\" fill-rule=\"nonzero\"></path>\n </g>\n</svg>";
18
+ export declare const tableIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n <g id=\"table\" fill=\"none\" fill-rule=\"evenodd\" stroke=\"none\" stroke-width=\"1\">\n <path id=\"Shape\" fill=\"#000\" fill-rule=\"nonzero\"\n d=\"M19,4 C20.1045695,4 21,4.8954305 21,6 L21,18 C21,19.1045695 20.1045695,20 19,20 L5,20 C3.8954305,20 3,19.1045695 3,18 L3,6 C3,4.8954305 3.8954305,4 5,4 L19,4 Z M5,14 L5,18 L11,18 L11,14 L5,14 Z M19,14 L13,14 L13,18 L19,18 L19,14 Z M19,8 L13,8 L13,12 L19,12 L19,8 Z M5,12 L11,12 L11,8 L5,8 L5,12 Z\" />\n </g>\n</svg>";
19
+ export declare const textColorIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n <g id=\"text-color\" fill=\"none\" fill-rule=\"evenodd\">\n <rect class=\"tox-icon-text-color__color\" width=\"18\" height=\"3\" x=\"3\" y=\"18\" fill=\"#000\"/>\n <path id=\"shape\" fill=\"#000\" d=\"M8.65997607,16 L7.92201533,16 C7.64587295,16 7.42201533,15.7761424 7.42201533,15.5 C7.42201533,15.4513377 7.42911918,15.4029361 7.44310218,15.3563261 L10.1431022,6.35632606 C10.2065498,6.14483408 10.4012112,6 10.6220153,6 L13.3779847,6 C13.5987888,6 13.7934502,6.14483408 13.8568978,6.35632606 L16.5568978,15.3563261 C16.6362467,15.6208225 16.486155,15.8995642 16.2216586,15.9789131 C16.1750486,15.9928961 16.126647,16 16.0779847,16 L15.3400239,16 C15.1195731,16 14.9251354,15.8556208 14.8613861,15.6445885 L14.1698639,13.3554115 C14.1061146,13.1443792 13.9116769,13 13.6912261,13 L10.3087739,13 C10.0883231,13 9.89388544,13.1443792 9.83013611,13.3554115 L9.13861389,15.6445885 C9.07486456,15.8556208 8.88042694,16 8.65997607,16 Z M11.3301361,8.35541149 L10.7259694,10.3554115 C10.6461154,10.6197559 10.7956744,10.8987838 11.0600188,10.9786378 C11.1069084,10.9928024 11.1556249,11 11.2046073,11 L12.7953927,11 C13.0715351,11 13.2953927,10.7761424 13.2953927,10.5 C13.2953927,10.4510176 13.2881951,10.4023011 13.2740306,10.3554115 L12.6698639,8.35541149 C12.6061146,8.14437924 12.4116769,8 12.1912261,8 L11.8087739,8 C11.5883231,8 11.3938854,8.14437924 11.3301361,8.35541149 Z\"/>\n </g>\n</svg>\n";
20
+ export declare const underlineIcon = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M16,5 L16,5 C16.5522847,5 17,5.44771525 17,6 L17,11.5 C17,12.1250031 16.869793,12.7083306 16.609375,13.25 C16.348957,13.8020861 15.9921898,14.281248 15.5390625,14.6875 C15.0859352,15.093752 14.5572947,15.4114572 13.953125,15.640625 C13.3385386,15.8802095 12.6875034,16 12,16 C11.3124966,16 10.6614614,15.8802095 10.046875,15.640625 C9.44270531,15.4114572 8.91406477,15.093752 8.4609375,14.6875 C8.00781023,14.281248 7.65104297,13.8020861 7.390625,13.25 C7.13020703,12.7083306 7,12.1250031 7,11.5 L7,6 C7,5.44771525 7.44771525,5 8,5 L8,5 C8.55228475,5 9,5.44771525 9,6 L9,11.5 C9,11.8125016 9.0703118,12.1145819 9.2109375,12.40625 C9.3515632,12.6979181 9.54687375,12.9635405 9.796875,13.203125 C10.0885431,13.4531263 10.4244773,13.6484368 10.8046875,13.7890625 C11.1848977,13.9296882 11.5833313,14 12,14 C12.4166687,14 12.8151023,13.9296882 13.1953125,13.7890625 C13.5755227,13.6484368 13.9114569,13.4531263 14.203125,13.203125 C14.4531263,12.9635405 14.6484368,12.6979181 14.7890625,12.40625 C14.9296882,12.1145819 15,11.8125016 15,11.5 L15,6 C15,5.44771525 15.4477153,5 16,5 Z M8,17 L16,17 C16.5522847,17 17,17.4477153 17,18 L17,18 C17,18.5522847 16.5522847,19 16,19 L8,19 C7.44771525,19 7,18.5522847 7,18 L7,18 C7,17.4477153 7.44771525,17 8,17 Z\" fill=\"#000000\"></path>\n </g>\n</svg>";
21
+ export declare const undoIcon = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M6.41421356,8 L12,8 C15.7301326,8 18.1580194,10.0404407 18.8101533,13.1203201 C19.3752736,15.7892534 18.4333056,18.7241691 16.5129223,19.8606006 C16.0376257,20.1418684 15.424309,19.984577 15.1430412,19.5092804 C14.8617734,19.0339838 15.0190648,18.4206672 15.4943614,18.1393994 C16.5951958,17.487955 17.2551961,15.4315738 16.8535339,13.5346149 C16.3941253,11.3649338 14.7700132,10 12,10 L6.41421356,10 L9.70710678,13.2928932 C10.0976311,13.6834175 10.0976311,14.3165825 9.70710678,14.7071068 C9.31658249,15.0976311 8.68341751,15.0976311 8.29289322,14.7071068 L3.29289322,9.70710678 C2.90236893,9.31658249 2.90236893,8.68341751 3.29289322,8.29289322 L8.29289322,3.29289322 C8.68341751,2.90236893 9.31658249,2.90236893 9.70710678,3.29289322 C10.0976311,3.68341751 10.0976311,4.31658249 9.70710678,4.70710678 L6.41421356,8 Z\" fill=\"#000000\" fill-rule=\"nonzero\"></path>\n </g>\n</svg>";
22
+ export declare const unorderedListIcon = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M11,5 L19,5 C19.5522847,5 20,5.44771525 20,6 L20,6 C20,6.55228475 19.5522847,7 19,7 L11,7 C10.4477153,7 10,6.55228475 10,6 L10,6 C10,5.44771525 10.4477153,5 11,5 Z M11,11 L19,11 C19.5522847,11 20,11.4477153 20,12 L20,12 C20,12.5522847 19.5522847,13 19,13 L11,13 C10.4477153,13 10,12.5522847 10,12 L10,12 C10,11.4477153 10.4477153,11 11,11 Z M11,17 L19,17 C19.5522847,17 20,17.4477153 20,18 L20,18 C20,18.5522847 19.5522847,19 19,19 L11,19 C10.4477153,19 10,18.5522847 10,18 L10,18 C10,17.4477153 10.4477153,17 11,17 Z M4.5,6 C4.5,5.58593543 4.64648291,5.23242334 4.93945312,4.93945312 C5.23242334,4.64648291 5.58593543,4.5 6,4.5 C6.41406457,4.5 6.76757666,4.64648291 7.06054688,4.93945312 C7.35351709,5.23242334 7.5,5.58593543 7.5,6 C7.5,6.41406457 7.35351709,6.76757666 7.06054688,7.06054688 C6.76757666,7.35351709 6.41406457,7.5 6,7.5 C5.58593543,7.5 5.23242334,7.35351709 4.93945312,7.06054688 C4.64648291,6.76757666 4.5,6.41406457 4.5,6 Z M4.5,12 C4.5,11.5859354 4.64648291,11.2324233 4.93945312,10.9394531 C5.23242334,10.6464829 5.58593543,10.5 6,10.5 C6.41406457,10.5 6.76757666,10.6464829 7.06054688,10.9394531 C7.35351709,11.2324233 7.5,11.5859354 7.5,12 C7.5,12.4140646 7.35351709,12.7675767 7.06054688,13.0605469 C6.76757666,13.3535171 6.41406457,13.5 6,13.5 C5.58593543,13.5 5.23242334,13.3535171 4.93945312,13.0605469 C4.64648291,12.7675767 4.5,12.4140646 4.5,12 Z M4.5,18 C4.5,17.5859354 4.64648291,17.2324233 4.93945312,16.9394531 C5.23242334,16.6464829 5.58593543,16.5 6,16.5 C6.41406457,16.5 6.76757666,16.6464829 7.06054688,16.9394531 C7.35351709,17.2324233 7.5,17.5859354 7.5,18 C7.5,18.4140646 7.35351709,18.7675767 7.06054688,19.0605469 C6.76757666,19.3535171 6.41406457,19.5 6,19.5 C5.58593543,19.5 5.23242334,19.3535171 4.93945312,19.0605469 C4.64648291,18.7675767 4.5,18.4140646 4.5,18 Z\" fill=\"#000000\"></path>\n </g>\n</svg>";
23
+ export declare const checkmarkIcon = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M18.1679497,5.4452998 C18.4743022,4.98577112 19.0951715,4.86159725 19.5547002,5.16794971 C20.0142289,5.47430216 20.1384028,6.09517151 19.8320503,6.5547002 L11.8320503,18.5547002 C11.4831227,19.0780915 10.7433669,19.1531818 10.2963845,18.7105809 L5.29919894,13.7623796 C4.90675595,13.3737835 4.90363744,12.7406262 5.29223356,12.3481832 C5.68082968,11.9557402 6.31398698,11.9526217 6.70642997,12.3412178 L10.8411868,16.4354442 L18.1679497,5.4452998 Z\" fill=\"#000000\" fill-rule=\"nonzero\"></path>\n </g>\n</svg>";
@@ -0,0 +1 @@
1
+ export * from './textEditorTheming.styles';
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const TextEditorTheme: import("react").NamedExoticComponent<import("styled-components").ExecutionProps & object>;
@@ -0,0 +1,3 @@
1
+ export declare const useCKEditorCss: () => {
2
+ isLoading: boolean;
3
+ };
@@ -0,0 +1,11 @@
1
+ import type { ClassicEditor, EditorConfig } from 'ckeditor5';
2
+ interface UseTabAsNavigationProps {
3
+ enabled: boolean;
4
+ config: EditorConfig;
5
+ editor: ClassicEditor | null;
6
+ }
7
+ interface UseTabAsNavigationReturn {
8
+ config: EditorConfig;
9
+ }
10
+ export declare const useTabAsNavigation: ({ enabled, config, editor, }: UseTabAsNavigationProps) => UseTabAsNavigationReturn;
11
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { ClassicEditor, EditorConfig } from 'ckeditor5';
2
+ export declare const getDefaultConfig: (locale?: string) => EditorConfig;
3
+ export declare const addButtonDataAttributes: (editor: ClassicEditor) => void;
@@ -0,0 +1,2 @@
1
+ export { addButtonDataAttributes, getDefaultConfig } from './config';
2
+ export { addPluginsFromStringArray } from './plugins';
@@ -0,0 +1,3 @@
1
+ import type { Translations } from 'ckeditor5';
2
+ export declare const getValidEditorLocale: (locale: string) => string;
3
+ export declare const getEditorTranslation: (locale: string) => Translations;
@@ -0,0 +1,7 @@
1
+ import type { EditorConfig, Plugin } from 'ckeditor5';
2
+ /** Gets CKEditor plugin objects from TinyMCE string plugin names */
3
+ export declare const getPluginsFromStringArray: (pluginNames?: string[]) => (typeof Plugin)[];
4
+ /** Gets toolbar items that should be added for the given string plugin names. */
5
+ export declare const getToolbarItemsFromStringArray: (pluginNames?: string[]) => string[];
6
+ /** Enhances an editor config by adding plugins and toolbar items from TinyMCE string array */
7
+ export declare const addPluginsFromStringArray: (config: EditorConfig, pluginNames?: string[]) => EditorConfig;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { TextEditorOutputProps } from './TextEditorOutput.types';
3
+ /**
4
+ * Render formatted text from `TextEditor`
5
+ *
6
+ * @since 10.24.0
7
+ */
8
+ export declare const TextEditorOutput: React.ForwardRefExoticComponent<TextEditorOutputProps & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledEditor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -0,0 +1,21 @@
1
+ /// <reference types="react" />
2
+ export interface TextEditorOutputProps {
3
+ /**
4
+ * Formatted text from `TextEditor`
5
+ *
6
+ * @since 10.24.0
7
+ */
8
+ value?: string;
9
+ /**
10
+ * Additional classNames
11
+ *
12
+ * @since 10.24.0
13
+ */
14
+ className?: string;
15
+ /**
16
+ * Additional CSS styles
17
+ *
18
+ * @since 10.24.0
19
+ */
20
+ style?: React.CSSProperties;
21
+ }
@@ -0,0 +1,2 @@
1
+ /** Sanitize HTML content while preserving custom styling */
2
+ export declare const sanitizeTextEditorHtml: (html: string) => string;
@@ -0,0 +1,2 @@
1
+ export { TextEditorOutput } from './TextEditorOutput';
2
+ export type { TextEditorOutputProps } from './TextEditorOutput.types';
@@ -0,0 +1,14 @@
1
+ export declare const exampleText: {
2
+ default: string;
3
+ none: string;
4
+ short_ipsum: string;
5
+ short_sentence: string;
6
+ long_ipsum: string;
7
+ longest_ipsum: string;
8
+ long_ipsum_one_line: string;
9
+ };
10
+ export declare function Ipsum(lengthOrOptions: number | {
11
+ length: number;
12
+ lettercase?: 'sentence' | 'title';
13
+ trailingPeriod?: boolean;
14
+ }): string;
@@ -0,0 +1,3 @@
1
+ export * from '../TextEditor/TextEditor.types';
2
+ export * from '../TextEditor/TextEditorProvider.types';
3
+ export * from '../TextEditorOutput/TextEditorOutput.types';
@@ -0,0 +1,2 @@
1
+ export * from './TextEditor';
2
+ export * from './TextEditorOutput';
@@ -0,0 +1,21 @@
1
+ import { Form } from '@procore/core-react';
2
+ import React from 'react';
3
+ interface SingleFormProps {
4
+ component?: any;
5
+ debug?: boolean;
6
+ initialValue?: any;
7
+ variant?: React.ComponentProps<typeof Form>['variant'];
8
+ view?: React.ComponentProps<typeof Form>['view'];
9
+ }
10
+ /** All variations for a field with TextEditor.
11
+ * @example
12
+ * <BaseCRU
13
+ component={Form.RichText}
14
+ initialValue="<p>Hello</p>"
15
+ textEditorComponent={TextEditor}
16
+ />
17
+ */
18
+ export declare function BaseCRU<Element extends React.JSXElementConstructor<any>>(props: Omit<SingleFormProps, 'component'> & {
19
+ component: Element;
20
+ } & Omit<React.ComponentProps<Element>, 'name'>): React.JSX.Element;
21
+ export {};
@@ -0,0 +1,86 @@
1
+ var _excluded = ["component", "debug", "initialValue", "view", "variant"];
2
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
4
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
5
+ import { Form } from '@procore/core-react';
6
+ import React from 'react';
7
+ /**
8
+ * Takes a Form Field component with TextEditor and creates
9
+ * a full Form of one view and variant.
10
+ */
11
+ var SingleForm = function SingleForm(_ref) {
12
+ var _ref$component = _ref.component,
13
+ FieldComponent = _ref$component === void 0 ? Form.Field : _ref$component,
14
+ debug = _ref.debug,
15
+ initialValue = _ref.initialValue,
16
+ view = _ref.view,
17
+ variant = _ref.variant,
18
+ props = _objectWithoutProperties(_ref, _excluded);
19
+ // removes colStart from DOM for traditional variant
20
+ var columnOne = variant === 'traditional' ? {} : {
21
+ colStart: 1
22
+ };
23
+ var columnTwo = variant === 'traditional' ? {} : {
24
+ colStart: 7
25
+ };
26
+ return /*#__PURE__*/React.createElement(Form, {
27
+ enableReinitialize: true,
28
+ initialValues: {
29
+ value: initialValue
30
+ },
31
+ variant: variant,
32
+ view: view,
33
+ onSubmit: function onSubmit(values) {
34
+ return alert(JSON.stringify(values, null, 2));
35
+ }
36
+ }, /*#__PURE__*/React.createElement(Form.Form, null, /*#__PURE__*/React.createElement(Form.Row, null, /*#__PURE__*/React.createElement(FieldComponent, _extends({
37
+ name: "empty",
38
+ label: "Empty Text",
39
+ description: "Empty Description"
40
+ // TODO: textEditorComponent={textEditorComponent}
41
+ }, columnOne, props)), /*#__PURE__*/React.createElement(FieldComponent, _extends({
42
+ name: "value",
43
+ label: "Initial Value Text",
44
+ description: "Initial Value Description"
45
+ // TODO: textEditorComponent={textEditorComponent}
46
+ }, columnTwo, props))), /*#__PURE__*/React.createElement(Form.Row, null, /*#__PURE__*/React.createElement(FieldComponent, _extends({
47
+ name: "disabled-empty",
48
+ disabled: true,
49
+ label: "Disabled Empty Text",
50
+ description: "Disabled Empty Description"
51
+ // TODO: textEditorComponent={textEditorComponent}
52
+ }, columnOne, props)), /*#__PURE__*/React.createElement(FieldComponent, _extends({
53
+ name: "disabled-value",
54
+ disabled: true,
55
+ label: "Disabled Initial Value Text",
56
+ description: "Disabled Initial Description"
57
+ // TODO: textEditorComponent={textEditorComponent}
58
+ }, columnTwo, props))), /*#__PURE__*/React.createElement(Form.Row, null, /*#__PURE__*/React.createElement(FieldComponent, _extends({
59
+ name: "error-empty",
60
+ error: true,
61
+ label: "Error Boolean Empty Text",
62
+ description: "Error Boolean Description"
63
+ // TODO: textEditorComponent={textEditorComponent}
64
+ }, columnOne, props)), /*#__PURE__*/React.createElement(FieldComponent, _extends({
65
+ name: "error-value",
66
+ error: "Some error message that should be read red",
67
+ label: "Error Message Initial Value Text",
68
+ description: "Error Message Initial Description"
69
+ // TODO: textEditorComponent={textEditorComponent}
70
+ }, columnTwo, props)))));
71
+ };
72
+
73
+ /** All variations for a field with TextEditor.
74
+ * @example
75
+ * <BaseCRU
76
+ component={Form.RichText}
77
+ initialValue="<p>Hello</p>"
78
+ textEditorComponent={TextEditor}
79
+ />
80
+ */
81
+ export function BaseCRU(props) {
82
+ return /*#__PURE__*/React.createElement(SingleForm, _extends({
83
+ view: "create"
84
+ }, props));
85
+ }
86
+ //# sourceMappingURL=util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","names":["Form","React","SingleForm","_ref","_ref$component","component","FieldComponent","Field","debug","initialValue","view","variant","props","_objectWithoutProperties","_excluded","columnOne","colStart","columnTwo","createElement","enableReinitialize","initialValues","value","onSubmit","values","alert","JSON","stringify","Row","_extends","name","label","description","disabled","error","BaseCRU"],"sources":["../../src/stories/util.tsx"],"sourcesContent":["import { Form } from '@procore/core-react'\nimport React from 'react'\n\ninterface SingleFormProps {\n component?: any\n debug?: boolean\n initialValue?: any\n variant?: React.ComponentProps<typeof Form>['variant']\n view?: React.ComponentProps<typeof Form>['view']\n // TODO: textEditorComponent: any\n}\n\n/**\n * Takes a Form Field component with TextEditor and creates\n * a full Form of one view and variant.\n */\nconst SingleForm = ({\n component: FieldComponent = Form.Field,\n debug,\n initialValue,\n view,\n variant,\n // TODO: textEditorComponent,\n ...props\n}: SingleFormProps) => {\n // removes colStart from DOM for traditional variant\n const columnOne = variant === 'traditional' ? {} : { colStart: 1 }\n const columnTwo = variant === 'traditional' ? {} : { colStart: 7 }\n\n return (\n <Form\n enableReinitialize\n initialValues={{\n value: initialValue,\n }}\n variant={variant}\n view={view}\n onSubmit={(values) => alert(JSON.stringify(values, null, 2))}\n >\n <Form.Form>\n <Form.Row>\n <FieldComponent\n name=\"empty\"\n label=\"Empty Text\"\n description=\"Empty Description\"\n // TODO: textEditorComponent={textEditorComponent}\n {...columnOne}\n {...props}\n />\n <FieldComponent\n name=\"value\"\n label=\"Initial Value Text\"\n description=\"Initial Value Description\"\n // TODO: textEditorComponent={textEditorComponent}\n {...columnTwo}\n {...props}\n />\n </Form.Row>\n <Form.Row>\n <FieldComponent\n name=\"disabled-empty\"\n disabled\n label=\"Disabled Empty Text\"\n description=\"Disabled Empty Description\"\n // TODO: textEditorComponent={textEditorComponent}\n {...columnOne}\n {...props}\n />\n <FieldComponent\n name=\"disabled-value\"\n disabled\n label=\"Disabled Initial Value Text\"\n description=\"Disabled Initial Description\"\n // TODO: textEditorComponent={textEditorComponent}\n {...columnTwo}\n {...props}\n />\n </Form.Row>\n <Form.Row>\n <FieldComponent\n name=\"error-empty\"\n error\n label=\"Error Boolean Empty Text\"\n description=\"Error Boolean Description\"\n // TODO: textEditorComponent={textEditorComponent}\n {...columnOne}\n {...props}\n />\n <FieldComponent\n name=\"error-value\"\n error=\"Some error message that should be read red\"\n label=\"Error Message Initial Value Text\"\n description=\"Error Message Initial Description\"\n // TODO: textEditorComponent={textEditorComponent}\n {...columnTwo}\n {...props}\n />\n </Form.Row>\n </Form.Form>\n </Form>\n )\n}\n\n/** All variations for a field with TextEditor.\n * @example\n * <BaseCRU\n component={Form.RichText}\n initialValue=\"<p>Hello</p>\"\n textEditorComponent={TextEditor}\n />\n */\nexport function BaseCRU<Element extends React.JSXElementConstructor<any>>(\n props: Omit<SingleFormProps, 'component'> & {\n component: Element\n // TODO: textEditorComponent: any\n } & Omit<React.ComponentProps<Element>, 'name'>\n) {\n return <SingleForm view=\"create\" {...props} />\n}\n"],"mappings":";;;;AAAA,SAASA,IAAI,QAAQ,qBAAqB;AAC1C,OAAOC,KAAK,MAAM,OAAO;AAWzB;AACA;AACA;AACA;AACA,IAAMC,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA,EAQO;EAAA,IAAAC,cAAA,GAAAD,IAAA,CAPrBE,SAAS;IAAEC,cAAc,GAAAF,cAAA,cAAGJ,IAAI,CAACO,KAAK,GAAAH,cAAA;IACtCI,KAAK,GAAAL,IAAA,CAALK,KAAK;IACLC,YAAY,GAAAN,IAAA,CAAZM,YAAY;IACZC,IAAI,GAAAP,IAAA,CAAJO,IAAI;IACJC,OAAO,GAAAR,IAAA,CAAPQ,OAAO;IAEJC,KAAK,GAAAC,wBAAA,CAAAV,IAAA,EAAAW,SAAA;EAER;EACA,IAAMC,SAAS,GAAGJ,OAAO,KAAK,aAAa,GAAG,CAAC,CAAC,GAAG;IAAEK,QAAQ,EAAE;EAAE,CAAC;EAClE,IAAMC,SAAS,GAAGN,OAAO,KAAK,aAAa,GAAG,CAAC,CAAC,GAAG;IAAEK,QAAQ,EAAE;EAAE,CAAC;EAElE,oBACEf,KAAA,CAAAiB,aAAA,CAAClB,IAAI;IACHmB,kBAAkB;IAClBC,aAAa,EAAE;MACbC,KAAK,EAAEZ;IACT,CAAE;IACFE,OAAO,EAAEA,OAAQ;IACjBD,IAAI,EAAEA,IAAK;IACXY,QAAQ,EAAE,SAAVA,QAAQA,CAAGC,MAAM;MAAA,OAAKC,KAAK,CAACC,IAAI,CAACC,SAAS,CAACH,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAAA;EAAC,gBAE7DtB,KAAA,CAAAiB,aAAA,CAAClB,IAAI,CAACA,IAAI,qBACRC,KAAA,CAAAiB,aAAA,CAAClB,IAAI,CAAC2B,GAAG,qBACP1B,KAAA,CAAAiB,aAAA,CAACZ,cAAc,EAAAsB,QAAA;IACbC,IAAI,EAAC,OAAO;IACZC,KAAK,EAAC,YAAY;IAClBC,WAAW,EAAC;IACZ;EAAA,GACIhB,SAAS,EACTH,KAAK,CACV,CAAC,eACFX,KAAA,CAAAiB,aAAA,CAACZ,cAAc,EAAAsB,QAAA;IACbC,IAAI,EAAC,OAAO;IACZC,KAAK,EAAC,oBAAoB;IAC1BC,WAAW,EAAC;IACZ;EAAA,GACId,SAAS,EACTL,KAAK,CACV,CACO,CAAC,eACXX,KAAA,CAAAiB,aAAA,CAAClB,IAAI,CAAC2B,GAAG,qBACP1B,KAAA,CAAAiB,aAAA,CAACZ,cAAc,EAAAsB,QAAA;IACbC,IAAI,EAAC,gBAAgB;IACrBG,QAAQ;IACRF,KAAK,EAAC,qBAAqB;IAC3BC,WAAW,EAAC;IACZ;EAAA,GACIhB,SAAS,EACTH,KAAK,CACV,CAAC,eACFX,KAAA,CAAAiB,aAAA,CAACZ,cAAc,EAAAsB,QAAA;IACbC,IAAI,EAAC,gBAAgB;IACrBG,QAAQ;IACRF,KAAK,EAAC,6BAA6B;IACnCC,WAAW,EAAC;IACZ;EAAA,GACId,SAAS,EACTL,KAAK,CACV,CACO,CAAC,eACXX,KAAA,CAAAiB,aAAA,CAAClB,IAAI,CAAC2B,GAAG,qBACP1B,KAAA,CAAAiB,aAAA,CAACZ,cAAc,EAAAsB,QAAA;IACbC,IAAI,EAAC,aAAa;IAClBI,KAAK;IACLH,KAAK,EAAC,0BAA0B;IAChCC,WAAW,EAAC;IACZ;EAAA,GACIhB,SAAS,EACTH,KAAK,CACV,CAAC,eACFX,KAAA,CAAAiB,aAAA,CAACZ,cAAc,EAAAsB,QAAA;IACbC,IAAI,EAAC,aAAa;IAClBI,KAAK,EAAC,4CAA4C;IAClDH,KAAK,EAAC,kCAAkC;IACxCC,WAAW,EAAC;IACZ;EAAA,GACId,SAAS,EACTL,KAAK,CACV,CACO,CACD,CACP,CAAC;AAEX,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASsB,OAAOA,CACrBtB,KAG+C,EAC/C;EACA,oBAAOX,KAAA,CAAAiB,aAAA,CAAChB,UAAU,EAAA0B,QAAA;IAAClB,IAAI,EAAC;EAAQ,GAAKE,KAAK,CAAG,CAAC;AAChD"}
@@ -0,0 +1 @@
1
+ export function textEditorJestConfig(config: any): any
package/jestConfig.js ADDED
@@ -0,0 +1,66 @@
1
+ const path = require('path')
2
+
3
+ /** Sets up Jest configuration for packages that use @procore/text-editor components */
4
+ function textEditorJestConfig(config) {
5
+ const textEditorDeps = '@ckeditor|ckeditor5|es-toolkit'
6
+
7
+ const existingIgnorePatterns = config.transformIgnorePatterns || []
8
+
9
+ //Add our dependencies to any existing node_modules pattern
10
+ const updatedIgnorePatterns = existingIgnorePatterns.map((pattern) => {
11
+ if (pattern.includes('node_modules/(?!')) {
12
+ // Use string operations instead of regex to avoid ReDoS vulnerability
13
+ const startPattern = 'node_modules/(?!'
14
+ const startIndex = pattern.indexOf(startPattern)
15
+ if (startIndex !== -1) {
16
+ const afterStart = startIndex + startPattern.length
17
+ const closingParenIndex = pattern.indexOf(')', afterStart)
18
+ if (closingParenIndex !== -1) {
19
+ const existingDeps = pattern.substring(afterStart, closingParenIndex)
20
+ return (
21
+ pattern.substring(0, startIndex) +
22
+ `node_modules/(?!(${textEditorDeps}|${existingDeps}))` +
23
+ pattern.substring(closingParenIndex + 1)
24
+ )
25
+ }
26
+ }
27
+ }
28
+ return pattern
29
+ })
30
+
31
+ // If no node_modules pattern exists, add our own
32
+ const hasNodeModulesPattern = existingIgnorePatterns.some((pattern) =>
33
+ pattern.includes('node_modules/(?!')
34
+ )
35
+
36
+ if (!hasNodeModulesPattern) {
37
+ updatedIgnorePatterns.push(`node_modules/(?!(${textEditorDeps}))`)
38
+ }
39
+
40
+ // Helper to resolve mock files
41
+ function resolveMockFile(mockFileName) {
42
+ return path.resolve(__dirname, '.jest', mockFileName)
43
+ }
44
+
45
+ return {
46
+ ...config,
47
+ moduleNameMapper: {
48
+ '^ckeditor5$': resolveMockFile('ckeditorMock.js'),
49
+ '^@ckeditor/ckeditor5-react$': resolveMockFile('ckeditorMock.js'),
50
+ '^@ckeditor/ckeditor5-utils/src/translation-service$':
51
+ resolveMockFile('translationMock.js'),
52
+ '^ckeditor5/translations/(.+)\\.js$': resolveMockFile(
53
+ 'translationFileMock.js'
54
+ ),
55
+ '^es-toolkit/compat$': resolveMockFile('esToolkitMock.js'),
56
+ ...config.moduleNameMapper,
57
+ },
58
+ transform: {
59
+ '\\.svg$': resolveMockFile('svgTransform.js'),
60
+ ...config.transform,
61
+ },
62
+ transformIgnorePatterns: updatedIgnorePatterns,
63
+ }
64
+ }
65
+
66
+ module.exports = { textEditorJestConfig }