react-native-twc 1.1.2 → 1.1.3
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/dist/index.js +2 -2
- package/package.json +66 -72
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ const createTwc = (config = {}) => {
|
|
|
18
18
|
const defaultShouldForwardProp = config.shouldForwardProp || ((prop) => prop[0] !== "$");
|
|
19
19
|
const wrap = (Component) => {
|
|
20
20
|
const createTemplate = (attrs, shouldForwardProp = defaultShouldForwardProp) => {
|
|
21
|
-
const componentCache =
|
|
21
|
+
const componentCache = /* @__PURE__ */ new Map();
|
|
22
22
|
const template = (stringsOrFn, ...values) => {
|
|
23
23
|
const isClassFn = typeof stringsOrFn === "function";
|
|
24
24
|
const cacheKey = isClassFn ? stringsOrFn.toString() : String.raw({ raw: stringsOrFn }, ...values);
|
|
@@ -40,7 +40,7 @@ const createTwc = (config = {}) => {
|
|
|
40
40
|
...rest
|
|
41
41
|
}, shouldForwardProp);
|
|
42
42
|
const baseClassName = isClassFn ? stringsOrFn(p) : tplClassName;
|
|
43
|
-
return
|
|
43
|
+
return /* @__PURE__ */ jsx(Component, {
|
|
44
44
|
ref,
|
|
45
45
|
className: typeof baseClassName === "function" ? (renderProps) => compose(baseClassName(renderProps), typeof classNameProp === "function" ? classNameProp(renderProps) : classNameProp) : compose(baseClassName, classNameProp),
|
|
46
46
|
...finalProps
|
package/package.json
CHANGED
|
@@ -1,76 +1,70 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"nativewind": ">=4.0.0",
|
|
66
|
-
"tailwind-merge": ">=3.3.1"
|
|
2
|
+
"name": "react-native-twc",
|
|
3
|
+
"version": "1.1.3",
|
|
4
|
+
"description": "Create reusable React Native + NativeWind components with Tailwind CSS syntax.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "bun test",
|
|
17
|
+
"build": "rm -rf dist && rolldown -c && tsc -p tsconfig.build.json",
|
|
18
|
+
"check-types": "tsc --noEmit",
|
|
19
|
+
"prepublishOnly": "bun test && bun run build"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"react-native",
|
|
23
|
+
"nativewind",
|
|
24
|
+
"tailwind",
|
|
25
|
+
"css",
|
|
26
|
+
"components",
|
|
27
|
+
"styled",
|
|
28
|
+
"styled-components",
|
|
29
|
+
"expo"
|
|
30
|
+
],
|
|
31
|
+
"author": "ldystudio",
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "git+https://github.com/ldystudio/react-native-twc.git"
|
|
36
|
+
},
|
|
37
|
+
"homepage": "https://react-twc.vercel.app",
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@biomejs/biome": "^2.3.11",
|
|
40
|
+
"@happy-dom/global-registrator": "^18.0.1",
|
|
41
|
+
"@testing-library/react": "^16.3.0",
|
|
42
|
+
"@types/bun": "^1.2.5",
|
|
43
|
+
"@types/react": "^19.1.8",
|
|
44
|
+
"class-variance-authority": "^0.7.1",
|
|
45
|
+
"happy-dom": "^18.0.1",
|
|
46
|
+
"prettier": "^3.6.2",
|
|
47
|
+
"react": "^19.1.0",
|
|
48
|
+
"react-dom": "^19.1.0",
|
|
49
|
+
"rolldown": "^1.0.0-beta.59",
|
|
50
|
+
"tailwind-merge": "^3.3.1",
|
|
51
|
+
"typescript": "^5.8.3"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"clsx": "^2.1.1"
|
|
55
|
+
},
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"react": ">=18.0.0",
|
|
58
|
+
"react-native": ">=0.72.0",
|
|
59
|
+
"nativewind": ">=4.0.0",
|
|
60
|
+
"tailwind-merge": ">=3.3.1"
|
|
61
|
+
},
|
|
62
|
+
"peerDependenciesMeta": {
|
|
63
|
+
"react-native": {
|
|
64
|
+
"optional": true
|
|
67
65
|
},
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
"optional": true
|
|
71
|
-
},
|
|
72
|
-
"nativewind": {
|
|
73
|
-
"optional": true
|
|
74
|
-
}
|
|
66
|
+
"nativewind": {
|
|
67
|
+
"optional": true
|
|
75
68
|
}
|
|
69
|
+
}
|
|
76
70
|
}
|