@atlaskit/editor-common 72.0.0 → 72.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/dist/cjs/analytics/types/enums.js +1 -1
  3. package/dist/cjs/keymaps/index.js +1 -3
  4. package/dist/cjs/styles/shared/annotation.js +9 -11
  5. package/dist/cjs/styles/shared/blockquote.js +1 -3
  6. package/dist/cjs/styles/shared/code-block.js +11 -13
  7. package/dist/cjs/styles/shared/code-mark.js +2 -4
  8. package/dist/cjs/styles/shared/panel.js +24 -28
  9. package/dist/cjs/styles/shared/rule.js +2 -4
  10. package/dist/cjs/styles/shared/shadow.js +1 -3
  11. package/dist/cjs/styles/shared/table.js +22 -24
  12. package/dist/cjs/ui/Caption/index.js +2 -4
  13. package/dist/cjs/ui/DropList/index.js +5 -7
  14. package/dist/cjs/ui/Expand/index.js +17 -19
  15. package/dist/cjs/ui/Messages/index.js +3 -5
  16. package/dist/cjs/ui/PortalProvider/PortalProviderThemesProvider.js +5 -12
  17. package/dist/cjs/ui/UnsupportedBlock/index.js +1 -3
  18. package/dist/cjs/ui/UnsupportedInline/index.js +1 -3
  19. package/dist/cjs/ui-color/ColorPalette/Palettes/textColorPalette.js +1 -7
  20. package/dist/cjs/ui-color/ColorPalette/index.js +1 -1
  21. package/dist/cjs/ui-color/index.js +0 -6
  22. package/dist/cjs/ui-menu/DropdownMenu/index.js +10 -12
  23. package/dist/cjs/version.json +1 -1
  24. package/dist/es2019/analytics/types/enums.js +1 -1
  25. package/dist/es2019/keymaps/index.js +1 -2
  26. package/dist/es2019/styles/shared/annotation.js +9 -10
  27. package/dist/es2019/styles/shared/blockquote.js +1 -2
  28. package/dist/es2019/styles/shared/code-block.js +11 -12
  29. package/dist/es2019/styles/shared/code-mark.js +2 -3
  30. package/dist/es2019/styles/shared/panel.js +24 -27
  31. package/dist/es2019/styles/shared/rule.js +2 -3
  32. package/dist/es2019/styles/shared/shadow.js +4 -5
  33. package/dist/es2019/styles/shared/table.js +22 -23
  34. package/dist/es2019/ui/Caption/index.js +2 -3
  35. package/dist/es2019/ui/DropList/index.js +5 -6
  36. package/dist/es2019/ui/Expand/index.js +17 -18
  37. package/dist/es2019/ui/Messages/index.js +3 -4
  38. package/dist/es2019/ui/PortalProvider/PortalProviderThemesProvider.js +5 -12
  39. package/dist/es2019/ui/UnsupportedBlock/index.js +2 -3
  40. package/dist/es2019/ui/UnsupportedInline/index.js +2 -3
  41. package/dist/es2019/ui-color/ColorPalette/Palettes/textColorPalette.js +1 -5
  42. package/dist/es2019/ui-color/ColorPalette/index.js +2 -2
  43. package/dist/es2019/ui-color/index.js +1 -1
  44. package/dist/es2019/ui-menu/DropdownMenu/index.js +11 -12
  45. package/dist/es2019/version.json +1 -1
  46. package/dist/esm/analytics/types/enums.js +1 -1
  47. package/dist/esm/keymaps/index.js +1 -2
  48. package/dist/esm/styles/shared/annotation.js +9 -10
  49. package/dist/esm/styles/shared/blockquote.js +1 -2
  50. package/dist/esm/styles/shared/code-block.js +11 -12
  51. package/dist/esm/styles/shared/code-mark.js +2 -3
  52. package/dist/esm/styles/shared/panel.js +24 -27
  53. package/dist/esm/styles/shared/rule.js +2 -3
  54. package/dist/esm/styles/shared/shadow.js +1 -2
  55. package/dist/esm/styles/shared/table.js +22 -23
  56. package/dist/esm/ui/Caption/index.js +2 -3
  57. package/dist/esm/ui/DropList/index.js +5 -6
  58. package/dist/esm/ui/Expand/index.js +17 -18
  59. package/dist/esm/ui/Messages/index.js +3 -4
  60. package/dist/esm/ui/PortalProvider/PortalProviderThemesProvider.js +5 -12
  61. package/dist/esm/ui/UnsupportedBlock/index.js +1 -2
  62. package/dist/esm/ui/UnsupportedInline/index.js +1 -2
  63. package/dist/esm/ui-color/ColorPalette/Palettes/textColorPalette.js +1 -5
  64. package/dist/esm/ui-color/ColorPalette/index.js +2 -2
  65. package/dist/esm/ui-color/index.js +1 -1
  66. package/dist/esm/ui-menu/DropdownMenu/index.js +10 -11
  67. package/dist/esm/version.json +1 -1
  68. package/dist/types/analytics/types/enums.d.ts +1 -1
  69. package/dist/types/analytics/types/events.d.ts +3 -2
  70. package/dist/types/analytics/types/experimental-events.d.ts +0 -1
  71. package/dist/types/analytics/types/general-events.d.ts +3 -1
  72. package/dist/types/types/feature-flags.d.ts +15 -5
  73. package/dist/types/types/floating-toolbar.d.ts +2 -0
  74. package/dist/types/ui-color/ColorPalette/Palettes/textColorPalette.d.ts +0 -1
  75. package/dist/types/ui-color/index.d.ts +1 -1
  76. package/package.json +6 -6
  77. package/report.api.md +16 -0
@@ -5,7 +5,6 @@ import { akEditorBreakoutPadding, akEditorFullWidthLayoutWidth, akEditorSelected
5
5
  import { DN20 } from '@atlaskit/theme/colors';
6
6
  import { themed } from '@atlaskit/theme/components';
7
7
  import { gridSize } from '@atlaskit/theme/constants';
8
- import { token } from '@atlaskit/tokens';
9
8
  import browser from '../../utils/browser';
10
9
  import { CodeBlockSharedCssClassName } from './code-block';
11
10
  export const tableMarginTop = 24;
@@ -65,8 +64,8 @@ const tableSharedStyle = props => css`
65
64
  border-collapse: collapse;
66
65
  border: ${tableCellBorderWidth}px solid
67
66
  ${themed({
68
- light: token('color.border', akEditorTableBorder),
69
- dark: token('color.border', akEditorTableBorderDark)
67
+ light: `var(--ds-border, ${akEditorTableBorder})`,
68
+ dark: `var(--ds-border, ${akEditorTableBorderDark})`
70
69
  })(props)};
71
70
  table-layout: fixed;
72
71
  font-size: 1em;
@@ -88,7 +87,7 @@ const tableSharedStyle = props => css`
88
87
  border-bottom: none;
89
88
  }
90
89
  th td {
91
- background-color: ${token('color.background.neutral.subtle', 'white')};
90
+ background-color: ${"var(--ds-background-neutral-subtle, white)"};
92
91
  }
93
92
  th,
94
93
  td {
@@ -97,8 +96,8 @@ const tableSharedStyle = props => css`
97
96
  vertical-align: top;
98
97
  border: 1px solid
99
98
  ${themed({
100
- light: token('color.border', akEditorTableBorder),
101
- dark: token('color.border', akEditorTableBorderDark)
99
+ light: `var(--ds-border, ${akEditorTableBorder})`,
100
+ dark: `var(--ds-border, ${akEditorTableBorderDark})`
102
101
  })(props)};
103
102
  border-right-width: 0;
104
103
  border-bottom-width: 0;
@@ -132,8 +131,8 @@ const tableSharedStyle = props => css`
132
131
  }
133
132
  th {
134
133
  background-color: ${themed({
135
- light: token('color.background.neutral', akEditorTableToolbar),
136
- dark: token('color.background.neutral', akEditorTableToolbarDark)
134
+ light: `var(--ds-background-neutral, ${akEditorTableToolbar})`,
135
+ dark: `var(--ds-background-neutral, ${akEditorTableToolbarDark})`
137
136
  })(props)};
138
137
  text-align: left;
139
138
 
@@ -142,34 +141,34 @@ const tableSharedStyle = props => css`
142
141
  &:not([style]):not(.danger) {
143
142
  .${CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER}:not(.danger) {
144
143
  background-color: ${themed({
145
- light: token('elevation.surface.raised', 'rgb(235, 237, 240)'),
146
- dark: token('elevation.surface.raised', 'rgb(36, 47, 66)')
144
+ light: "var(--ds-surface-raised, rgb(235, 237, 240))",
145
+ dark: "var(--ds-surface-raised, rgb(36, 47, 66))"
147
146
  })(props)};
148
147
 
149
148
  :not(.${akEditorSelectedNodeClassName}) {
150
149
  box-shadow: 0px 0px 0px 1px
151
- ${token('color.border', 'transparent')};
150
+ ${"var(--ds-border, transparent)"};
152
151
  }
153
152
 
154
153
  .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER} {
155
154
  background-image: ${overflowShadow({
156
155
  background: themed({
157
- light: token('color.background.neutral', 'rgb(235, 237, 240)'),
158
- dark: token('color.background.neutral', 'rgb(36, 47, 66)')
156
+ light: "var(--ds-background-neutral, rgb(235, 237, 240))",
157
+ dark: "var(--ds-background-neutral, rgb(36, 47, 66))"
159
158
  })(props),
160
159
  leftCoverWidth: `${gridSize() * 3}px`
161
160
  })};
162
161
 
163
162
  background-color: ${themed({
164
- light: token('color.background.neutral', 'rgb(235, 237, 240)'),
165
- dark: token('color.background.neutral', 'rgb(36, 47, 66)')
163
+ light: "var(--ds-background-neutral, rgb(235, 237, 240))",
164
+ dark: "var(--ds-background-neutral, rgb(36, 47, 66))"
166
165
  })(props)};
167
166
  }
168
167
 
169
168
  .${CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER} {
170
169
  background-color: ${themed({
171
- light: token('color.background.neutral', 'rgb(226, 229, 233)'),
172
- dark: token('color.background.neutral', DN20)
170
+ light: "var(--ds-background-neutral, rgb(226, 229, 233))",
171
+ dark: `var(--ds-background-neutral, ${DN20})`
173
172
  })(props)};
174
173
  }
175
174
 
@@ -177,21 +176,21 @@ const tableSharedStyle = props => css`
177
176
  > [data-ds--code--code-block] {
178
177
  background-image: ${overflowShadow({
179
178
  background: themed({
180
- light: token('color.background.neutral', 'rgb(235, 237, 240)'),
181
- dark: token('color.background.neutral', 'rgb(36, 47, 66)')
179
+ light: "var(--ds-background-neutral, rgb(235, 237, 240))",
180
+ dark: "var(--ds-background-neutral, rgb(36, 47, 66))"
182
181
  })(props),
183
182
  leftCoverWidth: `${gridSize() * 3}px`
184
183
  })}!important;
185
184
 
186
185
  background-color: ${themed({
187
- light: token('color.background.neutral', 'rgb(235, 237, 240)'),
188
- dark: token('color.background.neutral', 'rgb(36, 47, 66)')
186
+ light: "var(--ds-background-neutral, rgb(235, 237, 240))",
187
+ dark: "var(--ds-background-neutral, rgb(36, 47, 66))"
189
188
  })(props)}!important;
190
189
 
191
190
  // selector lives inside @atlaskit/code
192
191
  --ds--code--line-number-bg-color: ${themed({
193
- light: token('color.background.neutral', 'rgb(226, 229, 233)'),
194
- dark: token('color.background.neutral', DN20)
192
+ light: "var(--ds-background-neutral, rgb(226, 229, 233))",
193
+ dark: `var(--ds-background-neutral, ${DN20})`
195
194
  })(props)};
196
195
  }
197
196
  }
@@ -5,16 +5,15 @@ import React from 'react';
5
5
  import { css, jsx } from '@emotion/react';
6
6
  import { injectIntl } from 'react-intl-next';
7
7
  import { N200, N400 } from '@atlaskit/theme/colors';
8
- import { token } from '@atlaskit/tokens';
9
8
  import { messages } from './messages';
10
9
  const captionWrapperStyle = css`
11
10
  margin-top: 8px;
12
11
  text-align: center;
13
12
  position: relative;
14
- color: ${token('color.text.subtle', N400)};
13
+ color: ${`var(--ds-text-subtle, ${N400})`};
15
14
  `;
16
15
  const placeholderStyle = css`
17
- color: ${token('color.text.subtlest', N200)};
16
+ color: ${`var(--ds-text-subtlest, ${N200})`};
18
17
  position: absolute;
19
18
  top: 0;
20
19
  width: 100%;
@@ -7,10 +7,9 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
7
7
  import { DN50, DN600, N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
8
8
  import { themed } from '@atlaskit/theme/components';
9
9
  import { borderRadius, gridSize } from '@atlaskit/theme/constants';
10
- import { token } from '@atlaskit/tokens';
11
10
  import Layer from '../Layer';
12
11
  const packageName = "@atlaskit/editor-common";
13
- const packageVersion = "72.0.0";
12
+ const packageVersion = "72.1.0";
14
13
  const halfFocusRing = 1;
15
14
  const dropOffset = `0, ${gridSize()}px`;
16
15
 
@@ -33,12 +32,12 @@ class DropList extends Component {
33
32
  _defineProperty(this, "menuWrapper", theme => {
34
33
  return css`
35
34
  color: ${themed({
36
- light: token('color.text', N900),
37
- dark: token('color.text', DN600)
35
+ light: `var(--ds-text, ${N900})`,
36
+ dark: `var(--ds-text, ${DN600})`
38
37
  })(theme)};
39
38
  background-color: ${themed({
40
- light: token('elevation.surface.overlay', N0),
41
- dark: token('elevation.surface.overlay', DN50)
39
+ light: `var(--ds-surface-overlay, ${N0})`,
40
+ dark: `var(--ds-surface-overlay, ${DN50})`
42
41
  })(theme)};
43
42
  border-radius: ${borderRadius()}px;
44
43
  box-shadow: 0 ${gridSize() / 2}px ${gridSize()}px -${gridSize() / 4}px ${N50A},
@@ -8,7 +8,6 @@ import { akEditorLineHeight, akEditorSwoopCubicBezier, akLayoutGutterOffset, rel
8
8
  import * as colors from '@atlaskit/theme/colors';
9
9
  import { themed } from '@atlaskit/theme/components';
10
10
  import { fontSize, gridSize } from '@atlaskit/theme/constants';
11
- import { token } from '@atlaskit/tokens';
12
11
  export const messages = defineMessages({
13
12
  collapseNode: {
14
13
  id: 'fabric.editor.collapseNode',
@@ -32,16 +31,16 @@ export const messages = defineMessages({
32
31
  }
33
32
  });
34
33
  const BORDER_RADIUS = gridSize() / 2;
35
- const EXPAND_COLLAPSED_BACKGROUND = token('color.background.neutral.subtle', 'transparent');
34
+ const EXPAND_COLLAPSED_BACKGROUND = "var(--ds-background-neutral-subtle, transparent)";
36
35
  const EXPAND_SELECTED_BACKGROUND = themed({
37
- light: token('elevation.surface', 'rgba(255, 255, 255, 0.6)'),
38
- dark: token('elevation.surface', 'rgba(9, 10, 11, 0.29)')
36
+ light: "var(--ds-surface, rgba(255, 255, 255, 0.6))",
37
+ dark: "var(--ds-surface, rgba(9, 10, 11, 0.29))"
39
38
  });
40
- const EXPAND_FOCUSED_BORDER_COLOR = token('color.border.focused', colors.B300);
39
+ const EXPAND_FOCUSED_BORDER_COLOR = `var(--ds-border-focused, ${colors.B300})`;
41
40
  const EXPAND_COLLAPSED_BORDER_COLOR = 'transparent';
42
41
  const EXPAND_EXPANDED_BORDER_COLOR = themed({
43
- light: token('color.border', colors.N40A),
44
- dark: token('color.border', colors.DN50)
42
+ light: `var(--ds-border, ${colors.N40A})`,
43
+ dark: `var(--ds-border, ${colors.DN50})`
45
44
  });
46
45
  export const ExpandIconWrapper = ({
47
46
  children,
@@ -56,15 +55,15 @@ const expandIconWrapperStyle = props => css`
56
55
  cursor: pointer;
57
56
  display: flex;
58
57
  color: ${themed({
59
- light: token('color.icon', colors.N90),
60
- dark: token('color.icon', '#d9dde3')
58
+ light: `var(--ds-icon, ${colors.N90})`,
59
+ dark: "var(--ds-icon, #d9dde3)"
61
60
  })(props)};
62
61
  border-radius: ${gridSize() / 2}px;
63
62
  width: 24px;
64
63
  height: 24px;
65
64
 
66
65
  &:hover {
67
- background: ${token('color.background.neutral.subtle.hovered', colors.N30A)};
66
+ background: ${`var(--ds-background-neutral-subtle-hovered, ${colors.N30A})`};
68
67
  }
69
68
 
70
69
  svg {
@@ -123,8 +122,8 @@ const containerStyles = styleProps => {
123
122
  // https://product-fabric.atlassian.net/browse/DSP-4152
124
123
  border: 1px solid
125
124
  ${themed({
126
- light: token('color.border', colors.N50A),
127
- dark: token('color.border', colors.DN50)
125
+ light: `var(--ds-border, ${colors.N50A})`,
126
+ dark: `var(--ds-border, ${colors.DN50})`
128
127
  })(themeProps)};
129
128
  background: ${EXPAND_SELECTED_BACKGROUND(themeProps)};
130
129
  }
@@ -171,8 +170,8 @@ const titleInputStyles = props => css`
171
170
  line-height: ${akEditorLineHeight};
172
171
  font-weight: normal;
173
172
  color: ${themed({
174
- light: token('color.text.subtlest', colors.N200A),
175
- dark: token('color.text.subtlest', colors.DN600)
173
+ light: `var(--ds-text-subtlest, ${colors.N200A})`,
174
+ dark: `var(--ds-text-subtlest, ${colors.DN600})`
176
175
  })(props)};
177
176
  background: transparent;
178
177
  display: flex;
@@ -183,8 +182,8 @@ const titleInputStyles = props => css`
183
182
  &::placeholder {
184
183
  opacity: 0.6;
185
184
  color: ${themed({
186
- light: token('color.text.subtlest', colors.N200A),
187
- dark: token('color.text.subtlest', colors.DN600)
185
+ light: `var(--ds-text-subtlest, ${colors.N200A})`,
186
+ dark: `var(--ds-text-subtlest, ${colors.DN600})`
188
187
  })(props)};
189
188
  }
190
189
  `;
@@ -198,8 +197,8 @@ const titleContainerStyles = props => css`
198
197
  font-size: ${relativeFontSizeToBase16(fontSize())};
199
198
  width: 100%;
200
199
  color: ${themed({
201
- light: token('color.text.subtle', colors.N300A),
202
- dark: token('color.text.subtle', colors.DN600)
200
+ light: `var(--ds-text-subtle, ${colors.N300A})`,
201
+ dark: `var(--ds-text-subtle, ${colors.DN600})`
203
202
  })(props)};
204
203
  overflow: hidden;
205
204
  cursor: pointer;
@@ -5,17 +5,16 @@ import ErrorIcon from '@atlaskit/icon/glyph/error';
5
5
  import { G400, N200, R400 } from '@atlaskit/theme/colors';
6
6
  import { gridSize } from '@atlaskit/theme/constants';
7
7
  import { h200 } from '@atlaskit/theme/typography';
8
- import { token } from '@atlaskit/tokens';
9
8
  const errorColor = css`
10
- color: ${token('color.text.danger', R400)};
9
+ color: ${`var(--ds-text-danger, ${R400})`};
11
10
  `;
12
11
  const validColor = css`
13
- color: ${token('color.text.success', G400)};
12
+ color: ${`var(--ds-text-success, ${G400})`};
14
13
  `;
15
14
 
16
15
  const messageStyle = props => css`
17
16
  ${h200(props)} font-weight: normal;
18
- color: ${token('color.text.subtlest', N200)};
17
+ color: ${`var(--ds-text-subtlest, ${N200})`};
19
18
  margin-top: ${gridSize() / 2}px;
20
19
  display: flex;
21
20
  justify-content: baseline;
@@ -28,16 +28,9 @@ export function PortalProviderThemeProviders(props) {
28
28
  const atlaskitTheme = React.useCallback(() => ({
29
29
  mode
30
30
  }), [mode]);
31
- return (
32
- /*#__PURE__*/
33
- // TODO: ED-15585
34
- // import { ThemeProvider as DeprectateStyledComponentsProvider } from 'styled-components';
35
- // <DeprectateStyledComponentsProvider theme={styledComponentsAndEmotionTheme}>
36
- // </DeprectateStyledComponentsProvider>
37
- React.createElement(ThemeProvider, {
38
- theme: styledComponentsAndEmotionTheme
39
- }, /*#__PURE__*/React.createElement(AtlaskitTheme.Provider, {
40
- value: atlaskitTheme
41
- }, children))
42
- );
31
+ return /*#__PURE__*/React.createElement(ThemeProvider, {
32
+ theme: styledComponentsAndEmotionTheme
33
+ }, /*#__PURE__*/React.createElement(AtlaskitTheme.Provider, {
34
+ value: atlaskitTheme
35
+ }, children));
43
36
  }
@@ -6,15 +6,14 @@ import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
6
6
  import QuestionsIcon from '@atlaskit/icon/glyph/question-circle';
7
7
  import { N30, N50 } from '@atlaskit/theme/colors';
8
8
  import { borderRadius, fontSize } from '@atlaskit/theme/constants';
9
- import { token } from '@atlaskit/tokens';
10
9
  import Tooltip from '@atlaskit/tooltip';
11
10
  import { ACTION_SUBJECT_ID } from '../../analytics';
12
11
  import { unsupportedContentMessages } from '../../messages/unsupportedContent';
13
12
  import { trackUnsupportedContentTooltipDisplayedFor } from '../../utils/track-unsupported-content';
14
13
  import { getUnsupportedContent } from '../unsupported-content-helper';
15
14
  const blockNodeStyle = css`
16
- background: ${token('color.background.disabled', N30)};
17
- border: 1px dashed ${token('color.border.disabled', N50)};
15
+ background: ${`var(--ds-background-disabled, ${N30})`};
16
+ border: 1px dashed ${`var(--ds-border-disabled, ${N50})`};
18
17
  border-radius: ${borderRadius()}px;
19
18
  box-sizing: border-box;
20
19
  cursor: default;
@@ -6,7 +6,6 @@ import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
6
6
  import QuestionsIcon from '@atlaskit/icon/glyph/question-circle';
7
7
  import { N30, N50 } from '@atlaskit/theme/colors';
8
8
  import { borderRadius, fontSize } from '@atlaskit/theme/constants';
9
- import { token } from '@atlaskit/tokens';
10
9
  import Tooltip from '@atlaskit/tooltip';
11
10
  import { ACTION_SUBJECT_ID } from '../../analytics';
12
11
  import { unsupportedContentMessages } from '../../messages/unsupportedContent';
@@ -14,8 +13,8 @@ import { trackUnsupportedContentTooltipDisplayedFor } from '../../utils/track-un
14
13
  import { getUnsupportedContent } from '../unsupported-content-helper';
15
14
  const inlineNodeStyle = css`
16
15
  align-items: center;
17
- background: ${token('color.background.disabled', N30)};
18
- border: 1px dashed ${token('color.border.disabled', N50)};
16
+ background: ${`var(--ds-background-disabled, ${N30})`};
17
+ border: 1px dashed ${`var(--ds-border-disabled, ${N50})`};
19
18
  border-radius: ${borderRadius()}px;
20
19
  box-sizing: border-box;
21
20
  cursor: default;
@@ -1,4 +1,4 @@
1
- import { colorPalette, colorPaletteExtended } from '@atlaskit/adf-schema';
1
+ import { colorPalette } from '@atlaskit/adf-schema';
2
2
  import { DEFAULT_BORDER_COLOR } from './common';
3
3
  import getColorMessage from './getColorMessage';
4
4
  import paletteMessages from './paletteMessages';
@@ -16,10 +16,6 @@ const mapPaletteColor = (label, color) => {
16
16
 
17
17
 
18
18
  export const textColorPalette = [];
19
- export const textColorPaletteExtended = [];
20
19
  colorPalette.forEach((label, color) => {
21
20
  textColorPalette.push(mapPaletteColor(label, color));
22
- });
23
- colorPaletteExtended.forEach((label, color) => {
24
- textColorPaletteExtended.push(mapPaletteColor(label, color));
25
21
  });
@@ -4,7 +4,7 @@ import { jsx } from '@emotion/react';
4
4
  import chromatism from 'chromatism';
5
5
  import { injectIntl } from 'react-intl-next';
6
6
  import { N0, N500 } from '@atlaskit/theme/colors';
7
- import { token, useThemeObserver } from '@atlaskit/tokens';
7
+ import { useThemeObserver } from '@atlaskit/tokens';
8
8
  import Color from './Color';
9
9
  import getColorMessage from './Palettes/getColorMessage';
10
10
  import { newDarkPalette, newLightPalette } from './Palettes/paletteMessagesTokenModeNames';
@@ -29,7 +29,7 @@ function getCheckMarkColor(color, textPalette) {
29
29
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
30
30
 
31
31
 
32
- return contrastColor === N0 ? token('color.icon.inverse', N0) : token('color.icon', N500);
32
+ return contrastColor === N0 ? `var(--ds-icon-inverse, ${N0})` : `var(--ds-icon, ${N500})`;
33
33
  }
34
34
 
35
35
  const ColorPalette = props => {
@@ -4,5 +4,5 @@ export { default as cellBackgroundColorPalette } from './ColorPalette/Palettes/c
4
4
  export { default as colorPaletteMessages } from './ColorPalette/Palettes/paletteMessages';
5
5
  export { panelBackgroundPalette, panelDarkModeBackgroundPalette } from './ColorPalette/Palettes/panelBackgroundPalette';
6
6
  export { lightModeStatusColorPalette, darkModeStatusColorPalette } from './ColorPalette/Palettes/statusColorPalette';
7
- export { textColorPalette, textColorPaletteExtended } from './ColorPalette/Palettes/textColorPalette';
7
+ export { textColorPalette } from './ColorPalette/Palettes/textColorPalette';
8
8
  export { DEFAULT_BORDER_COLOR } from './ColorPalette/Palettes/common';
@@ -8,7 +8,6 @@ import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
8
8
  import { CustomItem, MenuGroup } from '@atlaskit/menu';
9
9
  import { B100, DN600, DN80, N70, N900 } from '@atlaskit/theme/colors';
10
10
  import { themed } from '@atlaskit/theme/components';
11
- import { token } from '@atlaskit/tokens';
12
11
  import Tooltip from '@atlaskit/tooltip';
13
12
  import { withReactEditorViewOuterListeners } from '../../ui-react';
14
13
  import DropList from '../../ui/DropList';
@@ -21,7 +20,7 @@ const wrapper = css`
21
20
  }
22
21
  `;
23
22
  const focusedMenuItemStyle = css`
24
- box-shadow: inset 0px 0px 0px 2px ${token('color.border.focused', B100)};
23
+ box-shadow: inset 0px 0px 0px 2px ${`var(--ds-border-focused, ${B100})`};
25
24
  outline: none;
26
25
  `;
27
26
 
@@ -34,8 +33,8 @@ const buttonStyles = isActive => theme => {
34
33
  > span,
35
34
  > span:hover,
36
35
  > span:active {
37
- background: ${token('color.background.selected', '#6c798f')};
38
- color: ${token('color.text', '#fff')};
36
+ background: ${"var(--ds-background-selected, #6c798f)"};
37
+ color: ${"var(--ds-text, #fff)"};
39
38
  }
40
39
  :focus > span[aria-disabled='false'] {
41
40
  ${focusedMenuItemStyle};
@@ -49,24 +48,24 @@ const buttonStyles = isActive => theme => {
49
48
  return css`
50
49
  > span:hover[aria-disabled='false'] {
51
50
  color: ${themed({
52
- light: token('color.text', N900),
53
- dark: token('color.text', DN600)
51
+ light: `var(--ds-text, ${N900})`,
52
+ dark: `var(--ds-text, ${DN600})`
54
53
  })(theme)};
55
54
  background-color: ${themed({
56
- light: token('color.background.neutral.subtle.hovered', 'rgb(244, 245, 247)'),
57
- dark: token('color.background.neutral.subtle.hovered', 'rgb(59, 71, 92)')
55
+ light: "var(--ds-background-neutral-subtle-hovered, rgb(244, 245, 247))",
56
+ dark: "var(--ds-background-neutral-subtle-hovered, rgb(59, 71, 92))"
58
57
  })(theme)};
59
58
  }
60
59
  > span:active[aria-disabled='false'] {
61
60
  background-color: ${themed({
62
- light: token('color.background.neutral.subtle.pressed', 'rgb(179, 212, 255)'),
63
- dark: token('color.background.neutral.subtle.pressed', 'rgb(179, 212, 255)')
61
+ light: "var(--ds-background-neutral-subtle-pressed, rgb(179, 212, 255))",
62
+ dark: "var(--ds-background-neutral-subtle-pressed, rgb(179, 212, 255))"
64
63
  })(theme)};
65
64
  }
66
65
  > span[aria-disabled='true'] {
67
66
  color: ${themed({
68
- light: token('color.text.disabled', N70),
69
- dark: token('color.text.disabled', DN80)
67
+ light: `var(--ds-text-disabled, ${N70})`,
68
+ dark: `var(--ds-text-disabled, ${DN80})`
70
69
  })(theme)};
71
70
  }
72
71
  :focus > span[aria-disabled='false'] {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "72.0.0",
3
+ "version": "72.1.0",
4
4
  "sideEffects": false
5
5
  }
@@ -39,7 +39,7 @@ export var ACTION;
39
39
  ACTION["DISPATCHED_VALID_TRANSACTION"] = "dispatchedValidTransaction";
40
40
  ACTION["EDITED"] = "edited";
41
41
  ACTION["EDITOR_CRASHED"] = "unhandledErrorCaught";
42
- ACTION["EDITOR_CRASHED_ADDITIONAL_INFORMATION"] = "unhandledErrorCaughtAdditionalInfo";
42
+ ACTION["EDITOR_CRASHED_ADDITIONAL_INFORMATION"] = "unhandledErrorCaughtAdditionalInfov2";
43
43
  ACTION["EDITOR_MOUNTED"] = "mounted";
44
44
  ACTION["EDITOR_TTI"] = "tti";
45
45
  ACTION["EDITOR_CONTENT_RETRIEVAL_PERFORMED"] = "contentRetrievalPerformed";
@@ -7,7 +7,6 @@ var _templateObject;
7
7
  import React, { Fragment } from 'react';
8
8
  import { css, jsx } from '@emotion/react';
9
9
  import { N400 } from '@atlaskit/theme/colors';
10
- import { token } from '@atlaskit/tokens';
11
10
  import { browser } from '../utils';
12
11
  export var addAltText = makeKeyMapWithCommon('Add Alt Text', 'Mod-Alt-y');
13
12
  export var toggleBold = makeKeyMapWithCommon('Bold', 'Mod-b');
@@ -78,7 +77,7 @@ var arrowKeysMap = {
78
77
  ARROWUP: "\u2191",
79
78
  ARROWDOWN: "\u2193"
80
79
  };
81
- var tooltipShortcutStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: 2px;\n background-color: ", ";\n padding: 0 2px;\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"])), token('color.background.inverse.subtle', N400));
80
+ var tooltipShortcutStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: 2px;\n background-color: ", ";\n padding: 0 2px;\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, ")"));
82
81
  /* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
83
82
 
84
83
  function formatShortcut(keymap) {
@@ -5,7 +5,6 @@ var _templateObject, _templateObject2, _templateObject3;
5
5
  import { css } from '@emotion/react';
6
6
  import { N60A, Y300, Y75 } from '@atlaskit/theme/colors';
7
7
  import { themed } from '@atlaskit/theme/components';
8
- import { token } from '@atlaskit/tokens';
9
8
  export var annotationPrefix = 'ak-editor-annotation';
10
9
  export var AnnotationSharedClassNames = {
11
10
  focus: "".concat(annotationPrefix, "-focus"),
@@ -21,18 +20,18 @@ var DY200 = '#82641c';
21
20
  export var AnnotationSharedCSSByState = function AnnotationSharedCSSByState(props) {
22
21
  return {
23
22
  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 ", ";\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4147\n box-shadow: ", ";\n cursor: pointer;\n "])), themed({
24
- light: token('color.background.accent.yellow.subtler', Y75),
25
- dark: token('color.background.accent.yellow.subtler', DY75)
23
+ light: "var(--ds-background-accent-yellow-subtler, ".concat(Y75, ")"),
24
+ dark: "var(--ds-background-accent-yellow-subtler, ".concat(DY75, ")")
26
25
  })(props), themed({
27
- light: token('color.border.accent.yellow', Y300),
28
- dark: token('color.border.accent.yellow', DY300)
29
- })(props), token('elevation.shadow.overlay', "1px 2px 3px ".concat(N60A, ", -1px 2px 3px ").concat(N60A))),
26
+ light: "var(--ds-border-accent-yellow, ".concat(Y300, ")"),
27
+ dark: "var(--ds-border-accent-yellow, ".concat(DY300, ")")
28
+ })(props), "var(--ds-shadow-overlay, ".concat("1px 2px 3px ".concat(N60A, ", -1px 2px 3px ").concat(N60A), ")")),
30
29
  blur: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: ", ";\n border-bottom: 2px solid\n ", ";\n cursor: pointer;\n "])), themed({
31
- light: token('color.background.accent.yellow.subtlest', Y75a),
32
- dark: token('color.background.accent.yellow.subtlest', DY75a)
30
+ light: "var(--ds-background-accent-yellow-subtlest, ".concat(Y75a, ")"),
31
+ dark: "var(--ds-background-accent-yellow-subtlest, ".concat(DY75a, ")")
33
32
  })(props), themed({
34
- light: token('color.border.accent.yellow', Y200a),
35
- dark: token('color.border.accent.yellow', DY200)
33
+ light: "var(--ds-border-accent-yellow, ".concat(Y200a, ")"),
34
+ dark: "var(--ds-border-accent-yellow, ".concat(DY200, ")")
36
35
  })(props))
37
36
  };
38
37
  };
@@ -5,5 +5,4 @@ var _templateObject;
5
5
  import { css } from '@emotion/react';
6
6
  import { akEditorBlockquoteBorderColor, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
7
7
  import { gridSize } from '@atlaskit/theme/constants';
8
- import { token } from '@atlaskit/tokens';
9
- export var blockquoteSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & blockquote {\n box-sizing: border-box;\n padding-left: ", "px;\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: ", "px;\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"])), gridSize() * 2, token('color.border', akEditorBlockquoteBorderColor), blockNodesVerticalMargin, gridSize() * 2);
8
+ export var blockquoteSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & blockquote {\n box-sizing: border-box;\n padding-left: ", "px;\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: ", "px;\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"])), gridSize() * 2, "var(--ds-border, ".concat(akEditorBlockquoteBorderColor, ")"), blockNodesVerticalMargin, gridSize() * 2);
@@ -7,7 +7,6 @@ import { akEditorCodeFontFamily, akEditorLineHeight, akEditorTableCellMinWidth,
7
7
  import { DN20, DN400, DN50, DN800, N20, N30, N400, N800 } from '@atlaskit/theme/colors';
8
8
  import { themed } from '@atlaskit/theme/components';
9
9
  import { borderRadius, fontSize, gridSize } from '@atlaskit/theme/constants';
10
- import { token } from '@atlaskit/tokens';
11
10
  export var CodeBlockSharedCssClassName = {
12
11
  CODEBLOCK_CONTAINER: 'code-block',
13
12
  CODEBLOCK_START: 'code-block--start',
@@ -18,24 +17,24 @@ export var CodeBlockSharedCssClassName = {
18
17
  DS_CODEBLOCK: '[data-ds--code--code-block]'
19
18
  };
20
19
  export var codeBlockSharedStyles = function codeBlockSharedStyles(props) {
21
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n position: relative;\n background-color: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n font-family: ", ";\n min-width: ", "px;\n cursor: pointer;\n\n --ds--code--bg-color: transparent;\n\n /* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n white-space: normal;\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n top: 0px;\n left: 0px;\n }\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n bottom: 0px;\n right: 0px;\n }\n\n .", " {\n background-color: ", ";\n display: flex;\n border-radius: ", "px;\n width: 100%;\n counter-reset: line;\n overflow-x: auto;\n\n background-image: ", ";\n\n background-repeat: no-repeat;\n background-attachment: local, local, local, local, scroll, scroll, scroll,\n scroll;\n background-size: ", "px 100%, ", "px 100%,\n ", "px 100%, ", "px 100%, ", "px 100%,\n 1px 100%, ", "px 100%, 1px 100%;\n background-position: 0 0, 0 0, 100% 0, 100% 0, 100% 0, 100% 0, 0 0, 0 0;\n\n /* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */\n overflow-y: hidden;\n }\n\n .", " {\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", "px;\n position: relative;\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n ::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n color: ", ";\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n\n .", " {\n display: flex;\n flex: 1;\n\n code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n color: ", ";\n border-radius: ", "px;\n margin: ", "px;\n white-space: pre;\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n"])), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, token('elevation.surface.raised', 'transparent'), borderRadius(), blockNodesVerticalMargin, akEditorCodeFontFamily, akEditorTableCellMinWidth, CodeBlockSharedCssClassName.CODEBLOCK_START, CodeBlockSharedCssClassName.CODEBLOCK_END, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, themed({
22
- light: token('color.background.neutral', N20),
23
- dark: token('color.background.neutral', DN50)
20
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n position: relative;\n background-color: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n font-family: ", ";\n min-width: ", "px;\n cursor: pointer;\n\n --ds--code--bg-color: transparent;\n\n /* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n white-space: normal;\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n top: 0px;\n left: 0px;\n }\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n bottom: 0px;\n right: 0px;\n }\n\n .", " {\n background-color: ", ";\n display: flex;\n border-radius: ", "px;\n width: 100%;\n counter-reset: line;\n overflow-x: auto;\n\n background-image: ", ";\n\n background-repeat: no-repeat;\n background-attachment: local, local, local, local, scroll, scroll, scroll,\n scroll;\n background-size: ", "px 100%, ", "px 100%,\n ", "px 100%, ", "px 100%, ", "px 100%,\n 1px 100%, ", "px 100%, 1px 100%;\n background-position: 0 0, 0 0, 100% 0, 100% 0, 100% 0, 100% 0, 0 0, 0 0;\n\n /* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */\n overflow-y: hidden;\n }\n\n .", " {\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", "px;\n position: relative;\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n ::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n color: ", ";\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n\n .", " {\n display: flex;\n flex: 1;\n\n code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n color: ", ";\n border-radius: ", "px;\n margin: ", "px;\n white-space: pre;\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n"])), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, transparent)", borderRadius(), blockNodesVerticalMargin, akEditorCodeFontFamily, akEditorTableCellMinWidth, CodeBlockSharedCssClassName.CODEBLOCK_START, CodeBlockSharedCssClassName.CODEBLOCK_END, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, themed({
21
+ light: "var(--ds-background-neutral, ".concat(N20, ")"),
22
+ dark: "var(--ds-background-neutral, ".concat(DN50, ")")
24
23
  })(props), borderRadius(), overflowShadow({
25
24
  background: themed({
26
- light: token('color.background.neutral', N20),
27
- dark: token('color.background.neutral', DN50)
25
+ light: "var(--ds-background-neutral, ".concat(N20, ")"),
26
+ dark: "var(--ds-background-neutral, ".concat(DN50, ")")
28
27
  })(props),
29
28
  leftCoverWidth: "".concat(gridSize() * 3, "px")
30
29
  }), gridSize() * 3, gridSize() * 3, gridSize(), gridSize(), gridSize(), gridSize(), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, themed({
31
- light: token('color.background.neutral', N30),
32
- dark: token('color.background.neutral', DN20)
30
+ light: "var(--ds-background-neutral, ".concat(N30, ")"),
31
+ dark: "var(--ds-background-neutral, ".concat(DN20, ")")
33
32
  })(props), gridSize(), themed({
34
- light: token('color.text.subtlest', N400),
35
- dark: token('color.text.subtlest', DN400)
33
+ light: "var(--ds-text-subtlest, ".concat(N400, ")"),
34
+ dark: "var(--ds-text-subtlest, ".concat(DN400, ")")
36
35
  })(props), relativeFontSizeToBase16(fontSize()), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, themed({
37
- light: token('color.text', N800),
38
- dark: token('color.text', DN800)
36
+ light: "var(--ds-text, ".concat(N800, ")"),
37
+ dark: "var(--ds-text, ".concat(DN800, ")")
39
38
  })(props), borderRadius(), gridSize(), relativeFontSizeToBase16(fontSize()));
40
39
  };
41
40
  export var codeBlockInListSafariFix = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ::before {\n content: ' ';\n line-height: ", ";\n }\n\n > p:first-child,\n > .code-block:first-child,\n > .ProseMirror-gapcursor:first-child + .code-block {\n margin-top: -", "em !important;\n }\n"])), akEditorLineHeight, akEditorLineHeight);
@@ -6,11 +6,10 @@ import { css } from '@emotion/react';
6
6
  import { getCodeStyles } from '@atlaskit/code/inline';
7
7
  import { DN70, N30A } from '@atlaskit/theme/colors';
8
8
  import { getTheme, themed } from '@atlaskit/theme/components';
9
- import { token } from '@atlaskit/tokens';
10
9
  export var codeMarkSharedStyles = function codeMarkSharedStyles(props) {
11
10
  var theme = getTheme(props);
12
11
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .code {\n --ds--code--bg-color: ", ";\n ", "\n }\n "])), themed({
13
- light: token('color.background.neutral', N30A),
14
- dark: token('color.background.neutral', DN70)
12
+ light: "var(--ds-background-neutral, ".concat(N30A, ")"),
13
+ dark: "var(--ds-background-neutral, ".concat(DN70, ")")
15
14
  })(props), getCodeStyles(theme));
16
15
  };