@atlaskit/editor-plugin-accessibility-utils 3.0.5 → 3.0.6
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-accessibility-utils
|
|
2
2
|
|
|
3
|
+
## 3.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`7c342b45b449f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7c342b45b449f) -
|
|
8
|
+
Cleanup platform_editor_usesharedpluginstateselector in accessibility, alignment
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 3.0.5
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -81,7 +81,8 @@ var accessibilityUtilsPlugin = exports.accessibilityUtilsPlugin = function acces
|
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
83
|
};
|
|
84
|
-
|
|
84
|
+
function ContentComponent(_ref2) {
|
|
85
|
+
var api = _ref2.api;
|
|
85
86
|
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['accessibilityUtils'], function (states) {
|
|
86
87
|
var _states$accessibility, _states$accessibility2, _states$accessibility3;
|
|
87
88
|
return {
|
|
@@ -93,26 +94,6 @@ var useAccessibilityUtilsPluginState = (0, _hooks.sharedPluginStateHookMigratorF
|
|
|
93
94
|
ariaLiveElementAttributes = _useSharedPluginState.ariaLiveElementAttributes,
|
|
94
95
|
key = _useSharedPluginState.key,
|
|
95
96
|
message = _useSharedPluginState.message;
|
|
96
|
-
return {
|
|
97
|
-
ariaLiveElementAttributes: ariaLiveElementAttributes,
|
|
98
|
-
key: key,
|
|
99
|
-
message: message
|
|
100
|
-
};
|
|
101
|
-
}, function (api) {
|
|
102
|
-
var _useSharedPluginState2 = (0, _hooks.useSharedPluginState)(api, ['accessibilityUtils']),
|
|
103
|
-
accessibilityUtilsState = _useSharedPluginState2.accessibilityUtilsState;
|
|
104
|
-
return {
|
|
105
|
-
ariaLiveElementAttributes: accessibilityUtilsState === null || accessibilityUtilsState === void 0 ? void 0 : accessibilityUtilsState.ariaLiveElementAttributes,
|
|
106
|
-
key: accessibilityUtilsState === null || accessibilityUtilsState === void 0 ? void 0 : accessibilityUtilsState.key,
|
|
107
|
-
message: accessibilityUtilsState === null || accessibilityUtilsState === void 0 ? void 0 : accessibilityUtilsState.message
|
|
108
|
-
};
|
|
109
|
-
});
|
|
110
|
-
function ContentComponent(_ref2) {
|
|
111
|
-
var api = _ref2.api;
|
|
112
|
-
var _useAccessibilityUtil = useAccessibilityUtilsPluginState(api),
|
|
113
|
-
ariaLiveElementAttributes = _useAccessibilityUtil.ariaLiveElementAttributes,
|
|
114
|
-
key = _useAccessibilityUtil.key,
|
|
115
|
-
message = _useAccessibilityUtil.message;
|
|
116
97
|
var role = (ariaLiveElementAttributes === null || ariaLiveElementAttributes === void 0 ? void 0 : ariaLiveElementAttributes.priority) === 'important' ? 'alert' : 'status';
|
|
117
98
|
return /*#__PURE__*/_react.default.createElement(_visuallyHidden.default, (0, _extends2.default)({
|
|
118
99
|
testId: 'accessibility-message-wrapper',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
4
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
@@ -73,7 +73,9 @@ export const accessibilityUtilsPlugin = ({
|
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
|
-
|
|
76
|
+
function ContentComponent({
|
|
77
|
+
api
|
|
78
|
+
}) {
|
|
77
79
|
const {
|
|
78
80
|
ariaLiveElementAttributes,
|
|
79
81
|
key,
|
|
@@ -86,29 +88,6 @@ const useAccessibilityUtilsPluginState = sharedPluginStateHookMigratorFactory(ap
|
|
|
86
88
|
message: (_states$accessibility3 = states.accessibilityUtilsState) === null || _states$accessibility3 === void 0 ? void 0 : _states$accessibility3.message
|
|
87
89
|
};
|
|
88
90
|
});
|
|
89
|
-
return {
|
|
90
|
-
ariaLiveElementAttributes,
|
|
91
|
-
key,
|
|
92
|
-
message
|
|
93
|
-
};
|
|
94
|
-
}, api => {
|
|
95
|
-
const {
|
|
96
|
-
accessibilityUtilsState
|
|
97
|
-
} = useSharedPluginState(api, ['accessibilityUtils']);
|
|
98
|
-
return {
|
|
99
|
-
ariaLiveElementAttributes: accessibilityUtilsState === null || accessibilityUtilsState === void 0 ? void 0 : accessibilityUtilsState.ariaLiveElementAttributes,
|
|
100
|
-
key: accessibilityUtilsState === null || accessibilityUtilsState === void 0 ? void 0 : accessibilityUtilsState.key,
|
|
101
|
-
message: accessibilityUtilsState === null || accessibilityUtilsState === void 0 ? void 0 : accessibilityUtilsState.message
|
|
102
|
-
};
|
|
103
|
-
});
|
|
104
|
-
function ContentComponent({
|
|
105
|
-
api
|
|
106
|
-
}) {
|
|
107
|
-
const {
|
|
108
|
-
ariaLiveElementAttributes,
|
|
109
|
-
key,
|
|
110
|
-
message
|
|
111
|
-
} = useAccessibilityUtilsPluginState(api);
|
|
112
91
|
const role = (ariaLiveElementAttributes === null || ariaLiveElementAttributes === void 0 ? void 0 : ariaLiveElementAttributes.priority) === 'important' ? 'alert' : 'status';
|
|
113
92
|
return /*#__PURE__*/React.createElement(VisuallyHidden, _extends({
|
|
114
93
|
testId: 'accessibility-message-wrapper',
|
|
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import {
|
|
6
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
7
7
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
8
8
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
9
9
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
@@ -74,7 +74,8 @@ export var accessibilityUtilsPlugin = function accessibilityUtilsPlugin(_ref) {
|
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
};
|
|
77
|
-
|
|
77
|
+
function ContentComponent(_ref2) {
|
|
78
|
+
var api = _ref2.api;
|
|
78
79
|
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['accessibilityUtils'], function (states) {
|
|
79
80
|
var _states$accessibility, _states$accessibility2, _states$accessibility3;
|
|
80
81
|
return {
|
|
@@ -86,26 +87,6 @@ var useAccessibilityUtilsPluginState = sharedPluginStateHookMigratorFactory(func
|
|
|
86
87
|
ariaLiveElementAttributes = _useSharedPluginState.ariaLiveElementAttributes,
|
|
87
88
|
key = _useSharedPluginState.key,
|
|
88
89
|
message = _useSharedPluginState.message;
|
|
89
|
-
return {
|
|
90
|
-
ariaLiveElementAttributes: ariaLiveElementAttributes,
|
|
91
|
-
key: key,
|
|
92
|
-
message: message
|
|
93
|
-
};
|
|
94
|
-
}, function (api) {
|
|
95
|
-
var _useSharedPluginState2 = useSharedPluginState(api, ['accessibilityUtils']),
|
|
96
|
-
accessibilityUtilsState = _useSharedPluginState2.accessibilityUtilsState;
|
|
97
|
-
return {
|
|
98
|
-
ariaLiveElementAttributes: accessibilityUtilsState === null || accessibilityUtilsState === void 0 ? void 0 : accessibilityUtilsState.ariaLiveElementAttributes,
|
|
99
|
-
key: accessibilityUtilsState === null || accessibilityUtilsState === void 0 ? void 0 : accessibilityUtilsState.key,
|
|
100
|
-
message: accessibilityUtilsState === null || accessibilityUtilsState === void 0 ? void 0 : accessibilityUtilsState.message
|
|
101
|
-
};
|
|
102
|
-
});
|
|
103
|
-
function ContentComponent(_ref2) {
|
|
104
|
-
var api = _ref2.api;
|
|
105
|
-
var _useAccessibilityUtil = useAccessibilityUtilsPluginState(api),
|
|
106
|
-
ariaLiveElementAttributes = _useAccessibilityUtil.ariaLiveElementAttributes,
|
|
107
|
-
key = _useAccessibilityUtil.key,
|
|
108
|
-
message = _useAccessibilityUtil.message;
|
|
109
90
|
var role = (ariaLiveElementAttributes === null || ariaLiveElementAttributes === void 0 ? void 0 : ariaLiveElementAttributes.priority) === 'important' ? 'alert' : 'status';
|
|
110
91
|
return /*#__PURE__*/React.createElement(VisuallyHidden, _extends({
|
|
111
92
|
testId: 'accessibility-message-wrapper',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-accessibility-utils",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.6",
|
|
4
4
|
"description": "Accessibility utils for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -26,17 +26,14 @@
|
|
|
26
26
|
},
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"atlaskit:src": "src/index.ts",
|
|
29
|
-
"af:exports": {
|
|
30
|
-
".": "./src/index.ts"
|
|
31
|
-
},
|
|
32
29
|
"dependencies": {
|
|
33
30
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
34
|
-
"@atlaskit/tmp-editor-statsig": "^11.
|
|
31
|
+
"@atlaskit/tmp-editor-statsig": "^11.11.0",
|
|
35
32
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
36
33
|
"@babel/runtime": "^7.0.0"
|
|
37
34
|
},
|
|
38
35
|
"peerDependencies": {
|
|
39
|
-
"@atlaskit/editor-common": "^107.
|
|
36
|
+
"@atlaskit/editor-common": "^107.34.0",
|
|
40
37
|
"react": "^18.2.0",
|
|
41
38
|
"react-dom": "^18.2.0"
|
|
42
39
|
},
|