@atlaskit/editor-plugin-table 15.4.23 → 15.4.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 15.4.24
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e51da6f828fe9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e51da6f828fe9) -
8
+ Exclude Safari due to contenteditable in sticky positioned table header bug
9
+ - Updated dependencies
10
+
3
11
  ## 15.4.23
4
12
 
5
13
  ### Patch Changes
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.tableView = exports.tableRowView = exports.tableHeaderView = exports.tableCellView = void 0;
8
8
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
9
- var _anchor = require("../pm-plugins/utils/anchor");
9
+ var _stickyHeader = require("../pm-plugins/utils/sticky-header");
10
10
  var _table = require("./table");
11
11
  var _TableCell = _interopRequireDefault(require("./TableCell"));
12
12
  var _TableRow = _interopRequireDefault(require("./TableRow"));
@@ -32,7 +32,8 @@ var tableHeaderView = exports.tableHeaderView = function tableHeaderView(options
32
32
  };
33
33
  var tableRowView = exports.tableRowView = function tableRowView(options) {
34
34
  return function (node, view, getPos) {
35
- if ((0, _anchor.isAnchorSupported)() && options.isDragAndDropEnabled && (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow')) {
35
+ var _options$isDragAndDro;
36
+ if ((0, _stickyHeader.isNativeStickySupported)((_options$isDragAndDro = options.isDragAndDropEnabled) !== null && _options$isDragAndDro !== void 0 ? _options$isDragAndDro : false) && (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow')) {
36
37
  return new _TableRowNativeStickyWithFallback.default(node, view, getPos, options.eventDispatcher, options.pluginInjectionApi);
37
38
  } else {
38
39
  return new _TableRow.default(node, view, getPos, options.eventDispatcher, options.pluginInjectionApi);
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.isNativeStickySupported = exports.isAnchorSupported = void 0;
8
+ var _memoizeOne = _interopRequireDefault(require("memoize-one"));
9
+ var _browser = require("@atlaskit/editor-common/browser");
10
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
11
+ var isAnchorSupported = exports.isAnchorSupported = (0, _memoizeOne.default)(function () {
12
+ if (window.CSS && window.CSS.supports) {
13
+ return window.CSS.supports('anchor-name: --anchor');
14
+ }
15
+ return false;
16
+ });
17
+ var isNativeStickySupported = exports.isNativeStickySupported = function isNativeStickySupported(isDragAndDropEnabled) {
18
+ var safariVersion = (0, _browser.getBrowserInfo)().safari_version;
19
+ var isBrowserSafari = !Number.isNaN(safariVersion);
20
+ return (
21
+ // Safari has a bug with position: sticky and content editable, so we don't support it
22
+ !isBrowserSafari && isAnchorSupported() && isDragAndDropEnabled && (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true)
23
+ );
24
+ };
@@ -20,7 +20,7 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
20
20
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/migration/chevron-down"));
21
21
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
22
22
  var _commands = require("../../pm-plugins/commands");
23
- var _anchor = require("../../pm-plugins/utils/anchor");
23
+ var _stickyHeader = require("../../pm-plugins/utils/sticky-header");
24
24
  var _types = require("../../types");
25
25
  var _FixedButton = _interopRequireDefault(require("./FixedButton"));
26
26
  var _styles = require("./styles");
@@ -104,7 +104,7 @@ var FloatingContextualButtonInner = /*#__PURE__*/_react.default.memo(function (p
104
104
  }));
105
105
  var parentSticky = targetCellRef.parentElement && targetCellRef.parentElement.className.indexOf('sticky') > -1;
106
106
  var parentStickyNative = targetCellRef.parentElement && targetCellRef.parentElement.classList.contains(_types.TableCssClassName.NATIVE_STICKY);
107
- if ((0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && (0, _anchor.isAnchorSupported)() && targetCellRef.nodeName === 'TH' && parentStickyNative && isDragAndDropEnabled) {
107
+ if (parentStickyNative && targetCellRef.nodeName === 'TH' && (0, _stickyHeader.isNativeStickySupported)(isDragAndDropEnabled !== null && isDragAndDropEnabled !== void 0 ? isDragAndDropEnabled : false) && (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow')) {
108
108
  var _targetCellRef$datase, _targetCellRef$parent, _targetCellRef$parent2;
109
109
  var anchorName = (_targetCellRef$datase = targetCellRef.dataset.nodeAnchor) !== null && _targetCellRef$datase !== void 0 ? _targetCellRef$datase : '';
110
110
  var rowAnchorName = (_targetCellRef$parent = (_targetCellRef$parent2 = targetCellRef.parentElement) === null || _targetCellRef$parent2 === void 0 ? void 0 : _targetCellRef$parent2.dataset.nodeAnchor) !== null && _targetCellRef$parent !== void 0 ? _targetCellRef$parent : '';
@@ -10,10 +10,10 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
12
12
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
- var _anchor = require("../../pm-plugins/utils/anchor");
14
13
  var _columnControls = require("../../pm-plugins/utils/column-controls");
15
14
  var _nodes = require("../../pm-plugins/utils/nodes");
16
15
  var _rowControls = require("../../pm-plugins/utils/row-controls");
16
+ var _stickyHeader = require("../../pm-plugins/utils/sticky-header");
17
17
  var _types = require("../../types");
18
18
  var _ColumnControls = require("./ColumnControls");
19
19
  var _ColumnDropTargets = require("./ColumnDropTargets");
@@ -84,7 +84,7 @@ var TableFloatingColumnControls = function TableFloatingColumnControls(_ref) {
84
84
  containerRef === null || containerRef === void 0 || (_containerRef$current2 = containerRef.current) === null || _containerRef$current2 === void 0 || _containerRef$current2.style.removeProperty('top');
85
85
  }
86
86
  var anchorStyles = {};
87
- if ((0, _anchor.isAnchorSupported)() && isDragAndDropEnabled && (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow')) {
87
+ if ((0, _stickyHeader.isNativeStickySupported)(isDragAndDropEnabled !== null && isDragAndDropEnabled !== void 0 ? isDragAndDropEnabled : false) && (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow')) {
88
88
  var _tableRef$querySelect;
89
89
  // cast here is due to CSSProperties missing valid positionAnchor property
90
90
  anchorStyles = {
@@ -1,5 +1,5 @@
1
1
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
2
- import { isAnchorSupported } from '../pm-plugins/utils/anchor';
2
+ import { isNativeStickySupported } from '../pm-plugins/utils/sticky-header';
3
3
  // TODO: ED-23976 - Clean up
4
4
  import { createTableView } from './table';
5
5
  import TableCell from './TableCell';
@@ -24,7 +24,8 @@ export const tableHeaderView = options => {
24
24
  };
25
25
  export const tableRowView = options => {
26
26
  return (node, view, getPos) => {
27
- if (isAnchorSupported() && options.isDragAndDropEnabled && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow')) {
27
+ var _options$isDragAndDro;
28
+ if (isNativeStickySupported((_options$isDragAndDro = options.isDragAndDropEnabled) !== null && _options$isDragAndDro !== void 0 ? _options$isDragAndDro : false) && expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow')) {
28
29
  return new TableRowNativeStickyWithFallback(node, view, getPos, options.eventDispatcher, options.pluginInjectionApi);
29
30
  } else {
30
31
  return new TableRow(node, view, getPos, options.eventDispatcher, options.pluginInjectionApi);
@@ -0,0 +1,17 @@
1
+ import memorizeOne from 'memoize-one';
2
+ import { getBrowserInfo } from '@atlaskit/editor-common/browser';
3
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
+ export const isAnchorSupported = memorizeOne(() => {
5
+ if (window.CSS && window.CSS.supports) {
6
+ return window.CSS.supports('anchor-name: --anchor');
7
+ }
8
+ return false;
9
+ });
10
+ export const isNativeStickySupported = isDragAndDropEnabled => {
11
+ const safariVersion = getBrowserInfo().safari_version;
12
+ const isBrowserSafari = !Number.isNaN(safariVersion);
13
+ return (
14
+ // Safari has a bug with position: sticky and content editable, so we don't support it
15
+ !isBrowserSafari && isAnchorSupported() && isDragAndDropEnabled && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)
16
+ );
17
+ };
@@ -18,7 +18,7 @@ import { akEditorSmallZIndex } from '@atlaskit/editor-shared-styles';
18
18
  import ExpandIcon from '@atlaskit/icon/core/migration/chevron-down';
19
19
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
20
20
  import { toggleContextualMenu } from '../../pm-plugins/commands';
21
- import { isAnchorSupported } from '../../pm-plugins/utils/anchor';
21
+ import { isNativeStickySupported } from '../../pm-plugins/utils/sticky-header';
22
22
  import { TableCssClassName as ClassName } from '../../types';
23
23
 
24
24
  // Ignored via go/ees005
@@ -102,7 +102,7 @@ const FloatingContextualButtonInner = /*#__PURE__*/React.memo(props => {
102
102
  }));
103
103
  const parentSticky = targetCellRef.parentElement && targetCellRef.parentElement.className.indexOf('sticky') > -1;
104
104
  const parentStickyNative = targetCellRef.parentElement && targetCellRef.parentElement.classList.contains(ClassName.NATIVE_STICKY);
105
- if (expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && isAnchorSupported() && targetCellRef.nodeName === 'TH' && parentStickyNative && isDragAndDropEnabled) {
105
+ if (parentStickyNative && targetCellRef.nodeName === 'TH' && isNativeStickySupported(isDragAndDropEnabled !== null && isDragAndDropEnabled !== void 0 ? isDragAndDropEnabled : false) && expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow')) {
106
106
  var _targetCellRef$datase, _targetCellRef$parent, _targetCellRef$parent2;
107
107
  const anchorName = (_targetCellRef$datase = targetCellRef.dataset.nodeAnchor) !== null && _targetCellRef$datase !== void 0 ? _targetCellRef$datase : '';
108
108
  const rowAnchorName = (_targetCellRef$parent = (_targetCellRef$parent2 = targetCellRef.parentElement) === null || _targetCellRef$parent2 === void 0 ? void 0 : _targetCellRef$parent2.dataset.nodeAnchor) !== null && _targetCellRef$parent !== void 0 ? _targetCellRef$parent : '';
@@ -1,10 +1,10 @@
1
1
  import React, { useEffect, useMemo, useRef, useState } from 'react';
2
2
  import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
3
3
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
- import { isAnchorSupported } from '../../pm-plugins/utils/anchor';
5
4
  import { getColumnsWidths } from '../../pm-plugins/utils/column-controls';
6
5
  import { containsHeaderColumn } from '../../pm-plugins/utils/nodes';
7
6
  import { getRowHeights } from '../../pm-plugins/utils/row-controls';
7
+ import { isNativeStickySupported } from '../../pm-plugins/utils/sticky-header';
8
8
  import { TableCssClassName as ClassName } from '../../types';
9
9
  import { ColumnControls } from './ColumnControls';
10
10
  import { ColumnDropTargets } from './ColumnDropTargets';
@@ -74,7 +74,7 @@ const TableFloatingColumnControls = ({
74
74
  containerRef === null || containerRef === void 0 ? void 0 : (_containerRef$current2 = containerRef.current) === null || _containerRef$current2 === void 0 ? void 0 : _containerRef$current2.style.removeProperty('top');
75
75
  }
76
76
  let anchorStyles = {};
77
- if (isAnchorSupported() && isDragAndDropEnabled && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow')) {
77
+ if (isNativeStickySupported(isDragAndDropEnabled !== null && isDragAndDropEnabled !== void 0 ? isDragAndDropEnabled : false) && expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow')) {
78
78
  var _tableRef$querySelect;
79
79
  // cast here is due to CSSProperties missing valid positionAnchor property
80
80
  anchorStyles = {
@@ -1,5 +1,5 @@
1
1
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
2
- import { isAnchorSupported } from '../pm-plugins/utils/anchor';
2
+ import { isNativeStickySupported } from '../pm-plugins/utils/sticky-header';
3
3
  // TODO: ED-23976 - Clean up
4
4
  import { createTableView } from './table';
5
5
  import TableCell from './TableCell';
@@ -24,7 +24,8 @@ export var tableHeaderView = function tableHeaderView(options) {
24
24
  };
25
25
  export var tableRowView = function tableRowView(options) {
26
26
  return function (node, view, getPos) {
27
- if (isAnchorSupported() && options.isDragAndDropEnabled && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow')) {
27
+ var _options$isDragAndDro;
28
+ if (isNativeStickySupported((_options$isDragAndDro = options.isDragAndDropEnabled) !== null && _options$isDragAndDro !== void 0 ? _options$isDragAndDro : false) && expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow')) {
28
29
  return new TableRowNativeStickyWithFallback(node, view, getPos, options.eventDispatcher, options.pluginInjectionApi);
29
30
  } else {
30
31
  return new TableRow(node, view, getPos, options.eventDispatcher, options.pluginInjectionApi);
@@ -0,0 +1,17 @@
1
+ import memorizeOne from 'memoize-one';
2
+ import { getBrowserInfo } from '@atlaskit/editor-common/browser';
3
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
+ export var isAnchorSupported = memorizeOne(function () {
5
+ if (window.CSS && window.CSS.supports) {
6
+ return window.CSS.supports('anchor-name: --anchor');
7
+ }
8
+ return false;
9
+ });
10
+ export var isNativeStickySupported = function isNativeStickySupported(isDragAndDropEnabled) {
11
+ var safariVersion = getBrowserInfo().safari_version;
12
+ var isBrowserSafari = !Number.isNaN(safariVersion);
13
+ return (
14
+ // Safari has a bug with position: sticky and content editable, so we don't support it
15
+ !isBrowserSafari && isAnchorSupported() && isDragAndDropEnabled && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)
16
+ );
17
+ };
@@ -18,7 +18,7 @@ import { akEditorSmallZIndex } from '@atlaskit/editor-shared-styles';
18
18
  import ExpandIcon from '@atlaskit/icon/core/migration/chevron-down';
19
19
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
20
20
  import { toggleContextualMenu } from '../../pm-plugins/commands';
21
- import { isAnchorSupported } from '../../pm-plugins/utils/anchor';
21
+ import { isNativeStickySupported } from '../../pm-plugins/utils/sticky-header';
22
22
  import { TableCssClassName as ClassName } from '../../types';
23
23
 
24
24
  // Ignored via go/ees005
@@ -94,7 +94,7 @@ var FloatingContextualButtonInner = /*#__PURE__*/React.memo(function (props) {
94
94
  }));
95
95
  var parentSticky = targetCellRef.parentElement && targetCellRef.parentElement.className.indexOf('sticky') > -1;
96
96
  var parentStickyNative = targetCellRef.parentElement && targetCellRef.parentElement.classList.contains(ClassName.NATIVE_STICKY);
97
- if (expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && isAnchorSupported() && targetCellRef.nodeName === 'TH' && parentStickyNative && isDragAndDropEnabled) {
97
+ if (parentStickyNative && targetCellRef.nodeName === 'TH' && isNativeStickySupported(isDragAndDropEnabled !== null && isDragAndDropEnabled !== void 0 ? isDragAndDropEnabled : false) && expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow')) {
98
98
  var _targetCellRef$datase, _targetCellRef$parent, _targetCellRef$parent2;
99
99
  var anchorName = (_targetCellRef$datase = targetCellRef.dataset.nodeAnchor) !== null && _targetCellRef$datase !== void 0 ? _targetCellRef$datase : '';
100
100
  var rowAnchorName = (_targetCellRef$parent = (_targetCellRef$parent2 = targetCellRef.parentElement) === null || _targetCellRef$parent2 === void 0 ? void 0 : _targetCellRef$parent2.dataset.nodeAnchor) !== null && _targetCellRef$parent !== void 0 ? _targetCellRef$parent : '';
@@ -2,10 +2,10 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import React, { useEffect, useMemo, useRef, useState } from 'react';
3
3
  import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
4
4
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
- import { isAnchorSupported } from '../../pm-plugins/utils/anchor';
6
5
  import { getColumnsWidths } from '../../pm-plugins/utils/column-controls';
7
6
  import { containsHeaderColumn } from '../../pm-plugins/utils/nodes';
8
7
  import { getRowHeights } from '../../pm-plugins/utils/row-controls';
8
+ import { isNativeStickySupported } from '../../pm-plugins/utils/sticky-header';
9
9
  import { TableCssClassName as ClassName } from '../../types';
10
10
  import { ColumnControls } from './ColumnControls';
11
11
  import { ColumnDropTargets } from './ColumnDropTargets';
@@ -75,7 +75,7 @@ var TableFloatingColumnControls = function TableFloatingColumnControls(_ref) {
75
75
  containerRef === null || containerRef === void 0 || (_containerRef$current2 = containerRef.current) === null || _containerRef$current2 === void 0 || _containerRef$current2.style.removeProperty('top');
76
76
  }
77
77
  var anchorStyles = {};
78
- if (isAnchorSupported() && isDragAndDropEnabled && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow')) {
78
+ if (isNativeStickySupported(isDragAndDropEnabled !== null && isDragAndDropEnabled !== void 0 ? isDragAndDropEnabled : false) && expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow')) {
79
79
  var _tableRef$querySelect;
80
80
  // cast here is due to CSSProperties missing valid positionAnchor property
81
81
  anchorStyles = {
@@ -0,0 +1,2 @@
1
+ export declare const isAnchorSupported: import("memoize-one").MemoizedFn<() => boolean>;
2
+ export declare const isNativeStickySupported: (isDragAndDropEnabled: boolean) => boolean;
@@ -0,0 +1,2 @@
1
+ export declare const isAnchorSupported: import("memoize-one").MemoizedFn<() => boolean>;
2
+ export declare const isNativeStickySupported: (isDragAndDropEnabled: boolean) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "15.4.23",
3
+ "version": "15.4.24",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -1,14 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.isAnchorSupported = void 0;
8
- var _memoizeOne = _interopRequireDefault(require("memoize-one"));
9
- var isAnchorSupported = exports.isAnchorSupported = (0, _memoizeOne.default)(function () {
10
- if (window.CSS && window.CSS.supports) {
11
- return window.CSS.supports('anchor-name: --anchor');
12
- }
13
- return false;
14
- });
@@ -1,7 +0,0 @@
1
- import memorizeOne from 'memoize-one';
2
- export const isAnchorSupported = memorizeOne(() => {
3
- if (window.CSS && window.CSS.supports) {
4
- return window.CSS.supports('anchor-name: --anchor');
5
- }
6
- return false;
7
- });
@@ -1,7 +0,0 @@
1
- import memorizeOne from 'memoize-one';
2
- export var isAnchorSupported = memorizeOne(function () {
3
- if (window.CSS && window.CSS.supports) {
4
- return window.CSS.supports('anchor-name: --anchor');
5
- }
6
- return false;
7
- });
@@ -1 +0,0 @@
1
- export declare const isAnchorSupported: import("memoize-one").MemoizedFn<() => boolean>;
@@ -1 +0,0 @@
1
- export declare const isAnchorSupported: import("memoize-one").MemoizedFn<() => boolean>;