@atlaskit/renderer 109.53.2 → 110.0.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 (106) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/cjs/react/hooks/use-in-viewport.js +3 -3
  4. package/dist/cjs/react/index.js +2 -2
  5. package/dist/cjs/react/marks/backgroundColor.js +1 -1
  6. package/dist/cjs/react/marks/confluence-inline-comment.js +2 -2
  7. package/dist/cjs/react/marks/index.js +1 -1
  8. package/dist/cjs/react/marks/link.js +1 -1
  9. package/dist/cjs/react/marks/textColor.js +1 -1
  10. package/dist/cjs/react/nodes/blockCard.js +16 -25
  11. package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +1 -1
  12. package/dist/cjs/react/nodes/codeBlock/windowedCodeBlock.js +1 -1
  13. package/dist/cjs/react/nodes/date.js +1 -1
  14. package/dist/cjs/react/nodes/decisionList.js +2 -2
  15. package/dist/cjs/react/nodes/embedCard.js +1 -4
  16. package/dist/cjs/react/nodes/fallback.js +6 -6
  17. package/dist/cjs/react/nodes/heading-anchor.js +1 -1
  18. package/dist/cjs/react/nodes/index.js +1 -1
  19. package/dist/cjs/react/nodes/media/index.js +2 -2
  20. package/dist/cjs/react/nodes/mediaGroup.js +2 -2
  21. package/dist/cjs/react/nodes/mediaInline.js +3 -3
  22. package/dist/cjs/react/nodes/mediaSingle/index.js +1 -1
  23. package/dist/cjs/react/nodes/mention.js +1 -1
  24. package/dist/cjs/react/nodes/multiBodiedExtension.js +1 -1
  25. package/dist/cjs/react/nodes/status.js +1 -1
  26. package/dist/cjs/react/nodes/table.js +5 -5
  27. package/dist/cjs/react/nodes/tableRow.js +1 -1
  28. package/dist/cjs/react/nodes/taskItem.js +2 -2
  29. package/dist/cjs/react/nodes/taskList.js +2 -2
  30. package/dist/cjs/react/utils/EditorMediaClientProvider.js +1 -1
  31. package/dist/cjs/react/utils/segment-text.js +3 -3
  32. package/dist/cjs/steps/index.js +1 -0
  33. package/dist/cjs/ui/Expand.js +2 -5
  34. package/dist/cjs/ui/ExtensionRenderer.js +1 -1
  35. package/dist/cjs/ui/MediaCard.js +4 -6
  36. package/dist/cjs/ui/Renderer/ErrorBoundary.js +1 -1
  37. package/dist/cjs/ui/Renderer/index.js +3 -3
  38. package/dist/cjs/ui/Renderer/style.js +2 -2
  39. package/dist/cjs/ui/Renderer/truncated-wrapper.js +1 -1
  40. package/dist/cjs/ui/RendererActionsContext/index.js +1 -1
  41. package/dist/cjs/ui/SmartCardStorage.js +1 -1
  42. package/dist/cjs/ui/active-header-id-provider.js +1 -1
  43. package/dist/cjs/ui/annotations/context.js +2 -2
  44. package/dist/cjs/ui/annotations/contexts/AnnotationHoverContext.js +1 -1
  45. package/dist/cjs/ui/annotations/contexts/AnnotationRangeContext.js +1 -1
  46. package/dist/cjs/ui/annotations/draft/component.js +1 -1
  47. package/dist/cjs/ui/annotations/draft/text.js +3 -3
  48. package/dist/cjs/ui/annotations/element/index.js +1 -1
  49. package/dist/cjs/ui/annotations/hooks/user-selection.js +23 -0
  50. package/dist/cjs/ui/annotations/hover/mounter.js +1 -1
  51. package/dist/cjs/ui/annotations/hover/range-validator.js +1 -1
  52. package/dist/cjs/ui/annotations/selection/mounter.js +1 -1
  53. package/dist/cjs/ui/annotations/selection/range-validator.js +1 -1
  54. package/dist/cjs/ui/annotations/view/index.js +1 -1
  55. package/dist/cjs/ui/annotations/wrapper.js +1 -1
  56. package/dist/cjs/ui/index.js +1 -1
  57. package/dist/cjs/utils.js +1 -7
  58. package/dist/es2019/react/index.js +2 -2
  59. package/dist/es2019/react/nodes/blockCard.js +1 -7
  60. package/dist/es2019/react/nodes/embedCard.js +2 -3
  61. package/dist/es2019/react/nodes/mediaInline.js +2 -2
  62. package/dist/es2019/react/nodes/table.js +1 -1
  63. package/dist/es2019/steps/index.js +1 -1
  64. package/dist/es2019/ui/Expand.js +2 -3
  65. package/dist/es2019/ui/MediaCard.js +2 -4
  66. package/dist/es2019/ui/Renderer/index.js +1 -1
  67. package/dist/es2019/ui/Renderer/style.js +1 -1
  68. package/dist/es2019/ui/annotations/hooks/user-selection.js +25 -0
  69. package/dist/es2019/utils.js +0 -6
  70. package/dist/esm/react/hooks/use-in-viewport.js +3 -3
  71. package/dist/esm/react/index.js +2 -2
  72. package/dist/esm/react/marks/confluence-inline-comment.js +1 -1
  73. package/dist/esm/react/nodes/blockCard.js +1 -9
  74. package/dist/esm/react/nodes/decisionList.js +1 -1
  75. package/dist/esm/react/nodes/embedCard.js +2 -5
  76. package/dist/esm/react/nodes/fallback.js +6 -6
  77. package/dist/esm/react/nodes/heading-anchor.js +1 -1
  78. package/dist/esm/react/nodes/media/index.js +1 -1
  79. package/dist/esm/react/nodes/mediaGroup.js +1 -1
  80. package/dist/esm/react/nodes/mediaInline.js +2 -2
  81. package/dist/esm/react/nodes/table.js +5 -5
  82. package/dist/esm/react/nodes/tableRow.js +1 -1
  83. package/dist/esm/react/nodes/taskItem.js +1 -1
  84. package/dist/esm/react/nodes/taskList.js +1 -1
  85. package/dist/esm/react/utils/segment-text.js +3 -3
  86. package/dist/esm/steps/index.js +1 -1
  87. package/dist/esm/ui/Expand.js +2 -5
  88. package/dist/esm/ui/MediaCard.js +3 -5
  89. package/dist/esm/ui/Renderer/ErrorBoundary.js +1 -1
  90. package/dist/esm/ui/Renderer/index.js +2 -2
  91. package/dist/esm/ui/Renderer/style.js +1 -1
  92. package/dist/esm/ui/Renderer/truncated-wrapper.js +1 -1
  93. package/dist/esm/ui/SmartCardStorage.js +1 -1
  94. package/dist/esm/ui/annotations/context.js +1 -1
  95. package/dist/esm/ui/annotations/draft/text.js +3 -3
  96. package/dist/esm/ui/annotations/hooks/user-selection.js +23 -0
  97. package/dist/esm/utils.js +0 -6
  98. package/dist/types/react/nodes/blockCard.d.ts +4 -0
  99. package/dist/types/steps/index.d.ts +1 -0
  100. package/dist/types/ui/Renderer/types.d.ts +1 -1
  101. package/dist/types/utils.d.ts +0 -2
  102. package/dist/types-ts4.5/react/nodes/blockCard.d.ts +4 -0
  103. package/dist/types-ts4.5/steps/index.d.ts +1 -0
  104. package/dist/types-ts4.5/ui/Renderer/types.d.ts +1 -1
  105. package/dist/types-ts4.5/utils.d.ts +0 -2
  106. package/package.json +5 -2
@@ -8,7 +8,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
9
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
10
10
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
12
12
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
13
  /**
14
14
  * @jsxRuntime classic
@@ -55,7 +55,7 @@ import { nodeToReact } from '../../react/nodes';
55
55
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
56
56
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
57
57
  var packageName = "@atlaskit/renderer";
58
- var packageVersion = "109.53.2";
58
+ var packageVersion = "110.0.0";
59
59
  export var defaultNodeComponents = nodeToReact;
60
60
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
61
61
  _inherits(Renderer, _PureComponent);
@@ -81,7 +81,7 @@ var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
81
81
  var fullPageStyles = function fullPageStyles(_ref3, _ref4) {
82
82
  var appearance = _ref3.appearance;
83
83
  var theme = _ref4.theme;
84
- if (appearance !== 'full-page' && appearance !== 'mobile') {
84
+ if (appearance !== 'full-page') {
85
85
  return '';
86
86
  }
87
87
  return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n\t\tmax-width: ", ";\n\t\tmargin: 0 auto;\n\t\tpadding: 0 ", "px;\n\t"])), theme && theme.layoutMaxWidth ? "".concat(theme.layoutMaxWidth, "px") : 'none', appearance === 'full-page' ? FullPagePadding : 0);
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import _inherits from "@babel/runtime/helpers/inherits";
4
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  /**
9
9
  * @jsxRuntime classic
@@ -4,7 +4,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
4
4
  import _inherits from "@babel/runtime/helpers/inherits";
5
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
7
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
8
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
9
  import React from 'react';
10
10
  export var Context = /*#__PURE__*/React.createContext(new Map());
@@ -5,7 +5,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
5
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
8
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
9
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
10
  import React, { createContext } from 'react';
11
11
  export var AnnotationsDraftContext = /*#__PURE__*/createContext(null);
@@ -1,6 +1,6 @@
1
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
2
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
3
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
1
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
2
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
3
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
4
4
  import React from 'react';
5
5
  export var findTextString = function findTextString(reactNode) {
6
6
  var result = null;
@@ -1,6 +1,8 @@
1
1
  import { useEffect, useRef } from 'react';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
2
3
  import { useAnnotationRangeDispatch, useAnnotationRangeState } from '../contexts/AnnotationRangeContext';
3
4
  import { isRangeInsideOfRendererContainer } from './utils';
5
+ import { isRoot } from '../../../steps';
4
6
  export var useUserSelectionRange = function useUserSelectionRange(props) {
5
7
  var rendererDOM = props.rendererRef.current;
6
8
  var selectionTimeoutRef = useRef();
@@ -26,6 +28,27 @@ export var useUserSelectionRange = function useUserSelectionRange(props) {
26
28
  }
27
29
  var _range = sel.getRangeAt(0);
28
30
  if (rendererDOM && isRangeInsideOfRendererContainer(rendererDOM, _range)) {
31
+ if (fg('platform_editor_allow_annotation_triple_click')) {
32
+ var startContainer = _range.startContainer,
33
+ endContainer = _range.endContainer,
34
+ commonAncestorContainer = _range.commonAncestorContainer;
35
+
36
+ // ED-23493
37
+ // On triple-click in Chrome and Safari, the native Selection API's range has endContainer as a non-text node
38
+ // and commonAncestorContainer as root level div.ak-renderer-document when the node is followed by div or hr.
39
+
40
+ // Triple clicks are the only case that can cause the endContainer to be a non-text node
41
+ // Same check for highlight range logic in confluence/next/packages/comments-util/src/domUtils.ts Line 180
42
+ var isTripleClick = endContainer.nodeType !== Node.TEXT_NODE;
43
+
44
+ // isAnnotationAllowedOnRange range validation is checking if the parent container is root element and disable the comment if it is.
45
+ // platform/packages/editor/renderer/src/steps/index.ts Line 180
46
+
47
+ // This workaround ensures the endContainer is set to a text node when endContainer is non-text and the parent container is the root element
48
+ if (isTripleClick && isRoot(commonAncestorContainer)) {
49
+ _range.setEnd(startContainer, startContainer.length || 0);
50
+ }
51
+ }
29
52
  setRange(_range.cloneRange());
30
53
  }
31
54
  }, 250);
package/dist/esm/utils.js CHANGED
@@ -19,12 +19,6 @@ export var getEventHandler = function getEventHandler(eventHandlers, type) {
19
19
  var eventName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'onClick';
20
20
  return eventHandlers && type && eventHandlers[type] && eventHandlers[type][eventName];
21
21
  };
22
- export var getPlatform = function getPlatform(rendererAppearance) {
23
- if (rendererAppearance === 'mobile') {
24
- return 'mobile';
25
- }
26
- return 'web';
27
- };
28
22
 
29
23
  /**
30
24
  * Traverse through parent elements of element. Return element for which evaluate(element) returns
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
1
5
  import { jsx } from '@emotion/react';
2
6
  import type { EventHandlers } from '@atlaskit/editor-common/ui';
3
7
  import type { RendererAppearance } from '../../ui/Renderer/types';
@@ -1,5 +1,6 @@
1
1
  import type { Schema } from '@atlaskit/editor-prosemirror/model';
2
2
  import { AddMarkStep } from '@atlaskit/editor-prosemirror/transform';
3
+ export declare function isRoot(element: HTMLElement | null): boolean;
3
4
  export declare function resolvePos(node: Node | null, offset: number, findEnd?: boolean): number | false;
4
5
  interface AnnotationStepOptions {
5
6
  schema: Schema;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export type RendererAppearance = 'comment' | 'full-page' | 'full-width' | 'mobile' | undefined;
2
+ export type RendererAppearance = 'comment' | 'full-page' | 'full-width' | undefined;
3
3
  export type StickyHeaderConfig = {
4
4
  offsetTop?: number;
5
5
  };
@@ -3,7 +3,6 @@ import type { ADNode } from '@atlaskit/editor-common/validator';
3
3
  import type { EventHandlers } from '@atlaskit/editor-common/ui';
4
4
  import type { Transformer } from '@atlaskit/editor-common/types';
5
5
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
6
- import type { RendererAppearance } from './ui/Renderer/types';
7
6
  export type TransformerProvider<T> = (schema: Schema) => Transformer<T>;
8
7
  export declare class ADFEncoder<T> {
9
8
  encode: (value: T) => any;
@@ -11,7 +10,6 @@ export declare class ADFEncoder<T> {
11
10
  }
12
11
  export declare const getText: (node: PMNode | ADNode) => string;
13
12
  export declare const getEventHandler: (eventHandlers?: EventHandlers, type?: keyof EventHandlers, eventName?: string) => any;
14
- export declare const getPlatform: (rendererAppearance: RendererAppearance) => "web" | "mobile";
15
13
  /**
16
14
  * Traverse through parent elements of element. Return element for which evaluate(element) returns
17
15
  * true. If topElement is reached before evaluate returns true, return false. Does not run evaluate
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
1
5
  import { jsx } from '@emotion/react';
2
6
  import type { EventHandlers } from '@atlaskit/editor-common/ui';
3
7
  import type { RendererAppearance } from '../../ui/Renderer/types';
@@ -1,5 +1,6 @@
1
1
  import type { Schema } from '@atlaskit/editor-prosemirror/model';
2
2
  import { AddMarkStep } from '@atlaskit/editor-prosemirror/transform';
3
+ export declare function isRoot(element: HTMLElement | null): boolean;
3
4
  export declare function resolvePos(node: Node | null, offset: number, findEnd?: boolean): number | false;
4
5
  interface AnnotationStepOptions {
5
6
  schema: Schema;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export type RendererAppearance = 'comment' | 'full-page' | 'full-width' | 'mobile' | undefined;
2
+ export type RendererAppearance = 'comment' | 'full-page' | 'full-width' | undefined;
3
3
  export type StickyHeaderConfig = {
4
4
  offsetTop?: number;
5
5
  };
@@ -3,7 +3,6 @@ import type { ADNode } from '@atlaskit/editor-common/validator';
3
3
  import type { EventHandlers } from '@atlaskit/editor-common/ui';
4
4
  import type { Transformer } from '@atlaskit/editor-common/types';
5
5
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
6
- import type { RendererAppearance } from './ui/Renderer/types';
7
6
  export type TransformerProvider<T> = (schema: Schema) => Transformer<T>;
8
7
  export declare class ADFEncoder<T> {
9
8
  encode: (value: T) => any;
@@ -11,7 +10,6 @@ export declare class ADFEncoder<T> {
11
10
  }
12
11
  export declare const getText: (node: PMNode | ADNode) => string;
13
12
  export declare const getEventHandler: (eventHandlers?: EventHandlers, type?: keyof EventHandlers, eventName?: string) => any;
14
- export declare const getPlatform: (rendererAppearance: RendererAppearance) => "web" | "mobile";
15
13
  /**
16
14
  * Traverse through parent elements of element. Return element for which evaluate(element) returns
17
15
  * true. If topElement is reached before evaluate returns true, return false. Does not run evaluate
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "109.53.2",
3
+ "version": "110.0.0",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,7 +29,7 @@
29
29
  "@atlaskit/analytics-next": "^10.1.0",
30
30
  "@atlaskit/button": "^20.1.0",
31
31
  "@atlaskit/code": "^15.6.0",
32
- "@atlaskit/editor-common": "^88.13.0",
32
+ "@atlaskit/editor-common": "^89.0.0",
33
33
  "@atlaskit/editor-json-transformer": "^8.18.0",
34
34
  "@atlaskit/editor-palette": "1.6.0",
35
35
  "@atlaskit/editor-prosemirror": "5.0.1",
@@ -145,6 +145,9 @@
145
145
  },
146
146
  "platform-fix-table-ssr-resizing": {
147
147
  "type": "boolean"
148
+ },
149
+ "platform_editor_allow_annotation_triple_click": {
150
+ "type": "boolean"
148
151
  }
149
152
  },
150
153
  "af:exports": {