@react-navigation/native 8.0.0-alpha.8 → 8.0.0-alpha.9
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/lib/module/NavigationContainer.js +2 -2
- package/lib/module/NavigationContainer.js.map +1 -1
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/theming/{DefaultTheme.js → LightTheme.js} +2 -2
- package/lib/module/theming/LightTheme.js.map +1 -0
- package/lib/module/theming/MaterialTheme.android.js +29 -0
- package/lib/module/theming/MaterialTheme.android.js.map +1 -0
- package/lib/module/theming/MaterialTheme.js +18 -0
- package/lib/module/theming/MaterialTheme.js.map +1 -0
- package/lib/module/useLinking.native.js +11 -3
- package/lib/module/useLinking.native.js.map +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/theming/{DefaultTheme.d.ts → LightTheme.d.ts} +2 -2
- package/lib/typescript/src/theming/LightTheme.d.ts.map +1 -0
- package/lib/typescript/src/theming/MaterialTheme.android.d.ts +127 -0
- package/lib/typescript/src/theming/MaterialTheme.android.d.ts.map +1 -0
- package/lib/typescript/src/theming/MaterialTheme.d.ts +114 -0
- package/lib/typescript/src/theming/MaterialTheme.d.ts.map +1 -0
- package/lib/typescript/src/useLinking.native.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/NavigationContainer.tsx +2 -2
- package/src/index.tsx +2 -1
- package/src/theming/{DefaultTheme.tsx → LightTheme.tsx} +1 -1
- package/src/theming/MaterialTheme.android.tsx +30 -0
- package/src/theming/MaterialTheme.tsx +19 -0
- package/src/useLinking.native.tsx +26 -15
- package/lib/module/theming/DefaultTheme.js.map +0 -1
- package/lib/typescript/src/theming/DefaultTheme.d.ts.map +0 -1
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { I18nManager, Platform } from 'react-native';
|
|
6
6
|
import { LinkingContext } from "./LinkingContext.js";
|
|
7
7
|
import { LocaleDirContext } from "./LocaleDirContext.js";
|
|
8
|
-
import {
|
|
8
|
+
import { LightTheme } from "./theming/LightTheme.js";
|
|
9
9
|
import { useBackButton } from './useBackButton';
|
|
10
10
|
import { useDocumentTitle } from './useDocumentTitle';
|
|
11
11
|
import { useLinking } from './useLinking';
|
|
@@ -15,7 +15,7 @@ globalThis.REACT_NAVIGATION_DEVTOOLS = new WeakMap();
|
|
|
15
15
|
const RESTORE_STATE_ERROR = 'Failed to restore navigation state. The state will be initialized based on the navigation tree.';
|
|
16
16
|
function NavigationContainerInner({
|
|
17
17
|
direction = I18nManager.getConstants().isRTL ? 'rtl' : 'ltr',
|
|
18
|
-
theme =
|
|
18
|
+
theme = LightTheme,
|
|
19
19
|
linking,
|
|
20
20
|
persistor,
|
|
21
21
|
fallback = null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseNavigationContainer","getActionFromState","getPathFromState","getStateFromPath","ThemeProvider","validatePathConfig","React","I18nManager","Platform","LinkingContext","LocaleDirContext","
|
|
1
|
+
{"version":3,"names":["BaseNavigationContainer","getActionFromState","getPathFromState","getStateFromPath","ThemeProvider","validatePathConfig","React","I18nManager","Platform","LinkingContext","LocaleDirContext","LightTheme","useBackButton","useDocumentTitle","useLinking","useThenable","jsx","_jsx","globalThis","REACT_NAVIGATION_DEVTOOLS","WeakMap","RESTORE_STATE_ERROR","NavigationContainerInner","direction","getConstants","isRTL","theme","linking","persistor","fallback","documentTitle","onStateChange","rest","ref","config","refContainer","useRef","linkingConfig","useMemo","options","enabled","prefixes","getInitialState","useEffect","current","previous","get","listeners","Set","set","isLinkStateResolved","initialStateFromLink","initialState","undefined","isPersistenceSupported","OS","isPersistedStateResolved","initialStateFromPersisted","restoredState","restore","e","console","error","then","state","thenable","onfulfilled","Promise","resolve","useImperativeHandle","isStateReady","Provider","value","children","persist","NavigationContainer","forwardRef"],"sourceRoot":"../../src","sources":["NavigationContainer.tsx"],"mappings":";;AAAA,S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,EAAE;IACjB,oBACErD,IAAA,CAACP,gBAAgB,CAAC6D,QAAQ;MAACC,KAAK,EAAEjD,SAAU;MAAAkD,QAAA,eAC1CxD,IAAA,CAACb,aAAa;QAACoE,KAAK,EAAE9C,KAAM;QAAA+C,QAAA,EAAE5C;MAAQ,CAAgB;IAAC,CAC9B,CAAC;EAEhC;EAEA,oBACEZ,IAAA,CAACP,gBAAgB,CAAC6D,QAAQ;IAACC,KAAK,EAAEjD,SAAU;IAAAkD,QAAA,eAC1CxD,IAAA,CAACR,cAAc,CAAC8D,QAAQ;MAACC,KAAK,EAAEnC,aAAc;MAAAoC,QAAA,eAC5CxD,IAAA,CAACjB,uBAAuB;QAAA,GAClBgC,IAAI;QACRN,KAAK,EAAEA,KAAM;QACb0B,YAAY,EACVpB,IAAI,CAACoB,YAAY,IACjBD,oBAAoB,IACpBM,yBACD;QACD1B,aAAa,EAAGiC,KAAK,IAAK;UACxBjC,aAAa,GAAGiC,KAAK,CAAC;UACtBpC,SAAS,EAAE8C,OAAO,CAACV,KAAK,CAAC;QAC3B,CAAE;QACF/B,GAAG,EAAEE;MAAa,CACnB;IAAC,CACqB;EAAC,CACD,CAAC;AAEhC;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMwC,mBAAmB,gBAAGrE,KAAK,CAACsE,UAAU,CACjDtD,wBACF,CAIuB","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -9,7 +9,8 @@ export { SFSymbol } from './native/SFSymbol';
|
|
|
9
9
|
export { NavigationContainer } from "./NavigationContainer.js";
|
|
10
10
|
export { ServerContainer } from "./ServerContainer.js";
|
|
11
11
|
export { DarkTheme } from "./theming/DarkTheme.js";
|
|
12
|
-
export { DefaultTheme } from "./theming/
|
|
12
|
+
export { LightTheme as DefaultTheme } from "./theming/LightTheme.js";
|
|
13
|
+
export { MaterialDarkTheme, MaterialLightTheme } from './theming/MaterialTheme';
|
|
13
14
|
export * from "./types.js";
|
|
14
15
|
export { useLinkBuilder } from "./useLinkBuilder.js";
|
|
15
16
|
export { useLinkProps } from "./useLinkProps.js";
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createStaticNavigation","Link","LinkingContext","LocaleDirContext","MaterialSymbol","SFSymbol","NavigationContainer","ServerContainer","DarkTheme","DefaultTheme","useLinkBuilder","useLinkProps","useLinkTo","useLocale","useRoutePath","useScrollToTop"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,sBAAsB,QAAQ,6BAA0B;AACjE,SAASC,IAAI,QAAQ,WAAQ;AAC7B,SAASC,cAAc,QAAQ,qBAAkB;AACjD,SAASC,gBAAgB,QAAQ,uBAAoB;AACrD,SACEC,cAAc,QAET,yBAAyB;AAChC,SAASC,QAAQ,QAA4B,mBAAmB;AAChE,SAASC,mBAAmB,QAAQ,0BAAuB;AAC3D,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SAASC,SAAS,QAAQ,wBAAqB;AAC/C,SAASC,YAAY,QAAQ,
|
|
1
|
+
{"version":3,"names":["createStaticNavigation","Link","LinkingContext","LocaleDirContext","MaterialSymbol","SFSymbol","NavigationContainer","ServerContainer","DarkTheme","LightTheme","DefaultTheme","MaterialDarkTheme","MaterialLightTheme","useLinkBuilder","useLinkProps","useLinkTo","useLocale","useRoutePath","useScrollToTop"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,sBAAsB,QAAQ,6BAA0B;AACjE,SAASC,IAAI,QAAQ,WAAQ;AAC7B,SAASC,cAAc,QAAQ,qBAAkB;AACjD,SAASC,gBAAgB,QAAQ,uBAAoB;AACrD,SACEC,cAAc,QAET,yBAAyB;AAChC,SAASC,QAAQ,QAA4B,mBAAmB;AAChE,SAASC,mBAAmB,QAAQ,0BAAuB;AAC3D,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SAASC,SAAS,QAAQ,wBAAqB;AAC/C,SAASC,UAAU,IAAIC,YAAY,QAAQ,yBAAsB;AACjE,SAASC,iBAAiB,EAAEC,kBAAkB,QAAQ,yBAAyB;AAC/E,cAAc,YAAS;AACvB,SAASC,cAAc,QAAQ,qBAAkB;AACjD,SAAyBC,YAAY,QAAQ,mBAAgB;AAC7D,SAASC,SAAS,QAAQ,gBAAa;AACvC,SAASC,SAAS,QAAQ,gBAAa;AACvC,SAASC,YAAY,QAAQ,mBAAgB;AAC7C,SAASC,cAAc,QAAQ,qBAAkB;AACjD,cAAc,wBAAwB","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { fonts } from "./fonts.js";
|
|
4
|
-
export const
|
|
4
|
+
export const LightTheme = {
|
|
5
5
|
dark: false,
|
|
6
6
|
colors: {
|
|
7
7
|
primary: 'rgb(0, 122, 255)',
|
|
@@ -13,4 +13,4 @@ export const DefaultTheme = {
|
|
|
13
13
|
},
|
|
14
14
|
fonts
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=
|
|
16
|
+
//# sourceMappingURL=LightTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["fonts","LightTheme","dark","colors","primary","background","card","text","border","notification"],"sourceRoot":"../../../src","sources":["theming/LightTheme.tsx"],"mappings":";;AAEA,SAASA,KAAK,QAAQ,YAAS;AAE/B,OAAO,MAAMC,UAAU,GAAG;EACxBC,IAAI,EAAE,KAAK;EACXC,MAAM,EAAE;IACNC,OAAO,EAAE,kBAAkB;IAC3BC,UAAU,EAAE,oBAAoB;IAChCC,IAAI,EAAE,oBAAoB;IAC1BC,IAAI,EAAE,iBAAiB;IACvBC,MAAM,EAAE,oBAAoB;IAC5BC,YAAY,EAAE;EAChB,CAAC;EACDT;AACF,CAA0B","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { PlatformColor } from 'react-native';
|
|
4
|
+
import { fonts } from "./fonts.js";
|
|
5
|
+
export const MaterialLightTheme = {
|
|
6
|
+
dark: false,
|
|
7
|
+
colors: {
|
|
8
|
+
primary: PlatformColor('@android:color/system_primary_light'),
|
|
9
|
+
background: PlatformColor('@android:color/system_surface_container_light'),
|
|
10
|
+
card: PlatformColor('@android:color/system_background_light'),
|
|
11
|
+
text: PlatformColor('@android:color/system_on_surface_light'),
|
|
12
|
+
border: PlatformColor('@android:color/system_outline_variant_light'),
|
|
13
|
+
notification: PlatformColor('@android:color/system_error_light')
|
|
14
|
+
},
|
|
15
|
+
fonts
|
|
16
|
+
};
|
|
17
|
+
export const MaterialDarkTheme = {
|
|
18
|
+
dark: true,
|
|
19
|
+
colors: {
|
|
20
|
+
primary: PlatformColor('@android:color/system_primary_dark'),
|
|
21
|
+
background: PlatformColor('@android:color/system_surface_container_dark'),
|
|
22
|
+
card: PlatformColor('@android:color/system_background_dark'),
|
|
23
|
+
text: PlatformColor('@android:color/system_on_surface_dark'),
|
|
24
|
+
border: PlatformColor('@android:color/system_outline_variant_dark'),
|
|
25
|
+
notification: PlatformColor('@android:color/system_error_dark')
|
|
26
|
+
},
|
|
27
|
+
fonts
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=MaterialTheme.android.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PlatformColor","fonts","MaterialLightTheme","dark","colors","primary","background","card","text","border","notification","MaterialDarkTheme"],"sourceRoot":"../../../src","sources":["theming/MaterialTheme.android.tsx"],"mappings":";;AACA,SAASA,aAAa,QAAQ,cAAc;AAE5C,SAASC,KAAK,QAAQ,YAAS;AAE/B,OAAO,MAAMC,kBAAkB,GAAG;EAChCC,IAAI,EAAE,KAAK;EACXC,MAAM,EAAE;IACNC,OAAO,EAAEL,aAAa,CAAC,qCAAqC,CAAC;IAC7DM,UAAU,EAAEN,aAAa,CAAC,+CAA+C,CAAC;IAC1EO,IAAI,EAAEP,aAAa,CAAC,wCAAwC,CAAC;IAC7DQ,IAAI,EAAER,aAAa,CAAC,wCAAwC,CAAC;IAC7DS,MAAM,EAAET,aAAa,CAAC,6CAA6C,CAAC;IACpEU,YAAY,EAAEV,aAAa,CAAC,mCAAmC;EACjE,CAAC;EACDC;AACF,CAA0B;AAE1B,OAAO,MAAMU,iBAAiB,GAAG;EAC/BR,IAAI,EAAE,IAAI;EACVC,MAAM,EAAE;IACNC,OAAO,EAAEL,aAAa,CAAC,oCAAoC,CAAC;IAC5DM,UAAU,EAAEN,aAAa,CAAC,8CAA8C,CAAC;IACzEO,IAAI,EAAEP,aAAa,CAAC,uCAAuC,CAAC;IAC5DQ,IAAI,EAAER,aAAa,CAAC,uCAAuC,CAAC;IAC5DS,MAAM,EAAET,aAAa,CAAC,4CAA4C,CAAC;IACnEU,YAAY,EAAEV,aAAa,CAAC,kCAAkC;EAChE,CAAC;EACDC;AACF,CAA0B","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { fonts } from "./fonts.js";
|
|
4
|
+
export const MaterialLightTheme = {
|
|
5
|
+
dark: false,
|
|
6
|
+
get colors() {
|
|
7
|
+
throw new Error('MaterialLightTheme is only supported on Android');
|
|
8
|
+
},
|
|
9
|
+
fonts
|
|
10
|
+
};
|
|
11
|
+
export const MaterialDarkTheme = {
|
|
12
|
+
dark: true,
|
|
13
|
+
get colors() {
|
|
14
|
+
throw new Error('MaterialDarkTheme is only supported on Android');
|
|
15
|
+
},
|
|
16
|
+
fonts
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=MaterialTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["fonts","MaterialLightTheme","dark","colors","Error","MaterialDarkTheme"],"sourceRoot":"../../../src","sources":["theming/MaterialTheme.tsx"],"mappings":";;AAEA,SAASA,KAAK,QAAQ,YAAS;AAE/B,OAAO,MAAMC,kBAAkB,GAAG;EAChCC,IAAI,EAAE,KAAK;EACX,IAAIC,MAAMA,CAAA,EAAoB;IAC5B,MAAM,IAAIC,KAAK,CAAC,iDAAiD,CAAC;EACpE,CAAC;EACDJ;AACF,CAA0B;AAE1B,OAAO,MAAMK,iBAAiB,GAAG;EAC/BH,IAAI,EAAE,IAAI;EACV,IAAIC,MAAMA,CAAA,EAAoB;IAC5B,MAAM,IAAIC,KAAK,CAAC,gDAAgD,CAAC;EACnE,CAAC;EACDJ;AACF,CAA0B","ignoreList":[]}
|
|
@@ -35,14 +35,22 @@ export function useLinking(ref, {
|
|
|
35
35
|
if (independent) {
|
|
36
36
|
return undefined;
|
|
37
37
|
}
|
|
38
|
-
if (enabled !== false && linkingHandlers.size) {
|
|
39
|
-
console.error(['Looks like you have configured linking in multiple places. This is likely an error since deep links should only be handled in one place to avoid conflicts. Make sure that:', "- You don't have multiple NavigationContainers in the app each with 'linking' enabled", '- Only a single instance of the root component is rendered', Platform.OS === 'android' ? "- You have set 'android:launchMode=singleTask' in the '<activity />' section of the 'AndroidManifest.xml' file to avoid launching multiple instances" : ''].join('\n').trim());
|
|
40
|
-
}
|
|
41
38
|
const handler = Symbol();
|
|
42
39
|
if (enabled !== false) {
|
|
43
40
|
linkingHandlers.add(handler);
|
|
44
41
|
}
|
|
42
|
+
|
|
43
|
+
// In some cases, the effect cleanup may get called out of order
|
|
44
|
+
// This may result in multiple linking handlers being registered
|
|
45
|
+
// For example, when changing the wallpaper on Android
|
|
46
|
+
// Showing the error in a delay avoids false positives
|
|
47
|
+
const timer = setTimeout(() => {
|
|
48
|
+
if (enabled !== false && linkingHandlers.size && !(linkingHandlers.size === 1 && linkingHandlers.has(handler))) {
|
|
49
|
+
console.error(['Looks like you have configured linking in multiple places. This is likely an error since deep links should only be handled in one place to avoid conflicts. Make sure that:', "- You don't have multiple NavigationContainers in the app each with 'linking' enabled", '- Only a single instance of the root component is rendered', Platform.OS === 'android' ? "- You have set 'android:launchMode=singleTask' in the '<activity />' section of the 'AndroidManifest.xml' file to avoid launching multiple instances" : ''].join('\n').trim());
|
|
50
|
+
}
|
|
51
|
+
}, 1000);
|
|
45
52
|
return () => {
|
|
53
|
+
clearTimeout(timer);
|
|
46
54
|
linkingHandlers.delete(handler);
|
|
47
55
|
};
|
|
48
56
|
}, [enabled, independent]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getActionFromState","getActionFromStateDefault","getStateFromPath","getStateFromPathDefault","useNavigationIndependentTree","React","Linking","Platform","getStateFromHref","linkingHandlers","Set","useLinking","ref","enabled","prefixes","filter","config","getInitialURL","Promise","race","resolve","setTimeout","subscribe","listener","callback","url","subscription","addEventListener","remove","independent","useEffect","process","env","NODE_ENV","undefined","size","console","error","OS","join","trim","
|
|
1
|
+
{"version":3,"names":["getActionFromState","getActionFromStateDefault","getStateFromPath","getStateFromPathDefault","useNavigationIndependentTree","React","Linking","Platform","getStateFromHref","linkingHandlers","Set","useLinking","ref","enabled","prefixes","filter","config","getInitialURL","Promise","race","resolve","setTimeout","subscribe","listener","callback","url","subscription","addEventListener","remove","independent","useEffect","process","env","NODE_ENV","undefined","handler","Symbol","add","timer","size","has","console","error","OS","join","trim","clearTimeout","delete","enabledRef","useRef","prefixesRef","filterRef","configRef","getInitialURLRef","getStateFromPathRef","getActionFromStateRef","current","getStateFromURL","useCallback","e","getInitialState","state","then","thenable","onfulfilled","navigation","REACT_NAVIGATION_DEVTOOLS","get","listeners","forEach","type","action","dispatch","warn","message","resetRoot"],"sourceRoot":"../../src","sources":["useLinking.native.tsx"],"mappings":";;AAAA,SACEA,kBAAkB,IAAIC,yBAAyB,EAC/CC,gBAAgB,IAAIC,uBAAuB,EAG3CC,4BAA4B,QACvB,wBAAwB;AAC/B,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,OAAO,EAAEC,QAAQ,QAAQ,cAAc;AAEhD,SAASC,gBAAgB,QAAQ,uBAAoB;AAQrD,MAAMC,eAAe,GAAG,IAAIC,GAAG,CAAS,CAAC;AAEzC,OAAO,SAASC,UAAUA,CACxBC,GAAkE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, type SFSymbolProps } from './native/SFSymbol';
|
|
|
7
7
|
export { NavigationContainer } from './NavigationContainer';
|
|
8
8
|
export { ServerContainer } from './ServerContainer';
|
|
9
9
|
export { DarkTheme } from './theming/DarkTheme';
|
|
10
|
-
export { DefaultTheme } from './theming/
|
|
10
|
+
export { LightTheme as DefaultTheme } from './theming/LightTheme';
|
|
11
|
+
export { MaterialDarkTheme, MaterialLightTheme } from './theming/MaterialTheme';
|
|
11
12
|
export * from './types';
|
|
12
13
|
export { useLinkBuilder } from './useLinkBuilder';
|
|
13
14
|
export { type LinkProps, useLinkProps } from './useLinkProps';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAChF,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,KAAK,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,cAAc,wBAAwB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const LightTheme: {
|
|
2
2
|
readonly dark: false;
|
|
3
3
|
readonly colors: {
|
|
4
4
|
readonly primary: "rgb(0, 122, 255)";
|
|
@@ -61,4 +61,4 @@ export declare const DefaultTheme: {
|
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
63
|
};
|
|
64
|
-
//# sourceMappingURL=
|
|
64
|
+
//# sourceMappingURL=LightTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LightTheme.d.ts","sourceRoot":"","sources":["../../../../src/theming/LightTheme.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWG,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
export declare const MaterialLightTheme: {
|
|
2
|
+
readonly dark: false;
|
|
3
|
+
readonly colors: {
|
|
4
|
+
readonly primary: import("react-native").OpaqueColorValue;
|
|
5
|
+
readonly background: import("react-native").OpaqueColorValue;
|
|
6
|
+
readonly card: import("react-native").OpaqueColorValue;
|
|
7
|
+
readonly text: import("react-native").OpaqueColorValue;
|
|
8
|
+
readonly border: import("react-native").OpaqueColorValue;
|
|
9
|
+
readonly notification: import("react-native").OpaqueColorValue;
|
|
10
|
+
};
|
|
11
|
+
readonly fonts: {
|
|
12
|
+
readonly regular: {
|
|
13
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
14
|
+
readonly fontWeight: "400";
|
|
15
|
+
};
|
|
16
|
+
readonly medium: {
|
|
17
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
18
|
+
readonly fontWeight: "500";
|
|
19
|
+
};
|
|
20
|
+
readonly bold: {
|
|
21
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
22
|
+
readonly fontWeight: "600";
|
|
23
|
+
};
|
|
24
|
+
readonly heavy: {
|
|
25
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
26
|
+
readonly fontWeight: "700";
|
|
27
|
+
};
|
|
28
|
+
} | {
|
|
29
|
+
readonly regular: {
|
|
30
|
+
readonly fontFamily: "System";
|
|
31
|
+
readonly fontWeight: "400";
|
|
32
|
+
};
|
|
33
|
+
readonly medium: {
|
|
34
|
+
readonly fontFamily: "System";
|
|
35
|
+
readonly fontWeight: "500";
|
|
36
|
+
};
|
|
37
|
+
readonly bold: {
|
|
38
|
+
readonly fontFamily: "System";
|
|
39
|
+
readonly fontWeight: "600";
|
|
40
|
+
};
|
|
41
|
+
readonly heavy: {
|
|
42
|
+
readonly fontFamily: "System";
|
|
43
|
+
readonly fontWeight: "700";
|
|
44
|
+
};
|
|
45
|
+
} | {
|
|
46
|
+
readonly regular: {
|
|
47
|
+
readonly fontFamily: "sans-serif";
|
|
48
|
+
readonly fontWeight: "normal";
|
|
49
|
+
};
|
|
50
|
+
readonly medium: {
|
|
51
|
+
readonly fontFamily: "sans-serif-medium";
|
|
52
|
+
readonly fontWeight: "normal";
|
|
53
|
+
};
|
|
54
|
+
readonly bold: {
|
|
55
|
+
readonly fontFamily: "sans-serif";
|
|
56
|
+
readonly fontWeight: "600";
|
|
57
|
+
};
|
|
58
|
+
readonly heavy: {
|
|
59
|
+
readonly fontFamily: "sans-serif";
|
|
60
|
+
readonly fontWeight: "700";
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export declare const MaterialDarkTheme: {
|
|
65
|
+
readonly dark: true;
|
|
66
|
+
readonly colors: {
|
|
67
|
+
readonly primary: import("react-native").OpaqueColorValue;
|
|
68
|
+
readonly background: import("react-native").OpaqueColorValue;
|
|
69
|
+
readonly card: import("react-native").OpaqueColorValue;
|
|
70
|
+
readonly text: import("react-native").OpaqueColorValue;
|
|
71
|
+
readonly border: import("react-native").OpaqueColorValue;
|
|
72
|
+
readonly notification: import("react-native").OpaqueColorValue;
|
|
73
|
+
};
|
|
74
|
+
readonly fonts: {
|
|
75
|
+
readonly regular: {
|
|
76
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
77
|
+
readonly fontWeight: "400";
|
|
78
|
+
};
|
|
79
|
+
readonly medium: {
|
|
80
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
81
|
+
readonly fontWeight: "500";
|
|
82
|
+
};
|
|
83
|
+
readonly bold: {
|
|
84
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
85
|
+
readonly fontWeight: "600";
|
|
86
|
+
};
|
|
87
|
+
readonly heavy: {
|
|
88
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
89
|
+
readonly fontWeight: "700";
|
|
90
|
+
};
|
|
91
|
+
} | {
|
|
92
|
+
readonly regular: {
|
|
93
|
+
readonly fontFamily: "System";
|
|
94
|
+
readonly fontWeight: "400";
|
|
95
|
+
};
|
|
96
|
+
readonly medium: {
|
|
97
|
+
readonly fontFamily: "System";
|
|
98
|
+
readonly fontWeight: "500";
|
|
99
|
+
};
|
|
100
|
+
readonly bold: {
|
|
101
|
+
readonly fontFamily: "System";
|
|
102
|
+
readonly fontWeight: "600";
|
|
103
|
+
};
|
|
104
|
+
readonly heavy: {
|
|
105
|
+
readonly fontFamily: "System";
|
|
106
|
+
readonly fontWeight: "700";
|
|
107
|
+
};
|
|
108
|
+
} | {
|
|
109
|
+
readonly regular: {
|
|
110
|
+
readonly fontFamily: "sans-serif";
|
|
111
|
+
readonly fontWeight: "normal";
|
|
112
|
+
};
|
|
113
|
+
readonly medium: {
|
|
114
|
+
readonly fontFamily: "sans-serif-medium";
|
|
115
|
+
readonly fontWeight: "normal";
|
|
116
|
+
};
|
|
117
|
+
readonly bold: {
|
|
118
|
+
readonly fontFamily: "sans-serif";
|
|
119
|
+
readonly fontWeight: "600";
|
|
120
|
+
};
|
|
121
|
+
readonly heavy: {
|
|
122
|
+
readonly fontFamily: "sans-serif";
|
|
123
|
+
readonly fontWeight: "700";
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=MaterialTheme.android.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaterialTheme.android.d.ts","sourceRoot":"","sources":["../../../../src/theming/MaterialTheme.android.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWL,CAAC;AAE3B,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWJ,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { Theme } from '@react-navigation/core';
|
|
2
|
+
export declare const MaterialLightTheme: {
|
|
3
|
+
readonly dark: false;
|
|
4
|
+
readonly colors: Theme["colors"];
|
|
5
|
+
readonly fonts: {
|
|
6
|
+
readonly regular: {
|
|
7
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
8
|
+
readonly fontWeight: "400";
|
|
9
|
+
};
|
|
10
|
+
readonly medium: {
|
|
11
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
12
|
+
readonly fontWeight: "500";
|
|
13
|
+
};
|
|
14
|
+
readonly bold: {
|
|
15
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
16
|
+
readonly fontWeight: "600";
|
|
17
|
+
};
|
|
18
|
+
readonly heavy: {
|
|
19
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
20
|
+
readonly fontWeight: "700";
|
|
21
|
+
};
|
|
22
|
+
} | {
|
|
23
|
+
readonly regular: {
|
|
24
|
+
readonly fontFamily: "System";
|
|
25
|
+
readonly fontWeight: "400";
|
|
26
|
+
};
|
|
27
|
+
readonly medium: {
|
|
28
|
+
readonly fontFamily: "System";
|
|
29
|
+
readonly fontWeight: "500";
|
|
30
|
+
};
|
|
31
|
+
readonly bold: {
|
|
32
|
+
readonly fontFamily: "System";
|
|
33
|
+
readonly fontWeight: "600";
|
|
34
|
+
};
|
|
35
|
+
readonly heavy: {
|
|
36
|
+
readonly fontFamily: "System";
|
|
37
|
+
readonly fontWeight: "700";
|
|
38
|
+
};
|
|
39
|
+
} | {
|
|
40
|
+
readonly regular: {
|
|
41
|
+
readonly fontFamily: "sans-serif";
|
|
42
|
+
readonly fontWeight: "normal";
|
|
43
|
+
};
|
|
44
|
+
readonly medium: {
|
|
45
|
+
readonly fontFamily: "sans-serif-medium";
|
|
46
|
+
readonly fontWeight: "normal";
|
|
47
|
+
};
|
|
48
|
+
readonly bold: {
|
|
49
|
+
readonly fontFamily: "sans-serif";
|
|
50
|
+
readonly fontWeight: "600";
|
|
51
|
+
};
|
|
52
|
+
readonly heavy: {
|
|
53
|
+
readonly fontFamily: "sans-serif";
|
|
54
|
+
readonly fontWeight: "700";
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export declare const MaterialDarkTheme: {
|
|
59
|
+
readonly dark: true;
|
|
60
|
+
readonly colors: Theme["colors"];
|
|
61
|
+
readonly fonts: {
|
|
62
|
+
readonly regular: {
|
|
63
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
64
|
+
readonly fontWeight: "400";
|
|
65
|
+
};
|
|
66
|
+
readonly medium: {
|
|
67
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
68
|
+
readonly fontWeight: "500";
|
|
69
|
+
};
|
|
70
|
+
readonly bold: {
|
|
71
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
72
|
+
readonly fontWeight: "600";
|
|
73
|
+
};
|
|
74
|
+
readonly heavy: {
|
|
75
|
+
readonly fontFamily: "system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
76
|
+
readonly fontWeight: "700";
|
|
77
|
+
};
|
|
78
|
+
} | {
|
|
79
|
+
readonly regular: {
|
|
80
|
+
readonly fontFamily: "System";
|
|
81
|
+
readonly fontWeight: "400";
|
|
82
|
+
};
|
|
83
|
+
readonly medium: {
|
|
84
|
+
readonly fontFamily: "System";
|
|
85
|
+
readonly fontWeight: "500";
|
|
86
|
+
};
|
|
87
|
+
readonly bold: {
|
|
88
|
+
readonly fontFamily: "System";
|
|
89
|
+
readonly fontWeight: "600";
|
|
90
|
+
};
|
|
91
|
+
readonly heavy: {
|
|
92
|
+
readonly fontFamily: "System";
|
|
93
|
+
readonly fontWeight: "700";
|
|
94
|
+
};
|
|
95
|
+
} | {
|
|
96
|
+
readonly regular: {
|
|
97
|
+
readonly fontFamily: "sans-serif";
|
|
98
|
+
readonly fontWeight: "normal";
|
|
99
|
+
};
|
|
100
|
+
readonly medium: {
|
|
101
|
+
readonly fontFamily: "sans-serif-medium";
|
|
102
|
+
readonly fontWeight: "normal";
|
|
103
|
+
};
|
|
104
|
+
readonly bold: {
|
|
105
|
+
readonly fontFamily: "sans-serif";
|
|
106
|
+
readonly fontWeight: "600";
|
|
107
|
+
};
|
|
108
|
+
readonly heavy: {
|
|
109
|
+
readonly fontFamily: "sans-serif";
|
|
110
|
+
readonly fontWeight: "700";
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
//# sourceMappingURL=MaterialTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaterialTheme.d.ts","sourceRoot":"","sources":["../../../../src/theming/MaterialTheme.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAIpD,eAAO,MAAM,kBAAkB;;qBAEf,KAAK,CAAC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIL,CAAC;AAE3B,eAAO,MAAM,iBAAiB;;qBAEd,KAAK,CAAC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLinking.native.d.ts","sourceRoot":"","sources":["../../../src/useLinking.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAEnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAI9C,KAAK,OAAO,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;AAI7C,wBAAgB,UAAU,CACxB,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,EAClE,EACE,OAAc,EACd,QAAgB,EAChB,MAAM,EACN,MAAM,EACN,aAQI,EACJ,SAQC,EACD,gBAA0C,EAC1C,kBAA8C,GAC/C,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useLinking.native.d.ts","sourceRoot":"","sources":["../../../src/useLinking.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAEnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAI9C,KAAK,OAAO,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;AAI7C,wBAAgB,UAAU,CACxB,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,EAClE,EACE,OAAc,EACd,QAAgB,EAChB,MAAM,EACN,MAAM,EACN,aAQI,EACJ,SAQC,EACD,gBAA0C,EAC1C,kBAA8C,GAC/C,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyKX"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-navigation/native",
|
|
3
3
|
"description": "React Native integration for React Navigation",
|
|
4
|
-
"version": "8.0.0-alpha.
|
|
4
|
+
"version": "8.0.0-alpha.9",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
7
7
|
"react-navigation",
|
|
@@ -118,5 +118,5 @@
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "50f082713bccec33aa2cab55481804707aa8af08"
|
|
122
122
|
}
|
|
@@ -18,7 +18,7 @@ import { I18nManager, Platform } from 'react-native';
|
|
|
18
18
|
|
|
19
19
|
import { LinkingContext } from './LinkingContext';
|
|
20
20
|
import { LocaleDirContext } from './LocaleDirContext';
|
|
21
|
-
import {
|
|
21
|
+
import { LightTheme } from './theming/LightTheme';
|
|
22
22
|
import type {
|
|
23
23
|
DocumentTitleOptions,
|
|
24
24
|
LinkingOptions,
|
|
@@ -114,7 +114,7 @@ const RESTORE_STATE_ERROR =
|
|
|
114
114
|
function NavigationContainerInner(
|
|
115
115
|
{
|
|
116
116
|
direction = I18nManager.getConstants().isRTL ? 'rtl' : 'ltr',
|
|
117
|
-
theme =
|
|
117
|
+
theme = LightTheme,
|
|
118
118
|
linking,
|
|
119
119
|
persistor,
|
|
120
120
|
fallback = null,
|
package/src/index.tsx
CHANGED
|
@@ -10,7 +10,8 @@ export { SFSymbol, type SFSymbolProps } from './native/SFSymbol';
|
|
|
10
10
|
export { NavigationContainer } from './NavigationContainer';
|
|
11
11
|
export { ServerContainer } from './ServerContainer';
|
|
12
12
|
export { DarkTheme } from './theming/DarkTheme';
|
|
13
|
-
export { DefaultTheme } from './theming/
|
|
13
|
+
export { LightTheme as DefaultTheme } from './theming/LightTheme';
|
|
14
|
+
export { MaterialDarkTheme, MaterialLightTheme } from './theming/MaterialTheme';
|
|
14
15
|
export * from './types';
|
|
15
16
|
export { useLinkBuilder } from './useLinkBuilder';
|
|
16
17
|
export { type LinkProps, useLinkProps } from './useLinkProps';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Theme } from '@react-navigation/core';
|
|
2
|
+
import { PlatformColor } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { fonts } from './fonts';
|
|
5
|
+
|
|
6
|
+
export const MaterialLightTheme = {
|
|
7
|
+
dark: false,
|
|
8
|
+
colors: {
|
|
9
|
+
primary: PlatformColor('@android:color/system_primary_light'),
|
|
10
|
+
background: PlatformColor('@android:color/system_surface_container_light'),
|
|
11
|
+
card: PlatformColor('@android:color/system_background_light'),
|
|
12
|
+
text: PlatformColor('@android:color/system_on_surface_light'),
|
|
13
|
+
border: PlatformColor('@android:color/system_outline_variant_light'),
|
|
14
|
+
notification: PlatformColor('@android:color/system_error_light'),
|
|
15
|
+
},
|
|
16
|
+
fonts,
|
|
17
|
+
} as const satisfies Theme;
|
|
18
|
+
|
|
19
|
+
export const MaterialDarkTheme = {
|
|
20
|
+
dark: true,
|
|
21
|
+
colors: {
|
|
22
|
+
primary: PlatformColor('@android:color/system_primary_dark'),
|
|
23
|
+
background: PlatformColor('@android:color/system_surface_container_dark'),
|
|
24
|
+
card: PlatformColor('@android:color/system_background_dark'),
|
|
25
|
+
text: PlatformColor('@android:color/system_on_surface_dark'),
|
|
26
|
+
border: PlatformColor('@android:color/system_outline_variant_dark'),
|
|
27
|
+
notification: PlatformColor('@android:color/system_error_dark'),
|
|
28
|
+
},
|
|
29
|
+
fonts,
|
|
30
|
+
} as const satisfies Theme;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Theme } from '@react-navigation/core';
|
|
2
|
+
|
|
3
|
+
import { fonts } from './fonts';
|
|
4
|
+
|
|
5
|
+
export const MaterialLightTheme = {
|
|
6
|
+
dark: false,
|
|
7
|
+
get colors(): Theme['colors'] {
|
|
8
|
+
throw new Error('MaterialLightTheme is only supported on Android');
|
|
9
|
+
},
|
|
10
|
+
fonts,
|
|
11
|
+
} as const satisfies Theme;
|
|
12
|
+
|
|
13
|
+
export const MaterialDarkTheme = {
|
|
14
|
+
dark: true,
|
|
15
|
+
get colors(): Theme['colors'] {
|
|
16
|
+
throw new Error('MaterialDarkTheme is only supported on Android');
|
|
17
|
+
},
|
|
18
|
+
fonts,
|
|
19
|
+
} as const satisfies Theme;
|
|
@@ -58,28 +58,39 @@ export function useLinking(
|
|
|
58
58
|
return undefined;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
if (enabled !== false && linkingHandlers.size) {
|
|
62
|
-
console.error(
|
|
63
|
-
[
|
|
64
|
-
'Looks like you have configured linking in multiple places. This is likely an error since deep links should only be handled in one place to avoid conflicts. Make sure that:',
|
|
65
|
-
"- You don't have multiple NavigationContainers in the app each with 'linking' enabled",
|
|
66
|
-
'- Only a single instance of the root component is rendered',
|
|
67
|
-
Platform.OS === 'android'
|
|
68
|
-
? "- You have set 'android:launchMode=singleTask' in the '<activity />' section of the 'AndroidManifest.xml' file to avoid launching multiple instances"
|
|
69
|
-
: '',
|
|
70
|
-
]
|
|
71
|
-
.join('\n')
|
|
72
|
-
.trim()
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
61
|
const handler = Symbol();
|
|
77
62
|
|
|
78
63
|
if (enabled !== false) {
|
|
79
64
|
linkingHandlers.add(handler);
|
|
80
65
|
}
|
|
81
66
|
|
|
67
|
+
// In some cases, the effect cleanup may get called out of order
|
|
68
|
+
// This may result in multiple linking handlers being registered
|
|
69
|
+
// For example, when changing the wallpaper on Android
|
|
70
|
+
// Showing the error in a delay avoids false positives
|
|
71
|
+
const timer = setTimeout(() => {
|
|
72
|
+
if (
|
|
73
|
+
enabled !== false &&
|
|
74
|
+
linkingHandlers.size &&
|
|
75
|
+
!(linkingHandlers.size === 1 && linkingHandlers.has(handler))
|
|
76
|
+
) {
|
|
77
|
+
console.error(
|
|
78
|
+
[
|
|
79
|
+
'Looks like you have configured linking in multiple places. This is likely an error since deep links should only be handled in one place to avoid conflicts. Make sure that:',
|
|
80
|
+
"- You don't have multiple NavigationContainers in the app each with 'linking' enabled",
|
|
81
|
+
'- Only a single instance of the root component is rendered',
|
|
82
|
+
Platform.OS === 'android'
|
|
83
|
+
? "- You have set 'android:launchMode=singleTask' in the '<activity />' section of the 'AndroidManifest.xml' file to avoid launching multiple instances"
|
|
84
|
+
: '',
|
|
85
|
+
]
|
|
86
|
+
.join('\n')
|
|
87
|
+
.trim()
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
}, 1000);
|
|
91
|
+
|
|
82
92
|
return () => {
|
|
93
|
+
clearTimeout(timer);
|
|
83
94
|
linkingHandlers.delete(handler);
|
|
84
95
|
};
|
|
85
96
|
}, [enabled, independent]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["fonts","DefaultTheme","dark","colors","primary","background","card","text","border","notification"],"sourceRoot":"../../../src","sources":["theming/DefaultTheme.tsx"],"mappings":";;AAEA,SAASA,KAAK,QAAQ,YAAS;AAE/B,OAAO,MAAMC,YAAY,GAAG;EAC1BC,IAAI,EAAE,KAAK;EACXC,MAAM,EAAE;IACNC,OAAO,EAAE,kBAAkB;IAC3BC,UAAU,EAAE,oBAAoB;IAChCC,IAAI,EAAE,oBAAoB;IAC1BC,IAAI,EAAE,iBAAiB;IACvBC,MAAM,EAAE,oBAAoB;IAC5BC,YAAY,EAAE;EAChB,CAAC;EACDT;AACF,CAA0B","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultTheme.d.ts","sourceRoot":"","sources":["../../../../src/theming/DefaultTheme.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWC,CAAC"}
|