@atlaskit/editor-core 187.41.3 → 187.41.5
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 +38 -18
- package/dist/cjs/create-editor/feature-flags-from-props.js +2 -3
- package/dist/cjs/plugins/collab-edit/ui/styles.js +2 -2
- package/dist/cjs/plugins/date/nodeviews/date.js +6 -1
- package/dist/cjs/plugins/extension/index.js +35 -9
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +8 -15
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +7 -18
- package/dist/cjs/plugins/media/styles.js +1 -1
- package/dist/cjs/plugins/media/toolbar/commands.js +63 -25
- package/dist/cjs/plugins/media/toolbar/index.js +13 -18
- package/dist/cjs/plugins/media/ui/ImageBorder/index.js +1 -3
- package/dist/cjs/plugins/media/ui/PixelEntry/index.js +6 -5
- package/dist/cjs/plugins/media/utils/analytics.js +1 -1
- package/dist/cjs/plugins/paste/handlers.js +2 -1
- package/dist/cjs/plugins/text-color/index.js +2 -6
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +2 -5
- package/dist/cjs/ui/ColorPickerButton/index.js +3 -4
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +1 -11
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/feature-flags-from-props.js +2 -3
- package/dist/es2019/plugins/collab-edit/ui/styles.js +2 -2
- package/dist/es2019/plugins/date/nodeviews/date.js +6 -1
- package/dist/es2019/plugins/extension/index.js +30 -4
- package/dist/es2019/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +8 -15
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +3 -15
- package/dist/es2019/plugins/media/styles.js +3 -5
- package/dist/es2019/plugins/media/toolbar/commands.js +31 -1
- package/dist/es2019/plugins/media/toolbar/index.js +14 -20
- package/dist/es2019/plugins/media/ui/ImageBorder/index.js +1 -3
- package/dist/es2019/plugins/media/ui/PixelEntry/index.js +6 -5
- package/dist/es2019/plugins/media/utils/analytics.js +1 -1
- package/dist/es2019/plugins/paste/handlers.js +2 -1
- package/dist/es2019/plugins/text-color/index.js +2 -6
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +2 -7
- package/dist/es2019/ui/ColorPickerButton/index.js +2 -3
- package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +1 -11
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/feature-flags-from-props.js +2 -3
- package/dist/esm/plugins/collab-edit/ui/styles.js +2 -2
- package/dist/esm/plugins/date/nodeviews/date.js +6 -1
- package/dist/esm/plugins/extension/index.js +35 -9
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +8 -15
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +7 -18
- package/dist/esm/plugins/media/styles.js +1 -1
- package/dist/esm/plugins/media/toolbar/commands.js +37 -1
- package/dist/esm/plugins/media/toolbar/index.js +14 -19
- package/dist/esm/plugins/media/ui/ImageBorder/index.js +1 -3
- package/dist/esm/plugins/media/ui/PixelEntry/index.js +6 -5
- package/dist/esm/plugins/media/utils/analytics.js +1 -1
- package/dist/esm/plugins/paste/handlers.js +2 -1
- package/dist/esm/plugins/text-color/index.js +2 -6
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +2 -5
- package/dist/esm/ui/ColorPickerButton/index.js +3 -4
- package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +1 -11
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/labs/next/presets/default.d.ts +44 -2
- package/dist/types/plugins/floating-toolbar/ui/ExtensionsPlaceholder.d.ts +2 -0
- package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +3 -1
- package/dist/types/plugins/media/toolbar/commands.d.ts +3 -1
- package/dist/types/plugins/media/ui/ImageBorder/index.d.ts +3 -4
- package/dist/types/plugins/media/ui/PixelEntry/types.d.ts +2 -0
- package/dist/types/plugins/text-color/index.d.ts +1 -2
- package/dist/types/plugins/text-color/ui/ToolbarTextColor/index.d.ts +0 -2
- package/dist/types/ui/ColorPickerButton/index.d.ts +1 -2
- package/dist/types/ui/ConfigPanel/Fields/Expand.d.ts +2 -2
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +54 -0
- package/dist/types-ts4.5/plugins/floating-toolbar/ui/ExtensionsPlaceholder.d.ts +2 -0
- package/dist/types-ts4.5/plugins/floating-toolbar/ui/Toolbar.d.ts +3 -1
- package/dist/types-ts4.5/plugins/media/toolbar/commands.d.ts +3 -1
- package/dist/types-ts4.5/plugins/media/ui/ImageBorder/index.d.ts +3 -4
- package/dist/types-ts4.5/plugins/media/ui/PixelEntry/types.d.ts +2 -0
- package/dist/types-ts4.5/plugins/text-color/index.d.ts +0 -2
- package/dist/types-ts4.5/plugins/text-color/ui/ToolbarTextColor/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/ColorPickerButton/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Expand.d.ts +2 -2
- package/package.json +6 -6
|
@@ -9,6 +9,7 @@ import type { WrappedComponentProps } from 'react-intl-next';
|
|
|
9
9
|
import type { FloatingToolbarItem, FeatureFlags, PluginInjectionAPIWithDependencies, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
10
10
|
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
11
11
|
import type { contextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
|
|
12
|
+
import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
|
|
12
13
|
export type Item = FloatingToolbarItem<Function>;
|
|
13
14
|
export interface Props {
|
|
14
15
|
items: Array<Item>;
|
|
@@ -28,7 +29,8 @@ export interface Props {
|
|
|
28
29
|
featureFlags: FeatureFlags;
|
|
29
30
|
api: PluginInjectionAPIWithDependencies<[
|
|
30
31
|
typeof decorationsPlugin,
|
|
31
|
-
OptionalPlugin<typeof contextPanelPlugin
|
|
32
|
+
OptionalPlugin<typeof contextPanelPlugin>,
|
|
33
|
+
OptionalPlugin<ExtensionPlugin>
|
|
32
34
|
]> | undefined;
|
|
33
35
|
}
|
|
34
36
|
export declare const isSameItem: (leftItem: Item, rightItem: Item) => boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { BorderMarkAttributes } from '@atlaskit/adf-schema';
|
|
1
|
+
import type { BorderMarkAttributes, RichMediaLayout } from '@atlaskit/adf-schema';
|
|
2
2
|
import type { Command } from '../../../types';
|
|
3
|
+
import type { PixelEntryValidation } from '../ui/PixelEntry/types';
|
|
3
4
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
5
|
export declare const DEFAULT_BORDER_COLOR = "#091e4224";
|
|
5
6
|
export declare const DEFAULT_BORDER_SIZE = 2;
|
|
@@ -8,3 +9,4 @@ export declare const changeMediaCardToInline: (editorAnalyticsAPI: EditorAnalyti
|
|
|
8
9
|
export declare const removeInlineCard: Command;
|
|
9
10
|
export declare const toggleBorderMark: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
10
11
|
export declare const setBorderMark: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (attrs: Partial<BorderMarkAttributes>) => Command;
|
|
12
|
+
export declare const updateMediaSingleWidth: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (width: number, validation: PixelEntryValidation, layout: RichMediaLayout) => Command;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import { IntlShape } from 'react-intl-next';
|
|
4
|
-
import { BorderMarkAttributes } from '@atlaskit/adf-schema';
|
|
3
|
+
import type { IntlShape } from 'react-intl-next';
|
|
4
|
+
import type { BorderMarkAttributes } from '@atlaskit/adf-schema';
|
|
5
5
|
export interface ImageBorderProps {
|
|
6
6
|
intl: IntlShape;
|
|
7
7
|
toggleBorder: () => void;
|
|
8
8
|
borderMark?: BorderMarkAttributes;
|
|
9
|
-
showSomewhatSemanticTooltips?: boolean;
|
|
10
9
|
setBorder: (attrs: Partial<BorderMarkAttributes>) => void;
|
|
11
10
|
}
|
|
12
|
-
declare const ImageBorder: ({ intl: { formatMessage }, toggleBorder,
|
|
11
|
+
declare const ImageBorder: ({ intl: { formatMessage }, toggleBorder, borderMark, setBorder, }: ImageBorderProps) => jsx.JSX.Element;
|
|
13
12
|
export default ImageBorder;
|
|
@@ -51,6 +51,8 @@ export type PixelEntryFormValues = {
|
|
|
51
51
|
inputWidth: number | '';
|
|
52
52
|
inputHeight: number | '';
|
|
53
53
|
};
|
|
54
|
+
export type PixelEntryValidation = 'valid' | 'greater-than-max' | 'less-than-min';
|
|
54
55
|
export type PixelEntryFormData = {
|
|
55
56
|
width: number;
|
|
57
|
+
validation: PixelEntryValidation;
|
|
56
58
|
};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
3
2
|
import type { TextColorPluginConfig, TextColorPluginState } from './pm-plugins/main';
|
|
4
3
|
import { pluginKey as textColorPluginKey } from './pm-plugins/main';
|
|
5
4
|
type Config = TextColorPluginConfig | boolean;
|
|
6
5
|
declare const textColorPlugin: NextEditorPlugin<'textColor', {
|
|
7
6
|
pluginConfiguration: Config | undefined;
|
|
8
7
|
dependencies: [
|
|
9
|
-
FeatureFlagsPlugin
|
|
10
8
|
];
|
|
11
9
|
}>;
|
|
12
10
|
export { textColorPluginKey };
|
|
@@ -5,7 +5,6 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
5
5
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
6
6
|
import type { DispatchAnalyticsEvent } from '../../../analytics';
|
|
7
7
|
import type { TextColorPluginState } from '../../pm-plugins/main';
|
|
8
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
9
8
|
export declare const messages: {
|
|
10
9
|
textColor: {
|
|
11
10
|
id: string;
|
|
@@ -26,7 +25,6 @@ export interface Props {
|
|
|
26
25
|
isReducedSpacing?: boolean;
|
|
27
26
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
28
27
|
disabled?: boolean;
|
|
29
|
-
featureFlags: FeatureFlags;
|
|
30
28
|
}
|
|
31
29
|
export declare class ToolbarTextColor extends React.Component<Props & WrappedComponentProps, State> {
|
|
32
30
|
state: State;
|
|
@@ -17,7 +17,6 @@ type Props = WithAnalyticsEventsProps & {
|
|
|
17
17
|
mountPoint?: HTMLElement;
|
|
18
18
|
setDisableParentScroll?: (disable: boolean) => void;
|
|
19
19
|
hexToPaletteColor?: (hexColor: string) => string | undefined;
|
|
20
|
-
showSomewhatSemanticTooltips?: boolean;
|
|
21
20
|
paletteColorTooltipMessages?: PaletteTooltipMessages;
|
|
22
21
|
/**
|
|
23
22
|
* After picking the color the default behaviour is to focus the color picker button.
|
|
@@ -25,5 +24,5 @@ type Props = WithAnalyticsEventsProps & {
|
|
|
25
24
|
*/
|
|
26
25
|
skipFocusButtonAfterPick?: boolean;
|
|
27
26
|
};
|
|
28
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "title" | "key" | "onChange" | "size" | "cols" | "analyticsContext" | "currentColor" | "alignX" | "colorPalette" | "placement" | "mountPoint" | "setDisableParentScroll" | "hexToPaletteColor" | "
|
|
27
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "title" | "key" | "onChange" | "size" | "cols" | "analyticsContext" | "currentColor" | "alignX" | "colorPalette" | "placement" | "mountPoint" | "setDisableParentScroll" | "hexToPaletteColor" | "paletteColorTooltipMessages" | "skipFocusButtonAfterPick"> & React.RefAttributes<any>>;
|
|
29
28
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
import { FieldDefinition } from '@atlaskit/editor-common/extensions';
|
|
3
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
+
import type { FieldDefinition } from '@atlaskit/editor-common/extensions';
|
|
5
5
|
export declare const expandContainer: import("@emotion/react").SerializedStyles;
|
|
6
6
|
export declare const expandControl: import("@emotion/react").SerializedStyles;
|
|
7
7
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "187.41.
|
|
3
|
+
"version": "187.41.5",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@atlaskit/activity-provider": "^2.4.0",
|
|
43
|
-
"@atlaskit/adf-schema": "
|
|
43
|
+
"@atlaskit/adf-schema": "^29.1.0",
|
|
44
44
|
"@atlaskit/adf-utils": "^19.0.0",
|
|
45
45
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
46
46
|
"@atlaskit/analytics-listeners": "^8.7.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@atlaskit/editor-plugin-decorations": "^0.2.0",
|
|
68
68
|
"@atlaskit/editor-plugin-editor-disabled": "^0.2.0",
|
|
69
69
|
"@atlaskit/editor-plugin-emoji": "^0.3.0",
|
|
70
|
-
"@atlaskit/editor-plugin-extension": "^0.
|
|
70
|
+
"@atlaskit/editor-plugin-extension": "^0.2.0",
|
|
71
71
|
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|
|
72
72
|
"@atlaskit/editor-plugin-floating-toolbar": "^0.4.0",
|
|
73
73
|
"@atlaskit/editor-plugin-focus": "^0.2.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@atlaskit/editor-plugin-list": "^1.2.0",
|
|
79
79
|
"@atlaskit/editor-plugin-placeholder": "^0.1.0",
|
|
80
80
|
"@atlaskit/editor-plugin-rule": "^0.1.0",
|
|
81
|
-
"@atlaskit/editor-plugin-table": "^2.
|
|
81
|
+
"@atlaskit/editor-plugin-table": "^2.14.0",
|
|
82
82
|
"@atlaskit/editor-plugin-text-formatting": "^0.4.0",
|
|
83
83
|
"@atlaskit/editor-plugin-type-ahead": "^0.3.0",
|
|
84
84
|
"@atlaskit/editor-plugin-unsupported-content": "^0.2.0",
|
|
@@ -149,10 +149,10 @@
|
|
|
149
149
|
"devDependencies": {
|
|
150
150
|
"@af/integration-testing": "*",
|
|
151
151
|
"@atlaskit/code": "^14.6.0",
|
|
152
|
-
"@atlaskit/collab-provider": "9.12.
|
|
152
|
+
"@atlaskit/collab-provider": "9.12.2",
|
|
153
153
|
"@atlaskit/dropdown-menu": "^11.13.0",
|
|
154
154
|
"@atlaskit/editor-extension-dropbox": "^0.4.0",
|
|
155
|
-
"@atlaskit/editor-plugin-table": "^2.
|
|
155
|
+
"@atlaskit/editor-plugin-table": "^2.14.0",
|
|
156
156
|
"@atlaskit/flag": "^15.2.0",
|
|
157
157
|
"@atlaskit/icon-object": "^6.3.0",
|
|
158
158
|
"@atlaskit/inline-dialog": "^13.6.0",
|