@gaddario98/react-native-core 1.0.32 → 2.0.0

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.
Files changed (60) hide show
  1. package/LICENSE.txt +20 -20
  2. package/README.md +15 -15
  3. package/dist/auth/index.d.ts +1 -1
  4. package/dist/auth/index.js +1 -1
  5. package/dist/auth/index.mjs +1 -1
  6. package/dist/config/index.d.ts +11 -16
  7. package/dist/config/index.js +122 -25
  8. package/dist/config/index.js.map +1 -1
  9. package/dist/config/index.mjs +122 -25
  10. package/dist/config/index.mjs.map +1 -1
  11. package/dist/expo/index.d.ts +17 -1
  12. package/dist/expo/index.js +445 -1
  13. package/dist/expo/index.js.map +1 -1
  14. package/dist/expo/index.mjs +445 -1
  15. package/dist/expo/index.mjs.map +1 -1
  16. package/dist/form/index.d.ts +1 -1
  17. package/dist/form/index.js +1 -1
  18. package/dist/form/index.mjs +1 -1
  19. package/dist/index.d.ts +160 -26
  20. package/dist/index.js +1 -26
  21. package/dist/index.js.map +1 -1
  22. package/dist/index.mjs +1 -26
  23. package/dist/index.mjs.map +1 -1
  24. package/dist/layouts/index.d.ts +30 -1
  25. package/dist/layouts/index.js +43 -1
  26. package/dist/layouts/index.js.map +1 -1
  27. package/dist/layouts/index.mjs +43 -1
  28. package/dist/layouts/index.mjs.map +1 -1
  29. package/dist/localization/index.d.ts +1 -1
  30. package/dist/localization/index.js +1 -1
  31. package/dist/localization/index.mjs +1 -1
  32. package/dist/pages/index.d.ts +11 -1
  33. package/dist/pages/index.js +231 -1
  34. package/dist/pages/index.js.map +1 -1
  35. package/dist/pages/index.mjs +231 -1
  36. package/dist/pages/index.mjs.map +1 -1
  37. package/dist/providers/index.d.ts +18 -1
  38. package/dist/providers/index.js +24 -1
  39. package/dist/providers/index.js.map +1 -1
  40. package/dist/providers/index.mjs +24 -1
  41. package/dist/providers/index.mjs.map +1 -1
  42. package/dist/queries/index.d.ts +1 -1
  43. package/dist/queries/index.js +1 -1
  44. package/dist/queries/index.mjs +1 -1
  45. package/dist/state/index.d.ts +10 -1
  46. package/dist/state/index.js +241 -1
  47. package/dist/state/index.js.map +1 -1
  48. package/dist/state/index.mjs +241 -1
  49. package/dist/state/index.mjs.map +1 -1
  50. package/dist/tabs/index.d.ts +89 -1
  51. package/dist/tabs/index.js +485 -1
  52. package/dist/tabs/index.js.map +1 -1
  53. package/dist/tabs/index.mjs +485 -1
  54. package/dist/tabs/index.mjs.map +1 -1
  55. package/dist/utiles/index.d.ts +5 -1
  56. package/dist/utiles/index.js +3 -1
  57. package/dist/utiles/index.js.map +1 -1
  58. package/dist/utiles/index.mjs +3 -1
  59. package/dist/utiles/index.mjs.map +1 -1
  60. package/package.json +181 -153
package/dist/index.d.ts CHANGED
@@ -1,29 +1,163 @@
1
- export * from '@gaddario98/react-auth';
2
- import { PageConfigProps } from '@gaddario98/react-native-pages';
3
- export * from '@gaddario98/react-native-pages';
4
- import { setI18nInitializer, setTranslationAdapter } from '@gaddario98/react-localization';
5
- export * from '@gaddario98/react-localization';
6
- import { AppLinks } from '@gaddario98/react-native-utiles';
7
- export * from '@gaddario98/react-native-utiles';
8
- export * from '@gaddario98/expo';
9
- export * from '@gaddario98/react-form';
10
- export * from '@gaddario98/react-native-layouts';
11
- export * from '@gaddario98/react-native-providers';
12
- export * from '@gaddario98/react-queries';
13
- export * from '@gaddario98/react-native-state';
14
- export * from '@gaddario98/react-native-tabs';
15
-
16
- interface SetReactNativeConfigProps {
17
- pages: Partial<PageConfigProps>;
18
- endpoints: Record<string, string>;
19
- links: Partial<AppLinks>;
20
- localization?: {
21
- i18nInitializer: Parameters<typeof setI18nInitializer>[0];
22
- translationAdapter: Parameters<typeof setTranslationAdapter>[0];
23
- localResources?: Record<string, object>;
1
+ export * from '@gaddario98/react-core/auth';
2
+ import * as _tanstack_query_persist_client_core from '@tanstack/query-persist-client-core';
3
+ import { CoreConfig } from '@gaddario98/react-core';
4
+ import * as React$1 from 'react';
5
+ import React__default from 'react';
6
+ import * as Notifications from 'expo-notifications';
7
+ import { FieldValues } from '@gaddario98/react-core/form';
8
+ export * from '@gaddario98/react-core/form';
9
+ import * as react_jsx_runtime from 'react/jsx-runtime';
10
+ import { NativeStackHeaderProps, NativeStackNavigationOptions } from '@react-navigation/native-stack';
11
+ import { Href, HrefObject } from 'expo-router';
12
+ export * from '@gaddario98/react-core/localization';
13
+ import { DefaultContainerProps, ViewSettings } from '@gaddario98/react-core/pages';
14
+ export * from '@gaddario98/react-core/pages';
15
+ import { QueriesArray } from '@gaddario98/react-core/queries';
16
+ export * from '@gaddario98/react-core/queries';
17
+ import { StyleProp, ViewStyle, TextStyle } from 'react-native';
18
+ export * from '@gaddario98/react-core/utiles';
19
+ export { AtomGeneratorOptions, AtomState, PrimitiveAtom, SyncStorage, atomStateGenerator } from '@gaddario98/react-core/state';
20
+
21
+ declare const asyncStoragePersister: _tanstack_query_persist_client_core.Persister;
22
+ declare const useReactNativeCoreConfig: (props: Partial<CoreConfig>) => void;
23
+
24
+ declare const ReactNativeCoreProvider: ({ children, coreConfig, }: {
25
+ children: React.ReactNode;
26
+ coreConfig?: Partial<CoreConfig>;
27
+ }) => React$1.ReactNode;
28
+
29
+ type NotificationPermissionStatus = "granted" | "denied" | "undetermined";
30
+ interface UseNotificationsReturn {
31
+ expoPushToken: string;
32
+ permissionStatus: NotificationPermissionStatus | null;
33
+ initializeNotifications: (id: string) => Promise<void>;
34
+ sendLocalNotification: (title: string, body: string, data?: Record<string, unknown>) => Promise<void>;
35
+ }
36
+ interface Props {
37
+ updateToken: (token: string) => Promise<void>;
38
+ setNotification: (notification: Notifications.Notification) => void;
39
+ }
40
+ declare const useExpoNotifications: ({ updateToken, setNotification, }: Props) => UseNotificationsReturn;
41
+
42
+ interface Screen {
43
+ name: string;
44
+ requireAuth?: boolean;
45
+ hideIfAuth?: boolean;
46
+ ns?: string;
47
+ userType?: string;
48
+ redirectTo?: Href | "tab";
49
+ header?: (props: NativeStackHeaderProps) => React.ReactNode;
50
+ options?: NativeStackNavigationOptions;
51
+ }
52
+ interface LayoutGeneratorProps {
53
+ screens: Screen[];
54
+ userType?: string;
55
+ initialRouteName?: string;
56
+ }
57
+ interface LayoutGeneratorConfig {
58
+ header?: (props: NativeStackHeaderProps) => React.ReactNode;
59
+ }
60
+
61
+ declare const LayoutGenerator: ({ screens, userType, initialRouteName, }: LayoutGeneratorProps) => react_jsx_runtime.JSX.Element;
62
+
63
+ declare let layoutGeneratorConfig: LayoutGeneratorConfig;
64
+ declare const setLayoutGeneratorConfig: (config: LayoutGeneratorConfig) => void;
65
+
66
+ declare const DefaultView: <F extends FieldValues, Q extends QueriesArray, V extends Record<string, unknown>>({ viewSettings, handleRefresh, children, }: DefaultContainerProps<F, Q, V>) => react_jsx_runtime.JSX.Element;
67
+
68
+ declare const Element: <F extends FieldValues = FieldValues, Q extends QueriesArray = QueriesArray, V extends Record<string, unknown> = Record<string, unknown>>({ children, withoutPadding, }: Omit<DefaultContainerProps<F, Q, V>, "viewSettings"> & ViewSettings["header"]) => react_jsx_runtime.JSX.Element;
69
+
70
+ declare const storage: {
71
+ getItem: (key: string) => Promise<string | null>;
72
+ setItem: (key: string, value: string) => Promise<void>;
73
+ removeItem: (key: string) => Promise<void>;
74
+ };
75
+ declare const setReactNativeStorage: () => void;
76
+
77
+ interface TabItemConfig {
78
+ name: string;
79
+ tabBarIcon?: (props: {
80
+ focused: boolean;
81
+ color: string;
82
+ size: number;
83
+ }) => React__default.ReactNode;
84
+ title?: string;
85
+ initialParams?: Record<string, any>;
86
+ href?: string | HrefObject;
87
+ badge?: number | string;
88
+ badgeColor?: string;
89
+ badgeTextColor?: string;
90
+ accessibilityLabel?: string;
91
+ }
92
+ type TabBarVariant = "auto" | "top" | "bottom";
93
+ type BarShadow = {
94
+ color?: string;
95
+ opacity?: number;
96
+ radius?: number;
97
+ offset?: {
98
+ height: number;
99
+ width: number;
100
+ };
101
+ elevation?: number;
102
+ };
103
+ type BarBorder = {
104
+ width?: number;
105
+ color?: string;
106
+ topOnly?: boolean;
107
+ };
108
+ interface TabLayoutProps {
109
+ tabs: Array<TabItemConfig>;
110
+ ns?: string;
111
+ initialRouteName?: string;
112
+ translateTitles?: boolean;
113
+ onTabChange?: (prev: string | undefined, next: string) => void;
114
+ bar?: {
115
+ height?: number;
116
+ position?: "absolute" | "relative";
117
+ margin?: {
118
+ bottom?: number;
119
+ horizontal?: number;
120
+ };
121
+ padding?: {
122
+ top?: number;
123
+ bottom?: number;
124
+ horizontal?: number;
125
+ };
126
+ rounded?: boolean | number;
127
+ radius?: number | {
128
+ topLeft?: number;
129
+ topRight?: number;
130
+ bottomLeft?: number;
131
+ bottomRight?: number;
132
+ };
133
+ colors?: {
134
+ background?: string;
135
+ activeTint?: string;
136
+ inactiveTint?: string;
137
+ border?: string;
138
+ shadow?: string;
139
+ surface?: string;
140
+ secondary?: string;
141
+ onSecondary?: string;
142
+ };
143
+ shadow?: boolean | BarShadow;
144
+ border?: boolean | BarBorder;
145
+ glass?: boolean | {
146
+ alpha?: number;
147
+ };
148
+ compact?: boolean;
149
+ useSafeAreaInset?: boolean;
150
+ style?: StyleProp<ViewStyle>;
151
+ itemStyle?: StyleProp<ViewStyle>;
152
+ labelStyle?: StyleProp<TextStyle>;
153
+ glowItemStyle?: StyleProp<ViewStyle>;
24
154
  };
25
155
  }
26
- declare const setReactNativeConfig: ({ pages, endpoints, localization, links, }: SetReactNativeConfigProps) => void;
156
+ declare const _default: React__default.NamedExoticComponent<TabLayoutProps>;
157
+
158
+ declare const useActiveTab: <T extends string>() => T;
159
+
160
+ declare const openLink: (url: string) => void;
27
161
 
28
- export { setReactNativeConfig };
29
- export type { SetReactNativeConfigProps };
162
+ export { DefaultView, Element, LayoutGenerator, ReactNativeCoreProvider, _default as TabLayout, asyncStoragePersister, layoutGeneratorConfig, openLink, setLayoutGeneratorConfig, setReactNativeStorage, storage, useActiveTab, useExpoNotifications, useReactNativeCoreConfig };
163
+ export type { LayoutGeneratorConfig, LayoutGeneratorProps, Screen, TabBarVariant, TabItemConfig, TabLayoutProps, UseNotificationsReturn };
package/dist/index.js CHANGED
@@ -1,26 +1 @@
1
- 'use strict';var reactAuth=require('@gaddario98/react-auth'),jsxRuntime=require('react/jsx-runtime'),reactNativeState=require('@gaddario98/react-native-state'),reactQueries=require('@gaddario98/react-queries'),reactNativePages=require('@gaddario98/react-native-pages'),reactLocalization=require('@gaddario98/react-localization'),reactNativeUtiles=require('@gaddario98/react-native-utiles'),reactNative=require('react-native'),reactForm=require('@gaddario98/react-form'),expo=require('@gaddario98/expo'),reactNativeLayouts=require('@gaddario98/react-native-layouts'),reactNativeProviders=require('@gaddario98/react-native-providers'),reactNativeTabs=require('@gaddario98/react-native-tabs');var setReactNativeConfig = function setReactNativeConfig(_ref) {
2
- var pages = _ref.pages,
3
- endpoints = _ref.endpoints,
4
- localization = _ref.localization,
5
- links = _ref.links;
6
- if (localization === null || localization === void 0 ? void 0 : localization.i18nInitializer) {
7
- reactLocalization.setI18nInitializer(localization.i18nInitializer);
8
- }
9
- if (localization === null || localization === void 0 ? void 0 : localization.translationAdapter) {
10
- reactLocalization.setTranslationAdapter(localization.translationAdapter);
11
- }
12
- if (localization === null || localization === void 0 ? void 0 : localization.localResources) {
13
- reactLocalization.initializeI18n(localization.localResources);
14
- }
15
- reactNativeState.setReactNativeStorage();
16
- reactNativePages.setReactNativePageConfig(pages);
17
- reactQueries.setEndpoints(endpoints);
18
- reactNativeUtiles.setAppLinks(links);
19
- reactForm.setDefaultFormContainer(function (_ref2) {
20
- var children = _ref2.children;
21
- return jsxRuntime.jsx(reactNative.KeyboardAvoidingView, {
22
- behavior: reactNative.Platform.OS === "ios" ? "padding" : undefined,
23
- children: children
24
- });
25
- });
26
- };exports.setReactNativeConfig=setReactNativeConfig;Object.keys(reactAuth).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return reactAuth[k]}})});Object.keys(reactNativeState).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return reactNativeState[k]}})});Object.keys(reactQueries).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return reactQueries[k]}})});Object.keys(reactNativePages).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return reactNativePages[k]}})});Object.keys(reactLocalization).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return reactLocalization[k]}})});Object.keys(reactNativeUtiles).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return reactNativeUtiles[k]}})});Object.keys(reactForm).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return reactForm[k]}})});Object.keys(expo).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return expo[k]}})});Object.keys(reactNativeLayouts).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return reactNativeLayouts[k]}})});Object.keys(reactNativeProviders).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return reactNativeProviders[k]}})});Object.keys(reactNativeTabs).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return reactNativeTabs[k]}})});//# sourceMappingURL=index.js.map
1
+ 'use strict';var index_ts=require('./auth/index.js'),index_ts$1=require('./config/index.ts'),index_ts$2=require('./expo/index.js'),index_ts$3=require('./form/index.js'),index_ts$4=require('./layouts/index.js'),index_ts$5=require('./localization/index.js'),index_ts$6=require('./pages/index.js'),index_ts$7=require('./queries/index.js'),index_ts$8=require('./state/index.js'),index_ts$9=require('./tabs/index.js'),index_ts$a=require('./utiles/index.js');Object.keys(index_ts).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return index_ts[k]}})});Object.keys(index_ts$1).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return index_ts$1[k]}})});Object.keys(index_ts$2).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return index_ts$2[k]}})});Object.keys(index_ts$3).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return index_ts$3[k]}})});Object.keys(index_ts$4).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return index_ts$4[k]}})});Object.keys(index_ts$5).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return index_ts$5[k]}})});Object.keys(index_ts$6).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return index_ts$6[k]}})});Object.keys(index_ts$7).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return index_ts$7[k]}})});Object.keys(index_ts$8).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return index_ts$8[k]}})});Object.keys(index_ts$9).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return index_ts$9[k]}})});Object.keys(index_ts$a).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return index_ts$a[k]}})});//# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../config/index.tsx"],"sourcesContent":["import { setReactNativeStorage } from \"../state\";\r\nimport { setEndpoints } from \"../queries\";\r\nimport { PageConfigProps, setReactNativePageConfig } from \"../pages\";\r\nimport {\r\n initializeI18n,\r\n setI18nInitializer,\r\n setTranslationAdapter,\r\n} from \"../localization\";\r\nimport { AppLinks, setAppLinks } from \"../utiles\";\r\nimport { KeyboardAvoidingView, Platform } from \"react-native\";\r\nimport { setDefaultFormContainer } from \"../form\";\r\n\r\nexport interface SetReactNativeConfigProps {\r\n pages: Partial<PageConfigProps>;\r\n endpoints: Record<string, string>;\r\n links: Partial<AppLinks>;\r\n localization?: {\r\n i18nInitializer: Parameters<typeof setI18nInitializer>[0];\r\n translationAdapter: Parameters<typeof setTranslationAdapter>[0];\r\n localResources?: Record<string, object>;\r\n };\r\n}\r\n\r\nexport const setReactNativeConfig = ({\r\n pages,\r\n endpoints,\r\n localization,\r\n links,\r\n}: SetReactNativeConfigProps) => {\r\n if (localization?.i18nInitializer) {\r\n setI18nInitializer(localization.i18nInitializer);\r\n }\r\n if (localization?.translationAdapter) {\r\n setTranslationAdapter(localization.translationAdapter);\r\n }\r\n if (localization?.localResources) {\r\n initializeI18n(localization.localResources);\r\n }\r\n setReactNativeStorage();\r\n setReactNativePageConfig(pages);\r\n setEndpoints(endpoints);\r\n setAppLinks(links);\r\n setDefaultFormContainer(({ children }) => {\r\n return (\r\n <KeyboardAvoidingView\r\n behavior={Platform.OS === \"ios\" ? \"padding\" : undefined}\r\n >\r\n {children}\r\n </KeyboardAvoidingView>\r\n );\r\n });\r\n};\r\n"],"names":["setReactNativeConfig","_ref","pages","endpoints","localization","links","i18nInitializer","setI18nInitializer","translationAdapter","setTranslationAdapter","localResources","initializeI18n","setReactNativeStorage","setReactNativePageConfig","setEndpoints","setAppLinks","setDefaultFormContainer","_ref2","children","_jsx","KeyboardAvoidingView","behavior","Platform","OS","undefined"],"mappings":"srBAuBaA,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAAC,IAAA,EAKD;AAAA,EAAA,IAJ9BC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,YAAY,GAAAH,IAAA,CAAZG,YAAY;IACZC,KAAK,GAAAJ,IAAA,CAALI,KAAK;AAEL,EAAA,IAAID,YAAY,aAAZA,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZA,YAAY,CAAEE,eAAe,EAAE;AACjCC,IAAAA,oCAAkB,CAACH,YAAY,CAACE,eAAe,CAAC;AAClD,EAAA;AACA,EAAA,IAAIF,YAAY,aAAZA,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZA,YAAY,CAAEI,kBAAkB,EAAE;AACpCC,IAAAA,uCAAqB,CAACL,YAAY,CAACI,kBAAkB,CAAC;AACxD,EAAA;AACA,EAAA,IAAIJ,YAAY,aAAZA,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZA,YAAY,CAAEM,cAAc,EAAE;AAChCC,IAAAA,gCAAc,CAACP,YAAY,CAACM,cAAc,CAAC;AAC7C,EAAA;AACAE,EAAAA,sCAAqB,EAAE;EACvBC,yCAAwB,CAACX,KAAK,CAAC;EAC/BY,yBAAY,CAACX,SAAS,CAAC;EACvBY,6BAAW,CAACV,KAAK,CAAC;EAClBW,iCAAuB,CAAC,UAAAC,KAAA,EAAiB;AAAA,IAAA,IAAdC,QAAQ,GAAAD,KAAA,CAARC,QAAQ;IACjC,OACEC,eAACC,gCAAoB,EAAA;MACnBC,QAAQ,EAAEC,oBAAQ,CAACC,EAAE,KAAK,KAAK,GAAG,SAAS,GAAGC,SAAS;AAAAN,MAAAA,QAAA,EAEtDA;AAAQ,KAAA,CACY;AAE3B,EAAA,CAAC,CAAC;AACJ"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index.mjs CHANGED
@@ -1,26 +1 @@
1
- export*from'@gaddario98/react-auth';import {jsx}from'react/jsx-runtime';import {setReactNativeStorage}from'@gaddario98/react-native-state';export*from'@gaddario98/react-native-state';import {setEndpoints}from'@gaddario98/react-queries';export*from'@gaddario98/react-queries';import {setReactNativePageConfig}from'@gaddario98/react-native-pages';export*from'@gaddario98/react-native-pages';import {setI18nInitializer,setTranslationAdapter,initializeI18n}from'@gaddario98/react-localization';export*from'@gaddario98/react-localization';import {setAppLinks}from'@gaddario98/react-native-utiles';export*from'@gaddario98/react-native-utiles';import {KeyboardAvoidingView,Platform}from'react-native';import {setDefaultFormContainer}from'@gaddario98/react-form';export*from'@gaddario98/react-form';export*from'@gaddario98/expo';export*from'@gaddario98/react-native-layouts';export*from'@gaddario98/react-native-providers';export*from'@gaddario98/react-native-tabs';var setReactNativeConfig = function setReactNativeConfig(_ref) {
2
- var pages = _ref.pages,
3
- endpoints = _ref.endpoints,
4
- localization = _ref.localization,
5
- links = _ref.links;
6
- if (localization === null || localization === void 0 ? void 0 : localization.i18nInitializer) {
7
- setI18nInitializer(localization.i18nInitializer);
8
- }
9
- if (localization === null || localization === void 0 ? void 0 : localization.translationAdapter) {
10
- setTranslationAdapter(localization.translationAdapter);
11
- }
12
- if (localization === null || localization === void 0 ? void 0 : localization.localResources) {
13
- initializeI18n(localization.localResources);
14
- }
15
- setReactNativeStorage();
16
- setReactNativePageConfig(pages);
17
- setEndpoints(endpoints);
18
- setAppLinks(links);
19
- setDefaultFormContainer(function (_ref2) {
20
- var children = _ref2.children;
21
- return jsx(KeyboardAvoidingView, {
22
- behavior: Platform.OS === "ios" ? "padding" : undefined,
23
- children: children
24
- });
25
- });
26
- };export{setReactNativeConfig};//# sourceMappingURL=index.mjs.map
1
+ export*from'./auth/index.mjs';export*from'./config/index.ts';export*from'./expo/index.mjs';export*from'./form/index.mjs';export*from'./layouts/index.mjs';export*from'./localization/index.mjs';export*from'./pages/index.mjs';export*from'./queries/index.mjs';export*from'./state/index.mjs';export*from'./tabs/index.mjs';export*from'./utiles/index.mjs';//# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../config/index.tsx"],"sourcesContent":["import { setReactNativeStorage } from \"../state\";\r\nimport { setEndpoints } from \"../queries\";\r\nimport { PageConfigProps, setReactNativePageConfig } from \"../pages\";\r\nimport {\r\n initializeI18n,\r\n setI18nInitializer,\r\n setTranslationAdapter,\r\n} from \"../localization\";\r\nimport { AppLinks, setAppLinks } from \"../utiles\";\r\nimport { KeyboardAvoidingView, Platform } from \"react-native\";\r\nimport { setDefaultFormContainer } from \"../form\";\r\n\r\nexport interface SetReactNativeConfigProps {\r\n pages: Partial<PageConfigProps>;\r\n endpoints: Record<string, string>;\r\n links: Partial<AppLinks>;\r\n localization?: {\r\n i18nInitializer: Parameters<typeof setI18nInitializer>[0];\r\n translationAdapter: Parameters<typeof setTranslationAdapter>[0];\r\n localResources?: Record<string, object>;\r\n };\r\n}\r\n\r\nexport const setReactNativeConfig = ({\r\n pages,\r\n endpoints,\r\n localization,\r\n links,\r\n}: SetReactNativeConfigProps) => {\r\n if (localization?.i18nInitializer) {\r\n setI18nInitializer(localization.i18nInitializer);\r\n }\r\n if (localization?.translationAdapter) {\r\n setTranslationAdapter(localization.translationAdapter);\r\n }\r\n if (localization?.localResources) {\r\n initializeI18n(localization.localResources);\r\n }\r\n setReactNativeStorage();\r\n setReactNativePageConfig(pages);\r\n setEndpoints(endpoints);\r\n setAppLinks(links);\r\n setDefaultFormContainer(({ children }) => {\r\n return (\r\n <KeyboardAvoidingView\r\n behavior={Platform.OS === \"ios\" ? \"padding\" : undefined}\r\n >\r\n {children}\r\n </KeyboardAvoidingView>\r\n );\r\n });\r\n};\r\n"],"names":["setReactNativeConfig","_ref","pages","endpoints","localization","links","i18nInitializer","setI18nInitializer","translationAdapter","setTranslationAdapter","localResources","initializeI18n","setReactNativeStorage","setReactNativePageConfig","setEndpoints","setAppLinks","setDefaultFormContainer","_ref2","children","_jsx","KeyboardAvoidingView","behavior","Platform","OS","undefined"],"mappings":"k8BAuBaA,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAAC,IAAA,EAKD;AAAA,EAAA,IAJ9BC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,YAAY,GAAAH,IAAA,CAAZG,YAAY;IACZC,KAAK,GAAAJ,IAAA,CAALI,KAAK;AAEL,EAAA,IAAID,YAAY,aAAZA,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZA,YAAY,CAAEE,eAAe,EAAE;AACjCC,IAAAA,kBAAkB,CAACH,YAAY,CAACE,eAAe,CAAC;AAClD,EAAA;AACA,EAAA,IAAIF,YAAY,aAAZA,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZA,YAAY,CAAEI,kBAAkB,EAAE;AACpCC,IAAAA,qBAAqB,CAACL,YAAY,CAACI,kBAAkB,CAAC;AACxD,EAAA;AACA,EAAA,IAAIJ,YAAY,aAAZA,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZA,YAAY,CAAEM,cAAc,EAAE;AAChCC,IAAAA,cAAc,CAACP,YAAY,CAACM,cAAc,CAAC;AAC7C,EAAA;AACAE,EAAAA,qBAAqB,EAAE;EACvBC,wBAAwB,CAACX,KAAK,CAAC;EAC/BY,YAAY,CAACX,SAAS,CAAC;EACvBY,WAAW,CAACV,KAAK,CAAC;EAClBW,uBAAuB,CAAC,UAAAC,KAAA,EAAiB;AAAA,IAAA,IAAdC,QAAQ,GAAAD,KAAA,CAARC,QAAQ;IACjC,OACEC,IAACC,oBAAoB,EAAA;MACnBC,QAAQ,EAAEC,QAAQ,CAACC,EAAE,KAAK,KAAK,GAAG,SAAS,GAAGC,SAAS;AAAAN,MAAAA,QAAA,EAEtDA;AAAQ,KAAA,CACY;AAE3B,EAAA,CAAC,CAAC;AACJ"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +1,30 @@
1
- export * from '@gaddario98/react-native-layouts';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { NativeStackHeaderProps, NativeStackNavigationOptions } from '@react-navigation/native-stack';
3
+ import { Href } from 'expo-router';
4
+
5
+ interface Screen {
6
+ name: string;
7
+ requireAuth?: boolean;
8
+ hideIfAuth?: boolean;
9
+ ns?: string;
10
+ userType?: string;
11
+ redirectTo?: Href | "tab";
12
+ header?: (props: NativeStackHeaderProps) => React.ReactNode;
13
+ options?: NativeStackNavigationOptions;
14
+ }
15
+ interface LayoutGeneratorProps {
16
+ screens: Screen[];
17
+ userType?: string;
18
+ initialRouteName?: string;
19
+ }
20
+ interface LayoutGeneratorConfig {
21
+ header?: (props: NativeStackHeaderProps) => React.ReactNode;
22
+ }
23
+
24
+ declare const LayoutGenerator: ({ screens, userType, initialRouteName, }: LayoutGeneratorProps) => react_jsx_runtime.JSX.Element;
25
+
26
+ declare let layoutGeneratorConfig: LayoutGeneratorConfig;
27
+ declare const setLayoutGeneratorConfig: (config: LayoutGeneratorConfig) => void;
28
+
29
+ export { LayoutGenerator, layoutGeneratorConfig, setLayoutGeneratorConfig };
30
+ export type { LayoutGeneratorConfig, LayoutGeneratorProps, Screen };
@@ -1 +1,43 @@
1
- 'use strict';var reactNativeLayouts=require('@gaddario98/react-native-layouts');Object.keys(reactNativeLayouts).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return reactNativeLayouts[k]}})});//# sourceMappingURL=index.js.map
1
+ 'use strict';var jsxRuntime=require('react/jsx-runtime'),expoRouter=require('expo-router'),react=require('react'),auth=require('@gaddario98/react-core/auth'),index_ts=require('../pages/index.js');exports.layoutGeneratorConfig=void 0;
2
+ var setLayoutGeneratorConfig = function setLayoutGeneratorConfig(config) {
3
+ exports.layoutGeneratorConfig = config;
4
+ };var LayoutGenerator = function LayoutGenerator(_ref) {
5
+ var screens = _ref.screens,
6
+ userType = _ref.userType,
7
+ initialRouteName = _ref.initialRouteName;
8
+ var user = auth.useAuthValue();
9
+ var _usePageConfigValue = index_ts.usePageConfigValue(),
10
+ isLogged = _usePageConfigValue.isLogged;
11
+ var isAuthenticated = react.useMemo(function () {
12
+ return isLogged(user);
13
+ }, [isLogged, user]);
14
+ var isRedirect = react.useCallback(function (screen) {
15
+ var val = false;
16
+ if (!screen) return false;
17
+ if (screen.requireAuth) val = !isAuthenticated;
18
+ if (screen.hideIfAuth) val = isAuthenticated;
19
+ if (screen.userType && userType !== screen.userType) val = true;
20
+ return val;
21
+ }, [isAuthenticated, userType]);
22
+ var screenOptions = react.useMemo(function () {
23
+ return {
24
+ headerShown: false,
25
+ keyboardHandlingEnabled: true
26
+ };
27
+ }, []);
28
+ return jsxRuntime.jsx(expoRouter.Stack, {
29
+ screenOptions: screenOptions,
30
+ initialRouteName: initialRouteName,
31
+ children: screens.map(function (screen_0) {
32
+ var _a;
33
+ return jsxRuntime.jsx(expoRouter.Stack.Screen, {
34
+ name: screen_0.name,
35
+ options: Object.assign({
36
+ headerShown: Boolean(screen_0.header || (exports.layoutGeneratorConfig === null || exports.layoutGeneratorConfig === void 0 ? void 0 : exports.layoutGeneratorConfig.header)),
37
+ header: screen_0.header || (exports.layoutGeneratorConfig === null || exports.layoutGeneratorConfig === void 0 ? void 0 : exports.layoutGeneratorConfig.header)
38
+ }, (_a = screen_0 === null || screen_0 === void 0 ? void 0 : screen_0.options) !== null && _a !== void 0 ? _a : {}),
39
+ redirect: isRedirect(screen_0)
40
+ }, screen_0.name);
41
+ })
42
+ });
43
+ };exports.LayoutGenerator=LayoutGenerator;exports.setLayoutGeneratorConfig=setLayoutGeneratorConfig;//# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sources":["../../layouts/config.ts","../../layouts/LayoutGenerator.tsx"],"sourcesContent":["import { LayoutGeneratorConfig } from \"./types\";\n\nlet layoutGeneratorConfig: LayoutGeneratorConfig;\n\nconst setLayoutGeneratorConfig = (config: LayoutGeneratorConfig) => {\n layoutGeneratorConfig = config;\n};\n\nexport { layoutGeneratorConfig, setLayoutGeneratorConfig };\n","import { Stack } from \"expo-router\";\nimport { ComponentProps, useCallback, useMemo } from \"react\";\nimport \"react-native-reanimated\";\nimport { LayoutGeneratorProps, Screen } from \"./types\";\nimport { useAuthValue } from \"@gaddario98/react-core/auth\";\nimport { layoutGeneratorConfig } from \"./config\";\nimport { usePageConfigValue } from \"../pages\";\n\nconst LayoutGenerator = ({\n screens,\n userType,\n initialRouteName,\n}: LayoutGeneratorProps) => {\n const user = useAuthValue();\n const { isLogged } = usePageConfigValue();\n\n const isAuthenticated = useMemo(() => isLogged(user), [isLogged, user]);\n\n const isRedirect = useCallback(\n (screen: Screen) => {\n let val = false;\n if (!screen) return false;\n if (screen.requireAuth) val = !isAuthenticated;\n if (screen.hideIfAuth) val = isAuthenticated;\n if (screen.userType && userType !== screen.userType) val = true;\n return val;\n },\n [isAuthenticated, userType],\n );\n\n const screenOptions = useMemo(\n (): ComponentProps<typeof Stack>[\"screenOptions\"] => ({\n headerShown: false,\n keyboardHandlingEnabled: true,\n }),\n [],\n );\n\n return (\n <Stack screenOptions={screenOptions} initialRouteName={initialRouteName}>\n {screens.map((screen) => {\n return (\n <Stack.Screen\n key={screen.name}\n name={screen.name}\n options={{\n headerShown: Boolean(\n screen.header || layoutGeneratorConfig?.header,\n ),\n header: screen.header || layoutGeneratorConfig?.header,\n ...(screen?.options ?? {}),\n }}\n redirect={isRedirect(screen)}\n />\n );\n })}\n </Stack>\n );\n};\n\nexport default LayoutGenerator;\n"],"names":["layoutGeneratorConfig","setLayoutGeneratorConfig","config","LayoutGenerator","_ref","screens","userType","initialRouteName","user","useAuthValue","_usePageConfigValue","usePageConfigValue","isLogged","isAuthenticated","useMemo","isRedirect","useCallback","screen","val","requireAuth","hideIfAuth","screenOptions","headerShown","keyboardHandlingEnabled","_jsx","Stack","children","map","Screen","name","options","Object","assign","Boolean","header","_a","redirect"],"mappings":"oMAEIA;AAEJ,IAAMC,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAIC,MAA6B,EAAI;AACjEF,EAAAA,6BAAqB,GAAGE,MAAM;AAChC,ECEA,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAIM;AAAA,EAAA,IAHzBC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACRC,gBAAgB,GAAAH,IAAA,CAAhBG,gBAAgB;AAEhB,EAAA,IAAMC,IAAI,GAAGC,iBAAY,EAAE;AAC3B,EAAA,IAAAC,mBAAA,GAAqBC,2BAAkB,EAAE;IAAjCC,QAAQ,GAAAF,mBAAA,CAARE,QAAQ;EAEhB,IAAMC,eAAe,GAAGC,aAAO,CAAC,YAAA;IAAA,OAAMF,QAAQ,CAACJ,IAAI,CAAC;AAAA,EAAA,CAAA,EAAE,CAACI,QAAQ,EAAEJ,IAAI,CAAC,CAAC;AAEvE,EAAA,IAAMO,UAAU,GAAGC,iBAAW,CAC5B,UAACC,MAAc,EAAI;IACjB,IAAIC,GAAG,GAAG,KAAK;AACf,IAAA,IAAI,CAACD,MAAM,EAAE,OAAO,KAAK;AACzB,IAAA,IAAIA,MAAM,CAACE,WAAW,EAAED,GAAG,GAAG,CAACL,eAAe;AAC9C,IAAA,IAAII,MAAM,CAACG,UAAU,EAAEF,GAAG,GAAGL,eAAe;AAC5C,IAAA,IAAII,MAAM,CAACX,QAAQ,IAAIA,QAAQ,KAAKW,MAAM,CAACX,QAAQ,EAAEY,GAAG,GAAG,IAAI;AAC/D,IAAA,OAAOA,GAAG;AACZ,EAAA,CAAC,EACD,CAACL,eAAe,EAAEP,QAAQ,CAAC,CAC5B;EAED,IAAMe,aAAa,GAAGP,aAAO,CAC3B,YAAA;IAAA,OAAsD;AACpDQ,MAAAA,WAAW,EAAE,KAAK;AAClBC,MAAAA,uBAAuB,EAAE;KAC1B;EAAA,CAAC,EACF,EAAE,CACH;EAED,OACEC,cAAA,CAACC,gBAAK;AAACJ,IAAAA,aAAa,EAAEA,aAAa;AAAEd,IAAAA,gBAAgB,EAAEA,gBAAgB;AAAAmB,IAAAA,QAAA,EACpErB,OAAO,CAACsB,GAAG,CAAC,UAACV,QAAM,EAAI;;AACtB,MAAA,OACEO,cAAA,CAACC,gBAAK,CAACG,MAAM,EAAA;QAEXC,IAAI,EAAEZ,QAAM,CAACY,IAAI;AACjBC,QAAAA,OAAO,EAAAC,MAAA,CAAAC,MAAA,CAAA;UACLV,WAAW,EAAEW,OAAO,CAClBhB,QAAM,CAACiB,MAAM,KAAIlC,6BAAqB,aAArBA,6BAAqB,KAAA,MAAA,GAAA,MAAA,GAArBA,6BAAqB,CAAEkC,MAAM,CAAA,CAC/C;AACDA,UAAAA,MAAM,EAAEjB,QAAM,CAACiB,MAAM,KAAIlC,6BAAqB,KAAA,IAAA,IAArBA,6BAAqB,KAAA,MAAA,GAAA,MAAA,GAArBA,6BAAqB,CAAEkC,MAAM;AAAA,SAAA,EAClD,CAAAC,EAAA,GAAAlB,QAAM,KAAA,IAAA,IAANA,QAAM,uBAANA,QAAM,CAAEa,OAAO,MAAA,IAAA,IAAAK,EAAA,KAAA,MAAA,GAAAA,EAAA,GAAI,EAAG,CAAA;QAE5BC,QAAQ,EAAErB,UAAU,CAACE,QAAM;SATtBA,QAAM,CAACY,IAAI,CAUhB;IAEN,CAAC;AAAC,GAAA,CACI;AAEZ"}
@@ -1 +1,43 @@
1
- export*from'@gaddario98/react-native-layouts';//# sourceMappingURL=index.mjs.map
1
+ import {jsx}from'react/jsx-runtime';import {Stack}from'expo-router';import {useMemo,useCallback}from'react';import {useAuthValue}from'@gaddario98/react-core/auth';import {usePageConfigValue}from'../pages/index.mjs';var layoutGeneratorConfig;
2
+ var setLayoutGeneratorConfig = function setLayoutGeneratorConfig(config) {
3
+ layoutGeneratorConfig = config;
4
+ };var LayoutGenerator = function LayoutGenerator(_ref) {
5
+ var screens = _ref.screens,
6
+ userType = _ref.userType,
7
+ initialRouteName = _ref.initialRouteName;
8
+ var user = useAuthValue();
9
+ var _usePageConfigValue = usePageConfigValue(),
10
+ isLogged = _usePageConfigValue.isLogged;
11
+ var isAuthenticated = useMemo(function () {
12
+ return isLogged(user);
13
+ }, [isLogged, user]);
14
+ var isRedirect = useCallback(function (screen) {
15
+ var val = false;
16
+ if (!screen) return false;
17
+ if (screen.requireAuth) val = !isAuthenticated;
18
+ if (screen.hideIfAuth) val = isAuthenticated;
19
+ if (screen.userType && userType !== screen.userType) val = true;
20
+ return val;
21
+ }, [isAuthenticated, userType]);
22
+ var screenOptions = useMemo(function () {
23
+ return {
24
+ headerShown: false,
25
+ keyboardHandlingEnabled: true
26
+ };
27
+ }, []);
28
+ return jsx(Stack, {
29
+ screenOptions: screenOptions,
30
+ initialRouteName: initialRouteName,
31
+ children: screens.map(function (screen_0) {
32
+ var _a;
33
+ return jsx(Stack.Screen, {
34
+ name: screen_0.name,
35
+ options: Object.assign({
36
+ headerShown: Boolean(screen_0.header || (layoutGeneratorConfig === null || layoutGeneratorConfig === void 0 ? void 0 : layoutGeneratorConfig.header)),
37
+ header: screen_0.header || (layoutGeneratorConfig === null || layoutGeneratorConfig === void 0 ? void 0 : layoutGeneratorConfig.header)
38
+ }, (_a = screen_0 === null || screen_0 === void 0 ? void 0 : screen_0.options) !== null && _a !== void 0 ? _a : {}),
39
+ redirect: isRedirect(screen_0)
40
+ }, screen_0.name);
41
+ })
42
+ });
43
+ };export{LayoutGenerator,layoutGeneratorConfig,setLayoutGeneratorConfig};//# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.mjs","sources":["../../layouts/config.ts","../../layouts/LayoutGenerator.tsx"],"sourcesContent":["import { LayoutGeneratorConfig } from \"./types\";\n\nlet layoutGeneratorConfig: LayoutGeneratorConfig;\n\nconst setLayoutGeneratorConfig = (config: LayoutGeneratorConfig) => {\n layoutGeneratorConfig = config;\n};\n\nexport { layoutGeneratorConfig, setLayoutGeneratorConfig };\n","import { Stack } from \"expo-router\";\nimport { ComponentProps, useCallback, useMemo } from \"react\";\nimport \"react-native-reanimated\";\nimport { LayoutGeneratorProps, Screen } from \"./types\";\nimport { useAuthValue } from \"@gaddario98/react-core/auth\";\nimport { layoutGeneratorConfig } from \"./config\";\nimport { usePageConfigValue } from \"../pages\";\n\nconst LayoutGenerator = ({\n screens,\n userType,\n initialRouteName,\n}: LayoutGeneratorProps) => {\n const user = useAuthValue();\n const { isLogged } = usePageConfigValue();\n\n const isAuthenticated = useMemo(() => isLogged(user), [isLogged, user]);\n\n const isRedirect = useCallback(\n (screen: Screen) => {\n let val = false;\n if (!screen) return false;\n if (screen.requireAuth) val = !isAuthenticated;\n if (screen.hideIfAuth) val = isAuthenticated;\n if (screen.userType && userType !== screen.userType) val = true;\n return val;\n },\n [isAuthenticated, userType],\n );\n\n const screenOptions = useMemo(\n (): ComponentProps<typeof Stack>[\"screenOptions\"] => ({\n headerShown: false,\n keyboardHandlingEnabled: true,\n }),\n [],\n );\n\n return (\n <Stack screenOptions={screenOptions} initialRouteName={initialRouteName}>\n {screens.map((screen) => {\n return (\n <Stack.Screen\n key={screen.name}\n name={screen.name}\n options={{\n headerShown: Boolean(\n screen.header || layoutGeneratorConfig?.header,\n ),\n header: screen.header || layoutGeneratorConfig?.header,\n ...(screen?.options ?? {}),\n }}\n redirect={isRedirect(screen)}\n />\n );\n })}\n </Stack>\n );\n};\n\nexport default LayoutGenerator;\n"],"names":["layoutGeneratorConfig","setLayoutGeneratorConfig","config","LayoutGenerator","_ref","screens","userType","initialRouteName","user","useAuthValue","_usePageConfigValue","usePageConfigValue","isLogged","isAuthenticated","useMemo","isRedirect","useCallback","screen","val","requireAuth","hideIfAuth","screenOptions","headerShown","keyboardHandlingEnabled","_jsx","Stack","children","map","Screen","name","options","Object","assign","Boolean","header","_a","redirect"],"mappings":"uNAEA,IAAIA;AAEJ,IAAMC,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAIC,MAA6B,EAAI;AACjEF,EAAAA,qBAAqB,GAAGE,MAAM;AAChC,ECEA,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAIM;AAAA,EAAA,IAHzBC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACRC,gBAAgB,GAAAH,IAAA,CAAhBG,gBAAgB;AAEhB,EAAA,IAAMC,IAAI,GAAGC,YAAY,EAAE;AAC3B,EAAA,IAAAC,mBAAA,GAAqBC,kBAAkB,EAAE;IAAjCC,QAAQ,GAAAF,mBAAA,CAARE,QAAQ;EAEhB,IAAMC,eAAe,GAAGC,OAAO,CAAC,YAAA;IAAA,OAAMF,QAAQ,CAACJ,IAAI,CAAC;AAAA,EAAA,CAAA,EAAE,CAACI,QAAQ,EAAEJ,IAAI,CAAC,CAAC;AAEvE,EAAA,IAAMO,UAAU,GAAGC,WAAW,CAC5B,UAACC,MAAc,EAAI;IACjB,IAAIC,GAAG,GAAG,KAAK;AACf,IAAA,IAAI,CAACD,MAAM,EAAE,OAAO,KAAK;AACzB,IAAA,IAAIA,MAAM,CAACE,WAAW,EAAED,GAAG,GAAG,CAACL,eAAe;AAC9C,IAAA,IAAII,MAAM,CAACG,UAAU,EAAEF,GAAG,GAAGL,eAAe;AAC5C,IAAA,IAAII,MAAM,CAACX,QAAQ,IAAIA,QAAQ,KAAKW,MAAM,CAACX,QAAQ,EAAEY,GAAG,GAAG,IAAI;AAC/D,IAAA,OAAOA,GAAG;AACZ,EAAA,CAAC,EACD,CAACL,eAAe,EAAEP,QAAQ,CAAC,CAC5B;EAED,IAAMe,aAAa,GAAGP,OAAO,CAC3B,YAAA;IAAA,OAAsD;AACpDQ,MAAAA,WAAW,EAAE,KAAK;AAClBC,MAAAA,uBAAuB,EAAE;KAC1B;EAAA,CAAC,EACF,EAAE,CACH;EAED,OACEC,GAAA,CAACC,KAAK;AAACJ,IAAAA,aAAa,EAAEA,aAAa;AAAEd,IAAAA,gBAAgB,EAAEA,gBAAgB;AAAAmB,IAAAA,QAAA,EACpErB,OAAO,CAACsB,GAAG,CAAC,UAACV,QAAM,EAAI;;AACtB,MAAA,OACEO,GAAA,CAACC,KAAK,CAACG,MAAM,EAAA;QAEXC,IAAI,EAAEZ,QAAM,CAACY,IAAI;AACjBC,QAAAA,OAAO,EAAAC,MAAA,CAAAC,MAAA,CAAA;UACLV,WAAW,EAAEW,OAAO,CAClBhB,QAAM,CAACiB,MAAM,KAAIlC,qBAAqB,aAArBA,qBAAqB,KAAA,MAAA,GAAA,MAAA,GAArBA,qBAAqB,CAAEkC,MAAM,CAAA,CAC/C;AACDA,UAAAA,MAAM,EAAEjB,QAAM,CAACiB,MAAM,KAAIlC,qBAAqB,KAAA,IAAA,IAArBA,qBAAqB,KAAA,MAAA,GAAA,MAAA,GAArBA,qBAAqB,CAAEkC,MAAM;AAAA,SAAA,EAClD,CAAAC,EAAA,GAAAlB,QAAM,KAAA,IAAA,IAANA,QAAM,uBAANA,QAAM,CAAEa,OAAO,MAAA,IAAA,IAAAK,EAAA,KAAA,MAAA,GAAAA,EAAA,GAAI,EAAG,CAAA;QAE5BC,QAAQ,EAAErB,UAAU,CAACE,QAAM;SATtBA,QAAM,CAACY,IAAI,CAUhB;IAEN,CAAC;AAAC,GAAA,CACI;AAEZ"}
@@ -1 +1 @@
1
- export * from '@gaddario98/react-localization';
1
+ export * from '@gaddario98/react-core/localization';
@@ -1 +1 @@
1
- 'use strict';var reactLocalization=require('@gaddario98/react-localization');Object.keys(reactLocalization).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return reactLocalization[k]}})});//# sourceMappingURL=index.js.map
1
+ 'use strict';var localization=require('@gaddario98/react-core/localization');Object.keys(localization).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return localization[k]}})});//# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- export*from'@gaddario98/react-localization';//# sourceMappingURL=index.mjs.map
1
+ export*from'@gaddario98/react-core/localization';//# sourceMappingURL=index.mjs.map
@@ -1 +1,11 @@
1
- export * from '@gaddario98/react-native-pages';
1
+ import { DefaultContainerProps, ViewSettings } from '@gaddario98/react-core/pages';
2
+ export * from '@gaddario98/react-core/pages';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import { QueriesArray } from '@gaddario98/react-core/queries';
5
+ import { FieldValues } from '@gaddario98/react-core/form';
6
+
7
+ declare const DefaultView: <F extends FieldValues, Q extends QueriesArray, V extends Record<string, unknown>>({ viewSettings, handleRefresh, children, }: DefaultContainerProps<F, Q, V>) => react_jsx_runtime.JSX.Element;
8
+
9
+ declare const Element: <F extends FieldValues = FieldValues, Q extends QueriesArray = QueriesArray, V extends Record<string, unknown> = Record<string, unknown>>({ children, withoutPadding, }: Omit<DefaultContainerProps<F, Q, V>, "viewSettings"> & ViewSettings["header"]) => react_jsx_runtime.JSX.Element;
10
+
11
+ export { DefaultView, Element };