@atlaskit/editor-core 164.0.3 → 164.0.4

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 164.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`798c0d0b9c3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/798c0d0b9c3) - [ux] Fixes an issue where some editor nodes did not work with dark mode (which is only used on mobile). When the environment is detected to be mobile, this adds a Atlaskit Theme Provider and a styled-components theme provider to the top of the editors "portals" (not react portals), which allows theming to work.
8
+
3
9
  ## 164.0.3
4
10
 
5
11
  ### Patch Changes
@@ -77,6 +77,8 @@ var _featureFlagsFromProps = require("./plugins/feature-flags-context/feature-fl
77
77
 
78
78
  var _RenderTracking = require("./utils/performance/components/RenderTracking");
79
79
 
80
+ var _checkIfMobileBridge = require("./utils/check-if-mobile-bridge");
81
+
80
82
  var _templateObject;
81
83
 
82
84
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -557,6 +559,22 @@ var Editor = /*#__PURE__*/function (_React$Component) {
557
559
  var renderTracking = (_this$props$performan = this.props.performanceTracking) === null || _this$props$performan === void 0 ? void 0 : (_this$props$performan2 = _this$props$performan.renderTracking) === null || _this$props$performan2 === void 0 ? void 0 : _this$props$performan2.editor;
558
560
  var renderTrackingEnabled = renderTracking === null || renderTracking === void 0 ? void 0 : renderTracking.enabled;
559
561
  var useShallow = renderTracking === null || renderTracking === void 0 ? void 0 : renderTracking.useShallow;
562
+ /**
563
+ * The PortalProviderWithThemeProviders renders portals with atlaskit
564
+ * and the deprecated styled components theme providers.
565
+ *
566
+ * Without this the node views react trees;
567
+ * - do not have access to the atlaskit theme via the `useGlobalTheme` hook
568
+ * - do not have access to the theme when using the `styled`${({theme}) => theme.}` api.
569
+ *
570
+ * Added for a mobile regression, which needed to be fixed on master.
571
+ * Once this makes it's way to develop, we should consider making it the default
572
+ * behaviour.
573
+ *
574
+ * https://product-fabric.atlassian.net/browse/ED-14204
575
+ */
576
+
577
+ var EnvironmentDrivenPortalProvider = (0, _checkIfMobileBridge.checkIfMobileBridge)() ? _PortalProvider.PortalProviderWithThemeProviders : _PortalProvider.PortalProvider;
560
578
  return (0, _react2.jsx)(_analyticsNamespacedContext.FabricEditorAnalyticsContext, {
561
579
  data: {
562
580
  packageName: _versionWrapper.name,
@@ -581,7 +599,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
581
599
  css: fullHeight
582
600
  }, (0, _react2.jsx)(_EditorContext.default, {
583
601
  editorActions: _this5.editorActions
584
- }, (0, _react2.jsx)(_contextAdapter.ContextAdapter, null, (0, _react2.jsx)(_PortalProvider.PortalProvider, {
602
+ }, (0, _react2.jsx)(_contextAdapter.ContextAdapter, null, (0, _react2.jsx)(EnvironmentDrivenPortalProvider, {
585
603
  onAnalyticsEvent: _this5.handleAnalyticsEvent,
586
604
  useAnalyticsContext: _this5.props.UNSAFE_useAnalyticsContext,
587
605
  render: function render(portalProviderAPI) {
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.PortalProviderThemeProviders = PortalProviderThemeProviders;
9
+
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
+
12
+ var _react = _interopRequireDefault(require("react"));
13
+
14
+ var _components = _interopRequireDefault(require("@atlaskit/theme/components"));
15
+
16
+ var _constants = require("@atlaskit/theme/constants");
17
+
18
+ var _react2 = require("@emotion/react");
19
+
20
+ var _styledComponents = require("styled-components");
21
+
22
+ function PortalProviderThemeProviders(props) {
23
+ var children = props.children,
24
+ mode = props.mode;
25
+
26
+ var styledComponentsAndEmotionTheme = _react.default.useMemo( // This return value should only be one of the following
27
+ // - { [CHANNEL]: { mode },
28
+ // - { theme: { [CHANNEL]: { mode } }
29
+ // However, it appears that consumers have inconsistent expectations
30
+ // regarding the shape.
31
+ // This can be revisited in future work, and for the purposes of
32
+ // fixing https://product-fabric.atlassian.net/browse/ED-14956
33
+ // we are merging the two shapes consumers expect.
34
+ function () {
35
+ var _ref;
36
+
37
+ return _ref = {}, (0, _defineProperty2.default)(_ref, _constants.CHANNEL, {
38
+ mode: mode
39
+ }), (0, _defineProperty2.default)(_ref, "theme", (0, _defineProperty2.default)({}, _constants.CHANNEL, {
40
+ mode: mode
41
+ })), _ref;
42
+ }, [mode]);
43
+
44
+ var atlaskitTheme = _react.default.useCallback(function () {
45
+ return {
46
+ mode: mode
47
+ };
48
+ }, [mode]);
49
+
50
+ return /*#__PURE__*/_react.default.createElement(_styledComponents.ThemeProvider, {
51
+ theme: styledComponentsAndEmotionTheme
52
+ }, /*#__PURE__*/_react.default.createElement(_react2.ThemeProvider, {
53
+ theme: styledComponentsAndEmotionTheme
54
+ }, /*#__PURE__*/_react.default.createElement(_components.default.Provider, {
55
+ value: atlaskitTheme
56
+ }, children)));
57
+ }
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.PortalRenderer = exports.PortalProviderAPI = exports.PortalProvider = void 0;
8
+ exports.PortalRenderer = exports.PortalProviderWithThemeProviders = exports.PortalProviderAPI = exports.PortalProvider = void 0;
9
9
 
10
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
11
 
@@ -37,6 +37,10 @@ var _enums = require("../../plugins/analytics/types/enums");
37
37
 
38
38
  var _reactIntlNext = require("react-intl-next");
39
39
 
40
+ var _components = require("@atlaskit/theme/components");
41
+
42
+ var _PortalProviderThemesProvider = require("./PortalProviderThemesProvider");
43
+
40
44
  var _class;
41
45
 
42
46
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
@@ -48,7 +52,7 @@ var PortalProviderAPI = /*#__PURE__*/function (_EventDispatcher) {
48
52
 
49
53
  var _super = _createSuper(PortalProviderAPI);
50
54
 
51
- function PortalProviderAPI(intl, onAnalyticsEvent, analyticsContext) {
55
+ function PortalProviderAPI(intl, onAnalyticsEvent, analyticsContext, themeMode) {
52
56
  var _this;
53
57
 
54
58
  (0, _classCallCheck2.default)(this, PortalProviderAPI);
@@ -60,14 +64,43 @@ var PortalProviderAPI = /*#__PURE__*/function (_EventDispatcher) {
60
64
  _this.intl = intl;
61
65
  _this.onAnalyticsEvent = onAnalyticsEvent;
62
66
  _this.useAnalyticsContext = analyticsContext;
67
+ _this.themeMode = themeMode;
63
68
  return _this;
64
69
  }
65
70
 
66
71
  (0, _createClass2.default)(PortalProviderAPI, [{
67
72
  key: "render",
68
73
  value: function render(children, container) {
74
+ var _this2 = this;
75
+
69
76
  var hasAnalyticsContext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
70
77
  var hasIntlContext = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
78
+
79
+ if (this.themeMode) {
80
+ var childrenWithThemeProviders = function childrenWithThemeProviders() {
81
+ return /*#__PURE__*/_react.default.createElement(_PortalProviderThemesProvider.PortalProviderThemeProviders, {
82
+ mode: _this2.themeMode
83
+ }, children());
84
+ };
85
+
86
+ this.portals.set(container, {
87
+ children: childrenWithThemeProviders,
88
+ hasAnalyticsContext: hasAnalyticsContext,
89
+ hasIntlContext: hasIntlContext
90
+ });
91
+
92
+ var _wrappedChildren = this.useAnalyticsContext ? /*#__PURE__*/_react.default.createElement(AnalyticsContextWrapper, null, childrenWithThemeProviders()) : childrenWithThemeProviders();
93
+
94
+ if (hasIntlContext) {
95
+ _wrappedChildren = /*#__PURE__*/_react.default.createElement(_reactIntlNext.RawIntlProvider, {
96
+ value: this.intl
97
+ }, _wrappedChildren);
98
+ }
99
+
100
+ (0, _reactDom.unstable_renderSubtreeIntoContainer)(this.context, _wrappedChildren, container);
101
+ return;
102
+ }
103
+
71
104
  this.portals.set(container, {
72
105
  children: children,
73
106
  hasAnalyticsContext: hasAnalyticsContext,
@@ -89,28 +122,28 @@ var PortalProviderAPI = /*#__PURE__*/function (_EventDispatcher) {
89
122
  }, {
90
123
  key: "forceUpdate",
91
124
  value: function forceUpdate(_ref) {
92
- var _this2 = this;
125
+ var _this3 = this;
93
126
 
94
127
  var intl = _ref.intl;
95
128
  this.intl = intl;
96
129
  this.portals.forEach(function (portal, container) {
97
- if (!portal.hasAnalyticsContext && !_this2.useAnalyticsContext && !portal.hasIntlContext) {
130
+ if (!portal.hasAnalyticsContext && !_this3.useAnalyticsContext && !portal.hasIntlContext) {
98
131
  return;
99
132
  }
100
133
 
101
134
  var wrappedChildren = portal.children();
102
135
 
103
- if (portal.hasAnalyticsContext && _this2.useAnalyticsContext) {
136
+ if (portal.hasAnalyticsContext && _this3.useAnalyticsContext) {
104
137
  wrappedChildren = /*#__PURE__*/_react.default.createElement(AnalyticsContextWrapper, null, wrappedChildren);
105
138
  }
106
139
 
107
140
  if (portal.hasIntlContext) {
108
141
  wrappedChildren = /*#__PURE__*/_react.default.createElement(_reactIntlNext.RawIntlProvider, {
109
- value: _this2.intl
142
+ value: _this3.intl
110
143
  }, wrappedChildren);
111
144
  }
112
145
 
113
- (0, _reactDom.unstable_renderSubtreeIntoContainer)(_this2.context, wrappedChildren, container);
146
+ (0, _reactDom.unstable_renderSubtreeIntoContainer)(_this3.context, wrappedChildren, container);
114
147
  });
115
148
  }
116
149
  }, {
@@ -157,12 +190,12 @@ var BasePortalProvider = /*#__PURE__*/function (_React$Component) {
157
190
  var _super2 = _createSuper(BasePortalProvider);
158
191
 
159
192
  function BasePortalProvider(props) {
160
- var _this3;
193
+ var _this4;
161
194
 
162
195
  (0, _classCallCheck2.default)(this, BasePortalProvider);
163
- _this3 = _super2.call(this, props);
164
- _this3.portalProviderAPI = new PortalProviderAPI(props.intl, props.onAnalyticsEvent, props.useAnalyticsContext);
165
- return _this3;
196
+ _this4 = _super2.call(this, props);
197
+ _this4.portalProviderAPI = new PortalProviderAPI(props.intl, props.onAnalyticsEvent, props.useAnalyticsContext, props.themeMode);
198
+ return _this4;
166
199
  }
167
200
 
168
201
  (0, _createClass2.default)(BasePortalProvider, [{
@@ -185,27 +218,41 @@ var BasePortalProvider = /*#__PURE__*/function (_React$Component) {
185
218
  var PortalProvider = (0, _reactIntlNext.injectIntl)(BasePortalProvider);
186
219
  exports.PortalProvider = PortalProvider;
187
220
 
221
+ var PortalProviderWithThemeProviders = function PortalProviderWithThemeProviders(props) {
222
+ var intl = (0, _reactIntlNext.useIntl)();
223
+ var globalTheme = (0, _components.useGlobalTheme)();
224
+ return /*#__PURE__*/_react.default.createElement(BasePortalProvider, {
225
+ intl: intl,
226
+ themeMode: globalTheme.mode,
227
+ onAnalyticsEvent: props.onAnalyticsEvent,
228
+ useAnalyticsContext: props.useAnalyticsContext,
229
+ render: props.render
230
+ });
231
+ };
232
+
233
+ exports.PortalProviderWithThemeProviders = PortalProviderWithThemeProviders;
234
+
188
235
  var PortalRenderer = /*#__PURE__*/function (_React$Component2) {
189
236
  (0, _inherits2.default)(PortalRenderer, _React$Component2);
190
237
 
191
238
  var _super3 = _createSuper(PortalRenderer);
192
239
 
193
240
  function PortalRenderer(props) {
194
- var _this4;
241
+ var _this5;
195
242
 
196
243
  (0, _classCallCheck2.default)(this, PortalRenderer);
197
- _this4 = _super3.call(this, props);
198
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this4), "handleUpdate", function (portals) {
199
- return _this4.setState({
244
+ _this5 = _super3.call(this, props);
245
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this5), "handleUpdate", function (portals) {
246
+ return _this5.setState({
200
247
  portals: portals
201
248
  });
202
249
  });
203
- props.portalProviderAPI.setContext((0, _assertThisInitialized2.default)(_this4));
204
- props.portalProviderAPI.on('update', _this4.handleUpdate);
205
- _this4.state = {
250
+ props.portalProviderAPI.setContext((0, _assertThisInitialized2.default)(_this5));
251
+ props.portalProviderAPI.on('update', _this5.handleUpdate);
252
+ _this5.state = {
206
253
  portals: new Map()
207
254
  };
208
- return _this4;
255
+ return _this5;
209
256
  }
210
257
 
211
258
  (0, _createClass2.default)(PortalRenderer, [{
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.checkIfMobileBridge = checkIfMobileBridge;
7
+
8
+ function checkIfMobileBridge() {
9
+ /**
10
+ * This variable is setup on mobile prior to the editor being
11
+ * rendered.
12
+ *
13
+ * -- packages/editor/editor-mobile-bridge/src/editor/native-to-web/bridge-initialiser.ts
14
+ * - packages/editor/editor-mobile-bridge/src/__tests__/integration-webview/_mocks/editor-component.tsx
15
+ */
16
+ var isMobileBridge = typeof window !== 'undefined' && 'bridge' in window && // @ts-ignore
17
+ 'mediaMap' in window.bridge;
18
+ return isMobileBridge;
19
+ }
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/editor-core";
8
8
  exports.name = name;
9
- var version = "164.0.3";
9
+ var version = "164.0.4";
10
10
  exports.version = version;
11
11
 
12
12
  var nextMajorVersion = function nextMajorVersion() {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "164.0.3",
3
+ "version": "164.0.4",
4
4
  "sideEffects": false
5
5
  }
@@ -18,7 +18,7 @@ import { getUiComponent } from './create-editor';
18
18
  import EditorActions from './actions';
19
19
  import { ReactEditorView } from './create-editor';
20
20
  import EditorContext from './ui/EditorContext';
21
- import { PortalProvider, PortalRenderer } from './ui/PortalProvider';
21
+ import { PortalProvider, PortalProviderWithThemeProviders, PortalRenderer } from './ui/PortalProvider';
22
22
  import { nextMajorVersion } from './version-wrapper';
23
23
  import { ContextAdapter } from './nodeviews/context-adapter';
24
24
  import measurements from './utils/performance/measure-enum';
@@ -27,6 +27,7 @@ import { fireAnalyticsEvent, EVENT_TYPE, ACTION_SUBJECT, ACTION } from './plugin
27
27
  import ErrorBoundary from './create-editor/ErrorBoundary';
28
28
  import { createFeatureFlagsFromProps } from './plugins/feature-flags-context/feature-flags-from-props';
29
29
  import { RenderTracking } from './utils/performance/components/RenderTracking';
30
+ import { checkIfMobileBridge } from './utils/check-if-mobile-bridge';
30
31
  const fullHeight = css`
31
32
  height: 100%;
32
33
  `;
@@ -423,6 +424,22 @@ export default class Editor extends React.Component {
423
424
  const renderTracking = (_this$props$performan3 = this.props.performanceTracking) === null || _this$props$performan3 === void 0 ? void 0 : (_this$props$performan4 = _this$props$performan3.renderTracking) === null || _this$props$performan4 === void 0 ? void 0 : _this$props$performan4.editor;
424
425
  const renderTrackingEnabled = renderTracking === null || renderTracking === void 0 ? void 0 : renderTracking.enabled;
425
426
  const useShallow = renderTracking === null || renderTracking === void 0 ? void 0 : renderTracking.useShallow;
427
+ /**
428
+ * The PortalProviderWithThemeProviders renders portals with atlaskit
429
+ * and the deprecated styled components theme providers.
430
+ *
431
+ * Without this the node views react trees;
432
+ * - do not have access to the atlaskit theme via the `useGlobalTheme` hook
433
+ * - do not have access to the theme when using the `styled`${({theme}) => theme.}` api.
434
+ *
435
+ * Added for a mobile regression, which needed to be fixed on master.
436
+ * Once this makes it's way to develop, we should consider making it the default
437
+ * behaviour.
438
+ *
439
+ * https://product-fabric.atlassian.net/browse/ED-14204
440
+ */
441
+
442
+ const EnvironmentDrivenPortalProvider = checkIfMobileBridge() ? PortalProviderWithThemeProviders : PortalProvider;
426
443
  return jsx(FabricEditorAnalyticsContext, {
427
444
  data: {
428
445
  packageName: name,
@@ -446,7 +463,7 @@ export default class Editor extends React.Component {
446
463
  css: fullHeight
447
464
  }, jsx(EditorContext, {
448
465
  editorActions: this.editorActions
449
- }, jsx(ContextAdapter, null, jsx(PortalProvider, {
466
+ }, jsx(ContextAdapter, null, jsx(EnvironmentDrivenPortalProvider, {
450
467
  onAnalyticsEvent: this.handleAnalyticsEvent,
451
468
  useAnalyticsContext: this.props.UNSAFE_useAnalyticsContext,
452
469
  render: portalProviderAPI => jsx(Fragment, null, jsx(ReactEditorView, {
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import AtlaskitTheme from '@atlaskit/theme/components';
3
+ import { CHANNEL } from '@atlaskit/theme/constants';
4
+ import { ThemeProvider } from '@emotion/react';
5
+ import { ThemeProvider as DeprectateStyledComponentsProvider } from 'styled-components';
6
+ export function PortalProviderThemeProviders(props) {
7
+ const {
8
+ children,
9
+ mode
10
+ } = props;
11
+ const styledComponentsAndEmotionTheme = React.useMemo( // 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(DeprectateStyledComponentsProvider, {
33
+ theme: styledComponentsAndEmotionTheme
34
+ }, /*#__PURE__*/React.createElement(ThemeProvider, {
35
+ theme: styledComponentsAndEmotionTheme
36
+ }, /*#__PURE__*/React.createElement(AtlaskitTheme.Provider, {
37
+ value: atlaskitTheme
38
+ }, children)));
39
+ }
@@ -8,9 +8,11 @@ import PropTypes from 'prop-types';
8
8
  import { default as AnalyticsReactContext } from '@atlaskit/analytics-next-stable-react-context';
9
9
  import { EventDispatcher } from '../../event-dispatcher';
10
10
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../plugins/analytics/types/enums';
11
- import { injectIntl, RawIntlProvider } from 'react-intl-next';
11
+ import { useIntl, RawIntlProvider, injectIntl } from 'react-intl-next';
12
+ import { useGlobalTheme } from '@atlaskit/theme/components';
13
+ import { PortalProviderThemeProviders } from './PortalProviderThemesProvider';
12
14
  export class PortalProviderAPI extends EventDispatcher {
13
- constructor(intl, onAnalyticsEvent, analyticsContext) {
15
+ constructor(intl, onAnalyticsEvent, analyticsContext, themeMode) {
14
16
  super();
15
17
 
16
18
  _defineProperty(this, "portals", new Map());
@@ -22,9 +24,32 @@ export class PortalProviderAPI extends EventDispatcher {
22
24
  this.intl = intl;
23
25
  this.onAnalyticsEvent = onAnalyticsEvent;
24
26
  this.useAnalyticsContext = analyticsContext;
27
+ this.themeMode = themeMode;
25
28
  }
26
29
 
27
30
  render(children, container, hasAnalyticsContext = false, hasIntlContext = false) {
31
+ if (this.themeMode) {
32
+ const childrenWithThemeProviders = () => /*#__PURE__*/React.createElement(PortalProviderThemeProviders, {
33
+ mode: this.themeMode
34
+ }, children());
35
+
36
+ this.portals.set(container, {
37
+ children: childrenWithThemeProviders,
38
+ hasAnalyticsContext,
39
+ hasIntlContext
40
+ });
41
+ let wrappedChildren = this.useAnalyticsContext ? /*#__PURE__*/React.createElement(AnalyticsContextWrapper, null, childrenWithThemeProviders()) : childrenWithThemeProviders();
42
+
43
+ if (hasIntlContext) {
44
+ wrappedChildren = /*#__PURE__*/React.createElement(RawIntlProvider, {
45
+ value: this.intl
46
+ }, wrappedChildren);
47
+ }
48
+
49
+ unstable_renderSubtreeIntoContainer(this.context, wrappedChildren, container);
50
+ return;
51
+ }
52
+
28
53
  this.portals.set(container, {
29
54
  children,
30
55
  hasAnalyticsContext,
@@ -105,7 +130,7 @@ export class PortalProviderAPI extends EventDispatcher {
105
130
  class BasePortalProvider extends React.Component {
106
131
  constructor(props) {
107
132
  super(props);
108
- this.portalProviderAPI = new PortalProviderAPI(props.intl, props.onAnalyticsEvent, props.useAnalyticsContext);
133
+ this.portalProviderAPI = new PortalProviderAPI(props.intl, props.onAnalyticsEvent, props.useAnalyticsContext, props.themeMode);
109
134
  }
110
135
 
111
136
  render() {
@@ -123,6 +148,17 @@ class BasePortalProvider extends React.Component {
123
148
  _defineProperty(BasePortalProvider, "displayName", 'PortalProvider');
124
149
 
125
150
  export const PortalProvider = injectIntl(BasePortalProvider);
151
+ export const PortalProviderWithThemeProviders = props => {
152
+ const intl = useIntl();
153
+ const globalTheme = useGlobalTheme();
154
+ return /*#__PURE__*/React.createElement(BasePortalProvider, {
155
+ intl: intl,
156
+ themeMode: globalTheme.mode,
157
+ onAnalyticsEvent: props.onAnalyticsEvent,
158
+ useAnalyticsContext: props.useAnalyticsContext,
159
+ render: props.render
160
+ });
161
+ };
126
162
  export class PortalRenderer extends React.Component {
127
163
  constructor(props) {
128
164
  super(props);
@@ -0,0 +1,12 @@
1
+ export function checkIfMobileBridge() {
2
+ /**
3
+ * This variable is setup on mobile prior to the editor being
4
+ * rendered.
5
+ *
6
+ * -- packages/editor/editor-mobile-bridge/src/editor/native-to-web/bridge-initialiser.ts
7
+ * - packages/editor/editor-mobile-bridge/src/__tests__/integration-webview/_mocks/editor-component.tsx
8
+ */
9
+ const isMobileBridge = typeof window !== 'undefined' && 'bridge' in window && // @ts-ignore
10
+ 'mediaMap' in window.bridge;
11
+ return isMobileBridge;
12
+ }
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "164.0.3";
2
+ export const version = "164.0.4";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "164.0.3",
3
+ "version": "164.0.4",
4
4
  "sideEffects": false
5
5
  }
@@ -37,7 +37,7 @@ import { getUiComponent } from './create-editor';
37
37
  import EditorActions from './actions';
38
38
  import { ReactEditorView } from './create-editor';
39
39
  import EditorContext from './ui/EditorContext';
40
- import { PortalProvider, PortalRenderer } from './ui/PortalProvider';
40
+ import { PortalProvider, PortalProviderWithThemeProviders, PortalRenderer } from './ui/PortalProvider';
41
41
  import { nextMajorVersion } from './version-wrapper';
42
42
  import { ContextAdapter } from './nodeviews/context-adapter';
43
43
  import measurements from './utils/performance/measure-enum';
@@ -46,6 +46,7 @@ import { fireAnalyticsEvent, EVENT_TYPE, ACTION_SUBJECT, ACTION } from './plugin
46
46
  import ErrorBoundary from './create-editor/ErrorBoundary';
47
47
  import { createFeatureFlagsFromProps } from './plugins/feature-flags-context/feature-flags-from-props';
48
48
  import { RenderTracking } from './utils/performance/components/RenderTracking';
49
+ import { checkIfMobileBridge } from './utils/check-if-mobile-bridge';
49
50
  var fullHeight = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: 100%;\n"])));
50
51
 
51
52
  var Editor = /*#__PURE__*/function (_React$Component) {
@@ -518,6 +519,22 @@ var Editor = /*#__PURE__*/function (_React$Component) {
518
519
  var renderTracking = (_this$props$performan = this.props.performanceTracking) === null || _this$props$performan === void 0 ? void 0 : (_this$props$performan2 = _this$props$performan.renderTracking) === null || _this$props$performan2 === void 0 ? void 0 : _this$props$performan2.editor;
519
520
  var renderTrackingEnabled = renderTracking === null || renderTracking === void 0 ? void 0 : renderTracking.enabled;
520
521
  var useShallow = renderTracking === null || renderTracking === void 0 ? void 0 : renderTracking.useShallow;
522
+ /**
523
+ * The PortalProviderWithThemeProviders renders portals with atlaskit
524
+ * and the deprecated styled components theme providers.
525
+ *
526
+ * Without this the node views react trees;
527
+ * - do not have access to the atlaskit theme via the `useGlobalTheme` hook
528
+ * - do not have access to the theme when using the `styled`${({theme}) => theme.}` api.
529
+ *
530
+ * Added for a mobile regression, which needed to be fixed on master.
531
+ * Once this makes it's way to develop, we should consider making it the default
532
+ * behaviour.
533
+ *
534
+ * https://product-fabric.atlassian.net/browse/ED-14204
535
+ */
536
+
537
+ var EnvironmentDrivenPortalProvider = checkIfMobileBridge() ? PortalProviderWithThemeProviders : PortalProvider;
521
538
  return jsx(FabricEditorAnalyticsContext, {
522
539
  data: {
523
540
  packageName: name,
@@ -542,7 +559,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
542
559
  css: fullHeight
543
560
  }, jsx(EditorContext, {
544
561
  editorActions: _this5.editorActions
545
- }, jsx(ContextAdapter, null, jsx(PortalProvider, {
562
+ }, jsx(ContextAdapter, null, jsx(EnvironmentDrivenPortalProvider, {
546
563
  onAnalyticsEvent: _this5.handleAnalyticsEvent,
547
564
  useAnalyticsContext: _this5.props.UNSAFE_useAnalyticsContext,
548
565
  render: function render(portalProviderAPI) {
@@ -0,0 +1,39 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import React from 'react';
3
+ import AtlaskitTheme from '@atlaskit/theme/components';
4
+ import { CHANNEL } from '@atlaskit/theme/constants';
5
+ import { ThemeProvider } from '@emotion/react';
6
+ import { ThemeProvider as DeprectateStyledComponentsProvider } from 'styled-components';
7
+ export function PortalProviderThemeProviders(props) {
8
+ var children = props.children,
9
+ mode = props.mode;
10
+ var styledComponentsAndEmotionTheme = React.useMemo( // 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
+
21
+ return _ref = {}, _defineProperty(_ref, CHANNEL, {
22
+ mode: mode
23
+ }), _defineProperty(_ref, "theme", _defineProperty({}, CHANNEL, {
24
+ mode: mode
25
+ })), _ref;
26
+ }, [mode]);
27
+ var atlaskitTheme = React.useCallback(function () {
28
+ return {
29
+ mode: mode
30
+ };
31
+ }, [mode]);
32
+ return /*#__PURE__*/React.createElement(DeprectateStyledComponentsProvider, {
33
+ theme: styledComponentsAndEmotionTheme
34
+ }, /*#__PURE__*/React.createElement(ThemeProvider, {
35
+ theme: styledComponentsAndEmotionTheme
36
+ }, /*#__PURE__*/React.createElement(AtlaskitTheme.Provider, {
37
+ value: atlaskitTheme
38
+ }, children)));
39
+ }
@@ -19,13 +19,15 @@ import PropTypes from 'prop-types';
19
19
  import { default as AnalyticsReactContext } from '@atlaskit/analytics-next-stable-react-context';
20
20
  import { EventDispatcher } from '../../event-dispatcher';
21
21
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../plugins/analytics/types/enums';
22
- import { injectIntl, RawIntlProvider } from 'react-intl-next';
22
+ import { useIntl, RawIntlProvider, injectIntl } from 'react-intl-next';
23
+ import { useGlobalTheme } from '@atlaskit/theme/components';
24
+ import { PortalProviderThemeProviders } from './PortalProviderThemesProvider';
23
25
  export var PortalProviderAPI = /*#__PURE__*/function (_EventDispatcher) {
24
26
  _inherits(PortalProviderAPI, _EventDispatcher);
25
27
 
26
28
  var _super = _createSuper(PortalProviderAPI);
27
29
 
28
- function PortalProviderAPI(intl, onAnalyticsEvent, analyticsContext) {
30
+ function PortalProviderAPI(intl, onAnalyticsEvent, analyticsContext, themeMode) {
29
31
  var _this;
30
32
 
31
33
  _classCallCheck(this, PortalProviderAPI);
@@ -41,14 +43,43 @@ export var PortalProviderAPI = /*#__PURE__*/function (_EventDispatcher) {
41
43
  _this.intl = intl;
42
44
  _this.onAnalyticsEvent = onAnalyticsEvent;
43
45
  _this.useAnalyticsContext = analyticsContext;
46
+ _this.themeMode = themeMode;
44
47
  return _this;
45
48
  }
46
49
 
47
50
  _createClass(PortalProviderAPI, [{
48
51
  key: "render",
49
52
  value: function render(children, container) {
53
+ var _this2 = this;
54
+
50
55
  var hasAnalyticsContext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
51
56
  var hasIntlContext = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
57
+
58
+ if (this.themeMode) {
59
+ var childrenWithThemeProviders = function childrenWithThemeProviders() {
60
+ return /*#__PURE__*/React.createElement(PortalProviderThemeProviders, {
61
+ mode: _this2.themeMode
62
+ }, children());
63
+ };
64
+
65
+ this.portals.set(container, {
66
+ children: childrenWithThemeProviders,
67
+ hasAnalyticsContext: hasAnalyticsContext,
68
+ hasIntlContext: hasIntlContext
69
+ });
70
+
71
+ var _wrappedChildren = this.useAnalyticsContext ? /*#__PURE__*/React.createElement(AnalyticsContextWrapper, null, childrenWithThemeProviders()) : childrenWithThemeProviders();
72
+
73
+ if (hasIntlContext) {
74
+ _wrappedChildren = /*#__PURE__*/React.createElement(RawIntlProvider, {
75
+ value: this.intl
76
+ }, _wrappedChildren);
77
+ }
78
+
79
+ unstable_renderSubtreeIntoContainer(this.context, _wrappedChildren, container);
80
+ return;
81
+ }
82
+
52
83
  this.portals.set(container, {
53
84
  children: children,
54
85
  hasAnalyticsContext: hasAnalyticsContext,
@@ -70,28 +101,28 @@ export var PortalProviderAPI = /*#__PURE__*/function (_EventDispatcher) {
70
101
  }, {
71
102
  key: "forceUpdate",
72
103
  value: function forceUpdate(_ref) {
73
- var _this2 = this;
104
+ var _this3 = this;
74
105
 
75
106
  var intl = _ref.intl;
76
107
  this.intl = intl;
77
108
  this.portals.forEach(function (portal, container) {
78
- if (!portal.hasAnalyticsContext && !_this2.useAnalyticsContext && !portal.hasIntlContext) {
109
+ if (!portal.hasAnalyticsContext && !_this3.useAnalyticsContext && !portal.hasIntlContext) {
79
110
  return;
80
111
  }
81
112
 
82
113
  var wrappedChildren = portal.children();
83
114
 
84
- if (portal.hasAnalyticsContext && _this2.useAnalyticsContext) {
115
+ if (portal.hasAnalyticsContext && _this3.useAnalyticsContext) {
85
116
  wrappedChildren = /*#__PURE__*/React.createElement(AnalyticsContextWrapper, null, wrappedChildren);
86
117
  }
87
118
 
88
119
  if (portal.hasIntlContext) {
89
120
  wrappedChildren = /*#__PURE__*/React.createElement(RawIntlProvider, {
90
- value: _this2.intl
121
+ value: _this3.intl
91
122
  }, wrappedChildren);
92
123
  }
93
124
 
94
- unstable_renderSubtreeIntoContainer(_this2.context, wrappedChildren, container);
125
+ unstable_renderSubtreeIntoContainer(_this3.context, wrappedChildren, container);
95
126
  });
96
127
  }
97
128
  }, {
@@ -137,13 +168,13 @@ var BasePortalProvider = /*#__PURE__*/function (_React$Component) {
137
168
  var _super2 = _createSuper(BasePortalProvider);
138
169
 
139
170
  function BasePortalProvider(props) {
140
- var _this3;
171
+ var _this4;
141
172
 
142
173
  _classCallCheck(this, BasePortalProvider);
143
174
 
144
- _this3 = _super2.call(this, props);
145
- _this3.portalProviderAPI = new PortalProviderAPI(props.intl, props.onAnalyticsEvent, props.useAnalyticsContext);
146
- return _this3;
175
+ _this4 = _super2.call(this, props);
176
+ _this4.portalProviderAPI = new PortalProviderAPI(props.intl, props.onAnalyticsEvent, props.useAnalyticsContext, props.themeMode);
177
+ return _this4;
147
178
  }
148
179
 
149
180
  _createClass(BasePortalProvider, [{
@@ -166,30 +197,41 @@ var BasePortalProvider = /*#__PURE__*/function (_React$Component) {
166
197
  _defineProperty(BasePortalProvider, "displayName", 'PortalProvider');
167
198
 
168
199
  export var PortalProvider = injectIntl(BasePortalProvider);
200
+ export var PortalProviderWithThemeProviders = function PortalProviderWithThemeProviders(props) {
201
+ var intl = useIntl();
202
+ var globalTheme = useGlobalTheme();
203
+ return /*#__PURE__*/React.createElement(BasePortalProvider, {
204
+ intl: intl,
205
+ themeMode: globalTheme.mode,
206
+ onAnalyticsEvent: props.onAnalyticsEvent,
207
+ useAnalyticsContext: props.useAnalyticsContext,
208
+ render: props.render
209
+ });
210
+ };
169
211
  export var PortalRenderer = /*#__PURE__*/function (_React$Component2) {
170
212
  _inherits(PortalRenderer, _React$Component2);
171
213
 
172
214
  var _super3 = _createSuper(PortalRenderer);
173
215
 
174
216
  function PortalRenderer(props) {
175
- var _this4;
217
+ var _this5;
176
218
 
177
219
  _classCallCheck(this, PortalRenderer);
178
220
 
179
- _this4 = _super3.call(this, props);
221
+ _this5 = _super3.call(this, props);
180
222
 
181
- _defineProperty(_assertThisInitialized(_this4), "handleUpdate", function (portals) {
182
- return _this4.setState({
223
+ _defineProperty(_assertThisInitialized(_this5), "handleUpdate", function (portals) {
224
+ return _this5.setState({
183
225
  portals: portals
184
226
  });
185
227
  });
186
228
 
187
- props.portalProviderAPI.setContext(_assertThisInitialized(_this4));
188
- props.portalProviderAPI.on('update', _this4.handleUpdate);
189
- _this4.state = {
229
+ props.portalProviderAPI.setContext(_assertThisInitialized(_this5));
230
+ props.portalProviderAPI.on('update', _this5.handleUpdate);
231
+ _this5.state = {
190
232
  portals: new Map()
191
233
  };
192
- return _this4;
234
+ return _this5;
193
235
  }
194
236
 
195
237
  _createClass(PortalRenderer, [{
@@ -0,0 +1,12 @@
1
+ export function checkIfMobileBridge() {
2
+ /**
3
+ * This variable is setup on mobile prior to the editor being
4
+ * rendered.
5
+ *
6
+ * -- packages/editor/editor-mobile-bridge/src/editor/native-to-web/bridge-initialiser.ts
7
+ * - packages/editor/editor-mobile-bridge/src/__tests__/integration-webview/_mocks/editor-component.tsx
8
+ */
9
+ var isMobileBridge = typeof window !== 'undefined' && 'bridge' in window && // @ts-ignore
10
+ 'mediaMap' in window.bridge;
11
+ return isMobileBridge;
12
+ }
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "164.0.3";
2
+ export var version = "164.0.4";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "164.0.3",
3
+ "version": "164.0.4",
4
4
  "sideEffects": false
5
5
  }
@@ -19,6 +19,7 @@ export declare const ScrollContainer: import("react").ForwardRefExoticComponent<
19
19
  'aria-haspopup'?: boolean | "dialog" | "menu" | "false" | "true" | "listbox" | "tree" | "grid" | undefined;
20
20
  children?: import("react").ReactNode;
21
21
  ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
22
+ theme?: any;
22
23
  pattern?: string | undefined;
23
24
  value?: string | number | string[] | undefined;
24
25
  type?: string | undefined;
@@ -364,8 +365,7 @@ export declare const ScrollContainer: import("react").ForwardRefExoticComponent<
364
365
  onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
365
366
  onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
366
367
  css?: import("@emotion/core").InterpolationWithTheme<any>;
367
- theme?: any;
368
- }, "cite" | "data" | "dir" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "default" | "mediaGroup" | "media" | "content" | "aria-label" | "aria-haspopup" | "children" | "pattern" | "value" | "type" | "width" | "accessKey" | "draggable" | "hidden" | "lang" | "className" | "id" | "prefix" | "contentEditable" | "inputMode" | "nonce" | "tabIndex" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "autoFocus" | "color" | "name" | "key" | "action" | "disabled" | "height" | "target" | "start" | "onClick" | "onMouseEnter" | "onMouseLeave" | "selected" | "href" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "method" | "min" | "minLength" | "multiple" | "muted" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "spellCheck" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "theme"> & import("react").RefAttributes<HTMLDivElement>>;
368
+ }, "cite" | "data" | "dir" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "default" | "mediaGroup" | "media" | "content" | "aria-label" | "aria-haspopup" | "children" | "theme" | "pattern" | "value" | "type" | "width" | "accessKey" | "draggable" | "hidden" | "lang" | "className" | "id" | "prefix" | "contentEditable" | "inputMode" | "nonce" | "tabIndex" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "autoFocus" | "color" | "name" | "key" | "action" | "disabled" | "height" | "target" | "start" | "onClick" | "onMouseEnter" | "onMouseLeave" | "selected" | "href" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "method" | "min" | "minLength" | "multiple" | "muted" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "spellCheck" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css"> & import("react").RefAttributes<HTMLDivElement>>;
369
369
  export declare const positionedOverEditorStyle: import("@emotion/react").SerializedStyles;
370
370
  export declare const contentArea: import("@emotion/react").SerializedStyles;
371
371
  export declare const sidebarArea: import("@emotion/react").SerializedStyles;
@@ -7,6 +7,6 @@ declare type ContentStylesProps = {
7
7
  featureFlags?: FeatureFlags;
8
8
  };
9
9
  declare type Props = Omit<ContentStylesProps & React.HTMLProps<HTMLDivElement>, 'featureFlags'>;
10
- export declare const createEditorContentStyle: (styles?: SerializedStyles | undefined) => React.ForwardRefExoticComponent<Pick<Props, "cite" | "data" | "dir" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "default" | "mediaGroup" | "media" | "content" | "aria-label" | "aria-haspopup" | "children" | "pattern" | "value" | "type" | "width" | "accessKey" | "draggable" | "hidden" | "lang" | "className" | "id" | "prefix" | "contentEditable" | "inputMode" | "nonce" | "tabIndex" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "autoFocus" | "color" | "name" | "key" | "action" | "disabled" | "height" | "target" | "start" | "onClick" | "onMouseEnter" | "onMouseLeave" | "selected" | "href" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "method" | "min" | "minLength" | "multiple" | "muted" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "spellCheck" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "theme"> & React.RefAttributes<HTMLDivElement>>;
11
- declare const _default: React.ForwardRefExoticComponent<Pick<Props, "cite" | "data" | "dir" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "default" | "mediaGroup" | "media" | "content" | "aria-label" | "aria-haspopup" | "children" | "pattern" | "value" | "type" | "width" | "accessKey" | "draggable" | "hidden" | "lang" | "className" | "id" | "prefix" | "contentEditable" | "inputMode" | "nonce" | "tabIndex" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "autoFocus" | "color" | "name" | "key" | "action" | "disabled" | "height" | "target" | "start" | "onClick" | "onMouseEnter" | "onMouseLeave" | "selected" | "href" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "method" | "min" | "minLength" | "multiple" | "muted" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "spellCheck" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "theme"> & React.RefAttributes<HTMLDivElement>>;
10
+ export declare const createEditorContentStyle: (styles?: SerializedStyles | undefined) => React.ForwardRefExoticComponent<Pick<Props, "cite" | "data" | "dir" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "default" | "mediaGroup" | "media" | "content" | "aria-label" | "aria-haspopup" | "children" | "theme" | "pattern" | "value" | "type" | "width" | "accessKey" | "draggable" | "hidden" | "lang" | "className" | "id" | "prefix" | "contentEditable" | "inputMode" | "nonce" | "tabIndex" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "autoFocus" | "color" | "name" | "key" | "action" | "disabled" | "height" | "target" | "start" | "onClick" | "onMouseEnter" | "onMouseLeave" | "selected" | "href" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "method" | "min" | "minLength" | "multiple" | "muted" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "spellCheck" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css"> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const _default: React.ForwardRefExoticComponent<Pick<Props, "cite" | "data" | "dir" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "default" | "mediaGroup" | "media" | "content" | "aria-label" | "aria-haspopup" | "children" | "theme" | "pattern" | "value" | "type" | "width" | "accessKey" | "draggable" | "hidden" | "lang" | "className" | "id" | "prefix" | "contentEditable" | "inputMode" | "nonce" | "tabIndex" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "autoFocus" | "color" | "name" | "key" | "action" | "disabled" | "height" | "target" | "start" | "onClick" | "onMouseEnter" | "onMouseLeave" | "selected" | "href" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "method" | "min" | "minLength" | "multiple" | "muted" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "spellCheck" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css"> & React.RefAttributes<HTMLDivElement>>;
12
12
  export default _default;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { ThemeModes } from '@atlaskit/theme/types';
3
+ export declare function PortalProviderThemeProviders(props: {
4
+ mode: ThemeModes;
5
+ children: React.ReactNode;
6
+ }): JSX.Element;
@@ -2,10 +2,12 @@ import React from 'react';
2
2
  import { EventDispatcher } from '../../event-dispatcher';
3
3
  import { FireAnalyticsCallback } from '../../plugins/analytics/fire-analytics-event';
4
4
  import { IntlShape, WrappedComponentProps } from 'react-intl-next';
5
+ import type { ThemeModes } from '@atlaskit/theme/types';
5
6
  export declare type BasePortalProviderProps = {
6
7
  render: (portalProviderAPI: PortalProviderAPI) => React.ReactChild | JSX.Element | null;
7
8
  onAnalyticsEvent?: FireAnalyticsCallback;
8
9
  useAnalyticsContext?: boolean;
10
+ themeMode?: ThemeModes;
9
11
  } & WrappedComponentProps;
10
12
  export declare type Portals = Map<HTMLElement, React.ReactChild>;
11
13
  export declare type PortalRendererState = {
@@ -22,7 +24,8 @@ export declare class PortalProviderAPI extends EventDispatcher {
22
24
  intl: IntlShape;
23
25
  onAnalyticsEvent?: FireAnalyticsCallback;
24
26
  useAnalyticsContext?: boolean;
25
- constructor(intl: IntlShape, onAnalyticsEvent?: FireAnalyticsCallback, analyticsContext?: boolean);
27
+ themeMode?: ThemeModes;
28
+ constructor(intl: IntlShape, onAnalyticsEvent?: FireAnalyticsCallback, analyticsContext?: boolean, themeMode?: ThemeModes);
26
29
  setContext: (context: any) => void;
27
30
  render(children: () => React.ReactChild | JSX.Element | null, container: HTMLElement, hasAnalyticsContext?: boolean, hasIntlContext?: boolean): void;
28
31
  forceUpdate({ intl }: {
@@ -33,6 +36,7 @@ export declare class PortalProviderAPI extends EventDispatcher {
33
36
  export declare const PortalProvider: React.FC<import("react-intl-next").WithIntlProps<BasePortalProviderProps>> & {
34
37
  WrappedComponent: React.ComponentType<BasePortalProviderProps>;
35
38
  };
39
+ export declare const PortalProviderWithThemeProviders: (props: Omit<BasePortalProviderProps, 'intl' | 'themeMode'>) => JSX.Element;
36
40
  export declare class PortalRenderer extends React.Component<{
37
41
  portalProviderAPI: PortalProviderAPI;
38
42
  }, PortalRendererState> {
@@ -0,0 +1 @@
1
+ export declare function checkIfMobileBridge(): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "164.0.3",
3
+ "version": "164.0.4",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -131,7 +131,8 @@
131
131
  "@atlaskit/smart-card": "^18.0.14",
132
132
  "react": "^16.8.0",
133
133
  "react-dom": "^16.8.0",
134
- "react-intl-next": "npm:react-intl@^5.18.1"
134
+ "react-intl-next": "npm:react-intl@^5.18.1",
135
+ "styled-components": "^3.2.6"
135
136
  },
136
137
  "devDependencies": {
137
138
  "@atlaskit/atlassian-navigation": "^2.1.0",