@atlaskit/editor-common 115.8.0 → 115.8.2

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,24 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 115.8.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`809a7bb620a33`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/809a7bb620a33) -
8
+ [ux] Cleanup feature gate `cc_editor_hover_link_overlay_css_fix`. The hover link overlay overflow
9
+ handling is now always active, so labels reset on hover and hide when the button would overflow
10
+ its container.
11
+ - Updated dependencies
12
+
13
+ ## 115.8.1
14
+
15
+ ### Patch Changes
16
+
17
+ - [`4129a00a1ae04`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4129a00a1ae04) -
18
+ Add `completionSource` attribute to contextual typeahead analytics events to distinguish between
19
+ cold (frequency-only), server slow-lane, and on-device local LLM scoring paths
20
+ - Updated dependencies
21
+
3
22
  ## 115.8.0
4
23
 
5
24
  ### Minor Changes
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
19
  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 _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
20
20
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
21
21
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
22
- var packageVersion = "115.7.5";
22
+ var packageVersion = "115.8.1";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // 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 = "115.7.5";
27
+ var packageVersion = "115.8.1";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -169,13 +169,11 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
169
169
  // When a smart link wraps to multiple lines in a constrained container (e.g. table cell),
170
170
  // the hover button can overflow beyond the container bounds. We detect this by comparing
171
171
  // the button's right edge to the container's right edge, and hide the label if it overflows.
172
- if ((0, _experiments.editorExperiment)('cc_editor_hover_link_overlay_css_fix', true)) {
173
- if (containerRef.current && hoverLinkButtonRef.current) {
174
- var containerRight = containerRef.current.getBoundingClientRect().right;
175
- var buttonRight = hoverLinkButtonRef.current.getBoundingClientRect().right;
176
- if (buttonRight > containerRight) {
177
- canShowLabel = false;
178
- }
172
+ if (containerRef.current && hoverLinkButtonRef.current) {
173
+ var containerRight = containerRef.current.getBoundingClientRect().right;
174
+ var buttonRight = hoverLinkButtonRef.current.getBoundingClientRect().right;
175
+ if (buttonRight > containerRight) {
176
+ canShowLabel = false;
179
177
  }
180
178
  }
181
179
  setShowLabel(canShowLabel);
@@ -185,10 +183,8 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
185
183
 
186
184
  // Reset label visibility on hover start so we can measure if it overflows.
187
185
  // Without this, the label stays hidden from a previous hover and won't be re-measured.
188
- if ((0, _experiments.editorExperiment)('cc_editor_hover_link_overlay_css_fix', true)) {
189
- if (isHovered) {
190
- setShowLabel(true);
191
- }
186
+ if (isHovered) {
187
+ setShowLabel(true);
192
188
  }
193
189
  };
194
190
  var sendVisitLinkAnalytics = function sendVisitLinkAnalytics(inputMethod) {
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
4
4
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
5
5
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
6
6
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
7
- const packageVersion = "115.7.5";
7
+ const packageVersion = "115.8.1";
8
8
  const sanitiseSentryEvents = (data, _hint) => {
9
9
  // Remove URL as it has UGC
10
10
  // 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 = "115.7.5";
17
+ const packageVersion = "115.8.1";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -148,13 +148,11 @@ const HoverLinkOverlay = ({
148
148
  // When a smart link wraps to multiple lines in a constrained container (e.g. table cell),
149
149
  // the hover button can overflow beyond the container bounds. We detect this by comparing
150
150
  // the button's right edge to the container's right edge, and hide the label if it overflows.
151
- if (editorExperiment('cc_editor_hover_link_overlay_css_fix', true)) {
152
- if (containerRef.current && hoverLinkButtonRef.current) {
153
- const containerRight = containerRef.current.getBoundingClientRect().right;
154
- const buttonRight = hoverLinkButtonRef.current.getBoundingClientRect().right;
155
- if (buttonRight > containerRight) {
156
- canShowLabel = false;
157
- }
151
+ if (containerRef.current && hoverLinkButtonRef.current) {
152
+ const containerRight = containerRef.current.getBoundingClientRect().right;
153
+ const buttonRight = hoverLinkButtonRef.current.getBoundingClientRect().right;
154
+ if (buttonRight > containerRight) {
155
+ canShowLabel = false;
158
156
  }
159
157
  }
160
158
  setShowLabel(canShowLabel);
@@ -164,10 +162,8 @@ const HoverLinkOverlay = ({
164
162
 
165
163
  // Reset label visibility on hover start so we can measure if it overflows.
166
164
  // Without this, the label stays hidden from a previous hover and won't be re-measured.
167
- if (editorExperiment('cc_editor_hover_link_overlay_css_fix', true)) {
168
- if (isHovered) {
169
- setShowLabel(true);
170
- }
165
+ if (isHovered) {
166
+ setShowLabel(true);
171
167
  }
172
168
  };
173
169
  const sendVisitLinkAnalytics = inputMethod => {
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
10
10
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
11
11
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
12
12
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
13
- var packageVersion = "115.7.5";
13
+ var packageVersion = "115.8.1";
14
14
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
15
15
  // Remove URL as it has UGC
16
16
  // 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 = "115.7.5";
24
+ var packageVersion = "115.8.1";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -156,13 +156,11 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
156
156
  // When a smart link wraps to multiple lines in a constrained container (e.g. table cell),
157
157
  // the hover button can overflow beyond the container bounds. We detect this by comparing
158
158
  // the button's right edge to the container's right edge, and hide the label if it overflows.
159
- if (editorExperiment('cc_editor_hover_link_overlay_css_fix', true)) {
160
- if (containerRef.current && hoverLinkButtonRef.current) {
161
- var containerRight = containerRef.current.getBoundingClientRect().right;
162
- var buttonRight = hoverLinkButtonRef.current.getBoundingClientRect().right;
163
- if (buttonRight > containerRight) {
164
- canShowLabel = false;
165
- }
159
+ if (containerRef.current && hoverLinkButtonRef.current) {
160
+ var containerRight = containerRef.current.getBoundingClientRect().right;
161
+ var buttonRight = hoverLinkButtonRef.current.getBoundingClientRect().right;
162
+ if (buttonRight > containerRight) {
163
+ canShowLabel = false;
166
164
  }
167
165
  }
168
166
  setShowLabel(canShowLabel);
@@ -172,10 +170,8 @@ var HoverLinkOverlay = function HoverLinkOverlay(_ref) {
172
170
 
173
171
  // Reset label visibility on hover start so we can measure if it overflows.
174
172
  // Without this, the label stays hidden from a previous hover and won't be re-measured.
175
- if (editorExperiment('cc_editor_hover_link_overlay_css_fix', true)) {
176
- if (isHovered) {
177
- setShowLabel(true);
178
- }
173
+ if (isHovered) {
174
+ setShowLabel(true);
179
175
  }
180
176
  };
181
177
  var sendVisitLinkAnalytics = function sendVisitLinkAnalytics(inputMethod) {
@@ -49,6 +49,7 @@ export type { AIEventPayload, AIMarkdownConversionErrorCaughtAttributes } from '
49
49
  export type { AIProactiveEventPayload } from './types/ai-proactive-events';
50
50
  export type { AIQuickPromptEventPayload } from './types/ai-quick-prompt-events';
51
51
  export type { AiAutocompleteEventPayload, TriggerType } from './types/ai-autocomplete-events';
52
+ export type { CompletionSource, ContextualTypeaheadEventPayload, } from './types/contextual-typeahead-events';
52
53
  export type { AIDefinitionsEventPayload } from './types/ai-definitions-events';
53
54
  export type { AIUnifiedEventPayload, AIUnifiedCommonAttributes } from './types/ai-unified-events';
54
55
  export type { ActiveSessionEventPayload, ActiveSessionEventAttributes, } from './types/activity-session-events';
@@ -1,13 +1,26 @@
1
1
  import type { ACTION, ACTION_SUBJECT } from './enums';
2
2
  import type { TrackAEP } from './utils';
3
- type ContextualTypeaheadViewedAEP = TrackAEP<ACTION.SUGGESTION_VIEWED, ACTION_SUBJECT.CONTEXTUAL_TYPEAHEAD, undefined, undefined, undefined>;
3
+ /** Which scoring path produced the suggestion shown to the user. */
4
+ export type CompletionSource =
5
+ /** No slow-lane vector available yet; frequency-only trie scoring. */
6
+ 'cold'
7
+ /** Server slow-lane API provided the context vector and LM logits. */
8
+ | 'server'
9
+ /** On-device WebGPU/MLC model provided the context vector and LM logits. */
10
+ | 'localLlm';
11
+ type ContextualTypeaheadViewedAttributes = {
12
+ completionSource: CompletionSource;
13
+ };
14
+ type ContextualTypeaheadViewedAEP = TrackAEP<ACTION.SUGGESTION_VIEWED, ACTION_SUBJECT.CONTEXTUAL_TYPEAHEAD, undefined, ContextualTypeaheadViewedAttributes, undefined>;
4
15
  type ContextualTypeaheadAcceptedAttributes = {
16
+ completionSource: CompletionSource;
5
17
  kssDelta: number;
6
18
  suggestionLength: number;
7
19
  typedLength: number;
8
20
  };
9
21
  type ContextualTypeaheadAcceptedAEP = TrackAEP<ACTION.SUGGESTION_INSERTED, ACTION_SUBJECT.CONTEXTUAL_TYPEAHEAD, undefined, ContextualTypeaheadAcceptedAttributes, undefined>;
10
22
  type ContextualTypeaheadDismissedAttributes = {
23
+ completionSource: CompletionSource;
11
24
  reason: 'escape' | 'blur';
12
25
  };
13
26
  type ContextualTypeaheadDismissedAEP = TrackAEP<ACTION.SUGGESTION_DISMISSED, ACTION_SUBJECT.CONTEXTUAL_TYPEAHEAD, undefined, ContextualTypeaheadDismissedAttributes, undefined>;
@@ -49,6 +49,7 @@ export type { AIEventPayload, AIMarkdownConversionErrorCaughtAttributes } from '
49
49
  export type { AIProactiveEventPayload } from './types/ai-proactive-events';
50
50
  export type { AIQuickPromptEventPayload } from './types/ai-quick-prompt-events';
51
51
  export type { AiAutocompleteEventPayload, TriggerType } from './types/ai-autocomplete-events';
52
+ export type { CompletionSource, ContextualTypeaheadEventPayload, } from './types/contextual-typeahead-events';
52
53
  export type { AIDefinitionsEventPayload } from './types/ai-definitions-events';
53
54
  export type { AIUnifiedEventPayload, AIUnifiedCommonAttributes } from './types/ai-unified-events';
54
55
  export type { ActiveSessionEventPayload, ActiveSessionEventAttributes, } from './types/activity-session-events';
@@ -1,13 +1,26 @@
1
1
  import type { ACTION, ACTION_SUBJECT } from './enums';
2
2
  import type { TrackAEP } from './utils';
3
- type ContextualTypeaheadViewedAEP = TrackAEP<ACTION.SUGGESTION_VIEWED, ACTION_SUBJECT.CONTEXTUAL_TYPEAHEAD, undefined, undefined, undefined>;
3
+ /** Which scoring path produced the suggestion shown to the user. */
4
+ export type CompletionSource =
5
+ /** No slow-lane vector available yet; frequency-only trie scoring. */
6
+ 'cold'
7
+ /** Server slow-lane API provided the context vector and LM logits. */
8
+ | 'server'
9
+ /** On-device WebGPU/MLC model provided the context vector and LM logits. */
10
+ | 'localLlm';
11
+ type ContextualTypeaheadViewedAttributes = {
12
+ completionSource: CompletionSource;
13
+ };
14
+ type ContextualTypeaheadViewedAEP = TrackAEP<ACTION.SUGGESTION_VIEWED, ACTION_SUBJECT.CONTEXTUAL_TYPEAHEAD, undefined, ContextualTypeaheadViewedAttributes, undefined>;
4
15
  type ContextualTypeaheadAcceptedAttributes = {
16
+ completionSource: CompletionSource;
5
17
  kssDelta: number;
6
18
  suggestionLength: number;
7
19
  typedLength: number;
8
20
  };
9
21
  type ContextualTypeaheadAcceptedAEP = TrackAEP<ACTION.SUGGESTION_INSERTED, ACTION_SUBJECT.CONTEXTUAL_TYPEAHEAD, undefined, ContextualTypeaheadAcceptedAttributes, undefined>;
10
22
  type ContextualTypeaheadDismissedAttributes = {
23
+ completionSource: CompletionSource;
11
24
  reason: 'escape' | 'blur';
12
25
  };
13
26
  type ContextualTypeaheadDismissedAEP = TrackAEP<ACTION.SUGGESTION_DISMISSED, ACTION_SUBJECT.CONTEXTUAL_TYPEAHEAD, undefined, ContextualTypeaheadDismissedAttributes, undefined>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "115.8.0",
3
+ "version": "115.8.2",
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/"
@@ -57,7 +57,7 @@
57
57
  "@atlaskit/editor-tables": "^2.10.0",
58
58
  "@atlaskit/editor-toolbar": "^1.10.0",
59
59
  "@atlaskit/editor-toolbar-model": "^0.5.0",
60
- "@atlaskit/emoji": "^70.16.0",
60
+ "@atlaskit/emoji": "^70.17.0",
61
61
  "@atlaskit/icon": "^35.4.0",
62
62
  "@atlaskit/link": "^3.4.0",
63
63
  "@atlaskit/link-datasource": "^5.6.0",
@@ -81,13 +81,13 @@
81
81
  "@atlaskit/prosemirror-history": "^0.2.0",
82
82
  "@atlaskit/react-ufo": "^6.7.0",
83
83
  "@atlaskit/section-message": "^8.13.0",
84
- "@atlaskit/smart-card": "^44.24.0",
84
+ "@atlaskit/smart-card": "^44.25.0",
85
85
  "@atlaskit/smart-user-picker": "^10.2.0",
86
86
  "@atlaskit/spinner": "^19.1.0",
87
87
  "@atlaskit/task-decision": "^20.1.0",
88
88
  "@atlaskit/teams-app-config": "^1.12.0",
89
89
  "@atlaskit/textfield": "^8.3.0",
90
- "@atlaskit/tmp-editor-statsig": "^93.0.0",
90
+ "@atlaskit/tmp-editor-statsig": "^94.0.0",
91
91
  "@atlaskit/tokens": "^13.3.0",
92
92
  "@atlaskit/tooltip": "^22.6.0",
93
93
  "@atlaskit/width-detector": "^5.1.0",