@atlaskit/editor-core 164.0.3 → 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 (194) 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 +32 -1
  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/ui/PortalProvider/PortalProviderThemesProvider.js +57 -0
  51. package/dist/cjs/ui/PortalProvider/index.js +66 -19
  52. package/dist/cjs/utils/check-if-mobile-bridge.js +19 -0
  53. package/dist/cjs/version-wrapper.js +1 -1
  54. package/dist/cjs/version.json +1 -1
  55. package/dist/es2019/actions/index.js +12 -1
  56. package/dist/es2019/create-editor/ReactEditorView.js +14 -6
  57. package/dist/es2019/create-editor/create-plugins-list.js +1 -2
  58. package/dist/es2019/editor.js +33 -2
  59. package/dist/es2019/event-dispatcher/index.js +8 -0
  60. package/dist/es2019/nodeviews/ReactNodeView.js +1 -10
  61. package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +9 -0
  62. package/dist/es2019/plugins/analytics/types/enums.js +1 -0
  63. package/dist/es2019/plugins/base/pm-plugins/frozen-editor.js +138 -80
  64. package/dist/es2019/plugins/base/utils/input-latency-tracking.js +128 -0
  65. package/dist/es2019/plugins/card/styles.js +9 -5
  66. package/dist/es2019/plugins/code-block/styles.js +11 -8
  67. package/dist/es2019/plugins/collab-edit/plugin-state.js +23 -8
  68. package/dist/es2019/plugins/date/styles.js +3 -1
  69. package/dist/es2019/plugins/emoji/index.js +16 -21
  70. package/dist/es2019/plugins/emoji/nodeviews/emoji.js +12 -31
  71. package/dist/es2019/plugins/emoji/styles.js +1 -82
  72. package/dist/es2019/plugins/expand/ui/styles.js +2 -2
  73. package/dist/es2019/plugins/extension/ui/styles.js +4 -2
  74. package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
  75. package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +1 -8
  76. package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +1 -8
  77. package/dist/es2019/plugins/layout/styles.js +3 -2
  78. package/dist/es2019/plugins/list/commands/indent-list.js +4 -1
  79. package/dist/es2019/plugins/list/commands/outdent-list.js +4 -1
  80. package/dist/es2019/plugins/list/transforms.js +9 -4
  81. package/dist/es2019/plugins/media/styles.js +9 -7
  82. package/dist/es2019/plugins/mentions/index.js +1 -6
  83. package/dist/es2019/plugins/mentions/nodeviews/mention.js +16 -35
  84. package/dist/es2019/plugins/mentions/pm-plugins/main.js +18 -10
  85. package/dist/es2019/plugins/mentions/type-ahead/index.js +7 -2
  86. package/dist/es2019/plugins/panel/styles.js +5 -4
  87. package/dist/es2019/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
  88. package/dist/es2019/plugins/rule/styles.js +2 -1
  89. package/dist/es2019/plugins/selection/utils.js +35 -20
  90. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +22 -0
  91. package/dist/es2019/plugins/table/ui/common-styles.js +4 -0
  92. package/dist/es2019/plugins/table/ui/consts.js +5 -4
  93. package/dist/es2019/plugins/tasks-and-decisions/styles.js +4 -2
  94. package/dist/es2019/plugins/type-ahead/index.js +5 -1
  95. package/dist/es2019/plugins/unsupported-content/index.js +23 -12
  96. package/dist/es2019/plugins/unsupported-content/styles.js +5 -3
  97. package/dist/es2019/plugins/unsupported-content/unsupported-inline-node-view.js +7 -0
  98. package/dist/es2019/ui/Appearance/Chromeless.js +5 -2
  99. package/dist/es2019/ui/Appearance/Comment/Comment.js +5 -2
  100. package/dist/es2019/ui/ChromeCollapsed/styles.js +2 -1
  101. package/dist/es2019/ui/ContentStyles/index.js +3 -3
  102. package/dist/es2019/ui/PortalProvider/PortalProviderThemesProvider.js +39 -0
  103. package/dist/es2019/ui/PortalProvider/index.js +39 -3
  104. package/dist/es2019/utils/check-if-mobile-bridge.js +12 -0
  105. package/dist/es2019/version-wrapper.js +1 -1
  106. package/dist/es2019/version.json +1 -1
  107. package/dist/esm/actions/index.js +8 -0
  108. package/dist/esm/create-editor/ReactEditorView.js +14 -6
  109. package/dist/esm/create-editor/create-plugins-list.js +1 -2
  110. package/dist/esm/editor.js +33 -2
  111. package/dist/esm/event-dispatcher/index.js +9 -0
  112. package/dist/esm/nodeviews/ReactNodeView.js +1 -10
  113. package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
  114. package/dist/esm/plugins/analytics/types/enums.js +1 -0
  115. package/dist/esm/plugins/base/pm-plugins/frozen-editor.js +128 -79
  116. package/dist/esm/plugins/base/utils/input-latency-tracking.js +149 -0
  117. package/dist/esm/plugins/card/styles.js +2 -1
  118. package/dist/esm/plugins/code-block/styles.js +5 -4
  119. package/dist/esm/plugins/collab-edit/plugin-state.js +21 -6
  120. package/dist/esm/plugins/date/styles.js +2 -1
  121. package/dist/esm/plugins/emoji/index.js +26 -29
  122. package/dist/esm/plugins/emoji/nodeviews/emoji.js +11 -56
  123. package/dist/esm/plugins/emoji/styles.js +3 -14
  124. package/dist/esm/plugins/expand/ui/styles.js +2 -2
  125. package/dist/esm/plugins/extension/ui/styles.js +2 -1
  126. package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
  127. package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +1 -8
  128. package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +1 -8
  129. package/dist/esm/plugins/layout/styles.js +2 -1
  130. package/dist/esm/plugins/list/commands/indent-list.js +4 -1
  131. package/dist/esm/plugins/list/commands/outdent-list.js +4 -1
  132. package/dist/esm/plugins/list/transforms.js +9 -4
  133. package/dist/esm/plugins/media/styles.js +2 -1
  134. package/dist/esm/plugins/mentions/index.js +10 -14
  135. package/dist/esm/plugins/mentions/nodeviews/mention.js +13 -58
  136. package/dist/esm/plugins/mentions/pm-plugins/main.js +18 -10
  137. package/dist/esm/plugins/mentions/type-ahead/index.js +7 -2
  138. package/dist/esm/plugins/panel/styles.js +2 -1
  139. package/dist/esm/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
  140. package/dist/esm/plugins/rule/styles.js +2 -1
  141. package/dist/esm/plugins/selection/utils.js +35 -20
  142. package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +23 -0
  143. package/dist/esm/plugins/table/ui/common-styles.js +1 -1
  144. package/dist/esm/plugins/table/ui/consts.js +5 -4
  145. package/dist/esm/plugins/tasks-and-decisions/styles.js +2 -1
  146. package/dist/esm/plugins/type-ahead/index.js +6 -2
  147. package/dist/esm/plugins/unsupported-content/index.js +21 -11
  148. package/dist/esm/plugins/unsupported-content/styles.js +3 -2
  149. package/dist/esm/plugins/unsupported-content/unsupported-inline-node-view.js +7 -0
  150. package/dist/esm/ui/Appearance/Chromeless.js +6 -3
  151. package/dist/esm/ui/Appearance/Comment/Comment.js +6 -4
  152. package/dist/esm/ui/ChromeCollapsed/styles.js +2 -1
  153. package/dist/esm/ui/ContentStyles/index.js +3 -3
  154. package/dist/esm/ui/PortalProvider/PortalProviderThemesProvider.js +39 -0
  155. package/dist/esm/ui/PortalProvider/index.js +61 -19
  156. package/dist/esm/utils/check-if-mobile-bridge.js +12 -0
  157. package/dist/esm/version-wrapper.js +1 -1
  158. package/dist/esm/version.json +1 -1
  159. package/dist/types/actions/index.d.ts +3 -1
  160. package/dist/types/editor.d.ts +3 -0
  161. package/dist/types/event-dispatcher/index.d.ts +1 -0
  162. package/dist/types/nodeviews/ReactNodeView.d.ts +1 -5
  163. package/dist/types/plugins/analytics/types/enums.d.ts +1 -0
  164. package/dist/types/plugins/analytics/types/events.d.ts +2 -2
  165. package/dist/types/plugins/analytics/types/general-events.d.ts +10 -1
  166. package/dist/types/plugins/base/utils/input-latency-tracking.d.ts +44 -0
  167. package/dist/types/plugins/collab-edit/plugin-state.d.ts +4 -0
  168. package/dist/types/plugins/emoji/index.d.ts +2 -6
  169. package/dist/types/plugins/emoji/nodeviews/emoji.d.ts +4 -14
  170. package/dist/types/plugins/emoji/styles.d.ts +0 -1
  171. package/dist/types/plugins/emoji/types.d.ts +0 -1
  172. package/dist/types/plugins/list/transforms.d.ts +10 -1
  173. package/dist/types/plugins/mentions/nodeviews/mention.d.ts +6 -14
  174. package/dist/types/plugins/mentions/pm-plugins/main.d.ts +2 -5
  175. package/dist/types/plugins/selection/utils.d.ts +7 -15
  176. package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +3 -0
  177. package/dist/types/plugins/table/ui/consts.d.ts +2 -2
  178. package/dist/types/plugins/type-ahead/types.d.ts +1 -0
  179. package/dist/types/plugins/unsupported-content/unsupported-inline-node-view.d.ts +11 -0
  180. package/dist/types/types/editor-appearance-component.d.ts +1 -0
  181. package/dist/types/types/editor-props.d.ts +1 -0
  182. package/dist/types/types/feature-flags.d.ts +0 -14
  183. package/dist/types/ui/Appearance/Chromeless.d.ts +1 -0
  184. package/dist/types/ui/Appearance/Comment/Comment.d.ts +1 -0
  185. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +5 -5
  186. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  187. package/dist/types/ui/PortalProvider/PortalProviderThemesProvider.d.ts +6 -0
  188. package/dist/types/ui/PortalProvider/index.d.ts +5 -1
  189. package/dist/types/utils/check-if-mobile-bridge.d.ts +1 -0
  190. package/package.json +24 -23
  191. package/dist/cjs/plugins/emoji/nodeviews/emoji-next.js +0 -250
  192. package/dist/es2019/plugins/emoji/nodeviews/emoji-next.js +0 -177
  193. package/dist/esm/plugins/emoji/nodeviews/emoji-next.js +0 -234
  194. package/dist/types/plugins/emoji/nodeviews/emoji-next.d.ts +0 -31
@@ -9,8 +9,9 @@ exports.getAllSelectionAnalyticsPayload = getAllSelectionAnalyticsPayload;
9
9
  exports.getCellSelectionAnalyticsPayload = getCellSelectionAnalyticsPayload;
10
10
  exports.getDecorations = void 0;
11
11
  exports.getNodeSelectionAnalyticsPayload = getNodeSelectionAnalyticsPayload;
12
+ exports.getNodesToDecorateFromSelection = void 0;
12
13
  exports.getRangeSelectionAnalyticsPayload = getRangeSelectionAnalyticsPayload;
13
- exports.isSelectionAtStartOfParentNode = exports.isSelectionAtEndOfParentNode = exports.isSelectableContainerNode = exports.isSelectableChildNode = exports.getTopLevelNodesFromSelection = void 0;
14
+ exports.isSelectionAtStartOfParentNode = exports.isSelectionAtEndOfParentNode = exports.isSelectableContainerNode = exports.isSelectableChildNode = void 0;
14
15
  exports.shouldRecalcDecorations = shouldRecalcDecorations;
15
16
 
16
17
  var _prosemirrorState = require("prosemirror-state");
@@ -67,7 +68,7 @@ var getDecorations = function getDecorations(tr) {
67
68
  }
68
69
 
69
70
  if (tr.selection instanceof _prosemirrorState.TextSelection || tr.selection instanceof _prosemirrorState.AllSelection) {
70
- var decorations = getTopLevelNodesFromSelection(tr.selection, tr.doc).map(function (_ref) {
71
+ var decorations = getNodesToDecorateFromSelection(tr.selection, tr.doc).map(function (_ref) {
71
72
  var node = _ref.node,
72
73
  pos = _ref.pos;
73
74
  return _prosemirrorView.Decoration.node(pos, pos + node.nodeSize, {
@@ -124,39 +125,54 @@ function getCellSelectionAnalyticsPayload(state) {
124
125
  };
125
126
  }
126
127
  }
128
+
129
+ var topLevelBlockNodesThatHaveSelectionStyles = ['table', 'panel', 'expand', 'layoutSection', 'decisionList', 'decisionItem', 'codeBlock'];
127
130
  /**
128
- * Use `getTopLevelNodesFromSelection` to collect and return
129
- * a list of only the outermost nodes of the given/passed `Selection`. This
130
- * function will ignore `paragraph` and `text` node types when collecting
131
- * top-level nodes. It will also ignore any top-level nodes that don't
132
- * completely sit within the given `Selection`.
133
- *
134
- * For example, using the following document:
135
- * ```
136
- * doc(p('{<}one'), blockquote(p('hello')), p(expand({ title: 'two' })(p('three'))), p('four{>}'))))
137
- * ```
138
- * we would expect `getTopLevelNodesFromSelection` to return:
139
- * ```
140
- * [blockquote(p('hello')), expand({ title: 'two' })(p('three')))]
141
- * ```
131
+ * Use `getNodesToDecorateFromSelection` to collect and return
132
+ * a list of nodes within the Selection that should have Selection
133
+ * decorations applied. This allows selection styles to be added to
134
+ * nested nodes. It will ignore text nodes as decorations are
135
+ * applied natively and also ignore nodes that don't completely
136
+ * sit within the given `Selection`.
142
137
  */
143
138
 
144
-
145
- var getTopLevelNodesFromSelection = function getTopLevelNodesFromSelection(selection, doc) {
139
+ var getNodesToDecorateFromSelection = function getNodesToDecorateFromSelection(selection, doc) {
146
140
  var nodes = [];
147
141
 
148
142
  if (selection.from !== selection.to) {
149
143
  var from = selection.from,
150
144
  to = selection.to;
151
145
  doc.nodesBetween(from, to, function (node, pos) {
152
- var withinSelection = from <= pos && pos + node.nodeSize <= to;
153
-
154
- if (node && node.type.name !== 'paragraph' && !node.isText && withinSelection) {
146
+ var withinSelection = from <= pos && pos + node.nodeSize <= to; // The reason we need to check for these nodes is to stop
147
+ // traversing their children if they are within a selection -
148
+ // this is to prevent selection styles from being added to
149
+ // the children as well as the parent node.
150
+ // Example scenario is if an entire table has been selected
151
+ // we should not traverse its children so we can apply the
152
+ // selection styles to the table. But if an entire tableRow
153
+ // has been selected (but the parent table has not) we should
154
+ // traverse it as it could contain other nodes that need
155
+ // selection styles. I couldn’t see a clear way to differentiate
156
+ // without explicitly stating which nodes should be traversed
157
+ // and which shouldn’t.
158
+
159
+ var isTopLevelNodeThatHasSelectionStyles = topLevelBlockNodesThatHaveSelectionStyles.includes(node.type.name); // If the node is a top-level block node and completely sits within
160
+ // the selection, we do not recurse it's children to prevent selection
161
+ // styles being added to its child nodes. The expected behaviour
162
+ // is that selection styles are only added to the parent.
163
+
164
+ if (node && withinSelection && isTopLevelNodeThatHasSelectionStyles) {
165
+ nodes.push({
166
+ node: node,
167
+ pos: pos
168
+ });
169
+ return false; // Otherwise we recurse the children and return them so we can apply
170
+ // selection styles. Text is handled by the browser.
171
+ } else if (node && withinSelection && !node.isText) {
155
172
  nodes.push({
156
173
  node: node,
157
174
  pos: pos
158
175
  });
159
- return false;
160
176
  }
161
177
 
162
178
  return true;
@@ -166,7 +182,7 @@ var getTopLevelNodesFromSelection = function getTopLevelNodesFromSelection(selec
166
182
  return nodes;
167
183
  };
168
184
 
169
- exports.getTopLevelNodesFromSelection = getTopLevelNodesFromSelection;
185
+ exports.getNodesToDecorateFromSelection = getNodesToDecorateFromSelection;
170
186
 
171
187
  function getRangeSelectionAnalyticsPayload(selection, doc) {
172
188
  if (selection instanceof _prosemirrorState.TextSelection && selection.from !== selection.to) {
@@ -33,6 +33,16 @@ var _dom2 = require("./dom");
33
33
 
34
34
  var _featureFlagsContext = require("../../../../feature-flags-context");
35
35
 
36
+ var _debounce = _interopRequireDefault(require("lodash/debounce"));
37
+
38
+ var _throttle = _interopRequireDefault(require("lodash/throttle"));
39
+
40
+ // limit scroll event calls
41
+ var HEADER_ROW_SCROLL_THROTTLE_TIMEOUT = 200; // timeout for resetting the scroll class - if it’s too long then users won’t be able to click on the header cells,
42
+ // if too short it would trigger too many dom udpates.
43
+
44
+ var HEADER_ROW_SCROLL_RESET_DEBOUNCE_TIMEOUT = 400;
45
+
36
46
  var supportedHeaderRow = function supportedHeaderRow(node) {
37
47
  var allHeaders = (0, _slice.mapChildren)(node, function (child) {
38
48
  return child.type.name === 'tableHeader';
@@ -58,6 +68,16 @@ var TableRowNodeView = /*#__PURE__*/function () {
58
68
  (0, _defineProperty2.default)(this, "stickyHeadersOptimization", false);
59
69
  (0, _defineProperty2.default)(this, "sentinels", {});
60
70
  (0, _defineProperty2.default)(this, "listening", false);
71
+ (0, _defineProperty2.default)(this, "headerRowMouseScrollEnd", (0, _debounce.default)(function () {
72
+ _this.dom.classList.remove('no-pointer-events');
73
+ }, HEADER_ROW_SCROLL_RESET_DEBOUNCE_TIMEOUT));
74
+ (0, _defineProperty2.default)(this, "headerRowMouseScroll", (0, _throttle.default)(function () {
75
+ if (_this.isSticky) {
76
+ _this.dom.classList.add('no-pointer-events');
77
+
78
+ _this.headerRowMouseScrollEnd();
79
+ }
80
+ }, HEADER_ROW_SCROLL_THROTTLE_TIMEOUT));
61
81
  (0, _defineProperty2.default)(this, "onScroll", function () {
62
82
  if (!_this.tree) {
63
83
  return;
@@ -352,6 +372,8 @@ var TableRowNodeView = /*#__PURE__*/function () {
352
372
  this.eventDispatcher.on(_width.pluginKey.key, this.onWidthPluginState);
353
373
  this.eventDispatcher.on(_pluginKey.pluginKey.key, this.onTablePluginState);
354
374
  this.listening = true;
375
+ this.dom.addEventListener('wheel', this.headerRowMouseScroll.bind(this));
376
+ this.dom.addEventListener('touchmove', this.headerRowMouseScroll.bind(this));
355
377
  }
356
378
  }, {
357
379
  key: "unsubscribe",
@@ -375,6 +397,8 @@ var TableRowNodeView = /*#__PURE__*/function () {
375
397
  this.eventDispatcher.off(_width.pluginKey.key, this.onWidthPluginState);
376
398
  this.eventDispatcher.off(_pluginKey.pluginKey.key, this.onTablePluginState);
377
399
  this.listening = false;
400
+ this.dom.removeEventListener('wheel', this.headerRowMouseScroll);
401
+ this.dom.removeEventListener('touchmove', this.headerRowMouseScroll);
378
402
  } // initialize intersection observer to track if table is within scroll area
379
403
 
380
404
  }, {
@@ -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) {
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.PortalProviderThemeProviders = PortalProviderThemeProviders;
9
+
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
+
12
+ var _react = _interopRequireDefault(require("react"));
13
+
14
+ var _components = _interopRequireDefault(require("@atlaskit/theme/components"));
15
+
16
+ var _constants = require("@atlaskit/theme/constants");
17
+
18
+ var _react2 = require("@emotion/react");
19
+
20
+ var _styledComponents = require("styled-components");
21
+
22
+ function PortalProviderThemeProviders(props) {
23
+ var children = props.children,
24
+ mode = props.mode;
25
+
26
+ var styledComponentsAndEmotionTheme = _react.default.useMemo( // This return value should only be one of the following
27
+ // - { [CHANNEL]: { mode },
28
+ // - { theme: { [CHANNEL]: { mode } }
29
+ // However, it appears that consumers have inconsistent expectations
30
+ // regarding the shape.
31
+ // This can be revisited in future work, and for the purposes of
32
+ // fixing https://product-fabric.atlassian.net/browse/ED-14956
33
+ // we are merging the two shapes consumers expect.
34
+ function () {
35
+ var _ref;
36
+
37
+ return _ref = {}, (0, _defineProperty2.default)(_ref, _constants.CHANNEL, {
38
+ mode: mode
39
+ }), (0, _defineProperty2.default)(_ref, "theme", (0, _defineProperty2.default)({}, _constants.CHANNEL, {
40
+ mode: mode
41
+ })), _ref;
42
+ }, [mode]);
43
+
44
+ var atlaskitTheme = _react.default.useCallback(function () {
45
+ return {
46
+ mode: mode
47
+ };
48
+ }, [mode]);
49
+
50
+ return /*#__PURE__*/_react.default.createElement(_styledComponents.ThemeProvider, {
51
+ theme: styledComponentsAndEmotionTheme
52
+ }, /*#__PURE__*/_react.default.createElement(_react2.ThemeProvider, {
53
+ theme: styledComponentsAndEmotionTheme
54
+ }, /*#__PURE__*/_react.default.createElement(_components.default.Provider, {
55
+ value: atlaskitTheme
56
+ }, children)));
57
+ }