@atlaskit/editor-common 110.8.0 → 110.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/cjs/element-browser/components/StatelessElementBrowser.js +1 -1
  3. package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +1 -1
  4. package/dist/cjs/media-inline/inline-image-wrapper.js +1 -1
  5. package/dist/cjs/monitoring/error.js +1 -1
  6. package/dist/cjs/panel.js +0 -12
  7. package/dist/cjs/styles/index.js +0 -204
  8. package/dist/cjs/styles/shared/annotation.js +1 -68
  9. package/dist/cjs/styles/shared/code-block.js +2 -17
  10. package/dist/cjs/styles/shared/date.js +2 -12
  11. package/dist/cjs/styles/shared/grid.js +2 -41
  12. package/dist/cjs/styles/shared/lists.js +2 -10
  13. package/dist/cjs/styles/shared/panel.js +1 -39
  14. package/dist/cjs/styles/shared/resizer.js +2 -202
  15. package/dist/cjs/styles/shared/smart-card.js +1 -6
  16. package/dist/cjs/styles/shared/smartCard.js +2 -16
  17. package/dist/cjs/styles/shared/task-decision.js +2 -12
  18. package/dist/cjs/styles/shared/unsupported-content.js +2 -12
  19. package/dist/cjs/transforms/index.js +8 -1
  20. package/dist/cjs/transforms/sync-block.js +25 -0
  21. package/dist/cjs/ui/DropList/index.js +1 -1
  22. package/dist/cjs/ui/Expand/sharedStyles.js +2 -97
  23. package/dist/cjs/ui/index.js +0 -7
  24. package/dist/cjs/utils/compareNodes.js +6 -0
  25. package/dist/es2019/element-browser/components/StatelessElementBrowser.js +1 -1
  26. package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +1 -1
  27. package/dist/es2019/media-inline/inline-image-wrapper.js +1 -1
  28. package/dist/es2019/monitoring/error.js +1 -1
  29. package/dist/es2019/panel.js +1 -1
  30. package/dist/es2019/styles/index.js +11 -23
  31. package/dist/es2019/styles/shared/annotation.js +1 -106
  32. package/dist/es2019/styles/shared/code-block.js +1 -164
  33. package/dist/es2019/styles/shared/date.js +1 -11
  34. package/dist/es2019/styles/shared/grid.js +1 -39
  35. package/dist/es2019/styles/shared/lists.js +1 -121
  36. package/dist/es2019/styles/shared/panel.js +1 -138
  37. package/dist/es2019/styles/shared/resizer.js +2 -211
  38. package/dist/es2019/styles/shared/smart-card.js +1 -24
  39. package/dist/es2019/styles/shared/smartCard.js +1 -151
  40. package/dist/es2019/styles/shared/task-decision.js +1 -63
  41. package/dist/es2019/styles/shared/unsupported-content.js +1 -27
  42. package/dist/es2019/transforms/index.js +2 -1
  43. package/dist/es2019/transforms/sync-block.js +15 -0
  44. package/dist/es2019/ui/DropList/index.js +1 -1
  45. package/dist/es2019/ui/Expand/sharedStyles.js +1 -113
  46. package/dist/es2019/ui/index.js +0 -1
  47. package/dist/es2019/utils/compareNodes.js +6 -0
  48. package/dist/esm/element-browser/components/StatelessElementBrowser.js +1 -1
  49. package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +1 -1
  50. package/dist/esm/media-inline/inline-image-wrapper.js +1 -1
  51. package/dist/esm/monitoring/error.js +1 -1
  52. package/dist/esm/panel.js +1 -1
  53. package/dist/esm/styles/index.js +11 -23
  54. package/dist/esm/styles/shared/annotation.js +0 -67
  55. package/dist/esm/styles/shared/code-block.js +1 -15
  56. package/dist/esm/styles/shared/date.js +1 -9
  57. package/dist/esm/styles/shared/grid.js +1 -39
  58. package/dist/esm/styles/shared/lists.js +1 -10
  59. package/dist/esm/styles/shared/panel.js +0 -37
  60. package/dist/esm/styles/shared/resizer.js +2 -202
  61. package/dist/esm/styles/shared/smart-card.js +0 -5
  62. package/dist/esm/styles/shared/smartCard.js +1 -15
  63. package/dist/esm/styles/shared/task-decision.js +1 -10
  64. package/dist/esm/styles/shared/unsupported-content.js +1 -11
  65. package/dist/esm/transforms/index.js +2 -1
  66. package/dist/esm/transforms/sync-block.js +18 -0
  67. package/dist/esm/ui/DropList/index.js +1 -1
  68. package/dist/esm/ui/Expand/sharedStyles.js +1 -96
  69. package/dist/esm/ui/index.js +0 -1
  70. package/dist/esm/utils/compareNodes.js +6 -0
  71. package/dist/types/panel.d.ts +1 -1
  72. package/dist/types/styles/index.d.ts +11 -23
  73. package/dist/types/styles/shared/annotation.d.ts +0 -30
  74. package/dist/types/styles/shared/code-block.d.ts +0 -3
  75. package/dist/types/styles/shared/date.d.ts +0 -2
  76. package/dist/types/styles/shared/grid.d.ts +0 -2
  77. package/dist/types/styles/shared/lists.d.ts +0 -2
  78. package/dist/types/styles/shared/panel.d.ts +0 -2
  79. package/dist/types/styles/shared/resizer.d.ts +0 -4
  80. package/dist/types/styles/shared/smart-card.d.ts +0 -2
  81. package/dist/types/styles/shared/smartCard.d.ts +0 -1
  82. package/dist/types/styles/shared/task-decision.d.ts +0 -2
  83. package/dist/types/styles/shared/unsupported-content.d.ts +0 -2
  84. package/dist/types/transforms/index.d.ts +1 -0
  85. package/dist/types/transforms/sync-block.d.ts +2 -0
  86. package/dist/types/ui/Expand/sharedStyles.d.ts +0 -6
  87. package/dist/types/ui/index.d.ts +0 -2
  88. package/dist/types-ts4.5/panel.d.ts +1 -1
  89. package/dist/types-ts4.5/styles/index.d.ts +11 -23
  90. package/dist/types-ts4.5/styles/shared/annotation.d.ts +0 -30
  91. package/dist/types-ts4.5/styles/shared/code-block.d.ts +0 -3
  92. package/dist/types-ts4.5/styles/shared/date.d.ts +0 -2
  93. package/dist/types-ts4.5/styles/shared/grid.d.ts +0 -2
  94. package/dist/types-ts4.5/styles/shared/lists.d.ts +0 -2
  95. package/dist/types-ts4.5/styles/shared/panel.d.ts +0 -2
  96. package/dist/types-ts4.5/styles/shared/resizer.d.ts +0 -4
  97. package/dist/types-ts4.5/styles/shared/smart-card.d.ts +0 -2
  98. package/dist/types-ts4.5/styles/shared/smartCard.d.ts +0 -1
  99. package/dist/types-ts4.5/styles/shared/task-decision.d.ts +0 -2
  100. package/dist/types-ts4.5/styles/shared/unsupported-content.d.ts +0 -2
  101. package/dist/types-ts4.5/transforms/index.d.ts +1 -0
  102. package/dist/types-ts4.5/transforms/sync-block.d.ts +2 -0
  103. package/dist/types-ts4.5/ui/Expand/sharedStyles.d.ts +0 -6
  104. package/dist/types-ts4.5/ui/index.d.ts +0 -2
  105. package/package.json +5 -2
  106. package/dist/cjs/styles/shared/background-color.js +0 -33
  107. package/dist/cjs/styles/shared/block-marks.js +0 -14
  108. package/dist/cjs/styles/shared/code-mark.js +0 -32
  109. package/dist/cjs/styles/shared/column-layout.js +0 -70
  110. package/dist/cjs/styles/shared/embedCard.js +0 -42
  111. package/dist/cjs/styles/shared/indentation.js +0 -40
  112. package/dist/cjs/styles/shared/link.js +0 -24
  113. package/dist/cjs/styles/shared/paragraph.js +0 -39
  114. package/dist/cjs/styles/shared/rule.js +0 -24
  115. package/dist/cjs/styles/shared/shadow.js +0 -64
  116. package/dist/cjs/styles/shared/text-color.js +0 -20
  117. package/dist/cjs/styles/shared/whitespace.js +0 -15
  118. package/dist/es2019/styles/shared/background-color.js +0 -26
  119. package/dist/es2019/styles/shared/block-marks.js +0 -37
  120. package/dist/es2019/styles/shared/code-mark.js +0 -25
  121. package/dist/es2019/styles/shared/column-layout.js +0 -66
  122. package/dist/es2019/styles/shared/embedCard.js +0 -33
  123. package/dist/es2019/styles/shared/indentation.js +0 -34
  124. package/dist/es2019/styles/shared/link.js +0 -18
  125. package/dist/es2019/styles/shared/paragraph.js +0 -32
  126. package/dist/es2019/styles/shared/rule.js +0 -15
  127. package/dist/es2019/styles/shared/shadow.js +0 -69
  128. package/dist/es2019/styles/shared/text-color.js +0 -14
  129. package/dist/es2019/styles/shared/whitespace.js +0 -9
  130. package/dist/esm/styles/shared/background-color.js +0 -26
  131. package/dist/esm/styles/shared/block-marks.js +0 -8
  132. package/dist/esm/styles/shared/code-mark.js +0 -25
  133. package/dist/esm/styles/shared/column-layout.js +0 -63
  134. package/dist/esm/styles/shared/embedCard.js +0 -35
  135. package/dist/esm/styles/shared/indentation.js +0 -34
  136. package/dist/esm/styles/shared/link.js +0 -18
  137. package/dist/esm/styles/shared/paragraph.js +0 -32
  138. package/dist/esm/styles/shared/rule.js +0 -17
  139. package/dist/esm/styles/shared/shadow.js +0 -57
  140. package/dist/esm/styles/shared/text-color.js +0 -14
  141. package/dist/esm/styles/shared/whitespace.js +0 -9
  142. package/dist/types/styles/shared/background-color.d.ts +0 -1
  143. package/dist/types/styles/shared/block-marks.d.ts +0 -2
  144. package/dist/types/styles/shared/code-mark.d.ts +0 -1
  145. package/dist/types/styles/shared/column-layout.d.ts +0 -4
  146. package/dist/types/styles/shared/embedCard.d.ts +0 -3
  147. package/dist/types/styles/shared/indentation.d.ts +0 -2
  148. package/dist/types/styles/shared/link.d.ts +0 -2
  149. package/dist/types/styles/shared/paragraph.d.ts +0 -1
  150. package/dist/types/styles/shared/rule.d.ts +0 -1
  151. package/dist/types/styles/shared/shadow.d.ts +0 -15
  152. package/dist/types/styles/shared/text-color.d.ts +0 -2
  153. package/dist/types/styles/shared/whitespace.d.ts +0 -2
  154. package/dist/types-ts4.5/styles/shared/background-color.d.ts +0 -1
  155. package/dist/types-ts4.5/styles/shared/block-marks.d.ts +0 -2
  156. package/dist/types-ts4.5/styles/shared/code-mark.d.ts +0 -1
  157. package/dist/types-ts4.5/styles/shared/column-layout.d.ts +0 -4
  158. package/dist/types-ts4.5/styles/shared/embedCard.d.ts +0 -3
  159. package/dist/types-ts4.5/styles/shared/indentation.d.ts +0 -2
  160. package/dist/types-ts4.5/styles/shared/link.d.ts +0 -2
  161. package/dist/types-ts4.5/styles/shared/paragraph.d.ts +0 -1
  162. package/dist/types-ts4.5/styles/shared/rule.d.ts +0 -1
  163. package/dist/types-ts4.5/styles/shared/shadow.d.ts +0 -15
  164. package/dist/types-ts4.5/styles/shared/text-color.d.ts +0 -2
  165. package/dist/types-ts4.5/styles/shared/whitespace.d.ts +0 -2
@@ -8,6 +8,7 @@ exports.createCompareNodes = exports.ContentType = void 0;
8
8
  exports.createNormalizeTextParser = createNormalizeTextParser;
9
9
  exports.extractMetaFromTextNode = extractMetaFromTextNode;
10
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
12
  var _types = require("../types");
12
13
  var ContentType = exports.ContentType = /*#__PURE__*/function (ContentType) {
13
14
  ContentType[ContentType["NUMBER"] = 0] = "NUMBER";
@@ -240,6 +241,11 @@ function compareMetaFromNode(metaNodeA, metaNodeB) {
240
241
  if (metaNodeA === null || metaNodeB === null) {
241
242
  return metaNodeB === null ? -1 : 1;
242
243
  }
244
+ if ((0, _platformFeatureFlags.fg)('platform_editor_fix_mixed_types_column_sort')) {
245
+ if (metaNodeA.type === ContentType.TEXT && metaNodeB.type === ContentType.NUMBER || metaNodeA.type === ContentType.NUMBER && metaNodeB.type === ContentType.TEXT) {
246
+ return compareValue(String(metaNodeA.value), String(metaNodeB.value));
247
+ }
248
+ }
243
249
  if (metaNodeA.type !== metaNodeB.type) {
244
250
  return metaNodeA.type > metaNodeB.type ? 1 : -1;
245
251
  }
@@ -320,7 +320,7 @@ function MobileBrowser({
320
320
  focusOnEmptyStateButton = false
321
321
  }) {
322
322
  return (
323
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
323
+ // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
324
324
  jsx("div", {
325
325
  css: mobileElementBrowserContainer,
326
326
  onKeyDown: onKeyDown,
@@ -154,7 +154,7 @@ export const ExtensionLabel = ({
154
154
  'extension-icon': expValEquals('cc_editor_ttvc_release_bundle_one', 'extensionHoverRefactor', true)
155
155
  });
156
156
  return (
157
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable
157
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions, @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable
158
158
  jsx("div", {
159
159
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
160
160
  css: containerStyles
@@ -35,7 +35,7 @@ export const InlineImageWrapper = ({
35
35
  [INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY]: aspectRatio
36
36
  } : {};
37
37
  return (
38
- // eslint-disable-next-line @atlaskit/design-system/prefer-primitives, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/click-events-have-key-events
38
+ // eslint-disable-next-line @atlaskit/design-system/prefer-primitives, @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
39
39
  jsx("span", _extends({
40
40
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
41
41
  style: {
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "110.7.2";
4
+ const packageVersion = "110.9.0";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -1,4 +1,4 @@
1
1
  // Disable no-re-export rule for entry point files
2
2
  /* eslint-disable @atlaskit/editor/no-re-export */
3
3
 
4
- export { getPanelTypeBackground, getPanelTypeBackgroundNoTokens, darkPanelColors, panelSharedStyles, panelSharedStylesWithoutPrefix, PanelSharedCssClassName, PanelSharedSelectors } from './styles/shared/panel';
4
+ export { getPanelTypeBackground, getPanelTypeBackgroundNoTokens, darkPanelColors, PanelSharedCssClassName, PanelSharedSelectors } from './styles/shared/panel';
@@ -1,39 +1,27 @@
1
1
  // Disable no-re-export rule for entry point files
2
2
  /* eslint-disable @atlaskit/editor/no-re-export */
3
3
 
4
- export { textColorStyles } from './shared/text-color';
5
- export { backgroundColorStyles } from './shared/background-color';
6
4
  export { tableSharedStyle, tableMarginTop, tableMarginBottom, tableMarginSides, tableCellMinWidth, tableNewColumnMinWidth, tableCellBorderWidth, calcTableWidth, TableSharedCssClassName, tableResizeHandleWidth, tableCellPadding, tableMarginTopWithControl, tableControlsSpacing, tablePadding } from './shared/table';
7
- export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles } from './shared/annotation';
8
- export { columnLayoutSharedStyle, columnLayoutResponsiveSharedStyle, columnLayoutResponsiveRendererStyles } from './shared/column-layout';
5
+ export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames } from './shared/annotation';
9
6
  export { mediaSingleSharedStyle, mediaSingleSharedStyleNew, richMediaClassName } from './shared/media-single';
10
7
  export { blockquoteSharedStyles } from './shared/blockquote';
11
8
  export { headingsSharedStyles } from './shared/headings';
12
- export { ruleSharedStyles } from './shared/rule';
13
- export { whitespaceSharedStyles } from './shared/whitespace';
14
- export { paragraphSharedStyles } from './shared/paragraph';
15
- export { linkSharedStyle } from './shared/link';
16
- export { listsSharedStyles, listItemCounterPadding, getOrderedListInlineStyles } from './shared/lists';
17
- export { indentationSharedStyles } from './shared/indentation';
18
- export { blockMarksSharedStyles } from './shared/block-marks';
19
- export { codeMarkSharedStyles } from './shared/code-mark';
20
- export { shadowSharedStyle } from './shared/shadow';
21
- export { dateSharedStyle, DateSharedCssClassName } from './shared/date';
22
- export { tasksAndDecisionsStyles, TaskDecisionSharedCssClassName } from './shared/task-decision';
9
+ export { listItemCounterPadding, getOrderedListInlineStyles } from './shared/lists';
10
+ export { DateSharedCssClassName } from './shared/date';
11
+ export { TaskDecisionSharedCssClassName } from './shared/task-decision';
23
12
  export { StatusSharedCssClassName } from './shared/status';
24
- export { getSmartCardSharedStyles, smartCardSharedStyles, SmartCardSharedCssClassName } from './shared/smart-card';
13
+ export { SmartCardSharedCssClassName } from './shared/smart-card';
25
14
  export { DropdownMenuSharedCssClassName } from './shared/dropdown-menu';
26
- export { CodeBlockSharedCssClassName, codeBlockSharedStyles, codeBlockInListSafariFix } from './shared/code-block';
15
+ export { CodeBlockSharedCssClassName } from './shared/code-block';
27
16
  export { LAYOUT_SECTION_MARGIN, LAYOUT_COLUMN_PADDING, DEFAULT_TWO_COLUMN_LAYOUT_COLUMN_WIDTH } from './shared/layout';
28
17
  export { EXTENSION_PADDING, BODIED_EXT_PADDING } from './shared/extension';
29
- export { resizerStyles, resizerHandleClassName, resizerHandleTrackClassName, resizerHandleThumbClassName, resizerHandleThumbWidth, pragmaticResizerStyles, pragmaticStylesLayoutFirstNodeResizeHandleFix, pragmaticResizerStylesForTooltip, pragmaticResizerStylesWithReducedEditorGutter } from './shared/resizer';
30
- export { gridStyles, GRID_GUTTER } from './shared/grid';
31
- export { smartCardStyles, FLOATING_TOOLBAR_LINKPICKER_CLASSNAME, DATASOURCE_INNER_CONTAINER_CLASSNAME } from './shared/smartCard';
32
- export { embedCardStyles, embedSpacingStyles } from './shared/embedCard';
18
+ export { resizerStyles, resizerHandleClassName, resizerHandleTrackClassName, resizerHandleThumbClassName, resizerHandleThumbWidth } from './shared/resizer';
19
+ export { GRID_GUTTER } from './shared/grid';
20
+ export { FLOATING_TOOLBAR_LINKPICKER_CLASSNAME, DATASOURCE_INNER_CONTAINER_CLASSNAME } from './shared/smartCard';
33
21
  export { buttonGroupStyle, buttonGroupStyleBeforeVisualRefresh, disableBlueBorderStyles, separatorStyles, wrapperStyle, triggerWrapperStyles, triggerWrapperStylesWithPadding } from './shared/plugins';
34
- export { UnsupportedSharedCssClassName, unsupportedStyles } from './shared/unsupported-content';
22
+ export { UnsupportedSharedCssClassName } from './shared/unsupported-content';
35
23
  export { expandIconWrapperStyle, expandClassNames, expandIconContainerStyle } from './shared/expand';
36
- export { sharedExpandStyles, EXPAND_CONTAINER_PADDING } from '../ui/Expand/sharedStyles';
24
+ export { EXPAND_CONTAINER_PADDING } from '../ui/Expand/sharedStyles';
37
25
  export { ClassNames as MediaSharedClassNames } from './shared/media';
38
26
  export { BreakoutCssClassName } from './shared/breakout';
39
27
  export { BODIED_EXT_MBE_MARGIN_TOP } from './shared/extension';
@@ -1,6 +1,3 @@
1
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
- import { css } from '@emotion/react';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
1
  export const annotationPrefix = 'ak-editor-annotation';
5
2
  export const AnnotationSharedClassNames = {
6
3
  focus: `${annotationPrefix}-focus`,
@@ -13,106 +10,4 @@ export const BlockAnnotationSharedClassNames = {
13
10
  focus: `${blockAnnotationPrefix}-focus`,
14
11
  blur: `${blockAnnotationPrefix}-blur`,
15
12
  draft: `${blockAnnotationPrefix}-draft`
16
- };
17
- export const AnnotationSharedCSSByState = () => {
18
- if (fg('editor_inline_comments_on_inline_nodes')) {
19
- // NOTE: These styles are shared between renderer and editor. Sometimes they
20
- // need different selectors and other times they apply the same attributes
21
- // in a different way. For example in renderer the focus styles are an
22
- // override, not a separate class. Be sure to check both usages of this
23
- // before modifying.
24
- return {
25
- common: {
26
- borderBottom: '2px solid transparent',
27
- cursor: 'pointer',
28
- padding: '1px 0 2px',
29
- '&:has(.card), &:has([data-inline-card])': fg('annotations_align_editor_and_renderer_styles') ? {
30
- padding: '5px 0 3px 0'
31
- } : {
32
- paddingTop: '4px',
33
- border: 'none',
34
- boxShadow: `0 2px 0 0 ${"var(--ds-border-accent-yellow, #B38600)"}`
35
- },
36
- '&:has(.date-lozenger-container)': {
37
- paddingTop: '2px'
38
- }
39
- },
40
- focus: css({
41
- background: "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)",
42
- borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
43
- boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)"
44
- }),
45
- blur: css({
46
- background: "var(--ds-background-accent-yellow-subtlest, #FFF7D6)",
47
- borderBottomColor: "var(--ds-border-accent-yellow, #B38600)"
48
- }),
49
- hover: css({
50
- background: "var(--ds-background-accent-yellow-subtlest-hovered, #F8E6A0)",
51
- borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
52
- boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)"
53
- })
54
- };
55
- } else {
56
- return {
57
- focus: css({
58
- // Background is not coming through in confluence, suspecting to be caused by some specific combination of
59
- // emotion and token look up
60
- background: "var(--ds-background-accent-yellow-subtler, #F8E6A0)",
61
- borderBottom: `2px solid ${"var(--ds-border-accent-yellow, #B38600)"}`,
62
- // TODO: DSP-4147 - Annotation shadow
63
- boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)",
64
- cursor: 'pointer'
65
- }),
66
- blur: css({
67
- background: "var(--ds-background-accent-yellow-subtlest, #FFF7D6)",
68
- borderBottom: `2px solid ${"var(--ds-border-accent-yellow, #B38600)"}`,
69
- cursor: 'pointer'
70
- })
71
- };
72
- }
73
- };
74
- export const annotationSharedStyles = () => fg('editor_inline_comments_on_inline_nodes') ?
75
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState()` is not safe in object syntax
76
- css`
77
- .ProseMirror {
78
- .${AnnotationSharedClassNames.blur},
79
- .${AnnotationSharedClassNames.focus},
80
- .${AnnotationSharedClassNames.draft} {
81
- ${AnnotationSharedCSSByState().common};
82
- }
83
-
84
- .${AnnotationSharedClassNames.focus} {
85
- ${AnnotationSharedCSSByState().focus};
86
- }
87
-
88
- .${AnnotationSharedClassNames.draft} {
89
- ${AnnotationSharedCSSByState().focus};
90
- cursor: initial;
91
- }
92
-
93
- .${AnnotationSharedClassNames.blur} {
94
- ${AnnotationSharedCSSByState().blur};
95
- }
96
- .${AnnotationSharedClassNames.hover} {
97
- ${AnnotationSharedCSSByState().common};
98
- ${AnnotationSharedCSSByState().hover};
99
- }
100
- }
101
- ` :
102
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState()` is not safe in object syntax
103
- css`
104
- .ProseMirror {
105
- .${AnnotationSharedClassNames.focus} {
106
- ${AnnotationSharedCSSByState().focus};
107
- }
108
-
109
- .${AnnotationSharedClassNames.draft} {
110
- ${AnnotationSharedCSSByState().focus};
111
- cursor: initial;
112
- }
113
-
114
- .${AnnotationSharedClassNames.blur} {
115
- ${AnnotationSharedCSSByState().blur};
116
- }
117
- }
118
- `;
13
+ };
@@ -1,7 +1,3 @@
1
- /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- Should be safe to autofix, but ignoring for now */
2
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
- import { css } from '@emotion/react';
4
- import { akEditorCodeFontFamily, akEditorLineHeight, akEditorTableCellMinWidth, blockNodesVerticalMargin, overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
5
1
  export const CodeBlockSharedCssClassName = {
6
2
  CODEBLOCK_CONTAINER: 'code-block',
7
3
  CODEBLOCK_START: 'code-block--start',
@@ -12,163 +8,4 @@ export const CodeBlockSharedCssClassName = {
12
8
  DS_CODEBLOCK: '[data-ds--code--code-block]',
13
9
  CODEBLOCK_CONTENT_WRAPPED: 'code-content--wrapped',
14
10
  CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET: 'code-content__line-number--wrapped'
15
- };
16
- export const codeBlockSharedStyles = () => css`
17
- .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPED}
18
- > .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER}
19
- > .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT} {
20
- margin-right: ${"var(--ds-space-100, 8px)"};
21
-
22
- code {
23
- display: block;
24
- word-break: break-word;
25
- white-space: pre-wrap;
26
- }
27
- }
28
-
29
- .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER}
30
- > .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT} {
31
- display: flex;
32
- flex: 1;
33
-
34
- code {
35
- flex-grow: 1;
36
-
37
- white-space: pre;
38
- }
39
- }
40
-
41
- .${CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER} {
42
- position: relative;
43
- background-color: ${"var(--ds-surface-raised, #FFFFFF)"};
44
- border-radius: ${"var(--ds-radius-small, 3px)"};
45
- margin: ${blockNodesVerticalMargin} 0 0 0;
46
- font-family: ${akEditorCodeFontFamily};
47
- min-width: ${akEditorTableCellMinWidth}px;
48
- cursor: pointer;
49
- clear: both;
50
-
51
- .code-block-gutter-pseudo-element::before {
52
- content: attr(data-label);
53
- }
54
-
55
- /* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */
56
- white-space: normal;
57
-
58
- .${CodeBlockSharedCssClassName.CODEBLOCK_START} {
59
- position: absolute;
60
- visibility: hidden;
61
- height: 1.5rem;
62
- top: 0px;
63
- left: 0px;
64
- }
65
-
66
- .${CodeBlockSharedCssClassName.CODEBLOCK_END} {
67
- position: absolute;
68
- visibility: hidden;
69
- height: 1.5rem;
70
- bottom: 0px;
71
- right: 0px;
72
- }
73
-
74
- .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER} {
75
- position: relative;
76
- background-color: ${"var(--ds-background-neutral, #091E420F)"};
77
- display: flex;
78
- border-radius: ${"var(--ds-radius-small, 3px)"};
79
- width: 100%;
80
- counter-reset: line;
81
- overflow-x: auto;
82
-
83
- background-image: ${overflowShadow({
84
- leftCoverWidth: "var(--ds-space-300, 24px)"
85
- })};
86
-
87
- background-repeat: no-repeat;
88
- background-attachment: local, local, local, local, scroll, scroll, scroll, scroll;
89
- background-size:
90
- ${"var(--ds-space-300, 24px)"} 100%,
91
- ${"var(--ds-space-300, 24px)"} 100%,
92
- ${"var(--ds-space-100, 8px)"} 100%,
93
- ${"var(--ds-space-100, 8px)"} 100%,
94
- ${"var(--ds-space-100, 8px)"} 100%,
95
- 1px 100%,
96
- ${"var(--ds-space-100, 8px)"} 100%,
97
- 1px 100%;
98
- background-position:
99
- 0 0,
100
- 0 0,
101
- 100% 0,
102
- 100% 0,
103
- 100% 0,
104
- 100% 0,
105
- 0 0,
106
- 0 0;
107
-
108
- /* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */
109
- overflow-y: hidden;
110
- }
111
-
112
- .${CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER} {
113
- background-color: ${"var(--ds-background-neutral, #091E420F)"};
114
- position: relative;
115
- width: var(--lineNumberGutterWidth, 2rem);
116
- padding: ${"var(--ds-space-100, 8px)"};
117
- flex-shrink: 0;
118
- font-size: ${relativeFontSizeToBase16(14)};
119
- box-sizing: content-box;
120
- }
121
-
122
- /* This is a fix of marker of list item with code block.
123
- The list item marker in Chrome is aligned by the baseline of the text,
124
- that's why we need to add a text (content: "1") to the line number gutter to align
125
- the list item marker with the text.
126
- Without it, the list item marker will be aligned by the bottom of the code block. */
127
- .${CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER}::before {
128
- content: '1';
129
- visibility: hidden;
130
- font-size: ${relativeFontSizeToBase16(14)};
131
- line-height: 1.5rem;
132
- }
133
-
134
- .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT} {
135
- code {
136
- tab-size: 4;
137
- cursor: text;
138
- color: ${"var(--ds-text, #172B4D)"};
139
- border-radius: ${"var(--ds-radius-small, 3px)"};
140
- margin: ${"var(--ds-space-100, 8px)"};
141
- font-size: ${relativeFontSizeToBase16(14)};
142
- line-height: 1.5rem;
143
- }
144
- }
145
-
146
- .${CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET} {
147
- pointer-events: none;
148
- user-select: none;
149
- width: var(--lineNumberGutterWidth, 2rem);
150
- left: 0;
151
- position: absolute;
152
- font-size: ${relativeFontSizeToBase16(14)};
153
- padding: 0px ${"var(--ds-space-100, 8px)"};
154
- line-height: 1.5rem;
155
- text-align: right;
156
- color: ${"var(--ds-text-subtlest, #505F79)"};
157
- box-sizing: content-box;
158
- }
159
- }
160
- `;
161
-
162
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
163
- export const codeBlockInListSafariFix = css`
164
- ::before {
165
- content: ' ';
166
- line-height: ${akEditorLineHeight};
167
- }
168
-
169
- > p:first-child,
170
- > .code-block:first-child,
171
- > .ProseMirror-gapcursor:first-child + .code-block {
172
- margin-top: -${akEditorLineHeight}em !important;
173
- }
174
- `;
11
+ };
@@ -1,14 +1,4 @@
1
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
- import { css } from '@emotion/react';
3
1
  export const DateSharedCssClassName = {
4
2
  DATE_WRAPPER: `date-lozenger-container`,
5
3
  DATE_CONTAINER: 'dateView-content-wrap'
6
- };
7
-
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
9
- export const dateSharedStyle = css({
10
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
11
- [`.${DateSharedCssClassName.DATE_WRAPPER} span`]: {
12
- whiteSpace: 'unset'
13
- }
14
- });
4
+ };
@@ -1,39 +1 @@
1
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
- import { css } from '@emotion/react';
3
- import { akEditorGridLineZIndex } from '@atlaskit/editor-shared-styles';
4
- export const GRID_GUTTER = 12;
5
-
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
7
- export const gridStyles = css({
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
9
- '.gridParent': {
10
- width: `calc(100% + ${GRID_GUTTER * 2}px)`,
11
- marginLeft: "var(--ds-space-negative-150, -12px)",
12
- marginRight: "var(--ds-space-negative-150, -12px)",
13
- transform: 'scale(1)',
14
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
15
- zIndex: akEditorGridLineZIndex
16
- },
17
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
18
- '.gridContainer': {
19
- position: 'fixed',
20
- height: '100vh',
21
- width: '100%',
22
- pointerEvents: 'none'
23
- },
24
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
25
- '.gridLine': {
26
- borderLeft: `1px solid ${"var(--ds-border, #091E4224)"}`,
27
- display: 'inline-block',
28
- boxSizing: 'border-box',
29
- height: '100%',
30
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
31
- marginLeft: '-1px',
32
- transition: 'border-color 0.15s linear',
33
- zIndex: 0
34
- },
35
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
36
- '.highlight': {
37
- borderLeft: `1px solid ${"var(--ds-border-focused, #388BFF)"}`
38
- }
39
- });
1
+ export const GRID_GUTTER = 12;
@@ -1,7 +1,3 @@
1
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
- import { css } from '@emotion/react';
3
- import { bulletListSelector, orderedListSelector } from '@atlaskit/adf-schema';
4
- import { browser } from '../../utils/browser';
5
1
  export const listItemCounterPadding = 24;
6
2
  var CSS_VAR_NAMES = /*#__PURE__*/function (CSS_VAR_NAMES) {
7
3
  CSS_VAR_NAMES["ITEM_COUNTER_PADDING"] = "--ed--list--item-counter--padding";
@@ -36,120 +32,4 @@ export function getOrderedListInlineStyles(itemCounterDigitsSize, styleFormat
36
32
  return stringifyStyle(style);
37
33
  }
38
34
  return style;
39
- }
40
-
41
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766, There is some "flow-root" hack that is not actually valid css. Do note, this might not even work in Compiled (or Emotion) due to the way tagged template expressions are parsed…
42
- export const listsSharedStyles = css`
43
- /* =============== INDENTATION SPACING ========= */
44
-
45
- ul,
46
- ol {
47
- box-sizing: border-box;
48
- padding-left: var(${CSS_VAR_NAMES.ITEM_COUNTER_PADDING}, ${listItemCounterPadding}px);
49
- /*
50
- Firefox does not handle empty block element inside li tag.
51
- If there is not block element inside li tag,
52
- then firefox sets inherited height to li
53
- However, if there is any block element and if it's empty
54
- (or has empty inline element) then
55
- firefox sets li tag height to zero.
56
- More details at
57
- https://product-fabric.atlassian.net/wiki/spaces/~455502413/pages/3149365890/ED-14110+Investigation
58
- */
59
- li p:empty,
60
- li p > span:empty {
61
- ${browser.gecko ? 'display: inline-block;' : ''}
62
- }
63
- }
64
-
65
- ${orderedListSelector}, ${bulletListSelector} {
66
- /*
67
- Ensures list item content adheres to the list's margin instead
68
- of filling the entire block row. This is important to allow
69
- clicking interactive elements which are floated next to a list.
70
-
71
- For some history and context on this block, see PRs related to tickets.:
72
- @see ED-6551 - original issue.
73
- @see ED-7015 - follow up issue.
74
- @see ED-7447 - flow-root change.
75
-
76
- We use 'display: table' (old clear fix / new block formatting context hack)
77
- for older browsers and 'flow-root' for modern browsers.
78
-
79
- @see https://css-tricks.com/display-flow-root/
80
- */
81
- /* For older browsers the do not support flow-root. */
82
- /* stylelint-disable declaration-block-no-duplicate-properties */
83
- display: table;
84
- display: flow-root;
85
- /* stylelint-enable declaration-block-no-duplicate-properties */
86
- }
87
-
88
- /* =============== INDENTATION AESTHETICS ========= */
89
-
90
- /**
91
- We support nested lists up to six levels deep.
92
- **/
93
-
94
- /* LEGACY LISTS */
95
-
96
- ul,
97
- ul ul ul ul {
98
- list-style-type: disc;
99
- }
100
-
101
- ul ul,
102
- ul ul ul ul ul {
103
- list-style-type: circle;
104
- }
105
-
106
- ul ul ul,
107
- ul ul ul ul ul ul {
108
- list-style-type: square;
109
- }
110
-
111
- ol,
112
- ol ol ol ol {
113
- list-style-type: decimal;
114
- }
115
- ol ol,
116
- ol ol ol ol ol {
117
- list-style-type: lower-alpha;
118
- }
119
- ol ol ol,
120
- ol ol ol ol ol ol {
121
- list-style-type: lower-roman;
122
- }
123
-
124
- /* PREDICTABLE LISTS */
125
-
126
- ol[data-indent-level='1'],
127
- ol[data-indent-level='4'] {
128
- list-style-type: decimal;
129
- }
130
-
131
- ol[data-indent-level='2'],
132
- ol[data-indent-level='5'] {
133
- list-style-type: lower-alpha;
134
- }
135
-
136
- ol[data-indent-level='3'],
137
- ol[data-indent-level='6'] {
138
- list-style-type: lower-roman;
139
- }
140
-
141
- ul[data-indent-level='1'],
142
- ul[data-indent-level='4'] {
143
- list-style-type: disc;
144
- }
145
-
146
- ul[data-indent-level='2'],
147
- ul[data-indent-level='5'] {
148
- list-style-type: circle;
149
- }
150
-
151
- ul[data-indent-level='3'],
152
- ul[data-indent-level='6'] {
153
- list-style-type: square;
154
- }
155
- `;
35
+ }