@atlaskit/editor-common 116.18.0 → 116.19.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,27 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 116.19.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`ecafba7c81b7d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ecafba7c81b7d) -
8
+ Enrich synced block deletion analytics so source-block deletions can be explained rather than just
9
+ counted. The source `syncedBlockDelete` operational event now carries `deletionReason` and a
10
+ `mechanism` dimension (undo/redo/deleteButton/keyboardDelete/selectionReplaced/other), and
11
+ repeated emissions for the same removal are de-duplicated. A real operational `syncedBlockCreate`
12
+ success event is now emitted, and the source bare-uuid join key is added to the copy event so
13
+ create/copy/delete can be correlated. All new attributes and events are gated behind
14
+ `platform_editor_blocks_patch_4`; gate-off behaviour is unchanged.
15
+
16
+ ## 116.18.1
17
+
18
+ ### Patch Changes
19
+
20
+ - [`46ee61dd53e91`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/46ee61dd53e91) -
21
+ Remove stale experiment confluence_compact_text_format (FFCLEANUP-85812): inline final values
22
+ (flag enabled), simplify conditions, remove experiment config entries.
23
+ - Updated dependencies
24
+
3
25
  ## 116.18.0
4
26
 
5
27
  ### Minor Changes
@@ -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.5";
31
+ var packageVersion = "116.18.1";
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.5";
27
+ var packageVersion = "116.18.1";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -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;
@@ -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.5";
17
+ const packageVersion = "116.18.1";
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.5";
17
+ const packageVersion = "116.18.1";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -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;
@@ -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.5";
23
+ var packageVersion = "116.18.1";
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.5";
24
+ var packageVersion = "116.18.1";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -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;
@@ -46,6 +46,24 @@ type SyncedBlockSuccessAttributes = {
46
46
  */
47
47
  sourceProduct?: string;
48
48
  };
49
+ /**
50
+ * Mirrors the provider's `DeletionReason` union as a string literal so the
51
+ * analytics schema is self-contained without `editor-common` depending on the
52
+ * provider. Kept in sync by a compile-time guard in the provider tests.
53
+ */
54
+ export type SyncedBlockDeletionReasonAttribute = 'source-block-deleted' | 'source-block-unsynced' | 'source-block-unpublished';
55
+ /**
56
+ * Mirrors the provider's `DeletionMechanism` union. Values name the user action:
57
+ * `undo`/`redo` (history), `deleteButton` (toolbar Delete control),
58
+ * `keyboardDelete` (Backspace/Delete on a caret/range), `selectionReplaced`
59
+ * (block selected then typed/pasted over), `other` (non-direct/code-dispatched).
60
+ */
61
+ export type SyncedBlockDeletionMechanismAttribute = 'undo' | 'redo' | 'deleteButton' | 'keyboardDelete' | 'selectionReplaced' | 'other';
62
+ /** Delete-success enrichment, only populated behind `platform_editor_blocks_patch_4`. */
63
+ type SyncedBlockDeleteSuccessAttributes = SyncedBlockSuccessAttributes & {
64
+ deletionReason?: SyncedBlockDeletionReasonAttribute;
65
+ mechanism?: SyncedBlockDeletionMechanismAttribute;
66
+ };
49
67
  type FetchSyncedBlockSuccessAttributes = SyncedBlockSuccessAttributes;
50
68
  type SyncedBlockCopySuccessAttributes = SyncedBlockSuccessAttributes & {
51
69
  inputMethod: INPUT_METHOD;
@@ -68,7 +86,7 @@ export type SyncedBlockFetchReferencesErrorAEP = OperationalAEP<ACTION.ERROR, AC
68
86
  export type SyncedBlockFetchSuccessAEP = OperationalAEP<ACTION.FETCHED, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_FETCH, FetchSyncedBlockSuccessAttributes>;
69
87
  export type SyncedBlockCreateSuccessAEP = OperationalAEP<ACTION.INSERTED, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_CREATE, SyncedBlockSuccessAttributes>;
70
88
  export type SyncedBlockUpdateSuccessAEP = OperationalAEP<ACTION.UPDATED, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_UPDATE, SyncedBlockSuccessAttributes>;
71
- export type SyncedBlockDeleteSuccessAEP = OperationalAEP<ACTION.DELETED, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_DELETE, SyncedBlockSuccessAttributes>;
89
+ export type SyncedBlockDeleteSuccessAEP = OperationalAEP<ACTION.DELETED, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_DELETE, SyncedBlockDeleteSuccessAttributes>;
72
90
  export type ReferenceSyncedBlockCreateSuccessAEP = OperationalAEP<ACTION.INSERTED, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.REFERENCE_SYNCED_BLOCK_CREATE, SyncedBlockSuccessAttributes>;
73
91
  export type ReferenceSyncedBlockDeleteSuccessAEP = OperationalAEP<ACTION.DELETED, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.REFERENCE_SYNCED_BLOCK_DELETE, SyncedBlockSuccessAttributes>;
74
92
  export type SyncedBlockEditSourceAEP = OperationalAEP<ACTION.SYNCED_BLOCK_EDIT_SOURCE, ACTION_SUBJECT.SYNCED_BLOCK, ACTION_SUBJECT_ID.SYNCED_BLOCK_SOURCE_URL, SyncedBlockEditSourceAttributes>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "116.18.0",
3
+ "version": "116.19.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/"
@@ -80,7 +80,7 @@
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": "^117.0.0",
83
+ "@atlaskit/tmp-editor-statsig": "^118.0.0",
84
84
  "@atlaskit/tokens": "^15.3.0",
85
85
  "@atlaskit/tooltip": "^23.1.0",
86
86
  "@atlaskit/width-detector": "^6.1.0",