@atlaskit/editor-common 78.10.0 → 78.11.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 +16 -0
- package/dist/cjs/extensibility/Extension/InlineExtension/index.js +40 -42
- package/dist/cjs/extensibility/Extension/InlineExtension/styles.js +32 -5
- package/dist/cjs/extensibility/ExtensionComponent.js +4 -2
- package/dist/cjs/extensibility/MultiBodiedExtension/index.js +21 -7
- package/dist/cjs/extensibility/MultiBodiedExtension/styles.js +17 -4
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/MediaSingle/index.js +5 -2
- package/dist/cjs/ui/MediaSingle/styled.js +44 -8
- package/dist/cjs/ui/MultiBodiedExtension/index.js +1 -8
- package/dist/cjs/ui/WidthProvider/index.js +35 -49
- package/dist/cjs/ui/index.js +6 -0
- package/dist/es2019/extensibility/Extension/InlineExtension/index.js +43 -28
- package/dist/es2019/extensibility/Extension/InlineExtension/styles.js +29 -22
- package/dist/es2019/extensibility/ExtensionComponent.js +4 -2
- package/dist/es2019/extensibility/MultiBodiedExtension/index.js +22 -8
- package/dist/es2019/extensibility/MultiBodiedExtension/styles.js +16 -14
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/MediaSingle/index.js +4 -2
- package/dist/es2019/ui/MediaSingle/styled.js +40 -10
- package/dist/es2019/ui/MultiBodiedExtension/index.js +1 -8
- package/dist/es2019/ui/WidthProvider/index.js +29 -35
- package/dist/es2019/ui/index.js +1 -1
- package/dist/esm/extensibility/Extension/InlineExtension/index.js +40 -45
- package/dist/esm/extensibility/Extension/InlineExtension/styles.js +31 -3
- package/dist/esm/extensibility/ExtensionComponent.js +4 -2
- package/dist/esm/extensibility/MultiBodiedExtension/index.js +22 -8
- package/dist/esm/extensibility/MultiBodiedExtension/styles.js +17 -3
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/MediaSingle/index.js +5 -2
- package/dist/esm/ui/MediaSingle/styled.js +44 -9
- package/dist/esm/ui/MultiBodiedExtension/index.js +1 -8
- package/dist/esm/ui/WidthProvider/index.js +31 -49
- package/dist/esm/ui/index.js +1 -1
- package/dist/types/extensibility/Extension/InlineExtension/index.d.ts +5 -4
- package/dist/types/extensibility/Extension/InlineExtension/styles.d.ts +1 -0
- package/dist/types/extensibility/MultiBodiedExtension/index.d.ts +1 -0
- package/dist/types/preset/plugin-injection-api.d.ts +1 -1
- package/dist/types/types/feature-flags.d.ts +16 -0
- package/dist/types/ui/MediaSingle/index.d.ts +2 -1
- package/dist/types/ui/MediaSingle/styled.d.ts +11 -2
- package/dist/types/ui/WidthProvider/index.d.ts +3 -10
- package/dist/types/ui/index.d.ts +1 -1
- package/dist/types-ts4.5/extensibility/Extension/InlineExtension/index.d.ts +5 -4
- package/dist/types-ts4.5/extensibility/Extension/InlineExtension/styles.d.ts +1 -0
- package/dist/types-ts4.5/extensibility/MultiBodiedExtension/index.d.ts +1 -0
- package/dist/types-ts4.5/preset/plugin-injection-api.d.ts +2 -2
- package/dist/types-ts4.5/types/feature-flags.d.ts +16 -0
- package/dist/types-ts4.5/ui/MediaSingle/index.d.ts +2 -1
- package/dist/types-ts4.5/ui/MediaSingle/styled.d.ts +11 -2
- package/dist/types-ts4.5/ui/WidthProvider/index.d.ts +3 -10
- package/dist/types-ts4.5/ui/index.d.ts +1 -1
- package/package.json +4 -1
- package/tsconfig.json +1 -4
|
@@ -23,6 +23,7 @@ export interface Props {
|
|
|
23
23
|
fullWidthMode?: boolean;
|
|
24
24
|
hasFallbackContainer?: boolean;
|
|
25
25
|
handleMediaSingleRef?: React.RefObject<HTMLDivElement>;
|
|
26
|
+
isInsideOfInlineExtension?: boolean;
|
|
26
27
|
}
|
|
27
28
|
export type { MediaSingleWidthType, MediaSingleSize };
|
|
28
|
-
export default function MediaSingle({ layout, width, height, containerWidth, isLoading, pctWidth, size, className, children: propsChildren, nodeType, fullWidthMode, lineLength: editorWidth, hasFallbackContainer, handleMediaSingleRef, }: Props): jsx.JSX.Element;
|
|
29
|
+
export default function MediaSingle({ layout, width, height, containerWidth, isLoading, pctWidth, size, className, children: propsChildren, nodeType, fullWidthMode, lineLength: editorWidth, hasFallbackContainer, handleMediaSingleRef, isInsideOfInlineExtension, }: Props): jsx.JSX.Element;
|
|
@@ -10,7 +10,15 @@ import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema'
|
|
|
10
10
|
* then an image in wide or full-width can not be wider than the image's
|
|
11
11
|
* original width.
|
|
12
12
|
*/
|
|
13
|
-
export declare function calcLegacyWidth(layout: MediaSingleLayout, width: number, containerWidth?: number, fullWidthMode?: boolean, isResized?: boolean): string;
|
|
13
|
+
export declare function calcLegacyWidth(layout: MediaSingleLayout, width: number, containerWidth?: number, fullWidthMode?: boolean, isResized?: boolean, isInsideOfInlineExtension?: boolean): string;
|
|
14
|
+
/**
|
|
15
|
+
* Calculates the image width for non-resized images.
|
|
16
|
+
*
|
|
17
|
+
* If an image has not been resized using the pctWidth attribute,
|
|
18
|
+
* then an image in wide or full-width can not be wider than the image's
|
|
19
|
+
* original width.
|
|
20
|
+
*/
|
|
21
|
+
export declare function calcLegacyWidthForInline(layout: MediaSingleLayout, width: number, containerWidth?: number, fullWidthMode?: boolean, isResized?: boolean): string;
|
|
14
22
|
/**
|
|
15
23
|
* Calculates the image width for previously resized images.
|
|
16
24
|
*
|
|
@@ -34,12 +42,13 @@ export interface MediaSingleWrapperProps {
|
|
|
34
42
|
innerRef?: ((elem: HTMLDivElement) => void) | RefObject<HTMLDivElement>;
|
|
35
43
|
isExtendedResizeExperienceOn?: boolean;
|
|
36
44
|
isNestedNode?: boolean;
|
|
45
|
+
isInsideOfInlineExtension?: boolean;
|
|
37
46
|
}
|
|
38
47
|
/**
|
|
39
48
|
* Can't use `.attrs` to handle highly dynamic styles because we are still
|
|
40
49
|
* supporting `styled-components` v1.
|
|
41
50
|
*/
|
|
42
|
-
export declare const MediaSingleDimensionHelper: ({ containerWidth, fullWidthMode, isResized, layout, mediaSingleWidth, width, isExtendedResizeExperienceOn, isNestedNode, }: MediaSingleWrapperProps) => import("@emotion/react").SerializedStyles;
|
|
51
|
+
export declare const MediaSingleDimensionHelper: ({ containerWidth, fullWidthMode, isResized, layout, mediaSingleWidth, width, isExtendedResizeExperienceOn, isNestedNode, isInsideOfInlineExtension, }: MediaSingleWrapperProps) => import("@emotion/react").SerializedStyles;
|
|
43
52
|
export interface MediaWrapperProps {
|
|
44
53
|
paddingBottom?: string;
|
|
45
54
|
height?: number;
|
|
@@ -15,15 +15,8 @@ export type WidthProviderState = {
|
|
|
15
15
|
};
|
|
16
16
|
type WidthProviderProps = {
|
|
17
17
|
className?: string;
|
|
18
|
+
shouldCheckExistingValue?: boolean;
|
|
19
|
+
children?: React.ReactNode;
|
|
18
20
|
};
|
|
19
|
-
export declare
|
|
20
|
-
state: {
|
|
21
|
-
width: number;
|
|
22
|
-
};
|
|
23
|
-
constructor(props: any);
|
|
24
|
-
render(): jsx.JSX.Element;
|
|
25
|
-
setWidth: ((width: number) => void) & {
|
|
26
|
-
cancel(): void;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
21
|
+
export declare const WidthProvider: ({ className, shouldCheckExistingValue, children, }: WidthProviderProps) => jsx.JSX.Element;
|
|
29
22
|
export { Consumer as WidthConsumer };
|
|
@@ -13,7 +13,7 @@ export { BaseTheme, mapBreakpointToLayoutMaxWidth } from './BaseTheme';
|
|
|
13
13
|
export { default as withOuterListeners } from './with-outer-listeners';
|
|
14
14
|
export type { WithOutsideClickProps } from './with-outer-listeners';
|
|
15
15
|
export type { CardEventClickHandler, CardSurroundings, EventHandlers, LinkEventClickHandler, MentionEventHandler, MentionEventHandlers, SmartCardEventClickHandler, } from './EventHandlers';
|
|
16
|
-
export { WidthContext, WidthConsumer, WidthProvider, getBreakpoint, } from './WidthProvider';
|
|
16
|
+
export { WidthContext, WidthConsumer, WidthProvider, createWidthContext, getBreakpoint, } from './WidthProvider';
|
|
17
17
|
export type { WidthConsumerContext, Breakpoints } from './WidthProvider';
|
|
18
18
|
export { default as overflowShadow, shadowClassNames } from './OverflowShadow';
|
|
19
19
|
export type { OverflowShadowOptions, OverflowShadowProps, OverflowShadowState, } from './OverflowShadow';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "78.
|
|
3
|
+
"version": "78.11.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/"
|
|
@@ -234,6 +234,9 @@
|
|
|
234
234
|
},
|
|
235
235
|
"platform.editor.a11y-floating-toolbar-markup_vexmo": {
|
|
236
236
|
"type": "boolean"
|
|
237
|
+
},
|
|
238
|
+
"platform.editor.inline_extension.extended_lcqdn": {
|
|
239
|
+
"type": "boolean"
|
|
237
240
|
}
|
|
238
241
|
}
|
|
239
242
|
}
|
package/tsconfig.json
CHANGED
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
"extends": "../../../tsconfig.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"baseUrl": "./",
|
|
5
|
-
"types": [
|
|
6
|
-
"cypress"
|
|
7
|
-
]
|
|
8
5
|
},
|
|
9
6
|
"include": [
|
|
10
7
|
"src/**/*.ts",
|
|
@@ -20,4 +17,4 @@
|
|
|
20
17
|
"src/json-schema",
|
|
21
18
|
"../editor-common-tests/src/__tests_external__"
|
|
22
19
|
]
|
|
23
|
-
}
|
|
20
|
+
}
|