@atlaskit/editor-common 116.15.0 → 116.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 116.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`5d42cea730a1b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5d42cea730a1b) -
8
+ [ENGHEALTH-53346] Gate the inline extension width-context memoization fix behind a Jira
9
+ experiment.
10
+
11
+ ### Patch Changes
12
+
13
+ - [`4f29c6cc37a8a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4f29c6cc37a8a) -
14
+ Clean up ff forge-ui-extensionnodeview-stop-event-for-textarea
15
+ - Updated dependencies
16
+
3
17
  ## 116.15.0
4
18
 
5
19
  ### Minor Changes
@@ -41,6 +41,23 @@ var hoverStyles = (0, _react2.css)({
41
41
  boxShadow: "0 0 0 1px ".concat("var(--ds-border-input, #8C8F97)")
42
42
  }
43
43
  });
44
+ var MemoizedWidthContextProvider = function MemoizedWidthContextProvider(_ref) {
45
+ var rendererContainerWidth = _ref.rendererContainerWidth,
46
+ children = _ref.children;
47
+ var widthContextValue = (0, _react.useMemo)(function () {
48
+ return (0, _ui.createWidthContext)(rendererContainerWidth);
49
+ }, [rendererContainerWidth]);
50
+ return (0, _react2.jsx)(_ui.WidthContext.Provider, {
51
+ value: widthContextValue
52
+ }, children);
53
+ };
54
+ var LegacyWidthContextProvider = function LegacyWidthContextProvider(_ref2) {
55
+ var rendererContainerWidth = _ref2.rendererContainerWidth,
56
+ children = _ref2.children;
57
+ return (0, _react2.jsx)(_ui.WidthContext.Provider, {
58
+ value: (0, _ui.createWidthContext)(rendererContainerWidth)
59
+ }, children);
60
+ };
44
61
  var InlineExtension = function InlineExtension(props) {
45
62
  var node = props.node,
46
63
  pluginInjectionApi = props.pluginInjectionApi,
@@ -50,8 +67,8 @@ var InlineExtension = function InlineExtension(props) {
50
67
  isNodeHovered = props.isNodeHovered,
51
68
  setIsNodeHovered = props.setIsNodeHovered,
52
69
  isLivePageViewMode = props.isLivePageViewMode;
53
- var _ref = macroInteractionDesignFeatureFlags || {},
54
- showMacroInteractionDesignUpdates = _ref.showMacroInteractionDesignUpdates;
70
+ var _ref3 = macroInteractionDesignFeatureFlags || {},
71
+ showMacroInteractionDesignUpdates = _ref3.showMacroInteractionDesignUpdates;
55
72
  var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(pluginInjectionApi, ['width'], function (states) {
56
73
  var _states$widthState;
57
74
  return {
@@ -116,8 +133,10 @@ var InlineExtension = function InlineExtension(props) {
116
133
  showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
117
134
  pluginInjectionApi: pluginInjectionApi
118
135
  })));
119
- return (0, _react2.jsx)(_ui.WidthContext.Provider, {
120
- value: (0, _ui.createWidthContext)(rendererContainerWidth)
136
+ return (0, _expValEquals.expValEquals)('enghealth-53346_fix_redaction_marker_editor', 'isEnabled', true) ? (0, _react2.jsx)(MemoizedWidthContextProvider, {
137
+ rendererContainerWidth: rendererContainerWidth
138
+ }, inlineExtensionInternal) : (0, _react2.jsx)(LegacyWidthContextProvider, {
139
+ rendererContainerWidth: rendererContainerWidth
121
140
  }, inlineExtensionInternal);
122
141
  };
123
142
  var _default = exports.default = InlineExtension;
@@ -259,10 +259,7 @@ var ExtensionNode = exports.ExtensionNode = /*#__PURE__*/function (_ReactNodeVie
259
259
  }
260
260
  return false;
261
261
  }
262
- if ((0, _platformFeatureFlags.fg)('forge-ui-extensionnodeview-stop-event-for-textarea')) {
263
- return event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement;
264
- }
265
- return event.target instanceof HTMLInputElement;
262
+ return event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement;
266
263
  }
267
264
  }, {
268
265
  key: "getContentDOM",
@@ -28,7 +28,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
28
28
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
29
29
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
30
30
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
31
- var packageVersion = "116.14.1";
31
+ var packageVersion = "116.15.0";
32
32
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
33
33
  // Remove URL as it has UGC
34
34
  // Ignored via go/ees007
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "116.14.1";
27
+ var packageVersion = "116.15.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -2,7 +2,7 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import React, { Fragment } from 'react';
5
+ import React, { Fragment, useMemo } from 'react';
6
6
 
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
8
8
  import { css, jsx } from '@emotion/react';
@@ -31,6 +31,23 @@ const hoverStyles = css({
31
31
  boxShadow: `0 0 0 1px ${"var(--ds-border-input, #8C8F97)"}`
32
32
  }
33
33
  });
34
+ const MemoizedWidthContextProvider = ({
35
+ rendererContainerWidth,
36
+ children
37
+ }) => {
38
+ const widthContextValue = useMemo(() => createWidthContext(rendererContainerWidth), [rendererContainerWidth]);
39
+ return jsx(WidthContext.Provider, {
40
+ value: widthContextValue
41
+ }, children);
42
+ };
43
+ const LegacyWidthContextProvider = ({
44
+ rendererContainerWidth,
45
+ children
46
+ }) => {
47
+ return jsx(WidthContext.Provider, {
48
+ value: createWidthContext(rendererContainerWidth)
49
+ }, children);
50
+ };
34
51
  const InlineExtension = props => {
35
52
  const {
36
53
  node,
@@ -106,8 +123,10 @@ const InlineExtension = props => {
106
123
  showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
107
124
  pluginInjectionApi: pluginInjectionApi
108
125
  })));
109
- return jsx(WidthContext.Provider, {
110
- value: createWidthContext(rendererContainerWidth)
126
+ return expValEquals('enghealth-53346_fix_redaction_marker_editor', 'isEnabled', true) ? jsx(MemoizedWidthContextProvider, {
127
+ rendererContainerWidth: rendererContainerWidth
128
+ }, inlineExtensionInternal) : jsx(LegacyWidthContextProvider, {
129
+ rendererContainerWidth: rendererContainerWidth
111
130
  }, inlineExtensionInternal);
112
131
  };
113
132
  export default InlineExtension;
@@ -217,10 +217,7 @@ export class ExtensionNode extends ReactNodeView {
217
217
  }
218
218
  return false;
219
219
  }
220
- if (fg('forge-ui-extensionnodeview-stop-event-for-textarea')) {
221
- return event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement;
222
- }
223
- return event.target instanceof HTMLInputElement;
220
+ return event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement;
224
221
  }
225
222
  getContentDOM() {
226
223
  var _this$reactComponentP4, _this$reactComponentP5;
@@ -14,7 +14,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
14
14
  const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
15
15
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
16
16
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
17
- const packageVersion = "116.14.1";
17
+ const packageVersion = "116.15.0";
18
18
  const sanitiseSentryEvents = (data, _hint) => {
19
19
  // Remove URL as it has UGC
20
20
  // Ignored via go/ees007
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "116.14.1";
17
+ const packageVersion = "116.15.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -2,7 +2,7 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import React, { Fragment } from 'react';
5
+ import React, { Fragment, useMemo } from 'react';
6
6
 
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
8
8
  import { css, jsx } from '@emotion/react';
@@ -31,6 +31,23 @@ var hoverStyles = css({
31
31
  boxShadow: "0 0 0 1px ".concat("var(--ds-border-input, #8C8F97)")
32
32
  }
33
33
  });
34
+ var MemoizedWidthContextProvider = function MemoizedWidthContextProvider(_ref) {
35
+ var rendererContainerWidth = _ref.rendererContainerWidth,
36
+ children = _ref.children;
37
+ var widthContextValue = useMemo(function () {
38
+ return createWidthContext(rendererContainerWidth);
39
+ }, [rendererContainerWidth]);
40
+ return jsx(WidthContext.Provider, {
41
+ value: widthContextValue
42
+ }, children);
43
+ };
44
+ var LegacyWidthContextProvider = function LegacyWidthContextProvider(_ref2) {
45
+ var rendererContainerWidth = _ref2.rendererContainerWidth,
46
+ children = _ref2.children;
47
+ return jsx(WidthContext.Provider, {
48
+ value: createWidthContext(rendererContainerWidth)
49
+ }, children);
50
+ };
34
51
  var InlineExtension = function InlineExtension(props) {
35
52
  var node = props.node,
36
53
  pluginInjectionApi = props.pluginInjectionApi,
@@ -40,8 +57,8 @@ var InlineExtension = function InlineExtension(props) {
40
57
  isNodeHovered = props.isNodeHovered,
41
58
  setIsNodeHovered = props.setIsNodeHovered,
42
59
  isLivePageViewMode = props.isLivePageViewMode;
43
- var _ref = macroInteractionDesignFeatureFlags || {},
44
- showMacroInteractionDesignUpdates = _ref.showMacroInteractionDesignUpdates;
60
+ var _ref3 = macroInteractionDesignFeatureFlags || {},
61
+ showMacroInteractionDesignUpdates = _ref3.showMacroInteractionDesignUpdates;
45
62
  var _useSharedPluginState = useSharedPluginStateWithSelector(pluginInjectionApi, ['width'], function (states) {
46
63
  var _states$widthState;
47
64
  return {
@@ -106,8 +123,10 @@ var InlineExtension = function InlineExtension(props) {
106
123
  showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
107
124
  pluginInjectionApi: pluginInjectionApi
108
125
  })));
109
- return jsx(WidthContext.Provider, {
110
- value: createWidthContext(rendererContainerWidth)
126
+ return expValEquals('enghealth-53346_fix_redaction_marker_editor', 'isEnabled', true) ? jsx(MemoizedWidthContextProvider, {
127
+ rendererContainerWidth: rendererContainerWidth
128
+ }, inlineExtensionInternal) : jsx(LegacyWidthContextProvider, {
129
+ rendererContainerWidth: rendererContainerWidth
111
130
  }, inlineExtensionInternal);
112
131
  };
113
132
  export default InlineExtension;
@@ -251,10 +251,7 @@ export var ExtensionNode = /*#__PURE__*/function (_ReactNodeView) {
251
251
  }
252
252
  return false;
253
253
  }
254
- if (fg('forge-ui-extensionnodeview-stop-event-for-textarea')) {
255
- return event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement;
256
- }
257
- return event.target instanceof HTMLInputElement;
254
+ return event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement;
258
255
  }
259
256
  }, {
260
257
  key: "getContentDOM",
@@ -20,7 +20,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
20
20
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
21
21
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
22
22
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
23
- var packageVersion = "116.14.1";
23
+ var packageVersion = "116.15.0";
24
24
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
25
25
  // Remove URL as it has UGC
26
26
  // Ignored via go/ees007
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "116.14.1";
24
+ var packageVersion = "116.15.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "116.15.0",
3
+ "version": "116.16.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -74,13 +74,13 @@
74
74
  "@atlaskit/react-compiler-gating": "^0.2.0",
75
75
  "@atlaskit/react-ufo": "^7.3.0",
76
76
  "@atlaskit/section-message": "^9.2.0",
77
- "@atlaskit/smart-card": "^45.5.0",
77
+ "@atlaskit/smart-card": "^45.6.0",
78
78
  "@atlaskit/smart-user-picker": "^11.0.0",
79
79
  "@atlaskit/spinner": "^20.1.0",
80
80
  "@atlaskit/task-decision": "^21.4.0",
81
81
  "@atlaskit/teams-app-config": "^2.1.0",
82
82
  "@atlaskit/textfield": "^9.1.0",
83
- "@atlaskit/tmp-editor-statsig": "^114.0.0",
83
+ "@atlaskit/tmp-editor-statsig": "^114.3.0",
84
84
  "@atlaskit/tokens": "^15.1.0",
85
85
  "@atlaskit/tooltip": "^23.1.0",
86
86
  "@atlaskit/width-detector": "^6.1.0",
@@ -223,9 +223,6 @@
223
223
  "rovo_chat_enable_skills_ui_m1": {
224
224
  "type": "boolean"
225
225
  },
226
- "forge-ui-extensionnodeview-stop-event-for-textarea": {
227
- "type": "boolean"
228
- },
229
226
  "platform_fix_macro_renders_in_layouts": {
230
227
  "type": "boolean"
231
228
  },