@atlaskit/editor-common 107.3.2 → 107.4.1

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,19 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 107.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 107.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#177157](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/177157)
14
+ [`6bcf8912217df`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6bcf8912217df) -
15
+ ED-27284 additional integration with user preference plugin
16
+
3
17
  ## 107.3.2
4
18
 
5
19
  ### Patch Changes
@@ -0,0 +1,174 @@
1
+ {
2
+ "extends": "../../../../tsconfig.entry-points.volt.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "target": "es5",
6
+ "outDir": "../../../../../volt/tsDist/@atlaskit__editor-common/app",
7
+ "rootDir": "../",
8
+ "composite": true
9
+ },
10
+ "include": [
11
+ "../src/**/*.ts",
12
+ "../src/**/*.tsx"
13
+ ],
14
+ "exclude": [
15
+ "../src/**/__tests__/*",
16
+ "../src/**/*.test.*",
17
+ "../src/**/test.*"
18
+ ],
19
+ "references": [
20
+ {
21
+ "path": "../../activity-provider/afm-volt/tsconfig.json"
22
+ },
23
+ {
24
+ "path": "../../adf-utils/afm-volt/tsconfig.json"
25
+ },
26
+ {
27
+ "path": "../../../analytics/analytics-listeners/afm-volt/tsconfig.json"
28
+ },
29
+ {
30
+ "path": "../../../analytics/analytics-namespaced-context/afm-volt/tsconfig.json"
31
+ },
32
+ {
33
+ "path": "../../../analytics/analytics-next/afm-volt/tsconfig.json"
34
+ },
35
+ {
36
+ "path": "../../../uip/atlassian-context/afm-volt/tsconfig.json"
37
+ },
38
+ {
39
+ "path": "../../../design-system/button/afm-volt/tsconfig.json"
40
+ },
41
+ {
42
+ "path": "../../../design-system/code/afm-volt/tsconfig.json"
43
+ },
44
+ {
45
+ "path": "../../../monorepo-tooling/codemod-utils/afm-volt/tsconfig.json"
46
+ },
47
+ {
48
+ "path": "../../../design-system/css/afm-volt/tsconfig.json"
49
+ },
50
+ {
51
+ "path": "../../custom-steps/afm-volt/tsconfig.json"
52
+ },
53
+ {
54
+ "path": "../../../design-system/dropdown-menu/afm-volt/tsconfig.json"
55
+ },
56
+ {
57
+ "path": "../../editor-json-transformer/afm-volt/tsconfig.json"
58
+ },
59
+ {
60
+ "path": "../../editor-palette/afm-volt/tsconfig.json"
61
+ },
62
+ {
63
+ "path": "../../editor-shared-styles/afm-volt/tsconfig.json"
64
+ },
65
+ {
66
+ "path": "../../editor-tables/afm-volt/tsconfig.json"
67
+ },
68
+ {
69
+ "path": "../../../elements/emoji/afm-volt/tsconfig.json"
70
+ },
71
+ {
72
+ "path": "../../../design-system/icon/afm-volt/tsconfig.json"
73
+ },
74
+ {
75
+ "path": "../../../design-system/icon-object/afm-volt/tsconfig.json"
76
+ },
77
+ {
78
+ "path": "../../../design-system/link/afm-volt/tsconfig.json"
79
+ },
80
+ {
81
+ "path": "../../../linking-platform/link-datasource/afm-volt/tsconfig.json"
82
+ },
83
+ {
84
+ "path": "../../../linking-platform/link-picker/afm-volt/tsconfig.json"
85
+ },
86
+ {
87
+ "path": "../../../media/media-card/afm-volt/tsconfig.json"
88
+ },
89
+ {
90
+ "path": "../../../media/media-client/afm-volt/tsconfig.json"
91
+ },
92
+ {
93
+ "path": "../../../media/media-client-react/afm-volt/tsconfig.json"
94
+ },
95
+ {
96
+ "path": "../../../media/media-common/afm-volt/tsconfig.json"
97
+ },
98
+ {
99
+ "path": "../../../media/media-file-preview/afm-volt/tsconfig.json"
100
+ },
101
+ {
102
+ "path": "../../../media/media-picker/afm-volt/tsconfig.json"
103
+ },
104
+ {
105
+ "path": "../../../media/media-ui/afm-volt/tsconfig.json"
106
+ },
107
+ {
108
+ "path": "../../../media/media-viewer/afm-volt/tsconfig.json"
109
+ },
110
+ {
111
+ "path": "../../../elements/mention/afm-volt/tsconfig.json"
112
+ },
113
+ {
114
+ "path": "../../../design-system/menu/afm-volt/tsconfig.json"
115
+ },
116
+ {
117
+ "path": "../../../design-system/onboarding/afm-volt/tsconfig.json"
118
+ },
119
+ {
120
+ "path": "../../../platform/feature-flags/afm-volt/tsconfig.json"
121
+ },
122
+ {
123
+ "path": "../../../platform/feature-flags-react/afm-volt/tsconfig.json"
124
+ },
125
+ {
126
+ "path": "../../../design-system/popper/afm-volt/tsconfig.json"
127
+ },
128
+ {
129
+ "path": "../../../design-system/primitives/afm-volt/tsconfig.json"
130
+ },
131
+ {
132
+ "path": "../../../people-and-teams/profilecard/afm-volt/tsconfig.json"
133
+ },
134
+ {
135
+ "path": "../../../react-ufo/atlaskit/afm-volt/tsconfig.json"
136
+ },
137
+ {
138
+ "path": "../../../design-system/section-message/afm-volt/tsconfig.json"
139
+ },
140
+ {
141
+ "path": "../../../linking-platform/smart-card/afm-volt/tsconfig.json"
142
+ },
143
+ {
144
+ "path": "../../../smart-experiences/smart-user-picker/afm-volt/tsconfig.json"
145
+ },
146
+ {
147
+ "path": "../../../design-system/spinner/afm-volt/tsconfig.json"
148
+ },
149
+ {
150
+ "path": "../../../elements/task-decision/afm-volt/tsconfig.json"
151
+ },
152
+ {
153
+ "path": "../../../design-system/textfield/afm-volt/tsconfig.json"
154
+ },
155
+ {
156
+ "path": "../../../design-system/theme/afm-volt/tsconfig.json"
157
+ },
158
+ {
159
+ "path": "../../tmp-editor-statsig/afm-volt/tsconfig.json"
160
+ },
161
+ {
162
+ "path": "../../../design-system/tokens/afm-volt/tsconfig.json"
163
+ },
164
+ {
165
+ "path": "../../../design-system/tooltip/afm-volt/tsconfig.json"
166
+ },
167
+ {
168
+ "path": "../../../design-system/width-detector/afm-volt/tsconfig.json"
169
+ },
170
+ {
171
+ "path": "../../../media/media-core/afm-volt/tsconfig.json"
172
+ }
173
+ ]
174
+ }
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "107.3.1";
19
+ var packageVersion = "107.4.0";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // Ignored via go/ees007
@@ -31,7 +31,7 @@ var canRenderFallback = function canRenderFallback(node) {
31
31
 
32
32
  // list of inline nodes with toDOM fallback implementations that can be virtualized. As
33
33
  // additional nodes are converted they should be added here
34
- var virtualizedNodeAllowlist = ['emoji', 'inlineCard'];
34
+ var virtualizedNodeAllowlist = ['inlineCard'];
35
35
  function createNodeView(_ref) {
36
36
  var nodeViewParams = _ref.nodeViewParams,
37
37
  pmPluginFactoryParams = _ref.pmPluginFactoryParams,
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "107.3.1";
26
+ var packageVersion = "107.4.0";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -180,10 +180,11 @@ function overflowShadow(Component, options) {
180
180
  }, {
181
181
  key: "render",
182
182
  value: function render() {
183
+ var _this$props, _this$props2;
183
184
  var _this$state = this.state,
184
185
  showLeftShadow = _this$state.showLeftShadow,
185
186
  showRightShadow = _this$state.showRightShadow;
186
- var classNames = [showRightShadow && shadowClassNames.RIGHT_SHADOW, showLeftShadow && shadowClassNames.LEFT_SHADOW, options.useShadowObserver && _shadowObserver.shadowObserverClassNames.SHADOW_CONTAINER].filter(Boolean).join(' ');
187
+ var classNames = [!((_this$props = this.props) !== null && _this$props !== void 0 && _this$props.disableTableOverflowShadow) && showRightShadow && shadowClassNames.RIGHT_SHADOW, !((_this$props2 = this.props) !== null && _this$props2 !== void 0 && _this$props2.disableTableOverflowShadow) && showLeftShadow && shadowClassNames.LEFT_SHADOW, options.useShadowObserver && _shadowObserver.shadowObserverClassNames.SHADOW_CONTAINER].filter(Boolean).join(' ');
187
188
  return (
188
189
  /*#__PURE__*/
189
190
  // Ignored via go/ees005
@@ -37,9 +37,10 @@ var UserPreferencesProvider = exports.UserPreferencesProvider = /*#__PURE__*/fun
37
37
  var initialUserPreferences = (_this$persistenceAPI$ = (_this$persistenceAPI = this.persistenceAPI).getInitialUserPreferences) === null || _this$persistenceAPI$ === void 0 ? void 0 : _this$persistenceAPI$.call(_this$persistenceAPI);
38
38
  if (initialUserPreferences) {
39
39
  this.setUserPreferences(initialUserPreferences);
40
- } else {
41
- this.loadPreferences();
42
40
  }
41
+ // the initial user preferences might come from the local cache,
42
+ // so we need to always load the preferences
43
+ this.loadPreferences();
43
44
  }
44
45
 
45
46
  /**
@@ -183,11 +184,11 @@ var UserPreferencesProvider = exports.UserPreferencesProvider = /*#__PURE__*/fun
183
184
  this.userPreferences = userPreferences;
184
185
  var hasUpdated = this.resolveUserPreferences();
185
186
  if (hasUpdated || !this.initialized) {
187
+ if (!this.initialized) {
188
+ this.initialized = true;
189
+ }
186
190
  this.notifyUserPreferencesUpdated();
187
191
  }
188
- if (!this.initialized) {
189
- this.initialized = true;
190
- }
191
192
  }
192
193
 
193
194
  /**
@@ -7,13 +7,18 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.mergeUserPreferences = exports.areUserPreferencesEqual = void 0;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
+ var _userPreferences = require("./user-preferences");
10
11
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
12
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
12
13
  var mergeUserPreferences = exports.mergeUserPreferences = function mergeUserPreferences(userPreferences, defaultPreferences) {
13
14
  var newResolvedUserPreferences = _objectSpread(_objectSpread({}, defaultPreferences), Object.fromEntries(Object.entries(userPreferences).filter(function (_ref) {
14
15
  var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
15
- v = _ref2[1];
16
- return v !== undefined && v !== null;
16
+ key = _ref2[0],
17
+ value = _ref2[1];
18
+ if (key === 'toolbarDockingPosition') {
19
+ return _userPreferences.TOOLBAR_DOCKING_POSITIONS.includes(value);
20
+ }
21
+ return value !== undefined && value !== null;
17
22
  })));
18
23
  return newResolvedUserPreferences;
19
24
  };
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "107.3.1";
4
+ const packageVersion = "107.4.0";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -23,7 +23,7 @@ const canRenderFallback = node => {
23
23
 
24
24
  // list of inline nodes with toDOM fallback implementations that can be virtualized. As
25
25
  // additional nodes are converted they should be added here
26
- const virtualizedNodeAllowlist = ['emoji', 'inlineCard'];
26
+ const virtualizedNodeAllowlist = ['inlineCard'];
27
27
  function createNodeView({
28
28
  nodeViewParams,
29
29
  pmPluginFactoryParams,
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "107.3.1";
16
+ const packageVersion = "107.4.0";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -151,11 +151,12 @@ export default function overflowShadow(Component, options) {
151
151
  });
152
152
  }
153
153
  render() {
154
+ var _this$props, _this$props2;
154
155
  const {
155
156
  showLeftShadow,
156
157
  showRightShadow
157
158
  } = this.state;
158
- const classNames = [showRightShadow && shadowClassNames.RIGHT_SHADOW, showLeftShadow && shadowClassNames.LEFT_SHADOW, options.useShadowObserver && shadowObserverClassNames.SHADOW_CONTAINER].filter(Boolean).join(' ');
159
+ const classNames = [!((_this$props = this.props) !== null && _this$props !== void 0 && _this$props.disableTableOverflowShadow) && showRightShadow && shadowClassNames.RIGHT_SHADOW, !((_this$props2 = this.props) !== null && _this$props2 !== void 0 && _this$props2.disableTableOverflowShadow) && showLeftShadow && shadowClassNames.LEFT_SHADOW, options.useShadowObserver && shadowObserverClassNames.SHADOW_CONTAINER].filter(Boolean).join(' ');
159
160
  return (
160
161
  /*#__PURE__*/
161
162
  // Ignored via go/ees005
@@ -25,9 +25,10 @@ export class UserPreferencesProvider {
25
25
  const initialUserPreferences = (_this$persistenceAPI$ = (_this$persistenceAPI = this.persistenceAPI).getInitialUserPreferences) === null || _this$persistenceAPI$ === void 0 ? void 0 : _this$persistenceAPI$.call(_this$persistenceAPI);
26
26
  if (initialUserPreferences) {
27
27
  this.setUserPreferences(initialUserPreferences);
28
- } else {
29
- this.loadPreferences();
30
28
  }
29
+ // the initial user preferences might come from the local cache,
30
+ // so we need to always load the preferences
31
+ this.loadPreferences();
31
32
  }
32
33
 
33
34
  /**
@@ -116,11 +117,11 @@ export class UserPreferencesProvider {
116
117
  this.userPreferences = userPreferences;
117
118
  const hasUpdated = this.resolveUserPreferences();
118
119
  if (hasUpdated || !this.initialized) {
120
+ if (!this.initialized) {
121
+ this.initialized = true;
122
+ }
119
123
  this.notifyUserPreferencesUpdated();
120
124
  }
121
- if (!this.initialized) {
122
- this.initialized = true;
123
- }
124
125
  }
125
126
 
126
127
  /**
@@ -1,7 +1,13 @@
1
+ import { TOOLBAR_DOCKING_POSITIONS } from './user-preferences';
1
2
  export const mergeUserPreferences = (userPreferences, defaultPreferences) => {
2
3
  const newResolvedUserPreferences = {
3
4
  ...defaultPreferences,
4
- ...Object.fromEntries(Object.entries(userPreferences).filter(([, v]) => v !== undefined && v !== null))
5
+ ...Object.fromEntries(Object.entries(userPreferences).filter(([key, value]) => {
6
+ if (key === 'toolbarDockingPosition') {
7
+ return TOOLBAR_DOCKING_POSITIONS.includes(value);
8
+ }
9
+ return value !== undefined && value !== null;
10
+ }))
5
11
  };
6
12
  return newResolvedUserPreferences;
7
13
  };
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "107.3.1";
10
+ var packageVersion = "107.4.0";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -26,7 +26,7 @@ var canRenderFallback = function canRenderFallback(node) {
26
26
 
27
27
  // list of inline nodes with toDOM fallback implementations that can be virtualized. As
28
28
  // additional nodes are converted they should be added here
29
- var virtualizedNodeAllowlist = ['emoji', 'inlineCard'];
29
+ var virtualizedNodeAllowlist = ['inlineCard'];
30
30
  function createNodeView(_ref) {
31
31
  var nodeViewParams = _ref.nodeViewParams,
32
32
  pmPluginFactoryParams = _ref.pmPluginFactoryParams,
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "107.3.1";
23
+ var packageVersion = "107.4.0";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -172,10 +172,11 @@ export default function overflowShadow(Component, options) {
172
172
  }, {
173
173
  key: "render",
174
174
  value: function render() {
175
+ var _this$props, _this$props2;
175
176
  var _this$state = this.state,
176
177
  showLeftShadow = _this$state.showLeftShadow,
177
178
  showRightShadow = _this$state.showRightShadow;
178
- var classNames = [showRightShadow && shadowClassNames.RIGHT_SHADOW, showLeftShadow && shadowClassNames.LEFT_SHADOW, options.useShadowObserver && shadowObserverClassNames.SHADOW_CONTAINER].filter(Boolean).join(' ');
179
+ var classNames = [!((_this$props = this.props) !== null && _this$props !== void 0 && _this$props.disableTableOverflowShadow) && showRightShadow && shadowClassNames.RIGHT_SHADOW, !((_this$props2 = this.props) !== null && _this$props2 !== void 0 && _this$props2.disableTableOverflowShadow) && showLeftShadow && shadowClassNames.LEFT_SHADOW, options.useShadowObserver && shadowObserverClassNames.SHADOW_CONTAINER].filter(Boolean).join(' ');
179
180
  return (
180
181
  /*#__PURE__*/
181
182
  // Ignored via go/ees005
@@ -30,9 +30,10 @@ export var UserPreferencesProvider = /*#__PURE__*/function () {
30
30
  var initialUserPreferences = (_this$persistenceAPI$ = (_this$persistenceAPI = this.persistenceAPI).getInitialUserPreferences) === null || _this$persistenceAPI$ === void 0 ? void 0 : _this$persistenceAPI$.call(_this$persistenceAPI);
31
31
  if (initialUserPreferences) {
32
32
  this.setUserPreferences(initialUserPreferences);
33
- } else {
34
- this.loadPreferences();
35
33
  }
34
+ // the initial user preferences might come from the local cache,
35
+ // so we need to always load the preferences
36
+ this.loadPreferences();
36
37
  }
37
38
 
38
39
  /**
@@ -176,11 +177,11 @@ export var UserPreferencesProvider = /*#__PURE__*/function () {
176
177
  this.userPreferences = userPreferences;
177
178
  var hasUpdated = this.resolveUserPreferences();
178
179
  if (hasUpdated || !this.initialized) {
180
+ if (!this.initialized) {
181
+ this.initialized = true;
182
+ }
179
183
  this.notifyUserPreferencesUpdated();
180
184
  }
181
- if (!this.initialized) {
182
- this.initialized = true;
183
- }
184
185
  }
185
186
 
186
187
  /**
@@ -2,11 +2,16 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ import { TOOLBAR_DOCKING_POSITIONS } from './user-preferences';
5
6
  export var mergeUserPreferences = function mergeUserPreferences(userPreferences, defaultPreferences) {
6
7
  var newResolvedUserPreferences = _objectSpread(_objectSpread({}, defaultPreferences), Object.fromEntries(Object.entries(userPreferences).filter(function (_ref) {
7
8
  var _ref2 = _slicedToArray(_ref, 2),
8
- v = _ref2[1];
9
- return v !== undefined && v !== null;
9
+ key = _ref2[0],
10
+ value = _ref2[1];
11
+ if (key === 'toolbarDockingPosition') {
12
+ return TOOLBAR_DOCKING_POSITIONS.includes(value);
13
+ }
14
+ return value !== undefined && value !== null;
10
15
  })));
11
16
  return newResolvedUserPreferences;
12
17
  };
@@ -4,6 +4,7 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { ExtensionProvider, ReferenceEntity } from '../../../extensions';
5
5
  import type { ProsemirrorGetPosHandler } from '../../../react-node-view';
6
6
  import type { EditorAppearance } from '../../../types';
7
+ import type { OverflowShadowProps } from '../../../ui';
7
8
  import type { ExtensionsPluginInjectionAPI, MacroInteractionDesignFeatureFlags } from '../../types';
8
9
  export interface Props {
9
10
  node: PmNode;
@@ -28,7 +29,7 @@ export interface Props {
28
29
  isLivePageViewMode?: boolean;
29
30
  }
30
31
  declare const _default: {
31
- new (props: Props | Readonly<Props>): {
32
+ new (props: (Props & OverflowShadowProps) | Readonly<Props & OverflowShadowProps>): {
32
33
  overflowContainer?: HTMLElement | null | undefined;
33
34
  container?: HTMLElement | undefined;
34
35
  shadowObserver?: import("../../../ui").ShadowObserver | undefined;
@@ -51,24 +52,24 @@ declare const _default: {
51
52
  initShadowObserver(): void;
52
53
  render(): React.JSX.Element;
53
54
  context: unknown;
54
- setState<K extends keyof import("../../../ui").OverflowShadowState>(state: import("../../../ui").OverflowShadowState | ((prevState: Readonly<import("../../../ui").OverflowShadowState>, props: Readonly<Props>) => import("../../../ui").OverflowShadowState | Pick<import("../../../ui").OverflowShadowState, K> | null) | Pick<import("../../../ui").OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
55
+ setState<K extends keyof import("../../../ui").OverflowShadowState>(state: import("../../../ui").OverflowShadowState | ((prevState: Readonly<import("../../../ui").OverflowShadowState>, props: Readonly<Props & OverflowShadowProps>) => import("../../../ui").OverflowShadowState | Pick<import("../../../ui").OverflowShadowState, K> | null) | Pick<import("../../../ui").OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
55
56
  forceUpdate(callback?: (() => void) | undefined): void;
56
- readonly props: Readonly<Props>;
57
+ readonly props: Readonly<Props & OverflowShadowProps>;
57
58
  refs: {
58
59
  [key: string]: React.ReactInstance;
59
60
  };
60
61
  componentDidMount?(): void;
61
- shouldComponentUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): boolean;
62
+ shouldComponentUpdate?(nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): boolean;
62
63
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
63
- getSnapshotBeforeUpdate?(prevProps: Readonly<Props>, prevState: Readonly<import("../../../ui").OverflowShadowState>): any;
64
+ getSnapshotBeforeUpdate?(prevProps: Readonly<Props & OverflowShadowProps>, prevState: Readonly<import("../../../ui").OverflowShadowState>): any;
64
65
  componentWillMount?(): void;
65
66
  UNSAFE_componentWillMount?(): void;
66
- componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
67
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
68
- componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
69
- UNSAFE_componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
67
+ componentWillReceiveProps?(nextProps: Readonly<Props & OverflowShadowProps>, nextContext: any): void;
68
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Props & OverflowShadowProps>, nextContext: any): void;
69
+ componentWillUpdate?(nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
70
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
70
71
  };
71
- new (props: Props, context: any): {
72
+ new (props: Props & OverflowShadowProps, context: any): {
72
73
  overflowContainer?: HTMLElement | null | undefined;
73
74
  container?: HTMLElement | undefined;
74
75
  shadowObserver?: import("../../../ui").ShadowObserver | undefined;
@@ -91,22 +92,22 @@ declare const _default: {
91
92
  initShadowObserver(): void;
92
93
  render(): React.JSX.Element;
93
94
  context: unknown;
94
- setState<K extends keyof import("../../../ui").OverflowShadowState>(state: import("../../../ui").OverflowShadowState | ((prevState: Readonly<import("../../../ui").OverflowShadowState>, props: Readonly<Props>) => import("../../../ui").OverflowShadowState | Pick<import("../../../ui").OverflowShadowState, K> | null) | Pick<import("../../../ui").OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
95
+ setState<K extends keyof import("../../../ui").OverflowShadowState>(state: import("../../../ui").OverflowShadowState | ((prevState: Readonly<import("../../../ui").OverflowShadowState>, props: Readonly<Props & OverflowShadowProps>) => import("../../../ui").OverflowShadowState | Pick<import("../../../ui").OverflowShadowState, K> | null) | Pick<import("../../../ui").OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
95
96
  forceUpdate(callback?: (() => void) | undefined): void;
96
- readonly props: Readonly<Props>;
97
+ readonly props: Readonly<Props & OverflowShadowProps>;
97
98
  refs: {
98
99
  [key: string]: React.ReactInstance;
99
100
  };
100
101
  componentDidMount?(): void;
101
- shouldComponentUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): boolean;
102
+ shouldComponentUpdate?(nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): boolean;
102
103
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
103
- getSnapshotBeforeUpdate?(prevProps: Readonly<Props>, prevState: Readonly<import("../../../ui").OverflowShadowState>): any;
104
+ getSnapshotBeforeUpdate?(prevProps: Readonly<Props & OverflowShadowProps>, prevState: Readonly<import("../../../ui").OverflowShadowState>): any;
104
105
  componentWillMount?(): void;
105
106
  UNSAFE_componentWillMount?(): void;
106
- componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
107
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
108
- componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
109
- UNSAFE_componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
107
+ componentWillReceiveProps?(nextProps: Readonly<Props & OverflowShadowProps>, nextContext: any): void;
108
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Props & OverflowShadowProps>, nextContext: any): void;
109
+ componentWillUpdate?(nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
110
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
110
111
  };
111
112
  contextType?: React.Context<any> | undefined;
112
113
  };
@@ -7,6 +7,7 @@ export declare const shadowClassNames: {
7
7
  export interface OverflowShadowProps {
8
8
  handleRef?: (ref: HTMLElement | null) => void;
9
9
  shadowClassNames?: string;
10
+ disableTableOverflowShadow?: boolean;
10
11
  }
11
12
  export interface OverflowShadowState {
12
13
  showLeftShadow: boolean;
@@ -17,7 +18,7 @@ export interface OverflowShadowOptions {
17
18
  useShadowObserver?: boolean;
18
19
  }
19
20
  export default function overflowShadow<P>(Component: React.ComponentType<React.PropsWithChildren<P & OverflowShadowProps>>, options: OverflowShadowOptions): {
20
- new (props: P | Readonly<P>): {
21
+ new (props: (P & OverflowShadowProps) | Readonly<P & OverflowShadowProps>): {
21
22
  overflowContainer?: HTMLElement | null | undefined;
22
23
  container?: HTMLElement | undefined;
23
24
  shadowObserver?: ShadowObserver | undefined;
@@ -40,24 +41,24 @@ export default function overflowShadow<P>(Component: React.ComponentType<React.P
40
41
  initShadowObserver(): void;
41
42
  render(): React.JSX.Element;
42
43
  context: unknown;
43
- setState<K extends keyof OverflowShadowState>(state: OverflowShadowState | ((prevState: Readonly<OverflowShadowState>, props: Readonly<P>) => OverflowShadowState | Pick<OverflowShadowState, K> | null) | Pick<OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
44
+ setState<K extends keyof OverflowShadowState>(state: OverflowShadowState | ((prevState: Readonly<OverflowShadowState>, props: Readonly<P & OverflowShadowProps>) => OverflowShadowState | Pick<OverflowShadowState, K> | null) | Pick<OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
44
45
  forceUpdate(callback?: (() => void) | undefined): void;
45
- readonly props: Readonly<P>;
46
+ readonly props: Readonly<P & OverflowShadowProps>;
46
47
  refs: {
47
48
  [key: string]: React.ReactInstance;
48
49
  };
49
50
  componentDidMount?(): void;
50
- shouldComponentUpdate?(nextProps: Readonly<P>, nextState: Readonly<OverflowShadowState>, nextContext: any): boolean;
51
+ shouldComponentUpdate?(nextProps: Readonly<P & OverflowShadowProps>, nextState: Readonly<OverflowShadowState>, nextContext: any): boolean;
51
52
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
52
- getSnapshotBeforeUpdate?(prevProps: Readonly<P>, prevState: Readonly<OverflowShadowState>): any;
53
+ getSnapshotBeforeUpdate?(prevProps: Readonly<P & OverflowShadowProps>, prevState: Readonly<OverflowShadowState>): any;
53
54
  componentWillMount?(): void;
54
55
  UNSAFE_componentWillMount?(): void;
55
- componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
56
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
57
- componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<OverflowShadowState>, nextContext: any): void;
58
- UNSAFE_componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<OverflowShadowState>, nextContext: any): void;
56
+ componentWillReceiveProps?(nextProps: Readonly<P & OverflowShadowProps>, nextContext: any): void;
57
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P & OverflowShadowProps>, nextContext: any): void;
58
+ componentWillUpdate?(nextProps: Readonly<P & OverflowShadowProps>, nextState: Readonly<OverflowShadowState>, nextContext: any): void;
59
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<P & OverflowShadowProps>, nextState: Readonly<OverflowShadowState>, nextContext: any): void;
59
60
  };
60
- new (props: P, context: any): {
61
+ new (props: P & OverflowShadowProps, context: any): {
61
62
  overflowContainer?: HTMLElement | null | undefined;
62
63
  container?: HTMLElement | undefined;
63
64
  shadowObserver?: ShadowObserver | undefined;
@@ -80,22 +81,22 @@ export default function overflowShadow<P>(Component: React.ComponentType<React.P
80
81
  initShadowObserver(): void;
81
82
  render(): React.JSX.Element;
82
83
  context: unknown;
83
- setState<K extends keyof OverflowShadowState>(state: OverflowShadowState | ((prevState: Readonly<OverflowShadowState>, props: Readonly<P>) => OverflowShadowState | Pick<OverflowShadowState, K> | null) | Pick<OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
84
+ setState<K extends keyof OverflowShadowState>(state: OverflowShadowState | ((prevState: Readonly<OverflowShadowState>, props: Readonly<P & OverflowShadowProps>) => OverflowShadowState | Pick<OverflowShadowState, K> | null) | Pick<OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
84
85
  forceUpdate(callback?: (() => void) | undefined): void;
85
- readonly props: Readonly<P>;
86
+ readonly props: Readonly<P & OverflowShadowProps>;
86
87
  refs: {
87
88
  [key: string]: React.ReactInstance;
88
89
  };
89
90
  componentDidMount?(): void;
90
- shouldComponentUpdate?(nextProps: Readonly<P>, nextState: Readonly<OverflowShadowState>, nextContext: any): boolean;
91
+ shouldComponentUpdate?(nextProps: Readonly<P & OverflowShadowProps>, nextState: Readonly<OverflowShadowState>, nextContext: any): boolean;
91
92
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
92
- getSnapshotBeforeUpdate?(prevProps: Readonly<P>, prevState: Readonly<OverflowShadowState>): any;
93
+ getSnapshotBeforeUpdate?(prevProps: Readonly<P & OverflowShadowProps>, prevState: Readonly<OverflowShadowState>): any;
93
94
  componentWillMount?(): void;
94
95
  UNSAFE_componentWillMount?(): void;
95
- componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
96
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
97
- componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<OverflowShadowState>, nextContext: any): void;
98
- UNSAFE_componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<OverflowShadowState>, nextContext: any): void;
96
+ componentWillReceiveProps?(nextProps: Readonly<P & OverflowShadowProps>, nextContext: any): void;
97
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P & OverflowShadowProps>, nextContext: any): void;
98
+ componentWillUpdate?(nextProps: Readonly<P & OverflowShadowProps>, nextState: Readonly<OverflowShadowState>, nextContext: any): void;
99
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<P & OverflowShadowProps>, nextState: Readonly<OverflowShadowState>, nextContext: any): void;
99
100
  };
100
101
  contextType?: React.Context<any> | undefined;
101
102
  };
@@ -1,4 +1,4 @@
1
- import type { ResolvedUserPreferences, UserPreferences } from './user-preferences';
1
+ import { type ResolvedUserPreferences, type UserPreferences } from './user-preferences';
2
2
  export declare const mergeUserPreferences: (userPreferences: UserPreferences, defaultPreferences: ResolvedUserPreferences) => ResolvedUserPreferences;
3
3
  /**
4
4
  * Compare two user preferences objects
@@ -4,6 +4,7 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { ExtensionProvider, ReferenceEntity } from '../../../extensions';
5
5
  import type { ProsemirrorGetPosHandler } from '../../../react-node-view';
6
6
  import type { EditorAppearance } from '../../../types';
7
+ import type { OverflowShadowProps } from '../../../ui';
7
8
  import type { ExtensionsPluginInjectionAPI, MacroInteractionDesignFeatureFlags } from '../../types';
8
9
  export interface Props {
9
10
  node: PmNode;
@@ -28,7 +29,7 @@ export interface Props {
28
29
  isLivePageViewMode?: boolean;
29
30
  }
30
31
  declare const _default: {
31
- new (props: Props | Readonly<Props>): {
32
+ new (props: (Props & OverflowShadowProps) | Readonly<Props & OverflowShadowProps>): {
32
33
  overflowContainer?: HTMLElement | null | undefined;
33
34
  container?: HTMLElement | undefined;
34
35
  shadowObserver?: import("../../../ui").ShadowObserver | undefined;
@@ -51,24 +52,24 @@ declare const _default: {
51
52
  initShadowObserver(): void;
52
53
  render(): React.JSX.Element;
53
54
  context: unknown;
54
- setState<K extends keyof import("../../../ui").OverflowShadowState>(state: import("../../../ui").OverflowShadowState | ((prevState: Readonly<import("../../../ui").OverflowShadowState>, props: Readonly<Props>) => import("../../../ui").OverflowShadowState | Pick<import("../../../ui").OverflowShadowState, K> | null) | Pick<import("../../../ui").OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
55
+ setState<K extends keyof import("../../../ui").OverflowShadowState>(state: import("../../../ui").OverflowShadowState | ((prevState: Readonly<import("../../../ui").OverflowShadowState>, props: Readonly<Props & OverflowShadowProps>) => import("../../../ui").OverflowShadowState | Pick<import("../../../ui").OverflowShadowState, K> | null) | Pick<import("../../../ui").OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
55
56
  forceUpdate(callback?: (() => void) | undefined): void;
56
- readonly props: Readonly<Props>;
57
+ readonly props: Readonly<Props & OverflowShadowProps>;
57
58
  refs: {
58
59
  [key: string]: React.ReactInstance;
59
60
  };
60
61
  componentDidMount?(): void;
61
- shouldComponentUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): boolean;
62
+ shouldComponentUpdate?(nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): boolean;
62
63
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
63
- getSnapshotBeforeUpdate?(prevProps: Readonly<Props>, prevState: Readonly<import("../../../ui").OverflowShadowState>): any;
64
+ getSnapshotBeforeUpdate?(prevProps: Readonly<Props & OverflowShadowProps>, prevState: Readonly<import("../../../ui").OverflowShadowState>): any;
64
65
  componentWillMount?(): void;
65
66
  UNSAFE_componentWillMount?(): void;
66
- componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
67
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
68
- componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
69
- UNSAFE_componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
67
+ componentWillReceiveProps?(nextProps: Readonly<Props & OverflowShadowProps>, nextContext: any): void;
68
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Props & OverflowShadowProps>, nextContext: any): void;
69
+ componentWillUpdate?(nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
70
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
70
71
  };
71
- new (props: Props, context: any): {
72
+ new (props: Props & OverflowShadowProps, context: any): {
72
73
  overflowContainer?: HTMLElement | null | undefined;
73
74
  container?: HTMLElement | undefined;
74
75
  shadowObserver?: import("../../../ui").ShadowObserver | undefined;
@@ -91,22 +92,22 @@ declare const _default: {
91
92
  initShadowObserver(): void;
92
93
  render(): React.JSX.Element;
93
94
  context: unknown;
94
- setState<K extends keyof import("../../../ui").OverflowShadowState>(state: import("../../../ui").OverflowShadowState | ((prevState: Readonly<import("../../../ui").OverflowShadowState>, props: Readonly<Props>) => import("../../../ui").OverflowShadowState | Pick<import("../../../ui").OverflowShadowState, K> | null) | Pick<import("../../../ui").OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
95
+ setState<K extends keyof import("../../../ui").OverflowShadowState>(state: import("../../../ui").OverflowShadowState | ((prevState: Readonly<import("../../../ui").OverflowShadowState>, props: Readonly<Props & OverflowShadowProps>) => import("../../../ui").OverflowShadowState | Pick<import("../../../ui").OverflowShadowState, K> | null) | Pick<import("../../../ui").OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
95
96
  forceUpdate(callback?: (() => void) | undefined): void;
96
- readonly props: Readonly<Props>;
97
+ readonly props: Readonly<Props & OverflowShadowProps>;
97
98
  refs: {
98
99
  [key: string]: React.ReactInstance;
99
100
  };
100
101
  componentDidMount?(): void;
101
- shouldComponentUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): boolean;
102
+ shouldComponentUpdate?(nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): boolean;
102
103
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
103
- getSnapshotBeforeUpdate?(prevProps: Readonly<Props>, prevState: Readonly<import("../../../ui").OverflowShadowState>): any;
104
+ getSnapshotBeforeUpdate?(prevProps: Readonly<Props & OverflowShadowProps>, prevState: Readonly<import("../../../ui").OverflowShadowState>): any;
104
105
  componentWillMount?(): void;
105
106
  UNSAFE_componentWillMount?(): void;
106
- componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
107
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
108
- componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
109
- UNSAFE_componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
107
+ componentWillReceiveProps?(nextProps: Readonly<Props & OverflowShadowProps>, nextContext: any): void;
108
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Props & OverflowShadowProps>, nextContext: any): void;
109
+ componentWillUpdate?(nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
110
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<Props & OverflowShadowProps>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
110
111
  };
111
112
  contextType?: React.Context<any> | undefined;
112
113
  };
@@ -7,6 +7,7 @@ export declare const shadowClassNames: {
7
7
  export interface OverflowShadowProps {
8
8
  handleRef?: (ref: HTMLElement | null) => void;
9
9
  shadowClassNames?: string;
10
+ disableTableOverflowShadow?: boolean;
10
11
  }
11
12
  export interface OverflowShadowState {
12
13
  showLeftShadow: boolean;
@@ -17,7 +18,7 @@ export interface OverflowShadowOptions {
17
18
  useShadowObserver?: boolean;
18
19
  }
19
20
  export default function overflowShadow<P>(Component: React.ComponentType<React.PropsWithChildren<P & OverflowShadowProps>>, options: OverflowShadowOptions): {
20
- new (props: P | Readonly<P>): {
21
+ new (props: (P & OverflowShadowProps) | Readonly<P & OverflowShadowProps>): {
21
22
  overflowContainer?: HTMLElement | null | undefined;
22
23
  container?: HTMLElement | undefined;
23
24
  shadowObserver?: ShadowObserver | undefined;
@@ -40,24 +41,24 @@ export default function overflowShadow<P>(Component: React.ComponentType<React.P
40
41
  initShadowObserver(): void;
41
42
  render(): React.JSX.Element;
42
43
  context: unknown;
43
- setState<K extends keyof OverflowShadowState>(state: OverflowShadowState | ((prevState: Readonly<OverflowShadowState>, props: Readonly<P>) => OverflowShadowState | Pick<OverflowShadowState, K> | null) | Pick<OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
44
+ setState<K extends keyof OverflowShadowState>(state: OverflowShadowState | ((prevState: Readonly<OverflowShadowState>, props: Readonly<P & OverflowShadowProps>) => OverflowShadowState | Pick<OverflowShadowState, K> | null) | Pick<OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
44
45
  forceUpdate(callback?: (() => void) | undefined): void;
45
- readonly props: Readonly<P>;
46
+ readonly props: Readonly<P & OverflowShadowProps>;
46
47
  refs: {
47
48
  [key: string]: React.ReactInstance;
48
49
  };
49
50
  componentDidMount?(): void;
50
- shouldComponentUpdate?(nextProps: Readonly<P>, nextState: Readonly<OverflowShadowState>, nextContext: any): boolean;
51
+ shouldComponentUpdate?(nextProps: Readonly<P & OverflowShadowProps>, nextState: Readonly<OverflowShadowState>, nextContext: any): boolean;
51
52
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
52
- getSnapshotBeforeUpdate?(prevProps: Readonly<P>, prevState: Readonly<OverflowShadowState>): any;
53
+ getSnapshotBeforeUpdate?(prevProps: Readonly<P & OverflowShadowProps>, prevState: Readonly<OverflowShadowState>): any;
53
54
  componentWillMount?(): void;
54
55
  UNSAFE_componentWillMount?(): void;
55
- componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
56
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
57
- componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<OverflowShadowState>, nextContext: any): void;
58
- UNSAFE_componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<OverflowShadowState>, nextContext: any): void;
56
+ componentWillReceiveProps?(nextProps: Readonly<P & OverflowShadowProps>, nextContext: any): void;
57
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P & OverflowShadowProps>, nextContext: any): void;
58
+ componentWillUpdate?(nextProps: Readonly<P & OverflowShadowProps>, nextState: Readonly<OverflowShadowState>, nextContext: any): void;
59
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<P & OverflowShadowProps>, nextState: Readonly<OverflowShadowState>, nextContext: any): void;
59
60
  };
60
- new (props: P, context: any): {
61
+ new (props: P & OverflowShadowProps, context: any): {
61
62
  overflowContainer?: HTMLElement | null | undefined;
62
63
  container?: HTMLElement | undefined;
63
64
  shadowObserver?: ShadowObserver | undefined;
@@ -80,22 +81,22 @@ export default function overflowShadow<P>(Component: React.ComponentType<React.P
80
81
  initShadowObserver(): void;
81
82
  render(): React.JSX.Element;
82
83
  context: unknown;
83
- setState<K extends keyof OverflowShadowState>(state: OverflowShadowState | ((prevState: Readonly<OverflowShadowState>, props: Readonly<P>) => OverflowShadowState | Pick<OverflowShadowState, K> | null) | Pick<OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
84
+ setState<K extends keyof OverflowShadowState>(state: OverflowShadowState | ((prevState: Readonly<OverflowShadowState>, props: Readonly<P & OverflowShadowProps>) => OverflowShadowState | Pick<OverflowShadowState, K> | null) | Pick<OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
84
85
  forceUpdate(callback?: (() => void) | undefined): void;
85
- readonly props: Readonly<P>;
86
+ readonly props: Readonly<P & OverflowShadowProps>;
86
87
  refs: {
87
88
  [key: string]: React.ReactInstance;
88
89
  };
89
90
  componentDidMount?(): void;
90
- shouldComponentUpdate?(nextProps: Readonly<P>, nextState: Readonly<OverflowShadowState>, nextContext: any): boolean;
91
+ shouldComponentUpdate?(nextProps: Readonly<P & OverflowShadowProps>, nextState: Readonly<OverflowShadowState>, nextContext: any): boolean;
91
92
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
92
- getSnapshotBeforeUpdate?(prevProps: Readonly<P>, prevState: Readonly<OverflowShadowState>): any;
93
+ getSnapshotBeforeUpdate?(prevProps: Readonly<P & OverflowShadowProps>, prevState: Readonly<OverflowShadowState>): any;
93
94
  componentWillMount?(): void;
94
95
  UNSAFE_componentWillMount?(): void;
95
- componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
96
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
97
- componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<OverflowShadowState>, nextContext: any): void;
98
- UNSAFE_componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<OverflowShadowState>, nextContext: any): void;
96
+ componentWillReceiveProps?(nextProps: Readonly<P & OverflowShadowProps>, nextContext: any): void;
97
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P & OverflowShadowProps>, nextContext: any): void;
98
+ componentWillUpdate?(nextProps: Readonly<P & OverflowShadowProps>, nextState: Readonly<OverflowShadowState>, nextContext: any): void;
99
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<P & OverflowShadowProps>, nextState: Readonly<OverflowShadowState>, nextContext: any): void;
99
100
  };
100
101
  contextType?: React.Context<any> | undefined;
101
102
  };
@@ -1,4 +1,4 @@
1
- import type { ResolvedUserPreferences, UserPreferences } from './user-preferences';
1
+ import { type ResolvedUserPreferences, type UserPreferences } from './user-preferences';
2
2
  export declare const mergeUserPreferences: (userPreferences: UserPreferences, defaultPreferences: ResolvedUserPreferences) => ResolvedUserPreferences;
3
3
  /**
4
4
  * Compare two user preferences objects
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "107.3.2",
3
+ "version": "107.4.1",
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/"
@@ -26,8 +26,7 @@
26
26
  "atlaskit:src": "src/index.ts",
27
27
  "atlassian": {
28
28
  "team": "Editor",
29
- "singleton": true,
30
- "runReact18": true
29
+ "singleton": true
31
30
  },
32
31
  "af:exports": {
33
32
  "./i18n": "./src/i18n/index.ts",
@@ -147,7 +146,7 @@
147
146
  "@atlaskit/link-datasource": "^4.11.0",
148
147
  "@atlaskit/link-picker": "^3.5.0",
149
148
  "@atlaskit/media-card": "^79.3.0",
150
- "@atlaskit/media-client": "^34.2.0",
149
+ "@atlaskit/media-client": "^35.0.0",
151
150
  "@atlaskit/media-client-react": "^4.1.0",
152
151
  "@atlaskit/media-common": "^12.3.0",
153
152
  "@atlaskit/media-file-preview": "^0.11.0",
@@ -164,13 +163,13 @@
164
163
  "@atlaskit/profilecard": "^23.21.0",
165
164
  "@atlaskit/react-ufo": "^3.14.0",
166
165
  "@atlaskit/section-message": "^8.2.0",
167
- "@atlaskit/smart-card": "^38.19.0",
166
+ "@atlaskit/smart-card": "^38.20.0",
168
167
  "@atlaskit/smart-user-picker": "^8.0.0",
169
168
  "@atlaskit/spinner": "^18.0.0",
170
169
  "@atlaskit/task-decision": "^19.2.0",
171
170
  "@atlaskit/textfield": "^8.0.0",
172
171
  "@atlaskit/theme": "^18.0.0",
173
- "@atlaskit/tmp-editor-statsig": "^8.5.0",
172
+ "@atlaskit/tmp-editor-statsig": "^8.6.0",
174
173
  "@atlaskit/tokens": "^5.4.0",
175
174
  "@atlaskit/tooltip": "^20.3.0",
176
175
  "@atlaskit/width-detector": "^5.0.0",