@atlaskit/renderer 112.7.12 → 112.7.13

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 (263) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/actions/index.js +6 -0
  3. package/dist/cjs/actions/matches-utils.js +6 -0
  4. package/dist/cjs/analytics/unsupported-content.js +7 -0
  5. package/dist/cjs/react/index.js +61 -10
  6. package/dist/cjs/react/marks/alignment.js +5 -5
  7. package/dist/cjs/react/marks/annotation.js +8 -3
  8. package/dist/cjs/react/marks/breakout.js +2 -0
  9. package/dist/cjs/react/marks/code.js +2 -0
  10. package/dist/cjs/react/marks/confluence-inline-comment.js +2 -0
  11. package/dist/cjs/react/marks/data-consumer.js +2 -0
  12. package/dist/cjs/react/marks/em.js +2 -0
  13. package/dist/cjs/react/marks/fragment.js +2 -0
  14. package/dist/cjs/react/marks/index.js +3 -0
  15. package/dist/cjs/react/marks/link.js +2 -0
  16. package/dist/cjs/react/marks/strike.js +5 -8
  17. package/dist/cjs/react/marks/strong.js +2 -0
  18. package/dist/cjs/react/marks/subsup.js +5 -0
  19. package/dist/cjs/react/marks/underline.js +2 -0
  20. package/dist/cjs/react/marks/unsupportedMark.js +2 -0
  21. package/dist/cjs/react/marks/unsupportedNodeAttribute.js +2 -0
  22. package/dist/cjs/react/nodes/TableStickyScrollbar.js +17 -1
  23. package/dist/cjs/react/nodes/blockCard.js +6 -0
  24. package/dist/cjs/react/nodes/bodiedExtension.js +8 -2
  25. package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +7 -3
  26. package/dist/cjs/react/nodes/codeBlock/windowedCodeBlock.js +5 -1
  27. package/dist/cjs/react/nodes/date.js +13 -11
  28. package/dist/cjs/react/nodes/decisionList.js +2 -0
  29. package/dist/cjs/react/nodes/doc.js +5 -0
  30. package/dist/cjs/react/nodes/embedCard.js +42 -36
  31. package/dist/cjs/react/nodes/emoji.js +13 -9
  32. package/dist/cjs/react/nodes/extension.js +8 -2
  33. package/dist/cjs/react/nodes/fallback.js +6 -1
  34. package/dist/cjs/react/nodes/heading-anchor.js +9 -6
  35. package/dist/cjs/react/nodes/heading.js +16 -11
  36. package/dist/cjs/react/nodes/index.js +12 -1
  37. package/dist/cjs/react/nodes/inline.js +2 -0
  38. package/dist/cjs/react/nodes/inlineCard.js +8 -0
  39. package/dist/cjs/react/nodes/inlineExtension.js +20 -15
  40. package/dist/cjs/react/nodes/media/index.js +17 -1
  41. package/dist/cjs/react/nodes/mediaGroup.js +21 -7
  42. package/dist/cjs/react/nodes/mediaInline.js +2 -0
  43. package/dist/cjs/react/nodes/mediaSingle/index.js +21 -0
  44. package/dist/cjs/react/nodes/mention.js +13 -8
  45. package/dist/cjs/react/nodes/multiBodiedExtension.js +10 -2
  46. package/dist/cjs/react/nodes/orderedList.js +2 -0
  47. package/dist/cjs/react/nodes/panel.js +3 -1
  48. package/dist/cjs/react/nodes/paragraph.js +2 -0
  49. package/dist/cjs/react/nodes/status.js +16 -11
  50. package/dist/cjs/react/nodes/table/colgroup.js +6 -2
  51. package/dist/cjs/react/nodes/table/sticky.js +13 -0
  52. package/dist/cjs/react/nodes/table.js +31 -2
  53. package/dist/cjs/react/nodes/tableCell.js +18 -1
  54. package/dist/cjs/react/nodes/tableRow.js +2 -0
  55. package/dist/cjs/react/nodes/task-item-with-providers.js +3 -0
  56. package/dist/cjs/react/nodes/taskItem.js +4 -0
  57. package/dist/cjs/react/nodes/taskList.js +2 -0
  58. package/dist/cjs/react/utils/render-text-segments.js +2 -0
  59. package/dist/cjs/react/utils/segment-text.js +4 -1
  60. package/dist/cjs/react/utils/use-select-all-trap.js +11 -0
  61. package/dist/cjs/render-document.js +11 -2
  62. package/dist/cjs/steps/index.js +6 -1
  63. package/dist/cjs/text/index.js +3 -0
  64. package/dist/cjs/ui/Expand.js +7 -3
  65. package/dist/cjs/ui/ExtensionRenderer.js +3 -0
  66. package/dist/cjs/ui/MediaCard.js +34 -19
  67. package/dist/cjs/ui/Renderer/ErrorBoundary.js +4 -0
  68. package/dist/cjs/ui/Renderer/breakout-ssr.js +28 -2
  69. package/dist/cjs/ui/Renderer/count-nodes.js +2 -0
  70. package/dist/cjs/ui/Renderer/index.js +68 -7
  71. package/dist/cjs/ui/Renderer/style.js +12 -7
  72. package/dist/cjs/ui/Renderer/truncated-wrapper.js +3 -0
  73. package/dist/cjs/ui/SmartCardStorage.js +6 -1
  74. package/dist/cjs/ui/annotations/context.js +3 -0
  75. package/dist/cjs/ui/annotations/draft/component.js +24 -12
  76. package/dist/cjs/ui/annotations/element/mark.js +5 -0
  77. package/dist/cjs/ui/annotations/element/useInlineAnnotationProps.js +7 -1
  78. package/dist/cjs/ui/annotations/hooks/user-selection.js +9 -1
  79. package/dist/cjs/ui/annotations/hover/mounter.js +4 -1
  80. package/dist/cjs/ui/annotations/selection/mounter.js +4 -1
  81. package/dist/cjs/ui/annotations/wrapper.js +8 -2
  82. package/dist/cjs/utils.js +9 -1
  83. package/dist/es2019/actions/index.js +6 -0
  84. package/dist/es2019/actions/matches-utils.js +6 -0
  85. package/dist/es2019/analytics/unsupported-content.js +8 -0
  86. package/dist/es2019/react/index.js +67 -10
  87. package/dist/es2019/react/marks/alignment.js +5 -5
  88. package/dist/es2019/react/marks/annotation.js +8 -3
  89. package/dist/es2019/react/marks/breakout.js +2 -0
  90. package/dist/es2019/react/marks/code.js +2 -0
  91. package/dist/es2019/react/marks/confluence-inline-comment.js +2 -0
  92. package/dist/es2019/react/marks/data-consumer.js +2 -0
  93. package/dist/es2019/react/marks/em.js +2 -0
  94. package/dist/es2019/react/marks/fragment.js +2 -0
  95. package/dist/es2019/react/marks/index.js +3 -0
  96. package/dist/es2019/react/marks/link.js +2 -0
  97. package/dist/es2019/react/marks/strike.js +5 -8
  98. package/dist/es2019/react/marks/strong.js +2 -0
  99. package/dist/es2019/react/marks/subsup.js +5 -0
  100. package/dist/es2019/react/marks/underline.js +2 -0
  101. package/dist/es2019/react/marks/unsupportedMark.js +2 -0
  102. package/dist/es2019/react/marks/unsupportedNodeAttribute.js +2 -0
  103. package/dist/es2019/react/nodes/TableStickyScrollbar.js +16 -1
  104. package/dist/es2019/react/nodes/blockCard.js +6 -0
  105. package/dist/es2019/react/nodes/bodiedExtension.js +8 -2
  106. package/dist/es2019/react/nodes/codeBlock/components/lightWeightCodeBlock.js +4 -1
  107. package/dist/es2019/react/nodes/codeBlock/windowedCodeBlock.js +4 -1
  108. package/dist/es2019/react/nodes/date.js +13 -11
  109. package/dist/es2019/react/nodes/decisionList.js +2 -0
  110. package/dist/es2019/react/nodes/doc.js +6 -0
  111. package/dist/es2019/react/nodes/embedCard.js +42 -36
  112. package/dist/es2019/react/nodes/emoji.js +13 -9
  113. package/dist/es2019/react/nodes/extension.js +8 -2
  114. package/dist/es2019/react/nodes/fallback.js +6 -1
  115. package/dist/es2019/react/nodes/heading-anchor.js +10 -6
  116. package/dist/es2019/react/nodes/heading.js +16 -11
  117. package/dist/es2019/react/nodes/index.js +13 -1
  118. package/dist/es2019/react/nodes/inline.js +3 -0
  119. package/dist/es2019/react/nodes/inlineCard.js +8 -0
  120. package/dist/es2019/react/nodes/inlineExtension.js +21 -16
  121. package/dist/es2019/react/nodes/media/index.js +17 -1
  122. package/dist/es2019/react/nodes/mediaGroup.js +14 -1
  123. package/dist/es2019/react/nodes/mediaInline.js +2 -0
  124. package/dist/es2019/react/nodes/mediaSingle/index.js +21 -0
  125. package/dist/es2019/react/nodes/mention.js +13 -8
  126. package/dist/es2019/react/nodes/multiBodiedExtension.js +10 -2
  127. package/dist/es2019/react/nodes/orderedList.js +2 -0
  128. package/dist/es2019/react/nodes/panel.js +3 -1
  129. package/dist/es2019/react/nodes/paragraph.js +2 -0
  130. package/dist/es2019/react/nodes/status.js +16 -11
  131. package/dist/es2019/react/nodes/table/colgroup.js +6 -2
  132. package/dist/es2019/react/nodes/table/sticky.js +13 -0
  133. package/dist/es2019/react/nodes/table.js +32 -3
  134. package/dist/es2019/react/nodes/tableCell.js +18 -1
  135. package/dist/es2019/react/nodes/tableRow.js +2 -0
  136. package/dist/es2019/react/nodes/task-item-with-providers.js +3 -0
  137. package/dist/es2019/react/nodes/taskItem.js +4 -0
  138. package/dist/es2019/react/nodes/taskList.js +2 -0
  139. package/dist/es2019/react/utils/render-text-segments.js +2 -0
  140. package/dist/es2019/react/utils/segment-text.js +4 -1
  141. package/dist/es2019/react/utils/use-select-all-trap.js +11 -0
  142. package/dist/es2019/render-document.js +11 -2
  143. package/dist/es2019/steps/index.js +6 -1
  144. package/dist/es2019/text/index.js +3 -0
  145. package/dist/es2019/ui/Expand.js +7 -3
  146. package/dist/es2019/ui/ExtensionRenderer.js +3 -0
  147. package/dist/es2019/ui/MediaCard.js +34 -19
  148. package/dist/es2019/ui/Renderer/ErrorBoundary.js +4 -0
  149. package/dist/es2019/ui/Renderer/breakout-ssr.js +28 -2
  150. package/dist/es2019/ui/Renderer/count-nodes.js +3 -0
  151. package/dist/es2019/ui/Renderer/index.js +68 -7
  152. package/dist/es2019/ui/Renderer/style.js +47 -37
  153. package/dist/es2019/ui/Renderer/truncated-wrapper.js +3 -0
  154. package/dist/es2019/ui/SmartCardStorage.js +6 -1
  155. package/dist/es2019/ui/annotations/context.js +3 -0
  156. package/dist/es2019/ui/annotations/draft/component.js +24 -12
  157. package/dist/es2019/ui/annotations/element/mark.js +5 -0
  158. package/dist/es2019/ui/annotations/element/useInlineAnnotationProps.js +7 -1
  159. package/dist/es2019/ui/annotations/hooks/user-selection.js +9 -1
  160. package/dist/es2019/ui/annotations/hover/mounter.js +4 -1
  161. package/dist/es2019/ui/annotations/selection/mounter.js +4 -1
  162. package/dist/es2019/ui/annotations/wrapper.js +8 -2
  163. package/dist/es2019/utils.js +12 -1
  164. package/dist/esm/actions/index.js +6 -0
  165. package/dist/esm/actions/matches-utils.js +6 -0
  166. package/dist/esm/analytics/unsupported-content.js +8 -0
  167. package/dist/esm/react/index.js +61 -10
  168. package/dist/esm/react/marks/alignment.js +5 -5
  169. package/dist/esm/react/marks/annotation.js +8 -3
  170. package/dist/esm/react/marks/breakout.js +2 -0
  171. package/dist/esm/react/marks/code.js +2 -0
  172. package/dist/esm/react/marks/confluence-inline-comment.js +2 -0
  173. package/dist/esm/react/marks/data-consumer.js +2 -0
  174. package/dist/esm/react/marks/em.js +2 -0
  175. package/dist/esm/react/marks/fragment.js +2 -0
  176. package/dist/esm/react/marks/index.js +3 -0
  177. package/dist/esm/react/marks/link.js +2 -0
  178. package/dist/esm/react/marks/strike.js +5 -8
  179. package/dist/esm/react/marks/strong.js +2 -0
  180. package/dist/esm/react/marks/subsup.js +5 -0
  181. package/dist/esm/react/marks/underline.js +2 -0
  182. package/dist/esm/react/marks/unsupportedMark.js +2 -0
  183. package/dist/esm/react/marks/unsupportedNodeAttribute.js +2 -0
  184. package/dist/esm/react/nodes/TableStickyScrollbar.js +17 -1
  185. package/dist/esm/react/nodes/blockCard.js +6 -0
  186. package/dist/esm/react/nodes/bodiedExtension.js +8 -2
  187. package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +7 -3
  188. package/dist/esm/react/nodes/codeBlock/windowedCodeBlock.js +5 -1
  189. package/dist/esm/react/nodes/date.js +13 -11
  190. package/dist/esm/react/nodes/decisionList.js +2 -0
  191. package/dist/esm/react/nodes/doc.js +6 -0
  192. package/dist/esm/react/nodes/embedCard.js +42 -36
  193. package/dist/esm/react/nodes/emoji.js +13 -9
  194. package/dist/esm/react/nodes/extension.js +8 -2
  195. package/dist/esm/react/nodes/fallback.js +6 -1
  196. package/dist/esm/react/nodes/heading-anchor.js +9 -6
  197. package/dist/esm/react/nodes/heading.js +16 -11
  198. package/dist/esm/react/nodes/index.js +13 -1
  199. package/dist/esm/react/nodes/inline.js +3 -0
  200. package/dist/esm/react/nodes/inlineCard.js +8 -0
  201. package/dist/esm/react/nodes/inlineExtension.js +20 -15
  202. package/dist/esm/react/nodes/media/index.js +17 -1
  203. package/dist/esm/react/nodes/mediaGroup.js +21 -7
  204. package/dist/esm/react/nodes/mediaInline.js +2 -0
  205. package/dist/esm/react/nodes/mediaSingle/index.js +21 -0
  206. package/dist/esm/react/nodes/mention.js +13 -8
  207. package/dist/esm/react/nodes/multiBodiedExtension.js +10 -2
  208. package/dist/esm/react/nodes/orderedList.js +2 -0
  209. package/dist/esm/react/nodes/panel.js +3 -1
  210. package/dist/esm/react/nodes/paragraph.js +2 -0
  211. package/dist/esm/react/nodes/status.js +16 -11
  212. package/dist/esm/react/nodes/table/colgroup.js +6 -2
  213. package/dist/esm/react/nodes/table/sticky.js +13 -0
  214. package/dist/esm/react/nodes/table.js +31 -2
  215. package/dist/esm/react/nodes/tableCell.js +18 -1
  216. package/dist/esm/react/nodes/tableRow.js +2 -0
  217. package/dist/esm/react/nodes/task-item-with-providers.js +3 -0
  218. package/dist/esm/react/nodes/taskItem.js +4 -0
  219. package/dist/esm/react/nodes/taskList.js +2 -0
  220. package/dist/esm/react/utils/render-text-segments.js +2 -0
  221. package/dist/esm/react/utils/segment-text.js +4 -1
  222. package/dist/esm/react/utils/use-select-all-trap.js +11 -0
  223. package/dist/esm/render-document.js +11 -2
  224. package/dist/esm/steps/index.js +6 -1
  225. package/dist/esm/text/index.js +3 -0
  226. package/dist/esm/ui/Expand.js +7 -3
  227. package/dist/esm/ui/ExtensionRenderer.js +3 -0
  228. package/dist/esm/ui/MediaCard.js +34 -19
  229. package/dist/esm/ui/Renderer/ErrorBoundary.js +4 -0
  230. package/dist/esm/ui/Renderer/breakout-ssr.js +28 -2
  231. package/dist/esm/ui/Renderer/count-nodes.js +3 -0
  232. package/dist/esm/ui/Renderer/index.js +68 -7
  233. package/dist/esm/ui/Renderer/style.js +12 -7
  234. package/dist/esm/ui/Renderer/truncated-wrapper.js +3 -0
  235. package/dist/esm/ui/SmartCardStorage.js +6 -1
  236. package/dist/esm/ui/annotations/context.js +3 -0
  237. package/dist/esm/ui/annotations/draft/component.js +24 -12
  238. package/dist/esm/ui/annotations/element/mark.js +5 -0
  239. package/dist/esm/ui/annotations/element/useInlineAnnotationProps.js +7 -1
  240. package/dist/esm/ui/annotations/hooks/user-selection.js +9 -1
  241. package/dist/esm/ui/annotations/hover/mounter.js +4 -1
  242. package/dist/esm/ui/annotations/selection/mounter.js +4 -1
  243. package/dist/esm/ui/annotations/wrapper.js +8 -2
  244. package/dist/esm/utils.js +10 -1
  245. package/dist/types/analytics/events.d.ts +1 -2
  246. package/dist/types/react/marks/confluence-inline-comment.d.ts +1 -1
  247. package/dist/types/react/nodes/decisionList.d.ts +1 -1
  248. package/dist/types/react/nodes/index.d.ts +1 -1
  249. package/dist/types/react/nodes/taskItem.d.ts +1 -1
  250. package/dist/types/react/nodes/taskList.d.ts +1 -1
  251. package/dist/types/react/types.d.ts +2 -2
  252. package/dist/types/utils.d.ts +1 -2
  253. package/dist/types-ts4.5/analytics/events.d.ts +1 -2
  254. package/dist/types-ts4.5/react/marks/confluence-inline-comment.d.ts +1 -1
  255. package/dist/types-ts4.5/react/nodes/decisionList.d.ts +1 -1
  256. package/dist/types-ts4.5/react/nodes/index.d.ts +1 -1
  257. package/dist/types-ts4.5/react/nodes/taskItem.d.ts +1 -1
  258. package/dist/types-ts4.5/react/nodes/taskList.d.ts +1 -1
  259. package/dist/types-ts4.5/react/types.d.ts +2 -2
  260. package/dist/types-ts4.5/utils.d.ts +1 -2
  261. package/docs/0-intro.tsx +14 -1
  262. package/package.json +1 -1
  263. package/tsconfig.json +0 -1
@@ -46,7 +46,10 @@ export var useUserSelectionRange = function useUserSelectionRange(props) {
46
46
  // platform/packages/editor/renderer/src/steps/index.ts Line 180
47
47
 
48
48
  // This workaround ensures the endContainer is set to a text node when endContainer is non-text and the parent container is the root element
49
- if (isTripleClick && isRoot(commonAncestorContainer) && (parentNode === null || parentNode === void 0 ? void 0 : parentNode.nodeName) === 'P' // ignore if the parent node is strong, em, etc.
49
+ if (isTripleClick &&
50
+ // Ignored via go/ees005
51
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
52
+ isRoot(commonAncestorContainer) && (parentNode === null || parentNode === void 0 ? void 0 : parentNode.nodeName) === 'P' // ignore if the parent node is strong, em, etc.
50
53
  ) {
51
54
  var _parentNode$lastChild, _parentNode$lastChild2;
52
55
  var lastChild = parentNode !== null && parentNode !== void 0 && parentNode.lastChild && (parentNode === null || parentNode === void 0 || (_parentNode$lastChild = parentNode.lastChild) === null || _parentNode$lastChild === void 0 ? void 0 : _parentNode$lastChild.nodeType) === Node.TEXT_NODE ? parentNode === null || parentNode === void 0 ? void 0 : parentNode.lastChild : parentNode === null || parentNode === void 0 || (_parentNode$lastChild2 = parentNode.lastChild) === null || _parentNode$lastChild2 === void 0 ? void 0 : _parentNode$lastChild2.childNodes[0];
@@ -57,8 +60,13 @@ export var useUserSelectionRange = function useUserSelectionRange(props) {
57
60
  }
58
61
  }, 250);
59
62
  };
63
+
64
+ // Ignored via go/ees005
65
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
60
66
  document.addEventListener('selectionchange', onSelectionChange);
61
67
  return function () {
68
+ // Ignored via go/ees005
69
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
62
70
  document.removeEventListener('selectionchange', onSelectionChange);
63
71
  clearRange();
64
72
  };
@@ -122,7 +122,10 @@ export var Mounter = /*#__PURE__*/React.memo(function (props) {
122
122
  }, [onCloseProps, removeDraftModeCallback, createAnalyticsEvent]);
123
123
  return /*#__PURE__*/React.createElement(Component, {
124
124
  range: range,
125
- isWithinRange: isWithinRange,
125
+ isWithinRange: isWithinRange
126
+ // Ignored via go/ees005
127
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
128
+ ,
126
129
  wrapperDOM: wrapperDOM.current,
127
130
  isAnnotationAllowed: isAnnotationAllowed,
128
131
  onClose: onCloseCallback,
@@ -163,7 +163,10 @@ export var SelectionInlineCommentMounter = /*#__PURE__*/React.memo(function (pro
163
163
  }, [onCloseProps, removeDraftModeCallback, createAnalyticsEvent, inlineNodeTypes]);
164
164
  return /*#__PURE__*/React.createElement(Component, {
165
165
  range: range,
166
- draftRange: draftRange,
166
+ draftRange: draftRange
167
+ // Ignored via go/ees005
168
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
169
+ ,
167
170
  wrapperDOM: wrapperDOM.current,
168
171
  isAnnotationAllowed: isAnnotationAllowed,
169
172
  onClose: onCloseCallback,
@@ -30,13 +30,19 @@ export var AnnotationsContextWrapper = function AnnotationsContextWrapper(props)
30
30
  clearAnnotationDraft = _ref.clearAnnotationDraft;
31
31
  return /*#__PURE__*/React.createElement(React.Fragment, null, children, !!hoverComponent && /*#__PURE__*/React.createElement(HoverRangeValidator, {
32
32
  createAnalyticsEvent: createAnalyticsEvent,
33
- rendererRef: rendererRef,
33
+ rendererRef: rendererRef
34
+ // Ignored via go/ees005
35
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
36
+ ,
34
37
  component: hoverComponent,
35
38
  applyAnnotationDraftAt: applyAnnotationDraftAt,
36
39
  clearAnnotationDraft: clearAnnotationDraft
37
40
  }), !!selectionComponent && /*#__PURE__*/React.createElement(SelectionRangeValidator, {
38
41
  createAnalyticsEvent: createAnalyticsEvent,
39
- rendererRef: rendererRef,
42
+ rendererRef: rendererRef
43
+ // Ignored via go/ees005
44
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
45
+ ,
40
46
  selectionComponent: selectionComponent,
41
47
  applyAnnotationDraftAt: applyAnnotationDraftAt,
42
48
  clearAnnotationDraft: clearAnnotationDraft
package/dist/esm/utils.js CHANGED
@@ -5,12 +5,19 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
5
5
 
6
6
  import { defaultSchema } from '@atlaskit/adf-schema/schema-default';
7
7
  import { JSONTransformer } from '@atlaskit/editor-json-transformer';
8
+
9
+ // Ignored via go/ees005
10
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
11
  function createEncoder(parser, encoder) {
9
12
  return function (value) {
10
13
  return encoder.encode(parser.parse(value));
11
14
  };
12
15
  }
13
- export var ADFEncoder = /*#__PURE__*/_createClass(function ADFEncoder(createTransformerWithSchema) {
16
+ export var ADFEncoder = /*#__PURE__*/_createClass(
17
+ // Ignored via go/ees005
18
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
+
20
+ function ADFEncoder(createTransformerWithSchema) {
14
21
  _classCallCheck(this, ADFEncoder);
15
22
  var transformer = createTransformerWithSchema(defaultSchema);
16
23
  this.encode = createEncoder(transformer, new JSONTransformer());
@@ -20,6 +27,8 @@ export var getText = function getText(node) {
20
27
  };
21
28
  export var getEventHandler = function getEventHandler(eventHandlers, type) {
22
29
  var eventName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'onClick';
30
+ // Ignored via go/ees005
31
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
23
32
  return eventHandlers && type && eventHandlers[type] && eventHandlers[type][eventName];
24
33
  };
25
34
 
@@ -1,7 +1,6 @@
1
1
  import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, OperationalAEP } from '@atlaskit/editor-common/analytics';
2
2
  import type { AEP } from './enums';
3
- import type { SEVERITY, UNSUPPORTED_CONTENT_LEVEL_SEVERITY } from '@atlaskit/editor-common/utils';
4
- import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload } from '@atlaskit/editor-common/utils';
3
+ import type { SEVERITY, UNSUPPORTED_CONTENT_LEVEL_SEVERITY, UnsupportedContentPayload, UnsupportedContentTooltipPayload } from '@atlaskit/editor-common/utils';
5
4
  import type { SortOrder } from '@atlaskit/editor-common/types';
6
5
  export declare enum PLATFORM {
7
6
  NATIVE = "mobileNative",
@@ -3,7 +3,7 @@ import { type MarkProps } from '../types';
3
3
  interface Props {
4
4
  reference: string;
5
5
  }
6
- export default class ConfluenceInlineComment extends Component<MarkProps<Props>, {}> {
6
+ export default class ConfluenceInlineComment extends Component<MarkProps<Props>, Object> {
7
7
  render(): JSX.Element;
8
8
  }
9
9
  export {};
@@ -2,6 +2,6 @@ import { PureComponent } from 'react';
2
2
  export interface Props {
3
3
  children?: JSX.Element | JSX.Element[];
4
4
  }
5
- export default class DecisionList extends PureComponent<Props, {}> {
5
+ export default class DecisionList extends PureComponent<Props, Object> {
6
6
  render(): JSX.Element | null;
7
7
  }
@@ -29,7 +29,7 @@ declare const CodeBlock: React.ComponentType<import("react-intl-next").WithIntlP
29
29
  declare const TaskList: React.ComponentType<import("./taskList").Props> & Loadable.LoadableComponent;
30
30
  declare const TaskItem: React.ComponentType<import("../types").NodeProps<import("./taskItem").Props>> & Loadable.LoadableComponent;
31
31
  declare const DecisionList: React.ComponentType<import("./decisionList").Props> & Loadable.LoadableComponent;
32
- declare const DecisionItem: React.ComponentType<import("../types").NodeMeta> & Loadable.LoadableComponent;
32
+ declare const DecisionItem: React.ComponentType<Object & import("../types").NodeMeta> & Loadable.LoadableComponent;
33
33
  declare const Date: React.ComponentType<import("./date").Props> & Loadable.LoadableComponent;
34
34
  declare const Status: React.ComponentType<import("./status").Props> & Loadable.LoadableComponent;
35
35
  declare const Emoji: React.ComponentType<import("./emoji").EmojiProps> & Loadable.LoadableComponent;
@@ -9,7 +9,7 @@ export interface Props {
9
9
  children?: ReactNode;
10
10
  disabled?: boolean;
11
11
  }
12
- export default class TaskItem extends PureComponent<NodeProps<Props>, {}> {
12
+ export default class TaskItem extends PureComponent<NodeProps<Props>, Object> {
13
13
  private providerFactory;
14
14
  constructor(props: NodeProps<Props>);
15
15
  componentWillUnmount(): void;
@@ -3,6 +3,6 @@ export interface Props {
3
3
  localId?: string;
4
4
  children?: ReactNode;
5
5
  }
6
- export default class TaskList extends PureComponent<Props, {}> {
6
+ export default class TaskList extends PureComponent<Props, Object> {
7
7
  render(): JSX.Element | null;
8
8
  }
@@ -57,8 +57,8 @@ export interface AnnotationMarkMeta extends MarkMeta {
57
57
  useBlockLevel?: boolean;
58
58
  isMediaInline?: boolean;
59
59
  }
60
- export type NodeProps<NodeAttrs = {}> = NodeAttrs & PropsWithChildren<NodeMeta>;
61
- export type MarkProps<MarkAttrs = {}> = MarkAttrs & PropsWithChildren<MarkMeta>;
60
+ export type NodeProps<NodeAttrs = Object> = NodeAttrs & PropsWithChildren<NodeMeta>;
61
+ export type MarkProps<MarkAttrs = Object> = MarkAttrs & PropsWithChildren<MarkMeta>;
62
62
  export type TextHighlighter = {
63
63
  pattern: RegExp;
64
64
  component: React.ComponentType<{
@@ -1,8 +1,7 @@
1
- import type { Schema } from '@atlaskit/editor-prosemirror/model';
1
+ import type { Schema, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { ADNode } from '@atlaskit/editor-common/validator';
3
3
  import type { EventHandlers } from '@atlaskit/editor-common/ui';
4
4
  import type { Transformer } from '@atlaskit/editor-common/types';
5
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
6
5
  export type TransformerProvider<T> = (schema: Schema) => Transformer<T>;
7
6
  export declare class ADFEncoder<T> {
8
7
  encode: (value: T) => any;
@@ -1,7 +1,6 @@
1
1
  import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, OperationalAEP } from '@atlaskit/editor-common/analytics';
2
2
  import type { AEP } from './enums';
3
- import type { SEVERITY, UNSUPPORTED_CONTENT_LEVEL_SEVERITY } from '@atlaskit/editor-common/utils';
4
- import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload } from '@atlaskit/editor-common/utils';
3
+ import type { SEVERITY, UNSUPPORTED_CONTENT_LEVEL_SEVERITY, UnsupportedContentPayload, UnsupportedContentTooltipPayload } from '@atlaskit/editor-common/utils';
5
4
  import type { SortOrder } from '@atlaskit/editor-common/types';
6
5
  export declare enum PLATFORM {
7
6
  NATIVE = "mobileNative",
@@ -3,7 +3,7 @@ import { type MarkProps } from '../types';
3
3
  interface Props {
4
4
  reference: string;
5
5
  }
6
- export default class ConfluenceInlineComment extends Component<MarkProps<Props>, {}> {
6
+ export default class ConfluenceInlineComment extends Component<MarkProps<Props>, Object> {
7
7
  render(): JSX.Element;
8
8
  }
9
9
  export {};
@@ -2,6 +2,6 @@ import { PureComponent } from 'react';
2
2
  export interface Props {
3
3
  children?: JSX.Element | JSX.Element[];
4
4
  }
5
- export default class DecisionList extends PureComponent<Props, {}> {
5
+ export default class DecisionList extends PureComponent<Props, Object> {
6
6
  render(): JSX.Element | null;
7
7
  }
@@ -29,7 +29,7 @@ declare const CodeBlock: React.ComponentType<import("react-intl-next").WithIntlP
29
29
  declare const TaskList: React.ComponentType<import("./taskList").Props> & Loadable.LoadableComponent;
30
30
  declare const TaskItem: React.ComponentType<import("../types").NodeProps<import("./taskItem").Props>> & Loadable.LoadableComponent;
31
31
  declare const DecisionList: React.ComponentType<import("./decisionList").Props> & Loadable.LoadableComponent;
32
- declare const DecisionItem: React.ComponentType<import("../types").NodeMeta> & Loadable.LoadableComponent;
32
+ declare const DecisionItem: React.ComponentType<Object & import("../types").NodeMeta> & Loadable.LoadableComponent;
33
33
  declare const Date: React.ComponentType<import("./date").Props> & Loadable.LoadableComponent;
34
34
  declare const Status: React.ComponentType<import("./status").Props> & Loadable.LoadableComponent;
35
35
  declare const Emoji: React.ComponentType<import("./emoji").EmojiProps> & Loadable.LoadableComponent;
@@ -9,7 +9,7 @@ export interface Props {
9
9
  children?: ReactNode;
10
10
  disabled?: boolean;
11
11
  }
12
- export default class TaskItem extends PureComponent<NodeProps<Props>, {}> {
12
+ export default class TaskItem extends PureComponent<NodeProps<Props>, Object> {
13
13
  private providerFactory;
14
14
  constructor(props: NodeProps<Props>);
15
15
  componentWillUnmount(): void;
@@ -3,6 +3,6 @@ export interface Props {
3
3
  localId?: string;
4
4
  children?: ReactNode;
5
5
  }
6
- export default class TaskList extends PureComponent<Props, {}> {
6
+ export default class TaskList extends PureComponent<Props, Object> {
7
7
  render(): JSX.Element | null;
8
8
  }
@@ -57,8 +57,8 @@ export interface AnnotationMarkMeta extends MarkMeta {
57
57
  useBlockLevel?: boolean;
58
58
  isMediaInline?: boolean;
59
59
  }
60
- export type NodeProps<NodeAttrs = {}> = NodeAttrs & PropsWithChildren<NodeMeta>;
61
- export type MarkProps<MarkAttrs = {}> = MarkAttrs & PropsWithChildren<MarkMeta>;
60
+ export type NodeProps<NodeAttrs = Object> = NodeAttrs & PropsWithChildren<NodeMeta>;
61
+ export type MarkProps<MarkAttrs = Object> = MarkAttrs & PropsWithChildren<MarkMeta>;
62
62
  export type TextHighlighter = {
63
63
  pattern: RegExp;
64
64
  component: React.ComponentType<{
@@ -1,8 +1,7 @@
1
- import type { Schema } from '@atlaskit/editor-prosemirror/model';
1
+ import type { Schema, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { ADNode } from '@atlaskit/editor-common/validator';
3
3
  import type { EventHandlers } from '@atlaskit/editor-common/ui';
4
4
  import type { Transformer } from '@atlaskit/editor-common/types';
5
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
6
5
  export type TransformerProvider<T> = (schema: Schema) => Transformer<T>;
7
6
  export declare class ADFEncoder<T> {
8
7
  encode: (value: T) => any;
package/docs/0-intro.tsx CHANGED
@@ -19,8 +19,12 @@ ReactDOM.render(<ReactRenderer document={DOCUMENT} />, container);
19
19
 
20
20
  ${(
21
21
  <Example
22
+ // Ignored via go/ees005
23
+ // eslint-disable-next-line import/no-commonjs
22
24
  Component={require('../examples/1-with-providers').default}
23
25
  title="With Providers"
26
+ // Ignored via go/ees005
27
+ // eslint-disable-next-line import/no-commonjs
24
28
  source={require('!!raw-loader!../examples/1-with-providers')}
25
29
  />
26
30
  )}
@@ -125,8 +129,12 @@ ReactDOM.render(<ReactRenderer document={DOCUMENT} truncated={true} maxHeight={7
125
129
 
126
130
  ${(
127
131
  <Example
132
+ // Ignored via go/ees005
133
+ // eslint-disable-next-line import/no-commonjs
128
134
  Component={require('../examples/15-truncated').default}
129
135
  title="Truncated"
136
+ // Ignored via go/ees005
137
+ // eslint-disable-next-line import/no-commonjs
130
138
  source={require('!!raw-loader!../examples/15-truncated')}
131
139
  />
132
140
  )}
@@ -140,6 +148,11 @@ Full light and dark mode support for the Editor is a work in progress. Currently
140
148
  - Custom table backgrounds
141
149
 
142
150
  ${(
143
- <Props heading="Props" props={require('!!extract-react-types-loader!../src/ui/Renderer/index')} />
151
+ <Props
152
+ heading="Props"
153
+ // Ignored via go/ees005
154
+ // eslint-disable-next-line import/no-commonjs
155
+ props={require('!!extract-react-types-loader!../src/ui/Renderer/index')}
156
+ />
144
157
  )}
145
158
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "112.7.12",
3
+ "version": "112.7.13",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
package/tsconfig.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "extends": "../../../tsconfig.json",
3
3
  "compilerOptions": {
4
- "baseUrl": "./"
5
4
  },
6
5
  "include": [
7
6
  "./src/**/*.ts",