react-native-unistyles 1.0.0-rc.2 → 2.0.0-alpha.1

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -11,6 +11,7 @@
11
11
  ![Platform - Android and iOS](https://img.shields.io/badge/platform-Android%20%7C%20iOS%20%7C%20RNWeb-blue.svg?style=for-the-badge)
12
12
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
13
13
 
14
+
14
15
  ## Features
15
16
  - ⚡ Blazing fast, adds around ~3ms on top of StyleSheet*
16
17
  - 🎳 Share up to 100% of your styles across platforms in monorepo
@@ -26,7 +27,7 @@
26
27
  ## Installation
27
28
 
28
29
  ```cmd
29
- yarn add react-native-unistyles@rc
30
+ yarn add react-native-unistyles
30
31
  ```
31
32
 
32
33
  ## [Documentation](https://reactnativeunistyles.vercel.app/)
@@ -34,6 +35,18 @@ yarn add react-native-unistyles@rc
34
35
  - [References](https://reactnativeunistyles.vercel.app/reference/create-stylesheet/)
35
36
  - [Examples](https://reactnativeunistyles.vercel.app/example/breakpoints/)
36
37
 
38
+ ## Faster, better and simpler - v.2.0 🚀
39
+
40
+ There is ongoing work on branch [2.0](https://github.com/jpudysz/react-native-unistyles/tree/2.0).
41
+
42
+ ---
43
+
44
+ Join early testers and discussion [here](https://github.com/jpudysz/react-native-unistyles/discussions/41)
45
+
46
+ ```cmd
47
+ yarn add react-native-unistyles@next
48
+ ```
49
+
37
50
  ## Blog post
38
51
 
39
52
  Read about what drove me to create this library in this blog post [here](https://www.reactnativecrossroads.com/posts/level-up-react-native-styles).
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.UnistylesTheme = exports.UnistylesContext = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
9
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
8
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
9
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
10
10
  const UnistylesContext = exports.UnistylesContext = /*#__PURE__*/(0, _react.createContext)({});
11
11
  const UnistylesTheme = _ref => {
12
12
  let {
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","UnistylesContext","exports","createContext","UnistylesTheme","_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gB,GAAAC,OAAA,CAAAD,gBAAA,gBAAG,IAAAE,oBAAa,EAAC,CAAC,CAAC,CAAC;AAE1C,MAAMC,cAA4D,GAAGC,IAAA;EAAA,IAAC;IACzEC,KAAK;IACLC;EACJ,CAAC,GAAAF,IAAA;EAAA,oBACG7B,MAAA,CAAAU,OAAA,CAAAsB,aAAA,CAACP,gBAAgB,CAACQ,QAAQ;IAACC,KAAK,EAAEJ;EAAM,GACnCC,QACsB,CAAC;AAAA,CAC/B;AAAAL,OAAA,CAAAE,cAAA,GAAAA,cAAA"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","UnistylesContext","exports","createContext","UnistylesTheme","_ref","theme","children","createElement","Provider","value"],"sourceRoot":"../../src","sources":["UnistylesTheme.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA4C,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAc,CAAA,SAAAI,CAAA,GAAAR,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAI,CAAA,KAAAA,CAAA,CAAAX,GAAA,IAAAW,CAAA,CAAAC,GAAA,IAAAR,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAI,CAAA,IAAAV,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAgB,GAAA,CAAAnB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAOrC,MAAMY,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,gBAAG,IAAAE,oBAAa,EAAC,CAAC,CAAC,CAAC;AAE1C,MAAMC,cAA4D,GAAGC,IAAA;EAAA,IAAC;IACzEC,KAAK;IACLC;EACJ,CAAC,GAAAF,IAAA;EAAA,oBACG5B,MAAA,CAAAS,OAAA,CAAAsB,aAAA,CAACP,gBAAgB,CAACQ,QAAQ;IAACC,KAAK,EAAEJ;EAAM,GACnCC,QACsB,CAAC;AAAA,CAC/B;AAAAL,OAAA,CAAAE,cAAA,GAAAA,cAAA"}
package/package.json CHANGED
@@ -1,15 +1,14 @@
1
1
  {
2
2
  "name": "react-native-unistyles",
3
- "version": "1.0.0-rc.2",
3
+ "version": "2.0.0-alpha.1",
4
4
  "description": "Level up your React Native StyleSheet",
5
5
  "scripts": {
6
6
  "test": "jest",
7
7
  "tsc": "node_modules/typescript/bin/tsc --noEmit",
8
8
  "lint": "eslint . --ext .ts,.tsx",
9
- "clean": "del-cli lib",
10
9
  "prepare": "husky install && bob build",
11
10
  "precommit": "concurrently 'yarn tsc' 'yarn lint' 'yarn test'",
12
- "release": "release-it patch --preRelease=rc"
11
+ "release": "release-it patch --preRelease=alpha --npm.tag=next"
13
12
  },
14
13
  "main": "lib/commonjs/index",
15
14
  "module": "lib/module/index",
@@ -38,19 +37,18 @@
38
37
  "registry": "https://registry.npmjs.org/"
39
38
  },
40
39
  "devDependencies": {
41
- "@commitlint/config-conventional": "17.7.0",
42
- "@react-native/eslint-config": "0.73.1",
43
- "@release-it/conventional-changelog": "5.1.1",
40
+ "@commitlint/config-conventional": "17.8.0",
41
+ "@react-native/eslint-config": "0.74.0",
42
+ "@release-it/conventional-changelog": "7.0.2",
44
43
  "@testing-library/react-hooks": "8.0.1",
45
- "@types/jest": "29.5.5",
44
+ "@types/jest": "29.5.6",
46
45
  "@types/react": "18.2.28",
47
46
  "@types/react-native": "0.72.3",
48
- "@typescript-eslint/eslint-plugin": "6.7.5",
49
- "@typescript-eslint/eslint-plugin-tslint": "6.7.5",
50
- "@typescript-eslint/parser": "6.7.5",
51
- "commitlint": "17.7.2",
47
+ "@typescript-eslint/eslint-plugin": "6.8.0",
48
+ "@typescript-eslint/eslint-plugin-tslint": "6.8.0",
49
+ "@typescript-eslint/parser": "6.8.0",
50
+ "commitlint": "17.8.0",
52
51
  "concurrently": "8.2.1",
53
- "del-cli": "5.1.0",
54
52
  "eslint": "8.51.0",
55
53
  "eslint-config-codemask": "1.1.7",
56
54
  "eslint-plugin-functional": "6.0.0",
@@ -66,7 +64,7 @@
66
64
  "husky": "8.0.3",
67
65
  "jest": "29.7.0",
68
66
  "react": "18.2.0",
69
- "react-native": "0.72.5",
67
+ "react-native": "0.72.6",
70
68
  "react-native-builder-bob": "0.23.1",
71
69
  "react-native-web": "0.19.9",
72
70
  "react-test-renderer": "18.2.0",
@@ -113,11 +111,13 @@
113
111
  "publish": true
114
112
  },
115
113
  "github": {
116
- "release": true
114
+ "release": false
117
115
  },
118
116
  "plugins": {
119
117
  "@release-it/conventional-changelog": {
120
- "preset": "angular"
118
+ "preset": {
119
+ "name": "conventionalcommits"
120
+ }
121
121
  }
122
122
  }
123
123
  },