@atlaskit/editor-core 164.0.4 → 166.0.1

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 (182) hide show
  1. package/CHANGELOG.md +43 -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/nodeviews/getPerformanceOptions.js +1 -1
  10. package/dist/cjs/plugins/analytics/types/enums.js +1 -0
  11. package/dist/cjs/plugins/base/pm-plugins/frozen-editor.js +128 -79
  12. package/dist/cjs/plugins/base/utils/input-latency-tracking.js +157 -0
  13. package/dist/cjs/plugins/card/styles.js +3 -1
  14. package/dist/cjs/plugins/code-block/styles.js +6 -4
  15. package/dist/cjs/plugins/collab-edit/plugin-state.js +23 -5
  16. package/dist/cjs/plugins/date/styles.js +3 -1
  17. package/dist/cjs/plugins/emoji/index.js +30 -34
  18. package/dist/cjs/plugins/emoji/nodeviews/emoji.js +12 -66
  19. package/dist/cjs/plugins/emoji/styles.js +3 -17
  20. package/dist/cjs/plugins/expand/ui/styles.js +2 -2
  21. package/dist/cjs/plugins/extension/ui/styles.js +3 -1
  22. package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
  23. package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +1 -9
  24. package/dist/cjs/plugins/hyperlink/pm-plugins/keymap.js +1 -9
  25. package/dist/cjs/plugins/layout/styles.js +3 -1
  26. package/dist/cjs/plugins/list/commands/indent-list.js +5 -1
  27. package/dist/cjs/plugins/list/commands/outdent-list.js +5 -1
  28. package/dist/cjs/plugins/list/transforms.js +11 -3
  29. package/dist/cjs/plugins/media/styles.js +3 -1
  30. package/dist/cjs/plugins/mentions/index.js +10 -14
  31. package/dist/cjs/plugins/mentions/nodeviews/mention.js +15 -67
  32. package/dist/cjs/plugins/mentions/pm-plugins/main.js +19 -10
  33. package/dist/cjs/plugins/mentions/type-ahead/index.js +7 -2
  34. package/dist/cjs/plugins/panel/styles.js +3 -1
  35. package/dist/cjs/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
  36. package/dist/cjs/plugins/rule/styles.js +3 -1
  37. package/dist/cjs/plugins/selection/utils.js +39 -23
  38. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +24 -0
  39. package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
  40. package/dist/cjs/plugins/table/ui/consts.js +6 -4
  41. package/dist/cjs/plugins/tasks-and-decisions/styles.js +3 -1
  42. package/dist/cjs/plugins/type-ahead/index.js +6 -2
  43. package/dist/cjs/plugins/unsupported-content/index.js +22 -10
  44. package/dist/cjs/plugins/unsupported-content/styles.js +4 -2
  45. package/dist/cjs/plugins/unsupported-content/unsupported-inline-node-view.js +21 -0
  46. package/dist/cjs/ui/Appearance/Chromeless.js +6 -3
  47. package/dist/cjs/ui/Appearance/Comment/Comment.js +6 -4
  48. package/dist/cjs/ui/ChromeCollapsed/styles.js +3 -1
  49. package/dist/cjs/ui/ContentStyles/index.js +2 -2
  50. package/dist/cjs/version-wrapper.js +1 -1
  51. package/dist/cjs/version.json +1 -1
  52. package/dist/es2019/actions/index.js +12 -1
  53. package/dist/es2019/create-editor/ReactEditorView.js +14 -6
  54. package/dist/es2019/create-editor/create-plugins-list.js +1 -2
  55. package/dist/es2019/editor.js +14 -0
  56. package/dist/es2019/event-dispatcher/index.js +8 -0
  57. package/dist/es2019/nodeviews/ReactNodeView.js +1 -10
  58. package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +9 -0
  59. package/dist/es2019/plugins/analytics/types/enums.js +1 -0
  60. package/dist/es2019/plugins/base/pm-plugins/frozen-editor.js +138 -80
  61. package/dist/es2019/plugins/base/utils/input-latency-tracking.js +128 -0
  62. package/dist/es2019/plugins/card/styles.js +9 -5
  63. package/dist/es2019/plugins/code-block/styles.js +11 -8
  64. package/dist/es2019/plugins/collab-edit/plugin-state.js +23 -8
  65. package/dist/es2019/plugins/date/styles.js +3 -1
  66. package/dist/es2019/plugins/emoji/index.js +16 -21
  67. package/dist/es2019/plugins/emoji/nodeviews/emoji.js +12 -31
  68. package/dist/es2019/plugins/emoji/styles.js +1 -82
  69. package/dist/es2019/plugins/expand/ui/styles.js +2 -2
  70. package/dist/es2019/plugins/extension/ui/styles.js +4 -2
  71. package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
  72. package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +1 -8
  73. package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +1 -8
  74. package/dist/es2019/plugins/layout/styles.js +3 -2
  75. package/dist/es2019/plugins/list/commands/indent-list.js +4 -1
  76. package/dist/es2019/plugins/list/commands/outdent-list.js +4 -1
  77. package/dist/es2019/plugins/list/transforms.js +9 -4
  78. package/dist/es2019/plugins/media/styles.js +9 -7
  79. package/dist/es2019/plugins/mentions/index.js +1 -6
  80. package/dist/es2019/plugins/mentions/nodeviews/mention.js +16 -35
  81. package/dist/es2019/plugins/mentions/pm-plugins/main.js +18 -10
  82. package/dist/es2019/plugins/mentions/type-ahead/index.js +7 -2
  83. package/dist/es2019/plugins/panel/styles.js +5 -4
  84. package/dist/es2019/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
  85. package/dist/es2019/plugins/rule/styles.js +2 -1
  86. package/dist/es2019/plugins/selection/utils.js +35 -20
  87. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +22 -0
  88. package/dist/es2019/plugins/table/ui/common-styles.js +4 -0
  89. package/dist/es2019/plugins/table/ui/consts.js +5 -4
  90. package/dist/es2019/plugins/tasks-and-decisions/styles.js +4 -2
  91. package/dist/es2019/plugins/type-ahead/index.js +5 -1
  92. package/dist/es2019/plugins/unsupported-content/index.js +23 -12
  93. package/dist/es2019/plugins/unsupported-content/styles.js +5 -3
  94. package/dist/es2019/plugins/unsupported-content/unsupported-inline-node-view.js +7 -0
  95. package/dist/es2019/ui/Appearance/Chromeless.js +5 -2
  96. package/dist/es2019/ui/Appearance/Comment/Comment.js +5 -2
  97. package/dist/es2019/ui/ChromeCollapsed/styles.js +2 -1
  98. package/dist/es2019/ui/ContentStyles/index.js +3 -3
  99. package/dist/es2019/version-wrapper.js +1 -1
  100. package/dist/es2019/version.json +1 -1
  101. package/dist/esm/actions/index.js +8 -0
  102. package/dist/esm/create-editor/ReactEditorView.js +14 -6
  103. package/dist/esm/create-editor/create-plugins-list.js +1 -2
  104. package/dist/esm/editor.js +14 -0
  105. package/dist/esm/event-dispatcher/index.js +9 -0
  106. package/dist/esm/nodeviews/ReactNodeView.js +1 -10
  107. package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
  108. package/dist/esm/plugins/analytics/types/enums.js +1 -0
  109. package/dist/esm/plugins/base/pm-plugins/frozen-editor.js +128 -79
  110. package/dist/esm/plugins/base/utils/input-latency-tracking.js +149 -0
  111. package/dist/esm/plugins/card/styles.js +2 -1
  112. package/dist/esm/plugins/code-block/styles.js +5 -4
  113. package/dist/esm/plugins/collab-edit/plugin-state.js +21 -6
  114. package/dist/esm/plugins/date/styles.js +2 -1
  115. package/dist/esm/plugins/emoji/index.js +26 -29
  116. package/dist/esm/plugins/emoji/nodeviews/emoji.js +11 -56
  117. package/dist/esm/plugins/emoji/styles.js +3 -14
  118. package/dist/esm/plugins/expand/ui/styles.js +2 -2
  119. package/dist/esm/plugins/extension/ui/styles.js +2 -1
  120. package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
  121. package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +1 -8
  122. package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +1 -8
  123. package/dist/esm/plugins/layout/styles.js +2 -1
  124. package/dist/esm/plugins/list/commands/indent-list.js +4 -1
  125. package/dist/esm/plugins/list/commands/outdent-list.js +4 -1
  126. package/dist/esm/plugins/list/transforms.js +9 -4
  127. package/dist/esm/plugins/media/styles.js +2 -1
  128. package/dist/esm/plugins/mentions/index.js +10 -14
  129. package/dist/esm/plugins/mentions/nodeviews/mention.js +13 -58
  130. package/dist/esm/plugins/mentions/pm-plugins/main.js +18 -10
  131. package/dist/esm/plugins/mentions/type-ahead/index.js +7 -2
  132. package/dist/esm/plugins/panel/styles.js +2 -1
  133. package/dist/esm/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
  134. package/dist/esm/plugins/rule/styles.js +2 -1
  135. package/dist/esm/plugins/selection/utils.js +35 -20
  136. package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +23 -0
  137. package/dist/esm/plugins/table/ui/common-styles.js +1 -1
  138. package/dist/esm/plugins/table/ui/consts.js +5 -4
  139. package/dist/esm/plugins/tasks-and-decisions/styles.js +2 -1
  140. package/dist/esm/plugins/type-ahead/index.js +6 -2
  141. package/dist/esm/plugins/unsupported-content/index.js +21 -11
  142. package/dist/esm/plugins/unsupported-content/styles.js +3 -2
  143. package/dist/esm/plugins/unsupported-content/unsupported-inline-node-view.js +7 -0
  144. package/dist/esm/ui/Appearance/Chromeless.js +6 -3
  145. package/dist/esm/ui/Appearance/Comment/Comment.js +6 -4
  146. package/dist/esm/ui/ChromeCollapsed/styles.js +2 -1
  147. package/dist/esm/ui/ContentStyles/index.js +3 -3
  148. package/dist/esm/version-wrapper.js +1 -1
  149. package/dist/esm/version.json +1 -1
  150. package/dist/types/actions/index.d.ts +3 -1
  151. package/dist/types/editor.d.ts +3 -0
  152. package/dist/types/event-dispatcher/index.d.ts +1 -0
  153. package/dist/types/nodeviews/ReactNodeView.d.ts +1 -5
  154. package/dist/types/plugins/analytics/types/enums.d.ts +1 -0
  155. package/dist/types/plugins/analytics/types/events.d.ts +2 -2
  156. package/dist/types/plugins/analytics/types/general-events.d.ts +10 -1
  157. package/dist/types/plugins/base/utils/input-latency-tracking.d.ts +44 -0
  158. package/dist/types/plugins/collab-edit/plugin-state.d.ts +4 -0
  159. package/dist/types/plugins/emoji/index.d.ts +2 -6
  160. package/dist/types/plugins/emoji/nodeviews/emoji.d.ts +4 -14
  161. package/dist/types/plugins/emoji/styles.d.ts +0 -1
  162. package/dist/types/plugins/emoji/types.d.ts +0 -1
  163. package/dist/types/plugins/list/transforms.d.ts +10 -1
  164. package/dist/types/plugins/mentions/nodeviews/mention.d.ts +6 -14
  165. package/dist/types/plugins/mentions/pm-plugins/main.d.ts +2 -5
  166. package/dist/types/plugins/selection/utils.d.ts +7 -15
  167. package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +3 -0
  168. package/dist/types/plugins/table/ui/consts.d.ts +2 -2
  169. package/dist/types/plugins/type-ahead/types.d.ts +1 -0
  170. package/dist/types/plugins/unsupported-content/unsupported-inline-node-view.d.ts +11 -0
  171. package/dist/types/types/editor-appearance-component.d.ts +1 -0
  172. package/dist/types/types/editor-props.d.ts +1 -0
  173. package/dist/types/types/feature-flags.d.ts +0 -14
  174. package/dist/types/ui/Appearance/Chromeless.d.ts +1 -0
  175. package/dist/types/ui/Appearance/Comment/Comment.d.ts +1 -0
  176. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +4 -4
  177. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  178. package/package.json +23 -23
  179. package/dist/cjs/plugins/emoji/nodeviews/emoji-next.js +0 -250
  180. package/dist/es2019/plugins/emoji/nodeviews/emoji-next.js +0 -177
  181. package/dist/esm/plugins/emoji/nodeviews/emoji-next.js +0 -234
  182. package/dist/types/plugins/emoji/nodeviews/emoji-next.d.ts +0 -31
@@ -36,7 +36,7 @@ var sentinelStyles = ".".concat(_types.TableCssClassName.TABLE_CONTAINER, " {\n
36
36
  var tableStyles = function tableStyles(props) {
37
37
  var _props$featureFlags;
38
38
 
39
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " button {\n background: ", ";\n color: ", ";\n cursor: none;\n }\n\n .", ":not(.", ") button:hover {\n background: ", ";\n color: white !important;\n cursor: pointer;\n }\n\n .ProseMirror {\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n .", " {\n margin-bottom: 0;\n }\n\n .", " {\n td.", ", th.", " {\n position: relative;\n overflow: visible;\n }\n\n td.", " {\n background-color: ", ";\n }\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", "\n }\n\n /* Delete button */\n ", "\n /* Ends Delete button */\n\n /* sticky styles */\n .", " .", " .", ":first-child {\n margin-top: ", "px;\n width: ", "px;\n\n position: fixed !important;\n z-index: ", " !important;\n\n box-shadow: 0px -", "px white;\n border-right: 0 none;\n /* top set by NumberColumn component */\n }\n\n .", " .", ".sticky {\n position: fixed !important;\n /* needs to be above row controls */\n z-index: ", " !important;\n background: white;\n\n width: ", "px;\n height: ", "px;\n }\n\n .", ".sticky .", " {\n border-bottom: 0px none;\n border-right: 0px none;\n\n height: ", "px;\n width: ", "px;\n }\n\n .", " .", " {\n z-index: 0;\n }\n\n .", "\n .", "\n .", ".sticky {\n position: fixed !important;\n z-index: ", " !important;\n display: flex;\n border-left: ", "px solid white;\n margin-left: -", "px;\n }\n\n .", " col:first-of-type {\n /* moving rows out of a table layout does weird things in Chrome */\n border-right: 1px solid green;\n }\n\n tr.sticky {\n padding-top: ", "px;\n position: fixed;\n display: grid;\n\n /* to keep it above cell selection */\n z-index: ", ";\n\n overflow-y: visible;\n overflow-x: hidden;\n\n grid-auto-flow: column;\n\n /* background for where controls apply */\n background: white;\n box-sizing: content-box;\n\n margin-top: 2px;\n\n box-shadow: 0 6px 4px -4px ", ";\n margin-left: -1px;\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\n z-index: ", ";\n }\n\n .", ".", "\n .", " {\n padding-bottom: ", "px;\n }\n\n tr.sticky th {\n border-bottom: ", "px solid\n ", ";\n margin-right: -1px;\n }\n\n .", " tr.sticky > th:last-child {\n border-right-width: 1px;\n }\n\n /* add left edge for first cell */\n .", " tr.sticky > th:first-child {\n margin-left: 0px;\n }\n\n /* add a little bit so the scroll lines up with the table */\n .", " tr.sticky::after {\n content: ' ';\n width: 1px;\n }\n\n /* To fix jumpiness caused in Chrome Browsers for sticky headers */\n .", " .sticky + tr {\n min-height: 0px;\n }\n\n /* move resize line a little in sticky bar */\n .", ".", " {\n tr.sticky\n td.", ",\n tr.sticky\n th.", " {\n .", "::after {\n right: ", "px;\n }\n }\n\n /* when selected put it back to normal -- :not selector would be nicer */\n tr.sticky\n td.", ".", ",\n tr.sticky\n th.", ".", " {\n .", "::after {\n right: ", "px;\n }\n }\n }\n\n tr.sticky\n .", ",\n tr.sticky\n .", " {\n z-index: 1;\n }\n\n .", " tr.sticky {\n padding-top: ", "px;\n }\n\n .", ".", "\n .", "\n .", ":first-child {\n margin-top: ", "px;\n }\n\n .", ".sticky {\n border-top: ", "px solid white;\n }\n\n ", "\n ", "\n\n .", " .", " {\n height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts\n }\n\n .less-padding {\n padding: 0 ", "px;\n\n .", " {\n padding: 0 ", "px;\n }\n\n &.", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n\n .", " {\n left: 6px;\n }\n\n .", " {\n left: calc(100% - 6px);\n }\n }\n\n > .", " {\n /**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n }\n\n /* Breakout only works on top level */\n > * .", " .", " {\n margin-left: unset !important;\n width: 100% !important;\n }\n\n ", ";\n\n /* Corner controls */\n .", " {\n width: ", "px;\n height: ", "px;\n display: none;\n\n .", " {\n position: relative;\n\n ", ";\n }\n\n .", " {\n position: relative;\n\n ", ";\n }\n }\n\n .", ".sticky {\n .", " {\n /* sticky row insert dot overlaps other row insert and messes things up */\n display: none !important;\n }\n }\n\n .", " {\n position: absolute;\n top: 0;\n width: ", "px;\n height: ", "px;\n border: 1px solid ", ";\n border-radius: 0;\n border-top-left-radius: ", "px;\n background: ", ";\n box-sizing: border-box;\n padding: 0;\n :focus {\n outline: none;\n }\n }\n .active .", " {\n border-color: ", ";\n background: ", ";\n }\n\n .", "[data-number-column='true'] {\n .", ", .", " {\n width: ", "px;\n }\n .", " .", " {\n border-right-width: 0;\n }\n }\n\n :not(.", ") .", ":hover {\n border-color: ", ";\n background: ", ";\n cursor: pointer;\n }\n\n :not(.", ")\n .", ".", " {\n border-color: ", ";\n background: ", ";\n }\n\n /* Row controls */\n .", " {\n width: ", "px;\n box-sizing: border-box;\n display: none;\n position: relative;\n\n ", ";\n\n .", " {\n display: flex;\n flex-direction: column;\n }\n .", ":last-child > button {\n border-bottom-left-radius: ", "px;\n }\n .", " {\n position: relative;\n margin-top: -1px;\n }\n .", ":hover,\n .", ".active,\n .", ":hover {\n z-index: ", ";\n }\n\n ", "\n }\n\n :not(.", ") .", " {\n ", "\n ", "\n }\n\n /* Numbered column */\n .", " {\n position: relative;\n float: right;\n margin-left: ", "px;\n top: ", "px;\n width: ", "px;\n box-sizing: border-box;\n }\n\n .", " {\n border: 1px solid ", ";\n box-sizing: border-box;\n margin-top: -1px;\n padding-bottom: 2px;\n padding: 10px 2px;\n text-align: center;\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n :first-child {\n margin-top: 0;\n }\n :last-child {\n border-bottom: 1px solid ", ";\n }\n }\n\n .", " {\n .", ", .", " {\n display: block;\n }\n .", " {\n padding-left: 1px;\n .", " {\n border-left: 0 none;\n }\n\n .", ".active {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n }\n }\n :not(.", ") .", " {\n .", " {\n cursor: pointer;\n }\n .", ":hover {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n .", ".", " {\n background-color: ", ";\n border: 1px solid ", ";\n border-left: 0;\n color: ", ";\n position: relative;\n z-index: ", ";\n }\n }\n\n /* Table */\n .", " > table {\n table-layout: fixed;\n\n .", " + * {\n margin-top: 0;\n }\n\n /*\n * Headings have a top margin by default, but we don't want this on the\n * first heading within table header cells.\n *\n * This specifically sets margin-top for the first heading within a header\n * cell when center/right aligned.\n */\n th.", " > .fabric-editor-block-mark {\n > h1:first-child,\n > h2:first-child,\n > h3:first-child,\n > h4:first-child,\n > h5:first-child,\n > h6:first-child {\n margin-top: 0;\n }\n }\n\n .", ", .", " {\n position: relative;\n }\n /* Give selected cells a blue overlay */\n .", "::after,\n .", "::after {\n z-index: ", ";\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n opacity: 0.3;\n pointer-events: none;\n }\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n }\n th.", "::after,\n td.", "::after {\n background: ", ";\n }\n }\n .", " {\n position: absolute;\n /* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n top: ", "px;\n }\n .", ".", " {\n z-index: ", ";\n }\n .", " {\n left: -", "px;\n }\n .", " {\n /*\n compensating for half of the insert column button\n that is aligned to the right edge initially on hover of the top right column control when table overflown,\n its center should be aligned with the edge\n */\n padding-right: ", "px;\n margin-right: -", "px;\n padding-bottom: ", "px;\n margin-bottom: -", "px;\n /* fixes gap cursor height */\n overflow: auto;\n position: relative;\n }\n }\n\n .ProseMirror.", " {\n .", " {\n overflow-x: auto;\n ", ";\n }\n }\n\n .ProseMirror.", " {\n cursor: col-resize;\n }\n\n .ProseMirror .pm-table-cell-content-wrap ol[data-child-count='100+'] {\n padding-left: revert;\n }\n"])), _types.TableCssClassName.LAYOUT_BUTTON, _colors.N20A, _colors.N300, _types.TableCssClassName.LAYOUT_BUTTON, _types.TableCssClassName.IS_RESIZING, _colors.B300, (0, _styles.tableSharedStyle)(props), (0, _uiStyles.columnControlsLineMarker)(props), _uiStyles.hoveredDeleteButton, _uiStyles.hoveredCell, _uiStyles.hoveredWarningCell, _uiStyles.resizeHandle, rangeSelectionStyles, _types.TableCssClassName.LAST_ITEM_IN_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_CELL, (0, _consts.tableCellBackgroundColor)(props), _types.TableCssClassName.CONTROLS_FLOATING_BUTTON_COLUMN, _uiStyles.insertColumnButtonWrapper, _types.TableCssClassName.CONTROLS_FLOATING_BUTTON_ROW, _uiStyles.insertRowButtonWrapper, _uiStyles.DeleteButton, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.stickyRowOffsetTop + 2, _editorSharedStyles.akEditorTableNumberColumnWidth, _editorSharedStyles.akEditorStickyHeaderZIndex, _consts.stickyRowOffsetTop, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.CORNER_CONTROLS, _editorSharedStyles.akEditorSmallZIndex, _consts.tableToolbarSize, _consts.tableToolbarSize, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableToolbarSize, _consts.tableToolbarSize, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _editorSharedStyles.akEditorStickyHeaderZIndex, _consts.tableToolbarSize, _consts.tableToolbarSize, _types.TableCssClassName.TABLE_STICKY, _consts.stickyRowOffsetTop, _consts.stickyRowZIndex, _colors.N40A, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _consts.stickyRowZIndex + 1, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _consts.tableToolbarSize, _consts.stickyHeaderBorderBottomWidth, (0, _consts.tableBorderColor)(props), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts.resizeHandlerAreaWidth - _consts.resizeLineWidth) / 2 + 1, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts.resizeHandlerAreaWidth - _consts.resizeLineWidth) / 2, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.WITH_CONTROLS, _consts.tableControlsSpacing, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.tableControlsSpacing + 2, _types.TableCssClassName.CORNER_CONTROLS, _consts.tableControlsSpacing - _consts.tableToolbarSize + 2, (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.stickyHeadersOptimization ? sentinelStyles : '', (0, _uiStyles.OverflowShadow)(props), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _consts.tablePadding, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _consts.tablePadding, _types.TableCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth + _consts.tablePadding - 1, _types.TableCssClassName.TABLE_LEFT_SHADOW, _types.TableCssClassName.TABLE_RIGHT_SHADOW, _types.TableCssClassName.NODEVIEW_WRAPPER, _types.TableCssClassName.NODEVIEW_WRAPPER, _types.TableCssClassName.TABLE_CONTAINER, (0, _uiStyles.columnControlsDecoration)(props), _types.TableCssClassName.CORNER_CONTROLS, _consts.tableToolbarSize + 1, cornerControlHeight, _types.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, (0, _uiStyles.InsertMarker)(props, "\n left: -11px;\n top: 9px;\n "), _types.TableCssClassName.CORNER_CONTROLS_INSERT_COLUMN_MARKER, (0, _uiStyles.InsertMarker)(props, "\n right: -1px;\n top: -12px;\n "), _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableToolbarSize + 1, _consts.tableToolbarSize + 1, (0, _consts.tableBorderColor)(props), _consts.tableBorderRadiusSize, (0, _consts.tableToolbarColor)(props), _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableBorderSelectedColor, _consts.tableToolbarSelectedColor, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _editorSharedStyles.akEditorTableToolbarSize + _editorSharedStyles.akEditorTableNumberColumnWidth, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.CONTROLS_BUTTON, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableBorderSelectedColor, _consts.tableToolbarSelectedColor, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts.tableBorderDeleteColor, _consts.tableToolbarDeleteColor, _types.TableCssClassName.ROW_CONTROLS, _consts.tableToolbarSize, (0, _uiStyles.InsertMarker)(props, "\n bottom: -1px;\n left: -11px;\n "), _types.TableCssClassName.ROW_CONTROLS_INNER, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _consts.tableBorderRadiusSize, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.CONTROLS_BUTTON, _editorSharedStyles.akEditorUnitZIndex, (0, _uiStyles.HeaderButton)(props, "\n border-bottom: 1px solid ".concat((0, _consts.tableBorderColor)(props), ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(_consts.tableToolbarSize, "px;\n\n .").concat(_types.TableCssClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(_types.TableCssClassName.CONTROLS_BUTTON_OVERLAY, ":first-child {\n top: 0;\n }\n ")), _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.ROW_CONTROLS, (0, _uiStyles.HeaderButtonHover)(), (0, _uiStyles.HeaderButtonDanger)(), _types.TableCssClassName.NUMBERED_COLUMN, _editorSharedStyles.akEditorTableToolbarSize - 1, _editorSharedStyles.akEditorTableToolbarSize, _editorSharedStyles.akEditorTableNumberColumnWidth + 1, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, (0, _consts.tableBorderColor)(props), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _consts.tableToolbarColor)(props), (0, _consts.tableTextColor)(props), (0, _consts.tableBorderColor)(props), (0, _consts.tableBorderColor)(props), _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.tableBorderSelectedColor, _consts.tableBorderSelectedColor, _consts.tableToolbarSelectedColor, _editorSharedStyles.akEditorUnitZIndex, _colors.N0, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.tableBorderSelectedColor, _consts.tableBorderSelectedColor, _consts.tableToolbarSelectedColor, _editorSharedStyles.akEditorUnitZIndex, _colors.N0, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts.tableToolbarDeleteColor, _consts.tableBorderDeleteColor, _colors.R500, _editorSharedStyles.akEditorUnitZIndex, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.SELECTED_CELL, _consts.tableBorderSelectedColor, _types.TableCssClassName.SELECTED_CELL, _consts.tableCellSelectedColor, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts.tableCellDeleteColor, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _styles.tableMarginTop - cornerControlHeight + 1, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.TABLE_LEFT_SHADOW, _editorSharedStyles.akEditorUnitZIndex, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _consts.tableToolbarSize, _types.TableCssClassName.TABLE_NODE_WRAPPER, _consts.tableInsertColumnButtonSize / 2, _consts.tableInsertColumnButtonSize / 2, _consts.tableScrollbarOffset, _consts.tableScrollbarOffset, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.TABLE_NODE_WRAPPER, _styles2.scrollbarStyles, _types.TableCssClassName.RESIZE_CURSOR);
39
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " button {\n background: ", ";\n color: ", ";\n cursor: none;\n }\n\n .", ":not(.", ") button:hover {\n background: ", ";\n color: white !important;\n cursor: pointer;\n }\n\n .ProseMirror {\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n .", " {\n margin-bottom: 0;\n }\n\n .", " {\n td.", ", th.", " {\n position: relative;\n overflow: visible;\n }\n\n td.", " {\n background-color: ", ";\n }\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", "\n }\n\n /* Delete button */\n ", "\n /* Ends Delete button */\n\n /* sticky styles */\n .", " .", " .", ":first-child {\n margin-top: ", "px;\n width: ", "px;\n\n position: fixed !important;\n z-index: ", " !important;\n\n box-shadow: 0px -", "px white;\n border-right: 0 none;\n /* top set by NumberColumn component */\n }\n\n .", " .", ".sticky {\n position: fixed !important;\n /* needs to be above row controls */\n z-index: ", " !important;\n background: white;\n\n width: ", "px;\n height: ", "px;\n }\n\n .", ".sticky .", " {\n border-bottom: 0px none;\n border-right: 0px none;\n\n height: ", "px;\n width: ", "px;\n }\n\n .", " .", " {\n z-index: 0;\n }\n\n .", "\n .", "\n .", ".sticky {\n position: fixed !important;\n z-index: ", " !important;\n display: flex;\n border-left: ", "px solid white;\n margin-left: -", "px;\n }\n\n .", " col:first-of-type {\n /* moving rows out of a table layout does weird things in Chrome */\n border-right: 1px solid green;\n }\n\n tr.sticky {\n padding-top: ", "px;\n position: fixed;\n display: grid;\n\n /* to keep it above cell selection */\n z-index: ", ";\n\n overflow-y: visible;\n overflow-x: hidden;\n\n grid-auto-flow: column;\n\n /* background for where controls apply */\n background: white;\n box-sizing: content-box;\n\n margin-top: 2px;\n\n box-shadow: 0 6px 4px -4px ", ";\n margin-left: -1px;\n\n &.no-pointer-events {\n pointer-events: none;\n }\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\n z-index: ", ";\n }\n\n .", ".", "\n .", " {\n padding-bottom: ", "px;\n }\n\n tr.sticky th {\n border-bottom: ", "px solid\n ", ";\n margin-right: -1px;\n }\n\n .", " tr.sticky > th:last-child {\n border-right-width: 1px;\n }\n\n /* add left edge for first cell */\n .", " tr.sticky > th:first-child {\n margin-left: 0px;\n }\n\n /* add a little bit so the scroll lines up with the table */\n .", " tr.sticky::after {\n content: ' ';\n width: 1px;\n }\n\n /* To fix jumpiness caused in Chrome Browsers for sticky headers */\n .", " .sticky + tr {\n min-height: 0px;\n }\n\n /* move resize line a little in sticky bar */\n .", ".", " {\n tr.sticky\n td.", ",\n tr.sticky\n th.", " {\n .", "::after {\n right: ", "px;\n }\n }\n\n /* when selected put it back to normal -- :not selector would be nicer */\n tr.sticky\n td.", ".", ",\n tr.sticky\n th.", ".", " {\n .", "::after {\n right: ", "px;\n }\n }\n }\n\n tr.sticky\n .", ",\n tr.sticky\n .", " {\n z-index: 1;\n }\n\n .", " tr.sticky {\n padding-top: ", "px;\n }\n\n .", ".", "\n .", "\n .", ":first-child {\n margin-top: ", "px;\n }\n\n .", ".sticky {\n border-top: ", "px solid white;\n }\n\n ", "\n ", "\n\n .", " .", " {\n height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts\n }\n\n .less-padding {\n padding: 0 ", "px;\n\n .", " {\n padding: 0 ", "px;\n }\n\n &.", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n\n .", " {\n left: 6px;\n }\n\n .", " {\n left: calc(100% - 6px);\n }\n }\n\n > .", " {\n /**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n }\n\n /* Breakout only works on top level */\n > * .", " .", " {\n margin-left: unset !important;\n width: 100% !important;\n }\n\n ", ";\n\n /* Corner controls */\n .", " {\n width: ", "px;\n height: ", "px;\n display: none;\n\n .", " {\n position: relative;\n\n ", ";\n }\n\n .", " {\n position: relative;\n\n ", ";\n }\n }\n\n .", ".sticky {\n .", " {\n /* sticky row insert dot overlaps other row insert and messes things up */\n display: none !important;\n }\n }\n\n .", " {\n position: absolute;\n top: 0;\n width: ", "px;\n height: ", "px;\n border: 1px solid ", ";\n border-radius: 0;\n border-top-left-radius: ", "px;\n background: ", ";\n box-sizing: border-box;\n padding: 0;\n :focus {\n outline: none;\n }\n }\n .active .", " {\n border-color: ", ";\n background: ", ";\n }\n\n .", "[data-number-column='true'] {\n .", ", .", " {\n width: ", "px;\n }\n .", " .", " {\n border-right-width: 0;\n }\n }\n\n :not(.", ") .", ":hover {\n border-color: ", ";\n background: ", ";\n cursor: pointer;\n }\n\n :not(.", ")\n .", ".", " {\n border-color: ", ";\n background: ", ";\n }\n\n /* Row controls */\n .", " {\n width: ", "px;\n box-sizing: border-box;\n display: none;\n position: relative;\n\n ", ";\n\n .", " {\n display: flex;\n flex-direction: column;\n }\n .", ":last-child > button {\n border-bottom-left-radius: ", "px;\n }\n .", " {\n position: relative;\n margin-top: -1px;\n }\n .", ":hover,\n .", ".active,\n .", ":hover {\n z-index: ", ";\n }\n\n ", "\n }\n\n :not(.", ") .", " {\n ", "\n ", "\n }\n\n /* Numbered column */\n .", " {\n position: relative;\n float: right;\n margin-left: ", "px;\n top: ", "px;\n width: ", "px;\n box-sizing: border-box;\n }\n\n .", " {\n border: 1px solid ", ";\n box-sizing: border-box;\n margin-top: -1px;\n padding-bottom: 2px;\n padding: 10px 2px;\n text-align: center;\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n :first-child {\n margin-top: 0;\n }\n :last-child {\n border-bottom: 1px solid ", ";\n }\n }\n\n .", " {\n .", ", .", " {\n display: block;\n }\n .", " {\n padding-left: 1px;\n .", " {\n border-left: 0 none;\n }\n\n .", ".active {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n }\n }\n :not(.", ") .", " {\n .", " {\n cursor: pointer;\n }\n .", ":hover {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n .", ".", " {\n background-color: ", ";\n border: 1px solid ", ";\n border-left: 0;\n color: ", ";\n position: relative;\n z-index: ", ";\n }\n }\n\n /* Table */\n .", " > table {\n table-layout: fixed;\n\n .", " + * {\n margin-top: 0;\n }\n\n /*\n * Headings have a top margin by default, but we don't want this on the\n * first heading within table header cells.\n *\n * This specifically sets margin-top for the first heading within a header\n * cell when center/right aligned.\n */\n th.", " > .fabric-editor-block-mark {\n > h1:first-child,\n > h2:first-child,\n > h3:first-child,\n > h4:first-child,\n > h5:first-child,\n > h6:first-child {\n margin-top: 0;\n }\n }\n\n .", ", .", " {\n position: relative;\n }\n /* Give selected cells a blue overlay */\n .", "::after,\n .", "::after {\n z-index: ", ";\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n opacity: 0.3;\n pointer-events: none;\n }\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n }\n th.", "::after,\n td.", "::after {\n background: ", ";\n }\n }\n .", " {\n position: absolute;\n /* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n top: ", "px;\n }\n .", ".", " {\n z-index: ", ";\n }\n .", " {\n left: -", "px;\n }\n .", " {\n /*\n compensating for half of the insert column button\n that is aligned to the right edge initially on hover of the top right column control when table overflown,\n its center should be aligned with the edge\n */\n padding-right: ", "px;\n margin-right: -", "px;\n padding-bottom: ", "px;\n margin-bottom: -", "px;\n /* fixes gap cursor height */\n overflow: auto;\n position: relative;\n }\n }\n\n .ProseMirror.", " {\n .", " {\n overflow-x: auto;\n ", ";\n }\n }\n\n .ProseMirror.", " {\n cursor: col-resize;\n }\n\n .ProseMirror .pm-table-cell-content-wrap ol[data-child-count='100+'] {\n padding-left: revert;\n }\n"])), _types.TableCssClassName.LAYOUT_BUTTON, _colors.N20A, _colors.N300, _types.TableCssClassName.LAYOUT_BUTTON, _types.TableCssClassName.IS_RESIZING, _colors.B300, (0, _styles.tableSharedStyle)(props), (0, _uiStyles.columnControlsLineMarker)(props), _uiStyles.hoveredDeleteButton, _uiStyles.hoveredCell, _uiStyles.hoveredWarningCell, _uiStyles.resizeHandle, rangeSelectionStyles, _types.TableCssClassName.LAST_ITEM_IN_CELL, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_CELL, (0, _consts.tableCellBackgroundColor)(props), _types.TableCssClassName.CONTROLS_FLOATING_BUTTON_COLUMN, _uiStyles.insertColumnButtonWrapper, _types.TableCssClassName.CONTROLS_FLOATING_BUTTON_ROW, _uiStyles.insertRowButtonWrapper, _uiStyles.DeleteButton, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.stickyRowOffsetTop + 2, _editorSharedStyles.akEditorTableNumberColumnWidth, _editorSharedStyles.akEditorStickyHeaderZIndex, _consts.stickyRowOffsetTop, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.CORNER_CONTROLS, _editorSharedStyles.akEditorSmallZIndex, _consts.tableToolbarSize, _consts.tableToolbarSize, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableToolbarSize, _consts.tableToolbarSize, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _editorSharedStyles.akEditorStickyHeaderZIndex, _consts.tableToolbarSize, _consts.tableToolbarSize, _types.TableCssClassName.TABLE_STICKY, _consts.stickyRowOffsetTop, _consts.stickyRowZIndex, _colors.N40A, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _consts.stickyRowZIndex + 1, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _consts.tableToolbarSize, _consts.stickyHeaderBorderBottomWidth, (0, _consts.tableBorderColor)(props), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts.resizeHandlerAreaWidth - _consts.resizeLineWidth) / 2 + 1, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.WITH_RESIZE_LINE, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.RESIZE_HANDLE_DECORATION, (_consts.resizeHandlerAreaWidth - _consts.resizeLineWidth) / 2, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.WITH_CONTROLS, _consts.tableControlsSpacing, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.tableControlsSpacing + 2, _types.TableCssClassName.CORNER_CONTROLS, _consts.tableControlsSpacing - _consts.tableToolbarSize + 2, (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.stickyHeadersOptimization ? sentinelStyles : '', (0, _uiStyles.OverflowShadow)(props), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _consts.tablePadding, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _consts.tablePadding, _types.TableCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth + _consts.tablePadding - 1, _types.TableCssClassName.TABLE_LEFT_SHADOW, _types.TableCssClassName.TABLE_RIGHT_SHADOW, _types.TableCssClassName.NODEVIEW_WRAPPER, _types.TableCssClassName.NODEVIEW_WRAPPER, _types.TableCssClassName.TABLE_CONTAINER, (0, _uiStyles.columnControlsDecoration)(props), _types.TableCssClassName.CORNER_CONTROLS, _consts.tableToolbarSize + 1, cornerControlHeight, _types.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, (0, _uiStyles.InsertMarker)(props, "\n left: -11px;\n top: 9px;\n "), _types.TableCssClassName.CORNER_CONTROLS_INSERT_COLUMN_MARKER, (0, _uiStyles.InsertMarker)(props, "\n right: -1px;\n top: -12px;\n "), _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableToolbarSize + 1, _consts.tableToolbarSize + 1, (0, _consts.tableBorderColor)(props), _consts.tableBorderRadiusSize, (0, _consts.tableToolbarColor)(props), _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableBorderSelectedColor, _consts.tableToolbarSelectedColor, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _editorSharedStyles.akEditorTableToolbarSize + _editorSharedStyles.akEditorTableNumberColumnWidth, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.CONTROLS_BUTTON, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts.tableBorderSelectedColor, _consts.tableToolbarSelectedColor, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts.tableBorderDeleteColor, _consts.tableToolbarDeleteColor, _types.TableCssClassName.ROW_CONTROLS, _consts.tableToolbarSize, (0, _uiStyles.InsertMarker)(props, "\n bottom: -1px;\n left: -11px;\n "), _types.TableCssClassName.ROW_CONTROLS_INNER, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _consts.tableBorderRadiusSize, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _types.TableCssClassName.CONTROLS_BUTTON, _editorSharedStyles.akEditorUnitZIndex, (0, _uiStyles.HeaderButton)(props, "\n border-bottom: 1px solid ".concat((0, _consts.tableBorderColor)(props), ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(_consts.tableToolbarSize, "px;\n\n .").concat(_types.TableCssClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(_types.TableCssClassName.CONTROLS_BUTTON_OVERLAY, ":first-child {\n top: 0;\n }\n ")), _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.ROW_CONTROLS, (0, _uiStyles.HeaderButtonHover)(), (0, _uiStyles.HeaderButtonDanger)(), _types.TableCssClassName.NUMBERED_COLUMN, _editorSharedStyles.akEditorTableToolbarSize - 1, _editorSharedStyles.akEditorTableToolbarSize, _editorSharedStyles.akEditorTableNumberColumnWidth + 1, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, (0, _consts.tableBorderColor)(props), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _consts.tableToolbarColor)(props), (0, _consts.tableTextColor)(props), (0, _consts.tableBorderColor)(props), (0, _consts.tableBorderColor)(props), _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.tableBorderSelectedColor, _consts.tableBorderSelectedColor, _consts.tableToolbarSelectedColor, _editorSharedStyles.akEditorUnitZIndex, _colors.N0, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts.tableBorderSelectedColor, _consts.tableBorderSelectedColor, _consts.tableToolbarSelectedColor, _editorSharedStyles.akEditorUnitZIndex, _colors.N0, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts.tableToolbarDeleteColor, _consts.tableBorderDeleteColor, _colors.R500, _editorSharedStyles.akEditorUnitZIndex, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.SELECTED_CELL, _consts.tableBorderSelectedColor, _types.TableCssClassName.SELECTED_CELL, _consts.tableCellSelectedColor, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts.tableCellDeleteColor, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _styles.tableMarginTop - cornerControlHeight + 1, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.TABLE_LEFT_SHADOW, _editorSharedStyles.akEditorUnitZIndex, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _consts.tableToolbarSize, _types.TableCssClassName.TABLE_NODE_WRAPPER, _consts.tableInsertColumnButtonSize / 2, _consts.tableInsertColumnButtonSize / 2, _consts.tableScrollbarOffset, _consts.tableScrollbarOffset, _types.TableCssClassName.IS_RESIZING, _types.TableCssClassName.TABLE_NODE_WRAPPER, _styles2.scrollbarStyles, _types.TableCssClassName.RESIZE_CURSOR);
40
40
  };
41
41
 
42
42
  exports.tableStyles = tableStyles;
@@ -11,6 +11,8 @@ var _styles = require("@atlaskit/editor-common/styles");
11
11
 
12
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
13
 
14
+ var _tokens = require("@atlaskit/tokens");
15
+
14
16
  var _types = require("../types");
15
17
 
16
18
  var _components = require("@atlaskit/theme/components");
@@ -24,8 +26,8 @@ var tableCellBackgroundColor = (0, _components.themed)({
24
26
  });
25
27
  exports.tableCellBackgroundColor = tableCellBackgroundColor;
26
28
  var tableToolbarColor = (0, _components.themed)({
27
- light: _editorSharedStyles.akEditorTableToolbar,
28
- dark: _editorSharedStyles.akEditorTableToolbarDark
29
+ light: (0, _tokens.token)('color.background.neutral', _editorSharedStyles.akEditorTableToolbar),
30
+ dark: (0, _tokens.token)('color.background.neutral', _editorSharedStyles.akEditorTableToolbarDark)
29
31
  });
30
32
  exports.tableToolbarColor = tableToolbarColor;
31
33
  var tableTextColor = (0, _components.themed)({
@@ -34,8 +36,8 @@ var tableTextColor = (0, _components.themed)({
34
36
  });
35
37
  exports.tableTextColor = tableTextColor;
36
38
  var tableBorderColor = (0, _components.themed)({
37
- light: _editorSharedStyles.akEditorTableBorder,
38
- dark: _editorSharedStyles.akEditorTableBorderDark
39
+ light: (0, _tokens.token)('color.border', _editorSharedStyles.akEditorTableBorder),
40
+ dark: (0, _tokens.token)('color.border', _editorSharedStyles.akEditorTableBorderDark)
39
41
  });
40
42
  exports.tableBorderColor = tableBorderColor;
41
43
  var tableFloatingControlsColor = _colors.N20;
@@ -15,7 +15,9 @@ var _styles = require("@atlaskit/editor-common/styles");
15
15
 
16
16
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
17
17
 
18
+ var _tokens = require("@atlaskit/tokens");
19
+
18
20
  var _templateObject;
19
21
 
20
- var taskDecisionStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n [data-decision-wrapper] {\n cursor: pointer;\n }\n\n .", " > [data-decision-wrapper],\n ol[data-node-type='decisionList'].", " {\n border-radius: 4px;\n ", "\n }\n\n .danger {\n .", ".", "\n > div {\n box-shadow: 0 0 0 ", "px ", ";\n background-color: ", ";\n &::after {\n content: none; /* reset the Blanket selection style */\n }\n }\n }\n"])), _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _styles.TaskDecisionSharedCssClassName.DECISION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, _editorSharedStyles.akEditorDeleteBackgroundWithOpacity);
22
+ var taskDecisionStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n [data-decision-wrapper] {\n cursor: pointer;\n }\n\n .", " > [data-decision-wrapper],\n ol[data-node-type='decisionList'].", " {\n border-radius: 4px;\n ", "\n }\n\n .danger {\n .", ".", "\n > div {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n &::after {\n content: none; /* reset the Blanket selection style */\n }\n }\n }\n"])), _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _styles.TaskDecisionSharedCssClassName.DECISION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, (0, _tokens.token)('color.border.danger', _editorSharedStyles.akEditorDeleteBorder), (0, _tokens.token)('color.blanket.danger', _editorSharedStyles.akEditorDeleteBackgroundWithOpacity));
21
23
  exports.taskDecisionStyles = taskDecisionStyles;
@@ -215,7 +215,8 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
215
215
  });
216
216
  },
217
217
  onEditorViewStateUpdated: function onEditorViewStateUpdated(_ref7) {
218
- var oldEditorState = _ref7.oldEditorState,
218
+ var originalTransaction = _ref7.originalTransaction,
219
+ oldEditorState = _ref7.oldEditorState,
219
220
  newEditorState = _ref7.newEditorState;
220
221
  var oldPluginState = (0, _utils.getPluginState)(oldEditorState);
221
222
  var newPluginState = (0, _utils.getPluginState)(newEditorState);
@@ -229,10 +230,13 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
229
230
  var isANewHandler = oldTriggerHandler !== newTriggerHandler;
230
231
 
231
232
  if (oldTriggerHandler !== null && oldTriggerHandler !== void 0 && oldTriggerHandler.dismiss && isANewHandler) {
233
+ var typeAheadMessage = originalTransaction.getMeta(_key.pluginKey);
234
+ var wasItemInserted = typeAheadMessage && typeAheadMessage.action === 'INSERT_RAW_QUERY';
232
235
  oldTriggerHandler.dismiss({
233
236
  editorState: newEditorState,
234
237
  query: oldPluginState.query,
235
- stats: (oldPluginState.stats || new _statsModifier.StatsModifier()).serialize()
238
+ stats: (oldPluginState.stats || new _statsModifier.StatsModifier()).serialize(),
239
+ wasItemInserted: wasItemInserted
236
240
  });
237
241
  }
238
242
 
@@ -13,16 +13,20 @@ var _adfSchema = require("@atlaskit/adf-schema");
13
13
 
14
14
  var _ui = require("@atlaskit/editor-common/ui");
15
15
 
16
+ var _unsupportedInlineNodeView = require("./unsupported-inline-node-view");
17
+
16
18
  var _nodeviews = require("../../nodeviews");
17
19
 
20
+ var _getInlineNodeViewProducer = require("../../nodeviews/getInlineNodeViewProducer");
21
+
18
22
  var pluginKey = new _prosemirrorState.PluginKey('unsupportedContentPlugin');
19
23
  exports.pluginKey = pluginKey;
20
24
 
21
- var createPlugin = function createPlugin(_ref) {
22
- var portalProviderAPI = _ref.portalProviderAPI,
23
- eventDispatcher = _ref.eventDispatcher,
24
- dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent;
25
+ var createPlugin = function createPlugin(pmPluginFactoryParams) {
25
26
  var hasIntlContext = true;
27
+ var portalProviderAPI = pmPluginFactoryParams.portalProviderAPI,
28
+ eventDispatcher = pmPluginFactoryParams.eventDispatcher,
29
+ dispatchAnalyticsEvent = pmPluginFactoryParams.dispatchAnalyticsEvent;
26
30
  return new _safePlugin.SafePlugin({
27
31
  key: pluginKey,
28
32
  props: {
@@ -30,15 +34,23 @@ var createPlugin = function createPlugin(_ref) {
30
34
  confluenceUnsupportedBlock: _nodeviews.ReactNodeView.fromComponent(_ui.UnsupportedBlock, portalProviderAPI, eventDispatcher, {
31
35
  dispatchAnalyticsEvent: dispatchAnalyticsEvent
32
36
  }, undefined, hasIntlContext),
33
- confluenceUnsupportedInline: _nodeviews.ReactNodeView.fromComponent(_ui.UnsupportedInline, portalProviderAPI, eventDispatcher, {
34
- dispatchAnalyticsEvent: dispatchAnalyticsEvent
35
- }, undefined, hasIntlContext),
37
+ confluenceUnsupportedInline: (0, _getInlineNodeViewProducer.getInlineNodeViewProducer)({
38
+ pmPluginFactoryParams: pmPluginFactoryParams,
39
+ Component: _unsupportedInlineNodeView.UnsupportedInlineNodeView,
40
+ extraComponentProps: {
41
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent
42
+ }
43
+ }),
36
44
  unsupportedBlock: _nodeviews.ReactNodeView.fromComponent(_ui.UnsupportedBlock, portalProviderAPI, eventDispatcher, {
37
45
  dispatchAnalyticsEvent: dispatchAnalyticsEvent
38
46
  }, undefined, hasIntlContext),
39
- unsupportedInline: _nodeviews.ReactNodeView.fromComponent(_ui.UnsupportedInline, portalProviderAPI, eventDispatcher, {
40
- dispatchAnalyticsEvent: dispatchAnalyticsEvent
41
- }, undefined, hasIntlContext)
47
+ unsupportedInline: (0, _getInlineNodeViewProducer.getInlineNodeViewProducer)({
48
+ pmPluginFactoryParams: pmPluginFactoryParams,
49
+ Component: _unsupportedInlineNodeView.UnsupportedInlineNodeView,
50
+ extraComponentProps: {
51
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent
52
+ }
53
+ })
42
54
  }
43
55
  }
44
56
  });
@@ -13,6 +13,8 @@ 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
20
  var UnsupportedSharedCssClassName = {
@@ -20,7 +22,7 @@ var UnsupportedSharedCssClassName = {
20
22
  INLINE_CONTAINER: 'unsupportedInlineView-content-wrap'
21
23
  };
22
24
  exports.UnsupportedSharedCssClassName = UnsupportedSharedCssClassName;
23
- var inlineUnsupportedSelector = ".".concat(UnsupportedSharedCssClassName.INLINE_CONTAINER, " > span");
25
+ var inlineUnsupportedSelector = ".".concat(UnsupportedSharedCssClassName.INLINE_CONTAINER, " > span:nth-child(2)");
24
26
  var blockUnsupportedSelector = ".".concat(UnsupportedSharedCssClassName.BLOCK_CONTAINER, " > div");
25
- var unsupportedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", ", ", " {\n cursor: pointer;\n }\n\n .", "", ",\n .", "", " {\n ", "\n }\n\n .danger {\n .", "", ",\n .", "", " {\n border: ", "px solid ", ";\n background-color: ", ";\n }\n }\n"])), blockUnsupportedSelector, inlineUnsupportedSelector, _editorSharedStyles.akEditorSelectedNodeClassName, blockUnsupportedSelector, _editorSharedStyles.akEditorSelectedNodeClassName, inlineUnsupportedSelector, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Background, _editorSharedStyles.SelectionStyle.Border]), _editorSharedStyles.akEditorSelectedNodeClassName, blockUnsupportedSelector, _editorSharedStyles.akEditorSelectedNodeClassName, inlineUnsupportedSelector, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, _editorSharedStyles.akEditorDeleteBackgroundWithOpacity);
27
+ var unsupportedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", ", ", " {\n cursor: pointer;\n }\n\n .", "", ",\n .", "", " {\n ", "\n }\n\n .danger {\n .", "", ",\n .", "", " {\n border: ", "px solid\n ", ";\n background-color: ", ";\n }\n }\n"])), blockUnsupportedSelector, inlineUnsupportedSelector, _editorSharedStyles.akEditorSelectedNodeClassName, blockUnsupportedSelector, _editorSharedStyles.akEditorSelectedNodeClassName, inlineUnsupportedSelector, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Background, _editorSharedStyles.SelectionStyle.Border]), _editorSharedStyles.akEditorSelectedNodeClassName, blockUnsupportedSelector, _editorSharedStyles.akEditorSelectedNodeClassName, inlineUnsupportedSelector, _editorSharedStyles.akEditorSelectedBorderSize, (0, _tokens.token)('color.border.danger', _editorSharedStyles.akEditorDeleteBorder), (0, _tokens.token)('color.blanket.danger', _editorSharedStyles.akEditorDeleteBackgroundWithOpacity));
26
28
  exports.unsupportedStyles = unsupportedStyles;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.UnsupportedInlineNodeView = void 0;
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _react2 = require("@emotion/react");
13
+
14
+ var _ui = require("@atlaskit/editor-common/ui");
15
+
16
+ /** @jsx jsx */
17
+ var UnsupportedInlineNodeView = function UnsupportedInlineNodeView(props) {
18
+ return (0, _react2.jsx)(_ui.UnsupportedInline, props);
19
+ };
20
+
21
+ exports.UnsupportedInlineNodeView = UnsupportedInlineNodeView;
@@ -39,13 +39,13 @@ var _styles = require("../styles");
39
39
 
40
40
  var _WithFlash = _interopRequireDefault(require("../WithFlash"));
41
41
 
42
- var _templateObject, _templateObject2;
42
+ var _templateObject, _templateObject2, _templateObject3;
43
43
 
44
44
  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); }; }
45
45
 
46
46
  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; } }
47
47
 
48
- var chromelessEditor = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n line-height: 20px;\n height: auto;\n min-height: 30px;\n\n overflow-x: hidden;\n overflow-y: auto;\n ", ";\n max-width: inherit;\n box-sizing: border-box;\n word-wrap: break-word;\n\n div > .ProseMirror {\n outline: none;\n white-space: pre-wrap;\n padding: 0;\n margin: 0;\n }\n"])), _styles.scrollbarStyles);
48
+ var chromelessEditor = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n line-height: 20px;\n height: auto;\n\n overflow-x: hidden;\n overflow-y: auto;\n ", ";\n max-width: inherit;\n box-sizing: border-box;\n word-wrap: break-word;\n\n div > .ProseMirror {\n outline: none;\n white-space: pre-wrap;\n padding: 0;\n margin: 0;\n }\n"])), _styles.scrollbarStyles);
49
49
  var ContentArea = (0, _ContentStyles.createEditorContentStyle)();
50
50
  ContentArea.displayName = 'ContentArea';
51
51
 
@@ -77,6 +77,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
77
77
  contentComponents = _this$props.contentComponents,
78
78
  customContentComponents = _this$props.customContentComponents,
79
79
  maxHeight = _this$props.maxHeight,
80
+ _this$props$minHeight = _this$props.minHeight,
81
+ minHeight = _this$props$minHeight === void 0 ? 30 : _this$props$minHeight,
80
82
  popupsMountPoint = _this$props.popupsMountPoint,
81
83
  popupsBoundariesElement = _this$props.popupsBoundariesElement,
82
84
  popupsScrollableElement = _this$props.popupsScrollableElement,
@@ -86,7 +88,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
86
88
  return (0, _react2.jsx)(_WithFlash.default, {
87
89
  animate: maxContentSizeReached
88
90
  }, (0, _react2.jsx)("div", {
89
- css: [chromelessEditor, maxHeight && (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n max-height: ", "px;\n "])), maxHeight)],
91
+ css: [chromelessEditor, maxHeight && (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n max-height: ", "px;\n "])), maxHeight), (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n min-height: ", "px;\n "])), minHeight)],
92
+ "data-testid": "chromeless-editor",
90
93
  ref: function ref(_ref2) {
91
94
  return _this.containerElement = _ref2;
92
95
  }
@@ -69,7 +69,7 @@ var _Toolbar2 = require("./Toolbar");
69
69
 
70
70
  var _ContentStyles = require("../../ContentStyles");
71
71
 
72
- var _templateObject, _templateObject2, _templateObject3, _templateObject4;
72
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
73
73
 
74
74
  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); }; }
75
75
 
@@ -77,7 +77,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
77
77
 
78
78
  var CommentEditorMargin = 14;
79
79
  var CommentEditorSmallerMargin = 8;
80
- var commentEditorStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n\n .less-margin .ProseMirror {\n margin: 12px ", "px ", "px;\n }\n\n min-width: 272px;\n /* Border + Toolbar + Footer + (Paragraph + ((Parahraph + Margin) * (DefaultLines - 1)) */\n /* calc(2px + 40px + 24px + ( 20px + (32px * 2))) */\n min-height: 150px;\n height: auto;\n background-color: white;\n border: 1px solid ", ";\n box-sizing: border-box;\n border-radius: ", "px;\n\n max-width: inherit;\n word-wrap: break-word;\n"])), CommentEditorSmallerMargin, CommentEditorSmallerMargin, _colors.N40, (0, _constants.borderRadius)());
80
+ var commentEditorStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n\n .less-margin .ProseMirror {\n margin: 12px ", "px ", "px;\n }\n\n min-width: 272px;\n /* Border + Toolbar + Footer + (Paragraph + ((Parahraph + Margin) * (DefaultLines - 1)) */\n /* calc(2px + 40px + 24px + ( 20px + (32px * 2))) */\n\n height: auto;\n background-color: white;\n border: 1px solid ", ";\n box-sizing: border-box;\n border-radius: ", "px;\n\n max-width: inherit;\n word-wrap: break-word;\n"])), CommentEditorSmallerMargin, CommentEditorSmallerMargin, _colors.N40, (0, _constants.borderRadius)());
81
81
  var ContentArea = (0, _ContentStyles.createEditorContentStyle)((0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n flex-grow: 1;\n overflow-x: hidden;\n overflow-y: auto;\n line-height: 24px;\n\n /** Hack for Bitbucket to ensure entire editorView gets drop event; see ED-3294 **/\n /** Hack for tables controlls. Otherwise marging collapse and controlls are misplaced. **/\n .ProseMirror {\n margin: 12px ", "px ", "px;\n }\n\n .gridParent {\n margin-left: ", "px;\n margin-right: ", "px;\n width: calc(100% + ", "px);\n }\n\n padding: ", "px;\n\n ", ";\n"])), CommentEditorMargin, CommentEditorMargin, CommentEditorMargin - _grid.GRID_GUTTER, CommentEditorMargin - _grid.GRID_GUTTER, CommentEditorMargin - _grid.GRID_GUTTER, _Toolbar2.TableControlsPadding, _commonStyles.tableCommentEditorStyles));
82
82
  ContentArea.displayName = 'ContentArea';
83
83
  var secondaryToolbarStyle = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n box-sizing: border-box;\n justify-content: flex-end;\n align-items: center;\n display: flex;\n padding: 12px 1px;\n"])));
@@ -127,6 +127,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
127
127
  popupsBoundariesElement = _this$props.popupsBoundariesElement,
128
128
  popupsScrollableElement = _this$props.popupsScrollableElement,
129
129
  maxHeight = _this$props.maxHeight,
130
+ _this$props$minHeight = _this$props.minHeight,
131
+ minHeight = _this$props$minHeight === void 0 ? 150 : _this$props$minHeight,
130
132
  onSave = _this$props.onSave,
131
133
  onCancel = _this$props.onCancel,
132
134
  disabled = _this$props.disabled,
@@ -138,7 +140,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
138
140
  return (0, _react2.jsx)(_WithFlash.default, {
139
141
  animate: maxContentSizeReached
140
142
  }, (0, _react2.jsx)("div", {
141
- css: commentEditorStyle,
143
+ css: [commentEditorStyle, (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n min-height: ", "px;\n "])), minHeight)],
142
144
  className: "akEditor"
143
145
  }, (0, _react2.jsx)(_Toolbar2.MainToolbar, {
144
146
  useStickyToolbar: useStickyToolbar
@@ -165,7 +167,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
165
167
  ref: function ref(_ref3) {
166
168
  return _this.containerElement = _ref3;
167
169
  },
168
- css: maxHeight ? (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n max-height: ", "px;\n "])), maxHeight) : null,
170
+ css: maxHeight ? (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n max-height: ", "px;\n "])), maxHeight) : null,
169
171
  className: (0, _classnames.default)('ak-editor-content-area', {
170
172
  'less-margin': width < _editorSharedStyles.akEditorMobileBreakoutPoint
171
173
  })
@@ -17,7 +17,9 @@ var _constants = require("@atlaskit/theme/constants");
17
17
 
18
18
  var _colors = require("@atlaskit/theme/colors");
19
19
 
20
+ var _tokens = require("@atlaskit/tokens");
21
+
20
22
  var _templateObject;
21
23
 
22
- var inputStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n /* Normal .className gets overridden by input[type=text] hence this hack to produce input.className */\n input& {\n background-color: white;\n border: 1px solid ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n height: 40px;\n padding-left: 20px;\n padding-top: 12px;\n padding-bottom: 12px;\n font-size: ", ";\n width: 100%;\n font-weight: 400;\n line-height: 1.42857142857143;\n letter-spacing: -0.005em;\n color: ", ";\n\n &:hover {\n border-color: ", ";\n cursor: text;\n }\n }\n"])), _editorSharedStyles.akEditorSubtleAccent, (0, _constants.borderRadius)(), (0, _editorSharedStyles.relativeFontSizeToBase16)(14), _colors.N300, _colors.N50);
24
+ var inputStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n /* Normal .className gets overridden by input[type=text] hence this hack to produce input.className */\n input& {\n background-color: white;\n border: 1px solid ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n height: 40px;\n padding-left: 20px;\n padding-top: 12px;\n padding-bottom: 12px;\n font-size: ", ";\n width: 100%;\n font-weight: 400;\n line-height: 1.42857142857143;\n letter-spacing: -0.005em;\n color: ", ";\n\n &:hover {\n border-color: ", ";\n cursor: text;\n }\n }\n"])), (0, _tokens.token)('color.border.input', _editorSharedStyles.akEditorSubtleAccent), (0, _constants.borderRadius)(), (0, _editorSharedStyles.relativeFontSizeToBase16)(14), _colors.N300, _colors.N50);
23
25
  exports.inputStyle = inputStyle;
@@ -86,11 +86,11 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
86
86
  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; }
87
87
 
88
88
  var contentStyles = function contentStyles(props) {
89
- var _props$featureFlags, _props$featureFlags2;
89
+ var _props$featureFlags;
90
90
 
91
91
  return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid #8cf;\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap,\n .pm-table-cell-content-wrap div.fabric-editor-block-mark {\n p:first-child {\n margin-top: 0;\n }\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), (0, _editorSharedStyles.editorFontSize)({
92
92
  theme: props.theme
93
- }), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, _styles17.placeholderTextStyles, _styles5.placeholderStyles, (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.codeBlockSyntaxHighlighting ? (0, _styles7.highlightingCodeBlockStyles)(props) : (0, _styles7.codeBlockStyles)(props), (0, _styles6.blocktypeStyles)(props), (0, _styles16.textFormattingStyles)(props), _styles.textColorStyles, _styles8.listsStyles, (0, _styles9.ruleStyles)(props), _styles10.mediaStyles, _styles11.layoutStyles, _styles3.telepointerStyle, _styles4.gapCursorStyles, (0, _commonStyles.tableStyles)(props), (0, _styles12.panelStyles)(props), _styles13.fakeCursorStyles, _styles14.mentionsStyles, (_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.nextEmojiNodeView ? _styles15.emojiStylesNext : _styles15.emojiStyles, _styles.tasksAndDecisionsStyles, _styles18.gridStyles, _styles19.linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _styles20.extensionStyles, (0, _styles21.expandStyles)(props), _styles22.findReplaceStyles, _styles23.taskDecisionStyles, _styles24.statusStyles, (0, _styles.annotationSharedStyles)(props), _styles25.smartCardStyles, _styles.smartCardSharedStyles, _styles26.dateStyles, _styled.embedCardStyles, _styles2.unsupportedStyles, _style.ClassNames.FLOATING_TOOLBAR_COMPONENT);
93
+ }), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, _styles17.placeholderTextStyles, _styles5.placeholderStyles, (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.codeBlockSyntaxHighlighting ? (0, _styles7.highlightingCodeBlockStyles)(props) : (0, _styles7.codeBlockStyles)(props), (0, _styles6.blocktypeStyles)(props), (0, _styles16.textFormattingStyles)(props), _styles.textColorStyles, _styles8.listsStyles, (0, _styles9.ruleStyles)(props), _styles10.mediaStyles, _styles11.layoutStyles, _styles3.telepointerStyle, _styles4.gapCursorStyles, (0, _commonStyles.tableStyles)(props), (0, _styles12.panelStyles)(props), _styles13.fakeCursorStyles, _styles14.mentionsStyles, _styles15.emojiStyles, _styles.tasksAndDecisionsStyles, _styles18.gridStyles, _styles19.linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _styles20.extensionStyles, (0, _styles21.expandStyles)(props), _styles22.findReplaceStyles, _styles23.taskDecisionStyles, _styles24.statusStyles, (0, _styles.annotationSharedStyles)(props), _styles25.smartCardStyles, _styles.smartCardSharedStyles, _styles26.dateStyles, _styled.embedCardStyles, _styles2.unsupportedStyles, _style.ClassNames.FLOATING_TOOLBAR_COMPONENT);
94
94
  };
95
95
 
96
96
  var createEditorContentStyle = function createEditorContentStyle(styles) {
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/editor-core";
8
8
  exports.name = name;
9
- var version = "164.0.4";
9
+ var version = "166.0.1";
10
10
  exports.version = version;
11
11
 
12
12
  var nextMajorVersion = function nextMajorVersion() {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "164.0.4",
3
+ "version": "166.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -10,6 +10,7 @@ import { analyticsEventKey } from '@atlaskit/editor-common/utils';
10
10
  import { findNodePosWithLocalId } from '../plugins/extension/utils';
11
11
  import { getFeatureFlags } from '../plugins/feature-flags-context/get-feature-flags';
12
12
  import { getCollabProvider } from '../plugins/collab-edit/native-collab-provider-plugin';
13
+ import deprecationWarnings from '../utils/deprecation-warnings';
13
14
  export default class EditorActions {
14
15
  constructor() {
15
16
  _defineProperty(this, "listeners", []);
@@ -196,7 +197,17 @@ export default class EditorActions {
196
197
  return isEmptyDocument(this.editorView.state.doc);
197
198
  }
198
199
 
199
- replaceDocument(rawValue, shouldScrollToBottom = true, shouldAddToHistory = true) {
200
+ replaceDocument(rawValue, shouldScrollToBottom = true,
201
+ /** @deprecated [ED-14158] shouldAddToHistory is not being used in this function */
202
+ shouldAddToHistory = true) {
203
+ deprecationWarnings('EditorActions.replaceDocument', {
204
+ shouldAddToHistory
205
+ }, [{
206
+ property: 'shouldAddToHistory',
207
+ description: '[ED-14158] EditorActions.replaceDocument does not use the shouldAddToHistory arg',
208
+ type: 'removed'
209
+ }]);
210
+
200
211
  if (!this.editorView || rawValue === undefined || rawValue === null) {
201
212
  return false;
202
213
  }
@@ -534,9 +534,20 @@ export class ReactEditorView extends React.Component {
534
534
  config: this.config,
535
535
  eventDispatcher: this.eventDispatcher,
536
536
  transformer: this.contentTransformer
537
- });
537
+ }); // Allows us to dispatch analytics within the plugin view.destory methods
538
+
539
+ const analyticsConnected = this.eventDispatcher.has(analyticsEventKey, this.handleAnalyticsEvent);
540
+
541
+ if (!analyticsConnected) {
542
+ this.eventDispatcher.on(analyticsEventKey, this.handleAnalyticsEvent);
543
+ }
544
+
538
545
  this.view.destroy(); // Destroys the dom node & all node views
539
546
 
547
+ if (!analyticsConnected) {
548
+ this.eventDispatcher.off(analyticsEventKey, this.handleAnalyticsEvent);
549
+ }
550
+
540
551
  this.view = undefined;
541
552
  }
542
553
  });
@@ -667,7 +678,6 @@ export class ReactEditorView extends React.Component {
667
678
  // This serves to avoid potential runtime exceptions which could arise
668
679
  // from an async dispatched transaction after it's unmounted.
669
680
  this.canDispatchTransactions = false;
670
- this.eventDispatcher.destroy();
671
681
  clearTimeout(this.focusTimeoutId);
672
682
 
673
683
  if (this.reliabilityInterval) {
@@ -686,11 +696,9 @@ export class ReactEditorView extends React.Component {
686
696
  state.destroy();
687
697
  }
688
698
  });
689
- } // this.view will be destroyed when React unmounts in handleEditorViewRef
690
-
699
+ }
691
700
 
692
- this.eventDispatcher.off(analyticsEventKey, this.handleAnalyticsEvent);
693
- this.eventDispatcher.off('resetEditorState', this.resetEditorState);
701
+ this.eventDispatcher.destroy(); // this.view will be destroyed when React unmounts in handleEditorViewRef
694
702
  } // Helper to allow tests to inject plugins directly
695
703
 
696
704
 
@@ -192,8 +192,7 @@ export default function createPluginsList(props, prevProps, createAnalyticsEvent
192
192
 
193
193
  if (props.emojiProvider) {
194
194
  preset.add([emojiPlugin, {
195
- createAnalyticsEvent,
196
- allowZeroWidthSpaceAfter: !isMobile
195
+ createAnalyticsEvent
197
196
  }]);
198
197
  }
199
198
 
@@ -497,6 +497,7 @@ export default class Editor extends React.Component {
497
497
  eventDispatcher: eventDispatcher,
498
498
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
499
499
  maxHeight: this.props.maxHeight,
500
+ minHeight: this.props.minHeight,
500
501
  onSave: this.props.onSave ? this.handleSave : undefined,
501
502
  onCancel: this.props.onCancel,
502
503
  popupsMountPoint: this.props.popupsMountPoint,
@@ -536,6 +537,19 @@ _defineProperty(Editor, "defaultProps", {
536
537
  quickInsert: true
537
538
  });
538
539
 
540
+ _defineProperty(Editor, "propTypes", {
541
+ minHeight: ({
542
+ appearance,
543
+ minHeight
544
+ }) => {
545
+ if (minHeight && appearance && !['comment', 'chromeless'].includes(appearance)) {
546
+ return new Error('minHeight only supports editor appearance chromeless and comment');
547
+ }
548
+
549
+ return null;
550
+ }
551
+ });
552
+
539
553
  _defineProperty(Editor, "contextTypes", {
540
554
  editorActions: PropTypes.object
541
555
  });
@@ -12,6 +12,14 @@ export class EventDispatcher {
12
12
  this.listeners[event].add(cb);
13
13
  }
14
14
 
15
+ has(event, cb) {
16
+ if (!this.listeners[event]) {
17
+ return false;
18
+ }
19
+
20
+ return this.listeners[event].has(cb);
21
+ }
22
+
15
23
  off(event, cb) {
16
24
  if (!this.listeners[event]) {
17
25
  return;
@@ -4,7 +4,6 @@ import React from 'react';
4
4
  import { createDispatch } from '../event-dispatcher';
5
5
  import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../plugins/analytics';
6
6
  import { analyticsEventKey } from '../plugins/analytics/consts';
7
- import { getFeatureFlags } from '../plugins/feature-flags-context';
8
7
  import { ErrorBoundary } from '../ui/ErrorBoundary';
9
8
  import { getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered } from './getPerformanceOptions';
10
9
  export default class ReactNodeView {
@@ -101,20 +100,12 @@ export default class ReactNodeView {
101
100
  this.portalProviderAPI.render(componentWithErrorBoundary, this.domRef, this.hasAnalyticsContext, this.hasIntlContext);
102
101
  }
103
102
 
104
- createDomRef(options) {
103
+ createDomRef() {
105
104
  if (!this.node.isInline) {
106
105
  return document.createElement('div');
107
106
  }
108
107
 
109
108
  const htmlElement = document.createElement('span');
110
- const state = this.view.state;
111
- const featureFlags = getFeatureFlags(state);
112
-
113
- if (featureFlags && featureFlags.displayInlineBlockForInlineNodes && (options === null || options === void 0 ? void 0 : options.displayInlineBlockForInlineNodes) !== false) {
114
- htmlElement.style.display = 'inline-block';
115
- htmlElement.style.userSelect = 'all';
116
- }
117
-
118
109
  return htmlElement;
119
110
  }
120
111
 
@@ -6,6 +6,15 @@ export const InlineNodeViewSharedStyles = css`
6
6
  .inlineNodeView {
7
7
  display: inline;
8
8
  user-select: all;
9
+ /* Collapses zero width spaces inside the inline node view
10
+ to prevent the node from line breaking too early.
11
+ */
12
+ white-space: nowrap;
13
+ /* Then reset to the Editor default so we don't interfere
14
+ with any component styling. */
15
+ & > * {
16
+ white-space: pre-wrap;
17
+ }
9
18
  }
10
19
 
11
20
  &.ua-chrome .inlineNodeView > span {
@@ -55,6 +55,7 @@ export let ACTION;
55
55
  ACTION["INDENTED"] = "indented";
56
56
  ACTION["INITIALISED"] = "initialised";
57
57
  ACTION["INPUT_PERF_SAMPLING"] = "inputPerfSampling";
58
+ ACTION["INPUT_PERF_SAMPLING_AVG"] = "inputPerfSamplingAvg";
58
59
  ACTION["INSERTED"] = "inserted";
59
60
  ACTION["INVALID_DOCUMENT_ENCOUNTERED"] = "invalidDocumentEncountered";
60
61
  ACTION["INVOKED"] = "invoked";