@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
@@ -1,12 +1,5 @@
1
- /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
2
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
- import { css } from '@emotion/react';
4
1
  import { PanelType } from '@atlaskit/adf-schema';
5
2
  import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
6
- import { akEditorTableCellMinWidth, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
7
- import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
8
- import { emojiImage, emojiSprite } from '@atlaskit/emoji';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
3
  const lightPanelColors = {
11
4
  info: '#DEEBFF',
12
5
  note: '#EAE6FF',
@@ -77,19 +70,6 @@ export const darkPanelColors = {
77
70
  LightGray: '#5A6977',
78
71
  TextColor: '#D9DDE3'
79
72
  };
80
- const lightIconColor = {
81
- info: "var(--ds-icon-information, #1D7AFC)",
82
- note: "var(--ds-icon-discovery, #8270DB)",
83
- tip: "var(--ds-icon-success, #22A06B)",
84
- success: "var(--ds-icon-success, #22A06B)",
85
- warning: "var(--ds-icon-warning, #E56910)",
86
- error: "var(--ds-icon-danger, #C9372C)"
87
- };
88
-
89
- // New custom icons are a little smaller than predefined icons.
90
- // To fix alignment issues with custom icons, vertical alignment is updated.
91
- const panelEmojiSpriteVerticalAlignment = -(8 * 3 - akEditorCustomIconSize) / 2;
92
- const panelEmojiImageVerticalAlignment = panelEmojiSpriteVerticalAlignment - 1;
93
73
  export function getPanelDarkModeCSS(colorName, colorValue) {
94
74
  return `
95
75
  &[data-panel-color="${colorName}"] {
@@ -128,124 +108,7 @@ export const PanelSharedSelectors = {
128
108
  yellowWarningIcon: `[aria-label=":warning:"] span:nth-child(1)`,
129
109
  copyButton: `button[aria-label="Copy"]`
130
110
  };
131
- const getIconStyles = panelType => {
132
- return `
133
- .${PanelSharedCssClassName.icon}[data-panel-type='${panelType}'] {
134
- color: ${lightIconColor[panelType]};
135
- }
136
- `;
137
- };
138
111
 
139
112
  // Provides the color without tokens, used when converting to a custom panel
140
113
  export const getPanelTypeBackgroundNoTokens = panelType => lightPanelColors[panelType] || 'none';
141
- export const getPanelTypeBackground = panelType => hexToEditorBackgroundPaletteColor(lightPanelColors[panelType]) || 'none';
142
- const mainDynamicStyles = panelType => {
143
- return `
144
- background-color: ${getPanelTypeBackground(panelType)};
145
- color: inherit;
146
- `;
147
- };
148
-
149
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Safe to autofix with a tiny tweak to `mainDynamicStyles` being an object, but holding off…
150
- export const panelSharedStylesWithoutPrefix = () => css`
151
- border-radius: ${"var(--ds-radius-small, 3px)"};
152
- margin: ${blockNodesVerticalMargin} 0 0;
153
- padding-top: ${"var(--ds-space-100, 8px)"};
154
- padding-right: ${"var(--ds-space-200, 16px)"};
155
- padding-bottom: ${"var(--ds-space-100, 8px)"};
156
- padding-left: ${"var(--ds-space-100, 8px)"};
157
- min-width: ${akEditorTableCellMinWidth}px;
158
- display: flex;
159
- position: relative;
160
- align-items: normal;
161
- word-break: break-word;
162
-
163
- ${mainDynamicStyles(PanelType.INFO)}
164
-
165
- .${PanelSharedCssClassName.icon} {
166
- flex-shrink: 0;
167
- height: ${"var(--ds-space-300, 24px)"};
168
- width: ${"var(--ds-space-300, 24px)"};
169
- box-sizing: content-box;
170
- padding-right: ${"var(--ds-space-100, 8px)"};
171
- text-align: center;
172
- user-select: none;
173
- -moz-user-select: none;
174
- -webkit-user-select: none;
175
- -ms-user-select: none;
176
- margin-top: 0.1em;
177
-
178
- > span {
179
- vertical-align: middle;
180
- display: inline-flex;
181
- }
182
-
183
- .${emojiSprite} {
184
- vertical-align: ${panelEmojiSpriteVerticalAlignment}px;
185
- }
186
-
187
- .${emojiImage} {
188
- vertical-align: ${panelEmojiImageVerticalAlignment}px;
189
-
190
- /* Vertical align only works for inline-block elements in Firefox */
191
- @-moz-document url-prefix() {
192
- img {
193
- display: inline-block;
194
- }
195
- }
196
- }
197
- }
198
-
199
- .ak-editor-panel__content {
200
- margin: ${"var(--ds-space-025, 2px)"} 0 ${"var(--ds-space-025, 2px)"};
201
- flex: 1 0 0;
202
- /*
203
- https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox
204
- The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn’t compute to zero. The minimum size of a flex item is equal to the size of its contents.
205
- */
206
- min-width: 0;
207
- }
208
-
209
- /* support nested panel */
210
- .${PanelSharedCssClassName.content} .${prefix} {
211
- border: 1px solid ${"var(--ds-border, #091E42)"};
212
- }
213
-
214
- &[data-panel-type='${PanelType.INFO}'] {
215
- ${getIconStyles(PanelType.INFO)}
216
- }
217
-
218
- &[data-panel-type='${PanelType.NOTE}'] {
219
- ${mainDynamicStyles(PanelType.NOTE)}
220
- ${getIconStyles(PanelType.NOTE)}
221
- }
222
-
223
- &[data-panel-type='${PanelType.TIP}'] {
224
- ${mainDynamicStyles(PanelType.TIP)}
225
- ${getIconStyles(PanelType.TIP)}
226
- }
227
-
228
- &[data-panel-type='${PanelType.WARNING}'] {
229
- ${mainDynamicStyles(PanelType.WARNING)}
230
- ${getIconStyles(PanelType.WARNING)}
231
- }
232
-
233
- &[data-panel-type='${PanelType.ERROR}'] {
234
- ${mainDynamicStyles(PanelType.ERROR)}
235
- ${getIconStyles(PanelType.ERROR)}
236
- }
237
-
238
- &[data-panel-type='${PanelType.SUCCESS}'] {
239
- ${mainDynamicStyles(PanelType.SUCCESS)}
240
- ${getIconStyles(PanelType.SUCCESS)}
241
- }
242
-
243
- ${fg('platform_editor_nested_dnd_styles_changes') ? `&.${PanelSharedCssClassName.noIcon} {
244
- padding-right: ${"var(--ds-space-150, 12px)"};
245
- padding-left: ${"var(--ds-space-150, 12px)"};
246
- }` : ''}
247
- `;
248
- export const panelSharedStyles = () => css({
249
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
250
- [`.${PanelSharedCssClassName.prefix}`]: panelSharedStylesWithoutPrefix()
251
- });
114
+ export const getPanelTypeBackground = panelType => hexToEditorBackgroundPaletteColor(lightPanelColors[panelType]) || 'none';
@@ -1,8 +1,6 @@
1
1
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
2
  import { css } from '@emotion/react';
3
- import { akEditorDeleteIconColor, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
4
- import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
5
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
3
+ import { akEditorDeleteIconColor } from '@atlaskit/editor-shared-styles';
6
4
  /*
7
5
  Styles in this file are based on
8
6
  packages/editor/editor-core/src/plugins/media/styles.ts
@@ -217,211 +215,4 @@ export const resizerStyles = css`
217
215
  padding: unset;
218
216
  left: unset;
219
217
  }
220
- `;
221
-
222
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
223
- export const pragmaticResizerStylesForTooltip = () => {
224
- if (expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true)) {
225
- return css({
226
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
227
- '.pm-breakout-resize-handle-rail-wrapper': {
228
- display: 'flex',
229
- alignItems: 'center',
230
- justifyContent: 'center',
231
- height: '100%',
232
- cursor: 'col-resize',
233
- borderRadius: "var(--ds-radius-small, 4px)",
234
- zIndex: 2,
235
- // Tootip element
236
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
237
- '[role="presentation"]': {
238
- height: '100%',
239
- width: '100%'
240
- },
241
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
242
- '.pm-breakout-resize-handle-rail-inside-tooltip': {
243
- height: '100%'
244
- }
245
- }
246
- });
247
- }
248
- };
249
- export const pragmaticStylesLayoutFirstNodeResizeHandleFix = () => {
250
- if (editorExperiment('advanced_layouts', true) && expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true)) {
251
- return css({
252
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
253
- '.fabric-editor-breakout-mark': {
254
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
255
- '&:has([data-prosemirror-node-name="layoutSection"].first-node-in-document)': {
256
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
257
- '> .pm-breakout-resize-handle-container': {
258
- height: 'calc(100% - 8px)'
259
- }
260
- }
261
- }
262
- });
263
- }
264
- };
265
-
266
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
267
- export const pragmaticResizerStyles = () => {
268
- if (!expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true)) {
269
- return;
270
- }
271
- return css({
272
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
273
- '.fabric-editor-breakout-mark': {
274
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
275
- '&:has([data-prosemirror-node-name="codeBlock"])': {
276
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
277
- '> .pm-breakout-resize-handle-container--left': {
278
- left: '-5px'
279
- },
280
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
281
- '> .pm-breakout-resize-handle-container--right': {
282
- right: '-5px'
283
- },
284
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
285
- '> .pm-breakout-resize-handle-container': {
286
- height: 'calc(100% - 12px)'
287
- }
288
- },
289
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
290
- '&:has([data-prosemirror-node-name="expand"]), &:has([data-prosemirror-node-name="layoutSection"])': {
291
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
292
- '> .pm-breakout-resize-handle-container--left': {
293
- left: '-25px'
294
- },
295
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
296
- '> .pm-breakout-resize-handle-container--right': {
297
- right: '-25px'
298
- }
299
- },
300
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
301
- '&:has([data-prosemirror-node-name="expand"])': {
302
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
303
- '> .pm-breakout-resize-handle-container': {
304
- height: 'calc(100% - 4px)'
305
- }
306
- },
307
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
308
- '&:has([data-prosemirror-node-name="layoutSection"])': {
309
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
310
- '> .pm-breakout-resize-handle-container': {
311
- height: 'calc(100% - 8px)'
312
- }
313
- },
314
- // the first node in the document always has margin-top = 0
315
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
316
- '&:has(.first-node-in-document)': {
317
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
318
- '> .pm-breakout-resize-handle-container': {
319
- height: '100%'
320
- }
321
- }
322
- },
323
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
324
- '.pm-breakout-resize-handle-container': {
325
- position: 'relative',
326
- alignSelf: 'end',
327
- gridRow: 1,
328
- gridColumn: 1,
329
- height: '100%',
330
- width: 7
331
- },
332
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
333
- '.pm-breakout-resize-handle-container--left': {
334
- justifySelf: 'start'
335
- },
336
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
337
- '.pm-breakout-resize-handle-container--right': {
338
- justifySelf: 'end'
339
- },
340
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
341
- '.pm-breakout-resize-handle-rail': {
342
- position: 'relative',
343
- display: 'flex',
344
- alignItems: 'center',
345
- justifyContent: 'center',
346
- height: '100%',
347
- cursor: 'col-resize',
348
- borderRadius: "var(--ds-radius-small, 4px)",
349
- transition: 'background-color 0.2s, visibility 0.2s, opacity 0.2s',
350
- zIndex: 2,
351
- opacity: 0,
352
- '&:hover': {
353
- background: "var(--ds-background-selected, #E9F2FF)",
354
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
355
- '.pm-breakout-resize-handle-thumb': {
356
- background: "var(--ds-border-focused, #388BFF)"
357
- }
358
- }
359
- },
360
- // same as 'hover' styles above
361
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
362
- '.pm-breakout-resize-handle-container--active': {
363
- background: "var(--ds-background-selected, #E9F2FF)",
364
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
365
- '.pm-breakout-resize-handle-thumb': {
366
- background: "var(--ds-border-focused, #388BFF)"
367
- }
368
- },
369
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
370
- '.pm-breakout-resize-handle-hit-box': {
371
- position: 'absolute',
372
- top: 0,
373
- bottom: 0,
374
- left: -20,
375
- right: -20,
376
- zIndex: 0
377
- },
378
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
379
- '.pm-breakout-resize-handle-thumb': {
380
- minWidth: resizerHandleThumbWidth,
381
- // copied from resizeStyles.clamped
382
- height: 'clamp(27px, calc(100% - 32px), 96px)',
383
- background: "var(--ds-border, #091E4224)",
384
- borderRadius: "var(--ds-radius-medium, 6px)",
385
- // sticky styles
386
- position: 'sticky',
387
- top: "var(--ds-space-150, 12px)",
388
- bottom: "var(--ds-space-150, 12px)"
389
- }
390
- });
391
- };
392
- export const pragmaticResizerStylesWithReducedEditorGutter = () => {
393
- if (editorExperiment('platform_editor_preview_panel_responsiveness', true) && (expValEqualsNoExposure('advanced_layouts', 'isEnabled', true) || expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true))) {
394
- return css({
395
- /* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */
396
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-container-queries, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
397
- [`@container editor-area (max-width: ${akEditorFullPageNarrowBreakout}px)`]: {
398
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
399
- '.fabric-editor-breakout-mark': {
400
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
401
- '&:has([data-prosemirror-node-name="expand"]), &:has([data-prosemirror-node-name="layoutSection"])': {
402
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
403
- '> .pm-breakout-resize-handle-container': {
404
- opacity: 0,
405
- visibility: 'hidden'
406
- }
407
- },
408
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
409
- '&:has([data-prosemirror-node-name="layoutSection"])': {
410
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
411
- [`.${resizerItemClassName}`]: {
412
- willChange: 'width',
413
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
414
- '&:hover, &.display-handle': {
415
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
416
- [`& > .${handleWrapperClass} > .${resizerHandleClassName}`]: {
417
- visibility: 'hidden',
418
- opacity: 0
419
- }
420
- }
421
- }
422
- }
423
- }
424
- }
425
- });
426
- }
427
- };
218
+ `;
@@ -1,30 +1,7 @@
1
- import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
2
1
  export const SmartCardSharedCssClassName = {
3
2
  INLINE_CARD_CONTAINER: 'inlineCardView-content-wrap',
4
3
  BLOCK_CARD_CONTAINER: 'blockCardView-content-wrap',
5
4
  EMBED_CARD_CONTAINER: 'embedCardView-content-wrap',
6
5
  DATASOURCE_CONTAINER: 'datasourceView-content-wrap',
7
6
  LOADER_WRAPPER: 'loader-wrapper'
8
- };
9
- export const smartCardSharedStyles = `
10
- .${SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER} {
11
- display: block;
12
- margin: ${blockNodesVerticalMargin} 0 0;
13
- max-width: ${8 * 95}px;
14
- }
15
- `;
16
- export const getSmartCardSharedStyles = () => `
17
- .${SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER} {
18
- display: block;
19
- margin: ${blockNodesVerticalMargin} 0 0;
20
- max-width: ${8 * 95}px;
21
- }
22
-
23
- .${SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER} {
24
- /* EDM-11991: Fix list plugin adding padding to ADS AvatarGroup start */
25
- ul, ol {
26
- padding-left: inherit;
27
- }
28
- /* EDM-11991: Fix list plugin add padding to ADS AvatarGroup end */
29
- }
30
- `;
7
+ };
@@ -1,152 +1,2 @@
1
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
- import { css } from '@emotion/react';
3
- import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
4
- import { fg } from '@atlaskit/platform-feature-flags';
5
- import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
6
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
- import { SmartCardSharedCssClassName } from './smart-card';
8
1
  export const DATASOURCE_INNER_CONTAINER_CLASSNAME = 'datasourceView-content-inner-wrap';
9
- export const FLOATING_TOOLBAR_LINKPICKER_CLASSNAME = 'card-floating-toolbar--link-picker';
10
-
11
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
12
- export const smartCardStyles = () => css`
13
- .${SmartCardSharedCssClassName.INLINE_CARD_CONTAINER} {
14
- max-width: calc(100% - 20px);
15
- vertical-align: top;
16
- word-break: break-all;
17
- ${fg('editor_inline_comments_on_inline_nodes') ? `.card-with-comment {
18
- background: ${"var(--ds-background-accent-yellow-subtler, #F8E6A0)"};
19
- border-bottom: 2px solid ${"var(--ds-border-accent-yellow, #B38600)"};
20
- box-shadow: ${"var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)"};
21
- }` : ''}
22
- .card {
23
- padding-left: ${"var(--ds-space-025, 2px)"};
24
- padding-right: ${"var(--ds-space-025, 2px)"};
25
- padding-top: 0.5em;
26
- padding-bottom: 0.5em;
27
- margin-bottom: -0.5em;
28
-
29
- .${SmartCardSharedCssClassName.LOADER_WRAPPER} > a:focus {
30
- ${getSelectionStyles([SelectionStyle.BoxShadow])}
31
- }
32
- }
33
-
34
- ${editorExperiment('platform_editor_controls', 'variant1') || editorExperiment('platform_editor_preview_panel_linking_exp', true) ? `[data-inlinecard-button-overlay='icon-wrapper-line-height'] span {
35
- line-height: 0;
36
- }` : ''}
37
-
38
- ${expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? `
39
- &.${akEditorSelectedNodeClassName}:not(.search-match-block) .${SmartCardSharedCssClassName.LOADER_WRAPPER} > a {
40
- ${getSelectionStyles([SelectionStyle.BoxShadow])}
41
- }` : `
42
- &.${akEditorSelectedNodeClassName} .${SmartCardSharedCssClassName.LOADER_WRAPPER} > a {
43
- ${getSelectionStyles([SelectionStyle.BoxShadow])}
44
- }`}
45
- .${SmartCardSharedCssClassName.LOADER_WRAPPER} > a {
46
- /* EDM-1717: box-shadow Safari fix start */
47
- z-index: 1;
48
- position: relative;
49
- /* EDM-1717: box-shadow Safari fix end */
50
- }
51
-
52
- &.danger {
53
- .${SmartCardSharedCssClassName.LOADER_WRAPPER} > a {
54
- box-shadow: 0 0 0 1px ${`var(--ds-border-danger, ${akEditorDeleteBorder})`};
55
- /* EDM-1717: box-shadow Safari fix start */
56
- z-index: 2;
57
- /* EDM-1717: box-shadow Safari fix end */
58
- }
59
- }
60
- }
61
-
62
- .${SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER} {
63
- .${SmartCardSharedCssClassName.LOADER_WRAPPER} > div {
64
- cursor: pointer;
65
-
66
- a {
67
- cursor: auto;
68
- }
69
- }
70
-
71
- &.${akEditorSelectedNodeClassName} .${SmartCardSharedCssClassName.LOADER_WRAPPER} > div {
72
- ${getSelectionStyles([SelectionStyle.BoxShadow])}
73
- border-radius: ${"var(--ds-radius-large, 8px)"};
74
- }
75
-
76
- &.danger {
77
- .${SmartCardSharedCssClassName.LOADER_WRAPPER} > div {
78
- box-shadow: 0 0 0 1px ${`var(--ds-border-danger, ${akEditorDeleteBorder})`} !important;
79
- }
80
- }
81
- }
82
-
83
- .${SmartCardSharedCssClassName.DATASOURCE_CONTAINER}.${SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER} {
84
- max-width: 100%;
85
- display: flex;
86
- justify-content: center;
87
-
88
- .${DATASOURCE_INNER_CONTAINER_CLASSNAME} {
89
- cursor: pointer;
90
- background-color: ${"var(--ds-background-neutral-subtle, #00000000)"};
91
- border-radius: ${"var(--ds-radius-large, 8px)"};
92
- border: 1px solid ${"var(--ds-border, #091E4224)"};
93
- overflow: hidden;
94
- }
95
-
96
- &.${akEditorSelectedNodeClassName} {
97
- .${DATASOURCE_INNER_CONTAINER_CLASSNAME} {
98
- ${getSelectionStyles([SelectionStyle.BoxShadow])}
99
-
100
- input::selection {
101
- background-color: ${"var(--ds-background-selected-hovered, #CCE0FF)"};
102
- }
103
- input::-moz-selection {
104
- background-color: ${"var(--ds-background-selected-hovered, #CCE0FF)"};
105
- }
106
- }
107
- }
108
-
109
- &.danger {
110
- .${DATASOURCE_INNER_CONTAINER_CLASSNAME} {
111
- box-shadow: 0 0 0 1px ${`var(--ds-border-danger, ${akEditorDeleteBorder})`};
112
- }
113
- }
114
- }
115
-
116
- .${SmartCardSharedCssClassName.EMBED_CARD_CONTAINER} {
117
- .${SmartCardSharedCssClassName.LOADER_WRAPPER} > div {
118
- cursor: pointer;
119
- a {
120
- cursor: auto;
121
- }
122
- &::after {
123
- transition: box-shadow 0s;
124
- }
125
- }
126
-
127
- ${expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? `
128
- &.${akEditorSelectedNodeClassName}:not(.search-match-block) .${SmartCardSharedCssClassName.LOADER_WRAPPER} > div::after {
129
- ${getSelectionStyles([SelectionStyle.BoxShadow])}
130
- }
131
- ` : `
132
- &.${akEditorSelectedNodeClassName} .${SmartCardSharedCssClassName.LOADER_WRAPPER} > div::after {
133
- ${getSelectionStyles([SelectionStyle.BoxShadow])}
134
- }
135
- `}
136
-
137
- &.danger {
138
- .media-card-frame::after {
139
- box-shadow: 0 0 0 1px ${`var(--ds-border-danger, ${akEditorDeleteBorder})`} !important;
140
- background: ${`var(--ds-background-danger, ${akEditorDeleteBackground})`} !important;
141
- }
142
- .richMedia-resize-handle-right::after,
143
- .richMedia-resize-handle-left::after {
144
- background: ${`var(--ds-border-danger, ${akEditorDeleteBorder})`};
145
- }
146
- }
147
- }
148
-
149
- .${FLOATING_TOOLBAR_LINKPICKER_CLASSNAME} {
150
- padding: 0;
151
- }
152
- `;
2
+ export const FLOATING_TOOLBAR_LINKPICKER_CLASSNAME = 'card-floating-toolbar--link-picker';
@@ -1,68 +1,6 @@
1
- /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression */
2
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
- import { css } from '@emotion/react';
4
- import { akEditorLineHeight, akEditorTableCellMinWidth } from '@atlaskit/editor-shared-styles';
5
1
  export const TaskDecisionSharedCssClassName = {
6
2
  DECISION_CONTAINER: 'decisionItemView-content-wrap',
7
3
  TASK_CONTAINER: 'taskItemView-content-wrap',
8
4
  TASK_ITEM: 'task-item',
9
5
  TASK_CHECKBOX_CONTAINER: 'task-item-checkbox-wrap'
10
- };
11
-
12
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
13
- export const tasksAndDecisionsStyles = css`
14
- .ProseMirror {
15
- .taskItemView-content-wrap,
16
- .${TaskDecisionSharedCssClassName.DECISION_CONTAINER} {
17
- position: relative;
18
- min-width: ${akEditorTableCellMinWidth}px;
19
- }
20
-
21
- .${TaskDecisionSharedCssClassName.DECISION_CONTAINER} {
22
- margin-top: 0;
23
- }
24
-
25
- .${TaskDecisionSharedCssClassName.TASK_CONTAINER} {
26
- span[contenteditable='false'] {
27
- height: ${akEditorLineHeight}em;
28
- }
29
- }
30
-
31
- .${TaskDecisionSharedCssClassName.TASK_ITEM} {
32
- line-height: ${akEditorLineHeight};
33
- }
34
- }
35
-
36
- div[data-task-local-id] {
37
- span[contenteditable='false'] {
38
- height: ${akEditorLineHeight}em;
39
- }
40
- span[contenteditable='false'] + div {
41
- line-height: ${akEditorLineHeight}em;
42
- }
43
- }
44
-
45
- div[data-task-list-local-id] {
46
- margin: ${"var(--ds-space-150, 12px)"} 0 0 0;
47
- }
48
-
49
- div[data-task-list-local-id] {
50
- /* If task item is not first in the list then set margin top to 4px. */
51
- div + div {
52
- margin-top: ${"var(--ds-space-050, 4px)"};
53
- }
54
- }
55
-
56
- /* If task list is not first in the document then set margin top to 4px. */
57
- div[data-task-list-local-id] div[data-task-list-local-id] {
58
- margin-top: ${"var(--ds-space-050, 4px)"};
59
- margin-left: ${"var(--ds-space-300, 24px)"};
60
- }
61
-
62
- /* When action list is inside panel */
63
- .ak-editor-panel__content {
64
- > div[data-task-list-local-id]:first-child {
65
- margin: 0 0 0 0 !important;
66
- }
67
- }
68
- `;
6
+ };
@@ -1,30 +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
- import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
4
1
  export const UnsupportedSharedCssClassName = {
5
2
  BLOCK_CONTAINER: 'unsupportedBlockView-content-wrap',
6
3
  INLINE_CONTAINER: 'unsupportedInlineView-content-wrap'
7
- };
8
- const inlineUnsupportedSelector = `.${UnsupportedSharedCssClassName.INLINE_CONTAINER} > span:nth-of-type(2)`;
9
- const blockUnsupportedSelector = `.${UnsupportedSharedCssClassName.BLOCK_CONTAINER} > div`;
10
-
11
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
12
- export const unsupportedStyles = css`
13
- ${blockUnsupportedSelector}, ${inlineUnsupportedSelector} {
14
- cursor: pointer;
15
- }
16
-
17
- .${akEditorSelectedNodeClassName}${blockUnsupportedSelector},
18
- .${akEditorSelectedNodeClassName}${inlineUnsupportedSelector} {
19
- ${getSelectionStyles([SelectionStyle.Background, SelectionStyle.Border])}
20
- }
21
-
22
- .danger {
23
- .${akEditorSelectedNodeClassName}${blockUnsupportedSelector},
24
- .${akEditorSelectedNodeClassName}${inlineUnsupportedSelector} {
25
- border: ${akEditorSelectedBorderSize}px solid
26
- ${`var(--ds-border-danger, ${akEditorDeleteBorder})`};
27
- background-color: ${`var(--ds-blanket-danger, ${akEditorDeleteBackgroundWithOpacity})`};
28
- }
29
- }
30
- `;
4
+ };
@@ -7,4 +7,5 @@ export { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenMu
7
7
  export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, findCodeBlock } from './code-block';
8
8
  export { transformSliceToDecisionList } from './decision-list';
9
9
  export { transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode } from './list-transforms';
10
- export { isBulletOrOrderedList, isTaskList, getSupportedListTypesSet, convertBlockToInlineContent } from './list-utils';
10
+ export { isBulletOrOrderedList, isTaskList, getSupportedListTypesSet, convertBlockToInlineContent } from './list-utils';
11
+ export { transformToNewReferenceSyncBlock } from './sync-block';