@atlaskit/renderer 103.0.1 → 104.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 (217) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/react/marks/textColor.js +8 -2
  3. package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +8 -5
  4. package/dist/cjs/react/nodes/codeBlockCopyButton.js +3 -3
  5. package/dist/cjs/ui/Renderer/index.js +11 -1
  6. package/dist/cjs/ui/Renderer/style.js +1 -1
  7. package/dist/cjs/version.json +1 -1
  8. package/dist/es2019/react/marks/textColor.js +7 -2
  9. package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +10 -7
  10. package/dist/es2019/react/nodes/codeBlockCopyButton.js +16 -7
  11. package/dist/es2019/ui/Renderer/index.js +11 -2
  12. package/dist/es2019/ui/Renderer/style.js +284 -284
  13. package/dist/es2019/version.json +1 -1
  14. package/dist/esm/react/marks/textColor.js +7 -2
  15. package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +7 -6
  16. package/dist/esm/react/nodes/codeBlockCopyButton.js +2 -2
  17. package/dist/esm/ui/Renderer/index.js +13 -2
  18. package/dist/esm/ui/Renderer/style.js +1 -1
  19. package/dist/esm/version.json +1 -1
  20. package/dist/types/analytics/events.d.ts +1 -0
  21. package/dist/types/ui/Renderer/index.d.ts +5 -0
  22. package/package.json +15 -22
  23. package/report.api.md +38 -30
  24. package/dist/types-ts4.0/actions/index.d.ts +0 -61
  25. package/dist/types-ts4.0/actions/matches-utils.d.ts +0 -7
  26. package/dist/types-ts4.0/actions.d.ts +0 -3
  27. package/dist/types-ts4.0/analytics/analyticsContext.d.ts +0 -6
  28. package/dist/types-ts4.0/analytics/enums.d.ts +0 -56
  29. package/dist/types-ts4.0/analytics/events.d.ts +0 -110
  30. package/dist/types-ts4.0/analytics/unsupported-content.d.ts +0 -10
  31. package/dist/types-ts4.0/consts.d.ts +0 -12
  32. package/dist/types-ts4.0/i18n/cs.d.ts +0 -20
  33. package/dist/types-ts4.0/i18n/da.d.ts +0 -20
  34. package/dist/types-ts4.0/i18n/de.d.ts +0 -20
  35. package/dist/types-ts4.0/i18n/en.d.ts +0 -20
  36. package/dist/types-ts4.0/i18n/en_GB.d.ts +0 -20
  37. package/dist/types-ts4.0/i18n/en_ZZ.d.ts +0 -20
  38. package/dist/types-ts4.0/i18n/es.d.ts +0 -20
  39. package/dist/types-ts4.0/i18n/et.d.ts +0 -8
  40. package/dist/types-ts4.0/i18n/fi.d.ts +0 -20
  41. package/dist/types-ts4.0/i18n/fr.d.ts +0 -20
  42. package/dist/types-ts4.0/i18n/hu.d.ts +0 -20
  43. package/dist/types-ts4.0/i18n/index.d.ts +0 -31
  44. package/dist/types-ts4.0/i18n/it.d.ts +0 -20
  45. package/dist/types-ts4.0/i18n/ja.d.ts +0 -20
  46. package/dist/types-ts4.0/i18n/ko.d.ts +0 -20
  47. package/dist/types-ts4.0/i18n/nb.d.ts +0 -20
  48. package/dist/types-ts4.0/i18n/nl.d.ts +0 -20
  49. package/dist/types-ts4.0/i18n/pl.d.ts +0 -20
  50. package/dist/types-ts4.0/i18n/pt_BR.d.ts +0 -20
  51. package/dist/types-ts4.0/i18n/pt_PT.d.ts +0 -8
  52. package/dist/types-ts4.0/i18n/ru.d.ts +0 -20
  53. package/dist/types-ts4.0/i18n/sk.d.ts +0 -8
  54. package/dist/types-ts4.0/i18n/sv.d.ts +0 -20
  55. package/dist/types-ts4.0/i18n/th.d.ts +0 -20
  56. package/dist/types-ts4.0/i18n/tr.d.ts +0 -20
  57. package/dist/types-ts4.0/i18n/uk.d.ts +0 -20
  58. package/dist/types-ts4.0/i18n/vi.d.ts +0 -20
  59. package/dist/types-ts4.0/i18n/zh.d.ts +0 -20
  60. package/dist/types-ts4.0/i18n/zh_TW.d.ts +0 -20
  61. package/dist/types-ts4.0/index.d.ts +0 -11
  62. package/dist/types-ts4.0/messages.d.ts +0 -61
  63. package/dist/types-ts4.0/react/hooks/use-bidi-warnings.d.ts +0 -10
  64. package/dist/types-ts4.0/react/hooks/use-in-viewport.d.ts +0 -5
  65. package/dist/types-ts4.0/react/hooks/use-observed-width.d.ts +0 -3
  66. package/dist/types-ts4.0/react/index.d.ts +0 -118
  67. package/dist/types-ts4.0/react/marks/alignment.d.ts +0 -4
  68. package/dist/types-ts4.0/react/marks/annotation.d.ts +0 -6
  69. package/dist/types-ts4.0/react/marks/breakout.d.ts +0 -6
  70. package/dist/types-ts4.0/react/marks/code.d.ts +0 -16
  71. package/dist/types-ts4.0/react/marks/confluence-inline-comment.d.ts +0 -8
  72. package/dist/types-ts4.0/react/marks/data-consumer.d.ts +0 -4
  73. package/dist/types-ts4.0/react/marks/em.d.ts +0 -3
  74. package/dist/types-ts4.0/react/marks/fragment.d.ts +0 -4
  75. package/dist/types-ts4.0/react/marks/indentation.d.ts +0 -4
  76. package/dist/types-ts4.0/react/marks/index.d.ts +0 -21
  77. package/dist/types-ts4.0/react/marks/link.d.ts +0 -9
  78. package/dist/types-ts4.0/react/marks/strike.d.ts +0 -3
  79. package/dist/types-ts4.0/react/marks/strong.d.ts +0 -3
  80. package/dist/types-ts4.0/react/marks/subsup.d.ts +0 -4
  81. package/dist/types-ts4.0/react/marks/textColor.d.ts +0 -4
  82. package/dist/types-ts4.0/react/marks/underline.d.ts +0 -3
  83. package/dist/types-ts4.0/react/marks/unsupportedMark.d.ts +0 -3
  84. package/dist/types-ts4.0/react/marks/unsupportedNodeAttribute.d.ts +0 -3
  85. package/dist/types-ts4.0/react/nodes/blockCard.d.ts +0 -10
  86. package/dist/types-ts4.0/react/nodes/blockquote.d.ts +0 -2
  87. package/dist/types-ts4.0/react/nodes/bodiedExtension.d.ts +0 -24
  88. package/dist/types-ts4.0/react/nodes/bulletList.d.ts +0 -5
  89. package/dist/types-ts4.0/react/nodes/caption.d.ts +0 -4
  90. package/dist/types-ts4.0/react/nodes/codeBlock/codeBlock.d.ts +0 -14
  91. package/dist/types-ts4.0/react/nodes/codeBlock/components/codeBlockContainer.d.ts +0 -12
  92. package/dist/types-ts4.0/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +0 -9
  93. package/dist/types-ts4.0/react/nodes/codeBlock/windowedCodeBlock.d.ts +0 -4
  94. package/dist/types-ts4.0/react/nodes/codeBlockCopyButton.d.ts +0 -9
  95. package/dist/types-ts4.0/react/nodes/date.d.ts +0 -11
  96. package/dist/types-ts4.0/react/nodes/decisionItem.d.ts +0 -3
  97. package/dist/types-ts4.0/react/nodes/decisionList.d.ts +0 -7
  98. package/dist/types-ts4.0/react/nodes/doc.d.ts +0 -3
  99. package/dist/types-ts4.0/react/nodes/embedCard.d.ts +0 -17
  100. package/dist/types-ts4.0/react/nodes/emoji.d.ts +0 -10
  101. package/dist/types-ts4.0/react/nodes/extension.d.ts +0 -113
  102. package/dist/types-ts4.0/react/nodes/fallback.d.ts +0 -16
  103. package/dist/types-ts4.0/react/nodes/hardBreak.d.ts +0 -6
  104. package/dist/types-ts4.0/react/nodes/heading-anchor.d.ts +0 -14
  105. package/dist/types-ts4.0/react/nodes/heading.d.ts +0 -14
  106. package/dist/types-ts4.0/react/nodes/index.d.ts +0 -94
  107. package/dist/types-ts4.0/react/nodes/inline.d.ts +0 -1
  108. package/dist/types-ts4.0/react/nodes/inlineCard.d.ts +0 -65
  109. package/dist/types-ts4.0/react/nodes/inlineExtension.d.ts +0 -18
  110. package/dist/types-ts4.0/react/nodes/layoutColumn.d.ts +0 -6
  111. package/dist/types-ts4.0/react/nodes/layoutSection.d.ts +0 -2
  112. package/dist/types-ts4.0/react/nodes/listItem.d.ts +0 -2
  113. package/dist/types-ts4.0/react/nodes/media.d.ts +0 -27
  114. package/dist/types-ts4.0/react/nodes/mediaGroup.d.ts +0 -29
  115. package/dist/types-ts4.0/react/nodes/mediaInline.d.ts +0 -20
  116. package/dist/types-ts4.0/react/nodes/mediaSingle/index.d.ts +0 -23
  117. package/dist/types-ts4.0/react/nodes/mediaSingle/styles.d.ts +0 -2
  118. package/dist/types-ts4.0/react/nodes/mention.d.ts +0 -13
  119. package/dist/types-ts4.0/react/nodes/orderedList.d.ts +0 -6
  120. package/dist/types-ts4.0/react/nodes/panel.d.ts +0 -17
  121. package/dist/types-ts4.0/react/nodes/paragraph.d.ts +0 -3
  122. package/dist/types-ts4.0/react/nodes/placeholder.d.ts +0 -6
  123. package/dist/types-ts4.0/react/nodes/rule.d.ts +0 -2
  124. package/dist/types-ts4.0/react/nodes/status.d.ts +0 -10
  125. package/dist/types-ts4.0/react/nodes/table/colgroup.d.ts +0 -3
  126. package/dist/types-ts4.0/react/nodes/table/sticky.d.ts +0 -38
  127. package/dist/types-ts4.0/react/nodes/table/table.d.ts +0 -7
  128. package/dist/types-ts4.0/react/nodes/table/types.d.ts +0 -7
  129. package/dist/types-ts4.0/react/nodes/table.d.ts +0 -269
  130. package/dist/types-ts4.0/react/nodes/tableCell.d.ts +0 -81
  131. package/dist/types-ts4.0/react/nodes/tableRow.d.ts +0 -24
  132. package/dist/types-ts4.0/react/nodes/task-item-with-providers.d.ts +0 -29
  133. package/dist/types-ts4.0/react/nodes/taskItem.d.ts +0 -19
  134. package/dist/types-ts4.0/react/nodes/taskList.d.ts +0 -8
  135. package/dist/types-ts4.0/react/nodes/text-wrapper.d.ts +0 -8
  136. package/dist/types-ts4.0/react/nodes/unknownBlock.d.ts +0 -2
  137. package/dist/types-ts4.0/react/renderer-node.d.ts +0 -4
  138. package/dist/types-ts4.0/react/types.d.ts +0 -57
  139. package/dist/types-ts4.0/react/utils/clipboard.d.ts +0 -1
  140. package/dist/types-ts4.0/react/utils/element-selection.d.ts +0 -9
  141. package/dist/types-ts4.0/react/utils/getCardClickHandler.d.ts +0 -2
  142. package/dist/types-ts4.0/react/utils/inject-props.d.ts +0 -6
  143. package/dist/types-ts4.0/react/utils/links.d.ts +0 -3
  144. package/dist/types-ts4.0/react/utils/lists.d.ts +0 -2
  145. package/dist/types-ts4.0/react/utils/performance/RenderTracking.d.ts +0 -15
  146. package/dist/types-ts4.0/react/utils/use-select-all-trap.d.ts +0 -2
  147. package/dist/types-ts4.0/render-document.d.ts +0 -23
  148. package/dist/types-ts4.0/renderer-context.d.ts +0 -9
  149. package/dist/types-ts4.0/serializer.d.ts +0 -4
  150. package/dist/types-ts4.0/steps/index.d.ts +0 -14
  151. package/dist/types-ts4.0/text/index.d.ts +0 -8
  152. package/dist/types-ts4.0/text/nodes/blockquote.d.ts +0 -3
  153. package/dist/types-ts4.0/text/nodes/bulletList.d.ts +0 -3
  154. package/dist/types-ts4.0/text/nodes/date.d.ts +0 -3
  155. package/dist/types-ts4.0/text/nodes/decisionItem.d.ts +0 -3
  156. package/dist/types-ts4.0/text/nodes/hardBreak.d.ts +0 -3
  157. package/dist/types-ts4.0/text/nodes/heading.d.ts +0 -3
  158. package/dist/types-ts4.0/text/nodes/index.d.ts +0 -6
  159. package/dist/types-ts4.0/text/nodes/inlineCard.d.ts +0 -3
  160. package/dist/types-ts4.0/text/nodes/listItem.d.ts +0 -3
  161. package/dist/types-ts4.0/text/nodes/mediaGroup.d.ts +0 -3
  162. package/dist/types-ts4.0/text/nodes/mention.d.ts +0 -3
  163. package/dist/types-ts4.0/text/nodes/orderedList.d.ts +0 -3
  164. package/dist/types-ts4.0/text/nodes/panel.d.ts +0 -3
  165. package/dist/types-ts4.0/text/nodes/paragraph.d.ts +0 -3
  166. package/dist/types-ts4.0/text/nodes/rule.d.ts +0 -3
  167. package/dist/types-ts4.0/text/nodes/status.d.ts +0 -3
  168. package/dist/types-ts4.0/text/nodes/table.d.ts +0 -3
  169. package/dist/types-ts4.0/text/nodes/taskItem.d.ts +0 -3
  170. package/dist/types-ts4.0/text/nodes/unknown.d.ts +0 -3
  171. package/dist/types-ts4.0/text-serializer.d.ts +0 -1
  172. package/dist/types-ts4.0/types/i18n.d.ts +0 -5
  173. package/dist/types-ts4.0/types/mediaOptions.d.ts +0 -12
  174. package/dist/types-ts4.0/types/smartLinksOptions.d.ts +0 -3
  175. package/dist/types-ts4.0/ui/Expand.d.ts +0 -21
  176. package/dist/types-ts4.0/ui/ExtensionRenderer.d.ts +0 -42
  177. package/dist/types-ts4.0/ui/MediaCard.d.ts +0 -77
  178. package/dist/types-ts4.0/ui/Renderer/ErrorBoundary.d.ts +0 -24
  179. package/dist/types-ts4.0/ui/Renderer/breakout-ssr.d.ts +0 -11
  180. package/dist/types-ts4.0/ui/Renderer/click-to-edit.d.ts +0 -6
  181. package/dist/types-ts4.0/ui/Renderer/index.d.ts +0 -33
  182. package/dist/types-ts4.0/ui/Renderer/style.d.ts +0 -14
  183. package/dist/types-ts4.0/ui/Renderer/truncated-wrapper.d.ts +0 -12
  184. package/dist/types-ts4.0/ui/Renderer/types.d.ts +0 -16
  185. package/dist/types-ts4.0/ui/RendererActionsContext/WithRendererActions.d.ts +0 -6
  186. package/dist/types-ts4.0/ui/RendererActionsContext/index.d.ts +0 -9
  187. package/dist/types-ts4.0/ui/SmartCardStorage.d.ts +0 -60
  188. package/dist/types-ts4.0/ui/SortingIcon.d.ts +0 -23
  189. package/dist/types-ts4.0/ui/TaskItemsFormatContext/TaskItemsFormatContext.d.ts +0 -15
  190. package/dist/types-ts4.0/ui/TaskItemsFormatContext/index.d.ts +0 -2
  191. package/dist/types-ts4.0/ui/active-header-id-provider.d.ts +0 -18
  192. package/dist/types-ts4.0/ui/annotations/context.d.ts +0 -27
  193. package/dist/types-ts4.0/ui/annotations/draft/component.d.ts +0 -20
  194. package/dist/types-ts4.0/ui/annotations/draft/dom.d.ts +0 -7
  195. package/dist/types-ts4.0/ui/annotations/draft/index.d.ts +0 -2
  196. package/dist/types-ts4.0/ui/annotations/draft/position.d.ts +0 -2
  197. package/dist/types-ts4.0/ui/annotations/draft/text.d.ts +0 -11
  198. package/dist/types-ts4.0/ui/annotations/element/index.d.ts +0 -10
  199. package/dist/types-ts4.0/ui/annotations/element/mark.d.ts +0 -14
  200. package/dist/types-ts4.0/ui/annotations/hooks/index.d.ts +0 -3
  201. package/dist/types-ts4.0/ui/annotations/hooks/use-events.d.ts +0 -18
  202. package/dist/types-ts4.0/ui/annotations/hooks/use-inline-comment-subscriber.d.ts +0 -1
  203. package/dist/types-ts4.0/ui/annotations/hooks/use-inline-comments-filter.d.ts +0 -9
  204. package/dist/types-ts4.0/ui/annotations/hooks/use-load-annotations.d.ts +0 -6
  205. package/dist/types-ts4.0/ui/annotations/hooks/user-selection.d.ts +0 -9
  206. package/dist/types-ts4.0/ui/annotations/hooks/utils.d.ts +0 -2
  207. package/dist/types-ts4.0/ui/annotations/index.d.ts +0 -5
  208. package/dist/types-ts4.0/ui/annotations/selection/index.d.ts +0 -1
  209. package/dist/types-ts4.0/ui/annotations/selection/mounter.d.ts +0 -20
  210. package/dist/types-ts4.0/ui/annotations/selection/range-validator.d.ts +0 -13
  211. package/dist/types-ts4.0/ui/annotations/selection/wrapper.d.ts +0 -8
  212. package/dist/types-ts4.0/ui/annotations/types.d.ts +0 -22
  213. package/dist/types-ts4.0/ui/annotations/view/index.d.ts +0 -7
  214. package/dist/types-ts4.0/ui/index.d.ts +0 -1
  215. package/dist/types-ts4.0/ui/renderer-props.d.ts +0 -100
  216. package/dist/types-ts4.0/use-feature-flags.d.ts +0 -2
  217. package/dist/types-ts4.0/utils.d.ts +0 -24
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "103.0.1",
3
+ "version": "104.0.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,10 +1,15 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import React, { useMemo } from 'react';
4
+ import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
4
5
  export default function TextColor(props) {
6
+ // Note -- while there is no way to create custom colors using default tooling
7
+ // the editor does supported ad hoc color values -- and there may be content
8
+ // which has been migrated or created via apis which use such values.
9
+ var paletteColorValue = hexToEditorTextPaletteColor(props.color) || props.color;
5
10
  var style = useMemo(function () {
6
- return _defineProperty({}, '--custom-text-color', props.color);
7
- }, [props.color]);
11
+ return _defineProperty({}, '--custom-palette-color', paletteColorValue);
12
+ }, [paletteColorValue]);
8
13
  return /*#__PURE__*/React.createElement("span", _extends({}, props.dataAttributes, {
9
14
  "data-text-custom-color": props.color,
10
15
  className: "fabric-text-color-mark",
@@ -10,15 +10,16 @@ import { themed } from '@atlaskit/theme/components';
10
10
  import { fontSize, gridSize } from '@atlaskit/theme/constants';
11
11
  import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
12
12
  import CopyButton from '../../codeBlockCopyButton';
13
+ import { token } from '@atlaskit/tokens'; // TODO: Quality ticket https://product-fabric.atlassian.net/browse/DSP-4118
13
14
 
14
- // TODO: Quality ticket https://product-fabric.atlassian.net/browse/DSP-4118
15
-
16
- /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
17
15
  var codeBlockStyleOverrides = function codeBlockStyleOverrides(props) {
18
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n tab-size: 4;\n ", " {\n font-size: ", ";\n line-height: 1.5rem;\n background-image: ", ";\n background-attachment: local, scroll, scroll;\n background-position: 100% 0, 100% 0, 0 0;\n }\n "])), CodeBlockSharedCssClassName.DS_CODEBLOCK, relativeFontSizeToBase16(fontSize()), overflowShadow({
16
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n tab-size: 4;\n background-color: ", ";\n\n ", " {\n font-size: ", ";\n line-height: 1.5rem;\n background-image: ", ";\n background-attachment: local, local, local, local, scroll, scroll;\n background-position: 0 0, 0 0, 100% 0, 100% 0, 100% 0, 0 0;\n }\n "])), themed({
17
+ light: token('elevation.surface.raised', N20),
18
+ dark: token('elevation.surface.raised', DN50)
19
+ })(props), CodeBlockSharedCssClassName.DS_CODEBLOCK, relativeFontSizeToBase16(fontSize()), overflowShadow({
19
20
  background: themed({
20
- light: N20,
21
- dark: DN50
21
+ light: token('color.background.neutral', N20),
22
+ dark: token('color.background.neutral', DN50)
22
23
  })(props),
23
24
  width: "".concat(gridSize(), "px")
24
25
  }));
@@ -8,13 +8,13 @@ import { css, jsx } from '@emotion/react';
8
8
  import React, { useState } from 'react';
9
9
  import { injectIntl } from 'react-intl-next';
10
10
  import Tooltip from '@atlaskit/tooltip';
11
- import Button from '@atlaskit/button/custom-theme-button';
11
+ import Button from '@atlaskit/button';
12
12
  import CopyIcon from '@atlaskit/icon/glyph/copy';
13
13
  import { N20, N30, N700 } from '@atlaskit/theme/colors';
14
14
  import { copyTextToClipboard } from '../utils/clipboard';
15
15
  import { codeBlockCopyButtonMessages } from '@atlaskit/editor-common/messages';
16
16
  import { token } from '@atlaskit/tokens';
17
- var copyButtonWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n position: sticky;\n justify-content: flex-end;\n top: 0;\n\n button {\n position: absolute;\n display: flex;\n justify-content: center;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n opacity: 0;\n transition: opacity 0.2s ease 0s;\n border: 2px solid ", ";\n border-radius: 4px;\n background-color: ", ";\n color: ", ";\n }\n\n button:hover {\n background-color: ", ";\n }\n\n button.clicked {\n background-color: ", ";\n color: ", " !important;\n }\n"])), token('color.border.inverse', '#fff'), token('color.background.neutral.subtle', N20), token('color.icon', 'rgb(66, 82, 110)'), token('color.background.neutral.hovered', N30), token('color.background.neutral.bold.pressed', N700), token('color.icon.inverse', '#fff'));
17
+ var copyButtonWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n position: sticky;\n justify-content: flex-end;\n top: 0;\n\n button {\n position: absolute;\n display: flex;\n justify-content: center;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n opacity: 0;\n transition: opacity 0.2s ease 0s;\n border: 2px solid ", ";\n border-radius: 4px;\n background-color: ", ";\n color: ", " !important;\n }\n\n button:hover {\n border: 2px solid ", ";\n background-color: ", ";\n }\n\n button:active {\n border: 2px solid ", ";\n background-color: ", ";\n }\n\n button.clicked {\n background-color: ", ";\n color: ", " !important;\n }\n button.clicked:hover {\n background-color: ", ";\n }\n"])), token('color.border', '#fff'), token('elevation.surface.overlay', N20), token('color.text', 'rgb(66, 82, 110)'), token('color.border', 'transparent'), token('elevation.surface.overlay.hovered', N30), token('color.border', 'transparent'), token('elevation.surface.overlay.pressed', N30), token('elevation.surface.overlay', N700), token('color.text', '#fff'), token('elevation.surface.overlay.hovered', N700));
18
18
 
19
19
  var CopyButton = function CopyButton(_ref) {
20
20
  var content = _ref.content,
@@ -23,7 +23,7 @@ import { getSchemaBasedOnStage } from '@atlaskit/adf-schema/schema-default';
23
23
  import { reduce } from '@atlaskit/adf-utils/traverse';
24
24
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
25
25
  import { UnsupportedBlock, BaseTheme, WidthProvider, WithCreateAnalyticsEvent, IntlErrorBoundary } from '@atlaskit/editor-common/ui';
26
- import { getAnalyticsAppearance, getAnalyticsEventSeverity, getResponseEndTime, startMeasure, stopMeasure, shouldForceTracking, measureTTI, browser } from '@atlaskit/editor-common/utils';
26
+ import { getAnalyticsAppearance, getAnalyticsEventSeverity, getResponseEndTime, startMeasure, stopMeasure, shouldForceTracking, measureTTI, getDistortedDurationMonitor, browser } from '@atlaskit/editor-common/utils';
27
27
  import { normalizeFeatureFlags } from '@atlaskit/editor-common/normalize-feature-flags';
28
28
  import { akEditorFullPageDefaultFontSize } from '@atlaskit/editor-shared-styles';
29
29
  import { FabricChannel } from '@atlaskit/analytics-listeners';
@@ -50,12 +50,16 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
50
50
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
51
51
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
52
52
  var packageName = "@atlaskit/renderer";
53
- var packageVersion = "103.0.1";
53
+ var packageVersion = "104.0.0";
54
54
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
55
55
  _inherits(Renderer, _PureComponent);
56
56
 
57
57
  var _super = _createSuper(Renderer);
58
58
 
59
+ /**
60
+ * This is used in measuring the Renderer Mount time and is then
61
+ * deleted once that measurement occurs.
62
+ */
59
63
  function Renderer(props) {
60
64
  var _this;
61
65
 
@@ -63,6 +67,8 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
63
67
 
64
68
  _this = _super.call(this, props);
65
69
 
70
+ _defineProperty(_assertThisInitialized(_this), "renderedMeasurementDistortedDurationMonitor", getDistortedDurationMonitor());
71
+
66
72
  _defineProperty(_assertThisInitialized(_this), "featureFlags", memoizeOne(function (featureFlags) {
67
73
  var normalizedFeatureFlags = normalizeFeatureFlags(featureFlags, {
68
74
  objectFlagKeys: ['rendererRenderTracking']
@@ -231,6 +237,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
231
237
  attributes: {
232
238
  platform: PLATFORM.WEB,
233
239
  duration: duration,
240
+ distortedDuration: _this2.renderedMeasurementDistortedDurationMonitor.distortedDuration,
234
241
  ttfb: getResponseEndTime(),
235
242
  nodes: reduce(_this2.props.document, function (acc, node) {
236
243
  acc[node.type] = (acc[node.type] || 0) + 1;
@@ -240,6 +247,10 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
240
247
  },
241
248
  eventType: EVENT_TYPE.OPERATIONAL
242
249
  });
250
+
251
+ _this2.renderedMeasurementDistortedDurationMonitor.cleanup();
252
+
253
+ delete _this2.renderedMeasurementDistortedDurationMonitor;
243
254
  });
244
255
 
245
256
  _this2.anchorLinkAnalytics();
@@ -101,7 +101,7 @@ export var rendererStyles = function rendererStyles(wrapperProps) {
101
101
  var themeProps = {
102
102
  theme: theme
103
103
  };
104
- return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", "px 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n .", "\n .", " {\n display: flex;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n &\n .", ",\n &\n .", " {\n height: calc(100% - ", "px);\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-of-type {\n height: 100%;\n\n td,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: auto 1fr;\n /* stylelint-enable */\n\n grid-template-columns: minmax(0, 1fr);\n position: relative;\n border-radius: ", "px;\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n\n & > span {\n /* stylelint-disable value-no-vendor-prefix */\n -ms-grid-row: 1;\n -ms-grid-column: 2;\n /* stylelint-enable */\n grid-column: 1;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n\n &:hover button.copy-to-clipboard,\n .copy-to-clipboard:focus {\n opacity: 1;\n position: absolute;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n }\n }\n\n ", "\n\n ", ";\n & [data-layout-section] {\n margin-top: ", "px;\n & > div + div {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n }\n\n & li {\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n\n ", "\n }\n "])), editorFontSize(themeProps), themed({
104
+ return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", "px 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n .", "\n .", " {\n display: flex;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n &\n .", ",\n &\n .", " {\n height: calc(100% - ", "px);\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-of-type {\n height: 100%;\n\n td,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: auto 1fr;\n /* stylelint-enable */\n\n grid-template-columns: minmax(0, 1fr);\n position: relative;\n border-radius: ", "px;\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n\n & > span {\n /* stylelint-disable value-no-vendor-prefix */\n -ms-grid-row: 1;\n -ms-grid-column: 2;\n /* stylelint-enable */\n grid-column: 1;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n\n &:hover button.copy-to-clipboard,\n .copy-to-clipboard:focus {\n opacity: 1;\n position: absolute;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n }\n }\n\n ", "\n\n ", ";\n & [data-layout-section] {\n margin-top: ", "px;\n & > div + div {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n }\n\n & li {\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n\n ", "\n }\n "])), editorFontSize(themeProps), themed({
105
105
  light: token('color.text', colors.N800),
106
106
  dark: token('color.text', '#B8C7E0')
107
107
  })(themeProps), RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), token('color.link', colors.B400), token('color.link', colors.B300), token('color.link.pressed', colors.B500), colors.placeholderText(themeProps), whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles(themeProps), ruleSharedStyles(themeProps), paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles(themeProps), shadowSharedStyle, dateSharedStyle, textColorStyles, tasksAndDecisionsStyles, smartCardSharedStyles, fontFamily(), relativeFontSizeToBase16(fontSize()), themed({
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "103.0.1",
3
+ "version": "104.0.0",
4
4
  "sideEffects": false
5
5
  }
@@ -17,6 +17,7 @@ declare type RendererStartAEP = AEP<ACTION.STARTED, ACTION_SUBJECT.RENDERER, und
17
17
  declare type RendererRenderedAEP = AEP<ACTION.RENDERED, ACTION_SUBJECT.RENDERER, undefined, {
18
18
  platform: PLATFORM.WEB;
19
19
  duration: number;
20
+ distortedDuration: boolean;
20
21
  ttfb?: number;
21
22
  nodes: Record<string, number>;
22
23
  severity?: SEVERITY;
@@ -16,6 +16,11 @@ export declare class Renderer extends PureComponent<RendererProps> {
16
16
  private editorRef;
17
17
  private mouseDownSelection?;
18
18
  private id?;
19
+ /**
20
+ * This is used in measuring the Renderer Mount time and is then
21
+ * deleted once that measurement occurs.
22
+ */
23
+ private renderedMeasurementDistortedDurationMonitor?;
19
24
  constructor(props: RendererProps);
20
25
  private anchorLinkAnalytics;
21
26
  componentDidMount(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "103.0.1",
3
+ "version": "104.0.0",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,14 +12,6 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.0 <4.5": {
17
- "*": [
18
- "dist/types-ts4.0/*",
19
- "dist/types-ts4.0/index.d.ts"
20
- ]
21
- }
22
- },
23
15
  "sideEffects": false,
24
16
  "atlaskit:src": "src/index.ts",
25
17
  "atlassian": {
@@ -37,23 +29,24 @@
37
29
  "@atlaskit/analytics-listeners": "^8.3.0",
38
30
  "@atlaskit/analytics-namespaced-context": "^6.5.0",
39
31
  "@atlaskit/analytics-next": "^8.2.0",
40
- "@atlaskit/button": "^16.4.0",
32
+ "@atlaskit/button": "^16.5.0",
41
33
  "@atlaskit/code": "^14.4.0",
42
- "@atlaskit/editor-common": "^70.2.0",
34
+ "@atlaskit/editor-common": "^71.0.0",
43
35
  "@atlaskit/editor-json-transformer": "^8.8.0",
36
+ "@atlaskit/editor-palette": "0.1.0",
44
37
  "@atlaskit/editor-shared-styles": "^2.2.0",
45
38
  "@atlaskit/icon": "^21.11.0",
46
- "@atlaskit/media-card": "^74.2.0",
47
- "@atlaskit/media-client": "^18.1.0",
39
+ "@atlaskit/media-card": "^74.3.0",
40
+ "@atlaskit/media-client": "^19.0.0",
48
41
  "@atlaskit/media-common": "^2.17.0",
49
- "@atlaskit/media-filmstrip": "^46.0.0",
50
- "@atlaskit/media-ui": "^22.1.0",
51
- "@atlaskit/media-viewer": "^47.1.0",
52
- "@atlaskit/smart-card": "^23.1.0",
42
+ "@atlaskit/media-filmstrip": "^46.1.0",
43
+ "@atlaskit/media-ui": "^22.2.0",
44
+ "@atlaskit/media-viewer": "^47.2.0",
45
+ "@atlaskit/smart-card": "^23.7.0",
53
46
  "@atlaskit/status": "^1.2.0",
54
47
  "@atlaskit/task-decision": "^17.5.0",
55
48
  "@atlaskit/theme": "^12.2.0",
56
- "@atlaskit/tokens": "^0.10.0",
49
+ "@atlaskit/tokens": "^0.11.0",
57
50
  "@atlaskit/tooltip": "^17.6.0",
58
51
  "@babel/runtime": "^7.0.0",
59
52
  "@emotion/react": "^11.7.1",
@@ -67,7 +60,7 @@
67
60
  "uuid": "^3.1.0"
68
61
  },
69
62
  "peerDependencies": {
70
- "@atlaskit/link-provider": "^1.3.0",
63
+ "@atlaskit/link-provider": "^1.3.4",
71
64
  "@atlaskit/media-core": "^34.0.0",
72
65
  "react": "^16.8.0",
73
66
  "react-dom": "^16.8.0"
@@ -77,7 +70,7 @@
77
70
  "@atlaskit/avatar": "^21.1.0",
78
71
  "@atlaskit/css-reset": "^6.3.0",
79
72
  "@atlaskit/docs": "*",
80
- "@atlaskit/editor-core": "^175.0.0",
73
+ "@atlaskit/editor-core": "^176.0.0",
81
74
  "@atlaskit/editor-test-helpers": "^17.2.0",
82
75
  "@atlaskit/link-provider": "^1.3.0",
83
76
  "@atlaskit/logo": "^13.10.0",
@@ -86,11 +79,11 @@
86
79
  "@atlaskit/media-test-helpers": "^30.0.0",
87
80
  "@atlaskit/mention": "^21.0.0",
88
81
  "@atlaskit/navigation-next": "^9.0.0",
89
- "@atlaskit/profilecard": "^17.2.0",
82
+ "@atlaskit/profilecard": "^17.3.0",
90
83
  "@atlaskit/radio": "^5.4.0",
91
84
  "@atlaskit/range": "^7.0.0",
92
85
  "@atlaskit/ssr": "*",
93
- "@atlaskit/util-data-test": "^17.5.0",
86
+ "@atlaskit/util-data-test": "^17.6.0",
94
87
  "@atlaskit/visual-regression": "*",
95
88
  "@atlaskit/webdriver-runner": "*",
96
89
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
package/report.api.md CHANGED
@@ -1,12 +1,17 @@
1
+ <!-- API Report Version: 2.2 -->
2
+
1
3
  ## API Report File for "@atlaskit/renderer"
2
4
 
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
5
+ > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
6
+ > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
+
8
+ ### Table of contents
9
+
10
+ - [Main Entry Types](#main-entry-types)
4
11
 
5
- <!--
6
- Generated API Report version: 2.0
7
- -->
12
+ ### Main Entry Types
8
13
 
9
- [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
14
+ <!--SECTION START: Main Entry Types-->
10
15
 
11
16
  ```ts
12
17
  /// <reference types="react" />
@@ -139,28 +144,28 @@ type AEP<Action, ActionSubject, ActionSubjectID, Attributes, EventType> = {
139
144
 
140
145
  // @public (undocumented)
141
146
  type AnalyticsEventPayload<T = void> =
142
- | RendererStartAEP
143
- | RendererRenderedAEP
144
- | RendererReRenderedAEP<T>
147
+ | AnchorLinkAEP
148
+ | AnnotationAEP
149
+ | AnnotationDeleteAEP
145
150
  | ComponentCrashErrorAEP
146
- | RendererUnsupportedContentLevelsTrackingSucceeded
147
- | RendererUnsupportedContentLevelsTrackingErrored
151
+ | ExpandAEP
152
+ | HeadingAnchorLinkButtonAEP
153
+ | InvalidProsemirrorDocumentErrorAEP
154
+ | MediaLnkTransformedAEP
155
+ | RendererReRenderedAEP<T>
156
+ | RendererRenderedAEP
148
157
  | RendererSelectAllCaughtAEP
149
158
  | RendererSelectAllEscapedAEP
150
- | HeadingAnchorLinkButtonAEP
151
- | AnchorLinkAEP
152
- | TableSortColumnNotAllowedAEP
159
+ | RendererStartAEP
160
+ | RendererTTIAEP
161
+ | RendererUnsupportedContentLevelsTrackingErrored
162
+ | RendererUnsupportedContentLevelsTrackingSucceeded
153
163
  | TableSortColumnAEP
154
- | VisitLinkAEP
155
- | VisitMediaLinkAEP
156
- | ExpandAEP
164
+ | TableSortColumnNotAllowedAEP
157
165
  | UnsupportedContentPayload
158
166
  | UnsupportedContentTooltipPayload
159
- | AnnotationAEP
160
- | AnnotationDeleteAEP
161
- | MediaLnkTransformedAEP
162
- | InvalidProsemirrorDocumentErrorAEP
163
- | RendererTTIAEP;
167
+ | VisitLinkAEP
168
+ | VisitMediaLinkAEP;
164
169
 
165
170
  // @public (undocumented)
166
171
  type AnchorLinkAEP = UIAEP<
@@ -175,14 +180,14 @@ type AnchorLinkAEP = UIAEP<
175
180
 
176
181
  // @public (undocumented)
177
182
  type AnnotationActionType =
178
- | ACTION.INSERTED
179
183
  | ACTION.CLOSED
180
- | ACTION.EDITED
184
+ | ACTION.CREATE_NOT_ALLOWED
181
185
  | ACTION.DELETED
186
+ | ACTION.EDITED
187
+ | ACTION.INSERTED
182
188
  | ACTION.OPENED
183
189
  | ACTION.RESOLVED
184
- | ACTION.VIEWED
185
- | ACTION.CREATE_NOT_ALLOWED;
190
+ | ACTION.VIEWED;
186
191
 
187
192
  // @public (undocumented)
188
193
  type AnnotationAEP = AEP<
@@ -281,7 +286,7 @@ type HeadingAnchorLinksConfig = {
281
286
  };
282
287
 
283
288
  // @public (undocumented)
284
- export type HeadingAnchorLinksProps = boolean | HeadingAnchorLinksConfig;
289
+ export type HeadingAnchorLinksProps = HeadingAnchorLinksConfig | boolean;
285
290
 
286
291
  // @public (undocumented)
287
292
  type InvalidProsemirrorDocumentErrorAEP = AEP<
@@ -525,10 +530,10 @@ export interface RendererProps {
525
530
  // (undocumented)
526
531
  fadeOutHeight?: number;
527
532
  featureFlags?:
533
+ | Partial<RawObjectFeatureFlags>
528
534
  | {
529
535
  [featureFlag: string]: boolean;
530
- }
531
- | Partial<RawObjectFeatureFlags>;
536
+ };
532
537
  // (undocumented)
533
538
  innerRef?: React.RefObject<HTMLDivElement>;
534
539
  // (undocumented)
@@ -569,6 +574,7 @@ type RendererRenderedAEP = AEP<
569
574
  {
570
575
  platform: PLATFORM.WEB;
571
576
  duration: number;
577
+ distortedDuration: boolean;
572
578
  ttfb?: number;
573
579
  nodes: Record<string, number>;
574
580
  severity?: SEVERITY;
@@ -717,10 +723,10 @@ type StickyHeaderConfig = {
717
723
 
718
724
  // @public (undocumented)
719
725
  type StickyHeaderProps =
720
- | boolean
721
726
  | ({
722
727
  show?: boolean;
723
- } & StickyHeaderConfig);
728
+ } & StickyHeaderConfig)
729
+ | boolean;
724
730
 
725
731
  // @public (undocumented)
726
732
  type TableSortColumnAEP = AEP<
@@ -807,3 +813,5 @@ type VisitMediaLinkAEP = AEP<
807
813
 
808
814
  // (No @packageDocumentation comment for this package)
809
815
  ```
816
+
817
+ <!--SECTION END: Main Entry Types-->
@@ -1,61 +0,0 @@
1
- /// <reference types="react" />
2
- import { JSONDocNode } from '@atlaskit/editor-json-transformer';
3
- import type { AnnotationActionResult, AnnotationByMatches } from '@atlaskit/editor-common/types';
4
- import { AnnotationTypes } from '@atlaskit/adf-schema';
5
- import { Node, Schema, Mark } from 'prosemirror-model';
6
- import { Step, RemoveMarkStep } from 'prosemirror-transform';
7
- import { AnalyticsEventPayload } from '../analytics/events';
8
- declare type ActionResult = {
9
- step: Step;
10
- doc: JSONDocNode;
11
- } | false;
12
- declare type Position = {
13
- from: number;
14
- to: number;
15
- };
16
- declare type Annotation = {
17
- annotationId: string;
18
- annotationType: AnnotationTypes;
19
- };
20
- export interface RendererActionsOptions {
21
- annotate: (range: Range, annotationId: string, annotationType: 'inlineComment') => ActionResult;
22
- deleteAnnotation: (annotationId: string, annotationType: 'inlineComment') => ActionResult;
23
- isValidAnnotationRange: (range: Range) => boolean;
24
- }
25
- export declare type ApplyAnnotation = (pos: Position, annotation: Annotation) => AnnotationActionResult;
26
- export interface AnnotationsRendererActionsOptions {
27
- isValidAnnotationPosition: (pos: Position) => boolean;
28
- applyAnnotation: ApplyAnnotation;
29
- getAnnotationMarks: () => Mark[];
30
- }
31
- export interface PositionRendererActionsOptions {
32
- getPositionFromRange: (range: Range) => Position | false;
33
- }
34
- export default class RendererActions implements RendererActionsOptions, AnnotationsRendererActionsOptions, PositionRendererActionsOptions {
35
- private initFromContext;
36
- private transformer;
37
- private doc?;
38
- private schema?;
39
- private ref?;
40
- private onAnalyticsEvent?;
41
- constructor(initFromContext?: boolean);
42
- _privateRegisterRenderer(ref: React.MutableRefObject<null>, doc: Node, schema: Schema, onAnalyticsEvent?: (event: AnalyticsEventPayload) => void): void;
43
- _privateUnregisterRenderer(): void;
44
- /**
45
- * Validate whether we can create an annotation between two positions
46
- */
47
- _privateValidatePositionsForAnnotation(from: number, to: number): boolean;
48
- deleteAnnotation(annotationId: string, annotationType: 'inlineComment'): false | {
49
- step: RemoveMarkStep<Schema<any, any>>;
50
- doc: JSONDocNode;
51
- };
52
- annotate(range: Range, annotationId: string, annotationType: 'inlineComment'): AnnotationActionResult;
53
- isValidAnnotationRange(range: Range): boolean;
54
- isValidAnnotationPosition(pos: Position): boolean;
55
- getPositionFromRange(range: Range): Position | false;
56
- getAnnotationMarks(): Mark<any>[];
57
- getAnnotationsByPosition(range: Range): string[];
58
- applyAnnotation(pos: Position, annotation: Annotation): AnnotationActionResult;
59
- generateAnnotationIndexMatch(pos: Position): AnnotationByMatches | false;
60
- }
61
- export {};
@@ -1,7 +0,0 @@
1
- import { Node, Schema } from 'prosemirror-model';
2
- export declare function getIndexMatch(doc: Node, schema: Schema, selectedText: string, startIndex: number): {
3
- numMatches: number;
4
- matchIndex: number;
5
- textContent: string;
6
- };
7
- export declare function countMatches(searchString: string, query: string): number;
@@ -1,3 +0,0 @@
1
- import { RendererActionsContext, RendererActionsContextConsumer } from './ui/RendererActionsContext';
2
- import { WithRendererActions } from './ui/RendererActionsContext/WithRendererActions';
3
- export { RendererActionsContext, RendererActionsContextConsumer, WithRendererActions, };
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { AnalyticsEventPayload } from './events';
3
- declare const AnalyticsContext: React.Context<{
4
- fireAnalyticsEvent: (event: AnalyticsEventPayload) => void;
5
- }>;
6
- export default AnalyticsContext;
@@ -1,56 +0,0 @@
1
- export declare enum EVENT_TYPE {
2
- OPERATIONAL = "operational",
3
- SCREEN = "screen",
4
- TRACK = "track",
5
- UI = "ui"
6
- }
7
- export declare enum ACTION {
8
- STARTED = "started",
9
- RENDERED = "rendered",
10
- RE_RENDERED = "reRendered",
11
- RENDERER_TTI = "tti",
12
- CRASHED = "unhandledErrorCaught",
13
- INVALID_PROSEMIRROR_DOCUMENT = "invalidProsemirrorDocument",
14
- SELECT_ALL_CAUGHT = "selectAllCaught",
15
- SELECT_ALL_ESCAPED = "selectAllEscaped",
16
- CLICKED = "clicked",
17
- VIEWED = "viewed",
18
- VISITED = "visited",
19
- SORT_COLUMN = "sortedColumn",
20
- SORT_COLUMN_NOT_ALLOWED = "sortColumnNotAllowed",
21
- TOGGLE_EXPAND = "toggleExpand",
22
- INSERTED = "inserted",
23
- OPENED = "opened",
24
- CLOSED = "closed",
25
- DELETED = "deleted",
26
- EDITED = "edited",
27
- RESOLVED = "resolved",
28
- CREATE_NOT_ALLOWED = "createNotAllowed",
29
- UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED = "unsupportedContentLevelsTrackingSucceeded",
30
- UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED = "unsupportedContentLevelsTrackingErrored",
31
- MEDIA_LINK_TRANSFORMED = "mediaLinkTransformed"
32
- }
33
- export declare enum ACTION_SUBJECT {
34
- RENDERER = "renderer",
35
- BUTTON = "button",
36
- ANCHOR_LINK = "anchorLink",
37
- TABLE = "table",
38
- EXPAND = "expand",
39
- NESTED_EXPAND = "nestedExpand",
40
- MEDIA_SINGLE = "mediaSingle",
41
- LINK = "link",
42
- ANNOTATION = "annotation",
43
- MEDIA = "media"
44
- }
45
- export declare enum ACTION_SUBJECT_ID {
46
- HEADING_ANCHOR_LINK = "headingAnchorLink",
47
- LINK = "link",
48
- INLINE_COMMENT = "inlineComment"
49
- }
50
- export declare type AEP<Action, ActionSubject, ActionSubjectID, Attributes, EventType> = {
51
- action: Action;
52
- actionSubject: ActionSubject;
53
- actionSubjectId?: ActionSubjectID;
54
- attributes?: Attributes;
55
- eventType: EventType;
56
- };