@pega/cosmos-react-rte 9.0.0-build.9.9 → 9.0.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.
Files changed (191) hide show
  1. package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts +4 -2
  2. package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts.map +1 -1
  3. package/lib/components/DynamicContentEditor/DynamicContentEditor.js +64 -59
  4. package/lib/components/DynamicContentEditor/DynamicContentEditor.js.map +1 -1
  5. package/lib/components/Editor/Editor.context.d.ts +6 -6
  6. package/lib/components/Editor/Editor.context.d.ts.map +1 -1
  7. package/lib/components/Editor/Editor.context.js +1 -1
  8. package/lib/components/Editor/Editor.context.js.map +1 -1
  9. package/lib/components/Editor/Editor.d.ts +1 -10
  10. package/lib/components/Editor/Editor.d.ts.map +1 -1
  11. package/lib/components/Editor/Editor.js +301 -490
  12. package/lib/components/Editor/Editor.js.map +1 -1
  13. package/lib/components/Editor/Editor.styles.d.ts +37 -7
  14. package/lib/components/Editor/Editor.styles.d.ts.map +1 -1
  15. package/lib/components/Editor/Editor.styles.js +60 -30
  16. package/lib/components/Editor/Editor.styles.js.map +1 -1
  17. package/lib/components/Editor/Editor.test-ids.d.ts +2 -1
  18. package/lib/components/Editor/Editor.test-ids.d.ts.map +1 -1
  19. package/lib/components/Editor/Editor.test-ids.js +2 -0
  20. package/lib/components/Editor/Editor.test-ids.js.map +1 -1
  21. package/lib/components/Editor/Editor.types.d.ts +34 -14
  22. package/lib/components/Editor/Editor.types.d.ts.map +1 -1
  23. package/lib/components/Editor/Editor.types.js.map +1 -1
  24. package/lib/components/Editor/IframeTiptapEditor.d.ts +30 -0
  25. package/lib/components/Editor/IframeTiptapEditor.d.ts.map +1 -0
  26. package/lib/components/Editor/IframeTiptapEditor.js +695 -0
  27. package/lib/components/Editor/IframeTiptapEditor.js.map +1 -0
  28. package/lib/components/Editor/ImageActionButtons.d.ts +20 -0
  29. package/lib/components/Editor/ImageActionButtons.d.ts.map +1 -0
  30. package/lib/components/Editor/ImageActionButtons.js +84 -0
  31. package/lib/components/Editor/ImageActionButtons.js.map +1 -0
  32. package/lib/components/Editor/ImageEditDialog.d.ts +17 -0
  33. package/lib/components/Editor/ImageEditDialog.d.ts.map +1 -0
  34. package/lib/components/Editor/ImageEditDialog.js +90 -0
  35. package/lib/components/Editor/ImageEditDialog.js.map +1 -0
  36. package/lib/components/Editor/TableCellMenu.d.ts +35 -0
  37. package/lib/components/Editor/TableCellMenu.d.ts.map +1 -0
  38. package/lib/components/Editor/TableCellMenu.js +120 -0
  39. package/lib/components/Editor/TableCellMenu.js.map +1 -0
  40. package/lib/components/Editor/Toolbar/AIRewriteButton.d.ts +17 -0
  41. package/lib/components/Editor/Toolbar/AIRewriteButton.d.ts.map +1 -0
  42. package/lib/components/Editor/Toolbar/AIRewriteButton.js +79 -0
  43. package/lib/components/Editor/Toolbar/AIRewriteButton.js.map +1 -0
  44. package/lib/components/Editor/Toolbar/AlignmentSelect.d.ts +8 -0
  45. package/lib/components/Editor/Toolbar/AlignmentSelect.d.ts.map +1 -0
  46. package/lib/components/Editor/Toolbar/AlignmentSelect.js +137 -0
  47. package/lib/components/Editor/Toolbar/AlignmentSelect.js.map +1 -0
  48. package/lib/components/Editor/Toolbar/AnchorButton.d.ts +3 -4
  49. package/lib/components/Editor/Toolbar/AnchorButton.d.ts.map +1 -1
  50. package/lib/components/Editor/Toolbar/AnchorButton.js +156 -82
  51. package/lib/components/Editor/Toolbar/AnchorButton.js.map +1 -1
  52. package/lib/components/Editor/Toolbar/ColorPickerButton.d.ts +9 -0
  53. package/lib/components/Editor/Toolbar/ColorPickerButton.d.ts.map +1 -0
  54. package/lib/components/Editor/Toolbar/ColorPickerButton.js +190 -0
  55. package/lib/components/Editor/Toolbar/ColorPickerButton.js.map +1 -0
  56. package/lib/components/Editor/Toolbar/FontFamilySelect.d.ts +8 -0
  57. package/lib/components/Editor/Toolbar/FontFamilySelect.d.ts.map +1 -0
  58. package/lib/components/Editor/Toolbar/FontFamilySelect.js +150 -0
  59. package/lib/components/Editor/Toolbar/FontFamilySelect.js.map +1 -0
  60. package/lib/components/Editor/Toolbar/FontSizeSelect.d.ts +8 -0
  61. package/lib/components/Editor/Toolbar/FontSizeSelect.d.ts.map +1 -0
  62. package/lib/components/Editor/Toolbar/FontSizeSelect.js +145 -0
  63. package/lib/components/Editor/Toolbar/FontSizeSelect.js.map +1 -0
  64. package/lib/components/Editor/Toolbar/ImageButton.d.ts +5 -5
  65. package/lib/components/Editor/Toolbar/ImageButton.d.ts.map +1 -1
  66. package/lib/components/Editor/Toolbar/ImageButton.js +131 -18
  67. package/lib/components/Editor/Toolbar/ImageButton.js.map +1 -1
  68. package/lib/components/Editor/Toolbar/SourceCodeButton.d.ts +8 -0
  69. package/lib/components/Editor/Toolbar/SourceCodeButton.d.ts.map +1 -0
  70. package/lib/components/Editor/Toolbar/SourceCodeButton.js +49 -0
  71. package/lib/components/Editor/Toolbar/SourceCodeButton.js.map +1 -0
  72. package/lib/components/Editor/Toolbar/TableButton.d.ts +8 -0
  73. package/lib/components/Editor/Toolbar/TableButton.d.ts.map +1 -0
  74. package/lib/components/Editor/Toolbar/TableButton.js +291 -0
  75. package/lib/components/Editor/Toolbar/TableButton.js.map +1 -0
  76. package/lib/components/Editor/Toolbar/TextSelect.d.ts +4 -5
  77. package/lib/components/Editor/Toolbar/TextSelect.d.ts.map +1 -1
  78. package/lib/components/Editor/Toolbar/TextSelect.js +61 -30
  79. package/lib/components/Editor/Toolbar/TextSelect.js.map +1 -1
  80. package/lib/components/Editor/Toolbar/Toolbar.d.ts +17 -6
  81. package/lib/components/Editor/Toolbar/Toolbar.d.ts.map +1 -1
  82. package/lib/components/Editor/Toolbar/Toolbar.js +169 -47
  83. package/lib/components/Editor/Toolbar/Toolbar.js.map +1 -1
  84. package/lib/components/Editor/Toolbar/Toolbar.test-ids.d.ts +2 -2
  85. package/lib/components/Editor/Toolbar/Toolbar.test-ids.d.ts.map +1 -1
  86. package/lib/components/Editor/Toolbar/Toolbar.test-ids.js +17 -1
  87. package/lib/components/Editor/Toolbar/Toolbar.test-ids.js.map +1 -1
  88. package/lib/components/Editor/Toolbar/WordCount.d.ts +8 -0
  89. package/lib/components/Editor/Toolbar/WordCount.d.ts.map +1 -0
  90. package/lib/components/Editor/Toolbar/WordCount.js +31 -0
  91. package/lib/components/Editor/Toolbar/WordCount.js.map +1 -0
  92. package/lib/components/Editor/extensions/FontSize.d.ts +21 -0
  93. package/lib/components/Editor/extensions/FontSize.d.ts.map +1 -0
  94. package/lib/components/Editor/extensions/FontSize.js +42 -0
  95. package/lib/components/Editor/extensions/FontSize.js.map +1 -0
  96. package/lib/components/Editor/extensions/PreserveDiv.d.ts +13 -0
  97. package/lib/components/Editor/extensions/PreserveDiv.d.ts.map +1 -0
  98. package/lib/components/Editor/extensions/PreserveDiv.js +73 -0
  99. package/lib/components/Editor/extensions/PreserveDiv.js.map +1 -0
  100. package/lib/components/Editor/extensions/TableCellSelection.d.ts +4 -0
  101. package/lib/components/Editor/extensions/TableCellSelection.d.ts.map +1 -0
  102. package/lib/components/Editor/extensions/TableCellSelection.js +53 -0
  103. package/lib/components/Editor/extensions/TableCellSelection.js.map +1 -0
  104. package/lib/components/Editor/extensions/TextIndent.d.ts +22 -0
  105. package/lib/components/Editor/extensions/TextIndent.d.ts.map +1 -0
  106. package/lib/components/Editor/extensions/TextIndent.js +137 -0
  107. package/lib/components/Editor/extensions/TextIndent.js.map +1 -0
  108. package/lib/components/Editor/hooks/useCloseOnEditorClick.d.ts +5 -0
  109. package/lib/components/Editor/hooks/useCloseOnEditorClick.d.ts.map +1 -0
  110. package/lib/components/Editor/hooks/useCloseOnEditorClick.js +18 -0
  111. package/lib/components/Editor/hooks/useCloseOnEditorClick.js.map +1 -0
  112. package/lib/components/Editor/hooks/useEscapeKey.d.ts +4 -0
  113. package/lib/components/Editor/hooks/useEscapeKey.d.ts.map +1 -0
  114. package/lib/components/Editor/hooks/useEscapeKey.js +24 -0
  115. package/lib/components/Editor/hooks/useEscapeKey.js.map +1 -0
  116. package/lib/components/Editor/hooks/useIframeSetup.d.ts +54 -0
  117. package/lib/components/Editor/hooks/useIframeSetup.d.ts.map +1 -0
  118. package/lib/components/Editor/hooks/useIframeSetup.js +284 -0
  119. package/lib/components/Editor/hooks/useIframeSetup.js.map +1 -0
  120. package/lib/components/Editor/hooks/useImageActions.d.ts +19 -0
  121. package/lib/components/Editor/hooks/useImageActions.d.ts.map +1 -0
  122. package/lib/components/Editor/hooks/useImageActions.js +198 -0
  123. package/lib/components/Editor/hooks/useImageActions.js.map +1 -0
  124. package/lib/components/Editor/hooks/useTableCellMenu.d.ts +22 -0
  125. package/lib/components/Editor/hooks/useTableCellMenu.d.ts.map +1 -0
  126. package/lib/components/Editor/hooks/useTableCellMenu.js +120 -0
  127. package/lib/components/Editor/hooks/useTableCellMenu.js.map +1 -0
  128. package/lib/components/Editor/iframeContentStyles.d.ts +10 -0
  129. package/lib/components/Editor/iframeContentStyles.d.ts.map +1 -0
  130. package/lib/components/Editor/iframeContentStyles.js +162 -0
  131. package/lib/components/Editor/iframeContentStyles.js.map +1 -0
  132. package/lib/components/Editor/index.d.ts +2 -0
  133. package/lib/components/Editor/index.d.ts.map +1 -1
  134. package/lib/components/Editor/index.js +1 -0
  135. package/lib/components/Editor/index.js.map +1 -1
  136. package/lib/components/Editor/sanitize.d.ts +3 -0
  137. package/lib/components/Editor/sanitize.d.ts.map +1 -0
  138. package/lib/components/Editor/sanitize.js +11 -0
  139. package/lib/components/Editor/sanitize.js.map +1 -0
  140. package/lib/components/Editor/utils/htmlPlaceholder.d.ts +69 -0
  141. package/lib/components/Editor/utils/htmlPlaceholder.d.ts.map +1 -0
  142. package/lib/components/Editor/utils/htmlPlaceholder.js +154 -0
  143. package/lib/components/Editor/utils/htmlPlaceholder.js.map +1 -0
  144. package/lib/components/RichTextEditor/DecoratorComponents/Table.d.ts +6 -4
  145. package/lib/components/RichTextEditor/DecoratorComponents/Table.d.ts.map +1 -1
  146. package/lib/components/RichTextEditor/DecoratorComponents/Table.js +10 -8
  147. package/lib/components/RichTextEditor/DecoratorComponents/Table.js.map +1 -1
  148. package/lib/components/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  149. package/lib/components/RichTextEditor/RichTextEditor.js +15 -2
  150. package/lib/components/RichTextEditor/RichTextEditor.js.map +1 -1
  151. package/lib/components/RichTextEditor/RichTextEditor.styles.d.ts +5 -5
  152. package/lib/components/RichTextEditor/RichTextEditor.styles.d.ts.map +1 -1
  153. package/lib/components/RichTextEditor/RichTextEditor.styles.js +3 -5
  154. package/lib/components/RichTextEditor/RichTextEditor.styles.js.map +1 -1
  155. package/lib/components/RichTextEditor/RichTextEditor.types.d.ts +5 -0
  156. package/lib/components/RichTextEditor/RichTextEditor.types.d.ts.map +1 -1
  157. package/lib/components/RichTextEditor/RichTextEditor.types.js.map +1 -1
  158. package/lib/components/RichTextEditor/RichTextViewer.d.ts.map +1 -1
  159. package/lib/components/RichTextEditor/RichTextViewer.js +9 -2
  160. package/lib/components/RichTextEditor/RichTextViewer.js.map +1 -1
  161. package/lib/components/RichTextEditor/Toolbar/Toolbar.js +1 -1
  162. package/lib/components/RichTextEditor/Toolbar/Toolbar.js.map +1 -1
  163. package/lib/components/RichTextEditor/Toolbar/Toolbar.types.d.ts +4 -4
  164. package/lib/components/RichTextEditor/Toolbar/Toolbar.types.d.ts.map +1 -1
  165. package/lib/components/RichTextEditor/Toolbar/Toolbar.types.js.map +1 -1
  166. package/lib/components/RichTextEditor/Toolbar/ToolbarButton.d.ts.map +1 -1
  167. package/lib/components/RichTextEditor/Toolbar/ToolbarButton.js +41 -26
  168. package/lib/components/RichTextEditor/Toolbar/ToolbarButton.js.map +1 -1
  169. package/lib/components/RichTextEditor/utils/htmlConverter.d.ts +2 -0
  170. package/lib/components/RichTextEditor/utils/htmlConverter.d.ts.map +1 -1
  171. package/lib/components/RichTextEditor/utils/htmlConverter.js +12 -0
  172. package/lib/components/RichTextEditor/utils/htmlConverter.js.map +1 -1
  173. package/lib/components/RichTextEditor/utils/interactionRenderer.d.ts.map +1 -1
  174. package/lib/components/RichTextEditor/utils/interactionRenderer.js +20 -19
  175. package/lib/components/RichTextEditor/utils/interactionRenderer.js.map +1 -1
  176. package/lib/components/RichTextEditor/utils/markdownConverter.d.ts.map +1 -1
  177. package/lib/components/RichTextEditor/utils/markdownConverter.js +131 -30
  178. package/lib/components/RichTextEditor/utils/markdownConverter.js.map +1 -1
  179. package/lib/components/RichTextEditor/utils/renderers.d.ts +5 -3
  180. package/lib/components/RichTextEditor/utils/renderers.d.ts.map +1 -1
  181. package/lib/components/RichTextEditor/utils/renderers.js +62 -34
  182. package/lib/components/RichTextEditor/utils/renderers.js.map +1 -1
  183. package/lib/components/RichTextEditor/utils/slateConverter.d.ts +4 -3
  184. package/lib/components/RichTextEditor/utils/slateConverter.d.ts.map +1 -1
  185. package/lib/components/RichTextEditor/utils/slateConverter.js +86 -38
  186. package/lib/components/RichTextEditor/utils/slateConverter.js.map +1 -1
  187. package/package.json +30 -8
  188. package/lib/components/Editor/ImageEditor.d.ts +0 -10
  189. package/lib/components/Editor/ImageEditor.d.ts.map +0 -1
  190. package/lib/components/Editor/ImageEditor.js +0 -292
  191. package/lib/components/Editor/ImageEditor.js.map +0 -1
@@ -0,0 +1,42 @@
1
+ import { Extension } from '@tiptap/core';
2
+ import '@tiptap/extension-text-style';
3
+ export const FontSize = Extension.create({
4
+ name: 'fontSize',
5
+ addOptions() {
6
+ return {
7
+ types: ['textStyle']
8
+ };
9
+ },
10
+ addGlobalAttributes() {
11
+ return [
12
+ {
13
+ types: this.options.types,
14
+ attributes: {
15
+ fontSize: {
16
+ default: null,
17
+ parseHTML: element => element.style.fontSize?.replace(/['"]+/g, ''),
18
+ renderHTML: attributes => {
19
+ if (!attributes.fontSize) {
20
+ return {};
21
+ }
22
+ return {
23
+ style: `font-size: ${attributes.fontSize}`
24
+ };
25
+ }
26
+ }
27
+ }
28
+ }
29
+ ];
30
+ },
31
+ addCommands() {
32
+ return {
33
+ setFontSize: (fontSize) => ({ chain }) => {
34
+ return chain().setMark('textStyle', { fontSize }).run();
35
+ },
36
+ unsetFontSize: () => ({ chain }) => {
37
+ return chain().setMark('textStyle', { fontSize: null }).run();
38
+ }
39
+ };
40
+ }
41
+ });
42
+ //# sourceMappingURL=FontSize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FontSize.js","sourceRoot":"","sources":["../../../../src/components/Editor/extensions/FontSize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,8BAA8B,CAAC;AAqBtC,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,CAAkB;IACxD,IAAI,EAAE,UAAU;IAEhB,UAAU;QACR,OAAO;YACL,KAAK,EAAE,CAAC,WAAW,CAAC;SACrB,CAAC;IACJ,CAAC;IAED,mBAAmB;QACjB,OAAO;YACL;gBACE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK;gBACzB,UAAU,EAAE;oBACV,QAAQ,EAAE;wBACR,OAAO,EAAE,IAAI;wBACb,SAAS,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;wBACnE,UAAU,EAAE,UAAU,CAAC,EAAE;4BACvB,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;gCACzB,OAAO,EAAE,CAAC;4BACZ,CAAC;4BAED,OAAO;gCACL,KAAK,EAAE,cAAc,UAAU,CAAC,QAAQ,EAAE;6BAC3C,CAAC;wBACJ,CAAC;qBACF;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAED,WAAW;QACT,OAAO;YACL,WAAW,EACT,CAAC,QAAgB,EAAE,EAAE,CACrB,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;gBACZ,OAAO,KAAK,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC;YAC1D,CAAC;YACH,aAAa,EACX,GAAG,EAAE,CACL,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;gBACZ,OAAO,KAAK,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC;YAChE,CAAC;SACJ,CAAC;IACJ,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { Extension } from '@tiptap/core';\nimport '@tiptap/extension-text-style';\n\nexport interface FontSizeOptions {\n types: string[];\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n fontSize: {\n /**\n * Set the font size\n */\n setFontSize: (size: string) => ReturnType;\n /**\n * Unset the font size\n */\n unsetFontSize: () => ReturnType;\n };\n }\n}\n\nexport const FontSize = Extension.create<FontSizeOptions>({\n name: 'fontSize',\n\n addOptions() {\n return {\n types: ['textStyle']\n };\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n fontSize: {\n default: null,\n parseHTML: element => element.style.fontSize?.replace(/['\"]+/g, ''),\n renderHTML: attributes => {\n if (!attributes.fontSize) {\n return {};\n }\n\n return {\n style: `font-size: ${attributes.fontSize}`\n };\n }\n }\n }\n }\n ];\n },\n\n addCommands() {\n return {\n setFontSize:\n (fontSize: string) =>\n ({ chain }) => {\n return chain().setMark('textStyle', { fontSize }).run();\n },\n unsetFontSize:\n () =>\n ({ chain }) => {\n return chain().setMark('textStyle', { fontSize: null }).run();\n }\n };\n }\n});\n"]}
@@ -0,0 +1,13 @@
1
+ import { Node } from '@tiptap/core';
2
+ export interface PreserveDivOptions {
3
+ HTMLAttributes: Record<string, string>;
4
+ }
5
+ /**
6
+ * PreserveDiv extension for Tiptap
7
+ *
8
+ * Preserves div elements with id, class, or style attributes that contain other blocks.
9
+ * This allows styled container elements from external sources (like email chains) to pass
10
+ * through without being stripped.
11
+ */
12
+ export declare const PreserveDiv: Node<PreserveDivOptions, any>;
13
+ //# sourceMappingURL=PreserveDiv.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PreserveDiv.d.ts","sourceRoot":"","sources":["../../../../src/components/Editor/extensions/PreserveDiv.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AA8BrD,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,+BAgDtB,CAAC"}
@@ -0,0 +1,73 @@
1
+ import { Node, mergeAttributes } from '@tiptap/core';
2
+ /**
3
+ * Attributes to preserve on div elements
4
+ */
5
+ const PRESERVED_ATTRIBUTES = ['id', 'class', 'style', 'title', 'lang', 'dir'];
6
+ /**
7
+ * Get attributes from an element
8
+ */
9
+ const getPreservedAttributes = (element) => {
10
+ const attrs = {};
11
+ PRESERVED_ATTRIBUTES.forEach(attr => {
12
+ const value = element.getAttribute(attr);
13
+ if (value !== null) {
14
+ attrs[attr] = value;
15
+ }
16
+ });
17
+ // Get data-* attributes
18
+ Array.from(element.attributes).forEach(attr => {
19
+ if (attr.name.startsWith('data-')) {
20
+ attrs[attr.name] = attr.value;
21
+ }
22
+ });
23
+ return attrs;
24
+ };
25
+ /**
26
+ * PreserveDiv extension for Tiptap
27
+ *
28
+ * Preserves div elements with id, class, or style attributes that contain other blocks.
29
+ * This allows styled container elements from external sources (like email chains) to pass
30
+ * through without being stripped.
31
+ */
32
+ export const PreserveDiv = Node.create({
33
+ name: 'preserveDiv',
34
+ group: 'block',
35
+ content: 'block*',
36
+ isolating: true,
37
+ addOptions() {
38
+ return {
39
+ HTMLAttributes: {}
40
+ };
41
+ },
42
+ addAttributes() {
43
+ return {
44
+ preservedAttrs: {
45
+ default: {},
46
+ parseHTML: element => getPreservedAttributes(element),
47
+ renderHTML: attributes => attributes.preservedAttrs || {}
48
+ }
49
+ };
50
+ },
51
+ parseHTML() {
52
+ return [
53
+ {
54
+ tag: 'div',
55
+ priority: 30,
56
+ getAttrs: element => {
57
+ if (typeof element === 'string')
58
+ return false;
59
+ if (!element.getAttribute('id') &&
60
+ !element.getAttribute('class') &&
61
+ !element.getAttribute('style')) {
62
+ return false;
63
+ }
64
+ return null;
65
+ }
66
+ }
67
+ ];
68
+ },
69
+ renderHTML({ HTMLAttributes }) {
70
+ return ['div', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
71
+ }
72
+ });
73
+ //# sourceMappingURL=PreserveDiv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PreserveDiv.js","sourceRoot":"","sources":["../../../../src/components/Editor/extensions/PreserveDiv.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAErD;;GAEG;AACH,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAE9E;;GAEG;AACH,MAAM,sBAAsB,GAAG,CAAC,OAAoB,EAA0B,EAAE;IAC9E,MAAM,KAAK,GAA2B,EAAE,CAAC;IAEzC,oBAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QAClC,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACnB,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;QACtB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,wBAAwB;IACxB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QAC5C,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;YAClC,KAAK,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,CAAC,CAAC","sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core';\n\n/**\n * Attributes to preserve on div elements\n */\nconst PRESERVED_ATTRIBUTES = ['id', 'class', 'style', 'title', 'lang', 'dir'];\n\n/**\n * Get attributes from an element\n */\nconst getPreservedAttributes = (element: HTMLElement): Record<string, string> => {\n const attrs: Record<string, string> = {};\n\n PRESERVED_ATTRIBUTES.forEach(attr => {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attrs[attr] = value;\n }\n });\n\n // Get data-* attributes\n Array.from(element.attributes).forEach(attr => {\n if (attr.name.startsWith('data-')) {\n attrs[attr.name] = attr.value;\n }\n });\n\n return attrs;\n};\n\nexport interface PreserveDivOptions {\n HTMLAttributes: Record<string, string>;\n}\n\n/**\n * PreserveDiv extension for Tiptap\n *\n * Preserves div elements with id, class, or style attributes that contain other blocks.\n * This allows styled container elements from external sources (like email chains) to pass\n * through without being stripped.\n */\nexport const PreserveDiv = Node.create<PreserveDivOptions>({\n name: 'preserveDiv',\n\n group: 'block',\n\n content: 'block*',\n\n isolating: true,\n\n addOptions() {\n return {\n HTMLAttributes: {}\n };\n },\n\n addAttributes() {\n return {\n preservedAttrs: {\n default: {},\n parseHTML: element => getPreservedAttributes(element),\n renderHTML: attributes => attributes.preservedAttrs || {}\n }\n };\n },\n\n parseHTML() {\n return [\n {\n tag: 'div',\n priority: 30,\n getAttrs: element => {\n if (typeof element === 'string') return false;\n if (\n !element.getAttribute('id') &&\n !element.getAttribute('class') &&\n !element.getAttribute('style')\n ) {\n return false;\n }\n return null;\n }\n }\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['div', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n }\n});\n"]}
@@ -0,0 +1,4 @@
1
+ import { Extension } from '@tiptap/core';
2
+ declare const TableCellSelection: Extension<any, any>;
3
+ export default TableCellSelection;
4
+ //# sourceMappingURL=TableCellSelection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableCellSelection.d.ts","sourceRoot":"","sources":["../../../../src/components/Editor/extensions/TableCellSelection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC,QAAA,MAAM,kBAAkB,qBAsDtB,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,53 @@
1
+ import { Extension } from '@tiptap/core';
2
+ import { Plugin, PluginKey } from '@tiptap/pm/state';
3
+ import { CellSelection } from '@tiptap/pm/tables';
4
+ const TableCellSelection = Extension.create({
5
+ name: 'tableCellSelection',
6
+ addProseMirrorPlugins() {
7
+ return [
8
+ new Plugin({
9
+ key: new PluginKey('tableCellSelection'),
10
+ appendTransaction(transactions, oldState, newState) {
11
+ // Only process if selection changed
12
+ if (!transactions.some(tr => tr.selectionSet)) {
13
+ return null;
14
+ }
15
+ const { selection } = newState;
16
+ // Already a cell selection, nothing to do
17
+ if (selection instanceof CellSelection) {
18
+ return null;
19
+ }
20
+ // Check if selection spans multiple table cells
21
+ const { $from, $to } = selection;
22
+ // Find the table cell containing a resolved position by walking up the depth
23
+ const findCellPos = ($pos) => {
24
+ for (let d = $pos.depth; d > 0; d -= 1) {
25
+ const node = $pos.node(d);
26
+ if (node.type.name === 'tableCell' || node.type.name === 'tableHeader') {
27
+ return $pos.before(d);
28
+ }
29
+ }
30
+ return null;
31
+ };
32
+ const fromCell = findCellPos($from);
33
+ const toCell = findCellPos($to);
34
+ // If both ends are in table cells and they're different cells
35
+ if (fromCell !== null && toCell !== null && fromCell !== toCell) {
36
+ // Convert to cell selection
37
+ try {
38
+ const cellSelection = CellSelection.create(newState.doc, fromCell, toCell);
39
+ return newState.tr.setSelection(cellSelection);
40
+ }
41
+ catch {
42
+ // If cell selection creation fails, leave selection as is
43
+ return null;
44
+ }
45
+ }
46
+ return null;
47
+ }
48
+ })
49
+ ];
50
+ }
51
+ });
52
+ export default TableCellSelection;
53
+ //# sourceMappingURL=TableCellSelection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableCellSelection.js","sourceRoot":"","sources":["../../../../src/components/Editor/extensions/TableCellSelection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,kBAAkB,GAAG,SAAS,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,oBAAoB;IAE1B,qBAAqB;QACnB,OAAO;YACL,IAAI,MAAM,CAAC;gBACT,GAAG,EAAE,IAAI,SAAS,CAAC,oBAAoB,CAAC;gBACxC,iBAAiB,CAAC,YAAY,EAAE,QAAQ,EAAE,QAAQ;oBAChD,oCAAoC;oBACpC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC;wBAC9C,OAAO,IAAI,CAAC;oBACd,CAAC;oBAED,MAAM,EAAE,SAAS,EAAE,GAAG,QAAQ,CAAC;oBAE/B,0CAA0C;oBAC1C,IAAI,SAAS,YAAY,aAAa,EAAE,CAAC;wBACvC,OAAO,IAAI,CAAC;oBACd,CAAC;oBAED,gDAAgD;oBAChD,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,SAAS,CAAC;oBAEjC,6EAA6E;oBAC7E,MAAM,WAAW,GAAG,CAAC,IAAkB,EAAiB,EAAE;wBACxD,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;4BACvC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;4BAC1B,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;gCACvE,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;4BACxB,CAAC;wBACH,CAAC;wBACD,OAAO,IAAI,CAAC;oBACd,CAAC,CAAC;oBAEF,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;oBACpC,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;oBAEhC,8DAA8D;oBAC9D,IAAI,QAAQ,KAAK,IAAI,IAAI,MAAM,KAAK,IAAI,IAAI,QAAQ,KAAK,MAAM,EAAE,CAAC;wBAChE,4BAA4B;wBAC5B,IAAI,CAAC;4BACH,MAAM,aAAa,GAAG,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;4BAC3E,OAAO,QAAQ,CAAC,EAAE,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;wBACjD,CAAC;wBAAC,MAAM,CAAC;4BACP,0DAA0D;4BAC1D,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC;oBAED,OAAO,IAAI,CAAC;gBACd,CAAC;aACF,CAAC;SACH,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,eAAe,kBAAkB,CAAC","sourcesContent":["import { Extension } from '@tiptap/core';\nimport { Plugin, PluginKey } from '@tiptap/pm/state';\nimport { CellSelection } from '@tiptap/pm/tables';\n\nconst TableCellSelection = Extension.create({\n name: 'tableCellSelection',\n\n addProseMirrorPlugins() {\n return [\n new Plugin({\n key: new PluginKey('tableCellSelection'),\n appendTransaction(transactions, oldState, newState) {\n // Only process if selection changed\n if (!transactions.some(tr => tr.selectionSet)) {\n return null;\n }\n\n const { selection } = newState;\n\n // Already a cell selection, nothing to do\n if (selection instanceof CellSelection) {\n return null;\n }\n\n // Check if selection spans multiple table cells\n const { $from, $to } = selection;\n\n // Find the table cell containing a resolved position by walking up the depth\n const findCellPos = ($pos: typeof $from): number | null => {\n for (let d = $pos.depth; d > 0; d -= 1) {\n const node = $pos.node(d);\n if (node.type.name === 'tableCell' || node.type.name === 'tableHeader') {\n return $pos.before(d);\n }\n }\n return null;\n };\n\n const fromCell = findCellPos($from);\n const toCell = findCellPos($to);\n\n // If both ends are in table cells and they're different cells\n if (fromCell !== null && toCell !== null && fromCell !== toCell) {\n // Convert to cell selection\n try {\n const cellSelection = CellSelection.create(newState.doc, fromCell, toCell);\n return newState.tr.setSelection(cellSelection);\n } catch {\n // If cell selection creation fails, leave selection as is\n return null;\n }\n }\n\n return null;\n }\n })\n ];\n }\n});\n\nexport default TableCellSelection;\n"]}
@@ -0,0 +1,22 @@
1
+ import { Extension } from '@tiptap/core';
2
+ export interface TextIndentOptions {
3
+ types: string[];
4
+ indentUnit: string;
5
+ defaultIndentLevel: number;
6
+ }
7
+ declare module '@tiptap/core' {
8
+ interface Commands<ReturnType> {
9
+ textIndent: {
10
+ /**
11
+ * Increase indentation
12
+ */
13
+ indent: () => ReturnType;
14
+ /**
15
+ * Decrease indentation
16
+ */
17
+ outdent: () => ReturnType;
18
+ };
19
+ }
20
+ }
21
+ export declare const TextIndent: Extension<TextIndentOptions, any>;
22
+ //# sourceMappingURL=TextIndent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextIndent.d.ts","sourceRoot":"","sources":["../../../../src/components/Editor/extensions/TextIndent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,OAAO,QAAQ,cAAc,CAAC;IAC5B,UAAU,QAAQ,CAAC,UAAU;QAC3B,UAAU,EAAE;YACV;;eAEG;YACH,MAAM,EAAE,MAAM,UAAU,CAAC;YACzB;;eAEG;YACH,OAAO,EAAE,MAAM,UAAU,CAAC;SAC3B,CAAC;KACH;CACF;AAED,eAAO,MAAM,UAAU,mCAiKrB,CAAC"}
@@ -0,0 +1,137 @@
1
+ import { Extension } from '@tiptap/core';
2
+ export const TextIndent = Extension.create({
3
+ name: 'textIndent',
4
+ addOptions() {
5
+ return {
6
+ types: ['paragraph', 'heading'],
7
+ indentUnit: '2ch',
8
+ defaultIndentLevel: 0
9
+ };
10
+ },
11
+ addGlobalAttributes() {
12
+ return [
13
+ {
14
+ types: this.options.types,
15
+ attributes: {
16
+ indent: {
17
+ default: this.options.defaultIndentLevel,
18
+ parseHTML: element => {
19
+ const paddingInlineStart = element.style.paddingInlineStart || element.style.paddingLeft;
20
+ if (!paddingInlineStart)
21
+ return this.options.defaultIndentLevel;
22
+ // Extract numeric values (e.g., "4ch" -> 4, "2ch" -> 2)
23
+ const value = parseFloat(paddingInlineStart);
24
+ const unitValue = parseFloat(this.options.indentUnit);
25
+ // Calculate and return the level
26
+ return Math.round(value / unitValue);
27
+ },
28
+ renderHTML: attributes => {
29
+ if (!attributes.indent) {
30
+ return {};
31
+ }
32
+ // Extract numeric value and unit type from indentUnit (e.g., "2ch" -> 2 and "ch")
33
+ const unitValue = parseFloat(this.options.indentUnit);
34
+ const unitType = this.options.indentUnit.replace(/[\d.]/g, '');
35
+ return {
36
+ style: `padding-inline-start: ${attributes.indent * unitValue}${unitType}`
37
+ };
38
+ }
39
+ }
40
+ }
41
+ }
42
+ ];
43
+ },
44
+ addCommands() {
45
+ return {
46
+ indent: () => ({ tr, state, dispatch }) => {
47
+ const { selection } = state;
48
+ const { from, to } = selection;
49
+ let handled = false;
50
+ // Check if any node in selection is a list item
51
+ let inList = false;
52
+ state.doc.nodesBetween(from, to, node => {
53
+ if (node.type.name === 'listItem') {
54
+ inList = true;
55
+ return false;
56
+ }
57
+ });
58
+ // If in a list, don't handle - let list commands handle it
59
+ if (inList) {
60
+ return false;
61
+ }
62
+ state.doc.nodesBetween(from, to, (node, pos) => {
63
+ if (this.options.types.includes(node.type.name)) {
64
+ const currentIndent = node.attrs.indent || this.options.defaultIndentLevel;
65
+ tr.setNodeMarkup(pos, undefined, {
66
+ ...node.attrs,
67
+ indent: currentIndent + 1
68
+ });
69
+ handled = true;
70
+ }
71
+ });
72
+ if (handled && dispatch) {
73
+ dispatch(tr);
74
+ }
75
+ return handled;
76
+ },
77
+ outdent: () => ({ tr, state, dispatch }) => {
78
+ const { selection } = state;
79
+ const { from, to } = selection;
80
+ let handled = false;
81
+ // Check if any node in selection is a list item
82
+ let inList = false;
83
+ state.doc.nodesBetween(from, to, node => {
84
+ if (node.type.name === 'listItem') {
85
+ inList = true;
86
+ return false;
87
+ }
88
+ });
89
+ // If in a list, don't handle - let list commands handle it
90
+ if (inList) {
91
+ return false;
92
+ }
93
+ state.doc.nodesBetween(from, to, (node, pos) => {
94
+ if (this.options.types.includes(node.type.name)) {
95
+ const currentIndent = node.attrs.indent || this.options.defaultIndentLevel;
96
+ const prevIndent = Math.max(0, currentIndent - 1);
97
+ if (prevIndent !== currentIndent) {
98
+ tr.setNodeMarkup(pos, undefined, {
99
+ ...node.attrs,
100
+ indent: prevIndent
101
+ });
102
+ handled = true;
103
+ }
104
+ }
105
+ });
106
+ if (handled && dispatch) {
107
+ dispatch(tr);
108
+ }
109
+ return handled;
110
+ }
111
+ };
112
+ },
113
+ addKeyboardShortcuts() {
114
+ return {
115
+ // Tab is reserved for form navigation, use Alt+M for indentation
116
+ 'Alt-m': () => this.editor.commands.indent(),
117
+ 'Alt-Shift-m': () => this.editor.commands.outdent(),
118
+ Backspace: () => {
119
+ const { state } = this.editor;
120
+ const { selection } = state;
121
+ const { $from } = selection;
122
+ // Only handle if cursor is at the start of a text block
123
+ if (!selection.empty || $from.parentOffset !== 0) {
124
+ return false;
125
+ }
126
+ const node = $from.parent;
127
+ const indent = node.attrs.indent;
128
+ // If the node has indentation, outdent instead of deleting
129
+ if (indent && indent > 0 && this.options.types.includes(node.type.name)) {
130
+ return this.editor.commands.outdent();
131
+ }
132
+ return false;
133
+ }
134
+ };
135
+ }
136
+ });
137
+ //# sourceMappingURL=TextIndent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextIndent.js","sourceRoot":"","sources":["../../../../src/components/Editor/extensions/TextIndent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAuBzC,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC,MAAM,CAAoB;IAC5D,IAAI,EAAE,YAAY;IAElB,UAAU;QACR,OAAO;YACL,KAAK,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC;YAC/B,UAAU,EAAE,KAAK;YACjB,kBAAkB,EAAE,CAAC;SACtB,CAAC;IACJ,CAAC;IAED,mBAAmB;QACjB,OAAO;YACL;gBACE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK;gBACzB,UAAU,EAAE;oBACV,MAAM,EAAE;wBACN,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,kBAAkB;wBACxC,SAAS,EAAE,OAAO,CAAC,EAAE;4BACnB,MAAM,kBAAkB,GACtB,OAAO,CAAC,KAAK,CAAC,kBAAkB,IAAI,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC;4BAChE,IAAI,CAAC,kBAAkB;gCAAE,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC;4BAEhE,wDAAwD;4BACxD,MAAM,KAAK,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC;4BAC7C,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;4BAEtD,iCAAiC;4BACjC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;wBACvC,CAAC;wBACD,UAAU,EAAE,UAAU,CAAC,EAAE;4BACvB,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;gCACvB,OAAO,EAAE,CAAC;4BACZ,CAAC;4BAED,kFAAkF;4BAClF,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI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AM,CAAC;gBAEjC,2DAA2D;gBAC3D,IAAI,MAAM,IAAI,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;oBACxE,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;gBACxC,CAAC;gBAED,OAAO,KAAK,CAAC;YACf,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { Extension } from '@tiptap/core';\n\nexport interface TextIndentOptions {\n types: string[];\n indentUnit: string;\n defaultIndentLevel: number;\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n textIndent: {\n /**\n * Increase indentation\n */\n indent: () => ReturnType;\n /**\n * Decrease indentation\n */\n outdent: () => ReturnType;\n };\n }\n}\n\nexport const TextIndent = Extension.create<TextIndentOptions>({\n name: 'textIndent',\n\n addOptions() {\n return {\n types: ['paragraph', 'heading'],\n indentUnit: '2ch',\n defaultIndentLevel: 0\n };\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n indent: {\n default: this.options.defaultIndentLevel,\n parseHTML: element => {\n const paddingInlineStart =\n element.style.paddingInlineStart || element.style.paddingLeft;\n if (!paddingInlineStart) return this.options.defaultIndentLevel;\n\n // Extract numeric values (e.g., \"4ch\" -> 4, \"2ch\" -> 2)\n const value = parseFloat(paddingInlineStart);\n const unitValue = parseFloat(this.options.indentUnit);\n\n // Calculate and return the level\n return Math.round(value / unitValue);\n },\n renderHTML: attributes => {\n if (!attributes.indent) {\n return {};\n }\n\n // Extract numeric value and unit type from indentUnit (e.g., \"2ch\" -> 2 and \"ch\")\n const unitValue = parseFloat(this.options.indentUnit);\n const unitType = this.options.indentUnit.replace(/[\\d.]/g, '');\n\n return {\n style: `padding-inline-start: ${attributes.indent * unitValue}${unitType}`\n };\n }\n }\n }\n }\n ];\n },\n\n addCommands() {\n return {\n indent:\n () =>\n ({ tr, state, dispatch }) => {\n const { selection } = state;\n const { from, to } = selection;\n let handled = false;\n\n // Check if any node in selection is a list item\n let inList = false;\n state.doc.nodesBetween(from, to, node => {\n if (node.type.name === 'listItem') {\n inList = true;\n return false;\n }\n });\n\n // If in a list, don't handle - let list commands handle it\n if (inList) {\n return false;\n }\n\n state.doc.nodesBetween(from, to, (node, pos) => {\n if (this.options.types.includes(node.type.name)) {\n const currentIndent = node.attrs.indent || this.options.defaultIndentLevel;\n tr.setNodeMarkup(pos, undefined, {\n ...node.attrs,\n indent: currentIndent + 1\n });\n handled = true;\n }\n });\n\n if (handled && dispatch) {\n dispatch(tr);\n }\n\n return handled;\n },\n outdent:\n () =>\n ({ tr, state, dispatch }) => {\n const { selection } = state;\n const { from, to } = selection;\n let handled = false;\n\n // Check if any node in selection is a list item\n let inList = false;\n state.doc.nodesBetween(from, to, node => {\n if (node.type.name === 'listItem') {\n inList = true;\n return false;\n }\n });\n\n // If in a list, don't handle - let list commands handle it\n if (inList) {\n return false;\n }\n\n state.doc.nodesBetween(from, to, (node, pos) => {\n if (this.options.types.includes(node.type.name)) {\n const currentIndent = node.attrs.indent || this.options.defaultIndentLevel;\n const prevIndent = Math.max(0, currentIndent - 1);\n\n if (prevIndent !== currentIndent) {\n tr.setNodeMarkup(pos, undefined, {\n ...node.attrs,\n indent: prevIndent\n });\n handled = true;\n }\n }\n });\n\n if (handled && dispatch) {\n dispatch(tr);\n }\n\n return handled;\n }\n };\n },\n\n addKeyboardShortcuts() {\n return {\n // Tab is reserved for form navigation, use Alt+M for indentation\n 'Alt-m': () => this.editor.commands.indent(),\n 'Alt-Shift-m': () => this.editor.commands.outdent(),\n Backspace: () => {\n const { state } = this.editor;\n const { selection } = state;\n const { $from } = selection;\n\n // Only handle if cursor is at the start of a text block\n if (!selection.empty || $from.parentOffset !== 0) {\n return false;\n }\n\n const node = $from.parent;\n const indent = node.attrs.indent;\n\n // If the node has indentation, outdent instead of deleting\n if (indent && indent > 0 && this.options.types.includes(node.type.name)) {\n return this.editor.commands.outdent();\n }\n\n return false;\n }\n };\n }\n});\n"]}
@@ -0,0 +1,5 @@
1
+ export declare const EDITOR_CLICK_EVENT = "rte-editor-click";
2
+ export declare const dispatchEditorClickEvent: () => void;
3
+ declare const useCloseOnEditorClick: (isOpen: boolean, onClose: () => void) => void;
4
+ export default useCloseOnEditorClick;
5
+ //# sourceMappingURL=useCloseOnEditorClick.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCloseOnEditorClick.d.ts","sourceRoot":"","sources":["../../../../src/components/Editor/hooks/useCloseOnEditorClick.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,qBAAqB,CAAC;AAErD,eAAO,MAAM,wBAAwB,YAEpC,CAAC;AAEF,QAAA,MAAM,qBAAqB,GAAI,QAAQ,OAAO,EAAE,SAAS,MAAM,IAAI,SAWlE,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { useEffect } from 'react';
2
+ export const EDITOR_CLICK_EVENT = 'rte-editor-click';
3
+ export const dispatchEditorClickEvent = () => {
4
+ document.dispatchEvent(new CustomEvent(EDITOR_CLICK_EVENT));
5
+ };
6
+ const useCloseOnEditorClick = (isOpen, onClose) => {
7
+ useEffect(() => {
8
+ if (!isOpen)
9
+ return;
10
+ const handleEditorClick = () => {
11
+ onClose();
12
+ };
13
+ document.addEventListener(EDITOR_CLICK_EVENT, handleEditorClick);
14
+ return () => document.removeEventListener(EDITOR_CLICK_EVENT, handleEditorClick);
15
+ }, [isOpen, onClose]);
16
+ };
17
+ export default useCloseOnEditorClick;
18
+ //# sourceMappingURL=useCloseOnEditorClick.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCloseOnEditorClick.js","sourceRoot":"","sources":["../../../../src/components/Editor/hooks/useCloseOnEditorClick.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;AAErD,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,EAAE;IAC3C,QAAQ,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAC9D,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,CAAC,MAAe,EAAE,OAAmB,EAAE,EAAE;IACrE,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM;YAAE,OAAO;QAEpB,MAAM,iBAAiB,GAAG,GAAG,EAAE;YAC7B,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC;QAEF,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,iBAAiB,CAAC,CAAC;QACjE,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,iBAAiB,CAAC,CAAC;IACnF,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AACxB,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC","sourcesContent":["import { useEffect } from 'react';\n\nexport const EDITOR_CLICK_EVENT = 'rte-editor-click';\n\nexport const dispatchEditorClickEvent = () => {\n document.dispatchEvent(new CustomEvent(EDITOR_CLICK_EVENT));\n};\n\nconst useCloseOnEditorClick = (isOpen: boolean, onClose: () => void) => {\n useEffect(() => {\n if (!isOpen) return;\n\n const handleEditorClick = () => {\n onClose();\n };\n\n document.addEventListener(EDITOR_CLICK_EVENT, handleEditorClick);\n return () => document.removeEventListener(EDITOR_CLICK_EVENT, handleEditorClick);\n }, [isOpen, onClose]);\n};\n\nexport default useCloseOnEditorClick;\n"]}
@@ -0,0 +1,4 @@
1
+ import type { Editor as TiptapEditor } from '@tiptap/core';
2
+ declare const useEscapeKey: (isOpen: boolean, onClose: () => void, editor?: TiptapEditor) => void;
3
+ export default useEscapeKey;
4
+ //# sourceMappingURL=useEscapeKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEscapeKey.d.ts","sourceRoot":"","sources":["../../../../src/components/Editor/hooks/useEscapeKey.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,cAAc,CAAC;AAE3D,QAAA,MAAM,YAAY,GAAI,QAAQ,OAAO,EAAE,SAAS,MAAM,IAAI,EAAE,SAAS,YAAY,SAqBhF,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { useEffect } from 'react';
2
+ const useEscapeKey = (isOpen, onClose, editor) => {
3
+ useEffect(() => {
4
+ if (!isOpen)
5
+ return;
6
+ const handleEscape = (e) => {
7
+ if (e.key === 'Escape') {
8
+ e.preventDefault();
9
+ onClose();
10
+ }
11
+ };
12
+ // Listen on both iframe window (for when focus is in editor) and parent document
13
+ // (for when focus is in popover/dialog)
14
+ const iframeWindow = editor?.view.dom.ownerDocument.defaultView;
15
+ iframeWindow?.addEventListener('keydown', handleEscape);
16
+ document.addEventListener('keydown', handleEscape);
17
+ return () => {
18
+ iframeWindow?.removeEventListener('keydown', handleEscape);
19
+ document.removeEventListener('keydown', handleEscape);
20
+ };
21
+ }, [isOpen, onClose, editor]);
22
+ };
23
+ export default useEscapeKey;
24
+ //# sourceMappingURL=useEscapeKey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEscapeKey.js","sourceRoot":"","sources":["../../../../src/components/Editor/hooks/useEscapeKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,MAAM,YAAY,GAAG,CAAC,MAAe,EAAE,OAAmB,EAAE,MAAqB,EAAE,EAAE;IACnF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM;YAAE,OAAO;QAEpB,MAAM,YAAY,GAAG,CAAC,CAAgB,EAAE,EAAE;YACxC,IAAI,CAAC,CAAC,GAAG,KAAK,QAAQ,EAAE,CAAC;gBACvB,CAAC,CAAC,cAAc,EAAE,CAAC;gBACnB,OAAO,EAAE,CAAC;YACZ,CAAC;QACH,CAAC,CAAC;QAEF,iFAAiF;QACjF,wCAAwC;QACxC,MAAM,YAAY,GAAG,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,WAAW,CAAC;QAChE,YAAY,EAAE,gBAAgB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QACxD,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QACnD,OAAO,GAAG,EAAE;YACV,YAAY,EAAE,mBAAmB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;YAC3D,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QACxD,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAChC,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { useEffect } from 'react';\nimport type { Editor as TiptapEditor } from '@tiptap/core';\n\nconst useEscapeKey = (isOpen: boolean, onClose: () => void, editor?: TiptapEditor) => {\n useEffect(() => {\n if (!isOpen) return;\n\n const handleEscape = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n onClose();\n }\n };\n\n // Listen on both iframe window (for when focus is in editor) and parent document\n // (for when focus is in popover/dialog)\n const iframeWindow = editor?.view.dom.ownerDocument.defaultView;\n iframeWindow?.addEventListener('keydown', handleEscape);\n document.addEventListener('keydown', handleEscape);\n return () => {\n iframeWindow?.removeEventListener('keydown', handleEscape);\n document.removeEventListener('keydown', handleEscape);\n };\n }, [isOpen, onClose, editor]);\n};\n\nexport default useEscapeKey;\n"]}
@@ -0,0 +1,54 @@
1
+ import type { RefObject, MutableRefObject } from 'react';
2
+ import type { Editor as TiptapEditor } from '@tiptap/core';
3
+ import { useTheme } from '@pega/cosmos-react-core';
4
+ import type { CustomComponent, EditorProps } from '../Editor.types';
5
+ interface UseIframeSetupParams {
6
+ iframeRef: RefObject<HTMLIFrameElement>;
7
+ theme: ReturnType<typeof useTheme>;
8
+ styleSheetTarget?: HTMLElement | ShadowRoot;
9
+ customElements: CustomComponent[];
10
+ placeholder?: string;
11
+ defaultValue?: string;
12
+ disabled?: boolean;
13
+ readOnly?: boolean;
14
+ onChange?: (editor: TiptapEditor) => void;
15
+ onKeyDown?: (event?: KeyboardEvent) => void;
16
+ onFocus?: () => void;
17
+ onBlur?: () => void;
18
+ onInit?: (editor: TiptapEditor) => void;
19
+ spellcheck?: boolean;
20
+ initOptions?: EditorProps['initOptions'];
21
+ onImageAdded?: (image: File, id: string, altText?: string) => void;
22
+ imagesEnabled: boolean;
23
+ linksEnabled: boolean;
24
+ imageInsertionMode: 'file' | 'url' | 'all';
25
+ pastedImages: MutableRefObject<File[]>;
26
+ editorId: string;
27
+ required?: boolean;
28
+ setTiptapEditor: (editor: TiptapEditor) => void;
29
+ setFocused: (focused: boolean) => void;
30
+ autoResize?: boolean;
31
+ onTabOut?: () => void;
32
+ onFocusTableMenu?: () => void;
33
+ onFocusPreviousCellMenu?: () => void;
34
+ secure?: boolean;
35
+ }
36
+ export interface IframeEditorHandle {
37
+ focus: () => void;
38
+ getPlainText: () => string;
39
+ getRichText: () => string;
40
+ getHtml: () => string;
41
+ clear: () => void;
42
+ insertText: (text: string) => void;
43
+ setCursorLocationToStart: () => void;
44
+ insertHtml: (html: string, overwrite?: boolean) => void;
45
+ getEditor: () => TiptapEditor | null;
46
+ setEditable: (editable: boolean) => void;
47
+ }
48
+ export type IframeEditorRef = MutableRefObject<IframeEditorHandle | null>;
49
+ interface UseIframeSetupReturn {
50
+ iframeEditorRef: IframeEditorRef;
51
+ }
52
+ export default function useIframeSetup({ iframeRef, theme, styleSheetTarget, customElements, placeholder, defaultValue, disabled, readOnly, onChange, onKeyDown, onFocus, onBlur, onInit, spellcheck, initOptions, onImageAdded, imagesEnabled, linksEnabled, imageInsertionMode, pastedImages, editorId, required, setTiptapEditor, setFocused, autoResize, onTabOut, onFocusTableMenu, onFocusPreviousCellMenu, secure }: UseIframeSetupParams): UseIframeSetupReturn;
53
+ export {};
54
+ //# sourceMappingURL=useIframeSetup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIframeSetup.d.ts","sourceRoot":"","sources":["../../../../src/components/Editor/hooks/useIframeSetup.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAIzD,OAAO,KAAK,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAQnD,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAIpE,UAAU,oBAAoB;IAC5B,SAAS,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;IACxC,KAAK,EAAE,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;IACnC,gBAAgB,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;IAC5C,cAAc,EAAE,eAAe,EAAE,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC1C,SAAS,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC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