@react-navigation/elements 1.1.1
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/LICENSE +21 -0
- package/README.md +5 -0
- package/lib/commonjs/Background.js +34 -0
- package/lib/commonjs/Background.js.map +1 -0
- package/lib/commonjs/Header/Header.js +250 -0
- package/lib/commonjs/Header/Header.js.map +1 -0
- package/lib/commonjs/Header/HeaderBackButton.js +222 -0
- package/lib/commonjs/Header/HeaderBackButton.js.map +1 -0
- package/lib/commonjs/Header/HeaderBackContext.js +15 -0
- package/lib/commonjs/Header/HeaderBackContext.js.map +1 -0
- package/lib/commonjs/Header/HeaderBackground.js +57 -0
- package/lib/commonjs/Header/HeaderBackground.js.map +1 -0
- package/lib/commonjs/Header/HeaderHeightContext.js +15 -0
- package/lib/commonjs/Header/HeaderHeightContext.js.map +1 -0
- package/lib/commonjs/Header/HeaderShownContext.js +15 -0
- package/lib/commonjs/Header/HeaderShownContext.js.map +1 -0
- package/lib/commonjs/Header/HeaderTitle.js +56 -0
- package/lib/commonjs/Header/HeaderTitle.js.map +1 -0
- package/lib/commonjs/Header/getDefaultHeaderHeight.js +40 -0
- package/lib/commonjs/Header/getDefaultHeaderHeight.js.map +1 -0
- package/lib/commonjs/Header/getHeaderTitle.js +11 -0
- package/lib/commonjs/Header/getHeaderTitle.js.map +1 -0
- package/lib/commonjs/Header/useHeaderHeight.js +27 -0
- package/lib/commonjs/Header/useHeaderHeight.js.map +1 -0
- package/lib/commonjs/MaskedView.android.js +16 -0
- package/lib/commonjs/MaskedView.android.js.map +1 -0
- package/lib/commonjs/MaskedView.ios.js +16 -0
- package/lib/commonjs/MaskedView.ios.js.map +1 -0
- package/lib/commonjs/MaskedView.js +16 -0
- package/lib/commonjs/MaskedView.js.map +1 -0
- package/lib/commonjs/MaskedViewNative.js +40 -0
- package/lib/commonjs/MaskedViewNative.js.map +1 -0
- package/lib/commonjs/MissingIcon.js +34 -0
- package/lib/commonjs/MissingIcon.js.map +1 -0
- package/lib/commonjs/PlatformPressable.js +77 -0
- package/lib/commonjs/PlatformPressable.js.map +1 -0
- package/lib/commonjs/ResourceSavingView.js +64 -0
- package/lib/commonjs/ResourceSavingView.js.map +1 -0
- package/lib/commonjs/SafeAreaProviderCompat.js +69 -0
- package/lib/commonjs/SafeAreaProviderCompat.js.map +1 -0
- package/lib/commonjs/Screen.js +89 -0
- package/lib/commonjs/Screen.js.map +1 -0
- package/lib/commonjs/assets/back-icon-mask.png +0 -0
- package/lib/commonjs/assets/back-icon.png +0 -0
- package/lib/commonjs/assets/back-icon@1.5x.android.png +0 -0
- package/lib/commonjs/assets/back-icon@1.5x.ios.png +0 -0
- package/lib/commonjs/assets/back-icon@1x.android.png +0 -0
- package/lib/commonjs/assets/back-icon@1x.ios.png +0 -0
- package/lib/commonjs/assets/back-icon@2x.android.png +0 -0
- package/lib/commonjs/assets/back-icon@2x.ios.png +0 -0
- package/lib/commonjs/assets/back-icon@3x.android.png +0 -0
- package/lib/commonjs/assets/back-icon@3x.ios.png +0 -0
- package/lib/commonjs/assets/back-icon@4x.android.png +0 -0
- package/lib/commonjs/assets/back-icon@4x.ios.png +0 -0
- package/lib/commonjs/getNamedContext.js +32 -0
- package/lib/commonjs/getNamedContext.js.map +1 -0
- package/lib/commonjs/index.js +175 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/types.js +6 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/module/Background.js +20 -0
- package/lib/module/Background.js.map +1 -0
- package/lib/module/Header/Header.js +229 -0
- package/lib/module/Header/Header.js.map +1 -0
- package/lib/module/Header/HeaderBackButton.js +203 -0
- package/lib/module/Header/HeaderBackButton.js.map +1 -0
- package/lib/module/Header/HeaderBackContext.js +4 -0
- package/lib/module/Header/HeaderBackContext.js.map +1 -0
- package/lib/module/Header/HeaderBackground.js +42 -0
- package/lib/module/Header/HeaderBackground.js.map +1 -0
- package/lib/module/Header/HeaderHeightContext.js +4 -0
- package/lib/module/Header/HeaderHeightContext.js.map +1 -0
- package/lib/module/Header/HeaderShownContext.js +4 -0
- package/lib/module/Header/HeaderShownContext.js.map +1 -0
- package/lib/module/Header/HeaderTitle.js +41 -0
- package/lib/module/Header/HeaderTitle.js.map +1 -0
- package/lib/module/Header/getDefaultHeaderHeight.js +32 -0
- package/lib/module/Header/getDefaultHeaderHeight.js.map +1 -0
- package/lib/module/Header/getHeaderTitle.js +4 -0
- package/lib/module/Header/getHeaderTitle.js.map +1 -0
- package/lib/module/Header/useHeaderHeight.js +12 -0
- package/lib/module/Header/useHeaderHeight.js.map +1 -0
- package/lib/module/MaskedView.android.js +2 -0
- package/lib/module/MaskedView.android.js.map +1 -0
- package/lib/module/MaskedView.ios.js +2 -0
- package/lib/module/MaskedView.ios.js.map +1 -0
- package/lib/module/MaskedView.js +9 -0
- package/lib/module/MaskedView.js.map +1 -0
- package/lib/module/MaskedViewNative.js +26 -0
- package/lib/module/MaskedViewNative.js.map +1 -0
- package/lib/module/MissingIcon.js +20 -0
- package/lib/module/MissingIcon.js.map +1 -0
- package/lib/module/PlatformPressable.js +62 -0
- package/lib/module/PlatformPressable.js.map +1 -0
- package/lib/module/ResourceSavingView.js +50 -0
- package/lib/module/ResourceSavingView.js.map +1 -0
- package/lib/module/SafeAreaProviderCompat.js +51 -0
- package/lib/module/SafeAreaProviderCompat.js.map +1 -0
- package/lib/module/Screen.js +67 -0
- package/lib/module/Screen.js.map +1 -0
- package/lib/module/assets/back-icon-mask.png +0 -0
- package/lib/module/assets/back-icon.png +0 -0
- package/lib/module/assets/back-icon@1.5x.android.png +0 -0
- package/lib/module/assets/back-icon@1.5x.ios.png +0 -0
- package/lib/module/assets/back-icon@1x.android.png +0 -0
- package/lib/module/assets/back-icon@1x.ios.png +0 -0
- package/lib/module/assets/back-icon@2x.android.png +0 -0
- package/lib/module/assets/back-icon@2x.ios.png +0 -0
- package/lib/module/assets/back-icon@3x.android.png +0 -0
- package/lib/module/assets/back-icon@3x.ios.png +0 -0
- package/lib/module/assets/back-icon@4x.android.png +0 -0
- package/lib/module/assets/back-icon@4x.ios.png +0 -0
- package/lib/module/getNamedContext.js +19 -0
- package/lib/module/getNamedContext.js.map +1 -0
- package/lib/module/index.js +21 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/src/Background.d.ts +7 -0
- package/lib/typescript/src/Header/Header.d.ts +18 -0
- package/lib/typescript/src/Header/HeaderBackButton.d.ts +3 -0
- package/lib/typescript/src/Header/HeaderBackContext.d.ts +5 -0
- package/lib/typescript/src/Header/HeaderBackground.d.ts +8 -0
- package/lib/typescript/src/Header/HeaderHeightContext.d.ts +3 -0
- package/lib/typescript/src/Header/HeaderShownContext.d.ts +3 -0
- package/lib/typescript/src/Header/HeaderTitle.d.ts +9 -0
- package/lib/typescript/src/Header/getDefaultHeaderHeight.d.ts +2 -0
- package/lib/typescript/src/Header/getHeaderTitle.d.ts +5 -0
- package/lib/typescript/src/Header/useHeaderHeight.d.ts +1 -0
- package/lib/typescript/src/MaskedView.android.d.ts +1 -0
- package/lib/typescript/src/MaskedView.d.ts +10 -0
- package/lib/typescript/src/MaskedView.ios.d.ts +1 -0
- package/lib/typescript/src/MaskedViewNative.d.ts +10 -0
- package/lib/typescript/src/MissingIcon.d.ts +9 -0
- package/lib/typescript/src/PlatformPressable.d.ts +12 -0
- package/lib/typescript/src/ResourceSavingView.d.ts +9 -0
- package/lib/typescript/src/SafeAreaProviderCompat.d.ts +11 -0
- package/lib/typescript/src/Screen.d.ts +17 -0
- package/lib/typescript/src/getNamedContext.d.ts +5 -0
- package/lib/typescript/src/index.d.ts +18 -0
- package/lib/typescript/src/types.d.ts +202 -0
- package/package.json +72 -0
- package/src/Background.tsx +18 -0
- package/src/Header/Header.tsx +306 -0
- package/src/Header/HeaderBackButton.tsx +240 -0
- package/src/Header/HeaderBackContext.tsx +8 -0
- package/src/Header/HeaderBackground.tsx +56 -0
- package/src/Header/HeaderHeightContext.tsx +8 -0
- package/src/Header/HeaderShownContext.tsx +5 -0
- package/src/Header/HeaderTitle.tsx +52 -0
- package/src/Header/getDefaultHeaderHeight.tsx +39 -0
- package/src/Header/getHeaderTitle.tsx +12 -0
- package/src/Header/useHeaderHeight.tsx +15 -0
- package/src/MaskedView.android.tsx +1 -0
- package/src/MaskedView.ios.tsx +1 -0
- package/src/MaskedView.tsx +13 -0
- package/src/MaskedViewNative.tsx +33 -0
- package/src/MissingIcon.tsx +18 -0
- package/src/PlatformPressable.tsx +86 -0
- package/src/ResourceSavingView.tsx +70 -0
- package/src/SafeAreaProviderCompat.tsx +61 -0
- package/src/Screen.tsx +109 -0
- package/src/assets/back-icon-mask.png +0 -0
- package/src/assets/back-icon.png +0 -0
- package/src/assets/back-icon@1.5x.android.png +0 -0
- package/src/assets/back-icon@1.5x.ios.png +0 -0
- package/src/assets/back-icon@1x.android.png +0 -0
- package/src/assets/back-icon@1x.ios.png +0 -0
- package/src/assets/back-icon@2x.android.png +0 -0
- package/src/assets/back-icon@2x.ios.png +0 -0
- package/src/assets/back-icon@3x.android.png +0 -0
- package/src/assets/back-icon@3x.ios.png +0 -0
- package/src/assets/back-icon@4x.android.png +0 -0
- package/src/assets/back-icon@4x.ios.png +0 -0
- package/src/getNamedContext.tsx +28 -0
- package/src/index.tsx +25 -0
- package/src/types.tsx +208 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = HeaderBackground;
|
|
7
|
+
|
|
8
|
+
var _native = require("@react-navigation/native");
|
|
9
|
+
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _reactNative = require("react-native");
|
|
13
|
+
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
+
|
|
18
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
|
+
|
|
20
|
+
function HeaderBackground({
|
|
21
|
+
style,
|
|
22
|
+
...rest
|
|
23
|
+
}) {
|
|
24
|
+
const {
|
|
25
|
+
colors
|
|
26
|
+
} = (0, _native.useTheme)();
|
|
27
|
+
return /*#__PURE__*/React.createElement(_reactNative.Animated.View, _extends({
|
|
28
|
+
style: [styles.container, {
|
|
29
|
+
backgroundColor: colors.card,
|
|
30
|
+
borderBottomColor: colors.border,
|
|
31
|
+
shadowColor: colors.border
|
|
32
|
+
}, style]
|
|
33
|
+
}, rest));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const styles = _reactNative.StyleSheet.create({
|
|
37
|
+
container: {
|
|
38
|
+
flex: 1,
|
|
39
|
+
..._reactNative.Platform.select({
|
|
40
|
+
android: {
|
|
41
|
+
elevation: 4
|
|
42
|
+
},
|
|
43
|
+
ios: {
|
|
44
|
+
shadowOpacity: 0.85,
|
|
45
|
+
shadowRadius: 0,
|
|
46
|
+
shadowOffset: {
|
|
47
|
+
width: 0,
|
|
48
|
+
height: _reactNative.StyleSheet.hairlineWidth
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
default: {
|
|
52
|
+
borderBottomWidth: _reactNative.StyleSheet.hairlineWidth
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
//# sourceMappingURL=HeaderBackground.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["HeaderBackground.tsx"],"names":["HeaderBackground","style","rest","colors","styles","container","backgroundColor","card","borderBottomColor","border","shadowColor","StyleSheet","create","flex","Platform","select","android","elevation","ios","shadowOpacity","shadowRadius","shadowOffset","width","height","hairlineWidth","default","borderBottomWidth"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAce,SAASA,gBAAT,CAA0B;AAAEC,EAAAA,KAAF;AAAS,KAAGC;AAAZ,CAA1B,EAAqD;AAClE,QAAM;AAAEC,IAAAA;AAAF,MAAa,uBAAnB;AAEA,sBACE,oBAAC,qBAAD,CAAU,IAAV;AACE,IAAA,KAAK,EAAE,CACLC,MAAM,CAACC,SADF,EAEL;AACEC,MAAAA,eAAe,EAAEH,MAAM,CAACI,IAD1B;AAEEC,MAAAA,iBAAiB,EAAEL,MAAM,CAACM,MAF5B;AAGEC,MAAAA,WAAW,EAAEP,MAAM,CAACM;AAHtB,KAFK,EAOLR,KAPK;AADT,KAUMC,IAVN,EADF;AAcD;;AAED,MAAME,MAAM,GAAGO,wBAAWC,MAAX,CAAkB;AAC/BP,EAAAA,SAAS,EAAE;AACTQ,IAAAA,IAAI,EAAE,CADG;AAET,OAAGC,sBAASC,MAAT,CAAgB;AACjBC,MAAAA,OAAO,EAAE;AACPC,QAAAA,SAAS,EAAE;AADJ,OADQ;AAIjBC,MAAAA,GAAG,EAAE;AACHC,QAAAA,aAAa,EAAE,IADZ;AAEHC,QAAAA,YAAY,EAAE,CAFX;AAGHC,QAAAA,YAAY,EAAE;AACZC,UAAAA,KAAK,EAAE,CADK;AAEZC,UAAAA,MAAM,EAAEZ,wBAAWa;AAFP;AAHX,OAJY;AAYjBC,MAAAA,OAAO,EAAE;AACPC,QAAAA,iBAAiB,EAAEf,wBAAWa;AADvB;AAZQ,KAAhB;AAFM;AADoB,CAAlB,CAAf","sourcesContent":["import { useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport {\n Animated,\n Platform,\n StyleProp,\n StyleSheet,\n ViewProps,\n ViewStyle,\n} from 'react-native';\n\ntype Props = ViewProps & {\n style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n children?: React.ReactNode;\n};\n\nexport default function HeaderBackground({ style, ...rest }: Props) {\n const { colors } = useTheme();\n\n return (\n <Animated.View\n style={[\n styles.container,\n {\n backgroundColor: colors.card,\n borderBottomColor: colors.border,\n shadowColor: colors.border,\n },\n style,\n ]}\n {...rest}\n />\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n ...Platform.select({\n android: {\n elevation: 4,\n },\n ios: {\n shadowOpacity: 0.85,\n shadowRadius: 0,\n shadowOffset: {\n width: 0,\n height: StyleSheet.hairlineWidth,\n },\n },\n default: {\n borderBottomWidth: StyleSheet.hairlineWidth,\n },\n }),\n },\n});\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _getNamedContext = _interopRequireDefault(require("../getNamedContext"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const HeaderHeightContext = (0, _getNamedContext.default)('HeaderHeightContext', undefined);
|
|
13
|
+
var _default = HeaderHeightContext;
|
|
14
|
+
exports.default = _default;
|
|
15
|
+
//# sourceMappingURL=HeaderHeightContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["HeaderHeightContext.tsx"],"names":["HeaderHeightContext","undefined"],"mappings":";;;;;;;AAAA;;;;AAEA,MAAMA,mBAAmB,GAAG,8BAC1B,qBAD0B,EAE1BC,SAF0B,CAA5B;eAKeD,mB","sourcesContent":["import getNamedContext from '../getNamedContext';\n\nconst HeaderHeightContext = getNamedContext<number | undefined>(\n 'HeaderHeightContext',\n undefined\n);\n\nexport default HeaderHeightContext;\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _getNamedContext = _interopRequireDefault(require("../getNamedContext"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const HeaderShownContext = (0, _getNamedContext.default)('HeaderShownContext', false);
|
|
13
|
+
var _default = HeaderShownContext;
|
|
14
|
+
exports.default = _default;
|
|
15
|
+
//# sourceMappingURL=HeaderShownContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["HeaderShownContext.tsx"],"names":["HeaderShownContext"],"mappings":";;;;;;;AAAA;;;;AAEA,MAAMA,kBAAkB,GAAG,8BAAgB,oBAAhB,EAAsC,KAAtC,CAA3B;eAEeA,kB","sourcesContent":["import getNamedContext from '../getNamedContext';\n\nconst HeaderShownContext = getNamedContext('HeaderShownContext', false);\n\nexport default HeaderShownContext;\n"]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = HeaderTitle;
|
|
7
|
+
|
|
8
|
+
var _native = require("@react-navigation/native");
|
|
9
|
+
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _reactNative = require("react-native");
|
|
13
|
+
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
+
|
|
18
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
|
+
|
|
20
|
+
function HeaderTitle({
|
|
21
|
+
tintColor,
|
|
22
|
+
style,
|
|
23
|
+
...rest
|
|
24
|
+
}) {
|
|
25
|
+
const {
|
|
26
|
+
colors
|
|
27
|
+
} = (0, _native.useTheme)();
|
|
28
|
+
return /*#__PURE__*/React.createElement(_reactNative.Animated.Text, _extends({
|
|
29
|
+
accessibilityRole: "header",
|
|
30
|
+
"aria-level": "1",
|
|
31
|
+
numberOfLines: 1
|
|
32
|
+
}, rest, {
|
|
33
|
+
style: [styles.title, {
|
|
34
|
+
color: tintColor === undefined ? colors.text : tintColor
|
|
35
|
+
}, style]
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const styles = _reactNative.StyleSheet.create({
|
|
40
|
+
title: _reactNative.Platform.select({
|
|
41
|
+
ios: {
|
|
42
|
+
fontSize: 17,
|
|
43
|
+
fontWeight: '600'
|
|
44
|
+
},
|
|
45
|
+
android: {
|
|
46
|
+
fontSize: 20,
|
|
47
|
+
fontFamily: 'sans-serif-medium',
|
|
48
|
+
fontWeight: 'normal'
|
|
49
|
+
},
|
|
50
|
+
default: {
|
|
51
|
+
fontSize: 18,
|
|
52
|
+
fontWeight: '500'
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
//# sourceMappingURL=HeaderTitle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["HeaderTitle.tsx"],"names":["HeaderTitle","tintColor","style","rest","colors","styles","title","color","undefined","text","StyleSheet","create","Platform","select","ios","fontSize","fontWeight","android","fontFamily","default"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAee,SAASA,WAAT,CAAqB;AAAEC,EAAAA,SAAF;AAAaC,EAAAA,KAAb;AAAoB,KAAGC;AAAvB,CAArB,EAA2D;AACxE,QAAM;AAAEC,IAAAA;AAAF,MAAa,uBAAnB;AAEA,sBACE,oBAAC,qBAAD,CAAU,IAAV;AACE,IAAA,iBAAiB,EAAC,QADpB;AAEE,kBAAW,GAFb;AAGE,IAAA,aAAa,EAAE;AAHjB,KAIMD,IAJN;AAKE,IAAA,KAAK,EAAE,CACLE,MAAM,CAACC,KADF,EAEL;AAAEC,MAAAA,KAAK,EAAEN,SAAS,KAAKO,SAAd,GAA0BJ,MAAM,CAACK,IAAjC,GAAwCR;AAAjD,KAFK,EAGLC,KAHK;AALT,KADF;AAaD;;AAED,MAAMG,MAAM,GAAGK,wBAAWC,MAAX,CAAkB;AAC/BL,EAAAA,KAAK,EAAEM,sBAASC,MAAT,CAAgB;AACrBC,IAAAA,GAAG,EAAE;AACHC,MAAAA,QAAQ,EAAE,EADP;AAEHC,MAAAA,UAAU,EAAE;AAFT,KADgB;AAKrBC,IAAAA,OAAO,EAAE;AACPF,MAAAA,QAAQ,EAAE,EADH;AAEPG,MAAAA,UAAU,EAAE,mBAFL;AAGPF,MAAAA,UAAU,EAAE;AAHL,KALY;AAUrBG,IAAAA,OAAO,EAAE;AACPJ,MAAAA,QAAQ,EAAE,EADH;AAEPC,MAAAA,UAAU,EAAE;AAFL;AAVY,GAAhB;AADwB,CAAlB,CAAf","sourcesContent":["import { useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport {\n Animated,\n Platform,\n StyleProp,\n StyleSheet,\n TextProps,\n TextStyle,\n} from 'react-native';\n\ntype Props = Omit<TextProps, 'style'> & {\n tintColor?: string;\n children?: string;\n style?: Animated.WithAnimatedValue<StyleProp<TextStyle>>;\n};\n\nexport default function HeaderTitle({ tintColor, style, ...rest }: Props) {\n const { colors } = useTheme();\n\n return (\n <Animated.Text\n accessibilityRole=\"header\"\n aria-level=\"1\"\n numberOfLines={1}\n {...rest}\n style={[\n styles.title,\n { color: tintColor === undefined ? colors.text : tintColor },\n style,\n ]}\n />\n );\n}\n\nconst styles = StyleSheet.create({\n title: Platform.select({\n ios: {\n fontSize: 17,\n fontWeight: '600',\n },\n android: {\n fontSize: 20,\n fontFamily: 'sans-serif-medium',\n fontWeight: 'normal',\n },\n default: {\n fontSize: 18,\n fontWeight: '500',\n },\n }),\n});\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = getDefaultHeaderHeight;
|
|
7
|
+
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
|
|
10
|
+
function getDefaultHeaderHeight(layout, modalPresentation, statusBarHeight) {
|
|
11
|
+
let headerHeight;
|
|
12
|
+
const isLandscape = layout.width > layout.height;
|
|
13
|
+
|
|
14
|
+
if (_reactNative.Platform.OS === 'ios') {
|
|
15
|
+
if (_reactNative.Platform.isPad) {
|
|
16
|
+
if (modalPresentation) {
|
|
17
|
+
headerHeight = 56;
|
|
18
|
+
} else {
|
|
19
|
+
headerHeight = 50;
|
|
20
|
+
}
|
|
21
|
+
} else {
|
|
22
|
+
if (isLandscape) {
|
|
23
|
+
headerHeight = 32;
|
|
24
|
+
} else {
|
|
25
|
+
if (modalPresentation) {
|
|
26
|
+
headerHeight = 56;
|
|
27
|
+
} else {
|
|
28
|
+
headerHeight = 44;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
} else if (_reactNative.Platform.OS === 'android') {
|
|
33
|
+
headerHeight = 56;
|
|
34
|
+
} else {
|
|
35
|
+
headerHeight = 64;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return headerHeight + statusBarHeight;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=getDefaultHeaderHeight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["getDefaultHeaderHeight.tsx"],"names":["getDefaultHeaderHeight","layout","modalPresentation","statusBarHeight","headerHeight","isLandscape","width","height","Platform","OS","isPad"],"mappings":";;;;;;;AAAA;;AAIe,SAASA,sBAAT,CACbC,MADa,EAEbC,iBAFa,EAGbC,eAHa,EAIL;AACR,MAAIC,YAAJ;AAEA,QAAMC,WAAW,GAAGJ,MAAM,CAACK,KAAP,GAAeL,MAAM,CAACM,MAA1C;;AAEA,MAAIC,sBAASC,EAAT,KAAgB,KAApB,EAA2B;AACzB,QAAID,sBAASE,KAAb,EAAoB;AAClB,UAAIR,iBAAJ,EAAuB;AACrBE,QAAAA,YAAY,GAAG,EAAf;AACD,OAFD,MAEO;AACLA,QAAAA,YAAY,GAAG,EAAf;AACD;AACF,KAND,MAMO;AACL,UAAIC,WAAJ,EAAiB;AACfD,QAAAA,YAAY,GAAG,EAAf;AACD,OAFD,MAEO;AACL,YAAIF,iBAAJ,EAAuB;AACrBE,UAAAA,YAAY,GAAG,EAAf;AACD,SAFD,MAEO;AACLA,UAAAA,YAAY,GAAG,EAAf;AACD;AACF;AACF;AACF,GAlBD,MAkBO,IAAII,sBAASC,EAAT,KAAgB,SAApB,EAA+B;AACpCL,IAAAA,YAAY,GAAG,EAAf;AACD,GAFM,MAEA;AACLA,IAAAA,YAAY,GAAG,EAAf;AACD;;AAED,SAAOA,YAAY,GAAGD,eAAtB;AACD","sourcesContent":["import { Platform } from 'react-native';\n\nimport type { Layout } from '../types';\n\nexport default function getDefaultHeaderHeight(\n layout: Layout,\n modalPresentation: boolean,\n statusBarHeight: number\n): number {\n let headerHeight;\n\n const isLandscape = layout.width > layout.height;\n\n if (Platform.OS === 'ios') {\n if (Platform.isPad) {\n if (modalPresentation) {\n headerHeight = 56;\n } else {\n headerHeight = 50;\n }\n } else {\n if (isLandscape) {\n headerHeight = 32;\n } else {\n if (modalPresentation) {\n headerHeight = 56;\n } else {\n headerHeight = 44;\n }\n }\n }\n } else if (Platform.OS === 'android') {\n headerHeight = 56;\n } else {\n headerHeight = 64;\n }\n\n return headerHeight + statusBarHeight;\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = getHeaderTitle;
|
|
7
|
+
|
|
8
|
+
function getHeaderTitle(options, fallback) {
|
|
9
|
+
return typeof options.headerTitle === 'string' ? options.headerTitle : options.title !== undefined ? options.title : fallback;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=getHeaderTitle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["getHeaderTitle.tsx"],"names":["getHeaderTitle","options","fallback","headerTitle","title","undefined"],"mappings":";;;;;;;AAEe,SAASA,cAAT,CACbC,OADa,EAEbC,QAFa,EAGL;AACR,SAAO,OAAOD,OAAO,CAACE,WAAf,KAA+B,QAA/B,GACHF,OAAO,CAACE,WADL,GAEHF,OAAO,CAACG,KAAR,KAAkBC,SAAlB,GACAJ,OAAO,CAACG,KADR,GAEAF,QAJJ;AAKD","sourcesContent":["import type { HeaderOptions } from '../types';\n\nexport default function getHeaderTitle(\n options: { title?: string; headerTitle?: HeaderOptions['headerTitle'] },\n fallback: string\n): string {\n return typeof options.headerTitle === 'string'\n ? options.headerTitle\n : options.title !== undefined\n ? options.title\n : fallback;\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = useHeaderHeight;
|
|
7
|
+
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _HeaderHeightContext = _interopRequireDefault(require("./HeaderHeightContext"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
+
|
|
18
|
+
function useHeaderHeight() {
|
|
19
|
+
const height = React.useContext(_HeaderHeightContext.default);
|
|
20
|
+
|
|
21
|
+
if (height === undefined) {
|
|
22
|
+
throw new Error("Couldn't find the header height. Are you inside a screen in a navigator with a header?");
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return height;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=useHeaderHeight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useHeaderHeight.tsx"],"names":["useHeaderHeight","height","React","useContext","HeaderHeightContext","undefined","Error"],"mappings":";;;;;;;AAAA;;AAEA;;;;;;;;AAEe,SAASA,eAAT,GAA2B;AACxC,QAAMC,MAAM,GAAGC,KAAK,CAACC,UAAN,CAAiBC,4BAAjB,CAAf;;AAEA,MAAIH,MAAM,KAAKI,SAAf,EAA0B;AACxB,UAAM,IAAIC,KAAJ,CACJ,wFADI,CAAN;AAGD;;AAED,SAAOL,MAAP;AACD","sourcesContent":["import * as React from 'react';\n\nimport HeaderHeightContext from './HeaderHeightContext';\n\nexport default function useHeaderHeight() {\n const height = React.useContext(HeaderHeightContext);\n\n if (height === undefined) {\n throw new Error(\n \"Couldn't find the header height. Are you inside a screen in a navigator with a header?\"\n );\n }\n\n return height;\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "default", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _MaskedViewNative.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _MaskedViewNative = _interopRequireDefault(require("./MaskedViewNative"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
//# sourceMappingURL=MaskedView.android.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["MaskedView.android.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA","sourcesContent":["export { default } from './MaskedViewNative';\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "default", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _MaskedViewNative.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _MaskedViewNative = _interopRequireDefault(require("./MaskedViewNative"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
//# sourceMappingURL=MaskedView.ios.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["MaskedView.ios.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA","sourcesContent":["export { default } from './MaskedViewNative';\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = MaskedView;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Use a stub for MaskedView on all Platforms that don't support it.
|
|
10
|
+
*/
|
|
11
|
+
function MaskedView({
|
|
12
|
+
children
|
|
13
|
+
}) {
|
|
14
|
+
return children;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=MaskedView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["MaskedView.tsx"],"names":["MaskedView","children"],"mappings":";;;;;;;AAAA;AACA;AACA;AAQe,SAASA,UAAT,CAAoB;AAAEC,EAAAA;AAAF,CAApB,EAAyC;AACtD,SAAOA,QAAP;AACD","sourcesContent":["/**\n * Use a stub for MaskedView on all Platforms that don't support it.\n */\nimport type * as React from 'react';\n\ntype Props = {\n maskElement: React.ReactElement;\n children: React.ReactElement;\n};\n\nexport default function MaskedView({ children }: Props) {\n return children;\n}\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = MaskedView;
|
|
7
|
+
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The native MaskedView that we explicitly re-export for supported platforms: Android, iOS.
|
|
18
|
+
*/
|
|
19
|
+
let RNCMaskedView;
|
|
20
|
+
|
|
21
|
+
try {
|
|
22
|
+
// Add try/catch to support usage even if it's not installed, since it's optional.
|
|
23
|
+
// Newer versions of Metro will handle it properly.
|
|
24
|
+
RNCMaskedView = require('@react-native-masked-view/masked-view').default;
|
|
25
|
+
} catch (e) {// Ignore
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const isMaskedViewAvailable = _reactNative.UIManager.getViewManagerConfig('RNCMaskedView') != null;
|
|
29
|
+
|
|
30
|
+
function MaskedView({
|
|
31
|
+
children,
|
|
32
|
+
...rest
|
|
33
|
+
}) {
|
|
34
|
+
if (isMaskedViewAvailable && RNCMaskedView) {
|
|
35
|
+
return /*#__PURE__*/React.createElement(RNCMaskedView, rest, children);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return children;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=MaskedViewNative.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["MaskedViewNative.tsx"],"names":["RNCMaskedView","require","default","e","isMaskedViewAvailable","UIManager","getViewManagerConfig","MaskedView","children","rest"],"mappings":";;;;;;;AAGA;;AACA;;;;;;AAJA;AACA;AACA;AAWA,IAAIA,aAAJ;;AAEA,IAAI;AACF;AACA;AACAA,EAAAA,aAAa,GAAGC,OAAO,CAAC,uCAAD,CAAP,CAAiDC,OAAjE;AACD,CAJD,CAIE,OAAOC,CAAP,EAAU,CACV;AACD;;AAED,MAAMC,qBAAqB,GACzBC,uBAAUC,oBAAV,CAA+B,eAA/B,KAAmD,IADrD;;AAGe,SAASC,UAAT,CAAoB;AAAEC,EAAAA,QAAF;AAAY,KAAGC;AAAf,CAApB,EAAkD;AAC/D,MAAIL,qBAAqB,IAAIJ,aAA7B,EAA4C;AAC1C,wBAAO,oBAAC,aAAD,EAAmBS,IAAnB,EAA0BD,QAA1B,CAAP;AACD;;AAED,SAAOA,QAAP;AACD","sourcesContent":["/**\n * The native MaskedView that we explicitly re-export for supported platforms: Android, iOS.\n */\nimport * as React from 'react';\nimport { UIManager } from 'react-native';\n\ntype MaskedViewType =\n typeof import('@react-native-masked-view/masked-view').default;\n\ntype Props = React.ComponentProps<MaskedViewType> & {\n children: React.ReactElement;\n};\n\nlet RNCMaskedView: MaskedViewType | undefined;\n\ntry {\n // Add try/catch to support usage even if it's not installed, since it's optional.\n // Newer versions of Metro will handle it properly.\n RNCMaskedView = require('@react-native-masked-view/masked-view').default;\n} catch (e) {\n // Ignore\n}\n\nconst isMaskedViewAvailable =\n UIManager.getViewManagerConfig('RNCMaskedView') != null;\n\nexport default function MaskedView({ children, ...rest }: Props) {\n if (isMaskedViewAvailable && RNCMaskedView) {\n return <RNCMaskedView {...rest}>{children}</RNCMaskedView>;\n }\n\n return children;\n}\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = MissingIcon;
|
|
7
|
+
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
|
|
16
|
+
function MissingIcon({
|
|
17
|
+
color,
|
|
18
|
+
size,
|
|
19
|
+
style
|
|
20
|
+
}) {
|
|
21
|
+
return /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
22
|
+
style: [styles.icon, {
|
|
23
|
+
color,
|
|
24
|
+
fontSize: size
|
|
25
|
+
}, style]
|
|
26
|
+
}, "\u23F7");
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const styles = _reactNative.StyleSheet.create({
|
|
30
|
+
icon: {
|
|
31
|
+
backgroundColor: 'transparent'
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=MissingIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["MissingIcon.tsx"],"names":["MissingIcon","color","size","style","styles","icon","fontSize","StyleSheet","create","backgroundColor"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAQe,SAASA,WAAT,CAAqB;AAAEC,EAAAA,KAAF;AAASC,EAAAA,IAAT;AAAeC,EAAAA;AAAf,CAArB,EAAoD;AACjE,sBAAO,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAE,CAACC,MAAM,CAACC,IAAR,EAAc;AAAEJ,MAAAA,KAAF;AAASK,MAAAA,QAAQ,EAAEJ;AAAnB,KAAd,EAAyCC,KAAzC;AAAb,cAAP;AACD;;AAED,MAAMC,MAAM,GAAGG,wBAAWC,MAAX,CAAkB;AAC/BH,EAAAA,IAAI,EAAE;AACJI,IAAAA,eAAe,EAAE;AADb;AADyB,CAAlB,CAAf","sourcesContent":["import * as React from 'react';\nimport { StyleProp, StyleSheet, Text, TextStyle } from 'react-native';\n\ntype Props = {\n color?: string;\n size?: number;\n style?: StyleProp<TextStyle>;\n};\n\nexport default function MissingIcon({ color, size, style }: Props) {\n return <Text style={[styles.icon, { color, fontSize: size }, style]}>⏷</Text>;\n}\n\nconst styles = StyleSheet.create({\n icon: {\n backgroundColor: 'transparent',\n },\n});\n"]}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = PlatformPressable;
|
|
7
|
+
|
|
8
|
+
var _native = require("@react-navigation/native");
|
|
9
|
+
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _reactNative = require("react-native");
|
|
13
|
+
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
+
|
|
18
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
|
+
|
|
20
|
+
const AnimatedPressable = _reactNative.Animated.createAnimatedComponent(_reactNative.Pressable);
|
|
21
|
+
|
|
22
|
+
const ANDROID_VERSION_LOLLIPOP = 21;
|
|
23
|
+
const ANDROID_SUPPORTS_RIPPLE = _reactNative.Platform.OS === 'android' && _reactNative.Platform.Version >= ANDROID_VERSION_LOLLIPOP;
|
|
24
|
+
/**
|
|
25
|
+
* PlatformPressable provides an abstraction on top of Pressable to handle platform differences.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
function PlatformPressable({
|
|
29
|
+
onPressIn,
|
|
30
|
+
onPressOut,
|
|
31
|
+
android_ripple,
|
|
32
|
+
pressColor,
|
|
33
|
+
pressOpacity = 0.3,
|
|
34
|
+
style,
|
|
35
|
+
...rest
|
|
36
|
+
}) {
|
|
37
|
+
const {
|
|
38
|
+
dark
|
|
39
|
+
} = (0, _native.useTheme)();
|
|
40
|
+
const [opacity] = React.useState(() => new _reactNative.Animated.Value(1));
|
|
41
|
+
|
|
42
|
+
const animateTo = (toValue, duration) => {
|
|
43
|
+
if (ANDROID_SUPPORTS_RIPPLE) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
_reactNative.Animated.timing(opacity, {
|
|
48
|
+
toValue,
|
|
49
|
+
duration,
|
|
50
|
+
easing: _reactNative.Easing.inOut(_reactNative.Easing.quad),
|
|
51
|
+
useNativeDriver: true
|
|
52
|
+
}).start();
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const handlePressIn = e => {
|
|
56
|
+
animateTo(pressOpacity, 0);
|
|
57
|
+
onPressIn === null || onPressIn === void 0 ? void 0 : onPressIn(e);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const handlePressOut = e => {
|
|
61
|
+
animateTo(1, 200);
|
|
62
|
+
onPressOut === null || onPressOut === void 0 ? void 0 : onPressOut(e);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return /*#__PURE__*/React.createElement(AnimatedPressable, _extends({
|
|
66
|
+
onPressIn: handlePressIn,
|
|
67
|
+
onPressOut: handlePressOut,
|
|
68
|
+
android_ripple: ANDROID_SUPPORTS_RIPPLE ? {
|
|
69
|
+
color: pressColor !== undefined ? pressColor : dark ? 'rgba(255, 255, 255, .32)' : 'rgba(0, 0, 0, .32)',
|
|
70
|
+
...android_ripple
|
|
71
|
+
} : undefined,
|
|
72
|
+
style: [{
|
|
73
|
+
opacity: !ANDROID_SUPPORTS_RIPPLE ? opacity : 1
|
|
74
|
+
}, style]
|
|
75
|
+
}, rest));
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=PlatformPressable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["PlatformPressable.tsx"],"names":["AnimatedPressable","Animated","createAnimatedComponent","Pressable","ANDROID_VERSION_LOLLIPOP","ANDROID_SUPPORTS_RIPPLE","Platform","OS","Version","PlatformPressable","onPressIn","onPressOut","android_ripple","pressColor","pressOpacity","style","rest","dark","opacity","React","useState","Value","animateTo","toValue","duration","timing","easing","Easing","inOut","quad","useNativeDriver","start","handlePressIn","e","handlePressOut","color","undefined"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAkBA,MAAMA,iBAAiB,GAAGC,sBAASC,uBAAT,CAAiCC,sBAAjC,CAA1B;;AAEA,MAAMC,wBAAwB,GAAG,EAAjC;AACA,MAAMC,uBAAuB,GAC3BC,sBAASC,EAAT,KAAgB,SAAhB,IAA6BD,sBAASE,OAAT,IAAoBJ,wBADnD;AAGA;AACA;AACA;;AACe,SAASK,iBAAT,CAA2B;AACxCC,EAAAA,SADwC;AAExCC,EAAAA,UAFwC;AAGxCC,EAAAA,cAHwC;AAIxCC,EAAAA,UAJwC;AAKxCC,EAAAA,YAAY,GAAG,GALyB;AAMxCC,EAAAA,KANwC;AAOxC,KAAGC;AAPqC,CAA3B,EAQL;AACR,QAAM;AAAEC,IAAAA;AAAF,MAAW,uBAAjB;AACA,QAAM,CAACC,OAAD,IAAYC,KAAK,CAACC,QAAN,CAAe,MAAM,IAAInB,sBAASoB,KAAb,CAAmB,CAAnB,CAArB,CAAlB;;AAEA,QAAMC,SAAS,GAAG,CAACC,OAAD,EAAkBC,QAAlB,KAAuC;AACvD,QAAInB,uBAAJ,EAA6B;AAC3B;AACD;;AAEDJ,0BAASwB,MAAT,CAAgBP,OAAhB,EAAyB;AACvBK,MAAAA,OADuB;AAEvBC,MAAAA,QAFuB;AAGvBE,MAAAA,MAAM,EAAEC,oBAAOC,KAAP,CAAaD,oBAAOE,IAApB,CAHe;AAIvBC,MAAAA,eAAe,EAAE;AAJM,KAAzB,EAKGC,KALH;AAMD,GAXD;;AAaA,QAAMC,aAAa,GAAIC,CAAD,IAA8B;AAClDX,IAAAA,SAAS,CAACR,YAAD,EAAe,CAAf,CAAT;AACAJ,IAAAA,SAAS,SAAT,IAAAA,SAAS,WAAT,YAAAA,SAAS,CAAGuB,CAAH,CAAT;AACD,GAHD;;AAKA,QAAMC,cAAc,GAAID,CAAD,IAA8B;AACnDX,IAAAA,SAAS,CAAC,CAAD,EAAI,GAAJ,CAAT;AACAX,IAAAA,UAAU,SAAV,IAAAA,UAAU,WAAV,YAAAA,UAAU,CAAGsB,CAAH,CAAV;AACD,GAHD;;AAKA,sBACE,oBAAC,iBAAD;AACE,IAAA,SAAS,EAAED,aADb;AAEE,IAAA,UAAU,EAAEE,cAFd;AAGE,IAAA,cAAc,EACZ7B,uBAAuB,GACnB;AACE8B,MAAAA,KAAK,EACHtB,UAAU,KAAKuB,SAAf,GACIvB,UADJ,GAEII,IAAI,GACJ,0BADI,GAEJ,oBANR;AAOE,SAAGL;AAPL,KADmB,GAUnBwB,SAdR;AAgBE,IAAA,KAAK,EAAE,CAAC;AAAElB,MAAAA,OAAO,EAAE,CAACb,uBAAD,GAA2Ba,OAA3B,GAAqC;AAAhD,KAAD,EAAsDH,KAAtD;AAhBT,KAiBMC,IAjBN,EADF;AAqBD","sourcesContent":["import { useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport {\n Animated,\n Easing,\n GestureResponderEvent,\n Platform,\n Pressable,\n PressableProps,\n StyleProp,\n ViewStyle,\n} from 'react-native';\n\nexport type Props = Omit<PressableProps, 'style'> & {\n pressColor?: string;\n pressOpacity?: number;\n style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n children: React.ReactNode;\n};\n\nconst AnimatedPressable = Animated.createAnimatedComponent(Pressable);\n\nconst ANDROID_VERSION_LOLLIPOP = 21;\nconst ANDROID_SUPPORTS_RIPPLE =\n Platform.OS === 'android' && Platform.Version >= ANDROID_VERSION_LOLLIPOP;\n\n/**\n * PlatformPressable provides an abstraction on top of Pressable to handle platform differences.\n */\nexport default function PlatformPressable({\n onPressIn,\n onPressOut,\n android_ripple,\n pressColor,\n pressOpacity = 0.3,\n style,\n ...rest\n}: Props) {\n const { dark } = useTheme();\n const [opacity] = React.useState(() => new Animated.Value(1));\n\n const animateTo = (toValue: number, duration: number) => {\n if (ANDROID_SUPPORTS_RIPPLE) {\n return;\n }\n\n Animated.timing(opacity, {\n toValue,\n duration,\n easing: Easing.inOut(Easing.quad),\n useNativeDriver: true,\n }).start();\n };\n\n const handlePressIn = (e: GestureResponderEvent) => {\n animateTo(pressOpacity, 0);\n onPressIn?.(e);\n };\n\n const handlePressOut = (e: GestureResponderEvent) => {\n animateTo(1, 200);\n onPressOut?.(e);\n };\n\n return (\n <AnimatedPressable\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n android_ripple={\n ANDROID_SUPPORTS_RIPPLE\n ? {\n color:\n pressColor !== undefined\n ? pressColor\n : dark\n ? 'rgba(255, 255, 255, .32)'\n : 'rgba(0, 0, 0, .32)',\n ...android_ripple,\n }\n : undefined\n }\n style={[{ opacity: !ANDROID_SUPPORTS_RIPPLE ? opacity : 1 }, style]}\n {...rest}\n />\n );\n}\n"]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = ResourceSavingScene;
|
|
7
|
+
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
|
|
16
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
+
|
|
18
|
+
const FAR_FAR_AWAY = 30000; // this should be big enough to move the whole view out of its container
|
|
19
|
+
|
|
20
|
+
function ResourceSavingScene({
|
|
21
|
+
visible,
|
|
22
|
+
children,
|
|
23
|
+
style,
|
|
24
|
+
...rest
|
|
25
|
+
}) {
|
|
26
|
+
if (_reactNative.Platform.OS === 'web') {
|
|
27
|
+
return /*#__PURE__*/React.createElement(_reactNative.View // @ts-expect-error: hidden exists on web, but not in React Native
|
|
28
|
+
, _extends({
|
|
29
|
+
hidden: !visible,
|
|
30
|
+
style: [{
|
|
31
|
+
display: visible ? 'flex' : 'none'
|
|
32
|
+
}, styles.container, style],
|
|
33
|
+
pointerEvents: visible ? 'auto' : 'none'
|
|
34
|
+
}, rest), children);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
38
|
+
style: [styles.container, style] // box-none doesn't seem to work properly on Android
|
|
39
|
+
,
|
|
40
|
+
pointerEvents: visible ? 'auto' : 'none'
|
|
41
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
42
|
+
collapsable: false,
|
|
43
|
+
removeClippedSubviews: // On iOS & macOS, set removeClippedSubviews to true only when not focused
|
|
44
|
+
// This is an workaround for a bug where the clipped view never re-appears
|
|
45
|
+
_reactNative.Platform.OS === 'ios' || _reactNative.Platform.OS === 'macos' ? !visible : true,
|
|
46
|
+
pointerEvents: visible ? 'auto' : 'none',
|
|
47
|
+
style: visible ? styles.attached : styles.detached
|
|
48
|
+
}, children));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const styles = _reactNative.StyleSheet.create({
|
|
52
|
+
container: {
|
|
53
|
+
flex: 1,
|
|
54
|
+
overflow: 'hidden'
|
|
55
|
+
},
|
|
56
|
+
attached: {
|
|
57
|
+
flex: 1
|
|
58
|
+
},
|
|
59
|
+
detached: {
|
|
60
|
+
flex: 1,
|
|
61
|
+
top: FAR_FAR_AWAY
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=ResourceSavingView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["ResourceSavingView.tsx"],"names":["FAR_FAR_AWAY","ResourceSavingScene","visible","children","style","rest","Platform","OS","display","styles","container","attached","detached","StyleSheet","create","flex","overflow","top"],"mappings":";;;;;;;AAAA;;AACA;;;;;;;;AAQA,MAAMA,YAAY,GAAG,KAArB,C,CAA4B;;AAEb,SAASC,mBAAT,CAA6B;AAC1CC,EAAAA,OAD0C;AAE1CC,EAAAA,QAF0C;AAG1CC,EAAAA,KAH0C;AAI1C,KAAGC;AAJuC,CAA7B,EAKL;AACR,MAAIC,sBAASC,EAAT,KAAgB,KAApB,EAA2B;AACzB,wBACE,oBAAC,iBAAD,CACE;AADF;AAEE,MAAA,MAAM,EAAE,CAACL,OAFX;AAGE,MAAA,KAAK,EAAE,CACL;AAAEM,QAAAA,OAAO,EAAEN,OAAO,GAAG,MAAH,GAAY;AAA9B,OADK,EAELO,MAAM,CAACC,SAFF,EAGLN,KAHK,CAHT;AAQE,MAAA,aAAa,EAAEF,OAAO,GAAG,MAAH,GAAY;AARpC,OASMG,IATN,GAWGF,QAXH,CADF;AAeD;;AAED,sBACE,oBAAC,iBAAD;AACE,IAAA,KAAK,EAAE,CAACM,MAAM,CAACC,SAAR,EAAmBN,KAAnB,CADT,CAEE;AAFF;AAGE,IAAA,aAAa,EAAEF,OAAO,GAAG,MAAH,GAAY;AAHpC,kBAKE,oBAAC,iBAAD;AACE,IAAA,WAAW,EAAE,KADf;AAEE,IAAA,qBAAqB,EACnB;AACA;AACAI,0BAASC,EAAT,KAAgB,KAAhB,IAAyBD,sBAASC,EAAT,KAAgB,OAAzC,GAAmD,CAACL,OAApD,GAA8D,IALlE;AAOE,IAAA,aAAa,EAAEA,OAAO,GAAG,MAAH,GAAY,MAPpC;AAQE,IAAA,KAAK,EAAEA,OAAO,GAAGO,MAAM,CAACE,QAAV,GAAqBF,MAAM,CAACG;AAR5C,KAUGT,QAVH,CALF,CADF;AAoBD;;AAED,MAAMM,MAAM,GAAGI,wBAAWC,MAAX,CAAkB;AAC/BJ,EAAAA,SAAS,EAAE;AACTK,IAAAA,IAAI,EAAE,CADG;AAETC,IAAAA,QAAQ,EAAE;AAFD,GADoB;AAK/BL,EAAAA,QAAQ,EAAE;AACRI,IAAAA,IAAI,EAAE;AADE,GALqB;AAQ/BH,EAAAA,QAAQ,EAAE;AACRG,IAAAA,IAAI,EAAE,CADE;AAERE,IAAAA,GAAG,EAAEjB;AAFG;AARqB,CAAlB,CAAf","sourcesContent":["import * as React from 'react';\nimport { Platform, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\ntype Props = {\n visible: boolean;\n children: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n};\n\nconst FAR_FAR_AWAY = 30000; // this should be big enough to move the whole view out of its container\n\nexport default function ResourceSavingScene({\n visible,\n children,\n style,\n ...rest\n}: Props) {\n if (Platform.OS === 'web') {\n return (\n <View\n // @ts-expect-error: hidden exists on web, but not in React Native\n hidden={!visible}\n style={[\n { display: visible ? 'flex' : 'none' },\n styles.container,\n style,\n ]}\n pointerEvents={visible ? 'auto' : 'none'}\n {...rest}\n >\n {children}\n </View>\n );\n }\n\n return (\n <View\n style={[styles.container, style]}\n // box-none doesn't seem to work properly on Android\n pointerEvents={visible ? 'auto' : 'none'}\n >\n <View\n collapsable={false}\n removeClippedSubviews={\n // On iOS & macOS, set removeClippedSubviews to true only when not focused\n // This is an workaround for a bug where the clipped view never re-appears\n Platform.OS === 'ios' || Platform.OS === 'macos' ? !visible : true\n }\n pointerEvents={visible ? 'auto' : 'none'}\n style={visible ? styles.attached : styles.detached}\n >\n {children}\n </View>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n overflow: 'hidden',\n },\n attached: {\n flex: 1,\n },\n detached: {\n flex: 1,\n top: FAR_FAR_AWAY,\n },\n});\n"]}
|