@atlaskit/editor-common 100.4.2 → 100.5.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 (51) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/cjs/analytics/types/toolbar-button.js +1 -0
  3. package/dist/cjs/card/index.js +13 -0
  4. package/dist/cjs/card/link-toolbar-button-group-options.js +2 -2
  5. package/dist/cjs/card/link-toolbar-dropdown-options.js +33 -0
  6. package/dist/cjs/media/messages/altText.js +5 -0
  7. package/dist/cjs/monitoring/error.js +1 -1
  8. package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +35 -8
  9. package/dist/cjs/selection/gap-cursor/styles.js +1 -1
  10. package/dist/cjs/type-ahead/messages.js +10 -0
  11. package/dist/cjs/ui/DropList/index.js +1 -1
  12. package/dist/cjs/ui/FloatingToolbar/Separator.js +12 -7
  13. package/dist/es2019/analytics/types/toolbar-button.js +1 -0
  14. package/dist/es2019/card/index.js +2 -1
  15. package/dist/es2019/card/link-toolbar-button-group-options.js +1 -1
  16. package/dist/es2019/card/link-toolbar-dropdown-options.js +26 -0
  17. package/dist/es2019/media/messages/altText.js +5 -0
  18. package/dist/es2019/monitoring/error.js +1 -1
  19. package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +34 -8
  20. package/dist/es2019/selection/gap-cursor/styles.js +1 -1
  21. package/dist/es2019/type-ahead/messages.js +10 -0
  22. package/dist/es2019/ui/DropList/index.js +1 -1
  23. package/dist/es2019/ui/FloatingToolbar/Separator.js +8 -3
  24. package/dist/esm/analytics/types/toolbar-button.js +1 -0
  25. package/dist/esm/card/index.js +2 -1
  26. package/dist/esm/card/link-toolbar-button-group-options.js +1 -1
  27. package/dist/esm/card/link-toolbar-dropdown-options.js +26 -0
  28. package/dist/esm/media/messages/altText.js +5 -0
  29. package/dist/esm/monitoring/error.js +1 -1
  30. package/dist/esm/react-node-view/getInlineNodeViewProducer.js +35 -8
  31. package/dist/esm/selection/gap-cursor/styles.js +1 -1
  32. package/dist/esm/type-ahead/messages.js +10 -0
  33. package/dist/esm/ui/DropList/index.js +1 -1
  34. package/dist/esm/ui/FloatingToolbar/Separator.js +12 -7
  35. package/dist/types/analytics/types/toolbar-button.d.ts +1 -0
  36. package/dist/types/card/index.d.ts +2 -1
  37. package/dist/types/card/link-toolbar-button-group-options.d.ts +51 -0
  38. package/dist/types/card/link-toolbar-dropdown-options.d.ts +4 -0
  39. package/dist/types/media/messages/altText.d.ts +5 -0
  40. package/dist/types/type-ahead/messages.d.ts +10 -0
  41. package/dist/types/types/floating-toolbar.d.ts +1 -0
  42. package/dist/types/ui/FloatingToolbar/Separator.d.ts +3 -1
  43. package/dist/types-ts4.5/analytics/types/toolbar-button.d.ts +1 -0
  44. package/dist/types-ts4.5/card/index.d.ts +2 -1
  45. package/dist/types-ts4.5/card/link-toolbar-button-group-options.d.ts +51 -0
  46. package/dist/types-ts4.5/card/link-toolbar-dropdown-options.d.ts +4 -0
  47. package/dist/types-ts4.5/media/messages/altText.d.ts +5 -0
  48. package/dist/types-ts4.5/type-ahead/messages.d.ts +10 -0
  49. package/dist/types-ts4.5/types/floating-toolbar.d.ts +1 -0
  50. package/dist/types-ts4.5/ui/FloatingToolbar/Separator.d.ts +3 -1
  51. package/package.json +9 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 100.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#120472](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/120472)
8
+ [`73c800ab5f2fc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/73c800ab5f2fc) -
9
+ ED-26766 update adf-schema from 47.2.1 to 47.6.0 and adf-schema-json from 1.27.0 to 1.31.0
10
+ - [#121044](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/121044)
11
+ [`1c7ee40e1cf44`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1c7ee40e1cf44) -
12
+ Add getDropdownOption and export appearancePropsMap from card directory
13
+
14
+ ### Patch Changes
15
+
16
+ - [#121822](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/121822)
17
+ [`2316af8fbe07d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2316af8fbe07d) -
18
+ [ux] Updates floating toolbar of the inline and media single by moving alt text option to the
19
+ overflow menu.
20
+ - [#119706](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/119706)
21
+ [`42fd258ba482e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/42fd258ba482e) -
22
+ ED-26704: enables editor node virtualization experiment
23
+ - [#121073](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/121073)
24
+ [`9c197731fcbf8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9c197731fcbf8) -
25
+ [ux] [ED-26824] When platform_editor_controls is enabled, add 'View more' button to quick
26
+ insertpopup to open element browser modal
27
+ - Updated dependencies
28
+
29
+ ## 100.4.3
30
+
31
+ ### Patch Changes
32
+
33
+ - [#121092](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/121092)
34
+ [`8cd08b738070d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8cd08b738070d) -
35
+ [ux] Implemented full height separator as per design for media and card
36
+ - [#120931](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/120931)
37
+ [`624b97c021fea`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/624b97c021fea) -
38
+ [ux] ED-26676 revert to existing primary toolbar components
39
+
3
40
  ## 100.4.2
4
41
 
5
42
  ### Patch Changes
@@ -17,6 +17,7 @@ var TOOLBAR_ACTION_SUBJECT_ID = exports.TOOLBAR_ACTION_SUBJECT_ID = /*#__PURE__*
17
17
  TOOLBAR_ACTION_SUBJECT_ID["BACKGROUND_COLOR"] = "backgroundColor";
18
18
  TOOLBAR_ACTION_SUBJECT_ID["TEXT_FORMATTING_STRONG"] = "strong";
19
19
  TOOLBAR_ACTION_SUBJECT_ID["TEXT_FORMATTING_ITALIC"] = "italic";
20
+ TOOLBAR_ACTION_SUBJECT_ID["TEXT_FORMATTING_UNDERLINE"] = "underline";
20
21
  TOOLBAR_ACTION_SUBJECT_ID["UNDO"] = "undo";
21
22
  TOOLBAR_ACTION_SUBJECT_ID["REDO"] = "redo";
22
23
  TOOLBAR_ACTION_SUBJECT_ID["INDENT"] = "indent";
@@ -47,6 +47,12 @@ Object.defineProperty(exports, "alignmentIcons", {
47
47
  return _MediaAndEmbedsToolbar.alignmentIcons;
48
48
  }
49
49
  });
50
+ Object.defineProperty(exports, "appearancePropsMap", {
51
+ enumerable: true,
52
+ get: function get() {
53
+ return _linkToolbarButtonGroupOptions.appearancePropsMap;
54
+ }
55
+ });
50
56
  Object.defineProperty(exports, "buildLayoutButtons", {
51
57
  enumerable: true,
52
58
  get: function get() {
@@ -65,6 +71,12 @@ Object.defineProperty(exports, "getButtonGroupOption", {
65
71
  return _linkToolbarButtonGroupOptions.getButtonGroupOption;
66
72
  }
67
73
  });
74
+ Object.defineProperty(exports, "getDropdownOption", {
75
+ enumerable: true,
76
+ get: function get() {
77
+ return _linkToolbarDropdownOptions.getDropdownOption;
78
+ }
79
+ });
68
80
  Object.defineProperty(exports, "getLinkMetadataFromTransaction", {
69
81
  enumerable: true,
70
82
  get: function get() {
@@ -87,6 +99,7 @@ var _utils = require("./utils");
87
99
  var _MediaAndEmbedsToolbar = _interopRequireWildcard(require("./MediaAndEmbedsToolbar"));
88
100
  var _LinkToolbarButtonGroup = require("./LinkToolbarButtonGroup");
89
101
  var _linkToolbarButtonGroupOptions = require("./link-toolbar-button-group-options");
102
+ var _linkToolbarDropdownOptions = require("./link-toolbar-dropdown-options");
90
103
  var _card = require("./ui/assets/card");
91
104
  var _inline = require("./ui/assets/inline");
92
105
  var _embed = require("./ui/assets/embed");
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.getButtonGroupOption = void 0;
7
+ exports.getButtonGroupOption = exports.appearancePropsMap = void 0;
8
8
  var _minus = _interopRequireDefault(require("@atlaskit/icon/core/minus"));
9
9
  var _smartLinkCard = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-card"));
10
10
  var _smartLinkEmbed = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-embed"));
@@ -14,7 +14,7 @@ var _card = require("./ui/assets/card");
14
14
  var _embed = require("./ui/assets/embed");
15
15
  var _inline = require("./ui/assets/inline");
16
16
  var _url = require("./ui/assets/url");
17
- var appearancePropsMap = {
17
+ var appearancePropsMap = exports.appearancePropsMap = {
18
18
  url: {
19
19
  title: _messages.cardMessages.urlTitle,
20
20
  icon: _minus.default,
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.getDropdownOption = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _linkToolbarButtonGroupOptions = require("./link-toolbar-button-group-options");
10
+ var getDropdownOption = exports.getDropdownOption = function getDropdownOption(intl, dispatchCommand, _ref) {
11
+ var disabled = _ref.disabled,
12
+ _onClick = _ref.onClick,
13
+ selected = _ref.selected,
14
+ appearance = _ref.appearance,
15
+ testId = _ref.testId,
16
+ tooltip = _ref.tooltip;
17
+ var _appearancePropsMap = _linkToolbarButtonGroupOptions.appearancePropsMap[appearance !== null && appearance !== void 0 ? appearance : 'url'],
18
+ title = _appearancePropsMap.title,
19
+ Icon = _appearancePropsMap.icon;
20
+ return {
21
+ title: intl.formatMessage(title),
22
+ icon: /*#__PURE__*/_react.default.createElement(Icon, {
23
+ label: intl.formatMessage(title)
24
+ }),
25
+ onClick: function onClick() {
26
+ return dispatchCommand(_onClick);
27
+ },
28
+ disabled: Boolean(disabled),
29
+ testId: testId,
30
+ selected: selected,
31
+ tooltip: tooltip !== null && tooltip !== void 0 ? tooltip : ''
32
+ };
33
+ };
@@ -11,6 +11,11 @@ var altTextMessages = exports.altTextMessages = (0, _reactIntlNext.defineMessage
11
11
  defaultMessage: 'Alt text',
12
12
  description: 'Add an alt text for this image'
13
13
  },
14
+ addAltText: {
15
+ id: 'fabric.editor.addUpdatedAltText',
16
+ defaultMessage: 'Add alt text',
17
+ description: 'Add an alt text for this image'
18
+ },
14
19
  editAltText: {
15
20
  id: 'fabric.editor.editAltText',
16
21
  defaultMessage: 'Edit alt text',
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "100.4.2";
20
+ var packageVersion = "100.5.0";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // TODO: Sanitise the URL instead of just removing it
@@ -11,7 +11,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
11
11
  var _react = _interopRequireDefault(require("react"));
12
12
  var _react2 = require("@emotion/react");
13
13
  var _model = require("@atlaskit/editor-prosemirror/model");
14
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
15
15
  var _analytics = require("../analytics");
16
16
  var _ErrorBoundary = require("../ui/ErrorBoundary");
17
17
  var _utils = require("../utils");
@@ -24,16 +24,42 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var inlineNodeViewClassname = exports.inlineNodeViewClassname = 'inlineNodeView';
27
+
28
+ // number of initial nodes to allow React to render before switching to fallback
29
+ var initialReactRenderedNodeCount = 0;
27
30
  var canRenderFallback = function canRenderFallback(node) {
28
31
  return node.type.isInline && node.type.isAtom && node.type.isLeaf;
29
32
  };
33
+ var virtualisationConfiguration = function virtualisationConfiguration() {
34
+ var enableVirtualization = false;
35
+ var reactRenderedDocumentPositionThreshold = 0;
36
+ if ((0, _experiments.editorExperiment)("platform_editor_inline_node_virtualization", "off")) {
37
+ enableVirtualization = false;
38
+ } else if ((0, _experiments.editorExperiment)("platform_editor_inline_node_virtualization", "fallbackall")) {
39
+ enableVirtualization = true;
40
+ reactRenderedDocumentPositionThreshold = 0;
41
+ } else if ((0, _experiments.editorExperiment)("platform_editor_inline_node_virtualization", "fallbackoffscreen")) {
42
+ enableVirtualization = true;
43
+ reactRenderedDocumentPositionThreshold = 100;
44
+ }
45
+ return {
46
+ enableVirtualization: enableVirtualization,
47
+ reactRenderedDocumentPositionThreshold: reactRenderedDocumentPositionThreshold,
48
+ virtualizeCurrentNode: function virtualizeCurrentNode() {
49
+ return enableVirtualization && !(initialReactRenderedNodeCount < reactRenderedDocumentPositionThreshold);
50
+ }
51
+ };
52
+ };
30
53
  function createNodeView(_ref) {
31
54
  var nodeViewParams = _ref.nodeViewParams,
32
55
  pmPluginFactoryParams = _ref.pmPluginFactoryParams,
33
56
  Component = _ref.Component,
34
57
  extraComponentProps = _ref.extraComponentProps,
35
58
  extraNodeViewProps = _ref.extraNodeViewProps;
36
- var shouldVirtualize = (0, _platformFeatureFlags.fg)('platform_editor_lego__inline_node_virtualization');
59
+ var _virtualisationConfig = virtualisationConfiguration(),
60
+ enableVirtualization = _virtualisationConfig.enableVirtualization,
61
+ virtualizeCurrentNode = _virtualisationConfig.virtualizeCurrentNode;
62
+ var virtualizeNode = virtualizeCurrentNode();
37
63
  // We set a variable for the current node which is
38
64
  // used for comparisions when doing updates, before being
39
65
  // overwritten to the updated node.
@@ -99,7 +125,7 @@ function createNodeView(_ref) {
99
125
  });
100
126
  }
101
127
  }
102
- if (shouldVirtualize) {
128
+ if (virtualizeNode) {
103
129
  renderFallback();
104
130
  // allow the fallback to render first before attaching the observer.
105
131
  // Will tweak this in a follow up PR to optimise rendering of visible
@@ -108,6 +134,7 @@ function createNodeView(_ref) {
108
134
  attachNodeViewObserver();
109
135
  }, 0);
110
136
  } else {
137
+ initialReactRenderedNodeCount = initialReactRenderedNodeCount + 1;
111
138
  var _getPerformanceOption = (0, _utils.getPerformanceOptions)(nodeViewParams.view),
112
139
  samplingRate = _getPerformanceOption.samplingRate,
113
140
  slowThreshold = _getPerformanceOption.slowThreshold,
@@ -125,9 +152,9 @@ function createNodeView(_ref) {
125
152
  slowThreshold: slowThreshold
126
153
  });
127
154
  }
128
- var extraNodeViewPropsWithStopEvent = _objectSpread(_objectSpread({}, extraNodeViewProps), (0, _platformFeatureFlags.fg)('platform_editor_lego__inline_node_virtualization') ? {
155
+ var extraNodeViewPropsWithStopEvent = _objectSpread(_objectSpread({}, extraNodeViewProps), enableVirtualization ? {
129
156
  // This is not related to virtualization, but it's something we should fix/handle
130
- // Remove this comment when `platform_editor_lego__inline_node_virtualization` FF is cleaned up
157
+ // Remove this comment when virtualization experiment is cleaned up
131
158
  stopEvent: function stopEvent(event) {
132
159
  var maybeStopEvent = extraNodeViewProps === null || extraNodeViewProps === void 0 ? void 0 : extraNodeViewProps.stopEvent;
133
160
  if (typeof maybeStopEvent === 'function') {
@@ -167,7 +194,7 @@ function createNodeView(_ref) {
167
194
  setDomAttrs(nextNode, domRef);
168
195
  }
169
196
  currentNode = nextNode;
170
- if (shouldVirtualize) {
197
+ if (virtualizeNode) {
171
198
  if (didRenderComponentWithIntersectionObserver) {
172
199
  renderComponent();
173
200
  }
@@ -177,7 +204,7 @@ function createNodeView(_ref) {
177
204
  return true;
178
205
  },
179
206
  destroy: function destroy() {
180
- if (shouldVirtualize) {
207
+ if (virtualizeNode) {
181
208
  removeIntersectionObserver();
182
209
  }
183
210
 
@@ -189,7 +216,7 @@ function createNodeView(_ref) {
189
216
  // of HTMLSpanElement type however once the node view has
190
217
  // been destroyed no other consumers should still be using it.
191
218
  domRef = undefined;
192
- if (shouldVirtualize) {
219
+ if (virtualizeNode) {
193
220
  destroyed = true;
194
221
  }
195
222
  }
@@ -18,7 +18,7 @@ var gapCursorBlink = (0, _react.keyframes)({
18
18
  });
19
19
  var hideCaretModifier = exports.hideCaretModifier = 'ProseMirror-hide-gapcursor';
20
20
  var gapCursor = '.ProseMirror-gapcursor';
21
- var prosemirrorwidgetNotBlock = '.ProseMirror-widget:not([data-blocks-decoration-container="true"]):not([data-blocks-drag-handle-container="true"])';
21
+ var prosemirrorwidgetNotBlock = '.ProseMirror-widget:not([data-blocks-decoration-container="true"]):not([data-blocks-drag-handle-container="true"]):not([data-blocks-quick-insert-container="true"])';
22
22
  var wrapLeft = '[layout="wrap-left"]';
23
23
  var wrapRight = '[layout="wrap-right"]';
24
24
 
@@ -95,5 +95,15 @@ var typeAheadListMessages = exports.typeAheadListMessages = (0, _reactIntlNext.d
95
95
  id: 'fablric.editor.viewAllInserts',
96
96
  defaultMessage: 'View all inserts',
97
97
  description: 'a text on a button that opens a side panel with a list of all insertable editor elements'
98
+ },
99
+ emptySearchResults: {
100
+ id: 'fabric.editor.emptySearchResults',
101
+ defaultMessage: "We couldn't find any results.",
102
+ description: 'a message displayed when there are no search results'
103
+ },
104
+ emptySearchResultsSuggestion: {
105
+ id: 'fabric.editor.emptySearchResultsSuggestion',
106
+ defaultMessage: 'Select {buttonName} to browse inserts.',
107
+ description: 'a prompt to suggest user to click a button to browse inserts when there are no search results'
98
108
  }
99
109
  });
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "100.4.2";
26
+ var packageVersion = "100.5.0";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -18,11 +18,16 @@ var separator = (0, _react.css)({
18
18
  margin: "0 ".concat("var(--ds-space-050, 4px)"),
19
19
  alignSelf: 'center'
20
20
  });
21
-
22
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
23
- var _default = exports.default = function _default() {
24
- return (0, _react.jsx)("div", {
25
- css: separator,
26
- className: "separator"
27
- });
21
+ var separatorFullHeight = (0, _react.css)({
22
+ height: '40px'
23
+ });
24
+ var _default = exports.default = function _default(_ref) {
25
+ var fullHeight = _ref.fullHeight;
26
+ return (
27
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
28
+ (0, _react.jsx)("div", {
29
+ css: [separator, fullHeight && separatorFullHeight],
30
+ className: "separator"
31
+ })
32
+ );
28
33
  };
@@ -11,6 +11,7 @@ export let TOOLBAR_ACTION_SUBJECT_ID = /*#__PURE__*/function (TOOLBAR_ACTION_SUB
11
11
  TOOLBAR_ACTION_SUBJECT_ID["BACKGROUND_COLOR"] = "backgroundColor";
12
12
  TOOLBAR_ACTION_SUBJECT_ID["TEXT_FORMATTING_STRONG"] = "strong";
13
13
  TOOLBAR_ACTION_SUBJECT_ID["TEXT_FORMATTING_ITALIC"] = "italic";
14
+ TOOLBAR_ACTION_SUBJECT_ID["TEXT_FORMATTING_UNDERLINE"] = "underline";
14
15
  TOOLBAR_ACTION_SUBJECT_ID["UNDO"] = "undo";
15
16
  TOOLBAR_ACTION_SUBJECT_ID["REDO"] = "redo";
16
17
  TOOLBAR_ACTION_SUBJECT_ID["INDENT"] = "indent";
@@ -4,7 +4,8 @@
4
4
  export { addLinkMetadata, getLinkMetadataFromTransaction, commandWithMetadata } from './utils';
5
5
  export { default as buildLayoutButtons, alignmentIcons, wrappingIcons, layoutToMessages } from './MediaAndEmbedsToolbar';
6
6
  export { LinkToolbarButtonGroup } from './LinkToolbarButtonGroup';
7
- export { getButtonGroupOption } from './link-toolbar-button-group-options';
7
+ export { appearancePropsMap, getButtonGroupOption } from './link-toolbar-button-group-options';
8
+ export { getDropdownOption } from './link-toolbar-dropdown-options';
8
9
  export const DATASOURCE_INNER_CONTAINER_CLASSNAME = 'datasourceView-content-inner-wrap';
9
10
  export { IconCard } from './ui/assets/card';
10
11
  export { IconInline } from './ui/assets/inline';
@@ -7,7 +7,7 @@ import { IconCard } from './ui/assets/card';
7
7
  import { IconEmbed } from './ui/assets/embed';
8
8
  import { IconInline } from './ui/assets/inline';
9
9
  import { IconUrl } from './ui/assets/url';
10
- const appearancePropsMap = {
10
+ export const appearancePropsMap = {
11
11
  url: {
12
12
  title: messages.urlTitle,
13
13
  icon: MinusIcon,
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { appearancePropsMap } from './link-toolbar-button-group-options';
3
+ export const getDropdownOption = (intl, dispatchCommand, {
4
+ disabled,
5
+ onClick,
6
+ selected,
7
+ appearance,
8
+ testId,
9
+ tooltip
10
+ }) => {
11
+ const {
12
+ title,
13
+ icon: Icon
14
+ } = appearancePropsMap[appearance !== null && appearance !== void 0 ? appearance : 'url'];
15
+ return {
16
+ title: intl.formatMessage(title),
17
+ icon: /*#__PURE__*/React.createElement(Icon, {
18
+ label: intl.formatMessage(title)
19
+ }),
20
+ onClick: () => dispatchCommand(onClick),
21
+ disabled: Boolean(disabled),
22
+ testId,
23
+ selected,
24
+ tooltip: tooltip !== null && tooltip !== void 0 ? tooltip : ''
25
+ };
26
+ };
@@ -5,6 +5,11 @@ export const altTextMessages = defineMessages({
5
5
  defaultMessage: 'Alt text',
6
6
  description: 'Add an alt text for this image'
7
7
  },
8
+ addAltText: {
9
+ id: 'fabric.editor.addUpdatedAltText',
10
+ defaultMessage: 'Add alt text',
11
+ description: 'Add an alt text for this image'
12
+ },
8
13
  editAltText: {
9
14
  id: 'fabric.editor.editAltText',
10
15
  defaultMessage: 'Edit alt text',
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "100.4.2";
4
+ const packageVersion = "100.5.0";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // TODO: Sanitise the URL instead of just removing it
@@ -8,7 +8,7 @@ import React from 'react';
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { jsx } from '@emotion/react';
10
10
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
11
- import { fg } from '@atlaskit/platform-feature-flags';
11
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
12
12
  import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../analytics';
13
13
  import { ErrorBoundary } from '../ui/ErrorBoundary';
14
14
  import { analyticsEventKey, browser, getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered } from '../utils';
@@ -16,9 +16,30 @@ import { ZERO_WIDTH_SPACE } from '../whitespace';
16
16
  import { generateUniqueNodeKey } from './generateUniqueNodeKey';
17
17
  import { getOrCreateOnVisibleObserver } from './onVisibleObserverFactory';
18
18
  export const inlineNodeViewClassname = 'inlineNodeView';
19
+
20
+ // number of initial nodes to allow React to render before switching to fallback
21
+ let initialReactRenderedNodeCount = 0;
19
22
  const canRenderFallback = node => {
20
23
  return node.type.isInline && node.type.isAtom && node.type.isLeaf;
21
24
  };
25
+ const virtualisationConfiguration = () => {
26
+ let enableVirtualization = false;
27
+ let reactRenderedDocumentPositionThreshold = 0;
28
+ if (editorExperiment("platform_editor_inline_node_virtualization", "off")) {
29
+ enableVirtualization = false;
30
+ } else if (editorExperiment("platform_editor_inline_node_virtualization", "fallbackall")) {
31
+ enableVirtualization = true;
32
+ reactRenderedDocumentPositionThreshold = 0;
33
+ } else if (editorExperiment("platform_editor_inline_node_virtualization", "fallbackoffscreen")) {
34
+ enableVirtualization = true;
35
+ reactRenderedDocumentPositionThreshold = 100;
36
+ }
37
+ return {
38
+ enableVirtualization,
39
+ reactRenderedDocumentPositionThreshold,
40
+ virtualizeCurrentNode: () => enableVirtualization && !(initialReactRenderedNodeCount < reactRenderedDocumentPositionThreshold)
41
+ };
42
+ };
22
43
  function createNodeView({
23
44
  nodeViewParams,
24
45
  pmPluginFactoryParams,
@@ -26,7 +47,11 @@ function createNodeView({
26
47
  extraComponentProps,
27
48
  extraNodeViewProps
28
49
  }) {
29
- const shouldVirtualize = fg('platform_editor_lego__inline_node_virtualization');
50
+ const {
51
+ enableVirtualization,
52
+ virtualizeCurrentNode
53
+ } = virtualisationConfiguration();
54
+ const virtualizeNode = virtualizeCurrentNode();
30
55
  // We set a variable for the current node which is
31
56
  // used for comparisions when doing updates, before being
32
57
  // overwritten to the updated node.
@@ -92,7 +117,7 @@ function createNodeView({
92
117
  });
93
118
  }
94
119
  }
95
- if (shouldVirtualize) {
120
+ if (virtualizeNode) {
96
121
  renderFallback();
97
122
  // allow the fallback to render first before attaching the observer.
98
123
  // Will tweak this in a follow up PR to optimise rendering of visible
@@ -101,6 +126,7 @@ function createNodeView({
101
126
  attachNodeViewObserver();
102
127
  }, 0);
103
128
  } else {
129
+ initialReactRenderedNodeCount = initialReactRenderedNodeCount + 1;
104
130
  const {
105
131
  samplingRate,
106
132
  slowThreshold,
@@ -121,9 +147,9 @@ function createNodeView({
121
147
  }
122
148
  const extraNodeViewPropsWithStopEvent = {
123
149
  ...extraNodeViewProps,
124
- ...(fg('platform_editor_lego__inline_node_virtualization') ? {
150
+ ...(enableVirtualization ? {
125
151
  // This is not related to virtualization, but it's something we should fix/handle
126
- // Remove this comment when `platform_editor_lego__inline_node_virtualization` FF is cleaned up
152
+ // Remove this comment when virtualization experiment is cleaned up
127
153
  stopEvent(event) {
128
154
  const maybeStopEvent = extraNodeViewProps === null || extraNodeViewProps === void 0 ? void 0 : extraNodeViewProps.stopEvent;
129
155
  if (typeof maybeStopEvent === 'function') {
@@ -164,7 +190,7 @@ function createNodeView({
164
190
  setDomAttrs(nextNode, domRef);
165
191
  }
166
192
  currentNode = nextNode;
167
- if (shouldVirtualize) {
193
+ if (virtualizeNode) {
168
194
  if (didRenderComponentWithIntersectionObserver) {
169
195
  renderComponent();
170
196
  }
@@ -174,7 +200,7 @@ function createNodeView({
174
200
  return true;
175
201
  },
176
202
  destroy() {
177
- if (shouldVirtualize) {
203
+ if (virtualizeNode) {
178
204
  removeIntersectionObserver();
179
205
  }
180
206
 
@@ -186,7 +212,7 @@ function createNodeView({
186
212
  // of HTMLSpanElement type however once the node view has
187
213
  // been destroyed no other consumers should still be using it.
188
214
  domRef = undefined;
189
- if (shouldVirtualize) {
215
+ if (virtualizeNode) {
190
216
  destroyed = true;
191
217
  }
192
218
  },
@@ -10,7 +10,7 @@ const gapCursorBlink = keyframes({
10
10
  });
11
11
  export const hideCaretModifier = 'ProseMirror-hide-gapcursor';
12
12
  const gapCursor = '.ProseMirror-gapcursor';
13
- const prosemirrorwidgetNotBlock = '.ProseMirror-widget:not([data-blocks-decoration-container="true"]):not([data-blocks-drag-handle-container="true"])';
13
+ const prosemirrorwidgetNotBlock = '.ProseMirror-widget:not([data-blocks-decoration-container="true"]):not([data-blocks-drag-handle-container="true"]):not([data-blocks-quick-insert-container="true"])';
14
14
  const wrapLeft = '[layout="wrap-left"]';
15
15
  const wrapRight = '[layout="wrap-right"]';
16
16
 
@@ -89,5 +89,15 @@ export const typeAheadListMessages = defineMessages({
89
89
  id: 'fablric.editor.viewAllInserts',
90
90
  defaultMessage: 'View all inserts',
91
91
  description: 'a text on a button that opens a side panel with a list of all insertable editor elements'
92
+ },
93
+ emptySearchResults: {
94
+ id: 'fabric.editor.emptySearchResults',
95
+ defaultMessage: "We couldn't find any results.",
96
+ description: 'a message displayed when there are no search results'
97
+ },
98
+ emptySearchResultsSuggestion: {
99
+ id: 'fabric.editor.emptySearchResultsSuggestion',
100
+ defaultMessage: 'Select {buttonName} to browse inserts.',
101
+ description: 'a prompt to suggest user to click a button to browse inserts when there are no search results'
92
102
  }
93
103
  });
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "100.4.2";
16
+ const packageVersion = "100.5.0";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -11,9 +11,14 @@ const separator = css({
11
11
  margin: `0 ${"var(--ds-space-050, 4px)"}`,
12
12
  alignSelf: 'center'
13
13
  });
14
-
14
+ const separatorFullHeight = css({
15
+ height: '40px'
16
+ });
17
+ export default (({
18
+ fullHeight
19
+ }) =>
15
20
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
16
- export default (() => jsx("div", {
17
- css: separator,
21
+ jsx("div", {
22
+ css: [separator, fullHeight && separatorFullHeight],
18
23
  className: "separator"
19
24
  }));
@@ -11,6 +11,7 @@ export var TOOLBAR_ACTION_SUBJECT_ID = /*#__PURE__*/function (TOOLBAR_ACTION_SUB
11
11
  TOOLBAR_ACTION_SUBJECT_ID["BACKGROUND_COLOR"] = "backgroundColor";
12
12
  TOOLBAR_ACTION_SUBJECT_ID["TEXT_FORMATTING_STRONG"] = "strong";
13
13
  TOOLBAR_ACTION_SUBJECT_ID["TEXT_FORMATTING_ITALIC"] = "italic";
14
+ TOOLBAR_ACTION_SUBJECT_ID["TEXT_FORMATTING_UNDERLINE"] = "underline";
14
15
  TOOLBAR_ACTION_SUBJECT_ID["UNDO"] = "undo";
15
16
  TOOLBAR_ACTION_SUBJECT_ID["REDO"] = "redo";
16
17
  TOOLBAR_ACTION_SUBJECT_ID["INDENT"] = "indent";
@@ -4,7 +4,8 @@
4
4
  export { addLinkMetadata, getLinkMetadataFromTransaction, commandWithMetadata } from './utils';
5
5
  export { default as buildLayoutButtons, alignmentIcons, wrappingIcons, layoutToMessages } from './MediaAndEmbedsToolbar';
6
6
  export { LinkToolbarButtonGroup } from './LinkToolbarButtonGroup';
7
- export { getButtonGroupOption } from './link-toolbar-button-group-options';
7
+ export { appearancePropsMap, getButtonGroupOption } from './link-toolbar-button-group-options';
8
+ export { getDropdownOption } from './link-toolbar-dropdown-options';
8
9
  export var DATASOURCE_INNER_CONTAINER_CLASSNAME = 'datasourceView-content-inner-wrap';
9
10
  export { IconCard } from './ui/assets/card';
10
11
  export { IconInline } from './ui/assets/inline';
@@ -7,7 +7,7 @@ import { IconCard } from './ui/assets/card';
7
7
  import { IconEmbed } from './ui/assets/embed';
8
8
  import { IconInline } from './ui/assets/inline';
9
9
  import { IconUrl } from './ui/assets/url';
10
- var appearancePropsMap = {
10
+ export var appearancePropsMap = {
11
11
  url: {
12
12
  title: messages.urlTitle,
13
13
  icon: MinusIcon,
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { appearancePropsMap } from './link-toolbar-button-group-options';
3
+ export var getDropdownOption = function getDropdownOption(intl, dispatchCommand, _ref) {
4
+ var disabled = _ref.disabled,
5
+ _onClick = _ref.onClick,
6
+ selected = _ref.selected,
7
+ appearance = _ref.appearance,
8
+ testId = _ref.testId,
9
+ tooltip = _ref.tooltip;
10
+ var _appearancePropsMap = appearancePropsMap[appearance !== null && appearance !== void 0 ? appearance : 'url'],
11
+ title = _appearancePropsMap.title,
12
+ Icon = _appearancePropsMap.icon;
13
+ return {
14
+ title: intl.formatMessage(title),
15
+ icon: /*#__PURE__*/React.createElement(Icon, {
16
+ label: intl.formatMessage(title)
17
+ }),
18
+ onClick: function onClick() {
19
+ return dispatchCommand(_onClick);
20
+ },
21
+ disabled: Boolean(disabled),
22
+ testId: testId,
23
+ selected: selected,
24
+ tooltip: tooltip !== null && tooltip !== void 0 ? tooltip : ''
25
+ };
26
+ };
@@ -5,6 +5,11 @@ export var altTextMessages = defineMessages({
5
5
  defaultMessage: 'Alt text',
6
6
  description: 'Add an alt text for this image'
7
7
  },
8
+ addAltText: {
9
+ id: 'fabric.editor.addUpdatedAltText',
10
+ defaultMessage: 'Add alt text',
11
+ description: 'Add an alt text for this image'
12
+ },
8
13
  editAltText: {
9
14
  id: 'fabric.editor.editAltText',
10
15
  defaultMessage: 'Edit alt text',
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "100.4.2";
10
+ var packageVersion = "100.5.0";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // TODO: Sanitise the URL instead of just removing it
@@ -11,7 +11,7 @@ import React from 'react';
11
11
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
12
12
  import { jsx } from '@emotion/react';
13
13
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
14
- import { fg } from '@atlaskit/platform-feature-flags';
14
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
15
15
  import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../analytics';
16
16
  import { ErrorBoundary } from '../ui/ErrorBoundary';
17
17
  import { analyticsEventKey, browser, getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered } from '../utils';
@@ -19,16 +19,42 @@ import { ZERO_WIDTH_SPACE } from '../whitespace';
19
19
  import { generateUniqueNodeKey } from './generateUniqueNodeKey';
20
20
  import { getOrCreateOnVisibleObserver } from './onVisibleObserverFactory';
21
21
  export var inlineNodeViewClassname = 'inlineNodeView';
22
+
23
+ // number of initial nodes to allow React to render before switching to fallback
24
+ var initialReactRenderedNodeCount = 0;
22
25
  var canRenderFallback = function canRenderFallback(node) {
23
26
  return node.type.isInline && node.type.isAtom && node.type.isLeaf;
24
27
  };
28
+ var virtualisationConfiguration = function virtualisationConfiguration() {
29
+ var enableVirtualization = false;
30
+ var reactRenderedDocumentPositionThreshold = 0;
31
+ if (editorExperiment("platform_editor_inline_node_virtualization", "off")) {
32
+ enableVirtualization = false;
33
+ } else if (editorExperiment("platform_editor_inline_node_virtualization", "fallbackall")) {
34
+ enableVirtualization = true;
35
+ reactRenderedDocumentPositionThreshold = 0;
36
+ } else if (editorExperiment("platform_editor_inline_node_virtualization", "fallbackoffscreen")) {
37
+ enableVirtualization = true;
38
+ reactRenderedDocumentPositionThreshold = 100;
39
+ }
40
+ return {
41
+ enableVirtualization: enableVirtualization,
42
+ reactRenderedDocumentPositionThreshold: reactRenderedDocumentPositionThreshold,
43
+ virtualizeCurrentNode: function virtualizeCurrentNode() {
44
+ return enableVirtualization && !(initialReactRenderedNodeCount < reactRenderedDocumentPositionThreshold);
45
+ }
46
+ };
47
+ };
25
48
  function createNodeView(_ref) {
26
49
  var nodeViewParams = _ref.nodeViewParams,
27
50
  pmPluginFactoryParams = _ref.pmPluginFactoryParams,
28
51
  Component = _ref.Component,
29
52
  extraComponentProps = _ref.extraComponentProps,
30
53
  extraNodeViewProps = _ref.extraNodeViewProps;
31
- var shouldVirtualize = fg('platform_editor_lego__inline_node_virtualization');
54
+ var _virtualisationConfig = virtualisationConfiguration(),
55
+ enableVirtualization = _virtualisationConfig.enableVirtualization,
56
+ virtualizeCurrentNode = _virtualisationConfig.virtualizeCurrentNode;
57
+ var virtualizeNode = virtualizeCurrentNode();
32
58
  // We set a variable for the current node which is
33
59
  // used for comparisions when doing updates, before being
34
60
  // overwritten to the updated node.
@@ -94,7 +120,7 @@ function createNodeView(_ref) {
94
120
  });
95
121
  }
96
122
  }
97
- if (shouldVirtualize) {
123
+ if (virtualizeNode) {
98
124
  renderFallback();
99
125
  // allow the fallback to render first before attaching the observer.
100
126
  // Will tweak this in a follow up PR to optimise rendering of visible
@@ -103,6 +129,7 @@ function createNodeView(_ref) {
103
129
  attachNodeViewObserver();
104
130
  }, 0);
105
131
  } else {
132
+ initialReactRenderedNodeCount = initialReactRenderedNodeCount + 1;
106
133
  var _getPerformanceOption = getPerformanceOptions(nodeViewParams.view),
107
134
  samplingRate = _getPerformanceOption.samplingRate,
108
135
  slowThreshold = _getPerformanceOption.slowThreshold,
@@ -120,9 +147,9 @@ function createNodeView(_ref) {
120
147
  slowThreshold: slowThreshold
121
148
  });
122
149
  }
123
- var extraNodeViewPropsWithStopEvent = _objectSpread(_objectSpread({}, extraNodeViewProps), fg('platform_editor_lego__inline_node_virtualization') ? {
150
+ var extraNodeViewPropsWithStopEvent = _objectSpread(_objectSpread({}, extraNodeViewProps), enableVirtualization ? {
124
151
  // This is not related to virtualization, but it's something we should fix/handle
125
- // Remove this comment when `platform_editor_lego__inline_node_virtualization` FF is cleaned up
152
+ // Remove this comment when virtualization experiment is cleaned up
126
153
  stopEvent: function stopEvent(event) {
127
154
  var maybeStopEvent = extraNodeViewProps === null || extraNodeViewProps === void 0 ? void 0 : extraNodeViewProps.stopEvent;
128
155
  if (typeof maybeStopEvent === 'function') {
@@ -162,7 +189,7 @@ function createNodeView(_ref) {
162
189
  setDomAttrs(nextNode, domRef);
163
190
  }
164
191
  currentNode = nextNode;
165
- if (shouldVirtualize) {
192
+ if (virtualizeNode) {
166
193
  if (didRenderComponentWithIntersectionObserver) {
167
194
  renderComponent();
168
195
  }
@@ -172,7 +199,7 @@ function createNodeView(_ref) {
172
199
  return true;
173
200
  },
174
201
  destroy: function destroy() {
175
- if (shouldVirtualize) {
202
+ if (virtualizeNode) {
176
203
  removeIntersectionObserver();
177
204
  }
178
205
 
@@ -184,7 +211,7 @@ function createNodeView(_ref) {
184
211
  // of HTMLSpanElement type however once the node view has
185
212
  // been destroyed no other consumers should still be using it.
186
213
  domRef = undefined;
187
- if (shouldVirtualize) {
214
+ if (virtualizeNode) {
188
215
  destroyed = true;
189
216
  }
190
217
  }
@@ -12,7 +12,7 @@ var gapCursorBlink = keyframes({
12
12
  });
13
13
  export var hideCaretModifier = 'ProseMirror-hide-gapcursor';
14
14
  var gapCursor = '.ProseMirror-gapcursor';
15
- var prosemirrorwidgetNotBlock = '.ProseMirror-widget:not([data-blocks-decoration-container="true"]):not([data-blocks-drag-handle-container="true"])';
15
+ var prosemirrorwidgetNotBlock = '.ProseMirror-widget:not([data-blocks-decoration-container="true"]):not([data-blocks-drag-handle-container="true"]):not([data-blocks-quick-insert-container="true"])';
16
16
  var wrapLeft = '[layout="wrap-left"]';
17
17
  var wrapRight = '[layout="wrap-right"]';
18
18
 
@@ -89,5 +89,15 @@ export var typeAheadListMessages = defineMessages({
89
89
  id: 'fablric.editor.viewAllInserts',
90
90
  defaultMessage: 'View all inserts',
91
91
  description: 'a text on a button that opens a side panel with a list of all insertable editor elements'
92
+ },
93
+ emptySearchResults: {
94
+ id: 'fabric.editor.emptySearchResults',
95
+ defaultMessage: "We couldn't find any results.",
96
+ description: 'a message displayed when there are no search results'
97
+ },
98
+ emptySearchResultsSuggestion: {
99
+ id: 'fabric.editor.emptySearchResultsSuggestion',
100
+ defaultMessage: 'Select {buttonName} to browse inserts.',
101
+ description: 'a prompt to suggest user to click a button to browse inserts when there are no search results'
92
102
  }
93
103
  });
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "100.4.2";
23
+ var packageVersion = "100.5.0";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -11,11 +11,16 @@ var separator = css({
11
11
  margin: "0 ".concat("var(--ds-space-050, 4px)"),
12
12
  alignSelf: 'center'
13
13
  });
14
-
15
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
16
- export default (function () {
17
- return jsx("div", {
18
- css: separator,
19
- className: "separator"
20
- });
14
+ var separatorFullHeight = css({
15
+ height: '40px'
16
+ });
17
+ export default (function (_ref) {
18
+ var fullHeight = _ref.fullHeight;
19
+ return (
20
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
21
+ jsx("div", {
22
+ css: [separator, fullHeight && separatorFullHeight],
23
+ className: "separator"
24
+ })
25
+ );
21
26
  });
@@ -13,6 +13,7 @@ export declare enum TOOLBAR_ACTION_SUBJECT_ID {
13
13
  BACKGROUND_COLOR = "backgroundColor",
14
14
  TEXT_FORMATTING_STRONG = "strong",
15
15
  TEXT_FORMATTING_ITALIC = "italic",
16
+ TEXT_FORMATTING_UNDERLINE = "underline",
16
17
  UNDO = "undo",
17
18
  REDO = "redo",
18
19
  INDENT = "indent",
@@ -4,7 +4,8 @@ export { default as buildLayoutButtons, alignmentIcons, wrappingIcons, layoutToM
4
4
  export type { IconMap, LayoutIcon } from './MediaAndEmbedsToolbar';
5
5
  export type { OptionConfig, CardPluginActions, QueueCardsFromTransactionAction, HideLinkToolbarAction, ChangeSelectedCardToLink, SetSelectedCardAppearance, CardReplacementInputMethod, } from './types';
6
6
  export { LinkToolbarButtonGroup } from './LinkToolbarButtonGroup';
7
- export { getButtonGroupOption } from './link-toolbar-button-group-options';
7
+ export { appearancePropsMap, getButtonGroupOption } from './link-toolbar-button-group-options';
8
+ export { getDropdownOption } from './link-toolbar-dropdown-options';
8
9
  export declare const DATASOURCE_INNER_CONTAINER_CLASSNAME = "datasourceView-content-inner-wrap";
9
10
  export { IconCard } from './ui/assets/card';
10
11
  export { IconInline } from './ui/assets/inline';
@@ -1,5 +1,56 @@
1
+ /// <reference types="react" />
1
2
  import { type IntlShape } from 'react-intl-next';
2
3
  import type { Command } from '../types';
3
4
  import type { ButtonOptionProps } from './LinkToolbarButtonGroup';
4
5
  import type { OptionConfig } from './types';
6
+ export declare const appearancePropsMap: {
7
+ url: {
8
+ title: {
9
+ id: string;
10
+ defaultMessage: string;
11
+ description: string;
12
+ };
13
+ icon: {
14
+ (props: import("@atlaskit/icon").NewCoreIconProps): JSX.Element;
15
+ displayName: string;
16
+ };
17
+ iconFallback: (props: import("@atlaskit/icon").NewCoreIconProps) => import("react").JSX.Element;
18
+ };
19
+ inline: {
20
+ title: {
21
+ id: string;
22
+ defaultMessage: string;
23
+ description: string;
24
+ };
25
+ icon: {
26
+ (props: import("@atlaskit/icon").NewCoreIconProps): JSX.Element;
27
+ displayName: string;
28
+ };
29
+ iconFallback: (props: import("@atlaskit/icon").NewIconProps) => import("react").JSX.Element;
30
+ };
31
+ block: {
32
+ title: {
33
+ id: string;
34
+ defaultMessage: string;
35
+ description: string;
36
+ };
37
+ icon: {
38
+ (props: import("@atlaskit/icon").NewCoreIconProps): JSX.Element;
39
+ displayName: string;
40
+ };
41
+ iconFallback: (props: import("@atlaskit/icon").NewIconProps) => import("react").JSX.Element;
42
+ };
43
+ embed: {
44
+ title: {
45
+ id: string;
46
+ defaultMessage: string;
47
+ description: string;
48
+ };
49
+ icon: {
50
+ (props: import("@atlaskit/icon").NewCoreIconProps): JSX.Element;
51
+ displayName: string;
52
+ };
53
+ iconFallback: (props: import("@atlaskit/icon").NewIconProps) => import("react").JSX.Element;
54
+ };
55
+ };
5
56
  export declare const getButtonGroupOption: (intl: IntlShape, dispatchCommand: (command: Command) => void, { disabled, onClick, selected, appearance, testId, tooltip }: OptionConfig) => ButtonOptionProps;
@@ -0,0 +1,4 @@
1
+ import { type IntlShape } from 'react-intl-next';
2
+ import type { Command, DropdownOptionT } from '../types';
3
+ import type { OptionConfig } from './types';
4
+ export declare const getDropdownOption: (intl: IntlShape, dispatchCommand: (command: Command) => void, { disabled, onClick, selected, appearance, testId, tooltip }: OptionConfig) => DropdownOptionT<Function>;
@@ -4,6 +4,11 @@ export declare const altTextMessages: {
4
4
  defaultMessage: string;
5
5
  description: string;
6
6
  };
7
+ addAltText: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
7
12
  editAltText: {
8
13
  id: string;
9
14
  defaultMessage: string;
@@ -89,4 +89,14 @@ export declare const typeAheadListMessages: {
89
89
  defaultMessage: string;
90
90
  description: string;
91
91
  };
92
+ emptySearchResults: {
93
+ id: string;
94
+ defaultMessage: string;
95
+ description: string;
96
+ };
97
+ emptySearchResultsSuggestion: {
98
+ id: string;
99
+ defaultMessage: string;
100
+ description: string;
101
+ };
92
102
  };
@@ -237,6 +237,7 @@ export type FloatingToolbarSelect<T extends Object> = FloatingToolbarEmojiPicker
237
237
  export type FloatingToolbarSeparator = {
238
238
  type: 'separator';
239
239
  hidden?: boolean;
240
+ fullHeight?: boolean;
240
241
  supportsViewMode?: boolean;
241
242
  };
242
243
  export type FloatingToolbarDropdown<T extends Object> = {
@@ -3,5 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { jsx } from '@emotion/react';
6
- declare const _default: () => jsx.JSX.Element;
6
+ declare const _default: ({ fullHeight }: {
7
+ fullHeight?: boolean | undefined;
8
+ }) => jsx.JSX.Element;
7
9
  export default _default;
@@ -13,6 +13,7 @@ export declare enum TOOLBAR_ACTION_SUBJECT_ID {
13
13
  BACKGROUND_COLOR = "backgroundColor",
14
14
  TEXT_FORMATTING_STRONG = "strong",
15
15
  TEXT_FORMATTING_ITALIC = "italic",
16
+ TEXT_FORMATTING_UNDERLINE = "underline",
16
17
  UNDO = "undo",
17
18
  REDO = "redo",
18
19
  INDENT = "indent",
@@ -4,7 +4,8 @@ export { default as buildLayoutButtons, alignmentIcons, wrappingIcons, layoutToM
4
4
  export type { IconMap, LayoutIcon } from './MediaAndEmbedsToolbar';
5
5
  export type { OptionConfig, CardPluginActions, QueueCardsFromTransactionAction, HideLinkToolbarAction, ChangeSelectedCardToLink, SetSelectedCardAppearance, CardReplacementInputMethod, } from './types';
6
6
  export { LinkToolbarButtonGroup } from './LinkToolbarButtonGroup';
7
- export { getButtonGroupOption } from './link-toolbar-button-group-options';
7
+ export { appearancePropsMap, getButtonGroupOption } from './link-toolbar-button-group-options';
8
+ export { getDropdownOption } from './link-toolbar-dropdown-options';
8
9
  export declare const DATASOURCE_INNER_CONTAINER_CLASSNAME = "datasourceView-content-inner-wrap";
9
10
  export { IconCard } from './ui/assets/card';
10
11
  export { IconInline } from './ui/assets/inline';
@@ -1,5 +1,56 @@
1
+ /// <reference types="react" />
1
2
  import { type IntlShape } from 'react-intl-next';
2
3
  import type { Command } from '../types';
3
4
  import type { ButtonOptionProps } from './LinkToolbarButtonGroup';
4
5
  import type { OptionConfig } from './types';
6
+ export declare const appearancePropsMap: {
7
+ url: {
8
+ title: {
9
+ id: string;
10
+ defaultMessage: string;
11
+ description: string;
12
+ };
13
+ icon: {
14
+ (props: import("@atlaskit/icon").NewCoreIconProps): JSX.Element;
15
+ displayName: string;
16
+ };
17
+ iconFallback: (props: import("@atlaskit/icon").NewCoreIconProps) => import("react").JSX.Element;
18
+ };
19
+ inline: {
20
+ title: {
21
+ id: string;
22
+ defaultMessage: string;
23
+ description: string;
24
+ };
25
+ icon: {
26
+ (props: import("@atlaskit/icon").NewCoreIconProps): JSX.Element;
27
+ displayName: string;
28
+ };
29
+ iconFallback: (props: import("@atlaskit/icon").NewIconProps) => import("react").JSX.Element;
30
+ };
31
+ block: {
32
+ title: {
33
+ id: string;
34
+ defaultMessage: string;
35
+ description: string;
36
+ };
37
+ icon: {
38
+ (props: import("@atlaskit/icon").NewCoreIconProps): JSX.Element;
39
+ displayName: string;
40
+ };
41
+ iconFallback: (props: import("@atlaskit/icon").NewIconProps) => import("react").JSX.Element;
42
+ };
43
+ embed: {
44
+ title: {
45
+ id: string;
46
+ defaultMessage: string;
47
+ description: string;
48
+ };
49
+ icon: {
50
+ (props: import("@atlaskit/icon").NewCoreIconProps): JSX.Element;
51
+ displayName: string;
52
+ };
53
+ iconFallback: (props: import("@atlaskit/icon").NewIconProps) => import("react").JSX.Element;
54
+ };
55
+ };
5
56
  export declare const getButtonGroupOption: (intl: IntlShape, dispatchCommand: (command: Command) => void, { disabled, onClick, selected, appearance, testId, tooltip }: OptionConfig) => ButtonOptionProps;
@@ -0,0 +1,4 @@
1
+ import { type IntlShape } from 'react-intl-next';
2
+ import type { Command, DropdownOptionT } from '../types';
3
+ import type { OptionConfig } from './types';
4
+ export declare const getDropdownOption: (intl: IntlShape, dispatchCommand: (command: Command) => void, { disabled, onClick, selected, appearance, testId, tooltip }: OptionConfig) => DropdownOptionT<Function>;
@@ -4,6 +4,11 @@ export declare const altTextMessages: {
4
4
  defaultMessage: string;
5
5
  description: string;
6
6
  };
7
+ addAltText: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
7
12
  editAltText: {
8
13
  id: string;
9
14
  defaultMessage: string;
@@ -89,4 +89,14 @@ export declare const typeAheadListMessages: {
89
89
  defaultMessage: string;
90
90
  description: string;
91
91
  };
92
+ emptySearchResults: {
93
+ id: string;
94
+ defaultMessage: string;
95
+ description: string;
96
+ };
97
+ emptySearchResultsSuggestion: {
98
+ id: string;
99
+ defaultMessage: string;
100
+ description: string;
101
+ };
92
102
  };
@@ -237,6 +237,7 @@ export type FloatingToolbarSelect<T extends Object> = FloatingToolbarEmojiPicker
237
237
  export type FloatingToolbarSeparator = {
238
238
  type: 'separator';
239
239
  hidden?: boolean;
240
+ fullHeight?: boolean;
240
241
  supportsViewMode?: boolean;
241
242
  };
242
243
  export type FloatingToolbarDropdown<T extends Object> = {
@@ -3,5 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { jsx } from '@emotion/react';
6
- declare const _default: () => jsx.JSX.Element;
6
+ declare const _default: ({ fullHeight }: {
7
+ fullHeight?: boolean | undefined;
8
+ }) => jsx.JSX.Element;
7
9
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "100.4.2",
3
+ "version": "100.5.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/"
@@ -115,8 +115,8 @@
115
115
  },
116
116
  "dependencies": {
117
117
  "@atlaskit/activity-provider": "^2.5.0",
118
- "@atlaskit/adf-schema": "^47.2.1",
119
- "@atlaskit/adf-utils": "^19.18.0",
118
+ "@atlaskit/adf-schema": "^47.6.0",
119
+ "@atlaskit/adf-utils": "^19.19.0",
120
120
  "@atlaskit/analytics-listeners": "^9.0.0",
121
121
  "@atlaskit/analytics-namespaced-context": "^7.0.0",
122
122
  "@atlaskit/analytics-next": "^11.0.0",
@@ -125,9 +125,9 @@
125
125
  "@atlaskit/code": "^16.0.0",
126
126
  "@atlaskit/codemod-utils": "^4.2.0",
127
127
  "@atlaskit/css": "^0.10.0",
128
- "@atlaskit/custom-steps": "^0.10.0",
128
+ "@atlaskit/custom-steps": "^0.11.0",
129
129
  "@atlaskit/dropdown-menu": "^13.0.0",
130
- "@atlaskit/editor-json-transformer": "^8.23.0",
130
+ "@atlaskit/editor-json-transformer": "^8.24.0",
131
131
  "@atlaskit/editor-palette": "2.0.0",
132
132
  "@atlaskit/editor-prosemirror": "7.0.0",
133
133
  "@atlaskit/editor-shared-styles": "^3.4.0",
@@ -135,7 +135,7 @@
135
135
  "@atlaskit/emoji": "^68.0.0",
136
136
  "@atlaskit/icon": "^24.1.0",
137
137
  "@atlaskit/icon-object": "^7.0.0",
138
- "@atlaskit/link-datasource": "^3.21.0",
138
+ "@atlaskit/link-datasource": "^3.22.0",
139
139
  "@atlaskit/link-picker": "^3.0.0",
140
140
  "@atlaskit/media-card": "^79.0.0",
141
141
  "@atlaskit/media-client": "^32.0.0",
@@ -145,7 +145,7 @@
145
145
  "@atlaskit/media-picker": "^68.0.0",
146
146
  "@atlaskit/media-ui": "^28.0.0",
147
147
  "@atlaskit/media-viewer": "52.0.0",
148
- "@atlaskit/mention": "^24.0.0",
148
+ "@atlaskit/mention": "^24.1.0",
149
149
  "@atlaskit/menu": "^3.1.0",
150
150
  "@atlaskit/onboarding": "^13.0.0",
151
151
  "@atlaskit/platform-feature-flags": "^1.1.0",
@@ -158,8 +158,8 @@
158
158
  "@atlaskit/spinner": "^18.0.0",
159
159
  "@atlaskit/task-decision": "^19.0.0",
160
160
  "@atlaskit/textfield": "^8.0.0",
161
- "@atlaskit/tmp-editor-statsig": "^3.3.0",
162
- "@atlaskit/tokens": "^4.2.0",
161
+ "@atlaskit/tmp-editor-statsig": "^3.4.0",
162
+ "@atlaskit/tokens": "^4.3.0",
163
163
  "@atlaskit/tooltip": "^20.0.0",
164
164
  "@atlaskit/width-detector": "^5.0.0",
165
165
  "@babel/runtime": "^7.0.0",
@@ -263,9 +263,6 @@
263
263
  "platform_editor_typography_ugc": {
264
264
  "type": "boolean"
265
265
  },
266
- "platform_editor_lego__inline_node_virtualization": {
267
- "type": "boolean"
268
- },
269
266
  "platform_editor_heading_margin_fix": {
270
267
  "type": "boolean"
271
268
  },