react-native-gleam 1.0.0-beta.1
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/Gleam.podspec +20 -0
- package/LICENSE +20 -0
- package/README.md +150 -0
- package/android/build.gradle +67 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/gleam/GleamPackage.kt +17 -0
- package/android/src/main/java/com/gleam/GleamView.kt +379 -0
- package/android/src/main/java/com/gleam/GleamViewManager.kt +89 -0
- package/ios/GleamView.h +14 -0
- package/ios/GleamView.mm +430 -0
- package/lib/module/GleamViewNativeComponent.ts +26 -0
- package/lib/module/index.js +16 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/GleamViewNativeComponent.d.ts +18 -0
- package/lib/typescript/src/GleamViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +13 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/package.json +150 -0
- package/src/GleamViewNativeComponent.ts +26 -0
- package/src/index.tsx +14 -0
package/package.json
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-native-gleam",
|
|
3
|
+
"version": "1.0.0-beta.1",
|
|
4
|
+
"description": "Native-powered shimmer loading effect for React Native",
|
|
5
|
+
"main": "./lib/module/index.js",
|
|
6
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"source": "./src/index.tsx",
|
|
10
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
11
|
+
"default": "./lib/module/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"src",
|
|
17
|
+
"lib",
|
|
18
|
+
"android",
|
|
19
|
+
"ios",
|
|
20
|
+
"*.podspec",
|
|
21
|
+
"!ios/build",
|
|
22
|
+
"!android/build",
|
|
23
|
+
"!android/gradle",
|
|
24
|
+
"!android/gradlew",
|
|
25
|
+
"!android/gradlew.bat",
|
|
26
|
+
"!android/local.properties",
|
|
27
|
+
"!**/__tests__",
|
|
28
|
+
"!**/__fixtures__",
|
|
29
|
+
"!**/__mocks__",
|
|
30
|
+
"!**/.*"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"example": "yarn workspace react-native-gleam-example",
|
|
34
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
35
|
+
"prepare": "bob build",
|
|
36
|
+
"test": "jest",
|
|
37
|
+
"typecheck": "tsc",
|
|
38
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\""
|
|
39
|
+
},
|
|
40
|
+
"jest": {
|
|
41
|
+
"preset": "react-native",
|
|
42
|
+
"modulePathIgnorePatterns": [
|
|
43
|
+
"<rootDir>/example/node_modules",
|
|
44
|
+
"<rootDir>/lib/"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"react-native",
|
|
49
|
+
"ios",
|
|
50
|
+
"android",
|
|
51
|
+
"shimmer",
|
|
52
|
+
"skeleton",
|
|
53
|
+
"loading",
|
|
54
|
+
"placeholder",
|
|
55
|
+
"fabric"
|
|
56
|
+
],
|
|
57
|
+
"repository": {
|
|
58
|
+
"type": "git",
|
|
59
|
+
"url": "git+https://github.com/AppAndFlow/react-native-gleam.git"
|
|
60
|
+
},
|
|
61
|
+
"author": "David Boutin <david@appandflow.com> (https://github.com/AppAndFlow)",
|
|
62
|
+
"license": "MIT",
|
|
63
|
+
"bugs": {
|
|
64
|
+
"url": "https://github.com/AppAndFlow/react-native-gleam/issues"
|
|
65
|
+
},
|
|
66
|
+
"homepage": "https://github.com/AppAndFlow/react-native-gleam#readme",
|
|
67
|
+
"publishConfig": {
|
|
68
|
+
"registry": "https://registry.npmjs.org/"
|
|
69
|
+
},
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@eslint/compat": "^1.3.2",
|
|
72
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
73
|
+
"@eslint/js": "^9.35.0",
|
|
74
|
+
"@react-native/babel-preset": "0.83.0",
|
|
75
|
+
"@react-native/eslint-config": "0.83.0",
|
|
76
|
+
"@testing-library/jest-native": "^5.4.3",
|
|
77
|
+
"@testing-library/react-native": "^13.3.3",
|
|
78
|
+
"@types/jest": "^30.0.0",
|
|
79
|
+
"@types/react": "^19.2.0",
|
|
80
|
+
"@types/react-test-renderer": "^19",
|
|
81
|
+
"del-cli": "^6.0.0",
|
|
82
|
+
"eslint": "^9.35.0",
|
|
83
|
+
"eslint-config-prettier": "^10.1.8",
|
|
84
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
85
|
+
"jest": "^30.3.0",
|
|
86
|
+
"prettier": "^2.8.8",
|
|
87
|
+
"react": "19.2.0",
|
|
88
|
+
"react-native": "0.83.0",
|
|
89
|
+
"react-native-builder-bob": "^0.40.18",
|
|
90
|
+
"react-test-renderer": "19.2.0",
|
|
91
|
+
"turbo": "^2.5.6",
|
|
92
|
+
"typescript": "^5.9.2"
|
|
93
|
+
},
|
|
94
|
+
"peerDependencies": {
|
|
95
|
+
"react": "*",
|
|
96
|
+
"react-native": "*"
|
|
97
|
+
},
|
|
98
|
+
"workspaces": [
|
|
99
|
+
"example"
|
|
100
|
+
],
|
|
101
|
+
"packageManager": "yarn@4.11.0",
|
|
102
|
+
"react-native-builder-bob": {
|
|
103
|
+
"source": "src",
|
|
104
|
+
"output": "lib",
|
|
105
|
+
"targets": [
|
|
106
|
+
[
|
|
107
|
+
"module",
|
|
108
|
+
{
|
|
109
|
+
"esm": true
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
[
|
|
113
|
+
"typescript",
|
|
114
|
+
{
|
|
115
|
+
"project": "tsconfig.build.json"
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"codegenConfig": {
|
|
121
|
+
"name": "GleamViewSpec",
|
|
122
|
+
"type": "all",
|
|
123
|
+
"jsSrcsDir": "src",
|
|
124
|
+
"android": {
|
|
125
|
+
"javaPackageName": "com.gleam"
|
|
126
|
+
},
|
|
127
|
+
"ios": {
|
|
128
|
+
"components": {
|
|
129
|
+
"GleamView": {
|
|
130
|
+
"className": "GleamView"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"prettier": {
|
|
136
|
+
"quoteProps": "consistent",
|
|
137
|
+
"singleQuote": true,
|
|
138
|
+
"tabWidth": 2,
|
|
139
|
+
"trailingComma": "es5",
|
|
140
|
+
"useTabs": false
|
|
141
|
+
},
|
|
142
|
+
"create-react-native-library": {
|
|
143
|
+
"type": "fabric-view",
|
|
144
|
+
"languages": "kotlin-objc",
|
|
145
|
+
"tools": [
|
|
146
|
+
"eslint"
|
|
147
|
+
],
|
|
148
|
+
"version": "0.57.2"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
codegenNativeComponent,
|
|
3
|
+
type ColorValue,
|
|
4
|
+
type ViewProps,
|
|
5
|
+
type CodegenTypes,
|
|
6
|
+
} from 'react-native';
|
|
7
|
+
|
|
8
|
+
export interface NativeProps extends ViewProps {
|
|
9
|
+
loading?: CodegenTypes.WithDefault<boolean, true>;
|
|
10
|
+
speed?: CodegenTypes.WithDefault<CodegenTypes.Float, 1000>;
|
|
11
|
+
direction?: CodegenTypes.WithDefault<'ltr' | 'rtl' | 'ttb', 'ltr'>;
|
|
12
|
+
delay?: CodegenTypes.WithDefault<CodegenTypes.Float, 0>;
|
|
13
|
+
transitionDuration?: CodegenTypes.WithDefault<CodegenTypes.Float, 300>;
|
|
14
|
+
transitionType?: CodegenTypes.WithDefault<
|
|
15
|
+
'fade' | 'shrink' | 'collapse',
|
|
16
|
+
'fade'
|
|
17
|
+
>;
|
|
18
|
+
intensity?: CodegenTypes.WithDefault<CodegenTypes.Float, 1>;
|
|
19
|
+
baseColor?: ColorValue;
|
|
20
|
+
highlightColor?: ColorValue;
|
|
21
|
+
onTransitionEnd?: CodegenTypes.DirectEventHandler<
|
|
22
|
+
Readonly<{ finished: boolean }>
|
|
23
|
+
>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default codegenNativeComponent<NativeProps>('GleamView');
|
package/src/index.tsx
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { default as GleamView } from './GleamViewNativeComponent';
|
|
2
|
+
export type { NativeProps as GleamViewProps } from './GleamViewNativeComponent';
|
|
3
|
+
|
|
4
|
+
export enum GleamDirection {
|
|
5
|
+
LeftToRight = 'ltr',
|
|
6
|
+
RightToLeft = 'rtl',
|
|
7
|
+
TopToBottom = 'ttb',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export enum GleamTransition {
|
|
11
|
+
Fade = 'fade',
|
|
12
|
+
Shrink = 'shrink',
|
|
13
|
+
Collapse = 'collapse',
|
|
14
|
+
}
|