@evlop/commons 1.0.139 → 1.0.140

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. package/dist/src/helpers/i18nHelpers.d.ts +2 -0
  2. package/dist/src/helpers/i18nHelpers.d.ts.map +1 -0
  3. package/dist/src/helpers/i18nHelpers.js +8 -0
  4. package/dist/src/helpers/i18nHelpers.js.map +1 -0
  5. package/dist/src/helpers/i18nHelpers.native.d.ts +2 -0
  6. package/dist/src/helpers/i18nHelpers.native.d.ts.map +1 -0
  7. package/dist/src/helpers/i18nHelpers.native.js +12 -0
  8. package/dist/src/helpers/i18nHelpers.native.js.map +1 -0
  9. package/dist/src/helpers/index.d.ts +1 -0
  10. package/dist/src/helpers/index.d.ts.map +1 -1
  11. package/dist/src/helpers/index.js +1 -0
  12. package/dist/src/helpers/index.js.map +1 -1
  13. package/dist/src/helpers/themeHelpers.d.ts +4 -4
  14. package/dist/src/helpers/themeHelpers.d.ts.map +1 -1
  15. package/dist/src/helpers/themeHelpers.js +6 -1
  16. package/dist/src/helpers/themeHelpers.js.map +1 -1
  17. package/dist/src/providers/I18nProvider/index.d.ts.map +1 -1
  18. package/dist/src/providers/I18nProvider/index.js +1 -0
  19. package/dist/src/providers/I18nProvider/index.js.map +1 -1
  20. package/dist/src/providers/I18nProvider/useDirectionSwitcher.app.d.ts.map +1 -1
  21. package/dist/src/providers/I18nProvider/useDirectionSwitcher.app.js +4 -0
  22. package/dist/src/providers/I18nProvider/useDirectionSwitcher.app.js.map +1 -1
  23. package/package.json +1 -1
  24. package/dist/src/providers/I18nProvider/useDirectionSwitcher.native.d.ts +0 -2
  25. package/dist/src/providers/I18nProvider/useDirectionSwitcher.native.d.ts.map +0 -1
  26. package/dist/src/providers/I18nProvider/useDirectionSwitcher.native.js +0 -21
  27. package/dist/src/providers/I18nProvider/useDirectionSwitcher.native.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ export declare function getLoacale(): string;
2
+ //# sourceMappingURL=i18nHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18nHelpers.d.ts","sourceRoot":"","sources":["../../../src/helpers/i18nHelpers.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,WAEzB"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getLoacale = void 0;
4
+ function getLoacale() {
5
+ return 'en-US';
6
+ }
7
+ exports.getLoacale = getLoacale;
8
+ //# sourceMappingURL=i18nHelpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18nHelpers.js","sourceRoot":"","sources":["../../../src/helpers/i18nHelpers.ts"],"names":[],"mappings":";;;AAAA,SAAgB,UAAU;IACtB,OAAO,OAAO,CAAA;AAClB,CAAC;AAFD,gCAEC"}
@@ -0,0 +1,2 @@
1
+ export declare function getLoacale(): any;
2
+ //# sourceMappingURL=i18nHelpers.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18nHelpers.native.d.ts","sourceRoot":"","sources":["../../../src/helpers/i18nHelpers.native.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,QAKzB"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getLoacale = void 0;
4
+ const react_native_1 = require("react-native");
5
+ function getLoacale() {
6
+ return react_native_1.Platform.select({
7
+ ios: react_native_1.NativeModules.SettingsManager.settings.AppleLocale || react_native_1.NativeModules.SettingsManager.settings.AppleLanguages[0],
8
+ android: react_native_1.NativeModules.I18nManager.localeIdentifier,
9
+ });
10
+ }
11
+ exports.getLoacale = getLoacale;
12
+ //# sourceMappingURL=i18nHelpers.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18nHelpers.native.js","sourceRoot":"","sources":["../../../src/helpers/i18nHelpers.native.ts"],"names":[],"mappings":";;;AAAA,+CAAuD;AAEvD,SAAgB,UAAU;IACtB,OAAO,uBAAQ,CAAC,MAAM,CAAC;QACnB,GAAG,EAAE,4BAAa,CAAC,eAAe,CAAC,QAAQ,CAAC,WAAW,IAAI,4BAAa,CAAC,eAAe,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;QACnH,OAAO,EAAE,4BAAa,CAAC,WAAW,CAAC,gBAAgB;KACtD,CAAC,CAAA;AACN,CAAC;AALD,gCAKC"}
@@ -3,4 +3,5 @@ export * from './functions';
3
3
  export * from './commonStyles';
4
4
  export * from './themeHelpers';
5
5
  export * from './base64';
6
+ export * from './i18nHelpers';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC"}
@@ -15,4 +15,5 @@ __exportStar(require("./functions"), exports);
15
15
  __exportStar(require("./commonStyles"), exports);
16
16
  __exportStar(require("./themeHelpers"), exports);
17
17
  __exportStar(require("./base64"), exports);
18
+ __exportStar(require("./i18nHelpers"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmC;AACnC,8CAA4B;AAC5B,iDAA+B;AAC/B,iDAA+B;AAC/B,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmC;AACnC,8CAA4B;AAC5B,iDAA+B;AAC/B,iDAA+B;AAC/B,2CAAyB;AACzB,gDAA8B"}
@@ -1,7 +1,7 @@
1
1
  export declare const generateSizeScale: (baseSize: number, variants: {
2
2
  [key: string]: number;
3
3
  }) => {
4
- [x: string]: number;
4
+ [x: string]: string;
5
5
  };
6
6
  export declare const fontSizes: {
7
7
  xxxxs: number;
@@ -37,7 +37,7 @@ declare const fontWeights: {
37
37
  declare type FontWeights = typeof fontWeights;
38
38
  declare type FontWeight = keyof FontWeights;
39
39
  export declare const generateFontSizes: (baseFontSize: number) => {
40
- [x: string]: number;
40
+ [x: string]: string;
41
41
  };
42
42
  export declare const lineHeightVariants: {
43
43
  xxxxs: number;
@@ -60,7 +60,7 @@ export declare const lineHeightVariants: {
60
60
  declare type LineHeightVariants = typeof lineHeightVariants;
61
61
  declare type LineHeight = keyof LineHeightVariants;
62
62
  export declare const generateLineHeights: (baseFontSize: number) => {
63
- [x: string]: number;
63
+ [x: string]: string;
64
64
  };
65
65
  export declare const spacingVariations: {
66
66
  none: number;
@@ -85,7 +85,7 @@ export declare const spacingVariations: {
85
85
  declare type SpaceVariants = typeof fontSizes;
86
86
  declare type Space = keyof SpaceVariants;
87
87
  export declare const generateSpacingSizes: (baseSpacing: number) => {
88
- [x: string]: number;
88
+ [x: string]: string;
89
89
  };
90
90
  declare const colors: {
91
91
  white: string;
@@ -1 +1 @@
1
- {"version":3,"file":"themeHelpers.d.ts","sourceRoot":"","sources":["../../../src/helpers/themeHelpers.tsx"],"names":[],"mappings":"AA+BA,eAAO,MAAM,iBAAiB,aAAa,MAAM;;;;CAAqF,CAAC;AAGvI,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;CAiBrB,CAAA;AAED,aAAK,SAAS,GAAG,OAAO,SAAS,CAAC;AAClC,aAAK,QAAQ,GAAG,MAAM,SAAS,CAAC;AAEhC,QAAA,MAAM,WAAW;;;;;;;;;;CAUhB,CAAC;AAEF,aAAK,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AAO,MAAM,CAAC;AAEhC,aAAK,SAAS,GAAG,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,WAAW;;;;;;;;;;;;CAcd,CAAA;AAEH,aAAK,WAAW,GAAG,OAAO,WAAW,CAAC;AAEtC,oBAAY,UAAU,GAAG,MAAM,WAAW,CAAC;AAE3C,aAAK,cAAc,GAAG,OAAO,CAAC,SAAS,EAAE,OAAO,GAAC,OAAO,CAAC,CAAC;AAC1D,aAAK,WAAW,GAAG,GAAG,cAAc,UAAU,UAAU,EAAE,CAAA;AAE1D,oBAAY,KAAK,GAAG,SAAS,GAAG,WAAW,CAAC;AAqB5C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE;IAAC,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAA;CAAC;;EAuCrE;AACD,MAAM,WAAW,KAAK;IAClB,KAAK,EAAE;SAAE,GAAG,IAAI,KAAK,GAAG,MAAM;KAAC,CAAC;IAChC,SAAS,EAAE;SAAE,GAAG,IAAI,QAAQ,GAAG,MAAM;KAAC,CAAC;IACvC,WAAW,EAAE;SAAE,GAAG,IAAI,UAAU,GAAG,MAAM;KAAC,CAAC;IAC3C,WAAW,EAAE;SAAE,GAAG,IAAI,UAAU,GAAG,MAAM;KAAC,CAAC;IAC3C,MAAM,EAAE;SAAE,GAAG,IAAI,KAAK,GAAG,MAAM;KAAC,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;CACpB"}
@@ -23,7 +23,12 @@ function darkenRgb(hex, intensity) {
23
23
  const b = Math.round(color.blue * (1 - intensity));
24
24
  return polished_1.rgb(r, g, b);
25
25
  }
26
- const generateSizeScale = (baseSize, variants) => lodash_1.mapValues(variants, scale => scale * baseSize);
26
+ const generateSizeScale = (baseSize, variants) => lodash_1.mapValues(variants, scale => {
27
+ const scaledValue = Math.round(scale * baseSize);
28
+ if (scaledValue)
29
+ return `${scaledValue}px`;
30
+ return null;
31
+ });
27
32
  exports.generateSizeScale = generateSizeScale;
28
33
  // font sizes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AClD,MAAM;oBACV,KAAK,QAAQ;wBACT,MAAM,YAAY,GAAG,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,CAAC;wBAChD,WAAW,GAAG,iBAAM,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;wBAChD,MAAM;oBACV,KAAK,gBAAgB;wBACjB,MAAM,oBAAoB,GAAG,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,CAAC;wBACxD,WAAW,GAAG,yBAAc,CAAC,oBAAoB,EAAE,WAAW,CAAC,CAAC;wBAChE,MAAM;oBACV,KAAK,QAAQ;wBACT,WAAW,GAAG,iBAAM,CAAC,WAAW,CAAC,CAAC;wBAClC,MAAM;oBACV,KAAK,WAAW;wBACZ,WAAW,GAAG,oBAAS,CAAC,WAAW,CAAC,CAAC;wBACrC,MAAM;oBACV,KAAK,OAAO;wBACR,MAAM,UAAU,GAAG,WAAW,CAAC,KAAK,EAAE,CAAC;wBACvC,WAAW,GAAG,2BAA2B,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,CAAA;oBACvE,QAAQ;iBACX;aACJ;YAED,OAAO,WAAW,CAAC;QACvB,CAAC;QACD,GAAG,KAAI,OAAO,KAAK,CAAA,CAAC,CAAC;KACxB,CAAC,CAAA;AACN,CAAC;AAvCD,4CAuCC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/providers/I18nProvider/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAQvE,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAgDhC,CAAA;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/providers/I18nProvider/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAQvE,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAiDhC,CAAA;AAED,eAAe,YAAY,CAAC"}
@@ -47,6 +47,7 @@ const I18nProvider = ({ children }) => {
47
47
  setLanguage(i18ninstance_1.default.language);
48
48
  }
49
49
  }, [language]);
50
+ // switch between rtl and ltr based on current language
50
51
  useDirectionSwitcher_1.default(language);
51
52
  react_1.useEffect(() => {
52
53
  const languageChangeHandeller = (lng) => setLanguage(lng);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/providers/I18nProvider/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA+B;AAC/B,+CAAuE;AACvE,6CAAqD;AACrD,gFAAwD;AACxD,qDAAkD;AAClD,6CAAiD;AACjD,sCAA2C;AAC3C,kFAA0D;AAEnD,MAAM,YAAY,GAAa,CAAC,EAAC,QAAQ,EAAC,EAAE,EAAE;IACnD,MAAM,QAAQ,GAAG,yBAAW,EAAE,CAAC;IAC/B,MAAM,aAAa,GAAG,qBAAS,CAAC,MAAM,CAAC,CAAC;IAExC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,gBAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAEnD,MAAM,QAAQ,GAAG,yBAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IAC1D,MAAM,WAAW,GAAG,mBAAW,CAAC,CAAC,GAAW,EAAC,EAAE,CAAA,QAAQ,CAAC,0BAAe,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAA;IAEtG,iBAAS,CAAC,GAAE,EAAE;QACZ,IAAG,QAAQ,KAAK,sBAAY,CAAC,QAAQ;YAAE,OAAO;QAE9C,IAAG,QAAQ,EAAE;YACX,sBAAY,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;SACvC;aAAK;YACJ,WAAW,CAAC,sBAAY,CAAC,QAAQ,CAAC,CAAC;SACpC;IACH,CAAC,EAAE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C,CAAC;IAE7E,OAAO,CAAC,8BAAC,qBAAa,IAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,SAAS,IAC5C,QAAQ,CACG,CAAC,CAAC;AACtB,CAAC,CAAA;AAjDY,QAAA,YAAY,gBAiDxB;AAED,kBAAe,oBAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useDirectionSwitcher.app.d.ts","sourceRoot":"","sources":["../../../../src/providers/I18nProvider/useDirectionSwitcher.app.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,GAAG,EAAE,MAAM,QASvD"}
1
+ {"version":3,"file":"useDirectionSwitcher.app.d.ts","sourceRoot":"","sources":["../../../../src/providers/I18nProvider/useDirectionSwitcher.app.ts"],"names":[],"mappings":"AAaA,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,GAAG,EAAE,MAAM,QAgBvD"}
@@ -6,6 +6,7 @@ const react_native_1 = require("react-native");
6
6
  const { AppConstants } = react_native_1.NativeModules;
7
7
  const activeDirection = react_native_1.I18nManager.isRTL ? 'rtl' : 'ltr';
8
8
  const rtLanguages = ["ar", "arc", "ckb", "dv", "fa", "ha", "he", "khw", "ks", "ps", "sd", "ur", "uz_af", "yi"];
9
+ const requiresReloadOnDirectionChange = react_native_1.Platform.select({ ios: true, android: true, default: false });
9
10
  function useDirectionSwitcher(lng) {
10
11
  const languageDirection = react_1.useMemo(() => {
11
12
  return lodash_1.includes(rtLanguages, lodash_1.lowerCase(lng)) ? 'rtl' : 'ltr';
@@ -14,6 +15,9 @@ function useDirectionSwitcher(lng) {
14
15
  if (languageDirection === activeDirection)
15
16
  return;
16
17
  react_native_1.I18nManager.forceRTL(languageDirection === 'rtl');
18
+ if (requiresReloadOnDirectionChange) {
19
+ react_native_1.Alert.alert("Language direction changed", `You need to reload the app to switch layout to ${languageDirection === 'rtl' ? 'Right to left' : "Left to right"}.`, [{ text: "Okay", onPress: () => AppConstants.reload() },]);
20
+ }
17
21
  }, [languageDirection]);
18
22
  }
19
23
  exports.default = useDirectionSwitcher;
@@ -1 +1 @@
1
- {"version":3,"file":"useDirectionSwitcher.app.js","sourceRoot":"","sources":["../../../../src/providers/I18nProvider/useDirectionSwitcher.app.ts"],"names":[],"mappings":";;AAAA,mCAA6C;AAC7C,iCAA2C;AAC3C,+CAA0D;AAC1D,MAAM,EAAC,YAAY,EAAC,GAAG,4BAAa,CAAC;AAGrC,MAAM,eAAe,GAAc,0BAAW,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;AAErE,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AAE/G,SAAwB,oBAAoB,CAAC,GAAW;IACpD,MAAM,iBAAiB,GAAG,eAAO,CAAY,GAAE,EAAE;QAC7C,OAAO,iBAAQ,CAAC,WAAW,EAAE,kBAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IACjE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAEV,iBAAS,CAAC,GAAE,EAAE;QACV,IAAG,iBAAiB,KAAK,eAAe;YAAE,OAAO;QACjD,0BAAW,CAAC,QAAQ,CAAC,iBAAiB,KAAK,KAAK,CAAC,CAAC;IACtD,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC5B,CAAC;AATD,uCASC"}
1
+ {"version":3,"file":"useDirectionSwitcher.app.js","sourceRoot":"","sources":["../../../../src/providers/I18nProvider/useDirectionSwitcher.app.ts"],"names":[],"mappings":";;AAAA,mCAA6C;AAC7C,iCAA2C;AAC3C,+CAA2E;AAC3E,MAAM,EAAC,YAAY,EAAC,GAAG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GED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evlop/commons",
3
- "version": "1.0.139",
3
+ "version": "1.0.140",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "peerDependencies": {
@@ -1,2 +0,0 @@
1
- export default function useDirectionSwitcher(lng: string): void;
2
- //# sourceMappingURL=useDirectionSwitcher.native.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDirectionSwitcher.native.d.ts","sourceRoot":"","sources":["../../../../src/providers/I18nProvider/useDirectionSwitcher.native.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,GAAG,EAAE,MAAM,QAUvD"}
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const lodash_1 = require("lodash");
4
- const react_1 = require("react");
5
- const react_native_1 = require("react-native");
6
- const { AppConstants } = react_native_1.NativeModules;
7
- const activeDirection = react_native_1.I18nManager.isRTL ? 'rtl' : 'ltr';
8
- const rtLanguages = ["ar", "arc", "ckb", "dv", "fa", "ha", "he", "khw", "ks", "ps", "sd", "ur", "uz_af", "yi"];
9
- function useDirectionSwitcher(lng) {
10
- const languageDirection = react_1.useMemo(() => {
11
- return lodash_1.includes(rtLanguages, lodash_1.lowerCase(lng)) ? 'rtl' : 'ltr';
12
- }, [lng]);
13
- react_1.useEffect(() => {
14
- if (languageDirection === activeDirection)
15
- return;
16
- react_native_1.I18nManager.forceRTL(languageDirection === 'rtl');
17
- AppConstants.reload();
18
- }, [languageDirection]);
19
- }
20
- exports.default = useDirectionSwitcher;
21
- //# sourceMappingURL=useDirectionSwitcher.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDirectionSwitcher.native.js","sourceRoot":"","sources":["../../../../src/providers/I18nProvider/useDirectionSwitcher.native.ts"],"names":[],"mappings":";;AAAA,mCAA6C;AAC7C,iCAA2C;AAC3C,+CAA0D;AAC1D,MAAM,EAAC,YAAY,EAAC,GAAG,4BAAa,CAAC;AAGrC,MAAM,eAAe,GAAc,0BAAW,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;AAErE,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AAE/G,SAAwB,oBAAoB,CAAC,GAAW;IACpD,MAAM,iBAAiB,GAAG,eAAO,CAAY,GAAE,EAAE;QAC7C,OAAO,iBAAQ,CAAC,WAAW,EAAE,kBAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IACjE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAEV,iBAAS,CAAC,GAAE,EAAE;QACV,IAAG,iBAAiB,KAAK,eAAe;YAAE,OAAO;QACjD,0BAAW,CAAC,QAAQ,CAAC,iBAAiB,KAAK,KAAK,CAAC,CAAC;QAClD,YAAY,CAAC,MAAM,EAAE,CAAC;IAC1B,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC5B,CAAC;AAVD,uCAUC"}