@tamagui/helpers 1.0.0-alpha.37 → 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.
- package/dist/.buildinfo +1 -0
- package/dist/concatClassName.js +60 -0
- package/dist/concatClassName.js.map +7 -0
- package/dist/getNiceKey.js +16 -0
- package/dist/getNiceKey.js.map +7 -0
- package/dist/getStylesAtomic.js +101 -0
- package/dist/getStylesAtomic.js.map +7 -0
- package/dist/index.cjs +379 -0
- package/dist/index.cjs.map +7 -0
- package/dist/{esm/index.js → index.js} +3 -1
- package/dist/index.js.map +7 -0
- package/dist/{esm/simpleHash.js → simpleHash.js} +0 -0
- package/dist/{esm/simpleHash.js.map → simpleHash.js.map} +1 -1
- package/dist/{esm/types.js → types.js} +0 -0
- package/dist/{esm/types.js.map → types.js.map} +0 -0
- package/dist/uniqueStyleKeys.js +33 -0
- package/dist/uniqueStyleKeys.js.map +7 -0
- package/dist/{esm/validStyleProps.js → validStyleProps.js} +14 -26
- package/dist/validStyleProps.js.map +7 -0
- package/package.json +3 -3
- package/dist/cjs/allRules.js +0 -15
- package/dist/cjs/allRules.js.map +0 -7
- package/dist/cjs/concatClassName.js +0 -78
- package/dist/cjs/concatClassName.js.map +0 -7
- package/dist/cjs/index.js +0 -24
- package/dist/cjs/index.js.map +0 -7
- package/dist/cjs/simpleHash.js +0 -21
- package/dist/cjs/simpleHash.js.map +0 -7
- package/dist/cjs/types.js +0 -4
- package/dist/cjs/types.js.map +0 -7
- package/dist/cjs/validStyleProps.js +0 -163
- package/dist/cjs/validStyleProps.js.map +0 -7
- package/dist/esm/allRules.js +0 -9
- package/dist/esm/allRules.js.map +0 -7
- package/dist/esm/concatClassName.js +0 -72
- package/dist/esm/concatClassName.js.map +0 -7
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/validStyleProps.js.map +0 -7
- package/dist/jsx/allRules.js +0 -8
- package/dist/jsx/concatClassName.js +0 -71
- package/dist/jsx/index.js +0 -4
- package/dist/jsx/simpleHash.js +0 -14
- package/dist/jsx/types.js +0 -0
- package/dist/jsx/validStyleProps.js +0 -149
- package/types/allRules.d.ts.map +0 -1
- package/types/concatClassName.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
- package/types/simpleHash.d.ts.map +0 -1
- package/types/types.d.ts.map +0 -1
- package/types/validStyleProps.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../src/simpleHash.ts"],
|
|
4
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
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
6
|
"names": []
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { getNiceKey } from "./getNiceKey";
|
|
4
|
+
import { stylePropsAll } from "./validStyleProps";
|
|
5
|
+
const existing = new Set();
|
|
6
|
+
const uniqueStyleKeys = {};
|
|
7
|
+
const uniqueKeyToStyleName = {};
|
|
8
|
+
for (const name in stylePropsAll) {
|
|
9
|
+
addStylePrefix(name);
|
|
10
|
+
}
|
|
11
|
+
function getOrCreateStylePrefix(name) {
|
|
12
|
+
return uniqueStyleKeys[name] ?? addStylePrefix(name);
|
|
13
|
+
}
|
|
14
|
+
__name(getOrCreateStylePrefix, "getOrCreateStylePrefix");
|
|
15
|
+
function addStylePrefix(name) {
|
|
16
|
+
let len = 1;
|
|
17
|
+
let key = getNiceKey(name);
|
|
18
|
+
while (existing.has(key)) {
|
|
19
|
+
len++;
|
|
20
|
+
key = getNiceKey(name, len);
|
|
21
|
+
}
|
|
22
|
+
existing.add(key);
|
|
23
|
+
uniqueStyleKeys[name] = key;
|
|
24
|
+
uniqueKeyToStyleName[key] = name;
|
|
25
|
+
return key;
|
|
26
|
+
}
|
|
27
|
+
__name(addStylePrefix, "addStylePrefix");
|
|
28
|
+
export {
|
|
29
|
+
getOrCreateStylePrefix,
|
|
30
|
+
uniqueKeyToStyleName,
|
|
31
|
+
uniqueStyleKeys
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=uniqueStyleKeys.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/uniqueStyleKeys.ts"],
|
|
4
|
+
"sourcesContent": ["import { getNiceKey } from './getNiceKey'\nimport { stylePropsAll } from './validStyleProps'\n\nconst existing = new Set<string>()\n\n// unique shortkey for each style key\n// for atomic styles prefixing and collision dedupe\nexport const uniqueStyleKeys: { [key: string]: string } = {}\nexport const uniqueKeyToStyleName: { [key: string]: string } = {}\n\nfor (const name in stylePropsAll) {\n addStylePrefix(name)\n}\n\nexport function getOrCreateStylePrefix(name: string) {\n return uniqueStyleKeys[name] ?? addStylePrefix(name)\n}\n\nfunction addStylePrefix(name: string) {\n let len = 1\n let key = getNiceKey(name)\n while (existing.has(key)) {\n len++\n key = getNiceKey(name, len)\n }\n existing.add(key)\n uniqueStyleKeys[name] = key\n uniqueKeyToStyleName[key] = name\n return key\n}\n"],
|
|
5
|
+
"mappings": ";;AAAA;AACA;AAEA,MAAM,WAAW,IAAI;AAId,MAAM,kBAA6C;AACnD,MAAM,uBAAkD;AAE/D,WAAW,QAAQ,eAAe;AAChC,iBAAe;AAAA;AAGV,gCAAgC,MAAc;AACnD,SAAO,gBAAgB,SAAS,eAAe;AAAA;AADjC;AAIhB,wBAAwB,MAAc;AACpC,MAAI,MAAM;AACV,MAAI,MAAM,WAAW;AACrB,SAAO,SAAS,IAAI,MAAM;AACxB;AACA,UAAM,WAAW,MAAM;AAAA;AAEzB,WAAS,IAAI;AACb,kBAAgB,QAAQ;AACxB,uBAAqB,OAAO;AAC5B,SAAO;AAAA;AAVA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const stylePropsTransform =
|
|
1
|
+
const stylePropsTransform = {
|
|
2
2
|
x: true,
|
|
3
3
|
y: true,
|
|
4
|
-
scale: true,
|
|
5
4
|
perspective: true,
|
|
5
|
+
scale: true,
|
|
6
6
|
scaleX: true,
|
|
7
7
|
scaleY: true,
|
|
8
8
|
skewX: true,
|
|
@@ -12,10 +12,14 @@ const stylePropsTransform = Object.freeze({
|
|
|
12
12
|
rotateY: true,
|
|
13
13
|
rotateX: true,
|
|
14
14
|
rotateZ: true
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
16
|
const stylePropsView = Object.freeze({
|
|
17
|
+
pointerEvents: true,
|
|
18
|
+
userSelect: true,
|
|
19
|
+
cursor: true,
|
|
17
20
|
backfaceVisibility: true,
|
|
18
21
|
backgroundColor: true,
|
|
22
|
+
boxSizing: true,
|
|
19
23
|
borderBottomColor: true,
|
|
20
24
|
borderBottomEndRadius: true,
|
|
21
25
|
borderBottomLeftRadius: true,
|
|
@@ -92,14 +96,8 @@ const stylePropsView = Object.freeze({
|
|
|
92
96
|
shadowOffset: true,
|
|
93
97
|
shadowOpacity: true,
|
|
94
98
|
shadowRadius: true,
|
|
95
|
-
|
|
96
|
-
...
|
|
97
|
-
userSelect: true,
|
|
98
|
-
cursor: true,
|
|
99
|
-
contain: true,
|
|
100
|
-
pointerEvents: true,
|
|
101
|
-
boxSizing: true
|
|
102
|
-
}
|
|
99
|
+
contain: true,
|
|
100
|
+
...stylePropsTransform
|
|
103
101
|
});
|
|
104
102
|
const stylePropsTextOnly = Object.freeze({
|
|
105
103
|
color: true,
|
|
@@ -116,35 +114,25 @@ const stylePropsTextOnly = Object.freeze({
|
|
|
116
114
|
textShadowColor: true,
|
|
117
115
|
textShadowOffset: true,
|
|
118
116
|
textShadowRadius: true,
|
|
119
|
-
textTransform: true
|
|
120
|
-
...process.env.TAMAGUI_TARGET === "web" && {
|
|
121
|
-
whiteSpace: true,
|
|
122
|
-
wordWrap: true,
|
|
123
|
-
textOverflow: true,
|
|
124
|
-
textDecorationDistance: true
|
|
125
|
-
}
|
|
117
|
+
textTransform: true
|
|
126
118
|
});
|
|
127
119
|
const stylePropsText = Object.freeze({
|
|
128
120
|
...stylePropsView,
|
|
129
121
|
...stylePropsTextOnly
|
|
130
122
|
});
|
|
131
123
|
const stylePropsAll = stylePropsText;
|
|
132
|
-
const
|
|
124
|
+
const validStyles = {
|
|
133
125
|
hoverStyle: true,
|
|
134
126
|
pressStyle: true,
|
|
135
|
-
focusStyle: true
|
|
136
|
-
});
|
|
137
|
-
const validStyles = Object.freeze({
|
|
138
|
-
...validStylesPseudo,
|
|
127
|
+
focusStyle: true,
|
|
139
128
|
...stylePropsView
|
|
140
|
-
}
|
|
129
|
+
};
|
|
141
130
|
export {
|
|
142
131
|
stylePropsAll,
|
|
143
132
|
stylePropsText,
|
|
144
133
|
stylePropsTextOnly,
|
|
145
134
|
stylePropsTransform,
|
|
146
135
|
stylePropsView,
|
|
147
|
-
validStyles
|
|
148
|
-
validStylesPseudo
|
|
136
|
+
validStyles
|
|
149
137
|
};
|
|
150
138
|
//# sourceMappingURL=validStyleProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/validStyleProps.ts"],
|
|
4
|
+
"sourcesContent": ["// flat transform props\nexport const stylePropsTransform = {\n x: true,\n y: true,\n perspective: true,\n scale: 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 pointerEvents: true,\n userSelect: true,\n cursor: true,\n backfaceVisibility: true,\n backgroundColor: true,\n boxSizing: 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 contain: true,\n ...stylePropsTransform,\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\nexport const stylePropsText = Object.freeze({\n ...stylePropsView,\n ...stylePropsTextOnly,\n})\n\nexport const stylePropsAll = stylePropsText\n\nexport const validStyles = {\n hoverStyle: true,\n pressStyle: true,\n focusStyle: true,\n ...stylePropsView,\n}\n"],
|
|
5
|
+
"mappings": "AACO,MAAM,sBAAsB;AAAA,EACjC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,aAAa;AAAA,EACb,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA;AAGJ,MAAM,iBAAiB,OAAO,OAAO;AAAA,EAC1C,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,oBAAoB;AAAA,EACpB,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,yBAAyB;AAAA,EACzB,mBAAmB;AAAA,EACnB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,EACpB,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,SAAS;AAAA,EACT,WAAW;A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BAAkB;AAAA,EAClB,eAAe;AAAA;AAGV,MAAM,iBAAiB,OAAO,OAAO;AAAA,KACvC;AAAA,KACA;AAAA;AAGE,MAAM,gBAAgB;AAEtB,MAAM,cAAc;AAAA,EACzB,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,KACT;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.38",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"typings": "types",
|
|
6
6
|
"main": "dist/cjs",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"watch": "tamagui-build --watch"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@tamagui/build": "^1.0.0-alpha.
|
|
18
|
+
"@tamagui/build": "^1.0.0-alpha.38",
|
|
19
19
|
"react-native": "*"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "155f989a05a70b2a9181cf820363f170a293f78b"
|
|
28
28
|
}
|
package/dist/cjs/allRules.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
3
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
-
var __export = (target, all) => {
|
|
5
|
-
__markAsModule(target);
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
__export(exports, {
|
|
10
|
-
AllRules: () => AllRules,
|
|
11
|
-
getStyleRules: () => getStyleRules
|
|
12
|
-
});
|
|
13
|
-
const AllRules = new Set();
|
|
14
|
-
const getStyleRules = /* @__PURE__ */ __name(() => AllRules, "getStyleRules");
|
|
15
|
-
//# sourceMappingURL=allRules.js.map
|
package/dist/cjs/allRules.js.map
DELETED
|
@@ -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": ";;;;;;;;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,WAAW,IAAI;AAErB,MAAM,gBAAgB,6BAAM,UAAN;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
3
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
-
var __export = (target, all) => {
|
|
5
|
-
__markAsModule(target);
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
__export(exports, {
|
|
10
|
-
concatClassName: () => concatClassName
|
|
11
|
-
});
|
|
12
|
-
function concatClassName(_cn) {
|
|
13
|
-
const classNamesOrPropObjects = arguments;
|
|
14
|
-
const usedPrefixes = [];
|
|
15
|
-
let final = "";
|
|
16
|
-
const len = classNamesOrPropObjects.length;
|
|
17
|
-
let propObjects = null;
|
|
18
|
-
for (let x = len; x >= 0; x--) {
|
|
19
|
-
const cns = classNamesOrPropObjects[x];
|
|
20
|
-
if (!cns)
|
|
21
|
-
continue;
|
|
22
|
-
if (!Array.isArray(cns) && typeof cns !== "string") {
|
|
23
|
-
propObjects = propObjects || [];
|
|
24
|
-
propObjects.push(cns);
|
|
25
|
-
continue;
|
|
26
|
-
}
|
|
27
|
-
const names = Array.isArray(cns) ? cns : cns.split(" ");
|
|
28
|
-
const numNames = names.length;
|
|
29
|
-
for (let i = numNames - 1; i >= 0; i--) {
|
|
30
|
-
const name = names[i];
|
|
31
|
-
if (!name || name === " ")
|
|
32
|
-
continue;
|
|
33
|
-
if (name[0] !== "_") {
|
|
34
|
-
final = name + " " + final;
|
|
35
|
-
continue;
|
|
36
|
-
}
|
|
37
|
-
const splitIndex = name.indexOf("-");
|
|
38
|
-
if (splitIndex < 1) {
|
|
39
|
-
final = name + " " + final;
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
const nextChar = name[splitIndex + 1];
|
|
43
|
-
const isMediaQuery = nextChar === "_";
|
|
44
|
-
const isPsuedoQuery = nextChar === "-";
|
|
45
|
-
const styleKey = name.slice(1, splitIndex);
|
|
46
|
-
const mediaKey = isMediaQuery || isPsuedoQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null;
|
|
47
|
-
const uid = mediaKey ? styleKey + mediaKey : styleKey;
|
|
48
|
-
if (!isMediaQuery && !isPsuedoQuery) {
|
|
49
|
-
if (usedPrefixes.indexOf(uid) > -1) {
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
usedPrefixes.push(uid);
|
|
53
|
-
}
|
|
54
|
-
const propName = styleKey;
|
|
55
|
-
if (propName && propObjects) {
|
|
56
|
-
if (propObjects.some((po) => {
|
|
57
|
-
if (mediaKey) {
|
|
58
|
-
const propKey = pseudoInvert[mediaKey];
|
|
59
|
-
return po && po[propKey] && propName in po[propKey] && po[propKey] !== null;
|
|
60
|
-
}
|
|
61
|
-
const res = po && propName in po && po[propName] !== null;
|
|
62
|
-
return res;
|
|
63
|
-
})) {
|
|
64
|
-
continue;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
final = name + " " + final;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return final;
|
|
71
|
-
}
|
|
72
|
-
__name(concatClassName, "concatClassName");
|
|
73
|
-
const pseudoInvert = {
|
|
74
|
-
hover: "hoverStyle",
|
|
75
|
-
focus: "focusStyle",
|
|
76
|
-
press: "pressStyle"
|
|
77
|
-
};
|
|
78
|
-
//# 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": ";;;;;;;;AAAA;AAAA;AAAA;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/cjs/index.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __reExport = (target, module2, desc) => {
|
|
9
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
10
|
-
for (let key of __getOwnPropNames(module2))
|
|
11
|
-
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
12
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
13
|
-
}
|
|
14
|
-
return target;
|
|
15
|
-
};
|
|
16
|
-
var __toModule = (module2) => {
|
|
17
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
18
|
-
};
|
|
19
|
-
__markAsModule(exports);
|
|
20
|
-
__reExport(exports, __toModule(require("./concatClassName")));
|
|
21
|
-
__reExport(exports, __toModule(require("./validStyleProps")));
|
|
22
|
-
__reExport(exports, __toModule(require("./types")));
|
|
23
|
-
__reExport(exports, __toModule(require("./allRules")));
|
|
24
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
DELETED
|
@@ -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;AAAA,oBAAc;AACd,oBAAc;AACd,oBAAc;AACd,oBAAc;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/cjs/simpleHash.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
3
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
-
var __export = (target, all) => {
|
|
5
|
-
__markAsModule(target);
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
__export(exports, {
|
|
10
|
-
simpleHash: () => simpleHash
|
|
11
|
-
});
|
|
12
|
-
const simpleHash = /* @__PURE__ */ __name((str) => {
|
|
13
|
-
let hash = 0;
|
|
14
|
-
for (let i = 0; i < str.length; i++) {
|
|
15
|
-
const char = str.charCodeAt(i);
|
|
16
|
-
hash = (hash << 5) - hash + char;
|
|
17
|
-
hash &= hash;
|
|
18
|
-
}
|
|
19
|
-
return new Uint32Array([hash])[0].toString(36);
|
|
20
|
-
}, "simpleHash");
|
|
21
|
-
//# 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": ";;;;;;;;AAAA;AAAA;AAAA;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/cjs/types.js
DELETED
package/dist/cjs/types.js.map
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __spreadValues = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
18
|
-
var __export = (target, all) => {
|
|
19
|
-
__markAsModule(target);
|
|
20
|
-
for (var name in all)
|
|
21
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
22
|
-
};
|
|
23
|
-
__export(exports, {
|
|
24
|
-
stylePropsAll: () => stylePropsAll,
|
|
25
|
-
stylePropsText: () => stylePropsText,
|
|
26
|
-
stylePropsTextOnly: () => stylePropsTextOnly,
|
|
27
|
-
stylePropsTransform: () => stylePropsTransform,
|
|
28
|
-
stylePropsView: () => stylePropsView,
|
|
29
|
-
validStyles: () => validStyles,
|
|
30
|
-
validStylesPseudo: () => validStylesPseudo
|
|
31
|
-
});
|
|
32
|
-
const stylePropsTransform = Object.freeze({
|
|
33
|
-
x: true,
|
|
34
|
-
y: true,
|
|
35
|
-
scale: true,
|
|
36
|
-
perspective: true,
|
|
37
|
-
scaleX: true,
|
|
38
|
-
scaleY: true,
|
|
39
|
-
skewX: true,
|
|
40
|
-
skewY: true,
|
|
41
|
-
matrix: true,
|
|
42
|
-
rotate: true,
|
|
43
|
-
rotateY: true,
|
|
44
|
-
rotateX: true,
|
|
45
|
-
rotateZ: true
|
|
46
|
-
});
|
|
47
|
-
const stylePropsView = Object.freeze(__spreadValues(__spreadValues({
|
|
48
|
-
backfaceVisibility: true,
|
|
49
|
-
backgroundColor: true,
|
|
50
|
-
borderBottomColor: true,
|
|
51
|
-
borderBottomEndRadius: true,
|
|
52
|
-
borderBottomLeftRadius: true,
|
|
53
|
-
borderBottomRightRadius: true,
|
|
54
|
-
borderBottomStartRadius: true,
|
|
55
|
-
borderBottomWidth: true,
|
|
56
|
-
borderColor: true,
|
|
57
|
-
borderEndColor: true,
|
|
58
|
-
borderLeftColor: true,
|
|
59
|
-
borderLeftWidth: true,
|
|
60
|
-
borderRadius: true,
|
|
61
|
-
borderRightColor: true,
|
|
62
|
-
borderRightWidth: true,
|
|
63
|
-
borderStartColor: true,
|
|
64
|
-
borderStyle: true,
|
|
65
|
-
borderTopColor: true,
|
|
66
|
-
borderTopEndRadius: true,
|
|
67
|
-
borderTopLeftRadius: true,
|
|
68
|
-
borderTopRightRadius: true,
|
|
69
|
-
borderTopStartRadius: true,
|
|
70
|
-
borderTopWidth: true,
|
|
71
|
-
borderWidth: true,
|
|
72
|
-
opacity: true,
|
|
73
|
-
transform: true,
|
|
74
|
-
alignContent: true,
|
|
75
|
-
alignItems: true,
|
|
76
|
-
alignSelf: true,
|
|
77
|
-
aspectRatio: true,
|
|
78
|
-
borderEndWidth: true,
|
|
79
|
-
borderStartWidth: true,
|
|
80
|
-
bottom: true,
|
|
81
|
-
display: true,
|
|
82
|
-
end: true,
|
|
83
|
-
flex: true,
|
|
84
|
-
flexBasis: true,
|
|
85
|
-
flexDirection: true,
|
|
86
|
-
flexGrow: true,
|
|
87
|
-
flexShrink: true,
|
|
88
|
-
flexWrap: true,
|
|
89
|
-
height: true,
|
|
90
|
-
justifyContent: true,
|
|
91
|
-
left: true,
|
|
92
|
-
margin: true,
|
|
93
|
-
marginBottom: true,
|
|
94
|
-
marginEnd: true,
|
|
95
|
-
marginHorizontal: true,
|
|
96
|
-
marginLeft: true,
|
|
97
|
-
marginRight: true,
|
|
98
|
-
marginStart: true,
|
|
99
|
-
marginTop: true,
|
|
100
|
-
marginVertical: true,
|
|
101
|
-
maxHeight: true,
|
|
102
|
-
maxWidth: true,
|
|
103
|
-
minHeight: true,
|
|
104
|
-
minWidth: true,
|
|
105
|
-
overflow: true,
|
|
106
|
-
padding: true,
|
|
107
|
-
paddingBottom: true,
|
|
108
|
-
paddingEnd: true,
|
|
109
|
-
paddingHorizontal: true,
|
|
110
|
-
paddingLeft: true,
|
|
111
|
-
paddingRight: true,
|
|
112
|
-
paddingStart: true,
|
|
113
|
-
paddingTop: true,
|
|
114
|
-
paddingVertical: true,
|
|
115
|
-
position: true,
|
|
116
|
-
right: true,
|
|
117
|
-
start: true,
|
|
118
|
-
top: true,
|
|
119
|
-
width: true,
|
|
120
|
-
zIndex: true,
|
|
121
|
-
direction: true,
|
|
122
|
-
shadowColor: true,
|
|
123
|
-
shadowOffset: true,
|
|
124
|
-
shadowOpacity: true,
|
|
125
|
-
shadowRadius: true
|
|
126
|
-
}, stylePropsTransform), process.env.TAMAGUI_TARGET === "web" && {
|
|
127
|
-
userSelect: true,
|
|
128
|
-
cursor: true,
|
|
129
|
-
contain: true,
|
|
130
|
-
pointerEvents: true,
|
|
131
|
-
boxSizing: true
|
|
132
|
-
}));
|
|
133
|
-
const stylePropsTextOnly = Object.freeze(__spreadValues({
|
|
134
|
-
color: true,
|
|
135
|
-
fontFamily: true,
|
|
136
|
-
fontSize: true,
|
|
137
|
-
fontStyle: true,
|
|
138
|
-
fontWeight: true,
|
|
139
|
-
letterSpacing: true,
|
|
140
|
-
lineHeight: true,
|
|
141
|
-
textAlign: true,
|
|
142
|
-
textDecorationLine: true,
|
|
143
|
-
textDecorationStyle: true,
|
|
144
|
-
textDecorationColor: true,
|
|
145
|
-
textShadowColor: true,
|
|
146
|
-
textShadowOffset: true,
|
|
147
|
-
textShadowRadius: true,
|
|
148
|
-
textTransform: true
|
|
149
|
-
}, process.env.TAMAGUI_TARGET === "web" && {
|
|
150
|
-
whiteSpace: true,
|
|
151
|
-
wordWrap: true,
|
|
152
|
-
textOverflow: true,
|
|
153
|
-
textDecorationDistance: true
|
|
154
|
-
}));
|
|
155
|
-
const stylePropsText = Object.freeze(__spreadValues(__spreadValues({}, stylePropsView), stylePropsTextOnly));
|
|
156
|
-
const stylePropsAll = stylePropsText;
|
|
157
|
-
const validStylesPseudo = Object.freeze({
|
|
158
|
-
hoverStyle: true,
|
|
159
|
-
pressStyle: true,
|
|
160
|
-
focusStyle: true
|
|
161
|
-
});
|
|
162
|
-
const validStyles = Object.freeze(__spreadValues(__spreadValues({}, validStylesPseudo), stylePropsView));
|
|
163
|
-
//# 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": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACO,MAAM,sBAAsB,OAAO,OAAO;AAAA,EAC/C,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO;AAAA,EACP,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA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|
-
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
|
-
};
|
|
9
|
-
//# sourceMappingURL=allRules.js.map
|
package/dist/esm/allRules.js.map
DELETED
|
@@ -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
|