@tamagui/react-native-web-internals 1.114.4 → 1.115.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 (198) hide show
  1. package/dist/cjs/StyleSheet/__tests__/{compiler-createReactDOMStyle-test.js → compiler-createReactDOMStyle-test.cjs} +98 -50
  2. package/dist/cjs/StyleSheet/__tests__/{compiler-test.js → compiler-test.cjs} +158 -129
  3. package/dist/cjs/StyleSheet/__tests__/{dom-createOrderedCSSStyleSheet-test.js → dom-createOrderedCSSStyleSheet-test.cjs} +23 -19
  4. package/dist/cjs/StyleSheet/__tests__/{index-test.js → index-test.cjs} +173 -116
  5. package/dist/cjs/StyleSheet/__tests__/preprocess-test.cjs +108 -0
  6. package/dist/cjs/StyleSheet/__tests__/validate-test.cjs +36 -0
  7. package/dist/cjs/StyleSheet/compiler/createReactDOMStyle.cjs +99 -0
  8. package/dist/cjs/StyleSheet/compiler/hash.cjs +26 -0
  9. package/dist/cjs/StyleSheet/compiler/hyphenateStyleName.cjs +37 -0
  10. package/dist/cjs/StyleSheet/compiler/index.cjs +329 -0
  11. package/dist/cjs/StyleSheet/compiler/{normalizeColor.js → normalizeColor.cjs} +30 -20
  12. package/dist/cjs/StyleSheet/compiler/{normalizeValueWithProperty.js → normalizeValueWithProperty.cjs} +24 -15
  13. package/dist/cjs/StyleSheet/compiler/resolveShadowValue.cjs +60 -0
  14. package/dist/cjs/StyleSheet/dom/createCSSStyleSheet.cjs +48 -0
  15. package/dist/cjs/StyleSheet/dom/{createOrderedCSSStyleSheet.js → createOrderedCSSStyleSheet.cjs} +36 -20
  16. package/dist/cjs/StyleSheet/dom/index.cjs +78 -0
  17. package/dist/cjs/StyleSheet/{index.js → index.cjs} +24 -19
  18. package/dist/cjs/StyleSheet/preprocess.cjs +112 -0
  19. package/dist/cjs/StyleSheet/validate.cjs +69 -0
  20. package/dist/cjs/TextAncestorContext.cjs +29 -0
  21. package/dist/cjs/{colorProps.js → colorProps.cjs} +16 -11
  22. package/dist/cjs/index.cjs +113 -0
  23. package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.cjs +50 -0
  24. package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.cjs +40 -0
  25. package/dist/cjs/modules/AccessibilityUtil/{index.js → index.cjs} +25 -15
  26. package/dist/cjs/modules/AccessibilityUtil/isDisabled.cjs +27 -0
  27. package/dist/cjs/modules/AccessibilityUtil/propsToAccessibilityComponent.cjs +69 -0
  28. package/dist/cjs/modules/AccessibilityUtil/propsToAriaRole.cjs +48 -0
  29. package/dist/cjs/modules/AssetRegistry/{index.js → index.cjs} +16 -11
  30. package/dist/cjs/modules/ImageLoader/index.cjs +112 -0
  31. package/dist/cjs/modules/{InteractionManager.js → InteractionManager.cjs} +26 -20
  32. package/dist/cjs/modules/Platform/__tests__/index-test.cjs +48 -0
  33. package/dist/cjs/modules/Platform/index.cjs +31 -0
  34. package/dist/cjs/modules/TextInputState/{index.js → index.cjs} +23 -15
  35. package/dist/cjs/modules/UIManager/__tests__/{index-test.js → index-test.cjs} +56 -32
  36. package/dist/cjs/modules/UIManager/index.cjs +138 -0
  37. package/dist/cjs/modules/canUseDOM.cjs +28 -0
  38. package/dist/cjs/modules/createDOMProps/__tests__/index-test.cjs +156 -0
  39. package/dist/cjs/modules/createDOMProps/index.cjs +138 -0
  40. package/dist/cjs/modules/createEventHandle/__tests__/index-test.cjs +344 -0
  41. package/dist/cjs/modules/createEventHandle/{index.js → index.cjs} +38 -34
  42. package/dist/cjs/modules/dismissKeyboard/{index.js → index.cjs} +23 -15
  43. package/dist/cjs/modules/forwardedProps/index.cjs +160 -0
  44. package/dist/cjs/modules/getBoundingClientRect/index.cjs +29 -0
  45. package/dist/cjs/modules/invariant.cjs +36 -0
  46. package/dist/cjs/modules/isSelectionValid/index.cjs +35 -0
  47. package/dist/cjs/modules/isWebColor/index.cjs +27 -0
  48. package/dist/cjs/modules/mergeRefs/__tests__/index-test.cjs +42 -0
  49. package/dist/cjs/modules/mergeRefs/index.cjs +42 -0
  50. package/dist/cjs/modules/modality/__tests__/{index-test.js → index-test.cjs} +20 -8
  51. package/dist/cjs/modules/modality/{index.js → index.cjs} +75 -19
  52. package/dist/cjs/modules/multiplyStyleLengthValue/__tests__/{index-test.js → index-test.cjs} +16 -14
  53. package/dist/cjs/modules/multiplyStyleLengthValue/index.cjs +36 -0
  54. package/dist/cjs/modules/normalizeColor/{index.js → index.cjs} +29 -18
  55. package/dist/cjs/modules/pick/index.cjs +30 -0
  56. package/dist/cjs/modules/processColor/__tests__/{index-test.js → index-test.cjs} +17 -15
  57. package/dist/cjs/modules/processColor/{index.js → index.cjs} +25 -19
  58. package/dist/cjs/modules/requestIdleCallback/index.cjs +56 -0
  59. package/dist/cjs/modules/setValueForStyles/{dangerousStyleValue.js → dangerousStyleValue.cjs} +23 -15
  60. package/dist/cjs/modules/setValueForStyles/{index.js → index.cjs} +26 -18
  61. package/dist/cjs/modules/unitlessNumbers/index.cjs +87 -0
  62. package/dist/cjs/modules/useElementLayout/{index.js → index.cjs} +40 -23
  63. package/dist/cjs/modules/useEvent/__tests__/{index-test.js → index-test.cjs} +218 -99
  64. package/dist/cjs/modules/useEvent/index.cjs +56 -0
  65. package/dist/cjs/modules/useHover/__tests__/{index-test.js → index-test.cjs} +118 -40
  66. package/dist/cjs/modules/useHover/index.cjs +108 -0
  67. package/dist/cjs/modules/useLayoutEffect/{index.js → index.cjs} +24 -15
  68. package/dist/cjs/modules/useLocale/index.cjs +66 -0
  69. package/dist/cjs/modules/useLocale/{isLocaleRTL.js → isLocaleRTL.cjs} +23 -31
  70. package/dist/cjs/modules/useMergeRefs/__tests__/index-test.cjs +102 -0
  71. package/dist/cjs/modules/useMergeRefs/index.cjs +43 -0
  72. package/dist/cjs/modules/usePlatformMethods/index.cjs +48 -0
  73. package/dist/cjs/modules/useStable/__tests__/{index-test.js → index-test.cjs} +46 -23
  74. package/dist/cjs/modules/useStable/{index.js → index.cjs} +22 -14
  75. package/dist/cjs/styleTypes.cjs +16 -0
  76. package/dist/cjs/types.cjs +16 -0
  77. package/package.json +9 -8
  78. package/dist/cjs/StyleSheet/__tests__/preprocess-test.js +0 -77
  79. package/dist/cjs/StyleSheet/__tests__/validate-test.js +0 -18
  80. package/dist/cjs/StyleSheet/compiler/createReactDOMStyle.js +0 -121
  81. package/dist/cjs/StyleSheet/compiler/hash.js +0 -21
  82. package/dist/cjs/StyleSheet/compiler/hyphenateStyleName.js +0 -31
  83. package/dist/cjs/StyleSheet/compiler/index.js +0 -253
  84. package/dist/cjs/StyleSheet/compiler/resolveShadowValue.js +0 -35
  85. package/dist/cjs/StyleSheet/dom/createCSSStyleSheet.js +0 -44
  86. package/dist/cjs/StyleSheet/dom/index.js +0 -74
  87. package/dist/cjs/StyleSheet/preprocess.js +0 -67
  88. package/dist/cjs/StyleSheet/validate.js +0 -66
  89. package/dist/cjs/TextAncestorContext.js +0 -24
  90. package/dist/cjs/index.js +0 -73
  91. package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.js +0 -46
  92. package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.js +0 -30
  93. package/dist/cjs/modules/AccessibilityUtil/isDisabled.js +0 -22
  94. package/dist/cjs/modules/AccessibilityUtil/propsToAccessibilityComponent.js +0 -60
  95. package/dist/cjs/modules/AccessibilityUtil/propsToAriaRole.js +0 -43
  96. package/dist/cjs/modules/ImageLoader/index.js +0 -102
  97. package/dist/cjs/modules/Platform/__tests__/index-test.js +0 -46
  98. package/dist/cjs/modules/Platform/index.js +0 -26
  99. package/dist/cjs/modules/UIManager/index.js +0 -101
  100. package/dist/cjs/modules/canUseDOM.js +0 -23
  101. package/dist/cjs/modules/createDOMProps/__tests__/index-test.js +0 -106
  102. package/dist/cjs/modules/createDOMProps/index.js +0 -121
  103. package/dist/cjs/modules/createEventHandle/__tests__/index-test.js +0 -242
  104. package/dist/cjs/modules/forwardedProps/index.js +0 -145
  105. package/dist/cjs/modules/getBoundingClientRect/index.js +0 -25
  106. package/dist/cjs/modules/invariant.js +0 -35
  107. package/dist/cjs/modules/isSelectionValid/index.js +0 -27
  108. package/dist/cjs/modules/isWebColor/index.js +0 -22
  109. package/dist/cjs/modules/mergeRefs/__tests__/index-test.js +0 -34
  110. package/dist/cjs/modules/mergeRefs/index.js +0 -41
  111. package/dist/cjs/modules/multiplyStyleLengthValue/index.js +0 -28
  112. package/dist/cjs/modules/pick/index.js +0 -26
  113. package/dist/cjs/modules/requestIdleCallback/index.js +0 -44
  114. package/dist/cjs/modules/unitlessNumbers/index.js +0 -80
  115. package/dist/cjs/modules/useEvent/index.js +0 -45
  116. package/dist/cjs/modules/useHover/index.js +0 -81
  117. package/dist/cjs/modules/useLocale/index.js +0 -54
  118. package/dist/cjs/modules/useMergeRefs/__tests__/index-test.js +0 -68
  119. package/dist/cjs/modules/useMergeRefs/index.js +0 -36
  120. package/dist/cjs/modules/usePlatformMethods/index.js +0 -39
  121. package/dist/cjs/styleTypes.js +0 -14
  122. package/dist/cjs/types.js +0 -14
  123. /package/dist/cjs/StyleSheet/__tests__/{compiler-createReactDOMStyle-test.js.map → compiler-createReactDOMStyle-test.cjs.map} +0 -0
  124. /package/dist/cjs/StyleSheet/__tests__/{compiler-test.js.map → compiler-test.cjs.map} +0 -0
  125. /package/dist/cjs/StyleSheet/__tests__/{dom-createOrderedCSSStyleSheet-test.js.map → dom-createOrderedCSSStyleSheet-test.cjs.map} +0 -0
  126. /package/dist/cjs/StyleSheet/__tests__/{index-test.js.map → index-test.cjs.map} +0 -0
  127. /package/dist/cjs/StyleSheet/__tests__/{preprocess-test.js.map → preprocess-test.cjs.map} +0 -0
  128. /package/dist/cjs/StyleSheet/__tests__/{validate-test.js.map → validate-test.cjs.map} +0 -0
  129. /package/dist/cjs/StyleSheet/compiler/{createReactDOMStyle.js.map → createReactDOMStyle.cjs.map} +0 -0
  130. /package/dist/cjs/StyleSheet/compiler/{hash.js.map → hash.cjs.map} +0 -0
  131. /package/dist/cjs/StyleSheet/compiler/{hyphenateStyleName.js.map → hyphenateStyleName.cjs.map} +0 -0
  132. /package/dist/cjs/StyleSheet/compiler/{index.js.map → index.cjs.map} +0 -0
  133. /package/dist/cjs/StyleSheet/compiler/{normalizeColor.js.map → normalizeColor.cjs.map} +0 -0
  134. /package/dist/cjs/StyleSheet/compiler/{normalizeValueWithProperty.js.map → normalizeValueWithProperty.cjs.map} +0 -0
  135. /package/dist/cjs/StyleSheet/compiler/{resolveShadowValue.js.map → resolveShadowValue.cjs.map} +0 -0
  136. /package/dist/cjs/StyleSheet/dom/{createCSSStyleSheet.js.map → createCSSStyleSheet.cjs.map} +0 -0
  137. /package/dist/cjs/StyleSheet/dom/{createOrderedCSSStyleSheet.js.map → createOrderedCSSStyleSheet.cjs.map} +0 -0
  138. /package/dist/cjs/StyleSheet/dom/{index.js.map → index.cjs.map} +0 -0
  139. /package/dist/cjs/StyleSheet/{index.js.map → index.cjs.map} +0 -0
  140. /package/dist/cjs/StyleSheet/{preprocess.js.map → preprocess.cjs.map} +0 -0
  141. /package/dist/cjs/StyleSheet/{validate.js.map → validate.cjs.map} +0 -0
  142. /package/dist/cjs/{TextAncestorContext.js.map → TextAncestorContext.cjs.map} +0 -0
  143. /package/dist/cjs/{colorProps.js.map → colorProps.cjs.map} +0 -0
  144. /package/dist/cjs/{index.js.map → index.cjs.map} +0 -0
  145. /package/dist/cjs/modules/AccessibilityUtil/__tests__/{propsToAccessibilityComponent-test.js.map → propsToAccessibilityComponent-test.cjs.map} +0 -0
  146. /package/dist/cjs/modules/AccessibilityUtil/__tests__/{propsToAriaRole-test.js.map → propsToAriaRole-test.cjs.map} +0 -0
  147. /package/dist/cjs/modules/AccessibilityUtil/{index.js.map → index.cjs.map} +0 -0
  148. /package/dist/cjs/modules/AccessibilityUtil/{isDisabled.js.map → isDisabled.cjs.map} +0 -0
  149. /package/dist/cjs/modules/AccessibilityUtil/{propsToAccessibilityComponent.js.map → propsToAccessibilityComponent.cjs.map} +0 -0
  150. /package/dist/cjs/modules/AccessibilityUtil/{propsToAriaRole.js.map → propsToAriaRole.cjs.map} +0 -0
  151. /package/dist/cjs/modules/AssetRegistry/{index.js.map → index.cjs.map} +0 -0
  152. /package/dist/cjs/modules/ImageLoader/{index.js.map → index.cjs.map} +0 -0
  153. /package/dist/cjs/modules/{InteractionManager.js.map → InteractionManager.cjs.map} +0 -0
  154. /package/dist/cjs/modules/Platform/__tests__/{index-test.js.map → index-test.cjs.map} +0 -0
  155. /package/dist/cjs/modules/Platform/{index.js.map → index.cjs.map} +0 -0
  156. /package/dist/cjs/modules/TextInputState/{index.js.map → index.cjs.map} +0 -0
  157. /package/dist/cjs/modules/UIManager/__tests__/{index-test.js.map → index-test.cjs.map} +0 -0
  158. /package/dist/cjs/modules/UIManager/{index.js.map → index.cjs.map} +0 -0
  159. /package/dist/cjs/modules/{canUseDOM.js.map → canUseDOM.cjs.map} +0 -0
  160. /package/dist/cjs/modules/createDOMProps/__tests__/{index-test.js.map → index-test.cjs.map} +0 -0
  161. /package/dist/cjs/modules/createDOMProps/{index.js.map → index.cjs.map} +0 -0
  162. /package/dist/cjs/modules/createEventHandle/__tests__/{index-test.js.map → index-test.cjs.map} +0 -0
  163. /package/dist/cjs/modules/createEventHandle/{index.js.map → index.cjs.map} +0 -0
  164. /package/dist/cjs/modules/dismissKeyboard/{index.js.map → index.cjs.map} +0 -0
  165. /package/dist/cjs/modules/forwardedProps/{index.js.map → index.cjs.map} +0 -0
  166. /package/dist/cjs/modules/getBoundingClientRect/{index.js.map → index.cjs.map} +0 -0
  167. /package/dist/cjs/modules/{invariant.js.map → invariant.cjs.map} +0 -0
  168. /package/dist/cjs/modules/isSelectionValid/{index.js.map → index.cjs.map} +0 -0
  169. /package/dist/cjs/modules/isWebColor/{index.js.map → index.cjs.map} +0 -0
  170. /package/dist/cjs/modules/mergeRefs/__tests__/{index-test.js.map → index-test.cjs.map} +0 -0
  171. /package/dist/cjs/modules/mergeRefs/{index.js.map → index.cjs.map} +0 -0
  172. /package/dist/cjs/modules/modality/__tests__/{index-test.js.map → index-test.cjs.map} +0 -0
  173. /package/dist/cjs/modules/modality/{index.js.map → index.cjs.map} +0 -0
  174. /package/dist/cjs/modules/multiplyStyleLengthValue/__tests__/{index-test.js.map → index-test.cjs.map} +0 -0
  175. /package/dist/cjs/modules/multiplyStyleLengthValue/{index.js.map → index.cjs.map} +0 -0
  176. /package/dist/cjs/modules/normalizeColor/{index.js.map → index.cjs.map} +0 -0
  177. /package/dist/cjs/modules/pick/{index.js.map → index.cjs.map} +0 -0
  178. /package/dist/cjs/modules/processColor/__tests__/{index-test.js.map → index-test.cjs.map} +0 -0
  179. /package/dist/cjs/modules/processColor/{index.js.map → index.cjs.map} +0 -0
  180. /package/dist/cjs/modules/requestIdleCallback/{index.js.map → index.cjs.map} +0 -0
  181. /package/dist/cjs/modules/setValueForStyles/{dangerousStyleValue.js.map → dangerousStyleValue.cjs.map} +0 -0
  182. /package/dist/cjs/modules/setValueForStyles/{index.js.map → index.cjs.map} +0 -0
  183. /package/dist/cjs/modules/unitlessNumbers/{index.js.map → index.cjs.map} +0 -0
  184. /package/dist/cjs/modules/useElementLayout/{index.js.map → index.cjs.map} +0 -0
  185. /package/dist/cjs/modules/useEvent/__tests__/{index-test.js.map → index-test.cjs.map} +0 -0
  186. /package/dist/cjs/modules/useEvent/{index.js.map → index.cjs.map} +0 -0
  187. /package/dist/cjs/modules/useHover/__tests__/{index-test.js.map → index-test.cjs.map} +0 -0
  188. /package/dist/cjs/modules/useHover/{index.js.map → index.cjs.map} +0 -0
  189. /package/dist/cjs/modules/useLayoutEffect/{index.js.map → index.cjs.map} +0 -0
  190. /package/dist/cjs/modules/useLocale/{index.js.map → index.cjs.map} +0 -0
  191. /package/dist/cjs/modules/useLocale/{isLocaleRTL.js.map → isLocaleRTL.cjs.map} +0 -0
  192. /package/dist/cjs/modules/useMergeRefs/__tests__/{index-test.js.map → index-test.cjs.map} +0 -0
  193. /package/dist/cjs/modules/useMergeRefs/{index.js.map → index.cjs.map} +0 -0
  194. /package/dist/cjs/modules/usePlatformMethods/{index.js.map → index.cjs.map} +0 -0
  195. /package/dist/cjs/modules/useStable/__tests__/{index-test.js.map → index-test.cjs.map} +0 -0
  196. /package/dist/cjs/modules/useStable/{index.js.map → index.cjs.map} +0 -0
  197. /package/dist/cjs/{styleTypes.js.map → styleTypes.cjs.map} +0 -0
  198. /package/dist/cjs/{types.js.map → types.cjs.map} +0 -0
@@ -1,21 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var hash_exports = {};
16
- __export(hash_exports, {
17
- default: () => import_simple_hash.simpleHash
18
- });
19
- module.exports = __toCommonJS(hash_exports);
20
- var import_simple_hash = require("@tamagui/simple-hash");
21
- //# sourceMappingURL=hash.js.map
@@ -1,31 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var hyphenateStyleName_exports = {};
16
- __export(hyphenateStyleName_exports, {
17
- default: () => hyphenateStyleName_default
18
- });
19
- module.exports = __toCommonJS(hyphenateStyleName_exports);
20
- const uppercasePattern = /[A-Z]/g, msPattern = /^ms-/, cache = {};
21
- function toHyphenLower(match) {
22
- return "-" + match.toLowerCase();
23
- }
24
- function hyphenateStyleName(name) {
25
- if (name in cache)
26
- return cache[name];
27
- const hName = name.replace(uppercasePattern, toHyphenLower);
28
- return cache[name] = msPattern.test(hName) ? "-" + hName : hName;
29
- }
30
- var hyphenateStyleName_default = hyphenateStyleName;
31
- //# sourceMappingURL=hyphenateStyleName.js.map
@@ -1,253 +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, __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: !0 });
9
- }, __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from == "object" || typeof from == "function")
11
- for (let key of __getOwnPropNames(from))
12
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- return to;
14
- };
15
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
16
- // If the importer is in node compatibility mode or this is not an ESM
17
- // file that has been converted to a CommonJS file using a Babel-
18
- // compatible transform (i.e. "__esModule" has not been set), then set
19
- // "default" to the CommonJS "module.exports" for node compatibility.
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
21
- mod
22
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
- var compiler_exports = {};
24
- __export(compiler_exports, {
25
- atomic: () => atomic,
26
- classic: () => classic,
27
- inline: () => inline,
28
- stringifyValueWithProperty: () => stringifyValueWithProperty
29
- });
30
- module.exports = __toCommonJS(compiler_exports);
31
- var import_simple_hash = require("@tamagui/simple-hash"), import_createReactDOMStyle = __toESM(require("./createReactDOMStyle")), import_hyphenateStyleName = __toESM(require("./hyphenateStyleName")), import_normalizeValueWithProperty = __toESM(require("./normalizeValueWithProperty"));
32
- const cache = /* @__PURE__ */ new Map(), emptyObject = {}, classicGroup = 1, atomicGroup = 2.2, customGroup = {
33
- borderColor: 2,
34
- borderRadius: 2,
35
- borderStyle: 2,
36
- borderWidth: 2,
37
- display: 2,
38
- flex: 2,
39
- margin: 2,
40
- overflow: 2,
41
- overscrollBehavior: 2,
42
- padding: 2,
43
- marginHorizontal: 2.1,
44
- marginVertical: 2.1,
45
- paddingHorizontal: 2.1,
46
- paddingVertical: 2.1
47
- }, borderTopLeftRadius = "borderTopLeftRadius", borderTopRightRadius = "borderTopRightRadius", borderBottomLeftRadius = "borderBottomLeftRadius", borderBottomRightRadius = "borderBottomRightRadius", borderLeftColor = "borderLeftColor", borderLeftStyle = "borderLeftStyle", borderLeftWidth = "borderLeftWidth", borderRightColor = "borderRightColor", borderRightStyle = "borderRightStyle", borderRightWidth = "borderRightWidth", right = "right", marginLeft = "marginLeft", marginRight = "marginRight", paddingLeft = "paddingLeft", paddingRight = "paddingRight", left = "left", PROPERTIES_FLIP = {
48
- [borderTopLeftRadius]: borderTopRightRadius,
49
- [borderTopRightRadius]: borderTopLeftRadius,
50
- [borderBottomLeftRadius]: borderBottomRightRadius,
51
- [borderBottomRightRadius]: borderBottomLeftRadius,
52
- [borderLeftColor]: borderRightColor,
53
- [borderLeftStyle]: borderRightStyle,
54
- [borderLeftWidth]: borderRightWidth,
55
- [borderRightColor]: borderLeftColor,
56
- [borderRightStyle]: borderLeftStyle,
57
- [borderRightWidth]: borderLeftWidth,
58
- [left]: right,
59
- [marginLeft]: marginRight,
60
- [marginRight]: marginLeft,
61
- [paddingLeft]: paddingRight,
62
- [paddingRight]: paddingLeft,
63
- [right]: left
64
- }, PROPERTIES_I18N = {
65
- borderTopStartRadius: borderTopLeftRadius,
66
- borderTopEndRadius: borderTopRightRadius,
67
- borderBottomStartRadius: borderBottomLeftRadius,
68
- borderBottomEndRadius: borderBottomRightRadius,
69
- borderStartColor: borderLeftColor,
70
- borderStartStyle: borderLeftStyle,
71
- borderStartWidth: borderLeftWidth,
72
- borderEndColor: borderRightColor,
73
- borderEndStyle: borderRightStyle,
74
- borderEndWidth: borderRightWidth,
75
- end: right,
76
- marginStart: marginLeft,
77
- marginEnd: marginRight,
78
- paddingStart: paddingLeft,
79
- paddingEnd: paddingRight,
80
- start: left
81
- }, PROPERTIES_VALUE = ["clear", "float", "textAlign"];
82
- function atomic(style) {
83
- const compiledStyle = { $$css: !0 }, compiledRules = [];
84
- function atomicCompile(prop, value) {
85
- const valueString = stringifyValueWithProperty(value, prop), cacheKey = prop + valueString, cachedResult = cache.get(cacheKey);
86
- let identifier;
87
- if (cachedResult != null)
88
- identifier = cachedResult[0], compiledRules.push(cachedResult[1]);
89
- else {
90
- identifier = createIdentifier("r", prop, value);
91
- const order = customGroup[prop] || atomicGroup, orderedRules = [createAtomicRules(identifier, prop, value), order];
92
- compiledRules.push(orderedRules), cache.set(cacheKey, [identifier, orderedRules]);
93
- }
94
- return identifier;
95
- }
96
- return Object.keys(style).sort().forEach((prop) => {
97
- const value = style[prop];
98
- if (value != null) {
99
- let localizeableValue;
100
- if (PROPERTIES_VALUE.indexOf(prop) > -1) {
101
- const left2 = atomicCompile(prop, "left"), right2 = atomicCompile(prop, "right");
102
- value === "start" ? localizeableValue = [left2, right2] : value === "end" && (localizeableValue = [right2, left2]);
103
- }
104
- const propPolyfill = PROPERTIES_I18N[prop];
105
- if (propPolyfill != null) {
106
- const ltr = atomicCompile(propPolyfill, value), rtl = atomicCompile(PROPERTIES_FLIP[propPolyfill], value);
107
- localizeableValue = [ltr, rtl];
108
- }
109
- if (prop === "transitionProperty") {
110
- const values = Array.isArray(value) ? value : [value], polyfillIndices = [];
111
- for (let i = 0; i < values.length; i++) {
112
- const val = values[i];
113
- typeof val == "string" && PROPERTIES_I18N[val] != null && polyfillIndices.push(i);
114
- }
115
- if (polyfillIndices.length > 0) {
116
- const ltrPolyfillValues = [...values], rtlPolyfillValues = [...values];
117
- polyfillIndices.forEach((i) => {
118
- const ltrVal = ltrPolyfillValues[i];
119
- if (typeof ltrVal == "string") {
120
- const ltrPolyfill = PROPERTIES_I18N[ltrVal], rtlPolyfill = PROPERTIES_FLIP[ltrPolyfill];
121
- ltrPolyfillValues[i] = ltrPolyfill, rtlPolyfillValues[i] = rtlPolyfill;
122
- const ltr = atomicCompile(prop, ltrPolyfillValues), rtl = atomicCompile(prop, rtlPolyfillValues);
123
- localizeableValue = [ltr, rtl];
124
- }
125
- });
126
- }
127
- }
128
- localizeableValue == null ? localizeableValue = atomicCompile(prop, value) : compiledStyle.$$css$localize = !0, compiledStyle[prop] = localizeableValue;
129
- }
130
- }), [compiledStyle, compiledRules];
131
- }
132
- function classic(style, name) {
133
- const compiledStyle = { $$css: !0 }, compiledRules = [], { animationKeyframes, ...rest } = style, identifier = createIdentifier("css", name, style), selector = `.${identifier}`;
134
- let animationName;
135
- if (animationKeyframes != null) {
136
- const [animationNames, keyframesRules] = processKeyframesValue(animationKeyframes);
137
- animationName = animationNames.join(","), compiledRules.push(...keyframesRules);
138
- }
139
- const block = createDeclarationBlock({ ...rest, animationName });
140
- return compiledRules.push(`${selector}${block}`), compiledStyle[identifier] = identifier, [compiledStyle, [[compiledRules, classicGroup]]];
141
- }
142
- function inline(originalStyle, isRTL) {
143
- const style = originalStyle || emptyObject, frozenProps = {}, nextStyle = {};
144
- for (const originalProp in style) {
145
- const originalValue = style[originalProp];
146
- let prop = originalProp, value = originalValue;
147
- if (!Object.prototype.hasOwnProperty.call(style, originalProp) || originalValue == null)
148
- continue;
149
- PROPERTIES_VALUE.indexOf(originalProp) > -1 && (originalValue === "start" ? value = isRTL ? "right" : "left" : originalValue === "end" && (value = isRTL ? "left" : "right"));
150
- const propPolyfill = PROPERTIES_I18N[originalProp];
151
- if (propPolyfill != null && (prop = isRTL ? PROPERTIES_FLIP[propPolyfill] : propPolyfill), originalProp === "transitionProperty") {
152
- const originalValues = Array.isArray(originalValue) ? originalValue : [originalValue];
153
- originalValues.forEach((val, i) => {
154
- if (typeof val == "string") {
155
- const valuePolyfill = PROPERTIES_I18N[val];
156
- valuePolyfill != null && (originalValues[i] = isRTL ? PROPERTIES_FLIP[valuePolyfill] : valuePolyfill);
157
- }
158
- });
159
- }
160
- frozenProps[prop] || (nextStyle[prop] = value), PROPERTIES_I18N.hasOwnProperty(originalProp) && (frozenProps[prop] = !0);
161
- }
162
- return (0, import_createReactDOMStyle.default)(nextStyle, !0);
163
- }
164
- function stringifyValueWithProperty(value, property) {
165
- const normalizedValue = (0, import_normalizeValueWithProperty.default)(value, property);
166
- return typeof normalizedValue != "string" ? JSON.stringify(normalizedValue || "") : normalizedValue;
167
- }
168
- function createAtomicRules(identifier, property, value) {
169
- const rules = [], selector = `.${identifier}`;
170
- switch (property) {
171
- case "animationKeyframes": {
172
- const [animationNames, keyframesRules] = processKeyframesValue(value), block = createDeclarationBlock({
173
- animationName: animationNames.join(",")
174
- });
175
- rules.push(`${selector}${block}`, ...keyframesRules);
176
- break;
177
- }
178
- // Equivalent to using '::placeholder'
179
- case "placeholderTextColor": {
180
- const block = createDeclarationBlock({ color: value, opacity: 1 });
181
- rules.push(
182
- `${selector}::-webkit-input-placeholder${block}`,
183
- `${selector}::-moz-placeholder${block}`,
184
- `${selector}:-ms-input-placeholder${block}`,
185
- `${selector}::placeholder${block}`
186
- );
187
- break;
188
- }
189
- // Polyfill for additional 'pointer-events' values
190
- // See d13f78622b233a0afc0c7a200c0a0792c8ca9e58
191
- case "pointerEvents": {
192
- let finalValue = value;
193
- if (value === "auto" || value === "box-only") {
194
- if (finalValue = "auto!important", value === "box-only") {
195
- const block2 = createDeclarationBlock({ pointerEvents: "none" });
196
- rules.push(`${selector}>*${block2}`);
197
- }
198
- } else if ((value === "none" || value === "box-none") && (finalValue = "none!important", value === "box-none")) {
199
- const block2 = createDeclarationBlock({ pointerEvents: "auto" });
200
- rules.push(`${selector}>*${block2}`);
201
- }
202
- const block = createDeclarationBlock({ pointerEvents: finalValue });
203
- rules.push(`${selector}${block}`);
204
- break;
205
- }
206
- // Polyfill for draft spec
207
- // https://drafts.csswg.org/css-scrollbars-1/
208
- case "scrollbarWidth": {
209
- value === "none" && rules.push(`${selector}::-webkit-scrollbar{display:none}`);
210
- const block = createDeclarationBlock({ scrollbarWidth: value });
211
- rules.push(`${selector}${block}`);
212
- break;
213
- }
214
- default: {
215
- const block = createDeclarationBlock({ [property]: value });
216
- rules.push(`${selector}${block}`);
217
- break;
218
- }
219
- }
220
- return rules;
221
- }
222
- function createDeclarationBlock(style) {
223
- const domStyle = (0, import_createReactDOMStyle.default)(style);
224
- return `{${Object.keys(domStyle).map((property) => {
225
- const value = domStyle[property], prop = (0, import_hyphenateStyleName.default)(property);
226
- return Array.isArray(value) ? value.map((v) => `${prop}:${v}`).join(";") : `${prop}:${value}`;
227
- }).sort().join(";")};}`;
228
- }
229
- function createIdentifier(prefix, name, value) {
230
- const hashedString = (0, import_simple_hash.simpleHash)(name + stringifyValueWithProperty(value, name));
231
- return process.env.NODE_ENV !== "production" ? `${prefix}-${name}-${hashedString}` : `${prefix}-${hashedString}`;
232
- }
233
- function createKeyframes(keyframes) {
234
- const prefixes = ["-webkit-", ""], identifier = createIdentifier("r", "animation", keyframes), steps = "{" + Object.keys(keyframes).map((stepName) => {
235
- const rule = keyframes[stepName], block = createDeclarationBlock(rule);
236
- return `${stepName}${block}`;
237
- }).join("") + "}", rules = prefixes.map((prefix) => `@${prefix}keyframes ${identifier}${steps}`);
238
- return [identifier, rules];
239
- }
240
- function processKeyframesValue(keyframesValue) {
241
- if (typeof keyframesValue == "number")
242
- throw new Error(`Invalid CSS keyframes type: ${typeof keyframesValue}`);
243
- const animationNames = [], rules = [];
244
- return (Array.isArray(keyframesValue) ? keyframesValue : [keyframesValue]).forEach((keyframes) => {
245
- if (typeof keyframes == "string")
246
- animationNames.push(keyframes);
247
- else {
248
- const [identifier, keyframesRules] = createKeyframes(keyframes);
249
- animationNames.push(identifier), rules.push(...keyframesRules);
250
- }
251
- }), [animationNames, rules];
252
- }
253
- //# sourceMappingURL=index.js.map
@@ -1,35 +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, __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: !0 });
9
- }, __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from == "object" || typeof from == "function")
11
- for (let key of __getOwnPropNames(from))
12
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- return to;
14
- };
15
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
16
- // If the importer is in node compatibility mode or this is not an ESM
17
- // file that has been converted to a CommonJS file using a Babel-
18
- // compatible transform (i.e. "__esModule" has not been set), then set
19
- // "default" to the CommonJS "module.exports" for node compatibility.
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
21
- mod
22
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
- var resolveShadowValue_exports = {};
24
- __export(resolveShadowValue_exports, {
25
- default: () => resolveShadowValue_default
26
- });
27
- module.exports = __toCommonJS(resolveShadowValue_exports);
28
- var import_normalizeColor = __toESM(require("./normalizeColor")), import_normalizeValueWithProperty = __toESM(require("./normalizeValueWithProperty"));
29
- const defaultOffset = { height: 0, width: 0 }, resolveShadowValue = (style) => {
30
- const { shadowColor, shadowOffset, shadowOpacity, shadowRadius } = style, { height, width } = shadowOffset || defaultOffset, offsetX = (0, import_normalizeValueWithProperty.default)(width), offsetY = (0, import_normalizeValueWithProperty.default)(height), blurRadius = (0, import_normalizeValueWithProperty.default)(shadowRadius || 0), color = (0, import_normalizeColor.default)(shadowColor || "black", shadowOpacity);
31
- if (color != null && offsetX != null && offsetY != null && blurRadius != null)
32
- return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
33
- };
34
- var resolveShadowValue_default = resolveShadowValue;
35
- //# sourceMappingURL=resolveShadowValue.js.map
@@ -1,44 +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, __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: !0 });
9
- }, __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from == "object" || typeof from == "function")
11
- for (let key of __getOwnPropNames(from))
12
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- return to;
14
- };
15
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
16
- // If the importer is in node compatibility mode or this is not an ESM
17
- // file that has been converted to a CommonJS file using a Babel-
18
- // compatible transform (i.e. "__esModule" has not been set), then set
19
- // "default" to the CommonJS "module.exports" for node compatibility.
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
21
- mod
22
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
- var createCSSStyleSheet_exports = {};
24
- __export(createCSSStyleSheet_exports, {
25
- default: () => createCSSStyleSheet
26
- });
27
- module.exports = __toCommonJS(createCSSStyleSheet_exports);
28
- var import_canUseDOM = __toESM(require("../../modules/canUseDOM"));
29
- function createCSSStyleSheet(id, rootNode, textContent) {
30
- if (import_canUseDOM.default) {
31
- const root = rootNode ?? document;
32
- let element = root.getElementById(id);
33
- if (element == null)
34
- if (element = document.createElement("style"), element.setAttribute("id", id), typeof textContent == "string" && element.appendChild(document.createTextNode(textContent)), root instanceof ShadowRoot)
35
- root.insertBefore(element, root.firstChild);
36
- else {
37
- const head = root.head;
38
- head && head.appendChild(element);
39
- }
40
- return element.sheet;
41
- } else
42
- return null;
43
- }
44
- //# sourceMappingURL=createCSSStyleSheet.js.map
@@ -1,74 +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, __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: !0 });
9
- }, __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from == "object" || typeof from == "function")
11
- for (let key of __getOwnPropNames(from))
12
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- return to;
14
- };
15
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
16
- // If the importer is in node compatibility mode or this is not an ESM
17
- // file that has been converted to a CommonJS file using a Babel-
18
- // compatible transform (i.e. "__esModule" has not been set), then set
19
- // "default" to the CommonJS "module.exports" for node compatibility.
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
21
- mod
22
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
- var dom_exports = {};
24
- __export(dom_exports, {
25
- createSheet: () => createSheet
26
- });
27
- module.exports = __toCommonJS(dom_exports);
28
- var import_canUseDOM = __toESM(require("../../modules/canUseDOM")), import_createCSSStyleSheet = __toESM(require("./createCSSStyleSheet")), import_createOrderedCSSStyleSheet = __toESM(require("./createOrderedCSSStyleSheet"));
29
- const defaultId = "react-native-stylesheet", roots = /* @__PURE__ */ new WeakMap(), sheets = [], initialRules = [
30
- // minimal top-level reset
31
- "html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}",
32
- "body{margin:0;}",
33
- // minimal form pseudo-element reset
34
- "button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}",
35
- "input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}"
36
- ];
37
- function createSheet(root, id = defaultId) {
38
- let sheet;
39
- function createSheet2() {
40
- if (!sheet)
41
- if (import_canUseDOM.default) {
42
- const rootNode = root != null ? root.getRootNode() : document;
43
- if (sheets.length === 0)
44
- sheet = (0, import_createOrderedCSSStyleSheet.default)((0, import_createCSSStyleSheet.default)(id)), initialRules.forEach((rule) => {
45
- sheet.insert(rule, 0);
46
- }), roots.set(rootNode, sheets.length), sheets.push(sheet);
47
- else {
48
- const index = roots.get(rootNode);
49
- if (index == null) {
50
- const initialSheet = sheets[0], textContent = initialSheet != null ? initialSheet.getTextContent() : "";
51
- sheet = (0, import_createOrderedCSSStyleSheet.default)(
52
- (0, import_createCSSStyleSheet.default)(id, rootNode, textContent)
53
- ), roots.set(rootNode, sheets.length), sheets.push(sheet);
54
- } else
55
- sheet = sheets[index];
56
- }
57
- } else
58
- sheets.length === 0 ? (sheet = (0, import_createOrderedCSSStyleSheet.default)((0, import_createCSSStyleSheet.default)(id)), initialRules.forEach((rule) => {
59
- sheet.insert(rule, 0);
60
- }), sheets.push(sheet)) : sheet = sheets[0];
61
- }
62
- return {
63
- getTextContent() {
64
- return createSheet2(), sheet.getTextContent();
65
- },
66
- id,
67
- insert(cssText, groupValue) {
68
- createSheet2(), sheets.forEach((s) => {
69
- s.insert(cssText, groupValue);
70
- });
71
- }
72
- };
73
- }
74
- //# sourceMappingURL=index.js.map
@@ -1,67 +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, __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: !0 });
9
- }, __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from == "object" || typeof from == "function")
11
- for (let key of __getOwnPropNames(from))
12
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- return to;
14
- };
15
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
16
- // If the importer is in node compatibility mode or this is not an ESM
17
- // file that has been converted to a CommonJS file using a Babel-
18
- // compatible transform (i.e. "__esModule" has not been set), then set
19
- // "default" to the CommonJS "module.exports" for node compatibility.
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
21
- mod
22
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
- var preprocess_exports = {};
24
- __export(preprocess_exports, {
25
- createBoxShadowValue: () => createBoxShadowValue,
26
- createTextShadowValue: () => createTextShadowValue,
27
- preprocess: () => preprocess,
28
- processStyle: () => processStyle
29
- });
30
- module.exports = __toCommonJS(preprocess_exports);
31
- var import_normalizeColor = __toESM(require("./compiler/normalizeColor")), import_normalizeValueWithProperty = __toESM(require("./compiler/normalizeValueWithProperty"));
32
- const emptyObject = {}, defaultOffset = { height: 0, width: 0 }, createBoxShadowValue = (style) => {
33
- const { shadowColor, shadowOffset, shadowOpacity, shadowRadius } = style, { height, width } = shadowOffset || defaultOffset, offsetX = (0, import_normalizeValueWithProperty.default)(width), offsetY = (0, import_normalizeValueWithProperty.default)(height), blurRadius = (0, import_normalizeValueWithProperty.default)(shadowRadius || 0), color = (0, import_normalizeColor.default)(shadowColor || "black", shadowOpacity);
34
- if (color != null && offsetX != null && offsetY != null && blurRadius != null)
35
- return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
36
- }, createTextShadowValue = (style) => {
37
- const { textShadowColor, textShadowOffset, textShadowRadius } = style, { height, width } = textShadowOffset || defaultOffset, radius = textShadowRadius || 0, offsetX = (0, import_normalizeValueWithProperty.default)(width), offsetY = (0, import_normalizeValueWithProperty.default)(height), blurRadius = (0, import_normalizeValueWithProperty.default)(radius), color = (0, import_normalizeValueWithProperty.default)(textShadowColor, "textShadowColor");
38
- if (color && (height !== 0 || width !== 0 || radius !== 0) && offsetX != null && offsetY != null && blurRadius != null)
39
- return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
40
- }, preprocess = (originalStyle) => {
41
- const style = originalStyle || emptyObject, nextStyle = {};
42
- for (const originalProp in style) {
43
- const originalValue = style[originalProp];
44
- let prop = originalProp, value = originalValue;
45
- if (!(!Object.prototype.hasOwnProperty.call(style, originalProp) || originalValue == null)) {
46
- if (prop === "shadowColor" || prop === "shadowOffset" || prop === "shadowOpacity" || prop === "shadowRadius") {
47
- const boxShadowValue = createBoxShadowValue(style);
48
- if (boxShadowValue != null && nextStyle.boxShadow == null) {
49
- const { boxShadow } = style;
50
- prop = "boxShadow", value = boxShadow ? `${boxShadow}, ${boxShadowValue}` : boxShadowValue;
51
- } else
52
- continue;
53
- }
54
- if (prop === "textShadowColor" || prop === "textShadowOffset" || prop === "textShadowRadius") {
55
- const textShadowValue = createTextShadowValue(style);
56
- if (textShadowValue != null && nextStyle.textShadow == null) {
57
- const { textShadow } = style;
58
- prop = "textShadow", value = textShadow ? `${textShadow}, ${textShadowValue}` : textShadowValue;
59
- } else
60
- continue;
61
- }
62
- nextStyle[prop] = value;
63
- }
64
- }
65
- return nextStyle;
66
- }, processStyle = preprocess;
67
- //# sourceMappingURL=preprocess.js.map
@@ -1,66 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var validate_exports = {};
16
- __export(validate_exports, {
17
- validate: () => validate
18
- });
19
- module.exports = __toCommonJS(validate_exports);
20
- const invalidShortforms = {
21
- background: !0,
22
- borderBottom: !0,
23
- borderLeft: !0,
24
- borderRight: !0,
25
- borderTop: !0,
26
- font: !0,
27
- grid: !0,
28
- outline: !0,
29
- textDecoration: !0
30
- }, invalidMultiValueShortforms = {
31
- flex: !0,
32
- margin: !0,
33
- padding: !0,
34
- borderColor: !0,
35
- borderRadius: !0,
36
- borderStyle: !0,
37
- borderWidth: !0,
38
- marginHorizontal: !0,
39
- marginVertical: !0,
40
- paddingHorizontal: !0,
41
- paddingVertical: !0,
42
- overflow: !0,
43
- overscrollBehavior: !0,
44
- backgroundPosition: !0
45
- };
46
- function error(message) {
47
- console.error(message);
48
- }
49
- function validate(obj) {
50
- for (const k in obj) {
51
- const prop = k.trim(), value = obj[prop];
52
- let isInvalid = !1;
53
- if (value !== null) {
54
- if (typeof value == "string" && value.indexOf("!important") > -1)
55
- error(
56
- `Invalid style declaration "${prop}:${value}". Values cannot include "!important"`
57
- ), isInvalid = !0;
58
- else {
59
- let suggestion = "";
60
- prop === "animation" || prop === "animationName" ? (suggestion = 'Did you mean "animationKeyframes"?', isInvalid = !0) : prop === "direction" ? (suggestion = 'Did you mean "writingDirection"?', isInvalid = !0) : prop === "verticalAlign" ? (suggestion = 'Did you mean "textAlignVertical"?', isInvalid = !0) : invalidShortforms[prop] ? (suggestion = "Please use long-form properties.", isInvalid = !0) : invalidMultiValueShortforms[prop], suggestion !== "" && error(`Invalid style property of "${prop}". ${suggestion}`);
61
- }
62
- isInvalid && delete obj[k];
63
- }
64
- }
65
- }
66
- //# sourceMappingURL=validate.js.map
@@ -1,24 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var TextAncestorContext_exports = {};
16
- __export(TextAncestorContext_exports, {
17
- TextAncestorContext: () => TextAncestorContext,
18
- default: () => TextAncestorContext_default
19
- });
20
- module.exports = __toCommonJS(TextAncestorContext_exports);
21
- var import_react = require("react");
22
- const TextAncestorContext = (0, import_react.createContext)(!1);
23
- var TextAncestorContext_default = TextAncestorContext;
24
- //# sourceMappingURL=TextAncestorContext.js.map