@core_super_app/ui 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +170 -170
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/{core → coresuperapp}/ui/UiModule.kt +3 -3
- package/android/src/main/java/com/{core → coresuperapp}/ui/UiPackage.kt +1 -1
- package/lib/module/NativeUi.js +5 -0
- package/lib/module/NativeUi.js.map +1 -0
- package/lib/module/index.js +3 -3
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/{UISpec.d.ts → NativeUi.d.ts} +1 -1
- package/lib/typescript/src/NativeUi.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +30 -24
- package/src/{UISpec.ts → NativeUi.ts} +7 -7
- package/src/index.tsx +8 -8
- package/lib/module/UISpec.js +0 -5
- package/lib/module/UISpec.js.map +0 -1
- package/lib/typescript/src/UISpec.d.ts.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2026
|
|
3
|
+
Copyright (c) 2026 hiennc382
|
|
4
4
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
5
|
of this software and associated documentation files (the "Software"), to deal
|
|
6
6
|
in the Software without restriction, including without limitation the rights
|
package/README.md
CHANGED
|
@@ -1,170 +1,170 @@
|
|
|
1
|
-
# @core_super_app/ui
|
|
2
|
-
|
|
3
|
-
Thư viện UI component dùng chung cho ứng dụng React Native trong hệ sinh thái Super App.
|
|
4
|
-
|
|
5
|
-
## Tinh nang
|
|
6
|
-
|
|
7
|
-
- `BaseView`: layout khung trang + header + loading overlay
|
|
8
|
-
- `Header`: header co nut back, title/subtitle, right view
|
|
9
|
-
- `LoadingOverlay`: overlay loading toan man hinh
|
|
10
|
-
- `TextWrapper`: wrapper cho `Text` voi default style va accessibility
|
|
11
|
-
- `BasicButton`: button gradient co trang thai disabled
|
|
12
|
-
- `BasicInput`: input label dong, clear button, counter, imperative ref
|
|
13
|
-
- Export sang `ImageSrc` cho cac asset icon
|
|
14
|
-
|
|
15
|
-
## Cai dat
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm install @core_super_app/ui
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
hoac
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
yarn add @core_super_app/ui
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Yeu cau
|
|
28
|
-
|
|
29
|
-
- Node.js `v22.20.0` (xem `.nvmrc`)
|
|
30
|
-
- React Native `0.84.x`
|
|
31
|
-
- Peer ecosystem su dung trong source:
|
|
32
|
-
- `react-native-reanimated`
|
|
33
|
-
- `react-native-linear-gradient`
|
|
34
|
-
- `@react-navigation/native`
|
|
35
|
-
- `@core_super_app/utils`
|
|
36
|
-
|
|
37
|
-
## Cac export chinh
|
|
38
|
-
|
|
39
|
-
Tu root package:
|
|
40
|
-
|
|
41
|
-
```ts
|
|
42
|
-
import {
|
|
43
|
-
BaseView,
|
|
44
|
-
Header,
|
|
45
|
-
LoadingOverlay,
|
|
46
|
-
TextWrapper,
|
|
47
|
-
BasicButton,
|
|
48
|
-
BasicInput,
|
|
49
|
-
ImageSrc,
|
|
50
|
-
} from '@core_super_app/ui';
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
`src/index.tsx` hien tai export:
|
|
54
|
-
|
|
55
|
-
- toan bo trong `components`
|
|
56
|
-
- namespace `ImageSrc` tu `constants/image`
|
|
57
|
-
|
|
58
|
-
## Vi du su dung
|
|
59
|
-
|
|
60
|
-
### `BasicButton`
|
|
61
|
-
|
|
62
|
-
```tsx
|
|
63
|
-
import { BasicButton } from '@core_super_app/ui';
|
|
64
|
-
|
|
65
|
-
<BasicButton onPress={() => console.log('pressed')}>Dang nhap</BasicButton>;
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### `BasicInput` voi ref
|
|
69
|
-
|
|
70
|
-
```tsx
|
|
71
|
-
import { useRef } from 'react';
|
|
72
|
-
import { BasicInput } from '@core_super_app/ui';
|
|
73
|
-
|
|
74
|
-
type InputRef = {
|
|
75
|
-
focus: () => void;
|
|
76
|
-
blur: () => void;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
const inputRef = useRef<InputRef>(null);
|
|
80
|
-
|
|
81
|
-
<BasicInput
|
|
82
|
-
ref={inputRef}
|
|
83
|
-
label="So dien thoai"
|
|
84
|
-
value={phone}
|
|
85
|
-
onChange={setPhone}
|
|
86
|
-
showClearButton
|
|
87
|
-
/>;
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
### `BaseView`
|
|
91
|
-
|
|
92
|
-
```tsx
|
|
93
|
-
import { BaseView } from '@core_super_app/ui';
|
|
94
|
-
|
|
95
|
-
<BaseView isLoading={loading} back title="Thong tin ca nhan">
|
|
96
|
-
{/* Screen content */}
|
|
97
|
-
</BaseView>;
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## API tong quan
|
|
101
|
-
|
|
102
|
-
### Components
|
|
103
|
-
|
|
104
|
-
- `BaseView`
|
|
105
|
-
- Props gom:
|
|
106
|
-
- `background`
|
|
107
|
-
- toan bo `HeaderProps`
|
|
108
|
-
- toan bo `LoadingOverlayProps`
|
|
109
|
-
- `Header`
|
|
110
|
-
- Props chinh:
|
|
111
|
-
- `back`, `leftIcon`, `onPressLeftIcon`
|
|
112
|
-
- `title`, `subTitle`, `titleStyle`, `titleMaxLines`
|
|
113
|
-
- `rightView`
|
|
114
|
-
- `disabledBackHandler`
|
|
115
|
-
- `LoadingOverlay`
|
|
116
|
-
- `isLoading?: boolean`
|
|
117
|
-
- `indicatorColor?: string`
|
|
118
|
-
- `TextWrapper`
|
|
119
|
-
- `children`, `style`, `numberOfLines`, `ellipsizeMode`, `onPress`, `testID`
|
|
120
|
-
- `BasicButton`
|
|
121
|
-
- `onPress`, `disabled`, `colors`, `style`, `textStyle`, `children`
|
|
122
|
-
- `BasicInput`
|
|
123
|
-
- Ho tro label animation, clear icon, char counter, regex replace input
|
|
124
|
-
- Ho tro imperative ref: `focus()` va `blur()`
|
|
125
|
-
|
|
126
|
-
## Scripts
|
|
127
|
-
|
|
128
|
-
Trong `package.json`:
|
|
129
|
-
|
|
130
|
-
- `yarn clean` - xoa build artifacts
|
|
131
|
-
- `yarn prepare` - build package bang `react-native-builder-bob`
|
|
132
|
-
- `yarn typecheck` - kiem tra TypeScript
|
|
133
|
-
- `yarn lint` - lint source
|
|
134
|
-
- `yarn test` - chay Jest
|
|
135
|
-
- `yarn release` - bump version/publish qua `release-it`
|
|
136
|
-
|
|
137
|
-
## CI
|
|
138
|
-
|
|
139
|
-
GitHub Actions (`.github/workflows/ci.yml`) dang chay:
|
|
140
|
-
|
|
141
|
-
- lint + typecheck
|
|
142
|
-
- unit test (coverage)
|
|
143
|
-
- build library
|
|
144
|
-
- build Android example (co turbo cache)
|
|
145
|
-
- build iOS example (co turbo cache)
|
|
146
|
-
|
|
147
|
-
## Publishing
|
|
148
|
-
|
|
149
|
-
Package publish public len npm:
|
|
150
|
-
|
|
151
|
-
- `publishConfig.access = public`
|
|
152
|
-
- release command:
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
yarn release
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
Release flow su dung `release-it` + conventional changelog + git tag `v<version>`.
|
|
159
|
-
|
|
160
|
-
## Contributing
|
|
161
|
-
|
|
162
|
-
- [Development workflow](./CONTRIBUTING.md#development-workflow)
|
|
163
|
-
- [Sending a pull request](./CONTRIBUTING.md#sending-a-pull-request)
|
|
164
|
-
- [Code of conduct](./CODE_OF_CONDUCT.md)
|
|
165
|
-
|
|
166
|
-
Commit message convention theo [Conventional Commits](https://www.conventionalcommits.org/).
|
|
167
|
-
|
|
168
|
-
## License
|
|
169
|
-
|
|
170
|
-
MIT
|
|
1
|
+
# @core_super_app/ui
|
|
2
|
+
|
|
3
|
+
Thư viện UI component dùng chung cho ứng dụng React Native trong hệ sinh thái Super App.
|
|
4
|
+
|
|
5
|
+
## Tinh nang
|
|
6
|
+
|
|
7
|
+
- `BaseView`: layout khung trang + header + loading overlay
|
|
8
|
+
- `Header`: header co nut back, title/subtitle, right view
|
|
9
|
+
- `LoadingOverlay`: overlay loading toan man hinh
|
|
10
|
+
- `TextWrapper`: wrapper cho `Text` voi default style va accessibility
|
|
11
|
+
- `BasicButton`: button gradient co trang thai disabled
|
|
12
|
+
- `BasicInput`: input label dong, clear button, counter, imperative ref
|
|
13
|
+
- Export sang `ImageSrc` cho cac asset icon
|
|
14
|
+
|
|
15
|
+
## Cai dat
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @core_super_app/ui
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
hoac
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
yarn add @core_super_app/ui
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Yeu cau
|
|
28
|
+
|
|
29
|
+
- Node.js `v22.20.0` (xem `.nvmrc`)
|
|
30
|
+
- React Native `0.84.x`
|
|
31
|
+
- Peer ecosystem su dung trong source:
|
|
32
|
+
- `react-native-reanimated`
|
|
33
|
+
- `react-native-linear-gradient`
|
|
34
|
+
- `@react-navigation/native`
|
|
35
|
+
- `@core_super_app/utils`
|
|
36
|
+
|
|
37
|
+
## Cac export chinh
|
|
38
|
+
|
|
39
|
+
Tu root package:
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
import {
|
|
43
|
+
BaseView,
|
|
44
|
+
Header,
|
|
45
|
+
LoadingOverlay,
|
|
46
|
+
TextWrapper,
|
|
47
|
+
BasicButton,
|
|
48
|
+
BasicInput,
|
|
49
|
+
ImageSrc,
|
|
50
|
+
} from '@core_super_app/ui';
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`src/index.tsx` hien tai export:
|
|
54
|
+
|
|
55
|
+
- toan bo trong `components`
|
|
56
|
+
- namespace `ImageSrc` tu `constants/image`
|
|
57
|
+
|
|
58
|
+
## Vi du su dung
|
|
59
|
+
|
|
60
|
+
### `BasicButton`
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
import { BasicButton } from '@core_super_app/ui';
|
|
64
|
+
|
|
65
|
+
<BasicButton onPress={() => console.log('pressed')}>Dang nhap</BasicButton>;
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### `BasicInput` voi ref
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
import { useRef } from 'react';
|
|
72
|
+
import { BasicInput } from '@core_super_app/ui';
|
|
73
|
+
|
|
74
|
+
type InputRef = {
|
|
75
|
+
focus: () => void;
|
|
76
|
+
blur: () => void;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const inputRef = useRef<InputRef>(null);
|
|
80
|
+
|
|
81
|
+
<BasicInput
|
|
82
|
+
ref={inputRef}
|
|
83
|
+
label="So dien thoai"
|
|
84
|
+
value={phone}
|
|
85
|
+
onChange={setPhone}
|
|
86
|
+
showClearButton
|
|
87
|
+
/>;
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### `BaseView`
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
import { BaseView } from '@core_super_app/ui';
|
|
94
|
+
|
|
95
|
+
<BaseView isLoading={loading} back title="Thong tin ca nhan">
|
|
96
|
+
{/* Screen content */}
|
|
97
|
+
</BaseView>;
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## API tong quan
|
|
101
|
+
|
|
102
|
+
### Components
|
|
103
|
+
|
|
104
|
+
- `BaseView`
|
|
105
|
+
- Props gom:
|
|
106
|
+
- `background`
|
|
107
|
+
- toan bo `HeaderProps`
|
|
108
|
+
- toan bo `LoadingOverlayProps`
|
|
109
|
+
- `Header`
|
|
110
|
+
- Props chinh:
|
|
111
|
+
- `back`, `leftIcon`, `onPressLeftIcon`
|
|
112
|
+
- `title`, `subTitle`, `titleStyle`, `titleMaxLines`
|
|
113
|
+
- `rightView`
|
|
114
|
+
- `disabledBackHandler`
|
|
115
|
+
- `LoadingOverlay`
|
|
116
|
+
- `isLoading?: boolean`
|
|
117
|
+
- `indicatorColor?: string`
|
|
118
|
+
- `TextWrapper`
|
|
119
|
+
- `children`, `style`, `numberOfLines`, `ellipsizeMode`, `onPress`, `testID`
|
|
120
|
+
- `BasicButton`
|
|
121
|
+
- `onPress`, `disabled`, `colors`, `style`, `textStyle`, `children`
|
|
122
|
+
- `BasicInput`
|
|
123
|
+
- Ho tro label animation, clear icon, char counter, regex replace input
|
|
124
|
+
- Ho tro imperative ref: `focus()` va `blur()`
|
|
125
|
+
|
|
126
|
+
## Scripts
|
|
127
|
+
|
|
128
|
+
Trong `package.json`:
|
|
129
|
+
|
|
130
|
+
- `yarn clean` - xoa build artifacts
|
|
131
|
+
- `yarn prepare` - build package bang `react-native-builder-bob`
|
|
132
|
+
- `yarn typecheck` - kiem tra TypeScript
|
|
133
|
+
- `yarn lint` - lint source
|
|
134
|
+
- `yarn test` - chay Jest
|
|
135
|
+
- `yarn release` - bump version/publish qua `release-it`
|
|
136
|
+
|
|
137
|
+
## CI
|
|
138
|
+
|
|
139
|
+
GitHub Actions (`.github/workflows/ci.yml`) dang chay:
|
|
140
|
+
|
|
141
|
+
- lint + typecheck
|
|
142
|
+
- unit test (coverage)
|
|
143
|
+
- build library
|
|
144
|
+
- build Android example (co turbo cache)
|
|
145
|
+
- build iOS example (co turbo cache)
|
|
146
|
+
|
|
147
|
+
## Publishing
|
|
148
|
+
|
|
149
|
+
Package publish public len npm:
|
|
150
|
+
|
|
151
|
+
- `publishConfig.access = public`
|
|
152
|
+
- release command:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
yarn release
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Release flow su dung `release-it` + conventional changelog + git tag `v<version>`.
|
|
159
|
+
|
|
160
|
+
## Contributing
|
|
161
|
+
|
|
162
|
+
- [Development workflow](./CONTRIBUTING.md#development-workflow)
|
|
163
|
+
- [Sending a pull request](./CONTRIBUTING.md#sending-a-pull-request)
|
|
164
|
+
- [Code of conduct](./CODE_OF_CONDUCT.md)
|
|
165
|
+
|
|
166
|
+
Commit message convention theo [Conventional Commits](https://www.conventionalcommits.org/).
|
|
167
|
+
|
|
168
|
+
## License
|
|
169
|
+
|
|
170
|
+
MIT
|
package/android/build.gradle
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
package com.
|
|
1
|
+
package com.coresuperapp.ui
|
|
2
2
|
|
|
3
3
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
4
|
|
|
5
5
|
class UiModule(reactContext: ReactApplicationContext) :
|
|
6
|
-
|
|
6
|
+
NativeUiSpec(reactContext) {
|
|
7
7
|
|
|
8
8
|
override fun multiply(a: Double, b: Double): Double {
|
|
9
9
|
return a * b
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
companion object {
|
|
13
|
-
const val NAME =
|
|
13
|
+
const val NAME = NativeUiSpec.NAME
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"..\\..\\src","sources":["NativeUi.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAA0B,cAAc;AAMpE,eAAeA,mBAAmB,CAACC,YAAY,CAAO,IAAI,CAAC","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import Ui from "./NativeUi.js";
|
|
4
4
|
export function multiply(a, b) {
|
|
5
|
-
return
|
|
5
|
+
return Ui.multiply(a, b);
|
|
6
6
|
}
|
|
7
7
|
export * from "./components/index.js";
|
|
8
|
-
export * as
|
|
8
|
+
export * as IconSrc from "./constants/image.js";
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["Ui","multiply","a","b","IconSrc"],"sourceRoot":"..\\..\\src","sources":["index.tsx"],"mappings":";;AAAA,OAAOA,EAAE,MAAM,eAAY;AAE3B,OAAO,SAASC,QAAQA,CAACC,CAAS,EAAEC,CAAS,EAAU;EACrD,OAAOH,EAAE,CAACC,QAAQ,CAACC,CAAC,EAAEC,CAAC,CAAC;AAC1B;AAEA,cAAc,uBAAc;AAC5B,OAAO,KAAKC,OAAO,MAAM,sBAAmB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeUi.d.ts","sourceRoot":"","sources":["../../../src/NativeUi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAErE,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxC;;AAED,wBAA4D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAEA,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,cAAc,cAAc,CAAC;AAC7B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAEA,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,cAAc,cAAc,CAAC;AAC7B,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@core_super_app/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "Define common components for project",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"!**/.*"
|
|
38
38
|
],
|
|
39
39
|
"scripts": {
|
|
40
|
+
"example": "yarn workspace @core_super_app/ui-example",
|
|
40
41
|
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
41
42
|
"prepare": "bob build",
|
|
42
43
|
"typecheck": "tsc",
|
|
@@ -51,25 +52,29 @@
|
|
|
51
52
|
],
|
|
52
53
|
"repository": {
|
|
53
54
|
"type": "git",
|
|
54
|
-
"url": "https://github.com/HienNguyen0205/core_super_app-ui.git"
|
|
55
|
+
"url": "git+https://github.com/HienNguyen0205/core_super_app-ui.git"
|
|
55
56
|
},
|
|
56
|
-
"author": "
|
|
57
|
+
"author": "hiennc382 <Hienqt0205@gmail.com> (https://github.com/HienNguyen0205)",
|
|
57
58
|
"license": "MIT",
|
|
58
59
|
"bugs": {
|
|
59
60
|
"url": "https://github.com/HienNguyen0205/core_super_app-ui/issues"
|
|
60
61
|
},
|
|
61
|
-
"homepage": "https://github.com/HienNguyen0205/core_super_app-ui",
|
|
62
|
+
"homepage": "https://github.com/HienNguyen0205/core_super_app-ui#readme",
|
|
62
63
|
"publishConfig": {
|
|
63
64
|
"access": "public"
|
|
64
65
|
},
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"@core_super_app/utils": "0.0.5",
|
|
68
|
+
"@react-navigation/native": "7.2.1",
|
|
69
|
+
"react-native-linear-gradient": "^2.8.3"
|
|
70
|
+
},
|
|
65
71
|
"devDependencies": {
|
|
66
72
|
"@commitlint/config-conventional": "^19.8.1",
|
|
67
73
|
"@eslint/compat": "^1.3.2",
|
|
68
74
|
"@eslint/eslintrc": "^3.3.1",
|
|
69
75
|
"@eslint/js": "^9.35.0",
|
|
70
|
-
"@react-native/babel-preset": "0.
|
|
71
|
-
"@react-native/eslint-config": "0.
|
|
72
|
-
"@react-navigation/native": "7.2.1",
|
|
76
|
+
"@react-native/babel-preset": "0.84.1",
|
|
77
|
+
"@react-native/eslint-config": "0.84.1",
|
|
73
78
|
"@release-it/conventional-changelog": "^10.0.1",
|
|
74
79
|
"@types/jest": "^29.5.14",
|
|
75
80
|
"@types/react": "^19.2.0",
|
|
@@ -80,21 +85,25 @@
|
|
|
80
85
|
"eslint-plugin-prettier": "^5.5.4",
|
|
81
86
|
"jest": "^29.7.0",
|
|
82
87
|
"lefthook": "^2.0.3",
|
|
83
|
-
"prettier": "^
|
|
88
|
+
"prettier": "^2.8.8",
|
|
84
89
|
"react": "19.2.3",
|
|
85
90
|
"react-native": "0.84.1",
|
|
86
91
|
"react-native-builder-bob": "^0.40.13",
|
|
87
|
-
"react-native-reanimated": "
|
|
92
|
+
"react-native-reanimated": "4.3.0",
|
|
93
|
+
"react-native-worklets": "0.8.1",
|
|
88
94
|
"release-it": "^19.0.4",
|
|
89
95
|
"turbo": "^2.5.6",
|
|
90
96
|
"typescript": "^5.9.2"
|
|
91
97
|
},
|
|
92
98
|
"peerDependencies": {
|
|
93
|
-
"
|
|
94
|
-
"
|
|
99
|
+
"react": "*",
|
|
100
|
+
"react-native": "*",
|
|
95
101
|
"react-native-reanimated": ">=4.3.0",
|
|
96
102
|
"react-native-worklets": ">=0.8.1"
|
|
97
103
|
},
|
|
104
|
+
"workspaces": [
|
|
105
|
+
"example"
|
|
106
|
+
],
|
|
98
107
|
"packageManager": "yarn@4.11.0",
|
|
99
108
|
"react-native-builder-bob": {
|
|
100
109
|
"source": "src",
|
|
@@ -114,12 +123,21 @@
|
|
|
114
123
|
]
|
|
115
124
|
]
|
|
116
125
|
},
|
|
126
|
+
"codegenConfig": {
|
|
127
|
+
"name": "UiSpec",
|
|
128
|
+
"type": "modules",
|
|
129
|
+
"jsSrcsDir": "src",
|
|
130
|
+
"android": {
|
|
131
|
+
"javaPackageName": "com.coresuperapp.ui"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
117
134
|
"prettier": {
|
|
118
135
|
"quoteProps": "consistent",
|
|
119
136
|
"singleQuote": true,
|
|
120
137
|
"tabWidth": 2,
|
|
121
138
|
"trailingComma": "es5",
|
|
122
|
-
"useTabs": false
|
|
139
|
+
"useTabs": false,
|
|
140
|
+
"endOfLine": "auto"
|
|
123
141
|
},
|
|
124
142
|
"jest": {
|
|
125
143
|
"preset": "react-native",
|
|
@@ -162,17 +180,5 @@
|
|
|
162
180
|
"release-it"
|
|
163
181
|
],
|
|
164
182
|
"version": "0.57.2"
|
|
165
|
-
},
|
|
166
|
-
"dependencies": {
|
|
167
|
-
"@core_super_app/utils": "0.0.5",
|
|
168
|
-
"react-native-linear-gradient": "^2.8.3"
|
|
169
|
-
},
|
|
170
|
-
"codegenConfig": {
|
|
171
|
-
"name": "UiSpec",
|
|
172
|
-
"type": "modules",
|
|
173
|
-
"jsSrcsDir": "src",
|
|
174
|
-
"android": {
|
|
175
|
-
"javaPackageName": "com.core.ui"
|
|
176
|
-
}
|
|
177
183
|
}
|
|
178
184
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TurboModuleRegistry, type TurboModule } from 'react-native';
|
|
2
|
-
|
|
3
|
-
export interface Spec extends TurboModule {
|
|
4
|
-
multiply(a: number, b: number): number;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export default TurboModuleRegistry.getEnforcing<Spec>('
|
|
1
|
+
import { TurboModuleRegistry, type TurboModule } from 'react-native';
|
|
2
|
+
|
|
3
|
+
export interface Spec extends TurboModule {
|
|
4
|
+
multiply(a: number, b: number): number;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export default TurboModuleRegistry.getEnforcing<Spec>('Ui');
|
package/src/index.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export function multiply(a: number, b: number): number {
|
|
4
|
-
return
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export * from './components';
|
|
8
|
-
export * as
|
|
1
|
+
import Ui from './NativeUi';
|
|
2
|
+
|
|
3
|
+
export function multiply(a: number, b: number): number {
|
|
4
|
+
return Ui.multiply(a, b);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export * from './components';
|
|
8
|
+
export * as IconSrc from './constants/image';
|
package/lib/module/UISpec.js
DELETED
package/lib/module/UISpec.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"..\\..\\src","sources":["UISpec.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAA0B,cAAc;AAMpE,eAAeA,mBAAmB,CAACC,YAAY,CAAO,UAAU,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UISpec.d.ts","sourceRoot":"","sources":["../../../src/UISpec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAErE,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxC;;AAED,wBAAkE"}
|