@tamagui/helpers 1.0.0-alpha.31 → 1.0.0-alpha.38

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.
Files changed (52) hide show
  1. package/dist/.buildinfo +1 -0
  2. package/dist/concatClassName.js +43 -55
  3. package/dist/concatClassName.js.map +2 -2
  4. package/dist/getStylesAtomic.js +17 -12
  5. package/dist/getStylesAtomic.js.map +2 -2
  6. package/dist/index.cjs +226 -90
  7. package/dist/index.cjs.map +3 -3
  8. package/dist/index.js +3 -1
  9. package/dist/index.js.map +2 -2
  10. package/dist/validStyleProps.js +11 -23
  11. package/dist/validStyleProps.js.map +2 -2
  12. package/package.json +3 -3
  13. package/dist/allRules.js +0 -9
  14. package/dist/allRules.js.map +0 -7
  15. package/dist/cjs/allRules.js +0 -15
  16. package/dist/cjs/allRules.js.map +0 -7
  17. package/dist/cjs/concatClassName.js +0 -78
  18. package/dist/cjs/concatClassName.js.map +0 -7
  19. package/dist/cjs/index.js +0 -24
  20. package/dist/cjs/index.js.map +0 -7
  21. package/dist/cjs/simpleHash.js +0 -21
  22. package/dist/cjs/simpleHash.js.map +0 -7
  23. package/dist/cjs/types.js +0 -4
  24. package/dist/cjs/types.js.map +0 -7
  25. package/dist/cjs/validStyleProps.js +0 -163
  26. package/dist/cjs/validStyleProps.js.map +0 -7
  27. package/dist/esm/allRules.js +0 -9
  28. package/dist/esm/allRules.js.map +0 -7
  29. package/dist/esm/concatClassName.js +0 -72
  30. package/dist/esm/concatClassName.js.map +0 -7
  31. package/dist/esm/index.js +0 -5
  32. package/dist/esm/index.js.map +0 -7
  33. package/dist/esm/simpleHash.js +0 -15
  34. package/dist/esm/simpleHash.js.map +0 -7
  35. package/dist/esm/types.js +0 -1
  36. package/dist/esm/types.js.map +0 -7
  37. package/dist/esm/validStyleProps.js +0 -150
  38. package/dist/esm/validStyleProps.js.map +0 -7
  39. package/dist/getStylesAtomic.native.js +0 -11
  40. package/dist/getStylesAtomic.native.js.map +0 -7
  41. package/dist/jsx/allRules.js +0 -8
  42. package/dist/jsx/concatClassName.js +0 -71
  43. package/dist/jsx/index.js +0 -4
  44. package/dist/jsx/simpleHash.js +0 -14
  45. package/dist/jsx/types.js +0 -0
  46. package/dist/jsx/validStyleProps.js +0 -149
  47. package/types/allRules.d.ts.map +0 -1
  48. package/types/concatClassName.d.ts.map +0 -1
  49. package/types/index.d.ts.map +0 -1
  50. package/types/simpleHash.d.ts.map +0 -1
  51. package/types/types.d.ts.map +0 -1
  52. package/types/validStyleProps.d.ts.map +0 -1
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/allRules.ts"],
4
- "sourcesContent": ["// ssr only\n\nexport const AllRules = new Set()\n\nexport const getStyleRules = () => AllRules\n"],
5
- "mappings": ";;AAEO,MAAM,WAAW,IAAI;AAErB,MAAM,gBAAgB,6BAAM,UAAN;",
6
- "names": []
7
- }
@@ -1,72 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- function concatClassName(_cn) {
4
- const classNamesOrPropObjects = arguments;
5
- const usedPrefixes = [];
6
- let final = "";
7
- const len = classNamesOrPropObjects.length;
8
- let propObjects = null;
9
- for (let x = len; x >= 0; x--) {
10
- const cns = classNamesOrPropObjects[x];
11
- if (!cns)
12
- continue;
13
- if (!Array.isArray(cns) && typeof cns !== "string") {
14
- propObjects = propObjects || [];
15
- propObjects.push(cns);
16
- continue;
17
- }
18
- const names = Array.isArray(cns) ? cns : cns.split(" ");
19
- const numNames = names.length;
20
- for (let i = numNames - 1; i >= 0; i--) {
21
- const name = names[i];
22
- if (!name || name === " ")
23
- continue;
24
- if (name[0] !== "_") {
25
- final = name + " " + final;
26
- continue;
27
- }
28
- const splitIndex = name.indexOf("-");
29
- if (splitIndex < 1) {
30
- final = name + " " + final;
31
- continue;
32
- }
33
- const nextChar = name[splitIndex + 1];
34
- const isMediaQuery = nextChar === "_";
35
- const isPsuedoQuery = nextChar === "-";
36
- const styleKey = name.slice(1, splitIndex);
37
- const mediaKey = isMediaQuery || isPsuedoQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null;
38
- const uid = mediaKey ? styleKey + mediaKey : styleKey;
39
- if (!isMediaQuery && !isPsuedoQuery) {
40
- if (usedPrefixes.indexOf(uid) > -1) {
41
- continue;
42
- }
43
- usedPrefixes.push(uid);
44
- }
45
- const propName = styleKey;
46
- if (propName && propObjects) {
47
- if (propObjects.some((po) => {
48
- if (mediaKey) {
49
- const propKey = pseudoInvert[mediaKey];
50
- return po && po[propKey] && propName in po[propKey] && po[propKey] !== null;
51
- }
52
- const res = po && propName in po && po[propName] !== null;
53
- return res;
54
- })) {
55
- continue;
56
- }
57
- }
58
- final = name + " " + final;
59
- }
60
- }
61
- return final;
62
- }
63
- __name(concatClassName, "concatClassName");
64
- const pseudoInvert = {
65
- hover: "hoverStyle",
66
- focus: "focusStyle",
67
- press: "pressStyle"
68
- };
69
- export {
70
- concatClassName
71
- };
72
- //# sourceMappingURL=concatClassName.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/concatClassName.ts"],
4
- "sourcesContent": ["// perf sensitive so doing some weird stuff\n\n// testing caching\n// because we can hit these recent ones a ton of times in common cases\n// we're caching the simple case, this shouldn't be bad on memory either\n// const recently = new Map()\n// setInterval(() => {\n// recently.clear()\n// }, 1000)\n\nexport function concatClassName(_cn: any) {\n // if (arguments.length === 1) {\n // if (recently.has(arguments[0])) {\n // return recently.get(arguments[0])\n // }\n // }\n\n const classNamesOrPropObjects = arguments\n const usedPrefixes: string[] = []\n let final = ''\n\n const len = classNamesOrPropObjects.length\n let propObjects: any = null\n for (let x = len; x >= 0; x--) {\n const cns = classNamesOrPropObjects[x]\n if (!cns) continue\n if (!Array.isArray(cns) && typeof cns !== 'string') {\n // is prop object\n propObjects = propObjects || []\n propObjects.push(cns)\n continue\n }\n const names = Array.isArray(cns) ? cns : cns.split(' ')\n\n const numNames = names.length\n for (let i = numNames - 1; i >= 0; i--) {\n const name = names[i]\n if (!name || name === ' ') continue\n if (name[0] !== '_') {\n // not snack style (todo slightly stronger heuristic)\n final = name + ' ' + final\n continue\n }\n const splitIndex = name.indexOf('-')\n\n if (splitIndex < 1) {\n final = name + ' ' + final\n continue\n }\n const nextChar = name[splitIndex + 1]\n // synced to static-ui constants\n // MEDIA_SEP\n const isMediaQuery = nextChar === '_'\n // PSEUDO_SEP\n const isPsuedoQuery = nextChar === '-'\n\n const styleKey = name.slice(1, splitIndex)\n const mediaKey =\n isMediaQuery || isPsuedoQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null\n const uid = mediaKey ? styleKey + mediaKey : styleKey\n\n if (!isMediaQuery && !isPsuedoQuery) {\n if (usedPrefixes.indexOf(uid) > -1) {\n continue\n }\n usedPrefixes.push(uid)\n }\n\n // overrides for full safety\n const propName = styleKey\n if (propName && propObjects) {\n if (\n propObjects.some((po) => {\n if (mediaKey) {\n const propKey = pseudoInvert[mediaKey]\n return po && po[propKey] && propName in po[propKey] && po[propKey] !== null\n }\n const res = po && propName in po && po[propName] !== null\n return res\n })\n ) {\n continue\n }\n }\n\n final = name + ' ' + final\n }\n }\n\n // if (arguments.length === 1) {\n // recently.set(arguments[0], final)\n // }\n\n return final\n}\n\nconst pseudoInvert = {\n hover: 'hoverStyle',\n focus: 'focusStyle',\n press: 'pressStyle',\n}\n"],
5
- "mappings": ";;AAUO,yBAAyB,KAAU;AAOxC,QAAM,0BAA0B;AAChC,QAAM,eAAyB;AAC/B,MAAI,QAAQ;AAEZ,QAAM,MAAM,wBAAwB;AACpC,MAAI,cAAmB;AACvB,WAAS,IAAI,KAAK,KAAK,GAAG,KAAK;AAC7B,UAAM,MAAM,wBAAwB;AACpC,QAAI,CAAC;AAAK;AACV,QAAI,CAAC,MAAM,QAAQ,QAAQ,OAAO,QAAQ,UAAU;AAElD,oBAAc,eAAe;AAC7B,kBAAY,KAAK;AACjB;AAAA;AAEF,UAAM,QAAQ,MAAM,QAAQ,OAAO,MAAM,IAAI,MAAM;AAEnD,UAAM,WAAW,MAAM;AACvB,aAAS,IAAI,WAAW,GAAG,KAAK,GAAG,KAAK;AACtC,YAAM,OAAO,MAAM;AACnB,UAAI,CAAC,QAAQ,SAAS;AAAK;AAC3B,UAAI,KAAK,OAAO,KAAK;AAEnB,gBAAQ,OAAO,MAAM;AACrB;AAAA;AAEF,YAAM,aAAa,KAAK,QAAQ;AAEhC,UAAI,aAAa,GAAG;AAClB,gBAAQ,OAAO,MAAM;AACrB;AAAA;AAEF,YAAM,WAAW,KAAK,aAAa;AAGnC,YAAM,eAAe,aAAa;AAElC,YAAM,gBAAgB,aAAa;AAEnC,YAAM,WAAW,KAAK,MAAM,GAAG;AAC/B,YAAM,WACJ,gBAAgB,gBAAgB,KAAK,MAAM,aAAa,GAAG,aAAa,KAAK;AAC/E,YAAM,MAAM,WAAW,WAAW,WAAW;AAE7C,UAAI,CAAC,gBAAgB,CAAC,eAAe;AACnC,YAAI,aAAa,QAAQ,OAAO,IAAI;AAClC;AAAA;AAEF,qBAAa,KAAK;AAAA;AAIpB,YAAM,WAAW;AACjB,UAAI,YAAY,aAAa;AAC3B,YACE,YAAY,KAAK,CAAC,OAAO;AACvB,cAAI,UAAU;AACZ,kBAAM,UAAU,aAAa;AAC7B,mBAAO,MAAM,GAAG,YAAY,YAAY,GAAG,YAAY,GAAG,aAAa;AAAA;AAEzE,gBAAM,MAAM,MAAM,YAAY,MAAM,GAAG,cAAc;AACrD,iBAAO;AAAA,YAET;AACA;AAAA;AAAA;AAIJ,cAAQ,OAAO,MAAM;AAAA;AAAA;AAQzB,SAAO;AAAA;AAnFO;AAsFhB,MAAM,eAAe;AAAA,EACnB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA;",
6
- "names": []
7
- }
package/dist/esm/index.js DELETED
@@ -1,5 +0,0 @@
1
- export * from "./concatClassName";
2
- export * from "./validStyleProps";
3
- export * from "./types";
4
- export * from "./allRules";
5
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "sourcesContent": ["export * from './concatClassName'\nexport * from './validStyleProps'\nexport * from './types'\nexport * from './allRules'\n"],
5
- "mappings": "AAAA;AACA;AACA;AACA;",
6
- "names": []
7
- }
@@ -1,15 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- const simpleHash = /* @__PURE__ */ __name((str) => {
4
- let hash = 0;
5
- for (let i = 0; i < str.length; i++) {
6
- const char = str.charCodeAt(i);
7
- hash = (hash << 5) - hash + char;
8
- hash &= hash;
9
- }
10
- return new Uint32Array([hash])[0].toString(36);
11
- }, "simpleHash");
12
- export {
13
- simpleHash
14
- };
15
- //# sourceMappingURL=simpleHash.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/simpleHash.ts"],
4
- "sourcesContent": ["export const simpleHash = (str: string) => {\n let hash = 0\n for (let i = 0; i < str.length; i++) {\n const char = str.charCodeAt(i)\n hash = (hash << 5) - hash + char\n hash &= hash // Convert to 32bit integer\n }\n return new Uint32Array([hash])[0].toString(36)\n}\n"],
5
- "mappings": ";;AAAO,MAAM,aAAa,wBAAC,QAAgB;AACzC,MAAI,OAAO;AACX,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,UAAM,OAAO,IAAI,WAAW;AAC5B,WAAQ,SAAQ,KAAK,OAAO;AAC5B,YAAQ;AAAA;AAEV,SAAO,IAAI,YAAY,CAAC,OAAO,GAAG,SAAS;AAAA,GAPnB;",
6
- "names": []
7
- }
package/dist/esm/types.js DELETED
@@ -1 +0,0 @@
1
- //# sourceMappingURL=types.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
7
- }
@@ -1,150 +0,0 @@
1
- const stylePropsTransform = Object.freeze({
2
- x: true,
3
- y: true,
4
- scale: true,
5
- perspective: true,
6
- scaleX: true,
7
- scaleY: true,
8
- skewX: true,
9
- skewY: true,
10
- matrix: true,
11
- rotate: true,
12
- rotateY: true,
13
- rotateX: true,
14
- rotateZ: true
15
- });
16
- const stylePropsView = Object.freeze({
17
- backfaceVisibility: true,
18
- backgroundColor: true,
19
- borderBottomColor: true,
20
- borderBottomEndRadius: true,
21
- borderBottomLeftRadius: true,
22
- borderBottomRightRadius: true,
23
- borderBottomStartRadius: true,
24
- borderBottomWidth: true,
25
- borderColor: true,
26
- borderEndColor: true,
27
- borderLeftColor: true,
28
- borderLeftWidth: true,
29
- borderRadius: true,
30
- borderRightColor: true,
31
- borderRightWidth: true,
32
- borderStartColor: true,
33
- borderStyle: true,
34
- borderTopColor: true,
35
- borderTopEndRadius: true,
36
- borderTopLeftRadius: true,
37
- borderTopRightRadius: true,
38
- borderTopStartRadius: true,
39
- borderTopWidth: true,
40
- borderWidth: true,
41
- opacity: true,
42
- transform: true,
43
- alignContent: true,
44
- alignItems: true,
45
- alignSelf: true,
46
- aspectRatio: true,
47
- borderEndWidth: true,
48
- borderStartWidth: true,
49
- bottom: true,
50
- display: true,
51
- end: true,
52
- flex: true,
53
- flexBasis: true,
54
- flexDirection: true,
55
- flexGrow: true,
56
- flexShrink: true,
57
- flexWrap: true,
58
- height: true,
59
- justifyContent: true,
60
- left: true,
61
- margin: true,
62
- marginBottom: true,
63
- marginEnd: true,
64
- marginHorizontal: true,
65
- marginLeft: true,
66
- marginRight: true,
67
- marginStart: true,
68
- marginTop: true,
69
- marginVertical: true,
70
- maxHeight: true,
71
- maxWidth: true,
72
- minHeight: true,
73
- minWidth: true,
74
- overflow: true,
75
- padding: true,
76
- paddingBottom: true,
77
- paddingEnd: true,
78
- paddingHorizontal: true,
79
- paddingLeft: true,
80
- paddingRight: true,
81
- paddingStart: true,
82
- paddingTop: true,
83
- paddingVertical: true,
84
- position: true,
85
- right: true,
86
- start: true,
87
- top: true,
88
- width: true,
89
- zIndex: true,
90
- direction: true,
91
- shadowColor: true,
92
- shadowOffset: true,
93
- shadowOpacity: true,
94
- shadowRadius: true,
95
- ...stylePropsTransform,
96
- ...process.env.TAMAGUI_TARGET === "web" && {
97
- userSelect: true,
98
- cursor: true,
99
- contain: true,
100
- pointerEvents: true,
101
- boxSizing: true
102
- }
103
- });
104
- const stylePropsTextOnly = Object.freeze({
105
- color: true,
106
- fontFamily: true,
107
- fontSize: true,
108
- fontStyle: true,
109
- fontWeight: true,
110
- letterSpacing: true,
111
- lineHeight: true,
112
- textAlign: true,
113
- textDecorationLine: true,
114
- textDecorationStyle: true,
115
- textDecorationColor: true,
116
- textShadowColor: true,
117
- textShadowOffset: true,
118
- textShadowRadius: true,
119
- textTransform: true,
120
- ...process.env.TAMAGUI_TARGET === "web" && {
121
- whiteSpace: true,
122
- wordWrap: true,
123
- textOverflow: true,
124
- textDecorationDistance: true
125
- }
126
- });
127
- const stylePropsText = Object.freeze({
128
- ...stylePropsView,
129
- ...stylePropsTextOnly
130
- });
131
- const stylePropsAll = stylePropsText;
132
- const validStylesPseudo = Object.freeze({
133
- hoverStyle: true,
134
- pressStyle: true,
135
- focusStyle: true
136
- });
137
- const validStyles = Object.freeze({
138
- ...validStylesPseudo,
139
- ...stylePropsView
140
- });
141
- export {
142
- stylePropsAll,
143
- stylePropsText,
144
- stylePropsTextOnly,
145
- stylePropsTransform,
146
- stylePropsView,
147
- validStyles,
148
- validStylesPseudo
149
- };
150
- //# sourceMappingURL=validStyleProps.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/validStyleProps.ts"],
4
- "sourcesContent": ["// flat transform props\nexport const stylePropsTransform = Object.freeze({\n x: true,\n y: true,\n scale: true,\n perspective: true,\n scaleX: true,\n scaleY: true,\n skewX: true,\n skewY: true,\n matrix: true,\n rotate: true,\n rotateY: true,\n rotateX: true,\n rotateZ: true,\n})\n\nexport const stylePropsView = Object.freeze({\n backfaceVisibility: true,\n backgroundColor: true,\n borderBottomColor: true,\n borderBottomEndRadius: true,\n borderBottomLeftRadius: true,\n borderBottomRightRadius: true,\n borderBottomStartRadius: true,\n borderBottomWidth: true,\n borderColor: true,\n borderEndColor: true,\n borderLeftColor: true,\n borderLeftWidth: true,\n borderRadius: true,\n borderRightColor: true,\n borderRightWidth: true,\n borderStartColor: true,\n borderStyle: true,\n borderTopColor: true,\n borderTopEndRadius: true,\n borderTopLeftRadius: true,\n borderTopRightRadius: true,\n borderTopStartRadius: true,\n borderTopWidth: true,\n borderWidth: true,\n opacity: true,\n transform: true,\n alignContent: true,\n alignItems: true,\n alignSelf: true,\n aspectRatio: true,\n borderEndWidth: true,\n borderStartWidth: true,\n bottom: true,\n display: true,\n end: true,\n flex: true,\n flexBasis: true,\n flexDirection: true,\n flexGrow: true,\n flexShrink: true,\n flexWrap: true,\n height: true,\n justifyContent: true,\n left: true,\n margin: true,\n marginBottom: true,\n marginEnd: true,\n marginHorizontal: true,\n marginLeft: true,\n marginRight: true,\n marginStart: true,\n marginTop: true,\n marginVertical: true,\n maxHeight: true,\n maxWidth: true,\n minHeight: true,\n minWidth: true,\n overflow: true,\n padding: true,\n paddingBottom: true,\n paddingEnd: true,\n paddingHorizontal: true,\n paddingLeft: true,\n paddingRight: true,\n paddingStart: true,\n paddingTop: true,\n paddingVertical: true,\n position: true,\n right: true,\n start: true,\n top: true,\n width: true,\n zIndex: true,\n direction: true,\n shadowColor: true,\n shadowOffset: true,\n shadowOpacity: true,\n shadowRadius: true,\n ...stylePropsTransform,\n\n // allow a few web only ones\n ...(process.env.TAMAGUI_TARGET === 'web' && {\n userSelect: true,\n cursor: true,\n contain: true,\n pointerEvents: true,\n boxSizing: true,\n }),\n})\n\nexport const stylePropsTextOnly = Object.freeze({\n color: true,\n fontFamily: true,\n fontSize: true,\n fontStyle: true,\n fontWeight: true,\n letterSpacing: true,\n lineHeight: true,\n textAlign: true,\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationColor: true,\n textShadowColor: true,\n textShadowOffset: true,\n textShadowRadius: true,\n textTransform: true,\n\n // allow a few web only ones\n // TODO\n ...(process.env.TAMAGUI_TARGET === 'web' && {\n whiteSpace: true,\n wordWrap: true,\n textOverflow: true,\n textDecorationDistance: true,\n }),\n})\n\nexport const stylePropsText = Object.freeze({\n ...stylePropsView,\n ...stylePropsTextOnly,\n})\n\nexport const stylePropsAll = stylePropsText\n\nexport const validStylesPseudo = Object.freeze({\n hoverStyle: true,\n pressStyle: true,\n focusStyle: true,\n})\n\nexport const validStyles = Object.freeze({\n ...validStylesPseudo,\n ...stylePropsView,\n})\n"],
5
- "mappings": "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",
6
- "names": []
7
- }
@@ -1,11 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- console.log("is this importing");
4
- function getStylesAtomic() {
5
- console.warn("no-op native");
6
- }
7
- __name(getStylesAtomic, "getStylesAtomic");
8
- export {
9
- getStylesAtomic
10
- };
11
- //# sourceMappingURL=getStylesAtomic.native.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/getStylesAtomic.native.ts"],
4
- "sourcesContent": ["console.log('is this importing')\n\nexport function getStylesAtomic() {\n console.warn('no-op native')\n}\n"],
5
- "mappings": ";;AAAA,QAAQ,IAAI;AAEL,2BAA2B;AAChC,UAAQ,KAAK;AAAA;AADC;",
6
- "names": []
7
- }
@@ -1,8 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- const AllRules = new Set();
4
- const getStyleRules = /* @__PURE__ */ __name(() => AllRules, "getStyleRules");
5
- export {
6
- AllRules,
7
- getStyleRules
8
- };
@@ -1,71 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- function concatClassName(_cn) {
4
- const classNamesOrPropObjects = arguments;
5
- const usedPrefixes = [];
6
- let final = "";
7
- const len = classNamesOrPropObjects.length;
8
- let propObjects = null;
9
- for (let x = len; x >= 0; x--) {
10
- const cns = classNamesOrPropObjects[x];
11
- if (!cns)
12
- continue;
13
- if (!Array.isArray(cns) && typeof cns !== "string") {
14
- propObjects = propObjects || [];
15
- propObjects.push(cns);
16
- continue;
17
- }
18
- const names = Array.isArray(cns) ? cns : cns.split(" ");
19
- const numNames = names.length;
20
- for (let i = numNames - 1; i >= 0; i--) {
21
- const name = names[i];
22
- if (!name || name === " ")
23
- continue;
24
- if (name[0] !== "_") {
25
- final = name + " " + final;
26
- continue;
27
- }
28
- const splitIndex = name.indexOf("-");
29
- if (splitIndex < 1) {
30
- final = name + " " + final;
31
- continue;
32
- }
33
- const nextChar = name[splitIndex + 1];
34
- const isMediaQuery = nextChar === "_";
35
- const isPsuedoQuery = nextChar === "-";
36
- const styleKey = name.slice(1, splitIndex);
37
- const mediaKey = isMediaQuery || isPsuedoQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null;
38
- const uid = mediaKey ? styleKey + mediaKey : styleKey;
39
- if (!isMediaQuery && !isPsuedoQuery) {
40
- if (usedPrefixes.indexOf(uid) > -1) {
41
- continue;
42
- }
43
- usedPrefixes.push(uid);
44
- }
45
- const propName = styleKey;
46
- if (propName && propObjects) {
47
- if (propObjects.some((po) => {
48
- if (mediaKey) {
49
- const propKey = pseudoInvert[mediaKey];
50
- return po && po[propKey] && propName in po[propKey] && po[propKey] !== null;
51
- }
52
- const res = po && propName in po && po[propName] !== null;
53
- return res;
54
- })) {
55
- continue;
56
- }
57
- }
58
- final = name + " " + final;
59
- }
60
- }
61
- return final;
62
- }
63
- __name(concatClassName, "concatClassName");
64
- const pseudoInvert = {
65
- hover: "hoverStyle",
66
- focus: "focusStyle",
67
- press: "pressStyle"
68
- };
69
- export {
70
- concatClassName
71
- };
package/dist/jsx/index.js DELETED
@@ -1,4 +0,0 @@
1
- export * from "./concatClassName";
2
- export * from "./validStyleProps";
3
- export * from "./types";
4
- export * from "./allRules";
@@ -1,14 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- const simpleHash = /* @__PURE__ */ __name((str) => {
4
- let hash = 0;
5
- for (let i = 0; i < str.length; i++) {
6
- const char = str.charCodeAt(i);
7
- hash = (hash << 5) - hash + char;
8
- hash &= hash;
9
- }
10
- return new Uint32Array([hash])[0].toString(36);
11
- }, "simpleHash");
12
- export {
13
- simpleHash
14
- };
package/dist/jsx/types.js DELETED
File without changes
@@ -1,149 +0,0 @@
1
- const stylePropsTransform = Object.freeze({
2
- x: true,
3
- y: true,
4
- scale: true,
5
- perspective: true,
6
- scaleX: true,
7
- scaleY: true,
8
- skewX: true,
9
- skewY: true,
10
- matrix: true,
11
- rotate: true,
12
- rotateY: true,
13
- rotateX: true,
14
- rotateZ: true
15
- });
16
- const stylePropsView = Object.freeze({
17
- backfaceVisibility: true,
18
- backgroundColor: true,
19
- borderBottomColor: true,
20
- borderBottomEndRadius: true,
21
- borderBottomLeftRadius: true,
22
- borderBottomRightRadius: true,
23
- borderBottomStartRadius: true,
24
- borderBottomWidth: true,
25
- borderColor: true,
26
- borderEndColor: true,
27
- borderLeftColor: true,
28
- borderLeftWidth: true,
29
- borderRadius: true,
30
- borderRightColor: true,
31
- borderRightWidth: true,
32
- borderStartColor: true,
33
- borderStyle: true,
34
- borderTopColor: true,
35
- borderTopEndRadius: true,
36
- borderTopLeftRadius: true,
37
- borderTopRightRadius: true,
38
- borderTopStartRadius: true,
39
- borderTopWidth: true,
40
- borderWidth: true,
41
- opacity: true,
42
- transform: true,
43
- alignContent: true,
44
- alignItems: true,
45
- alignSelf: true,
46
- aspectRatio: true,
47
- borderEndWidth: true,
48
- borderStartWidth: true,
49
- bottom: true,
50
- display: true,
51
- end: true,
52
- flex: true,
53
- flexBasis: true,
54
- flexDirection: true,
55
- flexGrow: true,
56
- flexShrink: true,
57
- flexWrap: true,
58
- height: true,
59
- justifyContent: true,
60
- left: true,
61
- margin: true,
62
- marginBottom: true,
63
- marginEnd: true,
64
- marginHorizontal: true,
65
- marginLeft: true,
66
- marginRight: true,
67
- marginStart: true,
68
- marginTop: true,
69
- marginVertical: true,
70
- maxHeight: true,
71
- maxWidth: true,
72
- minHeight: true,
73
- minWidth: true,
74
- overflow: true,
75
- padding: true,
76
- paddingBottom: true,
77
- paddingEnd: true,
78
- paddingHorizontal: true,
79
- paddingLeft: true,
80
- paddingRight: true,
81
- paddingStart: true,
82
- paddingTop: true,
83
- paddingVertical: true,
84
- position: true,
85
- right: true,
86
- start: true,
87
- top: true,
88
- width: true,
89
- zIndex: true,
90
- direction: true,
91
- shadowColor: true,
92
- shadowOffset: true,
93
- shadowOpacity: true,
94
- shadowRadius: true,
95
- ...stylePropsTransform,
96
- ...process.env.TAMAGUI_TARGET === "web" && {
97
- userSelect: true,
98
- cursor: true,
99
- contain: true,
100
- pointerEvents: true,
101
- boxSizing: true
102
- }
103
- });
104
- const stylePropsTextOnly = Object.freeze({
105
- color: true,
106
- fontFamily: true,
107
- fontSize: true,
108
- fontStyle: true,
109
- fontWeight: true,
110
- letterSpacing: true,
111
- lineHeight: true,
112
- textAlign: true,
113
- textDecorationLine: true,
114
- textDecorationStyle: true,
115
- textDecorationColor: true,
116
- textShadowColor: true,
117
- textShadowOffset: true,
118
- textShadowRadius: true,
119
- textTransform: true,
120
- ...process.env.TAMAGUI_TARGET === "web" && {
121
- whiteSpace: true,
122
- wordWrap: true,
123
- textOverflow: true,
124
- textDecorationDistance: true
125
- }
126
- });
127
- const stylePropsText = Object.freeze({
128
- ...stylePropsView,
129
- ...stylePropsTextOnly
130
- });
131
- const stylePropsAll = stylePropsText;
132
- const validStylesPseudo = Object.freeze({
133
- hoverStyle: true,
134
- pressStyle: true,
135
- focusStyle: true
136
- });
137
- const validStyles = Object.freeze({
138
- ...validStylesPseudo,
139
- ...stylePropsView
140
- });
141
- export {
142
- stylePropsAll,
143
- stylePropsText,
144
- stylePropsTextOnly,
145
- stylePropsTransform,
146
- stylePropsView,
147
- validStyles,
148
- validStylesPseudo
149
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"allRules.d.ts","sourceRoot":"","sources":["../src/allRules.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,cAAY,CAAA;AAEjC,eAAO,MAAM,aAAa,oBAAiB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"concatClassName.d.ts","sourceRoot":"","sources":["../src/concatClassName.ts"],"names":[],"mappings":"AAUA,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,UAoFvC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"simpleHash.d.ts","sourceRoot":"","sources":["../src/simpleHash.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,QAAS,MAAM,WAQrC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"validStyleProps.d.ts","sourceRoot":"","sources":["../src/validStyleProps.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;EAc9B,CAAA;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyFzB,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;EAyB7B,CAAA;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGzB,CAAA;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAiB,CAAA;AAE3C,eAAO,MAAM,iBAAiB;;;;EAI5B,CAAA;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGtB,CAAA"}