@atlaskit/editor-core 184.0.0 → 185.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/.eslintrc.js +7 -3
- package/CHANGELOG.md +44 -0
- package/dist/cjs/create-editor/feature-flags-from-props.js +1 -2
- package/dist/cjs/editor-next/index.js +41 -34
- package/dist/cjs/editor.js +30 -269
- package/dist/cjs/i18n/en_ZZ.js +32 -6
- package/dist/cjs/index.js +0 -7
- package/dist/cjs/labs/next/presets/default.js +2 -1
- package/dist/cjs/plugins/base/index.js +0 -12
- package/dist/cjs/plugins/card/nodeviews/blockCard.js +7 -0
- package/dist/cjs/plugins/card/nodeviews/embedCard.js +7 -0
- package/dist/cjs/plugins/card/nodeviews/inlineCard.js +5 -1
- package/dist/cjs/plugins/card/pm-plugins/doc.js +1 -2
- package/dist/cjs/plugins/card/toolbar.js +11 -9
- package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +4 -4
- package/dist/cjs/plugins/code-block/index.js +7 -5
- package/dist/cjs/plugins/code-block/toolbar.js +5 -5
- package/dist/cjs/plugins/copy-button/commands.js +2 -3
- package/dist/cjs/plugins/copy-button/toolbar.js +7 -8
- package/dist/cjs/plugins/expand/index.js +1 -1
- package/dist/cjs/plugins/expand/toolbar.js +40 -39
- package/dist/cjs/plugins/extension/index.js +1 -1
- package/dist/cjs/plugins/extension/toolbar.js +5 -5
- package/dist/cjs/plugins/floating-toolbar/index.js +3 -2
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +2 -4
- package/dist/cjs/plugins/layout/index.js +8 -4
- package/dist/cjs/plugins/layout/toolbar.js +5 -6
- package/dist/cjs/plugins/media/toolbar/index.js +31 -24
- package/dist/cjs/plugins/panel/index.js +2 -1
- package/dist/cjs/plugins/panel/toolbar.js +7 -7
- package/dist/cjs/plugins/placeholder-text/index.js +7 -5
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +19 -0
- package/dist/cjs/ui/CollapsedEditor/index.js +1 -2
- package/dist/cjs/ui/ColorPickerButton/index.js +2 -2
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +6 -10
- package/dist/cjs/ui/ElementBrowser/components/StatelessElementBrowser.js +5 -3
- package/dist/cjs/ui/styles.js +6 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/feature-flags-from-props.js +1 -2
- package/dist/es2019/editor-next/index.js +39 -30
- package/dist/es2019/editor.js +29 -232
- package/dist/es2019/i18n/en_ZZ.js +32 -6
- package/dist/es2019/index.js +1 -2
- package/dist/es2019/labs/next/presets/default.js +2 -1
- package/dist/es2019/plugins/base/index.js +0 -7
- package/dist/es2019/plugins/card/nodeviews/blockCard.js +8 -0
- package/dist/es2019/plugins/card/nodeviews/embedCard.js +8 -0
- package/dist/es2019/plugins/card/nodeviews/inlineCard.js +5 -1
- package/dist/es2019/plugins/card/pm-plugins/doc.js +1 -2
- package/dist/es2019/plugins/card/toolbar.js +8 -6
- package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +2 -2
- package/dist/es2019/plugins/code-block/index.js +7 -5
- package/dist/es2019/plugins/code-block/toolbar.js +5 -6
- package/dist/es2019/plugins/copy-button/commands.js +2 -3
- package/dist/es2019/plugins/copy-button/toolbar.js +7 -8
- package/dist/es2019/plugins/expand/index.js +1 -1
- package/dist/es2019/plugins/expand/toolbar.js +5 -6
- package/dist/es2019/plugins/extension/index.js +1 -1
- package/dist/es2019/plugins/extension/toolbar.js +5 -6
- package/dist/es2019/plugins/floating-toolbar/index.js +3 -2
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +2 -4
- package/dist/es2019/plugins/layout/index.js +8 -5
- package/dist/es2019/plugins/layout/toolbar.js +5 -6
- package/dist/es2019/plugins/media/toolbar/index.js +35 -24
- package/dist/es2019/plugins/panel/index.js +2 -2
- package/dist/es2019/plugins/panel/toolbar.js +7 -8
- package/dist/es2019/plugins/placeholder-text/index.js +7 -5
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +21 -0
- package/dist/es2019/ui/CollapsedEditor/index.js +1 -2
- package/dist/es2019/ui/ColorPickerButton/index.js +2 -2
- package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +5 -10
- package/dist/es2019/ui/ElementBrowser/components/StatelessElementBrowser.js +5 -3
- package/dist/es2019/ui/styles.js +6 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/feature-flags-from-props.js +1 -2
- package/dist/esm/editor-next/index.js +42 -33
- package/dist/esm/editor.js +29 -270
- package/dist/esm/i18n/en_ZZ.js +32 -6
- package/dist/esm/index.js +1 -2
- package/dist/esm/labs/next/presets/default.js +2 -1
- package/dist/esm/plugins/base/index.js +0 -9
- package/dist/esm/plugins/card/nodeviews/blockCard.js +7 -0
- package/dist/esm/plugins/card/nodeviews/embedCard.js +7 -0
- package/dist/esm/plugins/card/nodeviews/inlineCard.js +5 -1
- package/dist/esm/plugins/card/pm-plugins/doc.js +1 -2
- package/dist/esm/plugins/card/toolbar.js +7 -6
- package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +2 -2
- package/dist/esm/plugins/code-block/index.js +7 -5
- package/dist/esm/plugins/code-block/toolbar.js +5 -5
- package/dist/esm/plugins/copy-button/commands.js +2 -3
- package/dist/esm/plugins/copy-button/toolbar.js +7 -8
- package/dist/esm/plugins/expand/index.js +1 -1
- package/dist/esm/plugins/expand/toolbar.js +40 -39
- package/dist/esm/plugins/extension/index.js +1 -1
- package/dist/esm/plugins/extension/toolbar.js +5 -5
- package/dist/esm/plugins/floating-toolbar/index.js +3 -2
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +2 -4
- package/dist/esm/plugins/layout/index.js +8 -4
- package/dist/esm/plugins/layout/toolbar.js +5 -6
- package/dist/esm/plugins/media/toolbar/index.js +31 -24
- package/dist/esm/plugins/panel/index.js +2 -1
- package/dist/esm/plugins/panel/toolbar.js +7 -7
- package/dist/esm/plugins/placeholder-text/index.js +7 -5
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +19 -0
- package/dist/esm/ui/CollapsedEditor/index.js +1 -2
- package/dist/esm/ui/ColorPickerButton/index.js +2 -2
- package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +5 -10
- package/dist/esm/ui/ElementBrowser/components/StatelessElementBrowser.js +5 -3
- package/dist/esm/ui/styles.js +6 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/editor-next/index.d.ts +0 -6
- package/dist/types/editor.d.ts +1 -137
- package/dist/types/i18n/en_ZZ.d.ts +28 -2
- package/dist/types/index.d.ts +0 -1
- package/dist/types/labs/next/presets/cxhtml.d.ts +106 -0
- package/dist/types/labs/next/presets/default.d.ts +212 -0
- package/dist/types/labs/next/presets/mobile.d.ts +106 -0
- package/dist/types/plugins/base/index.d.ts +0 -4
- package/dist/types/plugins/card/index.d.ts +2 -2
- package/dist/types/plugins/card/nodeviews/blockCard.d.ts +3 -0
- package/dist/types/plugins/card/nodeviews/embedCard.d.ts +3 -0
- package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +1 -0
- package/dist/types/plugins/card/pm-plugins/doc.d.ts +1 -1
- package/dist/types/plugins/card/pm-plugins/keymap.d.ts +1 -1
- package/dist/types/plugins/card/pm-plugins/main.d.ts +1 -2
- package/dist/types/plugins/card/toolbar.d.ts +1 -2
- package/dist/types/plugins/card/types.d.ts +1 -1
- package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +1 -2
- package/dist/types/plugins/card/ui/link-toolbar-button-group-options.d.ts +1 -1
- package/dist/types/plugins/card/ui/types.d.ts +1 -1
- package/dist/types/plugins/code-block/index.d.ts +7 -1
- package/dist/types/plugins/code-block/toolbar.d.ts +2 -1
- package/dist/types/plugins/copy-button/commands.d.ts +2 -1
- package/dist/types/plugins/copy-button/toolbar.d.ts +3 -2
- package/dist/types/plugins/expand/index.d.ts +2 -1
- package/dist/types/plugins/expand/toolbar.d.ts +2 -1
- package/dist/types/plugins/extension/index.d.ts +7 -2
- package/dist/types/plugins/extension/toolbar.d.ts +2 -1
- package/dist/types/plugins/floating-toolbar/index.d.ts +2 -1
- package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +3 -1
- package/dist/types/plugins/layout/index.d.ts +7 -1
- package/dist/types/plugins/layout/toolbar.d.ts +2 -1
- package/dist/types/plugins/media/index.d.ts +3 -1
- package/dist/types/plugins/panel/index.d.ts +2 -0
- package/dist/types/plugins/panel/toolbar.d.ts +3 -2
- package/dist/types/plugins/placeholder-text/index.d.ts +3 -1
- package/dist/types/ui/CollapsedEditor/index.d.ts +1 -2
- package/dist/types/ui/ColorPickerButton/index.d.ts +2 -2
- package/dist/types-ts4.5/editor-next/index.d.ts +0 -6
- package/dist/types-ts4.5/editor.d.ts +1 -137
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +28 -2
- package/dist/types-ts4.5/index.d.ts +0 -1
- package/dist/types-ts4.5/labs/next/presets/cxhtml.d.ts +122 -0
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +244 -0
- package/dist/types-ts4.5/labs/next/presets/mobile.d.ts +122 -0
- package/dist/types-ts4.5/plugins/base/index.d.ts +0 -4
- package/dist/types-ts4.5/plugins/card/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/card/nodeviews/blockCard.d.ts +3 -0
- package/dist/types-ts4.5/plugins/card/nodeviews/embedCard.d.ts +3 -0
- package/dist/types-ts4.5/plugins/card/nodeviews/inlineCard.d.ts +1 -0
- package/dist/types-ts4.5/plugins/card/pm-plugins/doc.d.ts +1 -1
- package/dist/types-ts4.5/plugins/card/pm-plugins/keymap.d.ts +1 -1
- package/dist/types-ts4.5/plugins/card/pm-plugins/main.d.ts +1 -2
- package/dist/types-ts4.5/plugins/card/toolbar.d.ts +1 -2
- package/dist/types-ts4.5/plugins/card/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/card/ui/EditLinkToolbar.d.ts +1 -2
- package/dist/types-ts4.5/plugins/card/ui/link-toolbar-button-group-options.d.ts +1 -1
- package/dist/types-ts4.5/plugins/card/ui/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/code-block/index.d.ts +7 -1
- package/dist/types-ts4.5/plugins/code-block/toolbar.d.ts +2 -1
- package/dist/types-ts4.5/plugins/copy-button/commands.d.ts +2 -1
- package/dist/types-ts4.5/plugins/copy-button/toolbar.d.ts +3 -2
- package/dist/types-ts4.5/plugins/expand/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/expand/toolbar.d.ts +2 -1
- package/dist/types-ts4.5/plugins/extension/index.d.ts +4 -2
- package/dist/types-ts4.5/plugins/extension/toolbar.d.ts +2 -1
- package/dist/types-ts4.5/plugins/floating-toolbar/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/floating-toolbar/ui/Toolbar.d.ts +3 -1
- package/dist/types-ts4.5/plugins/layout/index.d.ts +7 -1
- package/dist/types-ts4.5/plugins/layout/toolbar.d.ts +2 -1
- package/dist/types-ts4.5/plugins/media/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/panel/index.d.ts +4 -0
- package/dist/types-ts4.5/plugins/panel/toolbar.d.ts +3 -2
- package/dist/types-ts4.5/plugins/placeholder-text/index.d.ts +5 -1
- package/dist/types-ts4.5/ui/CollapsedEditor/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/ColorPickerButton/index.d.ts +2 -2
- package/package.json +23 -18
- package/report.api.md +5 -93
- package/dist/cjs/editor-next/editor-migration-component.js +0 -54
- package/dist/cjs/plugins/base/pm-plugins/decoration.js +0 -122
- package/dist/es2019/editor-next/editor-migration-component.js +0 -30
- package/dist/es2019/plugins/base/pm-plugins/decoration.js +0 -111
- package/dist/esm/editor-next/editor-migration-component.js +0 -47
- package/dist/esm/plugins/base/pm-plugins/decoration.js +0 -113
- package/dist/types/editor-next/editor-migration-component.d.ts +0 -6
- package/dist/types/plugins/base/pm-plugins/decoration.d.ts +0 -24
- package/dist/types-ts4.5/editor-next/editor-migration-component.d.ts +0 -6
- package/dist/types-ts4.5/plugins/base/pm-plugins/decoration.d.ts +0 -24
|
@@ -13,8 +13,90 @@ type EditorPresetMobileProps = {
|
|
|
13
13
|
} & EditorPresetProps;
|
|
14
14
|
export declare function useMobilePreset({ media, placeholder, maxContentSize, createAnalyticsEvent, featureFlags, }: EditorPresetMobileProps & EditorPresetProps): import("@atlaskit/editor-common/preset").EditorPresetBuilder<[...string[], "hyperlink", "textFormatting", "width", "quickInsert", "typeAhead", "unsupportedContent", "editorDisabled", "submitEditor", "fakeTextCursor", "floatingToolbar", "selection", "codeBlock"], [(config: import("../../../plugins/code-block/types").CodeBlockOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"codeBlock", {
|
|
15
15
|
pluginConfiguration: import("../../../plugins/code-block/types").CodeBlockOptions;
|
|
16
|
+
dependencies: [(config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"decorations", {
|
|
17
|
+
sharedState: import("@atlaskit/editor-plugin-decorations").DecorationState;
|
|
18
|
+
actions: {
|
|
19
|
+
hoverDecoration: (nodeType: import("prosemirror-model").NodeType<any> | import("prosemirror-model").NodeType<any>[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
20
|
+
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
21
|
+
};
|
|
22
|
+
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"decorations", {
|
|
23
|
+
sharedState: import("@atlaskit/editor-plugin-decorations").DecorationState;
|
|
24
|
+
actions: {
|
|
25
|
+
hoverDecoration: (nodeType: import("prosemirror-model").NodeType<any> | import("prosemirror-model").NodeType<any>[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
26
|
+
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
27
|
+
};
|
|
28
|
+
}>, import("@atlaskit/editor-common/types").OptionalPlugin<(config: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"analytics", {
|
|
29
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
30
|
+
sharedState: {
|
|
31
|
+
createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
|
|
32
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
33
|
+
};
|
|
34
|
+
dependencies: [(config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlags", {
|
|
35
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
36
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
37
|
+
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"featureFlags", {
|
|
38
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
39
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
40
|
+
}>];
|
|
41
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
42
|
+
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"analytics", {
|
|
43
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
44
|
+
sharedState: {
|
|
45
|
+
createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
|
|
46
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
47
|
+
};
|
|
48
|
+
dependencies: [(config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlags", {
|
|
49
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
50
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
51
|
+
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"featureFlags", {
|
|
52
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
53
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
54
|
+
}>];
|
|
55
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
56
|
+
}>>];
|
|
16
57
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"codeBlock", {
|
|
17
58
|
pluginConfiguration: import("../../../plugins/code-block/types").CodeBlockOptions;
|
|
59
|
+
dependencies: [(config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"decorations", {
|
|
60
|
+
sharedState: import("@atlaskit/editor-plugin-decorations").DecorationState;
|
|
61
|
+
actions: {
|
|
62
|
+
hoverDecoration: (nodeType: import("prosemirror-model").NodeType<any> | import("prosemirror-model").NodeType<any>[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
63
|
+
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
64
|
+
};
|
|
65
|
+
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"decorations", {
|
|
66
|
+
sharedState: import("@atlaskit/editor-plugin-decorations").DecorationState;
|
|
67
|
+
actions: {
|
|
68
|
+
hoverDecoration: (nodeType: import("prosemirror-model").NodeType<any> | import("prosemirror-model").NodeType<any>[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
69
|
+
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
70
|
+
};
|
|
71
|
+
}>, import("@atlaskit/editor-common/types").OptionalPlugin<(config: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"analytics", {
|
|
72
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
73
|
+
sharedState: {
|
|
74
|
+
createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
|
|
75
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
76
|
+
};
|
|
77
|
+
dependencies: [(config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlags", {
|
|
78
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
79
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
80
|
+
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"featureFlags", {
|
|
81
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
82
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
83
|
+
}>];
|
|
84
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
85
|
+
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"analytics", {
|
|
86
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
87
|
+
sharedState: {
|
|
88
|
+
createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
|
|
89
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
90
|
+
};
|
|
91
|
+
dependencies: [(config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlags", {
|
|
92
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
93
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
94
|
+
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"featureFlags", {
|
|
95
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
96
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
97
|
+
}>];
|
|
98
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
99
|
+
}>>];
|
|
18
100
|
}>, (config?: import("../../../plugins/selection/types").SelectionPluginOptions | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"selection", {
|
|
19
101
|
pluginConfiguration: import("../../../plugins/selection/types").SelectionPluginOptions | undefined;
|
|
20
102
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"selection", {
|
|
@@ -26,6 +108,18 @@ export declare function useMobilePreset({ media, placeholder, maxContentSize, cr
|
|
|
26
108
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"featureFlags", {
|
|
27
109
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
28
110
|
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
111
|
+
}>, (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"decorations", {
|
|
112
|
+
sharedState: import("@atlaskit/editor-plugin-decorations").DecorationState;
|
|
113
|
+
actions: {
|
|
114
|
+
hoverDecoration: (nodeType: import("prosemirror-model").NodeType<any> | import("prosemirror-model").NodeType<any>[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
115
|
+
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
116
|
+
};
|
|
117
|
+
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"decorations", {
|
|
118
|
+
sharedState: import("@atlaskit/editor-plugin-decorations").DecorationState;
|
|
119
|
+
actions: {
|
|
120
|
+
hoverDecoration: (nodeType: import("prosemirror-model").NodeType<any> | import("prosemirror-model").NodeType<any>[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
121
|
+
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
122
|
+
};
|
|
29
123
|
}>];
|
|
30
124
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"floatingToolbar", {
|
|
31
125
|
dependencies: [(config: import("@atlaskit/editor-common/types").FeatureFlags, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"featureFlags", {
|
|
@@ -34,6 +128,18 @@ export declare function useMobilePreset({ media, placeholder, maxContentSize, cr
|
|
|
34
128
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"featureFlags", {
|
|
35
129
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
36
130
|
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
131
|
+
}>, (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"decorations", {
|
|
132
|
+
sharedState: import("@atlaskit/editor-plugin-decorations").DecorationState;
|
|
133
|
+
actions: {
|
|
134
|
+
hoverDecoration: (nodeType: import("prosemirror-model").NodeType<any> | import("prosemirror-model").NodeType<any>[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
135
|
+
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
136
|
+
};
|
|
137
|
+
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"decorations", {
|
|
138
|
+
sharedState: import("@atlaskit/editor-plugin-decorations").DecorationState;
|
|
139
|
+
actions: {
|
|
140
|
+
hoverDecoration: (nodeType: import("prosemirror-model").NodeType<any> | import("prosemirror-model").NodeType<any>[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
141
|
+
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
142
|
+
};
|
|
37
143
|
}>];
|
|
38
144
|
}>, (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"fakeTextCursor", {}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"fakeTextCursor", {}>, (config?: ((editorView: import("prosemirror-view").EditorView<any>) => void) | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"submitEditor", {
|
|
39
145
|
pluginConfiguration: ((editorView: import("prosemirror-view").EditorView<any>) => void) | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NextEditorPlugin } from '../../types';
|
|
2
|
-
import { hoverDecoration } from './pm-plugins/decoration';
|
|
3
2
|
import { ScrollGutterPluginOptions } from './pm-plugins/scroll-gutter';
|
|
4
3
|
import { InputTracking, BrowserFreezetracking } from '../../types/performance-tracking';
|
|
5
4
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
@@ -14,8 +13,5 @@ export declare const isChromeWithSelectionBug: any;
|
|
|
14
13
|
declare const basePlugin: NextEditorPlugin<'base', {
|
|
15
14
|
pluginConfiguration: BasePluginOptions | undefined;
|
|
16
15
|
dependencies: [typeof featureFlagsPlugin];
|
|
17
|
-
actions: {
|
|
18
|
-
hoverDecoration: typeof hoverDecoration;
|
|
19
|
-
};
|
|
20
16
|
}>;
|
|
21
17
|
export default basePlugin;
|
|
@@ -3,7 +3,7 @@ import { CardPluginOptions } from './types';
|
|
|
3
3
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
4
4
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
5
|
import type { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
6
|
-
import type
|
|
6
|
+
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
7
7
|
import type { gridPlugin } from '@atlaskit/editor-plugin-grid';
|
|
8
8
|
declare const cardPlugin: NextEditorPlugin<'card', {
|
|
9
9
|
pluginConfiguration: CardPluginOptions;
|
|
@@ -11,7 +11,7 @@ declare const cardPlugin: NextEditorPlugin<'card', {
|
|
|
11
11
|
typeof featureFlagsPlugin,
|
|
12
12
|
typeof analyticsPlugin,
|
|
13
13
|
typeof widthPlugin,
|
|
14
|
-
typeof
|
|
14
|
+
typeof decorationsPlugin,
|
|
15
15
|
typeof gridPlugin
|
|
16
16
|
];
|
|
17
17
|
}>;
|
|
@@ -14,6 +14,9 @@ export declare class BlockCardComponent extends React.PureComponent<SmartCardPro
|
|
|
14
14
|
title?: string | undefined;
|
|
15
15
|
}) => void;
|
|
16
16
|
gapCursorSpan: () => JSX.Element | undefined;
|
|
17
|
+
onError: ({ err }: {
|
|
18
|
+
err?: Error | undefined;
|
|
19
|
+
}) => void;
|
|
17
20
|
render(): JSX.Element;
|
|
18
21
|
}
|
|
19
22
|
export type BlockCardNodeViewProps = Pick<SmartCardProps, 'platform' | 'showServerActions'>;
|
|
@@ -33,6 +33,9 @@ export declare class EmbedCardComponent extends React.PureComponent<SmartCardPro
|
|
|
33
33
|
*/
|
|
34
34
|
saveOriginalDimensionsAttributes: (height: number, width: number | undefined) => void;
|
|
35
35
|
onHeightUpdate: (height: number) => void;
|
|
36
|
+
onError: ({ err }: {
|
|
37
|
+
err?: Error | undefined;
|
|
38
|
+
}) => void;
|
|
36
39
|
render(): JSX.Element;
|
|
37
40
|
}
|
|
38
41
|
export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'platform' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi'>;
|
|
@@ -3,7 +3,7 @@ import { Node } from 'prosemirror-model';
|
|
|
3
3
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
4
|
import { CardAdf, CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import { ACTION, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
|
-
import { Command } from '
|
|
6
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
7
7
|
import { CardReplacementInputMethod, Request } from '../types';
|
|
8
8
|
export declare const replaceQueuedUrlWithCard: (url: string, cardData: CardAdf, analyticsAction?: ACTION, editorAnalyticsApi?: EditorAnalyticsAPI) => Command;
|
|
9
9
|
export declare const handleFallbackWithAnalytics: (request: Request, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { FeatureFlags } from '
|
|
2
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
3
|
export declare function cardKeymap(featureFlags: FeatureFlags): SafePlugin;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { PMPluginFactoryParams } from '../../../types';
|
|
3
2
|
import { CardPluginOptions, CardPluginState } from '../types';
|
|
4
|
-
import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { ExtractInjectionAPI, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
5
4
|
import type cardPlugin from '../index';
|
|
6
5
|
export { pluginKey } from './plugin-key';
|
|
7
6
|
export declare const createPlugin: (options: CardPluginOptions, pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined) => (pmPluginFactoryParams: PMPluginFactoryParams) => SafePlugin<CardPluginState>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CardPlatform } from '@atlaskit/smart-card';
|
|
2
|
-
import { Command } from '
|
|
3
|
-
import { FloatingToolbarHandler } from '../floating-toolbar/types';
|
|
2
|
+
import type { Command, FloatingToolbarHandler } from '@atlaskit/editor-common/types';
|
|
4
3
|
import { CardOptions } from '@atlaskit/editor-common/card';
|
|
5
4
|
import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
5
|
import { LinkPickerOptions } from '../hyperlink/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INPUT_METHOD, ACTION } from '
|
|
1
|
+
import { INPUT_METHOD, ACTION } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { CardProvider, CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import { SmartLinkEvents } from '@atlaskit/smart-card';
|
|
4
4
|
import { CreateUIAnalyticsEvent, UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
@@ -4,8 +4,7 @@ import { Node } from 'prosemirror-model';
|
|
|
4
4
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
6
6
|
import { LinkPickerOptions } from '../../hyperlink/types';
|
|
7
|
-
import { Command } from '
|
|
8
|
-
import { FloatingToolbarItem, FloatingToolbarConfig } from '../../floating-toolbar/types';
|
|
7
|
+
import type { Command, FloatingToolbarItem, FloatingToolbarConfig } from '@atlaskit/editor-common/types';
|
|
9
8
|
import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
10
9
|
import { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
11
10
|
export type EditLinkToolbarProps = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IntlShape } from 'react-intl-next';
|
|
2
|
-
import { Command } from '
|
|
2
|
+
import { Command } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { OptionConfig } from './types';
|
|
4
4
|
import { ButtonOptionProps } from './LinkToolbarButtonGroup';
|
|
5
5
|
export declare const getButtonGroupOption: (intl: IntlShape, dispatchCommand: (command: Command) => void, { disabled, onClick, selected, appearance, testId, tooltip }: OptionConfig) => ButtonOptionProps;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
1
|
+
import { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { CodeBlockOptions } from './types';
|
|
3
|
+
import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
4
|
+
import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
5
|
declare const codeBlockPlugin: NextEditorPlugin<'codeBlock', {
|
|
4
6
|
pluginConfiguration: CodeBlockOptions;
|
|
7
|
+
dependencies: [
|
|
8
|
+
typeof decorationsPlugin,
|
|
9
|
+
OptionalPlugin<typeof analyticsPlugin>
|
|
10
|
+
];
|
|
5
11
|
}>;
|
|
6
12
|
export default codeBlockPlugin;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FloatingToolbarHandler } from '../floating-toolbar/types';
|
|
2
|
+
import { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations';
|
|
2
3
|
import { SelectOption } from '../floating-toolbar/ui/Select';
|
|
3
4
|
export declare const messages: {
|
|
4
5
|
selectLanguage: {
|
|
@@ -7,7 +8,7 @@ export declare const messages: {
|
|
|
7
8
|
description: string;
|
|
8
9
|
};
|
|
9
10
|
};
|
|
10
|
-
export declare const getToolbarConfig: (allowCopyToClipboard
|
|
11
|
+
export declare const getToolbarConfig: (allowCopyToClipboard: boolean | undefined, hoverDecoration: HoverDecorationHandler | undefined) => FloatingToolbarHandler;
|
|
11
12
|
/**
|
|
12
13
|
* Filters language list based on both name and alias properties.
|
|
13
14
|
*/
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Command, CommandDispatch } from '../../types';
|
|
2
2
|
import { MarkType, NodeType } from 'prosemirror-model';
|
|
3
3
|
import { EditorState } from 'prosemirror-state';
|
|
4
|
+
import { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations';
|
|
4
5
|
export declare function createToolbarCopyCommandForMark(markType: MarkType): Command;
|
|
5
6
|
export declare function getProvideMarkVisualFeedbackForCopyButtonCommand(markType: MarkType): (state: EditorState, dispatch: CommandDispatch | undefined) => boolean;
|
|
6
7
|
export declare function removeMarkVisualFeedbackForCopyButtonCommand(state: EditorState, dispatch: CommandDispatch | undefined): boolean;
|
|
7
8
|
export declare const createToolbarCopyCommandForNode: (nodeType: NodeType | Array<NodeType>) => Command;
|
|
8
|
-
export declare const resetCopiedState: (nodeType: NodeType | Array<NodeType>, onMouseLeave?: Command) => Command;
|
|
9
|
+
export declare const resetCopiedState: (nodeType: NodeType | Array<NodeType>, hoverDecoration: HoverDecorationHandler | undefined, onMouseLeave?: Command) => Command;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EditorState } from 'prosemirror-state';
|
|
2
2
|
import { Command } from '../../../src/types';
|
|
3
3
|
import { FloatingToolbarButton, FloatingToolbarItem, MarkOptions, NodeOptions } from '../floating-toolbar/types';
|
|
4
|
-
|
|
4
|
+
import { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations';
|
|
5
|
+
export declare function getCopyButtonConfig(options: MarkOptions | NodeOptions, hoverDecoration: HoverDecorationHandler | undefined): FloatingToolbarButton<Command>;
|
|
5
6
|
export declare const showCopyButton: (state?: EditorState) => import("prosemirror-state").Plugin<any, any> | undefined;
|
|
6
7
|
/**
|
|
7
8
|
* Process floatingToolbar items for copyButton
|
|
@@ -9,4 +10,4 @@ export declare const showCopyButton: (state?: EditorState) => import("prosemirro
|
|
|
9
10
|
* If copy button plugin not enabled, remove copy button item from toolbar items
|
|
10
11
|
* else process copy button to standard floatingtoobarbutton
|
|
11
12
|
*/
|
|
12
|
-
export declare function processCopyButtonItems(state: EditorState): (items: Array<FloatingToolbarItem<Command
|
|
13
|
+
export declare function processCopyButtonItems(state: EditorState): (items: Array<FloatingToolbarItem<Command>>, hoverDecoration: HoverDecorationHandler | undefined) => Array<FloatingToolbarItem<Command>>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { NextEditorPlugin, EditorProps } from '../../types';
|
|
2
2
|
import { LongPressSelectionPluginOptions } from '../selection/types';
|
|
3
3
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
4
|
+
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
4
5
|
interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
|
|
5
6
|
allowInsertion?: boolean;
|
|
6
7
|
appearance?: EditorProps['appearance'];
|
|
7
8
|
}
|
|
8
9
|
declare const expandPlugin: NextEditorPlugin<'expand', {
|
|
9
10
|
pluginConfiguration: ExpandPluginOptions | undefined;
|
|
10
|
-
dependencies: [typeof featureFlagsPlugin];
|
|
11
|
+
dependencies: [typeof featureFlagsPlugin, typeof decorationsPlugin];
|
|
11
12
|
}>;
|
|
12
13
|
interface ExpandEditorProps {
|
|
13
14
|
allowExpand?: EditorProps['allowExpand'];
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { FloatingToolbarHandler } from '../floating-toolbar/types';
|
|
2
|
-
|
|
2
|
+
import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations';
|
|
3
|
+
export declare const getToolbarConfig: (hoverDecoration: HoverDecorationHandler | undefined) => FloatingToolbarHandler;
|
|
@@ -2,7 +2,8 @@ import { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
|
2
2
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
3
3
|
import { NextEditorPlugin, EditorAppearance } from '../../types';
|
|
4
4
|
import { LongPressSelectionPluginOptions } from '../selection/types';
|
|
5
|
-
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
5
|
+
import type { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
6
|
+
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
6
7
|
interface ExtensionPluginOptions extends LongPressSelectionPluginOptions {
|
|
7
8
|
allowAutoSave?: boolean;
|
|
8
9
|
breakoutEnabled?: boolean;
|
|
@@ -11,6 +12,10 @@ interface ExtensionPluginOptions extends LongPressSelectionPluginOptions {
|
|
|
11
12
|
}
|
|
12
13
|
declare const extensionPlugin: NextEditorPlugin<'extension', {
|
|
13
14
|
pluginConfiguration: ExtensionPluginOptions | undefined;
|
|
14
|
-
dependencies: [
|
|
15
|
+
dependencies: [
|
|
16
|
+
typeof featureFlagsPlugin,
|
|
17
|
+
typeof widthPlugin,
|
|
18
|
+
typeof decorationsPlugin
|
|
19
|
+
];
|
|
15
20
|
}>;
|
|
16
21
|
export default extensionPlugin;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FloatingToolbarHandler } from '../floating-toolbar/types';
|
|
2
|
+
import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations';
|
|
2
3
|
export declare const messages: {
|
|
3
4
|
edit: {
|
|
4
5
|
id: string;
|
|
@@ -31,4 +32,4 @@ export declare const messages: {
|
|
|
31
32
|
description: string;
|
|
32
33
|
};
|
|
33
34
|
};
|
|
34
|
-
export declare const getToolbarConfig: (breakoutEnabled
|
|
35
|
+
export declare const getToolbarConfig: (breakoutEnabled: boolean | undefined, hoverDecoration: HoverDecorationHandler | undefined) => FloatingToolbarHandler;
|
|
@@ -3,6 +3,7 @@ import { Node } from 'prosemirror-model';
|
|
|
3
3
|
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
4
4
|
import { FloatingToolbarConfig } from './types';
|
|
5
5
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
6
|
+
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
6
7
|
export type FloatingToolbarPluginState = Record<'getConfigWithNodeInfo', (state: EditorState) => ConfigWithNodeInfo | null | undefined>;
|
|
7
8
|
export type ConfigWithNodeInfo = {
|
|
8
9
|
config: FloatingToolbarConfig | undefined;
|
|
@@ -11,7 +12,7 @@ export type ConfigWithNodeInfo = {
|
|
|
11
12
|
};
|
|
12
13
|
export declare const getRelevantConfig: (selection: Selection<any>, configs: Array<FloatingToolbarConfig>) => ConfigWithNodeInfo | undefined;
|
|
13
14
|
declare const floatingToolbarPlugin: NextEditorPlugin<'floatingToolbar', {
|
|
14
|
-
dependencies: [typeof featureFlagsPlugin];
|
|
15
|
+
dependencies: [typeof featureFlagsPlugin, typeof decorationsPlugin];
|
|
15
16
|
}>;
|
|
16
17
|
export default floatingToolbarPlugin;
|
|
17
18
|
/**
|
|
@@ -7,7 +7,8 @@ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
|
7
7
|
import { DispatchAnalyticsEvent } from '../../analytics';
|
|
8
8
|
import { FloatingToolbarItem } from '../types';
|
|
9
9
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
10
|
-
import { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
10
|
+
import { FeatureFlags, PluginInjectionAPIWithDependency } from '@atlaskit/editor-common/types';
|
|
11
|
+
import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
11
12
|
export type Item = FloatingToolbarItem<Function>;
|
|
12
13
|
export interface Props {
|
|
13
14
|
items: Array<Item>;
|
|
@@ -25,6 +26,7 @@ export interface Props {
|
|
|
25
26
|
extensionsProvider?: ExtensionProvider;
|
|
26
27
|
scrollable?: boolean;
|
|
27
28
|
featureFlags: FeatureFlags;
|
|
29
|
+
api: PluginInjectionAPIWithDependency<typeof decorationsPlugin> | undefined;
|
|
28
30
|
}
|
|
29
31
|
export declare const isSameItem: (leftItem: Item, rightItem: Item) => boolean;
|
|
30
32
|
export declare const areSameItems: (leftArr?: Array<Item>, rightArr?: Array<Item>) => boolean;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { pluginKey } from './pm-plugins/plugin-key';
|
|
3
3
|
import { LayoutPluginOptions } from './types';
|
|
4
|
+
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
5
|
+
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
6
|
export { pluginKey };
|
|
5
7
|
declare const layoutPlugin: NextEditorPlugin<'layout', {
|
|
6
8
|
pluginConfiguration: LayoutPluginOptions | undefined;
|
|
9
|
+
dependencies: [
|
|
10
|
+
typeof decorationsPlugin,
|
|
11
|
+
OptionalPlugin<typeof analyticsPlugin>
|
|
12
|
+
];
|
|
7
13
|
}>;
|
|
8
14
|
export default layoutPlugin;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IntlShape } from 'react-intl-next';
|
|
2
2
|
import { EditorState } from 'prosemirror-state';
|
|
3
3
|
import { FloatingToolbarConfig } from '../../plugins/floating-toolbar/types';
|
|
4
|
+
import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations';
|
|
4
5
|
export declare const layoutToolbarTitle = "Layout floating controls";
|
|
5
|
-
export declare const buildToolbar: (state: EditorState, intl: IntlShape, pos: number, _allowBreakout: boolean, addSidebarLayouts: boolean, allowSingleColumnLayout: boolean) => FloatingToolbarConfig | undefined;
|
|
6
|
+
export declare const buildToolbar: (state: EditorState, intl: IntlShape, pos: number, _allowBreakout: boolean, addSidebarLayouts: boolean, allowSingleColumnLayout: boolean, hoverDecoration: HoverDecorationHandler | undefined) => FloatingToolbarConfig | undefined;
|
|
@@ -7,6 +7,7 @@ import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
|
7
7
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
8
8
|
import type { gridPlugin } from '@atlaskit/editor-plugin-grid';
|
|
9
9
|
import type { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
10
|
+
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
10
11
|
import { MediaPluginState } from './pm-plugins/types';
|
|
11
12
|
export type { MediaState, MediaProvider, CustomMediaPicker };
|
|
12
13
|
export { insertMediaSingleNode } from './utils/media-single';
|
|
@@ -16,7 +17,8 @@ declare const mediaPlugin: NextEditorPlugin<'media', {
|
|
|
16
17
|
typeof featureFlagsPlugin,
|
|
17
18
|
OptionalPlugin<typeof analyticsPlugin>,
|
|
18
19
|
typeof gridPlugin,
|
|
19
|
-
typeof widthPlugin
|
|
20
|
+
typeof widthPlugin,
|
|
21
|
+
typeof decorationsPlugin
|
|
20
22
|
];
|
|
21
23
|
sharedState: MediaPluginState | null;
|
|
22
24
|
}>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { PanelPluginOptions } from './types';
|
|
3
|
+
import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
3
4
|
declare const panelPlugin: NextEditorPlugin<'panel', {
|
|
4
5
|
pluginConfiguration: PanelPluginOptions | undefined;
|
|
6
|
+
dependencies: [typeof decorationsPlugin];
|
|
5
7
|
}>;
|
|
6
8
|
export default panelPlugin;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FloatingToolbarConfig, FloatingToolbarItem } from './../floating-toolbar/types';
|
|
2
2
|
import { EmojiInfo, PanelPluginOptions } from './types';
|
|
3
3
|
import { IntlShape } from 'react-intl-next';
|
|
4
|
+
import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations';
|
|
4
5
|
import { EditorState } from 'prosemirror-state';
|
|
5
6
|
import { NodeType } from 'prosemirror-model';
|
|
6
7
|
import { Command } from '../../types';
|
|
@@ -9,5 +10,5 @@ import { PanelType } from '@atlaskit/adf-schema';
|
|
|
9
10
|
export declare const panelIconMap: {
|
|
10
11
|
[key in Exclude<PanelType, PanelType.CUSTOM>]: EmojiInfo;
|
|
11
12
|
};
|
|
12
|
-
export declare const getToolbarItems: (formatMessage: IntlShape['formatMessage'], panelNodeType: NodeType, isCustomPanelEnabled: boolean, isCustomPanelEditable: boolean, providerFactory: ProviderFactory, activePanelType?: string, activePanelColor?: string, activePanelIcon?: string, state?: EditorState) => FloatingToolbarItem<Command>[];
|
|
13
|
-
export declare const getToolbarConfig: (state: EditorState, intl: IntlShape, options: PanelPluginOptions | undefined, providerFactory: ProviderFactory) => FloatingToolbarConfig | undefined;
|
|
13
|
+
export declare const getToolbarItems: (formatMessage: IntlShape['formatMessage'], panelNodeType: NodeType, isCustomPanelEnabled: boolean, isCustomPanelEditable: boolean, providerFactory: ProviderFactory, hoverDecoration: HoverDecorationHandler | undefined, activePanelType?: string, activePanelColor?: string, activePanelIcon?: string, state?: EditorState) => FloatingToolbarItem<Command>[];
|
|
14
|
+
export declare const getToolbarConfig: (state: EditorState, intl: IntlShape, options: PanelPluginOptions | undefined, providerFactory: ProviderFactory, hoverDecoration: HoverDecorationHandler | undefined) => FloatingToolbarConfig | undefined;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { Dispatch } from '../../event-dispatcher';
|
|
4
4
|
import { PlaceholderTextOptions, PluginState } from './types';
|
|
5
|
+
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
6
|
export declare function createPlugin(dispatch: Dispatch<PluginState>, options: PlaceholderTextOptions): SafePlugin | undefined;
|
|
6
7
|
declare const placeholderTextPlugin: NextEditorPlugin<'placeholderText', {
|
|
8
|
+
dependencies: [OptionalPlugin<typeof analyticsPlugin>];
|
|
7
9
|
pluginConfiguration: PlaceholderTextOptions;
|
|
8
10
|
}>;
|
|
9
11
|
export default placeholderTextPlugin;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Editor from '../../editor';
|
|
3
3
|
import EditorNext from '../../editor-next';
|
|
4
|
-
import EditorMigrationComponent from '../../editor-next/editor-migration-component';
|
|
5
4
|
export interface Props {
|
|
6
5
|
placeholder?: string;
|
|
7
6
|
children?: any;
|
|
@@ -12,7 +11,7 @@ export interface Props {
|
|
|
12
11
|
export interface State {
|
|
13
12
|
}
|
|
14
13
|
export default class CollapsedEditor extends React.Component<Props, State> {
|
|
15
|
-
editorComponent?: Editor | EditorNext
|
|
14
|
+
editorComponent?: Editor | EditorNext;
|
|
16
15
|
previouslyExpanded?: boolean;
|
|
17
16
|
componentDidUpdate(): void;
|
|
18
17
|
handleEditorRef: (editorRef?: Editor, editorRefCallback?: any) => void;
|
|
@@ -11,8 +11,8 @@ type Props = WithAnalyticsEventsProps & {
|
|
|
11
11
|
cols?: number;
|
|
12
12
|
alignX?: 'left' | 'right' | 'center' | 'end';
|
|
13
13
|
size?: {
|
|
14
|
-
width:
|
|
15
|
-
height:
|
|
14
|
+
width: string;
|
|
15
|
+
height: string;
|
|
16
16
|
};
|
|
17
17
|
mountPoint?: HTMLElement;
|
|
18
18
|
setDisableParentScroll?: (disable: boolean) => void;
|
|
@@ -4,11 +4,6 @@ import React from 'react';
|
|
|
4
4
|
import { EditorNextProps } from '../types/editor-props';
|
|
5
5
|
import { Context } from './utils/editorPropTypes';
|
|
6
6
|
export default class EditorNext extends React.Component<EditorNextProps> {
|
|
7
|
-
/**
|
|
8
|
-
* WARNING: Code should be shared between Editor + EditorNext
|
|
9
|
-
* If you are making changes that affect both, consider making them
|
|
10
|
-
* in editor-next/editor-internal.tsx or editor-next/editor-utils.ts
|
|
11
|
-
*/
|
|
12
7
|
static defaultProps: import("../types/editor-props").EditorProps;
|
|
13
8
|
static contextTypes: {
|
|
14
9
|
editorActions: PropTypes.Requireable<object>;
|
|
@@ -19,7 +14,6 @@ export default class EditorNext extends React.Component<EditorNextProps> {
|
|
|
19
14
|
};
|
|
20
15
|
private editorActions;
|
|
21
16
|
private createAnalyticsEvent?;
|
|
22
|
-
private editorSessionId;
|
|
23
17
|
private experienceStore?;
|
|
24
18
|
private startTime?;
|
|
25
19
|
constructor(props: EditorNextProps, context: Context);
|