@atlaskit/editor-common 76.27.9 → 76.28.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 +14 -0
- package/dist/cjs/media-inline/constants.js +23 -2
- package/dist/cjs/media-inline/inline-image-wrapper.js +11 -21
- package/dist/cjs/media-inline/media-inline-image-card.js +8 -5
- package/dist/cjs/media-inline/styles.js +36 -4
- package/dist/cjs/media-inline/views/icon-wrapper.js +1 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/styles/shared/annotation.js +5 -22
- package/dist/cjs/styles/shared/code-block.js +4 -20
- package/dist/cjs/styles/shared/code-mark.js +2 -6
- package/dist/cjs/styles/shared/panel.js +9 -62
- package/dist/cjs/styles/shared/rule.js +2 -8
- package/dist/cjs/ui/BaseTheme/index.js +8 -15
- package/dist/cjs/ui/DropList/index.js +4 -17
- package/dist/cjs/ui/Expand/index.js +13 -38
- package/dist/cjs/ui/Messages/index.js +6 -6
- package/dist/cjs/ui/PortalProvider/index.js +7 -21
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +5 -13
- package/dist/cjs/ui-menu/DropdownMenu/index.js +10 -27
- package/dist/es2019/media-inline/constants.js +22 -1
- package/dist/es2019/media-inline/inline-image-wrapper.js +16 -21
- package/dist/es2019/media-inline/media-inline-image-card.js +8 -5
- package/dist/es2019/media-inline/styles.js +55 -11
- package/dist/es2019/media-inline/views/icon-wrapper.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/styles/shared/annotation.js +9 -28
- package/dist/es2019/styles/shared/code-block.js +11 -27
- package/dist/es2019/styles/shared/code-mark.js +3 -7
- package/dist/es2019/styles/shared/panel.js +24 -83
- package/dist/es2019/styles/shared/rule.js +3 -9
- package/dist/es2019/ui/BaseTheme/index.js +3 -11
- package/dist/es2019/ui/DropList/index.js +7 -17
- package/dist/es2019/ui/Expand/index.js +18 -44
- package/dist/es2019/ui/Messages/index.js +6 -6
- package/dist/es2019/ui/PortalProvider/index.js +7 -21
- package/dist/es2019/ui-menu/ColorPickerButton/index.js +7 -15
- package/dist/es2019/ui-menu/DropdownMenu/index.js +34 -49
- package/dist/esm/media-inline/constants.js +22 -1
- package/dist/esm/media-inline/inline-image-wrapper.js +13 -21
- package/dist/esm/media-inline/media-inline-image-card.js +8 -5
- package/dist/esm/media-inline/styles.js +35 -3
- package/dist/esm/media-inline/views/icon-wrapper.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/styles/shared/annotation.js +5 -22
- package/dist/esm/styles/shared/code-block.js +6 -22
- package/dist/esm/styles/shared/code-mark.js +3 -7
- package/dist/esm/styles/shared/panel.js +10 -63
- package/dist/esm/styles/shared/rule.js +3 -9
- package/dist/esm/ui/BaseTheme/index.js +9 -15
- package/dist/esm/ui/DropList/index.js +5 -18
- package/dist/esm/ui/Expand/index.js +14 -39
- package/dist/esm/ui/Messages/index.js +6 -6
- package/dist/esm/ui/PortalProvider/index.js +7 -21
- package/dist/esm/ui-menu/ColorPickerButton/index.js +6 -14
- package/dist/esm/ui-menu/DropdownMenu/index.js +11 -28
- package/dist/types/media-inline/constants.d.ts +19 -0
- package/dist/types/media-inline/inline-image-wrapper.d.ts +2 -0
- package/dist/types/media-inline/media-inline-image-card.d.ts +4 -0
- package/dist/types/media-inline/styles.d.ts +11 -0
- package/dist/types/media-inline/types.d.ts +2 -0
- package/dist/types/styles/shared/annotation.d.ts +2 -3
- package/dist/types/styles/shared/code-block.d.ts +1 -2
- package/dist/types/styles/shared/code-mark.d.ts +1 -2
- package/dist/types/styles/shared/panel.d.ts +4 -5
- package/dist/types/styles/shared/rule.d.ts +1 -2
- package/dist/types/ui/BaseTheme/index.d.ts +1 -1
- package/dist/types/ui/Expand/index.d.ts +4 -5
- package/dist/types/ui/Messages/index.d.ts +1 -1
- package/dist/types/ui/PortalProvider/index.d.ts +4 -8
- package/dist/types/utils/getModeFromTheme.d.ts +1 -1
- package/dist/types-ts4.5/media-inline/constants.d.ts +19 -0
- package/dist/types-ts4.5/media-inline/inline-image-wrapper.d.ts +2 -0
- package/dist/types-ts4.5/media-inline/media-inline-image-card.d.ts +4 -0
- package/dist/types-ts4.5/media-inline/styles.d.ts +11 -0
- package/dist/types-ts4.5/media-inline/types.d.ts +2 -0
- package/dist/types-ts4.5/styles/shared/annotation.d.ts +2 -3
- package/dist/types-ts4.5/styles/shared/code-block.d.ts +1 -2
- package/dist/types-ts4.5/styles/shared/code-mark.d.ts +1 -2
- package/dist/types-ts4.5/styles/shared/panel.d.ts +4 -5
- package/dist/types-ts4.5/styles/shared/rule.d.ts +1 -2
- package/dist/types-ts4.5/ui/BaseTheme/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/Expand/index.d.ts +4 -5
- package/dist/types-ts4.5/ui/Messages/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/PortalProvider/index.d.ts +4 -8
- package/dist/types-ts4.5/utils/getModeFromTheme.d.ts +1 -1
- package/package.json +2 -2
- package/dist/cjs/ui/PortalProvider/PortalProviderThemesProvider.js +0 -43
- package/dist/es2019/ui/PortalProvider/PortalProviderThemesProvider.js +0 -37
- package/dist/esm/ui/PortalProvider/PortalProviderThemesProvider.js +0 -36
- package/dist/types/ui/PortalProvider/PortalProviderThemesProvider.d.ts +0 -6
- package/dist/types-ts4.5/ui/PortalProvider/PortalProviderThemesProvider.d.ts +0 -6
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
export declare const INLINE_IMAGE_WRAPPER_CLASS_NAME = "media-inline-image-wrapper";
|
|
2
2
|
export declare const INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY = "--editor-media-inline-image-aspect-ratio";
|
|
3
|
+
export declare const INLINE_IMAGE_BORDER_SIZE_CSS_VAR_KEY = "--editor-media-inline-image-border-size";
|
|
4
|
+
export declare const INLINE_IMAGE_BORDER_COLOR_CSS_VAR_KEY = "--editor-media-inline-image-border-color";
|
|
5
|
+
/**
|
|
6
|
+
* Shifting the mediaInline image component (renders image) to align nicely with
|
|
7
|
+
* mediaInline (renders text) is a bit of a testing ground. This numbers represent
|
|
8
|
+
* shift in top and bottom and size adjustments to make up for lack of 1to1 size
|
|
9
|
+
* mapping
|
|
10
|
+
*/
|
|
3
11
|
export declare const mediaInlineImageStyles: import("@emotion/react").SerializedStyles;
|
|
12
|
+
export declare const wrapperStyle: import("@emotion/react").SerializedStyles;
|
|
13
|
+
export declare const selectedStyle: import("@emotion/react").SerializedStyles;
|
|
14
|
+
export declare const borderStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
2
1
|
export declare const annotationPrefix = "ak-editor-annotation";
|
|
3
2
|
export declare const AnnotationSharedClassNames: {
|
|
4
3
|
focus: string;
|
|
5
4
|
blur: string;
|
|
6
5
|
draft: string;
|
|
7
6
|
};
|
|
8
|
-
export declare const AnnotationSharedCSSByState: (
|
|
7
|
+
export declare const AnnotationSharedCSSByState: () => {
|
|
9
8
|
focus: import("@emotion/react").SerializedStyles;
|
|
10
9
|
blur: import("@emotion/react").SerializedStyles;
|
|
11
10
|
};
|
|
12
|
-
export declare const annotationSharedStyles: (
|
|
11
|
+
export declare const annotationSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
2
1
|
export declare const CodeBlockSharedCssClassName: {
|
|
3
2
|
CODEBLOCK_CONTAINER: string;
|
|
4
3
|
CODEBLOCK_START: string;
|
|
@@ -8,5 +7,5 @@ export declare const CodeBlockSharedCssClassName: {
|
|
|
8
7
|
CODEBLOCK_CONTENT: string;
|
|
9
8
|
DS_CODEBLOCK: string;
|
|
10
9
|
};
|
|
11
|
-
export declare const codeBlockSharedStyles: (
|
|
10
|
+
export declare const codeBlockSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
12
11
|
export declare const codeBlockInListSafariFix: import("@emotion/react").SerializedStyles;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const codeMarkSharedStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
1
|
+
export declare const codeMarkSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
2
|
-
import type { ThemeProps } from '@atlaskit/theme/types';
|
|
3
2
|
export declare const darkPanelColors: {
|
|
4
3
|
info: string;
|
|
5
4
|
error: string;
|
|
@@ -79,7 +78,7 @@ export declare const PanelSharedSelectors: {
|
|
|
79
78
|
yellowWarningIcon: string;
|
|
80
79
|
copyButton: string;
|
|
81
80
|
};
|
|
82
|
-
export declare const getPanelTypeBackgroundNoTokens: (panelType: Exclude<PanelType, PanelType.CUSTOM
|
|
83
|
-
export declare const getPanelTypeBackground: (panelType: Exclude<PanelType, PanelType.CUSTOM
|
|
84
|
-
export declare const panelSharedStylesWithoutPrefix: (
|
|
85
|
-
export declare const panelSharedStyles: (
|
|
81
|
+
export declare const getPanelTypeBackgroundNoTokens: (panelType: Exclude<PanelType, PanelType.CUSTOM>) => string;
|
|
82
|
+
export declare const getPanelTypeBackground: (panelType: Exclude<PanelType, PanelType.CUSTOM>) => string;
|
|
83
|
+
export declare const panelSharedStylesWithoutPrefix: () => import("@emotion/react").SerializedStyles;
|
|
84
|
+
export declare const panelSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const ruleSharedStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
1
|
+
export declare const ruleSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Breakpoints } from '../WidthProvider';
|
|
2
|
+
import type { Breakpoints } from '../WidthProvider';
|
|
3
3
|
export declare function mapBreakpointToLayoutMaxWidth(breakpoint: Breakpoints): 760 | 680;
|
|
4
4
|
type BaseThemeWrapperProps = {
|
|
5
5
|
breakpoint: Breakpoints;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import type { ThemeProps } from '@atlaskit/theme/types';
|
|
4
3
|
export declare const messages: {
|
|
5
4
|
collapseNode: {
|
|
6
5
|
id: string;
|
|
@@ -35,8 +34,8 @@ export declare const ExpandIconWrapper: ({ children, expanded, }: React.HTMLAttr
|
|
|
35
34
|
export declare const expandLayoutWrapperStyle: import("@emotion/react").SerializedStyles;
|
|
36
35
|
export declare const ExpandLayoutWrapperWithRef: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<any>>;
|
|
37
36
|
export declare const sharedExpandStyles: {
|
|
38
|
-
titleInputStyles: (
|
|
39
|
-
titleContainerStyles: (
|
|
40
|
-
containerStyles: (styleProps: StyleProps) => (
|
|
41
|
-
contentStyles: (styleProps: StyleProps) => (
|
|
37
|
+
titleInputStyles: () => import("@emotion/react").SerializedStyles;
|
|
38
|
+
titleContainerStyles: () => import("@emotion/react").SerializedStyles;
|
|
39
|
+
containerStyles: (styleProps: StyleProps) => () => import("@emotion/react").SerializedStyles;
|
|
40
|
+
contentStyles: (styleProps: StyleProps) => () => import("@emotion/react").SerializedStyles;
|
|
42
41
|
};
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IntlShape, WrappedComponentProps } from 'react-intl-next';
|
|
3
|
-
import type {
|
|
4
|
-
import { FireAnalyticsCallback } from '../../analytics';
|
|
2
|
+
import type { IntlShape, WrappedComponentProps } from 'react-intl-next';
|
|
3
|
+
import type { FireAnalyticsCallback } from '../../analytics';
|
|
5
4
|
import { EventDispatcher } from '../../event-dispatcher';
|
|
6
5
|
export type BasePortalProviderProps = {
|
|
7
6
|
render: (portalProviderAPI: PortalProviderAPI) => React.ReactChild | JSX.Element | null;
|
|
8
7
|
onAnalyticsEvent?: FireAnalyticsCallback;
|
|
9
8
|
useAnalyticsContext?: boolean;
|
|
10
|
-
themeMode?: ThemeModes;
|
|
11
9
|
} & WrappedComponentProps;
|
|
12
10
|
export type Portals = Map<HTMLElement, React.ReactChild>;
|
|
13
11
|
export type PortalRendererState = {
|
|
@@ -24,13 +22,11 @@ export declare class PortalProviderAPI extends EventDispatcher {
|
|
|
24
22
|
intl: IntlShape;
|
|
25
23
|
onAnalyticsEvent?: FireAnalyticsCallback;
|
|
26
24
|
useAnalyticsContext?: boolean;
|
|
27
|
-
|
|
28
|
-
constructor(intl: IntlShape, onAnalyticsEvent?: FireAnalyticsCallback, analyticsContext?: boolean, themeMode?: ThemeModes);
|
|
25
|
+
constructor(intl: IntlShape, onAnalyticsEvent?: FireAnalyticsCallback, analyticsContext?: boolean);
|
|
29
26
|
setContext: (context: any) => void;
|
|
30
27
|
render(children: () => React.ReactChild | JSX.Element | null, container: HTMLElement, hasAnalyticsContext?: boolean, hasIntlContext?: boolean): void;
|
|
31
|
-
forceUpdate({ intl
|
|
28
|
+
forceUpdate({ intl }: {
|
|
32
29
|
intl: IntlShape;
|
|
33
|
-
themeMode: ThemeModes | undefined;
|
|
34
30
|
}): void;
|
|
35
31
|
remove(container: HTMLElement): void;
|
|
36
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getModeFromTheme(theme: string): "
|
|
1
|
+
export declare function getModeFromTheme(theme: string): "dark" | "light";
|
|
@@ -1,3 +1,22 @@
|
|
|
1
1
|
export declare const DEFAULT_IMAGE_WIDTH = 250;
|
|
2
2
|
export declare const DEFAULT_IMAGE_HEIGHT = 200;
|
|
3
3
|
export declare const DEFAULT_INLINE_IMAGE_ASPECT_RATIO: number;
|
|
4
|
+
export declare const DEFAULT_INLINE_IMAGE_BORDER_SIZE = 0;
|
|
5
|
+
/**
|
|
6
|
+
* Reference Heights
|
|
7
|
+
*
|
|
8
|
+
* These heights enforce consistent sizes with media inline nodes due to
|
|
9
|
+
* inconsistencies with center aligned inline nodes and text.
|
|
10
|
+
*
|
|
11
|
+
* There is conversation about refactoring media inline nodes to conform to
|
|
12
|
+
* aligning correctly with the surrounding text.
|
|
13
|
+
*/
|
|
14
|
+
export declare const referenceHeights: {
|
|
15
|
+
p: number;
|
|
16
|
+
h1: number;
|
|
17
|
+
h2: number;
|
|
18
|
+
h3: number;
|
|
19
|
+
h4: number;
|
|
20
|
+
h5: number;
|
|
21
|
+
h6: number;
|
|
22
|
+
};
|
|
@@ -8,6 +8,10 @@ export interface MediaInlineImageCardProps {
|
|
|
8
8
|
mediaClient: MediaClient;
|
|
9
9
|
isSelected?: boolean;
|
|
10
10
|
isLazy?: boolean;
|
|
11
|
+
border?: {
|
|
12
|
+
borderSize?: number;
|
|
13
|
+
borderColor?: string;
|
|
14
|
+
};
|
|
11
15
|
}
|
|
12
16
|
export declare const MediaInlineImageCardInternal: FC<MediaInlineImageCardProps & WrappedComponentProps & MediaInlineAttrs>;
|
|
13
17
|
export declare const MediaInlineImageCard: FC<MediaInlineImageCardProps & MediaInlineAttrs>;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
export declare const INLINE_IMAGE_WRAPPER_CLASS_NAME = "media-inline-image-wrapper";
|
|
2
2
|
export declare const INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY = "--editor-media-inline-image-aspect-ratio";
|
|
3
|
+
export declare const INLINE_IMAGE_BORDER_SIZE_CSS_VAR_KEY = "--editor-media-inline-image-border-size";
|
|
4
|
+
export declare const INLINE_IMAGE_BORDER_COLOR_CSS_VAR_KEY = "--editor-media-inline-image-border-color";
|
|
5
|
+
/**
|
|
6
|
+
* Shifting the mediaInline image component (renders image) to align nicely with
|
|
7
|
+
* mediaInline (renders text) is a bit of a testing ground. This numbers represent
|
|
8
|
+
* shift in top and bottom and size adjustments to make up for lack of 1to1 size
|
|
9
|
+
* mapping
|
|
10
|
+
*/
|
|
3
11
|
export declare const mediaInlineImageStyles: import("@emotion/react").SerializedStyles;
|
|
12
|
+
export declare const wrapperStyle: import("@emotion/react").SerializedStyles;
|
|
13
|
+
export declare const selectedStyle: import("@emotion/react").SerializedStyles;
|
|
14
|
+
export declare const borderStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
2
1
|
export declare const annotationPrefix = "ak-editor-annotation";
|
|
3
2
|
export declare const AnnotationSharedClassNames: {
|
|
4
3
|
focus: string;
|
|
5
4
|
blur: string;
|
|
6
5
|
draft: string;
|
|
7
6
|
};
|
|
8
|
-
export declare const AnnotationSharedCSSByState: (
|
|
7
|
+
export declare const AnnotationSharedCSSByState: () => {
|
|
9
8
|
focus: import("@emotion/react").SerializedStyles;
|
|
10
9
|
blur: import("@emotion/react").SerializedStyles;
|
|
11
10
|
};
|
|
12
|
-
export declare const annotationSharedStyles: (
|
|
11
|
+
export declare const annotationSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
2
1
|
export declare const CodeBlockSharedCssClassName: {
|
|
3
2
|
CODEBLOCK_CONTAINER: string;
|
|
4
3
|
CODEBLOCK_START: string;
|
|
@@ -8,5 +7,5 @@ export declare const CodeBlockSharedCssClassName: {
|
|
|
8
7
|
CODEBLOCK_CONTENT: string;
|
|
9
8
|
DS_CODEBLOCK: string;
|
|
10
9
|
};
|
|
11
|
-
export declare const codeBlockSharedStyles: (
|
|
10
|
+
export declare const codeBlockSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
12
11
|
export declare const codeBlockInListSafariFix: import("@emotion/react").SerializedStyles;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const codeMarkSharedStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
1
|
+
export declare const codeMarkSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
2
|
-
import type { ThemeProps } from '@atlaskit/theme/types';
|
|
3
2
|
export declare const darkPanelColors: {
|
|
4
3
|
info: string;
|
|
5
4
|
error: string;
|
|
@@ -79,7 +78,7 @@ export declare const PanelSharedSelectors: {
|
|
|
79
78
|
yellowWarningIcon: string;
|
|
80
79
|
copyButton: string;
|
|
81
80
|
};
|
|
82
|
-
export declare const getPanelTypeBackgroundNoTokens: (panelType: Exclude<PanelType, PanelType.CUSTOM
|
|
83
|
-
export declare const getPanelTypeBackground: (panelType: Exclude<PanelType, PanelType.CUSTOM
|
|
84
|
-
export declare const panelSharedStylesWithoutPrefix: (
|
|
85
|
-
export declare const panelSharedStyles: (
|
|
81
|
+
export declare const getPanelTypeBackgroundNoTokens: (panelType: Exclude<PanelType, PanelType.CUSTOM>) => string;
|
|
82
|
+
export declare const getPanelTypeBackground: (panelType: Exclude<PanelType, PanelType.CUSTOM>) => string;
|
|
83
|
+
export declare const panelSharedStylesWithoutPrefix: () => import("@emotion/react").SerializedStyles;
|
|
84
|
+
export declare const panelSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const ruleSharedStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
1
|
+
export declare const ruleSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Breakpoints } from '../WidthProvider';
|
|
2
|
+
import type { Breakpoints } from '../WidthProvider';
|
|
3
3
|
export declare function mapBreakpointToLayoutMaxWidth(breakpoint: Breakpoints): 760 | 680;
|
|
4
4
|
type BaseThemeWrapperProps = {
|
|
5
5
|
breakpoint: Breakpoints;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import type { ThemeProps } from '@atlaskit/theme/types';
|
|
4
3
|
export declare const messages: {
|
|
5
4
|
collapseNode: {
|
|
6
5
|
id: string;
|
|
@@ -35,8 +34,8 @@ export declare const ExpandIconWrapper: ({ children, expanded, }: React.HTMLAttr
|
|
|
35
34
|
export declare const expandLayoutWrapperStyle: import("@emotion/react").SerializedStyles;
|
|
36
35
|
export declare const ExpandLayoutWrapperWithRef: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<any>>;
|
|
37
36
|
export declare const sharedExpandStyles: {
|
|
38
|
-
titleInputStyles: (
|
|
39
|
-
titleContainerStyles: (
|
|
40
|
-
containerStyles: (styleProps: StyleProps) => (
|
|
41
|
-
contentStyles: (styleProps: StyleProps) => (
|
|
37
|
+
titleInputStyles: () => import("@emotion/react").SerializedStyles;
|
|
38
|
+
titleContainerStyles: () => import("@emotion/react").SerializedStyles;
|
|
39
|
+
containerStyles: (styleProps: StyleProps) => () => import("@emotion/react").SerializedStyles;
|
|
40
|
+
contentStyles: (styleProps: StyleProps) => () => import("@emotion/react").SerializedStyles;
|
|
42
41
|
};
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IntlShape, WrappedComponentProps } from 'react-intl-next';
|
|
3
|
-
import type {
|
|
4
|
-
import { FireAnalyticsCallback } from '../../analytics';
|
|
2
|
+
import type { IntlShape, WrappedComponentProps } from 'react-intl-next';
|
|
3
|
+
import type { FireAnalyticsCallback } from '../../analytics';
|
|
5
4
|
import { EventDispatcher } from '../../event-dispatcher';
|
|
6
5
|
export type BasePortalProviderProps = {
|
|
7
6
|
render: (portalProviderAPI: PortalProviderAPI) => React.ReactChild | JSX.Element | null;
|
|
8
7
|
onAnalyticsEvent?: FireAnalyticsCallback;
|
|
9
8
|
useAnalyticsContext?: boolean;
|
|
10
|
-
themeMode?: ThemeModes;
|
|
11
9
|
} & WrappedComponentProps;
|
|
12
10
|
export type Portals = Map<HTMLElement, React.ReactChild>;
|
|
13
11
|
export type PortalRendererState = {
|
|
@@ -24,13 +22,11 @@ export declare class PortalProviderAPI extends EventDispatcher {
|
|
|
24
22
|
intl: IntlShape;
|
|
25
23
|
onAnalyticsEvent?: FireAnalyticsCallback;
|
|
26
24
|
useAnalyticsContext?: boolean;
|
|
27
|
-
|
|
28
|
-
constructor(intl: IntlShape, onAnalyticsEvent?: FireAnalyticsCallback, analyticsContext?: boolean, themeMode?: ThemeModes);
|
|
25
|
+
constructor(intl: IntlShape, onAnalyticsEvent?: FireAnalyticsCallback, analyticsContext?: boolean);
|
|
29
26
|
setContext: (context: any) => void;
|
|
30
27
|
render(children: () => React.ReactChild | JSX.Element | null, container: HTMLElement, hasAnalyticsContext?: boolean, hasIntlContext?: boolean): void;
|
|
31
|
-
forceUpdate({ intl
|
|
28
|
+
forceUpdate({ intl }: {
|
|
32
29
|
intl: IntlShape;
|
|
33
|
-
themeMode: ThemeModes | undefined;
|
|
34
30
|
}): void;
|
|
35
31
|
remove(container: HTMLElement): void;
|
|
36
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getModeFromTheme(theme: string): "
|
|
1
|
+
export declare function getModeFromTheme(theme: string): "dark" | "light";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "76.
|
|
3
|
+
"version": "76.28.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/"
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"@atlaskit/task-decision": "^17.9.0",
|
|
123
123
|
"@atlaskit/textfield": "^6.0.0",
|
|
124
124
|
"@atlaskit/theme": "^12.6.0",
|
|
125
|
-
"@atlaskit/tokens": "^1.
|
|
125
|
+
"@atlaskit/tokens": "^1.31.0",
|
|
126
126
|
"@atlaskit/tooltip": "^18.1.0",
|
|
127
127
|
"@atlaskit/ufo": "^0.2.0",
|
|
128
128
|
"@atlaskit/width-detector": "^4.1.0",
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.PortalProviderThemeProviders = PortalProviderThemeProviders;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _react2 = require("@emotion/react");
|
|
11
|
-
var _components = _interopRequireDefault(require("@atlaskit/theme/components"));
|
|
12
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
13
|
-
function PortalProviderThemeProviders(props) {
|
|
14
|
-
var children = props.children,
|
|
15
|
-
mode = props.mode;
|
|
16
|
-
var styledComponentsAndEmotionTheme = _react.default.useMemo(
|
|
17
|
-
// This return value should only be one of the following
|
|
18
|
-
// - { [CHANNEL]: { mode },
|
|
19
|
-
// - { theme: { [CHANNEL]: { mode } }
|
|
20
|
-
// However, it appears that consumers have inconsistent expectations
|
|
21
|
-
// regarding the shape.
|
|
22
|
-
// This can be revisited in future work, and for the purposes of
|
|
23
|
-
// fixing https://product-fabric.atlassian.net/browse/ED-14956
|
|
24
|
-
// we are merging the two shapes consumers expect.
|
|
25
|
-
function () {
|
|
26
|
-
var _ref;
|
|
27
|
-
return _ref = {}, (0, _defineProperty2.default)(_ref, _constants.CHANNEL, {
|
|
28
|
-
mode: mode
|
|
29
|
-
}), (0, _defineProperty2.default)(_ref, "theme", (0, _defineProperty2.default)({}, _constants.CHANNEL, {
|
|
30
|
-
mode: mode
|
|
31
|
-
})), _ref;
|
|
32
|
-
}, [mode]);
|
|
33
|
-
var atlaskitTheme = _react.default.useCallback(function () {
|
|
34
|
-
return {
|
|
35
|
-
mode: mode
|
|
36
|
-
};
|
|
37
|
-
}, [mode]);
|
|
38
|
-
return /*#__PURE__*/_react.default.createElement(_react2.ThemeProvider, {
|
|
39
|
-
theme: styledComponentsAndEmotionTheme
|
|
40
|
-
}, /*#__PURE__*/_react.default.createElement(_components.default.Provider, {
|
|
41
|
-
value: atlaskitTheme
|
|
42
|
-
}, children));
|
|
43
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ThemeProvider } from '@emotion/react';
|
|
3
|
-
import AtlaskitTheme from '@atlaskit/theme/components';
|
|
4
|
-
import { CHANNEL } from '@atlaskit/theme/constants';
|
|
5
|
-
export function PortalProviderThemeProviders(props) {
|
|
6
|
-
const {
|
|
7
|
-
children,
|
|
8
|
-
mode
|
|
9
|
-
} = props;
|
|
10
|
-
const styledComponentsAndEmotionTheme = React.useMemo(
|
|
11
|
-
// This return value should only be one of the following
|
|
12
|
-
// - { [CHANNEL]: { mode },
|
|
13
|
-
// - { theme: { [CHANNEL]: { mode } }
|
|
14
|
-
// However, it appears that consumers have inconsistent expectations
|
|
15
|
-
// regarding the shape.
|
|
16
|
-
// This can be revisited in future work, and for the purposes of
|
|
17
|
-
// fixing https://product-fabric.atlassian.net/browse/ED-14956
|
|
18
|
-
// we are merging the two shapes consumers expect.
|
|
19
|
-
() => ({
|
|
20
|
-
[CHANNEL]: {
|
|
21
|
-
mode
|
|
22
|
-
},
|
|
23
|
-
theme: {
|
|
24
|
-
[CHANNEL]: {
|
|
25
|
-
mode
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}), [mode]);
|
|
29
|
-
const atlaskitTheme = React.useCallback(() => ({
|
|
30
|
-
mode
|
|
31
|
-
}), [mode]);
|
|
32
|
-
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
33
|
-
theme: styledComponentsAndEmotionTheme
|
|
34
|
-
}, /*#__PURE__*/React.createElement(AtlaskitTheme.Provider, {
|
|
35
|
-
value: atlaskitTheme
|
|
36
|
-
}, children));
|
|
37
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ThemeProvider } from '@emotion/react';
|
|
4
|
-
import AtlaskitTheme from '@atlaskit/theme/components';
|
|
5
|
-
import { CHANNEL } from '@atlaskit/theme/constants';
|
|
6
|
-
export function PortalProviderThemeProviders(props) {
|
|
7
|
-
var children = props.children,
|
|
8
|
-
mode = props.mode;
|
|
9
|
-
var styledComponentsAndEmotionTheme = React.useMemo(
|
|
10
|
-
// This return value should only be one of the following
|
|
11
|
-
// - { [CHANNEL]: { mode },
|
|
12
|
-
// - { theme: { [CHANNEL]: { mode } }
|
|
13
|
-
// However, it appears that consumers have inconsistent expectations
|
|
14
|
-
// regarding the shape.
|
|
15
|
-
// This can be revisited in future work, and for the purposes of
|
|
16
|
-
// fixing https://product-fabric.atlassian.net/browse/ED-14956
|
|
17
|
-
// we are merging the two shapes consumers expect.
|
|
18
|
-
function () {
|
|
19
|
-
var _ref;
|
|
20
|
-
return _ref = {}, _defineProperty(_ref, CHANNEL, {
|
|
21
|
-
mode: mode
|
|
22
|
-
}), _defineProperty(_ref, "theme", _defineProperty({}, CHANNEL, {
|
|
23
|
-
mode: mode
|
|
24
|
-
})), _ref;
|
|
25
|
-
}, [mode]);
|
|
26
|
-
var atlaskitTheme = React.useCallback(function () {
|
|
27
|
-
return {
|
|
28
|
-
mode: mode
|
|
29
|
-
};
|
|
30
|
-
}, [mode]);
|
|
31
|
-
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
32
|
-
theme: styledComponentsAndEmotionTheme
|
|
33
|
-
}, /*#__PURE__*/React.createElement(AtlaskitTheme.Provider, {
|
|
34
|
-
value: atlaskitTheme
|
|
35
|
-
}, children));
|
|
36
|
-
}
|