@atlaskit/editor-core 179.0.3 → 179.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.
- package/CHANGELOG.md +28 -0
- package/dist/cjs/create-editor/ReactEditorView.js +1 -1
- package/dist/cjs/create-editor/create-plugins-list.js +6 -287
- package/dist/cjs/{plugins/feature-flags-context → create-editor}/feature-flags-from-props.js +0 -0
- package/dist/cjs/editor.js +41 -8
- package/dist/cjs/labs/next/presets/universal.js +313 -0
- package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +24 -5
- package/dist/cjs/plugins/floating-toolbar/index.js +6 -0
- package/dist/cjs/plugins/floating-toolbar/pm-plugins/force-focus/index.js +72 -0
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +12 -9
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +3 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +3 -2
- package/dist/cjs/plugins/list/actions/outdent-list-items-selected.js +40 -1
- package/dist/cjs/plugins/list/commands/outdent-list.js +22 -9
- package/dist/cjs/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +30 -12
- package/dist/cjs/plugins/list/utils/analytics.js +18 -2
- package/dist/cjs/plugins/media/commands/linking.js +2 -2
- package/dist/cjs/plugins/media/pm-plugins/alt-text/index.js +1 -12
- package/dist/cjs/plugins/media/toolbar/alt-text.js +14 -3
- package/dist/cjs/plugins/media/toolbar/linking-toolbar-appearance.js +6 -6
- package/dist/cjs/plugins/media/toolbar/linking.js +7 -1
- package/dist/cjs/plugins/paste/handlers.js +7 -5
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/Toolbar.js +17 -0
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +13 -13
- package/dist/cjs/test-utils.js +13 -1
- package/dist/cjs/utils/document.js +3 -2
- package/dist/cjs/utils/input-rules.js +3 -2
- package/dist/cjs/utils/lists.js +31 -0
- package/dist/cjs/utils/prepare-quick-insert-provider.js +22 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +1 -1
- package/dist/es2019/create-editor/create-plugins-list.js +5 -293
- package/dist/es2019/{plugins/feature-flags-context → create-editor}/feature-flags-from-props.js +0 -0
- package/dist/es2019/editor.js +41 -7
- package/dist/es2019/labs/next/presets/universal.js +311 -0
- package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +19 -2
- package/dist/es2019/plugins/floating-toolbar/index.js +4 -0
- package/dist/es2019/plugins/floating-toolbar/pm-plugins/force-focus/index.js +59 -0
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +6 -3
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +3 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +3 -2
- package/dist/es2019/plugins/list/actions/outdent-list-items-selected.js +41 -1
- package/dist/es2019/plugins/list/commands/outdent-list.js +16 -1
- package/dist/es2019/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +29 -11
- package/dist/es2019/plugins/list/utils/analytics.js +12 -0
- package/dist/es2019/plugins/media/commands/linking.js +2 -2
- package/dist/es2019/plugins/media/pm-plugins/alt-text/index.js +1 -12
- package/dist/es2019/plugins/media/toolbar/alt-text.js +14 -3
- package/dist/es2019/plugins/media/toolbar/linking-toolbar-appearance.js +6 -6
- package/dist/es2019/plugins/media/toolbar/linking.js +9 -1
- package/dist/es2019/plugins/paste/handlers.js +8 -6
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/Toolbar.js +17 -0
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +13 -13
- package/dist/es2019/test-utils.js +11 -1
- package/dist/es2019/utils/document.js +3 -2
- package/dist/es2019/utils/input-rules.js +3 -2
- package/dist/es2019/utils/lists.js +26 -0
- package/dist/es2019/utils/prepare-quick-insert-provider.js +17 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +1 -1
- package/dist/esm/create-editor/create-plugins-list.js +6 -287
- package/dist/esm/{plugins/feature-flags-context → create-editor}/feature-flags-from-props.js +0 -0
- package/dist/esm/editor.js +41 -8
- package/dist/esm/labs/next/presets/universal.js +306 -0
- package/dist/esm/plugins/card/ui/EditLinkToolbar.js +24 -5
- package/dist/esm/plugins/floating-toolbar/index.js +6 -0
- package/dist/esm/plugins/floating-toolbar/pm-plugins/force-focus/index.js +62 -0
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +12 -9
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +3 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +3 -2
- package/dist/esm/plugins/list/actions/outdent-list-items-selected.js +40 -1
- package/dist/esm/plugins/list/commands/outdent-list.js +15 -2
- package/dist/esm/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +30 -12
- package/dist/esm/plugins/list/utils/analytics.js +12 -0
- package/dist/esm/plugins/media/commands/linking.js +2 -2
- package/dist/esm/plugins/media/pm-plugins/alt-text/index.js +1 -12
- package/dist/esm/plugins/media/toolbar/alt-text.js +14 -3
- package/dist/esm/plugins/media/toolbar/linking-toolbar-appearance.js +6 -6
- package/dist/esm/plugins/media/toolbar/linking.js +7 -1
- package/dist/esm/plugins/paste/handlers.js +8 -6
- package/dist/esm/plugins/toolbar-lists-indentation/ui/Toolbar.js +17 -0
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +13 -13
- package/dist/esm/test-utils.js +11 -1
- package/dist/esm/utils/document.js +3 -2
- package/dist/esm/utils/input-rules.js +3 -2
- package/dist/esm/utils/lists.js +24 -0
- package/dist/esm/utils/prepare-quick-insert-provider.js +17 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/create-editor/create-plugins-list.d.ts +5 -4
- package/dist/types/{plugins/feature-flags-context → create-editor}/feature-flags-from-props.d.ts +2 -2
- package/dist/types/editor.d.ts +42 -0
- package/dist/types/labs/next/presets/universal.d.ts +30 -0
- package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +4 -0
- package/dist/types/plugins/expand/index.d.ts +4 -1
- package/dist/types/plugins/floating-toolbar/pm-plugins/force-focus/index.d.ts +18 -0
- package/dist/types/plugins/list/utils/analytics.d.ts +5 -2
- package/dist/types/plugins/media/commands/linking.d.ts +1 -1
- package/dist/types/test-utils.d.ts +7 -0
- package/dist/types/types/editor-props.d.ts +96 -92
- package/dist/types/utils/input-rules.d.ts +2 -1
- package/dist/types/utils/lists.d.ts +2 -0
- package/dist/types/utils/prepare-quick-insert-provider.d.ts +16 -0
- package/package.json +8 -8
- package/report.api.md +89 -79
package/report.api.md
CHANGED
|
@@ -893,22 +893,7 @@ type EditorOnChangeHandler = (
|
|
|
893
893
|
export { EditorPlugin };
|
|
894
894
|
|
|
895
895
|
// @public (undocumented)
|
|
896
|
-
interface
|
|
897
|
-
// (undocumented)
|
|
898
|
-
excludes?: Set<string>;
|
|
899
|
-
// (undocumented)
|
|
900
|
-
experimental?: Array<string>;
|
|
901
|
-
// (undocumented)
|
|
902
|
-
featureFlags?: EditorFeatureFlags;
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
// @public (undocumented)
|
|
906
|
-
type EditorProduct = 'bitbucket' | 'confluence' | 'jira' | 'stride' | undefined;
|
|
907
|
-
|
|
908
|
-
// @public (undocumented)
|
|
909
|
-
export interface EditorProps {
|
|
910
|
-
// (undocumented)
|
|
911
|
-
activityProvider?: Promise<ActivityProvider>;
|
|
896
|
+
interface EditorPluginFeatureProps {
|
|
912
897
|
// (undocumented)
|
|
913
898
|
allowAnalyticsGASV3?: boolean;
|
|
914
899
|
// (undocumented)
|
|
@@ -964,26 +949,76 @@ export interface EditorProps {
|
|
|
964
949
|
allowTextColor?: TextColorPluginConfig | boolean;
|
|
965
950
|
// (undocumented)
|
|
966
951
|
allowUndoRedoButtons?: boolean;
|
|
952
|
+
autoScrollIntoView?: boolean;
|
|
967
953
|
// (undocumented)
|
|
968
|
-
|
|
954
|
+
collabEdit?: CollabEditOptions;
|
|
969
955
|
// (undocumented)
|
|
970
|
-
|
|
956
|
+
elementBrowser?: {
|
|
957
|
+
showModal?: boolean;
|
|
958
|
+
replacePlusMenu?: boolean;
|
|
959
|
+
helpUrl?: string;
|
|
960
|
+
emptyStateHandler?: EmptyStateHandler;
|
|
961
|
+
};
|
|
971
962
|
// (undocumented)
|
|
972
|
-
|
|
973
|
-
autoScrollIntoView?: boolean;
|
|
963
|
+
extensionHandlers?: ExtensionHandlers;
|
|
974
964
|
// (undocumented)
|
|
975
|
-
|
|
965
|
+
feedbackInfo?: FeedbackInfo;
|
|
976
966
|
// (undocumented)
|
|
977
|
-
|
|
967
|
+
insertMenuItems?: MenuItem[];
|
|
968
|
+
linking?: LinkingOptions;
|
|
978
969
|
// (undocumented)
|
|
979
|
-
|
|
970
|
+
maxContentSize?: number;
|
|
971
|
+
// (undocumented)
|
|
972
|
+
media?: MediaOptions;
|
|
973
|
+
// (undocumented)
|
|
974
|
+
mention?: MentionPluginConfig;
|
|
975
|
+
// @deprecated
|
|
976
|
+
mentionInsertDisplayName?: boolean;
|
|
977
|
+
// (undocumented)
|
|
978
|
+
onSave?: (editorView: EditorView) => void;
|
|
979
|
+
performanceTracking?: PerformanceTracking;
|
|
980
|
+
// (undocumented)
|
|
981
|
+
primaryToolbarComponents?: PrimaryToolbarComponents;
|
|
982
|
+
// (undocumented)
|
|
983
|
+
sanitizePrivateContent?: boolean;
|
|
984
|
+
// (undocumented)
|
|
985
|
+
saveOnEnter?: boolean;
|
|
986
|
+
// @deprecated (undocumented)
|
|
987
|
+
smartLinks?: CardOptions;
|
|
988
|
+
// @deprecated (undocumented)
|
|
989
|
+
UNSAFE_cards?: CardOptions;
|
|
990
|
+
// (undocumented)
|
|
991
|
+
uploadErrorHandler?: (state: MediaState) => void;
|
|
992
|
+
// (undocumented)
|
|
993
|
+
waitForMediaUpload?: boolean;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
// @public (undocumented)
|
|
997
|
+
interface EditorPresetProps {
|
|
998
|
+
// (undocumented)
|
|
999
|
+
excludes?: Set<string>;
|
|
1000
|
+
// (undocumented)
|
|
1001
|
+
experimental?: Array<string>;
|
|
1002
|
+
// (undocumented)
|
|
1003
|
+
featureFlags?: EditorFeatureFlags;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
// @public (undocumented)
|
|
1007
|
+
type EditorProduct = 'bitbucket' | 'confluence' | 'jira' | 'stride' | undefined;
|
|
1008
|
+
|
|
1009
|
+
// @public (undocumented)
|
|
1010
|
+
export interface EditorProps
|
|
1011
|
+
extends EditorPluginFeatureProps,
|
|
1012
|
+
EditorProviderProps {
|
|
1013
|
+
// (undocumented)
|
|
1014
|
+
appearance?: EditorAppearance;
|
|
1015
|
+
// (undocumented)
|
|
1016
|
+
codeBlock?: CodeBlockOptions;
|
|
980
1017
|
// (undocumented)
|
|
981
1018
|
contentComponents?: ReactComponents;
|
|
982
1019
|
// (undocumented)
|
|
983
1020
|
contentTransformerProvider?: (schema: Schema) => Transformer_2<string>;
|
|
984
1021
|
// (undocumented)
|
|
985
|
-
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
986
|
-
// (undocumented)
|
|
987
1022
|
contextPanel?: ReactComponents;
|
|
988
1023
|
// @deprecated (undocumented)
|
|
989
1024
|
dangerouslyAppendPlugins?: {
|
|
@@ -996,47 +1031,17 @@ export interface EditorProps {
|
|
|
996
1031
|
// (undocumented)
|
|
997
1032
|
editorActions?: EditorActions;
|
|
998
1033
|
// (undocumented)
|
|
999
|
-
elementBrowser?: {
|
|
1000
|
-
showModal?: boolean;
|
|
1001
|
-
replacePlusMenu?: boolean;
|
|
1002
|
-
helpUrl?: string;
|
|
1003
|
-
emptyStateHandler?: EmptyStateHandler;
|
|
1004
|
-
};
|
|
1005
|
-
// (undocumented)
|
|
1006
|
-
emojiProvider?: Providers['emojiProvider'];
|
|
1007
|
-
// (undocumented)
|
|
1008
1034
|
errorReporterHandler?: ErrorReportingHandler;
|
|
1009
1035
|
// (undocumented)
|
|
1010
|
-
extensionHandlers?: ExtensionHandlers;
|
|
1011
|
-
// (undocumented)
|
|
1012
1036
|
extensionProviders?: ExtensionProvidersProp;
|
|
1013
1037
|
featureFlags?: {
|
|
1014
1038
|
[featureFlag: string]: boolean | string;
|
|
1015
1039
|
};
|
|
1016
|
-
// (undocumented)
|
|
1017
|
-
feedbackInfo?: FeedbackInfo;
|
|
1018
1040
|
// @deprecated
|
|
1019
1041
|
inputSamplingLimit?: number;
|
|
1020
1042
|
// (undocumented)
|
|
1021
|
-
insertMenuItems?: MenuItem[];
|
|
1022
|
-
// (undocumented)
|
|
1023
|
-
legacyImageUploadProvider?: Providers['imageUploadProvider'];
|
|
1024
|
-
linking?: LinkingOptions;
|
|
1025
|
-
// (undocumented)
|
|
1026
|
-
macroProvider?: Providers['macroProvider'];
|
|
1027
|
-
// (undocumented)
|
|
1028
|
-
maxContentSize?: number;
|
|
1029
|
-
// (undocumented)
|
|
1030
1043
|
maxHeight?: number;
|
|
1031
1044
|
// (undocumented)
|
|
1032
|
-
media?: MediaOptions;
|
|
1033
|
-
// (undocumented)
|
|
1034
|
-
mention?: MentionPluginConfig;
|
|
1035
|
-
// @deprecated
|
|
1036
|
-
mentionInsertDisplayName?: boolean;
|
|
1037
|
-
// (undocumented)
|
|
1038
|
-
mentionProvider?: Promise<MentionProvider>;
|
|
1039
|
-
// (undocumented)
|
|
1040
1045
|
minHeight?: number;
|
|
1041
1046
|
// (undocumented)
|
|
1042
1047
|
onCancel?: (editorView: EditorView) => void;
|
|
@@ -1047,9 +1052,6 @@ export interface EditorProps {
|
|
|
1047
1052
|
// (undocumented)
|
|
1048
1053
|
onEditorReady?: (editorActions: EditorActions) => void;
|
|
1049
1054
|
// (undocumented)
|
|
1050
|
-
onSave?: (editorView: EditorView) => void;
|
|
1051
|
-
performanceTracking?: PerformanceTracking;
|
|
1052
|
-
// (undocumented)
|
|
1053
1055
|
persistScrollGutter?: boolean;
|
|
1054
1056
|
// (undocumented)
|
|
1055
1057
|
placeholder?: string;
|
|
@@ -1062,27 +1064,13 @@ export interface EditorProps {
|
|
|
1062
1064
|
// (undocumented)
|
|
1063
1065
|
popupsScrollableElement?: HTMLElement;
|
|
1064
1066
|
// (undocumented)
|
|
1065
|
-
presenceProvider?: Promise<any>;
|
|
1066
|
-
// (undocumented)
|
|
1067
|
-
primaryToolbarComponents?: PrimaryToolbarComponents;
|
|
1068
|
-
// (undocumented)
|
|
1069
1067
|
primaryToolbarIconBefore?: ReactElement;
|
|
1070
1068
|
// (undocumented)
|
|
1071
1069
|
quickInsert?: QuickInsertOptions;
|
|
1072
1070
|
// (undocumented)
|
|
1073
|
-
sanitizePrivateContent?: boolean;
|
|
1074
|
-
// (undocumented)
|
|
1075
|
-
saveOnEnter?: boolean;
|
|
1076
|
-
// (undocumented)
|
|
1077
|
-
searchProvider?: Promise<SearchProvider>;
|
|
1078
|
-
// (undocumented)
|
|
1079
1071
|
secondaryToolbarComponents?: ReactComponents;
|
|
1080
1072
|
// (undocumented)
|
|
1081
1073
|
shouldFocus?: boolean;
|
|
1082
|
-
// @deprecated (undocumented)
|
|
1083
|
-
smartLinks?: CardOptions;
|
|
1084
|
-
// (undocumented)
|
|
1085
|
-
taskDecisionProvider?: Promise<TaskDecisionProvider>;
|
|
1086
1074
|
// (undocumented)
|
|
1087
1075
|
textFormatting?: TextFormattingOptions;
|
|
1088
1076
|
trackValidTransactions?:
|
|
@@ -1090,15 +1078,9 @@ export interface EditorProps {
|
|
|
1090
1078
|
| {
|
|
1091
1079
|
samplingRate: number;
|
|
1092
1080
|
};
|
|
1093
|
-
// @deprecated (undocumented)
|
|
1094
|
-
UNSAFE_cards?: CardOptions;
|
|
1095
1081
|
// (undocumented)
|
|
1096
1082
|
UNSAFE_useAnalyticsContext?: boolean;
|
|
1097
|
-
// (undocumented)
|
|
1098
|
-
uploadErrorHandler?: (state: MediaState) => void;
|
|
1099
1083
|
useStickyToolbar?: RefObject<HTMLElement> | boolean;
|
|
1100
|
-
// (undocumented)
|
|
1101
|
-
waitForMediaUpload?: boolean;
|
|
1102
1084
|
}
|
|
1103
1085
|
|
|
1104
1086
|
// @public (undocumented)
|
|
@@ -1125,6 +1107,34 @@ type EditorProps_2 = {
|
|
|
1125
1107
|
onDestroy?: () => void;
|
|
1126
1108
|
};
|
|
1127
1109
|
|
|
1110
|
+
// @public (undocumented)
|
|
1111
|
+
interface EditorProviderProps {
|
|
1112
|
+
// (undocumented)
|
|
1113
|
+
activityProvider?: Promise<ActivityProvider>;
|
|
1114
|
+
// (undocumented)
|
|
1115
|
+
annotationProviders?: AnnotationProviders;
|
|
1116
|
+
// (undocumented)
|
|
1117
|
+
autoformattingProvider?: Providers['autoformattingProvider'];
|
|
1118
|
+
// (undocumented)
|
|
1119
|
+
collabEditProvider?: Providers['collabEditProvider'];
|
|
1120
|
+
// (undocumented)
|
|
1121
|
+
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
1122
|
+
// (undocumented)
|
|
1123
|
+
emojiProvider?: Providers['emojiProvider'];
|
|
1124
|
+
// (undocumented)
|
|
1125
|
+
legacyImageUploadProvider?: Providers['imageUploadProvider'];
|
|
1126
|
+
// (undocumented)
|
|
1127
|
+
macroProvider?: Providers['macroProvider'];
|
|
1128
|
+
// (undocumented)
|
|
1129
|
+
mentionProvider?: Promise<MentionProvider>;
|
|
1130
|
+
// (undocumented)
|
|
1131
|
+
presenceProvider?: Promise<any>;
|
|
1132
|
+
// (undocumented)
|
|
1133
|
+
searchProvider?: Promise<SearchProvider>;
|
|
1134
|
+
// (undocumented)
|
|
1135
|
+
taskDecisionProvider?: Promise<TaskDecisionProvider>;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1128
1138
|
// @public (undocumented)
|
|
1129
1139
|
interface EditorViewProps {
|
|
1130
1140
|
// (undocumented)
|
|
@@ -1288,7 +1298,7 @@ interface GapSelectionData {
|
|
|
1288
1298
|
export function getDefaultPresetOptionsFromEditorProps(
|
|
1289
1299
|
props: EditorProps,
|
|
1290
1300
|
createAnalyticsEvent?: CreateUIAnalyticsEvent,
|
|
1291
|
-
): EditorPresetProps & DefaultPresetPluginOptions;
|
|
1301
|
+
): EditorPresetProps & DefaultPresetPluginOptions & EditorPluginFeatureProps;
|
|
1292
1302
|
|
|
1293
1303
|
// @public (undocumented)
|
|
1294
1304
|
export const getListCommands: () => {
|