@atlaskit/editor-common 116.17.4 → 116.18.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,35 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 116.18.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`46ee61dd53e91`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/46ee61dd53e91) -
8
+ Remove stale experiment confluence_compact_text_format (FFCLEANUP-85812): inline final values
9
+ (flag enabled), simplify conditions, remove experiment config entries.
10
+ - Updated dependencies
11
+
12
+ ## 116.18.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [`ed550a5583074`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ed550a5583074) -
17
+ Improve panel container fallback handling.
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
23
+ ## 116.17.5
24
+
25
+ ### Patch Changes
26
+
27
+ - [`6e2538f8383a1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e2538f8383a1) -
28
+ Clean up experiment `platform_editor_spotlight_migration`. The floating toolbar button is no
29
+ longer wrapped in the now-removed `SpotlightPulse` onboarding effect; the orphaned internal
30
+ `Pulse` component (the last `@atlaskit/onboarding` usage in editor-common) has been removed.
31
+ - Updated dependencies
32
+
3
33
  ## 116.17.4
4
34
 
5
35
  ### Patch Changes
package/compass.yml ADDED
@@ -0,0 +1,38 @@
1
+ configVersion: 1
2
+ id: ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/8aba7f6e-457b-4200-9b6f-00adf2350107
3
+ name: '@atlaskit/editor-common'
4
+ ownerId: ari:cloud:identity::team/og-da2205cb-ea5e-4059-9215-30c9b26c971f # Fabric - Editor
5
+ labels:
6
+ - platform-code
7
+ - platform-afm
8
+ typeId: OTHER
9
+ fields:
10
+ tier: 4
11
+ lifecycle: Active
12
+ isMonorepoProject: true
13
+ links:
14
+ - name: Root Repository
15
+ type: REPOSITORY
16
+ url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master
17
+ - name: Slack Channel
18
+ type: CHAT_CHANNEL
19
+ url: https://atlassian.enterprise.slack.com/archives/CFG3PSQ9E # #help-editor
20
+ - name: Editor Common
21
+ type: REPOSITORY
22
+ url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master/platform/packages/editor/editor-common
23
+ customFields:
24
+ - name: Department
25
+ type: text
26
+ value: Eng - Editor Frontend Platform
27
+ - name: Technical Owner
28
+ type: user
29
+ value: ari:cloud:identity::user/612646c53fe26c00694fbe6a # Chris Kimber
30
+ - name: Required Reviewers Opt In
31
+ type: boolean
32
+ value: true
33
+ - name: Reviewer Selection Mechanism
34
+ type: text
35
+ value: random(2)
36
+ - name: Required Reviewer Approvals
37
+ type: number
38
+ value: 1
@@ -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.17.3";
31
+ var packageVersion = "116.18.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.17.3";
27
+ var packageVersion = "116.18.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -15,7 +15,6 @@ var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react
15
15
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
16
16
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
17
17
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
18
- var _Pulse = require("../Pulse/Pulse");
19
18
  var _iconOnlySpacing = require("./iconOnlySpacing");
20
19
  var _styles = require("./styles");
21
20
  var _excluded = ["buttonStyles"];
@@ -89,8 +88,6 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
89
88
  }, /*#__PURE__*/_react.default.createElement("div", {
90
89
  onMouseEnter: (0, _expValEquals.expValEquals)('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? undefined : onMouseEnter,
91
90
  onMouseLeave: (0, _expValEquals.expValEquals)('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? undefined : onMouseLeave
92
- }, /*#__PURE__*/_react.default.createElement(_Pulse.Pulse, {
93
- pulse: !(0, _expValEquals.expValEquals)('platform_editor_spotlight_migration', 'isEnabled', true) && pulse
94
91
  }, /*#__PURE__*/_react.default.createElement(_customThemeButton.default
95
92
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
96
93
  , {
@@ -149,7 +146,7 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
149
146
  // should be fixed here https://a11y-internal.atlassian.net/browse/DST-287
150
147
  ,
151
148
  tabIndex: tabIndex
152
- }, children)))));
149
+ }, children))));
153
150
  };
154
151
 
155
152
  // eslint-disable-next-line @typescript-eslint/ban-types
@@ -128,14 +128,14 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
128
128
  isHovered = _useState4[0],
129
129
  setHovered = _useState4[1];
130
130
  var openTextWidthRef = (0, _react.useRef)(null);
131
- var regularPadding = (0, _expValEquals.expValEquals)('confluence_compact_text_format', 'isEnabled', true) || (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)";
131
+ var regularPadding = DYNAMIC_PADDING_BLOCK;
132
132
  var memoizedHoverLinkStyles = (0, _react.useMemo)(function () {
133
133
  return {
134
134
  paddingBlock: compactPadding ? '1px' : regularPadding
135
135
  };
136
136
  }, [compactPadding, regularPadding]);
137
137
  var hoverLinkStyles = (0, _expValEquals.expValEquals)('platform_editor_perf_lint_cleanup', 'isEnabled', true) ? memoizedHoverLinkStyles : {
138
- paddingBlock: compactPadding ? '1px' : (0, _expValEquals.expValEquals)('confluence_compact_text_format', 'isEnabled', true) || (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)"
138
+ paddingBlock: compactPadding ? '1px' : DYNAMIC_PADDING_BLOCK
139
139
  };
140
140
  (0, _react.useLayoutEffect)(function () {
141
141
  var _containerRef$current, _hoverLinkButtonRef$c;
@@ -13,6 +13,7 @@ exports.processRawValue = processRawValue;
13
13
  exports.processRawValueWithoutValidation = processRawValueWithoutValidation;
14
14
  var _transforms = require("@atlaskit/adf-utils/transforms");
15
15
  var _model = require("@atlaskit/editor-prosemirror/model");
16
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
17
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
17
18
  var _analytics = require("../analytics");
18
19
  var _isNestedTablesSupported = require("../nesting/isNestedTablesSupported");
@@ -82,14 +83,14 @@ var transformContainerNodesWithAnalytics = function transformContainerNodesWithA
82
83
  }
83
84
  } catch (e) {
84
85
  // eslint-disable-next-line no-console
85
- console.error('Failed to transform one or more panels to panel_c1');
86
+ console.error('Failed to transform one or more panel container nodes');
86
87
  if (dispatchAnalyticsEvent) {
87
88
  dispatchAnalyticsEvent({
88
89
  action: _analytics.ACTION.DOCUMENT_PROCESSING_ERROR,
89
90
  actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
90
91
  eventType: _analytics.EVENT_TYPE.OPERATIONAL,
91
92
  attributes: {
92
- errorMessage: "".concat(e instanceof Error && e.name === 'NodeNestingTransformError' ? 'NodeNestingTransformError - Failed to transform panel to panel_c1' : undefined)
93
+ errorMessage: "".concat(e instanceof Error && e.name === 'NodeNestingTransformError' ? 'NodeNestingTransformError - Failed to transform panel container nodes' : undefined)
93
94
  }
94
95
  });
95
96
  }
@@ -123,6 +124,12 @@ function processRawValueWithoutValidation(schema, value, dispatchAnalyticsEvent)
123
124
  if (result.isTransformed && result.transformedAdf) {
124
125
  transformedAdf = result.transformedAdf;
125
126
  }
127
+ if ((0, _platformFeatureFlags.fg)('platform_editor_panel_c1_fallback_transform')) {
128
+ var panelC1Result = (0, _transforms.panelC1FallbackTransform)(schema, transformedAdf);
129
+ if (panelC1Result.isTransformed && panelC1Result.transformedAdf) {
130
+ transformedAdf = panelC1Result.transformedAdf;
131
+ }
132
+ }
126
133
  if ((0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true)) {
127
134
  var _transformContainerNo2 = transformContainerNodesWithAnalytics(transformedAdf, schema, dispatchAnalyticsEvent);
128
135
  transformedAdf = _transformContainerNo2.transformedAdf;
@@ -283,6 +290,12 @@ function processRawValue(schema, value, providerFactory, sanitizePrivateContent,
283
290
  });
284
291
  }
285
292
  }
293
+ if ((0, _platformFeatureFlags.fg)('platform_editor_panel_c1_fallback_transform')) {
294
+ var panelC1Result = (0, _transforms.panelC1FallbackTransform)(schema, transformedAdf);
295
+ if (panelC1Result.isTransformed && panelC1Result.transformedAdf) {
296
+ transformedAdf = panelC1Result.transformedAdf;
297
+ }
298
+ }
286
299
 
287
300
  // Validate ADF first before converting nested-table extensions into nested tables
288
301
  // This matches the renderer's behavior in render-document.ts
@@ -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.17.3";
17
+ const packageVersion = "116.18.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.17.3";
17
+ const packageVersion = "116.18.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -4,7 +4,6 @@ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
4
4
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
5
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
6
  import Tooltip from '@atlaskit/tooltip';
7
- import { Pulse } from '../Pulse/Pulse';
8
7
  import { iconOnlySpacing } from './iconOnlySpacing';
9
8
  import { getButtonStyles } from './styles';
10
9
  const customSizeAndPadding = {
@@ -71,8 +70,6 @@ const FloatingToolbarButton = ({
71
70
  }, /*#__PURE__*/React.createElement("div", {
72
71
  onMouseEnter: expValEquals('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? undefined : onMouseEnter,
73
72
  onMouseLeave: expValEquals('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? undefined : onMouseLeave
74
- }, /*#__PURE__*/React.createElement(Pulse, {
75
- pulse: !expValEquals('platform_editor_spotlight_migration', 'isEnabled', true) && pulse
76
73
  }, /*#__PURE__*/React.createElement(Button
77
74
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
78
75
  , {
@@ -138,7 +135,7 @@ const FloatingToolbarButton = ({
138
135
  // should be fixed here https://a11y-internal.atlassian.net/browse/DST-287
139
136
  ,
140
137
  tabIndex: tabIndex
141
- }, children)))));
138
+ }, children))));
142
139
  };
143
140
 
144
141
  // eslint-disable-next-line @typescript-eslint/ban-types
@@ -109,12 +109,12 @@ const HoverLinkOverlay = ({
109
109
  const [showLabel, setShowLabel] = useState(true);
110
110
  const [isHovered, setHovered] = useState(false);
111
111
  const openTextWidthRef = useRef(null);
112
- const regularPadding = expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)";
112
+ const regularPadding = DYNAMIC_PADDING_BLOCK;
113
113
  const memoizedHoverLinkStyles = useMemo(() => ({
114
114
  paddingBlock: compactPadding ? '1px' : regularPadding
115
115
  }), [compactPadding, regularPadding]);
116
116
  const hoverLinkStyles = expValEquals('platform_editor_perf_lint_cleanup', 'isEnabled', true) ? memoizedHoverLinkStyles : {
117
- paddingBlock: compactPadding ? '1px' : expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)"
117
+ paddingBlock: compactPadding ? '1px' : DYNAMIC_PADDING_BLOCK
118
118
  };
119
119
  useLayoutEffect(() => {
120
120
  var _containerRef$current, _hoverLinkButtonRef$c;
@@ -1,5 +1,6 @@
1
- import { syncBlockFallbackTransform, transformDedupeMarks, transformIndentationMarks, transformInvalidMediaContent, transformMediaLinkMarks, transformNestedTablesIncomingDocument, transformNodesMissingContent, transformTextLinkCodeMarks, transformMediaSingleWidth, transformContainerNodes } from '@atlaskit/adf-utils/transforms';
1
+ import { panelC1FallbackTransform, syncBlockFallbackTransform, transformDedupeMarks, transformIndentationMarks, transformInvalidMediaContent, transformMediaLinkMarks, transformNestedTablesIncomingDocument, transformNodesMissingContent, transformTextLinkCodeMarks, transformMediaSingleWidth, transformContainerNodes } from '@atlaskit/adf-utils/transforms';
2
2
  import { Node } from '@atlaskit/editor-prosemirror/model';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
3
4
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
5
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
5
6
  import { isNestedTablesSupported } from '../nesting/isNestedTablesSupported';
@@ -70,14 +71,14 @@ const transformContainerNodesWithAnalytics = (node, schema, dispatchAnalyticsEve
70
71
  }
71
72
  } catch (e) {
72
73
  // eslint-disable-next-line no-console
73
- console.error('Failed to transform one or more panels to panel_c1');
74
+ console.error('Failed to transform one or more panel container nodes');
74
75
  if (dispatchAnalyticsEvent) {
75
76
  dispatchAnalyticsEvent({
76
77
  action: ACTION.DOCUMENT_PROCESSING_ERROR,
77
78
  actionSubject: ACTION_SUBJECT.EDITOR,
78
79
  eventType: EVENT_TYPE.OPERATIONAL,
79
80
  attributes: {
80
- errorMessage: `${e instanceof Error && e.name === 'NodeNestingTransformError' ? 'NodeNestingTransformError - Failed to transform panel to panel_c1' : undefined}`
81
+ errorMessage: `${e instanceof Error && e.name === 'NodeNestingTransformError' ? 'NodeNestingTransformError - Failed to transform panel container nodes' : undefined}`
81
82
  }
82
83
  });
83
84
  }
@@ -112,6 +113,12 @@ export function processRawValueWithoutValidation(schema, value, dispatchAnalytic
112
113
  if (result.isTransformed && result.transformedAdf) {
113
114
  transformedAdf = result.transformedAdf;
114
115
  }
116
+ if (fg('platform_editor_panel_c1_fallback_transform')) {
117
+ const panelC1Result = panelC1FallbackTransform(schema, transformedAdf);
118
+ if (panelC1Result.isTransformed && panelC1Result.transformedAdf) {
119
+ transformedAdf = panelC1Result.transformedAdf;
120
+ }
121
+ }
115
122
  if (expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true)) {
116
123
  ({
117
124
  transformedAdf
@@ -278,6 +285,12 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
278
285
  });
279
286
  }
280
287
  }
288
+ if (fg('platform_editor_panel_c1_fallback_transform')) {
289
+ const panelC1Result = panelC1FallbackTransform(schema, transformedAdf);
290
+ if (panelC1Result.isTransformed && panelC1Result.transformedAdf) {
291
+ transformedAdf = panelC1Result.transformedAdf;
292
+ }
293
+ }
281
294
 
282
295
  // Validate ADF first before converting nested-table extensions into nested tables
283
296
  // This matches the renderer's behavior in render-document.ts
@@ -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.17.3";
23
+ var packageVersion = "116.18.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.17.3";
24
+ var packageVersion = "116.18.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -10,7 +10,6 @@ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
10
10
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
11
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
12
12
  import Tooltip from '@atlaskit/tooltip';
13
- import { Pulse } from '../Pulse/Pulse';
14
13
  import { iconOnlySpacing } from './iconOnlySpacing';
15
14
  import { getButtonStyles } from './styles';
16
15
  var customSizeAndPadding = {
@@ -80,8 +79,6 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
80
79
  }, /*#__PURE__*/React.createElement("div", {
81
80
  onMouseEnter: expValEquals('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? undefined : onMouseEnter,
82
81
  onMouseLeave: expValEquals('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? undefined : onMouseLeave
83
- }, /*#__PURE__*/React.createElement(Pulse, {
84
- pulse: !expValEquals('platform_editor_spotlight_migration', 'isEnabled', true) && pulse
85
82
  }, /*#__PURE__*/React.createElement(Button
86
83
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
87
84
  , {
@@ -140,7 +137,7 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
140
137
  // should be fixed here https://a11y-internal.atlassian.net/browse/DST-287
141
138
  ,
142
139
  tabIndex: tabIndex
143
- }, children)))));
140
+ }, children))));
144
141
  };
145
142
 
146
143
  // eslint-disable-next-line @typescript-eslint/ban-types
@@ -115,14 +115,14 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
115
115
  isHovered = _useState4[0],
116
116
  setHovered = _useState4[1];
117
117
  var openTextWidthRef = useRef(null);
118
- var regularPadding = expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)";
118
+ var regularPadding = DYNAMIC_PADDING_BLOCK;
119
119
  var memoizedHoverLinkStyles = useMemo(function () {
120
120
  return {
121
121
  paddingBlock: compactPadding ? '1px' : regularPadding
122
122
  };
123
123
  }, [compactPadding, regularPadding]);
124
124
  var hoverLinkStyles = expValEquals('platform_editor_perf_lint_cleanup', 'isEnabled', true) ? memoizedHoverLinkStyles : {
125
- paddingBlock: compactPadding ? '1px' : expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp') ? DYNAMIC_PADDING_BLOCK : "var(--ds-space-025, 2px)"
125
+ paddingBlock: compactPadding ? '1px' : DYNAMIC_PADDING_BLOCK
126
126
  };
127
127
  useLayoutEffect(function () {
128
128
  var _containerRef$current, _hoverLinkButtonRef$c;
@@ -1,5 +1,6 @@
1
- import { syncBlockFallbackTransform, transformDedupeMarks, transformIndentationMarks, transformInvalidMediaContent, transformMediaLinkMarks, transformNestedTablesIncomingDocument, transformNodesMissingContent, transformTextLinkCodeMarks, transformMediaSingleWidth, transformContainerNodes } from '@atlaskit/adf-utils/transforms';
1
+ import { panelC1FallbackTransform, syncBlockFallbackTransform, transformDedupeMarks, transformIndentationMarks, transformInvalidMediaContent, transformMediaLinkMarks, transformNestedTablesIncomingDocument, transformNodesMissingContent, transformTextLinkCodeMarks, transformMediaSingleWidth, transformContainerNodes } from '@atlaskit/adf-utils/transforms';
2
2
  import { Node } from '@atlaskit/editor-prosemirror/model';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
3
4
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
5
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
5
6
  import { isNestedTablesSupported } from '../nesting/isNestedTablesSupported';
@@ -68,14 +69,14 @@ var transformContainerNodesWithAnalytics = function transformContainerNodesWithA
68
69
  }
69
70
  } catch (e) {
70
71
  // eslint-disable-next-line no-console
71
- console.error('Failed to transform one or more panels to panel_c1');
72
+ console.error('Failed to transform one or more panel container nodes');
72
73
  if (dispatchAnalyticsEvent) {
73
74
  dispatchAnalyticsEvent({
74
75
  action: ACTION.DOCUMENT_PROCESSING_ERROR,
75
76
  actionSubject: ACTION_SUBJECT.EDITOR,
76
77
  eventType: EVENT_TYPE.OPERATIONAL,
77
78
  attributes: {
78
- errorMessage: "".concat(e instanceof Error && e.name === 'NodeNestingTransformError' ? 'NodeNestingTransformError - Failed to transform panel to panel_c1' : undefined)
79
+ errorMessage: "".concat(e instanceof Error && e.name === 'NodeNestingTransformError' ? 'NodeNestingTransformError - Failed to transform panel container nodes' : undefined)
79
80
  }
80
81
  });
81
82
  }
@@ -109,6 +110,12 @@ export function processRawValueWithoutValidation(schema, value, dispatchAnalytic
109
110
  if (result.isTransformed && result.transformedAdf) {
110
111
  transformedAdf = result.transformedAdf;
111
112
  }
113
+ if (fg('platform_editor_panel_c1_fallback_transform')) {
114
+ var panelC1Result = panelC1FallbackTransform(schema, transformedAdf);
115
+ if (panelC1Result.isTransformed && panelC1Result.transformedAdf) {
116
+ transformedAdf = panelC1Result.transformedAdf;
117
+ }
118
+ }
112
119
  if (expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true)) {
113
120
  var _transformContainerNo2 = transformContainerNodesWithAnalytics(transformedAdf, schema, dispatchAnalyticsEvent);
114
121
  transformedAdf = _transformContainerNo2.transformedAdf;
@@ -269,6 +276,12 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
269
276
  });
270
277
  }
271
278
  }
279
+ if (fg('platform_editor_panel_c1_fallback_transform')) {
280
+ var panelC1Result = panelC1FallbackTransform(schema, transformedAdf);
281
+ if (panelC1Result.isTransformed && panelC1Result.transformedAdf) {
282
+ transformedAdf = panelC1Result.transformedAdf;
283
+ }
284
+ }
272
285
 
273
286
  // Validate ADF first before converting nested-table extensions into nested tables
274
287
  // This matches the renderer's behavior in render-document.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "116.17.4",
3
+ "version": "116.18.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/"
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@atlaskit/activity-provider": "^3.0.0",
32
32
  "@atlaskit/adf-schema": "^56.0.0",
33
- "@atlaskit/adf-utils": "^20.0.0",
33
+ "@atlaskit/adf-utils": "^20.1.0",
34
34
  "@atlaskit/afm-i18n-platform-editor-editor-common": "2.168.0",
35
35
  "@atlaskit/analytics-listeners": "^11.1.0",
36
36
  "@atlaskit/analytics-namespaced-context": "^8.1.0",
@@ -68,7 +68,7 @@
68
68
  "@atlaskit/onboarding": "^15.1.0",
69
69
  "@atlaskit/platform-feature-flags": "^2.0.0",
70
70
  "@atlaskit/platform-feature-flags-react": "^1.1.0",
71
- "@atlaskit/primitives": "^20.2.0",
71
+ "@atlaskit/primitives": "^20.3.0",
72
72
  "@atlaskit/profilecard": "^26.5.0",
73
73
  "@atlaskit/prosemirror-history": "^1.0.0",
74
74
  "@atlaskit/react-compiler-gating": "^0.2.0",
@@ -80,8 +80,8 @@
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": "^116.0.0",
84
- "@atlaskit/tokens": "^15.2.0",
83
+ "@atlaskit/tmp-editor-statsig": "^118.0.0",
84
+ "@atlaskit/tokens": "^15.3.0",
85
85
  "@atlaskit/tooltip": "^23.1.0",
86
86
  "@atlaskit/width-detector": "^6.1.0",
87
87
  "@babel/runtime": "^7.0.0",
@@ -262,6 +262,9 @@
262
262
  },
263
263
  "platform_editor_code_block_language_detection_flow": {
264
264
  "type": "boolean"
265
+ },
266
+ "platform_editor_panel_c1_fallback_transform": {
267
+ "type": "boolean"
265
268
  }
266
269
  }
267
270
  }
@@ -1,37 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.Pulse = Pulse;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _onboarding = require("@atlaskit/onboarding");
10
- // eslint-disable-next-line @atlaskit/design-system/use-spotlight-package
11
-
12
- /**
13
- * Wraps children with {@link SpotlightPulse} component.
14
- *
15
- * It adds pulse effect to children if `pulse` is `true`.
16
- *
17
- * This custom component exists because the {@link SpotlightPulse} with `pulse={false}` renders extra `div` around `children`.
18
- * We want to keep `children` as it is if there is no `pulse`.
19
- */
20
- function Pulse(_ref) {
21
- var pulse = _ref.pulse,
22
- _ref$radius = _ref.radius,
23
- radius = _ref$radius === void 0 ? 3 : _ref$radius,
24
- children = _ref.children;
25
- if (pulse) {
26
- return (
27
- /*#__PURE__*/
28
- // SpotlightPulse shows pulse effect if `pulse` is `undefined`.
29
- // That's why we need to cast `pulse` to `false` if it's `undefined`.
30
- _react.default.createElement(_onboarding.SpotlightPulse, {
31
- radius: radius,
32
- pulse: pulse !== null && pulse !== void 0 ? pulse : false
33
- }, children)
34
- );
35
- }
36
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children);
37
- }
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- // eslint-disable-next-line @atlaskit/design-system/use-spotlight-package
3
- import { SpotlightPulse } from '@atlaskit/onboarding';
4
- /**
5
- * Wraps children with {@link SpotlightPulse} component.
6
- *
7
- * It adds pulse effect to children if `pulse` is `true`.
8
- *
9
- * This custom component exists because the {@link SpotlightPulse} with `pulse={false}` renders extra `div` around `children`.
10
- * We want to keep `children` as it is if there is no `pulse`.
11
- */
12
- export function Pulse({
13
- pulse,
14
- radius = 3,
15
- children
16
- }) {
17
- if (pulse) {
18
- return (
19
- /*#__PURE__*/
20
- // SpotlightPulse shows pulse effect if `pulse` is `undefined`.
21
- // That's why we need to cast `pulse` to `false` if it's `undefined`.
22
- React.createElement(SpotlightPulse, {
23
- radius: radius,
24
- pulse: pulse !== null && pulse !== void 0 ? pulse : false
25
- }, children)
26
- );
27
- }
28
- return /*#__PURE__*/React.createElement(React.Fragment, null, children);
29
- }
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- // eslint-disable-next-line @atlaskit/design-system/use-spotlight-package
3
- import { SpotlightPulse } from '@atlaskit/onboarding';
4
- /**
5
- * Wraps children with {@link SpotlightPulse} component.
6
- *
7
- * It adds pulse effect to children if `pulse` is `true`.
8
- *
9
- * This custom component exists because the {@link SpotlightPulse} with `pulse={false}` renders extra `div` around `children`.
10
- * We want to keep `children` as it is if there is no `pulse`.
11
- */
12
- export function Pulse(_ref) {
13
- var pulse = _ref.pulse,
14
- _ref$radius = _ref.radius,
15
- radius = _ref$radius === void 0 ? 3 : _ref$radius,
16
- children = _ref.children;
17
- if (pulse) {
18
- return (
19
- /*#__PURE__*/
20
- // SpotlightPulse shows pulse effect if `pulse` is `undefined`.
21
- // That's why we need to cast `pulse` to `false` if it's `undefined`.
22
- React.createElement(SpotlightPulse, {
23
- radius: radius,
24
- pulse: pulse !== null && pulse !== void 0 ? pulse : false
25
- }, children)
26
- );
27
- }
28
- return /*#__PURE__*/React.createElement(React.Fragment, null, children);
29
- }
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import type { ReactNode } from 'react';
3
- interface Props {
4
- children: ReactNode;
5
- /** If true, the component will have pulse onboarding effect around it. */
6
- pulse?: boolean;
7
- /** The radius of the pulse effect. */
8
- radius?: number;
9
- }
10
- /**
11
- * Wraps children with {@link SpotlightPulse} component.
12
- *
13
- * It adds pulse effect to children if `pulse` is `true`.
14
- *
15
- * This custom component exists because the {@link SpotlightPulse} with `pulse={false}` renders extra `div` around `children`.
16
- * We want to keep `children` as it is if there is no `pulse`.
17
- */
18
- export declare function Pulse({ pulse, radius, children }: Props): React.JSX.Element;
19
- export {};