@atlaskit/editor-common 78.11.5 → 78.11.6

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 (180) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/cjs/collab/index.js +38 -11
  3. package/dist/cjs/keymaps/index.js +9 -6
  4. package/dist/cjs/media-inline/styles.js +2 -0
  5. package/dist/cjs/monitoring/error.js +1 -1
  6. package/dist/cjs/selection/gap-cursor/styles.js +12 -3
  7. package/dist/cjs/styles/shared/annotation.js +18 -4
  8. package/dist/cjs/styles/shared/block-marks.js +1 -0
  9. package/dist/cjs/styles/shared/blockquote.js +29 -4
  10. package/dist/cjs/styles/shared/code-block.js +1 -0
  11. package/dist/cjs/styles/shared/code-mark.js +8 -3
  12. package/dist/cjs/styles/shared/column-layout.js +17 -3
  13. package/dist/cjs/styles/shared/date.js +4 -3
  14. package/dist/cjs/styles/shared/expand.js +3 -5
  15. package/dist/cjs/styles/shared/headings.js +34 -3
  16. package/dist/cjs/styles/shared/indentation.js +28 -5
  17. package/dist/cjs/styles/shared/link.js +5 -4
  18. package/dist/cjs/styles/shared/lists.js +2 -0
  19. package/dist/cjs/styles/shared/media-single.js +39 -3
  20. package/dist/cjs/styles/shared/panel.js +5 -2
  21. package/dist/cjs/styles/shared/paragraph.js +11 -4
  22. package/dist/cjs/styles/shared/plugins.js +30 -7
  23. package/dist/cjs/styles/shared/resizer.js +2 -0
  24. package/dist/cjs/styles/shared/rule.js +10 -4
  25. package/dist/cjs/styles/shared/shadow.js +1 -2
  26. package/dist/cjs/styles/shared/smartCard.js +2 -0
  27. package/dist/cjs/styles/shared/table.js +2 -0
  28. package/dist/cjs/styles/shared/tableCell.js +2 -4
  29. package/dist/cjs/styles/shared/text-color.js +8 -4
  30. package/dist/cjs/styles/shared/unsupported-content.js +2 -0
  31. package/dist/cjs/styles/shared/whitespace.js +4 -4
  32. package/dist/cjs/ui/DropList/index.js +1 -1
  33. package/dist/cjs/ui/MediaSingle/styled.js +16 -8
  34. package/dist/cjs/ui/ResizerLegacy/styled.js +1 -0
  35. package/dist/cjs/ui/clear-next-sibling-margin-top.js +12 -5
  36. package/dist/es2019/collab/index.js +34 -41
  37. package/dist/es2019/keymaps/index.js +7 -11
  38. package/dist/es2019/media-inline/media-inline-image-card.js +0 -1
  39. package/dist/es2019/media-inline/styles.js +2 -0
  40. package/dist/es2019/media-inline/views/icon-wrapper.js +0 -1
  41. package/dist/es2019/monitoring/error.js +1 -1
  42. package/dist/es2019/selection/gap-cursor/styles.js +9 -7
  43. package/dist/es2019/styles/shared/annotation.js +13 -12
  44. package/dist/es2019/styles/shared/block-marks.js +1 -0
  45. package/dist/es2019/styles/shared/blockquote.js +27 -34
  46. package/dist/es2019/styles/shared/code-block.js +1 -0
  47. package/dist/es2019/styles/shared/code-mark.js +5 -5
  48. package/dist/es2019/styles/shared/column-layout.js +15 -17
  49. package/dist/es2019/styles/shared/date.js +4 -4
  50. package/dist/es2019/styles/shared/expand.js +3 -4
  51. package/dist/es2019/styles/shared/headings.js +36 -35
  52. package/dist/es2019/styles/shared/indentation.js +26 -22
  53. package/dist/es2019/styles/shared/link.js +4 -4
  54. package/dist/es2019/styles/shared/lists.js +2 -0
  55. package/dist/es2019/styles/shared/media-single.js +42 -65
  56. package/dist/es2019/styles/shared/panel.js +5 -5
  57. package/dist/es2019/styles/shared/paragraph.js +10 -9
  58. package/dist/es2019/styles/shared/plugins.js +29 -34
  59. package/dist/es2019/styles/shared/resizer.js +2 -0
  60. package/dist/es2019/styles/shared/rule.js +9 -8
  61. package/dist/es2019/styles/shared/shadow.js +1 -2
  62. package/dist/es2019/styles/shared/smartCard.js +2 -0
  63. package/dist/es2019/styles/shared/table.js +2 -0
  64. package/dist/es2019/styles/shared/tableCell.js +1 -3
  65. package/dist/es2019/styles/shared/text-color.js +7 -8
  66. package/dist/es2019/styles/shared/unsupported-content.js +2 -0
  67. package/dist/es2019/styles/shared/whitespace.js +4 -4
  68. package/dist/es2019/ui/DropList/index.js +1 -1
  69. package/dist/es2019/ui/MediaSingle/styled.js +37 -31
  70. package/dist/es2019/ui/ResizerLegacy/styled.js +2 -0
  71. package/dist/es2019/ui/clear-next-sibling-margin-top.js +11 -9
  72. package/dist/esm/collab/index.js +38 -11
  73. package/dist/esm/keymaps/index.js +7 -5
  74. package/dist/esm/media-inline/media-inline-image-card.js +0 -1
  75. package/dist/esm/media-inline/styles.js +2 -0
  76. package/dist/esm/media-inline/views/icon-wrapper.js +0 -1
  77. package/dist/esm/monitoring/error.js +1 -1
  78. package/dist/esm/selection/gap-cursor/styles.js +12 -3
  79. package/dist/esm/styles/shared/annotation.js +18 -4
  80. package/dist/esm/styles/shared/block-marks.js +1 -0
  81. package/dist/esm/styles/shared/blockquote.js +29 -3
  82. package/dist/esm/styles/shared/code-block.js +1 -0
  83. package/dist/esm/styles/shared/code-mark.js +8 -3
  84. package/dist/esm/styles/shared/column-layout.js +17 -3
  85. package/dist/esm/styles/shared/date.js +4 -3
  86. package/dist/esm/styles/shared/expand.js +3 -4
  87. package/dist/esm/styles/shared/headings.js +34 -3
  88. package/dist/esm/styles/shared/indentation.js +28 -5
  89. package/dist/esm/styles/shared/link.js +5 -3
  90. package/dist/esm/styles/shared/lists.js +2 -0
  91. package/dist/esm/styles/shared/media-single.js +39 -3
  92. package/dist/esm/styles/shared/panel.js +5 -2
  93. package/dist/esm/styles/shared/paragraph.js +11 -3
  94. package/dist/esm/styles/shared/plugins.js +30 -6
  95. package/dist/esm/styles/shared/resizer.js +2 -0
  96. package/dist/esm/styles/shared/rule.js +10 -3
  97. package/dist/esm/styles/shared/shadow.js +1 -2
  98. package/dist/esm/styles/shared/smartCard.js +2 -0
  99. package/dist/esm/styles/shared/table.js +2 -0
  100. package/dist/esm/styles/shared/tableCell.js +1 -3
  101. package/dist/esm/styles/shared/text-color.js +8 -3
  102. package/dist/esm/styles/shared/unsupported-content.js +2 -0
  103. package/dist/esm/styles/shared/whitespace.js +4 -3
  104. package/dist/esm/ui/DropList/index.js +1 -1
  105. package/dist/esm/ui/MediaSingle/styled.js +16 -8
  106. package/dist/esm/ui/ResizerLegacy/styled.js +2 -0
  107. package/dist/esm/ui/clear-next-sibling-margin-top.js +12 -5
  108. package/dist/types/collab/index.d.ts +1 -1
  109. package/dist/types/element-browser/components/ElementBrowserLoader.d.ts +1 -1
  110. package/dist/types/extensions/types/extension-manifest-common.d.ts +1 -1
  111. package/dist/types/extensions/types/extension-manifest.d.ts +1 -1
  112. package/dist/types/icons/index.d.ts +1 -1
  113. package/dist/types/link/LinkSearch/withActivityProvider.d.ts +1 -1
  114. package/dist/types/media-inline/inline-image-wrapper.d.ts +3 -2
  115. package/dist/types/media-inline/media-inline-image-card.d.ts +4 -4
  116. package/dist/types/media-inline/views/error-view.d.ts +3 -2
  117. package/dist/types/media-inline/views/frame.d.ts +3 -2
  118. package/dist/types/media-inline/views/icon-wrapper.d.ts +3 -2
  119. package/dist/types/media-inline/views/loading-view.d.ts +2 -2
  120. package/dist/types/quick-insert/assets/index.d.ts +24 -24
  121. package/dist/types/react-node-view/getInlineNodeViewProducer.d.ts +1 -1
  122. package/dist/types/react-node-view/index.d.ts +2 -2
  123. package/dist/types/selection-based-node-view/SelectionBasedNodeView.d.ts +1 -1
  124. package/dist/types/types/annotation/index.d.ts +2 -2
  125. package/dist/types/types/floating-toolbar.d.ts +3 -3
  126. package/dist/types/ui/Announcer/announcer.d.ts +1 -1
  127. package/dist/types/ui/DropList/index.d.ts +1 -2
  128. package/dist/types/ui/ErrorBoundary/index.d.ts +1 -0
  129. package/dist/types/ui/IntlErrorBoundary/index.d.ts +1 -0
  130. package/dist/types/ui/Layer/index.d.ts +2 -1
  131. package/dist/types/ui/MediaSingle/styled.d.ts +1 -1
  132. package/dist/types/ui/OverflowShadow/index.d.ts +1 -1
  133. package/dist/types/ui/Popup/index.d.ts +1 -0
  134. package/dist/types/ui/with-outer-listeners.d.ts +3 -2
  135. package/dist/types/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.d.ts +1 -1
  136. package/dist/types/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.d.ts +1 -1
  137. package/dist/types/ui-menu/ArrowKeyNavigationProvider/index.d.ts +1 -1
  138. package/dist/types/ui-menu/ColorPickerButton/index.d.ts +1 -1
  139. package/dist/types/ui-menu/Dropdown/index.d.ts +1 -1
  140. package/dist/types/ui-menu/DropdownMenu/index.d.ts +1 -1
  141. package/dist/types/ui-menu/DropdownMenu/types.d.ts +1 -0
  142. package/dist/types/ui-react/with-react-editor-view-outer-listeners.d.ts +1 -2
  143. package/dist/types/utils/imageLoader.d.ts +1 -1
  144. package/dist/types-ts4.5/collab/index.d.ts +1 -1
  145. package/dist/types-ts4.5/element-browser/components/ElementBrowserLoader.d.ts +1 -1
  146. package/dist/types-ts4.5/extensions/types/extension-manifest-common.d.ts +1 -1
  147. package/dist/types-ts4.5/extensions/types/extension-manifest.d.ts +1 -1
  148. package/dist/types-ts4.5/icons/index.d.ts +1 -1
  149. package/dist/types-ts4.5/link/LinkSearch/withActivityProvider.d.ts +1 -1
  150. package/dist/types-ts4.5/media-inline/inline-image-wrapper.d.ts +3 -2
  151. package/dist/types-ts4.5/media-inline/media-inline-image-card.d.ts +4 -4
  152. package/dist/types-ts4.5/media-inline/views/error-view.d.ts +3 -2
  153. package/dist/types-ts4.5/media-inline/views/frame.d.ts +3 -2
  154. package/dist/types-ts4.5/media-inline/views/icon-wrapper.d.ts +3 -2
  155. package/dist/types-ts4.5/media-inline/views/loading-view.d.ts +2 -2
  156. package/dist/types-ts4.5/quick-insert/assets/index.d.ts +24 -24
  157. package/dist/types-ts4.5/react-node-view/getInlineNodeViewProducer.d.ts +1 -1
  158. package/dist/types-ts4.5/react-node-view/index.d.ts +2 -2
  159. package/dist/types-ts4.5/selection-based-node-view/SelectionBasedNodeView.d.ts +1 -1
  160. package/dist/types-ts4.5/types/annotation/index.d.ts +2 -2
  161. package/dist/types-ts4.5/types/floating-toolbar.d.ts +3 -3
  162. package/dist/types-ts4.5/ui/Announcer/announcer.d.ts +1 -1
  163. package/dist/types-ts4.5/ui/DropList/index.d.ts +1 -2
  164. package/dist/types-ts4.5/ui/ErrorBoundary/index.d.ts +1 -0
  165. package/dist/types-ts4.5/ui/IntlErrorBoundary/index.d.ts +1 -0
  166. package/dist/types-ts4.5/ui/Layer/index.d.ts +2 -1
  167. package/dist/types-ts4.5/ui/MediaSingle/styled.d.ts +1 -1
  168. package/dist/types-ts4.5/ui/OverflowShadow/index.d.ts +1 -1
  169. package/dist/types-ts4.5/ui/Popup/index.d.ts +1 -0
  170. package/dist/types-ts4.5/ui/with-outer-listeners.d.ts +3 -2
  171. package/dist/types-ts4.5/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.d.ts +1 -1
  172. package/dist/types-ts4.5/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.d.ts +1 -1
  173. package/dist/types-ts4.5/ui-menu/ArrowKeyNavigationProvider/index.d.ts +1 -1
  174. package/dist/types-ts4.5/ui-menu/ColorPickerButton/index.d.ts +1 -1
  175. package/dist/types-ts4.5/ui-menu/Dropdown/index.d.ts +1 -1
  176. package/dist/types-ts4.5/ui-menu/DropdownMenu/index.d.ts +1 -1
  177. package/dist/types-ts4.5/ui-menu/DropdownMenu/types.d.ts +1 -0
  178. package/dist/types-ts4.5/ui-react/with-react-editor-view-outer-listeners.d.ts +1 -2
  179. package/dist/types-ts4.5/utils/imageLoader.d.ts +1 -1
  180. package/package.json +3 -3
@@ -6,6 +6,8 @@ export const UnsupportedSharedCssClassName = {
6
6
  };
7
7
  const inlineUnsupportedSelector = `.${UnsupportedSharedCssClassName.INLINE_CONTAINER} > span:nth-of-type(2)`;
8
8
  const blockUnsupportedSelector = `.${UnsupportedSharedCssClassName.BLOCK_CONTAINER} > div`;
9
+
10
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Nested `getSelectionStyles` would need a rebuild to autofix
9
11
  export const unsupportedStyles = css`
10
12
  ${blockUnsupportedSelector}, ${inlineUnsupportedSelector} {
11
13
  cursor: pointer;
@@ -1,6 +1,6 @@
1
1
  import { css } from '@emotion/react';
2
- const whitespaceSharedStyles = css`
3
- word-wrap: break-word;
4
- white-space: pre-wrap;
5
- `;
2
+ const whitespaceSharedStyles = css({
3
+ wordWrap: 'break-word',
4
+ whiteSpace: 'pre-wrap'
5
+ });
6
6
  export { whitespaceSharedStyles };
@@ -7,7 +7,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
7
7
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
8
8
  import Layer from '../Layer';
9
9
  const packageName = "@atlaskit/editor-common";
10
- const packageVersion = "78.11.5";
10
+ const packageVersion = "78.11.6";
11
11
  const halfFocusRing = 1;
12
12
  const dropOffset = '0, 8';
13
13
  class DropList extends Component {
@@ -135,27 +135,29 @@ export const MediaSingleDimensionHelper = ({
135
135
  isExtendedResizeExperienceOn,
136
136
  isNestedNode = false,
137
137
  isInsideOfInlineExtension = false
138
- }) => css`
139
- /* For nested rich media items, set max-width to 100% */
140
- tr &,
141
- [data-layout-column] &,
142
- [data-node-type='expand'] &,
143
- [data-panel-type] &,
144
- li & {
145
- max-width: 100%;
146
- }
138
+ }) =>
139
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
140
+ css`
141
+ /* For nested rich media items, set max-width to 100% */
142
+ tr &,
143
+ [data-layout-column] &,
144
+ [data-node-type='expand'] &,
145
+ [data-panel-type] &,
146
+ li & {
147
+ max-width: 100%;
148
+ }
147
149
 
148
- width: ${isExtendedResizeExperienceOn ? `${mediaSingleWidth || width}px` : mediaSingleWidth ? calcResizedWidth(layout, width || 0, containerWidth) : calcLegacyWidth(layout, width || 0, containerWidth, fullWidthMode, isResized, isInsideOfInlineExtension)};
149
- ${layout === 'full-width' &&
150
+ width: ${isExtendedResizeExperienceOn ? `${mediaSingleWidth || width}px` : mediaSingleWidth ? calcResizedWidth(layout, width || 0, containerWidth) : calcLegacyWidth(layout, width || 0, containerWidth, fullWidthMode, isResized, isInsideOfInlineExtension)};
151
+ ${layout === 'full-width' &&
150
152
  /* This causes issues for new experience where we don't strip layout attributes
151
- when copying top-level node and pasting into a table/layout,
152
- because full-width layout will remain, causing node to be edge-to-edge */
153
- !isExtendedResizeExperienceOn && css`
154
- min-width: 100%;
155
- `}
156
- max-width: ${isExtendedResizeExperienceOn ? `${containerWidth}px` : calcMaxWidth(layout, containerWidth)};
153
+ when copying top-level node and pasting into a table/layout,
154
+ because full-width layout will remain, causing node to be edge-to-edge */
155
+ !isExtendedResizeExperienceOn && css({
156
+ minWidth: '100%'
157
+ })}
158
+ max-width: ${isExtendedResizeExperienceOn ? `${containerWidth}px` : calcMaxWidth(layout, containerWidth)};
157
159
 
158
- ${isExtendedResizeExperienceOn && `&[class*='is-resizing'] {
160
+ ${isExtendedResizeExperienceOn && `&[class*='is-resizing'] {
159
161
  .new-file-experience-wrapper {
160
162
  box-shadow: none !important;
161
163
  }
@@ -164,27 +166,29 @@ export const MediaSingleDimensionHelper = ({
164
166
  transform: translateX(-50%);`}
165
167
  }`}
166
168
 
167
- &:not(.is-resizing) {
168
- transition: width 100ms ease-in;
169
- }
169
+ &:not(.is-resizing) {
170
+ transition: width 100ms ease-in;
171
+ }
170
172
 
171
- float: ${float(layout)};
172
- margin: ${calcMargin(layout)};
173
+ float: ${float(layout)};
174
+ margin: ${calcMargin(layout)};
173
175
 
174
- &[class*='not-resizing'] {
175
- ${isNestedNode ? /* Make nested node appear responsive when resizing table cell */
176
+ &[class*='not-resizing'] {
177
+ ${isNestedNode ? /* Make nested node appear responsive when resizing table cell */
176
178
  `max-width: 100%;` : nonWrappedLayouts.includes(layout) && `margin-left: 50%;
177
179
  transform: translateX(-50%);`}
178
- }
180
+ }
179
181
 
180
- ${isImageAligned(layout)};
181
- `;
182
+ ${isImageAligned(layout)};
183
+ `;
182
184
  const RenderFallbackContainer = ({
183
185
  hasFallbackContainer,
184
186
  paddingBottom,
185
187
  height
186
- }) => css`
187
- ${hasFallbackContainer ? `
188
+ }) =>
189
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
190
+ css`
191
+ ${hasFallbackContainer ? `
188
192
  &::after {
189
193
  content: '';
190
194
  display: block;
@@ -195,7 +199,9 @@ const RenderFallbackContainer = ({
195
199
  line-height: 0;
196
200
  }
197
201
  ` : ''}
198
- `;
202
+ `;
203
+
204
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
199
205
  export const mediaWrapperStyle = props => css`
200
206
  position: relative;
201
207
 
@@ -1,5 +1,7 @@
1
1
  import { css } from '@emotion/react';
2
2
  import { MediaSingleDimensionHelper } from '../MediaSingle/styled';
3
+
4
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
3
5
  export const wrapperStyle = props => css`
4
6
  & > div {
5
7
  ${MediaSingleDimensionHelper(props)};
@@ -1,16 +1,18 @@
1
1
  import { css } from '@emotion/react';
2
2
 
3
3
  // We use !important to ensure next sibling gets the margin reset no matter what
4
- const marginTopReset = `margin-top: 0 !important;`;
5
- export const clearNextSiblingMarginTopStyle = css`
6
- & + * {
7
- ${marginTopReset}
4
+
5
+ export const clearNextSiblingMarginTopStyle = css({
6
+ '& + *': {
7
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
8
+ marginTop: '0 !important'
8
9
  }
9
- `;
10
+ });
10
11
  const textElements = ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
11
12
  const nextSiblingBlockMarkContentSelectors = textElements.map(elem => `+ .fabric-editor-block-mark > ${elem}`).join(',');
12
- export const clearNextSiblingBlockMarkMarginTopStyle = css`
13
- ${nextSiblingBlockMarkContentSelectors} {
14
- ${marginTopReset}
13
+ export const clearNextSiblingBlockMarkMarginTopStyle = css({
14
+ [`${nextSiblingBlockMarkContentSelectors}`]: {
15
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
16
+ marginTop: '0 !important'
15
17
  }
16
- `;
18
+ });
@@ -1,5 +1,5 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject;
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
3
  import { css } from '@emotion/react';
4
4
  import { hexToRgba } from '@atlaskit/adf-schema';
5
5
  import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
@@ -136,16 +136,43 @@ export var colors = [themeColors.R100, themeColors.R300, themeColors.R500, theme
136
136
  selection: hexToRgba(solid, 0.2)
137
137
  };
138
138
  });
139
- var telepointerColorStyle = function telepointerColorStyle(color, index) {
140
- return "\n &.color-".concat(index, " {\n background-color: ").concat(color.selection, ";\n &::after {\n background-color: ").concat(color.solid, ";\n color: ", "var(--ds-text-inverse, #fff)", ";\n border-color: ").concat(color.solid, ";\n }\n }\n");
141
- };
142
139
  export var TELEPOINTER_DIM_CLASS = 'telepointer-dim';
143
-
144
- // Disable top: -14px since it is necessary to align to cursor
145
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
146
- export var telepointerStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror .telepointer {\n position: relative;\n transition: opacity 200ms;\n\n &.telepointer-selection {\n line-height: 1.2;\n pointer-events: none;\n user-select: none;\n }\n\n &.telepointer-selection-badge::after {\n content: attr(data-initial);\n position: absolute;\n display: block;\n top: -14px;\n font-size: ", ";\n padding: ", ";\n color: ", ";\n left: 0px;\n border-radius: 2px 2px 2px 0;\n line-height: initial;\n }\n\n &.", " {\n opacity: 0.2;\n }\n\n ", ";\n }\n"])), relativeFontSizeToBase16(9), "var(--ds-space-025, 2px)", "var(--ds-text-inverse, white)", TELEPOINTER_DIM_CLASS, colors.map(function (color, index) {
147
- return telepointerColorStyle(color, index);
148
- }));
140
+ export var telepointerStyle = css.apply(void 0, [{
141
+ '.ProseMirror .telepointer': _defineProperty({
142
+ position: 'relative',
143
+ transition: 'opacity 200ms',
144
+ '&.telepointer-selection': {
145
+ lineHeight: 1.2,
146
+ pointerEvents: 'none',
147
+ userSelect: 'none'
148
+ },
149
+ '&.telepointer-selection-badge::after': {
150
+ content: 'attr(data-initial)',
151
+ position: 'absolute',
152
+ display: 'block',
153
+ // Disable top: -14px since it is necessary to align to cursor
154
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
155
+ top: '-14px',
156
+ fontSize: relativeFontSizeToBase16(9),
157
+ padding: "var(--ds-space-025, 2px)",
158
+ color: "var(--ds-text-inverse, white)",
159
+ left: '0px',
160
+ borderRadius: '2px 2px 2px 0',
161
+ lineHeight: 'initial'
162
+ }
163
+ }, "&.".concat(TELEPOINTER_DIM_CLASS), {
164
+ opacity: 0.2
165
+ })
166
+ }].concat(_toConsumableArray(colors.map(function (color, index) {
167
+ return _defineProperty({}, "&.color-".concat(index), {
168
+ backgroundColor: color.selection,
169
+ '&::after': {
170
+ backgroundColor: color.solid,
171
+ color: "var(--ds-text-inverse, #fff)",
172
+ borderColor: color.solid
173
+ }
174
+ });
175
+ }))));
149
176
  var tintKey = 'collab:isDirtyTransaction';
150
177
  export var isDirtyTransaction = function isDirtyTransaction(tr) {
151
178
  return Boolean(tr.getMeta(tintKey));
@@ -1,6 +1,4 @@
1
1
  import _typeof from "@babel/runtime/helpers/typeof";
2
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
- var _templateObject;
4
2
  /** @jsx jsx */
5
3
  import React, { Fragment } from 'react';
6
4
  import { css, jsx } from '@emotion/react';
@@ -93,9 +91,13 @@ var arrowKeysMap = {
93
91
  ARROWUP: "\u2191",
94
92
  ARROWDOWN: "\u2193"
95
93
  };
96
- var tooltipShortcutStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: 2px;\n background-color: ", ";\n padding: 0 ", ";\n\n /* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */\n /* stylelint-disable-next-line */\n label: tooltip-shortcut;\n"])), "var(--ds-background-inverse-subtle, ".concat(N400, ")"), "var(--ds-space-025, 2px)");
97
- /* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
98
-
94
+ var tooltipShortcutStyle = css({
95
+ borderRadius: '2px',
96
+ backgroundColor: "var(--ds-background-inverse-subtle, ".concat(N400, ")"),
97
+ padding: "0 ".concat("var(--ds-space-025, 2px)"),
98
+ // NOTE: This might not actually do anything: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E
99
+ label: 'tooltip-shortcut'
100
+ });
99
101
  function formatShortcut(keymap) {
100
102
  var shortcut;
101
103
  if (browser.mac) {
@@ -3,7 +3,6 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
5
  /** @jsx jsx */
6
-
7
6
  import { Fragment, useCallback, useEffect, useMemo, useState } from 'react';
8
7
  import { jsx } from '@emotion/react';
9
8
  import ReactDOM from 'react-dom';
@@ -9,6 +9,7 @@ export var INLINE_IMAGE_BORDER_SIZE_CSS_VAR_KEY = '--editor-media-inline-image-b
9
9
  export var INLINE_IMAGE_BORDER_COLOR_CSS_VAR_KEY = '--editor-media-inline-image-border-color';
10
10
 
11
11
  // We implemented such selectors to ensure specificity:
12
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Nested and dynamic css calls are violations, needs manual remediation
12
13
  var inlineImageHeight = function inlineImageHeight(height) {
13
14
  var margin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
14
15
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* Editor style */\n > .mediaInlineView-content-wrap > .", ",\n > :is(a, span[data-mark-type='border']) .mediaInlineView-content-wrap > .", ",\n /* Renderer style */\n > .", ",\n > :is(a, span[data-mark-type='border']) .", " {\n height: ", "px;\n transform: translateY(", "px);\n }\n"])), INLINE_IMAGE_WRAPPER_CLASS_NAME, INLINE_IMAGE_WRAPPER_CLASS_NAME, INLINE_IMAGE_WRAPPER_CLASS_NAME, INLINE_IMAGE_WRAPPER_CLASS_NAME, height, margin);
@@ -20,6 +21,7 @@ var inlineImageHeight = function inlineImageHeight(height) {
20
21
  * shift in top and bottom and size adjustments to make up for lack of 1to1 size
21
22
  * mapping
22
23
  */
24
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Nested and dynamic css calls are violations, needs manual remediation
23
25
  export var mediaInlineImageStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n // p, h3, and action items\n .", " {\n height: ", "px;\n transform: translateY(-2px);\n }\n\n h1 {\n ", "\n }\n\n h2 {\n ", "\n }\n\n h3 {\n ", "\n }\n\n h4 {\n ", "\n }\n\n h5 {\n ", "\n }\n\n h6 {\n ", "\n }\n"])), INLINE_IMAGE_WRAPPER_CLASS_NAME, referenceHeights['p'], inlineImageHeight(referenceHeights['h1'], -3), inlineImageHeight(referenceHeights['h2'], -3), inlineImageHeight(referenceHeights['h3'], -2), inlineImageHeight(referenceHeights['h4'], -2), inlineImageHeight(referenceHeights['h5'], -2), inlineImageHeight(referenceHeights['h6'], -2));
24
26
  export var wrapperStyle = css({
25
27
  display: 'inline-flex',
@@ -1,5 +1,4 @@
1
1
  /** @jsx jsx */
2
-
3
2
  import { css, jsx } from '@emotion/react';
4
3
  var wrapperStyle = css({
5
4
  display: 'flex',
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
6
6
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
7
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
8
8
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
9
- var packageVersion = "78.11.5";
9
+ var packageVersion = "78.11.6";
10
10
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
11
11
  // Remove URL as it has UGC
12
12
  // TODO: Sanitise the URL instead of just removing it
@@ -1,10 +1,19 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2;
2
+ var _templateObject;
3
3
  import { css, keyframes } from '@emotion/react';
4
- var gapCursorBlink = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n from, to {\n opacity: 0;\n }\n 50% {\n opacity: 1;\n }\n"])));
4
+ var gapCursorBlink = keyframes({
5
+ 'from, to': {
6
+ opacity: 0
7
+ },
8
+ '50%': {
9
+ opacity: 1
10
+ }
11
+ });
5
12
  export var hideCaretModifier = 'ProseMirror-hide-gapcursor';
6
13
  var gapCursor = '.ProseMirror-gapcursor';
7
14
  var prosemirrorwidget = '.ProseMirror-widget';
8
15
  var wrapLeft = '[layout="wrap-left"]';
9
16
  var wrapRight = '[layout="wrap-right"]';
10
- export var gapCursorStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n /* =============== GAP CURSOR ================== */\n .ProseMirror {\n &.", " {\n caret-color: transparent;\n }\n\n ", " {\n display: none;\n pointer-events: none;\n position: relative;\n\n & span {\n caret-color: transparent;\n position: absolute;\n height: 100%;\n width: 100%;\n display: block;\n }\n\n & span::after {\n animation: 1s ", " step-end infinite;\n border-left: 1px solid;\n content: '';\n display: block;\n position: absolute;\n top: 0;\n height: 100%;\n }\n &.-left span::after {\n left: ", ";\n }\n &.-right span::after {\n right: ", ";\n }\n & span[layout='full-width'],\n & span[layout='wide'],\n & span[layout='fixed-width'] {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n &", " {\n float: right;\n }\n\n /* fix vertical alignment of gap cursor */\n &:first-of-type + ul,\n &:first-of-type + span + ul,\n &:first-of-type + ol,\n &:first-of-type + span + ol,\n &:first-of-type + pre,\n &:first-of-type + span + pre,\n &:first-of-type + blockquote,\n &:first-of-type + span + blockquote {\n margin-top: 0;\n }\n }\n &.ProseMirror-focused ", " {\n display: block;\n border-color: transparent;\n }\n }\n\n /* This hack below is for two images aligned side by side */\n ", "", " + span + ", ",\n ", "", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " {\n clear: none;\n }\n\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div {\n margin-right: 0;\n margin-left: 0;\n margin-bottom: 0;\n }\n\n ", " + ", ",\n ", " + ", " {\n float: left;\n }\n\n ", " + ", " + span + ", "::after,\n ", " + ", " + span + ", "::after,\n ", " + ", " + ", "::after,\n ", " + ", " + span + ", "::after,\n ", " + ", " + ", "::after,\n ", " + ", " + span + ", "::after {\n visibility: hidden;\n display: block;\n font-size: 0;\n content: ' ';\n clear: both;\n height: 0;\n }\n\n ", " + ", " + ", " + *,\n ", " + ", " + ", " + span + *,\n ", " + ", " + ", " + *,\n ", " + ", " + ", " + span + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + ", " + * > *,\n ", " + ", " + ", " + span + * > *,\n ", " + ", " + ", " + * > *,\n ", " + ", " + ", " + span + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + *,\n ", " + ", " + span + * {\n margin-top: 0;\n }\n"])), hideCaretModifier, gapCursor, gapCursorBlink, "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-050, -4px)", wrapRight, gapCursor, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapRight, wrapLeft, gapCursor, wrapRight, gapCursor, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, prosemirrorwidget, gapCursor, prosemirrorwidget, gapCursor);
17
+
18
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- This needs manual remediation, it autofixes seemingly safely, but the code style and readability is destroyed.
19
+ export var gapCursorStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* =============== GAP CURSOR ================== */\n .ProseMirror {\n &.", " {\n caret-color: transparent;\n }\n\n ", " {\n display: none;\n pointer-events: none;\n position: relative;\n\n & span {\n caret-color: transparent;\n position: absolute;\n height: 100%;\n width: 100%;\n display: block;\n }\n\n & span::after {\n animation: 1s ", " step-end infinite;\n border-left: 1px solid;\n content: '';\n display: block;\n position: absolute;\n top: 0;\n height: 100%;\n }\n &.-left span::after {\n left: ", ";\n }\n &.-right span::after {\n right: ", ";\n }\n & span[layout='full-width'],\n & span[layout='wide'],\n & span[layout='fixed-width'] {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n &", " {\n float: right;\n }\n\n /* fix vertical alignment of gap cursor */\n &:first-of-type + ul,\n &:first-of-type + span + ul,\n &:first-of-type + ol,\n &:first-of-type + span + ol,\n &:first-of-type + pre,\n &:first-of-type + span + pre,\n &:first-of-type + blockquote,\n &:first-of-type + span + blockquote {\n margin-top: 0;\n }\n }\n &.ProseMirror-focused ", " {\n display: block;\n border-color: transparent;\n }\n }\n\n /* This hack below is for two images aligned side by side */\n ", "", " + span + ", ",\n ", "", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " {\n clear: none;\n }\n\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div {\n margin-right: 0;\n margin-left: 0;\n margin-bottom: 0;\n }\n\n ", " + ", ",\n ", " + ", " {\n float: left;\n }\n\n ", " + ", " + span + ", "::after,\n ", " + ", " + span + ", "::after,\n ", " + ", " + ", "::after,\n ", " + ", " + span + ", "::after,\n ", " + ", " + ", "::after,\n ", " + ", " + span + ", "::after {\n visibility: hidden;\n display: block;\n font-size: 0;\n content: ' ';\n clear: both;\n height: 0;\n }\n\n ", " + ", " + ", " + *,\n ", " + ", " + ", " + span + *,\n ", " + ", " + ", " + *,\n ", " + ", " + ", " + span + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + ", " + * > *,\n ", " + ", " + ", " + span + * > *,\n ", " + ", " + ", " + * > *,\n ", " + ", " + ", " + span + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + *,\n ", " + ", " + span + * {\n margin-top: 0;\n }\n"])), hideCaretModifier, gapCursor, gapCursorBlink, "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-050, -4px)", wrapRight, gapCursor, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapRight, wrapLeft, gapCursor, wrapRight, gapCursor, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, prosemirrorwidget, gapCursor, prosemirrorwidget, gapCursor);
@@ -1,5 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3;
2
+ var _templateObject;
3
3
  import { css } from '@emotion/react';
4
4
  import { N60A, Y300, Y75 } from '@atlaskit/theme/colors';
5
5
  export var annotationPrefix = 'ak-editor-annotation';
@@ -12,10 +12,24 @@ var Y75a = 'rgba(255, 240, 179, 0.5)';
12
12
  var Y200a = 'rgba(255, 196, 0, 0.82)';
13
13
  export var AnnotationSharedCSSByState = function AnnotationSharedCSSByState() {
14
14
  return {
15
- focus: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n // Background is not coming through in confluence, suspecting to be caused by some specific combination of\n // emotion and token look up\n\n background: ", ";\n border-bottom: 2px solid ", ";\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4147\n box-shadow: ", ";\n cursor: pointer;\n "])), "var(--ds-background-accent-yellow-subtler, ".concat(Y75, ")"), "var(--ds-border-accent-yellow, ".concat(Y300, ")"), "var(--ds-shadow-overlay, ".concat("1px 2px 3px ".concat(N60A, ", -1px 2px 3px ").concat(N60A), ")")),
16
- blur: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: ", ";\n border-bottom: 2px solid ", ";\n cursor: pointer;\n "])), "var(--ds-background-accent-yellow-subtlest, ".concat(Y75a, ")"), "var(--ds-border-accent-yellow, ".concat(Y200a, ")"))
15
+ focus: css({
16
+ // Background is not coming through in confluence, suspecting to be caused by some specific combination of
17
+ // emotion and token look up
18
+ background: "var(--ds-background-accent-yellow-subtler, ".concat(Y75, ")"),
19
+ borderBottom: "2px solid ".concat("var(--ds-border-accent-yellow, ".concat(Y300, ")")),
20
+ // TODO: https://product-fabric.atlassian.net/browse/DSP-4147
21
+ boxShadow: "var(--ds-shadow-overlay, ".concat("1px 2px 3px ".concat(N60A, ", -1px 2px 3px ").concat(N60A), ")"),
22
+ cursor: 'pointer'
23
+ }),
24
+ blur: css({
25
+ background: "var(--ds-background-accent-yellow-subtlest, ".concat(Y75a, ")"),
26
+ borderBottom: "2px solid ".concat("var(--ds-border-accent-yellow, ".concat(Y200a, ")")),
27
+ cursor: 'pointer'
28
+ })
17
29
  };
18
30
  };
31
+
32
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState()` is not safe in object syntax
19
33
  export var annotationSharedStyles = function annotationSharedStyles() {
20
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .ProseMirror {\n .", " {\n ", ";\n }\n\n .", " {\n ", ";\n cursor: initial;\n }\n\n .", " {\n ", ";\n }\n }\n"])), AnnotationSharedClassNames.focus, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.blur, AnnotationSharedCSSByState().blur);
34
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n .", " {\n ", ";\n }\n\n .", " {\n ", ";\n cursor: initial;\n }\n\n .", " {\n ", ";\n }\n }\n"])), AnnotationSharedClassNames.focus, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.blur, AnnotationSharedCSSByState().blur);
21
35
  };
@@ -1,4 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  var _templateObject;
3
+ /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- Perfectly safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing */
3
4
  import { css } from '@emotion/react';
4
5
  export var blockMarksSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /**\n * We need to remove margin-top from first item\n * inside doc, tableCell, tableHeader, blockquote, etc.\n */\n *:not(.fabric-editor-block-mark) >,\n /* For nested block marks apart from those with indentation mark */\n *:not(.fabric-editor-block-mark) >\n div.fabric-editor-block-mark:first-of-type\n /* Do not remove the margin top for nodes inside indentation marks */\n :not(.fabric-editor-indentation-mark)\n /* Do not remove the margin top for nodes inside alignment marks */\n :not(.fabric-editor-alignment),\n // If first element inside a block node has alignment mark, then remove the margin-top\n .fabric-editor-alignment:first-of-type:first-child,\n // If first document element has indentation mark remove margin-top\n .ProseMirror .fabric-editor-indentation-mark:first-of-type:first-child {\n p,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n .heading-wrapper {\n :first-child:not(style),\n style:first-child + * {\n margin-top: 0;\n }\n }\n }\n"])));
@@ -1,5 +1,31 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject;
3
1
  import { css } from '@emotion/react';
4
2
  import { akEditorBlockquoteBorderColor, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
5
- export var blockquoteSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & blockquote {\n box-sizing: border-box;\n padding-left: ", ";\n border-left: 2px solid\n ", ";\n margin: ", " 0 0 0;\n margin-right: 0;\n\n [dir='rtl'] & {\n padding-left: 0;\n padding-right: ", ";\n }\n\n &:first-child {\n margin-top: 0;\n }\n\n &::before {\n content: '';\n }\n\n &::after {\n content: none;\n }\n\n & p {\n display: block;\n }\n\n & table,\n & table:last-child {\n display: inline-table;\n }\n }\n"])), "var(--ds-space-200, 16px)", "var(--ds-border, ".concat(akEditorBlockquoteBorderColor, ")"), blockNodesVerticalMargin, "var(--ds-space-200, 16px)");
3
+ export var blockquoteSharedStyles = css({
4
+ '& blockquote': {
5
+ boxSizing: 'border-box',
6
+ paddingLeft: "var(--ds-space-200, 16px)",
7
+ borderLeft: "2px solid ".concat("var(--ds-border, ".concat(akEditorBlockquoteBorderColor, ")")),
8
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
9
+ margin: "".concat(blockNodesVerticalMargin, " 0 0 0"),
10
+ marginRight: 0,
11
+ "[dir='rtl'] &": {
12
+ paddingLeft: 0,
13
+ paddingRight: "var(--ds-space-200, 16px)"
14
+ },
15
+ '&:first-child': {
16
+ marginTop: 0
17
+ },
18
+ '&::before': {
19
+ content: "''"
20
+ },
21
+ '&::after': {
22
+ content: 'none'
23
+ },
24
+ '& p': {
25
+ display: 'block'
26
+ },
27
+ '& table, & table:last-child': {
28
+ display: 'inline-table'
29
+ }
30
+ }
31
+ });
@@ -1,5 +1,6 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  var _templateObject, _templateObject2;
3
+ /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- Should be safe to autofix, but ignoring for now */
3
4
  import { css } from '@emotion/react';
4
5
  import { akEditorCodeFontFamily, akEditorLineHeight, akEditorTableCellMinWidth, blockNodesVerticalMargin, overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
5
6
  import { N20, N30, N400, N800 } from '@atlaskit/theme/colors';
@@ -1,8 +1,13 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject;
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
4
  import { css } from '@emotion/react';
4
5
  import { getCodeStyles } from '@atlaskit/code/inline';
5
6
  import { N30A } from '@atlaskit/theme/colors';
6
7
  export var codeMarkSharedStyles = function codeMarkSharedStyles() {
7
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .code {\n --ds--code--bg-color: ", ";\n ", "\n }\n "])), "var(--ds-background-neutral, ".concat(N30A, ")"), getCodeStyles());
8
+ return css({
9
+ '.code': _objectSpread({
10
+ '--ds--code--bg-color': "var(--ds-background-neutral, ".concat(N30A, ")")
11
+ }, getCodeStyles())
12
+ });
8
13
  };
@@ -1,6 +1,20 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject;
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
2
  import { css } from '@emotion/react';
4
3
  import { gridMediumMaxWidth } from '@atlaskit/editor-shared-styles';
5
- var columnLayoutSharedStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n [data-layout-section] {\n position: relative;\n display: flex;\n flex-direction: row;\n & > * {\n flex: 1;\n min-width: 0;\n }\n\n & > .unsupportedBlockView-content-wrap {\n min-width: initial;\n }\n\n @media screen and (max-width: ", "px) {\n flex-direction: column;\n }\n }\n"])), gridMediumMaxWidth);
4
+ var columnLayoutSharedStyle = css({
5
+ '[data-layout-section]': _defineProperty({
6
+ position: 'relative',
7
+ display: 'flex',
8
+ flexDirection: 'row',
9
+ '& > *': {
10
+ flex: 1,
11
+ minWidth: 0
12
+ },
13
+ '& > .unsupportedBlockView-content-wrap': {
14
+ minWidth: 'initial'
15
+ }
16
+ }, "@media screen and (max-width: ".concat(gridMediumMaxWidth, "px)"), {
17
+ flexDirection: 'column'
18
+ })
19
+ });
6
20
  export { columnLayoutSharedStyle };
@@ -1,8 +1,9 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject;
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
2
  import { css } from '@emotion/react';
4
3
  export var DateSharedCssClassName = {
5
4
  DATE_WRAPPER: "date-lozenger-container",
6
5
  DATE_CONTAINER: 'dateView-content-wrap'
7
6
  };
8
- export var dateSharedStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " span {\n white-space: unset;\n }\n"])), DateSharedCssClassName.DATE_WRAPPER);
7
+ export var dateSharedStyle = css(_defineProperty({}, ".".concat(DateSharedCssClassName.DATE_WRAPPER, " span"), {
8
+ whiteSpace: 'unset'
9
+ }));
@@ -1,8 +1,7 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject;
3
1
  import { css } from '@emotion/react';
4
- /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
5
- export var expandIconWrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-left: ", ";\n"])), "var(--ds-space-negative-100, -8px)");
2
+ export var expandIconWrapperStyle = css({
3
+ marginLeft: "var(--ds-space-negative-100, -8px)"
4
+ });
6
5
  var prefix = 'ak-editor-expand';
7
6
  export var expandClassNames = {
8
7
  prefix: prefix,
@@ -1,10 +1,41 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject;
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
4
  import { css } from '@emotion/react';
4
5
  import { h100, h300, h400, h500, h600, h700 } from '@atlaskit/theme/typography';
5
6
 
6
7
  // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
7
8
  // text sizing prototype: http://proto/fabricrender/
8
9
  export var headingsSharedStyles = function headingsSharedStyles() {
9
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & h1 {\n ", ";\n margin-bottom: 0;\n margin-top: 1.667em;\n }\n\n & h2 {\n ", ";\n margin-top: 1.8em;\n margin-bottom: 0;\n }\n\n & h3 {\n ", ";\n margin-top: 2em;\n margin-bottom: 0;\n }\n\n & h4 {\n ", ";\n margin-top: 1.357em;\n }\n\n & h5 {\n ", ";\n margin-top: 1.667em;\n text-transform: none;\n }\n\n & h6 {\n ", ";\n margin-top: 1.455em;\n text-transform: none;\n }\n"])), h700(), h600(), h500(), h400(), h300(), h100());
10
+ return css({
11
+ '& h1': _objectSpread(_objectSpread({}, h700()), {}, {
12
+ marginBottom: 0,
13
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
14
+ marginTop: '1.667em'
15
+ }),
16
+ '& h2': _objectSpread(_objectSpread({}, h600()), {}, {
17
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
18
+ marginTop: '1.8em',
19
+ marginBottom: 0
20
+ }),
21
+ '& h3': _objectSpread(_objectSpread({}, h500()), {}, {
22
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
23
+ marginTop: '2em',
24
+ marginBottom: 0
25
+ }),
26
+ '& h4': _objectSpread(_objectSpread({}, h400()), {}, {
27
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
28
+ marginTop: '1.357em'
29
+ }),
30
+ '& h5': _objectSpread(_objectSpread({}, h300()), {}, {
31
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
32
+ marginTop: '1.667em',
33
+ textTransform: 'none'
34
+ }),
35
+ '& h6': _objectSpread(_objectSpread({}, h100()), {}, {
36
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
37
+ marginTop: '1.455em',
38
+ textTransform: 'none'
39
+ })
40
+ });
10
41
  };
@@ -1,6 +1,29 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject;
3
1
  import { css } from '@emotion/react';
4
-
5
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
6
- export var indentationSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .fabric-editor-indentation-mark {\n &[data-level='1'] {\n margin-left: 30px;\n }\n &[data-level='2'] {\n margin-left: 60px;\n }\n &[data-level='3'] {\n margin-left: 90px;\n }\n &[data-level='4'] {\n margin-left: 120px;\n }\n &[data-level='5'] {\n margin-left: 150px;\n }\n &[data-level='6'] {\n margin-left: 180px;\n }\n }\n"])));
2
+ export var indentationSharedStyles = css({
3
+ '.fabric-editor-indentation-mark': {
4
+ "&[data-level='1']": {
5
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
6
+ marginLeft: '30px'
7
+ },
8
+ "&[data-level='2']": {
9
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
10
+ marginLeft: '60px'
11
+ },
12
+ "&[data-level='3']": {
13
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
14
+ marginLeft: '90px'
15
+ },
16
+ "&[data-level='4']": {
17
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
18
+ marginLeft: '120px'
19
+ },
20
+ "&[data-level='5']": {
21
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
22
+ marginLeft: '150px'
23
+ },
24
+ "&[data-level='6']": {
25
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
26
+ marginLeft: '180px'
27
+ }
28
+ }
29
+ });
@@ -1,5 +1,7 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject;
3
1
  import { css } from '@emotion/react';
4
- var linkSharedStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n a.blockLink {\n display: block;\n }\n"])));
2
+ var linkSharedStyle = css({
3
+ 'a.blockLink': {
4
+ display: 'block'
5
+ }
6
+ });
5
7
  export { linkSharedStyle };