@atlaskit/editor-core 193.24.0 → 193.24.15

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 (116) hide show
  1. package/.eslintrc.js +37 -37
  2. package/CHANGELOG.md +17424 -17539
  3. package/architecture/0001-record-architecture-decisions.md +6 -3
  4. package/architecture/0002-deep-equality-check-for-getsharedstate.md +9 -8
  5. package/architecture/0003-explicit-plugin-dependencies.md +47 -18
  6. package/codemods/140.0.0-rc-kraken-fix-type-errors.ts +1 -3
  7. package/codemods/145.0.0-deprecate-props.ts +1 -3
  8. package/codemods/172.0.0-transform-smartlinks-prop.ts +1 -3
  9. package/codemods/175.0.0-rename-unsafe-allowUndoRedoButton-prop.ts +1 -1
  10. package/codemods/180.1.0-update-to-editor-migration-component.ts +1 -3
  11. package/codemods/__tests__/next-remove-allow-more-text-colors-prop.ts +29 -31
  12. package/codemods/__tests__/remove-config-panel-width-prop.ts +29 -31
  13. package/codemods/__tests__/rename-editor-to-editor-migration-component.ts +43 -45
  14. package/codemods/__tests__/rename-smartlinks-prop.ts +57 -59
  15. package/codemods/__tests__/rename-unsafe-allowUndoRedoButtons-prop.ts +43 -43
  16. package/codemods/__tests__/rename-unsafe-cards-prop.ts +43 -45
  17. package/codemods/migrates/next-remove-allow-more-text-colors-prop.ts +41 -45
  18. package/codemods/migrates/remove-config-panel-width-prop.ts +20 -29
  19. package/codemods/migrates/rename-editor-to-editor-migration-component.ts +20 -24
  20. package/codemods/migrates/rename-smartlinks-prop.ts +30 -38
  21. package/codemods/migrates/rename-unsafe-allowUndoRedoButtons-prop.ts +4 -5
  22. package/codemods/migrates/rename-unsafe-cards-prop.ts +1 -4
  23. package/codemods/utils.ts +62 -72
  24. package/dist/cjs/ui/Appearance/Comment/Toolbar.js +3 -3
  25. package/dist/cjs/ui/AppearanceComponents/Mobile.js +5 -5
  26. package/dist/cjs/ui/ContentStyles/ai-panels.js +1 -1
  27. package/dist/cjs/ui/ContentStyles/code-block.js +2 -2
  28. package/dist/cjs/ui/ContentStyles/date.js +1 -1
  29. package/dist/cjs/ui/ContentStyles/expand.js +1 -1
  30. package/dist/cjs/ui/ContentStyles/extension.js +2 -2
  31. package/dist/cjs/ui/ContentStyles/index.js +6 -6
  32. package/dist/cjs/ui/ContentStyles/layout.js +1 -1
  33. package/dist/cjs/ui/ContentStyles/media.js +1 -1
  34. package/dist/cjs/ui/ContentStyles/panel.js +1 -1
  35. package/dist/cjs/ui/ContentStyles/status.js +1 -1
  36. package/dist/cjs/ui/ContentStyles/tasks-and-decisions.js +1 -1
  37. package/dist/cjs/utils/extensions.js +5 -5
  38. package/dist/cjs/version-wrapper.js +1 -1
  39. package/dist/es2019/ui/Appearance/Comment/Toolbar.js +40 -40
  40. package/dist/es2019/ui/AppearanceComponents/Mobile.js +5 -5
  41. package/dist/es2019/ui/ContentStyles/ai-panels.js +80 -80
  42. package/dist/es2019/ui/ContentStyles/code-block.js +58 -58
  43. package/dist/es2019/ui/ContentStyles/date.js +19 -19
  44. package/dist/es2019/ui/ContentStyles/expand.js +98 -98
  45. package/dist/es2019/ui/ContentStyles/extension.js +154 -159
  46. package/dist/es2019/ui/ContentStyles/index.js +139 -144
  47. package/dist/es2019/ui/ContentStyles/layout.js +125 -125
  48. package/dist/es2019/ui/ContentStyles/media.js +179 -178
  49. package/dist/es2019/ui/ContentStyles/panel.js +29 -30
  50. package/dist/es2019/ui/ContentStyles/status.js +30 -32
  51. package/dist/es2019/ui/ContentStyles/tasks-and-decisions.js +18 -19
  52. package/dist/es2019/utils/extensions.js +5 -5
  53. package/dist/es2019/version-wrapper.js +1 -1
  54. package/dist/esm/ui/Appearance/Comment/Toolbar.js +3 -3
  55. package/dist/esm/ui/AppearanceComponents/Mobile.js +5 -5
  56. package/dist/esm/ui/ContentStyles/ai-panels.js +1 -1
  57. package/dist/esm/ui/ContentStyles/code-block.js +2 -2
  58. package/dist/esm/ui/ContentStyles/date.js +1 -1
  59. package/dist/esm/ui/ContentStyles/expand.js +1 -1
  60. package/dist/esm/ui/ContentStyles/extension.js +2 -2
  61. package/dist/esm/ui/ContentStyles/index.js +6 -6
  62. package/dist/esm/ui/ContentStyles/layout.js +1 -1
  63. package/dist/esm/ui/ContentStyles/media.js +1 -1
  64. package/dist/esm/ui/ContentStyles/panel.js +1 -1
  65. package/dist/esm/ui/ContentStyles/status.js +1 -1
  66. package/dist/esm/ui/ContentStyles/tasks-and-decisions.js +1 -1
  67. package/dist/esm/utils/extensions.js +5 -5
  68. package/dist/esm/version-wrapper.js +1 -1
  69. package/dist/types/composable-editor/editor.d.ts +1 -1
  70. package/dist/types/composable-editor/hooks/useProviders.d.ts +1 -1
  71. package/dist/types/create-editor/create-preset.d.ts +137 -11
  72. package/dist/types/create-editor/sort-by-order.d.ts +1 -1
  73. package/dist/types/event-dispatcher/index.d.ts +2 -2
  74. package/dist/types/index.d.ts +2 -2
  75. package/dist/types/presets/default.d.ts +122 -10
  76. package/dist/types/presets/universal.d.ts +137 -11
  77. package/dist/types/presets/useUniversalPreset.d.ts +137 -11
  78. package/dist/types/test-utils.d.ts +1 -1
  79. package/dist/types/types/browser.d.ts +1 -1
  80. package/dist/types/types/editor-plugin.d.ts +1 -1
  81. package/dist/types/types/empty-state-handler.d.ts +1 -1
  82. package/dist/types/types/feature-flags.d.ts +1 -1
  83. package/dist/types/types/index.d.ts +3 -3
  84. package/dist/types/types/pm-config.d.ts +1 -1
  85. package/dist/types/types/ui-components.d.ts +1 -1
  86. package/dist/types/ui/Addon/ClickAreaBlock/index.d.ts +1 -1
  87. package/dist/types/ui/Toolbar/types.d.ts +1 -1
  88. package/dist/types/utils/action.d.ts +1 -4
  89. package/dist/types/utils/performance/plugin-performance-report.d.ts +1 -1
  90. package/dist/types/utils/slice.d.ts +1 -1
  91. package/dist/types-ts4.5/composable-editor/editor.d.ts +1 -1
  92. package/dist/types-ts4.5/composable-editor/hooks/useProviders.d.ts +1 -1
  93. package/dist/types-ts4.5/create-editor/create-preset.d.ts +155 -11
  94. package/dist/types-ts4.5/create-editor/sort-by-order.d.ts +1 -1
  95. package/dist/types-ts4.5/event-dispatcher/index.d.ts +2 -2
  96. package/dist/types-ts4.5/index.d.ts +2 -2
  97. package/dist/types-ts4.5/presets/default.d.ts +138 -10
  98. package/dist/types-ts4.5/presets/universal.d.ts +155 -11
  99. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +155 -11
  100. package/dist/types-ts4.5/test-utils.d.ts +1 -1
  101. package/dist/types-ts4.5/types/browser.d.ts +1 -1
  102. package/dist/types-ts4.5/types/editor-plugin.d.ts +1 -1
  103. package/dist/types-ts4.5/types/empty-state-handler.d.ts +1 -1
  104. package/dist/types-ts4.5/types/feature-flags.d.ts +1 -1
  105. package/dist/types-ts4.5/types/index.d.ts +3 -3
  106. package/dist/types-ts4.5/types/pm-config.d.ts +1 -1
  107. package/dist/types-ts4.5/types/ui-components.d.ts +1 -1
  108. package/dist/types-ts4.5/ui/Addon/ClickAreaBlock/index.d.ts +1 -1
  109. package/dist/types-ts4.5/ui/Toolbar/types.d.ts +1 -1
  110. package/dist/types-ts4.5/utils/performance/plugin-performance-report.d.ts +1 -1
  111. package/dist/types-ts4.5/utils/slice.d.ts +1 -1
  112. package/docs/0-intro.tsx +13 -19
  113. package/docs/1-legacy-editor.tsx +13 -19
  114. package/docs/4-annotations.tsx +222 -223
  115. package/package.json +28 -20
  116. package/report.api.md +448 -473
@@ -6,185 +6,186 @@ import { fileCardImageViewSelector, inlinePlayerClassName, newFileExperienceClas
6
6
  import { B200, N60, Y500 } from '@atlaskit/theme/colors';
7
7
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/no-exported-css -- Needs manual remediation
8
8
  export const mediaStyles = css`
9
- .ProseMirror {
10
- ${mediaSingleSharedStyle} & [layout='full-width'] .${richMediaClassName},
9
+ .ProseMirror {
10
+ ${mediaSingleSharedStyle} & [layout='full-width'] .${richMediaClassName},
11
11
  & [layout='wide'] .${richMediaClassName} {
12
- margin-left: 50%;
13
- transform: translateX(-50%);
14
- }
15
-
16
- .media-extended-resize-experience[layout^='wrap-'] {
17
- // override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle
18
- // to prevent scroll bar
19
- overflow: visible !important;
20
- }
21
-
22
- & [layout^='wrap-'] + [layout^='wrap-'] {
23
- clear: none;
24
- & + p,
25
- & + div[class^='fabric-editor-align'],
26
- & + ul,
27
- & + ol,
28
- & + h1,
29
- & + h2,
30
- & + h3,
31
- & + h4,
32
- & + h5,
33
- & + h6 {
34
- clear: both !important;
35
- }
36
- & .${richMediaClassName} {
37
- margin-left: 0;
38
- margin-right: 0;
39
- }
40
- }
41
-
42
- ${mediaInlineImageStyles}
43
-
44
- .mediaSingleView-content-wrap[layout^='wrap-'] {
45
- max-width: 100%;
46
- // overwrite default Prosemirror setting making it clear: both
47
- clear: inherit;
48
- }
49
-
50
- .mediaSingleView-content-wrap[layout='wrap-left'] {
51
- float: left;
52
- }
53
-
54
- .mediaSingleView-content-wrap[layout='wrap-right'] {
55
- float: right;
56
- }
57
-
58
- .mediaSingleView-content-wrap[layout='wrap-right']
59
- + .mediaSingleView-content-wrap[layout='wrap-left'] {
60
- clear: both;
61
- }
62
-
63
- /* Larger margins for resize handlers when at depth 0 of the document */
64
- & > .mediaSingleView-content-wrap {
65
- .richMedia-resize-handle-right {
66
- margin-right: -${akEditorMediaResizeHandlerPaddingWide}px;
67
- }
68
- .richMedia-resize-handle-left {
69
- margin-left: -${akEditorMediaResizeHandlerPaddingWide}px;
70
- }
71
- }
72
- }
73
-
74
- .richMedia-resize-handle-right,
75
- .richMedia-resize-handle-left {
76
- display: flex;
77
- flex-direction: column;
78
-
79
- /* vertical align */
80
- justify-content: center;
81
- }
82
-
83
- .richMedia-resize-handle-right {
84
- align-items: flex-end;
85
- padding-right: ${"var(--ds-space-150, 12px)"};
86
- margin-right: -${akEditorMediaResizeHandlerPadding}px;
87
- }
88
-
89
- .richMedia-resize-handle-left {
90
- align-items: flex-start;
91
- padding-left: ${"var(--ds-space-150, 12px)"};
92
- margin-left: -${akEditorMediaResizeHandlerPadding}px;
93
- }
94
-
95
- .richMedia-resize-handle-right::after,
96
- .richMedia-resize-handle-left::after {
97
- content: ' ';
98
- display: flex;
99
- width: 3px;
100
- height: 64px;
101
-
102
- border-radius: 6px;
103
- }
104
-
105
- .${richMediaClassName}:hover .richMedia-resize-handle-left::after,
106
- .${richMediaClassName}:hover .richMedia-resize-handle-right::after {
107
- background: ${`var(--ds-border, ${N60})`};
108
- }
109
-
110
- .${akEditorSelectedNodeClassName} .richMedia-resize-handle-right::after,
111
- .${akEditorSelectedNodeClassName} .richMedia-resize-handle-left::after,
112
- .${richMediaClassName} .richMedia-resize-handle-right:hover::after,
113
- .${richMediaClassName} .richMedia-resize-handle-left:hover::after,
114
- .${richMediaClassName}.is-resizing .richMedia-resize-handle-right::after,
115
- .${richMediaClassName}.is-resizing .richMedia-resize-handle-left::after {
116
- background: ${`var(--ds-border-focused, ${B200})`};
117
- }
118
-
119
- .__resizable_base__ {
120
- left: unset !important;
121
- width: auto !important;
122
- height: auto !important;
123
- }
124
-
125
- /* Danger when top level node for smart cards / inline links */
126
- .danger > div > div > .media-card-frame,
127
- .danger > span > a {
128
- background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackground})`};
129
- box-shadow: 0px 0px 0px ${akEditorSelectedBorderBoldSize}px
130
- ${`var(--ds-border-danger, ${akEditorDeleteBorder})`};
131
- transition: background-color 0s, box-shadow 0s;
132
- }
133
- /* Danger when nested node or common */
134
- .danger {
135
- /* Media single */
136
- .${richMediaClassName} .${fileCardImageViewSelector}::after {
137
- border: 1px solid ${`var(--ds-border-danger, ${akEditorDeleteIconColor})`};
138
- }
139
- /* Media single video player */
140
- .${richMediaClassName} .${inlinePlayerClassName}::after {
141
- border: 1px solid ${`var(--ds-border-danger, ${akEditorDeleteIconColor})`};
142
- }
143
- /* New file experience */
144
- .${richMediaClassName} .${newFileExperienceClassName} {
145
- box-shadow: 0 0 0 1px
146
- ${`var(--ds-border-danger, ${akEditorDeleteIconColor})`} !important;
147
- }
148
- /* Media resize legacy handlers */
149
- .richMedia-resize-handle-right::after,
150
- .richMedia-resize-handle-left::after {
151
- background: ${`var(--ds-icon-danger, ${akEditorDeleteIconColor})`} !important;
152
- }
153
- /* Media resize new handlers */
154
- .resizer-handle-thumb {
155
- background: ${`var(--ds-icon-danger, ${akEditorDeleteIconColor})`} !important;
156
- }
157
-
158
- /* Smart cards */
159
- div div .media-card-frame,
160
- .inlineCardView-content-wrap > span > a {
161
- background-color: ${"var(--ds-blanket-danger, rgb(255, 189, 173, 0.5))"}; /* R75 with 50% opactiy */
162
- transition: background-color 0s;
163
- }
164
-
165
- div div .media-card-frame::after {
166
- box-shadow: none;
167
- }
168
- }
169
-
170
- .warning {
171
- /* Media single */
172
- .${richMediaClassName} .${fileCardImageViewSelector}::after {
173
- border: 1px solid ${`var(--ds-border-warning, ${Y500})`};
174
- }
175
-
176
- .${richMediaClassName} .${inlinePlayerClassName}::after {
177
- border: 1px solid ${`var(--ds-border-warning, ${Y500})`};
178
- }
179
-
180
- .${richMediaClassName} .${newFileExperienceClassName} {
181
- box-shadow: 0 0 0 1px ${`var(--ds-border-warning, ${Y500})`} !important;
182
- }
183
-
184
- .resizer-handle-thumb {
185
- background: ${`var(--ds-icon-warning, ${Y500})`} !important;
186
- }
187
- }
12
+ margin-left: 50%;
13
+ transform: translateX(-50%);
14
+ }
15
+
16
+ .media-extended-resize-experience[layout^='wrap-'] {
17
+ // override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle
18
+ // to prevent scroll bar
19
+ overflow: visible !important;
20
+ }
21
+
22
+ & [layout^='wrap-'] + [layout^='wrap-'] {
23
+ clear: none;
24
+ & + p,
25
+ & + div[class^='fabric-editor-align'],
26
+ & + ul,
27
+ & + ol,
28
+ & + h1,
29
+ & + h2,
30
+ & + h3,
31
+ & + h4,
32
+ & + h5,
33
+ & + h6 {
34
+ clear: both !important;
35
+ }
36
+ & .${richMediaClassName} {
37
+ margin-left: 0;
38
+ margin-right: 0;
39
+ }
40
+ }
41
+
42
+ ${mediaInlineImageStyles}
43
+
44
+ .mediaSingleView-content-wrap[layout^='wrap-'] {
45
+ max-width: 100%;
46
+ // overwrite default Prosemirror setting making it clear: both
47
+ clear: inherit;
48
+ }
49
+
50
+ .mediaSingleView-content-wrap[layout='wrap-left'] {
51
+ float: left;
52
+ }
53
+
54
+ .mediaSingleView-content-wrap[layout='wrap-right'] {
55
+ float: right;
56
+ }
57
+
58
+ .mediaSingleView-content-wrap[layout='wrap-right']
59
+ + .mediaSingleView-content-wrap[layout='wrap-left'] {
60
+ clear: both;
61
+ }
62
+
63
+ /* Larger margins for resize handlers when at depth 0 of the document */
64
+ & > .mediaSingleView-content-wrap {
65
+ .richMedia-resize-handle-right {
66
+ margin-right: -${akEditorMediaResizeHandlerPaddingWide}px;
67
+ }
68
+ .richMedia-resize-handle-left {
69
+ margin-left: -${akEditorMediaResizeHandlerPaddingWide}px;
70
+ }
71
+ }
72
+ }
73
+
74
+ .richMedia-resize-handle-right,
75
+ .richMedia-resize-handle-left {
76
+ display: flex;
77
+ flex-direction: column;
78
+
79
+ /* vertical align */
80
+ justify-content: center;
81
+ }
82
+
83
+ .richMedia-resize-handle-right {
84
+ align-items: flex-end;
85
+ padding-right: ${"var(--ds-space-150, 12px)"};
86
+ margin-right: -${akEditorMediaResizeHandlerPadding}px;
87
+ }
88
+
89
+ .richMedia-resize-handle-left {
90
+ align-items: flex-start;
91
+ padding-left: ${"var(--ds-space-150, 12px)"};
92
+ margin-left: -${akEditorMediaResizeHandlerPadding}px;
93
+ }
94
+
95
+ .richMedia-resize-handle-right::after,
96
+ .richMedia-resize-handle-left::after {
97
+ content: ' ';
98
+ display: flex;
99
+ width: 3px;
100
+ height: 64px;
101
+
102
+ border-radius: 6px;
103
+ }
104
+
105
+ .${richMediaClassName}:hover .richMedia-resize-handle-left::after,
106
+ .${richMediaClassName}:hover .richMedia-resize-handle-right::after {
107
+ background: ${`var(--ds-border, ${N60})`};
108
+ }
109
+
110
+ .${akEditorSelectedNodeClassName} .richMedia-resize-handle-right::after,
111
+ .${akEditorSelectedNodeClassName} .richMedia-resize-handle-left::after,
112
+ .${richMediaClassName} .richMedia-resize-handle-right:hover::after,
113
+ .${richMediaClassName} .richMedia-resize-handle-left:hover::after,
114
+ .${richMediaClassName}.is-resizing .richMedia-resize-handle-right::after,
115
+ .${richMediaClassName}.is-resizing .richMedia-resize-handle-left::after {
116
+ background: ${`var(--ds-border-focused, ${B200})`};
117
+ }
118
+
119
+ .__resizable_base__ {
120
+ left: unset !important;
121
+ width: auto !important;
122
+ height: auto !important;
123
+ }
124
+
125
+ /* Danger when top level node for smart cards / inline links */
126
+ .danger > div > div > .media-card-frame,
127
+ .danger > span > a {
128
+ background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackground})`};
129
+ box-shadow: 0px 0px 0px ${akEditorSelectedBorderBoldSize}px
130
+ ${`var(--ds-border-danger, ${akEditorDeleteBorder})`};
131
+ transition:
132
+ background-color 0s,
133
+ box-shadow 0s;
134
+ }
135
+ /* Danger when nested node or common */
136
+ .danger {
137
+ /* Media single */
138
+ .${richMediaClassName} .${fileCardImageViewSelector}::after {
139
+ border: 1px solid ${`var(--ds-border-danger, ${akEditorDeleteIconColor})`};
140
+ }
141
+ /* Media single video player */
142
+ .${richMediaClassName} .${inlinePlayerClassName}::after {
143
+ border: 1px solid ${`var(--ds-border-danger, ${akEditorDeleteIconColor})`};
144
+ }
145
+ /* New file experience */
146
+ .${richMediaClassName} .${newFileExperienceClassName} {
147
+ box-shadow: 0 0 0 1px ${`var(--ds-border-danger, ${akEditorDeleteIconColor})`} !important;
148
+ }
149
+ /* Media resize legacy handlers */
150
+ .richMedia-resize-handle-right::after,
151
+ .richMedia-resize-handle-left::after {
152
+ background: ${`var(--ds-icon-danger, ${akEditorDeleteIconColor})`} !important;
153
+ }
154
+ /* Media resize new handlers */
155
+ .resizer-handle-thumb {
156
+ background: ${`var(--ds-icon-danger, ${akEditorDeleteIconColor})`} !important;
157
+ }
158
+
159
+ /* Smart cards */
160
+ div div .media-card-frame,
161
+ .inlineCardView-content-wrap > span > a {
162
+ background-color: ${"var(--ds-blanket-danger, rgb(255, 189, 173, 0.5))"}; /* R75 with 50% opactiy */
163
+ transition: background-color 0s;
164
+ }
165
+
166
+ div div .media-card-frame::after {
167
+ box-shadow: none;
168
+ }
169
+ }
170
+
171
+ .warning {
172
+ /* Media single */
173
+ .${richMediaClassName} .${fileCardImageViewSelector}::after {
174
+ border: 1px solid ${`var(--ds-border-warning, ${Y500})`};
175
+ }
176
+
177
+ .${richMediaClassName} .${inlinePlayerClassName}::after {
178
+ border: 1px solid ${`var(--ds-border-warning, ${Y500})`};
179
+ }
180
+
181
+ .${richMediaClassName} .${newFileExperienceClassName} {
182
+ box-shadow: 0 0 0 1px ${`var(--ds-border-warning, ${Y500})`} !important;
183
+ }
184
+
185
+ .resizer-handle-thumb {
186
+ background: ${`var(--ds-icon-warning, ${Y500})`} !important;
187
+ }
188
+ }
188
189
  `;
189
190
 
190
191
  /* `left: unset` above is to work around Chrome bug where rendering a div with
@@ -3,41 +3,40 @@ import { PanelSharedCssClassName, panelSharedStyles } from '@atlaskit/editor-com
3
3
  import { akEditorDeleteBackground, akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
4
4
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation due to mixin usage
5
5
  export const panelStyles = () => css`
6
- .ProseMirror {
7
- .${PanelSharedCssClassName.prefix} {
8
- cursor: pointer;
6
+ .ProseMirror {
7
+ .${PanelSharedCssClassName.prefix} {
8
+ cursor: pointer;
9
9
 
10
- /* Danger when top level node */
11
- &.danger {
12
- box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px
13
- ${akEditorDeleteBorder};
14
- background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackground})`} !important;
10
+ /* Danger when top level node */
11
+ &.danger {
12
+ box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px ${akEditorDeleteBorder};
13
+ background-color: ${`var(--ds-background-danger, ${akEditorDeleteBackground})`} !important;
15
14
 
16
- .${PanelSharedCssClassName.icon} {
17
- color: ${`var(--ds-icon-danger, ${akEditorDeleteIconColor})`} !important;
18
- }
19
- }
20
- }
15
+ .${PanelSharedCssClassName.icon} {
16
+ color: ${`var(--ds-icon-danger, ${akEditorDeleteIconColor})`} !important;
17
+ }
18
+ }
19
+ }
21
20
 
22
- .${PanelSharedCssClassName.content} {
23
- cursor: text;
24
- }
21
+ .${PanelSharedCssClassName.content} {
22
+ cursor: text;
23
+ }
25
24
 
26
- /* Danger when nested node */
27
- .danger .${PanelSharedCssClassName.prefix} {
28
- &[data-panel-type] {
29
- background-color: ${`var(--ds-blanket-danger, ${akEditorDeleteBackgroundWithOpacity})`};
25
+ /* Danger when nested node */
26
+ .danger .${PanelSharedCssClassName.prefix} {
27
+ &[data-panel-type] {
28
+ background-color: ${`var(--ds-blanket-danger, ${akEditorDeleteBackgroundWithOpacity})`};
30
29
 
31
- .${PanelSharedCssClassName.icon} {
32
- color: ${`var(--ds-icon-danger, ${akEditorDeleteIconColor})`};
33
- }
34
- }
35
- }
30
+ .${PanelSharedCssClassName.icon} {
31
+ color: ${`var(--ds-icon-danger, ${akEditorDeleteIconColor})`};
32
+ }
33
+ }
34
+ }
36
35
 
37
- ${panelSharedStyles()};
38
- }
36
+ ${panelSharedStyles()};
37
+ }
39
38
 
40
- .${PanelSharedCssClassName.prefix}.${akEditorSelectedNodeClassName}:not(.danger) {
41
- ${getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket])}
42
- }
39
+ .${PanelSharedCssClassName.prefix}.${akEditorSelectedNodeClassName}:not(.danger) {
40
+ ${getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket])}
41
+ }
43
42
  `;
@@ -4,40 +4,38 @@ import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSele
4
4
 
5
5
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
6
6
  export const statusStyles = css`
7
- .${TableSharedCssClassName.TABLE_CELL_WRAPPER},
8
- .${TableSharedCssClassName.TABLE_HEADER_CELL_WRAPPER},
9
- [data-layout-section] {
10
- .${StatusSharedCssClassName.STATUS_CONTAINER} {
11
- max-width: 100%;
12
- line-height: 0;
7
+ .${TableSharedCssClassName.TABLE_CELL_WRAPPER},
8
+ .${TableSharedCssClassName.TABLE_HEADER_CELL_WRAPPER},
9
+ [data-layout-section] {
10
+ .${StatusSharedCssClassName.STATUS_CONTAINER} {
11
+ max-width: 100%;
12
+ line-height: 0;
13
13
 
14
- > span {
15
- width: 100%;
16
- }
17
- }
18
- }
19
- .${StatusSharedCssClassName.STATUS_CONTAINER} {
20
- > span {
21
- cursor: pointer;
22
- line-height: 0; /* Prevent responsive layouts increasing height of container. */
23
- }
14
+ > span {
15
+ width: 100%;
16
+ }
17
+ }
18
+ }
19
+ .${StatusSharedCssClassName.STATUS_CONTAINER} {
20
+ > span {
21
+ cursor: pointer;
22
+ line-height: 0; /* Prevent responsive layouts increasing height of container. */
23
+ }
24
24
 
25
- &.${akEditorSelectedNodeClassName}
26
- .${StatusSharedCssClassName.STATUS_LOZENGE}
27
- > span {
28
- ${getSelectionStyles([SelectionStyle.BoxShadow])}
29
- }
30
- }
25
+ &.${akEditorSelectedNodeClassName} .${StatusSharedCssClassName.STATUS_LOZENGE} > span {
26
+ ${getSelectionStyles([SelectionStyle.BoxShadow])}
27
+ }
28
+ }
31
29
 
32
- .danger {
33
- .${StatusSharedCssClassName.STATUS_LOZENGE} > span {
34
- background-color: ${akEditorDeleteBackgroundWithOpacity};
35
- }
30
+ .danger {
31
+ .${StatusSharedCssClassName.STATUS_LOZENGE} > span {
32
+ background-color: ${akEditorDeleteBackgroundWithOpacity};
33
+ }
36
34
 
37
- .${StatusSharedCssClassName.STATUS_CONTAINER}.${akEditorSelectedNodeClassName}
38
- .${StatusSharedCssClassName.STATUS_LOZENGE}
39
- > span {
40
- box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px ${akEditorDeleteBorder};
41
- }
42
- }
35
+ .${StatusSharedCssClassName.STATUS_CONTAINER}.${akEditorSelectedNodeClassName}
36
+ .${StatusSharedCssClassName.STATUS_LOZENGE}
37
+ > span {
38
+ box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px ${akEditorDeleteBorder};
39
+ }
40
+ }
43
41
  `;
@@ -3,25 +3,24 @@ import { TaskDecisionSharedCssClassName } from '@atlaskit/editor-common/styles';
3
3
  import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
4
4
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/no-exported-css -- Needs manual remediation due to `getSelectionStyles`
5
5
  export const taskDecisionStyles = css`
6
- [data-decision-wrapper] {
7
- cursor: pointer;
8
- }
6
+ [data-decision-wrapper] {
7
+ cursor: pointer;
8
+ }
9
9
 
10
- .${akEditorSelectedNodeClassName} > [data-decision-wrapper],
11
- ol[data-node-type='decisionList'].${akEditorSelectedNodeClassName} {
12
- border-radius: 4px;
13
- ${getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket])}
14
- }
10
+ .${akEditorSelectedNodeClassName} > [data-decision-wrapper],
11
+ ol[data-node-type='decisionList'].${akEditorSelectedNodeClassName} {
12
+ border-radius: 4px;
13
+ ${getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket])}
14
+ }
15
15
 
16
- .danger {
17
- .${TaskDecisionSharedCssClassName.DECISION_CONTAINER}.${akEditorSelectedNodeClassName}
18
- > div {
19
- box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px
20
- ${`var(--ds-border-danger, ${akEditorDeleteBorder})`};
21
- background-color: ${`var(--ds-blanket-danger, ${akEditorDeleteBackgroundWithOpacity})`};
22
- &::after {
23
- content: none; /* reset the Blanket selection style */
24
- }
25
- }
26
- }
16
+ .danger {
17
+ .${TaskDecisionSharedCssClassName.DECISION_CONTAINER}.${akEditorSelectedNodeClassName} > div {
18
+ box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px
19
+ ${`var(--ds-border-danger, ${akEditorDeleteBorder})`};
20
+ background-color: ${`var(--ds-blanket-danger, ${akEditorDeleteBackgroundWithOpacity})`};
21
+ &::after {
22
+ content: none; /* reset the Blanket selection style */
23
+ }
24
+ }
25
+ }
27
26
  `;
@@ -6,7 +6,7 @@ import { combineProviders } from '@atlaskit/editor-common/provider-helpers';
6
6
  /**
7
7
  * Utils to send analytics event when a extension is inserted using quickInsert
8
8
  */
9
- function sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent) {
9
+ function sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent, source) {
10
10
  if (createAnalyticsEvent) {
11
11
  fireAnalyticsEvent(createAnalyticsEvent)({
12
12
  payload: {
@@ -17,7 +17,7 @@ function sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent) {
17
17
  extensionType: item.extensionType,
18
18
  extensionKey: item.extensionKey,
19
19
  key: item.key,
20
- inputMethod: INPUT_METHOD.QUICK_INSERT
20
+ inputMethod: source || INPUT_METHOD.QUICK_INSERT
21
21
  },
22
22
  eventType: EVENT_TYPE.TRACK
23
23
  }
@@ -42,17 +42,17 @@ export async function extensionProviderToQuickInsertProvider(extensionProvider,
42
42
  keywords: item.keywords,
43
43
  featured: item.featured,
44
44
  categories: item.categories,
45
- action: insert => {
45
+ action: (insert, state, source) => {
46
46
  if (typeof item.node === 'function') {
47
47
  resolveImport(item.node()).then(node => {
48
- sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent);
48
+ sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent, source);
49
49
  if (node) {
50
50
  editorActions.replaceSelection(node);
51
51
  }
52
52
  });
53
53
  return insert('');
54
54
  } else {
55
- sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent);
55
+ sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent, source);
56
56
  return insert(item.node);
57
57
  }
58
58
  }
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "193.24.0";
2
+ export const version = "193.24.15";
@@ -13,11 +13,11 @@ var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
13
13
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
14
14
  var mainToolbarWrapperStyle = function mainToolbarWrapperStyle() {
15
15
  var isTwoLineEditorToolbar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
16
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n padding: ", " ", " 0;\n display: flex;\n height: auto;\n background-color: ", ";\n box-shadow: none;\n padding-left: ", ";\n\n & > div {\n > :first-child:not(style),\n > style:first-child + * {\n margin-left: 0;\n }\n ", "\n }\n\n .block-type-btn {\n padding-left: 0;\n }\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-surface, white)", "var(--ds-space-250, 20px)", isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n flex-direction: column-reverse;\n align-items: end;\n display: flex;\n justify-content: flex-end;\n }\n\n //make this more explicit for a toolbar\n > *:nth-child(1) {\n @media (max-width: ").concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n > div:nth-child(2) {\n justify-content: flex-end;\n display: flex;\n }\n }\n }\n "));
16
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tposition: relative;\n\talign-items: center;\n\tpadding: ", " ", " 0;\n\tdisplay: flex;\n\theight: auto;\n\tbackground-color: ", ";\n\tbox-shadow: none;\n\tpadding-left: ", ";\n\n\t& > div {\n\t\t> :first-child:not(style),\n\t\t> style:first-child + * {\n\t\t\tmargin-left: 0;\n\t\t}\n\t\t", "\n\t}\n\n\t.block-type-btn {\n\t\tpadding-left: 0;\n\t}\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-surface, white)", "var(--ds-space-250, 20px)", isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n flex-direction: column-reverse;\n align-items: end;\n display: flex;\n justify-content: flex-end;\n }\n\n //make this more explicit for a toolbar\n > *:nth-child(1) {\n @media (max-width: ").concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n > div:nth-child(2) {\n justify-content: flex-end;\n display: flex;\n }\n }\n }\n "));
17
17
  };
18
18
 
19
19
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
20
- var stickyToolbarWrapperStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n /* stylelint-disable declaration-block-no-duplicate-properties */\n position: relative;\n position: sticky;\n /* stylelint-enable declaration-block-no-duplicate-properties */\n padding-bottom: ", ";\n z-index: ", ";\n transition: box-shadow ease-in-out 0.2s;\n &.show-keyline {\n box-shadow: 0 ", "px 0 0\n ", ";\n }\n"])), "var(--ds-space-100, 8px)", akEditorMenuZIndex, akEditorToolbarKeylineHeight, "var(--ds-background-accent-gray-subtlest, #F1F2F4)");
20
+ var stickyToolbarWrapperStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t/* stylelint-disable declaration-block-no-duplicate-properties */\n\tposition: relative;\n\tposition: sticky;\n\t/* stylelint-enable declaration-block-no-duplicate-properties */\n\tpadding-bottom: ", ";\n\tz-index: ", ";\n\ttransition: box-shadow ease-in-out 0.2s;\n\t&.show-keyline {\n\t\tbox-shadow: 0 ", "px 0 0\n\t\t\t", ";\n\t}\n"])), "var(--ds-space-100, 8px)", akEditorMenuZIndex, akEditorToolbarKeylineHeight, "var(--ds-background-accent-gray-subtlest, #F1F2F4)");
21
21
  var StickyToolbar = function StickyToolbar(props) {
22
22
  var _useState = useState(0),
23
23
  _useState2 = _slicedToArray(_useState, 2),
@@ -104,6 +104,6 @@ export var MainToolbar = function MainToolbar(_ref) {
104
104
  export var mainToolbarCustomComponentsSlotStyle = function mainToolbarCustomComponentsSlotStyle() {
105
105
  var isTwoLineEditorToolbar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
106
106
  return (// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
107
- css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n align-items: center;\n flex-grow: 1;\n padding-right: ", ";\n > div {\n display: flex;\n flex-shrink: 0;\n }\n ", "\n "])), "var(--ds-space-250, 20px)", isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n {\n padding-right: 0;\n }\n }\n "))
107
+ css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t\tdisplay: flex;\n\t\tjustify-content: flex-end;\n\t\talign-items: center;\n\t\tflex-grow: 1;\n\t\tpadding-right: ", ";\n\t\t> div {\n\t\t\tdisplay: flex;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t", "\n\t"])), "var(--ds-space-250, 20px)", isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n {\n padding-right: 0;\n }\n }\n "))
108
108
  );
109
109
  };
@@ -53,11 +53,11 @@ export var MobileAppearance = /*#__PURE__*/forwardRef(function MobileAppearance(
53
53
  var keyboardHeight = (_basePluginState$keyb = basePluginState === null || basePluginState === void 0 ? void 0 : basePluginState.keyboardHeight) !== null && _basePluginState$keyb !== void 0 ? _basePluginState$keyb : -1;
54
54
 
55
55
  /*
56
- We calculate the min-height based on the windowHeight - keyboardHeight - paddingTop.
57
- This is needed due to scrolling issues when there is no content to scroll (like, only having 1 paragraph),
58
- but if the clickable area is bigger than the windowHeight - keyboard (including toolbar) then the view
59
- is scrolled nevertheless, and it gives the sensation that the content was lost.
60
- */
56
+ We calculate the min-height based on the windowHeight - keyboardHeight - paddingTop.
57
+ This is needed due to scrolling issues when there is no content to scroll (like, only having 1 paragraph),
58
+ but if the clickable area is bigger than the windowHeight - keyboard (including toolbar) then the view
59
+ is scrolled nevertheless, and it gives the sensation that the content was lost.
60
+ */
61
61
 
62
62
  if (!persistScrollGutter) {
63
63
  // in iOS Hybrid Editor windowHeight doesn't exclude keyboardHeight