@atlaskit/editor-common 76.27.9 → 76.27.10
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 +8 -0
- package/dist/cjs/media-inline/constants.js +21 -2
- package/dist/cjs/media-inline/inline-image-wrapper.js +4 -2
- package/dist/cjs/media-inline/media-inline-image-card.js +3 -3
- package/dist/cjs/media-inline/styles.js +11 -3
- 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 +20 -1
- package/dist/es2019/media-inline/inline-image-wrapper.js +4 -2
- package/dist/es2019/media-inline/media-inline-image-card.js +3 -3
- package/dist/es2019/media-inline/styles.js +24 -9
- 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 +20 -1
- package/dist/esm/media-inline/inline-image-wrapper.js +4 -2
- package/dist/esm/media-inline/media-inline-image-card.js +3 -3
- package/dist/esm/media-inline/styles.js +11 -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 +18 -0
- package/dist/types/media-inline/styles.d.ts +6 -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 +18 -0
- package/dist/types-ts4.5/media-inline/styles.d.ts +6 -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,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.27.
|
|
3
|
+
"version": "76.27.10",
|
|
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
|
-
}
|