@atlaskit/editor-common 119.11.0 → 119.12.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
+ ## 119.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`80b19d6c0649f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/80b19d6c0649f) -
8
+ Preserve agent type metadata in collaboration presence participants behind
9
+ `platform_move_presence_agents`.
10
+ - [`a20b9032800d1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a20b9032800d1) -
11
+ [ux] Improve inline skill mentions under `rovo_skill_tag_label_wrapping`.
12
+
13
+ With the gate enabled:
14
+ - Long labels wrap as part of the surrounding text flow.
15
+ - The slash and icon stay with the first line of the label.
16
+ - Prompt text can continue after the skill tag's final line.
17
+ - A missing `slashCommand` falls back to the skill name.
18
+
19
+ With the gate disabled, existing editor wrapper styling and empty-slug behavior are preserved.
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies
24
+
3
25
  ## 119.11.0
4
26
 
5
27
  ### Minor Changes
@@ -10,6 +10,7 @@ var _react = _interopRequireWildcard(require("react"));
10
10
  var _react2 = require("@emotion/react");
11
11
  var _classnames = _interopRequireDefault(require("classnames"));
12
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
13
14
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
14
15
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
15
16
  var _hooks = require("../../../hooks");
@@ -36,6 +37,24 @@ var inlineWrapperStyles = (0, _react2.css)({
36
37
  maxWidth: '100%'
37
38
  }
38
39
  });
40
+ var flowingInlineWrapperStyles = (0, _react2.css)({
41
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- The child marker lets an inline extension opt into text-flow layout without coupling editor-common to the skill feature gate.
42
+ '&:has([data-inline-extension-layout="flow"])': {
43
+ background: 'transparent',
44
+ boxShadow: 'none',
45
+ display: 'inline',
46
+ margin: 0,
47
+ verticalAlign: 'baseline'
48
+ },
49
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- The legacy wrapper decorations must be removed only when its child opts into text-flow layout.
50
+ '&:has([data-inline-extension-layout="flow"])::after, &:has([data-inline-extension-layout="flow"])::before': {
51
+ display: 'none'
52
+ },
53
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- The legacy overlay must be hidden only when its child opts into text-flow layout.
54
+ '&:has([data-inline-extension-layout="flow"]) > .extension-overlay': {
55
+ display: 'none'
56
+ }
57
+ });
39
58
  var hoverStyles = (0, _react2.css)({
40
59
  '&:hover': {
41
60
  boxShadow: "0 0 0 1px ".concat("var(--ds-border-input, #8C8F97)")
@@ -68,6 +87,7 @@ var InlineExtension = function InlineExtension(props) {
68
87
  isLivePageViewMode = props.isLivePageViewMode;
69
88
  var _ref3 = macroInteractionDesignFeatureFlags || {},
70
89
  showMacroInteractionDesignUpdates = _ref3.showMacroInteractionDesignUpdates;
90
+ var shouldUseFlowingInlineWrapper = (0, _fg.fg)('rovo_skill_tag_label_wrapping');
71
91
  var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(pluginInjectionApi, ['width'], function (states) {
72
92
  var _states$widthState;
73
93
  return {
@@ -107,7 +127,7 @@ var InlineExtension = function InlineExtension(props) {
107
127
  "data-testid": "inline-extension-wrapper",
108
128
  css: [
109
129
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
110
- _styles2.wrapperStyle, inlineWrapperStyles, showMacroInteractionDesignUpdates && !isLivePageViewMode && hoverStyles]
130
+ _styles2.wrapperStyle, inlineWrapperStyles, showMacroInteractionDesignUpdates && !isLivePageViewMode && hoverStyles, shouldUseFlowingInlineWrapper && flowingInlineWrapperStyles]
111
131
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
112
132
  ,
113
133
  className: classNames,
@@ -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 = "119.10.2";
31
+ var packageVersion = "119.11.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 = "119.10.2";
27
+ var packageVersion = "119.11.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -8,6 +8,7 @@ import React, { Fragment, useMemo } from 'react';
8
8
  import { css, jsx } from '@emotion/react';
9
9
  import classnames from 'classnames';
10
10
  import { akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
11
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
11
12
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
12
13
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
13
14
  import { useSharedPluginStateWithSelector } from '../../../hooks';
@@ -26,6 +27,24 @@ const inlineWrapperStyles = css({
26
27
  maxWidth: '100%'
27
28
  }
28
29
  });
30
+ const flowingInlineWrapperStyles = css({
31
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- The child marker lets an inline extension opt into text-flow layout without coupling editor-common to the skill feature gate.
32
+ '&:has([data-inline-extension-layout="flow"])': {
33
+ background: 'transparent',
34
+ boxShadow: 'none',
35
+ display: 'inline',
36
+ margin: 0,
37
+ verticalAlign: 'baseline'
38
+ },
39
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- The legacy wrapper decorations must be removed only when its child opts into text-flow layout.
40
+ '&:has([data-inline-extension-layout="flow"])::after, &:has([data-inline-extension-layout="flow"])::before': {
41
+ display: 'none'
42
+ },
43
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- The legacy overlay must be hidden only when its child opts into text-flow layout.
44
+ '&:has([data-inline-extension-layout="flow"]) > .extension-overlay': {
45
+ display: 'none'
46
+ }
47
+ });
29
48
  const hoverStyles = css({
30
49
  '&:hover': {
31
50
  boxShadow: `0 0 0 1px ${"var(--ds-border-input, #8C8F97)"}`
@@ -61,6 +80,7 @@ const InlineExtension = props => {
61
80
  const {
62
81
  showMacroInteractionDesignUpdates
63
82
  } = macroInteractionDesignFeatureFlags || {};
83
+ const shouldUseFlowingInlineWrapper = fg('rovo_skill_tag_label_wrapping');
64
84
  const {
65
85
  width
66
86
  } = useSharedPluginStateWithSelector(pluginInjectionApi, ['width'], states => {
@@ -101,7 +121,7 @@ const InlineExtension = props => {
101
121
  "data-testid": "inline-extension-wrapper",
102
122
  css: [
103
123
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
104
- wrapperStyle, inlineWrapperStyles, showMacroInteractionDesignUpdates && !isLivePageViewMode && hoverStyles]
124
+ wrapperStyle, inlineWrapperStyles, showMacroInteractionDesignUpdates && !isLivePageViewMode && hoverStyles, shouldUseFlowingInlineWrapper && flowingInlineWrapperStyles]
105
125
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
106
126
  ,
107
127
  className: classNames,
@@ -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 = "119.10.2";
17
+ const packageVersion = "119.11.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 = "119.10.2";
17
+ const packageVersion = "119.11.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -8,6 +8,7 @@ import React, { Fragment, useMemo } from 'react';
8
8
  import { css, jsx } from '@emotion/react';
9
9
  import classnames from 'classnames';
10
10
  import { akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
11
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
11
12
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
12
13
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
13
14
  import { useSharedPluginStateWithSelector } from '../../../hooks';
@@ -26,6 +27,24 @@ var inlineWrapperStyles = css({
26
27
  maxWidth: '100%'
27
28
  }
28
29
  });
30
+ var flowingInlineWrapperStyles = css({
31
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- The child marker lets an inline extension opt into text-flow layout without coupling editor-common to the skill feature gate.
32
+ '&:has([data-inline-extension-layout="flow"])': {
33
+ background: 'transparent',
34
+ boxShadow: 'none',
35
+ display: 'inline',
36
+ margin: 0,
37
+ verticalAlign: 'baseline'
38
+ },
39
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- The legacy wrapper decorations must be removed only when its child opts into text-flow layout.
40
+ '&:has([data-inline-extension-layout="flow"])::after, &:has([data-inline-extension-layout="flow"])::before': {
41
+ display: 'none'
42
+ },
43
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- The legacy overlay must be hidden only when its child opts into text-flow layout.
44
+ '&:has([data-inline-extension-layout="flow"]) > .extension-overlay': {
45
+ display: 'none'
46
+ }
47
+ });
29
48
  var hoverStyles = css({
30
49
  '&:hover': {
31
50
  boxShadow: "0 0 0 1px ".concat("var(--ds-border-input, #8C8F97)")
@@ -58,6 +77,7 @@ var InlineExtension = function InlineExtension(props) {
58
77
  isLivePageViewMode = props.isLivePageViewMode;
59
78
  var _ref3 = macroInteractionDesignFeatureFlags || {},
60
79
  showMacroInteractionDesignUpdates = _ref3.showMacroInteractionDesignUpdates;
80
+ var shouldUseFlowingInlineWrapper = fg('rovo_skill_tag_label_wrapping');
61
81
  var _useSharedPluginState = useSharedPluginStateWithSelector(pluginInjectionApi, ['width'], function (states) {
62
82
  var _states$widthState;
63
83
  return {
@@ -97,7 +117,7 @@ var InlineExtension = function InlineExtension(props) {
97
117
  "data-testid": "inline-extension-wrapper",
98
118
  css: [
99
119
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
100
- wrapperStyle, inlineWrapperStyles, showMacroInteractionDesignUpdates && !isLivePageViewMode && hoverStyles]
120
+ wrapperStyle, inlineWrapperStyles, showMacroInteractionDesignUpdates && !isLivePageViewMode && hoverStyles, shouldUseFlowingInlineWrapper && flowingInlineWrapperStyles]
101
121
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
102
122
  ,
103
123
  className: classNames,
@@ -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 = "119.10.2";
23
+ var packageVersion = "119.11.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 = "119.10.2";
24
+ var packageVersion = "119.11.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -377,6 +377,7 @@ type ProviderParticipantPermitLevel = {
377
377
  };
378
378
  export interface CollabParticipant {
379
379
  actingUserId?: string;
380
+ agentType?: string;
380
381
  avatar: string;
381
382
  cursorPos?: number;
382
383
  isGuest?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "119.11.0",
3
+ "version": "119.12.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/"
@@ -84,7 +84,7 @@
84
84
  "@atlaskit/task-decision": "^21.8.0",
85
85
  "@atlaskit/teams-app-config": "^2.2.0",
86
86
  "@atlaskit/textfield": "^10.0.0",
87
- "@atlaskit/tmp-editor-statsig": "^155.0.0",
87
+ "@atlaskit/tmp-editor-statsig": "^156.0.0",
88
88
  "@atlaskit/tokens": "^16.7.0",
89
89
  "@atlaskit/tooltip": "^24.1.0",
90
90
  "@atlaskit/width-detector": "^7.0.0",
@@ -169,6 +169,10 @@
169
169
  "type": "boolean",
170
170
  "referenceOnly": true
171
171
  },
172
+ "rovo_skill_tag_label_wrapping": {
173
+ "type": "boolean",
174
+ "referenceOnly": true
175
+ },
172
176
  "platform_editor_use_new_experiments_api": {
173
177
  "type": "boolean"
174
178
  },