@atlaskit/editor-common 128.0.1 → 128.2.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/cjs/extensions/buildMenuItem.js +1 -0
  3. package/dist/cjs/messages/syncBlock.js +5 -0
  4. package/dist/cjs/monitoring/error.js +1 -1
  5. package/dist/cjs/quick-insert/CompactQuickInsertMenuItem.js +13 -4
  6. package/dist/cjs/quick-insert/ElementBrowserQuickInsertMenuItem.js +2 -1
  7. package/dist/cjs/quick-insert/QuickInsertHoverPreview.compiled.css +5 -0
  8. package/dist/cjs/quick-insert/QuickInsertHoverPreview.js +73 -28
  9. package/dist/cjs/quick-insert/QuickInsertMenuItem.js +7 -0
  10. package/dist/cjs/quick-insert/SkillTag.compiled.css +9 -0
  11. package/dist/cjs/quick-insert/SkillTag.js +44 -0
  12. package/dist/cjs/styles/shared/table.js +3 -5
  13. package/dist/cjs/ui/DropList/index.js +1 -1
  14. package/dist/es2019/extensions/buildMenuItem.js +1 -0
  15. package/dist/es2019/messages/syncBlock.js +5 -0
  16. package/dist/es2019/monitoring/error.js +1 -1
  17. package/dist/es2019/quick-insert/CompactQuickInsertMenuItem.js +13 -4
  18. package/dist/es2019/quick-insert/ElementBrowserQuickInsertMenuItem.js +2 -1
  19. package/dist/es2019/quick-insert/QuickInsertHoverPreview.compiled.css +5 -0
  20. package/dist/es2019/quick-insert/QuickInsertHoverPreview.js +65 -20
  21. package/dist/es2019/quick-insert/QuickInsertMenuItem.js +7 -0
  22. package/dist/es2019/quick-insert/SkillTag.compiled.css +9 -0
  23. package/dist/es2019/quick-insert/SkillTag.js +35 -0
  24. package/dist/es2019/styles/shared/table.js +3 -5
  25. package/dist/es2019/ui/DropList/index.js +1 -1
  26. package/dist/esm/extensions/buildMenuItem.js +1 -0
  27. package/dist/esm/messages/syncBlock.js +5 -0
  28. package/dist/esm/monitoring/error.js +1 -1
  29. package/dist/esm/quick-insert/CompactQuickInsertMenuItem.js +13 -4
  30. package/dist/esm/quick-insert/ElementBrowserQuickInsertMenuItem.js +2 -1
  31. package/dist/esm/quick-insert/QuickInsertHoverPreview.compiled.css +5 -0
  32. package/dist/esm/quick-insert/QuickInsertHoverPreview.js +64 -20
  33. package/dist/esm/quick-insert/QuickInsertMenuItem.js +7 -0
  34. package/dist/esm/quick-insert/SkillTag.compiled.css +9 -0
  35. package/dist/esm/quick-insert/SkillTag.js +37 -0
  36. package/dist/esm/styles/shared/table.js +3 -5
  37. package/dist/esm/ui/DropList/index.js +1 -1
  38. package/dist/types/extensions/types/utils.d.ts +1 -0
  39. package/dist/types/messages/syncBlock.d.ts +5 -0
  40. package/dist/types/quick-insert/CompactQuickInsertMenuItem.d.ts +1 -1
  41. package/dist/types/quick-insert/ElementBrowserQuickInsertMenuItem.d.ts +1 -1
  42. package/dist/types/quick-insert/QuickInsertContext.d.ts +3 -0
  43. package/dist/types/quick-insert/QuickInsertHoverPreview.d.ts +10 -1
  44. package/dist/types/quick-insert/QuickInsertMenuItem.d.ts +7 -1
  45. package/dist/types/quick-insert/SkillTag.d.ts +6 -0
  46. package/dist/types/styles/shared/table.d.ts +3 -5
  47. package/dist/types/types/feature-flags.d.ts +10 -0
  48. package/package.json +10 -10
  49. package/quick-insert/skill-tag/package.json +10 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 128.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`ef6d325af58d6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ef6d325af58d6) -
8
+ Update i18n NPM package versions for editor,editor-extensions,activity-platform,media,elements
9
+ (Group 3)
10
+ - [`375d0ca074591`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/375d0ca074591) -
11
+ Unify Rovo Skill quick-insert construction across product Editors and AI Chat behind
12
+ `platform_editor_slash_command`. Add shared menu title and preview presentation options, and reuse
13
+ existing extension metadata for Skill icons, descriptions, attribution and Beta labels. Export the
14
+ shared Editor SkillTag for reuse across menus. Preserve shared insertion and Chat-specific
15
+ behavior.
16
+
17
+ ### Patch Changes
18
+
19
+ - [`bf2f598c788f8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bf2f598c788f8) -
20
+ clean up feature flag platform_editor_core_static_css
21
+ - Updated dependencies
22
+
23
+ ## 128.1.0
24
+
25
+ ### Minor Changes
26
+
27
+ - [`a5e4fa298e7ad`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a5e4fa298e7ad) -
28
+ [EDITOR-8408] Add the syncedLocationDropdownRestrictedContent message for synced locations the
29
+ viewer cannot access.
30
+ - [`b31a1d76b3076`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b31a1d76b3076) -
31
+ Restore the optional `FeatureFlags.lcmPreventRenderTracking` field to preserve the legacy content
32
+ macro opt-out when the `platform_editor_enable_rerender_tracking` experiment enables tracking.
33
+
34
+ ### Patch Changes
35
+
36
+ - [`2f527121e0516`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2f527121e0516) -
37
+ Require deliberate pointer or keyboard activation before displaying registered slash-command
38
+ previews under `platform_editor_slash_command`. Avoid redundant menu renders when the pointer
39
+ moves within the active preview row.
40
+ - [`2f527121e0516`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2f527121e0516) -
41
+ Keep active slash-command previews positioned with custom popup hosts such as Whiteboards.
42
+ - Updated dependencies
43
+
3
44
  ## 128.0.1
4
45
 
5
46
  ### Patch Changes
@@ -26,6 +26,7 @@ function buildMenuItem(manifest, extensionModule) {
26
26
  }
27
27
  } : {}), {}, {
28
28
  key: key,
29
+ moduleKey: extensionModule.key,
29
30
  title: title,
30
31
  extensionType: manifest.type,
31
32
  extensionKey: manifest.key,
@@ -426,6 +426,11 @@ var syncBlockMessages = exports.syncBlockMessages = (0, _reactIntl.defineMessage
426
426
  defaultMessage: 'Request access',
427
427
  description: 'Label shown in the synced location dropdown option when the sync block is not accessible to the user'
428
428
  },
429
+ syncedLocationDropdownRestrictedContent: {
430
+ id: 'fabric.editor.syncedLocationDropdownRestrictedContent',
431
+ defaultMessage: 'Restricted content',
432
+ description: 'Title shown in the synced location dropdown in place of a page or work item the user does not have permission to view'
433
+ },
429
434
  syncedLocationDropdownUntitledPage: {
430
435
  id: 'fabric.editor.syncedLocationDropdownUntitledPage',
431
436
  defaultMessage: 'Untitled',
@@ -27,7 +27,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
27
27
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
28
28
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
29
29
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
30
- var packageVersion = "128.0.0";
30
+ var packageVersion = "128.1.0";
31
31
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
32
32
  // Remove URL as it has UGC
33
33
  // Ignored via go/ees007
@@ -85,20 +85,26 @@ var CompactQuickInsertMenuItem = exports.CompactQuickInsertMenuItem = function C
85
85
  isDisabled = _ref.isDisabled,
86
86
  onSelect = _ref.onSelect,
87
87
  preview = _ref.preview,
88
+ previewIcon = _ref.previewIcon,
88
89
  previewImageUrls = _ref.previewImageUrls,
89
90
  shortcut = _ref.shortcut,
91
+ titleContent = _ref.titleContent,
90
92
  _ref$shouldShowPrevie = _ref.shouldShowPreview,
91
93
  shouldShowPreview = _ref$shouldShowPrevie === void 0 ? true : _ref$shouldShowPrevie,
94
+ shouldClampPreview = _ref.shouldClampPreview,
92
95
  _ref$shouldWrapIcon = _ref.shouldWrapIcon,
93
96
  shouldWrapIcon = _ref$shouldWrapIcon === void 0 ? true : _ref$shouldWrapIcon,
94
97
  title = _ref.title;
95
98
  var _useQuickInsertContex = (0, _useQuickInsertContext.useQuickInsertContext)(),
96
- item = _useQuickInsertContex.item;
99
+ item = _useQuickInsertContex.item,
100
+ popupsMountPoint = _useQuickInsertContex.popupsMountPoint;
97
101
  var _ref2 = item !== null && item !== void 0 ? item : {
98
102
  id: undefined,
103
+ isPreviewActive: undefined,
99
104
  isSelected: false
100
105
  },
101
106
  id = _ref2.id,
107
+ isPreviewActive = _ref2.isPreviewActive,
102
108
  isSelected = _ref2.isSelected;
103
109
  var resolvedDescription = description !== null && description !== void 0 ? description : item === null || item === void 0 ? void 0 : item.description;
104
110
  var previewId = (0, _react.useId)();
@@ -112,7 +118,7 @@ var CompactQuickInsertMenuItem = exports.CompactQuickInsertMenuItem = function C
112
118
  image: previewImageUrls
113
119
  } : {};
114
120
  }, [preview, previewImageUrls]);
115
- var shouldRenderPreview = shouldShowPreview && isSelected && !isDisabled;
121
+ var shouldRenderPreview = shouldShowPreview && (isPreviewActive !== null && isPreviewActive !== void 0 ? isPreviewActive : isSelected) && !isDisabled;
116
122
  var hasAccessiblePreview = Boolean(resolvedDescription || (resolvedPreview === null || resolvedPreview === void 0 ? void 0 : resolvedPreview.attribution));
117
123
  var previewAttributionName = (_resolvedPreview$attr = resolvedPreview.attribution) === null || _resolvedPreview$attr === void 0 ? void 0 : _resolvedPreview$attr.name;
118
124
  var previewAttributionKey = typeof previewAttributionName === 'string' ? previewAttributionName : previewAttributionName === null || previewAttributionName === void 0 ? void 0 : previewAttributionName.id;
@@ -135,7 +141,7 @@ var CompactQuickInsertMenuItem = exports.CompactQuickInsertMenuItem = function C
135
141
  alignBlock: "center",
136
142
  spread: "space-between",
137
143
  xcss: styles.content
138
- }, /*#__PURE__*/_react.default.createElement(_compiled.Text, null, title), shortcut && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
144
+ }, titleContent !== null && titleContent !== void 0 ? titleContent : /*#__PURE__*/_react.default.createElement(_compiled.Text, null, title), shortcut && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
139
145
  as: "span",
140
146
  xcss: styles.shortcut
141
147
  }, shortcut))), shouldRenderPreview && referenceElement && /*#__PURE__*/_react.default.createElement(_QuickInsertHoverPreview.QuickInsertHoverPreview, {
@@ -143,7 +149,10 @@ var CompactQuickInsertMenuItem = exports.CompactQuickInsertMenuItem = function C
143
149
  id: previewId,
144
150
  description: resolvedDescription,
145
151
  preview: resolvedPreview,
152
+ popupsMountPoint: popupsMountPoint,
146
153
  referenceElement: referenceElement,
147
- title: title
154
+ title: title,
155
+ icon: previewIcon,
156
+ shouldClampText: shouldClampPreview
148
157
  }));
149
158
  };
@@ -115,6 +115,7 @@ var ElementBrowserQuickInsertMenuItem = exports.ElementBrowserQuickInsertMenuIte
115
115
  isDisabled = _ref.isDisabled,
116
116
  onSelect = _ref.onSelect,
117
117
  shortcut = _ref.shortcut,
118
+ titleContent = _ref.titleContent,
118
119
  _ref$shouldWrapIcon = _ref.shouldWrapIcon,
119
120
  shouldWrapIcon = _ref$shouldWrapIcon === void 0 ? true : _ref$shouldWrapIcon,
120
121
  title = _ref.title;
@@ -155,7 +156,7 @@ var ElementBrowserQuickInsertMenuItem = exports.ElementBrowserQuickInsertMenuIte
155
156
  alignBlock: "center",
156
157
  spread: "space-between",
157
158
  space: "space.100"
158
- }, /*#__PURE__*/_react.default.createElement(_primitives.Text, {
159
+ }, titleContent !== null && titleContent !== void 0 ? titleContent : /*#__PURE__*/_react.default.createElement(_primitives.Text, {
159
160
  color: "color.text",
160
161
  maxLines: 1,
161
162
  size: "medium",
@@ -8,6 +8,7 @@
8
8
  ._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
9
9
  ._1rjcutpp{padding-block:var(--ds-space-150,9pt)}
10
10
  ._16jlidpf{flex-grow:0}
11
+ ._16jlkb7n{flex-grow:1}
11
12
  ._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
12
13
  ._18m915vq{overflow-y:hidden}
13
14
  ._1bah1h6o{justify-content:center}
@@ -20,8 +21,10 @@
20
21
  ._1e0ccj1k{display:-webkit-box}
21
22
  ._1i4qfg65{overflow-wrap:anywhere}
22
23
  ._1o9zidpf{flex-shrink:0}
24
+ ._1o9zkb7n{flex-shrink:1}
23
25
  ._1pby16oo{z-index:510}
24
26
  ._1reo15vq{overflow-x:hidden}
27
+ ._1ul9idpf{min-width:0}
25
28
  ._1yyjcs5v{-webkit-line-clamp:2}
26
29
  ._1yyjegat{-webkit-line-clamp:4}
27
30
  ._2lx21bp4{flex-direction:column}
@@ -36,7 +39,9 @@
36
39
  ._bfhkhfxm{background-color:var(--ds-surface-sunken,#f8f8f8)}
37
40
  ._c71l1kw7{max-height:inherit}
38
41
  ._c71lk6is{max-height:calc(100vh - 1pc)}
42
+ ._i0dl1wug{flex-basis:auto}
39
43
  ._i0dlexct{flex-basis:16px}
44
+ ._k48pwu06{font-weight:var(--ds-font-weight-bold,653)}
40
45
  ._p12f1oec{max-width:calc(100vw - 1pc)}
41
46
  ._p12f1osq{max-width:100%}
42
47
  ._sudp1e54{-webkit-box-orient:vertical}
@@ -8,13 +8,15 @@ Object.defineProperty(exports, "__esModule", {
8
8
  });
9
9
  exports.QuickInsertHoverPreview = void 0;
10
10
  require("./QuickInsertHoverPreview.compiled.css");
11
- var _react = _interopRequireWildcard(require("react"));
12
- var React = _react;
13
11
  var _runtime = require("@compiled/react/runtime");
14
12
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
+ var _react = _interopRequireWildcard(require("react"));
15
14
  var _reactDom = require("react-dom");
15
+ var _bindEventListener = require("bind-event-listener");
16
16
  var _reactIntl = require("react-intl");
17
17
  var _reactPopper = require("@atlaskit/popper/react-popper");
18
+ var _box = require("@atlaskit/primitives/compiled/box");
19
+ var _inline = require("@atlaskit/primitives/compiled/inline");
18
20
  var _text = require("@atlaskit/primitives/compiled/text");
19
21
  var _useThemeObserver2 = require("@atlaskit/tokens/use-theme-observer");
20
22
  var _messages = require("./messages");
@@ -45,61 +47,80 @@ var PREVIEW_MODIFIERS = [{
45
47
  rootBoundary: 'viewport'
46
48
  }
47
49
  }];
50
+ var layoutStyles = {
51
+ titleRow: "_1ul9idpf",
52
+ titleIcon: "_4cvr1h6o _1e0c1txw _1o9zidpf _1bah1h6o",
53
+ attributionText: "_16jlkb7n _1o9zkb7n _i0dl1wug _1ul9idpf _1i4qfg65"
54
+ };
48
55
  var styles = {
49
56
  positioner: "_c71lk6is _p12f1oec _1pby16oo",
50
57
  panel: "_2rko1qi0 _1reo15vq _18m915vq _1rjcutpp _18zrutpp _vchhusvi _bfhk1bhr _16qs130s _c71l1kw7 _p12f1osq _1bsbncxg",
51
58
  content: "_zulpu2gc _1e0c1txw _2lx21bp4",
52
- title: "_11c81qyo _1reo15vq _18m915vq _syazazsu _1i4qfg65 _1e0ccj1k _sudp1e54 _1yyjcs5v",
59
+ title: "_11c81qyo _16jlkb7n _1o9zkb7n _i0dl1wug _1reo15vq _18m915vq _syazazsu _1ul9idpf _1i4qfg65 _1e0ccj1k _sudp1e54 _1yyjcs5v",
60
+ unclampedTitle: "_11c8fhey _16jlkb7n _1o9zkb7n _i0dl1wug _syazi7uo _k48pwu06 _1ul9idpf _1i4qfg65",
53
61
  description: "_11c8fhey _1reo15vq _18m915vq _syazi7uo _1e0ccj1k _1i4qfg65 _sudp1e54 _1yyjegat",
62
+ unclampedDescription: "_11c8fhey _syazi7uo _1i4qfg65",
54
63
  imageArea: "_2rko12b0 _1reo15vq _18m915vq _bfhkhfxm _4t3i68cl _6rthu2gc _p12f1osq _1bsbp3fh",
55
64
  image: "_1e0c1ule _4t3i1osq _5ral1f51 _1bsb1osq",
56
65
  imageHidden: "_3um015vq",
57
- attribution: "_11c8wadc _zulp1b66 _4cvr1h6o _syazazsu _1e0c1txw _1i4qfg65",
66
+ attribution: "_zulp1b66 _4cvr1h6o _syazazsu _1e0c1txw _1i4qfg65",
67
+ compactAttribution: "_11c8wadc",
58
68
  attributionIcon: "_16jlidpf _1o9zidpf _i0dlexct _4cvr1h6o _1e0c1txw _4t3i7vkz _1bah1h6o _1bsb7vkz"
59
69
  };
60
70
 
61
71
  /** The selected item's description and attribution are announced through its aria-describedby. */
62
72
  var QuickInsertHoverPreview = exports.QuickInsertHoverPreview = function QuickInsertHoverPreview(_ref) {
63
73
  var description = _ref.description,
74
+ icon = _ref.icon,
64
75
  id = _ref.id,
65
76
  preview = _ref.preview,
77
+ popupsMountPoint = _ref.popupsMountPoint,
66
78
  referenceElement = _ref.referenceElement,
79
+ _ref$shouldClampText = _ref.shouldClampText,
80
+ shouldClampText = _ref$shouldClampText === void 0 ? true : _ref$shouldClampText,
67
81
  title = _ref.title;
68
82
  var _useThemeObserver = (0, _useThemeObserver2.useThemeObserver)(),
69
83
  colorMode = _useThemeObserver.colorMode;
70
84
  var imageUrl = preview.image ? colorMode === 'dark' && preview.image.dark ? preview.image.dark : preview.image.light : undefined;
71
85
  var hasAccessibleContent = Boolean(description || preview.attribution);
72
- return /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/React.createElement(_reactPopper.Popper, {
86
+ var portalTarget = popupsMountPoint !== null && popupsMountPoint !== void 0 ? popupsMountPoint : referenceElement.ownerDocument.body;
87
+ return /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/_react.default.createElement(_reactPopper.Popper, {
73
88
  placement: "right-start",
74
89
  referenceElement: referenceElement,
75
- strategy: "fixed",
90
+ strategy: popupsMountPoint ? 'absolute' : 'fixed',
76
91
  modifiers: PREVIEW_MODIFIERS
77
92
  }, function (_ref2) {
78
93
  var ref = _ref2.ref,
79
94
  style = _ref2.style,
80
95
  update = _ref2.update;
81
- return /*#__PURE__*/React.createElement("div", {
96
+ return /*#__PURE__*/_react.default.createElement("div", {
82
97
  ref: ref,
83
98
  style: style,
84
99
  className: (0, _runtime.ax)([styles.positioner])
85
- }, /*#__PURE__*/React.createElement(QuickInsertPreviewPanel, {
100
+ }, /*#__PURE__*/_react.default.createElement(QuickInsertPreviewPanel, {
86
101
  description: description,
102
+ icon: icon,
87
103
  id: hasAccessibleContent ? id : undefined,
88
104
  imageUrl: imageUrl,
89
105
  preview: preview,
106
+ popupsMountPoint: popupsMountPoint,
90
107
  referenceElement: referenceElement,
108
+ shouldClampText: shouldClampText,
91
109
  title: title,
92
110
  update: update
93
111
  }));
94
- }), referenceElement.ownerDocument.body);
112
+ }), portalTarget);
95
113
  };
96
114
  var QuickInsertPreviewPanel = function QuickInsertPreviewPanel(_ref3) {
97
115
  var _preview$attribution, _preview$attribution2;
98
116
  var description = _ref3.description,
117
+ icon = _ref3.icon,
99
118
  id = _ref3.id,
100
119
  imageUrl = _ref3.imageUrl,
101
120
  preview = _ref3.preview,
121
+ popupsMountPoint = _ref3.popupsMountPoint,
102
122
  referenceElement = _ref3.referenceElement,
123
+ shouldClampText = _ref3.shouldClampText,
103
124
  title = _ref3.title,
104
125
  update = _ref3.update;
105
126
  var _useIntl = (0, _reactIntl.useIntl)(),
@@ -112,47 +133,71 @@ var QuickInsertPreviewPanel = function QuickInsertPreviewPanel(_ref3) {
112
133
  var attributionName = (_preview$attribution2 = preview.attribution) === null || _preview$attribution2 === void 0 ? void 0 : _preview$attribution2.name;
113
134
  var formattedAttributionName = typeof attributionName === 'string' ? attributionName : attributionName ? formatMessage(attributionName) : '';
114
135
  (0, _react.useLayoutEffect)(function () {
115
- var _referenceElement$own;
136
+ var _ownerDocument$defaul;
116
137
  void update();
117
- var ResizeObserverConstructor = (_referenceElement$own = referenceElement.ownerDocument.defaultView) === null || _referenceElement$own === void 0 ? void 0 : _referenceElement$own.ResizeObserver;
138
+ var ownerDocument = referenceElement.ownerDocument;
139
+ var onScroll = function onScroll() {
140
+ return void update();
141
+ };
142
+ var unbindScrollListener = (0, _bindEventListener.bind)(ownerDocument, {
143
+ type: 'scroll',
144
+ listener: onScroll,
145
+ options: true
146
+ });
147
+ var ResizeObserverConstructor = (_ownerDocument$defaul = ownerDocument.defaultView) === null || _ownerDocument$defaul === void 0 ? void 0 : _ownerDocument$defaul.ResizeObserver;
118
148
  if (!panelElement || !ResizeObserverConstructor) {
119
- return;
149
+ return unbindScrollListener;
120
150
  }
121
151
  var observer = new ResizeObserverConstructor(function () {
122
152
  return void update();
123
153
  });
124
154
  observer.observe(panelElement);
155
+ observer.observe(referenceElement);
156
+ if (popupsMountPoint) {
157
+ observer.observe(popupsMountPoint);
158
+ }
125
159
  return function () {
126
- return observer.disconnect();
160
+ unbindScrollListener();
161
+ observer.disconnect();
127
162
  };
128
- }, [panelElement, referenceElement, update]);
129
- return /*#__PURE__*/React.createElement("div", {
163
+ }, [panelElement, popupsMountPoint, referenceElement, update]);
164
+ return /*#__PURE__*/_react.default.createElement("div", {
130
165
  ref: setPanelElement,
131
166
  id: id,
132
167
  role: id ? 'tooltip' : undefined,
133
168
  "data-testid": "quick-insert-preview-panel",
134
169
  className: (0, _runtime.ax)([styles.panel])
135
- }, imageUrl && /*#__PURE__*/React.createElement(PreviewImage, {
170
+ }, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, imageUrl && /*#__PURE__*/_react.default.createElement(PreviewImage, {
136
171
  key: imageUrl,
137
172
  imageUrl: imageUrl
138
- }), /*#__PURE__*/React.createElement("div", {
173
+ }), /*#__PURE__*/_react.default.createElement("div", {
139
174
  className: (0, _runtime.ax)([styles.content])
140
- }, /*#__PURE__*/React.createElement("div", {
175
+ }, /*#__PURE__*/_react.default.createElement(_inline.Inline, {
176
+ alignBlock: "center",
177
+ space: "space.100",
178
+ xcss: layoutStyles.titleRow,
179
+ "aria-hidden": "true"
180
+ }, icon && /*#__PURE__*/_react.default.createElement(_box.Box, {
181
+ as: "span",
141
182
  "aria-hidden": "true",
142
- className: (0, _runtime.ax)([styles.title])
143
- }, title), description && /*#__PURE__*/React.createElement("div", {
144
- className: (0, _runtime.ax)([styles.description])
145
- }, description), preview.attribution && /*#__PURE__*/React.createElement("div", {
146
- className: (0, _runtime.ax)([styles.attribution])
147
- }, AttributionIcon && /*#__PURE__*/React.createElement("span", {
183
+ xcss: layoutStyles.titleIcon
184
+ }, icon), /*#__PURE__*/_react.default.createElement("span", {
185
+ className: (0, _runtime.ax)([shouldClampText && styles.title, !shouldClampText && styles.unclampedTitle])
186
+ }, title)), description && /*#__PURE__*/_react.default.createElement("div", {
187
+ className: (0, _runtime.ax)([shouldClampText && styles.description, !shouldClampText && styles.unclampedDescription])
188
+ }, description), preview.attribution && /*#__PURE__*/_react.default.createElement("div", {
189
+ className: (0, _runtime.ax)([styles.attribution, shouldClampText && styles.compactAttribution])
190
+ }, AttributionIcon && /*#__PURE__*/_react.default.createElement("span", {
148
191
  "aria-hidden": "true",
149
192
  className: (0, _runtime.ax)([styles.attributionIcon])
150
- }, /*#__PURE__*/React.createElement(AttributionIcon, null)), /*#__PURE__*/React.createElement(_text.Text, {
193
+ }, /*#__PURE__*/_react.default.createElement(AttributionIcon, null)), /*#__PURE__*/_react.default.createElement("span", {
194
+ className: (0, _runtime.ax)([layoutStyles.attributionText])
195
+ }, /*#__PURE__*/_react.default.createElement(_text.Text, {
151
196
  size: "small",
152
197
  color: "color.text.subtle"
153
198
  }, AttributionIcon ? formattedAttributionName : formatMessage(_messages.messages.previewAttributionBy, {
154
199
  name: formattedAttributionName
155
- })))));
200
+ })))))));
156
201
  };
157
202
  var PreviewImage = function PreviewImage(_ref4) {
158
203
  var imageUrl = _ref4.imageUrl;
@@ -164,11 +209,11 @@ var PreviewImage = function PreviewImage(_ref4) {
164
209
  _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
165
210
  hasLoaded = _useState6[0],
166
211
  setHasLoaded = _useState6[1];
167
- return /*#__PURE__*/React.createElement("div", {
212
+ return /*#__PURE__*/_react.default.createElement("div", {
168
213
  "aria-hidden": "true",
169
214
  "data-testid": "quick-insert-preview-image-area",
170
215
  className: (0, _runtime.ax)([styles.imageArea])
171
- }, !hasFailed && /*#__PURE__*/React.createElement("img", {
216
+ }, !hasFailed && /*#__PURE__*/_react.default.createElement("img", {
172
217
  "aria-hidden": "true",
173
218
  "data-testid": "quick-insert-hover-preview",
174
219
  src: imageUrl,
@@ -16,9 +16,12 @@ var QuickInsertMenuItem = exports.QuickInsertMenuItem = function QuickInsertMenu
16
16
  isDisabled = _ref.isDisabled,
17
17
  onSelect = _ref.onSelect,
18
18
  preview = _ref.preview,
19
+ previewIcon = _ref.previewIcon,
19
20
  previewImageUrls = _ref.previewImageUrls,
20
21
  shortcut = _ref.shortcut,
22
+ titleContent = _ref.titleContent,
21
23
  shouldShowPreview = _ref.shouldShowPreview,
24
+ shouldClampPreview = _ref.shouldClampPreview,
22
25
  shouldWrapIcon = _ref.shouldWrapIcon,
23
26
  title = _ref.title;
24
27
  var _useQuickInsertContex = (0, _useQuickInsertContext.useQuickInsertContext)(),
@@ -30,6 +33,7 @@ var QuickInsertMenuItem = exports.QuickInsertMenuItem = function QuickInsertMenu
30
33
  isDisabled: isDisabled,
31
34
  onSelect: onSelect,
32
35
  shortcut: shortcut,
36
+ titleContent: titleContent,
33
37
  shouldWrapIcon: shouldWrapIcon,
34
38
  title: title
35
39
  }) : /*#__PURE__*/_react.default.createElement(_CompactQuickInsertMenuItem.CompactQuickInsertMenuItem, {
@@ -39,9 +43,12 @@ var QuickInsertMenuItem = exports.QuickInsertMenuItem = function QuickInsertMenu
39
43
  isDisabled: isDisabled,
40
44
  onSelect: onSelect,
41
45
  preview: preview,
46
+ previewIcon: previewIcon,
42
47
  previewImageUrls: previewImageUrls,
43
48
  shortcut: shortcut,
49
+ titleContent: titleContent,
44
50
  shouldShowPreview: shouldShowPreview,
51
+ shouldClampPreview: shouldClampPreview,
45
52
  shouldWrapIcon: shouldWrapIcon,
46
53
  title: title
47
54
  });
@@ -0,0 +1,9 @@
1
+ ._16d9qvcn{-webkit-box-decoration-break:clone;box-decoration-break:clone}
2
+ ._1e0c1nu9{display:inline}
3
+ ._1i4qfg65{overflow-wrap:anywhere}
4
+ ._bfhki8nm{background-color:var(--ds-background-neutral,#0515240f)}
5
+ ._bozg1b66{padding-inline-start:var(--ds-space-050,4px)}
6
+ ._mkrz1f6o{clip-path:polygon(20% 0,100% 0,100% 100%,0 100%)}
7
+ ._mkrz1gdk{clip-path:polygon(0 0,100% 0,80% 100%,0 100%)}
8
+ ._o5724jg8{white-space:normal}
9
+ ._y4ti1b66{padding-inline-end:var(--ds-space-050,4px)}
@@ -0,0 +1,44 @@
1
+ /* SkillTag.tsx generated by @compiled/babel-plugin v3.0.2 */
2
+ "use strict";
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.SkillTag = void 0;
9
+ require("./SkillTag.compiled.css");
10
+ var _runtime = require("@compiled/react/runtime");
11
+ var _react = _interopRequireDefault(require("react"));
12
+ var _css = require("@atlaskit/css");
13
+ var _box = require("@atlaskit/primitives/compiled/box");
14
+ var _text = require("@atlaskit/primitives/compiled/text");
15
+ var styles = {
16
+ highlight: "_bfhki8nm _16d9qvcn _1e0c1nu9",
17
+ start: "_bozg1b66 _y4ti1b66 _mkrz1f6o",
18
+ end: "_y4ti1b66 _mkrz1gdk",
19
+ wrapping: "_1i4qfg65 _o5724jg8",
20
+ text: "_1i4qfg65"
21
+ };
22
+ var SkillTag = exports.SkillTag = function SkillTag(_ref) {
23
+ var slug = _ref.slug,
24
+ _ref$isDisabled = _ref.isDisabled,
25
+ isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled;
26
+ return /*#__PURE__*/_react.default.createElement(_box.Box, {
27
+ as: "span",
28
+ xcss: styles.wrapping
29
+ }, /*#__PURE__*/_react.default.createElement(_text.Text, {
30
+ color: isDisabled ? 'color.text.disabled' : 'color.text',
31
+ xcss: styles.text
32
+ }, /*#__PURE__*/_react.default.createElement(_box.Box, {
33
+ as: "span",
34
+ xcss: (0, _css.cx)(styles.highlight, styles.start)
35
+ }, /*#__PURE__*/_react.default.createElement(_text.Text, {
36
+ color: isDisabled ? 'color.text.disabled' : 'color.text.subtle'
37
+ }, "/")), /*#__PURE__*/_react.default.createElement(_box.Box, {
38
+ as: "span",
39
+ xcss: styles.highlight
40
+ }, slug.slice(0, -1)), slug && /*#__PURE__*/_react.default.createElement(_box.Box, {
41
+ as: "span",
42
+ xcss: (0, _css.cx)(styles.highlight, styles.end)
43
+ }, slug.slice(-1))));
44
+ };
@@ -59,12 +59,10 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
59
59
  *
60
60
  * If you are updating this, please also update the above files.
61
61
  *
62
- * @deprecated This Emotion-based style function is being phased out as part of the
63
- * `platform_editor_core_static_css` experiment migration to Compiled CSS. While the experiment
64
- * is running, any changes here MUST also be reflected in `EditorContentContainer-compiled.tsx`
62
+ * @deprecated This Emotion-based style function is being phased out in favor of Compiled CSS.
63
+ * Any changes here MUST also be reflected in `EditorContentContainer-compiled.tsx`
65
64
  * (look for `tableSharedStyle`, `tableSharedStyle_with_*`, `tableSharedStyle_without_*` entries
66
- * in the `editorContentStyles` cssMap). Failure to do so will cause visual regressions when the
67
- * compiled version is active.
65
+ * in the `editorContentStyles` cssMap) to keep the shared styles consistent.
68
66
  */
69
67
  var tableSharedStyle = exports.tableSharedStyle = function tableSharedStyle() {
70
68
  var browser = (0, _browser.getBrowserInfo)();
@@ -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 = "128.0.0";
27
+ var packageVersion = "128.1.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -17,6 +17,7 @@ export function buildMenuItem(manifest, extensionModule) {
17
17
  }
18
18
  } : {}),
19
19
  key,
20
+ moduleKey: extensionModule.key,
20
21
  title,
21
22
  extensionType: manifest.type,
22
23
  extensionKey: manifest.key,
@@ -420,6 +420,11 @@ export const syncBlockMessages = defineMessages({
420
420
  defaultMessage: 'Request access',
421
421
  description: 'Label shown in the synced location dropdown option when the sync block is not accessible to the user'
422
422
  },
423
+ syncedLocationDropdownRestrictedContent: {
424
+ id: 'fabric.editor.syncedLocationDropdownRestrictedContent',
425
+ defaultMessage: 'Restricted content',
426
+ description: 'Title shown in the synced location dropdown in place of a page or work item the user does not have permission to view'
427
+ },
423
428
  syncedLocationDropdownUntitledPage: {
424
429
  id: 'fabric.editor.syncedLocationDropdownUntitledPage',
425
430
  defaultMessage: 'Untitled',
@@ -13,7 +13,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
13
13
  const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
14
14
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
15
15
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
16
- const packageVersion = "128.0.0";
16
+ const packageVersion = "128.1.0";
17
17
  const sanitiseSentryEvents = (data, _hint) => {
18
18
  // Remove URL as it has UGC
19
19
  // Ignored via go/ees007
@@ -74,21 +74,27 @@ export const CompactQuickInsertMenuItem = ({
74
74
  isDisabled,
75
75
  onSelect,
76
76
  preview,
77
+ previewIcon,
77
78
  previewImageUrls,
78
79
  shortcut,
80
+ titleContent,
79
81
  shouldShowPreview = true,
82
+ shouldClampPreview,
80
83
  shouldWrapIcon = true,
81
84
  title
82
85
  }) => {
83
86
  var _resolvedPreview$attr, _ref, _resolvedPreview$imag, _resolvedPreview$imag2;
84
87
  const {
85
- item
88
+ item,
89
+ popupsMountPoint
86
90
  } = useQuickInsertContext();
87
91
  const {
88
92
  id,
93
+ isPreviewActive,
89
94
  isSelected
90
95
  } = item !== null && item !== void 0 ? item : {
91
96
  id: undefined,
97
+ isPreviewActive: undefined,
92
98
  isSelected: false
93
99
  };
94
100
  const resolvedDescription = description !== null && description !== void 0 ? description : item === null || item === void 0 ? void 0 : item.description;
@@ -98,7 +104,7 @@ export const CompactQuickInsertMenuItem = ({
98
104
  const resolvedPreview = useMemo(() => preview !== null && preview !== void 0 ? preview : previewImageUrls ? {
99
105
  image: previewImageUrls
100
106
  } : {}, [preview, previewImageUrls]);
101
- const shouldRenderPreview = shouldShowPreview && isSelected && !isDisabled;
107
+ const shouldRenderPreview = shouldShowPreview && (isPreviewActive !== null && isPreviewActive !== void 0 ? isPreviewActive : isSelected) && !isDisabled;
102
108
  const hasAccessiblePreview = Boolean(resolvedDescription || (resolvedPreview === null || resolvedPreview === void 0 ? void 0 : resolvedPreview.attribution));
103
109
  const previewAttributionName = (_resolvedPreview$attr = resolvedPreview.attribution) === null || _resolvedPreview$attr === void 0 ? void 0 : _resolvedPreview$attr.name;
104
110
  const previewAttributionKey = typeof previewAttributionName === 'string' ? previewAttributionName : previewAttributionName === null || previewAttributionName === void 0 ? void 0 : previewAttributionName.id;
@@ -121,7 +127,7 @@ export const CompactQuickInsertMenuItem = ({
121
127
  alignBlock: "center",
122
128
  spread: "space-between",
123
129
  xcss: styles.content
124
- }, /*#__PURE__*/React.createElement(Text, null, title), shortcut && /*#__PURE__*/React.createElement(Box, {
130
+ }, titleContent !== null && titleContent !== void 0 ? titleContent : /*#__PURE__*/React.createElement(Text, null, title), shortcut && /*#__PURE__*/React.createElement(Box, {
125
131
  as: "span",
126
132
  xcss: styles.shortcut
127
133
  }, shortcut))), shouldRenderPreview && referenceElement && /*#__PURE__*/React.createElement(QuickInsertHoverPreview, {
@@ -129,7 +135,10 @@ export const CompactQuickInsertMenuItem = ({
129
135
  id: previewId,
130
136
  description: resolvedDescription,
131
137
  preview: resolvedPreview,
138
+ popupsMountPoint: popupsMountPoint,
132
139
  referenceElement: referenceElement,
133
- title: title
140
+ title: title,
141
+ icon: previewIcon,
142
+ shouldClampText: shouldClampPreview
134
143
  }));
135
144
  };
@@ -107,6 +107,7 @@ export const ElementBrowserQuickInsertMenuItem = ({
107
107
  isDisabled,
108
108
  onSelect,
109
109
  shortcut,
110
+ titleContent,
110
111
  shouldWrapIcon = true,
111
112
  title
112
113
  }) => {
@@ -147,7 +148,7 @@ export const ElementBrowserQuickInsertMenuItem = ({
147
148
  alignBlock: "center",
148
149
  spread: "space-between",
149
150
  space: "space.100"
150
- }, /*#__PURE__*/React.createElement(Text, {
151
+ }, titleContent !== null && titleContent !== void 0 ? titleContent : /*#__PURE__*/React.createElement(Text, {
151
152
  color: "color.text",
152
153
  maxLines: 1,
153
154
  size: "medium",
@@ -8,6 +8,7 @@
8
8
  ._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
9
9
  ._1rjcutpp{padding-block:var(--ds-space-150,9pt)}
10
10
  ._16jlidpf{flex-grow:0}
11
+ ._16jlkb7n{flex-grow:1}
11
12
  ._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
12
13
  ._18m915vq{overflow-y:hidden}
13
14
  ._1bah1h6o{justify-content:center}
@@ -20,8 +21,10 @@
20
21
  ._1e0ccj1k{display:-webkit-box}
21
22
  ._1i4qfg65{overflow-wrap:anywhere}
22
23
  ._1o9zidpf{flex-shrink:0}
24
+ ._1o9zkb7n{flex-shrink:1}
23
25
  ._1pby16oo{z-index:510}
24
26
  ._1reo15vq{overflow-x:hidden}
27
+ ._1ul9idpf{min-width:0}
25
28
  ._1yyjcs5v{-webkit-line-clamp:2}
26
29
  ._1yyjegat{-webkit-line-clamp:4}
27
30
  ._2lx21bp4{flex-direction:column}
@@ -36,7 +39,9 @@
36
39
  ._bfhkhfxm{background-color:var(--ds-surface-sunken,#f8f8f8)}
37
40
  ._c71l1kw7{max-height:inherit}
38
41
  ._c71lk6is{max-height:calc(100vh - 1pc)}
42
+ ._i0dl1wug{flex-basis:auto}
39
43
  ._i0dlexct{flex-basis:16px}
44
+ ._k48pwu06{font-weight:var(--ds-font-weight-bold,653)}
40
45
  ._p12f1oec{max-width:calc(100vw - 1pc)}
41
46
  ._p12f1osq{max-width:100%}
42
47
  ._sudp1e54{-webkit-box-orient:vertical}