@atlaskit/editor-core 193.24.6 → 193.24.18
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.
- package/.eslintrc.js +37 -37
- package/CHANGELOG.md +16 -0
- package/architecture/0001-record-architecture-decisions.md +6 -3
- package/architecture/0002-deep-equality-check-for-getsharedstate.md +9 -8
- package/architecture/0003-explicit-plugin-dependencies.md +47 -18
- package/codemods/140.0.0-rc-kraken-fix-type-errors.ts +1 -3
- package/codemods/145.0.0-deprecate-props.ts +1 -3
- package/codemods/172.0.0-transform-smartlinks-prop.ts +1 -3
- package/codemods/175.0.0-rename-unsafe-allowUndoRedoButton-prop.ts +1 -1
- package/codemods/180.1.0-update-to-editor-migration-component.ts +1 -3
- package/codemods/__tests__/next-remove-allow-more-text-colors-prop.ts +29 -31
- package/codemods/__tests__/remove-config-panel-width-prop.ts +29 -31
- package/codemods/__tests__/rename-editor-to-editor-migration-component.ts +43 -45
- package/codemods/__tests__/rename-smartlinks-prop.ts +57 -59
- package/codemods/__tests__/rename-unsafe-allowUndoRedoButtons-prop.ts +43 -43
- package/codemods/__tests__/rename-unsafe-cards-prop.ts +43 -45
- package/codemods/migrates/next-remove-allow-more-text-colors-prop.ts +41 -45
- package/codemods/migrates/remove-config-panel-width-prop.ts +20 -29
- package/codemods/migrates/rename-editor-to-editor-migration-component.ts +20 -24
- package/codemods/migrates/rename-smartlinks-prop.ts +30 -38
- package/codemods/migrates/rename-unsafe-allowUndoRedoButtons-prop.ts +4 -5
- package/codemods/migrates/rename-unsafe-cards-prop.ts +1 -4
- package/codemods/utils.ts +62 -72
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +3 -3
- package/dist/cjs/ui/AppearanceComponents/Mobile.js +5 -5
- package/dist/cjs/ui/ContentStyles/ai-panels.js +1 -1
- package/dist/cjs/ui/ContentStyles/code-block.js +2 -2
- package/dist/cjs/ui/ContentStyles/date.js +1 -1
- package/dist/cjs/ui/ContentStyles/expand.js +1 -1
- package/dist/cjs/ui/ContentStyles/extension.js +2 -2
- package/dist/cjs/ui/ContentStyles/index.js +6 -6
- package/dist/cjs/ui/ContentStyles/layout.js +1 -1
- package/dist/cjs/ui/ContentStyles/media.js +1 -1
- package/dist/cjs/ui/ContentStyles/panel.js +1 -1
- package/dist/cjs/ui/ContentStyles/status.js +1 -1
- package/dist/cjs/ui/ContentStyles/tasks-and-decisions.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +40 -40
- package/dist/es2019/ui/AppearanceComponents/Mobile.js +5 -5
- package/dist/es2019/ui/ContentStyles/ai-panels.js +80 -80
- package/dist/es2019/ui/ContentStyles/code-block.js +58 -58
- package/dist/es2019/ui/ContentStyles/date.js +19 -19
- package/dist/es2019/ui/ContentStyles/expand.js +98 -98
- package/dist/es2019/ui/ContentStyles/extension.js +154 -159
- package/dist/es2019/ui/ContentStyles/index.js +139 -144
- package/dist/es2019/ui/ContentStyles/layout.js +125 -125
- package/dist/es2019/ui/ContentStyles/media.js +179 -178
- package/dist/es2019/ui/ContentStyles/panel.js +29 -30
- package/dist/es2019/ui/ContentStyles/status.js +30 -32
- package/dist/es2019/ui/ContentStyles/tasks-and-decisions.js +18 -19
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +3 -3
- package/dist/esm/ui/AppearanceComponents/Mobile.js +5 -5
- package/dist/esm/ui/ContentStyles/ai-panels.js +1 -1
- package/dist/esm/ui/ContentStyles/code-block.js +2 -2
- package/dist/esm/ui/ContentStyles/date.js +1 -1
- package/dist/esm/ui/ContentStyles/expand.js +1 -1
- package/dist/esm/ui/ContentStyles/extension.js +2 -2
- package/dist/esm/ui/ContentStyles/index.js +6 -6
- package/dist/esm/ui/ContentStyles/layout.js +1 -1
- package/dist/esm/ui/ContentStyles/media.js +1 -1
- package/dist/esm/ui/ContentStyles/panel.js +1 -1
- package/dist/esm/ui/ContentStyles/status.js +1 -1
- package/dist/esm/ui/ContentStyles/tasks-and-decisions.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/composable-editor/editor.d.ts +1 -1
- package/dist/types/composable-editor/hooks/useProviders.d.ts +1 -1
- package/dist/types/create-editor/create-preset.d.ts +135 -9
- package/dist/types/create-editor/sort-by-order.d.ts +1 -1
- package/dist/types/event-dispatcher/index.d.ts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/presets/default.d.ts +120 -8
- package/dist/types/presets/universal.d.ts +135 -9
- package/dist/types/presets/useUniversalPreset.d.ts +135 -9
- package/dist/types/test-utils.d.ts +1 -1
- package/dist/types/types/browser.d.ts +1 -1
- package/dist/types/types/editor-plugin.d.ts +1 -1
- package/dist/types/types/empty-state-handler.d.ts +1 -1
- package/dist/types/types/feature-flags.d.ts +1 -1
- package/dist/types/types/index.d.ts +3 -3
- package/dist/types/types/pm-config.d.ts +1 -1
- package/dist/types/types/ui-components.d.ts +1 -1
- package/dist/types/ui/Addon/ClickAreaBlock/index.d.ts +1 -1
- package/dist/types/ui/Toolbar/types.d.ts +1 -1
- package/dist/types/utils/action.d.ts +1 -4
- package/dist/types/utils/performance/plugin-performance-report.d.ts +1 -1
- package/dist/types/utils/slice.d.ts +1 -1
- package/dist/types-ts4.5/composable-editor/editor.d.ts +1 -1
- package/dist/types-ts4.5/composable-editor/hooks/useProviders.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/create-preset.d.ts +153 -9
- package/dist/types-ts4.5/create-editor/sort-by-order.d.ts +1 -1
- package/dist/types-ts4.5/event-dispatcher/index.d.ts +2 -2
- package/dist/types-ts4.5/index.d.ts +2 -2
- package/dist/types-ts4.5/presets/default.d.ts +136 -8
- package/dist/types-ts4.5/presets/universal.d.ts +153 -9
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +153 -9
- package/dist/types-ts4.5/test-utils.d.ts +1 -1
- package/dist/types-ts4.5/types/browser.d.ts +1 -1
- package/dist/types-ts4.5/types/editor-plugin.d.ts +1 -1
- package/dist/types-ts4.5/types/empty-state-handler.d.ts +1 -1
- package/dist/types-ts4.5/types/feature-flags.d.ts +1 -1
- package/dist/types-ts4.5/types/index.d.ts +3 -3
- package/dist/types-ts4.5/types/pm-config.d.ts +1 -1
- package/dist/types-ts4.5/types/ui-components.d.ts +1 -1
- package/dist/types-ts4.5/ui/Addon/ClickAreaBlock/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/Toolbar/types.d.ts +1 -1
- package/dist/types-ts4.5/utils/performance/plugin-performance-report.d.ts +1 -1
- package/dist/types-ts4.5/utils/slice.d.ts +1 -1
- package/docs/0-intro.tsx +13 -19
- package/docs/1-legacy-editor.tsx +13 -19
- package/docs/4-annotations.tsx +222 -223
- package/package.json +25 -16
- package/report.api.md +448 -473
package/docs/4-annotations.tsx
CHANGED
|
@@ -9,223 +9,222 @@ import { token } from '@atlaskit/tokens';
|
|
|
9
9
|
import { Editor } from '../src';
|
|
10
10
|
|
|
11
11
|
const initialExample = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
12
|
+
version: 1,
|
|
13
|
+
type: 'doc',
|
|
14
|
+
content: [
|
|
15
|
+
{
|
|
16
|
+
type: 'paragraph',
|
|
17
|
+
content: [
|
|
18
|
+
{
|
|
19
|
+
type: 'text',
|
|
20
|
+
text: 'For Q1, our main ',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
type: 'text',
|
|
24
|
+
text: 'areas of focus are:',
|
|
25
|
+
marks: [
|
|
26
|
+
{
|
|
27
|
+
type: 'annotation',
|
|
28
|
+
attrs: {
|
|
29
|
+
id: 'b81e1de8-9df7-4210-861d-89e13512ce33',
|
|
30
|
+
annotationType: 'inlineComment',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
type: 'bulletList',
|
|
39
|
+
content: [
|
|
40
|
+
{
|
|
41
|
+
type: 'listItem',
|
|
42
|
+
content: [
|
|
43
|
+
{
|
|
44
|
+
type: 'paragraph',
|
|
45
|
+
content: [
|
|
46
|
+
{
|
|
47
|
+
type: 'text',
|
|
48
|
+
text: 'Performance',
|
|
49
|
+
marks: [
|
|
50
|
+
{
|
|
51
|
+
type: 'strong',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
type: 'annotation',
|
|
55
|
+
attrs: {
|
|
56
|
+
id: '5551fe04-3517-4821-8330-b7c506a43bd5',
|
|
57
|
+
annotationType: 'inlineComment',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: 'text',
|
|
64
|
+
text: ': Instrument key performance metrics and improve typing speed in the editor.',
|
|
65
|
+
marks: [
|
|
66
|
+
{
|
|
67
|
+
type: 'annotation',
|
|
68
|
+
attrs: {
|
|
69
|
+
id: '5551fe04-3517-4821-8330-b7c506a43bd5',
|
|
70
|
+
annotationType: 'inlineComment',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: 'listItem',
|
|
81
|
+
content: [
|
|
82
|
+
{
|
|
83
|
+
type: 'paragraph',
|
|
84
|
+
content: [
|
|
85
|
+
{
|
|
86
|
+
type: 'text',
|
|
87
|
+
text: 'Insertion & nesting logic:',
|
|
88
|
+
marks: [
|
|
89
|
+
{
|
|
90
|
+
type: 'strong',
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
type: 'text',
|
|
96
|
+
text: ' Remove invisible barriers by enabling more content to be placed ',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
type: 'text',
|
|
100
|
+
text: 'inside each other.',
|
|
101
|
+
marks: [
|
|
102
|
+
{
|
|
103
|
+
type: 'annotation',
|
|
104
|
+
attrs: {
|
|
105
|
+
id: '42497172-2e64-4aa6-b8b1-5a37270ee1f9',
|
|
106
|
+
annotationType: 'inlineComment',
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
type: 'text',
|
|
113
|
+
text: ' E.g. allow users to paste an image inside a panel.',
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
122
|
};
|
|
123
123
|
|
|
124
124
|
const nestedExample = {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
125
|
+
version: 1,
|
|
126
|
+
type: 'doc',
|
|
127
|
+
content: [
|
|
128
|
+
{
|
|
129
|
+
type: 'paragraph',
|
|
130
|
+
content: [
|
|
131
|
+
{
|
|
132
|
+
type: 'text',
|
|
133
|
+
marks: [
|
|
134
|
+
{
|
|
135
|
+
type: 'annotation',
|
|
136
|
+
attrs: {
|
|
137
|
+
id: 'c7052cd7-5119-4837-85ce-45ba5207764c',
|
|
138
|
+
annotationType: 'inlineComment',
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
text: 'This is a paragraph with a outer comment ',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
type: 'text',
|
|
146
|
+
marks: [
|
|
147
|
+
{
|
|
148
|
+
type: 'annotation',
|
|
149
|
+
attrs: {
|
|
150
|
+
id: 'a5ee9b09-f302-4fa6-89cb-d5703cb6ccdd',
|
|
151
|
+
annotationType: 'inlineComment',
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
type: 'annotation',
|
|
156
|
+
attrs: {
|
|
157
|
+
id: 'c7052cd7-5119-4837-85ce-45ba5207764c',
|
|
158
|
+
annotationType: 'inlineComment',
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
text: 'that also contains a nested comment',
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
type: 'text',
|
|
166
|
+
text: ', where the nested comment has two annotation marks applied.',
|
|
167
|
+
},
|
|
168
|
+
],
|
|
169
|
+
},
|
|
170
|
+
],
|
|
171
171
|
};
|
|
172
172
|
|
|
173
|
-
const inlineCommentEditor = (
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
) => <Editor appearance="chromeless" defaultValue={adf} onChange={onChange} />;
|
|
173
|
+
const inlineCommentEditor = (adf: Object, onChange?: (editorView: EditorView) => void) => (
|
|
174
|
+
<Editor appearance="chromeless" defaultValue={adf} onChange={onChange} />
|
|
175
|
+
);
|
|
177
176
|
|
|
178
177
|
class SplitExample extends React.Component<{ initialAdf: object }> {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
193
|
-
|
|
194
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
201
|
-
|
|
202
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
203
|
-
|
|
204
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
216
|
-
|
|
217
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
218
|
-
|
|
219
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
178
|
+
state = {
|
|
179
|
+
adf: this.props.initialAdf,
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
onChange = (view: EditorView) => {
|
|
183
|
+
this.setState({ adf: view.state.doc.toJSON() });
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
render() {
|
|
187
|
+
const { adf } = this.state;
|
|
188
|
+
return (
|
|
189
|
+
<div
|
|
190
|
+
style={{
|
|
191
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
192
|
+
display: 'flex',
|
|
193
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
194
|
+
maxHeight: '400px',
|
|
195
|
+
}}
|
|
196
|
+
>
|
|
197
|
+
<div
|
|
198
|
+
style={{
|
|
199
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
200
|
+
margin: token('space.100', '8px'),
|
|
201
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
202
|
+
padding: token('space.100', '8px'),
|
|
203
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
204
|
+
backgroundColor: N20,
|
|
205
|
+
border: `1px solid ${N30}`,
|
|
206
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
207
|
+
flex: 1,
|
|
208
|
+
}}
|
|
209
|
+
>
|
|
210
|
+
{inlineCommentEditor(nestedExample, this.onChange)}
|
|
211
|
+
</div>
|
|
212
|
+
<div
|
|
213
|
+
style={{
|
|
214
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
215
|
+
flex: 2,
|
|
216
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
217
|
+
overflow: 'auto',
|
|
218
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
219
|
+
margin: token('space.100', '8px'),
|
|
220
|
+
}}
|
|
221
|
+
>
|
|
222
|
+
<p>Paragraph node's content:</p>
|
|
223
|
+
{code`${JSON.stringify((adf as any).content[0].content, null, 2)}`}
|
|
224
|
+
</div>
|
|
225
|
+
</div>
|
|
226
|
+
);
|
|
227
|
+
}
|
|
229
228
|
}
|
|
230
229
|
|
|
231
230
|
export default md`
|
|
@@ -242,19 +241,19 @@ Currently, there is only the \`inlineComment\` type of annotation. In the future
|
|
|
242
241
|
These denote a comment thread about the given text, and are denoted by a yellow highlight. This is commonly seen within Confluence after selecting some text in View mode.
|
|
243
242
|
|
|
244
243
|
${(
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
248
|
-
|
|
249
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
250
|
-
|
|
251
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
244
|
+
<div
|
|
245
|
+
style={{
|
|
246
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
247
|
+
margin: token('space.100', '8px'),
|
|
248
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
249
|
+
padding: token('space.100', '8px'),
|
|
250
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
251
|
+
backgroundColor: N20,
|
|
252
|
+
border: `1px solid ${N30}`,
|
|
253
|
+
}}
|
|
254
|
+
>
|
|
255
|
+
{inlineCommentEditor(initialExample)}
|
|
256
|
+
</div>
|
|
258
257
|
)}
|
|
259
258
|
|
|
260
259
|
### Example ADF
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "193.24.
|
|
3
|
+
"version": "193.24.18",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
46
46
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
47
47
|
"@atlaskit/button": "^17.17.0",
|
|
48
|
-
"@atlaskit/editor-common": "^81.
|
|
48
|
+
"@atlaskit/editor-common": "^81.2.0",
|
|
49
49
|
"@atlaskit/editor-json-transformer": "^8.13.0",
|
|
50
50
|
"@atlaskit/editor-plugins": "^2.7.0",
|
|
51
51
|
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
"@atlaskit/checkbox": "^13.4.0",
|
|
91
91
|
"@atlaskit/collab-provider": "9.29.2",
|
|
92
92
|
"@atlaskit/dropdown-menu": "^12.10.0",
|
|
93
|
-
"@atlaskit/editor-plugin-annotation": "1.9.
|
|
94
|
-
"@atlaskit/editor-plugin-card": "^1.
|
|
93
|
+
"@atlaskit/editor-plugin-annotation": "1.9.4",
|
|
94
|
+
"@atlaskit/editor-plugin-card": "^1.15.0",
|
|
95
95
|
"@atlaskit/editor-plugin-editor-viewmode": "^1.1.0",
|
|
96
96
|
"@atlaskit/editor-plugin-list": "^3.3.0",
|
|
97
97
|
"@atlaskit/editor-plugin-paste": "^1.2.0",
|
|
@@ -104,18 +104,17 @@
|
|
|
104
104
|
"@atlaskit/media-integration-test-helpers": "^3.0.0",
|
|
105
105
|
"@atlaskit/media-test-helpers": "^33.0.27",
|
|
106
106
|
"@atlaskit/modal-dialog": "^12.13.0",
|
|
107
|
-
"@atlaskit/primitives": "^6.
|
|
108
|
-
"@atlaskit/renderer": "^109.
|
|
107
|
+
"@atlaskit/primitives": "^6.5.0",
|
|
108
|
+
"@atlaskit/renderer": "^109.31.0",
|
|
109
109
|
"@atlaskit/select": "^17.10.0",
|
|
110
|
-
"@atlaskit/smart-card": "^27.
|
|
110
|
+
"@atlaskit/smart-card": "^27.5.0",
|
|
111
111
|
"@atlaskit/synchrony-test-helpers": "^2.4.0",
|
|
112
112
|
"@atlaskit/toggle": "^13.1.0",
|
|
113
113
|
"@atlaskit/util-data-test": "^17.9.0",
|
|
114
114
|
"@atlaskit/visual-regression": "*",
|
|
115
115
|
"@atlassian/adf-schema-json": "^1.14.0",
|
|
116
|
-
"@atlassian/
|
|
117
|
-
"@atlassian/
|
|
118
|
-
"@atlassian/search-provider": "2.4.70",
|
|
116
|
+
"@atlassian/link-picker-plugins": "^24.3.0",
|
|
117
|
+
"@atlassian/search-provider": "2.4.76",
|
|
119
118
|
"@atlassian/ufo": "^0.2.0",
|
|
120
119
|
"@emotion/jest": "^11.8.0",
|
|
121
120
|
"@storybook/addon-knobs": "^5.3.18",
|
|
@@ -124,7 +123,6 @@
|
|
|
124
123
|
"@testing-library/user-event": "^14.4.3",
|
|
125
124
|
"@types/diff": "^5.0.2",
|
|
126
125
|
"@types/is-number": "^7.0.0",
|
|
127
|
-
"clipboard-polyfill": "4.0.1",
|
|
128
126
|
"diff": "^4.0.1",
|
|
129
127
|
"enzyme": "^3.10.0",
|
|
130
128
|
"fetch-mock": "^8.0.0",
|
|
@@ -157,8 +155,11 @@
|
|
|
157
155
|
]
|
|
158
156
|
}
|
|
159
157
|
},
|
|
160
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
|
|
161
158
|
"platform-feature-flags": {
|
|
159
|
+
"platform.linking-platform.enable-datasource-edit-dropdown-toolbar": {
|
|
160
|
+
"type": "boolean",
|
|
161
|
+
"referenceOnly": "true"
|
|
162
|
+
},
|
|
162
163
|
"platform.linking-platform.prevent-suspicious-linkification": {
|
|
163
164
|
"type": "boolean",
|
|
164
165
|
"referenceOnly": "true"
|
|
@@ -202,10 +203,6 @@
|
|
|
202
203
|
"type": "boolean",
|
|
203
204
|
"referenceOnly": "true"
|
|
204
205
|
},
|
|
205
|
-
"platform.editor.media.autoselect-inserted-image_oumto": {
|
|
206
|
-
"type": "boolean",
|
|
207
|
-
"referenceOnly": "true"
|
|
208
|
-
},
|
|
209
206
|
"platform.media-experience.cardv2_7zann": {
|
|
210
207
|
"type": "boolean",
|
|
211
208
|
"referenceOnly": "true"
|
|
@@ -301,6 +298,10 @@
|
|
|
301
298
|
"type": "boolean",
|
|
302
299
|
"referenceOnly": "true"
|
|
303
300
|
},
|
|
301
|
+
"platform.editor.table.use-increased-scaling-percent": {
|
|
302
|
+
"type": "boolean",
|
|
303
|
+
"referenceOnly": "true"
|
|
304
|
+
},
|
|
304
305
|
"platform.editor.table-width-diff-in-renderer_x5s3z": {
|
|
305
306
|
"type": "boolean",
|
|
306
307
|
"referenceOnly": "true"
|
|
@@ -347,6 +348,14 @@
|
|
|
347
348
|
"platform.editor.mentions-in-editor-popup-on-click": {
|
|
348
349
|
"type": "boolean",
|
|
349
350
|
"referenceOnly": "true"
|
|
351
|
+
},
|
|
352
|
+
"platform.editor.table.editor-num-col-style-changes": {
|
|
353
|
+
"type": "boolean",
|
|
354
|
+
"referenceOnly": "true"
|
|
355
|
+
},
|
|
356
|
+
"platform.editor.simplify-inline-cards-in-code-blocks_jw6t1": {
|
|
357
|
+
"type": "boolean",
|
|
358
|
+
"referenceOnly": "true"
|
|
350
359
|
}
|
|
351
360
|
},
|
|
352
361
|
"stricter": {
|