@onekeyfe/react-native-skeleton 3.0.162-alpha.272 → 3.0.163

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 (2) hide show
  1. package/README.md +31 -20
  2. package/package.json +6 -5
package/README.md CHANGED
@@ -1,39 +1,50 @@
1
- # react-native-skeleton
1
+ # @onekeyfe/react-native-skeleton
2
2
 
3
- react-native-skeleton
3
+ A native shimmer loading placeholder for OneKey React Native applications on
4
+ iOS and Android. The Nitro view animates its own native rendering surface;
5
+ the application decides when to display it and when loaded content replaces it.
4
6
 
5
7
  ## Installation
6
8
 
7
-
8
9
  ```sh
9
- npm install react-native-skeleton react-native-nitro-modules
10
-
11
- > `react-native-nitro-modules` is required as this library relies on [Nitro Modules](https://nitro.margelo.com/).
10
+ yarn add @onekeyfe/react-native-skeleton react-native-nitro-modules
12
11
  ```
13
12
 
13
+ Install the application's iOS pods and rebuild the native application after
14
+ adding the package. A JavaScript-only install does not register the Nitro view.
14
15
 
15
16
  ## Usage
16
17
 
18
+ ```tsx
19
+ import { SkeletonView } from '@onekeyfe/react-native-skeleton';
17
20
 
18
- ```js
19
- import { SkeletonView } from "react-native-skeleton";
20
-
21
- // ...
22
-
23
- <SkeletonView color="tomato" />
21
+ <SkeletonView
22
+ style={{ width: 160, height: 24, borderRadius: 6 }}
23
+ shimmerSpeed={3}
24
+ shimmerGradientColors={['#E5E7EB', '#F3F4F6']}
25
+ />;
24
26
  ```
25
27
 
28
+ Give the view a width and height through its layout style. The example uses the
29
+ actual exported package name and supported shimmer props; there is no public
30
+ `color` prop on this view.
26
31
 
27
- ## Contributing
32
+ ## Props and lifecycle
28
33
 
29
- - [Development workflow](CONTRIBUTING.md#development-workflow)
30
- - [Sending a pull request](CONTRIBUTING.md#sending-a-pull-request)
31
- - [Code of conduct](CODE_OF_CONDUCT.md)
34
+ | Prop | Meaning |
35
+ | --- | --- |
36
+ | `shimmerSpeed` | Animation duration in seconds; defaults to 3 and is clamped to at least 0.1. |
37
+ | `shimmerGradientColors` | Two gradient colors; native uses the first two entries and falls back to its defaults when fewer are provided. |
32
38
 
33
- ## License
39
+ Use six-digit hex colors for consistent iOS and Android input. The view's native
40
+ renderer handles attachment and animation lifecycle; it does not track network
41
+ requests or emit a loading-completion event. Consumers control whether the
42
+ placeholder remains mounted and should verify the resulting layout with their
43
+ actual content.
34
44
 
35
- MIT
45
+ The current interface is in [src/Skeleton.nitro.ts](src/Skeleton.nitro.ts), and
46
+ the public component is exported from [src/index.tsx](src/index.tsx).
36
47
 
37
- ---
48
+ ## License
38
49
 
39
- Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
50
+ MIT.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@onekeyfe/react-native-skeleton",
3
- "version": "3.0.162-alpha.272",
4
- "description": "react-native-skeleton",
3
+ "version": "3.0.163",
4
+ "description": "Native shimmer loading placeholder for OneKey on iOS and Android",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
7
7
  "exports": {
@@ -50,14 +50,15 @@
50
50
  ],
51
51
  "repository": {
52
52
  "type": "git",
53
- "url": "git+https://github.com/OneKeyHQ/native-views/react-native-skeleton.git"
53
+ "url": "git+https://github.com/OneKeyHQ/app-modules.git",
54
+ "directory": "native-views/react-native-skeleton"
54
55
  },
55
56
  "author": "@onekeyfe <huanming@onekey.so> (https://github.com/OneKeyHQ/app-modules)",
56
57
  "license": "MIT",
57
58
  "bugs": {
58
- "url": "https://github.com/OneKeyHQ/native-views/react-native-skeleton/issues"
59
+ "url": "https://github.com/OneKeyHQ/app-modules/issues"
59
60
  },
60
- "homepage": "https://github.com/OneKeyHQ/native-views/react-native-skeleton#readme",
61
+ "homepage": "https://github.com/OneKeyHQ/app-modules/tree/main/native-views/react-native-skeleton#readme",
61
62
  "publishConfig": {
62
63
  "registry": "https://registry.npmjs.org/"
63
64
  },