@atlaskit/editor-common 71.0.2 → 72.0.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.
- package/CHANGELOG.md +77 -0
- package/dist/cjs/analytics/types/enums.js +20 -1
- package/dist/cjs/i18n/index.js +13 -5
- package/dist/cjs/i18n/languages.js +42 -0
- package/dist/cjs/keymaps/index.js +55 -3
- package/dist/cjs/styles/index.js +8 -2
- package/dist/cjs/styles/shared/annotation.js +4 -7
- package/dist/cjs/styles/shared/block-marks.js +1 -1
- package/dist/cjs/styles/shared/code-block.js +3 -4
- package/dist/cjs/styles/shared/lists.js +55 -4
- package/dist/cjs/styles/shared/panel.js +6 -12
- package/dist/cjs/styles/shared/shadow.js +3 -1
- package/dist/cjs/styles/shared/table.js +2 -2
- package/dist/cjs/types/next-editor-plugin.js +5 -0
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Emoji/index.js +11 -2
- package/dist/cjs/ui/Popup/index.js +72 -2
- package/dist/cjs/ui/Popup/utils.js +13 -6
- package/dist/cjs/ui/UnsupportedBlock/index.js +2 -2
- package/dist/cjs/ui/UnsupportedInline/index.js +2 -2
- package/dist/cjs/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +138 -0
- package/dist/cjs/ui-color/ColorPalette/index.js +19 -1
- package/dist/cjs/ui-menu/DropdownMenu/index.js +2 -0
- package/dist/cjs/ui-menu/ToolbarButton/index.js +3 -1
- package/dist/cjs/utils/analytics.js +1 -38
- package/dist/cjs/utils/builder.js +44 -0
- package/dist/cjs/utils/compareNodes.js +86 -33
- package/dist/cjs/utils/index.js +47 -1
- package/dist/cjs/utils/list.js +47 -0
- package/dist/cjs/utils/plugin-state-factory.js +9 -9
- package/dist/cjs/utils/referentiality.js +281 -2
- package/dist/cjs/utils/track-unsupported-content.js +19 -20
- package/dist/cjs/utils/validate-using-spec.js +8 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics/types/enums.js +20 -1
- package/dist/es2019/i18n/index.js +4 -3
- package/dist/es2019/i18n/languages.js +34 -0
- package/dist/es2019/keymaps/index.js +47 -0
- package/dist/es2019/styles/index.js +1 -1
- package/dist/es2019/styles/shared/annotation.js +4 -7
- package/dist/es2019/styles/shared/block-marks.js +8 -1
- package/dist/es2019/styles/shared/code-block.js +7 -6
- package/dist/es2019/styles/shared/lists.js +44 -2
- package/dist/es2019/styles/shared/panel.js +6 -11
- package/dist/es2019/styles/shared/shadow.js +21 -6
- package/dist/es2019/styles/shared/table.js +2 -3
- package/dist/es2019/types/next-editor-plugin.js +1 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Emoji/index.js +11 -2
- package/dist/es2019/ui/Popup/index.js +68 -2
- package/dist/es2019/ui/Popup/utils.js +13 -6
- package/dist/es2019/ui/UnsupportedBlock/index.js +1 -1
- package/dist/es2019/ui/UnsupportedInline/index.js +1 -1
- package/dist/es2019/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +120 -0
- package/dist/es2019/ui-color/ColorPalette/index.js +28 -12
- package/dist/es2019/ui-menu/DropdownMenu/index.js +2 -0
- package/dist/es2019/ui-menu/ToolbarButton/index.js +3 -1
- package/dist/es2019/utils/analytics.js +0 -33
- package/dist/es2019/utils/builder.js +16 -0
- package/dist/es2019/utils/compareNodes.js +79 -28
- package/dist/es2019/utils/index.js +4 -2
- package/dist/es2019/utils/list.js +31 -0
- package/dist/es2019/utils/plugin-state-factory.js +9 -9
- package/dist/es2019/utils/referentiality.js +240 -0
- package/dist/es2019/utils/track-unsupported-content.js +20 -16
- package/dist/es2019/utils/validate-using-spec.js +8 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics/types/enums.js +20 -1
- package/dist/esm/i18n/index.js +4 -3
- package/dist/esm/i18n/languages.js +34 -0
- package/dist/esm/keymaps/index.js +48 -0
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/styles/shared/annotation.js +4 -7
- package/dist/esm/styles/shared/block-marks.js +1 -1
- package/dist/esm/styles/shared/code-block.js +3 -4
- package/dist/esm/styles/shared/lists.js +49 -2
- package/dist/esm/styles/shared/panel.js +6 -11
- package/dist/esm/styles/shared/shadow.js +2 -2
- package/dist/esm/styles/shared/table.js +2 -3
- package/dist/esm/types/next-editor-plugin.js +1 -0
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Emoji/index.js +11 -2
- package/dist/esm/ui/Popup/index.js +73 -2
- package/dist/esm/ui/Popup/utils.js +13 -6
- package/dist/esm/ui/UnsupportedBlock/index.js +1 -1
- package/dist/esm/ui/UnsupportedInline/index.js +1 -1
- package/dist/esm/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +124 -0
- package/dist/esm/ui-color/ColorPalette/index.js +18 -2
- package/dist/esm/ui-menu/DropdownMenu/index.js +2 -0
- package/dist/esm/ui-menu/ToolbarButton/index.js +3 -1
- package/dist/esm/utils/analytics.js +0 -33
- package/dist/esm/utils/builder.js +30 -0
- package/dist/esm/utils/compareNodes.js +83 -32
- package/dist/esm/utils/index.js +4 -2
- package/dist/esm/utils/list.js +31 -0
- package/dist/esm/utils/plugin-state-factory.js +9 -9
- package/dist/esm/utils/referentiality.js +269 -0
- package/dist/esm/utils/track-unsupported-content.js +19 -20
- package/dist/esm/utils/validate-using-spec.js +8 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/types/enums.d.ts +23 -4
- package/dist/types/collab/types.d.ts +1 -1
- package/dist/types/i18n/index.d.ts +4 -3
- package/dist/types/i18n/languages.d.ts +35 -0
- package/dist/types/keymaps/index.d.ts +1 -0
- package/dist/types/styles/index.d.ts +1 -1
- package/dist/types/styles/shared/lists.d.ts +3 -1
- package/dist/types/types/collab.d.ts +1 -1
- package/dist/types/types/copy-button.d.ts +4 -0
- package/dist/types/types/feature-flags.d.ts +30 -25
- package/dist/types/types/floating-toolbar.d.ts +26 -1
- package/dist/types/types/index.d.ts +2 -1
- package/dist/types/types/next-editor-plugin.d.ts +61 -0
- package/dist/types/ui/Emoji/index.d.ts +2 -0
- package/dist/types/ui/Popup/index.d.ts +19 -0
- package/dist/types/ui/Popup/utils.d.ts +3 -3
- package/dist/types/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.d.ts +214 -0
- package/dist/types/ui-color/ColorPalette/index.d.ts +7 -0
- package/dist/types/ui-menu/DropdownMenu/types.d.ts +1 -0
- package/dist/types/ui-menu/ToolbarButton/index.d.ts +3 -1
- package/dist/types/utils/analytics.d.ts +1 -21
- package/dist/types/utils/builder.d.ts +8 -0
- package/dist/types/utils/compareNodes.d.ts +16 -0
- package/dist/types/utils/index.d.ts +3 -1
- package/dist/types/utils/list.d.ts +10 -0
- package/dist/types/utils/plugin-state-factory.d.ts +1 -1
- package/dist/types/utils/referentiality.d.ts +4 -0
- package/dist/types/utils/track-unsupported-content.d.ts +14 -2
- package/package.json +15 -12
- package/report.api.md +1 -1
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
export declare const newLightPalette: {
|
|
2
|
+
'#FFFFFF': {
|
|
3
|
+
id: string;
|
|
4
|
+
defaultMessage: string;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
'#B3D4FF': {
|
|
8
|
+
id: string;
|
|
9
|
+
defaultMessage: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
'#B3F5FF': {
|
|
13
|
+
id: string;
|
|
14
|
+
defaultMessage: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
'#ABF5D1': {
|
|
18
|
+
id: string;
|
|
19
|
+
defaultMessage: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
'#FFF0B3': {
|
|
23
|
+
id: string;
|
|
24
|
+
defaultMessage: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
'#FFBDAD': {
|
|
28
|
+
id: string;
|
|
29
|
+
defaultMessage: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
'#EAE6FF': {
|
|
33
|
+
id: string;
|
|
34
|
+
defaultMessage: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
'#97A0AF': {
|
|
38
|
+
id: string;
|
|
39
|
+
defaultMessage: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
'#4C9AFF': {
|
|
43
|
+
id: string;
|
|
44
|
+
defaultMessage: string;
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
47
|
+
'#00B8D9': {
|
|
48
|
+
id: string;
|
|
49
|
+
defaultMessage: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
'#36B37E': {
|
|
53
|
+
id: string;
|
|
54
|
+
defaultMessage: string;
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
'#FFC400': {
|
|
58
|
+
id: string;
|
|
59
|
+
defaultMessage: string;
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
'#FF5630': {
|
|
63
|
+
id: string;
|
|
64
|
+
defaultMessage: string;
|
|
65
|
+
description: string;
|
|
66
|
+
};
|
|
67
|
+
'#FF991F': {
|
|
68
|
+
id: string;
|
|
69
|
+
defaultMessage: string;
|
|
70
|
+
description: string;
|
|
71
|
+
};
|
|
72
|
+
'#6554C0': {
|
|
73
|
+
id: string;
|
|
74
|
+
defaultMessage: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
'#0747A6': {
|
|
78
|
+
id: string;
|
|
79
|
+
defaultMessage: string;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
82
|
+
'#008DA6': {
|
|
83
|
+
id: string;
|
|
84
|
+
defaultMessage: string;
|
|
85
|
+
description: string;
|
|
86
|
+
};
|
|
87
|
+
'#006644': {
|
|
88
|
+
id: string;
|
|
89
|
+
defaultMessage: string;
|
|
90
|
+
description: string;
|
|
91
|
+
};
|
|
92
|
+
'#BF2600': {
|
|
93
|
+
id: string;
|
|
94
|
+
defaultMessage: string;
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
'#403294': {
|
|
98
|
+
id: string;
|
|
99
|
+
defaultMessage: string;
|
|
100
|
+
description: string;
|
|
101
|
+
};
|
|
102
|
+
'#172B4D': {
|
|
103
|
+
id: string;
|
|
104
|
+
defaultMessage: string;
|
|
105
|
+
description: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
export declare const newDarkPalette: {
|
|
109
|
+
'#FFFFFF': {
|
|
110
|
+
id: string;
|
|
111
|
+
defaultMessage: string;
|
|
112
|
+
description: string;
|
|
113
|
+
};
|
|
114
|
+
'#B3D4FF': {
|
|
115
|
+
id: string;
|
|
116
|
+
defaultMessage: string;
|
|
117
|
+
description: string;
|
|
118
|
+
};
|
|
119
|
+
'#B3F5FF': {
|
|
120
|
+
id: string;
|
|
121
|
+
defaultMessage: string;
|
|
122
|
+
description: string;
|
|
123
|
+
};
|
|
124
|
+
'#ABF5D1': {
|
|
125
|
+
id: string;
|
|
126
|
+
defaultMessage: string;
|
|
127
|
+
description: string;
|
|
128
|
+
};
|
|
129
|
+
'#FFF0B3': {
|
|
130
|
+
id: string;
|
|
131
|
+
defaultMessage: string;
|
|
132
|
+
description: string;
|
|
133
|
+
};
|
|
134
|
+
'#FFBDAD': {
|
|
135
|
+
id: string;
|
|
136
|
+
defaultMessage: string;
|
|
137
|
+
description: string;
|
|
138
|
+
};
|
|
139
|
+
'#EAE6FF': {
|
|
140
|
+
id: string;
|
|
141
|
+
defaultMessage: string;
|
|
142
|
+
description: string;
|
|
143
|
+
};
|
|
144
|
+
'#97A0AF': {
|
|
145
|
+
id: string;
|
|
146
|
+
defaultMessage: string;
|
|
147
|
+
description: string;
|
|
148
|
+
};
|
|
149
|
+
'#4C9AFF': {
|
|
150
|
+
id: string;
|
|
151
|
+
defaultMessage: string;
|
|
152
|
+
description: string;
|
|
153
|
+
};
|
|
154
|
+
'#00B8D9': {
|
|
155
|
+
id: string;
|
|
156
|
+
defaultMessage: string;
|
|
157
|
+
description: string;
|
|
158
|
+
};
|
|
159
|
+
'#36B37E': {
|
|
160
|
+
id: string;
|
|
161
|
+
defaultMessage: string;
|
|
162
|
+
description: string;
|
|
163
|
+
};
|
|
164
|
+
'#FFC400': {
|
|
165
|
+
id: string;
|
|
166
|
+
defaultMessage: string;
|
|
167
|
+
description: string;
|
|
168
|
+
};
|
|
169
|
+
'#FF5630': {
|
|
170
|
+
id: string;
|
|
171
|
+
defaultMessage: string;
|
|
172
|
+
description: string;
|
|
173
|
+
};
|
|
174
|
+
'#FF991F': {
|
|
175
|
+
id: string;
|
|
176
|
+
defaultMessage: string;
|
|
177
|
+
description: string;
|
|
178
|
+
};
|
|
179
|
+
'#6554C0': {
|
|
180
|
+
id: string;
|
|
181
|
+
defaultMessage: string;
|
|
182
|
+
description: string;
|
|
183
|
+
};
|
|
184
|
+
'#0747A6': {
|
|
185
|
+
id: string;
|
|
186
|
+
defaultMessage: string;
|
|
187
|
+
description: string;
|
|
188
|
+
};
|
|
189
|
+
'#008DA6': {
|
|
190
|
+
id: string;
|
|
191
|
+
defaultMessage: string;
|
|
192
|
+
description: string;
|
|
193
|
+
};
|
|
194
|
+
'#006644': {
|
|
195
|
+
id: string;
|
|
196
|
+
defaultMessage: string;
|
|
197
|
+
description: string;
|
|
198
|
+
};
|
|
199
|
+
'#BF2600': {
|
|
200
|
+
id: string;
|
|
201
|
+
defaultMessage: string;
|
|
202
|
+
description: string;
|
|
203
|
+
};
|
|
204
|
+
'#403294': {
|
|
205
|
+
id: string;
|
|
206
|
+
defaultMessage: string;
|
|
207
|
+
description: string;
|
|
208
|
+
};
|
|
209
|
+
'#172B4D': {
|
|
210
|
+
id: string;
|
|
211
|
+
defaultMessage: string;
|
|
212
|
+
description: string;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
@@ -16,6 +16,13 @@ interface Props {
|
|
|
16
16
|
* @default false
|
|
17
17
|
*/
|
|
18
18
|
textPalette?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Used to detect if the useSomewhatSemanticTextColorNames feature flag
|
|
21
|
+
* is true. If so, text color tooltips in the color picker will
|
|
22
|
+
* show semantic names (excluding white/dark gray).
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
useSomewhatSemanticTextColorNames?: boolean;
|
|
19
26
|
}
|
|
20
27
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
|
|
21
28
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
|
|
@@ -42,6 +42,7 @@ export interface MenuItem {
|
|
|
42
42
|
className?: string;
|
|
43
43
|
'aria-label'?: React.AriaAttributes['aria-label'];
|
|
44
44
|
'aria-haspopup'?: React.AriaAttributes['aria-haspopup'];
|
|
45
|
+
'aria-keyshortcuts'?: React.AriaAttributes['aria-keyshortcuts'];
|
|
45
46
|
onClick?: (editorActions: EditorActions) => void;
|
|
46
47
|
}
|
|
47
48
|
export interface State {
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { ButtonProps } from '@atlaskit/button/types';
|
|
4
4
|
import { PositionType } from '@atlaskit/tooltip';
|
|
5
5
|
import { TOOLBAR_ACTION_SUBJECT_ID } from '../../analytics';
|
|
6
|
-
import { MenuItem } from '../DropdownMenu
|
|
6
|
+
import { MenuItem } from '../DropdownMenu';
|
|
7
7
|
export declare const TOOLBAR_BUTTON: typeof TOOLBAR_ACTION_SUBJECT_ID;
|
|
8
8
|
export declare type Props = {
|
|
9
9
|
buttonId?: TOOLBAR_ACTION_SUBJECT_ID;
|
|
@@ -26,6 +26,7 @@ export declare type Props = {
|
|
|
26
26
|
'aria-expanded'?: React.AriaAttributes['aria-expanded'];
|
|
27
27
|
'aria-haspopup'?: React.AriaAttributes['aria-haspopup'];
|
|
28
28
|
'aria-pressed'?: React.AriaAttributes['aria-pressed'];
|
|
29
|
+
'aria-keyshortcuts'?: React.AriaAttributes['aria-keyshortcuts'];
|
|
29
30
|
} & Pick<ButtonProps, 'aria-label' | 'children'>;
|
|
30
31
|
export declare type ToolbarButtonRef = HTMLElement;
|
|
31
32
|
declare const ToolbarButton: React.ForwardRefExoticComponent<{
|
|
@@ -49,5 +50,6 @@ declare const ToolbarButton: React.ForwardRefExoticComponent<{
|
|
|
49
50
|
'aria-expanded'?: React.AriaAttributes['aria-expanded'];
|
|
50
51
|
'aria-haspopup'?: React.AriaAttributes['aria-haspopup'];
|
|
51
52
|
'aria-pressed'?: React.AriaAttributes['aria-pressed'];
|
|
53
|
+
'aria-keyshortcuts'?: React.AriaAttributes['aria-keyshortcuts'];
|
|
52
54
|
} & Pick<ButtonProps, "children" | "aria-label"> & React.RefAttributes<HTMLElement>>;
|
|
53
55
|
export default ToolbarButton;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EDITOR_APPEARANCE_CONTEXT } from '@atlaskit/analytics-namespaced-context';
|
|
2
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../analytics';
|
|
2
3
|
export declare const getAnalyticsAppearance: (appearance?: string | undefined) => EDITOR_APPEARANCE_CONTEXT | undefined;
|
|
3
4
|
export declare const getAnalyticsEventSeverity: (duration: number, normalThreshold: number, degradedThreshold: number) => SEVERITY;
|
|
4
5
|
export declare enum SEVERITY {
|
|
@@ -8,27 +9,6 @@ export declare enum SEVERITY {
|
|
|
8
9
|
}
|
|
9
10
|
export { UNSUPPORTED_CONTENT_LEVEL_SEVERITY, getUnsupportedContentLevelData, UNSUPPORTED_CONTENT_LEVEL_SEVERITY_THRESHOLD_DEFAULTS, } from './unsupportedContent/get-unsupported-content-level-data';
|
|
10
11
|
export type { UnsupportedContentLevelsTracking } from './unsupportedContent/get-unsupported-content-level-data';
|
|
11
|
-
export declare enum EVENT_TYPE {
|
|
12
|
-
TRACK = "track",
|
|
13
|
-
UI = "ui"
|
|
14
|
-
}
|
|
15
|
-
export declare enum ACTION {
|
|
16
|
-
UNSUPPORTED_CONTENT_ENCOUNTERED = "unsupportedContentEncountered",
|
|
17
|
-
UNSUPPORTED_TOOLTIP_VIEWED = "viewed"
|
|
18
|
-
}
|
|
19
|
-
export declare enum ACTION_SUBJECT {
|
|
20
|
-
DOCUMENT = "document",
|
|
21
|
-
TOOLTIP = "tooltip"
|
|
22
|
-
}
|
|
23
|
-
export declare enum ACTION_SUBJECT_ID {
|
|
24
|
-
UNSUPPORTED_BLOCK = "unsupportedBlock",
|
|
25
|
-
UNSUPPORTED_INLINE = "unsupportedInline",
|
|
26
|
-
UNSUPPORTED_MARK = "unsupportedMark",
|
|
27
|
-
UNSUPPORTED_ERROR = "unsupportedUnhandled",
|
|
28
|
-
UNSUPPORTED_NODE_ATTRIBUTE = "unsupportedNodeAttribute",
|
|
29
|
-
ON_UNSUPPORTED_INLINE = "onUnsupportedInline",
|
|
30
|
-
ON_UNSUPPORTED_BLOCK = "onUnsupportedBlock"
|
|
31
|
-
}
|
|
32
12
|
declare type AEP<Action, ActionSubject, ActionSubjectID, Attributes, EventType> = {
|
|
33
13
|
action: Action;
|
|
34
14
|
actionSubject: ActionSubject;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AllBuilderPlugins, SafePresetCheck } from '../types';
|
|
2
|
+
export declare class Builder<T extends {
|
|
3
|
+
name: string;
|
|
4
|
+
}, StackPlugins extends AllBuilderPlugins[] = []> {
|
|
5
|
+
readonly data: [...StackPlugins];
|
|
6
|
+
constructor(...more: [...StackPlugins]);
|
|
7
|
+
add<NewPlugin extends AllBuilderPlugins>(nextOrTuple: SafePresetCheck<NewPlugin, StackPlugins>): Builder<T, [...[NewPlugin], ...StackPlugins]>;
|
|
8
|
+
}
|
|
@@ -1,8 +1,24 @@
|
|
|
1
|
+
import { Node as PMNode } from 'prosemirror-model';
|
|
1
2
|
import { CardAttributes } from '@atlaskit/adf-schema';
|
|
2
3
|
import { SortOrder } from '../types';
|
|
4
|
+
export declare enum ContentType {
|
|
5
|
+
NUMBER = 0,
|
|
6
|
+
TEXT = 5,
|
|
7
|
+
MENTION = 10,
|
|
8
|
+
DATE = 15,
|
|
9
|
+
STATUS = 20,
|
|
10
|
+
LINK = 25
|
|
11
|
+
}
|
|
3
12
|
interface CompareOptions {
|
|
4
13
|
getInlineCardTextFromStore(attrs: CardAttributes): string | null;
|
|
5
14
|
}
|
|
15
|
+
interface NodeMetaGenerator<Type, Value> {
|
|
16
|
+
type: Type;
|
|
17
|
+
value: Value;
|
|
18
|
+
}
|
|
19
|
+
declare type TextNodeMeta = NodeMetaGenerator<ContentType.TEXT, string>;
|
|
20
|
+
declare type NodeMeta = TextNodeMeta | NodeMetaGenerator<ContentType.NUMBER, number> | NodeMetaGenerator<ContentType.STATUS, string> | NodeMetaGenerator<ContentType.DATE, number> | NodeMetaGenerator<ContentType.MENTION, string> | NodeMetaGenerator<ContentType.LINK, string>;
|
|
21
|
+
export declare function extractMetaFromTextNode(textNode: PMNode): NodeMeta;
|
|
6
22
|
/**
|
|
7
23
|
* Compare 2 prosemirror nodes and check if it's greater, equal or less than the other node
|
|
8
24
|
* based on the sort order.
|
|
@@ -45,5 +45,7 @@ export type { ShallowPropsDifference, PropsDifference } from './compare-props';
|
|
|
45
45
|
export { useComponentRenderTracking } from './performance/hooks/use-component-render-tracking';
|
|
46
46
|
export type { UseComponentRenderTrackingArgs } from './performance/hooks/use-component-render-tracking';
|
|
47
47
|
export { isOutdatedBrowser } from './outdated-browsers';
|
|
48
|
-
export { isReferencedSource } from './referentiality';
|
|
48
|
+
export { isReferencedSource, removeConnectedNodes, getChildrenInfo, getNodeName, } from './referentiality';
|
|
49
49
|
export { sendLogs } from './sendLogs';
|
|
50
|
+
export { Builder } from './builder';
|
|
51
|
+
export { getItemCounterDigitsSize, getOrderFromOrderedListNode, resolveOrder, } from './list';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Node } from 'prosemirror-model';
|
|
2
|
+
export declare const DEFAULT_ORDER = 1;
|
|
3
|
+
export declare const resolveOrder: (order: number | undefined | string) => number | undefined;
|
|
4
|
+
export declare const getOrderFromOrderedListNode: (orderedListNode: Node) => number;
|
|
5
|
+
interface GetItemCounterDigitsSize {
|
|
6
|
+
itemsCount?: number;
|
|
7
|
+
order?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const getItemCounterDigitsSize: (options: GetItemCounterDigitsSize) => number | undefined;
|
|
10
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import { EditorState, PluginKey, ReadonlyTransaction, SafeStateField, Transactio
|
|
|
2
2
|
import { Dispatch } from '../event-dispatcher';
|
|
3
3
|
import { Command } from '../types';
|
|
4
4
|
export declare type Reducer<PluginState, Action> = (state: PluginState, action: Action) => PluginState;
|
|
5
|
-
declare type MapState<PluginState> = (tr: ReadonlyTransaction, pluginState: PluginState) => PluginState;
|
|
5
|
+
declare type MapState<PluginState> = (tr: ReadonlyTransaction, pluginState: PluginState, editorState: EditorState) => PluginState;
|
|
6
6
|
declare type SafePlugin<PluginState, Action, InitialState extends PluginState> = {
|
|
7
7
|
createPluginState: (dispatch: Dispatch, initialState: InitialState | ((state: EditorState) => InitialState)) => SafeStateField<PluginState>;
|
|
8
8
|
createCommand: <A = Action>(action: A | ((state: Readonly<EditorState>) => A | false), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { Node as PMNode } from 'prosemirror-model';
|
|
2
2
|
import { EditorState } from 'prosemirror-state';
|
|
3
|
+
import { ConfirmDialogChildInfo } from '../types';
|
|
3
4
|
export declare const isReferencedSource: (state: EditorState, node?: PMNode<any> | undefined) => boolean;
|
|
5
|
+
export declare const removeConnectedNodes: (state: EditorState, node?: PMNode<any> | undefined) => import("prosemirror-state").Transaction<any>;
|
|
6
|
+
export declare const getChildrenInfo: (state: EditorState, node?: PMNode<any> | undefined) => ConfirmDialogChildInfo[];
|
|
7
|
+
export declare const getNodeName: (state: EditorState, node?: PMNode<any> | undefined) => string;
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import { Node as PMNode, Schema } from 'prosemirror-model';
|
|
2
|
-
import { ACTION_SUBJECT_ID
|
|
2
|
+
import { ACTION_SUBJECT_ID } from '../analytics';
|
|
3
|
+
import { UnsupportedContentPayload, UnsupportedContentTooltipPayload } from './analytics';
|
|
3
4
|
declare type DispatchAnalyticsEvent = (payload: UnsupportedContentPayload) => void;
|
|
4
5
|
declare type DispatchAnalyticsEventTooltip = (payload: UnsupportedContentTooltipPayload) => void;
|
|
5
6
|
export declare const findAndTrackUnsupportedContentNodes: (node: PMNode, schema: Schema, dispatchAnalyticsEvent: DispatchAnalyticsEvent, ancestorHierarchy?: string) => void;
|
|
6
|
-
|
|
7
|
+
interface UnsupportedNode {
|
|
8
|
+
type: string;
|
|
9
|
+
ancestry: string;
|
|
10
|
+
parentType: string;
|
|
11
|
+
marks: {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}[];
|
|
14
|
+
attrs: {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export declare const fireUnsupportedEvent: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, actionSubjectId: ACTION_SUBJECT_ID, unsupportedNode: UnsupportedNode, errorCode?: string | undefined) => void;
|
|
7
19
|
export declare const trackUnsupportedContentTooltipDisplayedFor: (dispatchAnalyticsEvent: DispatchAnalyticsEventTooltip, unsupportedContentType: UnsupportedContentTooltipPayload['actionSubjectId'], originalNodeType?: string | undefined) => void;
|
|
8
20
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "72.0.0",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@atlaskit/activity-provider": "^2.3.0",
|
|
60
|
-
"@atlaskit/adf-schema": "^
|
|
61
|
-
"@atlaskit/adf-utils": "^
|
|
60
|
+
"@atlaskit/adf-schema": "^25.0.0",
|
|
61
|
+
"@atlaskit/adf-utils": "^18.0.0",
|
|
62
62
|
"@atlaskit/analytics-listeners": "^8.3.0",
|
|
63
63
|
"@atlaskit/analytics-namespaced-context": "^6.5.0",
|
|
64
64
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
@@ -68,21 +68,21 @@
|
|
|
68
68
|
"@atlaskit/codemod-utils": "^4.1.0",
|
|
69
69
|
"@atlaskit/editor-json-transformer": "^8.8.0",
|
|
70
70
|
"@atlaskit/editor-palette": "0.1.0",
|
|
71
|
-
"@atlaskit/editor-shared-styles": "^2.
|
|
72
|
-
"@atlaskit/emoji": "^
|
|
71
|
+
"@atlaskit/editor-shared-styles": "^2.3.0",
|
|
72
|
+
"@atlaskit/emoji": "^67.0.0",
|
|
73
73
|
"@atlaskit/icon": "^21.11.0",
|
|
74
74
|
"@atlaskit/in-product-testing": "^0.1.0",
|
|
75
|
-
"@atlaskit/media-card": "^74.
|
|
76
|
-
"@atlaskit/media-client": "^19.
|
|
77
|
-
"@atlaskit/media-picker": "^64.
|
|
75
|
+
"@atlaskit/media-card": "^74.4.0",
|
|
76
|
+
"@atlaskit/media-client": "^19.1.0",
|
|
77
|
+
"@atlaskit/media-picker": "^64.1.0",
|
|
78
78
|
"@atlaskit/mention": "^21.0.0",
|
|
79
79
|
"@atlaskit/menu": "^1.4.0",
|
|
80
80
|
"@atlaskit/profilecard": "^18.0.0",
|
|
81
|
-
"@atlaskit/smart-card": "^23.
|
|
81
|
+
"@atlaskit/smart-card": "^23.10.0",
|
|
82
82
|
"@atlaskit/smart-user-picker": "^6.0.0",
|
|
83
83
|
"@atlaskit/task-decision": "^17.5.0",
|
|
84
84
|
"@atlaskit/theme": "^12.2.0",
|
|
85
|
-
"@atlaskit/tokens": "^0.
|
|
85
|
+
"@atlaskit/tokens": "^0.13.0",
|
|
86
86
|
"@atlaskit/tooltip": "^17.6.0",
|
|
87
87
|
"@atlaskit/ufo": "^0.1.0",
|
|
88
88
|
"@atlaskit/width-detector": "^4.0.0",
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
"chromatism": "^2.6.0",
|
|
96
96
|
"classnames": "^2.2.5",
|
|
97
97
|
"date-fns": "^2.17.0",
|
|
98
|
+
"focus-trap": "^2.4.5",
|
|
98
99
|
"lodash": "^4.17.21",
|
|
99
100
|
"popper.js": "^1.14.1",
|
|
100
101
|
"prop-types": "^15.5.10",
|
|
@@ -107,14 +108,16 @@
|
|
|
107
108
|
"react-loadable": "^5.1.0"
|
|
108
109
|
},
|
|
109
110
|
"peerDependencies": {
|
|
110
|
-
"@atlaskit/media-core": "^34.0.
|
|
111
|
+
"@atlaskit/media-core": "^34.0.1",
|
|
111
112
|
"react": "^16.8.0",
|
|
112
113
|
"react-dom": "^16.8.0",
|
|
113
114
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
114
115
|
},
|
|
115
116
|
"devDependencies": {
|
|
117
|
+
"@atlaskit/editor-core": "^177.0.0",
|
|
116
118
|
"@atlaskit/editor-json-transformer": "^8.8.0",
|
|
117
|
-
"@atlaskit/editor-
|
|
119
|
+
"@atlaskit/editor-plugin-table": "^1.0.0",
|
|
120
|
+
"@atlaskit/editor-test-helpers": "^18.0.0",
|
|
118
121
|
"@atlaskit/media-core": "^34.0.0",
|
|
119
122
|
"@atlaskit/util-data-test": "^17.6.0",
|
|
120
123
|
"@atlaskit/visual-regression": "*",
|
package/report.api.md
CHANGED