@tamagui/helpers 1.0.0-alpha.8 → 1.0.0-beta.0

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 (66) hide show
  1. package/dist/cjs/allRules.js +32 -0
  2. package/dist/cjs/allRules.js.map +7 -0
  3. package/dist/cjs/concatClassName.js +91 -0
  4. package/dist/cjs/concatClassName.js.map +7 -0
  5. package/dist/cjs/index.js +21 -0
  6. package/dist/cjs/index.js.map +7 -0
  7. package/dist/cjs/log.js +32 -0
  8. package/dist/cjs/log.js.map +7 -0
  9. package/dist/cjs/simpleHash.js +37 -0
  10. package/dist/cjs/simpleHash.js.map +7 -0
  11. package/dist/cjs/types.js +16 -0
  12. package/dist/cjs/types.js.map +7 -0
  13. package/dist/{index.cjs → cjs/validStyleProps.js} +63 -94
  14. package/dist/cjs/validStyleProps.js.map +7 -0
  15. package/dist/{allRules.js → esm/allRules.js} +1 -1
  16. package/dist/{allRules.js.map → esm/allRules.js.map} +2 -2
  17. package/dist/{concatClassName.js → esm/concatClassName.js} +8 -11
  18. package/dist/esm/concatClassName.js.map +7 -0
  19. package/dist/{index.js → esm/index.js} +1 -1
  20. package/dist/{index.js.map → esm/index.js.map} +2 -2
  21. package/dist/esm/log.js +10 -0
  22. package/dist/esm/log.js.map +7 -0
  23. package/dist/{simpleHash.js → esm/simpleHash.js} +0 -0
  24. package/dist/{simpleHash.js.map → esm/simpleHash.js.map} +2 -2
  25. package/dist/{types.js → esm/types.js} +0 -0
  26. package/dist/{types.js.map → esm/types.js.map} +0 -0
  27. package/dist/{validStyleProps.js → esm/validStyleProps.js} +35 -9
  28. package/dist/esm/validStyleProps.js.map +7 -0
  29. package/dist/jsx/allRules.js +8 -0
  30. package/dist/jsx/concatClassName.js +68 -0
  31. package/dist/jsx/index.js +4 -0
  32. package/dist/jsx/log.js +9 -0
  33. package/dist/jsx/simpleHash.js +14 -0
  34. package/dist/jsx/types.js +0 -0
  35. package/{src/validStyleProps.ts → dist/jsx/validStyleProps.js} +58 -35
  36. package/package.json +13 -10
  37. package/types/concatClassName.d.ts +2 -0
  38. package/types/concatClassName.d.ts.map +1 -0
  39. package/types/index.d.ts +5 -0
  40. package/types/index.d.ts.map +1 -0
  41. package/types/log.d.ts +2 -0
  42. package/types/log.d.ts.map +1 -0
  43. package/types/simpleHash.d.ts +2 -0
  44. package/types/simpleHash.d.ts.map +1 -0
  45. package/types/types.d.ts +8 -0
  46. package/types/types.d.ts.map +1 -0
  47. package/types/validStyleProps.d.ts +517 -0
  48. package/types/validStyleProps.d.ts.map +1 -0
  49. package/LICENSE +0 -21
  50. package/dist/concatClassName.js.map +0 -7
  51. package/dist/getNiceKey.js +0 -16
  52. package/dist/getNiceKey.js.map +0 -7
  53. package/dist/getStylesAtomic.js +0 -96
  54. package/dist/getStylesAtomic.js.map +0 -7
  55. package/dist/getStylesAtomic.native.js +0 -11
  56. package/dist/getStylesAtomic.native.js.map +0 -7
  57. package/dist/index.cjs.map +0 -7
  58. package/dist/uniqueStyleKeys.js +0 -33
  59. package/dist/uniqueStyleKeys.js.map +0 -7
  60. package/dist/validStyleProps.js.map +0 -7
  61. package/src/allRules.ts +0 -5
  62. package/src/concatClassName.ts +0 -101
  63. package/src/index.ts +0 -4
  64. package/src/simpleHash.ts +0 -9
  65. package/src/types.ts +0 -7
  66. package/types.d.ts +0 -488
@@ -0,0 +1,32 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var allRules_exports = {};
20
+ __export(allRules_exports, {
21
+ AllRules: () => AllRules,
22
+ getStyleRules: () => getStyleRules
23
+ });
24
+ module.exports = __toCommonJS(allRules_exports);
25
+ const AllRules = /* @__PURE__ */ new Set();
26
+ const getStyleRules = /* @__PURE__ */ __name(() => AllRules, "getStyleRules");
27
+ // Annotate the CommonJS export names for ESM import in node:
28
+ 0 && (module.exports = {
29
+ AllRules,
30
+ getStyleRules
31
+ });
32
+ //# sourceMappingURL=allRules.js.map
@@ -0,0 +1,7 @@
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;AAAA;AAAA;AAEO,MAAM,WAAW,oBAAI,IAAI;AAEzB,MAAM,gBAAgB,6BAAM,UAAN;",
6
+ "names": []
7
+ }
@@ -0,0 +1,91 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var concatClassName_exports = {};
20
+ __export(concatClassName_exports, {
21
+ concatClassName: () => concatClassName
22
+ });
23
+ module.exports = __toCommonJS(concatClassName_exports);
24
+ function concatClassName(_cn) {
25
+ const cnOrPropObjcet = arguments;
26
+ const usedPrefixes = [];
27
+ let final = "";
28
+ const len = cnOrPropObjcet.length;
29
+ let propObjects = null;
30
+ for (let x = len; x >= 0; x--) {
31
+ const cns = cnOrPropObjcet[x];
32
+ if (!cns)
33
+ continue;
34
+ if (!Array.isArray(cns) && typeof cns !== "string") {
35
+ propObjects = propObjects || [];
36
+ propObjects.push(cns);
37
+ continue;
38
+ }
39
+ const names = Array.isArray(cns) ? cns : cns.split(" ");
40
+ const numNames = names.length;
41
+ for (let i = numNames - 1; i >= 0; i--) {
42
+ const name = names[i];
43
+ if (!name || name === " ")
44
+ continue;
45
+ if (name[0] !== "_") {
46
+ final = name + " " + final;
47
+ continue;
48
+ }
49
+ const splitIndex = name.indexOf("-");
50
+ if (splitIndex < 1) {
51
+ final = name + " " + final;
52
+ continue;
53
+ }
54
+ const nextChar = name[splitIndex + 1];
55
+ const isMediaQuery = nextChar === "_";
56
+ const styleKey = name.slice(1, name.lastIndexOf("-"));
57
+ const mediaKey = isMediaQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null;
58
+ const uid = mediaKey ? styleKey + mediaKey : styleKey;
59
+ if (usedPrefixes.indexOf(uid) > -1) {
60
+ continue;
61
+ }
62
+ usedPrefixes.push(uid);
63
+ const propName = styleKey;
64
+ if (propName && propObjects) {
65
+ if (propObjects.some((po) => {
66
+ if (mediaKey) {
67
+ const propKey = pseudoInvert[mediaKey];
68
+ return po && po[propKey] && propName in po[propKey] && po[propKey] !== null;
69
+ }
70
+ const res = po && propName in po && po[propName] !== null;
71
+ return res;
72
+ })) {
73
+ continue;
74
+ }
75
+ }
76
+ final = name + " " + final;
77
+ }
78
+ }
79
+ return final;
80
+ }
81
+ __name(concatClassName, "concatClassName");
82
+ const pseudoInvert = {
83
+ hover: "hoverStyle",
84
+ focus: "focusStyle",
85
+ press: "pressStyle"
86
+ };
87
+ // Annotate the CommonJS export names for ESM import in node:
88
+ 0 && (module.exports = {
89
+ concatClassName
90
+ });
91
+ //# sourceMappingURL=concatClassName.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/concatClassName.ts"],
4
+ "sourcesContent": ["// perf sensitive so doing some weird stuff\n\nimport { ViewStyle } from 'react-native'\n\nexport function concatClassName(...args: any[]): any\nexport function concatClassName(_cn: ViewStyle | null | undefined): string {\n const cnOrPropObjcet = arguments\n const usedPrefixes: string[] = []\n let final = ''\n\n const len = cnOrPropObjcet.length\n let propObjects: any = null\n for (let x = len; x >= 0; x--) {\n const cns = cnOrPropObjcet[x]\n\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\n const names = Array.isArray(cns) ? cns : cns.split(' ')\n const numNames = names.length\n for (let i = numNames - 1; i >= 0; i--) {\n const name = names[i]\n\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\n const splitIndex = name.indexOf('-')\n if (splitIndex < 1) {\n final = name + ' ' + final\n // if (shouldDebug) console.log('debug exclude:', name, final)\n continue\n }\n\n const nextChar = name[splitIndex + 1]\n // synced to static-ui constants\n // MEDIA_SEP\n const isMediaQuery = nextChar === '_'\n // PSEUDO_SEP\n // commenting out three things to make pseudos override properly\n // (leave in for a bit to see if other bugs pop up later):\n // 1. const isPsuedoQuery = nextChar === '0'\n const styleKey = name.slice(1, name.lastIndexOf('-'))\n // 2. isMediaQuery || isPsuedoQuery\n const mediaKey = isMediaQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null\n const uid = mediaKey ? styleKey + mediaKey : styleKey\n // 3. && !isPsuedoQuery\n\n if (usedPrefixes.indexOf(uid) > -1) {\n // if (shouldDebug) console.log('debug exclude:', usedPrefixes, name)\n continue\n }\n usedPrefixes.push(uid)\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 // if (shouldDebug) console.log('debug exclude:', name)\n continue\n }\n }\n\n final = name + ' ' + final\n }\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;AAAA;AAAA;AAKO,yBAAyB,KAA2C;AACzE,QAAM,iBAAiB;AACvB,QAAM,eAAyB,CAAC;AAChC,MAAI,QAAQ;AAEZ,QAAM,MAAM,eAAe;AAC3B,MAAI,cAAmB;AACvB,WAAS,IAAI,KAAK,KAAK,GAAG,KAAK;AAC7B,UAAM,MAAM,eAAe;AAE3B,QAAI,CAAC;AAAK;AACV,QAAI,CAAC,MAAM,QAAQ,GAAG,KAAK,OAAO,QAAQ,UAAU;AAElD,oBAAc,eAAe,CAAC;AAC9B,kBAAY,KAAK,GAAG;AACpB;AAAA,IACF;AAEA,UAAM,QAAQ,MAAM,QAAQ,GAAG,IAAI,MAAM,IAAI,MAAM,GAAG;AACtD,UAAM,WAAW,MAAM;AACvB,aAAS,IAAI,WAAW,GAAG,KAAK,GAAG,KAAK;AACtC,YAAM,OAAO,MAAM;AAEnB,UAAI,CAAC,QAAQ,SAAS;AAAK;AAC3B,UAAI,KAAK,OAAO,KAAK;AAEnB,gBAAQ,OAAO,MAAM;AACrB;AAAA,MACF;AAEA,YAAM,aAAa,KAAK,QAAQ,GAAG;AACnC,UAAI,aAAa,GAAG;AAClB,gBAAQ,OAAO,MAAM;AAErB;AAAA,MACF;AAEA,YAAM,WAAW,KAAK,aAAa;AAGnC,YAAM,eAAe,aAAa;AAKlC,YAAM,WAAW,KAAK,MAAM,GAAG,KAAK,YAAY,GAAG,CAAC;AAEpD,YAAM,WAAW,eAAe,KAAK,MAAM,aAAa,GAAG,aAAa,CAAC,IAAI;AAC7E,YAAM,MAAM,WAAW,WAAW,WAAW;AAG7C,UAAI,aAAa,QAAQ,GAAG,IAAI,IAAI;AAElC;AAAA,MACF;AACA,mBAAa,KAAK,GAAG;AAGrB,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,UACzE;AACA,gBAAM,MAAM,MAAM,YAAY,MAAM,GAAG,cAAc;AACrD,iBAAO;AAAA,QACT,CAAC,GACD;AAEA;AAAA,QACF;AAAA,MACF;AAEA,cAAQ,OAAO,MAAM;AAAA,IACvB;AAAA,EACF;AAEA,SAAO;AACT;AAhFgB;AAkFhB,MAAM,eAAe;AAAA,EACnB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACT;",
6
+ "names": []
7
+ }
@@ -0,0 +1,21 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var src_exports = {};
16
+ module.exports = __toCommonJS(src_exports);
17
+ __reExport(src_exports, require("./concatClassName"), module.exports);
18
+ __reExport(src_exports, require("./validStyleProps"), module.exports);
19
+ __reExport(src_exports, require("./types"), module.exports);
20
+ __reExport(src_exports, require("./log"), module.exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "sourcesContent": ["export * from './concatClassName'\nexport * from './validStyleProps'\nexport * from './types'\nexport * from './log'\n"],
5
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,8BAAd;AACA,wBAAc,8BADd;AAEA,wBAAc,oBAFd;AAGA,wBAAc,kBAHd;",
6
+ "names": []
7
+ }
@@ -0,0 +1,32 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var log_exports = {};
20
+ __export(log_exports, {
21
+ log: () => log
22
+ });
23
+ module.exports = __toCommonJS(log_exports);
24
+ const log = /* @__PURE__ */ __name((...args) => {
25
+ console.log(...args);
26
+ return args[0];
27
+ }, "log");
28
+ // Annotate the CommonJS export names for ESM import in node:
29
+ 0 && (module.exports = {
30
+ log
31
+ });
32
+ //# sourceMappingURL=log.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/log.ts"],
4
+ "sourcesContent": ["export const log = (...args: any) => {\n console.log(...args)\n return args[0]\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,MAAM,2BAAI,SAAc;AACnC,UAAQ,IAAI,GAAG,IAAI;AACnB,SAAO,KAAK;AACd,GAHmB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,37 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var simpleHash_exports = {};
20
+ __export(simpleHash_exports, {
21
+ simpleHash: () => simpleHash
22
+ });
23
+ module.exports = __toCommonJS(simpleHash_exports);
24
+ const simpleHash = /* @__PURE__ */ __name((str) => {
25
+ let hash = 0;
26
+ for (let i = 0; i < str.length; i++) {
27
+ const char = str.charCodeAt(i);
28
+ hash = (hash << 5) - hash + char;
29
+ hash &= hash;
30
+ }
31
+ return new Uint32Array([hash])[0].toString(36);
32
+ }, "simpleHash");
33
+ // Annotate the CommonJS export names for ESM import in node:
34
+ 0 && (module.exports = {
35
+ simpleHash
36
+ });
37
+ //# sourceMappingURL=simpleHash.js.map
@@ -0,0 +1,7 @@
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;AAAA;AAAA;AAAO,MAAM,aAAa,wBAAC,QAAgB;AACzC,MAAI,OAAO;AACX,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,UAAM,OAAO,IAAI,WAAW,CAAC;AAC7B,WAAQ,SAAQ,KAAK,OAAO;AAC5B,YAAQ;AAAA,EACV;AACA,SAAO,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE,GAAG,SAAS,EAAE;AAC/C,GAR0B;",
6
+ "names": []
7
+ }
@@ -0,0 +1,16 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var types_exports = {};
15
+ module.exports = __toCommonJS(types_exports);
16
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/types.ts"],
4
+ "sourcesContent": ["export type StyleObject = {\n property: string\n value: string\n className: string\n identifier: string\n rules: string[]\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,4 +1,6 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
2
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
4
6
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
@@ -14,98 +16,35 @@ var __spreadValues = (a, b) => {
14
16
  }
15
17
  return a;
16
18
  };
17
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
18
19
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
19
20
  var __export = (target, all) => {
20
- __markAsModule(target);
21
21
  for (var name in all)
22
22
  __defProp(target, name, { get: all[name], enumerable: true });
23
23
  };
24
-
25
- // src/index.ts
26
- __export(exports, {
27
- AllRules: () => AllRules,
28
- concatClassName: () => concatClassName,
29
- getStyleRules: () => getStyleRules,
24
+ var __copyProps = (to, from, except, desc) => {
25
+ if (from && typeof from === "object" || typeof from === "function") {
26
+ for (let key of __getOwnPropNames(from))
27
+ if (!__hasOwnProp.call(to, key) && key !== except)
28
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
29
+ }
30
+ return to;
31
+ };
32
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
33
+ var validStyleProps_exports = {};
34
+ __export(validStyleProps_exports, {
35
+ invertMapTransformKeys: () => invertMapTransformKeys,
36
+ mapTransformKeys: () => mapTransformKeys,
37
+ mergeTransform: () => mergeTransform,
30
38
  stylePropsAll: () => stylePropsAll,
31
39
  stylePropsText: () => stylePropsText,
32
40
  stylePropsTextOnly: () => stylePropsTextOnly,
33
41
  stylePropsTransform: () => stylePropsTransform,
34
42
  stylePropsView: () => stylePropsView,
35
- validStyles: () => validStyles,
36
- validStylesPseudo: () => validStylesPseudo
43
+ validPseudoKeys: () => validPseudoKeys,
44
+ validStyles: () => validStyles
37
45
  });
38
-
39
- // src/concatClassName.ts
40
- function concatClassName(_cn) {
41
- const classNamesOrPropObjects = arguments;
42
- const usedPrefixes = [];
43
- let final = "";
44
- const len = classNamesOrPropObjects.length;
45
- let propObjects = null;
46
- for (let x = len; x >= 0; x--) {
47
- const cns = classNamesOrPropObjects[x];
48
- if (!cns)
49
- continue;
50
- if (!Array.isArray(cns) && typeof cns !== "string") {
51
- propObjects = propObjects || [];
52
- propObjects.push(cns);
53
- continue;
54
- }
55
- const names = Array.isArray(cns) ? cns : cns.split(" ");
56
- const numNames = names.length;
57
- for (let i = numNames - 1; i >= 0; i--) {
58
- const name = names[i];
59
- if (!name || name === " ")
60
- continue;
61
- if (name[0] !== "_") {
62
- final = name + " " + final;
63
- continue;
64
- }
65
- const splitIndex = name.indexOf("-");
66
- if (splitIndex < 1) {
67
- final = name + " " + final;
68
- continue;
69
- }
70
- const nextChar = name[splitIndex + 1];
71
- const isMediaQuery = nextChar === "_";
72
- const isPsuedoQuery = nextChar === "-";
73
- const styleKey = name.slice(1, splitIndex);
74
- const mediaKey = isMediaQuery || isPsuedoQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null;
75
- const uid = mediaKey ? styleKey + mediaKey : styleKey;
76
- if (!isMediaQuery && !isPsuedoQuery) {
77
- if (usedPrefixes.indexOf(uid) > -1) {
78
- continue;
79
- }
80
- usedPrefixes.push(uid);
81
- }
82
- const propName = styleKey;
83
- if (propName && propObjects) {
84
- if (propObjects.some((po) => {
85
- if (mediaKey) {
86
- const propKey = pseudoInvert[mediaKey];
87
- return po && po[propKey] && propName in po[propKey] && po[propKey] !== null;
88
- }
89
- const res = po && propName in po && po[propName] !== null;
90
- return res;
91
- })) {
92
- continue;
93
- }
94
- }
95
- final = name + " " + final;
96
- }
97
- }
98
- return final;
99
- }
100
- __name(concatClassName, "concatClassName");
101
- var pseudoInvert = {
102
- hover: "hoverStyle",
103
- focus: "focusStyle",
104
- press: "pressStyle"
105
- };
106
-
107
- // src/validStyleProps.ts
108
- var stylePropsTransform = {
46
+ module.exports = __toCommonJS(validStyleProps_exports);
47
+ const stylePropsTransform = Object.freeze({
109
48
  x: true,
110
49
  y: true,
111
50
  scale: true,
@@ -119,11 +58,15 @@ var stylePropsTransform = {
119
58
  rotateY: true,
120
59
  rotateX: true,
121
60
  rotateZ: true
122
- };
123
- var stylePropsView = Object.freeze(__spreadValues(__spreadValues({
61
+ });
62
+ const stylePropsView = Object.freeze(__spreadValues(__spreadValues({
124
63
  backfaceVisibility: true,
125
64
  backgroundColor: true,
126
65
  borderBottomColor: true,
66
+ borderBottomStyle: true,
67
+ borderTopStyle: true,
68
+ borderLeftStyle: true,
69
+ borderRightStyle: true,
127
70
  borderBottomEndRadius: true,
128
71
  borderBottomLeftRadius: true,
129
72
  borderBottomRightRadius: true,
@@ -200,13 +143,16 @@ var stylePropsView = Object.freeze(__spreadValues(__spreadValues({
200
143
  shadowOpacity: true,
201
144
  shadowRadius: true
202
145
  }, stylePropsTransform), process.env.TAMAGUI_TARGET === "web" && {
146
+ overflowX: true,
147
+ overflowY: true,
203
148
  userSelect: true,
204
149
  cursor: true,
205
150
  contain: true,
206
151
  pointerEvents: true,
207
- boxSizing: true
152
+ boxSizing: true,
153
+ boxShadow: true
208
154
  }));
209
- var stylePropsTextOnly = Object.freeze(__spreadValues({
155
+ const stylePropsTextOnly = Object.freeze(__spreadValues({
210
156
  color: true,
211
157
  fontFamily: true,
212
158
  fontSize: true,
@@ -228,16 +174,39 @@ var stylePropsTextOnly = Object.freeze(__spreadValues({
228
174
  textOverflow: true,
229
175
  textDecorationDistance: true
230
176
  }));
231
- var stylePropsText = Object.freeze(__spreadValues(__spreadValues({}, stylePropsView), stylePropsTextOnly));
232
- var stylePropsAll = stylePropsText;
233
- var validStylesPseudo = {
177
+ const stylePropsText = Object.freeze(__spreadValues(__spreadValues({}, stylePropsView), stylePropsTextOnly));
178
+ const stylePropsAll = stylePropsText;
179
+ const validPseudoKeys = Object.freeze({
180
+ enterStyle: true,
181
+ exitStyle: true,
234
182
  hoverStyle: true,
235
183
  pressStyle: true,
236
184
  focusStyle: true
185
+ });
186
+ const validStyles = Object.freeze(__spreadValues(__spreadValues({}, validPseudoKeys), stylePropsView));
187
+ const mapTransformKeys = {
188
+ x: "translateX",
189
+ y: "translateY"
237
190
  };
238
- var validStyles = __spreadValues(__spreadValues({}, validStylesPseudo), stylePropsView);
239
-
240
- // src/allRules.ts
241
- var AllRules = new Set();
242
- var getStyleRules = /* @__PURE__ */ __name(() => AllRules, "getStyleRules");
243
- //# sourceMappingURL=index.cjs.map
191
+ const invertMapTransformKeys = {
192
+ translateX: "x",
193
+ translateY: "y"
194
+ };
195
+ const mergeTransform = /* @__PURE__ */ __name((obj, key, val) => {
196
+ obj.transform || (obj.transform = []);
197
+ obj.transform.push({ [mapTransformKeys[key] || key]: val });
198
+ }, "mergeTransform");
199
+ // Annotate the CommonJS export names for ESM import in node:
200
+ 0 && (module.exports = {
201
+ invertMapTransformKeys,
202
+ mapTransformKeys,
203
+ mergeTransform,
204
+ stylePropsAll,
205
+ stylePropsText,
206
+ stylePropsTextOnly,
207
+ stylePropsTransform,
208
+ stylePropsView,
209
+ validPseudoKeys,
210
+ validStyles
211
+ });
212
+ //# sourceMappingURL=validStyleProps.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/validStyleProps.ts"],
4
+ "sourcesContent": ["import { ViewStyle } from 'react-native'\n\n// 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 borderBottomStyle: true,\n borderTopStyle: true,\n borderLeftStyle: true,\n borderRightStyle: 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 overflowX: true,\n overflowY: true,\n userSelect: true,\n cursor: true,\n contain: true,\n pointerEvents: true,\n boxSizing: true,\n boxShadow: 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 validPseudoKeys = Object.freeze({\n enterStyle: true,\n exitStyle: true,\n hoverStyle: true,\n pressStyle: true,\n focusStyle: true,\n})\n\nexport const validStyles = Object.freeze({\n ...validPseudoKeys,\n ...stylePropsView,\n})\n\nexport const mapTransformKeys = {\n x: 'translateX',\n y: 'translateY',\n}\n\nexport const invertMapTransformKeys = {\n translateX: 'x',\n translateY: 'y',\n}\n\nexport const mergeTransform = (obj: ViewStyle, key: string, val: any) => {\n obj.transform ||= []\n // @ts-ignore\n obj.transform.push({ [mapTransformKeys[key] || key]: val })\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,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,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX,CAAC;AAEM,MAAM,iBAAiB,OAAO,OAAO;AAAA,EAC1C,oBAAoB;AAAA,EACpB,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,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;AAAA,EACX,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,KAAK;AAAA,EACL,MAAM;AAAA,EACN,WAAW;AAAA,EACX,eAAe;AAAA,EACf,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,WAAW;AAAA,EACX,kBAAkB;AAAA,EAClB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,UAAU;AAAA,EACV,WAAW;AAAA,EACX,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AAAA,EACT,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,mBAAmB;AAAA,EACnB,aAAa;AAAA,EACb,cAAc;AAAA,EACd,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,UAAU;AAAA,EACV,OAAO;AAAA,EACP,OAAO;AAAA,EACP,KAAK;AAAA,EACL,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,aAAa;AAAA,EACb,cAAc;AAAA,EACd,eAAe;AAAA,EACf,cAAc;AAAA,GACX,sBAGC,QAAQ,IAAI,mBAAmB,SAAS;AAAA,EAC1C,WAAW;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,eAAe;AAAA,EACf,WAAW;AAAA,EACX,WAAW;AACb,EACD;AAEM,MAAM,qBAAqB,OAAO,OAAO;AAAA,EAC9C,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,oBAAoB;AAAA,EACpB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,eAAe;AAAA,GAIX,QAAQ,IAAI,mBAAmB,SAAS;AAAA,EAC1C,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,cAAc;AAAA,EACd,wBAAwB;AAC1B,EACD;AAEM,MAAM,iBAAiB,OAAO,OAAO,kCACvC,iBACA,mBACJ;AAEM,MAAM,gBAAgB;AAEtB,MAAM,kBAAkB,OAAO,OAAO;AAAA,EAC3C,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AACd,CAAC;AAEM,MAAM,cAAc,OAAO,OAAO,kCACpC,kBACA,eACJ;AAEM,MAAM,mBAAmB;AAAA,EAC9B,GAAG;AAAA,EACH,GAAG;AACL;AAEO,MAAM,yBAAyB;AAAA,EACpC,YAAY;AAAA,EACZ,YAAY;AACd;AAEO,MAAM,iBAAiB,wBAAC,KAAgB,KAAa,QAAa;AACvE,MAAI,aAAJ,KAAI,YAAc,CAAC;AAEnB,MAAI,UAAU,KAAK,GAAG,iBAAiB,QAAQ,MAAM,IAAI,CAAC;AAC5D,GAJ8B;",
6
+ "names": []
7
+ }
@@ -1,6 +1,6 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- const AllRules = new Set();
3
+ const AllRules = /* @__PURE__ */ new Set();
4
4
  const getStyleRules = /* @__PURE__ */ __name(() => AllRules, "getStyleRules");
5
5
  export {
6
6
  AllRules,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/allRules.ts"],
3
+ "sources": ["../../src/allRules.ts"],
4
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;",
5
+ "mappings": ";;AAEO,MAAM,WAAW,oBAAI,IAAI;AAEzB,MAAM,gBAAgB,6BAAM,UAAN;",
6
6
  "names": []
7
7
  }
@@ -1,13 +1,13 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
3
  function concatClassName(_cn) {
4
- const classNamesOrPropObjects = arguments;
4
+ const cnOrPropObjcet = arguments;
5
5
  const usedPrefixes = [];
6
6
  let final = "";
7
- const len = classNamesOrPropObjects.length;
7
+ const len = cnOrPropObjcet.length;
8
8
  let propObjects = null;
9
9
  for (let x = len; x >= 0; x--) {
10
- const cns = classNamesOrPropObjects[x];
10
+ const cns = cnOrPropObjcet[x];
11
11
  if (!cns)
12
12
  continue;
13
13
  if (!Array.isArray(cns) && typeof cns !== "string") {
@@ -32,16 +32,13 @@ function concatClassName(_cn) {
32
32
  }
33
33
  const nextChar = name[splitIndex + 1];
34
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;
35
+ const styleKey = name.slice(1, name.lastIndexOf("-"));
36
+ const mediaKey = isMediaQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null;
38
37
  const uid = mediaKey ? styleKey + mediaKey : styleKey;
39
- if (!isMediaQuery && !isPsuedoQuery) {
40
- if (usedPrefixes.indexOf(uid) > -1) {
41
- continue;
42
- }
43
- usedPrefixes.push(uid);
38
+ if (usedPrefixes.indexOf(uid) > -1) {
39
+ continue;
44
40
  }
41
+ usedPrefixes.push(uid);
45
42
  const propName = styleKey;
46
43
  if (propName && propObjects) {
47
44
  if (propObjects.some((po) => {
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/concatClassName.ts"],
4
+ "sourcesContent": ["// perf sensitive so doing some weird stuff\n\nimport { ViewStyle } from 'react-native'\n\nexport function concatClassName(...args: any[]): any\nexport function concatClassName(_cn: ViewStyle | null | undefined): string {\n const cnOrPropObjcet = arguments\n const usedPrefixes: string[] = []\n let final = ''\n\n const len = cnOrPropObjcet.length\n let propObjects: any = null\n for (let x = len; x >= 0; x--) {\n const cns = cnOrPropObjcet[x]\n\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\n const names = Array.isArray(cns) ? cns : cns.split(' ')\n const numNames = names.length\n for (let i = numNames - 1; i >= 0; i--) {\n const name = names[i]\n\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\n const splitIndex = name.indexOf('-')\n if (splitIndex < 1) {\n final = name + ' ' + final\n // if (shouldDebug) console.log('debug exclude:', name, final)\n continue\n }\n\n const nextChar = name[splitIndex + 1]\n // synced to static-ui constants\n // MEDIA_SEP\n const isMediaQuery = nextChar === '_'\n // PSEUDO_SEP\n // commenting out three things to make pseudos override properly\n // (leave in for a bit to see if other bugs pop up later):\n // 1. const isPsuedoQuery = nextChar === '0'\n const styleKey = name.slice(1, name.lastIndexOf('-'))\n // 2. isMediaQuery || isPsuedoQuery\n const mediaKey = isMediaQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null\n const uid = mediaKey ? styleKey + mediaKey : styleKey\n // 3. && !isPsuedoQuery\n\n if (usedPrefixes.indexOf(uid) > -1) {\n // if (shouldDebug) console.log('debug exclude:', usedPrefixes, name)\n continue\n }\n usedPrefixes.push(uid)\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 // if (shouldDebug) console.log('debug exclude:', name)\n continue\n }\n }\n\n final = name + ' ' + final\n }\n }\n\n return final\n}\n\nconst pseudoInvert = {\n hover: 'hoverStyle',\n focus: 'focusStyle',\n press: 'pressStyle',\n}\n"],
5
+ "mappings": ";;AAKO,yBAAyB,KAA2C;AACzE,QAAM,iBAAiB;AACvB,QAAM,eAAyB,CAAC;AAChC,MAAI,QAAQ;AAEZ,QAAM,MAAM,eAAe;AAC3B,MAAI,cAAmB;AACvB,WAAS,IAAI,KAAK,KAAK,GAAG,KAAK;AAC7B,UAAM,MAAM,eAAe;AAE3B,QAAI,CAAC;AAAK;AACV,QAAI,CAAC,MAAM,QAAQ,GAAG,KAAK,OAAO,QAAQ,UAAU;AAElD,oBAAc,eAAe,CAAC;AAC9B,kBAAY,KAAK,GAAG;AACpB;AAAA,IACF;AAEA,UAAM,QAAQ,MAAM,QAAQ,GAAG,IAAI,MAAM,IAAI,MAAM,GAAG;AACtD,UAAM,WAAW,MAAM;AACvB,aAAS,IAAI,WAAW,GAAG,KAAK,GAAG,KAAK;AACtC,YAAM,OAAO,MAAM;AAEnB,UAAI,CAAC,QAAQ,SAAS;AAAK;AAC3B,UAAI,KAAK,OAAO,KAAK;AAEnB,gBAAQ,OAAO,MAAM;AACrB;AAAA,MACF;AAEA,YAAM,aAAa,KAAK,QAAQ,GAAG;AACnC,UAAI,aAAa,GAAG;AAClB,gBAAQ,OAAO,MAAM;AAErB;AAAA,MACF;AAEA,YAAM,WAAW,KAAK,aAAa;AAGnC,YAAM,eAAe,aAAa;AAKlC,YAAM,WAAW,KAAK,MAAM,GAAG,KAAK,YAAY,GAAG,CAAC;AAEpD,YAAM,WAAW,eAAe,KAAK,MAAM,aAAa,GAAG,aAAa,CAAC,IAAI;AAC7E,YAAM,MAAM,WAAW,WAAW,WAAW;AAG7C,UAAI,aAAa,QAAQ,GAAG,IAAI,IAAI;AAElC;AAAA,MACF;AACA,mBAAa,KAAK,GAAG;AAGrB,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,UACzE;AACA,gBAAM,MAAM,MAAM,YAAY,MAAM,GAAG,cAAc;AACrD,iBAAO;AAAA,QACT,CAAC,GACD;AAEA;AAAA,QACF;AAAA,MACF;AAEA,cAAQ,OAAO,MAAM;AAAA,IACvB;AAAA,EACF;AAEA,SAAO;AACT;AAhFgB;AAkFhB,MAAM,eAAe;AAAA,EACnB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACT;",
6
+ "names": []
7
+ }
@@ -1,5 +1,5 @@
1
1
  export * from "./concatClassName";
2
2
  export * from "./validStyleProps";
3
3
  export * from "./types";
4
- export * from "./allRules";
4
+ export * from "./log";
5
5
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/index.ts"],
4
- "sourcesContent": ["export * from './concatClassName'\nexport * from './validStyleProps'\nexport * from './types'\nexport * from './allRules'\n"],
3
+ "sources": ["../../src/index.ts"],
4
+ "sourcesContent": ["export * from './concatClassName'\nexport * from './validStyleProps'\nexport * from './types'\nexport * from './log'\n"],
5
5
  "mappings": "AAAA;AACA;AACA;AACA;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,10 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ const log = /* @__PURE__ */ __name((...args) => {
4
+ console.log(...args);
5
+ return args[0];
6
+ }, "log");
7
+ export {
8
+ log
9
+ };
10
+ //# sourceMappingURL=log.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/log.ts"],
4
+ "sourcesContent": ["export const log = (...args: any) => {\n console.log(...args)\n return args[0]\n}\n"],
5
+ "mappings": ";;AAAO,MAAM,MAAM,2BAAI,SAAc;AACnC,UAAQ,IAAI,GAAG,IAAI;AACnB,SAAO,KAAK;AACd,GAHmB;",
6
+ "names": []
7
+ }
File without changes