@mbrain/epic-react-native-lib 0.0.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 +31 -0
- package/dist/index.cjs +1 -0
- package/dist/index.mjs +1 -0
- package/dist/types/components/Box1.d.ts +10 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +65 -0
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Epic React Native Library
|
|
2
|
+
|
|
3
|
+
A set of helpful, battle-tested utilities that simplify common React Native workflows and speed up app development.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Install inside your React Native project:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @mbrain/epic-react-native-lib
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Compatibility
|
|
14
|
+
|
|
15
|
+
- Works in both native and web React Native projects
|
|
16
|
+
- Required peers: `react >=18` and `react-native >=0.72`
|
|
17
|
+
- Optional (web-only) peers: `react-dom >=18` and `react-native-web >=0.19`
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { Box1 } from '@mbrain/epic-react-native-lib';
|
|
23
|
+
|
|
24
|
+
export function MyScreen() {
|
|
25
|
+
return (
|
|
26
|
+
<Box1 style={{ margin: 16 }}>
|
|
27
|
+
<Text>Content rendered inside Box1</Text>
|
|
28
|
+
</Box1>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
```
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var p=Object.create;var x=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var a=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty;var S=(e,t)=>{for(var o in t)x(e,o,{get:t[o],enumerable:!0})},f=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of c(t))!d.call(e,r)&&r!==o&&x(e,r,{get:()=>t[r],enumerable:!(n=y(t,r))||n.enumerable});return e};var u=(e,t,o)=>(o=e!=null?p(a(e)):{},f(t||!e||!e.__esModule?x(o,"default",{value:e,enumerable:!0}):o,e)),m=e=>f(x({},"__esModule",{value:!0}),e);var P={};S(P,{Box1:()=>i});module.exports=m(P);var l=u(require("react"),1),s=require("react-native");function i({style:e,children:t}){let[o,n]=(0,l.useState)(0);return l.default.createElement(s.View,{style:e},l.default.createElement(s.Text,{style:B.text,onPress:()=>{n(r=>r+1)}},"Box1 ",o),t)}var B=s.StyleSheet.create({text:{fontSize:20,padding:15,borderRadius:10,color:"#ffffff",backgroundColor:"#0a234a"}});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e,{useState as n}from"react";import{View as x,Text as f,StyleSheet as i}from"react-native";function p({style:t,children:o}){let[r,s]=n(0);return e.createElement(x,{style:t},e.createElement(f,{style:y.text,onPress:()=>{s(l=>l+1)}},"Box1 ",r),o)}var y=i.create({text:{fontSize:20,padding:15,borderRadius:10,color:"#ffffff",backgroundColor:"#0a234a"}});export{p as Box1};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
export type Box1Props = {
|
|
4
|
+
style?: StyleProp<ViewStyle>;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Blue box.
|
|
9
|
+
*/
|
|
10
|
+
export declare function Box1({ style, children }: Box1Props): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Box1 } from '@/components/Box1';
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mbrain/epic-react-native-lib",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "A set of helpful, battle-tested utilities that simplify common React Native workflows and speed up app development",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"main": "dist/index.cjs",
|
|
8
|
+
"module": "dist/index.mjs",
|
|
9
|
+
"types": "dist/types/index.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=18"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"dev": "npm run clean && npm-run-all --parallel dev:js dev:types",
|
|
18
|
+
"build": "npm run clean && npm run build:types && npm run build:js",
|
|
19
|
+
"build:js": "NODE_ENV=production node scripts/build.mjs",
|
|
20
|
+
"build:types": "tsc --project tsconfig.build.json --emitDeclarationOnly",
|
|
21
|
+
"release": "echo \"\n\"YOU WILL PUBLISH TO THIS ACCOUNT: \"`npm whoami`\" && printf \"%s \" \"\nPress ENTER to continue or CTRL+C to abort\" & read ans && npm run build && shx echo DONE BUILDING && npm publish --access public",
|
|
22
|
+
"release:view": "open https://www.npmjs.com/package/@mbrain/epic-react-native-lib",
|
|
23
|
+
"clean": "rimraf dist",
|
|
24
|
+
"lint": "eslint \"src/**/*.{ts,tsx}\"",
|
|
25
|
+
"format": "prettier --write \"**/*.{ts,tsx,js,json,md}\""
|
|
26
|
+
},
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/types/index.d.ts",
|
|
30
|
+
"import": "./dist/index.mjs",
|
|
31
|
+
"require": "./dist/index.cjs"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"react": ">=18.0.0",
|
|
37
|
+
"react-dom": ">=18.0.0",
|
|
38
|
+
"react-native": ">=0.72.0",
|
|
39
|
+
"react-native-web": ">=0.19.0"
|
|
40
|
+
},
|
|
41
|
+
"peerDependenciesMeta": {
|
|
42
|
+
"react-dom": {
|
|
43
|
+
"optional": true
|
|
44
|
+
},
|
|
45
|
+
"react-native-web": {
|
|
46
|
+
"optional": true
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@types/react": "^19.2.5",
|
|
51
|
+
"@typescript-eslint/eslint-plugin": "^8.46.4",
|
|
52
|
+
"@typescript-eslint/parser": "^8.46.4",
|
|
53
|
+
"esbuild": "^0.27.0",
|
|
54
|
+
"eslint": "^9.39.1",
|
|
55
|
+
"eslint-config-expo": "^10.0.0",
|
|
56
|
+
"eslint-config-prettier": "^10.1.8",
|
|
57
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
58
|
+
"eslint-plugin-react": "^7.37.5",
|
|
59
|
+
"npm-run-all": "^4.1.5",
|
|
60
|
+
"prettier": "^3.6.2",
|
|
61
|
+
"rimraf": "^6.1.0",
|
|
62
|
+
"shx": "^0.4.0",
|
|
63
|
+
"typescript": "^5.9.3"
|
|
64
|
+
}
|
|
65
|
+
}
|