react-native-molecules 0.5.0-beta.23 → 0.5.0-beta.25

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 (68) hide show
  1. package/components/Accordion/Accordion.tsx +1 -1
  2. package/components/Accordion/AccordionItem.tsx +1 -1
  3. package/components/Checkbox/Checkbox.tsx +2 -1
  4. package/components/DateField/useDateFieldState.ts +2 -2
  5. package/components/DatePicker/DatePickerProvider.tsx +1 -1
  6. package/components/DatePickerInline/DatePickerInline.tsx +1 -1
  7. package/components/DatePickerInline/DatePickerInlineBase.tsx +1 -1
  8. package/components/DatePickerInline/Day.tsx +1 -1
  9. package/components/DatePickerInline/Swiper.tsx +1 -1
  10. package/components/DatePickerInline/SwiperUtils.ts +1 -1
  11. package/components/DatePickerInline/dateUtils.tsx +1 -1
  12. package/components/DatePickerInline/store.tsx +2 -1
  13. package/components/Divider/index.tsx +2 -3
  14. package/components/ElementGroup/ElementGroup.tsx +1 -1
  15. package/components/FilePicker/FilePicker.tsx +1 -1
  16. package/components/Icon/iconFactory.tsx +2 -1
  17. package/components/IconButton/IconButton.tsx +39 -13
  18. package/components/IconButton/index.tsx +1 -0
  19. package/components/IconButton/types.ts +2 -0
  20. package/components/List/List.tsx +2 -1
  21. package/components/List/context.tsx +2 -1
  22. package/components/Portal/Portal.tsx +1 -2
  23. package/components/RadioButton/RadioButtonGroup.tsx +1 -2
  24. package/components/Rating/Rating.tsx +1 -1
  25. package/components/Select/Select.tsx +103 -34
  26. package/components/Select/context.tsx +3 -1
  27. package/components/Select/index.ts +20 -2
  28. package/components/Select/types.ts +2 -0
  29. package/components/Select/utils.ts +11 -4
  30. package/components/Switch/Switch.ios.tsx +1 -1
  31. package/components/Switch/Switch.tsx +2 -1
  32. package/components/Tabs/Tabs.tsx +2 -2
  33. package/components/TextInput/TextInput.tsx +4 -3
  34. package/components/TimePicker/AnalogClock.tsx +1 -1
  35. package/components/TimePicker/TimeInputs.tsx +1 -1
  36. package/components/TimePicker/TimePicker.tsx +1 -1
  37. package/components/TimePicker/TimePickerModal.tsx +1 -1
  38. package/components/Tooltip/Tooltip.tsx +1 -1
  39. package/components/TouchableRipple/TouchableRipple.tsx +1 -1
  40. package/hocs/index.tsx +1 -1
  41. package/hocs/withKeyboardAccessibility.tsx +2 -3
  42. package/hooks/index.tsx +2 -6
  43. package/hooks/useContrastColor.ts +1 -2
  44. package/hooks/useFilePicker.tsx +1 -1
  45. package/hooks/useHandleNumberFormat.tsx +2 -2
  46. package/hooks/useMediaQuery.tsx +1 -2
  47. package/package.json +95 -118
  48. package/shortcuts-manager/ShortcutsManager/ShortcutsManager.tsx +1 -1
  49. package/shortcuts-manager/ShortcutsManager/utils.tsx +1 -1
  50. package/shortcuts-manager/useSetScopes/useSetScopes.tsx +1 -1
  51. package/shortcuts-manager/useShortcut/useShortcut.tsx +1 -1
  52. package/utils/extractTextStyles.ts +1 -2
  53. package/utils/formatNumberWithMask/formatNumberWithMask.ts +2 -1
  54. package/utils/index.ts +0 -3
  55. package/utils/normalizeToNumberString/normalizeToNumberString.ts +1 -1
  56. package/context-bridge/index.tsx +0 -87
  57. package/fast-context/index.tsx +0 -190
  58. package/hocs/typedMemo.tsx +0 -5
  59. package/hooks/useControlledValue.tsx +0 -84
  60. package/hooks/useLatest.tsx +0 -9
  61. package/hooks/useMergedRefs.ts +0 -14
  62. package/hooks/usePrevious.ts +0 -13
  63. package/hooks/useToggle.tsx +0 -24
  64. package/hooks/useWhatHasUpdated.tsx +0 -48
  65. package/utils/color.ts +0 -22
  66. package/utils/compare/index.ts +0 -54
  67. package/utils/lodash.ts +0 -121
  68. package/utils/repository.ts +0 -53
@@ -39,6 +39,13 @@ const triggerDefaultStyles = StyleSheet.create(theme => ({
39
39
  },
40
40
  },
41
41
  },
42
+ triggerIcon: {
43
+ marginLeft: theme.spacings['2'],
44
+ color: theme.colors.onSurfaceVariant,
45
+ },
46
+ }));
47
+
48
+ const outlineDefaultStyles = StyleSheet.create(theme => ({
42
49
  outline: {
43
50
  position: 'absolute',
44
51
  top: 0,
@@ -85,10 +92,6 @@ const triggerDefaultStyles = StyleSheet.create(theme => ({
85
92
  },
86
93
  },
87
94
  },
88
- triggerIcon: {
89
- marginLeft: theme.spacings['2'],
90
- color: theme.colors.onSurfaceVariant,
91
- },
92
95
  }));
93
96
 
94
97
  export const defaultStyles = StyleSheet.create(theme => ({
@@ -115,5 +118,9 @@ export const triggerStyles = getRegisteredComponentStylesWithFallback(
115
118
  'Select_Trigger',
116
119
  triggerDefaultStyles,
117
120
  );
121
+ export const selectOutlineStyles = getRegisteredComponentStylesWithFallback(
122
+ 'SelectOutline',
123
+ outlineDefaultStyles,
124
+ );
118
125
 
119
126
  export const styles = getRegisteredComponentStylesWithFallback('Select', defaultStyles);
@@ -1,3 +1,4 @@
1
+ import { useControlledValue } from '@react-native-molecules/utils/hooks';
1
2
  import { forwardRef, memo } from 'react';
2
3
  import {
3
4
  Switch as NativeSwitch,
@@ -6,7 +7,6 @@ import {
6
7
  type ViewStyle,
7
8
  } from 'react-native';
8
9
 
9
- import { useControlledValue } from '../../hooks';
10
10
  import type { IconType } from '../Icon';
11
11
 
12
12
  export type Props = SwitchProps & {
@@ -1,3 +1,4 @@
1
+ import { useControlledValue, useLatest } from '@react-native-molecules/utils/hooks';
1
2
  import { forwardRef, memo, useCallback, useEffect, useMemo, useRef } from 'react';
2
3
  import {
3
4
  Animated,
@@ -9,7 +10,7 @@ import {
9
10
  type ViewStyle,
10
11
  } from 'react-native';
11
12
 
12
- import { useActionState, useControlledValue, useLatest } from '../../hooks';
13
+ import { useActionState } from '../../hooks';
13
14
  import { resolveStateVariant } from '../../utils';
14
15
  import { Icon, type IconType } from '../Icon';
15
16
  import { switchStyles, useSwitchColors } from './utils';
@@ -1,3 +1,5 @@
1
+ import { noop } from '@react-native-molecules/utils/helpers/lodash';
2
+ import { useControlledValue } from '@react-native-molecules/utils/hooks';
1
3
  import {
2
4
  cloneElement,
3
5
  type ComponentType,
@@ -22,9 +24,7 @@ import {
22
24
  } from 'react-native';
23
25
 
24
26
  import { typedMemo } from '../../hocs';
25
- import { useControlledValue } from '../../hooks';
26
27
  import { extractSubcomponents } from '../../utils/extractSubcomponents';
27
- import { noop } from '../../utils/lodash';
28
28
  import type { TabItemProps } from './TabItem';
29
29
  import { tabsStyles } from './utils';
30
30
 
@@ -1,3 +1,4 @@
1
+ import { useControlledValue, useLatest } from '@react-native-molecules/utils/hooks';
1
2
  import React, {
2
3
  memo,
3
4
  type PropsWithoutRef,
@@ -31,9 +32,7 @@ import {
31
32
  View,
32
33
  } from 'react-native';
33
34
 
34
- import { useActionState } from '../../hooks/useActionState';
35
- import useControlledValue from '../../hooks/useControlledValue';
36
- import useLatest from '../../hooks/useLatest';
35
+ import { useActionState } from '../../hooks';
37
36
  import { createSyntheticEvent, resolveStateVariant } from '../../utils';
38
37
  import { extractSubcomponents } from '../../utils/extractSubcomponents';
39
38
  import { HelperText } from '../HelperText';
@@ -645,6 +644,7 @@ export const TextInputLeft = memo(
645
644
  style={[textInputLeftStyles.leftElement, style]}
646
645
  onLayout={handleLayout}
647
646
  accessibilityRole="none"
647
+ tabIndex={-1}
648
648
  {...rest}>
649
649
  {children}
650
650
  </Pressable>
@@ -683,6 +683,7 @@ export const TextInputRight = memo(
683
683
  onPress={onPress}
684
684
  style={[textInputRightStyles.rightElement, style]}
685
685
  accessibilityRole="none"
686
+ tabIndex={-1}
686
687
  {...rest}>
687
688
  {children}
688
689
  </Pressable>
@@ -1,3 +1,4 @@
1
+ import { useLatest } from '@react-native-molecules/utils/hooks';
1
2
  import { memo, useCallback, useMemo, useRef } from 'react';
2
3
  import {
3
4
  type GestureResponderEvent,
@@ -7,7 +8,6 @@ import {
7
8
  type ViewProps,
8
9
  } from 'react-native';
9
10
 
10
- import { useLatest } from '../../hooks';
11
11
  import AnalogClockHours from './AnalogClockHours';
12
12
  import AnalogClockMinutes from './AnalogClockMinutes';
13
13
  import AnimatedClockSwitcher from './AnimatedClockSwitcher';
@@ -1,10 +1,10 @@
1
1
  // @typescript-eslint/no-unused-vars
2
2
  // WORK IN PROGRESS
3
3
 
4
+ import { useLatest } from '@react-native-molecules/utils/hooks';
4
5
  import { memo, useCallback, useEffect, useRef, useState } from 'react';
5
6
  import { TextInput as TextInputNative, useWindowDimensions, View } from 'react-native';
6
7
 
7
- import { useLatest } from '../../hooks';
8
8
  import { resolveStateVariant } from '../../utils';
9
9
  import { Text } from '../Text';
10
10
  import AmPmSwitcher from './AmPmSwitcher';
@@ -1,8 +1,8 @@
1
+ import { useControlledValue } from '@react-native-molecules/utils/hooks';
1
2
  import { memo, useCallback, useMemo, useState } from 'react';
2
3
  import { type StyleProp, View, type ViewStyle } from 'react-native';
3
4
 
4
5
  import { getRegisteredComponentWithFallback } from '../../core';
5
- import { useControlledValue } from '../../hooks';
6
6
  import { format, parse } from '../../utils/date-fns';
7
7
  import { useOptionalDatePickerContext } from '../DatePicker/context';
8
8
  import AnalogClock from './AnalogClock';
@@ -1,9 +1,9 @@
1
+ import { useControlledValue } from '@react-native-molecules/utils/hooks';
1
2
  import type { ReactNode } from 'react';
2
3
  import { memo, useMemo } from 'react';
3
4
  import { KeyboardAvoidingView, Platform, View } from 'react-native';
4
5
 
5
6
  import { getRegisteredComponentWithFallback } from '../../core';
6
- import { useControlledValue } from '../../hooks';
7
7
  import { DatePickerActions, DatePickerProvider } from '../DatePicker';
8
8
  import type {
9
9
  DatePickerContextType,
@@ -1,3 +1,4 @@
1
+ import { useToggle } from '@react-native-molecules/utils/hooks';
1
2
  import {
2
3
  createContext,
3
4
  memo,
@@ -9,7 +10,6 @@ import {
9
10
  useRef,
10
11
  } from 'react';
11
12
 
12
- import { useToggle } from '../../hooks';
13
13
  import { extractSubcomponents } from '../../utils/extractSubcomponents';
14
14
 
15
15
  export type Props = {
@@ -1,3 +1,4 @@
1
+ import { noop } from '@react-native-molecules/utils/helpers/lodash';
1
2
  import { forwardRef, memo, type ReactNode, useCallback, useRef } from 'react';
2
3
  import {
3
4
  type GestureResponderEvent,
@@ -10,7 +11,6 @@ import {
10
11
  import { StyleSheet } from 'react-native-unistyles';
11
12
 
12
13
  import { useTheme } from '../../hooks/useTheme';
13
- import { noop } from '../../utils/lodash';
14
14
  import { Slot } from '../Slot';
15
15
  import { rippleColorFromBackground } from './rippleFromForegroundColor';
16
16
  import { touchableRippleStyles } from './utils';
package/hocs/index.tsx CHANGED
@@ -1,5 +1,5 @@
1
- export { default as typedMemo } from './typedMemo';
2
1
  export {
3
2
  useCurrentIndexStore,
4
3
  default as withKeyboardAccessibility,
5
4
  } from './withKeyboardAccessibility';
5
+ export { typedMemo } from '@react-native-molecules/utils/hocs';
@@ -1,3 +1,5 @@
1
+ import { createFastContext } from '@react-native-molecules/utils/fast-context';
2
+ import { useLatest } from '@react-native-molecules/utils/hooks';
1
3
  import {
2
4
  type ComponentType,
3
5
  forwardRef,
@@ -15,9 +17,6 @@ import type { FlatList } from 'react-native';
15
17
  import type { SectionList } from 'react-native';
16
18
  import { Platform } from 'react-native';
17
19
 
18
- import { createFastContext } from '../fast-context';
19
- import useLatest from '../hooks/useLatest';
20
-
21
20
  export type Store = {
22
21
  currentIndex: number | null;
23
22
  };
package/hooks/index.tsx CHANGED
@@ -4,7 +4,6 @@ export * from './useActionState';
4
4
  export * from './useActive';
5
5
  export { default as useColorMode } from './useColorMode';
6
6
  export { useContrastColor } from './useContrastColor';
7
- export { default as useControlledValue } from './useControlledValue';
8
7
  export * from './useFocus';
9
8
  export {
10
9
  type NumberMaskConfig,
@@ -13,10 +12,7 @@ export {
13
12
  } from './useHandleNumberFormat';
14
13
  export * from './useHover';
15
14
  export * from './useKeyboardDismissable';
16
- export { default as useLatest } from './useLatest';
17
- export { useMediaQuery } from './useMediaQuery';
18
- export { useMergedRefs } from './useMergedRefs';
19
- export { default as usePrevious } from './usePrevious';
15
+ export * from './useMediaQuery';
20
16
  export * from './useQueryFilter';
21
17
  export * from './useTheme';
22
- export { default as useToggle } from './useToggle';
18
+ export * from '@react-native-molecules/utils/hooks';
@@ -1,8 +1,7 @@
1
+ import { resolveContrastColor } from '@react-native-molecules/utils/helpers/resolveContrastColor';
1
2
  import { useMemo } from 'react';
2
3
  import { useUnistyles } from 'react-native-unistyles';
3
4
 
4
- import { resolveContrastColor } from '../utils/color';
5
-
6
5
  export const useContrastColor = (bgColor: string, lightColor?: string, darkColor?: string) => {
7
6
  const isDarkMode = useUnistyles().theme.dark;
8
7
 
@@ -1,3 +1,4 @@
1
+ import { isNil, omitBy } from '@react-native-molecules/utils/helpers/lodash';
1
2
  import { useCallback } from 'react';
2
3
 
3
4
  import {
@@ -5,7 +6,6 @@ import {
5
6
  type DocumentPickerOptions,
6
7
  type DocumentResult,
7
8
  } from '../utils/DocumentPicker';
8
- import { isNil, omitBy } from '../utils/lodash';
9
9
 
10
10
  export const useFilePicker = (options: DocumentPickerOptions) => {
11
11
  const openFilePicker = useCallback(
@@ -1,9 +1,9 @@
1
+ import { isNil } from '@react-native-molecules/utils/helpers/lodash';
2
+ import { usePrevious } from '@react-native-molecules/utils/hooks';
1
3
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
4
  import type { NativeSyntheticEvent, TextInputFocusEventData } from 'react-native';
3
5
 
4
6
  import { formatNumberWithMask, normalizeToNumberString } from '../utils';
5
- import { isNil } from '../utils/lodash';
6
- import usePrevious from './usePrevious';
7
7
 
8
8
  export type NumberMaskConfig = {
9
9
  prefix?: string;
@@ -1,8 +1,7 @@
1
+ import { isNil } from '@react-native-molecules/utils/helpers/lodash';
1
2
  import { useMemo } from 'react';
2
3
  import { useWindowDimensions } from 'react-native';
3
4
 
4
- import { isNil } from '../utils/lodash';
5
-
6
5
  type Query = {
7
6
  maxWidth?: number;
8
7
  minWidth?: number;
package/package.json CHANGED
@@ -1,119 +1,96 @@
1
1
  {
2
- "name": "react-native-molecules",
3
- "version": "0.5.0-beta.23",
4
- "author": "Thet Aung <thetaung.dev@gmail.com>",
5
- "license": "MIT",
6
- "main": "index.ts",
7
- "sideEffects": [
8
- "components/DatePicker/context.tsx",
9
- "components/DatePickerInline/store.tsx",
10
- "components/List/context.tsx",
11
- "components/Select/context.tsx",
12
- "components/TimePicker/context.tsx",
13
- "components/Popover/common.ts"
14
- ],
15
- "files": [
16
- "components",
17
- "context-bridge",
18
- "core",
19
- "fast-context",
20
- "hocs",
21
- "hooks",
22
- "shortcuts-manager",
23
- "styles",
24
- "types",
25
- "utils",
26
- "index.ts",
27
- "!**/__tests__",
28
- "!**/__fixtures__",
29
- "!**/__mocks__"
30
- ],
31
- "scripts": {
32
- "fix-typescript-output": "cd lib/typescript && mv src/* . && rm -rf src",
33
- "example:expo": "pnpm --filter=expo-example run",
34
- "start": "MOLECULES_ENV=storybook pnpm storybook",
35
- "run:testcases": "pnpm workspace test-cases start",
36
- "test": "MOLECULES_ENV=storybook jest && pnpm test-storybook",
37
- "test-jest": "jest",
38
- "bundle": "MOLECULES_ENV=release rm -rf dist && mkdir -p dist && npm pack --pack-destination=dist",
39
- "do-release": "npm publish ./dist/react-native-molecules-$npm_package_version.tgz --access=public",
40
- "release": "pnpm bundle && pnpm do-release",
41
- "release:dev": "npm version prerelease --preid=dev && pnpm release --tag=dev",
42
- "storybook": "MOLECULES_ENV=storybook storybook dev -p 6006",
43
- "test-storybook": "test-storybook",
44
- "coverage": "cp coverage/storybook/coverage-storybook.json coverage/coverage-storybook.json && npx nyc report --reporter=html -t coverage --report-dir coverage/lcov-report",
45
- "test:coverage": "pnpm test-jest --coverage && pnpm test-storybook --coverage && pnpm coverage",
46
- "build-storybook": "storybook build",
47
- "chromatic:all": "MOLECULES_ENV=storybook npx chromatic --project-token=934368a7f6c9",
48
- "chromatic": "MOLECULES_ENV=storybook pnpm chromatic:all --only-changed",
49
- "perf": "npx reassure"
50
- },
51
- "dependencies": {
52
- "@gorhom/portal": "^1.0.14",
53
- "@radix-ui/react-compose-refs": "^1.1.2",
54
- "@react-native-vector-icons/feather": "^12.4.0",
55
- "@react-native-vector-icons/material-design-icons": "^12.4.0",
56
- "color": "^4.2.3",
57
- "date-fns": "^4.1.0",
58
- "eventemitter2": "^6.4.9",
59
- "flubber": "^0.4.2",
60
- "use-sync-external-store": "^1.2.0"
61
- },
62
- "peerDependencies": {
63
- "@react-native-documents/picker": "^10.1.2",
64
- "react": "19.1.0",
65
- "react-native": "0.81.4",
66
- "react-native-svg": ">=12.1.0",
67
- "react-native-unistyles": "^3.0.22",
68
- "react-native-web": "~0.21.1",
69
- "react-native-reanimated": ">=4.0.0",
70
- "react-native-redash": ">=18.0.0"
71
- },
72
- "devDependencies": {
73
- "@types/flubber": "^0.4.0",
74
- "react-native-svg": "^15.10.1",
75
- "@react-native-documents/picker": "^10.1.2",
76
- "@types/color": "^3.0.3",
77
- "@types/jest": "^29.1.2",
78
- "@types/react": "~19.1.10",
79
- "@types/use-sync-external-store": "^1.5.0",
80
- "react": "19.1.0",
81
- "react-native": "0.81.4",
82
- "react-native-builder-bob": "^0.17.1",
83
- "react-native-reanimated": "~4.1.1",
84
- "react-native-unistyles": "^3.2.4",
85
- "react-native-web": "~0.21.1"
86
- },
87
- "eslintIgnore": [
88
- "node_modules/",
89
- "lib/",
90
- "test-cases/node_modules",
91
- "dist",
92
- "cache"
93
- ],
94
- "react-native-builder-bob": {
95
- "source": "src",
96
- "output": "lib",
97
- "targets": [
98
- [
99
- "commonjs",
100
- {
101
- "configFile": true
102
- }
103
- ],
104
- [
105
- "module",
106
- {
107
- "configFile": true
108
- }
109
- ],
110
- [
111
- "typescript",
112
- {
113
- "project": "tsconfig.build.json",
114
- "rootDir": "src"
115
- }
116
- ]
117
- ]
118
- }
119
- }
2
+ "name": "react-native-molecules",
3
+ "version": "0.5.0-beta.25",
4
+ "author": "Thet Aung <thetaung.dev@gmail.com>",
5
+ "license": "MIT",
6
+ "main": "index.ts",
7
+ "sideEffects": [
8
+ "components/DatePicker/context.tsx",
9
+ "components/DatePickerInline/store.tsx",
10
+ "components/List/context.tsx",
11
+ "components/Select/context.tsx",
12
+ "components/TimePicker/context.tsx",
13
+ "components/Popover/common.ts"
14
+ ],
15
+ "files": [
16
+ "components",
17
+ "context-bridge",
18
+ "core",
19
+ "fast-context",
20
+ "hocs",
21
+ "hooks",
22
+ "shortcuts-manager",
23
+ "styles",
24
+ "types",
25
+ "utils",
26
+ "index.ts",
27
+ "!**/__tests__",
28
+ "!**/__fixtures__",
29
+ "!**/__mocks__"
30
+ ],
31
+ "dependencies": {
32
+ "@gorhom/portal": "^1.0.14",
33
+ "@radix-ui/react-compose-refs": "^1.1.2",
34
+ "@react-native-vector-icons/feather": "^12.4.0",
35
+ "@react-native-vector-icons/material-design-icons": "^12.4.0",
36
+ "color": "^4.2.3",
37
+ "date-fns": "^4.1.0",
38
+ "eventemitter2": "^6.4.9",
39
+ "flubber": "^0.4.2",
40
+ "use-sync-external-store": "^1.2.0",
41
+ "@react-native-molecules/utils": "^1.0.0-beta.6"
42
+ },
43
+ "peerDependencies": {
44
+ "@react-native-documents/picker": "^10.1.2",
45
+ "react": "19.1.0",
46
+ "react-native": "0.81.4",
47
+ "react-native-svg": ">=12.1.0",
48
+ "react-native-unistyles": "^3.0.22",
49
+ "react-native-web": "~0.21.1",
50
+ "react-native-reanimated": ">=4.0.0",
51
+ "react-native-redash": ">=18.0.0"
52
+ },
53
+ "devDependencies": {
54
+ "@types/flubber": "^0.4.0",
55
+ "react-native-svg": "^15.10.1",
56
+ "@react-native-documents/picker": "^10.1.2",
57
+ "@types/color": "^3.0.3",
58
+ "@types/jest": "^29.1.2",
59
+ "@types/react": "~19.1.10",
60
+ "@types/use-sync-external-store": "^1.5.0",
61
+ "react": "19.1.0",
62
+ "react-native": "0.81.4",
63
+ "react-native-builder-bob": "^0.17.1",
64
+ "react-native-reanimated": "~4.1.1",
65
+ "react-native-unistyles": "^3.2.4",
66
+ "react-native-web": "~0.21.1"
67
+ },
68
+ "eslintIgnore": [
69
+ "node_modules/",
70
+ "lib/",
71
+ "test-cases/node_modules",
72
+ "dist",
73
+ "cache"
74
+ ],
75
+ "scripts": {
76
+ "fix-typescript-output": "cd lib/typescript && mv src/* . && rm -rf src",
77
+ "example:expo": "pnpm --filter=expo-example run",
78
+ "start": "MOLECULES_ENV=storybook pnpm storybook",
79
+ "run:testcases": "pnpm workspace test-cases start",
80
+ "test": "MOLECULES_ENV=storybook jest && pnpm test-storybook",
81
+ "test-jest": "jest",
82
+ "bundle": "MOLECULES_ENV=release rm -rf dist && mkdir -p dist && pnpm pack --pack-destination=dist",
83
+ "do-release": "npm publish ./dist/react-native-molecules-$npm_package_version.tgz --access=public",
84
+ "release": "pnpm bundle && pnpm do-release",
85
+ "release:dev": "npm version prerelease --preid=dev --tag-version-prefix=\"react-native-molecules-v\" && pnpm release --tag=dev",
86
+ "release:beta": "npm version prerelease --preid=beta --tag-version-prefix=\"react-native-molecules-v\" && pnpm release --tag=beta",
87
+ "storybook": "MOLECULES_ENV=storybook storybook dev -p 6006",
88
+ "test-storybook": "test-storybook",
89
+ "coverage": "cp coverage/storybook/coverage-storybook.json coverage/coverage-storybook.json && npx nyc report --reporter=html -t coverage --report-dir coverage/lcov-report",
90
+ "test:coverage": "pnpm test-jest --coverage && pnpm test-storybook --coverage && pnpm coverage",
91
+ "build-storybook": "storybook build",
92
+ "chromatic:all": "MOLECULES_ENV=storybook npx chromatic --project-token=934368a7f6c9",
93
+ "chromatic": "MOLECULES_ENV=storybook pnpm chromatic:all --only-changed",
94
+ "perf": "npx reassure"
95
+ }
96
+ }
@@ -1,6 +1,6 @@
1
+ import { keyBy } from '@react-native-molecules/utils/helpers/lodash';
1
2
  import { memo, useContext, useEffect, useMemo, useRef } from 'react';
2
3
 
3
- import { keyBy } from '../../utils/lodash';
4
4
  import EventsManager from '../EventsManager';
5
5
  import type { Shortcut } from '../types';
6
6
  import {
@@ -1,6 +1,6 @@
1
+ import { createFastContext } from '@react-native-molecules/utils/fast-context';
1
2
  import type { ReactNode } from 'react';
2
3
 
3
- import { createFastContext } from '../../fast-context';
4
4
  import type { Scope, Shortcut } from '../types';
5
5
 
6
6
  export type ShortcutsManagerContextType = {
@@ -1,6 +1,6 @@
1
+ import { keyBy } from '@react-native-molecules/utils/helpers/lodash';
1
2
  import { useCallback } from 'react';
2
3
 
3
- import { keyBy } from '../../utils/lodash';
4
4
  import { useShortcutsManagerStoreRef } from '../ShortcutsManager/utils';
5
5
  import type { Scope } from '../types';
6
6
 
@@ -1,6 +1,6 @@
1
+ import { useLatest } from '@react-native-molecules/utils/hooks';
1
2
  import { useCallback, useEffect } from 'react';
2
3
 
3
- import useLatest from '../../hooks/useLatest';
4
4
  import { useShortcutsManagerStoreRef } from '../ShortcutsManager';
5
5
  import type { ShortcutEventDetail } from '../types';
6
6
  import { calculateShortcutEventName } from '../utils';
@@ -1,7 +1,6 @@
1
+ import { memoize } from '@react-native-molecules/utils/helpers/lodash';
1
2
  import type { TextStyle } from 'react-native';
2
3
 
3
- import { memoize } from './lodash';
4
-
5
4
  const textStyleProps = [
6
5
  'color',
7
6
  'fontFamily',
@@ -1,5 +1,6 @@
1
+ import { isNil } from '@react-native-molecules/utils/helpers/lodash';
2
+
1
3
  import { createNumberMask, type CreateNumberMaskProps } from '../createNumberMask';
2
- import { isNil } from '../lodash';
3
4
  import { formatWithMask } from './formatWithMask';
4
5
 
5
6
  export type FormatNumberWithMaskProps = CreateNumberMaskProps & {
package/utils/index.ts CHANGED
@@ -1,7 +1,5 @@
1
1
  export { addEventListener, addListener } from './addEventListener';
2
2
  export { BackgroundContext } from './backgroundContext';
3
- export { default as color, resolveContrastColor } from './color';
4
- export * from './compare';
5
3
  export { default as composeEventHandlers } from './composeEventHandlers';
6
4
  export { createNumberMask, type CreateNumberMaskProps } from './createNumberMask';
7
5
  export * from './createSyntheticEvent';
@@ -16,5 +14,4 @@ export {
16
14
  normalizeToNumberString,
17
15
  type NormalizeToNumberStringProps,
18
16
  } from './normalizeToNumberString';
19
- export { Repository } from './repository';
20
17
  export * from './resolveStateVariant';
@@ -1,4 +1,4 @@
1
- import { isNil } from '../lodash';
1
+ import { isNil } from '@react-native-molecules/utils/helpers/lodash';
2
2
 
3
3
  export type NormalizeToNumberStringProps = {
4
4
  text: string;