@teamturing/react-native-kit 1.6.4 → 1.6.6

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.
@@ -11,12 +11,13 @@ var _index = require("../../../hook/index.js");
11
11
  var _index2 = require("../../../util/index.js");
12
12
  var _WindowSizeClass = require("./WindowSizeClass.js");
13
13
  var _useDynamicDimensions = require("./useDynamicDimensions.js");
14
- var _jsxRuntime = require("react/jsx-runtime");
15
14
  const [useDynamicLayout, LayoutProvider] = (0, _index2.createCtx)(({
16
15
  useSafeAreaInsetsHook = _reactNativeSafeAreaContext.useSafeAreaInsets
17
- }, transformChildren) => {
18
- const [windowWidth, setWindowWidth] = (0, _react.useState)(Math.ceil(_reactNative.Dimensions.get('window').width));
19
- const [windowHeight, setWindowHeight] = (0, _react.useState)(Math.ceil(_reactNative.Dimensions.get('window').height));
16
+ }) => {
17
+ const {
18
+ width: windowWidth,
19
+ height: windowHeight
20
+ } = (0, _reactNative.useWindowDimensions)();
20
21
  const windowShortLen = Math.min(windowWidth, windowHeight);
21
22
  const windowLongLen = Math.max(windowWidth, windowHeight);
22
23
  const _insets = useSafeAreaInsetsHook();
@@ -41,15 +42,6 @@ const [useDynamicLayout, LayoutProvider] = (0, _index2.createCtx)(({
41
42
  windowWidthSizeClass,
42
43
  windowHeightSizeClass
43
44
  });
44
- const updateScreenSizesBeforeRotation = (0, _react.useCallback)(orientation => {
45
- if (orientation === 'portrait') {
46
- setWindowWidth(windowShortLen);
47
- setWindowHeight(windowLongLen);
48
- } else if (orientation === 'landscape') {
49
- setWindowWidth(windowLongLen);
50
- setWindowHeight(windowShortLen);
51
- }
52
- }, [windowLongLen, windowShortLen]);
53
45
  const localImageDimensionProps = (0, _index.useStableCallback)((imageWidth, imageHeight, {
54
46
  containerWidth
55
47
  } = {
@@ -75,22 +67,6 @@ const [useDynamicLayout, LayoutProvider] = (0, _index2.createCtx)(({
75
67
  };
76
68
  }
77
69
  });
78
- transformChildren(children => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
79
- testID: 'LayoutProvider',
80
- style: _reactNative.StyleSheet.absoluteFill,
81
- onLayout: ({
82
- nativeEvent: {
83
- layout: {
84
- width,
85
- height
86
- }
87
- }
88
- }) => {
89
- setWindowWidth(Math.ceil(width));
90
- setWindowHeight(Math.ceil(height));
91
- },
92
- children: children
93
- }));
94
70
  return {
95
71
  ...dimensions,
96
72
  screenHeight: windowHeight,
@@ -98,7 +74,6 @@ const [useDynamicLayout, LayoutProvider] = (0, _index2.createCtx)(({
98
74
  screenWidthWithPadding: windowWidth - 2 * dimensions.sidePadding,
99
75
  screenShortLen: windowShortLen,
100
76
  screenLongLen: windowLongLen,
101
- updateScreenSizesBeforeRotation,
102
77
  safeAreaInsets: insets,
103
78
  sfTop: insets.top,
104
79
  sfLeft: insets.left,
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNative","_reactNativeSafeAreaContext","_index","_index2","_WindowSizeClass","_useDynamicDimensions","_jsxRuntime","useDynamicLayout","LayoutProvider","createCtx","useSafeAreaInsetsHook","useSafeAreaInsets","transformChildren","windowWidth","setWindowWidth","useState","Math","ceil","Dimensions","get","width","windowHeight","setWindowHeight","height","windowShortLen","min","windowLongLen","max","_insets","insets","top","bottom","left","right","windowWidthSizeClass","useMemo","decideWindowWidthSizeClass","windowHeightSizeClass","decideWindowHeightSizeClass","isWindowWidthSizeClassAtLeast","useCallback","sizeClass","isWindowHeightSizeClassAtLeast","isWidthAtLeastMedium","WindowSizeClass","MEDIUM","isWidthAtLeastExpanded","EXPANDED","isHeightAtLeastMedium","isHeightAtLeastExpanded","dimensions","useDynamicDimensions","screenShortLen","safeAreaBottom","screenWidth","updateScreenSizesBeforeRotation","orientation","localImageDimensionProps","useStableCallback","imageWidth","imageHeight","containerWidth","w","sidePadding","children","jsx","View","testID","style","StyleSheet","absoluteFill","onLayout","nativeEvent","layout","screenHeight","screenWidthWithPadding","screenLongLen","safeAreaInsets","sfTop","sfLeft","sfRight","sfBottom","exports"],"sourceRoot":"../../../../../src","sources":["component/Layout/Layout/LayoutProvider.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,2BAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAEA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AAA8D,IAAAO,WAAA,GAAAP,OAAA;AAEvD,MAAM,CAACQ,gBAAgB,EAAEC,cAAc,CAAC,GAAG,IAAAC,iBAAS,EACzD,CACE;EAAEC,qBAAqB,GAAGC;AAAwE,CAAC,EACnGC,iBAAiB,KACd;EACH,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAG,IAAAC,eAAQ,EAACC,IAAI,CAACC,IAAI,CAACC,uBAAU,CAACC,GAAG,CAAC,QAAQ,CAAC,CAACC,KAAK,CAAC,CAAC;EACzF,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAG,IAAAP,eAAQ,EAACC,IAAI,CAACC,IAAI,CAACC,uBAAU,CAACC,GAAG,CAAC,QAAQ,CAAC,CAACI,MAAM,CAAC,CAAC;EAC5F,MAAMC,cAAc,GAAGR,IAAI,CAACS,GAAG,CAACZ,WAAW,EAAEQ,YAAY,CAAC;EAC1D,MAAMK,aAAa,GAAGV,IAAI,CAACW,GAAG,CAACd,WAAW,EAAEQ,YAAY,CAAC;EACzD,MAAMO,OAAqE,GAAGlB,qBAAqB,CAAC,CAAC;EACrG,MAAMmB,MAAM,GAAG;IACbC,GAAG,EAAEd,IAAI,CAACC,IAAI,CAACW,OAAO,CAACE,GAAG,CAAC;IAC3BC,MAAM,EAAEf,IAAI,CAACC,IAAI,CAACW,OAAO,CAACG,MAAM,CAAC;IACjCC,IAAI,EAAEhB,IAAI,CAACC,IAAI,CAACW,OAAO,CAACI,IAAI,C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MAC1B;IACF,CAAC,KAAK;MACJT,cAAc,CAACE,IAAI,CAACC,IAAI,CAACG,KAAK,CAAC,CAAC;MAChCE,eAAe,CAACN,IAAI,CAACC,IAAI,CAACM,MAAM,CAAC,CAAC;IACpC,CAAE;IAAAyC,QAAA,EAEDA;EAAQ,CACL,CACP,CAAC;EAEF,OAAO;IACL,GAAGd,UAAU;IACbwB,YAAY,EAAErD,YAAY;IAC1BiC,WAAW,EAAEzC,WAAW;IACxB8D,sBAAsB,EAAE9D,WAAW,GAAG,CAAC,GAAGqC,UAAU,CAACa,WAAW;IAChEX,cAAc,EAAE5B,cAAc;IAC9BoD,aAAa,EAAElD,aAAa;IAC5B6B,+BAA+B;IAC/BsB,cAAc,EAAEhD,MAAM;IACtBiD,KAAK,EAAEjD,MAAM,CAACC,GAAG;IACjBiD,MAAM,EAAElD,MAAM,CAACG,IAAI;IACnBgD,OAAO,EAAEnD,MAAM,CAACI,KAAK;IACrBgD,QAAQ,EAAEpD,MAAM,CAACE,MAAM;IACvBG,oBAAoB;IACpBG,qBAAqB;IACrBK,8BAA8B;IAC9BC,oBAAoB;IACpBG,sBAAsB;IACtBE,qBAAqB;IACrBC,uBAAuB;IACvBV,6BAA6B;IAC7BkB;EACF,CAAC;AACH,CAAC,EACD,QACF,CAAC;AAACyB,OAAA,CAAA1E,cAAA,GAAAA,cAAA;AAAA0E,OAAA,CAAA3E,gBAAA,GAAAA,gBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_reactNative","_reactNativeSafeAreaContext","_index","_index2","_WindowSizeClass","_useDynamicDimensions","useDynamicLayout","LayoutProvider","createCtx","useSafeAreaInsetsHook","useSafeAreaInsets","width","windowWidth","height","windowHeight","useWindowDimensions","windowShortLen","Math","min","windowLongLen","max","_insets","insets","top","ceil","bottom","left","right","windowWidthSizeClass","useMemo","decideWindowWidthSizeClass","windowHeightSizeClass","decideWindowHeightSizeClass","isWindowWidthSizeClassAtLeast","useCallback","sizeClass","isWindowHeightSizeClassAtLeast","isWidthAtLeastMedium","WindowSizeClass","MEDIUM","isWidthAtLeastExpanded","EXPANDED","isHeightAtLeastMedium","isHeightAtLeastExpanded","dimensions","useDynamicDimensions","screenShortLen","safeAreaBottom","screenWidth","localImageDimensionProps","useStableCallback","imageWidth","imageHeight","containerWidth","w","sidePadding","screenHeight","screenWidthWithPadding","screenLongLen","safeAreaInsets","sfTop","sfLeft","sfRight","sfBottom","exports"],"sourceRoot":"../../../../../src","sources":["component/Layout/Layout/LayoutProvider.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,2BAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAEA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AAEO,MAAM,CAACO,gBAAgB,EAAEC,cAAc,CAAC,GAAG,IAAAC,iBAAS,EACzD,CAAC;EAAEC,qBAAqB,GAAGC;AAAwE,CAAC,KAAK;EACvG,MAAM;IAAEC,KAAK,EAAEC,WAAW;IAAEC,MAAM,EAAEC;EAAa,CAAC,GAAG,IAAAC,gCAAmB,EAAC,CAAC;EAE1E,MAAMC,cAAc,GAAGC,IAAI,CAACC,GAAG,CAACN,WAAW,EAAEE,YAAY,CAAC;EAC1D,MAAMK,aAAa,GAAGF,IAAI,CAACG,GAAG,CAACR,WAAW,EAAEE,YAAY,CAAC;EACzD,MAAMO,OAAqE,GAAGZ,qBAAqB,CAAC,CAAC;EACrG,MAAMa,MAAM,GAAG;IACbC,GAAG,EAAEN,IAAI,CAACO,IAAI,CAACH,OAAO,CAACE,GAAG,CAAC;IAC3BE,MAAM,EAAER,IAAI,CAACO,IAAI,CAACH,OAAO,CAACI,MAAM,CAAC;IACjCC,IAAI,EAAET,IAAI,CAACO,IAAI,CAACH,OAAO,CAACK,IAAI,CAAC;IAC7BC,KAAK,E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AAAyD,OAAA,CAAA1D,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -9,11 +9,9 @@ var _react = require("react");
9
9
  var _useStableCallback = require("./useStableCallback.js");
10
10
  var _useUnmount = require("./useUnmount.js");
11
11
  function useTimeoutHandler() {
12
- const handler = (0, _react.useRef)(-1);
12
+ const handler = (0, _react.useRef)();
13
13
  (0, _useUnmount.useUnmount)(() => {
14
- if (handler.current !== -1) {
15
- clearTimeout(handler.current);
16
- }
14
+ clearTimeout(handler.current);
17
15
  });
18
16
  return handler;
19
17
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_useStableCallback","_useUnmount","useTimeoutHandler","handler","useRef","useUnmount","current","clearTimeout","useTimeoutHandlers","forEach","clearAllTimers","useStableCallback","clearTimerAtUnmount","id","withClear","push","setAutoClearTimeout","callback","ms","setTimeout"],"sourceRoot":"../../../src","sources":["hook/useTimeoutHandler.ts"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,kBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEA,SAASG,iBAAiBA,CAAA,EAAG;EAC3B,MAAMC,OAAO,GAAG,IAAAC,aAAM,EAAM,CAAC,CAAC,CAAC;EAE/B,IAAAC,sBAAU,EAAC,MAAM;IACf,IAAIF,OAAO,CAACG,OAAO,KAAK,CAAC,CAAC,EAAE;MAC1BC,YAAY,CAACJ,OAAO,CAACG,OAAO,CAAC;IAC/B;EACF,CAAC,CAAC;EAEF,OAAOH,OAAO;AAChB;AAEA,SAASK,kBAAkBA,CAAA,EAAG;EAC5B,MAAML,OAAO,GAAG,IAAAC,aAAM,EAAW,EAAE,CAAC;EAEpC,IAAAC,sBAAU,EAAC,MAAM;IACfF,OAAO,CAACG,OAAO,CAACG,OAAO,CAACF,YAAY,CAAC;EACvC,CAAC,CAAC;EAEF,MAAMG,cAAc,GAAG,IAAAC,oCAAiB,EAAC,MAAM;IAC7CR,OAAO,CAACG,OAAO,CAACG,OAAO,CAACF,YAAY,CAAC;IACrCJ,OAAO,CAACG,OAAO,GAAG,EAAE;EACtB,CAAC,CAAC;EAEF,MAAMM,mBAAmB,GAAG,IAAAD,oCAAiB,EAC3C,CAACE,EAAO,EAAE;IAAEC;EAAmC,CAAC,GAAG;IAAEA,SAAS,EAAE;EAAM,CAAC,KAAK;IAC1E,IAAIA,SAAS,EAAE;MACbJ,cAAc,CAAC,CAAC;IAClB;IACAP,OAAO,CAACG,OAAO,CAACS,IAAI,CAACF,EAAE,CAAC;IACxB,OAAOA,EAAE;EACX,CACF,CAAC;EAED,MAAMG,mBAAmB,GAAG,IAAAL,oCAAiB,EAC3C,CAACM,QAAoB,EAAEC,EAAU,EAAE;IAAEJ;EAAmC,CAAC,GAAG;IAAEA,SAAS,EAAE;EAAM,CAAC,KAAK;IACnG,IAAIA,SAAS,EAAE;MACbJ,cAAc,CAAC,CAAC;IAClB;IACA,OAAOE,mBAAmB,CAACO,UAAU,CAACF,QAAQ,EAAEC,EAAE,CAAC,CAAC;EACtD,CACF,CAAC;EAED,OAAO;IAAEN,mBAAmB;IAAEF,cAAc;IAAEM;EAAoB,CAAC;AACrE","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_useStableCallback","_useUnmount","useTimeoutHandler","handler","useRef","useUnmount","clearTimeout","current","useTimeoutHandlers","forEach","clearAllTimers","useStableCallback","clearTimerAtUnmount","id","withClear","push","setAutoClearTimeout","callback","ms","setTimeout"],"sourceRoot":"../../../src","sources":["hook/useTimeoutHandler.ts"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,kBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEA,SAASG,iBAAiBA,CAAA,EAAG;EAC3B,MAAMC,OAAO,GAAG,IAAAC,aAAM,EAAM,CAAC;EAE7B,IAAAC,sBAAU,EAAC,MAAM;IACfC,YAAY,CAACH,OAAO,CAACI,OAAO,CAAC;EAC/B,CAAC,CAAC;EAEF,OAAOJ,OAAO;AAChB;AAEA,SAASK,kBAAkBA,CAAA,EAAG;EAC5B,MAAML,OAAO,GAAG,IAAAC,aAAM,EAAW,EAAE,CAAC;EAEpC,IAAAC,sBAAU,EAAC,MAAM;IACfF,OAAO,CAACI,OAAO,CAACE,OAAO,CAACH,YAAY,CAAC;EACvC,CAAC,CAAC;EAEF,MAAMI,cAAc,GAAG,IAAAC,oCAAiB,EAAC,MAAM;IAC7CR,OAAO,CAACI,OAAO,CAACE,OAAO,CAACH,YAAY,CAAC;IACrCH,OAAO,CAACI,OAAO,GAAG,EAAE;EACtB,CAAC,CAAC;EAEF,MAAMK,mBAAmB,GAAG,IAAAD,oCAAiB,EAC3C,CAACE,EAAO,EAAE;IAAEC;EAAmC,CAAC,GAAG;IAAEA,SAAS,EAAE;EAAM,CAAC,KAAK;IAC1E,IAAIA,SAAS,EAAE;MACbJ,cAAc,CAAC,CAAC;IAClB;IACAP,OAAO,CAACI,OAAO,CAACQ,IAAI,CAACF,EAAE,CAAC;IACxB,OAAOA,EAAE;EACX,CACF,CAAC;EAED,MAAMG,mBAAmB,GAAG,IAAAL,oCAAiB,EAC3C,CAACM,QAAoB,EAAEC,EAAU,EAAE;IAAEJ;EAAmC,CAAC,GAAG;IAAEA,SAAS,EAAE;EAAM,CAAC,KAAK;IACnG,IAAIA,SAAS,EAAE;MACbJ,cAAc,CAAC,CAAC;IAClB;IACA,OAAOE,mBAAmB,CAACO,UAAU,CAACF,QAAQ,EAAEC,EAAE,CAAC,CAAC;EACtD,CACF,CAAC;EAED,OAAO;IAAEN,mBAAmB;IAAEF,cAAc;IAAEM;EAAoB,CAAC;AACrE","ignoreList":[]}
@@ -1,18 +1,19 @@
1
1
  "use strict";
2
2
 
3
- import { useCallback, useMemo, useState } from 'react';
4
- import { Dimensions, StyleSheet, View } from 'react-native';
3
+ import { useCallback, useMemo } from 'react';
4
+ import { useWindowDimensions } from 'react-native';
5
5
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
6
  import { useStableCallback } from "../../../hook/index.js";
7
7
  import { createCtx } from "../../../util/index.js";
8
8
  import { WindowSizeClass, decideWindowWidthSizeClass, decideWindowHeightSizeClass } from "./WindowSizeClass.js";
9
9
  import { useDynamicDimensions } from "./useDynamicDimensions.js";
10
- import { jsx as _jsx } from "react/jsx-runtime";
11
10
  export const [useDynamicLayout, LayoutProvider] = createCtx(({
12
11
  useSafeAreaInsetsHook = useSafeAreaInsets
13
- }, transformChildren) => {
14
- const [windowWidth, setWindowWidth] = useState(Math.ceil(Dimensions.get('window').width));
15
- const [windowHeight, setWindowHeight] = useState(Math.ceil(Dimensions.get('window').height));
12
+ }) => {
13
+ const {
14
+ width: windowWidth,
15
+ height: windowHeight
16
+ } = useWindowDimensions();
16
17
  const windowShortLen = Math.min(windowWidth, windowHeight);
17
18
  const windowLongLen = Math.max(windowWidth, windowHeight);
18
19
  const _insets = useSafeAreaInsetsHook();
@@ -37,15 +38,6 @@ export const [useDynamicLayout, LayoutProvider] = createCtx(({
37
38
  windowWidthSizeClass,
38
39
  windowHeightSizeClass
39
40
  });
40
- const updateScreenSizesBeforeRotation = useCallback(orientation => {
41
- if (orientation === 'portrait') {
42
- setWindowWidth(windowShortLen);
43
- setWindowHeight(windowLongLen);
44
- } else if (orientation === 'landscape') {
45
- setWindowWidth(windowLongLen);
46
- setWindowHeight(windowShortLen);
47
- }
48
- }, [windowLongLen, windowShortLen]);
49
41
  const localImageDimensionProps = useStableCallback((imageWidth, imageHeight, {
50
42
  containerWidth
51
43
  } = {
@@ -71,22 +63,6 @@ export const [useDynamicLayout, LayoutProvider] = createCtx(({
71
63
  };
72
64
  }
73
65
  });
74
- transformChildren(children => /*#__PURE__*/_jsx(View, {
75
- testID: 'LayoutProvider',
76
- style: StyleSheet.absoluteFill,
77
- onLayout: ({
78
- nativeEvent: {
79
- layout: {
80
- width,
81
- height
82
- }
83
- }
84
- }) => {
85
- setWindowWidth(Math.ceil(width));
86
- setWindowHeight(Math.ceil(height));
87
- },
88
- children: children
89
- }));
90
66
  return {
91
67
  ...dimensions,
92
68
  screenHeight: windowHeight,
@@ -94,7 +70,6 @@ export const [useDynamicLayout, LayoutProvider] = createCtx(({
94
70
  screenWidthWithPadding: windowWidth - 2 * dimensions.sidePadding,
95
71
  screenShortLen: windowShortLen,
96
72
  screenLongLen: windowLongLen,
97
- updateScreenSizesBeforeRotation,
98
73
  safeAreaInsets: insets,
99
74
  sfTop: insets.top,
100
75
  sfLeft: insets.left,
@@ -1 +1 @@
1
- {"version":3,"names":["useCallback","useMemo","useState","Dimensions","StyleSheet","View","useSafeAreaInsets","useStableCallback","createCtx","WindowSizeClass","decideWindowWidthSizeClass","decideWindowHeightSizeClass","useDynamicDimensions","jsx","_jsx","useDynamicLayout","LayoutProvider","useSafeAreaInsetsHook","transformChildren","windowWidth","setWindowWidth","Math","ceil","get","width","windowHeight","setWindowHeight","height","windowShortLen","min","windowLongLen","max","_insets","insets","top","bottom","left","right","windowWidthSizeClass","windowHeightSizeClass","isWindowWidthSizeClassAtLeast","sizeClass","isWindowHeightSizeClassAtLeast","isWidthAtLeastMedium","MEDIUM","isWidthAtLeastExpanded","EXPANDED","isHeightAtLeastMedium","isHeightAtLeastExpanded","dimensions","screenShortLen","safeAreaBottom","screenWidth","updateScreenSizesBeforeRotation","orientation","localImageDimensionProps","imageWidth","imageHeight","containerWidth","w","sidePadding","children","testID","style","absoluteFill","onLayout","nativeEvent","layout","screenHeight","screenWidthWithPadding","screenLongLen","safeAreaInsets","sfTop","sfLeft","sfRight","sfBottom"],"sourceRoot":"../../../../../src","sources":["component/Layout/Layout/LayoutProvider.tsx"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AACtD,SAASC,UAAU,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC3D,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SAASC,iBAAiB,QAAQ,wBAAe;AACjD,SAASC,SAAS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C,WAAW;IACxBkD,sBAAsB,EAAElD,WAAW,GAAG,CAAC,GAAG8B,UAAU,CAACW,WAAW;IAChEV,cAAc,EAAEtB,cAAc;IAC9B0C,aAAa,EAAExC,aAAa;IAC5BuB,+BAA+B;IAC/BkB,cAAc,EAAEtC,MAAM;IACtBuC,KAAK,EAAEvC,MAAM,CAACC,GAAG;IACjBuC,MAAM,EAAExC,MAAM,CAACG,IAAI;IACnBsC,OAAO,EAAEzC,MAAM,CAACI,KAAK;IACrBsC,QAAQ,EAAE1C,MAAM,CAACE,MAAM;IACvBG,oBAAoB;IACpBC,qBAAqB;IACrBG,8BAA8B;IAC9BC,oBAAoB;IACpBE,sBAAsB;IACtBE,qBAAqB;IACrBC,uBAAuB;IACvBR,6BAA6B;IAC7Be;EACF,CAAC;AACH,CAAC,EACD,QACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useCallback","useMemo","useWindowDimensions","useSafeAreaInsets","useStableCallback","createCtx","WindowSizeClass","decideWindowWidthSizeClass","decideWindowHeightSizeClass","useDynamicDimensions","useDynamicLayout","LayoutProvider","useSafeAreaInsetsHook","width","windowWidth","height","windowHeight","windowShortLen","Math","min","windowLongLen","max","_insets","insets","top","ceil","bottom","left","right","windowWidthSizeClass","windowHeightSizeClass","isWindowWidthSizeClassAtLeast","sizeClass","isWindowHeightSizeClassAtLeast","isWidthAtLeastMedium","MEDIUM","isWidthAtLeastExpanded","EXPANDED","isHeightAtLeastMedium","isHeightAtLeastExpanded","dimensions","screenShortLen","safeAreaBottom","screenWidth","localImageDimensionProps","imageWidth","imageHeight","containerWidth","w","sidePadding","screenHeight","screenWidthWithPadding","screenLongLen","safeAreaInsets","sfTop","sfLeft","sfRight","sfBottom"],"sourceRoot":"../../../../../src","sources":["component/Layout/Layout/LayoutProvider.tsx"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAC5C,SAASC,mBAAmB,QAAQ,cAAc;AAClD,SAASC,iBAAiB,QAAQ,gC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,CAAC,GAAG9B,IAAI,CAACC,GAAG,CAAC4B,cAAc,EAAEF,UAAU,CAAC;MAC9C,OAAO;QACLhC,KAAK,EAAEmC,CAAC;QACRjC,MAAM,EAAGiC,CAAC,GAAGF,WAAW,GAAID;MAC9B,CAAC;IACH;EACF,CACF,CAAC;EAED,OAAO;IACL,GAAGL,UAAU;IACbU,YAAY,EAAElC,YAAY;IAC1B2B,WAAW,EAAE7B,WAAW;IACxBqC,sBAAsB,EAAErC,WAAW,GAAG,CAAC,GAAG0B,UAAU,CAACS,WAAW;IAChER,cAAc,EAAExB,cAAc;IAC9BmC,aAAa,EAAEhC,aAAa;IAC5BiC,cAAc,EAAE9B,MAAM;IACtB+B,KAAK,EAAE/B,MAAM,CAACC,GAAG;IACjB+B,MAAM,EAAEhC,MAAM,CAACI,IAAI;IACnB6B,OAAO,EAAEjC,MAAM,CAACK,KAAK;IACrB6B,QAAQ,EAAElC,MAAM,CAACG,MAAM;IACvBG,oBAAoB;IACpBC,qBAAqB;IACrBG,8BAA8B;IAC9BC,oBAAoB;IACpBE,sBAAsB;IACtBE,qBAAqB;IACrBC,uBAAuB;IACvBR,6BAA6B;IAC7Ba;EACF,CAAC;AACH,CAAC,EACD,QACF,CAAC","ignoreList":[]}
@@ -4,11 +4,9 @@ import { useRef } from 'react';
4
4
  import { useStableCallback } from "./useStableCallback.js";
5
5
  import { useUnmount } from "./useUnmount.js";
6
6
  function useTimeoutHandler() {
7
- const handler = useRef(-1);
7
+ const handler = useRef();
8
8
  useUnmount(() => {
9
- if (handler.current !== -1) {
10
- clearTimeout(handler.current);
11
- }
9
+ clearTimeout(handler.current);
12
10
  });
13
11
  return handler;
14
12
  }
@@ -1 +1 @@
1
- {"version":3,"names":["useRef","useStableCallback","useUnmount","useTimeoutHandler","handler","current","clearTimeout","useTimeoutHandlers","forEach","clearAllTimers","clearTimerAtUnmount","id","withClear","push","setAutoClearTimeout","callback","ms","setTimeout"],"sourceRoot":"../../../src","sources":["hook/useTimeoutHand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AACF,QAAQ,EAAEC,EAAE,CAAC,CAAC;EACtD,CACF,CAAC;EAED,OAAO;IAAEN,mBAAmB;IAAED,cAAc;IAAEK;EAAoB,CAAC;AACrE;AAEA,SAASX,iBAAiB,EAAEI,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["useRef","useStableCallback","useUnmount","useTimeoutHandler","handler","clearTimeout","current","useTimeoutHandlers","forEach","clearAllTimers","clearTimerAtUnmount","id","withClear","push","setAutoClearTimeout","callback","ms","setTimeout"],"sourceRoot":"../../../src","sources":["hook/useTimeoutHandler.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,OAAO;AAE9B,SAASC,iBAAiB,QAAQ,wBAAqB;AACvD,SAASC,UAAU,QAAQ,iBAAc;AAEzC,SAASC,iBAAiBA,CAAA,EAAG;EAC3B,MAAMC,OAAO,GAAGJ,MAAM,CAAM,CAAC;EAE7BE,UAAU,CAAC,MAAM;IACfG,YAAY,CAACD,OAAO,CAACE,OAAO,CAAC;EAC/B,CAAC,CAAC;EAEF,OAAOF,OAAO;AAChB;AAEA,SAASG,kBAAkBA,CAAA,EAAG;EAC5B,MAAMH,OAAO,GAAGJ,MAAM,CAAW,EAAE,CAAC;EAEpCE,UAAU,CAAC,MAAM;IACfE,OAAO,CAACE,OAAO,CAACE,OAAO,CAACH,YAAY,CAAC;EACvC,CAAC,CAAC;EAEF,MAAMI,cAAc,GAAGR,iBAAiB,CAAC,MAAM;IAC7CG,OAAO,CAACE,OAAO,CAACE,OAAO,CAACH,YAAY,CAAC;IACrCD,OAAO,CAACE,OAAO,GAAG,EAAE;EACtB,CAAC,CAAC;EAEF,MAAMI,mBAAmB,GAAGT,iBAAiB,CAC3C,CAACU,EAAO,EAAE;IAAEC;EAAmC,CAAC,GAAG;IAAEA,SAAS,EAAE;EAAM,CAAC,KAAK;IAC1E,IAAIA,SAAS,EAAE;MACbH,cAAc,CAAC,CAAC;IAClB;IACAL,OAAO,CAACE,OAAO,CAACO,IAAI,CAACF,EAAE,CAAC;IACxB,OAAOA,EAAE;EACX,CACF,CAAC;EAED,MAAMG,mBAAmB,GAAGb,iBAAiB,CAC3C,CAACc,QAAoB,EAAEC,EAAU,EAAE;IAAEJ;EAAmC,CAAC,GAAG;IAAEA,SAAS,EAAE;EAAM,CAAC,KAAK;IACnG,IAAIA,SAAS,EAAE;MACbH,cAAc,CAAC,CAAC;IAClB;IACA,OAAOC,mBAAmB,CAACO,UAAU,CAACF,QAAQ,EAAEC,EAAE,CAAC,CAAC;EACtD,CACF,CAAC;EAED,OAAO;IAAEN,mBAAmB;IAAED,cAAc;IAAEK;EAAoB,CAAC;AACrE;AAEA,SAASX,iBAAiB,EAAEI,kBAAkB","ignoreList":[]}
@@ -7,7 +7,6 @@ export declare const useDynamicLayout: () => {
7
7
  screenWidthWithPadding: number;
8
8
  screenShortLen: number;
9
9
  screenLongLen: number;
10
- updateScreenSizesBeforeRotation: (orientation: 'portrait' | 'landscape') => void;
11
10
  safeAreaInsets: {
12
11
  readonly top: number;
13
12
  readonly bottom: number;
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutProvider.d.ts","sourceRoot":"","sources":["../../../../../../../src/component/Layout/Layout/LayoutProvider.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAKnE,OAAO,EAAE,eAAe,EAA2D,MAAM,mBAAmB,CAAC;AAG7G,eAAO,MAAO,gBAAgB;;;;;;mDA8CV,UAAU,GAAG,WAAW;;;;;;;;;;;;;gDAnB1B,eAAe;;;;;+CAJf,eAAe;2CAqCb,MAAM,eACL,MAAM;wBACmB,YAAY,GAAG,eAAe,GAAG,MAAM;;;;;;;GA9DrD,cAAc;;;;4FAkI7C,CAAC"}
1
+ {"version":3,"file":"LayoutProvider.d.ts","sourceRoot":"","sources":["../../../../../../../src/component/Layout/Layout/LayoutProvider.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAKnE,OAAO,EAAE,eAAe,EAA2D,MAAM,mBAAmB,CAAC;AAG7G,eAAO,MAAO,gBAAgB;;;;;;;;;;;;;;;;;;gDAwBZ,eAAe;;;;;+CAJf,eAAe;2CAwBb,MAAM,eACL,MAAM;wBACmB,YAAY,GAAG,eAAe,GAAG,MAAM;;;;;;;GA9CrD,cAAc;;;;4FAgG7C,CAAC"}
@@ -19,8 +19,8 @@ type Props = {
19
19
  } & Omit<CoreTextFieldProps, 'style'>;
20
20
  export declare const BaseTextField: React.ForwardRefExoticComponent<{
21
21
  label?: string | undefined;
22
- leadingIcon?: "filter" | "scroll" | "link" | "picture" | "search" | "time" | "video" | "top" | "timer" | "document" | "note" | "set" | "new" | "repeat" | "ai" | "ai_color" | "ai_sad" | "alarm" | "apple_color" | "arrow_down" | "arrow_left" | "arrow_left_circle" | "arrow_left_limit" | "arrow_left_right" | "arrow_right" | "arrow_right_circle" | "arrow_right_limit" | "arrow_up" | "arrow_up_down" | "arrow_up_limit" | "barchart" | "book" | "bookmark" | "bookmark_animation" | "box" | "bus_color" | "calendar_check" | "calendar_check_color" | "calendar_color" | "camera" | "card" | "cards_percent" | "cards_percent_color" | "caret_down" | "caret_left" | "caret_right" | "caret_up" | "cart" | "chat_bubble" | "chat_bubble_badge_color" | "chat_bubble_correct" | "chat_bubble_correct_color" | "chat_bubble_dots" | "chat_bubble_question" | "chat_bubble_question_animation" | "chat_bubble_question_color" | "check" | "check_in_circle" | "check_in_circle_color" | "check_in_circle_line" | "chevron_down" | "chevron_down_two" | "chevron_left" | "chevron_right" | "chevron_right_two" | "chevron_up" | "chevron_up_two" | "circles" | "clip" | "close" | "close_in_circle" | "coin" | "contact" | "copy" | "correct" | "coupon" | "crown" | "curriculum" | "curriculum_color" | "delete" | "dots" | "download" | "emoji" | "emoji_plus" | "emoji_plus_dash" | "eng" | "enter" | "equal" | "eraser" | "exclamation_point_in_circle" | "eye_off" | "eye_on" | "face_happy" | "face_sad" | "facebook" | "facebook_color" | "fire" | "fire_color" | "folder" | "frame" | "glasses" | "google_color" | "graph" | "hair" | "headphone" | "heart" | "home" | "infinite" | "info_in_circle" | "instagram" | "kakao_color" | "kor" | "league" | "letter" | "letter_crown_color" | "letter_crown_open_color" | "letter_heart_color" | "letter_heart_open_color" | "line_three" | "lock" | "logo_apple" | "logo_color" | "logo_facebook" | "logo_kakao" | "logo_naver" | "maxsize" | "minsize" | "minus" | "minus_in_circle" | "moneybag" | "moneybag_color" | "more" | "my_bubble" | "naver_color" | "note_color" | "note_pen_color" | "number_five_filled" | "number_five_outlined" | "number_four_filled" | "number_four_outlined" | "number_one_filled" | "number_one_outlined" | "number_three_filled" | "number_three_outlined" | "number_two_filled" | "number_two_outlined" | "out" | "palm_tree_color" | "paper_check" | "paper_pen" | "paper_pen_color" | "paper_two" | "pause" | "pen" | "percent_in_circle" | "pill" | "pill_color" | "pin" | "pin_color_red" | "play" | "plus" | "plus_in_circle" | "point_in_circle" | "point_in_circle_color" | "present" | "present_color" | "problem" | "profile" | "progress_gradient" | "question_mark_in_circle" | "question_mark_in_circle_outlined" | "raffle_color" | "receipt" | "refresh" | "school" | "school_color" | "setting" | "share" | "shield_check" | "siren" | "skipback" | "skipforward" | "sound_off" | "sound_on" | "speaker" | "stackup" | "star" | "star_color" | "store" | "sync" | "test_upload_color" | "thumbdown" | "thumbup" | "thunder" | "ticket" | "ticket_color" | "touch" | "trash" | "treasurebox" | "trophy" | "twinkle" | "undo" | "university" | "user_blocked" | "user_check" | "user_plus" | "user_two" | "video_color" | "vote_color" | "warning" | "wifi" | "workbook" | "workbook_color" | "wrong" | "youtube" | undefined;
23
- trailingIcon?: "filter" | "scroll" | "link" | "picture" | "search" | "time" | "video" | "top" | "timer" | "document" | "note" | "set" | "new" | "repeat" | "ai" | "ai_color" | "ai_sad" | "alarm" | "apple_color" | "arrow_down" | "arrow_left" | "arrow_left_circle" | "arrow_left_limit" | "arrow_left_right" | "arrow_right" | "arrow_right_circle" | "arrow_right_limit" | "arrow_up" | "arrow_up_down" | "arrow_up_limit" | "barchart" | "book" | "bookmark" | "bookmark_animation" | "box" | "bus_color" | "calendar_check" | "calendar_check_color" | "calendar_color" | "camera" | "card" | "cards_percent" | "cards_percent_color" | "caret_down" | "caret_left" | "caret_right" | "caret_up" | "cart" | "chat_bubble" | "chat_bubble_badge_color" | "chat_bubble_correct" | "chat_bubble_correct_color" | "chat_bubble_dots" | "chat_bubble_question" | "chat_bubble_question_animation" | "chat_bubble_question_color" | "check" | "check_in_circle" | "check_in_circle_color" | "check_in_circle_line" | "chevron_down" | "chevron_down_two" | "chevron_left" | "chevron_right" | "chevron_right_two" | "chevron_up" | "chevron_up_two" | "circles" | "clip" | "close" | "close_in_circle" | "coin" | "contact" | "copy" | "correct" | "coupon" | "crown" | "curriculum" | "curriculum_color" | "delete" | "dots" | "download" | "emoji" | "emoji_plus" | "emoji_plus_dash" | "eng" | "enter" | "equal" | "eraser" | "exclamation_point_in_circle" | "eye_off" | "eye_on" | "face_happy" | "face_sad" | "facebook" | "facebook_color" | "fire" | "fire_color" | "folder" | "frame" | "glasses" | "google_color" | "graph" | "hair" | "headphone" | "heart" | "home" | "infinite" | "info_in_circle" | "instagram" | "kakao_color" | "kor" | "league" | "letter" | "letter_crown_color" | "letter_crown_open_color" | "letter_heart_color" | "letter_heart_open_color" | "line_three" | "lock" | "logo_apple" | "logo_color" | "logo_facebook" | "logo_kakao" | "logo_naver" | "maxsize" | "minsize" | "minus" | "minus_in_circle" | "moneybag" | "moneybag_color" | "more" | "my_bubble" | "naver_color" | "note_color" | "note_pen_color" | "number_five_filled" | "number_five_outlined" | "number_four_filled" | "number_four_outlined" | "number_one_filled" | "number_one_outlined" | "number_three_filled" | "number_three_outlined" | "number_two_filled" | "number_two_outlined" | "out" | "palm_tree_color" | "paper_check" | "paper_pen" | "paper_pen_color" | "paper_two" | "pause" | "pen" | "percent_in_circle" | "pill" | "pill_color" | "pin" | "pin_color_red" | "play" | "plus" | "plus_in_circle" | "point_in_circle" | "point_in_circle_color" | "present" | "present_color" | "problem" | "profile" | "progress_gradient" | "question_mark_in_circle" | "question_mark_in_circle_outlined" | "raffle_color" | "receipt" | "refresh" | "school" | "school_color" | "setting" | "share" | "shield_check" | "siren" | "skipback" | "skipforward" | "sound_off" | "sound_on" | "speaker" | "stackup" | "star" | "star_color" | "store" | "sync" | "test_upload_color" | "thumbdown" | "thumbup" | "thunder" | "ticket" | "ticket_color" | "touch" | "trash" | "treasurebox" | "trophy" | "twinkle" | "undo" | "university" | "user_blocked" | "user_check" | "user_plus" | "user_two" | "video_color" | "vote_color" | "warning" | "wifi" | "workbook" | "workbook_color" | "wrong" | "youtube" | undefined;
22
+ leadingIcon?: "filter" | "scroll" | "link" | "picture" | "search" | "time" | "video" | "top" | "timer" | "document" | "note" | "set" | "repeat" | "new" | "ai" | "ai_color" | "ai_sad" | "alarm" | "apple_color" | "arrow_down" | "arrow_left" | "arrow_left_circle" | "arrow_left_limit" | "arrow_left_right" | "arrow_right" | "arrow_right_circle" | "arrow_right_limit" | "arrow_up" | "arrow_up_down" | "arrow_up_limit" | "barchart" | "book" | "bookmark" | "bookmark_animation" | "box" | "bus_color" | "calendar_check" | "calendar_check_color" | "calendar_color" | "camera" | "card" | "cards_percent" | "cards_percent_color" | "caret_down" | "caret_left" | "caret_right" | "caret_up" | "cart" | "chat_bubble" | "chat_bubble_badge_color" | "chat_bubble_correct" | "chat_bubble_correct_color" | "chat_bubble_dots" | "chat_bubble_question" | "chat_bubble_question_animation" | "chat_bubble_question_color" | "check" | "check_in_circle" | "check_in_circle_color" | "check_in_circle_line" | "chevron_down" | "chevron_down_two" | "chevron_left" | "chevron_right" | "chevron_right_two" | "chevron_up" | "chevron_up_two" | "circles" | "clip" | "close" | "close_in_circle" | "coin" | "contact" | "copy" | "correct" | "coupon" | "crown" | "curriculum" | "curriculum_color" | "delete" | "dots" | "download" | "emoji" | "emoji_plus" | "emoji_plus_dash" | "eng" | "enter" | "equal" | "eraser" | "exclamation_point_in_circle" | "eye_off" | "eye_on" | "face_happy" | "face_sad" | "facebook" | "facebook_color" | "fire" | "fire_color" | "folder" | "frame" | "glasses" | "google_color" | "graph" | "hair" | "headphone" | "heart" | "home" | "infinite" | "info_in_circle" | "instagram" | "kakao_color" | "kor" | "league" | "letter" | "letter_crown_color" | "letter_crown_open_color" | "letter_heart_color" | "letter_heart_open_color" | "line_three" | "lock" | "logo_apple" | "logo_color" | "logo_facebook" | "logo_kakao" | "logo_naver" | "maxsize" | "minsize" | "minus" | "minus_in_circle" | "moneybag" | "moneybag_color" | "more" | "my_bubble" | "naver_color" | "note_color" | "note_pen_color" | "number_five_filled" | "number_five_outlined" | "number_four_filled" | "number_four_outlined" | "number_one_filled" | "number_one_outlined" | "number_three_filled" | "number_three_outlined" | "number_two_filled" | "number_two_outlined" | "out" | "palm_tree_color" | "paper_check" | "paper_pen" | "paper_pen_color" | "paper_two" | "pause" | "pen" | "percent_in_circle" | "pill" | "pill_color" | "pin" | "pin_color_red" | "play" | "plus" | "plus_in_circle" | "point_in_circle" | "point_in_circle_color" | "present" | "present_color" | "problem" | "profile" | "progress_gradient" | "question_mark_in_circle" | "question_mark_in_circle_outlined" | "raffle_color" | "receipt" | "refresh" | "school" | "school_color" | "setting" | "share" | "shield_check" | "siren" | "skipback" | "skipforward" | "sound_off" | "sound_on" | "speaker" | "stackup" | "star" | "star_color" | "store" | "sync" | "test_upload_color" | "thumbdown" | "thumbup" | "thunder" | "ticket" | "ticket_color" | "touch" | "trash" | "treasurebox" | "trophy" | "twinkle" | "undo" | "university" | "user_blocked" | "user_check" | "user_plus" | "user_two" | "video_color" | "vote_color" | "warning" | "wifi" | "workbook" | "workbook_color" | "wrong" | "youtube" | undefined;
23
+ trailingIcon?: "filter" | "scroll" | "link" | "picture" | "search" | "time" | "video" | "top" | "timer" | "document" | "note" | "set" | "repeat" | "new" | "ai" | "ai_color" | "ai_sad" | "alarm" | "apple_color" | "arrow_down" | "arrow_left" | "arrow_left_circle" | "arrow_left_limit" | "arrow_left_right" | "arrow_right" | "arrow_right_circle" | "arrow_right_limit" | "arrow_up" | "arrow_up_down" | "arrow_up_limit" | "barchart" | "book" | "bookmark" | "bookmark_animation" | "box" | "bus_color" | "calendar_check" | "calendar_check_color" | "calendar_color" | "camera" | "card" | "cards_percent" | "cards_percent_color" | "caret_down" | "caret_left" | "caret_right" | "caret_up" | "cart" | "chat_bubble" | "chat_bubble_badge_color" | "chat_bubble_correct" | "chat_bubble_correct_color" | "chat_bubble_dots" | "chat_bubble_question" | "chat_bubble_question_animation" | "chat_bubble_question_color" | "check" | "check_in_circle" | "check_in_circle_color" | "check_in_circle_line" | "chevron_down" | "chevron_down_two" | "chevron_left" | "chevron_right" | "chevron_right_two" | "chevron_up" | "chevron_up_two" | "circles" | "clip" | "close" | "close_in_circle" | "coin" | "contact" | "copy" | "correct" | "coupon" | "crown" | "curriculum" | "curriculum_color" | "delete" | "dots" | "download" | "emoji" | "emoji_plus" | "emoji_plus_dash" | "eng" | "enter" | "equal" | "eraser" | "exclamation_point_in_circle" | "eye_off" | "eye_on" | "face_happy" | "face_sad" | "facebook" | "facebook_color" | "fire" | "fire_color" | "folder" | "frame" | "glasses" | "google_color" | "graph" | "hair" | "headphone" | "heart" | "home" | "infinite" | "info_in_circle" | "instagram" | "kakao_color" | "kor" | "league" | "letter" | "letter_crown_color" | "letter_crown_open_color" | "letter_heart_color" | "letter_heart_open_color" | "line_three" | "lock" | "logo_apple" | "logo_color" | "logo_facebook" | "logo_kakao" | "logo_naver" | "maxsize" | "minsize" | "minus" | "minus_in_circle" | "moneybag" | "moneybag_color" | "more" | "my_bubble" | "naver_color" | "note_color" | "note_pen_color" | "number_five_filled" | "number_five_outlined" | "number_four_filled" | "number_four_outlined" | "number_one_filled" | "number_one_outlined" | "number_three_filled" | "number_three_outlined" | "number_two_filled" | "number_two_outlined" | "out" | "palm_tree_color" | "paper_check" | "paper_pen" | "paper_pen_color" | "paper_two" | "pause" | "pen" | "percent_in_circle" | "pill" | "pill_color" | "pin" | "pin_color_red" | "play" | "plus" | "plus_in_circle" | "point_in_circle" | "point_in_circle_color" | "present" | "present_color" | "problem" | "profile" | "progress_gradient" | "question_mark_in_circle" | "question_mark_in_circle_outlined" | "raffle_color" | "receipt" | "refresh" | "school" | "school_color" | "setting" | "share" | "shield_check" | "siren" | "skipback" | "skipforward" | "sound_off" | "sound_on" | "speaker" | "stackup" | "star" | "star_color" | "store" | "sync" | "test_upload_color" | "thumbdown" | "thumbup" | "thunder" | "ticket" | "ticket_color" | "touch" | "trash" | "treasurebox" | "trophy" | "twinkle" | "undo" | "university" | "user_blocked" | "user_check" | "user_plus" | "user_two" | "video_color" | "vote_color" | "warning" | "wifi" | "workbook" | "workbook_color" | "wrong" | "youtube" | undefined;
24
24
  trailingIconFill?: ColorValue | undefined;
25
25
  trailingElements?: React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
26
26
  disabled?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"useTimeoutHandler.d.ts","sourceRoot":"","sources":["../../../../../src/hook/useTimeoutHandler.ts"],"names":[],"mappings":";AAKA,iBAAS,iBAAiB,0CAUzB;AAED,iBAAS,kBAAkB;8BAalB,GAAG;;;;oCAUG,MAAM,IAAI,MAAM,MAAM;;;EASpC;AAED,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"useTimeoutHandler.d.ts","sourceRoot":"","sources":["../../../../../src/hook/useTimeoutHandler.ts"],"names":[],"mappings":";AAKA,iBAAS,iBAAiB,0CAQzB;AAED,iBAAS,kBAAkB;8BAalB,GAAG;;;;oCAUG,MAAM,IAAI,MAAM,MAAM;;;EASpC;AAED,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAC"}
@@ -7,7 +7,6 @@ export declare const useDynamicLayout: () => {
7
7
  screenWidthWithPadding: number;
8
8
  screenShortLen: number;
9
9
  screenLongLen: number;
10
- updateScreenSizesBeforeRotation: (orientation: 'portrait' | 'landscape') => void;
11
10
  safeAreaInsets: {
12
11
  readonly top: number;
13
12
  readonly bottom: number;
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutProvider.d.ts","sourceRoot":"","sources":["../../../../../../../src/component/Layout/Layout/LayoutProvider.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAKnE,OAAO,EAAE,eAAe,EAA2D,MAAM,mBAAmB,CAAC;AAG7G,eAAO,MAAO,gBAAgB;;;;;;mDA8CV,UAAU,GAAG,WAAW;;;;;;;;;;;;;gDAnB1B,eAAe;;;;;+CAJf,eAAe;2CAqCb,MAAM,eACL,MAAM;wBACmB,YAAY,GAAG,eAAe,GAAG,MAAM;;;;;;;GA9DrD,cAAc;;;;4FAkI7C,CAAC"}
1
+ {"version":3,"file":"LayoutProvider.d.ts","sourceRoot":"","sources":["../../../../../../../src/component/Layout/Layout/LayoutProvider.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAKnE,OAAO,EAAE,eAAe,EAA2D,MAAM,mBAAmB,CAAC;AAG7G,eAAO,MAAO,gBAAgB;;;;;;;;;;;;;;;;;;gDAwBZ,eAAe;;;;;+CAJf,eAAe;2CAwBb,MAAM,eACL,MAAM;wBACmB,YAAY,GAAG,eAAe,GAAG,MAAM;;;;;;;GA9CrD,cAAc;;;;4FAgG7C,CAAC"}
@@ -19,8 +19,8 @@ type Props = {
19
19
  } & Omit<CoreTextFieldProps, 'style'>;
20
20
  export declare const BaseTextField: React.ForwardRefExoticComponent<{
21
21
  label?: string | undefined;
22
- leadingIcon?: "filter" | "scroll" | "link" | "picture" | "search" | "time" | "video" | "top" | "timer" | "document" | "note" | "set" | "new" | "repeat" | "ai" | "ai_color" | "ai_sad" | "alarm" | "apple_color" | "arrow_down" | "arrow_left" | "arrow_left_circle" | "arrow_left_limit" | "arrow_left_right" | "arrow_right" | "arrow_right_circle" | "arrow_right_limit" | "arrow_up" | "arrow_up_down" | "arrow_up_limit" | "barchart" | "book" | "bookmark" | "bookmark_animation" | "box" | "bus_color" | "calendar_check" | "calendar_check_color" | "calendar_color" | "camera" | "card" | "cards_percent" | "cards_percent_color" | "caret_down" | "caret_left" | "caret_right" | "caret_up" | "cart" | "chat_bubble" | "chat_bubble_badge_color" | "chat_bubble_correct" | "chat_bubble_correct_color" | "chat_bubble_dots" | "chat_bubble_question" | "chat_bubble_question_animation" | "chat_bubble_question_color" | "check" | "check_in_circle" | "check_in_circle_color" | "check_in_circle_line" | "chevron_down" | "chevron_down_two" | "chevron_left" | "chevron_right" | "chevron_right_two" | "chevron_up" | "chevron_up_two" | "circles" | "clip" | "close" | "close_in_circle" | "coin" | "contact" | "copy" | "correct" | "coupon" | "crown" | "curriculum" | "curriculum_color" | "delete" | "dots" | "download" | "emoji" | "emoji_plus" | "emoji_plus_dash" | "eng" | "enter" | "equal" | "eraser" | "exclamation_point_in_circle" | "eye_off" | "eye_on" | "face_happy" | "face_sad" | "facebook" | "facebook_color" | "fire" | "fire_color" | "folder" | "frame" | "glasses" | "google_color" | "graph" | "hair" | "headphone" | "heart" | "home" | "infinite" | "info_in_circle" | "instagram" | "kakao_color" | "kor" | "league" | "letter" | "letter_crown_color" | "letter_crown_open_color" | "letter_heart_color" | "letter_heart_open_color" | "line_three" | "lock" | "logo_apple" | "logo_color" | "logo_facebook" | "logo_kakao" | "logo_naver" | "maxsize" | "minsize" | "minus" | "minus_in_circle" | "moneybag" | "moneybag_color" | "more" | "my_bubble" | "naver_color" | "note_color" | "note_pen_color" | "number_five_filled" | "number_five_outlined" | "number_four_filled" | "number_four_outlined" | "number_one_filled" | "number_one_outlined" | "number_three_filled" | "number_three_outlined" | "number_two_filled" | "number_two_outlined" | "out" | "palm_tree_color" | "paper_check" | "paper_pen" | "paper_pen_color" | "paper_two" | "pause" | "pen" | "percent_in_circle" | "pill" | "pill_color" | "pin" | "pin_color_red" | "play" | "plus" | "plus_in_circle" | "point_in_circle" | "point_in_circle_color" | "present" | "present_color" | "problem" | "profile" | "progress_gradient" | "question_mark_in_circle" | "question_mark_in_circle_outlined" | "raffle_color" | "receipt" | "refresh" | "school" | "school_color" | "setting" | "share" | "shield_check" | "siren" | "skipback" | "skipforward" | "sound_off" | "sound_on" | "speaker" | "stackup" | "star" | "star_color" | "store" | "sync" | "test_upload_color" | "thumbdown" | "thumbup" | "thunder" | "ticket" | "ticket_color" | "touch" | "trash" | "treasurebox" | "trophy" | "twinkle" | "undo" | "university" | "user_blocked" | "user_check" | "user_plus" | "user_two" | "video_color" | "vote_color" | "warning" | "wifi" | "workbook" | "workbook_color" | "wrong" | "youtube" | undefined;
23
- trailingIcon?: "filter" | "scroll" | "link" | "picture" | "search" | "time" | "video" | "top" | "timer" | "document" | "note" | "set" | "new" | "repeat" | "ai" | "ai_color" | "ai_sad" | "alarm" | "apple_color" | "arrow_down" | "arrow_left" | "arrow_left_circle" | "arrow_left_limit" | "arrow_left_right" | "arrow_right" | "arrow_right_circle" | "arrow_right_limit" | "arrow_up" | "arrow_up_down" | "arrow_up_limit" | "barchart" | "book" | "bookmark" | "bookmark_animation" | "box" | "bus_color" | "calendar_check" | "calendar_check_color" | "calendar_color" | "camera" | "card" | "cards_percent" | "cards_percent_color" | "caret_down" | "caret_left" | "caret_right" | "caret_up" | "cart" | "chat_bubble" | "chat_bubble_badge_color" | "chat_bubble_correct" | "chat_bubble_correct_color" | "chat_bubble_dots" | "chat_bubble_question" | "chat_bubble_question_animation" | "chat_bubble_question_color" | "check" | "check_in_circle" | "check_in_circle_color" | "check_in_circle_line" | "chevron_down" | "chevron_down_two" | "chevron_left" | "chevron_right" | "chevron_right_two" | "chevron_up" | "chevron_up_two" | "circles" | "clip" | "close" | "close_in_circle" | "coin" | "contact" | "copy" | "correct" | "coupon" | "crown" | "curriculum" | "curriculum_color" | "delete" | "dots" | "download" | "emoji" | "emoji_plus" | "emoji_plus_dash" | "eng" | "enter" | "equal" | "eraser" | "exclamation_point_in_circle" | "eye_off" | "eye_on" | "face_happy" | "face_sad" | "facebook" | "facebook_color" | "fire" | "fire_color" | "folder" | "frame" | "glasses" | "google_color" | "graph" | "hair" | "headphone" | "heart" | "home" | "infinite" | "info_in_circle" | "instagram" | "kakao_color" | "kor" | "league" | "letter" | "letter_crown_color" | "letter_crown_open_color" | "letter_heart_color" | "letter_heart_open_color" | "line_three" | "lock" | "logo_apple" | "logo_color" | "logo_facebook" | "logo_kakao" | "logo_naver" | "maxsize" | "minsize" | "minus" | "minus_in_circle" | "moneybag" | "moneybag_color" | "more" | "my_bubble" | "naver_color" | "note_color" | "note_pen_color" | "number_five_filled" | "number_five_outlined" | "number_four_filled" | "number_four_outlined" | "number_one_filled" | "number_one_outlined" | "number_three_filled" | "number_three_outlined" | "number_two_filled" | "number_two_outlined" | "out" | "palm_tree_color" | "paper_check" | "paper_pen" | "paper_pen_color" | "paper_two" | "pause" | "pen" | "percent_in_circle" | "pill" | "pill_color" | "pin" | "pin_color_red" | "play" | "plus" | "plus_in_circle" | "point_in_circle" | "point_in_circle_color" | "present" | "present_color" | "problem" | "profile" | "progress_gradient" | "question_mark_in_circle" | "question_mark_in_circle_outlined" | "raffle_color" | "receipt" | "refresh" | "school" | "school_color" | "setting" | "share" | "shield_check" | "siren" | "skipback" | "skipforward" | "sound_off" | "sound_on" | "speaker" | "stackup" | "star" | "star_color" | "store" | "sync" | "test_upload_color" | "thumbdown" | "thumbup" | "thunder" | "ticket" | "ticket_color" | "touch" | "trash" | "treasurebox" | "trophy" | "twinkle" | "undo" | "university" | "user_blocked" | "user_check" | "user_plus" | "user_two" | "video_color" | "vote_color" | "warning" | "wifi" | "workbook" | "workbook_color" | "wrong" | "youtube" | undefined;
22
+ leadingIcon?: "filter" | "scroll" | "link" | "picture" | "search" | "time" | "video" | "top" | "timer" | "document" | "note" | "set" | "repeat" | "new" | "ai" | "ai_color" | "ai_sad" | "alarm" | "apple_color" | "arrow_down" | "arrow_left" | "arrow_left_circle" | "arrow_left_limit" | "arrow_left_right" | "arrow_right" | "arrow_right_circle" | "arrow_right_limit" | "arrow_up" | "arrow_up_down" | "arrow_up_limit" | "barchart" | "book" | "bookmark" | "bookmark_animation" | "box" | "bus_color" | "calendar_check" | "calendar_check_color" | "calendar_color" | "camera" | "card" | "cards_percent" | "cards_percent_color" | "caret_down" | "caret_left" | "caret_right" | "caret_up" | "cart" | "chat_bubble" | "chat_bubble_badge_color" | "chat_bubble_correct" | "chat_bubble_correct_color" | "chat_bubble_dots" | "chat_bubble_question" | "chat_bubble_question_animation" | "chat_bubble_question_color" | "check" | "check_in_circle" | "check_in_circle_color" | "check_in_circle_line" | "chevron_down" | "chevron_down_two" | "chevron_left" | "chevron_right" | "chevron_right_two" | "chevron_up" | "chevron_up_two" | "circles" | "clip" | "close" | "close_in_circle" | "coin" | "contact" | "copy" | "correct" | "coupon" | "crown" | "curriculum" | "curriculum_color" | "delete" | "dots" | "download" | "emoji" | "emoji_plus" | "emoji_plus_dash" | "eng" | "enter" | "equal" | "eraser" | "exclamation_point_in_circle" | "eye_off" | "eye_on" | "face_happy" | "face_sad" | "facebook" | "facebook_color" | "fire" | "fire_color" | "folder" | "frame" | "glasses" | "google_color" | "graph" | "hair" | "headphone" | "heart" | "home" | "infinite" | "info_in_circle" | "instagram" | "kakao_color" | "kor" | "league" | "letter" | "letter_crown_color" | "letter_crown_open_color" | "letter_heart_color" | "letter_heart_open_color" | "line_three" | "lock" | "logo_apple" | "logo_color" | "logo_facebook" | "logo_kakao" | "logo_naver" | "maxsize" | "minsize" | "minus" | "minus_in_circle" | "moneybag" | "moneybag_color" | "more" | "my_bubble" | "naver_color" | "note_color" | "note_pen_color" | "number_five_filled" | "number_five_outlined" | "number_four_filled" | "number_four_outlined" | "number_one_filled" | "number_one_outlined" | "number_three_filled" | "number_three_outlined" | "number_two_filled" | "number_two_outlined" | "out" | "palm_tree_color" | "paper_check" | "paper_pen" | "paper_pen_color" | "paper_two" | "pause" | "pen" | "percent_in_circle" | "pill" | "pill_color" | "pin" | "pin_color_red" | "play" | "plus" | "plus_in_circle" | "point_in_circle" | "point_in_circle_color" | "present" | "present_color" | "problem" | "profile" | "progress_gradient" | "question_mark_in_circle" | "question_mark_in_circle_outlined" | "raffle_color" | "receipt" | "refresh" | "school" | "school_color" | "setting" | "share" | "shield_check" | "siren" | "skipback" | "skipforward" | "sound_off" | "sound_on" | "speaker" | "stackup" | "star" | "star_color" | "store" | "sync" | "test_upload_color" | "thumbdown" | "thumbup" | "thunder" | "ticket" | "ticket_color" | "touch" | "trash" | "treasurebox" | "trophy" | "twinkle" | "undo" | "university" | "user_blocked" | "user_check" | "user_plus" | "user_two" | "video_color" | "vote_color" | "warning" | "wifi" | "workbook" | "workbook_color" | "wrong" | "youtube" | undefined;
23
+ trailingIcon?: "filter" | "scroll" | "link" | "picture" | "search" | "time" | "video" | "top" | "timer" | "document" | "note" | "set" | "repeat" | "new" | "ai" | "ai_color" | "ai_sad" | "alarm" | "apple_color" | "arrow_down" | "arrow_left" | "arrow_left_circle" | "arrow_left_limit" | "arrow_left_right" | "arrow_right" | "arrow_right_circle" | "arrow_right_limit" | "arrow_up" | "arrow_up_down" | "arrow_up_limit" | "barchart" | "book" | "bookmark" | "bookmark_animation" | "box" | "bus_color" | "calendar_check" | "calendar_check_color" | "calendar_color" | "camera" | "card" | "cards_percent" | "cards_percent_color" | "caret_down" | "caret_left" | "caret_right" | "caret_up" | "cart" | "chat_bubble" | "chat_bubble_badge_color" | "chat_bubble_correct" | "chat_bubble_correct_color" | "chat_bubble_dots" | "chat_bubble_question" | "chat_bubble_question_animation" | "chat_bubble_question_color" | "check" | "check_in_circle" | "check_in_circle_color" | "check_in_circle_line" | "chevron_down" | "chevron_down_two" | "chevron_left" | "chevron_right" | "chevron_right_two" | "chevron_up" | "chevron_up_two" | "circles" | "clip" | "close" | "close_in_circle" | "coin" | "contact" | "copy" | "correct" | "coupon" | "crown" | "curriculum" | "curriculum_color" | "delete" | "dots" | "download" | "emoji" | "emoji_plus" | "emoji_plus_dash" | "eng" | "enter" | "equal" | "eraser" | "exclamation_point_in_circle" | "eye_off" | "eye_on" | "face_happy" | "face_sad" | "facebook" | "facebook_color" | "fire" | "fire_color" | "folder" | "frame" | "glasses" | "google_color" | "graph" | "hair" | "headphone" | "heart" | "home" | "infinite" | "info_in_circle" | "instagram" | "kakao_color" | "kor" | "league" | "letter" | "letter_crown_color" | "letter_crown_open_color" | "letter_heart_color" | "letter_heart_open_color" | "line_three" | "lock" | "logo_apple" | "logo_color" | "logo_facebook" | "logo_kakao" | "logo_naver" | "maxsize" | "minsize" | "minus" | "minus_in_circle" | "moneybag" | "moneybag_color" | "more" | "my_bubble" | "naver_color" | "note_color" | "note_pen_color" | "number_five_filled" | "number_five_outlined" | "number_four_filled" | "number_four_outlined" | "number_one_filled" | "number_one_outlined" | "number_three_filled" | "number_three_outlined" | "number_two_filled" | "number_two_outlined" | "out" | "palm_tree_color" | "paper_check" | "paper_pen" | "paper_pen_color" | "paper_two" | "pause" | "pen" | "percent_in_circle" | "pill" | "pill_color" | "pin" | "pin_color_red" | "play" | "plus" | "plus_in_circle" | "point_in_circle" | "point_in_circle_color" | "present" | "present_color" | "problem" | "profile" | "progress_gradient" | "question_mark_in_circle" | "question_mark_in_circle_outlined" | "raffle_color" | "receipt" | "refresh" | "school" | "school_color" | "setting" | "share" | "shield_check" | "siren" | "skipback" | "skipforward" | "sound_off" | "sound_on" | "speaker" | "stackup" | "star" | "star_color" | "store" | "sync" | "test_upload_color" | "thumbdown" | "thumbup" | "thunder" | "ticket" | "ticket_color" | "touch" | "trash" | "treasurebox" | "trophy" | "twinkle" | "undo" | "university" | "user_blocked" | "user_check" | "user_plus" | "user_two" | "video_color" | "vote_color" | "warning" | "wifi" | "workbook" | "workbook_color" | "wrong" | "youtube" | undefined;
24
24
  trailingIconFill?: ColorValue | undefined;
25
25
  trailingElements?: React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
26
26
  disabled?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"useTimeoutHandler.d.ts","sourceRoot":"","sources":["../../../../../src/hook/useTimeoutHandler.ts"],"names":[],"mappings":";AAKA,iBAAS,iBAAiB,0CAUzB;AAED,iBAAS,kBAAkB;8BAalB,GAAG;;;;oCAUG,MAAM,IAAI,MAAM,MAAM;;;EASpC;AAED,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"useTimeoutHandler.d.ts","sourceRoot":"","sources":["../../../../../src/hook/useTimeoutHandler.ts"],"names":[],"mappings":";AAKA,iBAAS,iBAAiB,0CAQzB;AAED,iBAAS,kBAAkB;8BAalB,GAAG;;;;oCAUG,MAAM,IAAI,MAAM,MAAM;;;EASpC;AAED,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamturing/react-native-kit",
3
- "version": "1.6.4",
3
+ "version": "1.6.6",
4
4
  "description": "React Native Common Module for Team Turing",
5
5
  "scripts": {
6
6
  "example": "yarn workspace @teamturing/react-native-kit-example",
@@ -158,5 +158,5 @@
158
158
  "bugs": {
159
159
  "url": "https://github.com/weareteamturing/bombe/issues"
160
160
  },
161
- "gitHead": "f5d355e500764afeeb46c184b88dc0b641102b20"
161
+ "gitHead": "b390162e077a306a5fe39923199fb2d60becb062"
162
162
  }
@@ -1,5 +1,5 @@
1
- import { useCallback, useMemo, useState } from 'react';
2
- import { Dimensions, StyleSheet, View } from 'react-native';
1
+ import { useCallback, useMemo } from 'react';
2
+ import { useWindowDimensions } from 'react-native';
3
3
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
4
 
5
5
  import { useStableCallback } from '../../../hook';
@@ -9,12 +9,9 @@ import { WindowSizeClass, decideWindowWidthSizeClass, decideWindowHeightSizeClas
9
9
  import { useDynamicDimensions } from './useDynamicDimensions';
10
10
 
11
11
  export const [useDynamicLayout, LayoutProvider] = createCtx(
12
- (
13
- { useSafeAreaInsetsHook = useSafeAreaInsets }: { useSafeAreaInsetsHook?: typeof useSafeAreaInsets },
14
- transformChildren,
15
- ) => {
16
- const [windowWidth, setWindowWidth] = useState(Math.ceil(Dimensions.get('window').width));
17
- const [windowHeight, setWindowHeight] = useState(Math.ceil(Dimensions.get('window').height));
12
+ ({ useSafeAreaInsetsHook = useSafeAreaInsets }: { useSafeAreaInsetsHook?: typeof useSafeAreaInsets }) => {
13
+ const { width: windowWidth, height: windowHeight } = useWindowDimensions();
14
+
18
15
  const windowShortLen = Math.min(windowWidth, windowHeight);
19
16
  const windowLongLen = Math.max(windowWidth, windowHeight);
20
17
  const _insets: { top: number; bottom: number; left: number; right: number } = useSafeAreaInsetsHook();
@@ -53,19 +50,6 @@ export const [useDynamicLayout, LayoutProvider] = createCtx(
53
50
  windowHeightSizeClass,
54
51
  });
55
52
 
56
- const updateScreenSizesBeforeRotation = useCallback(
57
- (orientation: 'portrait' | 'landscape') => {
58
- if (orientation === 'portrait') {
59
- setWindowWidth(windowShortLen);
60
- setWindowHeight(windowLongLen);
61
- } else if (orientation === 'landscape') {
62
- setWindowWidth(windowLongLen);
63
- setWindowHeight(windowShortLen);
64
- }
65
- },
66
- [windowLongLen, windowShortLen],
67
- );
68
-
69
53
  const localImageDimensionProps = useStableCallback(
70
54
  (
71
55
  imageWidth: number,
@@ -96,23 +80,6 @@ export const [useDynamicLayout, LayoutProvider] = createCtx(
96
80
  },
97
81
  );
98
82
 
99
- transformChildren((children) => (
100
- <View
101
- testID={'LayoutProvider'}
102
- style={StyleSheet.absoluteFill}
103
- onLayout={({
104
- nativeEvent: {
105
- layout: { width, height },
106
- },
107
- }) => {
108
- setWindowWidth(Math.ceil(width));
109
- setWindowHeight(Math.ceil(height));
110
- }}
111
- >
112
- {children}
113
- </View>
114
- ));
115
-
116
83
  return {
117
84
  ...dimensions,
118
85
  screenHeight: windowHeight,
@@ -120,7 +87,6 @@ export const [useDynamicLayout, LayoutProvider] = createCtx(
120
87
  screenWidthWithPadding: windowWidth - 2 * dimensions.sidePadding,
121
88
  screenShortLen: windowShortLen,
122
89
  screenLongLen: windowLongLen,
123
- updateScreenSizesBeforeRotation,
124
90
  safeAreaInsets: insets,
125
91
  sfTop: insets.top,
126
92
  sfLeft: insets.left,
@@ -4,12 +4,10 @@ import { useStableCallback } from './useStableCallback';
4
4
  import { useUnmount } from './useUnmount';
5
5
 
6
6
  function useTimeoutHandler() {
7
- const handler = useRef<any>(-1);
7
+ const handler = useRef<any>();
8
8
 
9
9
  useUnmount(() => {
10
- if (handler.current !== -1) {
11
- clearTimeout(handler.current);
12
- }
10
+ clearTimeout(handler.current);
13
11
  });
14
12
 
15
13
  return handler;