@atlaskit/editor-core 165.0.0 → 166.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 (181) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/cjs/actions/index.js +9 -0
  3. package/dist/cjs/create-editor/ReactEditorView.js +14 -6
  4. package/dist/cjs/create-editor/create-plugins-list.js +1 -2
  5. package/dist/cjs/editor.js +13 -0
  6. package/dist/cjs/event-dispatcher/index.js +9 -0
  7. package/dist/cjs/nodeviews/ReactNodeView.js +1 -11
  8. package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
  9. package/dist/cjs/plugins/analytics/types/enums.js +1 -0
  10. package/dist/cjs/plugins/base/pm-plugins/frozen-editor.js +128 -79
  11. package/dist/cjs/plugins/base/utils/input-latency-tracking.js +157 -0
  12. package/dist/cjs/plugins/card/styles.js +3 -1
  13. package/dist/cjs/plugins/code-block/styles.js +6 -4
  14. package/dist/cjs/plugins/collab-edit/plugin-state.js +23 -5
  15. package/dist/cjs/plugins/date/styles.js +3 -1
  16. package/dist/cjs/plugins/emoji/index.js +30 -34
  17. package/dist/cjs/plugins/emoji/nodeviews/emoji.js +12 -66
  18. package/dist/cjs/plugins/emoji/styles.js +3 -17
  19. package/dist/cjs/plugins/expand/ui/styles.js +2 -2
  20. package/dist/cjs/plugins/extension/ui/styles.js +3 -1
  21. package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
  22. package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +1 -9
  23. package/dist/cjs/plugins/hyperlink/pm-plugins/keymap.js +1 -9
  24. package/dist/cjs/plugins/layout/styles.js +3 -1
  25. package/dist/cjs/plugins/list/commands/indent-list.js +5 -1
  26. package/dist/cjs/plugins/list/commands/outdent-list.js +5 -1
  27. package/dist/cjs/plugins/list/transforms.js +11 -3
  28. package/dist/cjs/plugins/media/styles.js +3 -1
  29. package/dist/cjs/plugins/mentions/index.js +10 -14
  30. package/dist/cjs/plugins/mentions/nodeviews/mention.js +15 -67
  31. package/dist/cjs/plugins/mentions/pm-plugins/main.js +19 -10
  32. package/dist/cjs/plugins/mentions/type-ahead/index.js +7 -2
  33. package/dist/cjs/plugins/panel/styles.js +3 -1
  34. package/dist/cjs/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
  35. package/dist/cjs/plugins/rule/styles.js +3 -1
  36. package/dist/cjs/plugins/selection/utils.js +39 -23
  37. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +24 -0
  38. package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
  39. package/dist/cjs/plugins/table/ui/consts.js +6 -4
  40. package/dist/cjs/plugins/tasks-and-decisions/styles.js +3 -1
  41. package/dist/cjs/plugins/type-ahead/index.js +6 -2
  42. package/dist/cjs/plugins/unsupported-content/index.js +22 -10
  43. package/dist/cjs/plugins/unsupported-content/styles.js +4 -2
  44. package/dist/cjs/plugins/unsupported-content/unsupported-inline-node-view.js +21 -0
  45. package/dist/cjs/ui/Appearance/Chromeless.js +6 -3
  46. package/dist/cjs/ui/Appearance/Comment/Comment.js +6 -4
  47. package/dist/cjs/ui/ChromeCollapsed/styles.js +3 -1
  48. package/dist/cjs/ui/ContentStyles/index.js +2 -2
  49. package/dist/cjs/version-wrapper.js +1 -1
  50. package/dist/cjs/version.json +1 -1
  51. package/dist/es2019/actions/index.js +12 -1
  52. package/dist/es2019/create-editor/ReactEditorView.js +14 -6
  53. package/dist/es2019/create-editor/create-plugins-list.js +1 -2
  54. package/dist/es2019/editor.js +14 -0
  55. package/dist/es2019/event-dispatcher/index.js +8 -0
  56. package/dist/es2019/nodeviews/ReactNodeView.js +1 -10
  57. package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +9 -0
  58. package/dist/es2019/plugins/analytics/types/enums.js +1 -0
  59. package/dist/es2019/plugins/base/pm-plugins/frozen-editor.js +138 -80
  60. package/dist/es2019/plugins/base/utils/input-latency-tracking.js +128 -0
  61. package/dist/es2019/plugins/card/styles.js +9 -5
  62. package/dist/es2019/plugins/code-block/styles.js +11 -8
  63. package/dist/es2019/plugins/collab-edit/plugin-state.js +23 -8
  64. package/dist/es2019/plugins/date/styles.js +3 -1
  65. package/dist/es2019/plugins/emoji/index.js +16 -21
  66. package/dist/es2019/plugins/emoji/nodeviews/emoji.js +12 -31
  67. package/dist/es2019/plugins/emoji/styles.js +1 -82
  68. package/dist/es2019/plugins/expand/ui/styles.js +2 -2
  69. package/dist/es2019/plugins/extension/ui/styles.js +4 -2
  70. package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
  71. package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +1 -8
  72. package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +1 -8
  73. package/dist/es2019/plugins/layout/styles.js +3 -2
  74. package/dist/es2019/plugins/list/commands/indent-list.js +4 -1
  75. package/dist/es2019/plugins/list/commands/outdent-list.js +4 -1
  76. package/dist/es2019/plugins/list/transforms.js +9 -4
  77. package/dist/es2019/plugins/media/styles.js +9 -7
  78. package/dist/es2019/plugins/mentions/index.js +1 -6
  79. package/dist/es2019/plugins/mentions/nodeviews/mention.js +16 -35
  80. package/dist/es2019/plugins/mentions/pm-plugins/main.js +18 -10
  81. package/dist/es2019/plugins/mentions/type-ahead/index.js +7 -2
  82. package/dist/es2019/plugins/panel/styles.js +5 -4
  83. package/dist/es2019/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
  84. package/dist/es2019/plugins/rule/styles.js +2 -1
  85. package/dist/es2019/plugins/selection/utils.js +35 -20
  86. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +22 -0
  87. package/dist/es2019/plugins/table/ui/common-styles.js +4 -0
  88. package/dist/es2019/plugins/table/ui/consts.js +5 -4
  89. package/dist/es2019/plugins/tasks-and-decisions/styles.js +4 -2
  90. package/dist/es2019/plugins/type-ahead/index.js +5 -1
  91. package/dist/es2019/plugins/unsupported-content/index.js +23 -12
  92. package/dist/es2019/plugins/unsupported-content/styles.js +5 -3
  93. package/dist/es2019/plugins/unsupported-content/unsupported-inline-node-view.js +7 -0
  94. package/dist/es2019/ui/Appearance/Chromeless.js +5 -2
  95. package/dist/es2019/ui/Appearance/Comment/Comment.js +5 -2
  96. package/dist/es2019/ui/ChromeCollapsed/styles.js +2 -1
  97. package/dist/es2019/ui/ContentStyles/index.js +3 -3
  98. package/dist/es2019/version-wrapper.js +1 -1
  99. package/dist/es2019/version.json +1 -1
  100. package/dist/esm/actions/index.js +8 -0
  101. package/dist/esm/create-editor/ReactEditorView.js +14 -6
  102. package/dist/esm/create-editor/create-plugins-list.js +1 -2
  103. package/dist/esm/editor.js +14 -0
  104. package/dist/esm/event-dispatcher/index.js +9 -0
  105. package/dist/esm/nodeviews/ReactNodeView.js +1 -10
  106. package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
  107. package/dist/esm/plugins/analytics/types/enums.js +1 -0
  108. package/dist/esm/plugins/base/pm-plugins/frozen-editor.js +128 -79
  109. package/dist/esm/plugins/base/utils/input-latency-tracking.js +149 -0
  110. package/dist/esm/plugins/card/styles.js +2 -1
  111. package/dist/esm/plugins/code-block/styles.js +5 -4
  112. package/dist/esm/plugins/collab-edit/plugin-state.js +21 -6
  113. package/dist/esm/plugins/date/styles.js +2 -1
  114. package/dist/esm/plugins/emoji/index.js +26 -29
  115. package/dist/esm/plugins/emoji/nodeviews/emoji.js +11 -56
  116. package/dist/esm/plugins/emoji/styles.js +3 -14
  117. package/dist/esm/plugins/expand/ui/styles.js +2 -2
  118. package/dist/esm/plugins/extension/ui/styles.js +2 -1
  119. package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
  120. package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +1 -8
  121. package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +1 -8
  122. package/dist/esm/plugins/layout/styles.js +2 -1
  123. package/dist/esm/plugins/list/commands/indent-list.js +4 -1
  124. package/dist/esm/plugins/list/commands/outdent-list.js +4 -1
  125. package/dist/esm/plugins/list/transforms.js +9 -4
  126. package/dist/esm/plugins/media/styles.js +2 -1
  127. package/dist/esm/plugins/mentions/index.js +10 -14
  128. package/dist/esm/plugins/mentions/nodeviews/mention.js +13 -58
  129. package/dist/esm/plugins/mentions/pm-plugins/main.js +18 -10
  130. package/dist/esm/plugins/mentions/type-ahead/index.js +7 -2
  131. package/dist/esm/plugins/panel/styles.js +2 -1
  132. package/dist/esm/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
  133. package/dist/esm/plugins/rule/styles.js +2 -1
  134. package/dist/esm/plugins/selection/utils.js +35 -20
  135. package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +23 -0
  136. package/dist/esm/plugins/table/ui/common-styles.js +1 -1
  137. package/dist/esm/plugins/table/ui/consts.js +5 -4
  138. package/dist/esm/plugins/tasks-and-decisions/styles.js +2 -1
  139. package/dist/esm/plugins/type-ahead/index.js +6 -2
  140. package/dist/esm/plugins/unsupported-content/index.js +21 -11
  141. package/dist/esm/plugins/unsupported-content/styles.js +3 -2
  142. package/dist/esm/plugins/unsupported-content/unsupported-inline-node-view.js +7 -0
  143. package/dist/esm/ui/Appearance/Chromeless.js +6 -3
  144. package/dist/esm/ui/Appearance/Comment/Comment.js +6 -4
  145. package/dist/esm/ui/ChromeCollapsed/styles.js +2 -1
  146. package/dist/esm/ui/ContentStyles/index.js +3 -3
  147. package/dist/esm/version-wrapper.js +1 -1
  148. package/dist/esm/version.json +1 -1
  149. package/dist/types/actions/index.d.ts +3 -1
  150. package/dist/types/editor.d.ts +3 -0
  151. package/dist/types/event-dispatcher/index.d.ts +1 -0
  152. package/dist/types/nodeviews/ReactNodeView.d.ts +1 -5
  153. package/dist/types/plugins/analytics/types/enums.d.ts +1 -0
  154. package/dist/types/plugins/analytics/types/events.d.ts +2 -2
  155. package/dist/types/plugins/analytics/types/general-events.d.ts +10 -1
  156. package/dist/types/plugins/base/utils/input-latency-tracking.d.ts +44 -0
  157. package/dist/types/plugins/collab-edit/plugin-state.d.ts +4 -0
  158. package/dist/types/plugins/emoji/index.d.ts +2 -6
  159. package/dist/types/plugins/emoji/nodeviews/emoji.d.ts +4 -14
  160. package/dist/types/plugins/emoji/styles.d.ts +0 -1
  161. package/dist/types/plugins/emoji/types.d.ts +0 -1
  162. package/dist/types/plugins/list/transforms.d.ts +10 -1
  163. package/dist/types/plugins/mentions/nodeviews/mention.d.ts +6 -14
  164. package/dist/types/plugins/mentions/pm-plugins/main.d.ts +2 -5
  165. package/dist/types/plugins/selection/utils.d.ts +7 -15
  166. package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +3 -0
  167. package/dist/types/plugins/table/ui/consts.d.ts +2 -2
  168. package/dist/types/plugins/type-ahead/types.d.ts +1 -0
  169. package/dist/types/plugins/unsupported-content/unsupported-inline-node-view.d.ts +11 -0
  170. package/dist/types/types/editor-appearance-component.d.ts +1 -0
  171. package/dist/types/types/editor-props.d.ts +1 -0
  172. package/dist/types/types/feature-flags.d.ts +0 -14
  173. package/dist/types/ui/Appearance/Chromeless.d.ts +1 -0
  174. package/dist/types/ui/Appearance/Comment/Comment.d.ts +1 -0
  175. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +4 -4
  176. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  177. package/package.json +22 -22
  178. package/dist/cjs/plugins/emoji/nodeviews/emoji-next.js +0 -250
  179. package/dist/es2019/plugins/emoji/nodeviews/emoji-next.js +0 -177
  180. package/dist/esm/plugins/emoji/nodeviews/emoji-next.js +0 -234
  181. package/dist/types/plugins/emoji/nodeviews/emoji-next.d.ts +0 -31
@@ -17,7 +17,9 @@ var _colors = require("@atlaskit/theme/colors");
17
17
 
18
18
  var _styles = require("@atlaskit/editor-common/styles");
19
19
 
20
+ var _tokens = require("@atlaskit/tokens");
21
+
20
22
  var _templateObject;
21
23
 
22
- var smartCardStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n max-width: calc(100% - 20px);\n vertical-align: top;\n word-break: break-all;\n\n .card {\n padding-left: 2px;\n padding-right: 2px;\n\n .", " > a:focus {\n ", "\n }\n }\n\n &.", "\n .", "\n > a {\n ", "\n }\n .", " > a {\n /* EDM-1717: box-shadow Safari fix start */\n z-index: 1;\n position: relative;\n /* EDM-1717: box-shadow Safari fix end */\n }\n\n &.danger {\n .", " > a {\n box-shadow: 0 0 0 1px ", ";\n /* EDM-1717: box-shadow Safari fix start */\n z-index: 2;\n /* EDM-1717: box-shadow Safari fix end */\n }\n }\n }\n\n .", " {\n .", " > div {\n cursor: pointer;\n &:hover {\n background-color: ", ";\n }\n }\n\n &.", "\n .", "\n > div {\n ", "\n }\n\n &.danger {\n .", " > div {\n box-shadow: 0 0 0 1px ", " !important;\n }\n }\n }\n\n .", " {\n .", " > div {\n cursor: pointer;\n &::after {\n transition: box-shadow 0s;\n }\n }\n &.", "\n .", "\n > div {\n ", "\n }\n\n &.", "\n .", "\n > div::after {\n ", "\n }\n\n &.danger {\n .media-card-frame::after {\n box-shadow: 0 0 0 1px ", " !important;\n background: ", " !important;\n }\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n background: ", ";\n }\n }\n }\n"])), _styles.SmartCardSharedCssClassName.INLINE_CARD_CONTAINER, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _editorSharedStyles.akEditorSelectedNodeClassName, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, _editorSharedStyles.akEditorDeleteBorder, _styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, _colors.N20, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, _editorSharedStyles.akEditorDeleteBorder, _styles.SmartCardSharedCssClassName.EMBED_CARD_CONTAINER, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _editorSharedStyles.akEditorSelectedNodeClassName, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _editorSharedStyles.akEditorDeleteBorder, _editorSharedStyles.akEditorDeleteBackground, _editorSharedStyles.akEditorDeleteBorder);
24
+ var smartCardStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n max-width: calc(100% - 20px);\n vertical-align: top;\n word-break: break-all;\n\n .card {\n padding-left: 2px;\n padding-right: 2px;\n\n .", " > a:focus {\n ", "\n }\n }\n\n &.", "\n .", "\n > a {\n ", "\n }\n .", " > a {\n /* EDM-1717: box-shadow Safari fix start */\n z-index: 1;\n position: relative;\n /* EDM-1717: box-shadow Safari fix end */\n }\n\n &.danger {\n .", " > a {\n box-shadow: 0 0 0 1px\n ", ";\n /* EDM-1717: box-shadow Safari fix start */\n z-index: 2;\n /* EDM-1717: box-shadow Safari fix end */\n }\n }\n }\n\n .", " {\n .", " > div {\n cursor: pointer;\n &:hover {\n background-color: ", ";\n }\n }\n\n &.", "\n .", "\n > div {\n ", "\n }\n\n &.danger {\n .", " > div {\n box-shadow: 0 0 0 1px\n ", " !important;\n }\n }\n }\n\n .", " {\n .", " > div {\n cursor: pointer;\n &::after {\n transition: box-shadow 0s;\n }\n }\n &.", "\n .", "\n > div {\n ", "\n }\n\n &.", "\n .", "\n > div::after {\n ", "\n }\n\n &.danger {\n .media-card-frame::after {\n box-shadow: 0 0 0 1px\n ", " !important;\n background: ", " !important;\n }\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n background: ", ";\n }\n }\n }\n"])), _styles.SmartCardSharedCssClassName.INLINE_CARD_CONTAINER, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _editorSharedStyles.akEditorSelectedNodeClassName, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _tokens.token)('color.border.danger', _editorSharedStyles.akEditorDeleteBorder), _styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, _colors.N20, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _tokens.token)('color.border.danger', _editorSharedStyles.akEditorDeleteBorder), _styles.SmartCardSharedCssClassName.EMBED_CARD_CONTAINER, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _editorSharedStyles.akEditorSelectedNodeClassName, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), (0, _tokens.token)('color.border.danger', _editorSharedStyles.akEditorDeleteBorder), (0, _tokens.token)('color.background.danger', _editorSharedStyles.akEditorDeleteBackground), (0, _tokens.token)('color.border.danger', _editorSharedStyles.akEditorDeleteBorder));
23
25
  exports.smartCardStyles = smartCardStyles;
@@ -19,6 +19,8 @@ var _constants = require("@atlaskit/theme/constants");
19
19
 
20
20
  var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
21
21
 
22
+ var _tokens = require("@atlaskit/tokens");
23
+
22
24
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
23
25
 
24
26
  var _classNames = require("./ui/class-names");
@@ -30,7 +32,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
30
32
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
31
33
 
32
34
  var highlightingCodeBlockStyles = function highlightingCodeBlockStyles(props) {
33
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror .code-block {\n position: relative;\n background-image: ", ";\n background-repeat: no-repeat;\n background-color: ", ";\n\n --ds--code--bg-color: transparent;\n\n background-attachment: local, scroll, scroll;\n background-size: 8px 100%, 8px 100%, 8px 100%;\n background-position: 100% 0, 100% 0, 0 0;\n font-family: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n counter-reset: line;\n display: flex;\n min-width: ", "px;\n cursor: pointer;\n overflow-x: auto;\n\n .", " {\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/develop/packages/design-system/code/src/themes/themeBuilder.ts#packages/design-system/code/src/themes/themeBuilder.ts-19:28 */\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", "px;\n color: ", ";\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n &::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n font-size: ", ";\n line-height: 1.5rem;\n color: ", ";\n }\n }\n }\n\n .", " {\n position: absolute;\n z-index: 2;\n width: 100%;\n height: 100%;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n overflow: hidden;\n tab-size: 4;\n\n & [data-ds--code--code-block] {\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n\n .", " {\n position: relative;\n z-index: 1;\n display: flex;\n flex: 1;\n\n > code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/218202daeaf527262c21841e6f88fa058d349ad4/packages/design-system/code/src/themes/themeBuilder.ts#lines-12:17 */\n font-size: ", ";\n line-height: 1.5rem;\n border-radius: ", "px;\n margin: ", "px;\n white-space: pre;\n }\n\n &[data-debounce='true'] {\n .", " {\n display: none;\n }\n }\n\n &:not([data-debounce='true']) {\n > code:not([data-language='plaintext']):not([data-language='none']):not([data-language='']) {\n color: transparent;\n caret-color: ", ";\n }\n }\n }\n }\n\n .ProseMirror li > .code-block {\n margin: 0;\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: rgba(255, 143, 115, 0.5);\n color: ", ";\n }\n\n .", " {\n background-color: rgba(255, 189, 173, 0.5);\n }\n }\n"])), (0, _editorSharedStyles.overflowShadow)({
35
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror .code-block {\n position: relative;\n background-image: ", ";\n background-repeat: no-repeat;\n background-color: ", ";\n\n --ds--code--bg-color: transparent;\n\n background-attachment: local, scroll, scroll;\n background-size: 8px 100%, 8px 100%, 8px 100%;\n background-position: 100% 0, 100% 0, 0 0;\n font-family: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n counter-reset: line;\n display: flex;\n min-width: ", "px;\n cursor: pointer;\n overflow-x: auto;\n\n .", " {\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/develop/packages/design-system/code/src/themes/themeBuilder.ts#packages/design-system/code/src/themes/themeBuilder.ts-19:28 */\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", "px;\n color: ", ";\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n &::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n font-size: ", ";\n line-height: 1.5rem;\n color: ", ";\n }\n }\n }\n\n .", " {\n position: absolute;\n z-index: 2;\n width: 100%;\n height: 100%;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n overflow: hidden;\n tab-size: 4;\n\n & [data-ds--code--code-block] {\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n\n .", " {\n position: relative;\n z-index: 1;\n display: flex;\n flex: 1;\n\n > code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/218202daeaf527262c21841e6f88fa058d349ad4/packages/design-system/code/src/themes/themeBuilder.ts#lines-12:17 */\n font-size: ", ";\n line-height: 1.5rem;\n border-radius: ", "px;\n margin: ", "px;\n white-space: pre;\n }\n\n &[data-debounce='true'] {\n .", " {\n display: none;\n }\n }\n\n &:not([data-debounce='true']) {\n > code:not([data-language='plaintext']):not([data-language='none']):not([data-language='']) {\n color: transparent;\n caret-color: ", ";\n }\n }\n }\n }\n\n .ProseMirror li > .code-block {\n margin: 0;\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px\n ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: rgba(255, 143, 115, 0.5);\n color: ", ";\n }\n\n .", " {\n background-color: rgba(255, 189, 173, 0.5);\n }\n }\n"])), (0, _editorSharedStyles.overflowShadow)({
34
36
  background: (0, _components.themed)({
35
37
  light: colors.N20,
36
38
  dark: colors.DN50
@@ -51,13 +53,13 @@ var highlightingCodeBlockStyles = function highlightingCodeBlockStyles(props) {
51
53
  })(props), _classNames.codeBlockClassNames.highlighting, (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), _classNames.codeBlockClassNames.content, (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _constants.borderRadius)(), (0, _constants.gridSize)(), _classNames.codeBlockClassNames.highlighting, (0, _components.themed)({
52
54
  light: colors.N800,
53
55
  dark: colors.DN500
54
- })(props), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, _classNames.codeBlockClassNames.gutter, colors.R75, _editorSharedStyles.akEditorDeleteIconColor, _classNames.codeBlockClassNames.content, _editorSharedStyles.akEditorDeleteBackground, _classNames.codeBlockClassNames.gutter, _editorSharedStyles.akEditorDeleteIconColor, _classNames.codeBlockClassNames.content);
56
+ })(props), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _editorSharedStyles.akEditorSelectedBorderSize, (0, _tokens.token)('color.border.danger', _editorSharedStyles.akEditorDeleteBorder), _classNames.codeBlockClassNames.gutter, colors.R75, (0, _tokens.token)('color.text.danger', _editorSharedStyles.akEditorDeleteIconColor), _classNames.codeBlockClassNames.content, (0, _tokens.token)('color.background.danger', _editorSharedStyles.akEditorDeleteBackground), _classNames.codeBlockClassNames.gutter, (0, _tokens.token)('color.text.danger', _editorSharedStyles.akEditorDeleteIconColor), _classNames.codeBlockClassNames.content);
55
57
  };
56
58
 
57
59
  exports.highlightingCodeBlockStyles = highlightingCodeBlockStyles;
58
60
 
59
61
  var codeBlockStyles = function codeBlockStyles(props) {
60
- return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror .code-block {\n position: relative;\n background-image: ", ";\n\n --ds--code--bg-color: transparent;\n\n background-repeat: no-repeat;\n background-color: ", ";\n background-attachment: local, scroll, scroll;\n background-size: 8px 100%, 8px 100%, 8px 100%;\n background-position: 100% 0, 100% 0, 0 0;\n font-family: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n counter-reset: line;\n display: flex;\n min-width: ", "px;\n cursor: pointer;\n overflow-x: auto;\n\n .", " {\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/develop/packages/design-system/code/src/themes/themeBuilder.ts#packages/design-system/code/src/themes/themeBuilder.ts-19:28 */\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", "px;\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n &::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n font-size: ", ";\n line-height: 1.5rem;\n color: ", ";\n }\n }\n }\n\n .", " {\n display: flex;\n flex: 1;\n\n code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/218202daeaf527262c21841e6f88fa058d349ad4/packages/design-system/code/src/themes/themeBuilder.ts#lines-12:17 */\n font-size: ", ";\n line-height: 1.5rem;\n color: ", ";\n border-radius: ", "px;\n margin: ", "px;\n white-space: pre;\n }\n }\n }\n\n .ProseMirror li > .code-block {\n margin: 0;\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: rgba(255, 143, 115, 0.5);\n color: ", ";\n }\n\n .", " {\n background-color: rgba(255, 189, 173, 0.5);\n }\n }\n"])), (0, _editorSharedStyles.overflowShadow)({
62
+ return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror .code-block {\n position: relative;\n background-image: ", ";\n\n --ds--code--bg-color: transparent;\n\n background-repeat: no-repeat;\n background-color: ", ";\n background-attachment: local, scroll, scroll;\n background-size: 8px 100%, 8px 100%, 8px 100%;\n background-position: 100% 0, 100% 0, 0 0;\n font-family: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n counter-reset: line;\n display: flex;\n min-width: ", "px;\n cursor: pointer;\n overflow-x: auto;\n\n .", " {\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/develop/packages/design-system/code/src/themes/themeBuilder.ts#packages/design-system/code/src/themes/themeBuilder.ts-19:28 */\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", "px;\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n &::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n font-size: ", ";\n line-height: 1.5rem;\n color: ", ";\n }\n }\n }\n\n .", " {\n display: flex;\n flex: 1;\n\n code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/218202daeaf527262c21841e6f88fa058d349ad4/packages/design-system/code/src/themes/themeBuilder.ts#lines-12:17 */\n font-size: ", ";\n line-height: 1.5rem;\n color: ", ";\n border-radius: ", "px;\n margin: ", "px;\n white-space: pre;\n }\n }\n }\n\n .ProseMirror li > .code-block {\n margin: 0;\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px\n ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: rgba(255, 143, 115, 0.5);\n color: ", ";\n }\n\n .", " {\n background-color: rgba(255, 189, 173, 0.5);\n }\n }\n"])), (0, _editorSharedStyles.overflowShadow)({
61
63
  background: (0, _components.themed)({
62
64
  light: colors.N20,
63
65
  dark: colors.DN50
@@ -75,7 +77,7 @@ var codeBlockStyles = function codeBlockStyles(props) {
75
77
  })(props), _classNames.codeBlockClassNames.content, (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _components.themed)({
76
78
  light: colors.N800,
77
79
  dark: colors.DN800
78
- })(props), (0, _constants.borderRadius)(), (0, _constants.gridSize)(), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, _classNames.codeBlockClassNames.gutter, colors.R75, _editorSharedStyles.akEditorDeleteIconColor, _classNames.codeBlockClassNames.content, _editorSharedStyles.akEditorDeleteBackground, _classNames.codeBlockClassNames.gutter, _editorSharedStyles.akEditorDeleteIconColor, _classNames.codeBlockClassNames.content);
80
+ })(props), (0, _constants.borderRadius)(), (0, _constants.gridSize)(), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _editorSharedStyles.akEditorSelectedBorderSize, (0, _tokens.token)('color.border.danger', _editorSharedStyles.akEditorDeleteBorder), _classNames.codeBlockClassNames.gutter, colors.R75, (0, _tokens.token)('color.text.danger', _editorSharedStyles.akEditorDeleteIconColor), _classNames.codeBlockClassNames.content, (0, _tokens.token)('color.background.danger', _editorSharedStyles.akEditorDeleteBackground), _classNames.codeBlockClassNames.gutter, (0, _tokens.token)('color.text.danger', _editorSharedStyles.akEditorDeleteIconColor), _classNames.codeBlockClassNames.content);
79
81
  };
80
82
 
81
83
  exports.codeBlockStyles = codeBlockStyles;
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.TELEPOINTER_DIM_CLASS = exports.PluginState = void 0;
8
+ exports.getValidPos = exports.TELEPOINTER_DIM_CLASS = exports.PluginState = void 0;
9
9
 
10
10
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
11
 
@@ -35,16 +35,24 @@ var TELEPOINTER_DIM_CLASS = 'telepointer-dim';
35
35
  exports.TELEPOINTER_DIM_CLASS = TELEPOINTER_DIM_CLASS;
36
36
 
37
37
  var getValidPos = function getValidPos(tr, pos) {
38
- var resolvedPos = tr.doc.resolve(pos);
38
+ var endOfDocPos = tr.doc.nodeSize - 2;
39
39
 
40
- var backwardSelection = _prosemirrorState.Selection.findFrom(resolvedPos, -1, true); // if there's no correct cursor position before the `pos`, we try to find it after the `pos`
40
+ if (pos <= endOfDocPos) {
41
+ var resolvedPos = tr.doc.resolve(pos);
41
42
 
43
+ var backwardSelection = _prosemirrorState.Selection.findFrom(resolvedPos, -1, true); // if there's no correct cursor position before the `pos`, we try to find it after the `pos`
42
44
 
43
- var forwardSelection = _prosemirrorState.Selection.findFrom(resolvedPos, 1, true);
44
45
 
45
- return backwardSelection ? backwardSelection.from : forwardSelection ? forwardSelection.from : pos;
46
+ var forwardSelection = _prosemirrorState.Selection.findFrom(resolvedPos, 1, true);
47
+
48
+ return backwardSelection ? backwardSelection.from : forwardSelection ? forwardSelection.from : pos;
49
+ }
50
+
51
+ return endOfDocPos;
46
52
  };
47
53
 
54
+ exports.getValidPos = getValidPos;
55
+
48
56
  var PluginState = /*#__PURE__*/function () {
49
57
  function PluginState(decorations, participants, sessionId) {
50
58
  var collabInitalised = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
@@ -135,11 +143,21 @@ var PluginState = /*#__PURE__*/function () {
135
143
  remove = remove.concat(oldPointers);
136
144
  }
137
145
 
146
+ var endOfDocPos = tr.doc.nodeSize - 2;
138
147
  var _telepointerData$sele = telepointerData.selection,
139
148
  anchor = _telepointerData$sele.anchor,
140
149
  head = _telepointerData$sele.head;
141
150
  var rawFrom = anchor < head ? anchor : head;
142
151
  var rawTo = anchor >= head ? anchor : head;
152
+
153
+ if (rawFrom > endOfDocPos) {
154
+ rawFrom = endOfDocPos;
155
+ }
156
+
157
+ if (rawTo > endOfDocPos) {
158
+ rawTo = endOfDocPos;
159
+ }
160
+
143
161
  var isSelection = rawTo - rawFrom > 0;
144
162
  var from = 1;
145
163
  var to = 1;
@@ -13,9 +13,11 @@ var _react = require("@emotion/react");
13
13
 
14
14
  var _styles = require("@atlaskit/editor-common/styles");
15
15
 
16
+ var _tokens = require("@atlaskit/tokens");
17
+
16
18
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
17
19
 
18
20
  var _templateObject;
19
21
 
20
- var dateStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n .", " {\n line-height: initial;\n cursor: pointer;\n }\n\n &.", " {\n .", " > span {\n ", "\n }\n }\n }\n\n .danger {\n .", ".", "\n .", "\n > span {\n box-shadow: 0 0 0 ", "px ", ";\n }\n }\n"])), _styles.DateSharedCssClassName.DATE_CONTAINER, _styles.DateSharedCssClassName.DATE_WRAPPER, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.DateSharedCssClassName.DATE_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _styles.DateSharedCssClassName.DATE_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.DateSharedCssClassName.DATE_WRAPPER, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder);
22
+ var dateStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n .", " {\n line-height: initial;\n cursor: pointer;\n }\n\n &.", " {\n .", " > span {\n ", "\n }\n }\n }\n\n .danger {\n .", ".", "\n .", "\n > span {\n box-shadow: 0 0 0 ", "px\n ", ";\n }\n }\n"])), _styles.DateSharedCssClassName.DATE_CONTAINER, _styles.DateSharedCssClassName.DATE_WRAPPER, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.DateSharedCssClassName.DATE_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _styles.DateSharedCssClassName.DATE_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.DateSharedCssClassName.DATE_WRAPPER, _editorSharedStyles.akEditorSelectedBorderSize, (0, _tokens.token)('color.border.danger', _editorSharedStyles.akEditorDeleteBorder));
21
23
  exports.dateStyles = dateStyles;
@@ -5,9 +5,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.defaultListLimit = exports.default = exports.ACTIONS = void 0;
9
- exports.emojiPluginFactory = emojiPluginFactory;
10
- exports.emojiToTypeaheadItem = exports.emojiPluginKey = void 0;
8
+ exports.ACTIONS = void 0;
9
+ exports.createEmojiPlugin = createEmojiPlugin;
10
+ exports.emojiToTypeaheadItem = exports.emojiPluginKey = exports.defaultListLimit = exports.default = void 0;
11
11
  exports.getEmojiPluginState = getEmojiPluginState;
12
12
  exports.memoize = memoize;
13
13
  exports.setProvider = void 0;
@@ -28,22 +28,20 @@ var _typeAhead = require("@atlaskit/editor-common/type-ahead");
28
28
 
29
29
  var _emoji2 = require("@atlaskit/emoji");
30
30
 
31
+ var _getInlineNodeViewProducer = require("../../nodeviews/getInlineNodeViewProducer");
32
+
31
33
  var _asciiInputRules = require("./pm-plugins/ascii-input-rules");
32
34
 
33
35
  var _analytics = require("../analytics");
34
36
 
35
37
  var _assets = require("../quick-insert/assets");
36
38
 
37
- var _emoji3 = _interopRequireDefault(require("./nodeviews/emoji"));
38
-
39
- var _emojiNext = _interopRequireDefault(require("./nodeviews/emoji-next"));
39
+ var _emoji3 = require("./nodeviews/emoji");
40
40
 
41
41
  var _EmojiContextProvider = require("./ui/EmojiContextProvider");
42
42
 
43
43
  var _messages = require("../insert-block/ui/ToolbarInsertBlock/messages");
44
44
 
45
- var _featureFlagsContext = require("../feature-flags-context");
46
-
47
45
  var _openTypeaheadAtCursor = require("../type-ahead/transforms/open-typeahead-at-cursor");
48
46
 
49
47
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -219,26 +217,22 @@ var emojiPlugin = function emojiPlugin(options) {
219
217
  pmPlugins: function pmPlugins() {
220
218
  return [{
221
219
  name: 'emoji',
222
- plugin: function plugin(_ref5) {
223
- var providerFactory = _ref5.providerFactory,
224
- dispatch = _ref5.dispatch,
225
- portalProviderAPI = _ref5.portalProviderAPI,
226
- eventDispatcher = _ref5.eventDispatcher;
227
- return emojiPluginFactory(dispatch, providerFactory, portalProviderAPI, eventDispatcher, options);
220
+ plugin: function plugin(pmPluginFactoryParams) {
221
+ return createEmojiPlugin(pmPluginFactoryParams);
228
222
  }
229
223
  }, {
230
224
  name: 'emojiAsciiInputRule',
231
- plugin: function plugin(_ref6) {
232
- var schema = _ref6.schema,
233
- providerFactory = _ref6.providerFactory,
234
- featureFlags = _ref6.featureFlags;
225
+ plugin: function plugin(_ref5) {
226
+ var schema = _ref5.schema,
227
+ providerFactory = _ref5.providerFactory,
228
+ featureFlags = _ref5.featureFlags;
235
229
  return (0, _asciiInputRules.inputRulePlugin)(schema, providerFactory, featureFlags);
236
230
  }
237
231
  }];
238
232
  },
239
233
  pluginsOptions: {
240
- quickInsert: function quickInsert(_ref7) {
241
- var formatMessage = _ref7.formatMessage;
234
+ quickInsert: function quickInsert(_ref6) {
235
+ var formatMessage = _ref6.formatMessage;
242
236
  return [{
243
237
  id: 'emoji',
244
238
  title: formatMessage(_messages.messages.emoji),
@@ -322,7 +316,7 @@ function getEmojiPluginState(state) {
322
316
  return emojiPluginKey.getState(state) || {};
323
317
  }
324
318
 
325
- function emojiPluginFactory(dispatch, providerFactory, portalProviderAPI, eventDispatcher, options) {
319
+ function createEmojiPlugin(pmPluginFactoryParams) {
326
320
  return new _safePlugin.SafePlugin({
327
321
  key: emojiPluginKey,
328
322
  state: {
@@ -330,12 +324,12 @@ function emojiPluginFactory(dispatch, providerFactory, portalProviderAPI, eventD
330
324
  return {};
331
325
  },
332
326
  apply: function apply(tr, pluginState) {
333
- var _ref8 = tr.getMeta(emojiPluginKey) || {
327
+ var _ref7 = tr.getMeta(emojiPluginKey) || {
334
328
  action: null,
335
329
  params: null
336
330
  },
337
- action = _ref8.action,
338
- params = _ref8.params;
331
+ action = _ref7.action,
332
+ params = _ref7.params;
339
333
 
340
334
  var newPluginState = pluginState;
341
335
 
@@ -344,14 +338,14 @@ function emojiPluginFactory(dispatch, providerFactory, portalProviderAPI, eventD
344
338
  newPluginState = _objectSpread(_objectSpread({}, pluginState), {}, {
345
339
  emojiProvider: params.provider
346
340
  });
347
- dispatch(emojiPluginKey, newPluginState);
341
+ pmPluginFactoryParams.dispatch(emojiPluginKey, newPluginState);
348
342
  return newPluginState;
349
343
 
350
344
  case ACTIONS.SET_ASCII_MAP:
351
345
  newPluginState = _objectSpread(_objectSpread({}, pluginState), {}, {
352
346
  asciiMap: params.asciiMap
353
347
  });
354
- dispatch(emojiPluginKey, newPluginState);
348
+ pmPluginFactoryParams.dispatch(emojiPluginKey, newPluginState);
355
349
  return newPluginState;
356
350
  }
357
351
 
@@ -360,11 +354,13 @@ function emojiPluginFactory(dispatch, providerFactory, portalProviderAPI, eventD
360
354
  },
361
355
  props: {
362
356
  nodeViews: {
363
- emoji: function emoji(node, view, getPos) {
364
- var featureFlags = (0, _featureFlagsContext.getFeatureFlags)(view.state);
365
- var createEmojiNodeView = featureFlags !== null && featureFlags !== void 0 && featureFlags.nextEmojiNodeView ? (0, _emojiNext.default)(providerFactory, options) : (0, _emoji3.default)(portalProviderAPI, eventDispatcher, providerFactory, options);
366
- return createEmojiNodeView(node, view, getPos);
367
- }
357
+ emoji: (0, _getInlineNodeViewProducer.getInlineNodeViewProducer)({
358
+ pmPluginFactoryParams: pmPluginFactoryParams,
359
+ Component: _emoji3.EmojiNodeView,
360
+ extraComponentProps: {
361
+ providerFactory: pmPluginFactoryParams.providerFactory
362
+ }
363
+ })
368
364
  }
369
365
  },
370
366
  view: function view(editorView) {
@@ -389,11 +385,11 @@ function emojiPluginFactory(dispatch, providerFactory, portalProviderAPI, eventD
389
385
  return;
390
386
  };
391
387
 
392
- providerFactory.subscribe('emojiProvider', providerHandler);
388
+ pmPluginFactoryParams.providerFactory.subscribe('emojiProvider', providerHandler);
393
389
  return {
394
390
  destroy: function destroy() {
395
- if (providerFactory) {
396
- providerFactory.unsubscribe('emojiProvider', providerHandler);
391
+ if (pmPluginFactoryParams.providerFactory) {
392
+ pmPluginFactoryParams.providerFactory.unsubscribe('emojiProvider', providerHandler);
397
393
  }
398
394
  }
399
395
  };
@@ -5,75 +5,21 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.EmojiNodeView = void 0;
9
- exports.default = emojiNodeView;
10
-
11
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
12
-
13
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
14
-
15
- var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
16
-
17
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
18
-
19
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
20
-
21
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
8
+ exports.EmojiNodeView = EmojiNodeView;
22
9
 
23
10
  var _react = _interopRequireDefault(require("react"));
24
11
 
25
- var _utils = require("@atlaskit/editor-common/utils");
26
-
27
12
  var _Emoji = _interopRequireDefault(require("../ui/Emoji"));
28
13
 
29
- var _nodeviews = require("../../../nodeviews");
30
-
31
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
32
-
33
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
34
-
35
- var EmojiNodeView = /*#__PURE__*/function (_ReactNodeView) {
36
- (0, _inherits2.default)(EmojiNodeView, _ReactNodeView);
37
-
38
- var _super = _createSuper(EmojiNodeView);
39
-
40
- function EmojiNodeView() {
41
- (0, _classCallCheck2.default)(this, EmojiNodeView);
42
- return _super.apply(this, arguments);
43
- }
44
-
45
- (0, _createClass2.default)(EmojiNodeView, [{
46
- key: "createDomRef",
47
- value: function createDomRef() {
48
- return (0, _get2.default)((0, _getPrototypeOf2.default)(EmojiNodeView.prototype), "createDomRef", this).call(this);
49
- }
50
- }, {
51
- key: "render",
52
- value: function render(props) {
53
- var providerFactory = props.providerFactory,
54
- options = props.options;
55
- var _this$node$attrs = this.node.attrs,
56
- shortName = _this$node$attrs.shortName,
57
- id = _this$node$attrs.id,
58
- text = _this$node$attrs.text;
59
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Emoji.default, {
60
- providers: providerFactory,
61
- id: id,
62
- shortName: shortName,
63
- fallback: text
64
- }), options && options.allowZeroWidthSpaceAfter && _utils.ZERO_WIDTH_SPACE);
65
- }
66
- }]);
67
- return EmojiNodeView;
68
- }(_nodeviews.ReactNodeView);
69
-
70
- exports.EmojiNodeView = EmojiNodeView;
71
-
72
- function emojiNodeView(portalProviderAPI, eventDispatcher, providerFactory, options) {
73
- return function (node, view, getPos) {
74
- return new EmojiNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, {
75
- providerFactory: providerFactory,
76
- options: options
77
- }).init();
78
- };
14
+ function EmojiNodeView(props) {
15
+ var _props$node$attrs = props.node.attrs,
16
+ shortName = _props$node$attrs.shortName,
17
+ id = _props$node$attrs.id,
18
+ text = _props$node$attrs.text;
19
+ return /*#__PURE__*/_react.default.createElement(_Emoji.default, {
20
+ providers: props.providerFactory,
21
+ id: id,
22
+ shortName: shortName,
23
+ fallback: text
24
+ });
79
25
  }
@@ -5,31 +5,17 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.emojiStylesNext = exports.emojiStyles = void 0;
8
+ exports.emojiStyles = void 0;
9
9
 
10
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
11
 
12
12
  var _react = require("@emotion/react");
13
13
 
14
- var _colors = require("@atlaskit/theme/colors");
15
-
16
- var _constants = require("@atlaskit/theme/constants");
17
-
18
14
  var _emoji = require("@atlaskit/editor-common/emoji");
19
15
 
20
16
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
21
17
 
22
- var _templateObject, _templateObject2;
18
+ var _templateObject;
23
19
 
24
20
  var emojiStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n display: inline-block;\n\n .", " {\n cursor: pointer;\n\n &.", " > span {\n /** needed for selection style to cover custom emoji image properly */\n display: flex;\n }\n }\n\n &.", " {\n .", ",\n .", " {\n border-radius: 2px;\n ", "\n }\n }\n }\n"])), _emoji.EmojiSharedCssClassName.EMOJI_CONTAINER, _emoji.EmojiSharedCssClassName.EMOJI_NODE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, _editorSharedStyles.akEditorSelectedNodeClassName, _emoji.EmojiSharedCssClassName.EMOJI_SPRITE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.BoxShadow]));
25
- exports.emojiStyles = emojiStyles;
26
- var grid = (0, _constants.gridSize)() / 2;
27
- var fontSize = (0, _constants.fontSizeSmall)();
28
- var lineHeight = 4 * grid / fontSize;
29
- var maxWidth = 105 * grid; // ~420px
30
-
31
- var leftAndRightTextPadding = 2 * grid;
32
- var topAndBottomPadding = grid / 4;
33
- var marginDistance = 2 * grid;
34
- var emojiStylesNext = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .editor-emoji {\n position: relative;\n display: inline-block;\n width: 20px;\n height: 20px;\n background-repeat: none;\n background-size: contain;\n cursor: pointer;\n vertical-align: middle;\n\n &.editor-emoji-loading {\n border-radius: ", "px;\n background: ", ";\n }\n\n &.editor-emoji-fallback {\n display: inline;\n background: transparent;\n vertical-align: baseline;\n }\n\n &.ProseMirror-selectednode:empty {\n outline: none;\n }\n\n &:not(.editor-emoji-fallback) {\n font-size: 0px;\n }\n\n &:not(.editor-emoji-fallback)::before {\n content: attr(data-emoji-shortname);\n display: block;\n box-sizing: border-box;\n width: auto;\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translate(-50%, ", "px);\n\n // packages/css-packs/reduced-ui-pack/src/tooltip.js:25\n color: ", ";\n background-color: ", ";\n font-size: ", ";\n line-height: ", ";\n max-width: ", "px;\n border-radius: ", "px;\n overflow: hidden;\n padding: ", "px ", "px;\n pointer-events: none;\n text-decoration: none;\n text-overflow: ellipsis;\n white-space: nowrap;\n z-index: 10000;\n\n opacity: 0; // invisible by default\n transition: opacity 0.35s; // (durationStep * 14)\n }\n\n &:not(.editor-emoji-fallback):hover::before {\n opacity: 1;\n transition: opacity 0s 0.35s; // (durationStep * 14)\n }\n\n &.", " {\n z-index: 2;\n border-radius: 2px;\n ", "\n }\n }\n"])), (0, _constants.borderRadius)(), _colors.N20, marginDistance, _colors.N0, _colors.N900, (0, _editorSharedStyles.relativeFontSizeToBase16)(fontSize), lineHeight, maxWidth, (0, _constants.borderRadius)(), topAndBottomPadding, leftAndRightTextPadding, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.BoxShadow]));
35
- exports.emojiStylesNext = emojiStylesNext;
21
+ exports.emojiStyles = emojiStyles;
@@ -40,10 +40,10 @@ var EXPAND_ICON_COLOR = function EXPAND_ICON_COLOR(props) {
40
40
  };
41
41
 
42
42
  var ACTIVE_STATE_BACKGROUND_COLOR = (0, _components.themed)({
43
- dark: "#0C294F"
43
+ dark: "#0C294F4B"
44
44
  });
45
45
  var ACTIVE_STATE_BORDER = (0, _components.themed)({
46
- dark: "1px solid #4794ff"
46
+ dark: "1px solid #4794ff4B"
47
47
  });
48
48
  var ACTIVE_STATE_BORDER_RADIUS = (0, _components.themed)({
49
49
  dark: '3px'
@@ -13,7 +13,9 @@ var _react = require("@emotion/react");
13
13
 
14
14
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
15
15
 
16
+ var _tokens = require("@atlaskit/tokens");
17
+
16
18
  var _templateObject;
17
19
 
18
- var extensionStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .extensionView-content-wrap,\n .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n &:not(.danger).", " {\n & > span > .extension-container {\n ", "\n }\n }\n\n &.danger > span > .extension-container {\n box-shadow: 0 0 0 ", "px ", ";\n background-color: ", ";\n }\n\n &.inline {\n word-wrap: break-all;\n }\n }\n\n .extensionView-content-wrap .extension-container {\n overflow: hidden;\n }\n\n .bodiedExtensionView-content-wrap\n .extensionView-content-wrap\n .extension-container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n"])), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, _editorSharedStyles.akEditorDeleteBackground);
20
+ var extensionStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .extensionView-content-wrap,\n .bodiedExtensionView-content-wrap {\n margin: ", " 0;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n &:not(.danger).", " {\n & > span > .extension-container {\n ", "\n }\n }\n\n &.danger > span > .extension-container {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n }\n\n &.inline {\n word-wrap: break-all;\n }\n }\n\n .extensionView-content-wrap .extension-container {\n overflow: hidden;\n }\n\n .bodiedExtensionView-content-wrap\n .extensionView-content-wrap\n .extension-container {\n width: 100%;\n max-width: 100%; // ensure width can't go over 100%;\n }\n"])), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _editorSharedStyles.akEditorSelectedBorderSize, (0, _tokens.token)('color.border.danger', _editorSharedStyles.akEditorDeleteBorder), (0, _tokens.token)('color.background.danger', _editorSharedStyles.akEditorDeleteBackground));
19
21
  exports.extensionStyles = extensionStyles;
@@ -30,7 +30,7 @@ var safeNumberFeatureFlag = function safeNumberFeatureFlag(value) {
30
30
 
31
31
 
32
32
  function createFeatureFlagsFromProps(props) {
33
- var _props$allowTextColor, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$allowTables, _props$featureFlags4, _props$featureFlags5, _props$allowTables2, _props$featureFlags6, _props$featureFlags7, _props$allowTables3, _props$featureFlags8, _props$featureFlags9, _props$allowTables4, _props$featureFlags10, _props$featureFlags11, _props$allowTables5, _props$allowExtension, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$collabEdit, _props$collabEdit2, _props$featureFlags37, _props$featureFlags38;
33
+ var _props$allowTextColor, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags, _props$featureFlags2, _props$allowTables, _props$featureFlags3, _props$featureFlags4, _props$allowTables2, _props$featureFlags5, _props$featureFlags6, _props$allowTables3, _props$featureFlags7, _props$featureFlags8, _props$allowTables4, _props$featureFlags9, _props$featureFlags10, _props$allowTables5, _props$allowExtension, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$collabEdit, _props$collabEdit2, _props$featureFlags34, _props$featureFlags35;
34
34
 
35
35
  var normalizedFeatureFlags = (0, _normalizeFeatureFlags.normalizeFeatureFlags)(props.featureFlags);
36
36
  return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
@@ -46,29 +46,27 @@ function createFeatureFlagsFromProps(props) {
46
46
  singleLayout: (0, _typeof2.default)(props.allowLayouts) === 'object' && !!((_props$allowLayouts = props.allowLayouts) !== null && _props$allowLayouts !== void 0 && _props$allowLayouts.UNSAFE_allowSingleColumnLayout),
47
47
  undoRedoButtons: props.UNSAFE_allowUndoRedoButtons,
48
48
  catchAllTracking: (_props$performanceTra = props.performanceTracking) === null || _props$performanceTra === void 0 ? void 0 : (_props$performanceTra2 = _props$performanceTra.catchAllTracking) === null || _props$performanceTra2 === void 0 ? void 0 : _props$performanceTra2.enabled,
49
- nextEmojiNodeView: ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.nextEmojiNodeView) === true,
50
- stickyHeadersOptimization: typeof ((_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.stickyHeadersOptimization) === 'boolean' ? !!((_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.stickyHeadersOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables = props.allowTables) !== null && _props$allowTables !== void 0 && _props$allowTables.stickyHeadersOptimization),
51
- initialRenderOptimization: typeof ((_props$featureFlags4 = props.featureFlags) === null || _props$featureFlags4 === void 0 ? void 0 : _props$featureFlags4.initialRenderOptimization) === 'boolean' ? !!((_props$featureFlags5 = props.featureFlags) !== null && _props$featureFlags5 !== void 0 && _props$featureFlags5.initialRenderOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables2 = props.allowTables) !== null && _props$allowTables2 !== void 0 && _props$allowTables2.initialRenderOptimization),
52
- mouseMoveOptimization: typeof ((_props$featureFlags6 = props.featureFlags) === null || _props$featureFlags6 === void 0 ? void 0 : _props$featureFlags6.mouseMoveOptimization) === 'boolean' ? !!((_props$featureFlags7 = props.featureFlags) !== null && _props$featureFlags7 !== void 0 && _props$featureFlags7.mouseMoveOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables3 = props.allowTables) !== null && _props$allowTables3 !== void 0 && _props$allowTables3.mouseMoveOptimization),
53
- tableRenderOptimization: typeof ((_props$featureFlags8 = props.featureFlags) === null || _props$featureFlags8 === void 0 ? void 0 : _props$featureFlags8.tableRenderOptimization) === 'boolean' ? !!((_props$featureFlags9 = props.featureFlags) !== null && _props$featureFlags9 !== void 0 && _props$featureFlags9.tableRenderOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables4 = props.allowTables) !== null && _props$allowTables4 !== void 0 && _props$allowTables4.tableRenderOptimization),
54
- tableOverflowShadowsOptimization: typeof ((_props$featureFlags10 = props.featureFlags) === null || _props$featureFlags10 === void 0 ? void 0 : _props$featureFlags10.tableOverflowShadowsOptimization) === 'boolean' ? !!((_props$featureFlags11 = props.featureFlags) !== null && _props$featureFlags11 !== void 0 && _props$featureFlags11.tableOverflowShadowsOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables5 = props.allowTables) !== null && _props$allowTables5 !== void 0 && _props$allowTables5.tableOverflowShadowsOptimization),
49
+ stickyHeadersOptimization: typeof ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.stickyHeadersOptimization) === 'boolean' ? !!((_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.stickyHeadersOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables = props.allowTables) !== null && _props$allowTables !== void 0 && _props$allowTables.stickyHeadersOptimization),
50
+ initialRenderOptimization: typeof ((_props$featureFlags3 = props.featureFlags) === null || _props$featureFlags3 === void 0 ? void 0 : _props$featureFlags3.initialRenderOptimization) === 'boolean' ? !!((_props$featureFlags4 = props.featureFlags) !== null && _props$featureFlags4 !== void 0 && _props$featureFlags4.initialRenderOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables2 = props.allowTables) !== null && _props$allowTables2 !== void 0 && _props$allowTables2.initialRenderOptimization),
51
+ mouseMoveOptimization: typeof ((_props$featureFlags5 = props.featureFlags) === null || _props$featureFlags5 === void 0 ? void 0 : _props$featureFlags5.mouseMoveOptimization) === 'boolean' ? !!((_props$featureFlags6 = props.featureFlags) !== null && _props$featureFlags6 !== void 0 && _props$featureFlags6.mouseMoveOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables3 = props.allowTables) !== null && _props$allowTables3 !== void 0 && _props$allowTables3.mouseMoveOptimization),
52
+ tableRenderOptimization: typeof ((_props$featureFlags7 = props.featureFlags) === null || _props$featureFlags7 === void 0 ? void 0 : _props$featureFlags7.tableRenderOptimization) === 'boolean' ? !!((_props$featureFlags8 = props.featureFlags) !== null && _props$featureFlags8 !== void 0 && _props$featureFlags8.tableRenderOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables4 = props.allowTables) !== null && _props$allowTables4 !== void 0 && _props$allowTables4.tableRenderOptimization),
53
+ tableOverflowShadowsOptimization: typeof ((_props$featureFlags9 = props.featureFlags) === null || _props$featureFlags9 === void 0 ? void 0 : _props$featureFlags9.tableOverflowShadowsOptimization) === 'boolean' ? !!((_props$featureFlags10 = props.featureFlags) !== null && _props$featureFlags10 !== void 0 && _props$featureFlags10.tableOverflowShadowsOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables5 = props.allowTables) !== null && _props$allowTables5 !== void 0 && _props$allowTables5.tableOverflowShadowsOptimization),
55
54
  extendFloatingToolbar: Boolean((0, _typeof2.default)(props.allowExtension) === 'object' && ((_props$allowExtension = props.allowExtension) === null || _props$allowExtension === void 0 ? void 0 : _props$allowExtension.allowExtendFloatingToolbars)),
56
- displayInlineBlockForInlineNodes: Boolean(typeof ((_props$featureFlags12 = props.featureFlags) === null || _props$featureFlags12 === void 0 ? void 0 : _props$featureFlags12.displayInlineBlockForInlineNodes) === 'boolean' ? !!((_props$featureFlags13 = props.featureFlags) !== null && _props$featureFlags13 !== void 0 && _props$featureFlags13.displayInlineBlockForInlineNodes) : false),
57
- useUnpredictableInputRule: Boolean(typeof ((_props$featureFlags14 = props.featureFlags) === null || _props$featureFlags14 === void 0 ? void 0 : _props$featureFlags14.useUnpredictableInputRule) === 'boolean' ? !!((_props$featureFlags15 = props.featureFlags) !== null && _props$featureFlags15 !== void 0 && _props$featureFlags15.useUnpredictableInputRule) : props.UNSAFE_allowUndoRedoButtons ? false : true),
58
- showAvatarGroupAsPlugin: Boolean(typeof ((_props$featureFlags16 = props.featureFlags) === null || _props$featureFlags16 === void 0 ? void 0 : _props$featureFlags16.showAvatarGroupAsPlugin) === 'boolean' ? !!((_props$featureFlags17 = props.featureFlags) !== null && _props$featureFlags17 !== void 0 && _props$featureFlags17.showAvatarGroupAsPlugin) : false),
59
- errorBoundaryDocStructure: Boolean(typeof ((_props$featureFlags18 = props.featureFlags) === null || _props$featureFlags18 === void 0 ? void 0 : _props$featureFlags18.useErrorBoundaryDocStructure) === 'boolean' ? !!((_props$featureFlags19 = props.featureFlags) !== null && _props$featureFlags19 !== void 0 && _props$featureFlags19.useErrorBoundaryDocStructure) : false),
60
- synchronyErrorDocStructure: Boolean(typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20.synchronyErrorDocStructure) === 'boolean' ? !!((_props$featureFlags21 = props.featureFlags) !== null && _props$featureFlags21 !== void 0 && _props$featureFlags21.synchronyErrorDocStructure) : false),
61
- enableViewUpdateSubscription: Boolean(typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22.enableViewUpdateSubscription) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23.enableViewUpdateSubscription) : false),
62
- plainTextPasteLinkification: Boolean(typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24.plainTextPasteLinkification) === 'boolean' ? !!((_props$featureFlags25 = props.featureFlags) !== null && _props$featureFlags25 !== void 0 && _props$featureFlags25.plainTextPasteLinkification) : false),
63
- collabAvatarScroll: Boolean(typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26.collabAvatarScroll) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27.collabAvatarScroll) : false),
64
- ufo: Boolean(typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28.ufo) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29.ufo) : false),
55
+ useUnpredictableInputRule: Boolean(typeof ((_props$featureFlags11 = props.featureFlags) === null || _props$featureFlags11 === void 0 ? void 0 : _props$featureFlags11.useUnpredictableInputRule) === 'boolean' ? !!((_props$featureFlags12 = props.featureFlags) !== null && _props$featureFlags12 !== void 0 && _props$featureFlags12.useUnpredictableInputRule) : props.UNSAFE_allowUndoRedoButtons ? false : true),
56
+ showAvatarGroupAsPlugin: Boolean(typeof ((_props$featureFlags13 = props.featureFlags) === null || _props$featureFlags13 === void 0 ? void 0 : _props$featureFlags13.showAvatarGroupAsPlugin) === 'boolean' ? !!((_props$featureFlags14 = props.featureFlags) !== null && _props$featureFlags14 !== void 0 && _props$featureFlags14.showAvatarGroupAsPlugin) : false),
57
+ errorBoundaryDocStructure: Boolean(typeof ((_props$featureFlags15 = props.featureFlags) === null || _props$featureFlags15 === void 0 ? void 0 : _props$featureFlags15.useErrorBoundaryDocStructure) === 'boolean' ? !!((_props$featureFlags16 = props.featureFlags) !== null && _props$featureFlags16 !== void 0 && _props$featureFlags16.useErrorBoundaryDocStructure) : false),
58
+ synchronyErrorDocStructure: Boolean(typeof ((_props$featureFlags17 = props.featureFlags) === null || _props$featureFlags17 === void 0 ? void 0 : _props$featureFlags17.synchronyErrorDocStructure) === 'boolean' ? !!((_props$featureFlags18 = props.featureFlags) !== null && _props$featureFlags18 !== void 0 && _props$featureFlags18.synchronyErrorDocStructure) : false),
59
+ enableViewUpdateSubscription: Boolean(typeof ((_props$featureFlags19 = props.featureFlags) === null || _props$featureFlags19 === void 0 ? void 0 : _props$featureFlags19.enableViewUpdateSubscription) === 'boolean' ? !!((_props$featureFlags20 = props.featureFlags) !== null && _props$featureFlags20 !== void 0 && _props$featureFlags20.enableViewUpdateSubscription) : false),
60
+ plainTextPasteLinkification: Boolean(typeof ((_props$featureFlags21 = props.featureFlags) === null || _props$featureFlags21 === void 0 ? void 0 : _props$featureFlags21.plainTextPasteLinkification) === 'boolean' ? !!((_props$featureFlags22 = props.featureFlags) !== null && _props$featureFlags22 !== void 0 && _props$featureFlags22.plainTextPasteLinkification) : false),
61
+ collabAvatarScroll: Boolean(typeof ((_props$featureFlags23 = props.featureFlags) === null || _props$featureFlags23 === void 0 ? void 0 : _props$featureFlags23.collabAvatarScroll) === 'boolean' ? !!((_props$featureFlags24 = props.featureFlags) !== null && _props$featureFlags24 !== void 0 && _props$featureFlags24.collabAvatarScroll) : false),
62
+ ufo: Boolean(typeof ((_props$featureFlags25 = props.featureFlags) === null || _props$featureFlags25 === void 0 ? void 0 : _props$featureFlags25.ufo) === 'boolean' ? !!((_props$featureFlags26 = props.featureFlags) !== null && _props$featureFlags26 !== void 0 && _props$featureFlags26.ufo) : false),
65
63
  codeBlockSyntaxHighlighting: Boolean(typeof normalizedFeatureFlags.codeBlockSyntaxHighlighting === 'boolean' ? !!normalizedFeatureFlags.codeBlockSyntaxHighlighting && !_utils.browser.safari : false),
66
- twoLineEditorToolbar: Boolean(typeof ((_props$featureFlags30 = props.featureFlags) === null || _props$featureFlags30 === void 0 ? void 0 : _props$featureFlags30.twoLineEditorToolbar) === 'boolean' ? !!((_props$featureFlags31 = props.featureFlags) !== null && _props$featureFlags31 !== void 0 && _props$featureFlags31.twoLineEditorToolbar) : false),
67
- codeBidiWarnings: Boolean(typeof ((_props$featureFlags32 = props.featureFlags) === null || _props$featureFlags32 === void 0 ? void 0 : _props$featureFlags32.codeBidiWarnings) === 'boolean' ? !!((_props$featureFlags33 = props.featureFlags) !== null && _props$featureFlags33 !== void 0 && _props$featureFlags33.codeBidiWarnings) : true),
68
- saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags34 = props.featureFlags) === null || _props$featureFlags34 === void 0 ? void 0 : _props$featureFlags34.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags35 = props.featureFlags) !== null && _props$featureFlags35 !== void 0 && _props$featureFlags35.saferDispatchedTransactions) : false)),
69
- maxUnsafeChromeSpellcheckingVersion: safeNumberFeatureFlag((_props$featureFlags36 = props.featureFlags) === null || _props$featureFlags36 === void 0 ? void 0 : _props$featureFlags36.maxUnsafeChromeSpellcheckingVersion),
64
+ twoLineEditorToolbar: Boolean(typeof ((_props$featureFlags27 = props.featureFlags) === null || _props$featureFlags27 === void 0 ? void 0 : _props$featureFlags27.twoLineEditorToolbar) === 'boolean' ? !!((_props$featureFlags28 = props.featureFlags) !== null && _props$featureFlags28 !== void 0 && _props$featureFlags28.twoLineEditorToolbar) : false),
65
+ codeBidiWarnings: Boolean(typeof ((_props$featureFlags29 = props.featureFlags) === null || _props$featureFlags29 === void 0 ? void 0 : _props$featureFlags29.codeBidiWarnings) === 'boolean' ? !!((_props$featureFlags30 = props.featureFlags) !== null && _props$featureFlags30 !== void 0 && _props$featureFlags30.codeBidiWarnings) : true),
66
+ saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags31 = props.featureFlags) === null || _props$featureFlags31 === void 0 ? void 0 : _props$featureFlags31.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags32 = props.featureFlags) !== null && _props$featureFlags32 !== void 0 && _props$featureFlags32.saferDispatchedTransactions) : false)),
67
+ maxUnsafeChromeSpellcheckingVersion: safeNumberFeatureFlag((_props$featureFlags33 = props.featureFlags) === null || _props$featureFlags33 === void 0 ? void 0 : _props$featureFlags33.maxUnsafeChromeSpellcheckingVersion),
70
68
  useNativeCollabPlugin: Boolean(typeof ((_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.useNativePlugin) === 'boolean' ? !!((_props$collabEdit2 = props.collabEdit) !== null && _props$collabEdit2 !== void 0 && _props$collabEdit2.useNativePlugin) : false),
71
- chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags37 = props.featureFlags) === null || _props$featureFlags37 === void 0 ? void 0 : _props$featureFlags37.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
72
- viewChangingExperimentToolbarStyle: typeof ((_props$featureFlags38 = props.featureFlags) === null || _props$featureFlags38 === void 0 ? void 0 : _props$featureFlags38['view-changing-experiment-toolbar-style']) === 'string' ? props.featureFlags['view-changing-experiment-toolbar-style'] || undefined : undefined
69
+ chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags34 = props.featureFlags) === null || _props$featureFlags34 === void 0 ? void 0 : _props$featureFlags34.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
70
+ viewChangingExperimentToolbarStyle: typeof ((_props$featureFlags35 = props.featureFlags) === null || _props$featureFlags35 === void 0 ? void 0 : _props$featureFlags35['view-changing-experiment-toolbar-style']) === 'string' ? props.featureFlags['view-changing-experiment-toolbar-style'] || undefined : undefined
73
71
  });
74
72
  }
@@ -15,8 +15,6 @@ var _inputRules = require("../../../utils/input-rules");
15
15
 
16
16
  var _utils = require("../utils");
17
17
 
18
- var _actions = require("../../card/pm-plugins/actions");
19
-
20
18
  var _analytics = require("../../analytics");
21
19
 
22
20
  var _analytics2 = require("../analytics");
@@ -39,13 +37,7 @@ function createLinkInputRule(regexp) {
39
37
  });
40
38
  var from = start;
41
39
  var to = Math.min(start + link.text.length, state.doc.content.size);
42
- var tr = (0, _actions.queueCards)([{
43
- url: link.url,
44
- pos: from,
45
- appearance: 'inline',
46
- compareLinkText: true,
47
- source: _analytics.INPUT_METHOD.AUTO_DETECT
48
- }])(state.tr.addMark(from, to, markType)); // Keep old behavior that will delete the space after the link
40
+ var tr = state.tr.addMark(from, to, markType); // Keep old behavior that will delete the space after the link
49
41
 
50
42
  if (useUnpredictableInputRule || to === end) {
51
43
  tr.insertText(' ');