@tamagui/helpers 2.7.7 → 3.0.0-beta.637.1

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 (112) hide show
  1. package/dist/cjs/clamp.cjs +16 -19
  2. package/dist/cjs/clamp.native.cjs +30 -0
  3. package/dist/cjs/clamp.native.js +17 -19
  4. package/dist/cjs/clamp.native.js.map +1 -1
  5. package/dist/cjs/composeEventHandlers.cjs +26 -32
  6. package/dist/cjs/composeEventHandlers.native.cjs +43 -0
  7. package/dist/cjs/composeEventHandlers.native.js +28 -34
  8. package/dist/cjs/composeEventHandlers.native.js.map +1 -1
  9. package/dist/cjs/index.cjs +13 -11
  10. package/dist/cjs/index.native.cjs +31 -0
  11. package/dist/cjs/index.native.js +13 -10
  12. package/dist/cjs/index.native.js.map +1 -1
  13. package/dist/cjs/reservedThemeProps.cjs +43 -0
  14. package/dist/cjs/reservedThemeProps.native.cjs +45 -0
  15. package/dist/cjs/reservedThemeProps.native.js +47 -0
  16. package/dist/cjs/reservedThemeProps.native.js.map +1 -0
  17. package/dist/cjs/shouldRenderNativePlatform.cjs +38 -37
  18. package/dist/cjs/shouldRenderNativePlatform.native.cjs +71 -0
  19. package/dist/cjs/shouldRenderNativePlatform.native.js +55 -59
  20. package/dist/cjs/shouldRenderNativePlatform.native.js.map +1 -1
  21. package/dist/cjs/themeClassNames.cjs +39 -0
  22. package/dist/cjs/themeClassNames.native.cjs +42 -0
  23. package/dist/cjs/themeClassNames.native.js +44 -0
  24. package/dist/cjs/themeClassNames.native.js.map +1 -0
  25. package/dist/cjs/tokenCategories.cjs +79 -0
  26. package/dist/cjs/tokenCategories.native.cjs +80 -0
  27. package/dist/cjs/tokenCategories.native.js +82 -0
  28. package/dist/cjs/tokenCategories.native.js.map +1 -0
  29. package/dist/cjs/types.cjs +19 -20
  30. package/dist/cjs/types.native.cjs +37 -0
  31. package/dist/cjs/types.native.js +19 -19
  32. package/dist/cjs/types.native.js.map +1 -1
  33. package/dist/cjs/validStyleProps.cjs +240 -297
  34. package/dist/cjs/validStyleProps.native.cjs +277 -0
  35. package/dist/cjs/validStyleProps.native.js +236 -290
  36. package/dist/cjs/validStyleProps.native.js.map +1 -1
  37. package/dist/cjs/webOnlyStyleProps.cjs +85 -86
  38. package/dist/cjs/webOnlyStyleProps.native.cjs +106 -0
  39. package/dist/cjs/webOnlyStyleProps.native.js +85 -85
  40. package/dist/cjs/webOnlyStyleProps.native.js.map +1 -1
  41. package/dist/cjs/withStaticProperties.cjs +25 -30
  42. package/dist/cjs/withStaticProperties.native.cjs +38 -0
  43. package/dist/cjs/withStaticProperties.native.js +26 -30
  44. package/dist/cjs/withStaticProperties.native.js.map +1 -1
  45. package/dist/esm/clamp.mjs +2 -1
  46. package/dist/esm/clamp.mjs.map +1 -1
  47. package/dist/esm/clamp.native.js +3 -2
  48. package/dist/esm/clamp.native.js.map +1 -1
  49. package/dist/esm/composeEventHandlers.mjs +12 -14
  50. package/dist/esm/composeEventHandlers.mjs.map +1 -1
  51. package/dist/esm/composeEventHandlers.native.js +14 -17
  52. package/dist/esm/composeEventHandlers.native.js.map +1 -1
  53. package/dist/esm/index.js +21 -9
  54. package/dist/esm/index.mjs +21 -9
  55. package/dist/esm/index.native.js +21 -9
  56. package/dist/esm/reservedThemeProps.mjs +22 -0
  57. package/dist/esm/reservedThemeProps.mjs.map +1 -0
  58. package/dist/esm/reservedThemeProps.native.js +22 -0
  59. package/dist/esm/reservedThemeProps.native.js.map +1 -0
  60. package/dist/esm/shouldRenderNativePlatform.mjs +25 -19
  61. package/dist/esm/shouldRenderNativePlatform.mjs.map +1 -1
  62. package/dist/esm/shouldRenderNativePlatform.native.js +42 -42
  63. package/dist/esm/shouldRenderNativePlatform.native.js.map +1 -1
  64. package/dist/esm/themeClassNames.mjs +18 -0
  65. package/dist/esm/themeClassNames.mjs.map +1 -0
  66. package/dist/esm/themeClassNames.native.js +19 -0
  67. package/dist/esm/themeClassNames.native.js.map +1 -0
  68. package/dist/esm/tokenCategories.mjs +58 -0
  69. package/dist/esm/tokenCategories.mjs.map +1 -0
  70. package/dist/esm/tokenCategories.native.js +57 -0
  71. package/dist/esm/tokenCategories.native.js.map +1 -0
  72. package/dist/esm/types.mjs +1 -0
  73. package/dist/esm/types.mjs.map +1 -1
  74. package/dist/esm/types.native.js +1 -0
  75. package/dist/esm/types.native.js.map +1 -1
  76. package/dist/esm/validStyleProps.mjs +218 -272
  77. package/dist/esm/validStyleProps.mjs.map +1 -1
  78. package/dist/esm/validStyleProps.native.js +214 -266
  79. package/dist/esm/validStyleProps.native.js.map +1 -1
  80. package/dist/esm/webOnlyStyleProps.mjs +68 -67
  81. package/dist/esm/webOnlyStyleProps.mjs.map +1 -1
  82. package/dist/esm/webOnlyStyleProps.native.js +68 -67
  83. package/dist/esm/webOnlyStyleProps.native.js.map +1 -1
  84. package/dist/esm/withStaticProperties.mjs +11 -12
  85. package/dist/esm/withStaticProperties.mjs.map +1 -1
  86. package/dist/esm/withStaticProperties.native.js +12 -13
  87. package/dist/esm/withStaticProperties.native.js.map +1 -1
  88. package/package.json +13 -4
  89. package/src/composeEventHandlers.ts +6 -10
  90. package/src/index.ts +3 -0
  91. package/src/reservedThemeProps.ts +29 -0
  92. package/src/themeClassNames.ts +28 -0
  93. package/src/tokenCategories.ts +67 -0
  94. package/src/validStyleProps.ts +37 -79
  95. package/src/webOnlyStyleProps.ts +6 -3
  96. package/types/composeEventHandlers.d.ts.map +1 -1
  97. package/types/index.d.ts +3 -0
  98. package/types/index.d.ts.map +1 -1
  99. package/types/reservedThemeProps.d.ts +12 -0
  100. package/types/reservedThemeProps.d.ts.map +1 -0
  101. package/types/themeClassNames.d.ts +11 -0
  102. package/types/themeClassNames.d.ts.map +1 -0
  103. package/types/tokenCategories.d.ts +58 -0
  104. package/types/tokenCategories.d.ts.map +1 -0
  105. package/types/validStyleProps.d.ts +535 -560
  106. package/types/validStyleProps.d.ts.map +1 -1
  107. package/types/webOnlyStyleProps.d.ts +31 -29
  108. package/types/webOnlyStyleProps.d.ts.map +1 -1
  109. package/types/withStaticProperties.d.ts.map +1 -1
  110. package/dist/esm/index.js.map +0 -1
  111. package/dist/esm/index.mjs.map +0 -1
  112. package/dist/esm/index.native.js.map +0 -1
@@ -1,44 +1,40 @@
1
1
  "use strict";
2
2
 
3
+
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
8
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
12
13
  };
13
14
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
21
22
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
24
  var withStaticProperties_exports = {};
26
- __export(withStaticProperties_exports, {
27
- withStaticProperties: () => withStaticProperties
28
- });
25
+ __export(withStaticProperties_exports, { withStaticProperties: () => withStaticProperties });
29
26
  module.exports = __toCommonJS(withStaticProperties_exports);
30
- var Decorated = /* @__PURE__ */Symbol();
31
- var withStaticProperties = function (component, staticProps) {
32
- var out = function () {
33
- if (component[Decorated]) {
34
- return typeof component === "function" ? Object.assign(component.bind(null), component) : {
35
- ...component
36
- };
37
- }
38
- return component;
39
- }();
40
- Object.assign(out, staticProps);
41
- out[Decorated] = true;
42
- return out;
27
+ var Decorated = /* @__PURE__ */ Symbol();
28
+ var withStaticProperties = function(component, staticProps) {
29
+ var out = (function() {
30
+ if (component[Decorated]) {
31
+ return typeof component === "function" ? Object.assign(component.bind(null), component) : { ...component };
32
+ }
33
+ return component;
34
+ })();
35
+ Object.assign(out, staticProps);
36
+ out[Decorated] = true;
37
+ return out;
43
38
  };
39
+
44
40
  //# sourceMappingURL=withStaticProperties.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","withStaticProperties_exports","__export","withStaticProperties","module","exports","Decorated","Symbol","component","staticProps","out","Object","assign","bind"],"sources":["../../src/withStaticProperties.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,4BAAA;AAAAC,QAAA,CAAAD,4BAAA;EAAAE,oBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAM,CAAAC,OAAA,GAAAT,YAAY,CAAAK,4BAAO;AAIlB,IAAAK,SAAM,kBACXC,MAAA;AAGA,IAAAJ,oBAAmB,YAAAA,CAAAK,SAAA,EAAAC,WAAA;EACjB,IAAAC,GAAK,eAAkB;IAMrB,IAAAF,SAAO,CAAAF,SAAO;MAGhB,cAAAE,SAAA,kBAAAG,MAAA,CAAAC,MAAA,CAAAJ,SAAA,CAAAK,IAAA,QAAAL,SAAA;QACA,GAAOA;MACN;IAEH;IACA,OAAIA,SAAa;EAEjB;EACFG,MAAA,CAAAC,MAAA,CAAAF,GAAA,EAAAD,WAAA","ignoreList":[]}
1
+ {"version":3,"file":"withStaticProperties.native.js","names":[],"sources":["cjs/withStaticProperties.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar withStaticProperties_exports = {};\n__export(withStaticProperties_exports, {\n withStaticProperties: () => withStaticProperties\n});\nmodule.exports = __toCommonJS(withStaticProperties_exports);\nvar Decorated = /* @__PURE__ */ Symbol();\nvar withStaticProperties = function(component, staticProps) {\n var out = (function() {\n if (component[Decorated]) {\n return typeof component === \"function\" ? Object.assign(component.bind(null), component) : {\n ...component\n };\n }\n return component;\n })();\n Object.assign(out, staticProps);\n out[Decorated] = true;\n return out;\n};\n//# sourceMappingURL=withStaticProperties.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,+BAA+B,CAAC;AACpC,SAAS,8BAA8B,EACrC,4BAA4B,qBAC9B,CAAC;AACD,OAAO,UAAU,aAAa,4BAA4B;AAC1D,IAAI,YAA4B,uBAAO;AACvC,IAAI,uBAAuB,SAAS,WAAW,aAAa;CAC1D,IAAI,OAAO,WAAW;EACpB,IAAI,UAAU,YAAY;GACxB,OAAO,OAAO,cAAc,aAAa,OAAO,OAAO,UAAU,KAAK,IAAI,GAAG,SAAS,IAAI,EACxF,GAAG,UACL;EACF;EACA,OAAO;CACT,GAAG;CACH,OAAO,OAAO,KAAK,WAAW;CAC9B,IAAI,aAAa;CACjB,OAAO;AACT"}
@@ -1,5 +1,6 @@
1
1
  function clamp(value, [min, max]) {
2
- return Math.min(max, Math.max(min, value));
2
+ return Math.min(max, Math.max(min, value));
3
3
  }
4
+
4
5
  export { clamp };
5
6
  //# sourceMappingURL=clamp.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["clamp","value","min","max","Math"],"sources":["../../src/clamp.ts"],"sourcesContent":[null],"mappings":"AAAO,SAASA,MAAMC,KAAA,EAAe,CAACC,GAAA,EAAKC,GAAG,GAA6B;EACzE,OAAOC,IAAA,CAAKF,GAAA,CAAIC,GAAA,EAAKC,IAAA,CAAKD,GAAA,CAAID,GAAA,EAAKD,KAAK,CAAC;AAC3C","ignoreList":[]}
1
+ {"version":3,"file":"clamp.js","names":[],"sources":["esm/clamp.js"],"sourcesContent":["function clamp(value, [min, max]) {\n return Math.min(max, Math.max(min, value));\n}\nexport {\n clamp\n};\n//# sourceMappingURL=clamp.js.map\n"],"mappings":";AAAA,SAAS,MAAM,OAAO,CAAC,KAAK,MAAM;CAChC,OAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;AAC3C"}
@@ -1,6 +1,7 @@
1
1
  function clamp(value, param) {
2
- var [min, max] = param;
3
- return Math.min(max, Math.max(min, value));
2
+ var [min, max] = param;
3
+ return Math.min(max, Math.max(min, value));
4
4
  }
5
+
5
6
  export { clamp };
6
7
  //# sourceMappingURL=clamp.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["clamp","value","param","min","max","Math"],"sources":["../../src/clamp.ts"],"sourcesContent":[null],"mappings":"AAAO,SAASA,MAAMC,KAAA,EAAeC,KAAC,EAAK;EACzC,KAAAC,GAAO,EAAAC,GAAK,IAAIF,KAAK;EACvB,OAAAG,IAAA,CAAAF,GAAA,CAAAC,GAAA,EAAAC,IAAA,CAAAD,GAAA,CAAAD,GAAA,EAAAF,KAAA","ignoreList":[]}
1
+ {"version":3,"file":"clamp.native.js","names":[],"sources":["esm/clamp.native.js"],"sourcesContent":["function clamp(value, param) {\n var [min, max] = param;\n return Math.min(max, Math.max(min, value));\n}\nexport {\n clamp\n};\n//# sourceMappingURL=clamp.js.map\n"],"mappings":";AAAA,SAAS,MAAM,OAAO,OAAO;CAC3B,IAAI,CAAC,KAAK,OAAO;CACjB,OAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;AAC3C"}
@@ -1,17 +1,15 @@
1
- function composeEventHandlers(og, next, {
2
- checkDefaultPrevented = true
3
- } = {}) {
4
- if (!og || !next) {
5
- return next || og || void 0;
6
- }
7
- return event => {
8
- og?.(event);
9
- if (!event || !(checkDefaultPrevented && typeof event === "object" && "defaultPrevented" in event) ||
10
- // @ts-ignore
11
- "defaultPrevented" in event && !event.defaultPrevented) {
12
- return next?.(event);
13
- }
14
- };
1
+ function composeEventHandlers(og, next, { checkDefaultPrevented = true } = {}) {
2
+ if (!og || !next) {
3
+ return next || og || void 0;
4
+ }
5
+ return (event) => {
6
+ og?.(event);
7
+ const isPrevented = !!event && typeof event === "object" && ("defaultPrevented" in event && Boolean(event.defaultPrevented) || "isCanceled" in event && Boolean(event.isCanceled));
8
+ if (!event || !checkDefaultPrevented || !isPrevented) {
9
+ return next?.(event);
10
+ }
11
+ };
15
12
  }
13
+
16
14
  export { composeEventHandlers };
17
15
  //# sourceMappingURL=composeEventHandlers.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["composeEventHandlers","og","next","checkDefaultPrevented","event","defaultPrevented"],"sources":["../../src/composeEventHandlers.ts"],"sourcesContent":[null],"mappings":"AAIO,SAASA,qBACdC,EAAA,EACAC,IAAA,EACA;EAAEC,qBAAA,GAAwB;AAAK,IAAI,CAAC,GACpC;EACA,IAAI,CAACF,EAAA,IAAM,CAACC,IAAA,EAAM;IAChB,OAAOA,IAAA,IAAQD,EAAA,IAAM;EACvB;EACA,OAAQG,KAAA,IAAa;IACnBH,EAAA,GAAKG,KAAK;IACV,IACE,CAACA,KAAA,IACD,EACED,qBAAA,IACA,OAAOC,KAAA,KAAU,YACjB,sBAAsBA,KAAA;IAAA;IAGvB,sBAAsBA,KAAA,IAAS,CAACA,KAAA,CAAMC,gBAAA,EACvC;MACA,OAAOH,IAAA,GAAOE,KAAK;IACrB;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"composeEventHandlers.js","names":[],"sources":["esm/composeEventHandlers.js"],"sourcesContent":["function composeEventHandlers(og, next, { checkDefaultPrevented = true } = {}) {\n if (!og || !next) {\n return next || og || void 0;\n }\n return (event) => {\n og?.(event);\n const isPrevented = !!event && typeof event === \"object\" && (\"defaultPrevented\" in event && Boolean(event.defaultPrevented) || \"isCanceled\" in event && Boolean(event.isCanceled));\n if (!event || !checkDefaultPrevented || !isPrevented) {\n return next?.(event);\n }\n };\n}\nexport {\n composeEventHandlers\n};\n//# sourceMappingURL=composeEventHandlers.js.map\n"],"mappings":";AAAA,SAAS,qBAAqB,IAAI,MAAM,EAAE,wBAAwB,SAAS,CAAC,GAAG;CAC7E,IAAI,CAAC,MAAM,CAAC,MAAM;EAChB,OAAO,QAAQ,MAAM,KAAK;CAC5B;CACA,QAAQ,UAAU;EAChB,KAAK,KAAK;EACV,MAAM,cAAc,CAAC,CAAC,SAAS,OAAO,UAAU,aAAa,sBAAsB,SAAS,QAAQ,MAAM,gBAAgB,KAAK,gBAAgB,SAAS,QAAQ,MAAM,UAAU;EAChL,IAAI,CAAC,SAAS,CAAC,yBAAyB,CAAC,aAAa;GACpD,OAAO,OAAO,KAAK;EACrB;CACF;AACF"}
@@ -1,23 +1,20 @@
1
1
  function _type_of(obj) {
2
- "@swc/helpers - typeof";
3
-
4
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
2
+ "@swc/helpers - typeof";
3
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
5
4
  }
6
5
  function composeEventHandlers(og, next) {
7
- var {
8
- checkDefaultPrevented = true
9
- } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
10
- if (!og || !next) {
11
- return next || og || void 0;
12
- }
13
- return function (event) {
14
- og === null || og === void 0 ? void 0 : og(event);
15
- if (!event || !(checkDefaultPrevented && (typeof event === "undefined" ? "undefined" : _type_of(event)) === "object" && "defaultPrevented" in event) ||
16
- // @ts-ignore
17
- "defaultPrevented" in event && !event.defaultPrevented) {
18
- return next === null || next === void 0 ? void 0 : next(event);
19
- }
20
- };
6
+ var { checkDefaultPrevented = true } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
7
+ if (!og || !next) {
8
+ return next || og || void 0;
9
+ }
10
+ return function(event) {
11
+ og === null || og === void 0 ? void 0 : og(event);
12
+ var isPrevented = !!event && (typeof event === "undefined" ? "undefined" : _type_of(event)) === "object" && ("defaultPrevented" in event && Boolean(event.defaultPrevented) || "isCanceled" in event && Boolean(event.isCanceled));
13
+ if (!event || !checkDefaultPrevented || !isPrevented) {
14
+ return next === null || next === void 0 ? void 0 : next(event);
15
+ }
16
+ };
21
17
  }
18
+
22
19
  export { composeEventHandlers };
23
20
  //# sourceMappingURL=composeEventHandlers.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_type_of","obj","Symbol","constructor","composeEventHandlers","og","next","checkDefaultPrevented","arguments","length","event"],"sources":["../../src/composeEventHandlers.ts"],"sourcesContent":[null],"mappings":"AAIO,SAASA,SAAAC,GAAA;EAKd,uBAAkB;;EAChB,OAAAA,GAAO,WAAQC,MAAM,oBAAAD,GAAA,CAAAE,WAAA,KAAAD,MAAA,qBAAAD,GAAA;AAAA;AAEvB,SAAOG,oBAAcA,CAAAC,EAAA,EAAAC,IAAA;EACnB;IAAAC,qBAAU;EAAA,IAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;EACV,KAAAH,EACG,KAAAC,IACD,EACE;IAKD,OAAAA,IAAA,IAAAD,EAAA,SAAsB;EAEvB;EAAmB,OACrB,UAAAK,KAAA;IACFL,EAAA,aAAAA,EAAA,uBAAAA,EAAA,CAAAK,KAAA;IACF,KAAAA,KAAA,MAAAH,qBAAA,YAAAG,KAAA,iCAAAV,QAAA,CAAAU,KAAA,yCAAAA,KAAA;IAAA","ignoreList":[]}
1
+ {"version":3,"file":"composeEventHandlers.native.js","names":[],"sources":["esm/composeEventHandlers.native.js"],"sourcesContent":["function _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nfunction composeEventHandlers(og, next) {\n var { checkDefaultPrevented = true } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n if (!og || !next) {\n return next || og || void 0;\n }\n return function(event) {\n og === null || og === void 0 ? void 0 : og(event);\n var isPrevented = !!event && (typeof event === \"undefined\" ? \"undefined\" : _type_of(event)) === \"object\" && (\"defaultPrevented\" in event && Boolean(event.defaultPrevented) || \"isCanceled\" in event && Boolean(event.isCanceled));\n if (!event || !checkDefaultPrevented || !isPrevented) {\n return next === null || next === void 0 ? void 0 : next(event);\n }\n };\n}\nexport {\n composeEventHandlers\n};\n//# sourceMappingURL=composeEventHandlers.js.map\n"],"mappings":";AAAA,SAAS,SAAS,KAAK;CACrB;CACA,OAAO,OAAO,OAAO,WAAW,eAAe,IAAI,gBAAgB,SAAS,WAAW,OAAO;AAChG;AACA,SAAS,qBAAqB,IAAI,MAAM;CACtC,IAAI,EAAE,wBAAwB,SAAS,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,CAAC;CACzG,IAAI,CAAC,MAAM,CAAC,MAAM;EAChB,OAAO,QAAQ,MAAM,KAAK;CAC5B;CACA,OAAO,SAAS,OAAO;EACrB,OAAO,QAAQ,OAAO,KAAK,IAAI,KAAK,IAAI,GAAG,KAAK;EAChD,IAAI,cAAc,CAAC,CAAC,UAAU,OAAO,UAAU,cAAc,cAAc,SAAS,KAAK,OAAO,aAAa,sBAAsB,SAAS,QAAQ,MAAM,gBAAgB,KAAK,gBAAgB,SAAS,QAAQ,MAAM,UAAU;EAChO,IAAI,CAAC,SAAS,CAAC,yBAAyB,CAAC,aAAa;GACpD,OAAO,SAAS,QAAQ,SAAS,KAAK,IAAI,KAAK,IAAI,KAAK,KAAK;EAC/D;CACF;AACF"}
package/dist/esm/index.js CHANGED
@@ -1,9 +1,21 @@
1
- export * from "@tamagui/simple-hash";
2
- export * from "./clamp.mjs";
3
- export * from "./composeEventHandlers.mjs";
4
- export * from "./types.mjs";
5
- export * from "./shouldRenderNativePlatform.mjs";
6
- export * from "./validStyleProps.mjs";
7
- export * from "./withStaticProperties.mjs";
8
- export * from "./webOnlyStyleProps.mjs";
9
- //# sourceMappingURL=index.js.map
1
+ export * from "@tamagui/simple-hash"
2
+
3
+ export * from "./clamp.mjs"
4
+
5
+ export * from "./reservedThemeProps.mjs"
6
+
7
+ export * from "./themeClassNames.mjs"
8
+
9
+ export * from "./composeEventHandlers.mjs"
10
+
11
+ export * from "./types.mjs"
12
+
13
+ export * from "./shouldRenderNativePlatform.mjs"
14
+
15
+ export * from "./tokenCategories.mjs"
16
+
17
+ export * from "./validStyleProps.mjs"
18
+
19
+ export * from "./withStaticProperties.mjs"
20
+
21
+ export * from "./webOnlyStyleProps.mjs"
@@ -1,9 +1,21 @@
1
- export * from "@tamagui/simple-hash";
2
- export * from "./clamp.mjs";
3
- export * from "./composeEventHandlers.mjs";
4
- export * from "./types.mjs";
5
- export * from "./shouldRenderNativePlatform.mjs";
6
- export * from "./validStyleProps.mjs";
7
- export * from "./withStaticProperties.mjs";
8
- export * from "./webOnlyStyleProps.mjs";
9
- //# sourceMappingURL=index.mjs.map
1
+ export * from "@tamagui/simple-hash"
2
+
3
+ export * from "./clamp.mjs"
4
+
5
+ export * from "./reservedThemeProps.mjs"
6
+
7
+ export * from "./themeClassNames.mjs"
8
+
9
+ export * from "./composeEventHandlers.mjs"
10
+
11
+ export * from "./types.mjs"
12
+
13
+ export * from "./shouldRenderNativePlatform.mjs"
14
+
15
+ export * from "./tokenCategories.mjs"
16
+
17
+ export * from "./validStyleProps.mjs"
18
+
19
+ export * from "./withStaticProperties.mjs"
20
+
21
+ export * from "./webOnlyStyleProps.mjs"
@@ -1,9 +1,21 @@
1
- export * from "@tamagui/simple-hash";
2
- export * from "./clamp.native.js";
3
- export * from "./composeEventHandlers.native.js";
4
- export * from "./types.native.js";
5
- export * from "./shouldRenderNativePlatform.native.js";
6
- export * from "./validStyleProps.native.js";
7
- export * from "./withStaticProperties.native.js";
8
- export * from "./webOnlyStyleProps.native.js";
9
- //# sourceMappingURL=index.native.js.map
1
+ export * from "@tamagui/simple-hash"
2
+
3
+ export * from "./clamp.native.js"
4
+
5
+ export * from "./reservedThemeProps.native.js"
6
+
7
+ export * from "./themeClassNames.native.js"
8
+
9
+ export * from "./composeEventHandlers.native.js"
10
+
11
+ export * from "./types.native.js"
12
+
13
+ export * from "./shouldRenderNativePlatform.native.js"
14
+
15
+ export * from "./tokenCategories.native.js"
16
+
17
+ export * from "./validStyleProps.native.js"
18
+
19
+ export * from "./withStaticProperties.native.js"
20
+
21
+ export * from "./webOnlyStyleProps.native.js"
@@ -0,0 +1,22 @@
1
+ const reservedThemeProps = {
2
+ _isRoot: true,
3
+ children: true,
4
+ className: true,
5
+ contain: true,
6
+ debug: true,
7
+ deopt: true,
8
+ disable: true,
9
+ "disable-child-theme": true,
10
+ forceClassName: true,
11
+ inlineClassName: true,
12
+ inlineValues: true,
13
+ name: true,
14
+ nativeUpdate: true,
15
+ needsUpdate: true,
16
+ passThrough: true,
17
+ reset: true,
18
+ shallow: true
19
+ };
20
+
21
+ export { reservedThemeProps };
22
+ //# sourceMappingURL=reservedThemeProps.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reservedThemeProps.js","names":[],"sources":["esm/reservedThemeProps.js"],"sourcesContent":["const reservedThemeProps = {\n _isRoot: true,\n children: true,\n className: true,\n contain: true,\n debug: true,\n deopt: true,\n disable: true,\n \"disable-child-theme\": true,\n forceClassName: true,\n inlineClassName: true,\n inlineValues: true,\n name: true,\n nativeUpdate: true,\n needsUpdate: true,\n passThrough: true,\n reset: true,\n shallow: true\n};\nexport {\n reservedThemeProps\n};\n//# sourceMappingURL=reservedThemeProps.js.map\n"],"mappings":";AAAA,MAAM,qBAAqB;CACzB,SAAS;CACT,UAAU;CACV,WAAW;CACX,SAAS;CACT,OAAO;CACP,OAAO;CACP,SAAS;CACT,uBAAuB;CACvB,gBAAgB;CAChB,iBAAiB;CACjB,cAAc;CACd,MAAM;CACN,cAAc;CACd,aAAa;CACb,aAAa;CACb,OAAO;CACP,SAAS;AACX"}
@@ -0,0 +1,22 @@
1
+ var reservedThemeProps = {
2
+ _isRoot: true,
3
+ children: true,
4
+ className: true,
5
+ contain: true,
6
+ debug: true,
7
+ deopt: true,
8
+ disable: true,
9
+ "disable-child-theme": true,
10
+ forceClassName: true,
11
+ inlineClassName: true,
12
+ inlineValues: true,
13
+ name: true,
14
+ nativeUpdate: true,
15
+ needsUpdate: true,
16
+ passThrough: true,
17
+ reset: true,
18
+ shallow: true
19
+ };
20
+
21
+ export { reservedThemeProps };
22
+ //# sourceMappingURL=reservedThemeProps.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reservedThemeProps.native.js","names":[],"sources":["esm/reservedThemeProps.native.js"],"sourcesContent":["var reservedThemeProps = {\n _isRoot: true,\n children: true,\n className: true,\n contain: true,\n debug: true,\n deopt: true,\n disable: true,\n \"disable-child-theme\": true,\n forceClassName: true,\n inlineClassName: true,\n inlineValues: true,\n name: true,\n nativeUpdate: true,\n needsUpdate: true,\n passThrough: true,\n reset: true,\n shallow: true\n};\nexport {\n reservedThemeProps\n};\n//# sourceMappingURL=reservedThemeProps.js.map\n"],"mappings":";AAAA,IAAI,qBAAqB;CACvB,SAAS;CACT,UAAU;CACV,WAAW;CACX,SAAS;CACT,OAAO;CACP,OAAO;CACP,SAAS;CACT,uBAAuB;CACvB,gBAAgB;CAChB,iBAAiB;CACjB,cAAc;CACd,MAAM;CACN,cAAc;CACd,aAAa;CACb,aAAa;CACb,OAAO;CACP,SAAS;AACX"}
@@ -1,26 +1,32 @@
1
1
  import { currentPlatform } from "@tamagui/constants";
2
- const ALL_PLATFORMS = ["web", "android", "ios"];
2
+
3
+ const ALL_PLATFORMS = [
4
+ "web",
5
+ "android",
6
+ "ios"
7
+ ];
3
8
  function shouldRenderNativePlatform(nativeProp) {
4
- if (!nativeProp) {
5
- return null;
6
- }
7
- const userRequestedPlatforms = resolvePlatformNames(nativeProp);
8
- for (const platform of ALL_PLATFORMS) {
9
- if (platform === currentPlatform && userRequestedPlatforms.has(platform)) {
10
- return platform;
11
- }
12
- }
13
- return null;
9
+ if (!nativeProp) {
10
+ return null;
11
+ }
12
+ const userRequestedPlatforms = resolvePlatformNames(nativeProp);
13
+ for (const platform of ALL_PLATFORMS) {
14
+ if (platform === currentPlatform && userRequestedPlatforms.has(platform)) {
15
+ return platform;
16
+ }
17
+ }
18
+ return null;
14
19
  }
15
20
  function resolvePlatformNames(nativeProp) {
16
- const platforms = nativeProp === true ? ALL_PLATFORMS : nativeProp === false ? [] : Array.isArray(nativeProp) ? nativeProp : [nativeProp];
17
- const set = new Set(platforms);
18
- if (set.has("mobile")) {
19
- set.add("android");
20
- set.add("ios");
21
- set.delete("mobile");
22
- }
23
- return set;
21
+ const platforms = nativeProp === true ? ALL_PLATFORMS : nativeProp === false ? [] : Array.isArray(nativeProp) ? nativeProp : [nativeProp];
22
+ const set = new Set(platforms);
23
+ if (set.has("mobile")) {
24
+ set.add("android");
25
+ set.add("ios");
26
+ set.delete("mobile");
27
+ }
28
+ return set;
24
29
  }
30
+
25
31
  export { shouldRenderNativePlatform };
26
32
  //# sourceMappingURL=shouldRenderNativePlatform.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["currentPlatform","ALL_PLATFORMS","shouldRenderNativePlatform","nativeProp","userRequestedPlatforms","resolvePlatformNames","platform","has","platforms","Array","isArray","set","Set","add","delete"],"sources":["../../src/shouldRenderNativePlatform.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,eAAA,QAAuB;AAuBhC,MAAMC,aAAA,GAA0C,CAAC,OAAO,WAAW,KAAK;AAajE,SAASC,2BAA2BC,UAAA,EAA0B;EACnE,IAAI,CAACA,UAAA,EAAY;IACf,OAAO;EACT;EACA,MAAMC,sBAAA,GAAyBC,oBAAA,CAAqBF,UAAU;EAE9D,WAAWG,QAAA,IAAYL,aAAA,EAAe;IACpC,IAAIK,QAAA,KAAaN,eAAA,IAAmBI,sBAAA,CAAuBG,GAAA,CAAID,QAAQ,GAAG;MACxE,OAAOA,QAAA;IACT;EACF;EAEA,OAAO;AACT;AAEA,SAASD,qBAAqBF,UAAA,EAAyB;EACrD,MAAMK,SAAA,GACJL,UAAA,KAAe,OACXF,aAAA,GACAE,UAAA,KAAe,QACb,EAAC,GACDM,KAAA,CAAMC,OAAA,CAAQP,UAAU,IACtBA,UAAA,GACA,CAACA,UAAU;EACrB,MAAMQ,GAAA,GAAM,IAAIC,GAAA,CAAIJ,SAAS;EAE7B,IAAIG,GAAA,CAAIJ,GAAA,CAAI,QAAQ,GAAG;IAErBI,GAAA,CAAIE,GAAA,CAAI,SAAS;IACjBF,GAAA,CAAIE,GAAA,CAAI,KAAK;IACbF,GAAA,CAAIG,MAAA,CAAO,QAAQ;EACrB;EACA,OAAOH,GAAA;AACT","ignoreList":[]}
1
+ {"version":3,"file":"shouldRenderNativePlatform.js","names":[],"sources":["esm/shouldRenderNativePlatform.js"],"sourcesContent":["import { currentPlatform } from \"@tamagui/constants\";\nconst ALL_PLATFORMS = [\"web\", \"android\", \"ios\"];\nfunction shouldRenderNativePlatform(nativeProp) {\n if (!nativeProp) {\n return null;\n }\n const userRequestedPlatforms = resolvePlatformNames(nativeProp);\n for (const platform of ALL_PLATFORMS) {\n if (platform === currentPlatform && userRequestedPlatforms.has(platform)) {\n return platform;\n }\n }\n return null;\n}\nfunction resolvePlatformNames(nativeProp) {\n const platforms = nativeProp === true ? ALL_PLATFORMS : nativeProp === false ? [] : Array.isArray(nativeProp) ? nativeProp : [nativeProp];\n const set = new Set(platforms);\n if (set.has(\"mobile\")) {\n set.add(\"android\");\n set.add(\"ios\");\n set.delete(\"mobile\");\n }\n return set;\n}\nexport {\n shouldRenderNativePlatform\n};\n//# sourceMappingURL=shouldRenderNativePlatform.js.map\n"],"mappings":";;;AACA,MAAM,gBAAgB;CAAC;CAAO;CAAW;AAAK;AAC9C,SAAS,2BAA2B,YAAY;CAC9C,IAAI,CAAC,YAAY;EACf,OAAO;CACT;CACA,MAAM,yBAAyB,qBAAqB,UAAU;CAC9D,KAAK,MAAM,YAAY,eAAe;EACpC,IAAI,aAAa,mBAAmB,uBAAuB,IAAI,QAAQ,GAAG;GACxE,OAAO;EACT;CACF;CACA,OAAO;AACT;AACA,SAAS,qBAAqB,YAAY;CACxC,MAAM,YAAY,eAAe,OAAO,gBAAgB,eAAe,QAAQ,CAAC,IAAI,MAAM,QAAQ,UAAU,IAAI,aAAa,CAAC,UAAU;CACxI,MAAM,MAAM,IAAI,IAAI,SAAS;CAC7B,IAAI,IAAI,IAAI,QAAQ,GAAG;EACrB,IAAI,IAAI,SAAS;EACjB,IAAI,IAAI,KAAK;EACb,IAAI,OAAO,QAAQ;CACrB;CACA,OAAO;AACT"}
@@ -1,49 +1,49 @@
1
1
  import { currentPlatform } from "@tamagui/constants";
2
- var ALL_PLATFORMS = ["web", "android", "ios"];
2
+
3
+ var ALL_PLATFORMS = [
4
+ "web",
5
+ "android",
6
+ "ios"
7
+ ];
3
8
  function shouldRenderNativePlatform(nativeProp) {
4
- if (!nativeProp) {
5
- return null;
6
- }
7
- var userRequestedPlatforms = resolvePlatformNames(nativeProp);
8
- var _iteratorNormalCompletion = true,
9
- _didIteratorError = false,
10
- _iteratorError = void 0;
11
- try {
12
- for (var _iterator = ALL_PLATFORMS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
13
- var platform = _step.value;
14
- if (platform === currentPlatform && userRequestedPlatforms.has(platform)) {
15
- return platform;
16
- }
17
- }
18
- } catch (err) {
19
- _didIteratorError = true;
20
- _iteratorError = err;
21
- } finally {
22
- try {
23
- if (!_iteratorNormalCompletion && _iterator.return != null) {
24
- _iterator.return();
25
- }
26
- } finally {
27
- if (_didIteratorError) {
28
- throw _iteratorError;
29
- }
30
- }
31
- }
32
- return null;
9
+ if (!nativeProp) {
10
+ return null;
11
+ }
12
+ var userRequestedPlatforms = resolvePlatformNames(nativeProp);
13
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
14
+ try {
15
+ for (var _iterator = ALL_PLATFORMS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
16
+ var platform = _step.value;
17
+ if (platform === currentPlatform && userRequestedPlatforms.has(platform)) {
18
+ return platform;
19
+ }
20
+ }
21
+ } catch (err) {
22
+ _didIteratorError = true;
23
+ _iteratorError = err;
24
+ } finally {
25
+ try {
26
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
27
+ _iterator.return();
28
+ }
29
+ } finally {
30
+ if (_didIteratorError) {
31
+ throw _iteratorError;
32
+ }
33
+ }
34
+ }
35
+ return null;
33
36
  }
34
37
  function resolvePlatformNames(nativeProp) {
35
- var platforms = nativeProp === true ?
36
- // all native platforms
37
- ALL_PLATFORMS : nativeProp === false ?
38
- // no native platform
39
- [] : Array.isArray(nativeProp) ? nativeProp : [nativeProp];
40
- var set = new Set(platforms);
41
- if (set.has("mobile")) {
42
- set.add("android");
43
- set.add("ios");
44
- set.delete("mobile");
45
- }
46
- return set;
38
+ var platforms = nativeProp === true ? ALL_PLATFORMS : nativeProp === false ? [] : Array.isArray(nativeProp) ? nativeProp : [nativeProp];
39
+ var set = new Set(platforms);
40
+ if (set.has("mobile")) {
41
+ set.add("android");
42
+ set.add("ios");
43
+ set.delete("mobile");
44
+ }
45
+ return set;
47
46
  }
47
+
48
48
  export { shouldRenderNativePlatform };
49
49
  //# sourceMappingURL=shouldRenderNativePlatform.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["currentPlatform","ALL_PLATFORMS","shouldRenderNativePlatform","nativeProp","userRequestedPlatforms","resolvePlatformNames","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","platform","value","has","err"],"sources":["../../src/shouldRenderNativePlatform.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,eAAA,QAAuB;AAuBhC,IAAAC,aAAM,IAaC,OACL,SAAK,EACH,MAAO;AAET,SAAMC,0BAAyBA,CAAAC,UAAA;EAE/B,KAAAA,UAAW;IACT,OAAI;EACF;EAAO,IACTC,sBAAA,GAAAC,oBAAA,CAAAF,UAAA;EACF,IAAAG,yBAAA;IAAAC,iBAAA;IAAAC,cAAA;EAEA;IACF,SAAAC,SAAA,GAAAR,aAAA,CAAAS,MAAA,CAAAC,QAAA,KAAAC,KAAA,IAAAN,yBAAA,IAAAM,KAAA,GAAAH,SAAA,CAAAI,IAAA,IAAAC,IAAA,GAAAR,yBAAA;MAEA,IAASS,QAAA,GAAAH,KAAA,CAAAI,KAAqB;MAC5B,IAAMD,QAAA,KACJf,eAAe,IACXI,sBACA,CAAAa,GAAA,CAAAF,QAAe;QAKf,OAAMA,QAAQ;MAEhB;IAEF;EACA,SAAIG,GAAI;IACRX,iBAAW,GAAQ;IACrBC,cAAA,GAAAU,GAAA;EACA,UAAO;IACT","ignoreList":[]}
1
+ {"version":3,"file":"shouldRenderNativePlatform.native.js","names":[],"sources":["esm/shouldRenderNativePlatform.native.js"],"sourcesContent":["import { currentPlatform } from \"@tamagui/constants\";\nvar ALL_PLATFORMS = [\n \"web\",\n \"android\",\n \"ios\"\n];\nfunction shouldRenderNativePlatform(nativeProp) {\n if (!nativeProp) {\n return null;\n }\n var userRequestedPlatforms = resolvePlatformNames(nativeProp);\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = ALL_PLATFORMS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var platform = _step.value;\n if (platform === currentPlatform && userRequestedPlatforms.has(platform)) {\n return platform;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return null;\n}\nfunction resolvePlatformNames(nativeProp) {\n var platforms = nativeProp === true ? (\n // all native platforms\n ALL_PLATFORMS\n ) : nativeProp === false ? (\n // no native platform\n []\n ) : Array.isArray(nativeProp) ? nativeProp : [\n nativeProp\n ];\n var set = new Set(platforms);\n if (set.has(\"mobile\")) {\n set.add(\"android\");\n set.add(\"ios\");\n set.delete(\"mobile\");\n }\n return set;\n}\nexport {\n shouldRenderNativePlatform\n};\n//# sourceMappingURL=shouldRenderNativePlatform.js.map\n"],"mappings":";;;AACA,IAAI,gBAAgB;CAClB;CACA;CACA;AACF;AACA,SAAS,2BAA2B,YAAY;CAC9C,IAAI,CAAC,YAAY;EACf,OAAO;CACT;CACA,IAAI,yBAAyB,qBAAqB,UAAU;CAC5D,IAAI,4BAA4B,MAAM,oBAAoB,OAAO,iBAAiB,KAAK;CACvF,IAAI;EACF,KAAK,IAAI,YAAY,cAAc,OAAO,UAAU,GAAG,OAAO,EAAE,6BAA6B,QAAQ,UAAU,KAAK,GAAG,OAAO,4BAA4B,MAAM;GAC9J,IAAI,WAAW,MAAM;GACrB,IAAI,aAAa,mBAAmB,uBAAuB,IAAI,QAAQ,GAAG;IACxE,OAAO;GACT;EACF;CACF,SAAS,KAAK;EACZ,oBAAoB;EACpB,iBAAiB;CACnB,UAAU;EACR,IAAI;GACF,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM;IAC1D,UAAU,OAAO;GACnB;EACF,UAAU;GACR,IAAI,mBAAmB;IACrB,MAAM;GACR;EACF;CACF;CACA,OAAO;AACT;AACA,SAAS,qBAAqB,YAAY;CACxC,IAAI,YAAY,eAAe,OAE7B,gBACE,eAAe,QAEjB,CAAC,IACC,MAAM,QAAQ,UAAU,IAAI,aAAa,CAC3C,UACF;CACA,IAAI,MAAM,IAAI,IAAI,SAAS;CAC3B,IAAI,IAAI,IAAI,QAAQ,GAAG;EACrB,IAAI,IAAI,SAAS;EACjB,IAAI,IAAI,KAAK;EACb,IAAI,OAAO,QAAQ;CACrB;CACA,OAAO;AACT"}
@@ -0,0 +1,18 @@
1
+ const schemePrefix = /^(dark|light)_/;
2
+ function getThemeClassNames(name, isRoot = false) {
3
+ const themeClassName = name.replace(schemePrefix, "");
4
+ const fullThemeClassName = name === themeClassName ? "" : ` t_${name}`;
5
+ const themeNameParts = themeClassName.split("_");
6
+ let themeClasses = `t_${themeClassName}${fullThemeClassName}`;
7
+ if (themeNameParts.length > 1) {
8
+ const hierarchyClasses = [];
9
+ for (let i = 1; i <= themeNameParts.length; i++) {
10
+ hierarchyClasses.push(`t_${themeNameParts.slice(0, i).join("_")}`);
11
+ }
12
+ themeClasses = `${hierarchyClasses.join(" ")}${fullThemeClassName}`;
13
+ }
14
+ return `${isRoot ? "" : "t_sub_theme"} ${themeClasses}`;
15
+ }
16
+
17
+ export { getThemeClassNames };
18
+ //# sourceMappingURL=themeClassNames.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themeClassNames.js","names":[],"sources":["esm/themeClassNames.js"],"sourcesContent":["const schemePrefix = /^(dark|light)_/;\nfunction getThemeClassNames(name, isRoot = false) {\n const themeClassName = name.replace(schemePrefix, \"\");\n const fullThemeClassName = name === themeClassName ? \"\" : ` t_${name}`;\n const themeNameParts = themeClassName.split(\"_\");\n let themeClasses = `t_${themeClassName}${fullThemeClassName}`;\n if (themeNameParts.length > 1) {\n const hierarchyClasses = [];\n for (let i = 1; i <= themeNameParts.length; i++) {\n hierarchyClasses.push(`t_${themeNameParts.slice(0, i).join(\"_\")}`);\n }\n themeClasses = `${hierarchyClasses.join(\" \")}${fullThemeClassName}`;\n }\n return `${isRoot ? \"\" : \"t_sub_theme\"} ${themeClasses}`;\n}\nexport {\n getThemeClassNames\n};\n//# sourceMappingURL=themeClassNames.js.map\n"],"mappings":";AAAA,MAAM,eAAe;AACrB,SAAS,mBAAmB,MAAM,SAAS,OAAO;CAChD,MAAM,iBAAiB,KAAK,QAAQ,cAAc,EAAE;CACpD,MAAM,qBAAqB,SAAS,iBAAiB,KAAK,MAAM;CAChE,MAAM,iBAAiB,eAAe,MAAM,GAAG;CAC/C,IAAI,eAAe,KAAK,iBAAiB;CACzC,IAAI,eAAe,SAAS,GAAG;EAC7B,MAAM,mBAAmB,CAAC;EAC1B,KAAK,IAAI,IAAI,GAAG,KAAK,eAAe,QAAQ,KAAK;GAC/C,iBAAiB,KAAK,KAAK,eAAe,MAAM,GAAG,CAAC,EAAE,KAAK,GAAG,GAAG;EACnE;EACA,eAAe,GAAG,iBAAiB,KAAK,GAAG,IAAI;CACjD;CACA,OAAO,GAAG,SAAS,KAAK,cAAc,GAAG;AAC3C"}
@@ -0,0 +1,19 @@
1
+ var schemePrefix = /^(dark|light)_/;
2
+ function getThemeClassNames(name) {
3
+ var isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
4
+ var themeClassName = name.replace(schemePrefix, "");
5
+ var fullThemeClassName = name === themeClassName ? "" : ` t_${name}`;
6
+ var themeNameParts = themeClassName.split("_");
7
+ var themeClasses = `t_${themeClassName}${fullThemeClassName}`;
8
+ if (themeNameParts.length > 1) {
9
+ var hierarchyClasses = [];
10
+ for (var i = 1; i <= themeNameParts.length; i++) {
11
+ hierarchyClasses.push(`t_${themeNameParts.slice(0, i).join("_")}`);
12
+ }
13
+ themeClasses = `${hierarchyClasses.join(" ")}${fullThemeClassName}`;
14
+ }
15
+ return `${isRoot ? "" : "t_sub_theme"} ${themeClasses}`;
16
+ }
17
+
18
+ export { getThemeClassNames };
19
+ //# sourceMappingURL=themeClassNames.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themeClassNames.native.js","names":[],"sources":["esm/themeClassNames.native.js"],"sourcesContent":["var schemePrefix = /^(dark|light)_/;\nfunction getThemeClassNames(name) {\n var isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n var themeClassName = name.replace(schemePrefix, \"\");\n var fullThemeClassName = name === themeClassName ? \"\" : ` t_${name}`;\n var themeNameParts = themeClassName.split(\"_\");\n var themeClasses = `t_${themeClassName}${fullThemeClassName}`;\n if (themeNameParts.length > 1) {\n var hierarchyClasses = [];\n for (var i = 1; i <= themeNameParts.length; i++) {\n hierarchyClasses.push(`t_${themeNameParts.slice(0, i).join(\"_\")}`);\n }\n themeClasses = `${hierarchyClasses.join(\" \")}${fullThemeClassName}`;\n }\n return `${isRoot ? \"\" : \"t_sub_theme\"} ${themeClasses}`;\n}\nexport {\n getThemeClassNames\n};\n//# sourceMappingURL=themeClassNames.js.map\n"],"mappings":";AAAA,IAAI,eAAe;AACnB,SAAS,mBAAmB,MAAM;CAChC,IAAI,SAAS,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK;CAC9E,IAAI,iBAAiB,KAAK,QAAQ,cAAc,EAAE;CAClD,IAAI,qBAAqB,SAAS,iBAAiB,KAAK,MAAM;CAC9D,IAAI,iBAAiB,eAAe,MAAM,GAAG;CAC7C,IAAI,eAAe,KAAK,iBAAiB;CACzC,IAAI,eAAe,SAAS,GAAG;EAC7B,IAAI,mBAAmB,CAAC;EACxB,KAAK,IAAI,IAAI,GAAG,KAAK,eAAe,QAAQ,KAAK;GAC/C,iBAAiB,KAAK,KAAK,eAAe,MAAM,GAAG,CAAC,EAAE,KAAK,GAAG,GAAG;EACnE;EACA,eAAe,GAAG,iBAAiB,KAAK,GAAG,IAAI;CACjD;CACA,OAAO,GAAG,SAAS,KAAK,cAAc,GAAG;AAC3C"}