react-native-rn-story-editor 0.1.0 → 0.1.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/README.md +37 -16
- package/package.json +9 -10
package/README.md
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
# react-native-rn-story-editor
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/react-native-rn-story-editor)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://www.android.com)
|
|
6
|
+
[](https://www.apple.com)
|
|
7
|
+
|
|
8
|
+
A React Native library for story editing tools with customizable views and native commands. Built with React Native Fabric architecture for optimal performance.
|
|
9
|
+
|
|
10
|
+
## Features
|
|
11
|
+
|
|
12
|
+
- **Customizable Views** - Native React components with color and style support
|
|
13
|
+
- **Fabric Architecture** - Built with React Native's new rendering system
|
|
14
|
+
- **Cross-Platform** - Works on both Android and iOS
|
|
15
|
+
- **TypeScript Support** - Full type safety and IntelliSense
|
|
16
|
+
- **Native Commands** - Export image and show text input functionality
|
|
17
|
+
- **Modern Build System** - Uses react-native-builder-bob for optimal builds
|
|
4
18
|
|
|
5
19
|
## Installation
|
|
6
20
|
|
|
7
|
-
```
|
|
21
|
+
```bash
|
|
8
22
|
npm install react-native-rn-story-editor
|
|
9
23
|
```
|
|
10
24
|
|
|
@@ -25,6 +39,21 @@ StoryEditorCommands.exportImage(ref);
|
|
|
25
39
|
StoryEditorCommands.showTextInput(ref);
|
|
26
40
|
```
|
|
27
41
|
|
|
42
|
+
## Props
|
|
43
|
+
|
|
44
|
+
| Prop | Type | Default | Description |
|
|
45
|
+
|------|------|----------|-------------|
|
|
46
|
+
| `color` | `number` | `Color.TRANSPARENT` | Numeric color value (e.g., `0xFF32a852`) |
|
|
47
|
+
| `colorString` | `string` | `undefined` | Hex color string (e.g., `"#32a852"`) |
|
|
48
|
+
| `style` | `ViewStyle` | `undefined` | React Native style object |
|
|
49
|
+
|
|
50
|
+
## Commands
|
|
51
|
+
|
|
52
|
+
| Command | Parameters | Description |
|
|
53
|
+
|---------|------------|-------------|
|
|
54
|
+
| `exportImage` | `(ref: any)` | Export the current view as an image |
|
|
55
|
+
| `showTextInput` | `(ref: any)` | Show native text input overlay |
|
|
56
|
+
|
|
28
57
|
## Testing
|
|
29
58
|
|
|
30
59
|
### Unit Tests
|
|
@@ -47,20 +76,12 @@ npm install react-native@0.73
|
|
|
47
76
|
```
|
|
48
77
|
|
|
49
78
|
### Cross-Platform Verification
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
### Before Publishing Checklist
|
|
58
|
-
- [ ] All tests pass
|
|
59
|
-
- [ ] Manual testing on Android/iOS
|
|
60
|
-
- [ ] TypeScript builds without errors
|
|
61
|
-
- [ ] Example app runs successfully
|
|
62
|
-
- [ ] Documentation is up to date
|
|
63
|
-
- [ ] Version is incremented
|
|
79
|
+
- Android: Tested on API 24+ (emulators/devices)
|
|
80
|
+
- iOS: Test on iOS 12+ (simulators/devices)
|
|
81
|
+
- React Native: Test with multiple versions
|
|
82
|
+
- TypeScript: All types compile correctly
|
|
83
|
+
- Props: Color, style, and other props work
|
|
84
|
+
- Commands: exportImage and showTextInput functions
|
|
64
85
|
|
|
65
86
|
## Contributing
|
|
66
87
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-rn-story-editor",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "A React Native library for story editing tools with customizable views and native commands",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -33,8 +33,6 @@
|
|
|
33
33
|
],
|
|
34
34
|
"scripts": {
|
|
35
35
|
"example": "yarn workspace react-native-rn-story-editor-example",
|
|
36
|
-
"example:android": "cd example && npx react-native run-android",
|
|
37
|
-
"example:ios": "cd example && npx react-native run-ios",
|
|
38
36
|
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
39
37
|
"prepare": "bob build",
|
|
40
38
|
"typecheck": "tsc",
|
|
@@ -45,7 +43,12 @@
|
|
|
45
43
|
"keywords": [
|
|
46
44
|
"react-native",
|
|
47
45
|
"ios",
|
|
48
|
-
"android"
|
|
46
|
+
"android",
|
|
47
|
+
"story-editor",
|
|
48
|
+
"editing-tools",
|
|
49
|
+
"native-components",
|
|
50
|
+
"fabric",
|
|
51
|
+
"typescript"
|
|
49
52
|
],
|
|
50
53
|
"repository": {
|
|
51
54
|
"type": "git",
|
|
@@ -65,15 +68,12 @@
|
|
|
65
68
|
"@eslint/compat": "^1.3.2",
|
|
66
69
|
"@eslint/eslintrc": "^3.3.1",
|
|
67
70
|
"@eslint/js": "^9.35.0",
|
|
68
|
-
"@react-native-community/cli": "latest",
|
|
69
71
|
"@react-native/babel-preset": "0.83.0",
|
|
72
|
+
"@react-native-community/cli": "latest",
|
|
70
73
|
"@react-native/eslint-config": "0.83.0",
|
|
71
74
|
"@release-it/conventional-changelog": "^10.0.1",
|
|
72
|
-
"@testing-library/jest-native": "^5.4.3",
|
|
73
|
-
"@testing-library/react-native": "^13.3.3",
|
|
74
75
|
"@types/jest": "^29.5.14",
|
|
75
76
|
"@types/react": "^19.2.0",
|
|
76
|
-
"@types/react-test-renderer": "^19",
|
|
77
77
|
"commitlint": "^19.8.1",
|
|
78
78
|
"del-cli": "^6.0.0",
|
|
79
79
|
"eslint": "^8.57.0",
|
|
@@ -85,7 +85,6 @@
|
|
|
85
85
|
"react": "19.2.0",
|
|
86
86
|
"react-native": "0.83.0",
|
|
87
87
|
"react-native-builder-bob": "^0.40.18",
|
|
88
|
-
"react-test-renderer": "19.2.0",
|
|
89
88
|
"release-it": "^19.0.4",
|
|
90
89
|
"turbo": "^2.5.6",
|
|
91
90
|
"typescript": "^5.9.2"
|