@semcore/core 2.40.0-prerelease.0 → 2.40.0-prerelease.4

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 (499) hide show
  1. package/lib/cjs/index.js +23 -0
  2. package/lib/cjs/index.js.map +1 -0
  3. package/lib/es6/index.js +4 -0
  4. package/lib/es6/index.js.map +1 -0
  5. package/lib/esm/index.mjs +4 -22
  6. package/lib/types/index.d.ts +3 -0
  7. package/package.json +2 -2
  8. package/lib/LastInteractionType.d.ts +0 -11
  9. package/lib/LastInteractionType.js +0 -55
  10. package/lib/LastInteractionType.js.map +0 -1
  11. package/lib/LastInteractionType.mjs +0 -50
  12. package/lib/LastInteractionType.mjs.map +0 -1
  13. package/lib/core-types/Component.d.ts +0 -142
  14. package/lib/core-types/Component.js +0 -53
  15. package/lib/core-types/Component.js.map +0 -1
  16. package/lib/core-types/Component.mjs +0 -47
  17. package/lib/core-types/Component.mjs.map +0 -1
  18. package/lib/core-types/UnknownProperties.d.ts +0 -3
  19. package/lib/core-types/UnknownProperties.js +0 -2
  20. package/lib/core-types/UnknownProperties.js.map +0 -1
  21. package/lib/core-types/UnknownProperties.mjs +0 -2
  22. package/lib/core-types/UnknownProperties.mjs.map +0 -1
  23. package/lib/core-types/reshadow.d.js +0 -2
  24. package/lib/core-types/reshadow.d.js.map +0 -1
  25. package/lib/core-types/reshadow.d.mjs +0 -2
  26. package/lib/core-types/reshadow.d.mjs.map +0 -1
  27. package/lib/core-types/symbols.d.ts +0 -9
  28. package/lib/core-types/symbols.js +0 -16
  29. package/lib/core-types/symbols.js.map +0 -1
  30. package/lib/core-types/symbols.mjs +0 -20
  31. package/lib/core-types/symbols.mjs.map +0 -1
  32. package/lib/coreFactory.d.ts +0 -10
  33. package/lib/coreFactory.js +0 -384
  34. package/lib/coreFactory.js.map +0 -1
  35. package/lib/coreFactory.mjs +0 -343
  36. package/lib/coreFactory.mjs.map +0 -1
  37. package/lib/decorators/propsObserver.d.ts +0 -11
  38. package/lib/decorators/propsObserver.js +0 -77
  39. package/lib/decorators/propsObserver.js.map +0 -1
  40. package/lib/decorators/propsObserver.mjs +0 -70
  41. package/lib/decorators/propsObserver.mjs.map +0 -1
  42. package/lib/decorators/reactive.d.ts +0 -11
  43. package/lib/decorators/reactive.js +0 -51
  44. package/lib/decorators/reactive.js.map +0 -1
  45. package/lib/decorators/reactive.mjs +0 -45
  46. package/lib/decorators/reactive.mjs.map +0 -1
  47. package/lib/enhancement/Children.d.ts +0 -5
  48. package/lib/enhancement/Children.js +0 -118
  49. package/lib/enhancement/Children.js.map +0 -1
  50. package/lib/enhancement/Children.mjs +0 -96
  51. package/lib/enhancement/Children.mjs.map +0 -1
  52. package/lib/enhancement/Root.d.ts +0 -6
  53. package/lib/enhancement/Root.js +0 -77
  54. package/lib/enhancement/Root.js.map +0 -1
  55. package/lib/enhancement/Root.mjs +0 -56
  56. package/lib/enhancement/Root.mjs.map +0 -1
  57. package/lib/enhancement/dataName.d.ts +0 -4
  58. package/lib/enhancement/dataName.js +0 -19
  59. package/lib/enhancement/dataName.js.map +0 -1
  60. package/lib/enhancement/dataName.mjs +0 -13
  61. package/lib/enhancement/dataName.mjs.map +0 -1
  62. package/lib/enhancement/enhance.d.ts +0 -5
  63. package/lib/enhancement/enhance.js +0 -21
  64. package/lib/enhancement/enhance.js.map +0 -1
  65. package/lib/enhancement/enhance.mjs +0 -16
  66. package/lib/enhancement/enhance.mjs.map +0 -1
  67. package/lib/enhancement/functionDefaultProps.d.ts +0 -8
  68. package/lib/enhancement/functionDefaultProps.js +0 -35
  69. package/lib/enhancement/functionDefaultProps.js.map +0 -1
  70. package/lib/enhancement/functionDefaultProps.mjs +0 -29
  71. package/lib/enhancement/functionDefaultProps.mjs.map +0 -1
  72. package/lib/enhancement/i18n.d.ts +0 -4
  73. package/lib/enhancement/i18n.js +0 -27
  74. package/lib/enhancement/i18n.js.map +0 -1
  75. package/lib/enhancement/i18n.mjs +0 -20
  76. package/lib/enhancement/i18n.mjs.map +0 -1
  77. package/lib/enhancement/inheritedName.d.ts +0 -8
  78. package/lib/enhancement/inheritedName.js +0 -22
  79. package/lib/enhancement/inheritedName.js.map +0 -1
  80. package/lib/enhancement/inheritedName.mjs +0 -16
  81. package/lib/enhancement/inheritedName.mjs.map +0 -1
  82. package/lib/enhancement/staticChildren.d.ts +0 -13
  83. package/lib/enhancement/staticChildren.js +0 -132
  84. package/lib/enhancement/staticChildren.js.map +0 -1
  85. package/lib/enhancement/staticChildren.mjs +0 -120
  86. package/lib/enhancement/staticChildren.mjs.map +0 -1
  87. package/lib/enhancement/style.d.ts +0 -9
  88. package/lib/enhancement/style.js +0 -58
  89. package/lib/enhancement/style.js.map +0 -1
  90. package/lib/enhancement/style.mjs +0 -49
  91. package/lib/enhancement/style.mjs.map +0 -1
  92. package/lib/enhancement/uncontrolledProps.d.ts +0 -7
  93. package/lib/enhancement/uncontrolledProps.js +0 -131
  94. package/lib/enhancement/uncontrolledProps.js.map +0 -1
  95. package/lib/enhancement/uncontrolledProps.mjs +0 -107
  96. package/lib/enhancement/uncontrolledProps.mjs.map +0 -1
  97. package/lib/esm/LastInteractionType.mjs +0 -50
  98. package/lib/esm/core-types/Component.mjs +0 -47
  99. package/lib/esm/core-types/symbols.mjs +0 -20
  100. package/lib/esm/coreFactory.mjs +0 -343
  101. package/lib/esm/enhancement/Children.mjs +0 -96
  102. package/lib/esm/enhancement/Root.mjs +0 -56
  103. package/lib/esm/enhancement/dataName.mjs +0 -13
  104. package/lib/esm/enhancement/enhance.mjs +0 -16
  105. package/lib/esm/enhancement/functionDefaultProps.mjs +0 -29
  106. package/lib/esm/enhancement/i18n.mjs +0 -20
  107. package/lib/esm/enhancement/inheritedName.mjs +0 -16
  108. package/lib/esm/enhancement/staticChildren.mjs +0 -120
  109. package/lib/esm/enhancement/style.mjs +0 -49
  110. package/lib/esm/enhancement/uncontrolledProps.mjs +0 -107
  111. package/lib/esm/register.mjs +0 -30
  112. package/lib/esm/styled/index.mjs +0 -8
  113. package/lib/esm/styled/reshadow-core.mjs +0 -234
  114. package/lib/esm/styled/sstyled.mjs +0 -125
  115. package/lib/esm/utils/assignProps.mjs +0 -86
  116. package/lib/esm/utils/canUseDOM.mjs +0 -6
  117. package/lib/esm/utils/capitalizeFirstLetter.mjs +0 -6
  118. package/lib/esm/utils/enhances/WithI18n.mjs +0 -30
  119. package/lib/esm/utils/enhances/i18nEnhance.mjs +0 -90
  120. package/lib/esm/utils/logger.mjs +0 -34
  121. package/lib/esm/utils/pick.mjs +0 -15
  122. package/lib/esm/utils/ref.mjs +0 -73
  123. package/lib/esm/utils/use/useEnhancedEffect.mjs +0 -6
  124. package/lib/index.d.ts +0 -11
  125. package/lib/index.js +0 -103
  126. package/lib/index.js.map +0 -1
  127. package/lib/index.mjs +0 -24
  128. package/lib/index.mjs.map +0 -1
  129. package/lib/register.d.ts +0 -8
  130. package/lib/register.js +0 -34
  131. package/lib/register.js.map +0 -1
  132. package/lib/register.mjs +0 -30
  133. package/lib/register.mjs.map +0 -1
  134. package/lib/styled/index.d.ts +0 -6
  135. package/lib/styled/index.js +0 -32
  136. package/lib/styled/index.js.map +0 -1
  137. package/lib/styled/index.mjs +0 -8
  138. package/lib/styled/index.mjs.map +0 -1
  139. package/lib/styled/reshadow-core.d.ts +0 -37
  140. package/lib/styled/reshadow-core.js +0 -233
  141. package/lib/styled/reshadow-core.js.map +0 -1
  142. package/lib/styled/reshadow-core.mjs +0 -234
  143. package/lib/styled/reshadow-core.mjs.map +0 -1
  144. package/lib/styled/sstyled.d.ts +0 -17
  145. package/lib/styled/sstyled.js +0 -151
  146. package/lib/styled/sstyled.js.map +0 -1
  147. package/lib/styled/sstyled.mjs +0 -125
  148. package/lib/styled/sstyled.mjs.map +0 -1
  149. package/lib/theme/themes/auto.css +0 -1748
  150. package/lib/theme/themes/dark.css +0 -871
  151. package/lib/theme/themes/dark.d.ts +0 -487
  152. package/lib/theme/themes/dark.js +0 -493
  153. package/lib/theme/themes/dark.js.map +0 -1
  154. package/lib/theme/themes/dark.mjs +0 -487
  155. package/lib/theme/themes/dark.mjs.map +0 -1
  156. package/lib/theme/themes/default.css +0 -877
  157. package/lib/theme/themes/default.d.ts +0 -490
  158. package/lib/theme/themes/default.js +0 -496
  159. package/lib/theme/themes/default.js.map +0 -1
  160. package/lib/theme/themes/default.mjs +0 -490
  161. package/lib/theme/themes/default.mjs.map +0 -1
  162. package/lib/theme/themes/highlights-dark.css +0 -36
  163. package/lib/theme/themes/highlights-dark.d.ts +0 -20
  164. package/lib/theme/themes/highlights-dark.js +0 -26
  165. package/lib/theme/themes/highlights-dark.js.map +0 -1
  166. package/lib/theme/themes/highlights-dark.mjs +0 -20
  167. package/lib/theme/themes/highlights-dark.mjs.map +0 -1
  168. package/lib/theme/themes/highlights-light.css +0 -36
  169. package/lib/theme/themes/highlights-light.d.ts +0 -20
  170. package/lib/theme/themes/highlights-light.js +0 -26
  171. package/lib/theme/themes/highlights-light.js.map +0 -1
  172. package/lib/theme/themes/highlights-light.mjs +0 -20
  173. package/lib/theme/themes/highlights-light.mjs.map +0 -1
  174. package/lib/theme/themes/light.css +0 -877
  175. package/lib/theme/themes/light.d.ts +0 -490
  176. package/lib/theme/themes/light.js +0 -496
  177. package/lib/theme/themes/light.js.map +0 -1
  178. package/lib/theme/themes/light.mjs +0 -490
  179. package/lib/theme/themes/light.mjs.map +0 -1
  180. package/lib/utils/CSSinJS.d.ts +0 -5
  181. package/lib/utils/CSSinJS.js +0 -35
  182. package/lib/utils/CSSinJS.js.map +0 -1
  183. package/lib/utils/CSSinJS.mjs +0 -28
  184. package/lib/utils/CSSinJS.mjs.map +0 -1
  185. package/lib/utils/ThemeProvider.d.ts +0 -15
  186. package/lib/utils/ThemeProvider.js +0 -78
  187. package/lib/utils/ThemeProvider.js.map +0 -1
  188. package/lib/utils/ThemeProvider.mjs +0 -71
  189. package/lib/utils/ThemeProvider.mjs.map +0 -1
  190. package/lib/utils/addonText.d.ts +0 -2
  191. package/lib/utils/addonText.js +0 -18
  192. package/lib/utils/addonText.js.map +0 -1
  193. package/lib/utils/addonText.mjs +0 -11
  194. package/lib/utils/addonText.mjs.map +0 -1
  195. package/lib/utils/addonTextChildren.d.ts +0 -3
  196. package/lib/utils/addonTextChildren.js +0 -44
  197. package/lib/utils/addonTextChildren.js.map +0 -1
  198. package/lib/utils/addonTextChildren.mjs +0 -37
  199. package/lib/utils/addonTextChildren.mjs.map +0 -1
  200. package/lib/utils/ariaProps.d.ts +0 -12
  201. package/lib/utils/ariaProps.js +0 -22
  202. package/lib/utils/ariaProps.js.map +0 -1
  203. package/lib/utils/ariaProps.mjs +0 -16
  204. package/lib/utils/ariaProps.mjs.map +0 -1
  205. package/lib/utils/assignProps.d.ts +0 -11
  206. package/lib/utils/assignProps.js +0 -93
  207. package/lib/utils/assignProps.js.map +0 -1
  208. package/lib/utils/assignProps.mjs +0 -86
  209. package/lib/utils/assignProps.mjs.map +0 -1
  210. package/lib/utils/canUseDOM.d.ts +0 -1
  211. package/lib/utils/canUseDOM.js +0 -10
  212. package/lib/utils/canUseDOM.js.map +0 -1
  213. package/lib/utils/canUseDOM.mjs +0 -6
  214. package/lib/utils/canUseDOM.mjs.map +0 -1
  215. package/lib/utils/capitalizeFirstLetter.d.ts +0 -1
  216. package/lib/utils/capitalizeFirstLetter.js +0 -10
  217. package/lib/utils/capitalizeFirstLetter.js.map +0 -1
  218. package/lib/utils/capitalizeFirstLetter.mjs +0 -6
  219. package/lib/utils/capitalizeFirstLetter.mjs.map +0 -1
  220. package/lib/utils/color.d.ts +0 -5
  221. package/lib/utils/color.js +0 -208
  222. package/lib/utils/color.js.map +0 -1
  223. package/lib/utils/color.mjs +0 -197
  224. package/lib/utils/color.mjs.map +0 -1
  225. package/lib/utils/compose.d.ts +0 -1
  226. package/lib/utils/compose.js +0 -21
  227. package/lib/utils/compose.js.map +0 -1
  228. package/lib/utils/compose.mjs +0 -15
  229. package/lib/utils/compose.mjs.map +0 -1
  230. package/lib/utils/createUUID.d.ts +0 -1
  231. package/lib/utils/createUUID.js +0 -15
  232. package/lib/utils/createUUID.js.map +0 -1
  233. package/lib/utils/createUUID.mjs +0 -9
  234. package/lib/utils/createUUID.mjs.map +0 -1
  235. package/lib/utils/cssToIntDefault.d.ts +0 -8
  236. package/lib/utils/cssToIntDefault.js +0 -22
  237. package/lib/utils/cssToIntDefault.js.map +0 -1
  238. package/lib/utils/cssToIntDefault.mjs +0 -16
  239. package/lib/utils/cssToIntDefault.mjs.map +0 -1
  240. package/lib/utils/enhances/WithCSS.d.ts +0 -13
  241. package/lib/utils/enhances/WithCSS.js +0 -32
  242. package/lib/utils/enhances/WithCSS.js.map +0 -1
  243. package/lib/utils/enhances/WithCSS.mjs +0 -25
  244. package/lib/utils/enhances/WithCSS.mjs.map +0 -1
  245. package/lib/utils/enhances/WithI18n.d.ts +0 -14
  246. package/lib/utils/enhances/WithI18n.js +0 -33
  247. package/lib/utils/enhances/WithI18n.js.map +0 -1
  248. package/lib/utils/enhances/WithI18n.mjs +0 -30
  249. package/lib/utils/enhances/WithI18n.mjs.map +0 -1
  250. package/lib/utils/enhances/a11yEnhance.d.ts +0 -10
  251. package/lib/utils/enhances/a11yEnhance.js +0 -73
  252. package/lib/utils/enhances/a11yEnhance.js.map +0 -1
  253. package/lib/utils/enhances/a11yEnhance.mjs +0 -66
  254. package/lib/utils/enhances/a11yEnhance.mjs.map +0 -1
  255. package/lib/utils/enhances/animatedSizeEnhance.d.ts +0 -8
  256. package/lib/utils/enhances/animatedSizeEnhance.js +0 -98
  257. package/lib/utils/enhances/animatedSizeEnhance.js.map +0 -1
  258. package/lib/utils/enhances/animatedSizeEnhance.mjs +0 -91
  259. package/lib/utils/enhances/animatedSizeEnhance.mjs.map +0 -1
  260. package/lib/utils/enhances/contextEnhance.d.ts +0 -3
  261. package/lib/utils/enhances/contextEnhance.js +0 -21
  262. package/lib/utils/enhances/contextEnhance.js.map +0 -1
  263. package/lib/utils/enhances/contextEnhance.mjs +0 -14
  264. package/lib/utils/enhances/contextEnhance.mjs.map +0 -1
  265. package/lib/utils/enhances/i18nEnhance.d.ts +0 -21
  266. package/lib/utils/enhances/i18nEnhance.js +0 -99
  267. package/lib/utils/enhances/i18nEnhance.js.map +0 -1
  268. package/lib/utils/enhances/i18nEnhance.mjs +0 -90
  269. package/lib/utils/enhances/i18nEnhance.mjs.map +0 -1
  270. package/lib/utils/enhances/resolveColorEnhance.d.ts +0 -2
  271. package/lib/utils/enhances/resolveColorEnhance.js +0 -24
  272. package/lib/utils/enhances/resolveColorEnhance.js.map +0 -1
  273. package/lib/utils/enhances/resolveColorEnhance.mjs +0 -17
  274. package/lib/utils/enhances/resolveColorEnhance.mjs.map +0 -1
  275. package/lib/utils/eventEmitter.d.ts +0 -13
  276. package/lib/utils/eventEmitter.js +0 -68
  277. package/lib/utils/eventEmitter.js.map +0 -1
  278. package/lib/utils/eventEmitter.mjs +0 -62
  279. package/lib/utils/eventEmitter.mjs.map +0 -1
  280. package/lib/utils/findComponent.d.ts +0 -12
  281. package/lib/utils/findComponent.js +0 -105
  282. package/lib/utils/findComponent.js.map +0 -1
  283. package/lib/utils/findComponent.mjs +0 -95
  284. package/lib/utils/findComponent.mjs.map +0 -1
  285. package/lib/utils/fire.d.ts +0 -2
  286. package/lib/utils/fire.js +0 -23
  287. package/lib/utils/fire.js.map +0 -1
  288. package/lib/utils/fire.mjs +0 -15
  289. package/lib/utils/fire.mjs.map +0 -1
  290. package/lib/utils/focus-lock/focusBorders.d.ts +0 -4
  291. package/lib/utils/focus-lock/focusBorders.js +0 -68
  292. package/lib/utils/focus-lock/focusBorders.js.map +0 -1
  293. package/lib/utils/focus-lock/focusBorders.mjs +0 -62
  294. package/lib/utils/focus-lock/focusBorders.mjs.map +0 -1
  295. package/lib/utils/focus-lock/getFocusableIn.d.ts +0 -1
  296. package/lib/utils/focus-lock/getFocusableIn.js +0 -25
  297. package/lib/utils/focus-lock/getFocusableIn.js.map +0 -1
  298. package/lib/utils/focus-lock/getFocusableIn.mjs +0 -19
  299. package/lib/utils/focus-lock/getFocusableIn.mjs.map +0 -1
  300. package/lib/utils/focus-lock/isFocusInside.d.ts +0 -1
  301. package/lib/utils/focus-lock/isFocusInside.js +0 -15
  302. package/lib/utils/focus-lock/isFocusInside.js.map +0 -1
  303. package/lib/utils/focus-lock/isFocusInside.mjs +0 -9
  304. package/lib/utils/focus-lock/isFocusInside.mjs.map +0 -1
  305. package/lib/utils/focus-lock/isFocusable.d.ts +0 -1
  306. package/lib/utils/focus-lock/isFocusable.js +0 -50
  307. package/lib/utils/focus-lock/isFocusable.js.map +0 -1
  308. package/lib/utils/focus-lock/isFocusable.mjs +0 -43
  309. package/lib/utils/focus-lock/isFocusable.mjs.map +0 -1
  310. package/lib/utils/focus-lock/setFocus.d.ts +0 -1
  311. package/lib/utils/focus-lock/setFocus.js +0 -70
  312. package/lib/utils/focus-lock/setFocus.js.map +0 -1
  313. package/lib/utils/focus-lock/setFocus.mjs +0 -63
  314. package/lib/utils/focus-lock/setFocus.mjs.map +0 -1
  315. package/lib/utils/getAccessibleName.d.ts +0 -1
  316. package/lib/utils/getAccessibleName.js +0 -56
  317. package/lib/utils/getAccessibleName.js.map +0 -1
  318. package/lib/utils/getAccessibleName.mjs +0 -49
  319. package/lib/utils/getAccessibleName.mjs.map +0 -1
  320. package/lib/utils/getDisplayName.d.ts +0 -2
  321. package/lib/utils/getDisplayName.js +0 -10
  322. package/lib/utils/getDisplayName.js.map +0 -1
  323. package/lib/utils/getDisplayName.mjs +0 -4
  324. package/lib/utils/getDisplayName.mjs.map +0 -1
  325. package/lib/utils/getEventTarget.d.ts +0 -1
  326. package/lib/utils/getEventTarget.js +0 -52
  327. package/lib/utils/getEventTarget.js.map +0 -1
  328. package/lib/utils/getEventTarget.mjs +0 -45
  329. package/lib/utils/getEventTarget.mjs.map +0 -1
  330. package/lib/utils/getOriginChildren.d.ts +0 -2
  331. package/lib/utils/getOriginChildren.js +0 -17
  332. package/lib/utils/getOriginChildren.js.map +0 -1
  333. package/lib/utils/getOriginChildren.mjs +0 -10
  334. package/lib/utils/getOriginChildren.mjs.map +0 -1
  335. package/lib/utils/getRandomInt.d.ts +0 -1
  336. package/lib/utils/getRandomInt.js +0 -11
  337. package/lib/utils/getRandomInt.js.map +0 -1
  338. package/lib/utils/getRandomInt.mjs +0 -5
  339. package/lib/utils/getRandomInt.mjs.map +0 -1
  340. package/lib/utils/getValue.d.ts +0 -1
  341. package/lib/utils/getValue.js +0 -14
  342. package/lib/utils/getValue.js.map +0 -1
  343. package/lib/utils/getValue.mjs +0 -8
  344. package/lib/utils/getValue.mjs.map +0 -1
  345. package/lib/utils/hasLabels.d.ts +0 -7
  346. package/lib/utils/hasLabels.js +0 -46
  347. package/lib/utils/hasLabels.js.map +0 -1
  348. package/lib/utils/hasLabels.mjs +0 -39
  349. package/lib/utils/hasLabels.mjs.map +0 -1
  350. package/lib/utils/hasParent.d.ts +0 -1
  351. package/lib/utils/hasParent.js +0 -13
  352. package/lib/utils/hasParent.js.map +0 -1
  353. package/lib/utils/hasParent.mjs +0 -8
  354. package/lib/utils/hasParent.mjs.map +0 -1
  355. package/lib/utils/ifChildren.d.ts +0 -8
  356. package/lib/utils/ifChildren.js +0 -16
  357. package/lib/utils/ifChildren.js.map +0 -1
  358. package/lib/utils/ifChildren.mjs +0 -10
  359. package/lib/utils/ifChildren.mjs.map +0 -1
  360. package/lib/utils/indentStyles.d.ts +0 -3
  361. package/lib/utils/indentStyles.js +0 -45
  362. package/lib/utils/indentStyles.js.map +0 -1
  363. package/lib/utils/indentStyles.mjs +0 -36
  364. package/lib/utils/indentStyles.mjs.map +0 -1
  365. package/lib/utils/injectStyle.d.ts +0 -2
  366. package/lib/utils/injectStyle.js +0 -47
  367. package/lib/utils/injectStyle.js.map +0 -1
  368. package/lib/utils/injectStyle.mjs +0 -40
  369. package/lib/utils/injectStyle.mjs.map +0 -1
  370. package/lib/utils/inputProps.d.ts +0 -2
  371. package/lib/utils/inputProps.js +0 -21
  372. package/lib/utils/inputProps.js.map +0 -1
  373. package/lib/utils/inputProps.mjs +0 -14
  374. package/lib/utils/inputProps.mjs.map +0 -1
  375. package/lib/utils/isInteractiveElement.d.ts +0 -1
  376. package/lib/utils/isInteractiveElement.js +0 -34
  377. package/lib/utils/isInteractiveElement.js.map +0 -1
  378. package/lib/utils/isInteractiveElement.mjs +0 -28
  379. package/lib/utils/isInteractiveElement.mjs.map +0 -1
  380. package/lib/utils/isNode.d.ts +0 -1
  381. package/lib/utils/isNode.js +0 -28
  382. package/lib/utils/isNode.js.map +0 -1
  383. package/lib/utils/isNode.mjs +0 -21
  384. package/lib/utils/isNode.mjs.map +0 -1
  385. package/lib/utils/isPromise.d.ts +0 -1
  386. package/lib/utils/isPromise.js +0 -10
  387. package/lib/utils/isPromise.js.map +0 -1
  388. package/lib/utils/isPromise.mjs +0 -4
  389. package/lib/utils/isPromise.mjs.map +0 -1
  390. package/lib/utils/isRetina.d.ts +0 -1
  391. package/lib/utils/isRetina.js +0 -15
  392. package/lib/utils/isRetina.js.map +0 -1
  393. package/lib/utils/isRetina.mjs +0 -9
  394. package/lib/utils/isRetina.mjs.map +0 -1
  395. package/lib/utils/logger.d.ts +0 -9
  396. package/lib/utils/logger.js +0 -37
  397. package/lib/utils/logger.js.map +0 -1
  398. package/lib/utils/logger.mjs +0 -34
  399. package/lib/utils/logger.mjs.map +0 -1
  400. package/lib/utils/numericChecker.d.ts +0 -5
  401. package/lib/utils/numericChecker.js +0 -33
  402. package/lib/utils/numericChecker.js.map +0 -1
  403. package/lib/utils/numericChecker.mjs +0 -27
  404. package/lib/utils/numericChecker.mjs.map +0 -1
  405. package/lib/utils/ownerDocument.d.ts +0 -1
  406. package/lib/utils/ownerDocument.js +0 -10
  407. package/lib/utils/ownerDocument.js.map +0 -1
  408. package/lib/utils/ownerDocument.mjs +0 -4
  409. package/lib/utils/ownerDocument.mjs.map +0 -1
  410. package/lib/utils/pick.d.ts +0 -1
  411. package/lib/utils/pick.js +0 -19
  412. package/lib/utils/pick.js.map +0 -1
  413. package/lib/utils/pick.mjs +0 -15
  414. package/lib/utils/pick.mjs.map +0 -1
  415. package/lib/utils/propsForElement.d.ts +0 -3
  416. package/lib/utils/propsForElement.js +0 -58
  417. package/lib/utils/propsForElement.js.map +0 -1
  418. package/lib/utils/propsForElement.mjs +0 -50
  419. package/lib/utils/propsForElement.mjs.map +0 -1
  420. package/lib/utils/rafTrottle.d.ts +0 -2
  421. package/lib/utils/rafTrottle.js +0 -32
  422. package/lib/utils/rafTrottle.js.map +0 -1
  423. package/lib/utils/rafTrottle.mjs +0 -26
  424. package/lib/utils/rafTrottle.mjs.map +0 -1
  425. package/lib/utils/reactToText.d.ts +0 -3
  426. package/lib/utils/reactToText.js +0 -32
  427. package/lib/utils/reactToText.js.map +0 -1
  428. package/lib/utils/reactToText.mjs +0 -26
  429. package/lib/utils/reactToText.mjs.map +0 -1
  430. package/lib/utils/ref.d.ts +0 -8
  431. package/lib/utils/ref.js +0 -82
  432. package/lib/utils/ref.js.map +0 -1
  433. package/lib/utils/ref.mjs +0 -73
  434. package/lib/utils/ref.mjs.map +0 -1
  435. package/lib/utils/setRef.d.ts +0 -2
  436. package/lib/utils/setRef.js +0 -9
  437. package/lib/utils/setRef.js.map +0 -1
  438. package/lib/utils/setRef.mjs +0 -3
  439. package/lib/utils/setRef.mjs.map +0 -1
  440. package/lib/utils/syncScroll.d.ts +0 -1
  441. package/lib/utils/syncScroll.js +0 -61
  442. package/lib/utils/syncScroll.js.map +0 -1
  443. package/lib/utils/syncScroll.mjs +0 -54
  444. package/lib/utils/syncScroll.mjs.map +0 -1
  445. package/lib/utils/uncontroll.d.ts +0 -4
  446. package/lib/utils/uncontroll.js +0 -47
  447. package/lib/utils/uncontroll.js.map +0 -1
  448. package/lib/utils/uncontroll.mjs +0 -38
  449. package/lib/utils/uncontroll.mjs.map +0 -1
  450. package/lib/utils/uniqueID.d.ts +0 -8
  451. package/lib/utils/uniqueID.js +0 -40
  452. package/lib/utils/uniqueID.js.map +0 -1
  453. package/lib/utils/uniqueID.mjs +0 -33
  454. package/lib/utils/uniqueID.mjs.map +0 -1
  455. package/lib/utils/use/useColorResolver.d.ts +0 -1
  456. package/lib/utils/use/useColorResolver.js +0 -109
  457. package/lib/utils/use/useColorResolver.js.map +0 -1
  458. package/lib/utils/use/useColorResolver.mjs +0 -102
  459. package/lib/utils/use/useColorResolver.mjs.map +0 -1
  460. package/lib/utils/use/useEnhancedEffect.d.ts +0 -3
  461. package/lib/utils/use/useEnhancedEffect.js +0 -12
  462. package/lib/utils/use/useEnhancedEffect.js.map +0 -1
  463. package/lib/utils/use/useEnhancedEffect.mjs +0 -6
  464. package/lib/utils/use/useEnhancedEffect.mjs.map +0 -1
  465. package/lib/utils/use/useEventCallback.d.ts +0 -4
  466. package/lib/utils/use/useEventCallback.js +0 -25
  467. package/lib/utils/use/useEventCallback.js.map +0 -1
  468. package/lib/utils/use/useEventCallback.mjs +0 -19
  469. package/lib/utils/use/useEventCallback.mjs.map +0 -1
  470. package/lib/utils/use/useEventListener.d.ts +0 -2
  471. package/lib/utils/use/useEventListener.js +0 -32
  472. package/lib/utils/use/useEventListener.js.map +0 -1
  473. package/lib/utils/use/useEventListener.mjs +0 -25
  474. package/lib/utils/use/useEventListener.mjs.map +0 -1
  475. package/lib/utils/use/useFocusLock.d.ts +0 -10
  476. package/lib/utils/use/useFocusLock.js +0 -292
  477. package/lib/utils/use/useFocusLock.js.map +0 -1
  478. package/lib/utils/use/useFocusLock.mjs +0 -272
  479. package/lib/utils/use/useFocusLock.mjs.map +0 -1
  480. package/lib/utils/use/usePreventScroll.d.ts +0 -2
  481. package/lib/utils/use/usePreventScroll.js +0 -76
  482. package/lib/utils/use/usePreventScroll.js.map +0 -1
  483. package/lib/utils/use/usePreventScroll.mjs +0 -68
  484. package/lib/utils/use/usePreventScroll.mjs.map +0 -1
  485. package/lib/utils/use/useScrollBarWidth.d.ts +0 -1
  486. package/lib/utils/use/useScrollBarWidth.js +0 -43
  487. package/lib/utils/use/useScrollBarWidth.js.map +0 -1
  488. package/lib/utils/use/useScrollBarWidth.mjs +0 -36
  489. package/lib/utils/use/useScrollBarWidth.mjs.map +0 -1
  490. package/lib/utils/useCssVariable.d.ts +0 -8
  491. package/lib/utils/useCssVariable.js +0 -53
  492. package/lib/utils/useCssVariable.js.map +0 -1
  493. package/lib/utils/useCssVariable.mjs +0 -46
  494. package/lib/utils/useCssVariable.mjs.map +0 -1
  495. package/lib/utils/zIndexStacking.d.ts +0 -10
  496. package/lib/utils/zIndexStacking.js +0 -45
  497. package/lib/utils/zIndexStacking.js.map +0 -1
  498. package/lib/utils/zIndexStacking.mjs +0 -38
  499. package/lib/utils/zIndexStacking.mjs.map +0 -1
@@ -1,343 +0,0 @@
1
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
- import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
4
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
- import _superPropGet from "@babel/runtime/helpers/esm/superPropGet";
6
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
7
- import _createClass from "@babel/runtime/helpers/esm/createClass";
8
- import _callSuper from "@babel/runtime/helpers/esm/callSuper";
9
- import _inherits from "@babel/runtime/helpers/esm/inherits";
10
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
11
- import _extends from "@babel/runtime/helpers/esm/extends";
12
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
13
- import hoistNonReactStatics from "hoist-non-react-statics";
14
- import React from "react";
15
- import { Component } from "./core-types/Component.mjs";
16
- import { CORE_AS_PROPS, CORE_INSTANCE, CORE_INIT, CORE_COMPONENT, PARENT_COMPONENTS, CONTEXT_COMPONENT, CREATE_COMPONENT } from "./core-types/symbols.mjs";
17
- import Enhancement from "./enhancement/Children.mjs";
18
- import Enhancement$6 from "./enhancement/dataName.mjs";
19
- import Enhancement$7 from "./enhancement/enhance.mjs";
20
- import Enhancement$4 from "./enhancement/functionDefaultProps.mjs";
21
- import i18nAppLocaleEnhance from "./enhancement/i18n.mjs";
22
- import Enhancement$5 from "./enhancement/inheritedName.mjs";
23
- import Enhancement$1 from "./enhancement/Root.mjs";
24
- import Enhancement$3, { ROOT_COMPONENT, getterMethodNameByDisplayName, STATIC_COMPONENT } from "./enhancement/staticChildren.mjs";
25
- import Enhancement$8 from "./enhancement/style.mjs";
26
- import Enhancement$2 from "./enhancement/uncontrolledProps.mjs";
27
- import assignProps$1 from "./utils/assignProps.mjs";
28
- import { useForkRef } from "./utils/ref.mjs";
29
- import useEnhancedEffect from "./utils/use/useEnhancedEffect.mjs";
30
- var _excluded = ["forwardRef"], _excluded2 = ["forwardRef", "__WRAPPER_PROPS_BIND__"], _excluded3 = ["ref"];
31
- function isEmptyObject(obj) {
32
- return Object.getOwnPropertyNames(obj).length === 0 && Object.getOwnPropertySymbols && // For IE 11
33
- Object.getOwnPropertySymbols(obj).length === 0 && Object.getPrototypeOf(obj) === Object.prototype;
34
- }
35
- function createGetField(enhancements, Component2, isFunction) {
36
- return function getField(key) {
37
- return enhancements.filter(function(enhancement) {
38
- if (!enhancement.condition) {
39
- return true;
40
- }
41
- return enhancement.condition(Component2, isFunction);
42
- }).reduce(function(acc, item) {
43
- if (item[key]) {
44
- acc.push(item[key]);
45
- }
46
- return acc;
47
- }, []);
48
- };
49
- }
50
- function createForwardWrapper(Component2, wrapperProps, statics, isFunction) {
51
- var RootComponent = Component2[ROOT_COMPONENT];
52
- var getterMethodName = getterMethodNameByDisplayName(Component2 === null || Component2 === void 0 ? void 0 : Component2.displayName);
53
- var getterMethod = RootComponent !== null && RootComponent !== void 0 && RootComponent.prototype ? RootComponent.prototype[getterMethodName] : void 0;
54
- var useGetterIndex = (getterMethod === null || getterMethod === void 0 ? void 0 : getterMethod.length) >= 2;
55
- function WrapperForwardRefWithBind(_ref, ref) {
56
- var _ref$forwardRef = _ref.forwardRef, forwardRef = _ref$forwardRef === void 0 ? null : _ref$forwardRef, other = _objectWithoutProperties(_ref, _excluded);
57
- return /* @__PURE__ */ React.createElement(BindingWrapper, _extends({}, other, {
58
- forwardRef: useForkRef(ref, forwardRef)
59
- }));
60
- }
61
- function WrapperForwardRef(_ref2, ref) {
62
- var _ref2$forwardRef = _ref2.forwardRef, forwardRef = _ref2$forwardRef === void 0 ? null : _ref2$forwardRef, __WRAPPER_PROPS_BIND__ = _ref2.__WRAPPER_PROPS_BIND__, other = _objectWithoutProperties(_ref2, _excluded2);
63
- var _reduce = (__WRAPPER_PROPS_BIND__ || wrapperProps).reduce(function(acc, enhancement) {
64
- return enhancement(acc, WrapperComponent, isFunction);
65
- }, other), _reduce$ref = _reduce.ref, enhancementRef = _reduce$ref === void 0 ? null : _reduce$ref, props = _objectWithoutProperties(_reduce, _excluded3);
66
- return /* @__PURE__ */ React.createElement(Component2, _extends({}, props, {
67
- forwardRef: useForkRef(enhancementRef, ref, forwardRef)
68
- }));
69
- }
70
- var BindingWrapper = /* @__PURE__ */ (function(_React$Component) {
71
- function BindingWrapper2() {
72
- var _this;
73
- _classCallCheck(this, BindingWrapper2);
74
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
75
- args[_key] = arguments[_key];
76
- }
77
- _this = _callSuper(this, BindingWrapper2, [].concat(args));
78
- _defineProperty(_this, "index", -1);
79
- return _this;
80
- }
81
- _inherits(BindingWrapper2, _React$Component);
82
- return _createClass(BindingWrapper2, [{
83
- key: "render",
84
- value: function render() {
85
- var _this2 = this;
86
- return /* @__PURE__ */ React.createElement(WrapperForwardRef, _extends({}, this.props, {
87
- __WRAPPER_PROPS_BIND__: wrapperProps.map(function(fn) {
88
- return fn.bind(_this2);
89
- })
90
- }));
91
- }
92
- }]);
93
- })(React.Component);
94
- var WrapperComponent = /* @__PURE__ */ React.forwardRef(useGetterIndex ? WrapperForwardRefWithBind : WrapperForwardRef);
95
- hoistNonReactStatics(WrapperComponent, Component2);
96
- WrapperComponent.displayName = Component2.displayName;
97
- WrapperComponent.defaultProps = Component2.defaultProps;
98
- statics.forEach(function(enhancement) {
99
- return Object.assign(WrapperComponent, enhancement(WrapperComponent, Component2, isFunction));
100
- });
101
- return WrapperComponent;
102
- }
103
- function wrapClass(OriginComponent, enhancements, Context) {
104
- var getField = createGetField(enhancements, OriginComponent, false);
105
- var inits = getField("init");
106
- var props = getField("asProps");
107
- var renders = getField("render");
108
- var statics = getField("static");
109
- var wrapperProps = getField("wrapperProps");
110
- var contexts = getField("context");
111
- var Component2 = /* @__PURE__ */ (function(_OriginComponent2) {
112
- function Component3(props2, context) {
113
- var _this3;
114
- _classCallCheck(this, Component3);
115
- _this3 = _callSuper(this, Component3, [props2, context]);
116
- _defineProperty(_this3, CORE_AS_PROPS, null);
117
- _defineProperty(_this3, CORE_INSTANCE, WrapperComponent);
118
- _defineProperty(_this3, CORE_INIT, false);
119
- inits.forEach(function(enhancement) {
120
- return enhancement.call(_this3, props2, WrapperComponent, false);
121
- });
122
- _this3[CORE_INIT] = true;
123
- return _this3;
124
- }
125
- _inherits(Component3, _OriginComponent2);
126
- return _createClass(Component3, [{
127
- key: "asProps",
128
- get: function get() {
129
- var _this4 = this;
130
- if (!this[CORE_INIT]) {
131
- throw new Error("Can not call asProps in constructor");
132
- }
133
- if (!this[CORE_AS_PROPS]) {
134
- this[CORE_AS_PROPS] = props.reduce(function(acc, enhancement) {
135
- return enhancement.call(_this4, acc, WrapperComponent, false);
136
- }, this.props);
137
- if (this[CORE_AS_PROPS] !== null) {
138
- var prefixesMap = /* @__PURE__ */ new Map();
139
- Object.entries(this[CORE_AS_PROPS]).forEach(function(_ref3) {
140
- var _ref4 = _slicedToArray(_ref3, 2), key2 = _ref4[0], value2 = _ref4[1];
141
- var _key$split = key2.split(":"), _key$split2 = _slicedToArray(_key$split, 2), prefix = _key$split2[0], propertyKey = _key$split2[1];
142
- if (prefix !== "use" && propertyKey) {
143
- var _prefixesMap$get;
144
- var obj = (_prefixesMap$get = prefixesMap.get(prefix)) !== null && _prefixesMap$get !== void 0 ? _prefixesMap$get : {};
145
- obj[propertyKey] = value2;
146
- prefixesMap.set(prefix, obj);
147
- }
148
- });
149
- var _iterator = _createForOfIteratorHelper(prefixesMap.entries()), _step;
150
- try {
151
- for (_iterator.s(); !(_step = _iterator.n()).done; ) {
152
- var _step$value = _slicedToArray(_step.value, 2), key = _step$value[0], value = _step$value[1];
153
- Object.defineProperty(this[CORE_AS_PROPS], "".concat(key, "Props"), {
154
- value
155
- });
156
- }
157
- } catch (err) {
158
- _iterator.e(err);
159
- } finally {
160
- _iterator.f();
161
- }
162
- }
163
- }
164
- return this[CORE_AS_PROPS];
165
- }
166
- }, {
167
- key: "setContext",
168
- value: function setContext() {
169
- var _this5 = this;
170
- var contextProps = _superPropGet(Component3, "setContext", this, 1) ? _superPropGet(Component3, "setContext", this, 3)([]) : {};
171
- return contexts.reduce(function(acc, enhancement) {
172
- return enhancement.call(_this5, acc, WrapperComponent, false);
173
- }, contextProps);
174
- }
175
- }, {
176
- key: "render",
177
- value: function render() {
178
- var _this6 = this;
179
- this[CORE_AS_PROPS] = null;
180
- if (!_superPropGet(Component3, "render", this, 1)) {
181
- throw new Error("Component `render` method is not defined");
182
- }
183
- var asProps = this.asProps;
184
- var ctx = this.setContext();
185
- var render2 = renders.reduce(function(acc, enhancement) {
186
- return enhancement.call(_this6, acc, asProps, WrapperComponent, false);
187
- }, _superPropGet(Component3, "render", this, 3)([]));
188
- if (!WrapperComponent[STATIC_COMPONENT] && !isEmptyObject(ctx)) {
189
- return /* @__PURE__ */ React.createElement(Context.Provider, {
190
- value: _objectSpread(_objectSpread({}, asProps), ctx)
191
- }, render2);
192
- } else {
193
- return render2;
194
- }
195
- }
196
- }]);
197
- })(OriginComponent);
198
- var WrapperComponent = createForwardWrapper(Component2, wrapperProps, statics, false);
199
- return WrapperComponent;
200
- }
201
- function wrapFunction(OriginComponent, enhancements, Context) {
202
- var getField = createGetField(enhancements, OriginComponent, true);
203
- var inits = getField("init");
204
- var props = getField("asProps");
205
- var renders = getField("render");
206
- var statics = getField("static");
207
- var wrapperProps = getField("wrapperProps");
208
- var contexts = getField("context");
209
- var Component2 = /* @__PURE__ */ React.memo(function FunctionMemoComponent(other) {
210
- var selfRef = React.useRef({});
211
- var firstRender = React.useRef(true);
212
- useEnhancedEffect(function() {
213
- firstRender.current = false;
214
- }, []);
215
- if (firstRender.current) {
216
- inits.forEach(function(enhancement) {
217
- return enhancement.call(selfRef.current, other, WrapperComponent, true);
218
- });
219
- }
220
- var asProps = props.reduce(function(acc, enhancement) {
221
- return enhancement.call(selfRef.current, acc, WrapperComponent, true);
222
- }, other);
223
- var ctx = contexts.reduce(function(acc, enhancement) {
224
- return enhancement.call(selfRef.current, acc, WrapperComponent, true);
225
- }, {});
226
- var render = renders.reduce(function(acc, enhancement) {
227
- return enhancement.call(selfRef.current, acc, asProps, WrapperComponent, true);
228
- }, /* @__PURE__ */ React.createElement(OriginComponent, asProps));
229
- if (!WrapperComponent[STATIC_COMPONENT] && !isEmptyObject(ctx)) {
230
- return /* @__PURE__ */ React.createElement(Context.Provider, {
231
- value: _objectSpread(_objectSpread({}, asProps), ctx)
232
- }, render);
233
- } else {
234
- return render;
235
- }
236
- });
237
- Object.assign(Component2, OriginComponent);
238
- var WrapperComponent = createForwardWrapper(Component2, wrapperProps, statics, true);
239
- return WrapperComponent;
240
- }
241
- function wrapCore(OriginComponent, enhancements, Context) {
242
- var Component2 = function Component3(_ref5) {
243
- var Root = _ref5.Root;
244
- var defaultProps = OriginComponent.defaultProps || {};
245
- return /* @__PURE__ */ React.createElement(Root, _extends({}, defaultProps, {
246
- render: OriginComponent
247
- }));
248
- };
249
- hoistNonReactStatics(Component2, OriginComponent);
250
- Component2.displayName = OriginComponent.displayName;
251
- return wrapFunction(Component2, enhancements, Context);
252
- }
253
- function createComposeComponent(OriginComponent, Context, enhancements) {
254
- if (React.PureComponent.isPrototypeOf(OriginComponent) || React.Component.isPrototypeOf(OriginComponent)) {
255
- if (OriginComponent.prototype instanceof Component) {
256
- return wrapClass(OriginComponent, enhancements, Context);
257
- } else {
258
- throw new Error("Must inherit from our component");
259
- }
260
- } else if (typeof OriginComponent === "function") {
261
- return wrapFunction(OriginComponent, enhancements, Context);
262
- } else if (OriginComponent[CORE_COMPONENT]) {
263
- return wrapCore(OriginComponent, enhancements, Context);
264
- } else {
265
- throw new Error("Must be a React component");
266
- }
267
- }
268
- function assignProps(p1, p2) {
269
- return assignProps$1(p2, p1);
270
- }
271
- function createComponent(OriginComponent) {
272
- var childComponents = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
273
- var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
274
- var _options$context = options.context, context = _options$context === void 0 ? /* @__PURE__ */ React.createContext({}) : _options$context, _options$parent = options.parent, parent = _options$parent === void 0 ? [] : _options$parent, _options$enhancements = options.enhancements, enhancements = _options$enhancements === void 0 ? [] : _options$enhancements;
275
- var parents = Array.isArray(parent) ? parent : [parent];
276
- if (parents.length) {
277
- var wholeFamily = parents.reduce(function(acc, parent2) {
278
- if (parent2[PARENT_COMPONENTS]) {
279
- acc = [].concat(_toConsumableArray(parent2[PARENT_COMPONENTS]), _toConsumableArray(acc));
280
- }
281
- return acc;
282
- }, parents);
283
- OriginComponent[PARENT_COMPONENTS] = wholeFamily;
284
- parents = wholeFamily;
285
- }
286
- if (OriginComponent[CORE_COMPONENT]) {
287
- parents.push(OriginComponent);
288
- }
289
- var Component2 = createComposeComponent(OriginComponent, context, [].concat(_toConsumableArray(enhancements.map(function(f) {
290
- return f(context, parents, createComponent, childComponents);
291
- })), [
292
- i18nAppLocaleEnhance(),
293
- Enhancement(context, parents),
294
- // root must be under the children
295
- Enhancement$1(),
296
- Enhancement$2(),
297
- Enhancement$3(childComponents, createComponent, {
298
- context,
299
- parent,
300
- enhancements
301
- }),
302
- // functionDefaultProps must be under the staticChild
303
- Enhancement$4(),
304
- // inheritedName must be under the staticChild
305
- Enhancement$5(),
306
- // dataName must be under the staticChild
307
- Enhancement$6(),
308
- // enhanceEnhancement must be under the functionDefaultPropsEnhancement
309
- Enhancement$7(),
310
- Enhancement$8(childComponents, context)
311
- ]));
312
- Component2[CONTEXT_COMPONENT] = context;
313
- Component2._______childrenComponents = childComponents;
314
- Component2[CREATE_COMPONENT] = function() {
315
- var _OriginComponent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : OriginComponent;
316
- var _childComponents = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : childComponents;
317
- var _options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : options;
318
- return createComponent(_OriginComponent, _childComponents, _options);
319
- };
320
- Component2.newInstance = function() {
321
- var _OriginComponent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : OriginComponent;
322
- var _childComponents = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : childComponents;
323
- var _options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : options;
324
- return createComponent(_OriginComponent, _childComponents, _options);
325
- };
326
- Component2[CORE_COMPONENT] = true;
327
- return Component2;
328
- }
329
- function createBaseComponent(OriginComponent) {
330
- var _OriginComponent$disp;
331
- var Component2 = /* @__PURE__ */ React.forwardRef(OriginComponent);
332
- Component2.displayName = (_OriginComponent$disp = OriginComponent.displayName) !== null && _OriginComponent$disp !== void 0 ? _OriginComponent$disp : "";
333
- Component2.defaultProps = {
334
- "data-ui-name": OriginComponent.displayName
335
- };
336
- Component2[CORE_COMPONENT] = true;
337
- return Component2;
338
- }
339
- export {
340
- assignProps,
341
- createBaseComponent,
342
- createComponent
343
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"coreFactory.mjs","names":["hoistNonReactStatics","React","Component","CONTEXT_COMPONENT","CORE_AS_PROPS","CORE_COMPONENT","CORE_INIT","CORE_INSTANCE","CREATE_COMPONENT","PARENT_COMPONENTS","childrenEnhancement","dataNameEnhancement","enhanceEnhancement","functionDefaultPropsEnhancement","i18nAppLocaleEnhance","inheritedNameEnhancement","rootEnhancement","staticChildrenEnhancement","getterMethodNameByDisplayName","ROOT_COMPONENT","STATIC_COMPONENT","styleEnhancement","uncontrolledPropsEnhancement","_assignProps","useForkRef","useEnhancedEffect","isEmptyObject","obj","Object","getOwnPropertyNames","length","getOwnPropertySymbols","getPrototypeOf","prototype","createGetField","enhancements","isFunction","getField","key","filter","enhancement","condition","reduce","acc","item","push","createForwardWrapper","wrapperProps","statics","RootComponent","getterMethodName","displayName","getterMethod","undefined","useGetterIndex","WrapperForwardRefWithBind","_ref","ref","_ref$forwardRef","forwardRef","other","_objectWithoutProperties","_excluded","createElement","BindingWrapper","_extends","WrapperForwardRef","_ref2","_ref2$forwardRef","__WRAPPER_PROPS_BIND__","_excluded2","_reduce","WrapperComponent","_reduce$ref","enhancementRef","props","_excluded3","_React$Component","_this","_classCallCheck","_len","arguments","args","Array","_key","_callSuper","concat","_defineProperty","_inherits","_createClass","value","render","_this2","map","fn","bind","defaultProps","forEach","assign","wrapClass","OriginComponent","Context","inits","renders","contexts","_OriginComponent2","context","_this3","call","get","_this4","Error","prefixesMap","Map","entries","_ref3","_ref4","_slicedToArray","_key$split","split","_key$split2","prefix","propertyKey","_prefixesMap$get","set","_iterator","_createForOfIteratorHelper","_step","s","n","done","_step$value","defineProperty","err","e","f","setContext","_this5","contextProps","_superPropGet","_this6","asProps","ctx","Provider","_objectSpread","wrapFunction","memo","FunctionMemoComponent","selfRef","useRef","firstRender","current","wrapCore","_ref5","Root","createComposeComponent","PureComponent","isPrototypeOf","assignProps","p1","p2","createComponent","childComponents","options","_options$context","createContext","_options$parent","parent","_options$enhancements","parents","isArray","wholeFamily","_toConsumableArray","_______childrenComponents","_OriginComponent","_childComponents","_options","newInstance","createBaseComponent","_OriginComponent$disp"],"sources":["../src/coreFactory.tsx"],"sourcesContent":["import hoistNonReactStatics from 'hoist-non-react-statics';\nimport React from 'react';\n\nimport { type Intergalactic, Component } from './core-types/Component';\nimport {\n CONTEXT_COMPONENT,\n CORE_AS_PROPS,\n CORE_COMPONENT,\n CORE_INIT,\n CORE_INSTANCE,\n CREATE_COMPONENT,\n PARENT_COMPONENTS,\n} from './core-types/symbols';\nimport childrenEnhancement from './enhancement/Children';\nimport dataNameEnhancement from './enhancement/dataName';\nimport enhanceEnhancement from './enhancement/enhance';\nimport functionDefaultPropsEnhancement from './enhancement/functionDefaultProps';\nimport i18nAppLocaleEnhance from './enhancement/i18n';\nimport inheritedNameEnhancement from './enhancement/inheritedName';\nimport rootEnhancement from './enhancement/Root';\nimport staticChildrenEnhancement, {\n getterMethodNameByDisplayName,\n ROOT_COMPONENT,\n STATIC_COMPONENT,\n} from './enhancement/staticChildren';\nimport styleEnhancement from './enhancement/style';\nimport uncontrolledPropsEnhancement from './enhancement/uncontrolledProps';\nimport _assignProps from './utils/assignProps';\nimport { useForkRef } from './utils/ref';\nimport useEnhancedEffect from './utils/use/useEnhancedEffect';\n\nfunction isEmptyObject(obj: any) {\n return (\n Object.getOwnPropertyNames(obj).length === 0 &&\n Object.getOwnPropertySymbols && // For IE 11\n Object.getOwnPropertySymbols(obj).length === 0 &&\n Object.getPrototypeOf(obj) === Object.prototype\n );\n}\n\nfunction createGetField(enhancements: any, Component: any, isFunction: boolean) {\n return function getField(key: string) {\n return enhancements\n .filter((enhancement: any) => {\n if (!enhancement.condition) {\n return true;\n }\n return enhancement.condition(Component, isFunction);\n })\n .reduce((acc: any, item: any) => {\n if (item[key]) {\n acc.push(item[key]);\n }\n return acc;\n }, []);\n };\n}\n\nfunction createForwardWrapper(Component: any, wrapperProps: any, statics: any, isFunction: any) {\n const RootComponent = Component[ROOT_COMPONENT];\n const getterMethodName = getterMethodNameByDisplayName(Component?.displayName);\n const getterMethod = RootComponent?.prototype\n ? RootComponent.prototype[getterMethodName]\n : undefined;\n const useGetterIndex = getterMethod?.length >= 2;\n\n function WrapperForwardRefWithBind({ forwardRef = null, ...other }, ref: any) {\n return <BindingWrapper {...other} forwardRef={useForkRef(ref, forwardRef)} />;\n }\n\n function WrapperForwardRef(\n { forwardRef = null, __WRAPPER_PROPS_BIND__, ...other }: any,\n ref: any,\n ) {\n const { ref: enhancementRef = null, ...props } = (\n __WRAPPER_PROPS_BIND__ || wrapperProps\n ).reduce((acc: any, enhancement: any) => enhancement(acc, WrapperComponent, isFunction), other);\n return <Component {...props} forwardRef={useForkRef(enhancementRef, ref, forwardRef)} />;\n }\n\n class BindingWrapper extends React.Component<any> {\n index = -1;\n render() {\n return (\n <WrapperForwardRef\n {...this.props}\n __WRAPPER_PROPS_BIND__={wrapperProps.map((fn: any) => fn.bind(this))}\n />\n );\n }\n }\n\n const WrapperComponent = React.forwardRef(\n useGetterIndex ? WrapperForwardRefWithBind : WrapperForwardRef,\n );\n\n hoistNonReactStatics(WrapperComponent, Component);\n\n WrapperComponent.displayName = Component.displayName;\n // TODO: defaultProps is only empty\n WrapperComponent.defaultProps = Component.defaultProps;\n // STATIC\n statics.forEach((enhancement: any) =>\n Object.assign(WrapperComponent, enhancement(WrapperComponent, Component, isFunction)),\n );\n\n return WrapperComponent;\n}\n\nfunction wrapClass(OriginComponent: any, enhancements: any, Context: any) {\n const getField = createGetField(enhancements, OriginComponent, false);\n\n const inits = getField('init');\n const props = getField('asProps');\n const renders = getField('render');\n const statics = getField('static');\n const wrapperProps = getField('wrapperProps');\n const contexts = getField('context');\n\n class Component extends OriginComponent {\n [CORE_AS_PROPS] = null;\n [CORE_INSTANCE] = WrapperComponent;\n [CORE_INIT] = false;\n\n constructor(props: any, context: any) {\n super(props, context);\n // INITS\n inits.forEach((enhancement: any) => enhancement.call(this, props, WrapperComponent, false));\n this[CORE_INIT] = true;\n }\n\n get asProps() {\n // TODO if not production\n if (!this[CORE_INIT]) {\n throw new Error('Can not call asProps in constructor');\n }\n if (!this[CORE_AS_PROPS]) {\n // PROPS\n this[CORE_AS_PROPS] = props.reduce((acc: any, enhancement: any) => {\n return enhancement.call(this, acc, WrapperComponent, false);\n }, this.props);\n\n if (this[CORE_AS_PROPS] !== null) {\n const prefixesMap = new Map<string, Record<string, unknown>>();\n Object.entries(this[CORE_AS_PROPS]).forEach(([key, value]) => {\n const [prefix, propertyKey] = key.split(':');\n if (prefix !== 'use' && propertyKey) {\n const obj = prefixesMap.get(prefix) ?? {};\n obj[propertyKey] = value;\n\n prefixesMap.set(prefix, obj);\n }\n });\n\n for (const [key, value] of prefixesMap.entries()) {\n Object.defineProperty(this[CORE_AS_PROPS], `${key}Props`, { value });\n }\n }\n }\n return this[CORE_AS_PROPS];\n }\n\n setContext() {\n const contextProps = super.setContext ? super.setContext() : {};\n // CONTEXT\n return contexts.reduce(\n (acc: any, enhancement: any) => enhancement.call(this, acc, WrapperComponent, false),\n contextProps,\n );\n }\n\n render() {\n this[CORE_AS_PROPS] = null;\n // TODO if not production\n if (!super.render) {\n throw new Error('Component `render` method is not defined');\n }\n const asProps: any = this.asProps;\n const ctx = this.setContext();\n // RENDER\n const render = renders.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(this, acc, asProps, WrapperComponent, false),\n super.render(),\n );\n if (!WrapperComponent[STATIC_COMPONENT] && !isEmptyObject(ctx)) {\n return <Context.Provider value={{ ...asProps, ...ctx }}>{render}</Context.Provider>;\n } else {\n return render;\n }\n }\n }\n\n const WrapperComponent: any = createForwardWrapper(Component, wrapperProps, statics, false);\n return WrapperComponent;\n}\n\nfunction wrapFunction(OriginComponent: any, enhancements: any, Context: any) {\n const getField = createGetField(enhancements, OriginComponent, true);\n\n const inits = getField('init');\n const props = getField('asProps');\n const renders = getField('render');\n const statics = getField('static');\n const wrapperProps = getField('wrapperProps');\n const contexts = getField('context');\n\n const Component = React.memo(function FunctionMemoComponent(other) {\n const selfRef = React.useRef({});\n const firstRender = React.useRef(true);\n useEnhancedEffect(() => {\n firstRender.current = false;\n }, []);\n if (firstRender.current) {\n // INITS\n inits.forEach((enhancement: any) =>\n enhancement.call(selfRef.current, other, WrapperComponent, true),\n );\n }\n // PROPS\n const asProps = props.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(selfRef.current, acc, WrapperComponent, true),\n other,\n );\n // CONTEXT\n const ctx = contexts.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(selfRef.current, acc, WrapperComponent, true),\n {},\n );\n\n // RENDER\n const render = renders.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(selfRef.current, acc, asProps, WrapperComponent, true),\n <OriginComponent {...asProps} />,\n );\n\n if (!WrapperComponent[STATIC_COMPONENT] && !isEmptyObject(ctx)) {\n return <Context.Provider value={{ ...asProps, ...ctx }}>{render}</Context.Provider>;\n } else {\n return render;\n }\n });\n Object.assign(Component, OriginComponent);\n const WrapperComponent: any = createForwardWrapper(Component, wrapperProps, statics, true);\n return WrapperComponent;\n}\n\nfunction wrapCore(OriginComponent: any, enhancements: any, Context: any) {\n const Component = function ({ Root }: any) {\n const defaultProps = OriginComponent.defaultProps || {};\n return <Root {...defaultProps} render={OriginComponent} />;\n };\n hoistNonReactStatics(Component, OriginComponent);\n Component.displayName = OriginComponent.displayName;\n return wrapFunction(Component, enhancements, Context);\n}\n\nfunction createComposeComponent(OriginComponent: any, Context: any, enhancements: any): any {\n if (\n React.PureComponent.isPrototypeOf(OriginComponent) ||\n React.Component.isPrototypeOf(OriginComponent)\n ) {\n if (OriginComponent.prototype instanceof Component) {\n return wrapClass(OriginComponent, enhancements, Context);\n } else {\n throw new Error('Must inherit from our component');\n }\n } else if (typeof OriginComponent === 'function') {\n return wrapFunction(OriginComponent, enhancements, Context);\n } else if (OriginComponent[CORE_COMPONENT]) {\n return wrapCore(OriginComponent, enhancements, Context);\n } else {\n throw new Error('Must be a React component');\n }\n}\n\nexport function assignProps(p1: any, p2: any) {\n return _assignProps(p2, p1);\n}\n\nfunction createComponent<T extends Intergalactic.InternalTypings.ComponentTag = 'div', ComponentProps = {}, ContextType = {}, E extends Readonly<any[]> = never[]>(\n OriginComponent: any,\n childComponents: any = {},\n options: {\n context?: React.Context<ContextType>;\n parent?: Intergalactic.Component<any, any, any, any> | Intergalactic.Component<any, any, any, any>[];\n enhancements?: [any];\n } = {},\n): Intergalactic.Component<T, ComponentProps, ContextType, E> {\n const {\n context = React.createContext<ContextType>({} as ContextType),\n parent = [],\n enhancements = [],\n } = options;\n let parents: any[] = Array.isArray(parent) ? parent : [parent];\n if (parents.length) {\n const wholeFamily = parents.reduce((acc: any, parent: any) => {\n if (parent[PARENT_COMPONENTS]) {\n acc = [...parent[PARENT_COMPONENTS], ...acc];\n }\n return acc;\n }, parents);\n // @ts-ignore\n OriginComponent[PARENT_COMPONENTS] = wholeFamily;\n parents = wholeFamily;\n }\n // @ts-ignore\n if (OriginComponent[CORE_COMPONENT]) {\n parents.push(OriginComponent);\n }\n const Component = createComposeComponent(OriginComponent, context, [\n // @ts-ignore\n ...enhancements.map((f) => f(context, parents, createComponent, childComponents)),\n i18nAppLocaleEnhance(),\n childrenEnhancement(context, parents),\n // root must be under the children\n rootEnhancement(),\n uncontrolledPropsEnhancement(),\n staticChildrenEnhancement(childComponents, createComponent, {\n context,\n parent,\n enhancements,\n }),\n // functionDefaultProps must be under the staticChild\n functionDefaultPropsEnhancement(),\n // inheritedName must be under the staticChild\n inheritedNameEnhancement(),\n // dataName must be under the staticChild\n dataNameEnhancement(),\n // enhanceEnhancement must be under the functionDefaultPropsEnhancement\n enhanceEnhancement(),\n styleEnhancement(childComponents, context),\n ]);\n Component[CONTEXT_COMPONENT] = context;\n Component._______childrenComponents = childComponents;\n Component[CREATE_COMPONENT] = function (\n _OriginComponent = OriginComponent,\n _childComponents = childComponents,\n _options = options,\n ) {\n return createComponent(_OriginComponent, _childComponents, _options);\n };\n Component.newInstance = function (\n _OriginComponent = OriginComponent,\n _childComponents = childComponents,\n _options = options,\n ) {\n return createComponent(_OriginComponent, _childComponents, _options);\n };\n Component[CORE_COMPONENT] = true;\n return Component;\n}\n\nfunction createBaseComponent<T extends keyof React.JSX.IntrinsicElements, P>(OriginComponent: React.ForwardRefRenderFunction<React.ElementRef<T>, P>) {\n const Component = React.forwardRef<React.ElementRef<T>, P>(OriginComponent) as unknown as Intergalactic.Component<T, P>;\n Component.displayName = OriginComponent.displayName ?? '';\n // @ts-ignore\n Component.defaultProps = {\n 'data-ui-name': OriginComponent.displayName,\n };\n Component[CORE_COMPONENT] = true;\n\n return Component;\n}\n\nexport { createComponent, createBaseComponent };\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAOA,oBAAoB,MAAM,yBAAyB;AAC1D,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAA6BC,SAAS,QAAQ,4BAAwB;AACtE,SACEC,iBAAiB,EACjBC,aAAa,EACbC,cAAc,EACdC,SAAS,EACTC,aAAa,EACbC,gBAAgB,EAChBC,iBAAiB,QACZ,0BAAsB;AAC7B,OAAOC,mBAAmB,MAAM,4BAAwB;AACxD,OAAOC,mBAAmB,MAAM,4BAAwB;AACxD,OAAOC,kBAAkB,MAAM,2BAAuB;AACtD,OAAOC,+BAA+B,MAAM,wCAAoC;AAChF,OAAOC,oBAAoB,MAAM,wBAAoB;AACrD,OAAOC,wBAAwB,MAAM,iCAA6B;AAClE,OAAOC,eAAe,MAAM,wBAAoB;AAChD,OAAOC,yBAAyB,IAC9BC,6BAA6B,EAC7BC,cAAc,EACdC,gBAAgB,QACX,kCAA8B;AACrC,OAAOC,gBAAgB,MAAM,yBAAqB;AAClD,OAAOC,4BAA4B,MAAM,qCAAiC;AAC1E,OAAOC,YAAY,MAAM,yBAAqB;AAC9C,SAASC,UAAU,QAAQ,iBAAa;AACxC,OAAOC,iBAAiB,MAAM,mCAA+B;AAE7D,SAASC,aAAaA,CAACC,GAAQ,EAAE;EAC/B,OACEC,MAAM,CAACC,mBAAmB,CAACF,GAAG,CAAC,CAACG,MAAM,KAAK,CAAC,IAC5CF,MAAM,CAACG,qBAAqB;EAAI;EAChCH,MAAM,CAACG,qBAAqB,CAACJ,GAAG,CAAC,CAACG,MAAM,KAAK,CAAC,IAC9CF,MAAM,CAACI,cAAc,CAACL,GAAG,CAAC,K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SAAS,gBAAGD,KAAK,CAAC0D,UAAU,CAAyByC,eAAe,CAA6C;EACvHlG,SAAS,CAACiD,WAAW,IAAAgI,qBAAA,GAAG/E,eAAe,CAACjD,WAAW,cAAAgI,qBAAA,cAAAA,qBAAA,GAAI,EAAE;EACzD;EACAjL,SAAS,CAAC8F,YAAY,GAAG;IACvB,cAAc,EAAEI,eAAe,CAACjD;EAClC,CAAC;EACDjD,SAAS,CAACG,cAAc,CAAC,GAAG,IAAI;EAEhC,OAAOH,SAAS;AAClB;AAEA,SAAS+J,eAAe,EAAEiB,mBAAmB","ignoreList":[]}
@@ -1,11 +0,0 @@
1
- type WatchedProps<Props> = {
2
- [key in keyof Props]?: unknown;
3
- };
4
- type Constructor<Props> = new (...args: any[]) => {
5
- props: Props;
6
- onPropsChange(changedProps: WatchedProps<Props>): void;
7
- render(): React.ReactNode;
8
- componentWillUnmount?(): void;
9
- };
10
- declare function propsObserver<P extends Record<string, any>, C extends Constructor<P>>(propsToWatch: Array<keyof P>): (Class: C) => C & Constructor<P>;
11
- export default propsObserver;
@@ -1,77 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports["default"] = void 0;
8
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
12
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
13
- var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
14
- var _superPropGet3 = _interopRequireDefault(require("@babel/runtime/helpers/superPropGet"));
15
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
16
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
- function propsObserver(propsToWatch) {
18
- return function (Class) {
19
- return /*#__PURE__*/function (_Class2) {
20
- function _class() {
21
- var _this;
22
- (0, _classCallCheck2["default"])(this, _class);
23
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
24
- args[_key] = arguments[_key];
25
- }
26
- _this = (0, _callSuper2["default"])(this, _class, [].concat(args));
27
- (0, _defineProperty2["default"])(_this, "__observableProps", {});
28
- if (!_this.props) return (0, _possibleConstructorReturn2["default"])(_this);
29
- var observablePropKeys = propsToWatch.length === 0 ? Object.keys(_this.props) : (0, _toConsumableArray2["default"])(propsToWatch);
30
- observablePropKeys.forEach(function (key) {
31
- _this.__observableProps[key] = _this.props[key];
32
- });
33
- return _this;
34
- }
35
- (0, _inherits2["default"])(_class, _Class2);
36
- return (0, _createClass2["default"])(_class, [{
37
- key: "onPropsChange",
38
- value: function onPropsChange(_) {
39
- var _this2 = this;
40
- var shouldEmitChanges = false;
41
- var changedProps = {};
42
- Object.entries(this.__observableProps).forEach(function (_ref) {
43
- var _ref2 = (0, _slicedToArray2["default"])(_ref, 2),
44
- key = _ref2[0],
45
- value = _ref2[1];
46
- var arePropsEqual = Object.is(value, _this2.props[key]);
47
- if (!arePropsEqual) {
48
- _this2.__observableProps[key] = _this2.props[key];
49
- changedProps[key] = _this2.props[key];
50
- shouldEmitChanges = true;
51
- }
52
- });
53
- if (!shouldEmitChanges) return;
54
- (0, _superPropGet3["default"])(_class, "onPropsChange", this, 3)([changedProps]);
55
- }
56
- }, {
57
- key: "componentWillUnmount",
58
- value: function componentWillUnmount() {
59
- var _superPropGet2,
60
- _this3 = this;
61
- (_superPropGet2 = (0, _superPropGet3["default"])(_class, "componentWillUnmount", this, 3)) === null || _superPropGet2 === void 0 || _superPropGet2([]);
62
- Object.keys(this.__observableProps).forEach(function (key) {
63
- _this3.__observableProps[key] = undefined;
64
- });
65
- }
66
- }, {
67
- key: "render",
68
- value: function render() {
69
- this.onPropsChange();
70
- return (0, _superPropGet3["default"])(_class, "render", this, 3)([]);
71
- }
72
- }]);
73
- }(Class);
74
- };
75
- }
76
- var _default = exports["default"] = propsObserver;
77
- //# sourceMappingURL=propsObserver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"propsObserver.js","names":["propsObserver","propsToWatch","Class","_Class2","_class","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","_callSuper2","concat","_defineProperty2","props","_possibleConstructorReturn2","observablePropKeys","Object","keys","_toConsumableArray2","forEach","key","__observableProps","_inherits2","_createClass2","value","onPropsChange","_","_this2","shouldEmitChanges","changedProps","entries","_ref","_ref2","_slicedToArray2","arePropsEqual","is","_superPropGet3","componentWillUnmount","_superPropGet2","_this3","undefined","render","_default","exports"],"sources":["../../src/decorators/propsObserver.ts"],"sourcesContent":["type WatchedProps<Props> = { [key in keyof Props]?: unknown };\n\ntype Constructor<Props> = new (...args: any[]) => {\n props: Props;\n onPropsChange(changedProps: WatchedProps<Props>): void;\n render(): React.ReactNode;\n componentWillUnmount?(): void;\n};\n\nfunction propsObserver<\n P extends Record<string, any>,\n C extends Constructor<P>,\n>(propsToWatch: Array<keyof P>) {\n return function (Class: C): C & Constructor<P> {\n return class extends Class {\n __observableProps: WatchedProps<P> = {};\n\n constructor(...args: any[]) {\n super(...args);\n\n if (!this.props) return;\n\n const observablePropKeys = propsToWatch.length === 0 ? Object.keys(this.props) : [...propsToWatch];\n\n observablePropKeys.forEach((key) => {\n this.__observableProps[key] = this.props[key];\n });\n }\n\n onPropsChange(_?: WatchedProps<P>) {\n let shouldEmitChanges = false;\n const changedProps: WatchedProps<P> = {};\n\n Object.entries(this.__observableProps).forEach(([key, value]: [key: keyof P, value: unknown]) => {\n const arePropsEqual = Object.is(value, this.props[key]);\n\n if (!arePropsEqual) {\n this.__observableProps[key] = this.props[key];\n changedProps[key] = this.props[key];\n\n shouldEmitChanges = true;\n }\n });\n\n if (!shouldEmitChanges) return;\n\n super.onPropsChange(changedProps);\n }\n\n componentWillUnmount() {\n super.componentWillUnmount?.();\n\n Object.keys(this.__observableProps).forEach((key: keyof P) => {\n this.__observableProps[key] = undefined;\n });\n }\n\n render() {\n this.onPropsChange();\n\n return super.render();\n }\n };\n };\n}\n\nexport default propsObserver;\n"],"mappings":";;;;;;;;;;;;;;;;AASA,SAASA,aAAaA,CAGpBC,YAA4B,EAAE;EAC9B,OAAO,UAAUC,KAAQ,EAAsB;IAC7C,8BAAAC,OAAA;MAGE,SAAAC,OAAA,EAA4B;QAAA,IAAAC,KAAA;QAAA,IAAAC,gBAAA,mBAAAF,MAAA;QAAA,SAAAG,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAbC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;UAAJF,IAAI,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;QAAA;QACjBP,KAAA,OAAAQ,WAAA,mBAAAT,MAAA,KAAAU,MAAA,CAASJ,IAAI;QAAE,IAAAK,gBAAA,aAAAV,KAAA,uBAHoB,CAAC,CAAC;QAKrC,IAAI,CAACA,KAAA,CAAKW,KAAK,EAAE,WAAAC,2BAAA,aAAAZ,KAAA;QAEjB,IAAMa,kBAAkB,GAAGjB,YAAY,CAACQ,MAAM,KAAK,CAAC,GAAGU,MAAM,CAACC,IAAI,CAACf,KAAA,CAAKW,KAAK,CAAC,OAAAK,mBAAA,aAAOpB,YAAY,CAAC;QAElGiB,kBAAkB,CAACI,OAAO,CAAC,UAACC,GAAG,EAAK;UAClClB,KAAA,CAAKmB,iBAAiB,CAACD,GAAG,CAAC,GAAGlB,KAAA,CAAKW,KAAK,CAACO,GAAG,CAAC;QAC/C,CAAC,CAAC;QAAC,OAAAlB,KAAA;MACL;MAAC,IAAAoB,UAAA,aAAArB,MAAA,EAAAD,OAAA;MAAA,WAAAuB,aAAA,aAAAtB,M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P,IAAI,CAAChB,aAAa,CAAC,CAAC;UAEpB,WAAAW,cAAA,aAAAnC,MAAA;QACF;MAAC;IAAA,EA/CkBF,KAAK;EAiD5B,CAAC;AACH;AAAC,IAAA2C,QAAA,GAAAC,OAAA,cAEc9C,aAAa","ignoreList":[]}
@@ -1,70 +0,0 @@
1
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
- import _createClass from "@babel/runtime/helpers/esm/createClass";
5
- import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
6
- import _callSuper from "@babel/runtime/helpers/esm/callSuper";
7
- import _superPropGet from "@babel/runtime/helpers/esm/superPropGet";
8
- import _inherits from "@babel/runtime/helpers/esm/inherits";
9
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
10
- function propsObserver(propsToWatch) {
11
- return function (Class) {
12
- return /*#__PURE__*/function (_Class2) {
13
- function _class() {
14
- var _this;
15
- _classCallCheck(this, _class);
16
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
17
- args[_key] = arguments[_key];
18
- }
19
- _this = _callSuper(this, _class, [].concat(args));
20
- _defineProperty(_this, "__observableProps", {});
21
- if (!_this.props) return _possibleConstructorReturn(_this);
22
- var observablePropKeys = propsToWatch.length === 0 ? Object.keys(_this.props) : _toConsumableArray(propsToWatch);
23
- observablePropKeys.forEach(function (key) {
24
- _this.__observableProps[key] = _this.props[key];
25
- });
26
- return _this;
27
- }
28
- _inherits(_class, _Class2);
29
- return _createClass(_class, [{
30
- key: "onPropsChange",
31
- value: function onPropsChange(_) {
32
- var _this2 = this;
33
- var shouldEmitChanges = false;
34
- var changedProps = {};
35
- Object.entries(this.__observableProps).forEach(function (_ref) {
36
- var _ref2 = _slicedToArray(_ref, 2),
37
- key = _ref2[0],
38
- value = _ref2[1];
39
- var arePropsEqual = Object.is(value, _this2.props[key]);
40
- if (!arePropsEqual) {
41
- _this2.__observableProps[key] = _this2.props[key];
42
- changedProps[key] = _this2.props[key];
43
- shouldEmitChanges = true;
44
- }
45
- });
46
- if (!shouldEmitChanges) return;
47
- _superPropGet(_class, "onPropsChange", this, 3)([changedProps]);
48
- }
49
- }, {
50
- key: "componentWillUnmount",
51
- value: function componentWillUnmount() {
52
- var _superPropGet2,
53
- _this3 = this;
54
- (_superPropGet2 = _superPropGet(_class, "componentWillUnmount", this, 3)) === null || _superPropGet2 === void 0 || _superPropGet2([]);
55
- Object.keys(this.__observableProps).forEach(function (key) {
56
- _this3.__observableProps[key] = undefined;
57
- });
58
- }
59
- }, {
60
- key: "render",
61
- value: function render() {
62
- this.onPropsChange();
63
- return _superPropGet(_class, "render", this, 3)([]);
64
- }
65
- }]);
66
- }(Class);
67
- };
68
- }
69
- export default propsObserver;
70
- //# sourceMappingURL=propsObserver.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"propsObserver.mjs","names":["propsObserver","propsToWatch","Class","_Class2","_class","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","props","_possibleConstructorReturn","observablePropKeys","Object","keys","_toConsumableArray","forEach","key","__observableProps","_inherits","_createClass","value","onPropsChange","_","_this2","shouldEmitChanges","changedProps","entries","_ref","_ref2","_slicedToArray","arePropsEqual","is","_superPropGet","componentWillUnmount","_superPropGet2","_this3","undefined","render"],"sources":["../../src/decorators/propsObserver.ts"],"sourcesContent":["type WatchedProps<Props> = { [key in keyof Props]?: unknown };\n\ntype Constructor<Props> = new (...args: any[]) => {\n props: Props;\n onPropsChange(changedProps: WatchedProps<Props>): void;\n render(): React.ReactNode;\n componentWillUnmount?(): void;\n};\n\nfunction propsObserver<\n P extends Record<string, any>,\n C extends Constructor<P>,\n>(propsToWatch: Array<keyof P>) {\n return function (Class: C): C & Constructor<P> {\n return class extends Class {\n __observableProps: WatchedProps<P> = {};\n\n constructor(...args: any[]) {\n super(...args);\n\n if (!this.props) return;\n\n const observablePropKeys = propsToWatch.length === 0 ? Object.keys(this.props) : [...propsToWatch];\n\n observablePropKeys.forEach((key) => {\n this.__observableProps[key] = this.props[key];\n });\n }\n\n onPropsChange(_?: WatchedProps<P>) {\n let shouldEmitChanges = false;\n const changedProps: WatchedProps<P> = {};\n\n Object.entries(this.__observableProps).forEach(([key, value]: [key: keyof P, value: unknown]) => {\n const arePropsEqual = Object.is(value, this.props[key]);\n\n if (!arePropsEqual) {\n this.__observableProps[key] = this.props[key];\n changedProps[key] = this.props[key];\n\n shouldEmitChanges = true;\n }\n });\n\n if (!shouldEmitChanges) return;\n\n super.onPropsChange(changedProps);\n }\n\n componentWillUnmount() {\n super.componentWillUnmount?.();\n\n Object.keys(this.__observableProps).forEach((key: keyof P) => {\n this.__observableProps[key] = undefined;\n });\n }\n\n render() {\n this.onPropsChange();\n\n return super.render();\n }\n };\n };\n}\n\nexport default propsObserver;\n"],"mappings":";;;;;;;;;AASA,SAASA,aAAaA,CAGpBC,YAA4B,EAAE;EAC9B,OAAO,UAAUC,KAAQ,EAAsB;IAC7C,8BAAAC,OAAA;MAGE,SAAAC,OAAA,EAA4B;QAAA,IAAAC,KAAA;QAAAC,eAAA,OAAAF,MAAA;QAAA,SAAAG,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAbC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;UAAJF,IAAI,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;QAAA;QACjBP,KAAA,GAAAQ,UAAA,OAAAT,MAAA,KAAAU,MAAA,CAASJ,IAAI;QAAEK,eAAA,CAAAV,KAAA,uBAHoB,CAAC,CAAC;QAKrC,IAAI,CAACA,KAAA,CAAKW,KAAK,EAAE,OAAAC,0BAAA,CAAAZ,KAAA;QAEjB,IAAMa,kBAAkB,GAAGjB,YAAY,CAACQ,MAAM,KAAK,CAAC,GAAGU,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YAAAC,MAAA;UACrB,CAAAD,cAAA,GAAAF,aAAA,CAAAnC,MAAA,gDAAAqC,cAAA,eAAAA,cAAA;UAEAtB,MAAM,CAACC,IAAI,CAAC,IAAI,CAACI,iBAAiB,CAAC,CAACF,OAAO,CAAC,UAACC,GAAY,EAAK;YAC5DmB,MAAI,CAAClB,iBAAiB,CAACD,GAAG,CAAC,GAAGoB,SAAS;UACzC,CAAC,CAAC;QACJ;MAAC;QAAApB,GAAA;QAAAI,KAAA,EAED,SAAAiB,MAAMA,CAAA,EAAG;UACP,IAAI,CAAChB,aAAa,CAAC,CAAC;UAEpB,OAAAW,aAAA,CAAAnC,MAAA;QACF;MAAC;IAAA,EA/CkBF,KAAK;EAiD5B,CAAC;AACH;AAEA,eAAeF,aAAa","ignoreList":[]}
@@ -1,11 +0,0 @@
1
- type Primitive = string | number | boolean | symbol | bigint | null | undefined;
2
- type IsReadonly<This, Property extends keyof This> = (<F>() => F extends {
3
- [P in Property]: This[Property];
4
- } ? 1 : 2) extends (<F>() => F extends {
5
- -readonly [P in Property]: This[Property];
6
- } ? 1 : 2) ? false : true;
7
- type Callback<This> = (this: This, field: string | symbol, newValue: unknown) => void;
8
- type ReturnType<This, Property extends keyof This = keyof This> = IsReadonly<This, Property> extends true ? (_: undefined, ctx: ClassFieldDecoratorContext<This, This[Property]>) => void : This[Property] extends Primitive ? (_: undefined, ctx: ClassFieldDecoratorContext<This, This[Property]>) => void : never;
9
- declare function reactive<This, Property extends keyof This, Value = This[Property]>(cb: Value extends Primitive ? Callback<This> : never): ReturnType<This>;
10
- declare function reactive<This, Property extends keyof This, Value = This[Property]>(watchedFields: Value extends Primitive ? never : Array<keyof Value>, cb: Callback<This>): ReturnType<This>;
11
- export default reactive;