@contember/react-utils 2.1.0-alpha.30 → 2.1.0-alpha.36

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 (395) hide show
  1. package/package.json +11 -3
  2. package/src/debug-context/Constants.ts +1 -1
  3. package/src/debug-context/Context.tsx +13 -13
  4. package/src/hooks/unwrapRefValue.ts +1 -1
  5. package/src/hooks/useArrayMapMemo.ts +2 -2
  6. package/src/hooks/useAutoHeightTextArea.ts +1 -0
  7. package/src/hooks/useChildrenAsLabel.ts +7 -8
  8. package/src/hooks/useConstantLengthInvariant.ts +1 -3
  9. package/src/hooks/useConstantValueInvariant.ts +0 -1
  10. package/src/hooks/useDebounceCallback.ts +1 -1
  11. package/src/hooks/useExpectSameValueReference.ts +9 -6
  12. package/src/hooks/useOnElementMouseEnterDelayedCallback.ts +1 -1
  13. package/src/hooks/useOnElementResize.ts +2 -1
  14. package/src/hooks/useOnWindowResize.ts +3 -1
  15. package/src/hooks/useStoredState.ts +5 -3
  16. package/src/referentiallyStable/useReferentiallyStableCallback.ts +8 -8
  17. package/tests/hooks/useChildrenAsLabel.test.tsx +1 -0
  18. package/tests/hooks/useId.test.ts +1 -1
  19. package/dist/development/index.cjs +0 -86
  20. package/dist/development/index.cjs.map +0 -1
  21. package/dist/development/index.js +0 -86
  22. package/dist/development/index.js.map +0 -1
  23. package/dist/development/src/context/createContext.cjs +0 -10
  24. package/dist/development/src/context/createContext.cjs.map +0 -1
  25. package/dist/development/src/context/createContext.js +0 -10
  26. package/dist/development/src/context/createContext.js.map +0 -1
  27. package/dist/development/src/context/createRequiredContext.cjs +0 -18
  28. package/dist/development/src/context/createRequiredContext.cjs.map +0 -1
  29. package/dist/development/src/context/createRequiredContext.js +0 -18
  30. package/dist/development/src/context/createRequiredContext.js.map +0 -1
  31. package/dist/development/src/debug-context/Constants.cjs +0 -25
  32. package/dist/development/src/debug-context/Constants.cjs.map +0 -1
  33. package/dist/development/src/debug-context/Constants.js +0 -25
  34. package/dist/development/src/debug-context/Constants.js.map +0 -1
  35. package/dist/development/src/debug-context/Context.cjs +0 -72
  36. package/dist/development/src/debug-context/Context.cjs.map +0 -1
  37. package/dist/development/src/debug-context/Context.js +0 -72
  38. package/dist/development/src/debug-context/Context.js.map +0 -1
  39. package/dist/development/src/hooks/unwrapRefValue.cjs +0 -11
  40. package/dist/development/src/hooks/unwrapRefValue.cjs.map +0 -1
  41. package/dist/development/src/hooks/unwrapRefValue.js +0 -11
  42. package/dist/development/src/hooks/unwrapRefValue.js.map +0 -1
  43. package/dist/development/src/hooks/useAbortController.cjs +0 -17
  44. package/dist/development/src/hooks/useAbortController.cjs.map +0 -1
  45. package/dist/development/src/hooks/useAbortController.js +0 -17
  46. package/dist/development/src/hooks/useAbortController.js.map +0 -1
  47. package/dist/development/src/hooks/useArrayMapMemo.cjs +0 -11
  48. package/dist/development/src/hooks/useArrayMapMemo.cjs.map +0 -1
  49. package/dist/development/src/hooks/useArrayMapMemo.js +0 -11
  50. package/dist/development/src/hooks/useArrayMapMemo.js.map +0 -1
  51. package/dist/development/src/hooks/useAutoHeightTextArea.cjs +0 -43
  52. package/dist/development/src/hooks/useAutoHeightTextArea.cjs.map +0 -1
  53. package/dist/development/src/hooks/useAutoHeightTextArea.js +0 -43
  54. package/dist/development/src/hooks/useAutoHeightTextArea.js.map +0 -1
  55. package/dist/development/src/hooks/useChildrenAsLabel.cjs +0 -52
  56. package/dist/development/src/hooks/useChildrenAsLabel.cjs.map +0 -1
  57. package/dist/development/src/hooks/useChildrenAsLabel.js +0 -52
  58. package/dist/development/src/hooks/useChildrenAsLabel.js.map +0 -1
  59. package/dist/development/src/hooks/useComposeRef.cjs +0 -31
  60. package/dist/development/src/hooks/useComposeRef.cjs.map +0 -1
  61. package/dist/development/src/hooks/useComposeRef.js +0 -31
  62. package/dist/development/src/hooks/useComposeRef.js.map +0 -1
  63. package/dist/development/src/hooks/useConstantLengthInvariant.cjs +0 -15
  64. package/dist/development/src/hooks/useConstantLengthInvariant.cjs.map +0 -1
  65. package/dist/development/src/hooks/useConstantLengthInvariant.js +0 -15
  66. package/dist/development/src/hooks/useConstantLengthInvariant.js.map +0 -1
  67. package/dist/development/src/hooks/useConstantValueInvariant.cjs +0 -15
  68. package/dist/development/src/hooks/useConstantValueInvariant.cjs.map +0 -1
  69. package/dist/development/src/hooks/useConstantValueInvariant.js +0 -15
  70. package/dist/development/src/hooks/useConstantValueInvariant.js.map +0 -1
  71. package/dist/development/src/hooks/useDebounce.cjs +0 -15
  72. package/dist/development/src/hooks/useDebounce.cjs.map +0 -1
  73. package/dist/development/src/hooks/useDebounce.js +0 -15
  74. package/dist/development/src/hooks/useDebounce.js.map +0 -1
  75. package/dist/development/src/hooks/useDebounceCallback.cjs +0 -19
  76. package/dist/development/src/hooks/useDebounceCallback.cjs.map +0 -1
  77. package/dist/development/src/hooks/useDebounceCallback.js +0 -19
  78. package/dist/development/src/hooks/useDebounceCallback.js.map +0 -1
  79. package/dist/development/src/hooks/useDocumentTitle.cjs +0 -22
  80. package/dist/development/src/hooks/useDocumentTitle.cjs.map +0 -1
  81. package/dist/development/src/hooks/useDocumentTitle.js +0 -22
  82. package/dist/development/src/hooks/useDocumentTitle.js.map +0 -1
  83. package/dist/development/src/hooks/useExpectSameValueReference.cjs +0 -24
  84. package/dist/development/src/hooks/useExpectSameValueReference.cjs.map +0 -1
  85. package/dist/development/src/hooks/useExpectSameValueReference.js +0 -24
  86. package/dist/development/src/hooks/useExpectSameValueReference.js.map +0 -1
  87. package/dist/development/src/hooks/useForceRender.cjs +0 -9
  88. package/dist/development/src/hooks/useForceRender.cjs.map +0 -1
  89. package/dist/development/src/hooks/useForceRender.js +0 -9
  90. package/dist/development/src/hooks/useForceRender.js.map +0 -1
  91. package/dist/development/src/hooks/useId.cjs +0 -13
  92. package/dist/development/src/hooks/useId.cjs.map +0 -1
  93. package/dist/development/src/hooks/useId.js +0 -13
  94. package/dist/development/src/hooks/useId.js.map +0 -1
  95. package/dist/development/src/hooks/useIsMounted.cjs +0 -18
  96. package/dist/development/src/hooks/useIsMounted.cjs.map +0 -1
  97. package/dist/development/src/hooks/useIsMounted.js +0 -18
  98. package/dist/development/src/hooks/useIsMounted.js.map +0 -1
  99. package/dist/development/src/hooks/useObjectMemo.cjs +0 -27
  100. package/dist/development/src/hooks/useObjectMemo.cjs.map +0 -1
  101. package/dist/development/src/hooks/useObjectMemo.js +0 -27
  102. package/dist/development/src/hooks/useObjectMemo.js.map +0 -1
  103. package/dist/development/src/hooks/useOnElementClickOutsideCallback.cjs +0 -20
  104. package/dist/development/src/hooks/useOnElementClickOutsideCallback.cjs.map +0 -1
  105. package/dist/development/src/hooks/useOnElementClickOutsideCallback.js +0 -20
  106. package/dist/development/src/hooks/useOnElementClickOutsideCallback.js.map +0 -1
  107. package/dist/development/src/hooks/useOnElementMouseEnterDelayedCallback.cjs +0 -33
  108. package/dist/development/src/hooks/useOnElementMouseEnterDelayedCallback.cjs.map +0 -1
  109. package/dist/development/src/hooks/useOnElementMouseEnterDelayedCallback.js +0 -33
  110. package/dist/development/src/hooks/useOnElementMouseEnterDelayedCallback.js.map +0 -1
  111. package/dist/development/src/hooks/useOnElementResize.cjs +0 -42
  112. package/dist/development/src/hooks/useOnElementResize.cjs.map +0 -1
  113. package/dist/development/src/hooks/useOnElementResize.js +0 -42
  114. package/dist/development/src/hooks/useOnElementResize.js.map +0 -1
  115. package/dist/development/src/hooks/useOnWindowResize.cjs +0 -36
  116. package/dist/development/src/hooks/useOnWindowResize.cjs.map +0 -1
  117. package/dist/development/src/hooks/useOnWindowResize.js +0 -36
  118. package/dist/development/src/hooks/useOnWindowResize.js.map +0 -1
  119. package/dist/development/src/hooks/usePreviousValue.cjs +0 -12
  120. package/dist/development/src/hooks/usePreviousValue.cjs.map +0 -1
  121. package/dist/development/src/hooks/usePreviousValue.js +0 -12
  122. package/dist/development/src/hooks/usePreviousValue.js.map +0 -1
  123. package/dist/development/src/hooks/useStoredState.cjs +0 -100
  124. package/dist/development/src/hooks/useStoredState.cjs.map +0 -1
  125. package/dist/development/src/hooks/useStoredState.js +0 -100
  126. package/dist/development/src/hooks/useStoredState.js.map +0 -1
  127. package/dist/development/src/hooks/useUpdatedRef.cjs +0 -10
  128. package/dist/development/src/hooks/useUpdatedRef.cjs.map +0 -1
  129. package/dist/development/src/hooks/useUpdatedRef.js +0 -10
  130. package/dist/development/src/hooks/useUpdatedRef.js.map +0 -1
  131. package/dist/development/src/hooks/useWindowSize.cjs +0 -20
  132. package/dist/development/src/hooks/useWindowSize.cjs.map +0 -1
  133. package/dist/development/src/hooks/useWindowSize.js +0 -20
  134. package/dist/development/src/hooks/useWindowSize.js.map +0 -1
  135. package/dist/development/src/referentiallyStable/emptyArray.cjs +0 -5
  136. package/dist/development/src/referentiallyStable/emptyArray.cjs.map +0 -1
  137. package/dist/development/src/referentiallyStable/emptyArray.js +0 -5
  138. package/dist/development/src/referentiallyStable/emptyArray.js.map +0 -1
  139. package/dist/development/src/referentiallyStable/emptyObject.cjs +0 -5
  140. package/dist/development/src/referentiallyStable/emptyObject.cjs.map +0 -1
  141. package/dist/development/src/referentiallyStable/emptyObject.js +0 -5
  142. package/dist/development/src/referentiallyStable/emptyObject.js.map +0 -1
  143. package/dist/development/src/referentiallyStable/identityFunction.cjs +0 -5
  144. package/dist/development/src/referentiallyStable/identityFunction.cjs.map +0 -1
  145. package/dist/development/src/referentiallyStable/identityFunction.js +0 -5
  146. package/dist/development/src/referentiallyStable/identityFunction.js.map +0 -1
  147. package/dist/development/src/referentiallyStable/noop.cjs +0 -5
  148. package/dist/development/src/referentiallyStable/noop.cjs.map +0 -1
  149. package/dist/development/src/referentiallyStable/noop.js +0 -5
  150. package/dist/development/src/referentiallyStable/noop.js.map +0 -1
  151. package/dist/development/src/referentiallyStable/returnFalse.cjs +0 -5
  152. package/dist/development/src/referentiallyStable/returnFalse.cjs.map +0 -1
  153. package/dist/development/src/referentiallyStable/returnFalse.js +0 -5
  154. package/dist/development/src/referentiallyStable/returnFalse.js.map +0 -1
  155. package/dist/development/src/referentiallyStable/returnTrue.cjs +0 -5
  156. package/dist/development/src/referentiallyStable/returnTrue.cjs.map +0 -1
  157. package/dist/development/src/referentiallyStable/returnTrue.js +0 -5
  158. package/dist/development/src/referentiallyStable/returnTrue.js.map +0 -1
  159. package/dist/development/src/referentiallyStable/useReferentiallyStableCallback.cjs +0 -12
  160. package/dist/development/src/referentiallyStable/useReferentiallyStableCallback.cjs.map +0 -1
  161. package/dist/development/src/referentiallyStable/useReferentiallyStableCallback.js +0 -12
  162. package/dist/development/src/referentiallyStable/useReferentiallyStableCallback.js.map +0 -1
  163. package/dist/production/index.cjs +0 -86
  164. package/dist/production/index.cjs.map +0 -1
  165. package/dist/production/index.js +0 -86
  166. package/dist/production/index.js.map +0 -1
  167. package/dist/production/src/context/createContext.cjs +0 -10
  168. package/dist/production/src/context/createContext.cjs.map +0 -1
  169. package/dist/production/src/context/createContext.js +0 -10
  170. package/dist/production/src/context/createContext.js.map +0 -1
  171. package/dist/production/src/context/createRequiredContext.cjs +0 -18
  172. package/dist/production/src/context/createRequiredContext.cjs.map +0 -1
  173. package/dist/production/src/context/createRequiredContext.js +0 -18
  174. package/dist/production/src/context/createRequiredContext.js.map +0 -1
  175. package/dist/production/src/debug-context/Constants.cjs +0 -25
  176. package/dist/production/src/debug-context/Constants.cjs.map +0 -1
  177. package/dist/production/src/debug-context/Constants.js +0 -25
  178. package/dist/production/src/debug-context/Constants.js.map +0 -1
  179. package/dist/production/src/debug-context/Context.cjs +0 -68
  180. package/dist/production/src/debug-context/Context.cjs.map +0 -1
  181. package/dist/production/src/debug-context/Context.js +0 -68
  182. package/dist/production/src/debug-context/Context.js.map +0 -1
  183. package/dist/production/src/hooks/unwrapRefValue.cjs +0 -11
  184. package/dist/production/src/hooks/unwrapRefValue.cjs.map +0 -1
  185. package/dist/production/src/hooks/unwrapRefValue.js +0 -11
  186. package/dist/production/src/hooks/unwrapRefValue.js.map +0 -1
  187. package/dist/production/src/hooks/useAbortController.cjs +0 -17
  188. package/dist/production/src/hooks/useAbortController.cjs.map +0 -1
  189. package/dist/production/src/hooks/useAbortController.js +0 -17
  190. package/dist/production/src/hooks/useAbortController.js.map +0 -1
  191. package/dist/production/src/hooks/useArrayMapMemo.cjs +0 -9
  192. package/dist/production/src/hooks/useArrayMapMemo.cjs.map +0 -1
  193. package/dist/production/src/hooks/useArrayMapMemo.js +0 -9
  194. package/dist/production/src/hooks/useArrayMapMemo.js.map +0 -1
  195. package/dist/production/src/hooks/useAutoHeightTextArea.cjs +0 -43
  196. package/dist/production/src/hooks/useAutoHeightTextArea.cjs.map +0 -1
  197. package/dist/production/src/hooks/useAutoHeightTextArea.js +0 -43
  198. package/dist/production/src/hooks/useAutoHeightTextArea.js.map +0 -1
  199. package/dist/production/src/hooks/useChildrenAsLabel.cjs +0 -50
  200. package/dist/production/src/hooks/useChildrenAsLabel.cjs.map +0 -1
  201. package/dist/production/src/hooks/useChildrenAsLabel.js +0 -50
  202. package/dist/production/src/hooks/useChildrenAsLabel.js.map +0 -1
  203. package/dist/production/src/hooks/useComposeRef.cjs +0 -31
  204. package/dist/production/src/hooks/useComposeRef.cjs.map +0 -1
  205. package/dist/production/src/hooks/useComposeRef.js +0 -31
  206. package/dist/production/src/hooks/useComposeRef.js.map +0 -1
  207. package/dist/production/src/hooks/useConstantLengthInvariant.cjs +0 -6
  208. package/dist/production/src/hooks/useConstantLengthInvariant.cjs.map +0 -1
  209. package/dist/production/src/hooks/useConstantLengthInvariant.js +0 -6
  210. package/dist/production/src/hooks/useConstantLengthInvariant.js.map +0 -1
  211. package/dist/production/src/hooks/useConstantValueInvariant.cjs +0 -6
  212. package/dist/production/src/hooks/useConstantValueInvariant.cjs.map +0 -1
  213. package/dist/production/src/hooks/useConstantValueInvariant.js +0 -6
  214. package/dist/production/src/hooks/useConstantValueInvariant.js.map +0 -1
  215. package/dist/production/src/hooks/useDebounce.cjs +0 -15
  216. package/dist/production/src/hooks/useDebounce.cjs.map +0 -1
  217. package/dist/production/src/hooks/useDebounce.js +0 -15
  218. package/dist/production/src/hooks/useDebounce.js.map +0 -1
  219. package/dist/production/src/hooks/useDebounceCallback.cjs +0 -19
  220. package/dist/production/src/hooks/useDebounceCallback.cjs.map +0 -1
  221. package/dist/production/src/hooks/useDebounceCallback.js +0 -19
  222. package/dist/production/src/hooks/useDebounceCallback.js.map +0 -1
  223. package/dist/production/src/hooks/useDocumentTitle.cjs +0 -22
  224. package/dist/production/src/hooks/useDocumentTitle.cjs.map +0 -1
  225. package/dist/production/src/hooks/useDocumentTitle.js +0 -22
  226. package/dist/production/src/hooks/useDocumentTitle.js.map +0 -1
  227. package/dist/production/src/hooks/useExpectSameValueReference.cjs +0 -15
  228. package/dist/production/src/hooks/useExpectSameValueReference.cjs.map +0 -1
  229. package/dist/production/src/hooks/useExpectSameValueReference.js +0 -15
  230. package/dist/production/src/hooks/useExpectSameValueReference.js.map +0 -1
  231. package/dist/production/src/hooks/useForceRender.cjs +0 -9
  232. package/dist/production/src/hooks/useForceRender.cjs.map +0 -1
  233. package/dist/production/src/hooks/useForceRender.js +0 -9
  234. package/dist/production/src/hooks/useForceRender.js.map +0 -1
  235. package/dist/production/src/hooks/useId.cjs +0 -13
  236. package/dist/production/src/hooks/useId.cjs.map +0 -1
  237. package/dist/production/src/hooks/useId.js +0 -13
  238. package/dist/production/src/hooks/useId.js.map +0 -1
  239. package/dist/production/src/hooks/useIsMounted.cjs +0 -18
  240. package/dist/production/src/hooks/useIsMounted.cjs.map +0 -1
  241. package/dist/production/src/hooks/useIsMounted.js +0 -18
  242. package/dist/production/src/hooks/useIsMounted.js.map +0 -1
  243. package/dist/production/src/hooks/useObjectMemo.cjs +0 -27
  244. package/dist/production/src/hooks/useObjectMemo.cjs.map +0 -1
  245. package/dist/production/src/hooks/useObjectMemo.js +0 -27
  246. package/dist/production/src/hooks/useObjectMemo.js.map +0 -1
  247. package/dist/production/src/hooks/useOnElementClickOutsideCallback.cjs +0 -20
  248. package/dist/production/src/hooks/useOnElementClickOutsideCallback.cjs.map +0 -1
  249. package/dist/production/src/hooks/useOnElementClickOutsideCallback.js +0 -20
  250. package/dist/production/src/hooks/useOnElementClickOutsideCallback.js.map +0 -1
  251. package/dist/production/src/hooks/useOnElementMouseEnterDelayedCallback.cjs +0 -33
  252. package/dist/production/src/hooks/useOnElementMouseEnterDelayedCallback.cjs.map +0 -1
  253. package/dist/production/src/hooks/useOnElementMouseEnterDelayedCallback.js +0 -33
  254. package/dist/production/src/hooks/useOnElementMouseEnterDelayedCallback.js.map +0 -1
  255. package/dist/production/src/hooks/useOnElementResize.cjs +0 -42
  256. package/dist/production/src/hooks/useOnElementResize.cjs.map +0 -1
  257. package/dist/production/src/hooks/useOnElementResize.js +0 -42
  258. package/dist/production/src/hooks/useOnElementResize.js.map +0 -1
  259. package/dist/production/src/hooks/useOnWindowResize.cjs +0 -36
  260. package/dist/production/src/hooks/useOnWindowResize.cjs.map +0 -1
  261. package/dist/production/src/hooks/useOnWindowResize.js +0 -36
  262. package/dist/production/src/hooks/useOnWindowResize.js.map +0 -1
  263. package/dist/production/src/hooks/usePreviousValue.cjs +0 -12
  264. package/dist/production/src/hooks/usePreviousValue.cjs.map +0 -1
  265. package/dist/production/src/hooks/usePreviousValue.js +0 -12
  266. package/dist/production/src/hooks/usePreviousValue.js.map +0 -1
  267. package/dist/production/src/hooks/useStoredState.cjs +0 -100
  268. package/dist/production/src/hooks/useStoredState.cjs.map +0 -1
  269. package/dist/production/src/hooks/useStoredState.js +0 -100
  270. package/dist/production/src/hooks/useStoredState.js.map +0 -1
  271. package/dist/production/src/hooks/useUpdatedRef.cjs +0 -10
  272. package/dist/production/src/hooks/useUpdatedRef.cjs.map +0 -1
  273. package/dist/production/src/hooks/useUpdatedRef.js +0 -10
  274. package/dist/production/src/hooks/useUpdatedRef.js.map +0 -1
  275. package/dist/production/src/hooks/useWindowSize.cjs +0 -20
  276. package/dist/production/src/hooks/useWindowSize.cjs.map +0 -1
  277. package/dist/production/src/hooks/useWindowSize.js +0 -20
  278. package/dist/production/src/hooks/useWindowSize.js.map +0 -1
  279. package/dist/production/src/referentiallyStable/emptyArray.cjs +0 -5
  280. package/dist/production/src/referentiallyStable/emptyArray.cjs.map +0 -1
  281. package/dist/production/src/referentiallyStable/emptyArray.js +0 -5
  282. package/dist/production/src/referentiallyStable/emptyArray.js.map +0 -1
  283. package/dist/production/src/referentiallyStable/emptyObject.cjs +0 -5
  284. package/dist/production/src/referentiallyStable/emptyObject.cjs.map +0 -1
  285. package/dist/production/src/referentiallyStable/emptyObject.js +0 -5
  286. package/dist/production/src/referentiallyStable/emptyObject.js.map +0 -1
  287. package/dist/production/src/referentiallyStable/identityFunction.cjs +0 -5
  288. package/dist/production/src/referentiallyStable/identityFunction.cjs.map +0 -1
  289. package/dist/production/src/referentiallyStable/identityFunction.js +0 -5
  290. package/dist/production/src/referentiallyStable/identityFunction.js.map +0 -1
  291. package/dist/production/src/referentiallyStable/noop.cjs +0 -5
  292. package/dist/production/src/referentiallyStable/noop.cjs.map +0 -1
  293. package/dist/production/src/referentiallyStable/noop.js +0 -5
  294. package/dist/production/src/referentiallyStable/noop.js.map +0 -1
  295. package/dist/production/src/referentiallyStable/returnFalse.cjs +0 -5
  296. package/dist/production/src/referentiallyStable/returnFalse.cjs.map +0 -1
  297. package/dist/production/src/referentiallyStable/returnFalse.js +0 -5
  298. package/dist/production/src/referentiallyStable/returnFalse.js.map +0 -1
  299. package/dist/production/src/referentiallyStable/returnTrue.cjs +0 -5
  300. package/dist/production/src/referentiallyStable/returnTrue.cjs.map +0 -1
  301. package/dist/production/src/referentiallyStable/returnTrue.js +0 -5
  302. package/dist/production/src/referentiallyStable/returnTrue.js.map +0 -1
  303. package/dist/production/src/referentiallyStable/useReferentiallyStableCallback.cjs +0 -12
  304. package/dist/production/src/referentiallyStable/useReferentiallyStableCallback.cjs.map +0 -1
  305. package/dist/production/src/referentiallyStable/useReferentiallyStableCallback.js +0 -12
  306. package/dist/production/src/referentiallyStable/useReferentiallyStableCallback.js.map +0 -1
  307. package/dist/types/context/createContext.d.ts +0 -3
  308. package/dist/types/context/createContext.d.ts.map +0 -1
  309. package/dist/types/context/createRequiredContext.d.ts +0 -3
  310. package/dist/types/context/createRequiredContext.d.ts.map +0 -1
  311. package/dist/types/context/index.d.ts +0 -3
  312. package/dist/types/context/index.d.ts.map +0 -1
  313. package/dist/types/debug-context/Constants.d.ts +0 -6
  314. package/dist/types/debug-context/Constants.d.ts.map +0 -1
  315. package/dist/types/debug-context/Context.d.ts +0 -15
  316. package/dist/types/debug-context/Context.d.ts.map +0 -1
  317. package/dist/types/debug-context/Types.d.ts +0 -13
  318. package/dist/types/debug-context/Types.d.ts.map +0 -1
  319. package/dist/types/debug-context/index.d.ts +0 -4
  320. package/dist/types/debug-context/index.d.ts.map +0 -1
  321. package/dist/types/hooks/index.d.ts +0 -25
  322. package/dist/types/hooks/index.d.ts.map +0 -1
  323. package/dist/types/hooks/unwrapRefValue.d.ts +0 -9
  324. package/dist/types/hooks/unwrapRefValue.d.ts.map +0 -1
  325. package/dist/types/hooks/useAbortController.d.ts +0 -2
  326. package/dist/types/hooks/useAbortController.d.ts.map +0 -1
  327. package/dist/types/hooks/useArrayMapMemo.d.ts +0 -10
  328. package/dist/types/hooks/useArrayMapMemo.d.ts.map +0 -1
  329. package/dist/types/hooks/useAutoHeightTextArea.d.ts +0 -3
  330. package/dist/types/hooks/useAutoHeightTextArea.d.ts.map +0 -1
  331. package/dist/types/hooks/useChildrenAsLabel.d.ts +0 -18
  332. package/dist/types/hooks/useChildrenAsLabel.d.ts.map +0 -1
  333. package/dist/types/hooks/useComposeRef.d.ts +0 -16
  334. package/dist/types/hooks/useComposeRef.d.ts.map +0 -1
  335. package/dist/types/hooks/useConstantLengthInvariant.d.ts +0 -2
  336. package/dist/types/hooks/useConstantLengthInvariant.d.ts.map +0 -1
  337. package/dist/types/hooks/useConstantValueInvariant.d.ts +0 -2
  338. package/dist/types/hooks/useConstantValueInvariant.d.ts.map +0 -1
  339. package/dist/types/hooks/useDebounce.d.ts +0 -2
  340. package/dist/types/hooks/useDebounce.d.ts.map +0 -1
  341. package/dist/types/hooks/useDebounceCallback.d.ts +0 -2
  342. package/dist/types/hooks/useDebounceCallback.d.ts.map +0 -1
  343. package/dist/types/hooks/useDocumentTitle.d.ts +0 -2
  344. package/dist/types/hooks/useDocumentTitle.d.ts.map +0 -1
  345. package/dist/types/hooks/useExpectSameValueReference.d.ts +0 -24
  346. package/dist/types/hooks/useExpectSameValueReference.d.ts.map +0 -1
  347. package/dist/types/hooks/useForceRender.d.ts +0 -2
  348. package/dist/types/hooks/useForceRender.d.ts.map +0 -1
  349. package/dist/types/hooks/useId.d.ts +0 -10
  350. package/dist/types/hooks/useId.d.ts.map +0 -1
  351. package/dist/types/hooks/useIsMounted.d.ts +0 -2
  352. package/dist/types/hooks/useIsMounted.d.ts.map +0 -1
  353. package/dist/types/hooks/useObjectMemo.d.ts +0 -2
  354. package/dist/types/hooks/useObjectMemo.d.ts.map +0 -1
  355. package/dist/types/hooks/useOnElementClickOutsideCallback.d.ts +0 -3
  356. package/dist/types/hooks/useOnElementClickOutsideCallback.d.ts.map +0 -1
  357. package/dist/types/hooks/useOnElementMouseEnterDelayedCallback.d.ts +0 -14
  358. package/dist/types/hooks/useOnElementMouseEnterDelayedCallback.d.ts.map +0 -1
  359. package/dist/types/hooks/useOnElementResize.d.ts +0 -3
  360. package/dist/types/hooks/useOnElementResize.d.ts.map +0 -1
  361. package/dist/types/hooks/useOnWindowResize.d.ts +0 -2
  362. package/dist/types/hooks/useOnWindowResize.d.ts.map +0 -1
  363. package/dist/types/hooks/usePreviousValue.d.ts +0 -2
  364. package/dist/types/hooks/usePreviousValue.d.ts.map +0 -1
  365. package/dist/types/hooks/useStoredState.d.ts +0 -18
  366. package/dist/types/hooks/useStoredState.d.ts.map +0 -1
  367. package/dist/types/hooks/useUpdatedRef.d.ts +0 -8
  368. package/dist/types/hooks/useUpdatedRef.d.ts.map +0 -1
  369. package/dist/types/hooks/useWindowSize.d.ts +0 -5
  370. package/dist/types/hooks/useWindowSize.d.ts.map +0 -1
  371. package/dist/types/index.d.ts +0 -6
  372. package/dist/types/index.d.ts.map +0 -1
  373. package/dist/types/referentiallyStable/emptyArray.d.ts +0 -2
  374. package/dist/types/referentiallyStable/emptyArray.d.ts.map +0 -1
  375. package/dist/types/referentiallyStable/emptyObject.d.ts +0 -2
  376. package/dist/types/referentiallyStable/emptyObject.d.ts.map +0 -1
  377. package/dist/types/referentiallyStable/identityFunction.d.ts +0 -2
  378. package/dist/types/referentiallyStable/identityFunction.d.ts.map +0 -1
  379. package/dist/types/referentiallyStable/index.d.ts +0 -8
  380. package/dist/types/referentiallyStable/index.d.ts.map +0 -1
  381. package/dist/types/referentiallyStable/noop.d.ts +0 -2
  382. package/dist/types/referentiallyStable/noop.d.ts.map +0 -1
  383. package/dist/types/referentiallyStable/returnFalse.d.ts +0 -2
  384. package/dist/types/referentiallyStable/returnFalse.d.ts.map +0 -1
  385. package/dist/types/referentiallyStable/returnTrue.d.ts +0 -2
  386. package/dist/types/referentiallyStable/returnTrue.d.ts.map +0 -1
  387. package/dist/types/referentiallyStable/useReferentiallyStableCallback.d.ts +0 -3
  388. package/dist/types/referentiallyStable/useReferentiallyStableCallback.d.ts.map +0 -1
  389. package/dist/types/tsconfig.tsbuildinfo +0 -1
  390. package/dist/types/types/PropsWithRequiredChildren.d.ts +0 -5
  391. package/dist/types/types/PropsWithRequiredChildren.d.ts.map +0 -1
  392. package/dist/types/types/Serializable.d.ts +0 -4
  393. package/dist/types/types/Serializable.d.ts.map +0 -1
  394. package/dist/types/types/index.d.ts +0 -3
  395. package/dist/types/types/index.d.ts.map +0 -1
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const useAbortController = () => {
5
- const lastAbortControllerRef = React.useRef(void 0);
6
- React.useEffect(() => () => {
7
- lastAbortControllerRef.current?.abort();
8
- }, []);
9
- return React.useCallback(() => {
10
- lastAbortControllerRef.current?.abort();
11
- const newController = new AbortController();
12
- lastAbortControllerRef.current = newController;
13
- return newController.signal;
14
- }, []);
15
- };
16
- exports.useAbortController = useAbortController;
17
- //# sourceMappingURL=useAbortController.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAbortController.cjs","sources":["../../../../../packages/react-utils/src/hooks/useAbortController.ts"],"sourcesContent":["import { useCallback, useEffect, useRef } from 'react'\n\nexport const useAbortController = () => {\n\tconst lastAbortControllerRef = useRef<AbortController | undefined>(undefined)\n\tuseEffect(() => () => {\n\t\tlastAbortControllerRef.current?.abort()\n\t}, [])\n\treturn useCallback((): AbortSignal => {\n\t\tlastAbortControllerRef.current?.abort()\n\n\t\tconst newController = new AbortController()\n\t\tlastAbortControllerRef.current = newController\n\t\treturn newController.signal\n\t}, [])\n}\n"],"names":["useRef","useEffect","useCallback"],"mappings":";;;AAEO,MAAM,qBAAqB,MAAM;AACjC,QAAA,yBAAyBA,aAAoC,MAAS;AAC5EC,QAAAA,UAAU,MAAM,MAAM;AACrB,2BAAuB,SAAS,MAAM;AAAA,EACvC,GAAG,EAAE;AACL,SAAOC,kBAAY,MAAmB;AACrC,2BAAuB,SAAS,MAAM;AAEhC,UAAA,gBAAgB,IAAI,gBAAgB;AAC1C,2BAAuB,UAAU;AACjC,WAAO,cAAc;AAAA,EACtB,GAAG,EAAE;AACN;;"}
@@ -1,17 +0,0 @@
1
- import { useRef, useEffect, useCallback } from "react";
2
- const useAbortController = () => {
3
- const lastAbortControllerRef = useRef(void 0);
4
- useEffect(() => () => {
5
- lastAbortControllerRef.current?.abort();
6
- }, []);
7
- return useCallback(() => {
8
- lastAbortControllerRef.current?.abort();
9
- const newController = new AbortController();
10
- lastAbortControllerRef.current = newController;
11
- return newController.signal;
12
- }, []);
13
- };
14
- export {
15
- useAbortController
16
- };
17
- //# sourceMappingURL=useAbortController.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAbortController.js","sources":["../../../../../packages/react-utils/src/hooks/useAbortController.ts"],"sourcesContent":["import { useCallback, useEffect, useRef } from 'react'\n\nexport const useAbortController = () => {\n\tconst lastAbortControllerRef = useRef<AbortController | undefined>(undefined)\n\tuseEffect(() => () => {\n\t\tlastAbortControllerRef.current?.abort()\n\t}, [])\n\treturn useCallback((): AbortSignal => {\n\t\tlastAbortControllerRef.current?.abort()\n\n\t\tconst newController = new AbortController()\n\t\tlastAbortControllerRef.current = newController\n\t\treturn newController.signal\n\t}, [])\n}\n"],"names":[],"mappings":";AAEO,MAAM,qBAAqB,MAAM;AACjC,QAAA,yBAAyB,OAAoC,MAAS;AAC5E,YAAU,MAAM,MAAM;AACrB,2BAAuB,SAAS,MAAM;AAAA,EACvC,GAAG,EAAE;AACL,SAAO,YAAY,MAAmB;AACrC,2BAAuB,SAAS,MAAM;AAEhC,UAAA,gBAAgB,IAAI,gBAAgB;AAC1C,2BAAuB,UAAU;AACjC,WAAO,cAAc;AAAA,EACtB,GAAG,EAAE;AACN;"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const useArrayMapMemo = (items, map) => {
5
- const mapped = React.useMemo(() => items.map(map), [map, ...items]);
6
- return React.useMemo(() => mapped, mapped);
7
- };
8
- exports.useArrayMapMemo = useArrayMapMemo;
9
- //# sourceMappingURL=useArrayMapMemo.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useArrayMapMemo.cjs","sources":["../../../../../packages/react-utils/src/hooks/useArrayMapMemo.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { useConstantLengthInvariant } from './useConstantLengthInvariant'\n\n/**\n * ⚠️ ONLY USE THIS IF YOU *REALLY* KNOW WHAT YOU'RE DOING! ⚠️\n * ⚠ HERE BE DRAGONS THAT KNOW WHERE YOU LIVE! ⚠\n *\n * This is a bit of React naughtiness that allows us to memoize outputs of Array.prototype.map() based on the contents\n * of the original array, and not its referential equality. That way, if we create a new array with identical items,\n * we get an array that is referentially equal to the previous one.\n */\nexport const useArrayMapMemo = <Item, OutputItem>(\n\titems: Item[],\n\tmap: (value: Item, index: number, array: Item[]) => OutputItem,\n): OutputItem[] => {\n\tuseConstantLengthInvariant(items)\n\n\t// This is tricky. We don't want to exclude the map function from the dependency list because if it changes but the\n\t// items array remains the same, we still want to re-compute the new array. However, if that yields the same array,\n\t// in the sense that the items are identical, albeit computed via a different map function, we still want to\n\t// preserve the referential equality of the original. Hence the second memo.\n\n\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\tconst mapped = useMemo(() => items.map(map), [map, ...items])\n\n\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\treturn useMemo(() => mapped, mapped) // This is deliberately not `[mapped]`\n}\n"],"names":["useMemo"],"mappings":";;;AAWa,MAAA,kBAAkB,CAC9B,OACA,QACkB;AASZ,QAAA,SAASA,cAAQ,MAAM,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC;AAGrD,SAAAA,MAAA,QAAQ,MAAM,QAAQ,MAAM;AACpC;;"}
@@ -1,9 +0,0 @@
1
- import { useMemo } from "react";
2
- const useArrayMapMemo = (items, map) => {
3
- const mapped = useMemo(() => items.map(map), [map, ...items]);
4
- return useMemo(() => mapped, mapped);
5
- };
6
- export {
7
- useArrayMapMemo
8
- };
9
- //# sourceMappingURL=useArrayMapMemo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useArrayMapMemo.js","sources":["../../../../../packages/react-utils/src/hooks/useArrayMapMemo.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { useConstantLengthInvariant } from './useConstantLengthInvariant'\n\n/**\n * ⚠️ ONLY USE THIS IF YOU *REALLY* KNOW WHAT YOU'RE DOING! ⚠️\n * ⚠ HERE BE DRAGONS THAT KNOW WHERE YOU LIVE! ⚠\n *\n * This is a bit of React naughtiness that allows us to memoize outputs of Array.prototype.map() based on the contents\n * of the original array, and not its referential equality. That way, if we create a new array with identical items,\n * we get an array that is referentially equal to the previous one.\n */\nexport const useArrayMapMemo = <Item, OutputItem>(\n\titems: Item[],\n\tmap: (value: Item, index: number, array: Item[]) => OutputItem,\n): OutputItem[] => {\n\tuseConstantLengthInvariant(items)\n\n\t// This is tricky. We don't want to exclude the map function from the dependency list because if it changes but the\n\t// items array remains the same, we still want to re-compute the new array. However, if that yields the same array,\n\t// in the sense that the items are identical, albeit computed via a different map function, we still want to\n\t// preserve the referential equality of the original. Hence the second memo.\n\n\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\tconst mapped = useMemo(() => items.map(map), [map, ...items])\n\n\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\treturn useMemo(() => mapped, mapped) // This is deliberately not `[mapped]`\n}\n"],"names":[],"mappings":";AAWa,MAAA,kBAAkB,CAC9B,OACA,QACkB;AASZ,QAAA,SAAS,QAAQ,MAAM,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC;AAGrD,SAAA,QAAQ,MAAM,QAAQ,MAAM;AACpC;"}
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const unwrapRefValue = require("./unwrapRefValue.cjs");
5
- const useOnElementResize = require("./useOnElementResize.cjs");
6
- function px(value) {
7
- return typeof value === "number" && !(isNaN(value) || value === Infinity || value === -Infinity) ? value + "px" : "";
8
- }
9
- const useAutoHeightTextArea = (textAreaRef, value, minRows, maxRows) => {
10
- const measure = React.useCallback(async (ref, minRows2, maxRows2) => {
11
- if (ref) {
12
- const rowsAttribute = ref.rows;
13
- ref.style.height = "";
14
- ref.style.minHeight = "";
15
- ref.style.maxHeight = "";
16
- if (minRows2 !== maxRows2) {
17
- const height = ref.scrollHeight - ref.clientHeight + ref.offsetHeight;
18
- let minHeight;
19
- let maxHeight;
20
- ref.rows = minRows2;
21
- minHeight = await ref.getBoundingClientRect().height;
22
- if (maxRows2 === Infinity) {
23
- maxHeight = Infinity;
24
- } else {
25
- ref.rows = maxRows2;
26
- maxHeight = await ref.getBoundingClientRect().height;
27
- }
28
- ref.style.height = px(height);
29
- ref.style.minHeight = px(minHeight);
30
- ref.style.maxHeight = px(maxHeight);
31
- }
32
- ref.rows = rowsAttribute;
33
- }
34
- }, []);
35
- useOnElementResize.useOnElementResize(textAreaRef, () => {
36
- measure(unwrapRefValue.unwrapRefValue(textAreaRef), minRows, maxRows);
37
- });
38
- React.useLayoutEffect(() => {
39
- measure(unwrapRefValue.unwrapRefValue(textAreaRef), minRows, maxRows);
40
- }, [maxRows, measure, minRows, textAreaRef, value]);
41
- };
42
- exports.useAutoHeightTextArea = useAutoHeightTextArea;
43
- //# sourceMappingURL=useAutoHeightTextArea.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAutoHeightTextArea.cjs","sources":["../../../../../packages/react-utils/src/hooks/useAutoHeightTextArea.ts"],"sourcesContent":["import { useCallback, useLayoutEffect } from 'react'\nimport { RefObjectOrElement, unwrapRefValue } from './unwrapRefValue'\nimport { useOnElementResize } from './useOnElementResize'\n\nfunction px<V extends number | false | null | undefined>(value?: V): string {\n\treturn typeof value === 'number' && !(isNaN(value) || value === Infinity || value === -Infinity) ? value + 'px' : ''\n}\n\nexport const useAutoHeightTextArea = (\n\ttextAreaRef: RefObjectOrElement<HTMLTextAreaElement>,\n\tvalue: string,\n\tminRows: number,\n\tmaxRows: number,\n) => {\n\tconst measure = useCallback(async (ref: HTMLTextAreaElement | null, minRows: number, maxRows: number) => {\n\t\tif (ref) {\n\t\t\tconst rowsAttribute = ref.rows\n\n\t\t\tref.style.height = ''\n\t\t\tref.style.minHeight = ''\n\t\t\tref.style.maxHeight = ''\n\n\t\t\tif (minRows !== maxRows) {\n\t\t\t\tconst height = ref.scrollHeight - ref.clientHeight + ref.offsetHeight\n\t\t\t\tlet minHeight: number\n\t\t\t\tlet maxHeight: number\n\n\t\t\t\tref.rows = minRows\n\t\t\t\tminHeight = await ref.getBoundingClientRect().height\n\n\t\t\t\tif (maxRows === Infinity) {\n\t\t\t\t\tmaxHeight = Infinity\n\t\t\t\t} else {\n\t\t\t\t\tref.rows = maxRows\n\t\t\t\t\tmaxHeight = await ref.getBoundingClientRect().height\n\t\t\t\t}\n\n\t\t\t\tref.style.height = px(height)\n\t\t\t\tref.style.minHeight = px(minHeight)\n\t\t\t\tref.style.maxHeight = px(maxHeight)\n\t\t\t}\n\n\t\t\tref.rows = rowsAttribute\n\t\t}\n\t}, [])\n\n\tuseOnElementResize(textAreaRef, () => {\n\t\tmeasure(unwrapRefValue(textAreaRef), minRows, maxRows)\n\t})\n\n\tuseLayoutEffect(() => {\n\t\tmeasure(unwrapRefValue(textAreaRef), minRows, maxRows)\n\t}, [maxRows, measure, minRows, textAreaRef, value])\n}\n"],"names":["useCallback","minRows","maxRows","useOnElementResize","unwrapRefValue","useLayoutEffect"],"mappings":";;;;;AAIA,SAAS,GAAgD,OAAmB;AAC3E,SAAO,OAAO,UAAU,YAAY,EAAE,MAAM,KAAK,KAAK,UAAU,YAAY,UAAU,aAAa,QAAQ,OAAO;AACnH;AAEO,MAAM,wBAAwB,CACpC,aACA,OACA,SACA,YACI;AACJ,QAAM,UAAUA,MAAA,YAAY,OAAO,KAAiCC,UAAiBC,aAAoB;AACxG,QAAI,KAAK;AACR,YAAM,gBAAgB,IAAI;AAE1B,UAAI,MAAM,SAAS;AACnB,UAAI,MAAM,YAAY;AACtB,UAAI,MAAM,YAAY;AAEtB,UAAID,aAAYC,UAAS;AACxB,cAAM,SAAS,IAAI,eAAe,IAAI,eAAe,IAAI;AACrD,YAAA;AACA,YAAA;AAEJ,YAAI,OAAOD;AACC,oBAAA,MAAM,IAAI,sBAAA,EAAwB;AAE9C,YAAIC,aAAY,UAAU;AACb,sBAAA;AAAA,QAAA,OACN;AACN,cAAI,OAAOA;AACC,sBAAA,MAAM,IAAI,sBAAA,EAAwB;AAAA,QAAA;AAG3C,YAAA,MAAM,SAAS,GAAG,MAAM;AACxB,YAAA,MAAM,YAAY,GAAG,SAAS;AAC9B,YAAA,MAAM,YAAY,GAAG,SAAS;AAAA,MAAA;AAGnC,UAAI,OAAO;AAAA,IAAA;AAAA,EAEb,GAAG,EAAE;AAELC,qBAAA,mBAAmB,aAAa,MAAM;AACrC,YAAQC,eAAAA,eAAe,WAAW,GAAG,SAAS,OAAO;AAAA,EAAA,CACrD;AAEDC,QAAAA,gBAAgB,MAAM;AACrB,YAAQD,eAAAA,eAAe,WAAW,GAAG,SAAS,OAAO;AAAA,EAAA,GACnD,CAAC,SAAS,SAAS,SAAS,aAAa,KAAK,CAAC;AACnD;;"}
@@ -1,43 +0,0 @@
1
- import { useCallback, useLayoutEffect } from "react";
2
- import { unwrapRefValue } from "./unwrapRefValue.js";
3
- import { useOnElementResize } from "./useOnElementResize.js";
4
- function px(value) {
5
- return typeof value === "number" && !(isNaN(value) || value === Infinity || value === -Infinity) ? value + "px" : "";
6
- }
7
- const useAutoHeightTextArea = (textAreaRef, value, minRows, maxRows) => {
8
- const measure = useCallback(async (ref, minRows2, maxRows2) => {
9
- if (ref) {
10
- const rowsAttribute = ref.rows;
11
- ref.style.height = "";
12
- ref.style.minHeight = "";
13
- ref.style.maxHeight = "";
14
- if (minRows2 !== maxRows2) {
15
- const height = ref.scrollHeight - ref.clientHeight + ref.offsetHeight;
16
- let minHeight;
17
- let maxHeight;
18
- ref.rows = minRows2;
19
- minHeight = await ref.getBoundingClientRect().height;
20
- if (maxRows2 === Infinity) {
21
- maxHeight = Infinity;
22
- } else {
23
- ref.rows = maxRows2;
24
- maxHeight = await ref.getBoundingClientRect().height;
25
- }
26
- ref.style.height = px(height);
27
- ref.style.minHeight = px(minHeight);
28
- ref.style.maxHeight = px(maxHeight);
29
- }
30
- ref.rows = rowsAttribute;
31
- }
32
- }, []);
33
- useOnElementResize(textAreaRef, () => {
34
- measure(unwrapRefValue(textAreaRef), minRows, maxRows);
35
- });
36
- useLayoutEffect(() => {
37
- measure(unwrapRefValue(textAreaRef), minRows, maxRows);
38
- }, [maxRows, measure, minRows, textAreaRef, value]);
39
- };
40
- export {
41
- useAutoHeightTextArea
42
- };
43
- //# sourceMappingURL=useAutoHeightTextArea.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAutoHeightTextArea.js","sources":["../../../../../packages/react-utils/src/hooks/useAutoHeightTextArea.ts"],"sourcesContent":["import { useCallback, useLayoutEffect } from 'react'\nimport { RefObjectOrElement, unwrapRefValue } from './unwrapRefValue'\nimport { useOnElementResize } from './useOnElementResize'\n\nfunction px<V extends number | false | null | undefined>(value?: V): string {\n\treturn typeof value === 'number' && !(isNaN(value) || value === Infinity || value === -Infinity) ? value + 'px' : ''\n}\n\nexport const useAutoHeightTextArea = (\n\ttextAreaRef: RefObjectOrElement<HTMLTextAreaElement>,\n\tvalue: string,\n\tminRows: number,\n\tmaxRows: number,\n) => {\n\tconst measure = useCallback(async (ref: HTMLTextAreaElement | null, minRows: number, maxRows: number) => {\n\t\tif (ref) {\n\t\t\tconst rowsAttribute = ref.rows\n\n\t\t\tref.style.height = ''\n\t\t\tref.style.minHeight = ''\n\t\t\tref.style.maxHeight = ''\n\n\t\t\tif (minRows !== maxRows) {\n\t\t\t\tconst height = ref.scrollHeight - ref.clientHeight + ref.offsetHeight\n\t\t\t\tlet minHeight: number\n\t\t\t\tlet maxHeight: number\n\n\t\t\t\tref.rows = minRows\n\t\t\t\tminHeight = await ref.getBoundingClientRect().height\n\n\t\t\t\tif (maxRows === Infinity) {\n\t\t\t\t\tmaxHeight = Infinity\n\t\t\t\t} else {\n\t\t\t\t\tref.rows = maxRows\n\t\t\t\t\tmaxHeight = await ref.getBoundingClientRect().height\n\t\t\t\t}\n\n\t\t\t\tref.style.height = px(height)\n\t\t\t\tref.style.minHeight = px(minHeight)\n\t\t\t\tref.style.maxHeight = px(maxHeight)\n\t\t\t}\n\n\t\t\tref.rows = rowsAttribute\n\t\t}\n\t}, [])\n\n\tuseOnElementResize(textAreaRef, () => {\n\t\tmeasure(unwrapRefValue(textAreaRef), minRows, maxRows)\n\t})\n\n\tuseLayoutEffect(() => {\n\t\tmeasure(unwrapRefValue(textAreaRef), minRows, maxRows)\n\t}, [maxRows, measure, minRows, textAreaRef, value])\n}\n"],"names":["minRows","maxRows"],"mappings":";;;AAIA,SAAS,GAAgD,OAAmB;AAC3E,SAAO,OAAO,UAAU,YAAY,EAAE,MAAM,KAAK,KAAK,UAAU,YAAY,UAAU,aAAa,QAAQ,OAAO;AACnH;AAEO,MAAM,wBAAwB,CACpC,aACA,OACA,SACA,YACI;AACJ,QAAM,UAAU,YAAY,OAAO,KAAiCA,UAAiBC,aAAoB;AACxG,QAAI,KAAK;AACR,YAAM,gBAAgB,IAAI;AAE1B,UAAI,MAAM,SAAS;AACnB,UAAI,MAAM,YAAY;AACtB,UAAI,MAAM,YAAY;AAEtB,UAAID,aAAYC,UAAS;AACxB,cAAM,SAAS,IAAI,eAAe,IAAI,eAAe,IAAI;AACrD,YAAA;AACA,YAAA;AAEJ,YAAI,OAAOD;AACC,oBAAA,MAAM,IAAI,sBAAA,EAAwB;AAE9C,YAAIC,aAAY,UAAU;AACb,sBAAA;AAAA,QAAA,OACN;AACN,cAAI,OAAOA;AACC,sBAAA,MAAM,IAAI,sBAAA,EAAwB;AAAA,QAAA;AAG3C,YAAA,MAAM,SAAS,GAAG,MAAM;AACxB,YAAA,MAAM,YAAY,GAAG,SAAS;AAC9B,YAAA,MAAM,YAAY,GAAG,SAAS;AAAA,MAAA;AAGnC,UAAI,OAAO;AAAA,IAAA;AAAA,EAEb,GAAG,EAAE;AAEL,qBAAmB,aAAa,MAAM;AACrC,YAAQ,eAAe,WAAW,GAAG,SAAS,OAAO;AAAA,EAAA,CACrD;AAED,kBAAgB,MAAM;AACrB,YAAQ,eAAe,WAAW,GAAG,SAAS,OAAO;AAAA,EAAA,GACnD,CAAC,SAAS,SAAS,SAAS,aAAa,KAAK,CAAC;AACnD;"}
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const MULTIPLE_SPACES_REG_EXP = / +/g;
5
- function normalize(text) {
6
- return text.replace(MULTIPLE_SPACES_REG_EXP, " ").trim();
7
- }
8
- function getChildrenAsLabel(node) {
9
- if (typeof node === "string" || typeof node === "number") {
10
- return String(node);
11
- } else if (node === null || node === void 0 || typeof node === "boolean") {
12
- return void 0;
13
- } else if (Array.isArray(node)) {
14
- return normalize(node.map(getChildrenAsLabel).join(""));
15
- } else {
16
- let label = [];
17
- React.Children.map(node, (child) => {
18
- if (child === null || child === void 0 || typeof child === "boolean") ;
19
- else if (typeof child === "string") {
20
- label.push(child);
21
- } else if (typeof child === "number") {
22
- label.push(child);
23
- } else if (Array.isArray(child)) {
24
- const childLabel = getChildrenAsLabel(child);
25
- if (childLabel) {
26
- label.push(childLabel);
27
- }
28
- } else {
29
- if ("props" in child && "children" in child.props) {
30
- const childLabel = getChildrenAsLabel(child.props.children);
31
- if (childLabel) {
32
- label.push(childLabel);
33
- }
34
- } else if ("children" in child) {
35
- const childLabel = getChildrenAsLabel(child.children);
36
- if (childLabel) {
37
- label.push(childLabel);
38
- }
39
- } else ;
40
- }
41
- });
42
- return label.length > 0 ? label.join("") : void 0;
43
- }
44
- }
45
- function useChildrenAsLabel(node) {
46
- return React.useMemo(() => getChildrenAsLabel(node), [node]);
47
- }
48
- exports.getChildrenAsLabel = getChildrenAsLabel;
49
- exports.useChildrenAsLabel = useChildrenAsLabel;
50
- //# sourceMappingURL=useChildrenAsLabel.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useChildrenAsLabel.cjs","sources":["../../../../../packages/react-utils/src/hooks/useChildrenAsLabel.ts"],"sourcesContent":["import { Children, ReactNode, useMemo } from 'react'\n\nconst MULTIPLE_SPACES_REG_EXP = / +/g\n\nfunction normalize(text: string): string {\n\treturn text.replace(MULTIPLE_SPACES_REG_EXP, ' ').trim()\n}\n\n/**\n * Walks through the children and returns a string representation of the text content.\n *\n * @param node - The children to walk through.\n * @returns String representation of the text content or undefined if there is no text content.\n *\n */\nexport function getChildrenAsLabel(node: ReactNode): string | undefined {\n\tif (typeof node === 'string' || typeof node === 'number') {\n\t\treturn String(node)\n\t} else if (node === null || node === undefined || typeof node === 'boolean') {\n\t\treturn undefined\n\t} else if (Array.isArray(node)) {\n\t\treturn normalize(node.map(getChildrenAsLabel).join(''))\n\t} else {\n\t\tlet label: (string | number)[] = []\n\n\t\tChildren.map(node, child => {\n\t\t\tif (child === null || child === undefined || typeof child === 'boolean') {\n\t\t\t} else if (typeof child === 'string') {\n\t\t\t\tlabel.push(child)\n\t\t\t} else if (typeof child === 'number') {\n\t\t\t\tlabel.push(child)\n\t\t\t} else if (Array.isArray(child)) {\n\t\t\t\tconst childLabel = getChildrenAsLabel(child)\n\n\t\t\t\tif (childLabel) {\n\t\t\t\t\tlabel.push(childLabel)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// ReactElement | JSXElementConstructor | ReactPortal\n\t\t\t\tif ('props' in child && 'children' in child.props) {\n\t\t\t\t\tconst childLabel = getChildrenAsLabel(child.props.children)\n\n\t\t\t\t\tif (childLabel) {\n\t\t\t\t\t\tlabel.push(childLabel)\n\t\t\t\t\t}\n\t\t\t\t} else if ('children' in child) {\n\t\t\t\t\t// ReactPortal\n\t\t\t\t\tconst childLabel = getChildrenAsLabel(child.children)\n\n\t\t\t\t\tif (childLabel) {\n\t\t\t\t\t\tlabel.push(childLabel)\n\t\t\t\t\t}\n\t\t\t\t} else if (import.meta.env.DEV) {\n\t\t\t\t\tconsole.warn('Unsupported child:', child)\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\treturn label.length > 0 ? label.join('') : undefined\n\t}\n}\n\n/**\n * Walks through the children and returns a string representation of the text content.\n *\n * @param node - The children to walk through.\n * @returns String representation of the text content or undefined if there is no text content.\n *\n */\nexport function useChildrenAsLabel(node: ReactNode): string | undefined {\n\treturn useMemo(() => getChildrenAsLabel(node), [node])\n}\n"],"names":["Children","useMemo"],"mappings":";;;AAEA,MAAM,0BAA0B;AAEhC,SAAS,UAAU,MAAsB;AACxC,SAAO,KAAK,QAAQ,yBAAyB,GAAG,EAAE,KAAK;AACxD;AASO,SAAS,mBAAmB,MAAqC;AACvE,MAAI,OAAO,SAAS,YAAY,OAAO,SAAS,UAAU;AACzD,WAAO,OAAO,IAAI;AAAA,EAAA,WACR,SAAS,QAAQ,SAAS,UAAa,OAAO,SAAS,WAAW;AACrE,WAAA;AAAA,EACG,WAAA,MAAM,QAAQ,IAAI,GAAG;AAC/B,WAAO,UAAU,KAAK,IAAI,kBAAkB,EAAE,KAAK,EAAE,CAAC;AAAA,EAAA,OAChD;AACN,QAAI,QAA6B,CAAC;AAEzBA,UAAAA,SAAA,IAAI,MAAM,CAAS,UAAA;AAC3B,UAAI,UAAU,QAAQ,UAAU,UAAa,OAAO,UAAU,UAAW;AAAA,eAC9D,OAAO,UAAU,UAAU;AACrC,cAAM,KAAK,KAAK;AAAA,MAAA,WACN,OAAO,UAAU,UAAU;AACrC,cAAM,KAAK,KAAK;AAAA,MACN,WAAA,MAAM,QAAQ,KAAK,GAAG;AAC1B,cAAA,aAAa,mBAAmB,KAAK;AAE3C,YAAI,YAAY;AACf,gBAAM,KAAK,UAAU;AAAA,QAAA;AAAA,MACtB,OACM;AAEN,YAAI,WAAW,SAAS,cAAc,MAAM,OAAO;AAClD,gBAAM,aAAa,mBAAmB,MAAM,MAAM,QAAQ;AAE1D,cAAI,YAAY;AACf,kBAAM,KAAK,UAAU;AAAA,UAAA;AAAA,QACtB,WACU,cAAc,OAAO;AAEzB,gBAAA,aAAa,mBAAmB,MAAM,QAAQ;AAEpD,cAAI,YAAY;AACf,kBAAM,KAAK,UAAU;AAAA,UAAA;AAAA,QACtB;MAGD;AAAA,IACD,CACA;AAED,WAAO,MAAM,SAAS,IAAI,MAAM,KAAK,EAAE,IAAI;AAAA,EAAA;AAE7C;AASO,SAAS,mBAAmB,MAAqC;AACvE,SAAOC,MAAAA,QAAQ,MAAM,mBAAmB,IAAI,GAAG,CAAC,IAAI,CAAC;AACtD;;;"}
@@ -1,50 +0,0 @@
1
- import { Children, useMemo } from "react";
2
- const MULTIPLE_SPACES_REG_EXP = / +/g;
3
- function normalize(text) {
4
- return text.replace(MULTIPLE_SPACES_REG_EXP, " ").trim();
5
- }
6
- function getChildrenAsLabel(node) {
7
- if (typeof node === "string" || typeof node === "number") {
8
- return String(node);
9
- } else if (node === null || node === void 0 || typeof node === "boolean") {
10
- return void 0;
11
- } else if (Array.isArray(node)) {
12
- return normalize(node.map(getChildrenAsLabel).join(""));
13
- } else {
14
- let label = [];
15
- Children.map(node, (child) => {
16
- if (child === null || child === void 0 || typeof child === "boolean") ;
17
- else if (typeof child === "string") {
18
- label.push(child);
19
- } else if (typeof child === "number") {
20
- label.push(child);
21
- } else if (Array.isArray(child)) {
22
- const childLabel = getChildrenAsLabel(child);
23
- if (childLabel) {
24
- label.push(childLabel);
25
- }
26
- } else {
27
- if ("props" in child && "children" in child.props) {
28
- const childLabel = getChildrenAsLabel(child.props.children);
29
- if (childLabel) {
30
- label.push(childLabel);
31
- }
32
- } else if ("children" in child) {
33
- const childLabel = getChildrenAsLabel(child.children);
34
- if (childLabel) {
35
- label.push(childLabel);
36
- }
37
- } else ;
38
- }
39
- });
40
- return label.length > 0 ? label.join("") : void 0;
41
- }
42
- }
43
- function useChildrenAsLabel(node) {
44
- return useMemo(() => getChildrenAsLabel(node), [node]);
45
- }
46
- export {
47
- getChildrenAsLabel,
48
- useChildrenAsLabel
49
- };
50
- //# sourceMappingURL=useChildrenAsLabel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useChildrenAsLabel.js","sources":["../../../../../packages/react-utils/src/hooks/useChildrenAsLabel.ts"],"sourcesContent":["import { Children, ReactNode, useMemo } from 'react'\n\nconst MULTIPLE_SPACES_REG_EXP = / +/g\n\nfunction normalize(text: string): string {\n\treturn text.replace(MULTIPLE_SPACES_REG_EXP, ' ').trim()\n}\n\n/**\n * Walks through the children and returns a string representation of the text content.\n *\n * @param node - The children to walk through.\n * @returns String representation of the text content or undefined if there is no text content.\n *\n */\nexport function getChildrenAsLabel(node: ReactNode): string | undefined {\n\tif (typeof node === 'string' || typeof node === 'number') {\n\t\treturn String(node)\n\t} else if (node === null || node === undefined || typeof node === 'boolean') {\n\t\treturn undefined\n\t} else if (Array.isArray(node)) {\n\t\treturn normalize(node.map(getChildrenAsLabel).join(''))\n\t} else {\n\t\tlet label: (string | number)[] = []\n\n\t\tChildren.map(node, child => {\n\t\t\tif (child === null || child === undefined || typeof child === 'boolean') {\n\t\t\t} else if (typeof child === 'string') {\n\t\t\t\tlabel.push(child)\n\t\t\t} else if (typeof child === 'number') {\n\t\t\t\tlabel.push(child)\n\t\t\t} else if (Array.isArray(child)) {\n\t\t\t\tconst childLabel = getChildrenAsLabel(child)\n\n\t\t\t\tif (childLabel) {\n\t\t\t\t\tlabel.push(childLabel)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// ReactElement | JSXElementConstructor | ReactPortal\n\t\t\t\tif ('props' in child && 'children' in child.props) {\n\t\t\t\t\tconst childLabel = getChildrenAsLabel(child.props.children)\n\n\t\t\t\t\tif (childLabel) {\n\t\t\t\t\t\tlabel.push(childLabel)\n\t\t\t\t\t}\n\t\t\t\t} else if ('children' in child) {\n\t\t\t\t\t// ReactPortal\n\t\t\t\t\tconst childLabel = getChildrenAsLabel(child.children)\n\n\t\t\t\t\tif (childLabel) {\n\t\t\t\t\t\tlabel.push(childLabel)\n\t\t\t\t\t}\n\t\t\t\t} else if (import.meta.env.DEV) {\n\t\t\t\t\tconsole.warn('Unsupported child:', child)\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\treturn label.length > 0 ? label.join('') : undefined\n\t}\n}\n\n/**\n * Walks through the children and returns a string representation of the text content.\n *\n * @param node - The children to walk through.\n * @returns String representation of the text content or undefined if there is no text content.\n *\n */\nexport function useChildrenAsLabel(node: ReactNode): string | undefined {\n\treturn useMemo(() => getChildrenAsLabel(node), [node])\n}\n"],"names":[],"mappings":";AAEA,MAAM,0BAA0B;AAEhC,SAAS,UAAU,MAAsB;AACxC,SAAO,KAAK,QAAQ,yBAAyB,GAAG,EAAE,KAAK;AACxD;AASO,SAAS,mBAAmB,MAAqC;AACvE,MAAI,OAAO,SAAS,YAAY,OAAO,SAAS,UAAU;AACzD,WAAO,OAAO,IAAI;AAAA,EAAA,WACR,SAAS,QAAQ,SAAS,UAAa,OAAO,SAAS,WAAW;AACrE,WAAA;AAAA,EACG,WAAA,MAAM,QAAQ,IAAI,GAAG;AAC/B,WAAO,UAAU,KAAK,IAAI,kBAAkB,EAAE,KAAK,EAAE,CAAC;AAAA,EAAA,OAChD;AACN,QAAI,QAA6B,CAAC;AAEzB,aAAA,IAAI,MAAM,CAAS,UAAA;AAC3B,UAAI,UAAU,QAAQ,UAAU,UAAa,OAAO,UAAU,UAAW;AAAA,eAC9D,OAAO,UAAU,UAAU;AACrC,cAAM,KAAK,KAAK;AAAA,MAAA,WACN,OAAO,UAAU,UAAU;AACrC,cAAM,KAAK,KAAK;AAAA,MACN,WAAA,MAAM,QAAQ,KAAK,GAAG;AAC1B,cAAA,aAAa,mBAAmB,KAAK;AAE3C,YAAI,YAAY;AACf,gBAAM,KAAK,UAAU;AAAA,QAAA;AAAA,MACtB,OACM;AAEN,YAAI,WAAW,SAAS,cAAc,MAAM,OAAO;AAClD,gBAAM,aAAa,mBAAmB,MAAM,MAAM,QAAQ;AAE1D,cAAI,YAAY;AACf,kBAAM,KAAK,UAAU;AAAA,UAAA;AAAA,QACtB,WACU,cAAc,OAAO;AAEzB,gBAAA,aAAa,mBAAmB,MAAM,QAAQ;AAEpD,cAAI,YAAY;AACf,kBAAM,KAAK,UAAU;AAAA,UAAA;AAAA,QACtB;MAGD;AAAA,IACD,CACA;AAED,WAAO,MAAM,SAAS,IAAI,MAAM,KAAK,EAAE,IAAI;AAAA,EAAA;AAE7C;AASO,SAAS,mBAAmB,MAAqC;AACvE,SAAO,QAAQ,MAAM,mBAAmB,IAAI,GAAG,CAAC,IAAI,CAAC;AACtD;"}
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- function setRef(ref, instance) {
5
- if (ref) {
6
- if (typeof ref === "function") {
7
- ref(instance);
8
- } else if (instance) {
9
- ref.current = instance;
10
- }
11
- }
12
- }
13
- function useComposeRef(...refs) {
14
- const initialRefs = React.useRef(refs);
15
- const composeRef = React.useMemo(() => {
16
- function composedRefCallback(instance) {
17
- initialRefs.current.forEach((ref) => setRef(ref, instance));
18
- setCurrent(instance);
19
- }
20
- function setCurrent(instance) {
21
- if (instance) {
22
- composedRefCallback.current = instance;
23
- }
24
- }
25
- composedRefCallback.current = null;
26
- return composedRefCallback;
27
- }, []);
28
- return composeRef;
29
- }
30
- exports.useComposeRef = useComposeRef;
31
- //# sourceMappingURL=useComposeRef.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useComposeRef.cjs","sources":["../../../../../packages/react-utils/src/hooks/useComposeRef.ts"],"sourcesContent":["import { MutableRefObject, RefCallback, useMemo, useRef } from 'react'\n\nexport type MaybeRef<T> = ((instance: T | null) => void) | MutableRefObject<T | null> | null | undefined\nexport type ComposedRefCallback<T> = RefCallback<T> & { current: T | null }\n\nfunction setRef<T>(ref: MaybeRef<T>, instance: T | null): void {\n\tif (ref) {\n\t\tif (typeof ref === 'function') {\n\t\t\tref(instance)\n\t\t} else if (instance) {\n\t\t\tref.current = instance\n\t\t}\n\t}\n}\n\n/**\n * Fills any number of refs with an instance\n *\n * Useful when you need to use outer ref and inner in the same time, e.g. passing element\n * back to forwardedRef an also using the same value within the component locally.\n *\n * @param refs - Rest parameter of refs to fill with instance\n * @returns Returns a function similar to a RefCallback\n */\nexport function useComposeRef<T>(...refs: MaybeRef<T>[]): ComposedRefCallback<T> {\n\tconst initialRefs = useRef(refs)\n\n\tconst composeRef: ComposedRefCallback<T> = useMemo(() => {\n\t\tfunction composedRefCallback(instance: T | null) {\n\t\t\tinitialRefs.current.forEach(ref => setRef(ref, instance))\n\t\t\tsetCurrent(instance)\n\t\t}\n\n\t\tfunction setCurrent(instance: T | null) {\n\t\t\tif (instance) {\n\t\t\t\tcomposedRefCallback.current = instance\n\t\t\t}\n\t\t}\n\n\t\tcomposedRefCallback.current = null as T | null\n\n\t\treturn composedRefCallback\n\t}, [])\n\n\treturn composeRef\n}\n"],"names":["useRef","useMemo"],"mappings":";;;AAKA,SAAS,OAAU,KAAkB,UAA0B;AAC9D,MAAI,KAAK;AACJ,QAAA,OAAO,QAAQ,YAAY;AAC9B,UAAI,QAAQ;AAAA,eACF,UAAU;AACpB,UAAI,UAAU;AAAA,IAAA;AAAA,EACf;AAEF;AAWO,SAAS,iBAAoB,MAA6C;AAC1E,QAAA,cAAcA,aAAO,IAAI;AAEzB,QAAA,aAAqCC,MAAAA,QAAQ,MAAM;AACxD,aAAS,oBAAoB,UAAoB;AAChD,kBAAY,QAAQ,QAAQ,CAAA,QAAO,OAAO,KAAK,QAAQ,CAAC;AACxD,iBAAW,QAAQ;AAAA,IAAA;AAGpB,aAAS,WAAW,UAAoB;AACvC,UAAI,UAAU;AACb,4BAAoB,UAAU;AAAA,MAAA;AAAA,IAC/B;AAGD,wBAAoB,UAAU;AAEvB,WAAA;AAAA,EACR,GAAG,EAAE;AAEE,SAAA;AACR;;"}
@@ -1,31 +0,0 @@
1
- import { useRef, useMemo } from "react";
2
- function setRef(ref, instance) {
3
- if (ref) {
4
- if (typeof ref === "function") {
5
- ref(instance);
6
- } else if (instance) {
7
- ref.current = instance;
8
- }
9
- }
10
- }
11
- function useComposeRef(...refs) {
12
- const initialRefs = useRef(refs);
13
- const composeRef = useMemo(() => {
14
- function composedRefCallback(instance) {
15
- initialRefs.current.forEach((ref) => setRef(ref, instance));
16
- setCurrent(instance);
17
- }
18
- function setCurrent(instance) {
19
- if (instance) {
20
- composedRefCallback.current = instance;
21
- }
22
- }
23
- composedRefCallback.current = null;
24
- return composedRefCallback;
25
- }, []);
26
- return composeRef;
27
- }
28
- export {
29
- useComposeRef
30
- };
31
- //# sourceMappingURL=useComposeRef.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useComposeRef.js","sources":["../../../../../packages/react-utils/src/hooks/useComposeRef.ts"],"sourcesContent":["import { MutableRefObject, RefCallback, useMemo, useRef } from 'react'\n\nexport type MaybeRef<T> = ((instance: T | null) => void) | MutableRefObject<T | null> | null | undefined\nexport type ComposedRefCallback<T> = RefCallback<T> & { current: T | null }\n\nfunction setRef<T>(ref: MaybeRef<T>, instance: T | null): void {\n\tif (ref) {\n\t\tif (typeof ref === 'function') {\n\t\t\tref(instance)\n\t\t} else if (instance) {\n\t\t\tref.current = instance\n\t\t}\n\t}\n}\n\n/**\n * Fills any number of refs with an instance\n *\n * Useful when you need to use outer ref and inner in the same time, e.g. passing element\n * back to forwardedRef an also using the same value within the component locally.\n *\n * @param refs - Rest parameter of refs to fill with instance\n * @returns Returns a function similar to a RefCallback\n */\nexport function useComposeRef<T>(...refs: MaybeRef<T>[]): ComposedRefCallback<T> {\n\tconst initialRefs = useRef(refs)\n\n\tconst composeRef: ComposedRefCallback<T> = useMemo(() => {\n\t\tfunction composedRefCallback(instance: T | null) {\n\t\t\tinitialRefs.current.forEach(ref => setRef(ref, instance))\n\t\t\tsetCurrent(instance)\n\t\t}\n\n\t\tfunction setCurrent(instance: T | null) {\n\t\t\tif (instance) {\n\t\t\t\tcomposedRefCallback.current = instance\n\t\t\t}\n\t\t}\n\n\t\tcomposedRefCallback.current = null as T | null\n\n\t\treturn composedRefCallback\n\t}, [])\n\n\treturn composeRef\n}\n"],"names":[],"mappings":";AAKA,SAAS,OAAU,KAAkB,UAA0B;AAC9D,MAAI,KAAK;AACJ,QAAA,OAAO,QAAQ,YAAY;AAC9B,UAAI,QAAQ;AAAA,eACF,UAAU;AACpB,UAAI,UAAU;AAAA,IAAA;AAAA,EACf;AAEF;AAWO,SAAS,iBAAoB,MAA6C;AAC1E,QAAA,cAAc,OAAO,IAAI;AAEzB,QAAA,aAAqC,QAAQ,MAAM;AACxD,aAAS,oBAAoB,UAAoB;AAChD,kBAAY,QAAQ,QAAQ,CAAA,QAAO,OAAO,KAAK,QAAQ,CAAC;AACxD,iBAAW,QAAQ;AAAA,IAAA;AAGpB,aAAS,WAAW,UAAoB;AACvC,UAAI,UAAU;AACb,4BAAoB,UAAU;AAAA,MAAA;AAAA,IAC/B;AAGD,wBAAoB,UAAU;AAEvB,WAAA;AAAA,EACR,GAAG,EAAE;AAEE,SAAA;AACR;"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const useConstantLengthInvariant = (items, message) => {
4
- };
5
- exports.useConstantLengthInvariant = useConstantLengthInvariant;
6
- //# sourceMappingURL=useConstantLengthInvariant.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useConstantLengthInvariant.cjs","sources":["../../../../../packages/react-utils/src/hooks/useConstantLengthInvariant.ts"],"sourcesContent":["import { usePreviousValue } from './usePreviousValue'\n\n// This entire hook should get optimized away for prod\nexport const useConstantLengthInvariant = <Item>(items: Item[], message?: string) => {\n\tif (import.meta.env.DEV) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst previous = usePreviousValue(items)\n\t\tif (previous.length !== items.length) {\n\t\t\tthrow new Error(\n\t\t\t\t`Invariant violation: ${message || 'Changing the length of an array whose length must remain constant between renders.'\n\t\t\t\t}`,\n\t\t\t)\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;AAGa,MAAA,6BAA6B,CAAO,OAAe,YAAqB;AAWrF;;"}
@@ -1,6 +0,0 @@
1
- const useConstantLengthInvariant = (items, message) => {
2
- };
3
- export {
4
- useConstantLengthInvariant
5
- };
6
- //# sourceMappingURL=useConstantLengthInvariant.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useConstantLengthInvariant.js","sources":["../../../../../packages/react-utils/src/hooks/useConstantLengthInvariant.ts"],"sourcesContent":["import { usePreviousValue } from './usePreviousValue'\n\n// This entire hook should get optimized away for prod\nexport const useConstantLengthInvariant = <Item>(items: Item[], message?: string) => {\n\tif (import.meta.env.DEV) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst previous = usePreviousValue(items)\n\t\tif (previous.length !== items.length) {\n\t\t\tthrow new Error(\n\t\t\t\t`Invariant violation: ${message || 'Changing the length of an array whose length must remain constant between renders.'\n\t\t\t\t}`,\n\t\t\t)\n\t\t}\n\t}\n}\n"],"names":[],"mappings":"AAGa,MAAA,6BAA6B,CAAO,OAAe,YAAqB;AAWrF;"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const useConstantValueInvariant = (value, message) => {
4
- };
5
- exports.useConstantValueInvariant = useConstantValueInvariant;
6
- //# sourceMappingURL=useConstantValueInvariant.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useConstantValueInvariant.cjs","sources":["../../../../../packages/react-utils/src/hooks/useConstantValueInvariant.ts"],"sourcesContent":["import { usePreviousValue } from './usePreviousValue'\n\n// This entire hook should get optimized away for prod\nexport const useConstantValueInvariant = <Value>(value: Value, message?: string) => {\n\tif (import.meta.env.DEV) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst previous = usePreviousValue(value)\n\t\tif (previous !== value) {\n\t\t\tthrow new Error(\n\t\t\t\t`Invariant violation: ${message || 'Changing a value which must remain constant between renders.'}`,\n\t\t\t)\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;AAGa,MAAA,4BAA4B,CAAQ,OAAc,YAAqB;AAUpF;;"}
@@ -1,6 +0,0 @@
1
- const useConstantValueInvariant = (value, message) => {
2
- };
3
- export {
4
- useConstantValueInvariant
5
- };
6
- //# sourceMappingURL=useConstantValueInvariant.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useConstantValueInvariant.js","sources":["../../../../../packages/react-utils/src/hooks/useConstantValueInvariant.ts"],"sourcesContent":["import { usePreviousValue } from './usePreviousValue'\n\n// This entire hook should get optimized away for prod\nexport const useConstantValueInvariant = <Value>(value: Value, message?: string) => {\n\tif (import.meta.env.DEV) {\n\t\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tconst previous = usePreviousValue(value)\n\t\tif (previous !== value) {\n\t\t\tthrow new Error(\n\t\t\t\t`Invariant violation: ${message || 'Changing a value which must remain constant between renders.'}`,\n\t\t\t)\n\t\t}\n\t}\n}\n"],"names":[],"mappings":"AAGa,MAAA,4BAA4B,CAAQ,OAAc,YAAqB;AAUpF;"}
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const useDebounce = (value, debounceMs) => {
5
- const [debounced, setDebounced] = React.useState(value);
6
- React.useEffect(() => {
7
- const handle = window.setTimeout(() => setDebounced(value), debounceMs);
8
- return () => {
9
- window.clearTimeout(handle);
10
- };
11
- }, [value, debounceMs]);
12
- return debounced;
13
- };
14
- exports.useDebounce = useDebounce;
15
- //# sourceMappingURL=useDebounce.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDebounce.cjs","sources":["../../../../../packages/react-utils/src/hooks/useDebounce.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nexport const useDebounce = <T>(value: T, debounceMs: number): T => {\n\tconst [debounced, setDebounced] = useState(value)\n\tuseEffect(() => {\n\t\tconst handle = window.setTimeout(() => setDebounced(value), debounceMs)\n\t\treturn () => {\n\t\t\twindow.clearTimeout(handle)\n\t\t}\n\t}, [value, debounceMs])\n\treturn debounced\n}\n"],"names":["useState","useEffect"],"mappings":";;;AAEa,MAAA,cAAc,CAAI,OAAU,eAA0B;AAClE,QAAM,CAAC,WAAW,YAAY,IAAIA,MAAAA,SAAS,KAAK;AAChDC,QAAAA,UAAU,MAAM;AACf,UAAM,SAAS,OAAO,WAAW,MAAM,aAAa,KAAK,GAAG,UAAU;AACtE,WAAO,MAAM;AACZ,aAAO,aAAa,MAAM;AAAA,IAC3B;AAAA,EAAA,GACE,CAAC,OAAO,UAAU,CAAC;AACf,SAAA;AACR;;"}
@@ -1,15 +0,0 @@
1
- import { useState, useEffect } from "react";
2
- const useDebounce = (value, debounceMs) => {
3
- const [debounced, setDebounced] = useState(value);
4
- useEffect(() => {
5
- const handle = window.setTimeout(() => setDebounced(value), debounceMs);
6
- return () => {
7
- window.clearTimeout(handle);
8
- };
9
- }, [value, debounceMs]);
10
- return debounced;
11
- };
12
- export {
13
- useDebounce
14
- };
15
- //# sourceMappingURL=useDebounce.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDebounce.js","sources":["../../../../../packages/react-utils/src/hooks/useDebounce.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nexport const useDebounce = <T>(value: T, debounceMs: number): T => {\n\tconst [debounced, setDebounced] = useState(value)\n\tuseEffect(() => {\n\t\tconst handle = window.setTimeout(() => setDebounced(value), debounceMs)\n\t\treturn () => {\n\t\t\twindow.clearTimeout(handle)\n\t\t}\n\t}, [value, debounceMs])\n\treturn debounced\n}\n"],"names":[],"mappings":";AAEa,MAAA,cAAc,CAAI,OAAU,eAA0B;AAClE,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAChD,YAAU,MAAM;AACf,UAAM,SAAS,OAAO,WAAW,MAAM,aAAa,KAAK,GAAG,UAAU;AACtE,WAAO,MAAM;AACZ,aAAO,aAAa,MAAM;AAAA,IAC3B;AAAA,EAAA,GACE,CAAC,OAAO,UAAU,CAAC;AACf,SAAA;AACR;"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const useDebounceCallback = (cb, debounceMs) => {
5
- const timerRef = React.useRef();
6
- const cbRef = React.useRef(cb);
7
- cbRef.current = cb;
8
- React.useEffect(() => {
9
- return () => clearTimeout(timerRef.current);
10
- }, []);
11
- return React.useCallback(() => {
12
- timerRef.current && clearTimeout(timerRef.current);
13
- timerRef.current = setTimeout(() => {
14
- cbRef.current();
15
- }, debounceMs);
16
- }, [debounceMs]);
17
- };
18
- exports.useDebounceCallback = useDebounceCallback;
19
- //# sourceMappingURL=useDebounceCallback.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDebounceCallback.cjs","sources":["../../../../../packages/react-utils/src/hooks/useDebounceCallback.ts"],"sourcesContent":["import { useCallback, useEffect, useRef } from 'react'\n\nexport const useDebounceCallback = (cb: () => any, debounceMs: number) => {\n\tconst timerRef = useRef<ReturnType<typeof setTimeout>>()\n\tconst cbRef = useRef(cb)\n\tcbRef.current = cb\n\n\tuseEffect(() => {\n\t\treturn () => clearTimeout(timerRef.current)\n\t}, [])\n\n\treturn useCallback(() => {\n\t\ttimerRef.current && clearTimeout(timerRef.current)\n\n\t\ttimerRef.current = setTimeout(() => {\n\t\t\tcbRef.current()\n\t\t}, debounceMs)\n\t}, [debounceMs])\n}\n"],"names":["useRef","useEffect","useCallback"],"mappings":";;;AAEa,MAAA,sBAAsB,CAAC,IAAe,eAAuB;AACzE,QAAM,WAAWA,MAAAA,OAAsC;AACjD,QAAA,QAAQA,aAAO,EAAE;AACvB,QAAM,UAAU;AAEhBC,QAAAA,UAAU,MAAM;AACR,WAAA,MAAM,aAAa,SAAS,OAAO;AAAA,EAC3C,GAAG,EAAE;AAEL,SAAOC,kBAAY,MAAM;AACf,aAAA,WAAW,aAAa,SAAS,OAAO;AAExC,aAAA,UAAU,WAAW,MAAM;AACnC,YAAM,QAAQ;AAAA,OACZ,UAAU;AAAA,EAAA,GACX,CAAC,UAAU,CAAC;AAChB;;"}
@@ -1,19 +0,0 @@
1
- import { useRef, useEffect, useCallback } from "react";
2
- const useDebounceCallback = (cb, debounceMs) => {
3
- const timerRef = useRef();
4
- const cbRef = useRef(cb);
5
- cbRef.current = cb;
6
- useEffect(() => {
7
- return () => clearTimeout(timerRef.current);
8
- }, []);
9
- return useCallback(() => {
10
- timerRef.current && clearTimeout(timerRef.current);
11
- timerRef.current = setTimeout(() => {
12
- cbRef.current();
13
- }, debounceMs);
14
- }, [debounceMs]);
15
- };
16
- export {
17
- useDebounceCallback
18
- };
19
- //# sourceMappingURL=useDebounceCallback.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDebounceCallback.js","sources":["../../../../../packages/react-utils/src/hooks/useDebounceCallback.ts"],"sourcesContent":["import { useCallback, useEffect, useRef } from 'react'\n\nexport const useDebounceCallback = (cb: () => any, debounceMs: number) => {\n\tconst timerRef = useRef<ReturnType<typeof setTimeout>>()\n\tconst cbRef = useRef(cb)\n\tcbRef.current = cb\n\n\tuseEffect(() => {\n\t\treturn () => clearTimeout(timerRef.current)\n\t}, [])\n\n\treturn useCallback(() => {\n\t\ttimerRef.current && clearTimeout(timerRef.current)\n\n\t\ttimerRef.current = setTimeout(() => {\n\t\t\tcbRef.current()\n\t\t}, debounceMs)\n\t}, [debounceMs])\n}\n"],"names":[],"mappings":";AAEa,MAAA,sBAAsB,CAAC,IAAe,eAAuB;AACzE,QAAM,WAAW,OAAsC;AACjD,QAAA,QAAQ,OAAO,EAAE;AACvB,QAAM,UAAU;AAEhB,YAAU,MAAM;AACR,WAAA,MAAM,aAAa,SAAS,OAAO;AAAA,EAC3C,GAAG,EAAE;AAEL,SAAO,YAAY,MAAM;AACf,aAAA,WAAW,aAAa,SAAS,OAAO;AAExC,aAAA,UAAU,WAAW,MAAM;AACnC,YAAM,QAAQ;AAAA,OACZ,UAAU;AAAA,EAAA,GACX,CAAC,UAAU,CAAC;AAChB;"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- function useDocumentTitle(title, formatter) {
5
- const initialTitle = React.useRef(document.title).current;
6
- React.useEffect(() => {
7
- if (title) {
8
- if (formatter) {
9
- document.title = formatter(title, initialTitle);
10
- } else {
11
- document.title = title;
12
- }
13
- } else {
14
- document.title = initialTitle;
15
- }
16
- return () => {
17
- document.title = initialTitle;
18
- };
19
- }, [formatter, initialTitle, title]);
20
- }
21
- exports.useDocumentTitle = useDocumentTitle;
22
- //# sourceMappingURL=useDocumentTitle.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDocumentTitle.cjs","sources":["../../../../../packages/react-utils/src/hooks/useDocumentTitle.ts"],"sourcesContent":["import { useEffect, useRef } from 'react'\n\nexport function useDocumentTitle(title: string | null | undefined, formatter?: (title: string, initialTitle: string) => string) {\n\tconst initialTitle = useRef(document.title).current\n\n\tuseEffect(() => {\n\t\tif (title) {\n\t\t\tif (formatter) {\n\t\t\t\tdocument.title = formatter(title, initialTitle)\n\t\t\t} else {\n\t\t\t\tdocument.title = title\n\t\t\t}\n\t\t} else {\n\t\t\tdocument.title = initialTitle\n\t\t}\n\n\t\treturn () => {\n\t\t\tdocument.title = initialTitle\n\t\t}\n\t}, [formatter, initialTitle, title])\n}\n"],"names":["useRef","useEffect"],"mappings":";;;AAEgB,SAAA,iBAAiB,OAAkC,WAA6D;AAC/H,QAAM,eAAeA,MAAA,OAAO,SAAS,KAAK,EAAE;AAE5CC,QAAAA,UAAU,MAAM;AACf,QAAI,OAAO;AACV,UAAI,WAAW;AACL,iBAAA,QAAQ,UAAU,OAAO,YAAY;AAAA,MAAA,OACxC;AACN,iBAAS,QAAQ;AAAA,MAAA;AAAA,IAClB,OACM;AACN,eAAS,QAAQ;AAAA,IAAA;AAGlB,WAAO,MAAM;AACZ,eAAS,QAAQ;AAAA,IAClB;AAAA,EACE,GAAA,CAAC,WAAW,cAAc,KAAK,CAAC;AACpC;;"}
@@ -1,22 +0,0 @@
1
- import { useRef, useEffect } from "react";
2
- function useDocumentTitle(title, formatter) {
3
- const initialTitle = useRef(document.title).current;
4
- useEffect(() => {
5
- if (title) {
6
- if (formatter) {
7
- document.title = formatter(title, initialTitle);
8
- } else {
9
- document.title = title;
10
- }
11
- } else {
12
- document.title = initialTitle;
13
- }
14
- return () => {
15
- document.title = initialTitle;
16
- };
17
- }, [formatter, initialTitle, title]);
18
- }
19
- export {
20
- useDocumentTitle
21
- };
22
- //# sourceMappingURL=useDocumentTitle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDocumentTitle.js","sources":["../../../../../packages/react-utils/src/hooks/useDocumentTitle.ts"],"sourcesContent":["import { useEffect, useRef } from 'react'\n\nexport function useDocumentTitle(title: string | null | undefined, formatter?: (title: string, initialTitle: string) => string) {\n\tconst initialTitle = useRef(document.title).current\n\n\tuseEffect(() => {\n\t\tif (title) {\n\t\t\tif (formatter) {\n\t\t\t\tdocument.title = formatter(title, initialTitle)\n\t\t\t} else {\n\t\t\t\tdocument.title = title\n\t\t\t}\n\t\t} else {\n\t\t\tdocument.title = initialTitle\n\t\t}\n\n\t\treturn () => {\n\t\t\tdocument.title = initialTitle\n\t\t}\n\t}, [formatter, initialTitle, title])\n}\n"],"names":[],"mappings":";AAEgB,SAAA,iBAAiB,OAAkC,WAA6D;AAC/H,QAAM,eAAe,OAAO,SAAS,KAAK,EAAE;AAE5C,YAAU,MAAM;AACf,QAAI,OAAO;AACV,UAAI,WAAW;AACL,iBAAA,QAAQ,UAAU,OAAO,YAAY;AAAA,MAAA,OACxC;AACN,iBAAS,QAAQ;AAAA,MAAA;AAAA,IAClB,OACM;AACN,eAAS,QAAQ;AAAA,IAAA;AAGlB,WAAO,MAAM;AACZ,eAAS,QAAQ;AAAA,IAClB;AAAA,EACE,GAAA,CAAC,WAAW,cAAc,KAAK,CAAC;AACpC;"}
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const equal = require("fast-deep-equal/es6/index.js");
4
- const React = require("react");
5
- function useExpectSameValueReference(next, shouldThrow = false) {
6
- const previous = React.useRef(next);
7
- if (next !== previous.current && typeof next === "object" && typeof previous.current === "object" && equal(next, previous.current)) {
8
- if (shouldThrow) {
9
- throw new Error("Expecting same reference for same values");
10
- }
11
- }
12
- previous.current = next;
13
- }
14
- exports.useExpectSameValueReference = useExpectSameValueReference;
15
- //# sourceMappingURL=useExpectSameValueReference.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useExpectSameValueReference.cjs","sources":["../../../../../packages/react-utils/src/hooks/useExpectSameValueReference.ts"],"sourcesContent":["import deepEqual from 'fast-deep-equal/es6/index.js'\nimport { useRef } from 'react'\n\n/**\n * Checks whether the next value is the same reference as the previous one\n *\n * If not, it checks whether the values are deeply equal. If not, it logs an error.\n *\n * @param next - Value to be checked.\n * @param shouldThrow - If true, it throws an error instead of logging it. Defaults to false.\n * @returns void\n * -\n * @example\n * ```ts\n * useExpectSameValueReference(style)\n * ```\n * @example\n * ```ts\n * useExpectSameValueReference(style, true)\n * ```\n * @example\n * ```ts\n * useExpectSameValueReference(style, import.meta.env.DEV)\n * ```\n */\nexport function useExpectSameValueReference<T>(next: T, shouldThrow: boolean = false) {\n\tconst previous = useRef(next)\n\n\tif (next !== previous.current\n\t\t&& typeof next === 'object'\n\t\t&& typeof previous.current === 'object'\n\t\t&& deepEqual(next, previous.current)\n\t) {\n\t\tif (import.meta.env.DEV) {\n\t\t\tconsole.error(\n\t\t\t\t'Previous and next values do not match in reference although match in value. ' +\n\t\t\t\t'Try declaring constants outside of the component scope. ' +\n\t\t\t\t'Otherwise try to memoize callbacks with useCallback, ' +\n\t\t\t\t'useReferentiallyStableCallback useEvent, useRef or useMemo.', {\n\t\t\t\t\tprevious: previous.current,\n\t\t\t\t\tnext,\n\t\t\t\t})\n\t\t}\n\n\t\tif (shouldThrow) {\n\t\t\tthrow new Error('Expecting same reference for same values')\n\t\t}\n\t}\n\n\tprevious.current = next\n}\n"],"names":["useRef","deepEqual"],"mappings":";;;;AAyBgB,SAAA,4BAA+B,MAAS,cAAuB,OAAO;AAC/E,QAAA,WAAWA,aAAO,IAAI;AAE5B,MAAI,SAAS,SAAS,WAClB,OAAO,SAAS,YAChB,OAAO,SAAS,YAAY,YAC5BC,MAAU,MAAM,SAAS,OAAO,GAClC;AAYD,QAAI,aAAa;AACV,YAAA,IAAI,MAAM,0CAA0C;AAAA,IAAA;AAAA,EAC3D;AAGD,WAAS,UAAU;AACpB;;"}