@atlaskit/editor-common 60.0.0 → 61.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/CHANGELOG.md +89 -0
  2. package/card/package.json +7 -0
  3. package/dist/cjs/card/cardOptions.js +5 -0
  4. package/dist/cjs/emoji.js +23 -0
  5. package/dist/cjs/extensions/index.js +6 -0
  6. package/dist/cjs/extensions/types/field-definitions.js +7 -1
  7. package/dist/cjs/extensions/types/index.js +6 -0
  8. package/dist/cjs/extensions.js +6 -0
  9. package/dist/cjs/i18n/cs.js +1 -0
  10. package/dist/cjs/i18n/da.js +1 -0
  11. package/dist/cjs/i18n/de.js +1 -0
  12. package/dist/cjs/i18n/es.js +1 -0
  13. package/dist/cjs/i18n/fi.js +1 -0
  14. package/dist/cjs/i18n/fr.js +1 -0
  15. package/dist/cjs/i18n/hu.js +1 -0
  16. package/dist/cjs/i18n/it.js +1 -0
  17. package/dist/cjs/i18n/ja.js +1 -0
  18. package/dist/cjs/i18n/ko.js +1 -0
  19. package/dist/cjs/i18n/nb.js +1 -0
  20. package/dist/cjs/i18n/nl.js +1 -0
  21. package/dist/cjs/i18n/pl.js +1 -0
  22. package/dist/cjs/i18n/pt_BR.js +1 -0
  23. package/dist/cjs/i18n/ru.js +1 -0
  24. package/dist/cjs/i18n/sv.js +1 -0
  25. package/dist/cjs/i18n/th.js +1 -0
  26. package/dist/cjs/i18n/tr.js +1 -0
  27. package/dist/cjs/i18n/uk.js +1 -0
  28. package/dist/cjs/i18n/vi.js +1 -0
  29. package/dist/cjs/i18n/zh.js +1 -1
  30. package/dist/cjs/i18n/zh_TW.js +1 -0
  31. package/dist/cjs/index.js +12 -0
  32. package/dist/cjs/mention.js +23 -0
  33. package/dist/cjs/messages/codeBidiWarning.js +21 -0
  34. package/dist/cjs/messages/index.js +8 -0
  35. package/dist/cjs/styles/index.js +6 -0
  36. package/dist/cjs/styles/shared/panel.js +92 -37
  37. package/dist/cjs/styles/shared/table.js +2 -2
  38. package/dist/cjs/ufo/experience-store.js +160 -0
  39. package/dist/cjs/ufo/index.js +25 -0
  40. package/dist/cjs/ui/Messages/index.js +1 -3
  41. package/dist/cjs/utils/compareNodes.js +6 -0
  42. package/dist/cjs/utils/index.js +23 -1
  43. package/dist/cjs/utils/profiler/render-count.js +135 -0
  44. package/dist/cjs/utils/validator.js +46 -26
  45. package/dist/cjs/version.json +1 -1
  46. package/dist/es2019/card/cardOptions.js +1 -0
  47. package/dist/es2019/emoji.js +2 -0
  48. package/dist/es2019/extensions/index.js +1 -1
  49. package/dist/es2019/extensions/types/field-definitions.js +3 -0
  50. package/dist/es2019/extensions/types/index.js +1 -1
  51. package/dist/es2019/extensions.js +1 -1
  52. package/dist/es2019/i18n/cs.js +1 -0
  53. package/dist/es2019/i18n/da.js +1 -0
  54. package/dist/es2019/i18n/de.js +1 -0
  55. package/dist/es2019/i18n/es.js +1 -0
  56. package/dist/es2019/i18n/fi.js +1 -0
  57. package/dist/es2019/i18n/fr.js +1 -0
  58. package/dist/es2019/i18n/hu.js +1 -0
  59. package/dist/es2019/i18n/it.js +1 -0
  60. package/dist/es2019/i18n/ja.js +1 -0
  61. package/dist/es2019/i18n/ko.js +1 -0
  62. package/dist/es2019/i18n/nb.js +1 -0
  63. package/dist/es2019/i18n/nl.js +1 -0
  64. package/dist/es2019/i18n/pl.js +1 -0
  65. package/dist/es2019/i18n/pt_BR.js +1 -0
  66. package/dist/es2019/i18n/ru.js +1 -0
  67. package/dist/es2019/i18n/sv.js +1 -0
  68. package/dist/es2019/i18n/th.js +1 -0
  69. package/dist/es2019/i18n/tr.js +1 -0
  70. package/dist/es2019/i18n/uk.js +1 -0
  71. package/dist/es2019/i18n/vi.js +1 -0
  72. package/dist/es2019/i18n/zh.js +1 -1
  73. package/dist/es2019/i18n/zh_TW.js +1 -0
  74. package/dist/es2019/index.js +26 -8
  75. package/dist/es2019/mention.js +2 -0
  76. package/dist/es2019/messages/codeBidiWarning.js +12 -0
  77. package/dist/es2019/messages/index.js +1 -0
  78. package/dist/es2019/styles/index.js +4 -2
  79. package/dist/es2019/styles/shared/panel.js +104 -39
  80. package/dist/es2019/styles/shared/table.js +2 -1
  81. package/dist/es2019/ufo/experience-store.js +116 -0
  82. package/dist/es2019/ufo/index.js +1 -0
  83. package/dist/es2019/ui/Messages/index.js +1 -2
  84. package/dist/es2019/ui/index.js +8 -3
  85. package/dist/es2019/utils/compareNodes.js +6 -0
  86. package/dist/es2019/utils/index.js +3 -1
  87. package/dist/es2019/utils/profiler/render-count.js +107 -0
  88. package/dist/es2019/utils/validator.js +36 -13
  89. package/dist/es2019/version.json +1 -1
  90. package/dist/esm/card/cardOptions.js +1 -0
  91. package/dist/esm/emoji.js +2 -0
  92. package/dist/esm/extensions/index.js +1 -1
  93. package/dist/esm/extensions/types/field-definitions.js +3 -0
  94. package/dist/esm/extensions/types/index.js +1 -1
  95. package/dist/esm/extensions.js +1 -1
  96. package/dist/esm/i18n/cs.js +1 -0
  97. package/dist/esm/i18n/da.js +1 -0
  98. package/dist/esm/i18n/de.js +1 -0
  99. package/dist/esm/i18n/es.js +1 -0
  100. package/dist/esm/i18n/fi.js +1 -0
  101. package/dist/esm/i18n/fr.js +1 -0
  102. package/dist/esm/i18n/hu.js +1 -0
  103. package/dist/esm/i18n/it.js +1 -0
  104. package/dist/esm/i18n/ja.js +1 -0
  105. package/dist/esm/i18n/ko.js +1 -0
  106. package/dist/esm/i18n/nb.js +1 -0
  107. package/dist/esm/i18n/nl.js +1 -0
  108. package/dist/esm/i18n/pl.js +1 -0
  109. package/dist/esm/i18n/pt_BR.js +1 -0
  110. package/dist/esm/i18n/ru.js +1 -0
  111. package/dist/esm/i18n/sv.js +1 -0
  112. package/dist/esm/i18n/th.js +1 -0
  113. package/dist/esm/i18n/tr.js +1 -0
  114. package/dist/esm/i18n/uk.js +1 -0
  115. package/dist/esm/i18n/vi.js +1 -0
  116. package/dist/esm/i18n/zh.js +1 -1
  117. package/dist/esm/i18n/zh_TW.js +1 -0
  118. package/dist/esm/index.js +26 -8
  119. package/dist/esm/mention.js +2 -0
  120. package/dist/esm/messages/codeBidiWarning.js +12 -0
  121. package/dist/esm/messages/index.js +1 -0
  122. package/dist/esm/styles/index.js +4 -2
  123. package/dist/esm/styles/shared/panel.js +87 -38
  124. package/dist/esm/styles/shared/table.js +2 -2
  125. package/dist/esm/ufo/experience-store.js +144 -0
  126. package/dist/esm/ufo/index.js +1 -0
  127. package/dist/esm/ui/Messages/index.js +1 -2
  128. package/dist/esm/ui/index.js +8 -3
  129. package/dist/esm/utils/compareNodes.js +6 -0
  130. package/dist/esm/utils/index.js +3 -1
  131. package/dist/esm/utils/profiler/render-count.js +123 -0
  132. package/dist/esm/utils/validator.js +46 -26
  133. package/dist/esm/version.json +1 -1
  134. package/dist/types/card/cardOptions.d.ts +9 -0
  135. package/dist/types/card/index.d.ts +1 -9
  136. package/dist/types/collab/types.d.ts +5 -0
  137. package/dist/types/collab.d.ts +1 -1
  138. package/dist/types/emoji.d.ts +3 -0
  139. package/dist/types/extensions/index.d.ts +1 -1
  140. package/dist/types/extensions/types/extension-handler.d.ts +6 -2
  141. package/dist/types/extensions/types/extension-parameters.d.ts +1 -0
  142. package/dist/types/extensions/types/field-definitions.d.ts +2 -0
  143. package/dist/types/extensions/types/index.d.ts +1 -1
  144. package/dist/types/extensions.d.ts +1 -1
  145. package/dist/types/i18n/cs.d.ts +1 -0
  146. package/dist/types/i18n/da.d.ts +1 -0
  147. package/dist/types/i18n/de.d.ts +1 -0
  148. package/dist/types/i18n/es.d.ts +1 -0
  149. package/dist/types/i18n/fi.d.ts +1 -0
  150. package/dist/types/i18n/fr.d.ts +1 -0
  151. package/dist/types/i18n/hu.d.ts +1 -0
  152. package/dist/types/i18n/it.d.ts +1 -0
  153. package/dist/types/i18n/ja.d.ts +1 -0
  154. package/dist/types/i18n/ko.d.ts +1 -0
  155. package/dist/types/i18n/nb.d.ts +1 -0
  156. package/dist/types/i18n/nl.d.ts +1 -0
  157. package/dist/types/i18n/pl.d.ts +1 -0
  158. package/dist/types/i18n/pt_BR.d.ts +1 -0
  159. package/dist/types/i18n/ru.d.ts +1 -0
  160. package/dist/types/i18n/sv.d.ts +1 -0
  161. package/dist/types/i18n/th.d.ts +1 -0
  162. package/dist/types/i18n/tr.d.ts +1 -0
  163. package/dist/types/i18n/uk.d.ts +1 -0
  164. package/dist/types/i18n/vi.d.ts +1 -0
  165. package/dist/types/i18n/zh.d.ts +1 -0
  166. package/dist/types/i18n/zh_TW.d.ts +1 -0
  167. package/dist/types/index.d.ts +7 -3
  168. package/dist/types/mention.d.ts +2 -0
  169. package/dist/types/messages/codeBidiWarning.d.ts +11 -0
  170. package/dist/types/messages/index.d.ts +1 -0
  171. package/dist/types/provider-factory.d.ts +1 -0
  172. package/dist/types/styles/index.d.ts +1 -1
  173. package/dist/types/styles/shared/panel.d.ts +3 -1
  174. package/dist/types/ufo/experience-store.d.ts +33 -0
  175. package/dist/types/ufo/index.d.ts +1 -0
  176. package/dist/types/utils/index.d.ts +2 -0
  177. package/dist/types/utils/profiler/render-count.d.ts +50 -0
  178. package/emoji/package.json +7 -0
  179. package/mention/package.json +7 -0
  180. package/package.json +33 -21
  181. package/provider-helpers/package.json +7 -0
  182. package/types/package.json +7 -0
  183. package/ufo/package.json +7 -0
  184. package/ui/package.json +7 -0
  185. package/utils/package.json +7 -0
  186. package/dist/cjs/ui/Caption/index.test.js +0 -82
  187. package/dist/cjs/utils/performance/measure-tti.test.js +0 -183
  188. package/dist/es2019/ui/Caption/index.test.js +0 -73
  189. package/dist/es2019/utils/performance/measure-tti.test.js +0 -124
  190. package/dist/esm/ui/Caption/index.test.js +0 -73
  191. package/dist/esm/utils/performance/measure-tti.test.js +0 -174
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ 'fabric.editor.codeBidiWarningLabel': string;
2
3
  'fabric.editor.captionPlaceholder': string;
3
4
  'fabric.editor.collapseNode': string;
4
5
  'fabric.editor.expandDefaultTitle': string;
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ 'fabric.editor.codeBidiWarningLabel': string;
2
3
  'fabric.editor.captionPlaceholder': string;
3
4
  'fabric.editor.collapseNode': string;
4
5
  'fabric.editor.expandDefaultTitle': string;
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ 'fabric.editor.codeBidiWarningLabel': string;
2
3
  'fabric.editor.captionPlaceholder': string;
3
4
  'fabric.editor.collapseNode': string;
4
5
  'fabric.editor.expandDefaultTitle': string;
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ 'fabric.editor.codeBidiWarningLabel': string;
2
3
  'fabric.editor.captionPlaceholder': string;
3
4
  'fabric.editor.collapseNode': string;
4
5
  'fabric.editor.expandDefaultTitle': string;
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ 'fabric.editor.codeBidiWarningLabel': string;
2
3
  'fabric.editor.captionPlaceholder': string;
3
4
  'fabric.editor.collapseNode': string;
4
5
  'fabric.editor.expandDefaultTitle': string;
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ 'fabric.editor.codeBidiWarningLabel': string;
2
3
  'fabric.editor.captionPlaceholder': string;
3
4
  'fabric.editor.collapseNode': string;
4
5
  'fabric.editor.expandDefaultTitle': string;
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ 'fabric.editor.codeBidiWarningLabel': string;
2
3
  'fabric.editor.captionPlaceholder': string;
3
4
  'fabric.editor.collapseNode': string;
4
5
  'fabric.editor.expandDefaultTitle': string;
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ 'fabric.editor.codeBidiWarningLabel': string;
2
3
  'fabric.editor.captionPlaceholder': string;
3
4
  'fabric.editor.collapseNode': string;
4
5
  'fabric.editor.expandDefaultTitle': string;
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ 'fabric.editor.codeBidiWarningLabel': string;
2
3
  'fabric.editor.captionPlaceholder': string;
3
4
  'fabric.editor.collapseNode': string;
4
5
  'fabric.editor.expandDefaultTitle': string;
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ 'fabric.editor.codeBidiWarningLabel': string;
2
3
  'fabric.editor.captionPlaceholder': string;
3
4
  'fabric.editor.collapseNode': string;
4
5
  'fabric.editor.expandDefaultTitle': string;
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ 'fabric.editor.codeBidiWarningLabel': string;
2
3
  'fabric.editor.captionPlaceholder': string;
3
4
  'fabric.editor.collapseNode': string;
4
5
  'fabric.editor.expandDefaultTitle': string;
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ 'fabric.editor.codeBidiWarningLabel': string;
2
3
  'fabric.editor.captionPlaceholder': string;
3
4
  'fabric.editor.collapseNode': string;
4
5
  'fabric.editor.expandDefaultTitle': string;
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ 'fabric.editor.codeBidiWarningLabel': string;
2
3
  'fabric.editor.captionPlaceholder': string;
3
4
  'fabric.editor.collapseNode': string;
4
5
  'fabric.editor.expandDefaultTitle': string;
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ 'fabric.editor.codeBidiWarningLabel': string;
2
3
  'fabric.editor.captionPlaceholder': string;
3
4
  'fabric.editor.collapseNode': string;
4
5
  'fabric.editor.expandDefaultTitle': string;
@@ -1,4 +1,4 @@
1
- export { ADFTraversor, ErrorReporter, ZERO_WIDTH_SPACE, absoluteBreakoutWidth, browser, calcBreakoutWidth, breakoutConsts, calcTableColumnWidths, calcWideWidth, clearMeasure, compose, convertProsemirrorTableNodeToArrayOfRows, createCompareNodes, findAndTrackUnsupportedContentNodes, getAnalyticsAppearance, analyticsEventKey, getAnalyticsEventSeverity, getUnsupportedContentLevelData, UNSUPPORTED_CONTENT_LEVEL_SEVERITY_THRESHOLD_DEFAULTS, getExtensionLozengeData, getExtensionRenderer, getMarksByOrder, getModeFromTheme, getResponseEndTime, getValidContent, getValidDocument, getValidMark, getValidNode, getValidUnknownNode, hasMergedCell, isPastDate, isPerformanceAPIAvailable, isPerformanceObserverAvailable, isSameMark, isSubSupType, markOrder, measureRender, startMeasure, stopMeasure, measureTTI, getTTISeverity, TTI_SEVERITY_THRESHOLD_DEFAULTS, TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS, timestampToIsoFormat, timestampToString, timestampToTaskContext, timestampToUTCDate, todayTimestampInUTC, withImageLoader, canApplyAnnotationOnRange, getAnnotationIdsFromRange, SEVERITY, UNSUPPORTED_CONTENT_LEVEL_SEVERITY, shouldForceTracking, sniffUserBrowserExtensions, } from './utils';
1
+ export { ADFTraversor, ErrorReporter, ZERO_WIDTH_SPACE, absoluteBreakoutWidth, browser, calcBreakoutWidth, breakoutConsts, calcTableColumnWidths, calcWideWidth, clearMeasure, compose, convertProsemirrorTableNodeToArrayOfRows, createCompareNodes, findAndTrackUnsupportedContentNodes, getAnalyticsAppearance, analyticsEventKey, getAnalyticsEventSeverity, getUnsupportedContentLevelData, UNSUPPORTED_CONTENT_LEVEL_SEVERITY_THRESHOLD_DEFAULTS, getExtensionLozengeData, getExtensionRenderer, getMarksByOrder, getModeFromTheme, getResponseEndTime, getValidContent, getValidDocument, getValidMark, getValidNode, getValidUnknownNode, hasMergedCell, isPastDate, isPerformanceAPIAvailable, isPerformanceObserverAvailable, isSameMark, isSubSupType, markOrder, measureRender, startMeasure, stopMeasure, measureTTI, getTTISeverity, TTI_SEVERITY_THRESHOLD_DEFAULTS, TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS, timestampToIsoFormat, timestampToString, timestampToTaskContext, timestampToUTCDate, todayTimestampInUTC, withImageLoader, canApplyAnnotationOnRange, getAnnotationIdsFromRange, SEVERITY, UNSUPPORTED_CONTENT_LEVEL_SEVERITY, shouldForceTracking, sniffUserBrowserExtensions, RenderCountProfiler, } from './utils';
2
2
  export type { ADDoc, ADFStage, ADFStages, ADMark, ADMarkSimple, ADNode, Date, Diff, ErrorReportingHandler, ImageLoaderProps, ImageLoaderState, ImageStatus, Params, UnsupportedContentPayload, UnsupportedContentTooltipPayload, UnsupportedContentLevelsTracking, UserBrowserExtensionResults, } from './utils';
3
3
  export { SortOrder, AnnotationUpdateEmitter, AnnotationUpdateEvent, } from './types';
4
4
  export type { Transformer, AnnotationState, AnnotationProviders, AnnotationUpdateEventPayloads, InlineCommentSelectionComponentProps, InlineCommentViewComponentProps, InlineCommentAnnotationProvider, OnAnnotationClickPayload, AnnotationByMatches, AnnotationActionResult, } from './types';
@@ -10,8 +10,12 @@ export type { ContextIdentifierProvider } from './provider-factory/context-ident
10
10
  export { ProviderFactory, WithProviders } from './provider-factory';
11
11
  export type { Providers, MediaProvider, SearchProvider, LinkContentType, QuickSearchResult, } from './provider-factory';
12
12
  export { combineProviders } from './provider-helpers';
13
- export { TableSharedCssClassName, blockMarksSharedStyles, blockquoteSharedStyles, calcTableWidth, codeMarkSharedStyles, columnLayoutSharedStyle, dateSharedStyle, DateSharedCssClassName, annotationSharedStyles, AnnotationSharedCSSByState, AnnotationSharedClassNames, headingsSharedStyles, indentationSharedStyles, inlineNodeSharedStyle, linkSharedStyle, listsSharedStyles, richMediaClassName, mediaSingleSharedStyle, getPanelTypeBackground, panelSharedStyles, PanelSharedCssClassName, PanelSharedSelectors, paragraphSharedStyles, ruleSharedStyles, shadowSharedStyle, tableCellBorderWidth, tableCellMinWidth, tableCellPadding, tableMarginBottom, tableMarginSides, tableMarginTop, tableNewColumnMinWidth, tableResizeHandleWidth, tableSharedStyle, tasksAndDecisionsStyles, TaskDecisionSharedCssClassName, whitespaceSharedStyles, MentionSharedCssClassName, EmojiSharedCssClassName, StatusSharedCssClassName, smartCardSharedStyles, SmartCardSharedCssClassName, } from './styles';
14
- export { BaseTheme, Caption, ClearNextSiblingMarginTop, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH, Emoji, ErrorMessage, ExpandIconWrapper, ExpandLayoutWrapper, HelperMessage, MediaSingle, MediaSingleDimensionHelper, Mention, Popup, UnsupportedBlock, UnsupportedInline, ValidMessage, WidthConsumer, WidthProvider, WithCreateAnalyticsEvent, calcColumnsFromPx, calcPctFromPx, calcPxFromColumns, calcPxFromPct, expandMessages, findOverflowScrollParent, getBreakpoint, layoutSupportsWidth, mapBreakpointToLayoutMaxWidth, overflowShadow, shadowClassNames, sharedExpandStyles, snapToGrid, withOuterListeners, MediaLink, wrappedLayouts, shouldAddDefaultWrappedWidth, } from './ui';
13
+ export { TableSharedCssClassName, blockMarksSharedStyles, blockquoteSharedStyles, calcTableWidth, codeMarkSharedStyles, columnLayoutSharedStyle, dateSharedStyle, DateSharedCssClassName, annotationSharedStyles, AnnotationSharedCSSByState, AnnotationSharedClassNames, headingsSharedStyles, indentationSharedStyles, inlineNodeSharedStyle, linkSharedStyle, listsSharedStyles, richMediaClassName, mediaSingleSharedStyle, getPanelTypeBackground, getPanelBackgroundDarkModeColors, panelSharedStyles, PanelSharedCssClassName, PanelSharedSelectors, paragraphSharedStyles, ruleSharedStyles, shadowSharedStyle, tableCellBorderWidth, tableCellMinWidth, tableCellPadding, tableMarginBottom, tableMarginSides, tableMarginTop, tableNewColumnMinWidth, tableResizeHandleWidth, tableSharedStyle, tasksAndDecisionsStyles, TaskDecisionSharedCssClassName, whitespaceSharedStyles, MentionSharedCssClassName, //exported from ./src/mention.ts
14
+ EmojiSharedCssClassName, //exported from ./src/emoji.ts
15
+ StatusSharedCssClassName, smartCardSharedStyles, SmartCardSharedCssClassName, } from './styles';
16
+ export { BaseTheme, Caption, ClearNextSiblingMarginTop, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH, Emoji, //exported from ./src/emoji.ts
17
+ ErrorMessage, ExpandIconWrapper, ExpandLayoutWrapper, HelperMessage, MediaSingle, MediaSingleDimensionHelper, Mention, //exported from ./src/mention.ts
18
+ Popup, UnsupportedBlock, UnsupportedInline, ValidMessage, WidthConsumer, WidthProvider, WithCreateAnalyticsEvent, calcColumnsFromPx, calcPctFromPx, calcPxFromColumns, calcPxFromPct, expandMessages, findOverflowScrollParent, getBreakpoint, layoutSupportsWidth, mapBreakpointToLayoutMaxWidth, overflowShadow, shadowClassNames, sharedExpandStyles, snapToGrid, withOuterListeners, MediaLink, wrappedLayouts, shouldAddDefaultWrappedWidth, } from './ui';
15
19
  export type { CardEventClickHandler, CardSurroundings, EmojiProps, EventHandlers, LinkEventClickHandler, MediaSingleDimensionHelperProps, MediaSingleProps, MentionEventHandler, MentionEventHandlers, OverflowShadowOptions, OverflowShadowProps, OverflowShadowState, PopupPosition, PopupProps, SmartCardEventClickHandler, WidthConsumerContext, ExpandStyleProps, } from './ui';
16
20
  export { linkMessages } from './messages/link';
17
21
  export { validateADFEntity, validationErrorHandler, } from './utils/validate-using-spec';
@@ -0,0 +1,2 @@
1
+ export { default as Mention } from './ui/Mention';
2
+ export { MentionSharedCssClassName } from './styles/shared/mention';
@@ -0,0 +1,11 @@
1
+ export declare const codeBidiWarningMessages: {
2
+ /**
3
+ * Message taken from
4
+ * https://hello.atlassian.net/wiki/spaces/~tswan/pages/1366555782/PSHELP-2943+Investigate+Trojan+Source+Attack+Vulnerability+design
5
+ */
6
+ label: {
7
+ id: string;
8
+ defaultMessage: string;
9
+ description: string;
10
+ };
11
+ };
@@ -1,2 +1,3 @@
1
+ export { codeBidiWarningMessages } from './codeBidiWarning';
1
2
  export { linkMessages } from './link';
2
3
  export { unsupportedContentMessages } from './unsupportedContent';
@@ -10,3 +10,4 @@ export type { CardProvider, CardAppearance, CardAdf, } from './provider-factory/
10
10
  export type { QuickInsertItem, QuickInsertItemId, QuickInsertActionInsert, QuickInsertProvider, } from './provider-factory/quick-insert-provider';
11
11
  export type { TypeAheadItem, TypeAheadItemRenderProps, } from './types/type-ahead';
12
12
  export type { AutoformatReplacement, AutoformattingProvider, AutoformatHandler, AutoformatRuleset, } from './provider-factory/autoformatting-provider';
13
+ export type { ContextIdentifierProvider } from './provider-factory/context-identifier-provider';
@@ -4,7 +4,7 @@ export { columnLayoutSharedStyle } from './shared/column-layout';
4
4
  export { mediaSingleSharedStyle, richMediaClassName, } from './shared/media-single';
5
5
  export { blockquoteSharedStyles } from './shared/blockquote';
6
6
  export { headingsSharedStyles } from './shared/headings';
7
- export { getPanelTypeBackground, panelSharedStyles, PanelSharedCssClassName, PanelSharedSelectors, } from './shared/panel';
7
+ export { getPanelTypeBackground, panelSharedStyles, PanelSharedCssClassName, PanelSharedSelectors, getPanelBackgroundDarkModeColors, } from './shared/panel';
8
8
  export { ruleSharedStyles } from './shared/rule';
9
9
  export { whitespaceSharedStyles } from './shared/whitespace';
10
10
  export { paragraphSharedStyles } from './shared/paragraph';
@@ -1,5 +1,7 @@
1
1
  import { PanelType } from '@atlaskit/adf-schema';
2
2
  import { ThemeProps } from '@atlaskit/theme/types';
3
+ export declare const getPanelBackgroundDarkModeColors: string;
4
+ export declare function getPanelDarkModeCSS(colorName: string, colorValue: string): string;
3
5
  export declare const PanelSharedCssClassName: {
4
6
  prefix: string;
5
7
  content: string;
@@ -15,7 +17,7 @@ export declare const PanelSharedSelectors: {
15
17
  removeButton: string;
16
18
  colorPalette: string;
17
19
  selectedColor: string;
18
- hideEmojiIcon: string;
20
+ removeEmojiIcon: string;
19
21
  emojiIcon: string;
20
22
  selectedEmoji: string;
21
23
  title: string;
@@ -0,0 +1,33 @@
1
+ import { EditorView } from 'prosemirror-view';
2
+ import { UFOExperience } from '@atlaskit/ufo';
3
+ import type { CustomData, ExperienceConfig } from '@atlaskit/ufo/types';
4
+ export declare const experienceConfig: ExperienceConfig;
5
+ export declare enum EditorExperience {
6
+ loadEditor = "load",
7
+ typing = "type",
8
+ interaction = "interact",
9
+ editSession = "editSession"
10
+ }
11
+ export declare const RELIABILITY_INTERVAL = 30000;
12
+ declare type TypeOfEditorExperience = typeof EditorExperience;
13
+ declare type ValueOfEditorExperience = TypeOfEditorExperience[keyof TypeOfEditorExperience];
14
+ export declare class ExperienceStore {
15
+ private static stores;
16
+ private experiences;
17
+ private constructor();
18
+ static getInstance(view: EditorView, options?: {
19
+ forceNewInstance?: boolean;
20
+ }): ExperienceStore;
21
+ get(experienceId: string): UFOExperience | undefined;
22
+ getActive(experienceId: string): UFOExperience | undefined;
23
+ getAll(): UFOExperience[];
24
+ start(experienceId: ValueOfEditorExperience, startTime?: number): void;
25
+ addMetadata(experienceId: string, metadata: CustomData): void;
26
+ mark(experienceId: string, mark: string, value: number): void;
27
+ success(experienceId: string, metadata?: CustomData): Promise<boolean | null> | undefined;
28
+ fail(experienceId: string, metadata?: CustomData): void;
29
+ abort(experienceId: string, metadata?: CustomData): void;
30
+ abortAll(metadata?: CustomData): void;
31
+ failAll(metadata?: CustomData): void;
32
+ }
33
+ export {};
@@ -0,0 +1 @@
1
+ export { ExperienceStore, EditorExperience, RELIABILITY_INTERVAL, } from './experience-store';
@@ -30,3 +30,5 @@ export { shouldForceTracking } from './should-force-tracking';
30
30
  export { getModeFromTheme } from './getModeFromTheme';
31
31
  export type { UserBrowserExtensionResults } from './browser-extensions';
32
32
  export { sniffUserBrowserExtensions } from './browser-extensions';
33
+ export { RenderCountProfiler } from './profiler/render-count';
34
+ export { validateADFEntity, validationErrorHandler, } from './validate-using-spec';
@@ -0,0 +1,50 @@
1
+ export declare const PROFILER_KEY = "__editorRenderCountProfiler";
2
+ interface ComponentInstanceRenderCounter {
3
+ instanceId: string;
4
+ count: number;
5
+ }
6
+ declare type ProfilerData = {
7
+ enabled: boolean;
8
+ components?: {
9
+ [componentId: string]: {
10
+ [instanceId: string]: {
11
+ count: number;
12
+ };
13
+ };
14
+ };
15
+ };
16
+ declare type RenderCountProfilerInstanceParams = {
17
+ store: Object;
18
+ };
19
+ export declare class RenderCountProfiler {
20
+ /**
21
+ * The singleton/cached instance of RenderCountProfiler that will be shared
22
+ * betweenRenderCountProfiler.getInstance() calls
23
+ */
24
+ private static instance;
25
+ private store;
26
+ private constructor();
27
+ /**
28
+ * Returns the singleton/cached instance of RenderCountProfiler that
29
+ * currently exists. If it hasn't been instantiated yet, the singleton
30
+ * instance will be created using the given params. Returns the latest
31
+ * singleton/instance.
32
+ */
33
+ static getInstance(params: RenderCountProfilerInstanceParams): RenderCountProfiler;
34
+ getData(profilerKey: typeof PROFILER_KEY): ProfilerData | void;
35
+ enable(): void;
36
+ remove(): void;
37
+ isEnabled(): boolean;
38
+ setRenderCount({ componentId, renderCount, instanceId, }: {
39
+ componentId: string;
40
+ renderCount: number;
41
+ instanceId: string;
42
+ }): void;
43
+ getInstanceRenderCounters({ componentId, }: {
44
+ componentId: string;
45
+ }): ComponentInstanceRenderCounter[];
46
+ getRenderCount({ componentId }: {
47
+ componentId: string;
48
+ }): number;
49
+ }
50
+ export {};
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/emoji",
3
+ "main": "../dist/cjs/emoji.js",
4
+ "module": "../dist/esm/emoji.js",
5
+ "module:es2019": "../dist/es2019/emoji.js",
6
+ "types": "../dist/types/emoji.d.ts"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/mention",
3
+ "main": "../dist/cjs/mention.js",
4
+ "module": "../dist/esm/mention.js",
5
+ "module:es2019": "../dist/es2019/mention.js",
6
+ "types": "../dist/types/mention.d.ts"
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "60.0.0",
3
+ "version": "61.0.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,29 +30,38 @@
30
30
  "./validator": "./src/validator.ts",
31
31
  "./in-product": "./src/in-product.ts",
32
32
  "./cypress-config": "./src/cypress-config.ts",
33
- "./type-ahead": "./src/type-ahead/index.ts"
33
+ "./type-ahead": "./src/type-ahead/index.ts",
34
+ "./ufo": "./src/ufo/index.ts",
35
+ "./types": "./src/types/index.ts",
36
+ "./ui": "./src/ui/index.tsx",
37
+ "./utils": "./src/utils/index.ts",
38
+ "./card": "./src/card/index.ts",
39
+ "./emoji": "./src/emoji.ts",
40
+ "./mention": "./src/mention.ts",
41
+ "./provider-helpers": "./src/provider-helpers/index.ts"
34
42
  },
35
43
  "dependencies": {
36
44
  "@atlaskit/activity-provider": "^2.3.0",
37
- "@atlaskit/adf-schema": "^19.1.0",
38
- "@atlaskit/adf-utils": "^14.2.0",
45
+ "@atlaskit/adf-schema": "^20.0.0",
46
+ "@atlaskit/adf-utils": "^14.4.0",
39
47
  "@atlaskit/analytics-namespaced-context": "^6.3.0",
40
48
  "@atlaskit/analytics-next": "^8.2.0",
41
- "@atlaskit/code": "^14.1.0",
42
- "@atlaskit/editor-json-transformer": "^8.6.0",
43
- "@atlaskit/editor-shared-styles": "^1.5.0",
49
+ "@atlaskit/code": "^14.3.0",
50
+ "@atlaskit/editor-json-transformer": "^8.7.0",
51
+ "@atlaskit/editor-shared-styles": "^1.6.0",
44
52
  "@atlaskit/emoji": "^63.1.0",
45
- "@atlaskit/icon": "^21.8.0",
53
+ "@atlaskit/icon": "^21.9.0",
46
54
  "@atlaskit/in-product-testing": "^0.1.0",
47
- "@atlaskit/media-card": "^70.11.0",
48
- "@atlaskit/media-client": "^14.2.0",
55
+ "@atlaskit/media-card": "^72.1.0",
56
+ "@atlaskit/media-client": "^14.3.0",
49
57
  "@atlaskit/media-picker": "^58.1.0",
50
58
  "@atlaskit/mention": "^19.7.0",
51
- "@atlaskit/profilecard": "^15.0.0",
52
- "@atlaskit/smart-card": "^16.1.0",
59
+ "@atlaskit/profilecard": "^15.8.0",
60
+ "@atlaskit/smart-card": "^16.3.0",
53
61
  "@atlaskit/task-decision": "^17.2.0",
54
- "@atlaskit/theme": "^11.5.0",
55
- "@atlaskit/tooltip": "^17.4.0",
62
+ "@atlaskit/theme": "^12.0.0",
63
+ "@atlaskit/tooltip": "^17.5.0",
64
+ "@atlaskit/ufo": "^0.0.6",
56
65
  "@atlaskit/user-picker": "^7.3.0",
57
66
  "@atlaskit/width-detector": "^3.0.0",
58
67
  "@babel/runtime": "^7.0.0",
@@ -64,9 +73,10 @@
64
73
  "cypress-file-upload": "^5.0.2",
65
74
  "date-fns": "^2.17.0",
66
75
  "lodash": "^4.17.15",
67
- "prosemirror-model": "1.11.0",
68
- "prosemirror-state": "1.3.3",
69
- "prosemirror-transform": "1.2.8",
76
+ "prosemirror-model": "1.14.3",
77
+ "prosemirror-state": "1.3.4",
78
+ "prosemirror-transform": "1.3.2",
79
+ "prosemirror-view": "1.23.1",
70
80
  "raf-schd": "^2.1.0",
71
81
  "react-loadable": "^5.1.0"
72
82
  },
@@ -78,10 +88,10 @@
78
88
  "styled-components": "^3.2.6"
79
89
  },
80
90
  "devDependencies": {
81
- "@atlaskit/editor-json-transformer": "^8.6.0",
82
- "@atlaskit/editor-test-helpers": "^15.4.0",
91
+ "@atlaskit/editor-json-transformer": "^8.7.0",
92
+ "@atlaskit/editor-test-helpers": "^15.6.0",
83
93
  "@atlaskit/media-core": "^32.2.0",
84
- "@atlaskit/util-data-test": "^15.0.0",
94
+ "@atlaskit/util-data-test": "^17.0.0",
85
95
  "@atlaskit/visual-regression": "*",
86
96
  "@atlaskit/webdriver-runner": "*",
87
97
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
@@ -89,7 +99,6 @@
89
99
  "cypress-file-upload": "^5.0.2",
90
100
  "enzyme": "^3.10.0",
91
101
  "local-cypress": "^1.2.1",
92
- "prosemirror-view": "1.15.4",
93
102
  "raf-stub": "^2.0.1",
94
103
  "react": "^16.8.0",
95
104
  "react-test-renderer": "^16.8.0",
@@ -102,6 +111,9 @@
102
111
  "file-level"
103
112
  ],
104
113
  "import-structure": "atlassian-conventions"
114
+ },
115
+ "@repo/internal": {
116
+ "deprecation": "no-deprecated-imports"
105
117
  }
106
118
  },
107
119
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/provider-helpers",
3
+ "main": "../dist/cjs/provider-helpers/index.js",
4
+ "module": "../dist/esm/provider-helpers/index.js",
5
+ "module:es2019": "../dist/es2019/provider-helpers/index.js",
6
+ "types": "../dist/types/provider-helpers/index.d.ts"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/types",
3
+ "main": "../dist/cjs/types/index.js",
4
+ "module": "../dist/esm/types/index.js",
5
+ "module:es2019": "../dist/es2019/types/index.js",
6
+ "types": "../dist/types/types/index.d.ts"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/ufo",
3
+ "main": "../dist/cjs/ufo/index.js",
4
+ "module": "../dist/esm/ufo/index.js",
5
+ "module:es2019": "../dist/es2019/ufo/index.js",
6
+ "types": "../dist/types/ufo/index.d.ts"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/ui",
3
+ "main": "../dist/cjs/ui/index.js",
4
+ "module": "../dist/esm/ui/index.js",
5
+ "module:es2019": "../dist/es2019/ui/index.js",
6
+ "types": "../dist/types/ui/index.d.ts"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/utils",
3
+ "main": "../dist/cjs/utils/index.js",
4
+ "module": "../dist/esm/utils/index.js",
5
+ "module:es2019": "../dist/es2019/utils/index.js",
6
+ "types": "../dist/types/utils/index.d.ts"
7
+ }
@@ -1,82 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- var _react = _interopRequireDefault(require("react"));
6
-
7
- var _react2 = require("@testing-library/react");
8
-
9
- var _reactIntl = require("react-intl");
10
-
11
- var _colors = require("@atlaskit/theme/colors");
12
-
13
- var _messages = require("./messages");
14
-
15
- var _index = _interopRequireDefault(require("./index"));
16
-
17
- var renderWithIntl = function renderWithIntl(component) {
18
- return (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_reactIntl.IntlProvider, {
19
- locale: "en"
20
- }, component));
21
- };
22
-
23
- describe('CaptionComponent', function () {
24
- it('should show a placeholder by default', function () {
25
- var _renderWithIntl = renderWithIntl( /*#__PURE__*/_react.default.createElement(_index.default, null)),
26
- getByText = _renderWithIntl.getByText;
27
-
28
- expect(getByText(_messages.messages.placeholder.defaultMessage)).not.toBeNull();
29
- });
30
- it('should have the placeholder colour as N200', function () {
31
- var _renderWithIntl2 = renderWithIntl( /*#__PURE__*/_react.default.createElement(_index.default, null)),
32
- getByText = _renderWithIntl2.getByText;
33
-
34
- expect(getByText(_messages.messages.placeholder.defaultMessage)).toHaveStyle("color: ".concat(_colors.N200));
35
- });
36
- it('should have the colour N400', function () {
37
- var _renderWithIntl3 = renderWithIntl( /*#__PURE__*/_react.default.createElement(_index.default, null)),
38
- container = _renderWithIntl3.container;
39
-
40
- expect(container.firstChild).toHaveStyle("color: ".concat(_colors.N400));
41
- });
42
- it('should have centered text', function () {
43
- var _renderWithIntl4 = renderWithIntl( /*#__PURE__*/_react.default.createElement(_index.default, null)),
44
- container = _renderWithIntl4.container;
45
-
46
- expect(container.firstChild).toHaveStyle("text-align: center");
47
- });
48
- it("shouldn't show the placeholder when selected", function () {
49
- var _renderWithIntl5 = renderWithIntl( /*#__PURE__*/_react.default.createElement(_index.default, {
50
- selected: true
51
- })),
52
- queryByText = _renderWithIntl5.queryByText;
53
-
54
- expect(queryByText(_messages.messages.placeholder.defaultMessage)).toBeNull();
55
- });
56
- it("shouldn't show the placeholder if caption has content", function () {
57
- var _renderWithIntl6 = renderWithIntl( /*#__PURE__*/_react.default.createElement(_index.default, {
58
- hasContent: true
59
- })),
60
- queryByText = _renderWithIntl6.queryByText;
61
-
62
- expect(queryByText(_messages.messages.placeholder.defaultMessage)).toBeNull();
63
- });
64
- it('should have data-renderer-start-pos if provided', function () {
65
- var _renderWithIntl7 = renderWithIntl( /*#__PURE__*/_react.default.createElement(_index.default, {
66
- dataAttributes: {
67
- 'data-renderer-start-pos': 5
68
- }
69
- })),
70
- getByTestId = _renderWithIntl7.getByTestId;
71
-
72
- var caption = getByTestId('media-caption');
73
- expect(caption.getAttribute('data-renderer-start-pos')).toEqual('5');
74
- });
75
- it('should have data-media-caption', function () {
76
- var _renderWithIntl8 = renderWithIntl( /*#__PURE__*/_react.default.createElement(_index.default, null)),
77
- getByTestId = _renderWithIntl8.getByTestId;
78
-
79
- var caption = getByTestId('media-caption');
80
- expect(caption.getAttribute('data-media-caption')).toEqual('true');
81
- });
82
- });