react-native-a11y-order 0.7.1 → 0.7.2
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/ios/extensions/UIView+RNAOA11yOrder.mm +13 -3
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +14 -2
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +8 -2
- package/lib/module/index.web.js.map +1 -1
- package/lib/typescript/src/components/A11yView/A11yView.d.ts +1 -1
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/index.web.d.ts +12 -3
- package/lib/typescript/src/index.web.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/index.web.ts +24 -2
|
@@ -17,21 +17,31 @@
|
|
|
17
17
|
#import <React/RCTView.h>
|
|
18
18
|
#endif
|
|
19
19
|
|
|
20
|
+
@interface RNAOWeakWrapper : NSObject
|
|
21
|
+
@property (nonatomic, weak) id value;
|
|
22
|
+
@end
|
|
23
|
+
|
|
24
|
+
@implementation RNAOWeakWrapper
|
|
25
|
+
@end
|
|
26
|
+
|
|
20
27
|
static char kRNAOScreenReaderFocusDelegate;
|
|
21
28
|
|
|
22
29
|
@implementation UIView (RNAOA11yOrder)
|
|
23
30
|
|
|
24
31
|
- (void)setScreenReaderFocusDelegate:(id<RNAOScreenReaderFocusDelegate>)focusDelegate {
|
|
25
|
-
|
|
32
|
+
RNAOWeakWrapper *weakDelegate = [[RNAOWeakWrapper alloc] init];
|
|
33
|
+
[weakDelegate setValue: focusDelegate];
|
|
34
|
+
objc_setAssociatedObject(self, &kRNAOScreenReaderFocusDelegate, weakDelegate, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
|
26
35
|
}
|
|
27
36
|
|
|
28
37
|
- (void)clearScreenReaderFocusDelegate {
|
|
29
|
-
objc_setAssociatedObject(self, &kRNAOScreenReaderFocusDelegate, nil,
|
|
38
|
+
objc_setAssociatedObject(self, &kRNAOScreenReaderFocusDelegate, nil, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
|
30
39
|
}
|
|
31
40
|
|
|
32
41
|
- (id<RNAOScreenReaderFocusDelegate>)getScreenReaderFocusDelegate {
|
|
33
42
|
@try {
|
|
34
|
-
|
|
43
|
+
RNAOWeakWrapper *wrapper = objc_getAssociatedObject(self, &kRNAOScreenReaderFocusDelegate);
|
|
44
|
+
return wrapper ? wrapper.value : nil;
|
|
35
45
|
} @catch (NSException *exception) {
|
|
36
46
|
return nil;
|
|
37
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_A11yIndex","require","_A11ySequence","_A11yGroup","_A11yUIContainer","_A11yPaneTitle","_A11yView","_A11yFocusFrame","_A11yFocusTrap","_A11yAnnounceModule","A11y","exports","Order","A11yIndexSequence","Index","A11yIndex","Group","A11yGroup","Container","A11yUIContainer","PaneTitle","A11yPaneTitle","ScreenChange","A11yScreenChange","View","A11yView","FocusFrame","A11yFocusFrame","FocusTrap","A11yFocusTrap"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AAIA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AACA,IAAAO,cAAA,GAAAP,OAAA;
|
|
1
|
+
{"version":3,"names":["_A11yIndex","require","_A11ySequence","_A11yGroup","_A11yUIContainer","_A11yPaneTitle","_A11yView","_A11yFocusFrame","_A11yFocusTrap","_A11yAnnounceModule","A11y","exports","Order","A11yIndexSequence","Index","A11yIndex","Group","A11yGroup","Container","A11yUIContainer","PaneTitle","A11yPaneTitle","ScreenChange","A11yScreenChange","View","A11yView","FocusFrame","A11yFocusFrame","FocusTrap","A11yFocusTrap"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AAIA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AACA,IAAAO,cAAA,GAAAP,OAAA;AA+BA,IAAAQ,mBAAA,GAAAR,OAAA;AAZO,MAAMS,IAAI,GAAAC,OAAA,CAAAD,IAAA,GAAG;EAClBE,KAAK,EAAEC,+BAAiB;EACxBC,KAAK,EAAEC,oBAAS;EAChBC,KAAK,EAAEC,oBAAS;EAChBC,SAAS,EAAEC,gCAAe;EAC1BC,SAAS,EAAEC,4BAAa;EACxBC,YAAY,EAAEC,+BAAgB;EAC9BC,IAAI,EAAEC,kBAAQ;EACdC,UAAU,EAAEC,8BAAc;EAC1BC,SAAS,EAAEC;AACb,CAAC","ignoreList":[]}
|
|
@@ -4,12 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.A11y = void 0;
|
|
7
|
+
Object.defineProperty(exports, "A11yModule", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _A11yAnnounceModule.A11yModule;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _A11yIndex = require("./components/A11yIndex/A11yIndex");
|
|
7
14
|
var _reactNative = require("react-native");
|
|
8
|
-
var
|
|
15
|
+
var _A11yAnnounceModule = require("./modules/A11yAnnounceModule");
|
|
9
16
|
const A11y = exports.A11y = {
|
|
10
17
|
Order: _reactNative.View,
|
|
11
18
|
Group: _reactNative.View,
|
|
12
19
|
Index: _A11yIndex.A11yIndex,
|
|
13
|
-
Container: _reactNative.View
|
|
20
|
+
Container: _reactNative.View,
|
|
21
|
+
PaneTitle: _reactNative.View,
|
|
22
|
+
ScreenChange: _reactNative.View,
|
|
23
|
+
View: _reactNative.View,
|
|
24
|
+
FocusFrame: _reactNative.View,
|
|
25
|
+
FocusTrap: _reactNative.View
|
|
14
26
|
};
|
|
15
27
|
//# sourceMappingURL=index.web.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_A11yIndex","require","_reactNative","_A11yAnnounceModule","A11y","exports","Order","View","Group","Index","A11yIndex","Container","PaneTitle","ScreenChange","FocusFrame","FocusTrap"],"sourceRoot":"../../src","sources":["index.web.ts"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AA+BA,IAAAE,mBAAA,GAAAF,OAAA;AAZO,MAAMG,IAAI,GAAAC,OAAA,CAAAD,IAAA,GAAG;EAClBE,KAAK,EAAEC,iBAAI;EACXC,KAAK,EAAED,iBAAI;EACXE,KAAK,EAAEC,oBAAS;EAChBC,SAAS,EAAEJ,iBAAI;EACfK,SAAS,EAAEL,iBAAI;EACfM,YAAY,EAAEN,iBAAI;EAClBA,IAAI,EAAEA,iBAAI;EACVO,UAAU,EAAEP,iBAAI;EAChBQ,SAAS,EAAER;AACb,CAAC","ignoreList":[]}
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["A11yIndex","A11yIndexSequence","A11yGroup","A11yUIContainer","A11yPaneTitle","A11yScreenChange","A11yView","A11yFocusFrame","A11yFocusTrap","A11y","Order","Index","Group","Container","PaneTitle","ScreenChange","View","FocusFrame","FocusTrap","A11yModule"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"AAAA,SAASA,SAAS,QAAQ,kCAAkC;AAC5D,SAASC,iBAAiB,QAAQ,wCAAwC;AAC1E,SAASC,SAAS,QAAQ,kCAAkC;AAC5D,SAASC,eAAe,QAAQ,8CAA8C;AAC9E,SACEC,aAAa,EACbC,gBAAgB,QACX,0CAA0C;AACjD,SAASC,QAAQ,QAAQ,gCAAgC;AACzD,SAASC,cAAc,QAAQ,qDAAqD;AACpF,SAASC,aAAa,QAAQ,mDAAmD;
|
|
1
|
+
{"version":3,"names":["A11yIndex","A11yIndexSequence","A11yGroup","A11yUIContainer","A11yPaneTitle","A11yScreenChange","A11yView","A11yFocusFrame","A11yFocusTrap","A11y","Order","Index","Group","Container","PaneTitle","ScreenChange","View","FocusFrame","FocusTrap","A11yModule"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"AAAA,SAASA,SAAS,QAAQ,kCAAkC;AAC5D,SAASC,iBAAiB,QAAQ,wCAAwC;AAC1E,SAASC,SAAS,QAAQ,kCAAkC;AAC5D,SAASC,eAAe,QAAQ,8CAA8C;AAC9E,SACEC,aAAa,EACbC,gBAAgB,QACX,0CAA0C;AACjD,SAASC,QAAQ,QAAQ,gCAAgC;AACzD,SAASC,cAAc,QAAQ,qDAAqD;AACpF,SAASC,aAAa,QAAQ,mDAAmD;AAmBjF,OAAO,MAAMC,IAAI,GAAG;EAClBC,KAAK,EAAET,iBAAiB;EACxBU,KAAK,EAAEX,SAAS;EAChBY,KAAK,EAAEV,SAAS;EAChBW,SAAS,EAAEV,eAAe;EAC1BW,SAAS,EAAEV,aAAa;EACxBW,YAAY,EAAEV,gBAAgB;EAC9BW,IAAI,EAAEV,QAAQ;EACdW,UAAU,EAAEV,cAAc;EAC1BW,SAAS,EAAEV;AACb,CAAC;AAED,SAASW,UAAU,QAAQ,8BAA8B","ignoreList":[]}
|
package/lib/module/index.web.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
import { A11yIndex } from './components/A11yIndex/A11yIndex';
|
|
1
2
|
import { View } from 'react-native';
|
|
2
|
-
import { A11yIndex } from './components/A11yIndex/A11yIndex.web';
|
|
3
3
|
export const A11y = {
|
|
4
4
|
Order: View,
|
|
5
5
|
Group: View,
|
|
6
6
|
Index: A11yIndex,
|
|
7
|
-
Container: View
|
|
7
|
+
Container: View,
|
|
8
|
+
PaneTitle: View,
|
|
9
|
+
ScreenChange: View,
|
|
10
|
+
View: View,
|
|
11
|
+
FocusFrame: View,
|
|
12
|
+
FocusTrap: View
|
|
8
13
|
};
|
|
14
|
+
export { A11yModule } from './modules/A11yAnnounceModule';
|
|
9
15
|
//# sourceMappingURL=index.web.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["A11yIndex","View","A11y","Order","Group","Index","Container","PaneTitle","ScreenChange","FocusFrame","FocusTrap","A11yModule"],"sourceRoot":"../../src","sources":["index.web.ts"],"mappings":"AAAA,SAASA,SAAS,QAAQ,kCAAkC;AAC5D,SAASC,IAAI,QAAQ,cAAc;AAmBnC,OAAO,MAAMC,IAAI,GAAG;EAClBC,KAAK,EAAEF,IAAI;EACXG,KAAK,EAAEH,IAAI;EACXI,KAAK,EAAEL,SAAS;EAChBM,SAAS,EAAEL,IAAI;EACfM,SAAS,EAAEN,IAAI;EACfO,YAAY,EAAEP,IAAI;EAClBA,IAAI,EAAEA,IAAI;EACVQ,UAAU,EAAER,IAAI;EAChBS,SAAS,EAAET;AACb,CAAC;AAED,SAASU,UAAU,QAAQ,8BAA8B","ignoreList":[]}
|
|
@@ -6,6 +6,6 @@ export declare const A11yView: React.MemoExoticComponent<React.ForwardRefExoticC
|
|
|
6
6
|
onScreenReaderSubViewFocusChange?: (isFocused: boolean) => void;
|
|
7
7
|
onScreenReaderSubViewFocused?: () => void;
|
|
8
8
|
onScreenReaderSubViewBlurred?: () => void;
|
|
9
|
-
onScreenReaderDescendantFocusChanged?: (e: import("
|
|
9
|
+
onScreenReaderDescendantFocusChanged?: (e: import("../..").ScreenReaderDescendantFocusChangedEvent) => void;
|
|
10
10
|
} & React.RefAttributes<View>>>;
|
|
11
11
|
//# sourceMappingURL=A11yView.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type { IndexCommands, A11yOrderType, A11yOrderTypeEnum, A11yIndexProps, } from './types/A11yIndex.types';
|
|
2
2
|
export type { A11yContainerTypeEnum, A11yUIContainerType, A11yUIContainerProps, } from './types/A11yUIContainerView.types';
|
|
3
|
+
export type { ScreenReaderDescendantFocusChangedEvent } from './types/A11yView.types';
|
|
3
4
|
export type { A11yViewProps } from './types/A11yView.types';
|
|
4
5
|
export declare const A11y: {
|
|
5
6
|
Order: import("react").NamedExoticComponent<import("react-native").ViewProps>;
|
|
@@ -37,7 +38,7 @@ export declare const A11y: {
|
|
|
37
38
|
onScreenReaderSubViewFocusChange?: (isFocused: boolean) => void;
|
|
38
39
|
onScreenReaderSubViewFocused?: () => void;
|
|
39
40
|
onScreenReaderSubViewBlurred?: () => void;
|
|
40
|
-
onScreenReaderDescendantFocusChanged?: (e: import("
|
|
41
|
+
onScreenReaderDescendantFocusChanged?: (e: import(".").ScreenReaderDescendantFocusChangedEvent) => void;
|
|
41
42
|
} & import("react").RefAttributes<import("react-native").View>>>;
|
|
42
43
|
FocusFrame: (props: import("react-native").ViewProps) => import("react").JSX.Element;
|
|
43
44
|
FocusTrap: (props: import("./types/A11yLock.types").A11yLockProps) => import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAYA,YAAY,EACV,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,cAAc,GACf,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EACV,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,mCAAmC,CAAC;AAE3C,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUhB,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAYA,YAAY,EACV,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,cAAc,GACf,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EACV,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,mCAAmC,CAAC;AAE3C,YAAY,EAAE,uCAAuC,EAAE,MAAM,wBAAwB,CAAC;AAEtF,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUhB,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
import { View } from 'react-native';
|
|
2
|
-
export type { IndexCommands } from './types/A11yIndex.types';
|
|
2
|
+
export type { IndexCommands, A11yOrderType, A11yOrderTypeEnum, A11yIndexProps, } from './types/A11yIndex.types';
|
|
3
|
+
export type { A11yContainerTypeEnum, A11yUIContainerType, A11yUIContainerProps, } from './types/A11yUIContainerView.types';
|
|
4
|
+
export type { ScreenReaderDescendantFocusChangedEvent } from './types/A11yView.types';
|
|
5
|
+
export type { A11yViewProps } from './types/A11yView.types';
|
|
3
6
|
export declare const A11y: {
|
|
4
7
|
Order: typeof View;
|
|
5
8
|
Group: typeof View;
|
|
6
|
-
Index: import("react").ForwardRefExoticComponent<{
|
|
9
|
+
Index: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<{
|
|
7
10
|
children: React.ReactNode;
|
|
8
11
|
index: number;
|
|
9
12
|
orderType?: import(".").A11yOrderType;
|
|
10
13
|
onScreenReaderSubViewFocusChange?: (isFocused: boolean) => void;
|
|
11
14
|
onScreenReaderSubViewFocused?: () => void;
|
|
12
15
|
onScreenReaderSubViewBlurred?: () => void;
|
|
13
|
-
} & import("react-native").ViewProps & import("react").RefAttributes<import(".").IndexCommands
|
|
16
|
+
} & import("react-native").ViewProps & import("react").RefAttributes<import(".").IndexCommands>>>;
|
|
14
17
|
Container: typeof View;
|
|
18
|
+
PaneTitle: typeof View;
|
|
19
|
+
ScreenChange: typeof View;
|
|
20
|
+
View: typeof View;
|
|
21
|
+
FocusFrame: typeof View;
|
|
22
|
+
FocusTrap: typeof View;
|
|
15
23
|
};
|
|
24
|
+
export { A11yModule } from './modules/A11yAnnounceModule';
|
|
16
25
|
//# sourceMappingURL=index.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,YAAY,EACV,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,cAAc,GACf,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EACV,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,mCAAmC,CAAC;AAE3C,YAAY,EAAE,uCAAuC,EAAE,MAAM,wBAAwB,CAAC;AAEtF,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;CAUhB,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -23,6 +23,8 @@ export type {
|
|
|
23
23
|
A11yUIContainerProps,
|
|
24
24
|
} from './types/A11yUIContainerView.types';
|
|
25
25
|
|
|
26
|
+
export type { ScreenReaderDescendantFocusChangedEvent } from './types/A11yView.types';
|
|
27
|
+
|
|
26
28
|
export type { A11yViewProps } from './types/A11yView.types';
|
|
27
29
|
|
|
28
30
|
export const A11y = {
|
package/src/index.web.ts
CHANGED
|
@@ -1,11 +1,33 @@
|
|
|
1
|
+
import { A11yIndex } from './components/A11yIndex/A11yIndex';
|
|
1
2
|
import { View } from 'react-native';
|
|
2
|
-
import { A11yIndex } from './components/A11yIndex/A11yIndex.web';
|
|
3
3
|
|
|
4
|
-
export type {
|
|
4
|
+
export type {
|
|
5
|
+
IndexCommands,
|
|
6
|
+
A11yOrderType,
|
|
7
|
+
A11yOrderTypeEnum,
|
|
8
|
+
A11yIndexProps,
|
|
9
|
+
} from './types/A11yIndex.types';
|
|
10
|
+
|
|
11
|
+
export type {
|
|
12
|
+
A11yContainerTypeEnum,
|
|
13
|
+
A11yUIContainerType,
|
|
14
|
+
A11yUIContainerProps,
|
|
15
|
+
} from './types/A11yUIContainerView.types';
|
|
16
|
+
|
|
17
|
+
export type { ScreenReaderDescendantFocusChangedEvent } from './types/A11yView.types';
|
|
18
|
+
|
|
19
|
+
export type { A11yViewProps } from './types/A11yView.types';
|
|
5
20
|
|
|
6
21
|
export const A11y = {
|
|
7
22
|
Order: View,
|
|
8
23
|
Group: View,
|
|
9
24
|
Index: A11yIndex,
|
|
10
25
|
Container: View,
|
|
26
|
+
PaneTitle: View,
|
|
27
|
+
ScreenChange: View,
|
|
28
|
+
View: View,
|
|
29
|
+
FocusFrame: View,
|
|
30
|
+
FocusTrap: View,
|
|
11
31
|
};
|
|
32
|
+
|
|
33
|
+
export { A11yModule } from './modules/A11yAnnounceModule';
|